httpx (async). The TypeScript examples use the runtimeānative fetch (Node 22+ / modern browsers).
1. Resolve a clone URL
The agent has a working tree atgithub.com/myorg/payments-api and needs to find the corresponding Riftmap repo.
full_path=myorg/payments-api instead of url= if you only have the slug.
2. Hydrate context in one roundātrip
Once you have the repo ID, fetch repo + capped dependencies + capped dependents + artifacts + a slim ownership summary in a single call.dependencies_total and dependents_total to detect when you need to paginate the full lists separately (the bundled arrays are capped at 100).
3. Compute the transitive blast radius
When you actually need to know āif I change repo A, what transitively breaks?ā, call/impact. This runs a Python BFS over confidenceāfiltered edges.
max_depth defaults to 10 (range 1ā20). min_confidence defaults to 0.8 ā drop to 0.5 if you want to include heuristic matches in the radius.
4. Walk the local subgraph
For visualisation, or for an agent that wants the local neighbourhood rather than the full transitive set, request a subgraph anchored at a repo.{ nodes: [{id, type, label, metadata: {archived, last_activity_at, health_status, ā¦}}], edges: [{source, target, dependency_type, version_constraint, confidence}] }. The shape is G6āready, but plain enough to drive any visualisation library.
Pagination
Fordependencies / dependents lists past 100 items:
Errors agents should handle
| Status | Meaning | Recommended action |
|---|---|---|
401 | Missing or invalid API key | Surface to user; never retry. |
404 | Repo not in this workspace, or never scanned | Try lookup with the alternate parameter; fall back to āunknown repoā. |
409 | Lookup matched multiple repos | Disambiguate using full_path. |
422 | Outāofārange pagination, or invalid query param | Fix the request; do not retry. |
429 | Rate limit (mutations only) | Honour Retry-After header before retrying. |
