Expand description
Types used as operation parameters and responses.
Modules§
- error
- Error types.
Structs§
- Actor
View - Resolved actor identity for a turn. Lookup happens once on the
server against the document’s
meta.actorsblock; turns reference the actor byu32index into the projection’sactorsarray. - ApiError
Response - Standard error response envelope for all 4xx/5xx responses.
- Append
Steps Response AppendStepsResponse- Chat
Cursor - Pagination cursor for fetching older turns. Reserved for future
?before=<step_id>requests; currently every projection returns the full chain in one shot. - Chat
Projection - Top-level chat-projection response. Densely-indexed (
u32IDs intoturns/actors) so JSON parsing is cheap and the wire shape avoids duplicating actor strings on every turn. - Chat
Turn - One linearized turn along the HEAD-ancestor chain. Already
classified, optionally pre-rendered to HTML, with tool invocations
inlined — the renderer drops in
text_htmland renders no further. - CliGrant
Response - Response body for
POST /api/v1/auth/cli/request-grant. - Create
Repo Body - Request body for
POST /api/v1/u/{owner}/repos. - Graph
- A computation graph — a named ordered collection of paths within
a repo. Pure storage shape — the columns on
graphs. Derived properties (path count, reconstructed document) live on the response wrappers that need them (GraphSummary,GraphDocument). - Graph
Document Response - Wraps a
Graphwith its path count, reconstructed multi-path document, and the URL. Used by endpoints that promise the full document on the wire. - Graph
Response Graphplus the absolute URL clients should link to.- Graph
Summary Response - Wraps a
Graphwith its path count plus the URL. Used by listing endpoints. - Redeem
Body - Request body for
POST /api/v1/auth/cli/redeem. - Redeem
Response - Response body for
POST /api/v1/auth/cli/redeem. - Repo
- A repository — a named workspace of paths and graphs owned by a
single user.
nameis unique per owner and serves as the URL segment in/{owner}/{name}and nested resources. - Repo
Visibility Body - Body for
PATCH /api/v1/u/{owner}/repos/{repo}/visibility. - Session
Summary - One entry of the session list returned by
GET /api/v1/auth/sessions. - Tool
Diff - Pre-split diff payload — picked from the first non-empty
change[k].rawon a structural step. Lines are pre-split so the renderer doesn’t repeat the work. - Tool
Invocation - A
tool.invokestep spliced inline next to its parent assistant turn. Saves the client a second pass over the path’s step graph. - Toolpath
Document - A toolpath v1 Graph document. See https://github.com/empathic/toolpath
for the full schema; the wire format is JSON with top-level fields
graph,paths, and optionalmeta. - Trace
Path - A single agent trace path within a repo. Pure storage shape — the
columns on
paths. Derived properties (step count, reconstructed document) live on the response wrappers that need them (TracePathSummary,TracePathDocument). - Trace
Path Document Response - Wraps a
TracePathwith its step count, reconstructed Graph document, and the URL. Used by endpoints that promise the full document (single-path GET, append-steps response). - Trace
Path Response TracePathplus the absolute URL clients should link to.- Trace
Path Summary Response - Wraps a
TracePathwith its step count plus the URL. Used by listing endpoints and any single-row reads that surface the count. - Update
Graph Path Body UpdateGraphPathBody- Update
Graph Visibility Body - Body for
PATCH /api/v1/u/{owner}/repos/{repo}/graphs/{id}/visibility. - Update
Profile Body - Body for
PUT /api/v1/u/me. - Update
Repo Body - Request body for
PUT /api/v1/u/{owner}/repos/{repo}. - Upload
Graph Body - Request body for
POST /api/v1/u/{owner}/repos/{repo}/graphs. - User
- A registered Pathbase account.
emailis optional because GitHub OAuth users can have a private email; CLI / API consumers see the caller’s own email via/u/mebut never another user’s.
Enums§
- ApiError
Code - Closed set of error codes the API can emit. Renders as a snake_case
string on the wire (
not_found,unauthorized, …) and is declared as an OpenAPI enum so generated clients can switch on it exhaustively. Add a variant here, never a free-form string in thecodefield ofApiErrorResponse. - Chat
Turn Kind - Pre-classified turn kind. Server-side classification follows the
precedence rules in
packages/frontend/src/classify.ts; the client renders verbatim without re-deriving. - Repo
Visibility Input - Write-side narrowing of
Visibilityfor repo bodies. The repo read shape (Repo.visibility) still uses the full three-state enum — aGETon the seededpathstashrepo returns"unlisted"like always. This type only constrains what the API will accept from a client:Unlistedis system-pinned, users can’t enter or leave it through the API, so it doesn’t appear inPOST /reposorPATCH .../visibilitybodies. Generated clients see onlypublic | privateon inputs and theUnlistedwrite is unreachable by construction. Graph and path bodies use the fullVisibilityenum; all three values are legal there. - Visibility
- The visibility state of a
Repo,TracePath, orGraph. Used uniformly across the three entities at the storage and wire layers.