List typed session-ledger sessions for the authenticated organization.
Keyset-paginated index of admitted ledger sessions, newest first. Scoped to the authenticated organization and clipped to the calling credential project fence. Filters: projectId, graphId, phase. The response carries `nextCursor` only when more rows exist; pass it back verbatim as `cursor`. This is an index for recovering a sessionId - the canonical SessionRef, receipt bundle and event replay stay on the per-session routes.
AuthorizationBearer <rsk_live_*>Rensei API key presented as Authorization: Bearer rsk_live_. Required API-key scopes are recorded per operation in x-rensei-required-scopes.
projectId?string1 <= length <= 256graphId?string1 <= length <= 256phase?string"admitted""queued""claimed""adapting""spawn_authorized""running""cancelling""completed""failed""stopped""cancelled""timed_out"limit?integer1 <= value <= 200cursor?string1 <= length <= 2048One page of ledger sessions.
application/json- response
ledgerVersion*stringsessions*array<>items <= 200nextCursor?curl -X GET 'https://app.rensei.ai/api/cli/sessions'{ "ledgerVersion": "rensei.session-ledger/v1alpha1", "sessions": [ { "sessionId": "string", "graphId": "string", "projectId": "string", "phase": "admitted", "mode": "autonomous", "stateVersion": 1, "attempt": 1, "ingress": "string", "semanticOperationId": "string", "admissionReceiptId": "string", "claimReceiptId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ], "nextCursor": { "createdAt": "2019-08-24T14:15:22Z", "sessionId": "string" }}Compare-and-set write of one structured program state key.
Latest-wins per key with history: every write appends one versioned row. Omit expectedVersion (or null) to create the key; pass a version to require the current version to match. A mismatch is refused with 409, never merged. A program holds at most 1,000 distinct keys: creating one more is refused with 422 (existing keys keep writing; state is append-only, so keys are never removed). Queue actions append, claim and complete operate on the queue key with an explicit expectedVersion (null creates it). Append requires id, projectId and title; claim and complete require id. claimedBy is the server-derived principal ref. Non-open claims and completion by another principal are refused with typed codes. Every queue mutation appends a history row; queues over 16 KiB are refused. The author is derived from the authenticating principal and is never read from the body.
Request acknowledged cancellation of one admitted session.
Creates a durable cancellation receipt before any cancel side effect. `acknowledged` means the owning authority committed the terminal transition; delivery alone never reaches it, and a reaper never forges `cancelled`.