Skip to main content

Module types

Module types 

Source
Expand description

Types used as operation parameters and responses.

Modules§

error
Error types.

Structs§

ActorView
Resolved actor identity for a turn. Lookup happens once on the server against the document’s meta.actors block; turns reference the actor by u32 index into the projection’s actors array.
ApiErrorResponse
Standard error response envelope for all 4xx/5xx responses.
AppendStepsResponse
AppendStepsResponse
ChatCursor
Pagination cursor for fetching older turns. Reserved for future ?before=<step_id> requests; currently every projection returns the full chain in one shot.
ChatProjection
Top-level chat-projection response. Densely-indexed (u32 IDs into turns / actors) so JSON parsing is cheap and the wire shape avoids duplicating actor strings on every turn.
ChatTurn
One linearized turn along the HEAD-ancestor chain. Already classified, optionally pre-rendered to HTML, with tool invocations inlined — the renderer drops in text_html and renders no further.
CliGrantResponse
Response body for POST /api/v1/auth/cli/request-grant.
CreateRepoBody
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).
GraphDocumentResponse
Wraps a Graph with its path count, reconstructed multi-path document, and the URL. Used by endpoints that promise the full document on the wire.
GraphResponse
Graph plus the absolute URL clients should link to.
GraphSummaryResponse
Wraps a Graph with its path count plus the URL. Used by listing endpoints.
RedeemBody
Request body for POST /api/v1/auth/cli/redeem.
RedeemResponse
Response body for POST /api/v1/auth/cli/redeem.
Repo
A repository — a named workspace of paths and graphs owned by a single user. name is unique per owner and serves as the URL segment in /{owner}/{name} and nested resources.
RepoVisibilityBody
Body for PATCH /api/v1/u/{owner}/repos/{repo}/visibility.
SessionSummary
One entry of the session list returned by GET /api/v1/auth/sessions.
ToolDiff
Pre-split diff payload — picked from the first non-empty change[k].raw on a structural step. Lines are pre-split so the renderer doesn’t repeat the work.
ToolInvocation
A tool.invoke step spliced inline next to its parent assistant turn. Saves the client a second pass over the path’s step graph.
ToolpathDocument
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 optional meta.
TracePath
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).
TracePathDocumentResponse
Wraps a TracePath with its step count, reconstructed Graph document, and the URL. Used by endpoints that promise the full document (single-path GET, append-steps response).
TracePathResponse
TracePath plus the absolute URL clients should link to.
TracePathSummaryResponse
Wraps a TracePath with its step count plus the URL. Used by listing endpoints and any single-row reads that surface the count.
UpdateGraphPathBody
UpdateGraphPathBody
UpdateGraphVisibilityBody
Body for PATCH /api/v1/u/{owner}/repos/{repo}/graphs/{id}/visibility.
UpdateProfileBody
Body for PUT /api/v1/u/me.
UpdateRepoBody
Request body for PUT /api/v1/u/{owner}/repos/{repo}.
UploadGraphBody
Request body for POST /api/v1/u/{owner}/repos/{repo}/graphs.
User
A registered Pathbase account. email is optional because GitHub OAuth users can have a private email; CLI / API consumers see the caller’s own email via /u/me but never another user’s.

Enums§

ApiErrorCode
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 the code field of ApiErrorResponse.
ChatTurnKind
Pre-classified turn kind. Server-side classification follows the precedence rules in packages/frontend/src/classify.ts; the client renders verbatim without re-deriving.
RepoVisibilityInput
Write-side narrowing of Visibility for repo bodies. The repo read shape (Repo.visibility) still uses the full three-state enum — a GET on the seeded pathstash repo returns "unlisted" like always. This type only constrains what the API will accept from a client: Unlisted is system-pinned, users can’t enter or leave it through the API, so it doesn’t appear in POST /repos or PATCH .../visibility bodies. Generated clients see only public | private on inputs and the Unlisted write is unreachable by construction. Graph and path bodies use the full Visibility enum; all three values are legal there.
Visibility
The visibility state of a Repo, TracePath, or Graph. Used uniformly across the three entities at the storage and wire layers.