Documentation

Docs / Command line

graphvein serve

graphvein serve [--addr 127.0.0.1:7420]
graphvein serve [path] [--repository id] [--addr 127.0.0.1:7420]
graphvein serve --project <manifest or its directory> [--addr 127.0.0.1:7420]

Serves the local web UI and HTTP API v0. Design and reasons: ADR 0041; one server for every index of the workspace: ADR 0087.

On start, serve prints one line to stdout:

Serving <repository> at http://127.0.0.1:7420/
Serving <repository> (+N in the workspace) at http://127.0.0.1:7420/
Serving the workspace (N entries) at http://127.0.0.1:7420/

The second form appears when the workspace has N other entries, the third for serve without a path.

The URL holds the actual port (also when port 0 was given), IPv6 hosts in brackets. Logs go to stderr (slog text): server started, server stopped, a warning for each rejected request (reason, Host, path; never the query string) and an error for each failed request. Ctrl+C stops the server: it cancels running requests at once (a status request in progress answers 503 unavailable), waits up to 5 seconds for connections to finish and then closes the store. A running re-index is cancelled first and rolls back; serve waits for it to close its writer store and release the index lock before it exits. SIGTERM is not handled and ends the process at once; a re-index in progress is then lost without a trace (its transaction never committed) and its lock is released by the operating system or the database.

Exit codes: 2 for usage errors (unknown flag, extra argument, an --addr that is not a loopback IP literal); 1 when the store cannot be opened, the address cannot be bound (for example the port is in use; try --addr 127.0.0.1:0) or serving fails; 0 after Ctrl+C. In Git Bash under mintty the shutdown is graceful but bash reports exit status 130 for a Ctrl+C; run through winpty to see the program's own status (verified on Windows, 2026-11-04).

Project mode (--project)

graphvein serve --project serves one project (ADR 0075 "Server and UI", project manifests): one project per server, read from the project store that graphvein index --project filled (SQLite <manifest dir>/.graphvein/index.db, or GRAPHVEIN_POSTGRES_URL / GRAPHVEIN_SQLITE_PATH as for index --project). serve on a repository is unchanged. A path or --repository with --project is a usage error (exit 2), as is a manifest that does not load. It prints

Serving project <name> (<n> members) at http://127.0.0.1:7420/

(with (+N in the workspace) before at when the workspace has N other entries).

Workspace (multi-index server)

One serve process serves every index of the workspace registry (ADR 0087; the registry file: configuration; claim rows: workspace).

GET /api/v0/workspace

{
  "api_version": 0,
  "registry": {"path": "/home/dev/.config/graphvein/workspace.yaml", "error": null},
  "token": "Q7K2...",
  "current": "api~1f0c2b9a",
  "suggestion": null,
  "open_limit": 8,
  "entries": [
    {"id": "shop~7d41e0c2", "kind": "project", "name": "shop", "path": "/home/dev/src/shop",
     "registered": true, "current": false, "state": "not_open",
     "freshness": {"state": "stale", "checked_at": "2026-11-24T10:00:00Z", "changed_count": null},
     "members": [{"repository": "api", "path": "/home/dev/src/api", "checkout": true,
                  "freshness": {"state": "fresh", "checked_at": "2026-11-24T10:00:00Z", "changed_count": 0}}],
     "members_error": null, "job": null, "conflict": null},
    {"id": "api~1f0c2b9a", "kind": "repository", "name": "api", "path": "/home/dev/src/api",
     "registered": true, "current": true, "state": "open", "freshness": null,
     "members": null, "members_error": null, "job": null, "conflict": null}
  ]
}

POST /api/v0/workspace/check, /add, /remove

Typed folder paths (ADR 0041 revision). Each POST passes the security checks of every state-changing POST and also needs a loopback peer (403 not_loopback), the session token in X-Graphvein-Token (403 token_required), Content-Type: application/json and one JSON object of at most 4 KiB with only the fields below. GET and other methods get 405.

check {"path": "/home/dev/src/miniflux"} reads nothing but file metadata, graphvein.yaml, graphvein-project.yaml and the folder's store (opened read-only), and answers 200:

{
  "api_version": 0,
  "path": "/home/dev/src/miniflux",
  "resolved": "/home/dev/src/miniflux",
  "outcome": "ready",
  "refusal": null,
  "kind": "repository",
  "name": "miniflux",
  "members": null,
  "index": {"state": "absent", "last_run": null, "error": null},
  "store": {"kind": "sqlite", "path": "/home/dev/src/miniflux/.graphvein/index.db"},
  "entry": null,
  "confirm": "M4X...",
  "confirm_expires_at": "2026-11-24T10:10:00Z",
  "command": "graphvein index '/home/dev/src/miniflux'",
  "contains": []
}

add {"path": "<resolved>", "confirm": "<value>", "index": true} uses the confirm value up (whatever the outcome), checks the folder again and registers it. With index true (the default) it opens the folder's index, creating an empty store where graphvein index would, and starts its run as POST /api/v0/index/run?ws= does (a project: the project re-index), answering 202 {"api_version": 0, "entry": {...}, "added": true, "job": {...}}; poll GET /api/v0/index/run?ws=<id> for progress. With index: false it only registers (200, job null); the entry is checked at once and its run can be started later with POST /api/v0/index/run?ws=<id>. Once registered the entry stays: when its index cannot be opened or the run is refused (index_locked, reindex_unsupported, index_lock_unavailable, single_store, store_error), the add answers 200 with the entry, job null and "run_error": {"code", "message"} (null otherwise). 409 confirm_required (no, used, expired or another folder's value) and 409 path_changed (a rule now refuses it, or its kind or name changed) register nothing. There is no cancel; stopping serve cancels a running job.

remove {"id": "<entry id>"} drops the entry from the registry and closes its index; the folder and its index are never deleted. 409 entry_in_use (the index named on the command line), 409 index_running, 404 unknown_entry.

Security behaviour

Web UI

