Skip to content
Docs

Command palette

Jump to a page or view, or find a todo by name.

Changelog

api

Authorized operations and shared contracts: responsibilities, supported exports and extension points.

Markdown

Purpose

The server defines oRPC procedures, domain routers, the assistant/MCP catalog and scheduled jobs. Public schema subpaths validate wire data; client exports only the router client type.

Public exports

SubpathTarget
./client./src/client.ts
./rpc-scope./src/rpc-scope.ts
./context./src/context.ts
./routers/index./src/routers/index.ts
./routers/admin.schema./src/routers/admin.schema.ts
./routers/audit.schema./src/routers/audit.schema.ts
./routers/flags.schema./src/routers/flags.schema.ts
./routers/todo.schema./src/routers/todo.schema.ts
./routers/proposals.schema./src/routers/proposals.schema.ts
./routers/integrations.schema./src/routers/integrations.schema.ts
./routers/billing.schema./src/routers/billing.schema.ts
./billing-plans./src/lib/billing-plans.ts
./billing/http./src/billing/http.ts
./billing/web-http./src/billing/web-http.ts
./mcp/server./src/mcp/server.ts
./mcp/context./src/mcp/context.ts
./mcp/protocol./src/mcp/protocol.ts
./mcp/guard./src/mcp/guard.ts
./webhooks/events./src/webhooks/events.ts
./jobs/run./src/jobs/run.ts
./uploads/workflow./src/uploads/workflow.ts
./routers/notifications.schema./src/routers/notifications.schema.ts
./push-messages./src/lib/push-messages.ts
./routers/imports.schema./src/routers/imports.schema.ts
./ai/http./src/ai/http.ts
./routers/assistant.schema./src/routers/assistant.schema.ts
./ai/catalog.schema./src/ai/catalog.schema.ts
./routers/documents.schema./src/routers/documents.schema.ts
./documents/lifecycle-plugin./src/documents/lifecycle-plugin.ts

These paths come from packages/api/package.json. A . entry is the package root. Conditional targets distinguish platform or type resolution; consumers should import the subpath, not its source file.

How to extend

Add the operation to a feature router and register it in the root router. Keep authorization in the procedure and resource scope in the query. Add a specific schema export when another package needs the contract. For AI/MCP tools, extend the single catalog after reading ADR-0007.

Read the authorized operations and shared contracts guide for the full flow.

Key files

Edit on GitHubDocumentation is in English.