Docs assistant

Searches these docs locally; a configured answer service can generate responses.

Ask about this page or the wider Carina docs. Try: “How do I roll back a patch?”

llms.txt

Skip to content

Markdown

JSON-RPC reference

Curated method reference for the local JSON-RPC control plane.

Local clients speak JSON-RPC 2.0 against the daemon socket (~/.carina/daemon.sock) or stdio.

Authoritative registry: protocol/jsonrpc/methods.json.
Schemas: protocol/schemas/.
Narrative source: docs/rpc-api.md.

Create a session bound to a workspace and permission profile.

Params

workspace_rootstringrequiredbody

Absolute workspace path the session is bound to.

profilestringbodydefault safe-edit

Capability profile id (e.g. safe-edit).

Result

session_idstringrequired

Opaque session identifier.

workspace_idstringrequired

Bound workspace id.

profilestringrequired

Effective capability profile.

MethodPurpose
runtime.initializeClient identity + projection version negotiation
runtime.capabilitiesAdvertised runtime capabilities
gateway.helloContract snapshot (role, scopes, features, method catalog)
gateway.methodsLive method catalog with scope / remote / stream flags
gateway.token.issueLocal-only scoped token issuer (signing key required)
daemon.status / metrics / doctorProcess health
daemon.remote.disableRemote kill-switch
daemon.reloadReload configuration
MethodPurpose
session.create / get / list / closeLifecycle
session.pause / resumeSuspend / continue
session.replay / items / reviewHistory and projections
session.events.streamLive event notifications
execution.start / cancel / statusTask control
governance.action.approve / denyResolve approvals
MethodPurpose
workspace.treeFile tree via carina-scan
workspace.searchStructured search via carina-grep
workspace.file.getRead a clean relative UTF-8 file up to 1 MiB (FileRead)
workspace.diffTracked/untracked changes (capped; binary omitted)
workspace.patch.propose / apply / rollbackTransactional patches
worktree.create / list / enter / …Isolated worktree lifecycle
MethodPurpose
memory.listList entries for target=memory or target=user
memory.contextFenced recalled-memory block for the session
memory.statusLocal authority, external recall health, identity scope
memory.writeadd/replace/remove/batch via MemoryWrite capability
memory.projection.authorize / retry / reseedOptional HMS projection control

memory.write is local-only and control-plane-write. Built-in policy defaults MemoryWrite to requires_approval. Audit records target/scope/action, operation count, and content hash — not raw memory text.

worker.register · worker.heartbeat · worker.list · worker.revoke · work.poll / renew / report · backpressure.report / status

worker.register returns worker_id + worker_credential pair once. The daemon stores only the credential hash. Every successful work.poll returns a lease_generation fencing token that must be echoed on renew/report.

MethodScopePurpose
context.statusreadConfigured and effective local engine state
context.doctorreadHealth probe used by daemon.doctor
context.statsreadCompression counters
context.compresswriteDiagnostic compression (not agent transcript path)

Carina does not bundle or start an external compression runtime. Auto mode resolves to the local no-op implementation.

  • workspace.diff — Git with locks/fsmonitor/external diff/textconv disabled; 256 KiB per textual diff; 1 MiB response cap
  • mcp.inventory — public MCP server names, tool names, prompt counts, connection health (no process args/env/schemas)
request.json
// response
{"jsonrpc":"2.0","id":1,
"result":{"session_id":"sess_01J...","workspace_id":"ws_01J...","profile":"safe-edit"}}
// event notification
{"jsonrpc":"2.0","method":"event",
"params":{"event_id":"evt_...","session_id":"sess_...","type":"CommandStarted",
"timestamp":"2026-07-03T12:00:00Z","payload":{"command":"npm test"},
"permission_decision_id":"perm_..."}}

Was this page helpful?

One vote per page is recorded during this session.