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). Both lists are declaration rows, so a repository using several of this repo’s actions or packages appears once per use: dependent_repositories_total is the number of distinct repositories.
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 traversal over confidence-filtered edges.
max_depth defaults to 10 (range 1–20). min_confidence defaults to 0.4, which admits every reference a machine could act on and excludes only references a human reads (prose, templates, generated blobs).
Two fields on the response keep a filtered answer honest:
applied_min_confidence— the floor actually used, so you can tell a narrowed answer from a complete one.excluded_by_confidence— how many repos the floor removed. An emptyaffected_repositorieswith a non-zero count here means “filtered out”, not “nothing breaks”.
confidence is the weakest edge on the strongest chain reaching it. To narrow the radius, filter that field client-side rather than re-requesting — confidence >= 0.8 gives you deterministic parser edges plus build-file and manifest evidence, using data the response already carries.
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:
Group dependents by action or package
Each/dependents row is one use: the consuming repository is target_repository_id / target_repository_name, and raw_reference is what it uses — for GitHub Actions the full uses: path, such as grafana/shared-workflows/actions/send-slack-message. Grouping on it answers “which repos use this action, pinned where?” before you deprecate or break it.
Python
owner/repo of the hub as its raw_reference until it is rescanned.