GET / and GET /index.html serve the UI page (Cache-Control: no-cache). Files under /assets/ have content-hashed names and are served with Cache-Control: public, max-age=31536000, immutable; other files at the root get no-cache. Any other path is a plain-text 404; there are no directory listings and no fallback to index.html. The UI uses hash routing (/#/api), so its own paths never reach the server.

The UI is a shell for the views to come: a sidebar with the sections (API, Explorer, Architecture, Schema and Changes; Review shown as "Soon"), and a top bar with the repository, the compare chip, the freshness badge, a "Check" button and the extractor version. The top bar follows its own width: one row with every label from 1300 px; one row from 980 px, where the badge's time and Check's label move into their tooltips and accessible names; two rows of fixed height below (breadcrumb and status controls, then the chip and the extractor badge). Every part reserves its widest state, so no state moves the bar; a long base name is cut with an ellipsis and the chip's tooltip names it in full. It requests the status on load, every 30 s while the tab is visible, when the tab becomes visible or gets focus, and on "Check" ("Check" re-requests the status; it does not re-index). Only a successful answer whose state is fresh shows "Fresh"; stale, not_indexed, unknown, any state the UI does not know and a failed request ("Status unavailable") use the high-contrast warning style, and a failed request replaces the previous result. An extractor mismatch (extractor.matches false) is shown on the extractor badge as "re-index recommended"; it does not change the freshness state. /third-party-licenses.txt lists the licences of the software in the UI bundle. The sidebar footer shows the extractor and server versions of the last successful status answer only: skeletons until the first answer (and while a withdrawn answer is re-checked), "unavailable" after a failed request; no value is kept from an earlier answer. Sources and the rebuild workflow: web/README.md.

The Explorer section (#/explorer, T029, ADR 0081 "Explorer UI") is API documentation built from GET /api/v0/openapi only: operations grouped by router file or by the tag of the committed spec operation that documents them, collapsible, with method-coloured rows; an expanded operation shows the handler, path markers (settings default, set by you, conditional, may be shadowed, equivalent registrations, depth cap reached), parameters, request body, responses, security and auth as written, each item with a provenance chip (Fact, Read in handler, Intended, Returned, Mapped, with file:line) and each section with the state the document proves ("Not read by Graphvein", "None, proven" with its evidence, "Partial: more may exist" with the reason). A chip whose file:line has a link in the route's shape_links (the Explorer requests GET /api/v0/api/endpoint for the route of an operation when it is opened, once per route and editor; the document itself carries no editor link) ends in a small icon-only button with the editor's mark, "Open <file>:<line> in <editor>". From the same response, an opened operation lists under "Linked calls" each linked call (in project mode also each cross-repository caller, labelled "cross-repository link") whose request differs from what the route reads, with the same "Request differences" as the Flow tab's line detail; it lists nothing for calls that were not compared or agree. Routes with an unknown path part are listed below with the part marked and "Enter the missing part", which edits explorer.path_values through POST /api/v0/explorer/path-values (preview with diff, then apply). The Spec tab shows the document as YAML or JSON and downloads it. A header, query parameter or cookie a security scheme of the operation reads is shown in its section as "read by the security scheme (see Security)", and such a section never reads "None, proven" ("None besides the security scheme").

The API section's route detail shows the same sections for one route in its Overview tab, under "Request and response": the endpoint's shape (GET /api/v0/api/endpoint) with the Explorer's provenance chips and section states (each chip with its editor button from shape_links), the sections not read named in one "Not read by Graphvein" line, and "Open in Explorer" (#/explorer?route=<route identity>), which opens the operation the document writes for that route or says why there is none. In project mode both are the selected member's. When a model of the shape is also a database table (model_tables), the block notes "The model X (file) is also the database table Y", naming the class and its file, with a link to the table in the Schema view.

"Try it out" sends requests through the try-it endpoints below. An environment bar above the operations shows the selected environment (its label, also on every operation while selected, its base URL and where its auth comes from), lists the environments and the base URL suggestions (source and file:line, used only when picked) and adds one from a typed URL through the guarded edit (preview with diff, then "Allow and save"). Switching to a production-labelled environment shows one warning, then a production marker. In an expanded operation the builder takes path values, query and header rows pre-filled from the operation's items, a body (raw, a JSON template marked as a template, or multipart fields and files) or a free-form path; GET and HEAD are sent directly outside production, every other request shows the exact request and the reasons in place of Send ("Don't ask again for this environment until I switch"). Missing auth, an untrusted or changed certificate, a limit and a redirect to another origin each open a dialog with the user's options; the response shows status, time, sizes, redacted headers and the body (pretty JSON). "Copy as curl" writes the auth as $NAME, never a value. The rows are OX-1..OX-49 of the try-it claim contract.

The Schema section (T018f R2) shows one card per source group in its set strip (migration sets and model groups), a dashed card for a source the index proves was read and that holds nothing, and one per unread_tools entry ("Alembic migrations found, not read yet"); a "Rests on" line on the group (rests_on, a union: "Facts in <group> rest on") and on the table (an intersection), row chips where a record's claims rest on more than its table, and per-fact "why" popovers (contract row, assumption texts, the source line as an IDE link under the editor choice) that open on click or Enter, close on Escape and are placed with position: fixed. A group card shows the group's precision chip; beside a Precise model group's chip a "dialect unknown" or "mapped: unverified" note says that some of its facts are not checked against a database (docs/extract/precision.md). A model table's detail has "Routes that accept or return this model" (model_routes): each route with its method, path, whether it accepts or returns the model (and where: request body, a parameter, a response status, inside another model), the use's provenance chip and links to the route in the API section and in the Explorer. "No route of this repository uses this model" (in project mode, naming the member) appears only when the server proved it; otherwise the section says how many routes were not fully read, or that route shapes were not read. The Assumptions tab (#/schema?tab=assumptions&a=E2) lists /api/v0/schema/assumptions. Below 600 px the sidebar is its icon rail and popovers are bottom sheets.

The Architecture section (#/architecture, T026, combination X+) draws GET /api/v0/architecture as a map (React Flow on the ELK worker, ADR 0046; the sidebar is its icon rail): one card per shown component (kind, manifests, counts, deploy markers as text, calls with no link as a dashed chip), one card per schema set, a folded "Workspace libraries" card and the tests, docs and configured components behind the Show toggles (off by default; Tests also requests scope=all), one muted dotted SDK stub per component (on by default), and a Hidden note with what the toggles leave out. Links between one pair of cards are bundled into one line whose chip shows the families, the count and the fixed three-cell glyph protocol | auth | TLS (proven filled, "as written" / documented olive, mixed half, n/a grey, unknown hatched). Selecting a card or chip dims the rest and fills the inspector (full strip, each cell's value and source, tiers, evidence members with IDE links from /architecture/component); "Expand in place" lists a component's routes, calls, commands and tables by file (a filterable, scrolling list above 12 rows, one bundled line into its header) and a row opens the code peek. The breadcrumb shows level tags L1-L4; a minimap shows above 12 cards; the Links tab lists every link with per-cell sources, the SDK stubs, the documents counts and the Not proven list (compose services mapped to no component in one collapsed "Deploy services not tied to a component (n)" item with each reason inside; a service whose database image AE2 ties to a database card, and same-name services of its directory that write no image or build of their own, are noted there, not listed; an entry of a component hidden by default says "in hidden <docs|test|configured> component <name>"; "may also use" names the database card), with a CSV of the rows shown. A card's deploy line shows its AT2 ingress ("TLS as configured", never the link's TLS) and its markers; the inspector shows each marker's basis and each ingress with its router settings as written. In project mode (TOP-2 of 2026-11-18) another member reached by the stored project links is a muted dashed card "<repo> · other repository"; a component's calls the pass links there read "n linked across repositories" with "repository alone: m not linked" as secondary text (never the "not linked" chip), the line's inspector and Links tab row show the stored assumption, and a chain crosses into that card as far as the stored link ("continues in <repo>").

Selecting a component card, an expanded row or "Chain from" on a chain member draws its chain in place (T026, from /architecture/chain): the crossed cards open to the chain's members only (one column per step, numbered top to bottom over both directions), lines inside a card join two members, lines between cards are bundled per card pair with their wording and tier, and the rest of the map is dimmed. The members the server's budget hint leaves out fold into "+ n more at step k" per card (members of a hidden card fold at the root); "Open in Flow tab" opens the Flow tab for the start route or command (else the selected or nearest one). A component start numbers the cards and lines of its CE links instead. The inspector's top block is the evidence chain: each step with the stored edges into it (wording and tier), its members with their source, CH11 end lines under the member, CH12 cap notes, CH10 hidden counts and the step's map folds, every member within the caps (25 per step before "Show all"); a member selected there or on the map is one selection with its code peek, arrow keys walk the chain and Esc clears it. Beside the direction switch, a depth switch (1 to 10, T042) sets how many steps the chain follows each way; see Depth defaults. "Show in Links tab" filters the ledger to the links the chain crosses. Wording goes through the label table (rows 31-53, both styles). State lives in the hash (tab, show, exp, node, edge, item, chain, dir, depth, at).

Re-index (T016j, variant D) sits right of "Check" in a fixed-width slot (the badge reserves its widest label too, so nothing in the top bar moves between states). Idle it starts a run (POST /api/v0/index/run; filled while the badge is Stale or Not indexed). While the index lock is held the same button shows the run and opens its details (click, Enter or Space; Escape or Close closes them): "Indexing 212 / 457" with a bar only when the server sends progress, otherwise "Indexing" with an indeterminate bar; "Indexing (CLI)" when another process holds the lock; "Re-index failed · details" (code, message, the index still shown, Dismiss, Retry) until dismissed or the next run; a disabled-looking "Re-index" with the reason when the lock state is unknown. The UI polls GET /api/v0/index/run with the status every 30 s and every second while the lock is held. The badge keeps describing the shown index during a run and never says "Fresh" unless lock.state is free (a fresh index shows "Indexed T" meanwhile); after a commit it says "Indexed T', checking freshness..." until a status answer names the new run, then the views reload and a dismissible note says "Now showing the index of T' (was T)". There is no cancel control: stopping serve cancels the run.

The API section (#/api, ADR 0042) reads only the endpoints below and the polled status. It shows the coverage per transport (cards, or a compact strip below 1400 x 820 px) with every source root of the calling sites, the endpoint list (HTTP and Tauri IPC groups, windowed) and the selected endpoint's handler, OpenAPI operations and callers. Default scope is production; "Include tests" switches to all; the source-root filter sets root on every request. Only the exact status linked is shown as linked; statuses the UI does not know are shown raw under "Other". Callers are only the stored edges; near misses are listed apart; dynamic calls appear only in the gap sheets, which list the calls behind each non-linked count (and the endpoints without a linked caller) with search, grouping by reason, file or root, and "Copy list". When the polled status names another last run than the loaded data, the view requests everything again; a stale status adds a banner and every changed file is marked; index_changed is retried once. A list of source roots whose chips would not fit on one line (cards and strip, measured from the rendered chips) folds to one line: the largest roots by call count that fit (ties in the list's order), the active root's chip when a root filter is set, and a "+N more roots" chip that unfolds the full list in its usual order; "Show fewer" folds it again. The choice is one per browser for every roots list (localStorage graphvein.api.rootsExpanded, exactly 1 = unfolded); a list that fits is shown unchanged. Root chips filter like the Source root select. The view state is in the hash: #/api?transport=&tests=1&root=&sel=<id>&gap=<transport>:<category>&peek=<id>. IDE buttons open only links the server built (ide.link of each presented node); the UI never builds or rewrites a link. Each button's label is the response's ide.label, else the link's scheme (vscode, vscode-insiders, cursor, vscodium, vscodium-insiders, idea, zed), else "Open in editor"; it starts with the editor's mark, and its title and accessible name add the source in words from ide.source ("Zed, your choice in this browser", "VS Code, the repository default from graphvein.yaml", "VS Code, Graphvein's default (graphvein.yaml sets no editor)", "custom link from graphvein.yaml, not verified by Graphvein"). A preset that is not verified carries a visible warning (partly verified) or info (limited) icon on the button and its note in the title and name ("Open in Cursor, your choice in this browser (partly verified: ...)"). A response whose ide.editor is not the requested editor (an older server ignores editor=) is named as what it is, with "This server ignored your editor choice". A link the server did not vouch for adds an info icon (unless a warning already shows) and a note to its title and name instead of the changed-file note: ide.caveat tab_size_unknown (IntelliJ IDEA after a tab, line only) "opens the line only: a tab precedes the node and the editor's tab size is not known"; column_unit_assumed (Cursor) "column unit assumed from VS Code"; ide.line_only without a caveat (IntelliJ IDEA on a changed file) "opens the line only: the file changed since indexing; the line may have moved"; any other caveat "the column may be off".

The compare chip (T019b, ADR 0056) sets the base for the Changes section and for every view's "changed since" markers: the previous run (default), a journal run, a pin or a branch (ref:<base>[..<head>]). The choice and an on/off state are kept in this browser (localStorage graphvein.compare.v1); one click on its "×" turns comparing off. The chip shows the change count of /api/v0/changes/summary for that base, or the refusal (base_expired, base_unknown, reindex_needed, git_unavailable, ...) when the server refuses it. Its menu pins the latest run (POST pins), unpins, and starts a branch comparison (POST refs, then GET refs once a second until the job ends; the base switches when it has committed). The Changes section (#/changes?group= &change=&q=&tests=1&sel=&tab=change|impact|raw&depth=&pane=) shows the summary of both sides with its banners, the groups in the sidebar under "Changes" (not_extracted groups read "not extracted", never 0), one group's items and one item with its Change, Impact and Raw tabs. Item links to the editor are the head side's after.ide only; the change endpoints take no editor= parameter, so a browser editor choice is not applied there (the link says so). Below 600 px a group select replaces the sidebar list and one pane shows at a time, with a back step.

"Changed since" markers (T019b part 2) follow the chip's base: on the API section's endpoint rows (routes and ipc items whose identity is the row; endpoints the base had and the current index lacks are counted in the list footer), on Flow cards (the items of every identity a card stands for, and the calls_route or invokes_command items that leave it), on Schema tables, columns and migration rows. They read /api/v0/changes/items (every page of each group the view needs, tests=true), once per resolved comparison: the summary's index run, both sides (run, pin, commit) and the base's entry in /api/v0/changes/bases (a pin's id and run, the ref snapshots), which reloads with every status answer, so a re-run branch comparison or a pin deleted and pinned again from the CLI reloads the markers, the list and the impact panel. An items or impact answer read from another index run than the summary is not shown: the page checks the status, reloads the summary and shows loading meanwhile. Markers show only when the comparison's head is the current index (the views draw the current index); for a branch comparison whose head is another commit the chip says "markers off: this comparison's head is not the current index". A marker names the change in the Changes section's words ("paths changed, handler changed": every label and changed field, the full text in its tooltip; "body changed", "added", "edited (history rewritten)"); unknown now and known now keep their own dashed style and are never worded as changed, added or removed. A marker opens its item in Changes (#/changes?group=&sel=&pane=item); inside a list option, which may not hold a control, it is a decoration that opens the item on click, and the detail header repeats it as a link. On an endpoint row it follows the path and becomes a dot in a narrow list, so it never hides the path; the list footer's count of endpoints no longer in the index honours "Include tests". With comparing off, or a base the server refuses, no view shows a marker. Branch comparisons read "main..feature", or "main..current index" without a head ref, in every state; the menu and the summary name the merge base commit. The impact panel shows each assumes id of an I8 step with its catalogue title and text; the title chip opens the Schema view's popover.

Routes in the Changes section (T025) are named by their full composed path with router prefixes, as the API section shows them: a route item from its side's stored paths, an impact path from route_paths; a route mounted at several paths shows the first production path and "1 of N paths". Every full path (here, and in the API section's list, header, composed paths and Flow cards) carries the served trailing / of an entry with trailing_slash: true; entries differing only in it are shown as distinct paths. A near miss names its route the same way when the seed item or a loaded impact path gives its paths, else marks it "path as written". A route without a full path but with a path whose prefix the code does not fix (T033 row UP-29) shows that path with … for the prefix followed by "prefix unknown", the reason in its tooltip (from the item side's unresolved_prefix_paths, or an impact path's prefix_unknown_paths); never as a full path. An impact path through a calls_route link with assumptions lists them ("assumes UP-V1 · UP-V2", each text in its tooltip). The API section's routes list, endpoint header, Flow cards and the Architecture chain, links and inspector show such a path the same way; the endpoint header lists every unknown-prefix path with its reason and hop, and Flow edges, chain steps and link members list their link assumptions. A route without a composed path shows its path as written in its file followed by the API section's words: "shadowed" (shadowed_paths or route_shadowed), "path withheld" (the side's path_withheld or the impact path's route_withheld: a registration whose path the Go linker withholds, couldn't-read row CR-44), else "path not known"; never "not mounted", which no stored fact proves (ADR 0089 Revision 5). One whose response carries no composed paths shows it followed by "path as written". The path as written is always in the tooltip. Internal ids and raw kinds are not the default text (T025): contract and impact row ids (C3, I4) and stored edge kinds are in tooltips, edges read "Fact · 1.0", "Exact path match · 0.9" or "Path suffix match · 0.6" (another edge form keeps its stored fields), provenance reads "Fact · 1.0" or "Inferred · 0.9" (just "Fact" or "Inferred" where the answer has no confidence), and an assumption chip reads its catalogue title with the id in its tooltip. A confidence is a fixed rank per match rule, not a probability, and is printed as stored (1 as 1.0, 0.85 as 0.85). This is the plain label style, the default; the technical style shows the ids, tiers with confidence numbers and raw kinds instead (Labels).

Project mode (serve --project)

Under serve --project (T022 B9, ADR 0075 "UI view") the page first asks GET /api/v0/project; a single-repository server answers 404 and the UI is exactly as described above. In project mode:

The editor of IDE links is a per-browser choice (T016k, ADR 0050). The control is the "This browser" row of "Editor for links" in the first section of the Settings page, "Editor" (#/settings?at=editor; Settings is linked at the bottom of the sidebar and of the icon rail; T039 moved it there from the sidebar footer, with the same storage key): the editor's mark, a source marker and the editor's name. When graphvein.yaml sets ide.link_template, the same section shows it read-only with its line (edited in the YAML view). Every Settings section and key row has a stable anchor, #/settings?at=<section> (editor, labels, indexing, ...) or #/settings?at=<key> (ide.editor). The marker is a filled dot for your choice in this browser, a ring for the repository default from graphvein.yaml, and absent for Graphvein's built-in default (vscode when graphvein.yaml sets no ide); a badge marks a caveat (amber: partly verified, not saved, saved choice ignored, custom template; red: config error; grey: limited). On a monogram the marker and badge sit on the tile's corners; next to an official logo (VS Code, IntelliJ IDEA, Zed) they sit in a column beside the tile, outside the logo and its clear space, as the brands' terms require. The control's accessible name and its focus or hover tooltip say the same in words, for example "Editor for links: Cursor, your choice in this browser. Partly verified: ...".

Activating the control (click, Enter or Space) opens a popover with one radio row per option: "Use repository default <editor>" with its source line (shown when checked) or the load error (always), the six presets in table order (the name, at most one short muted line, the preset's short_note such as "macOS only", and beside the name, for a preset that is not verified, a status icon: amber warning = partly verified, grey info = limited; none when verified. The icon is a tab stop named "About <editor> support"; its full note opens in a small popover on hover, keyboard focus, click or tap, never selects the row, and Esc closes the note before the picker; no long note is shown inline), and "No editor links" (every IDE button stays, disabled, with the reason; its line shown when checked). Notices above the list report a config error, a saved choice this server does not offer, blocked storage and a failed preset list. A footer legend explains the icons and markers. Selecting applies at once and the popover stays open. Keyboard: Enter or Space on the control opens it with focus on the checked row; Up, Down, Home and End move; Space or Enter selects; Esc closes and returns focus to the control. There are no global shortcuts.

First-click chooser: while this browser applies no choice and graphvein.yaml loads and sets no ide (no editor, no link_template; GET /api/v0/ide reports repository.source builtin), the first activation of any editor link (click, Enter, the o shortcut) does not navigate. A popover anchored to that link offers "Open with" and the six presets (the picker's marks; under a preset that is not verified one short muted line, its short_note such as IntelliJ IDEA's "macOS only", and beside its name a status icon, amber for partly verified and grey for limited, whose full note opens on hover, keyboard focus, click or tap and never selects the editor; Esc closes that note before the chooser), a checked "Remember for this browser" and "More in Settings" (#/settings?at=editor). Picking an editor stores it as the picker does (same key; with the box unchecked, for this page only, and the next page load asks again) and opens that link in the picked editor: the view asks the server again with editor= and the rebuilt link opens once it arrives (at most 8 seconds later; nothing opens after that). Up, Down, Home and End move in the list; Enter or Space picks; Esc or a click outside closes it without opening anything and returns focus to the link. Once any choice exists (this browser's or the repository's) links open directly. Jump-to asks the same way: opening a file or symbol in the editor (Enter, Ctrl+Enter, a click) shows the chooser anchored to its row while the palette stays open; the pick asks /api/v0/search again with editor= for that result and opens its link (at most 8 seconds; otherwise the palette's status line says so), and Esc closes the chooser first, then the palette. A project caller's link follows the same choice. The Changes section's head link, which the browser choice does not build, never asks. Every editor link's tooltip starts with "Open in <editor> · change in Settings", or "Choose an editor" while the chooser applies.

Precedence for every link and label: (1) the browser's choice, a stored preset that GET /api/v0/ide lists, sent as editor= and winning over the repository's ide including a custom link_template; (2) the repository default (graphvein.yaml's ide, or the built-in vscode, shown as "default"); (3) no link: when graphvein.yaml fails to load and there is no browser choice, or when "No editor links" is chosen. A browser choice still builds links when graphvein.yaml fails to load; the error stays visible in the picker and on the control.

Storage: localStorage key graphvein.editor.v1 holds a preset name or off; no key means "Use repository default" (choosing it removes the key). A stored value the server does not list (or longer than 64 characters) is ignored and kept, the control shows "saved choice ignored", and choosing any option overwrites it. With storage blocked the choice applies to the page only ("not saved"). Other tabs follow a change. Data requests wait until GET /api/v0/ide has answered; if it fails, no editor is sent and the repository default applies, except that a stored off still holds (no links; the control says "No editor links" and the failure). localStorage belongs to the origin, so the choice is per browser profile and per server address: 127.0.0.1:7420 and 127.0.0.1:7421 keep separate choices, and one address serving different repositories shares it, as intended for a personal setting. Other browsers, other addresses and the CLI keep using the repository default.

Editor marks: the official logos of VS Code, IntelliJ IDEA (24 px and larger only; buttons show its monogram), Zed (full black, full white on the dark theme) and Cursor (the 2D cube, its light-theme or dark-theme file), under their brand conditions; neutral monograms for VS Code Insiders, VSCodium and custom templates. The attribution is on /third-party-licenses.txt only.

Labels

How the UI words ids, kinds and confidence numbers is a per-browser choice (T025b, ADR 0078), stored like the editor. It is the "This browser" row of "Label style" on the Settings page (moved from the sidebar footer by T039, same storage key graphvein.labels.v1): Not set / Plain / Technical. "Not set" removes the stored key, so the repository's ui.labels (or plain) applies again.

Both styles read one table, web/src/lib/labels.ts, keyed by the rows of the T025 table (the T025 task record (internal)), four project mode rows (T022 B9, 22-25: a cross-repository link "Inferred across repositories" or inferred 0.7; a link pass outcome "Several possible routes" or ambiguous; its claim row, hidden in plain; an impact path "crosses from express into react" or express → react), two manifest editing rows (T022 B10, 26-27: an operation "Accept" or accept_suggestion; a selector field "path prefixes" or path_prefixes), the architecture section's rows 31-41 (T026 AG-C1: kinds, families, cell sources and states, tiers, level tags, the Hidden note, ghosts, Not proven entries, markers and stubs; the technical style adds the contract rows), rows 42-53 (T026 AG-C2: the chain summary, a chain step's edge wording and tier, CH11 end lines, CH12 cap notes, folds, CH10 hidden counts, CHD counts, the Not proven deploy group and its database-service note, AT2 ingress, "may also use" with the database card's name, and where a hidden component's entry comes from) and two T025b rows, the impact panel's Unknowns line (untraversed edge kinds: "exposes route" or exposes_route; a relation not extracted: "Architecture components: ..." or "Architecture components (I11): ...", the rule id in the tooltip); a test checks that every row has both variants. A route's full path (row 9) and an edge form without a checked word (row 4) read the same in both. Strings T025 left raw (reason and move-hint row tags, precision chips) are unchanged in both.

Precedence: (1) the browser's choice; (2) the repository default, graphvein.yaml's ui.labels (configuration), read from GET /api/v0/ui; (3) plain. The setting's tooltip names the source.

First launch: while nothing is chosen in this browser and the repository sets no default, a one-time banner sits across the top of the content (not a dialog; the page stays usable): "How should Graphvein label facts?" with two equal buttons, "Plain" (e.g. Exact path match · 0.9) and "Technical" (e.g. inferred 0.9 exact, I4), and a close button (×) that keeps plain. Choosing or closing hides it for good in this browser; it waits for GET /api/v0/ui so it never flashes when the repository sets a default.

Storage: localStorage key graphvein.labels.v1 holds plain or technical (another value is ignored); graphvein.labels-banner.v1 holds dismissed once the banner was closed. With storage blocked, labels are plain, the banner shows on each load, and a choice applies to the page only ("Not saved" under the setting). Other tabs follow a change.

Depth defaults

The Impact tab of the Changes section and the architecture chain each have a depth switch, 1 to 10 (T042). The depth they start with follows the precedence of the label style: (1) the last depth chosen in this browser; (2) the repository default, graphvein.yaml's ui.impact_depth or ui.chain_depth (configuration), read from GET /api/v0/ui; (3) the built-in 3 for change impact and 6 for the chain. A depth in the hash (a shared link) applies to that page and is not stored. The switch's "Depth" label names in its tooltip where the applied depth comes from. While GET /api/v0/ui has not answered and nothing else decides the depth, the walk waits, so it is requested once. Settings shows both keys under "Labels and views" with the same three rungs (this browser, the repository, built-in): its "This browser" select writes the same stored key as the switches ("Not set" removes it), and a repository value written there applies at once.

Storage: localStorage keys graphvein.impact-depth.v1 and graphvein.chain-depth.v1 hold an integer 1 to 10 (any other value is ignored). Choosing a depth stores it and writes it to the hash. With storage blocked, a choice applies to this page only.

The Schema section (#/schema, T018b2) reads only the four schema endpoints below and the polled status. The shell requests /api/v0/schema/summary at load and again only when the status names another last run; the Schema entry carries a tag from it: "none found" (only for found: none), "re-index" (version_ambiguous, predates_schema), "unknown" (every other unknown reason or an unknown found), "N unreadable" (failed sets, sets without records and unreadable manifests; warning tone; never scan gaps, and a missing count, scan gaps included, reads "unknown") or "tests only" (every set test-only), in that order of precedence; no tag while the summary loads or failed, or when not indexed. found: unknown opens "Schema not known for this index" (never "No migrations found"); the shell requests /sets once per index run, from the first visit to the section (leaving it and coming back reads the loaded answer), and for scan_incomplete and manifest_unreadable too, to list the paths. The home shows the selected set's strip (counts from the lists, the common state once, other states with full badges, the table-list line with every reason), under it one strip per failed set, set without records, unreadable manifest and one for the scan gaps, a compact foreign-key map (one hop around the selected table above 25 tables) and the table list; the table detail shows every column fact by the reading rules below, with "none ◑" only in complete_in_source tables and "unknown" for every null or missing value. An absence (no foreign key, no referencing table, no column, no ALTER, no table created) is stated only when the API proves it: plainly for a complete table, with ◑ for complete_in_source, as "none known (last known)" otherwise, and as the unresolved table texts when the table has unresolved references; a set or migration whose statements were not analysed shows "not extracted", never 0. Tabs: Tables, Migrations (statement counts, null is "not analysed"; stored diagnostics verbatim) and Overview (the ER diagram, React Flow and the layout worker loaded on first use, with the full-fact panel). "Include tests" shows test-only sets. Keyboard hints, each with a visible control: / filter, o Open in IDE, + - 0 zoom on the Overview, Esc closes its panel. The view state is in the hash: #/schema?tab=migrations|overview&set=&sel=&mig=&tests=1.

Code peek (T016e2, ADR 0044): clicking a caller or near-miss row, or its </> button ("Peek source (Enter)"; pressed while open, pressing again closes), opens the node's source from GET /api/v0/source in a resizable split below the detail pane; the handler has the same button. While it is open the coverage cards collapse to the compact strip, without its per-root rows (the Source root select still filters). Keyboard, with focus on a row or a control in it: Up/Down move between rows (the open peek follows), Enter on the row toggles, Esc closes; closing returns focus to whatever opened the peek. The header shows the kind, name, state, path with line:column and the editor button (disabled when no source was read). The highlight is drawn only from source.highlight (exact, text_match): a line band plus a mark on the exact characters; text_match adds an amber "file changed" banner; changed and span_invalid show the current lines without any highlight under a high-contrast banner; states that read nothing keep the panel's size and state the reason; an unknown state is shown raw without highlight. 8 lines of context, "Show more" adds 8 up to 50; no syntax colouring. An answer read from another index run than the loaded view is not shown. The peek height is kept per browser. The open peek is in the hash (peek=<node identity>), so a reload or a shared link opens it again once the endpoint has loaded (an identity that is not one of the endpoint's callers, near misses or handler is ignored); selecting another endpoint removes it, and Overview <-> Callers keeps it.

Detail tabs (T016f2): the selected endpoint's header stays above three tabs, Overview (handler, OpenAPI), Callers N (the callers table, near misses, the "no linked caller" state; the default) and Flow; the tab is in the hash (tab=overview|flow; Callers is the default and left out).

Flow tab (T016f2, ADRs 0045 and 0046): who calls the endpoint and what its handler runs, one or two hops each way, from GET /api/v0/api/flow. Only the response's stored edges are drawn, each in its tier from its stored fields: fact 1.0 thick (labelled "Fact · 1.0"), exact 0.9/0.7 solid (labelled "Exact path match · 0.9" or "· 0.7"; the legend chip shows 0.9, its tooltip the 0.7 rank), suffix 0.6 thin and muted (labelled "Path suffix match · 0.6"; the legend says once that the number is a fixed rank per match rule, not a probability), in-code calls plain, a conditional call's targets labelled "1 of K" with the other target as a muted dashed box; the stored contains step from an owner to its enclosing function is a thin grey "defined in" line without a confidence label, and callers reached through it say "calls <fn> (contains this call)" and are never counted as callers. Near misses are the only dashed lines ("ambiguous · 1 of N", a recorded candidate, not a link). An owner with one call is folded into the call card; a wrapper is a "via fn()" pill in the call card. The summary line comes from counts (equal to the Callers tab); truncated shows a cap banner and omitted "+N more" chips (not expandable). Controls: 1 hop / 2 hops and "Near misses" in the tab row (default 2 hops, near misses on; they filter the loaded answer and never re-request), zoom out, zoom in and Fit on the canvas (Fit returns to zoom 1, where every text is at least 12 px; the wheel and the buttons may zoom out to 0.5), a minimap, and the always visible legend whose chips (Fact, Exact, Suffix, Call, Near miss) dim a tier without re-layout; Dynamic and Unmatched are disabled at 0 ("never attached to an endpoint") with a link to their gap sheets. A wide graph starts at the callers with a "Handler + downstream" pill. Clicking a card (a button) selects it and opens its code peek; its toolbar has Peek source (Enter), the IDE button (o) and the incoming and outgoing cards, each with a button that selects that line. Clicking a line or its label selects it and opens the peek of its stored source with one line of stored facts (kind, provenance, confidence, match, evidence file:line). Under it, a line whose call and route were compared with a difference (the edge's shape_differences) lists "Request differences": each key with "sent by the frontend, not read by the handler" or "read by the handler, not sent by this call", and a Call and a Handler chip with file:line and its editor button; a line that was not compared, or whose sides agree, shows nothing more. Keyboard hints: arrows move between connected cards, + - 0 zoom, 1 2 hops, Esc closes the peek, then clears the selection. The hash keeps hops=1, nm=0, tiers=, node= and edge=; a selection whose peek was closed adds peek=0, so a reload keeps it closed. Switching to or from the Flow tab clears the selection and the peek. The 2-hop graph is laid out once and 1 hop draws its 1-hop cards at the same places, so switching hops keeps every card, the view and the focus where they were (the near-miss toggle still lays out again). Cards are at most 240-360 px wide at zoom 1, narrower on a narrower canvas so the call sites, the endpoint and the handler fit in the first view (a canvas width change lays out again): longer titles, paths and notes are cut in the middle with "…" (a path keeps its last / segment), the full texts are in the card's tooltip (hover or focus) and accessible name, and the peek header shows the full path. Column captions sit in a row pinned below the canvas's toolbar, at the canvas's left edge while their column is partly in view. While the tab is open the sidebar is an icon rail and the endpoint list a vertical rail whose button shows the list over the pane. React Flow and the layout worker load only when the tab opens: the Flow chunk, then elkjs's unmodified worker file from /assets/ (a same-origin worker under the unchanged CSP); a layout taking over 10 s shows an error with Retry and a link to the Callers tab.

Tables column (T026 AG-C3, AG18): right of "Callees · hop 2", the tables the handler, its nested functions and its callees read or write (stored reads_table / writes_table edges only), each card with its access and tier ("R fact · W 0.9") and its schema source as the sub line; lines are the stored edges in the "Reads / writes" tier, labelled with the server's wording ("reads", "may write", "builds a query on"). Nested functions sit in the handler or callee column of their container's hop, badged "nested", joined by a "nested, not a call" line (the stored contains). Two boxes in the column are no node and no line touches them: "may also use" lists the unbound sites (may_also_use) with their function, line, hop, candidates or "any <tool> table" and reason; the fold box says "+ n at hop 3" from tables_beyond (or that hop 3 has no other table), with the callees the fan-out cap cut and "deeper calls not read". The summary counts drawn and written tables as "a lower bound"; with 1 hop the hop-2 tables are hidden and counted ("+n at hop 2"). "Open in Flow tab" in the Architecture section adds node= (the chain's selected member; a member folded into a card selects that card) and back= (the Architecture hash, accepted only when it starts with #/architecture): the first view then shows the widest range of columns ending at Tables that fits, the selected card is revealed and peeked, and "← Architecture chain" links back; changing the endpoint or the tab drops back.

Settings

The Settings page (#/settings, T039, ADR 0088) is linked at the bottom of the sidebar and of the icon rail. It is one page with sections (Display; Indexing and scan; Matching; Explorer path values; Try it environments; Architecture; Other keys) and a page index, which folds away below about 1100 px. Every key shows its rows: This browser (only ui.labels and ide.editor, the controls above), Repository (the value of GET /api/v0/config with its graphvein.yaml:line chip, or not set) and Built-in (the default, or none). The value in use is the first set row in that order, in bold (row ST-49 of the settings claim contract); a file that does not load or a member without a checkout shows "unknown" and no repository value. The This browser row says "Not set" when the browser chose nothing. While ide.link_template is set, the editor's Repository row is "the link template (ide.link_template)" with that key's line, and neither an editor value nor the built-in default is in use. A filter shows All, the keys changed from their default, or the per-browser keys.

Repository values are edited in place; the save bar at the bottom (one height in every state) counts the unsaved changes and says when they apply. "Review and save…" shows the server's preview (the changes in words, when each applies, the unified diff, valid or the decoder's problems) and "Write graphvein.yaml" applies exactly the previewed result, only while the file still has the hash the page read; otherwise nothing is written and the page reads the file again. When the index's settings differ from the file afterwards (index_settings.state changed), a notice names the values not in the index yet and offers "Re-index now", the same run as the top bar's Re-index control, with its progress. "Edit as YAML" edits the whole file (line numbers and the form field each line feeds) through the same preview. .graphveinignore is shown read-only; explorer.path_values and tryit.environments link to the Explorer's editors, which edit them (#/explorer?edit=path-values scrolls to the path value editors or says the document has none to enter; #/explorer?edit=environments opens the try it environment picker). The preview says what the server proved about comments: the comments the result loses are listed with the changes; it never says comments are kept, and says nothing about comments when none is lost. An edit that changes an ide.* key (in the YAML view: any key outside the form) reads the editor defaults again. In project mode the scope select is the member select, and the manifest's try-it environments are listed read-only.

When graphvein.yaml does not load, graphvein serve starts anyway (an index run still refuses it): every view but Settings and the project overview says the configuration does not load, naming the file and the decoder's message, with a link to Settings, whose YAML view fixes it. The views read the file again on every section change and new run.

When freshness.settings.state is changed, the top-bar badge says "Fresh · settings changed" (amber), or adds "settings changed" to a stale badge's time, and a project member's dot turns amber; their tooltips name the changed keys and "Re-index to apply" (row ST-48). An unknown or absent comparison is never shown as unchanged.

HTTP API v0

All API responses are application/json; charset=utf-8 with Cache-Control: no-store. Unknown paths under /api/ give 404 not_found.

Errors

{"error": {"code": "store_error", "message": "reading runs: ..."}}
code status when
bad_request 400 a missing, repeated or invalid query parameter (API section, schema and source endpoints)
not_found 404 unknown API path, or no stored endpoint or node with the requested id
method_not_allowed 405 a method other than GET or HEAD (or POST on /api/v0/index/run and the writing change endpoints)
unsupported_media_type 415 POST without Content-Type: application/json
index_locked 409 POST /api/v0/index/run while the index lock is held, by this server's job or another process
reindex_unsupported 409 POST /api/v0/index/run when the latest run came from an external indexer
index_lock_unavailable 503 POST /api/v0/index/run when the index lock cannot be opened or probed
host_not_allowed 403 Host header not in the allow-list
cross_site_request 403 Sec-Fetch-Site is cross-site or same-site, or Origin is present and not this server's
store_error 500 runs (status) or any store read (API section, schema, source) failed
index_changed 503 the index changed during the read and again during its one retry; retry
unavailable 503 the server is stopping and cancelled the request (or refused a new re-index)
internal 500 reserved for unexpected failures; also a re-index job's error code after a recovered panic
repository_required 400 project mode: a per-member endpoint without repository when the project has several members
no_checkout 409 project mode: code peek, a ref: base or a ref job for a member without a checkout here
ws_required 400 workspace: a per-index request without ws on a server without a current index
unknown_entry 404 workspace: ws (or a remove) names no entry of this server's workspace
no_index 409 workspace: the entry's folder has no stored index
registry_error 500 workspace: the registry file cannot be read or written
not_loopback, token_required 403 a guarded edit (workspace POSTs, manifest edit, path values, try-it) from another machine or without the session token
confirm_required, path_changed 409 workspace add without a valid confirm value, or a folder that changed since its check
entry_in_use, index_running 409 workspace remove of the command-line index, or of an entry whose run is running

Messages never contain the Postgres URL. The change endpoints add their own codes (below).

Re-index: POST and GET /api/v0/index/run

Design: ADR 0052. The run executes inside serve, with the built-in indexer and the default flags of graphvein index (--workers, --timeout, --max-file-size and --shape-depth are not repeated from an earlier run; index.shape_depth of graphvein.yaml applies). Requests keep answering from the last committed run while it runs: SQLite WAL readers and Postgres READ COMMITTED readers never see the run before it commits.

POST with Content-Type: application/json and body {} (at most 1 KiB; any field is 400: v1 takes no options) takes the index lock (waiting up to 2 s), starts a job and answers 202 with the GET document below and Location: /api/v0/index/run. Other answers: 409 index_locked (the message says whether this server's own job or another process holds the lock), 409 reindex_unsupported, 400, 415, 403, 503 index_lock_unavailable, 503 unavailable (stopping). There is no cancel endpoint; stopping serve cancels a running job.

GET (and HEAD) is cheap: it reads the lock state and this server's latest job, never walking the repository.

{
  "api_version": 0,
  "repository": "kftray",
  "lock": { "state": "held_here", "error": null },
  "job": {
    "id": "Q7K2...",
    "state": "running",
    "started_at": "2026-11-07T07:21:03.112Z",
    "ended_at": null,
    "phase": "parsing",
    "progress": { "done": 212, "total": 457, "unit": "files" },
    "replaces": { "finished_at": "2026-11-07T07:06:05.414Z" },
    "run": null,
    "error": null
  }
}

GET /api/v0/status is unchanged and knows nothing of the lock: while a run is in flight it reports the previous run as last_run and that run's freshness, which can be fresh. A client that must not show "fresh" during a run combines it with lock.state; a client that switches to a new run waits for job.state: "committed" and then for a status answer whose last_run.finished_at is the job's run.finished_at or later.

GET /api/v0/status

{
  "api_version": 0,
  "repository": "graphvein",
  "server_version": "dev",
  "extractor": {"current": "extractors-28", "indexed": "extractors-28", "matches": true},
  "index": {
    "indexed": true,
    "last_run": {
      "finished_at": "2026-11-03T14:32:05.123Z",
      "indexer": {"name": "graphvein", "version": "extractors-28"},
      "contract_version": 1,
      "commit": "abc123"
    }
  },
  "freshness": {
    "state": "stale",
    "checked_at": "2026-11-03T14:40:00Z",
    "changed_count": 2,
    "changed_files": ["cmd/graphvein/main.go", "internal/server/server.go"],
    "changed_files_truncated": false,
    "settings": {
      "state": "changed",
      "changed_keys": ["index.shape_depth"],
      "unknown_keys": [],
      "index_hash": "sha256:…",
      "current_hash": "sha256:…",
      "reason": null
    }
  }
}

Every request runs its own freshness calculation, the same one as graphvein status (same scan and ignore rules); nothing is cached. Concurrent requests wait for each other rather than scanning in parallel.

condition freshness.state other fields
runs cannot be read (no body) 500 store_error
freshness check fails (incomplete scan: an unreadable file, directory or ignore file, or a path the contract cannot carry; store read). A symlink, binary, non-UTF-8 or non-regular file the scan skips is not a failure unknown changed_count null, changed_files [], error holds the message
no runs not_indexed every scanned file listed, as status lists them
runs, files changed stale count and sorted paths
runs, nothing changed fresh count 0, []

API section endpoints

Four read-only endpoints serve the API section of the UI (ADR 0042; the flow endpoint ADR 0045): every HTTP route and Tauri IPC command, who calls each one, how sure each link is, and where the graph is incomplete. They read the store after the request arrives; there is no cache and no freshness walk (combine them with /api/v0/status). Each reads the runs first and last; when the latest run or the run count differs, it repeats the whole read once and then answers 503 index_changed. Unknown query parameters are ignored; a parameter given twice is 400 bad_request.

The endpoints that present nodes (/api/v0/api/endpoint, /api/v0/api/calls, /api/v0/api/flow, /api/v0/source, /api/v0/schema/table and /api/v0/schema/migration) take an optional editor (ADR 0050): a preset name (vscode, vscode-insiders, cursor, vscodium, jetbrains, zed). With it, links and ide.label are built from that preset alone; the repository's ide setting (including link_template, label, column_unit and column_base) does not apply, and links are built even when graphvein.yaml fails to load (ide.available true, ide.error still holding the message). An unknown or empty value is 400 bad_request (editor must be one of vscode, vscode-insiders, cursor, vscodium, jetbrains, zed; not "sublime") and never falls back to another editor; a repeated editor is 400 as for every parameter.

Common parameters:

Transports are fixed by node kind (the transport attribute is not read):

transport endpoint kind call kind call edge handler edge
http route client_call calls_route exposes_route
tauri_ipc ipc_command ipc_call invokes_command exposes_command
server_action server_action action_call calls_action exposes_action

Server action calls (T024b, ADR 0077, server actions) are stored only when proven, so their one documented status is linked.

Source root of a call: the deepest directory, from the call file's own directory up to the repository root, that holds a stored file (an indexed, not ignored file) named Cargo.toml, deno.json, deno.jsonc, go.mod, package.json, pyproject.toml, setup.cfg or setup.py; else the file's first path segment; else . (a file at the root, or a synthetic node). manifest is that file's path (the first name in byte order when one directory holds several), or null for the fallbacks. Roots are a property of calling sites only. Paths are split on / only, as the contract requires (docs/contract): a path with \ from another indexer is not converted, so its directories are not seen and it falls back to its first / segment or ..

Counts, per transport, with E = endpoints in scope, C = calls in scope (and in root), X = the stored call edges into all endpoints:

Raw statuses are passed through unchanged. Clients map them to categories and must treat any status they do not know as "other", never as linked.

GET /api/v0/api/endpoints?scope=&transport=&root=

transport = all (default) | http | tauri_ipc | server_action; with all every transport is present, also when empty.

{
  "api_version": 0, "repository": "langflow",
  "index": {"finished_at": "...", "indexer": {"name": "graphvein", "version": "extractors-28"}, "contract_version": 1},
  "scope": "production", "root": null,
  "transports": [
    {"transport": "http", "frameworks": ["fastapi"], "endpoint_count": 296, "never_called": 149,
     "calls": {"total": 588, "by_status": {"dynamic": 422, "linked": 160, "unmatched": 6},
               "linked_without_edge": 0, "edges_from_unlinked": 0, "unknown_scope": 0},
     "roots": [{"root": "docs", "manifest": "docs/package.json", "total": 409, "by_status": {"dynamic": 409}},
               {"root": "src/frontend", "manifest": "src/frontend/package.json", "total": 179,
                "by_status": {"dynamic": 13, "linked": 160, "unmatched": 6}}],
     "openapi": {"specs": 2, "documented_endpoints": 116},
     "endpoints": [{"id": "route:...", "name": "GET /{flow_id}", "method": "GET", "path": "/api/v1/flows/{flow_id}",
                    "path_count": 1, "pattern": "/{flow_id}", "framework": "fastapi", "file": "src/...", "line": 505,
                    "scope": null, "caller_count": 3, "documented": true, "flags": []}],
     "precision": {"label": "best_effort", "row": "D", "reason": "default_branch"},
     "callers_precision": {"label": "best_effort", "row": "D", "reason": "default_branch"}},
    {"transport": "tauri_ipc", "frameworks": [], "endpoint_count": 0, "never_called": 0,
     "calls": {"total": 0, "by_status": {}, "linked_without_edge": 0, "edges_from_unlinked": 0, "unknown_scope": 0},
     "roots": [], "openapi": null, "endpoints": [],
     "precision": {...}, "callers_precision": {...}}
  ]
}

GET /api/v0/api/endpoint?id=&scope=&root=

id is a canonical node identity of kind route, ipc_command or server_action, URL-encoded as a query value (identities contain #, % and /): 400 when it is missing, not canonical or of another kind; 404 not_found ("no API endpoint with identity ...") when it is not stored, for example after a re-index removed it.

{
  "api_version": 0, "repository": "...", "index": {...}, "scope": "production", "root": null,
  "ide": {"available": true, "error": null, "label": "Open in VS Code", "editor": "vscode", "source": "builtin"},
  "endpoint": <presented node>, "transport": "http",
  "handler": {"state": "resolved", "expression": null, "node": <presented node>,
              "edge": {"kind": "exposes_route", "provenance": "fact", "confidence": 1}},
  "openapi": {"specs": 2, "operations": [{"node": <presented api_operation>,
              "edge": {"kind": "documents_route", "provenance": "inferred", "confidence": 0.9}}]},
  "callers": [{"node": <presented call node>, "owner": {"id": "function:...", "kind": "function", "qualified_name": "getFlowFn"},
               "edges": [{"kind": "calls_route", "provenance": "inferred", "confidence": 0.9, "match": "exact"}],
               "reasons": []}],
  "near_misses": [{"node": <presented call node>, "owner": {...}, "relation": "ambiguous_candidate",
                   "candidate_count": 3, "candidate_count_exact": true, "reasons": [...]}],
  "near_misses_incomplete": 0,
  "precision": {"label": "best_effort", "row": "D", "reason": "default_branch"},
  "callers_precision": {"label": "best_effort", "row": "D", "reason": "default_branch"}
}

GET /api/v0/api/calls?transport=&status=&scope=&root=

The calls of one transport with the given raw statuses, for gap lists. transport = http | tauri_ipc | server_action (required); status (required) = comma-separated raw statuses, where an empty item selects calls whose status is missing or not a string (status= alone, or status=,weird).

{
  "api_version": 0, "repository": "...", "index": {...}, "scope": "production",
  "transport": "http", "statuses": ["dynamic"], "root": null, "ide": {...},
  "total": 422,
  "calls": [{"node": <presented call node>, "owner": {...}, "targets": [],
             "reasons": [{"code": "method_unknown", "text": "Method is not known statically", "detail": "options.method"}]}]
}

statuses are the requested values, distinct and sorted. calls are sorted by file, span start and identity, without paging or server-side search; targets are the stored call-edge targets of each call (non-empty only for a call that links through one alternative). Endpoints without a linked caller are not listed here; they are the rows with caller_count 0.

GET /api/v0/api/flow?id=&scope=&root=

The stored neighbourhood of one endpoint for the Flow tab (ADR 0045), one or two hops each way, always both hops (clients filter hops and near misses). Parameters, errors (400, 404, 500, 503 index_changed), headers, index, ide and the consistency check are those of /api/v0/api/endpoint. Callers and near misses are computed by the same code as there, so counts equal its callers, near_misses and near_misses_incomplete for the same request.

{
  "api_version": 0, "repository": "...", "index": {...}, "scope": "production", "root": null,
  "ide": {...}, "transport": "http",
  "endpoint": <presented node>, "handler": <handler as in /endpoint>,
  "counts": {"callers": 3, "near_misses": 0, "near_misses_incomplete": 0},
  "nodes": [{"node": <presented node>, "roles": ["call"], "hop": 1, "omitted": {"callers": 0, "callees": 0}}],
  "edges": [{"kind": "calls_route", "source": "...", "target": "...", "provenance": "inferred",
             "confidence": 0.9, "match": "exact", "evidence": [{"file": "...", "span": {...}}]}],
  "candidates": [{"call": "client_call:...", "endpoint": "route:...", "relation": "ambiguous_candidate",
                  "candidate_count": 2, "candidate_count_exact": true}],
  "skipped_edges": 0,
  "truncated": null,
  "precision": {"label": "best_effort", "row": "D", "reason": "default_branch"},
  "callers_precision": {"label": "best_effort", "row": "D", "reason": "default_branch"},
  "code_calls_precision": {"label": "best_effort", "row": "D", "reason": "default_branch"},
  "may_also_use": [{"accessor": "function:...", "hop": 1, "row": "CT-P5", "tool": "sql", "reason": "sql_not_literal",
                    "partial": true, "line": 14, "candidates": null}],
  "tables_beyond": {"hop": 3, "tables": 2, "functions": 2, "may_also_use": 1}
}

precision and callers_precision are /endpoint's scope labels for the same endpoint (the route or command family and its calls' family); they do not cover structural nodes, which keep their file's label. code_calls_precision is the label of the code calls edges of the handler's call chain (family code_calls, T020 O-S1-5 (a)): no file label covers a file's calls, so a structural node's Precise file label never vouches for them.

Node roles (a node appears once with all its roles, in this order; hop is its smallest):

role hop rule
endpoint 0 the requested node
handler 0 the stored node named by handler (handler.state resolved)
call 1 the callers of /endpoint
owner 1 source of each call's stored contains edge (as owner in /endpoint)
enclosing 1 source of a caller owner's stored contains edge when it is a function or method; one step only
other_target 1 other targets of a call's stored call edges (a conditional call), with its raw scope
near_miss 1 the near_misses of /endpoint (owner only, no further expansion)
near_miss_owner 1 source of each near miss's stored contains edge; a node owning a call too also has owner
callee 1, 2 targets of the handler's stored outgoing calls edges, then of those callees'
caller 2 sources of stored incoming calls edges of each caller owner and enclosing function
nested 0, 1, 2 (T026 AG-C3, chain row CH7) functions and methods the handler, a nested function or a callee contains by a stored contains edge, transitively up to 8 levels, at the container's hop; their callees are callees of the next hop (hop 1 from the handler and its nested functions, hop 2 from hop-1 callees and their nested functions)
table 1, 2 (T026 AG-C3, chain row CH6) targets (kind table) of stored reads_table / writes_table edges of the handler, nested functions and callees, at the accessor's hop and at least 1

Reasons

reasons explain a call that is not linked, derived from its stored attributes only (the index stores no reason text); the first is the primary reason. detail is the stored spelling the reason refers to, or null. A call whose status is exactly linked has none, except origin_assumed (below), one per stored origin assumption, prefix_assumed (below), one per assumption of an unknown-prefix link, and path_assumed (below), one per path assumption of the matched route path entry. A status this version does not document for the transport (including "" and case variants) gets the single reason status_unknown: "Status "<raw>" is not known to this Graphvein version".

client_call, in this order:

code condition text detail
origin_assumed status linked with origin_assumptions (a 0.7 link whose origin nothing proves, row LF-1 of docs/extract/clients.md) Assumption: <stored text> ("origin https://api.example.com assumed to be this repository's server") null
prefix_assumed status linked, or a stored link on a call of another status (after alternative_linked), with UP-V1 or UP-V2 in the call's assumes (a link of the unknown-prefix tier, rows UP-19, UP-V1, UP-V2 of docs/extract/clients.md) Assumption: <the assumption's text> ("The route is served below a prefix the code does not fix ...") the assumption id
path_assumed as prefix_assumed, with GR-V5, RO-V1 or RO-V2 in the call's assumes (the route path entry the link matched rests on that path assumption, docs/extract/routes.md), after the prefix_assumed reasons Assumption: <the assumption's text> ("a mounted app's catch-all may answer first: ...") the assumption id
wrapper_inner status wrapper Inner request of a wrapper; the wrapper's call sites are listed as calls null
generated_output status generated (committed bundler output, ADR 0085) Committed bundler output; its calls are not linked (clients.link_generated_output in graphvein.yaml links them) generated_output (the marker row, GB-1 ...)
no_matching_route a path entry is unmatched No route matches this method and path <method> <template>
ambiguous a path entry is ambiguous <n> routes match equally (At least <n> ... when no count is stored and ten are listed) template
test_only_target a path entry is test_only Only test-scope routes match template
url_unevaluated every template is null URL is not evaluated statically url_expression
some_alternatives_unevaluated some, not all, templates null Some URL alternatives are not evaluated url_expression
method_unknown method null Method is not known statically method_expression
base_unresolved base unresolved with a non-empty base_expression Base URL is not resolved base_expression
generated_unproven library orval, a generated entry with null template Generated client; its transport is not proven operation
alternative_linked the call has stored call edges A stored link exists although the status is "<raw>" null
status none of the above Status is "<raw>" raw status

ipc_call, in this order:

code condition text detail
wrapper_inner status wrapper Inner invoke of a wrapper; the wrapper's call sites are listed as calls null
command_unevaluated command null and status dynamic, or an alternative without command Command name is not evaluated statically node name without INVOKE
global_form form global Called through a window.TAURI global, not an imported invoke null
registry_unproven status A command registry in this repository is not proven; it could be the one that receives this call null
acl_possible status The app may restrict commands with permissions; whether this call is allowed is not proven null
ambiguous status More than one Tauri app could receive this call null
shadow_possible status An unresolved registry entry before the match could take this name null
unknown_command status No resolved command has this name, but an unresolved registry entry might null
test_only status Only test-scope or test-only commands have this name null
unmatched status No registered command has this name command, else the unmatched alternative's command
plugin status Plugin command; plugin commands are not linked plugin|plugin_command
global_unlinked status Calls through the window.TAURI globals are not linked null
alternative_linked the call has stored call edges A stored link exists although the status is "<raw>" null
status none of the above Status is "<raw>" raw status

Schema endpoints

Five read-only endpoints serve the database schema that the index holds from sqlx SQL migrations (ADR 0048; records: ADR 0047, docs/extract/schema.md) and from model classes (source: "model", ADR 0054, docs/extract/schema-models.md), served as model groups since T018f (ADR 0055; "T018f additions" below). They follow the API section conventions above: the store is read after the request arrives, there is no cache and no freshness walk, the runs are read first and last (one retry, then 503 index_changed), unknown parameters are ignored and a parameter given twice is 400 bad_request. Every response starts with api_version (0), repository and index (the last run, as last_run in /api/v0/status; null when not indexed). There is no scope filter: every set and table is returned, with the raw scope attribute and the set's derived test_only; hiding test-only sets is the client's. /api/v0/schema/table and /api/v0/schema/migration take the optional editor of the node-presenting endpoints above (ADR 0050), with the same 400s and precedence and the same ide.editor and ide.source; /api/v0/schema/summary, /api/v0/schema/sets and /api/v0/schema/assumptions present no nodes and carry no links or ide (editor there is an unknown parameter, ignored).

Raw values on the wire. Stored attributes are returned verbatim inside each node's attributes; the API never renames, defaults or normalises them. Values the API derives are separate top-level fields with the rules below, and none turns an unknown into a known value: a missing attribute or one of an unexpected JSON type derives unknown (or null), never false, 0 or a default. Edges are the only links: a table belongs to a migration, a column or index to a table, and a column to another column only through stored contains, alters and foreign_key edges; references.table is returned as written and never resolved by name.

GET /api/v0/schema/summary

The cheap count for the shell's Schema entry, read at load and again when /api/v0/status reports another last_run.finished_at. It reads the runs, the migration nodes, the stored file paths, the diagnostics of the stored Cargo.toml files and the diagnostics whose file is not stored (where the scanner reports what it did not read); never tables, columns or edges.

{"api_version": 0, "repository": "env-wrappers", "index": {...},
 "found": "none", "unknown_reason": null, "sets": 0, "test_only_sets": 0, "failed_sets": 0,
 "sets_without_records": 0, "unreadable_manifests": 0, "scan_gaps": 0}

GET /api/v0/schema/sets

Everything a list, grid or diagram needs, in one response: every group of tables with its migrations, tables, columns, indexes and foreign-key pairs. No parameters, no paging.

{
  "api_version": 0, "repository": "axum", "index": {...},
  "sets": [{
    "set": "migrations", "source": "migrations", "tool": "sqlx", "package": "Cargo.toml",
    "dialect": "postgres", "conflicts": [],
    "objects": "modeled", "not_modeled_reasons": [],
    "table_list": "may_be_incomplete", "table_list_reasons": ["opaque_statements"],
    "opaque_total": 6, "opaque_by_kind": {"extension": 1, "function_call": 5},
    "test_only": false, "diagnostic_counts": {"schema_opaque_statement": 6},
    "migrations": [{"id": "migration:migrations/2_user.sql#migration", "file": "migrations/2_user.sql",
                    "attributes": {...}, "creates": ["table:migrations/2_user.sql#user"], "alters": []}],
    "tables": [{"node": {...stored table node...}, "completeness": "complete_in_source",
                "created_by": "migration:migrations/2_user.sql#migration", "altered_by": [],
                "columns": [{"node": {...stored column node...}, "default_state": "written"}],
                "indexes": [{...stored db_index node...}],
                "foreign_keys_out": 0, "foreign_keys_in": 5, "unresolved_references": 0}],
    "foreign_keys": [{"source_table": "table:...#follow", "source_column": "column:...#follow.followed_user_id",
                      "target_table": "table:...#user", "target_column": "column:...#user.user_id",
                      "edge": {"kind": "foreign_key", "provenance": "fact", "confidence": 1}}],
    "unattached": {"columns": 0, "indexes": 0},
    "linked_without_edge": 0
  }],
  "failed_sets": [],
  "sets_without_records": [],
  "unreadable_manifests": [],
  "scan_gaps": []
}

Groups and order:

Set-level fields. The group's files are its migration files, each package manifest its migrations name, and sqlx.toml in each package directory. The set record is the set_opaque_statements attribute of its migrations; it is known when every migration carries an object with an integer total and an object by_kind and all are equal.

GET /api/v0/schema/table?id=

id: a canonical identity of kind table (400 when missing, not canonical or of another kind; 404 "no table with identity ..." when not stored). Optional editor as above. One table in detail. Nodes are presented as in /api/v0/api/endpoint (stored node plus ide and file_state).

{
  "api_version": 0, "repository": "axum", "index": {...}, "ide": {...},
  "set": "migrations", "dialect": "postgres",
  "table": {...presented table...}, "completeness": "complete_in_source",
  "columns": [{"node": {...presented column...}, "default_state": "none",
               "foreign_keys": [{"target_column": "column:...#article.article_id",
                                 "target_table": "table:...#article",
                                 "edge": {"kind": "foreign_key", "provenance": "fact", "confidence": 1, "evidence": [...]}}]}],
  "indexes": [{"node": {...presented db_index...}}],
  "history": [{"migration": {"id": "...", "file": "...", "version": "4", "order": 4, "description": "article"},
               "event": "created", "evidence": [{"file": "...", "span": {...}}]}],
  "reasons": [],
  "neighbours": {"outgoing": [{"table": {...stored table node...}, "completeness": "complete_in_source",
                               "pairs": [{"source_column": "...", "target_column": "..."}]}],
                 "incoming": []},
  "unresolved_references": [],
  "truncated": null
}

GET /api/v0/schema/migration?id=

id: a canonical identity of kind migration (400/404 as above); optional editor as above. One migration: the presented node, set, previous and next (the migrations of the same set right before and after it by integer order, whatever their applied; null at the ends or without an integer order), creates ({id, name, completeness} of the tables it holds by contains), alters (the same plus the alters edge's evidence), and diagnostics (the stored diagnostics of its file in stored order as {severity, code, message}, at most 500) with diagnostics_total uncut. Messages name the statement's line and byte span as text; the API does not parse them. A down migration (direction: "down", applied: false) has empty creates and alters.

T018f additions (ADR 0055)

Additive fields (api_version stays 0). An index built before extractors-30 has no provenance attributes: claims, opaque_sites and rests_on are then null, never [].

Reading the schema states

Clients (the schema view) must follow these rules:

Change endpoints (ADR 0056)

Design: ADR 0056; the claim contract (rows G, C, D and relations I) is in the T019 task record (internal). The endpoints answer "what did a change do to the stored facts, and what depends on them" through internal/changes, the same code graphvein changes and the M3 MCP tools call. Every GET response starts with api_version, repository, index (as in /api/v0/status) and freshness (the status calculation; the change endpoints reuse one check for up to 2 s within the same index state, and checked_at is always the instant of the check reported, so a reused check never claims a later instant).

base is previous (default: the run before the latest), run:<id> (a journal run still covered), pin:<name> or ref:<base>[..<head>]. A ref base compares the merge base of <base> and <head> (or HEAD when no head is given) with <head>'s snapshot, or with the current index when no head is given; both snapshots must be indexed first (POST refs), else 404 ref_unknown. Ref names are resolved locally with git rev-parse; the server never accepts a path. Without a head ref the merge base is taken with the commit the current index recorded, not the live HEAD; when HEAD has moved since, summary.head_commit_differs is true, and an index that recorded no commit (made outside git) answers 409 reindex_needed. ref:a...b is refused (400). A stored snapshot of another extractor version counts as not indexed: POST refs indexes it again (G4).

A comparison is bound to its head run (G6). The server keeps the last 4 computed comparisons in memory, keyed by the resolved base (a pin's id and run, a ref pair's commits and snapshot runs and versions) and the head run, so paging does not recompute and a deleted or re-pointed pin never answers from a stale comparison (a deleted pin is 404 base_unknown). Reads run between two reads of the runs; a run committed in between repeats the read once, then answers 409 index_changed (not 503 as the other endpoints), and so does a cursor from another head run or filter; a cursor that does not decode is 400 bad_request.

code status when
bad_request 400 a bad parameter, a cursor that does not decode, ref:a...b, a POST body with an unknown or duplicate member
not_found 404 impact of an id that names no item of the comparison
base_unknown 404 no run, pin or journal of that name (also a deleted pin); the first run (no previous run)
base_expired 410 the journal or pin overlay no longer covers the run (G5)
reindex_needed 409 a ref comparison whose head is the current index made by another extractor version (G4), or a ref base without head ref on an index that recorded no commit
index_changed 409 a run committed during the request, or a cursor of another comparison
ref_unknown 404 a ref name that names no commit, or a ref snapshot not indexed yet
ref_objects_missing 422 a ref job: the commit's objects are not all local (partial clone, also when git's lazy fetch is refused mid-read); nothing is fetched
git_unavailable 503 git is not installed or the root is not a git repository
pin_limit, pin_exists 409 POST pins beyond changes.max_pins, or a name in use
pin_unknown 404 POST pins/delete of an unknown name
index_locked 409 a POST while the index lock is held
index_lock_unavailable 503 a POST on a server without a lock or writer store

The POST paths follow ADR 0052's rules: http.CrossOriginProtection, Content-Type: application/json (else 415), a body of at most 4 KiB with exactly the listed members (else 400), 409 while the index lock is held.

GET /api/v0/changes/bases

The journal runs still covered (newest first), the pins, the ref snapshots and the retention settings (changes.* in configuration).

{
  "api_version": 0,
  "repository": "app",
  "index": {"finished_at": "2026-11-13T23:30:38.567819705Z", "indexer": {"name": "graphvein", "version": "extractors-32"}, "contract_version": 1},
  "freshness": {"state": "fresh", "checked_at": "2026-11-13T23:30:40.589952288Z", "changed_count": 0, "changed_files": [], "changed_files_truncated": false},
  "runs": [
    {"seq": 2, "run_id": "6Z2HP2FAVEAC76ZPCR7XTN7AYK", "previous_run": "T4HWU6N5ITYXHNPMUA4VJDI6J7",
     "indexer": {"name": "graphvein", "version": "extractors-32"}, "finished_at": "2026-11-13T23:30:38.567819705Z",
     "counts": {"edge": {"added": 6, "changed": 13, "removed": 12}, "file": {"added": 2, "changed": 8, "removed": 1}, "node": {"added": 7, "changed": 25, "removed": 7}},
     "entry_bytes": 37782, "gaps": ["web/broken.ts"], "gaps_truncated": false, "gaps_fileless": false},
    {"seq": 1, "run_id": "T4HWU6N5ITYXHNPMUA4VJDI6J7", "initial": true,
     "indexer": {"name": "graphvein", "version": "extractors-32"}, "finished_at": "2026-11-13T23:30:38.374091665Z",
     "counts": {"edge": {"added": 85, "changed": 0, "removed": 0}, "file": {"added": 21, "changed": 0, "removed": 0}, "node": {"added": 76, "changed": 0, "removed": 0}},
     "entry_bytes": 0, "gaps": [], "gaps_truncated": false, "gaps_fileless": false}
  ],
  "pins": [
    {"id": "GIBREPBE532B7UMSWFRGTIATUZ", "name": "release-1", "seq": 1, "created_at": "2026-11-13T23:30:38.401551915Z",
     "run": {"seq": 1, "run_id": "T4HWU6N5ITYXHNPMUA4VJDI6J7", "initial": true, "indexer": {"name": "graphvein", "version": "extractors-32"},
             "finished_at": "2026-11-13T23:30:38.374091665Z", "counts": {}, "entry_bytes": 0, "gaps": [], "gaps_truncated": false, "gaps_fileless": false}}
  ],
  "refs": [],
  "retention": {"journal_runs": 30, "journal_budget": 1, "max_pins": 5, "max_ref_snapshots": 4}
}

A ref snapshot entry is {"namespace", "commit", "extractor", "created_at", "last_used_at", "config_source", "run"} (config_source: ref, working_tree or none).

GET /api/v0/changes/summary?base=

Both sides, extractor_changed (indexer versions differ: unchanged files may change as extractor_or_relink), partial (a side has knowledge gaps or is wholly partial: gaps_truncated, gaps_fileless, gaps_unknown), counts per group (items per change kind, cause and kind; moves are records equal once spans are dropped; other_changes differ outside the row's compared fields; context are changed records that are no item of their own: file nodes, the cause context of the items in their file, and the exposes_route, alters, reads_table or writes_table edges of a route, migration or code symbol that is itself added or removed; hidden_tests are test-scope items), locations (L5 location nodes, counted only), file_metadata_only (file records whose size or git blob id differ while the LF-normalised content hash is equal: line-ending conversion, never a change), not_extracted groups (never zero) and extractor_recheck (open point O7: the ref comparison that separates an extractor upgrade from relinking, offered when both runs' commits are known and clean). Groups are always listed, in the order routes, client_calls, api_operations, ipc, server_actions (T024b R1), migration_tables, model_tables, migrations, code, angular, react, architecture, files, gaps, other, unclassified (two shown):

{
  "api_version": 0,
  "repository": "app",
  "index": {"finished_at": "2026-11-13T23:30:38.567819705Z", "indexer": {"name": "graphvein", "version": "extractors-32"}, "contract_version": 1},
  "freshness": {"state": "fresh", "checked_at": "2026-11-13T23:30:40.624064408Z", "changed_count": 0, "changed_files": [], "changed_files_truncated": false},
  "base": "pin:release-1",
  "summary": {
    "contract_version": "T019-r8",
    "base": {"kind": "pin", "repository": "app", "pin": "release-1", "run": "T4HWU6N5ITYXHNPMUA4VJDI6J7", "finished_at": "2026-11-13T23:30:38.374091665Z",
             "dirty": null, "extractor": {"name": "graphvein", "version": "extractors-32"}, "partial": false, "partial_reasons": [], "gaps": [], "gaps_truncated": false},
    "head": {"kind": "current", "repository": "app", "run": "6Z2HP2FAVEAC76ZPCR7XTN7AYK", "finished_at": "2026-11-13T23:30:38.567819705Z",
             "dirty": null, "extractor": {"name": "graphvein", "version": "extractors-32"}, "partial": true, "partial_reasons": [], "gaps": ["web/broken.ts"], "gaps_truncated": false},
    "extractor_changed": false,
    "head_commit_differs": false,
    "partial": true,
    "groups": [
      {"group": "routes", "items": 2, "changes": {"changed": 1, "removed": 1}, "causes": {"code": 1, "relink": 1},
       "moves": 4, "other_changes": 0, "context": 1, "hidden_tests": 0, "kinds": {"route": 2}},
      {"group": "client_calls", "items": 7, "changes": {"added": 1, "changed": 2, "link_lost": 3, "removed": 1}, "causes": {"code": 7},
       "moves": 0, "other_changes": 0, "context": 0, "hidden_tests": 0, "kinds": {"calls_route": 3, "client_call": 4}}
    ],
    "locations": 0,
    "file_metadata_only": 0,
    "not_extracted": ["architecture"],
    "extractor_recheck": null,
    "total": 52
  }
}

GET /api/v0/changes/items?base=&group=&change=&cause=&kind=&q=&tests=&raw=&cursor=&limit=

Items in a stable order (group, change, identity); limit 1 to 500 (default 100); cursor is the previous page's opaque next_cursor. tests=true includes test-scope items (G7; hidden_tests counts the left out ones); raw=true adds both stored payloads (raw). q matches a substring of the identity or name. Each item has id (the address for impact: a node identity, or file:<path>, edge:<key>, gap:<path>), row (the contract row that produced it), change (added, removed, changed, body_changed, unknown_now, known_now, link_gained, link_lost, link_unknown_now, became_partial, recovered, unclassified), before and after (file, span and the stored fields the row compares; null = absent on that side), fields (changed fields, each changed, unknown_now or known_now), labels (edited, verdict_changed, alters_changed for migrations; handler_changed for routes; alters_changed also on a listed table the changed alters edge connects; table_access_changed for a code symbol whose reads_table or writes_table edges changed, with the tables gained and lost in a field named after the edge kind), reason (why a link was lost: target_removed, target_changed, call_changed, call_absent (the call was removed); or why a claim was downgraded: gap, table_not_complete, table_list_not_complete, base_table_list_unknown, ...; excluded for a removed file the head tree still has: ignore rules, the size limit or its language keep it out of the index), wording of a removal (no_longer_in_index; deleted only for a file the head commit's tree, or the working tree for the current index, lacks; call_removed for a link lost with its call), cause (code, relink, extractor_or_relink), provenance and confidence (edges), hints (inferred move hints, C14), raw with related (the changed exposes_route or alters edges reported with a route or migration) and impact_count (null until the impact of the item was computed). after.ide is the editor link, only when the head is the current index and the file is unchanged since it was indexed.

{
  "api_version": 0,
  "repository": "app",
  "index": {"finished_at": "2026-11-13T23:30:38.567819705Z", "indexer": {"name": "graphvein", "version": "extractors-32"}, "contract_version": 1},
  "freshness": {"state": "fresh", "checked_at": "2026-11-13T23:30:40.633478753Z", "changed_count": 0, "changed_files": [], "changed_files_truncated": false},
  "base": "pin:release-1",
  "items": [
    {
      "id": "edge:[\"calls_route\",\"client_call:web/api.ts#removeLegacy.DELETE%20%27%2Fapi%2Flegacy%27\",\"route:server/app.ts#DELETE%20%2Fapi%2Flegacy\"]",
      "group": "client_calls", "change": "link_lost", "row": "C5", "record": "edge",
      "identity": "[\"calls_route\",\"client_call:web/api.ts#removeLegacy.DELETE%20%27%2Fapi%2Flegacy%27\",\"route:server/app.ts#DELETE%20%2Fapi%2Flegacy\"]",
      "kind": "calls_route",
      "name": "client_call:web/api.ts#removeLegacy.DELETE%20%27%2Fapi%2Flegacy%27 -> route:server/app.ts#DELETE%20%2Fapi%2Flegacy",
      "before": {"file": "web/api.ts", "span": {"start_line": 10, "start_column": 9, "end_line": 10, "end_column": 51}, "fields": {"confidence": 0.9, "provenance": "inferred"}},
      "after": null,
      "fields": [], "labels": [],
      "reason": "target_removed", "wording": null, "cause": "code",
      "provenance": "inferred", "confidence": 0.9, "test": false, "hints": [], "impact_count": null
    }
  ],
  "total": 7,
  "hidden_tests": 0,
  "next_cursor": "eyJjIjoiODE5ZjMyOWUzZTQzOGFlYzE5YTliZTQwIiwiZiI6IjFhMmIzYzRkNWU2ZjcwODEiLCJvIjoxfQ"
}

An edge's id is edge: plus its key, the JSON array [kind, source, target]; percent-encode it in a query string.

A route item's side has path_withheld: true (additive, absent otherwise; ADR 0089 Revision 5) when that side has no full path and is a registration whose path the Go linker withholds: its route_mount_unresolved diagnostic names the route's span (couldn't-read row CR-44). It is read from the diagnostics of the side's graph: the head side always, the base side only for a ref base (a journal run keeps no diagnostics, so its side is never marked).

Each item also carries precision (T020, ADR 0066), computed by the server so a client never joins labels itself:

"precision": {
  "file": {"language": "sql", "precision": "best_effort", "precision_reason": "default_branch", "precision_row": "D", "reported_precision": null},
  "scope": {"label": "precise", "row": "PL-F1", "reason": null},
  "fields": {"columns": {"label": "precise", "row": "PL-F1", "reason": null}},
  "scope_side": "head"
}

GET /api/v0/changes/impact?base=&id=&group=&depth=&cursor=&limit=

The traversal from one item (id) or every seed item of a group (group; exactly one of them). Seeds are the node items of rows C2 to C13, C16, C17 and C18; other items answer 400. Breadth-first over the relation rows I1 to I10 and I14 to I16 in their direction (I8, T019 Revision 4: from a table the incoming reads_table / writes_table edges to the code using it; from a column its table's edges, the step's access.column_use "not_extracted"), depth 1 to 10 (default 3; at most 6 before T042), at most 2,000 reached nodes and 200 dependents per node; each binding cap is listed in caps. A removed seed takes its first hop through the removed edges of the change set (removed: true) and continues in the graph that still holds its dependents. Each path is the shortest one to a dependent, with its steps (edge kind, relation, provenance, confidence, evidence), provenance (fact only when every step is and none is I15, whose passed callback proves no call), confidence (the weakest step) and claim ("depends on" for a fact path, "may depend on" otherwise; never "breaks"); a path through a node in a gap file is inferred too. A path that reaches a route also has route_paths (T025, additive): the route node's composed paths as stored (ADR 0013), each {"template", "scope", "trailing_slash"} (scope "test" or null; trailing_slash true when the served path ends in a / the normalized template drops, FastAPI only, ADR 0019; entries differing only in it are distinct paths), so a client can show the full path with router prefixes instead of the path as written in the route's file; an empty list means no full path is known: when route_shadowed is true an earlier mount takes every composed path of the route first (route attribute shadowed_paths), so it is mounted and its paths are withheld; when route_withheld is true the route is a registration whose path the Go linker withholds (its route_mount_unresolved diagnostic names the route's span, couldn't-read row CR-44; ADR 0089 Revision 5); both absent otherwise. Other paths have no route_paths member, and neither does a route the graph it was read from no longer holds. route_paths holds full paths only: a reached route's paths whose prefix the code does not fix (T033 rows UP-29, UP-32; a Next.js basePath not read, NX-R4) are in prefix_unknown_paths (absent when there is none), each {path, above, template, trailing_slash, scope, reason, hop} with path the … form of the routes list. A calls_route step carries link_assumptions (absent when there is none): the assumptions its link rests on, read from the client call, each {id, text}: origin (an origin nothing proves to be the server, LF-1) or UP-V1, UP-V2 (the unknown-prefix tier, or a Next.js route whose basePath is not read). wording is the last edge's I-table wording ("calls this route", "documents this route", "references this column", "alters this table", "renders this", ...), else the relation's; an I8 edge reads "reads this table" / "writes this table" when a fact, "may read / may write this table" when inferred, and "builds a query on this table" for a statement the owner builds but does not run. An I8 step also has access, the owner's table_access entry for the edge: tool, role, operations, rows, verification (oracle or mapped) with verification_wording ("verified by an oracle", "mapped, not verified"), assumes, column_use (other steps have no access member). An I16 step (T029 W2: a changed model declaration to a route whose shape uses it, incoming uses_model; rows MT-13..MT-19 of the route model types contract) has model: the declaration's name and the route's uses of it, each with section, status (a response's, else null), kind (fact, intended, returned or mapped), rule, file, line and confidence; its path reads "through request body (fact) model UserIn" or "through response (returned) model Pet" (other steps have no model member). A route whose uses_model edges changed is a C3 item labelled models_changed, with the declarations gained and lost in the field model_edges. table_uses has one entry per table whose users the traversal read: found (the owners with an edge to it, wording "uses found": a lower bound, never "no users") and may_also_be_used_by (inferred: owners whose table_access_unknown entries name the table as a candidate, with row, line, tool, reason, partial, and the owners of unbound entries, whose candidates are null, that may reach it: unbound: true; an unbound SQLModel, Prisma or Drizzle entry reaches only that tool's model tables, an entry of any other tool every table; owners already found are left out). unknowns lists what is not impact: blind spots (unresolved call sites in any file whose callee name matches a seed or reached function, ADR 0009), near misses of a seed or reached route (ADR 0042), nodes in gap files, untraversed edge kinds with counts (row ID: incoming edges no relation follows, and unfollowed outgoing exposes_* edges) and not_extracted relations (I8 for tables and columns of a source no code-to-table row covers: a SQLite or MySQL migration set, a model tool without rows; I11: architecture components). paths is paged like items (limit default 100, total, next_cursor); the traversal is cached with the comparison, and the item's impact_count is set from then on.

{
  "api_version": 0,
  "repository": "app",
  "index": {"finished_at": "2026-11-13T23:30:38.567819705Z", "indexer": {"name": "graphvein", "version": "extractors-32"}, "contract_version": 1},
  "freshness": {"state": "fresh", "checked_at": "2026-11-13T23:30:40.644077548Z", "changed_count": 0, "changed_files": [], "changed_files_truncated": false},
  "base": "pin:release-1",
  "seeds": ["function:server/handlers.ts#listItems"],
  "depth": 3,
  "paths": [
    {
      "node": "route:server/app.ts#GET%20%2Fapi%2Fitems", "kind": "route", "seed": "function:server/handlers.ts#listItems",
      "distance": 1, "relation": "I4", "claim": "depends on", "wording": "handled by the changed code",
      "provenance": "fact", "confidence": 1,
      "route_paths": [{"template": "/api/items", "scope": null, "trailing_slash": false}],
      "steps": [
        {"kind": "exposes_route", "source": "function:server/handlers.ts#listItems", "target": "route:server/app.ts#GET%20%2Fapi%2Fitems",
         "relation": "I4", "provenance": "fact", "confidence": 1,
         "evidence": [{"file": "server/app.ts", "span": {"start_line": 7, "start_column": 0, "end_line": 7, "end_column": 32}}],
         "via": null, "removed": false}
      ]
    }
  ],
  "unknowns": {
    "blind_spots": [],
    "near_misses": [],
    "gap_nodes": [],
    "untraversed": {"contains": 2, "exposes_route": 1},
    "not_extracted": [{"relation": "I11", "nodes": []}]
  },
  "caps": [],
  "table_uses": [],
  "total": 3,
  "next_cursor": "ODE5ZjMyOWUzZTQzOGFlYzE5YTliZTQwAGZ1bmN0aW9uOnNlcnZlci9oYW5kbGVycy50cyNsaXN0SXRlbXMAADMAMQ"
}

POST /api/v0/changes/pins and POST /api/v0/changes/pins/delete

POST pins with {"name": "...", "run": "<run id>"} (run optional: the newest journal run; name 1 to 200 bytes) pins a journal run under the index lock and answers 201:

{"api_version": 0, "repository": "app",
 "pin": {"id": "A2ZG6QIGGISEXWEKMR5RQVUOGA", "name": "before-refactor", "seq": 2, "created_at": "2026-11-13T23:30:40.653248854Z",
         "run": {"seq": 2, "run_id": "6Z2HP2FAVEAC76ZPCR7XTN7AYK", "previous_run": "T4HWU6N5ITYXHNPMUA4VJDI6J7",
                 "indexer": {"name": "graphvein", "version": "extractors-32"}, "finished_at": "2026-11-13T23:30:38.567819705Z",
                 "counts": {"edge": {"added": 6, "changed": 13, "removed": 12}, "file": {"added": 2, "changed": 8, "removed": 1}, "node": {"added": 7, "changed": 25, "removed": 7}},
                 "entry_bytes": 37782, "gaps": ["web/broken.ts"], "gaps_truncated": false, "gaps_fileless": false}}}

POST pins/delete with {"name": "..."} answers {"api_version": 0, "deleted": "before-refactor", "repository": "app"}.

POST and GET /api/v0/changes/refs

POST refs with {"base": "<ref>", "head": "<ref>"} (head optional) resolves both names (404 ref_unknown, 503 git_unavailable), takes the index lock and starts a job that indexes the merge base and the head commit into their ref namespaces (only those without a snapshot), answering 202 with the GET document and Location: /api/v0/changes/refs. GET refs reports the latest job; state is running, committed, failed (with error.code, for example ref_objects_missing) or cancelled:

{"api_version": 0, "repository": "app",
 "job": {"id": "Q3P7ZQ6M2V5D4WJ3T4H4J6B4XA", "state": "committed", "started_at": "2026-11-13T23:31:02.1Z", "ended_at": "2026-11-13T23:31:03.4Z",
         "base": "ref:main..feature", "commits": ["0d8c4f7e5b1a2c3d4e5f60718293a4b5c6d7e8f9", "9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b"],
         "indexed": ["0d8c4f7e5b1a2c3d4e5f60718293a4b5c6d7e8f9"], "error": null}}

With no job yet, job is null.

Architecture endpoints (T026, ADR 0079)

Three read-only endpoints serve the component model of the architecture graph and its chains. Components, kinds, visibility, deploy markers, links and annotation cells are computed from stored facts on every request and never stored, by the claim contracts of docs/contract/claims/architecture-graph.md (rows CM, CK, CV, CD, CE, AP, AA, AT, AE; every value names its row). They follow the API section conventions above: no cache, runs read first and last (one retry, then 503 index_changed), unknown parameters ignored, a parameter given twice is 400 bad_request, and every response starts with api_version (0), repository and index. graphvein.yaml is read on every request (test scope and architecture.hide); a configuration error is 400 bad_request.

GET /api/v0/architecture?scope=

scope is production (default) or all; production leaves out every edge whose source is test scope (a node with scope: "test" or a file the test-scope rules classify) and counts them in hidden.test_edges by family. The response:

No string the endpoints derive says protected, secure, authenticated, encrypted or enforces.

GET /api/v0/architecture/component?id=&editor=

The expanded content of one component (id is its directory; unknown: 404 not_found; missing: 400): component as above, files[] (path, test), routes, calls (client and IPC calls), commands, tables (presented nodes with IDE links, as the API section), unlinked (non-test calls without a link, by status) and external_packages[] (identity, ecosystem, name and import count from non-test files: the list behind the stub, O2 (a)).

GET /api/v0/architecture/chain?id=&direction=&depth=&scope=

The chain of one start (T026, rows CH1-CH12 and CHD), in both directions with all branches, on the breadth-first walk change impact uses (internal/traverse, ADR 0056's caps). id (required, else 400) is a node identity (any kind: a function or method, route, client or IPC call, IPC command, table, file, ...) or a component directory as /architecture lists it; neither: 404 not_found. direction is up, down or both (default); depth is 1 to 10 (default 6; T042 raised the maximum from 6, the default stays); scope is production (default) or all (test scope followed too).

{
  "api_version": 0, "repository": "app", "index": {...},
  "start": {"id": "route:api/items.py#GET%20%2Fitems", "kind": "route", "level": "node"},
  "direction": "both", "scope": "production", "depth": 6,
  "caps": {"depth": 10, "members": 2000, "fan_out": 200},
  "up": {
    "steps": [{"step": 1, "hidden_test": 0, "bounds": [],
               "map": {"shown": ["client_call:..."], "folded": 0},
               "members": [{"id": "client_call:...", "kind": "client_call", "name": "...", "qualified_name": "...",
                            "file": "ui/src/app.ts", "line": 7, "component": "ui", "method": "GET", "status": "linked",
                            "row": "CH3", "tier": "inferred 0.9", "tier_step": 1, "parents": ["route:..."]}]}],
    "edges": [{"from": "route:...", "to": "client_call:...", "kind": "calls_route", "row": "CH3",
               "wording": "called by client call", "dashed": false, "tier": "inferred 0.9", "count": 1, "evidence": [...]}],
    "ends": [{"member": "function:...", "row": "CH11", "text": "? not modelled: ..."}],
    "not_followed": {"contains": 2}, "caps": [], "members": 4, "hidden_test": 0
  },
  "down": {...},
  "map": {"steps": 3, "per_step": 5, "total": 40, "shown": 6, "folded": 1, "open_in_flow": true}
}

A table member has database, its card (database:<set>), when the table stores a set; a route member has full_path, its served path (first composed path, trailing slash restored), when it has one, else prefix_path, its path whose prefix the code does not fix with … for the prefix (T033 row UP-33), when it has one; path stays the pattern as written. A CH3 (calls_route) edge has assumptions when its link rests on any (absent otherwise), each {id, text}: origin (LF-1) or UP-V1, UP-V2, read from the client call.

steps[0] holds the start. Each member names the row of the edge that first reached it, its path tier (the weakest edge on that first path, tier_step where it is; fact with step 0 when every edge is a fact) and its parents on the previous step (every branch). edges[] lists every followed edge between members in chain order (from nearer the start), one per stored edge kind, with the wording of its row and direction (CH6 as ADR 0056 I8: reads, writes, may read, may write, builds a query on; upstream read by, written by, ...). The lists are never cut by the map: map per step is the map budget's folding hint (AG16: at most 3 steps each way, 5 members per step, 40 in total; members whose parent is drawn first), the rest folds into the step's folded count (never a single member: a step with one member left over draws it, past the third step when its parent is drawn), and open_in_flow says the map does not show every member.

GET /api/v0/precision

The precision rule table as this binary holds it, whether the latest run may use it, and what the store holds (T020, ADR 0066, docs/extract/precision.md). No parameters; read-only, with the same runs-before/after consistency check, errors and headers as the API section endpoints.

{
  "api_version": 0, "repository": "app", "index": {...},
  "binary_extractor": "extractors-49",
  "run": {"built_in": true, "extractor_matches": true, "refusal": null},
  "rules": [{
    "id": "PL-F2", "kind": "family", "scope": "SQLModel / SQLAlchemy models",
    "label": "precise", "reason": null,
    "languages": ["python"],
    "facts": {"unit": "tables", "total": 19, "by_language": {"python": 19}},
    "marker": "model `table` / `column` nodes and their edges in groups with `tool` `sqlmodel`",
    "match": {"family": "schema_models", "tools": ["sqlmodel"], "dialects": []},
    "evidence": {"contract": [{"package": "internal/extract/models/sqlmodel", "name": "TestModelClaimContract"}],
                 "goldens": ["sqlmodel-models", "sqlmodel-link"],
                 "corpus": [{"adr": "0054", "quote": "..."}], "review": [{"adr": "0054", "quote": "..."}],
                 "oracle": [{"package": "internal/extract/models/sqlmodel", "name": "TestModelOracle"}], "oracle_none": null},
    "refusal": "none beyond the global ones"
  }],
  "default": {"row": "D", "label": "best_effort", "scope": "everything else", "covers": "every file label (...); routes, ...",
              "families": [{"family": "routes", "label": "best_effort", "languages": ["typescript"],
                            "facts": {"unit": "nodes", "total": 10, "by_language": {"typescript": 10}}}]},
  "files": {"reported_by": null, "total": 22,
            "languages": [{"language": "python", "total": 19, "by_label": {"best_effort": 19}, "reported_by_label": null}]}
}

Every reason (and precision_reason) a label carries is one of default_branch (no row names the scope), marker_conflict (the scope's records name more than one tool or dialect, so no single row can be named), no_run (no run is stored), external_indexer, extractor_mismatch, stored_label_invalid and structure_refused and structure_unrooted (file labels only) and scope_unknown (a change item only). The list is labelReasons in internal/server/precision.go; internal/server/testdata/precision-reasons.golden.json holds it for the web tests, which check that every reason has its own words.

Labels elsewhere: /source serves the file label, /schema/sets and /schema/table each group's scope label, /api/endpoints (per transport), /api/endpoint and /api/flow the endpoint and call families' labels, /changes/items each item's file and scope labels; every one is {label, row, reason} (file labels: precision, precision_reason and precision_row) decided from the same table and the same run refusals.

GET /api/v0/ide

The editor presets and the repository's default editor, for the editor picker (ADR 0050), so the preset table lives only in Go (internal/config/ide.go). It reads graphvein.yaml on every request and never the index, so it has no consistency check; it has the same security headers and Host and origin checks as every endpoint, and ignores query parameters.

{
  "api_version": 0,
  "presets": [
    {"editor": "vscode", "label": "Open in VS Code", "status": "verified",
     "note": "Verified from VS Code's documentation and its URL handler.", "short_note": ""},
    {"editor": "cursor", "label": "Open in Cursor", "status": "partly_verified",
     "note": "cursor://file is confirmed; line, column and the Windows path form are assumed from VS Code, so the column is marked as not exact.", "short_note": "column assumed"},
    {"editor": "jetbrains", "label": "Open in IntelliJ IDEA", "status": "limited",
     "note": "macOS only, IntelliJ IDEA only; ...", "short_note": "macOS only"},
    ...
  ],
  "repository": {"available": true, "error": null, "editor": "vscode",
                 "label": "Open in VS Code", "custom": false, "source": "builtin"}
}

GET /api/v0/ui

The web UI defaults the repository sets in graphvein.yaml (T025b, ADR 0078; depths T042), so the UI can apply ui.labels, ui.impact_depth and ui.chain_depth when the browser has no choice of its own. It reads graphvein.yaml on every request and never the index, so it has no consistency check; it has the same security headers and Host and origin checks as every endpoint, and ignores query parameters.

{"api_version": 0, "labels": "technical", "impact_depth": 4, "chain_depth": null, "error": null, "report_url": null}

GET /api/v0/search?q=&kinds=&limit=

The jump-to palette's search (T040, ADR 0089, claim contract jump-search, rows JS-1..JS-20). It matches stored names and paths only, never a file's text, and never states that something does not exist.

What each kind matches: routes by every full path, the pattern, the unknown-prefix path the item is labelled with when it has no full path (without the leading …, so any part of the shown label finds it) and the name ("GET /x"); operations (the generated OpenAPI document, as GET /api/v0/openapi builds it) by path key; tables (migration and model) and symbols (class, function, method, struct, interface, type, type_alias, enum, trait, union, record, variable, constant, constructor, macro, mixin, extension, extension_type, annotation) by name and qualified name; files by base name and path. Calls, columns, diagnostics and the files Graphvein could not read are not searched.

Ranking: an item's tier is the best of its keys: prefix (the key starts with the query), word (the query starts at a word start: after a character that is not an ASCII letter or digit, at a lower-to-upper case change or between letters and digits) or substring; then the shorter key, the key's bytes and the identity. Kind groups are ordered by their best tier, then route, operation, table, symbol, file.

{"api_version": 0, "repository": "app", "query": "items",
 "kinds": ["route", "operation", "table", "symbol", "file"], "limit": 10,
 "ide": {...}, "index": {...},
 "searched": {"indexed": true, "files": 26, "files_not_read": 0, "scanner_gaps": 0},
 "absence": "not_proven",
 "totals": {"route": 3, "operation": 3, "table": 0, "symbol": 2, "file": 0},
 "groups": [
  {"kind": "route", "available": true, "unavailable": [], "total": 3,
   "best_tier": "word", "truncated": false,
   "items": [{"kind": "route", "repository": "app",
              "id": "route:server/app.ts#GET%20%2Fitems", "label": "/items",
              "tier": "word", "match_key": "path", "file": "server/app.ts",
              "line": 13, "ide": {...}, "method": "GET", "path": "/items",
              "test": false}]}]}

GET /api/v0/unread?scope=&limit=

The "What Graphvein couldn't read" page (T040, ADR 0089, claim contract couldnt-read, rows CR-1..CR-43). Every part comes from the stored index, computed by the code of the endpoint that already serves it where one does; what Graphvein does not model at all, for any repository, is listed in known gaps. scope is production (default), test or all; limit bounds every list (1..2000, default 200; counts are never capped); editor as above.

{"api_version": 0, "repository": "app", "scope": "production", "limit": 200,
 "ide": {...}, "index": {...}, "builtin_run": true,
 "config": "repository", "config_error": null,
 "counts": {"unplaced_routes": 1, "mounts": 0, "dynamic_patterns": 0,
            "router_form_files": 0, "router_forms": 0,
            "router_form_files_not_counted": 0, "dynamic_calls": 3, "wrapper_calls": 1,
            "routes_without_shape": 0, "routes_shape_invalid": 0,
            "routes_with_sections_not_read": 10, "routes_depth_cap": 0,
            "files_not_read": 0, "files_syntax_errors": 0, "scanner_gaps": 0,
            "files_without_facts": 3, "unresolved_calls_external": 30,
            "unresolved_calls_unknown": 8, "files_counted": 17,
            "files_not_counted": 0, "route_failures": 0, "mounts_unresolved": 0,
            "routes_withheld": 0, "files_records_dropped": 0, "files_structure_outside_contract": 0},
 "route_paths": {"document": {"available": true, "reason": null},
                 "unplaced": {"total": 1, "truncated": false, "items": [...]},
                 "mounts": {...}, "dynamic": {...}, "router_forms": {...},
                 "failed": {...}, "mounts_unresolved": {...}, "routes_withheld": {...},
                 "forms": 0, "form_files_not_counted": 0},
 "client_calls": {"dynamic": {...}, "wrapper": {...}},
 "shapes": {"routes": 10, "without_shape": {...}, "shape_invalid": {...},
            "sections": {"path": 1, "query": 10, ...}, "sections_not_read": {...}},
 "depth_caps": {"routes": {...}},
 "files": {"scope_applied": true, "not_read": {...}, "syntax_errors": {...},
           "scanner_gaps": {...}, "records_dropped": {...},
           "structure_outside_contract": {...},
           "without_facts": {"available": true, "reason": null,
                             "by_extension": [{"extension": ".vue", "count": 236}],
                             "by_category": [{"category": "code_with_reader", "count": 0},
                                             {"category": "code_no_reader", "count": 236}, ...],
                             "files": {...}}},
 "code_calls": {"available": true, "reason": null,
                "languages": ["go", "javascript", "python", "rust", "tsx", "typescript"],
                "external": 30, "unknown": 8, "files_counted": 17,
                "files_not_counted": 0, "files": {...}}}

GET /api/v0/openapi

The OpenAPI 3.1 document of the repository's stored routes (T029, ADR 0081): the same bytes as graphvein openapi, built under the claim contract from the stored routes, their auth and shape attributes, the imported specs and explorer.path_values in graphvein.yaml; servers are the configured try-it environments (project ones for the member first). The Explorer section (#/explorer) reads it and its download buttons save it.

GET and POST /api/v0/explorer/path-values

The explorer's user-supplied path parts (explorer.path_values in graphvein.yaml; rows OG-90..OG-96): a value for a route Graphvein stored without a usable path, for a Next.js basePath read from the environment, or for an unresolved mount hop (one prefix for every route below it). A value changes only the explorer, try-it and the generated document, and is always shown as set by you. In project mode repository= names the member, whose own graphvein.yaml is edited.

GET:

{"api_version": 0, "file": "graphvein.yaml", "exists": true, "hash": "sha256:…",
 "editable": true, "reason": null, "token": "<session token>",
 "values": [{"key": "route:src/app.js#POST%20%2Forphan", "value": "/api/orphans/{id}",
             "status": "used", "operations": 1}],
 "unresolved": [{"route": "route:web/app/api/x/route.ts#GET%20%2Fapi%2Fx", "method": "GET",
                 "pattern": "/api/x", "file": "web/app/api/x/route.ts", "line": 1,
                 "reason": "unresolved_base", "templates_after_base": ["/api/x"],
                 "unknown": {"part": "base_path", "project": "web", "text": "…"},
                 "keys": ["route:web/app/api/x/route.ts#GET%20%2Fapi%2Fx", "nextjs_base_path:web"]}],
 "mounts": [{"key": "mount:internal/web/routes.go#createRouter%20r.Route%28base%29",
             "hop": "r.Route(base,func(...){...})", "file": "internal/web/routes.go", "line": 284,
             "reason": "route_prefix_unresolved", "registration": "sha256:…",
             "shadowing_not_checked": true, "routes": 85,
             "examples": [{"method": "GET", "above": "", "path": "/"},
                          {"method": "GET", "above": "", "path": "/api/cloud/config"}],
             "ambiguous": false, "value_covers": "root", "above": [], "framework": "chi"}]}

hash names the file on disk now (the hash of empty text when there is no file: an edit then creates it with version: 1 and the values); values are the effective values with their use (used or unused with why, such as a conflict with a code-read operation or "registration changed", "ambiguous registration"), the recorded registration and a warning for a route key without one (the UI shows it), unresolved the routes still without a path, each with the keys that would place it (most specific first). A project member without a checkout here is editable: false with the reason. mounts are the unresolved mount hops of the production routes (rows OG-94, OG-95): the hop's key and hash, its text, file and line, the number of routes below it without a path read from code, up to three of them (method, the known prefix above the hop and the path below it), whether the Go checks above the hop were not run (shadowing_not_checked, OG-96), whether a twin hop with the same text makes it ambiguous, what a value states (value_covers: hop, only the part the hop adds after the known prefixes in above; nothing, only / is accepted; root, the whole prefix from the root) and the routes' framework. A set of a mount key records the hop's registration and refuses a value other than / for a nothing hop. The token is random per server process, as the manifest edit's.

POST, with Content-Type: application/json and X-Graphvein-Token: <token>, body at most 64 KiB:

{"base_hash": "sha256:…",
 "operations": [{"op": "set", "key": "route:src/app.js#POST%20%2Forphan", "value": "/api/orphans/{id}"},
                {"op": "remove", "key": "nextjs_base_path:web"}]}

1 to 64 operations, each {op: set, key, value} or {op: remove, key}. A set of a route key also writes the route's stored content hash as registration (row OG-90); a route key no stored route has, or whose registration has an identical twin in its file, is 400 invalid_value. A set of a mount key writes the hop's hash as registration; a key no stored route has below it, or an ambiguous hop, is 400 invalid_value. Without apply the answer is a preview and nothing is written:

{"api_version": 0, "applied": false, "base_hash": "sha256:…", "result_hash": "sha256:…",
 "diff": "--- a/graphvein.yaml\n+++ b/graphvein.yaml\n@@ …", "valid": true, "problems": [],
 "changes": ["sets the path value of route:src/app.js#POST%20%2Forphan to \"/api/orphans/{id}\" (shown as set by you)"]}

Adding "apply": true, "result_hash": "<the preview's result_hash>" writes the result atomically (temporary file and rename) through the same writer the configuration tests use (comments kept, two-space indentation); the answer has applied: true. Nothing is re-indexed: the next document read uses the new values.

Answers: 200; 400 bad_request (body, unknown or duplicate member, operation shape), 400 invalid_value (a key or value breaks row OG-91), 400 edit_refused (removing a value that is not set), 400 no_change; 403 token_required, not_loopback, cross_site_request or host_not_allowed; 409 config_changed (the file's hash is not base_hash), 409 preview_changed, 409 no_checkout (project member without a checkout); 413; 415; 422 invalid_config (apply of a result that does not load). A refused edit leaves the file untouched; edits are serialised.

GET and POST /api/v0/config

The Settings page's keys and its guarded edit of graphvein.yaml (T039, ADR 0088, rows ST-1..ST-30 of the settings claim contract). In project mode repository= names the member, whose own graphvein.yaml is read and edited.

GET:

{"api_version": 0, "repository": "shop", "file": "graphvein.yaml",
 "exists": true, "hash": "sha256:…", "text": "version: 1\nui:\n  labels: technical\n",
 "editable": true, "reason": null, "token": "<session token>", "config_error": null,
 "keys": [{"key": "ui.labels", "kind": "enum", "choices": ["plain", "technical"],
           "value": "technical", "default": "plain", "origin": "file", "line": 3,
           "applies": "at_once", "editable": true, "reason": null},
          {"key": "index.shape_depth", "kind": "integer", "min": 1, "max": 10,
           "value": 6, "default": 6, "origin": "builtin", "line": null,
           "applies": "next_index_run", "editable": true, "reason": null},
          {"key": "tests.include", "kind": "list", "value": null, "default": null,
           "origin": "not_set", "line": null, "applies": "next_index_run",
           "editable": true, "reason": null}],
 "other_keys": [{"key": "version", "line": 1, "edited_by": null},
                {"key": "explorer.path_values", "line": 5, "edited_by": "/api/v0/explorer/path-values"}],
 "reindex": {"path": "/api/v0/index/run", "scope": "repository"},
 "index_settings": {"state": "unchanged", "changed_keys": [], "unknown_keys": [],
                    "index_hash": "sha256:…", "current_hash": "sha256:…", "reason": null},
 "ignore": {"file": ".graphveinignore", "exists": false, "text": "", "editable": false},
 "project": null}

keys lists every key the form edits, in form order: ui.labels, ide.editor, index.shape_depth, clients.base_paths, clients.link_generated_output, tests.include, tests.exclude, openapi.include, openapi.exclude, openapi.base_paths, architecture.hide (configuration). kind is enum (choices), integer (min, max), boolean, list (strings) or map (an ordered list of {"key", "value"} strings). origin is file (the file sets it; line is its key's line), builtin (the built-in default applies), not_set (nothing applies, value null) or unknown (the file does not load, or the member has no checkout: value null). applies is at_once (read from the file on every request of the endpoints that use it) or next_index_run (read by the index run, which re-links without re-parsing; reindex names the run to start: POST /api/v0/index/run, scope repository, or project under --project, which re-indexes every member and then links). value is the value as the strict decoder reads it (shape_depth: 0x7 is 7, 010 is 8). ide.editor is editable: false with a reason while ide.link_template is set, and locked_by names that key with its line ({"key": "ide.link_template", "line": 4}; null for every other key): the template builds the links, not the editor value or its default. index_settings is freshness.settings of /api/v0/status for the text served here: whether the last index run was built with these settings (changed_keys names the keys a re-index would apply; unknown when the file does not load or the run recorded nothing).

other_keys are the keys the file sets outside the form (every scalar root key and every key inside a section), in file order; a typed edit never changes them. edited_by names the guarded edit of explorer.path_values and tryit.environments; the others are edited in the YAML view (the text form below). hash is the base for an edit (absent when there is no file; the first edit creates it with version: 1). When the file does not load, config_error is the strict decoder's message with the file and line, every key is origin: unknown and not editable, and other_keys is empty; text and hash are still served so the YAML view can fix the file. ignore is the root .graphveinignore, the only one the scanner reads, shown read-only; Settings never writes it. In project mode project is the manifest's part, read fresh on every request:

"project": {"file": "graphvein-project.yaml", "error": null,
            "environments": [{"name": "shared", "label": "staging", "line": 10, "for_member": true,
                              "base_urls": [{"repository": "backend", "base_url": "http://127.0.0.1:8000"}]}],
            "edited_by": "/api/v0/tryit/environments"}

edited through the try-it environment edit with target project. A member without a checkout here is editable: false with the reason; exists, hash, text and ignore.exists/ignore.text are null and every key is origin: unknown.

POST, with Content-Type: application/json and X-Graphvein-Token: <token>, body at most 1 MiB, either typed operations:

{"base_hash": "sha256:…",
 "operations": [{"op": "set", "key": "ui.labels", "value": "plain"},
                {"op": "set", "key": "clients.base_paths", "value": [{"key": "web", "value": "/api"}]},
                {"op": "remove", "key": "index.shape_depth"}]}

or the whole file (at most 256 KiB):

{"base_hash": "sha256:…", "text": "version: 1\nui:\n  labels: plain\n"}

1 to 64 operations, each {op: set, key, value} with a value of the key's JSON type, or {op: remove, key}. Which values are valid (a choice, a range, a pattern) is decided by the strict decoder of graphvein.yaml alone. A typed edit changes only the lines of the edited entry: a value on its key's line is replaced in place and keeps its line comment, a new key goes after the last entry of its section (a new section at the end), new lines take the file's line ending and indentation step, a removed key takes its lines and the comment lines directly above it, and a section it empties goes too. A block list or mapping is edited entry by entry: every line of an entry the edit keeps stays (its comments too), a mapping entry whose value alone changes is rewritten in place with its line comment, an added entry is written next to its neighbours, and a removed entry takes its lines and the comment lines directly above it. The text edit is kept only when it decodes to exactly the same tree as the edit made on the parsed file; otherwise (a reordered mapping, comments inside the lines a changed entry would replace, a flow-style section) the parsed file is encoded again with two-space indentation and without blank lines, reusing the nodes of the entries it keeps: reformatted: true and a line in changes say so. A re-encode also says in changes when it drops a byte order mark, turns CRLF line endings into LF or drops an anchor. lost_comments lists every comment of the file on disk that the result no longer has, with its line there (the comments yaml.v3's parser reads in both texts compared, or a line scanner's when a text does not parse; a removed entry's own comments, and any a re-encode drops), each also named in changes. Without apply the answer is a preview and nothing is written:

{"api_version": 0, "applied": false, "base_hash": "sha256:…", "result_hash": "sha256:…",
 "diff": "--- a/graphvein.yaml\n+++ b/graphvein.yaml\n@@ …", "valid": true, "problems": [],
 "changes": ["sets ui.labels to `plain` (was `technical`)"], "reformatted": false, "lost_comments": [],
 "changed_keys": [{"key": "ui.labels", "applies": "at_once"}],
 "other_keys_changed": false, "reindex_needed": false}

changes word each operation: a scalar with the value it replaces, a list or mapping item by item as key: value (sets openapi.base_paths: adds v2: /v2; changes contracts: /api/v1(was/api); removes legacy: /old``), never as JSON. changed_keys are the form keys whose effective value changes; other_keys_changed is true when anything outside the form changes (a text edit). A whole-text edit of a file that did not load lists every form key in changed_keys and says in changes "the file did not load before; every key is treated as changed"; reindex_needed is true when a changed key applies at the next index run. An invalid result is valid: false with the decoder's message in problems. Adding "apply": true, "result_hash": "<the preview's result_hash>" writes exactly the previewed text atomically (temporary file and rename); the answer has applied: true. Nothing is re-indexed.

Answers: 200; 400 bad_request (body, unknown or duplicate member, both or neither of operations and text, operation shape), 400 unknown_key (a key the form does not edit), 400 invalid_value (a value of the wrong JSON type), 400 edit_refused (removing a key the file does not set, ide.editor under a link_template), 400 no_change; 403 token_required, not_loopback, cross_site_request or host_not_allowed; 409 config_changed (the file's hash is not base_hash), 409 preview_changed, 409 invalid_config (a typed edit of a file that does not load), 409 no_checkout; 413 too_large; 415; 422 invalid_config (apply of a result that does not load). A refused edit leaves the file untouched. Every edit of a graphvein.yaml (this one, the path values and the try-it environments of a repository) runs under one lock, so two never interleave.

GET /api/v0/source?id=&context=

The current lines around one stored node's span, for the code peek panel (ADR 0044). The span is highlighted only when Graphvein can show that these lines are the indexed ones; otherwise the lines are shown without a highlight, or not at all, with an explicit state. It uses the same runs-before/after consistency check, errors and headers as the API section endpoints.

The request never carries a path. The only file read is the node's stored file, and only when that is a valid contract path and a stored file.

For id=route:backend.ts#GET%20%2Ft015b-requests and context=1 on the testdata/fixtures/env-wrappers fixture:

{
  "api_version": 0, "repository": "...", "index": {...},
  "ide": {"available": true, "error": null, "label": "Open in VS Code", "editor": "vscode", "source": "builtin"},
  "node": <presented node>,
  "source": {
    "state": "exact", "reason": null,
    "file": {"path": "backend.ts", "size": 288, "line_count": 8,
             "language": "typescript", "precision": "best_effort",
             "precision_reason": "default_branch", "precision_row": "D",
             "reported_precision": null},
    "first_line": 3,
    "lines": ["function handle(req, res) { res.json({}); }", "app.get('/t015b-requests', handle);", "app.post('/t015b-requests', handle);"],
    "cut_lines": [], "truncated": false,
    "highlight": {"start_line": 4, "start_column": 0, "end_line": 4, "end_column": 34}
  },
  "code_calls_precision": null
}
state when lines highlight
exact the file's current hash equals its stored hash and the span is in bounds on character boundaries yes yes
text_match the hash differs; the span is in bounds and non-empty, its bytes hash to the node's content_hash, and that text occurs exactly once in the file (overlapping occurrences counted) yes yes; the file changed since the index
changed the hash differs and text_match does not hold; reason is span_out_of_range, empty_span, span_text_differs or span_not_unique yes, around the stored line no
span_invalid the hash is equal but the span is out of bounds or splits a UTF-8 sequence (an indexer error; logged once as a warning) yes, around the stored line no
missing the file or a directory on its path does not exist, or a path component is a file no no
not_regular a path component under the root is a symlink (even one that stays inside the root), a component is not a directory, the file is not a regular file, or the path would leave the root no no
too_large the file is larger than 4 MiB (checked before and while reading) no no
binary the file contains a NUL byte or is not valid UTF-8 (the scanner would not index it) no no
unreadable any other open, stat or read error; reason holds the message no no
no_location a synthetic node (file .) or a node without span no no
not_indexed the node's file is not a stored file or not a valid contract path (a store inconsistency; nothing is read) no no

Checks run in that order of precedence: no_location, not_indexed, the confined read (missing, not_regular, unreadable, too_large), binary, then the span. reason is null except for changed and unreadable. Clients treat a state they do not know as "no highlight, show the state".

text_match claims only that the highlighted bytes are exactly the indexed span text and occur once in the file now; the node may still mean something else (a prefix edited in another file), so clients show that the file changed. A moved span is not relocated.

Confinement: the repository root is opened with os.Root, every path component of the stored file is checked with Lstat (no symlink is followed, as the scanner follows none; the root itself may be a symlink), the opened file must be the checked regular file, and at most 4 MiB + 1 bytes are read. The server reads the store's file hashes on every request.

Project endpoints (serve --project)

Only under serve --project (T022 B8, ADR 0075 "Server and UI"); a single-repository server answers 404 not_found on these paths. Every node is named by the pair (repository, identity), never one concatenated string. Links and their freshness come from the last stored link pass through projectlink.View, shared with graphvein status --project and the project-scoped CLI reads, so "stale" means the same everywhere: a link is stale when the manifest's declarations changed, or when a member at either end failed to index before the pass or was indexed again since. Stale links are shown and followed, never dropped.

GET /api/v0/project

{
  "api_version": 0, "project": "users", "server_version": "...",
  "members": [{
    "repository": "frontend", "repository_source": "manifest",
    "path": "frontend", "path_source": "manifest", "checkout": true,
    "remote": {"url": "https://github.com/o/frontend.git", "repository_root": true},
    "extractor": {...}, "index": {...}, "freshness": {...},
    "links": {"in_pass": true, "pass_run": "...", "index_error": null,
              "links": 3, "stale": 0, "stale_reasons": []}
  }],
  "link_pass": {"state": "fresh", "pass": 1, "links": 3, "stale_links": 0,
                "outcomes": {"linked": 3}, "stale_reasons": []},
  "checks": []
}

GET /api/v0/project/callers?term=&repository=&depth= and /api/v0/project/impact?term=&repository=&depth=

graphvein callers|impact --project --json (query.ExecuteProject, queries) with api_version added: term (required) is an identity or a name, looked up in the member repository names (optional; an unknown member is 400) or in every member. depth is 1 to 10 (default 1 for callers, 3 for impact). Inside a member the traversal follows exactly the single-repository edges; from a route it follows the stored calls_route links back into other members. Link steps carry the assumption, provenance inferred, the link's confidence and, when stale, stale_reasons. A term found in several members answers 200 with "error": "ambiguous target" and the candidates (repository and identity), as the CLI's JSON does. The walk has the shared reached-node and fan-out caps; caps, bounds and ends report the caps that bound and the "? not modelled" ends, as in the CLI's JSON.

GET /api/v0/project/changes/impact?repository=&base=&id=&group=&depth=&cursor=&limit=

/api/v0/changes/impact of the member repository (required with several members), continued through the project's stored links into the other members as graphvein changes impact --project does (relations I12 calls_route and I13 documents_route; ADR 0075 "Query and impact"). Same parameters, paging and errors as the member endpoint; a ref: base is refused with 400, because links name the members' current indexes, not ref snapshots. The response adds project and members (each other member's unknowns, table uses and link sources it no longer stores). Cursors of the two endpoints are not interchangeable (409 index_changed). The member endpoint /api/v0/changes/impact stays single-repository in project mode.

GET /api/v0/project/links/changes?base=

The link journal diff of graphvein changes --project: links added, removed or changed between the newest kept pass and base (previous, the default, or pass:N; anything else is 400, an unknown pass 404 base_unknown). state says what was compared: compared (links holds the diff), same_pass (the base is the newest kept pass: nothing compared, which is not proof that no link changed; links is null and links_note says so) or no_comparison (fewer than two passes are kept; links is null with links_note). A member's own changes are /api/v0/changes/summary?repository=.

/api/v0/api/endpoint?repository=&id= of an HTTP route adds project:

"project": {
  "project": "users",
  "link_pass": {"state": "fresh", "pass": 1, "stale_reasons": []},
  "links_precision": {"label": "best_effort", "row": "D", "reason": "default_branch"},
  "callers": [{"repository": "frontend", "identity": "client_call:...",
               "node": <presented call node>, "owner": {...},
               "kind": "calls_route", "provenance": "inferred", "confidence": 0.9,
               "evidence": [...], "assumption": "matched across project repositories; base URL not proven",
               "stale": false, "stale_reasons": [],
               "ide_status": {"available": true, "error": null, "label": "Open in VS Code",
                              "editor": "vscode", "source": "builtin"}}],
  "operations": [<the same for documents_route links from OpenAPI operations>],
  "possible_callers": [{"repository": "frontend", "identity": "client_call:...", "kind": "calls_route",
                        "row": "PL-R11", "status": "ambiguous", "wording": "ambiguous across repositories",
                        "reason": "", "candidate_count": 2, "candidate_repositories": ["axum", "express"]}],
  "declaration_conflicts": [{"call": "client_call:...", "consumer": "monorepo/web",
                             "declared": ["`monorepo/web` consumes `monorepo/orders` (bases: VITE_ORDERS)"],
                             "target": "route:...", "target_scope": "users"}]
}

links_precision is the scope label of every link listed (family cross_repository_links, decided from the member's run): never precise, since each link rests on its assumption (precision; T022 B11). callers are the calls of other members the stored pass linked to the route; the node is presented through its own member's checkout (IDE link, file state, source root), and is null when that member no longer stores it (a stale link). The node's IDE link follows the same precedence as every other link: the request's editor= first, then the member's own graphvein.yaml ide, then the built-in default; ide_status (additive, the shape of the endpoint's ide) says which applied, and is absent when the node is not presented through a member's checkout. The UI names such a link and asks with the first-click chooser like any other. possible_callers (T022 review, replacing ambiguous_calls) are sources of other members the pass did not link but that may reach this route: an ambiguous outcome with the route among its candidates (a list cut at ten counts a route sorting after its last listed candidate), or an incomplete one (PL-R7, a candidate provider without a stored index) with the route among the indexed providers' candidates (reason names the provider). They are "may be called by", never a link and never a caller. declaration_conflicts (T022 review) are in-repository callers whose link a scope declaration contradicts; the UI marks them "linked inside the repository; the declaration names another scope", as /api/v0/api/calls marks the call (project.declaration_conflict, null otherwise). The in-repository callers are unchanged. The scope and root parameters filter the in-repository calls only. /api/v0/api/endpoints?repository= adds project_caller_count and project_possible_caller_count (the route's possible_callers that are calls) to each route row, and to the HTTP transport never_called_in_project (routes with neither an in-repository caller, nor a project link, nor a possible caller) and possibly_called_in_project (routes with only possible callers: "possibly called (ambiguous across repositories)", T022 review); never_called keeps its single-repository meaning. The HTTP transport also adds project_linked_calls (T022 B9): the calls of the scope and root that a stored project link connects to a route of another member; calls.by_status keeps the repository's own statuses. calls.project_by_status and each root's project_by_status (T022 MR-UI) count the same calls by their project-scope status: a call linked inside the repository stays linked; otherwise a stored project link makes it linked_across, an ambiguous link pass outcome (several routes of other members, no link) ambiguous_across, and every other call keeps its repository status. In project mode the API section's headline percentage, bar, cells and per-root rows use these counts, with the repository's own as secondary text.

/api/v0/api/calls takes status_scope=project (serve --project, HTTP only; 400 otherwise, and for a value other than repository or project): status then matches each call's project-scope status, and the answer carries "status_scope": "project". The gap sheets request it in project mode, so "Unmatched in the project" lists only the calls the project did not link.

/api/v0/api/flow?repository=&id= of an HTTP route adds the same project (T022 B9). Project links are not stored edges of the repository, so they are not among nodes and edges.

Each call of /api/v0/api/calls?repository=&transport=http adds project (T022 B9):

"project": {
  "link_pass": {"state": "fresh", "pass": 1, "stale_reasons": []},
  "links_precision": {"label": "best_effort", "row": "D", "reason": "default_branch"},
  "links": [{"target": {"repository": "backend", "identity": "route:...", "kind": "route",
                        "name": "GET /users", "file": "src/server.ts", "line": 13},
             "kind": "calls_route", "provenance": "inferred", "confidence": 0.9,
             "evidence": [...], "assumption": "matched across project repositories; base URL not proven",
             "stale": false, "stale_reasons": []}],
  "outcomes": [{"template": "", "row": "PL-L1", "status": "linked", "reason": "",
                "candidate_count": 0, "candidates": [...]}]
}

links are the call's stored project links, outcomes the pass's results for it (one per alternative of a call with several): why it has a link or none. Both are empty when the pass has nothing on the call; targets and reasons keep their single-repository meaning.

Re-index in project mode

GET /api/v0/index/run answers "project": "<name>" beside "repository": "" (always present, so clients that read repository as a string keep working; T038). While the server's own job runs the lock state is held_here; otherwise the project lock is probed (SQLite: the store lock). The job adds:

"member": "frontend",
"project": {
  "members": [{"repository": "frontend", "state": "committed", "run": {"id": "...", "finished_at": "..."}, "error": null},
              {"repository": "ghost", "state": "no_checkout", "run": null, "error": null}],
  "link_pass": {"pass": 2, "links": 3, "added": 0, "removed": 0, "changed": 0}
}

member names the member being indexed (absent during the link pass, whose phase is linking, and after the job). Member states are pending, running, committed, failed, no_checkout and, in a job started with {"link_pass_only": true}, linked_from_store (not indexed; its stored index is linked). The job is committed only when every member checkout committed and the pass was stored; a member that failed (its lock held by another run, a scan or store error) makes the job failed with code index_failed, the pass still running with its previous index and marking its links stale, as graphvein index --project does; a failed pass is link_pass_failed. A POST while another process holds the project lock answers 409 index_locked; a member whose latest run came from an external indexer 409 reindex_unsupported.

Project manifest endpoints (serve --project)

Manifest editing from the UI (T022 B10, ADR 0075 "Manifest editing from the UI"). graphvein-project.yaml stays the source of truth: these endpoints edit its declarations through the same writer as the CLI (comments kept) and write nothing until a preview is confirmed. No request names a file: the server writes only the manifest it was started with, never graphvein-project.local.yaml, and adding a member by folder stays in graphvein project add. A single-repository server answers 404.

GET /api/v0/project/manifest

{"api_version": 0, "project": "users", "file": "graphvein-project.yaml",
 "hash": "sha256:…", "content": "<the file>", "token": "<session token>",
 "members": [{"repository": "frontend", "repository_source": "manifest", "checkout": true,
              "consumes": [{"repository": "backend", "scope": "", "default_scope": false,
                            "select": {"bases": ["VITE_API"], "origins": [], "path_prefixes": []}}],
              "scopes": [{"name": "admin", "path": "admin", "consumes": []}]}]}

The file as it is on disk now (with the local file, validated as the CLI does; one that does not validate answers 409 invalid_manifest), its hash and the server's session token: random per server process, readable only by a page of this server (the Host, Sec-Fetch-Site and Origin checks of every API request apply). A manifest over 256 KiB answers 413.

GET /api/v0/project/suggestions

graphvein project suggest --json's listing (proposals with evidence, unmatched, unread) for the manifest on disk (hash) and the stored calls. Nothing is applied; accepting proposal N is the edit operation accept_suggestion.

POST /api/v0/project/manifest

Headers Content-Type: application/json and X-Graphvein-Token: <token>; body at most 16 KiB:

{"base_hash": "sha256:…", "operations": [{"op": "accept_suggestion", "number": 1}]}

Without apply the answer is a preview; nothing is written:

{"api_version": 0, "applied": false, "base_hash": "sha256:…", "result_hash": "sha256:…",
 "diff": "--- a/graphvein-project.yaml\n+++ b/graphvein-project.yaml\n@@ …",
 "valid": true, "problems": [], "changes": ["accepts suggestion 1: react consumes express (bases: __API_URL__)"],
 "reindex": {"kind": "link_pass", "reason": "only declarations change: the link pass re-links the stored indexes"}}

diff is the unified diff (3 lines of context) of the file; problems are the validation errors of the result (rule table in project.md); reindex.kind is link_pass when only declarations change and project when a member is renamed (the new name has no stored index). Adding "apply": true, "result_hash": "<the preview's result_hash>" writes the result atomically (temporary file and rename in the manifest's folder) and reloads the manifest; the answer is the same document with applied: true. The links are then stale until POST /api/v0/index/run ({"link_pass_only": true} for link_pass, {} for project).

An applied rename also retires the old name (T022 B11): under the project lock, taken before the file is written, the server removes from the project store every link and outcome naming the old name, its member record and its whole stored index (runs, files, nodes, edges, diagnostics, fact cache, change journal, pins, ref snapshots) in one transaction, so nothing stays under a name no manifest uses. The answer then carries retired, one entry per old name: {"repository": "backend", "removed": true, "error": null}; removed is false with the reason in error when the server cannot write the store, or when another stored project still names that repository (its rows are kept). The link journal keeps its past passes. A re-index job running refuses the rename with 409 index_running, and a project lock held by another process with 409 index_locked; nothing is written then. A rename made on disk is not retired: its old name's rows stay until graphvein project forget OLD-NAME removes them (project).

The preview of a rename lists, in retiring, each old name with a stored index (T022 review): {"repository": "backend", "stored": true, "nodes": 412, "projects": ["users"], "standalone": false, "confirm": "delete stored index of backend (412 nodes)"}. projects are the projects whose stored link pass lists it; standalone is true when none does (the index was made on its own, so this may be the store's only copy). The apply must list every such name in "confirm_delete": ["backend"], else it is refused with 409 delete_confirmation_required and nothing is written; the UI shows the entry and asks for that second confirm (a checkbox labelled with confirm) before it enables Write.

Operations (1 to 32; each takes exactly the fields listed, any other field, such as a file or member path, is 400):

op Fields (optional in brackets) Writes
add_consume member, [scope], consume {repository, [scope], [default_scope], [select {bases, origins, path_prefixes}]} a consumes entry of the member (or of its link scope scope)
remove_consume member, [scope], target {repository, [scope], [default_scope]} removes that entry (an emptied list is removed)
set_select member, [scope], target, select replaces the entry's selector in place; {} clears it
set_default_scope member, [scope], repository, value true: the entry for the whole repository names only its default scope; false: the reverse
add_scope member, name, path a link scope; path must be relative, slash-separated, without . or .., and an existing folder inside the member's checkout after symbolic links, with every component in exactly the case on disk (the link pass compares scope folders by exact case; T022 review) (else 400 path_refused)
remove_scope member, name removes the scope with its consumes list
rename_repository member, to the member's name and every consumes entry naming it; a name the member's own graphvein.yaml sets wins, so the result is invalid
accept_suggestion number proposal N of the suggestions for the manifest on disk (a declared one is refused)

Answers: 200; 400 bad_request (body, unknown or missing field, operation count), 400 edit_refused (an operation names an entry, member or scope that is not there), 400 path_refused, 400 no_change (apply of an edit that changes nothing); 403 token_required, not_loopback, cross_site_request or host_not_allowed; 409 manifest_changed (the file's hash is not base_hash), 409 preview_changed (the edit no longer gives result_hash, for example a suggestion's evidence moved), 409 invalid_manifest (the file on disk does not validate), 409 index_running or index_locked (a rename while the project is being indexed); 413; 415; 422 invalid_manifest (apply of an invalid result). A refused edit leaves the file untouched; edits are serialised.

Try it endpoints (T029)

The "try it" proxy sends a request to a running instance of the API on the user's behalf, through internal/egress (ADR 0040, ADR 0081). Claim contract: docs/contract/claims/try-it.md rows TI-*; environments are configured in graphvein.yaml or the project manifest (configuration: Try it). The browser never sends a URL: it names an environment, a stored route and one of its path keys, and values; the server builds the URL, applies the guardrails and answers with the upstream response as data.

Every POST below passes the checks of every state-changing POST (Host, Sec-Fetch-Site, Origin, http.CrossOriginProtection), then needs a loopback peer (403 not_loopback), this server process's session token in X-Graphvein-Token (403 token_required; the token is in the environments listing), Content-Type: application/json (415) and one JSON object of the documented fields (400 bad_request for an unknown field, a duplicate key; a body over 2 MiB, 96 MiB for prepare and send: 413 too_large). In project mode every request names the member in repository (query parameter for GET, body field for POST; optional with one member, else 400 repository_required). Session state (selection, acknowledgements, grants, typed auth values, confirmations) is held in server memory only, per member, and bound to the environment as its files describe it now (origin, base path, label, auth): when a file edit changes any of these, the environment is unselected and everything held for it is dropped. Where a request cannot be proven safe but the user may have a reason to send it (an untrusted certificate, a path that is not the operation's, a missing auth variable, a redirect to another origin), the answer offers a user-confirmed option: an edit of the environment through the guarded edit below, or a one-time confirmation bound to the exact request. Some error answers carry error.details (documented with the code).

GET /api/v0/tryit/environments[?repository=] lists the environments of the repository (project mode: the manifest's environments with a base URL for the member, then the member's own):

{"api_version": 0, "repository": "api", "token": "…",
 "selected": "repository:local",
 "environments": [{"id": "repository:local", "name": "local", "label": "local",
   "production": false, "source": "repository", "file": "graphvein.yaml", "line": 4,
   "base_url": "http://127.0.0.1:8000/api", "origin": "http://127.0.0.1:8000",
   "auth": {"header": "Authorization", "env": "API_TOKEN", "env_set": true,
            "prefix": "Bearer ", "session_value": false},
   "selected": true, "acknowledged": false, "remembered": false,
   "options": {"tls": {"pins": [{"origin": null, "sha256": "9595c84a…"}], "ca_file": null},
               "use_system_proxy": false,
               "limits": {"request_bytes": null, "response_bytes": 16777216, "timeout_seconds": null}},
   "effective_limits": {"request_bytes": 1048576, "response_bytes": 16777216, "timeout_seconds": 30}}],
 "files": [{"target": "repository", "file": "graphvein.yaml", "exists": true,
            "hash": "sha256:…", "writable": true}],
 "config_error": null,
 "limits": {"request_body_bytes": 1048576, "response_body_bytes": 4194304,
            "timeout_seconds": 30, "confirmation_ttl_seconds": 120},
 "limit_ceilings": {"request_bytes": 67108864, "response_bytes": 268435456, "timeout_seconds": 600}}

auth fields are null without auth; no value is ever listed. options are the environment's options as its file states them (tls null without pins or CA file; a limits entry null where the default applies; limits null when none is set); effective_limits are the limits a send uses; limits at the top are the defaults and limit_ceilings the highest values an environment may set. files gives the base_hash of an edit ("absent" for a file that does not exist); project mode adds {"target": "project", "file": "graphvein-project.yaml", …}; writable is false for a member without a checkout. config_error (project mode) says why a member's own graphvein.yaml was not read. An invalid file answers 409 invalid_config / invalid_manifest.

POST /api/v0/tryit/environments adds an environment typed in the UI (row TI-30), as the manifest edit does: preview, then apply.

{"repository": "api", "target": "repository", "base_hash": "sha256:… | absent",
 "environment": {"name": "staging", "label": "staging", "base_url": "https://staging.example.com",
                 "auth": {"header": "Authorization", "env": "STAGING_TOKEN", "prefix": "Bearer "}},
 "apply": false, "result_hash": ""}

target is repository (the repository's graphvein.yaml, created with version: 1 when absent) or project (the manifest: a new project environment with this member's base URL, or this member's base URL in an existing one, whose label and auth are kept: send neither). auth is optional and names a variable, never a value. The answer:

{"api_version": 0, "applied": false, "target": "repository", "file": "graphvein.yaml",
 "base_hash": "…", "result_hash": "sha256:…", "diff": "--- a/graphvein.yaml\n+++ …",
 "valid": true, "problems": [], "change": "adds environment staging (…) to graphvein.yaml of api",
 "environment": "repository:staging"}

With apply: true and the preview's result_hash the file is replaced atomically. Refusals: 409 file_changed (the file is not the one of base_hash), 409 preview_changed, 422 invalid_config (nothing written), 409 environment_exists, 409 no_checkout, 400 for an invalid name, label or URL. The file is re-read on every request, so the new environment is listed and selectable at once; nothing typed is dialable before it is written.

The same endpoint changes the options of an existing environment (row TI-48) when the request carries options instead of environment:

{"repository": "api", "target": "repository", "base_hash": "sha256:…",
 "options": {"name": "dev",
             "tls": {"pins": [{"origin": null, "sha256": "9595c84a…"}], "ca_file": "certs/rootCA.pem"},
             "use_system_proxy": false,
             "limits": {"request_bytes": null, "response_bytes": 16777216, "timeout_seconds": 120}},
 "apply": false, "result_hash": ""}

tls, use_system_proxy and limits replace the environment's keys as a whole: tls: null (or no pins and no ca_file), false and a null limit remove them. A pin's origin is optional in a repository environment (it has one origin) and required in a project environment (one of its base URLs' origins): a pin is accepted only for its origin. Fingerprints are accepted with a sha256: prefix, colons and in upper case, and written as 64 lower-case hex digits; limits must be 1 to their ceiling. The answer, preview and apply are those of adding an environment (change reads "sets the try-it options of environment dev in graphvein.yaml"); 400 edit_refused when the file has no such environment. With target: "project" the manifest's project environment is changed, for every member. A change of tls or use_system_proxy (or of the CA file's content) changes the environment's identity: it must be selected (and acknowledged, for production) again.

GET /api/v0/tryit/suggestions[?repository=] lists base URL candidates (rows TI-31..TI-41), never used until the user picks one and the edit above writes it:

{"api_version": 0, "repository": "api",
 "notice": "suggested, not used until you pick one; …",
 "suggestions": [{"url": "http://127.0.0.1:8002", "source_kind": "compose_published_port",
   "row": "TI-31", "file": "docker-compose.yml", "line": 2,
   "reason": "Compose service api publishes container port 8000 on port 8002 of this machine"}]}

source_kind is one of compose_published_port, traefik_router, openapi_server, frontend_env (project mode), listen_call, uvicorn_run, go_listen, package_json_script, procfile, dockerfile_expose, framework_default (file and line null), in that order.

POST /api/v0/tryit/select records the UI's environment switch: {"repository", "environment": "<id>", "acknowledge_production": false} (an empty environment selects none). Selecting another environment (or "", none) revokes every production acknowledgement, every "don't ask again" grant and every pending confirmation. A production environment (label production or prod) needs acknowledge_production: true once per selection before any send (the UI's dialog). Answer: {"api_version", "selected", "production", "acknowledged", "acknowledgement_required", "remembered"}.

POST /api/v0/tryit/auth holds an auth value typed for this server session: {"repository", "environment", "header": "", "value": "…"} (header defaults to the environment's auth.header, else Authorization), or {"repository", "environment", "clear": true}. The value is kept in memory only, wins over the environment variable, is never written, logged or returned: the answer is {"api_version", "environment", "header", "session_value"}.

POST /api/v0/tryit/prepare and POST /api/v0/tryit/send take the same request:

{"repository": "api", "environment": "repository:local",
 "route": "route:app/main.py#POST%20%2Fitems%2F", "path": "/items/", "method": "POST",
 "path_values": {"id": "42"}, "free_form": false, "query": [{"name": "q", "value": "x"}],
 "headers": [{"name": "X-Trace", "value": "1"}],
 "body": "{\"name\": \"a\"}", "content_type": "application/json", "multipart": null,
 "send_without_auth": false, "confirmation": "", "remember": false}

route is the stored route identity and path one of its path keys (the template, with the served trailing slash), exactly as the API section lists them; method must equal the route's (400 path_mismatch, method_mismatch otherwise).

prepare sends nothing and answers the exact request:

{"api_version": 0, "environment": "repository:local", "label": "local", "production": false,
 "method": "POST", "url": "http://127.0.0.1:8000/items/", "headers": ["X-Trace", "Content-Type"],
 "free_form": false, "auth_header": "Authorization", "auth_source": "env",
 "auth_missing": null, "send_without_auth": false, "body_bytes": 13, "body_sha256": "…",
 "multipart": null,
 "limits": {"request_bytes": 1048576, "response_bytes": 4194304, "timeout_seconds": 30},
 "proxy": null, "proxy_cleartext": false,
 "confirmation_required": true, "confirmation_reasons": ["method"],
 "confirmation": "…", "expires_at": "2026-11-20T10:02:00Z",
 "acknowledgement_required": false, "selected": true}

auth_missing is {"header": "X-Api-Key", "env": "API_KEY"} when the variable is not set; multipart lists {"name", "filename", "content_type", "bytes"} per part (never content); proxy is "http://proxy.example:3128" (scheme, host and port, never user info) when the environment uses the system proxy, and proxy_cleartext is true when the environment is http://: the proxy then sees the whole request, headers and auth value included, in clear. confirmation_reasons are method (not GET or HEAD), method_override (a GET or HEAD with X-HTTP-Method-Override, X-HTTP-Method, X-Method-Override or a _method query parameter), body_on_get_or_head (a GET or HEAD with a body or content type) and free_form_path. confirmation is null when none is needed, or while auth_missing is set without send_without_auth.

send sends it, only to the selected environment (409 environment_not_selected), after the production acknowledgement (409 production_acknowledgement_required), and, when prepare says a confirmation is required, with confirmation set to prepare's id for exactly this request (one use, 120 s) or, except for a free-form path, after a grant (409 confirmation_required). With a valid confirmation, remember: true grants the environment until the UI selects another one. The answer:

{"api_version": 0, "environment": "repository:local", "method": "POST",
 "url": "http://127.0.0.1:8000/items/", "status": 201, "status_text": "Created",
 "headers": [{"name": "Set-Cookie", "value": "[redacted]"}],
 "body": "{…}", "body_encoding": "text", "body_bytes": 42, "truncated": false, "truncated_reason": null,
 "truncated_limit": null, "redirect": null, "redirect_follow": null, "duration_ms": 12, "remembered": false}

A non-text body is the hex of its first 4 KiB (body_encoding: "hex"). truncated_reason is "size" (the response limit), "timeout" (the time limit cut the body after the status arrived; the status is the one received) or "read_error"; truncated_limit then names the limit: {"limit": "response_bytes", "value": 4194304, "ceiling": 268435456, "hint": "raise limits.response_bytes of the environment (at most 268435456) through the environment edit"}.

Redirects are never followed automatically: redirect holds the Location, and for 301, 302, 303, 307 and 308 with an http(s) target redirect_follow says how to follow it once (row TI-46):

"redirect_follow": {"url": "https://login.example.com/start?next=a", "origin": "https://login.example.com",
  "same_origin": false, "method": "GET", "keeps_body": false,
  "environment": null, "path": "/start", "query": [{"name": "next", "value": "a"}],
  "suggested_environment": {"name": "login.example.com-443", "base_url": "https://login.example.com"}}

method is what a browser would use (303, and POST on 301 and 302, become GET; 307 and 308 keep the method and, keeps_body, the body). environment is the environment of this repository whose base URL holds the target, with path relative to its base URL; when none does, suggested_environment proposes adding the target's origin through the guarded edit above (path is then relative to the origin). The user selects that environment and sends the target as a free-form request (free_form: true, path, query), with its own confirmation and that environment's production rules.

Sec-WebSocket-* headers: 400 not_supported ("WebSocket endpoints are not supported in try-it yet"); HTTP2-Settings: 400 not_supported.

Upstream failures: 502 destination_blocked, 502 upstream_error, 502 upstream_tls_error (a TLS failure other than the certificate), 504 upstream_timeout (details: the timeout_seconds limit); 429 too_many_requests beyond 4 sends at once; 413 body_too_large (details: the request_bytes limit); 409 ca_file_error (the environment's tls.ca_file is missing, not a regular file, larger than 4 MiB, unreadable within the environment's time limit or has no PEM certificate); 409 invalid_proxy (the environment uses the system proxy and its variable is not a usable proxy URL); 502 proxy_tls_error (TLS with an https proxy failed: its certificate is checked against the system roots for the proxy's own name, never with the environment's pins or CA file).

A certificate that is neither trusted nor pinned answers 502 upstream_certificate_untrusted, or upstream_certificate_changed when the environment pins other certificates (rows TI-29, TI-17), with:

{"error": {"code": "upstream_certificate_untrusted", "message": "…",
  "details": {"environment": "repository:dev", "origin": "https://127.0.0.1:8443",
    "certificate": {"subject": "CN=dev box", "issuer": "CN=dev box", "sans": ["localhost", "127.0.0.1"],
                    "not_before": "2026-11-01T00:00:00Z", "not_after": "2027-11-01T00:00:00Z",
                    "sha256": "9595c84a…", "self_signed": true},
    "reason": "x509: certificate signed by unknown authority", "pinned_sha256": []}}}

sha256 is the SHA-256 of the leaf certificate's DER, lower-case hex (what browsers and openssl x509 -fingerprint -sha256 show, without colons). To trust it the UI writes it into the environment's tls pins with the options edit (pinned_sha256 lists the pins of this origin); a pinned certificate is accepted for that environment's origin whatever its names, issuer or validity. A changed certificate is never accepted silently.

Limits: body sent 1 MiB, response read 4 MiB, 30 s per exchange unless the environment raises them (ceilings 64 MiB, 256 MiB, 600 s), 10 s per dial. The log records environment, label, method, path template ((free-form) for a free-form path), status, sizes and duration, never values or bodies; nothing is stored.

Report a problem with this pageSource: docs/cli/serve.md