{"id":"graph-ancestors","version":"1.0.0","description":"List every ancestor of given targets, including the targets, in reverse-graph BFS discovery order.","supported_operations":["graph ancestors","upstream prerequisites of targets","ancestors of graph nodes"],"unsupported_operations":["dominance","immediate parents only","undirected ancestor search","enumerating every ancestor path"],"semantics":["Input is a directed simple graph plus a non-empty targets array of unique existing node ids.","An original edge from u to v means u is a prerequisite of v and a reverse-graph successor of v.","The output nodes array is reverse-graph BFS discovery order, including every target.","Targets are enqueued in the given targets array order, skipping an id already queued.","After a node is popped, unseen reverse-graph neighbors are pushed in the declared order of original incoming edges.","A target is included even when it has no incoming edges.","Empty graph cannot name a target and is rejected.","Self-loops and directed cycles are allowed; first visit wins.","Unknown fields, duplicate nodes or edges, missing endpoints, and unknown or duplicate targets are rejected."],"limits":{"max_nodes":2000,"max_edges":10000,"max_node_id_bytes":256,"max_targets":2000},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["nodes","edges","targets"],"properties":{"nodes":{"type":"array","maxItems":2000,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":256}},"edges":{"type":"array","maxItems":10000,"items":{"type":"object","additionalProperties":false,"required":["from","to"],"properties":{"from":{"type":"string","minLength":1,"maxLength":256},"to":{"type":"string","minLength":1,"maxLength":256}}}},"targets":{"type":"array","minItems":1,"maxItems":2000,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":256}}}},"output_schema":{"type":"object","additionalProperties":false,"required":["nodes"],"properties":{"nodes":{"type":"array","items":{"type":"string"}}}},"examples":[{"input":{"nodes":["compile","test","lint","package","deploy"],"edges":[{"from":"compile","to":"test"},{"from":"compile","to":"package"},{"from":"lint","to":"package"},{"from":"test","to":"deploy"},{"from":"package","to":"deploy"}],"targets":["deploy"]},"output":{"nodes":["deploy","test","package","compile","lint"]}}],"execute_url":"/v1/tools/graph-ancestors/versions/1.0.0/execute"}