Skip to content

Variable: SessionStorageNamespace

Makaio Framework


Makaio Framework / contracts / SessionStorageNamespace

const SessionStorageNamespace: StorageNamespace<"session", SubjectRecordFromSchemaRecord<{ delete: { request: ZodObject<{ sessionId: ZodString; }, $strip>; response: ZodObject<{ success: ZodBoolean; }, $strip>; }; get: { request: ZodObject<{ sessionId: ZodString; }, $strip>; response: ZodObject<{ session: ZodNullable<ZodObject<{ adapterId: ZodOptional<ZodString>; adapterName: ZodOptional<ZodString>; adapterSessionId: ZodOptional<ZodString>; agents: ZodArray<ZodObject<…, …>>; approvalPolicyOverride: ZodOptional<ZodNullable<…>>; branchKind: ZodOptional<ZodEnum<…>>; clientAccountId: ZodOptional<ZodString>; clientId: ZodOptional<ZodString>; createdAt: ZodNumber; executionTargetId: ZodOptional<ZodString>; forkPointMessageId: ZodOptional<ZodString>; forkTransforms: ZodOptional<ZodObject<…, …>>; isImported: ZodOptional<ZodBoolean>; isOrchestrated: ZodOptional<ZodBoolean>; lastActivityAt: ZodNumber; lastClientIdentityObservation: ZodOptional<ZodObject<…, …>>; leadAgentId: ZodOptional<ZodString>; parentSessionId: ZodOptional<ZodString>; rootSessionId: ZodOptional<ZodString>; sessionId: ZodString; spawningToolCallId: ZodOptional<ZodString>; status: ZodEnum<{ active: …; archived: …; closed: …; discovered: …; }>; summary: ZodOptional<ZodString>; summaryUpdatedAt: ZodOptional<ZodNumber>; targetWorkingDirectory: ZodOptional<ZodString>; title: ZodOptional<ZodString>; }, $strip>>; }, $strip>; }; getByAdapterSessionId: { request: ZodObject<{ adapterSessionId: ZodString; }, $strip>; response: ZodObject<{ session: ZodNullable<ZodObject<{ adapterId: ZodOptional<ZodString>; adapterName: ZodOptional<ZodString>; adapterSessionId: ZodOptional<ZodString>; agents: ZodArray<ZodObject<…, …>>; approvalPolicyOverride: ZodOptional<ZodNullable<…>>; branchKind: ZodOptional<ZodEnum<…>>; clientAccountId: ZodOptional<ZodString>; clientId: ZodOptional<ZodString>; createdAt: ZodNumber; executionTargetId: ZodOptional<ZodString>; forkPointMessageId: ZodOptional<ZodString>; forkTransforms: ZodOptional<ZodObject<…, …>>; isImported: ZodOptional<ZodBoolean>; isOrchestrated: ZodOptional<ZodBoolean>; lastActivityAt: ZodNumber; lastClientIdentityObservation: ZodOptional<ZodObject<…, …>>; leadAgentId: ZodOptional<ZodString>; parentSessionId: ZodOptional<ZodString>; rootSessionId: ZodOptional<ZodString>; sessionId: ZodString; spawningToolCallId: ZodOptional<ZodString>; status: ZodEnum<{ active: …; archived: …; closed: …; discovered: …; }>; summary: ZodOptional<ZodString>; summaryUpdatedAt: ZodOptional<ZodNumber>; targetWorkingDirectory: ZodOptional<ZodString>; title: ZodOptional<ZodString>; }, $strip>>; }, $strip>; }; getChildren: { request: ZodObject<{ sessionId: ZodString; }, $strip>; response: ZodObject<{ children: ZodArray<ZodObject<{ branchKind: ZodNullable<ZodEnum<…>>; forkPointMessageId: ZodNullable<ZodString>; hasChildren: ZodBoolean; messageCount: ZodNumber; sessionId: ZodString; spawningToolCallId: ZodOptional<ZodString>; title: ZodNullable<ZodString>; }, $strip>>; }, $strip>; }; getStatusCounts: { request: ZodObject<{ }, $strip>; response: ZodObject<{ active: ZodNumber; all: ZodNumber; archived: ZodNumber; closed: ZodNumber; discovered: ZodNumber; }, $strip>; }; list: { request: ZodObject<{ executionTargetId: ZodOptional<ZodString>; includePreview: ZodOptional<ZodBoolean>; limit: ZodOptional<ZodNumber>; offset: ZodOptional<ZodNumber>; status: ZodOptional<ZodEnum<{ active: "active"; all: "all"; archived: "archived"; closed: "closed"; discovered: "discovered"; }>>; }, $strip>; response: ZodObject<{ sessions: ZodArray<ZodObject<{ adapterId: ZodOptional<ZodString>; adapterName: ZodOptional<ZodString>; adapterSessionId: ZodOptional<ZodString>; agents: ZodArray<ZodObject<…, …>>; approvalPolicyOverride: ZodOptional<ZodNullable<…>>; branchKind: ZodOptional<ZodEnum<…>>; clientAccountId: ZodOptional<ZodString>; clientId: ZodOptional<ZodString>; createdAt: ZodNumber; executionTargetId: ZodOptional<ZodString>; forkPointMessageId: ZodOptional<ZodString>; forkTransforms: ZodOptional<ZodObject<…, …>>; isImported: ZodOptional<ZodBoolean>; isOrchestrated: ZodOptional<ZodBoolean>; lastActivityAt: ZodNumber; lastClientIdentityObservation: ZodOptional<ZodObject<…, …>>; leadAgentId: ZodOptional<ZodString>; parentSessionId: ZodOptional<ZodString>; preview: ZodOptional<ZodObject<…, …>>; rootSessionId: ZodOptional<ZodString>; sessionId: ZodString; spawningToolCallId: ZodOptional<ZodString>; status: ZodEnum<{ active: …; archived: …; closed: …; discovered: …; }>; summary: ZodOptional<ZodString>; summaryUpdatedAt: ZodOptional<ZodNumber>; targetWorkingDirectory: ZodOptional<ZodString>; title: ZodOptional<ZodString>; }, $strip>>; total: ZodNumber; }, $strip>; }; search: { request: ZodObject<{ isImported: ZodOptional<ZodBoolean>; limit: ZodOptional<ZodNumber>; query: ZodString; status: ZodOptional<ZodEnum<{ active: "active"; all: "all"; archived: "archived"; closed: "closed"; discovered: "discovered"; }>>; }, $strip>; response: ZodObject<{ sessions: ZodArray<ZodObject<{ adapterId: ZodOptional<ZodString>; adapterName: ZodOptional<ZodString>; adapterSessionId: ZodOptional<ZodString>; agents: ZodArray<ZodObject<…, …>>; approvalPolicyOverride: ZodOptional<ZodNullable<…>>; branchKind: ZodOptional<ZodEnum<…>>; clientAccountId: ZodOptional<ZodString>; clientId: ZodOptional<ZodString>; createdAt: ZodNumber; executionTargetId: ZodOptional<ZodString>; forkPointMessageId: ZodOptional<ZodString>; forkTransforms: ZodOptional<ZodObject<…, …>>; isImported: ZodOptional<ZodBoolean>; isOrchestrated: ZodOptional<ZodBoolean>; lastActivityAt: ZodNumber; lastClientIdentityObservation: ZodOptional<ZodObject<…, …>>; leadAgentId: ZodOptional<ZodString>; parentSessionId: ZodOptional<ZodString>; preview: ZodObject<{ firstUserMessage: …; messageCount: …; }, $strip>; rootSessionId: ZodOptional<ZodString>; sessionId: ZodString; spawningToolCallId: ZodOptional<ZodString>; status: ZodEnum<{ active: …; archived: …; closed: …; discovered: …; }>; summary: ZodOptional<ZodString>; summaryUpdatedAt: ZodOptional<ZodNumber>; targetWorkingDirectory: ZodOptional<ZodString>; title: ZodOptional<ZodString>; }, $strip>>; total: ZodNumber; }, $strip>; }; set: { request: ZodObject<{ ifAbsent: ZodOptional<ZodBoolean>; session: ZodObject<{ adapterId: ZodOptional<ZodString>; adapterName: ZodOptional<ZodString>; adapterSessionId: ZodOptional<ZodString>; agents: ZodArray<ZodObject<{ adapterId: …; adapterName: …; adapterSessionId: …; agentId: …; clientId: …; compressionMode: …; createdAt: …; cwd: …; harnessId: …; lastActivityAt: …; model: …; personaId: …; profileId: …; providerConfigId: …; role: …; sessionId: …; status: …; }, $strip>>; approvalPolicyOverride: ZodOptional<ZodNullable<ZodEnum<…>>>; branchKind: ZodOptional<ZodEnum<{ aside: …; branch: …; compress: …; coordinator: …; fork: …; rewrite: …; subagent: …; }>>; clientAccountId: ZodOptional<ZodString>; clientId: ZodOptional<ZodString>; createdAt: ZodNumber; executionTargetId: ZodOptional<ZodString>; forkPointMessageId: ZodOptional<ZodString>; forkTransforms: ZodOptional<ZodObject<{ appliedPipeline: …; removedMessageIds: …; segments: …; }, $strip>>; isImported: ZodOptional<ZodBoolean>; isOrchestrated: ZodOptional<ZodBoolean>; lastActivityAt: ZodNumber; lastClientIdentityObservation: ZodOptional<ZodObject<{ clientId: …; kind: …; observedAt: …; payload: …; source: …; }, $strip>>; leadAgentId: ZodOptional<ZodString>; parentSessionId: ZodOptional<ZodString>; rootSessionId: ZodOptional<ZodString>; sessionId: ZodString; spawningToolCallId: ZodOptional<ZodString>; status: ZodEnum<{ active: "active"; archived: "archived"; closed: "closed"; discovered: "discovered"; }>; summary: ZodOptional<ZodString>; summaryUpdatedAt: ZodOptional<ZodNumber>; targetWorkingDirectory: ZodOptional<ZodString>; title: ZodOptional<ZodString>; }, $strip>; sessionId: ZodString; }, $strip>; response: ZodObject<{ clientAccountChanged: ZodOptional<ZodBoolean>; success: ZodBoolean; }, $strip>; }; update: { request: ZodObject<{ approvalPolicyOverride: ZodOptional<ZodNullable<ZodEnum<{ always-ask: "always-ask"; full-access: "full-access"; reject: "reject"; }>>>; branchKind: ZodOptional<ZodEnum<{ aside: "aside"; branch: "branch"; compress: "compress"; coordinator: "coordinator"; fork: "fork"; rewrite: "rewrite"; subagent: "subagent"; }>>; clientAccountId: ZodOptional<ZodString>; clientId: ZodOptional<ZodString>; createdAt: ZodOptional<ZodNumber>; executionTargetId: ZodOptional<ZodNullable<ZodString>>; forkPointMessageId: ZodOptional<ZodString>; isOrchestrated: ZodOptional<ZodBoolean>; lastActivityAt: ZodOptional<ZodNumber>; lastClientIdentityObservation: ZodOptional<ZodObject<{ clientId: ZodString; kind: ZodString; observedAt: ZodNumber; payload: ZodType<Record<…, …>, unknown, $ZodTypeInternals<…, …>>; source: ZodString; }, $strip>>; parentSessionId: ZodOptional<ZodString>; rootSessionId: ZodOptional<ZodString>; sessionId: ZodString; spawningToolCallId: ZodOptional<ZodNullable<ZodString>>; status: ZodOptional<ZodEnum<{ active: "active"; archived: "archived"; closed: "closed"; discovered: "discovered"; }>>; targetWorkingDirectory: ZodOptional<ZodString>; title: ZodOptional<ZodString>; }, $strip>; response: ZodObject<{ clientAccountChanged: ZodOptional<ZodBoolean>; success: ZodBoolean; }, $strip>; }; }>, {[key: string]: string | number | boolean | { clientId: string; kind: string; observedAt: number; payload: unknown; source: string; } | { adapterId?: string; adapterName?: string; adapterSessionId?: string; agents: object[]; approvalPolicyOverride?: "always-ask" | "reject" | "full-access" | null; branchKind?: "fork" | "branch" | "aside" | "subagent" | "compress" | "rewrite" | "coordinator"; clientAccountId?: string; clientId?: string; createdAt: number; executionTargetId?: string; forkPointMessageId?: string; forkTransforms?: { appliedPipeline?: object[]; removedMessageIds?: string[]; segments?: object[]; }; isImported?: boolean; isOrchestrated?: boolean; lastActivityAt: number; lastClientIdentityObservation?: { clientId: string; kind: string; observedAt: number; payload: unknown; source: string; }; leadAgentId?: string; parentSessionId?: string; rootSessionId?: string; sessionId: string; spawningToolCallId?: string; status: "active" | "closed" | "archived" | "discovered"; summary?: string; summaryUpdatedAt?: number; targetWorkingDirectory?: string; title?: string; } | null; }, StorageNamespaceExtensions, { delete: { request: ZodObject<{ sessionId: ZodString; }, $strip>; response: ZodObject<{ success: ZodBoolean; }, $strip>; }; get: { request: ZodObject<{ sessionId: ZodString; }, $strip>; response: ZodObject<{ session: ZodNullable<ZodObject<{ adapterId: ZodOptional<ZodString>; adapterName: ZodOptional<ZodString>; adapterSessionId: ZodOptional<ZodString>; agents: ZodArray<ZodObject<{ adapterId: …; adapterName: …; adapterSessionId: …; agentId: …; clientId: …; compressionMode: …; createdAt: …; cwd: …; harnessId: …; lastActivityAt: …; model: …; personaId: …; profileId: …; providerConfigId: …; role: …; sessionId: …; status: …; }, $strip>>; approvalPolicyOverride: ZodOptional<ZodNullable<ZodEnum<…>>>; branchKind: ZodOptional<ZodEnum<{ aside: …; branch: …; compress: …; coordinator: …; fork: …; rewrite: …; subagent: …; }>>; clientAccountId: ZodOptional<ZodString>; clientId: ZodOptional<ZodString>; createdAt: ZodNumber; executionTargetId: ZodOptional<ZodString>; forkPointMessageId: ZodOptional<ZodString>; forkTransforms: ZodOptional<ZodObject<{ appliedPipeline: …; removedMessageIds: …; segments: …; }, $strip>>; isImported: ZodOptional<ZodBoolean>; isOrchestrated: ZodOptional<ZodBoolean>; lastActivityAt: ZodNumber; lastClientIdentityObservation: ZodOptional<ZodObject<{ clientId: …; kind: …; observedAt: …; payload: …; source: …; }, $strip>>; leadAgentId: ZodOptional<ZodString>; parentSessionId: ZodOptional<ZodString>; rootSessionId: ZodOptional<ZodString>; sessionId: ZodString; spawningToolCallId: ZodOptional<ZodString>; status: ZodEnum<{ active: "active"; archived: "archived"; closed: "closed"; discovered: "discovered"; }>; summary: ZodOptional<ZodString>; summaryUpdatedAt: ZodOptional<ZodNumber>; targetWorkingDirectory: ZodOptional<ZodString>; title: ZodOptional<ZodString>; }, $strip>>; }, $strip>; }; getByAdapterSessionId: { request: ZodObject<{ adapterSessionId: ZodString; }, $strip>; response: ZodObject<{ session: ZodNullable<ZodObject<{ adapterId: ZodOptional<ZodString>; adapterName: ZodOptional<ZodString>; adapterSessionId: ZodOptional<ZodString>; agents: ZodArray<ZodObject<{ adapterId: …; adapterName: …; adapterSessionId: …; agentId: …; clientId: …; compressionMode: …; createdAt: …; cwd: …; harnessId: …; lastActivityAt: …; model: …; personaId: …; profileId: …; providerConfigId: …; role: …; sessionId: …; status: …; }, $strip>>; approvalPolicyOverride: ZodOptional<ZodNullable<ZodEnum<…>>>; branchKind: ZodOptional<ZodEnum<{ aside: …; branch: …; compress: …; coordinator: …; fork: …; rewrite: …; subagent: …; }>>; clientAccountId: ZodOptional<ZodString>; clientId: ZodOptional<ZodString>; createdAt: ZodNumber; executionTargetId: ZodOptional<ZodString>; forkPointMessageId: ZodOptional<ZodString>; forkTransforms: ZodOptional<ZodObject<{ appliedPipeline: …; removedMessageIds: …; segments: …; }, $strip>>; isImported: ZodOptional<ZodBoolean>; isOrchestrated: ZodOptional<ZodBoolean>; lastActivityAt: ZodNumber; lastClientIdentityObservation: ZodOptional<ZodObject<{ clientId: …; kind: …; observedAt: …; payload: …; source: …; }, $strip>>; leadAgentId: ZodOptional<ZodString>; parentSessionId: ZodOptional<ZodString>; rootSessionId: ZodOptional<ZodString>; sessionId: ZodString; spawningToolCallId: ZodOptional<ZodString>; status: ZodEnum<{ active: "active"; archived: "archived"; closed: "closed"; discovered: "discovered"; }>; summary: ZodOptional<ZodString>; summaryUpdatedAt: ZodOptional<ZodNumber>; targetWorkingDirectory: ZodOptional<ZodString>; title: ZodOptional<ZodString>; }, $strip>>; }, $strip>; }; getChildren: { request: ZodObject<{ sessionId: ZodString; }, $strip>; response: ZodObject<{ children: ZodArray<ZodObject<{ branchKind: ZodNullable<ZodEnum<{ aside: …; branch: …; compress: …; coordinator: …; fork: …; rewrite: …; subagent: …; }>>; forkPointMessageId: ZodNullable<ZodString>; hasChildren: ZodBoolean; messageCount: ZodNumber; sessionId: ZodString; spawningToolCallId: ZodOptional<ZodString>; title: ZodNullable<ZodString>; }, $strip>>; }, $strip>; }; getStatusCounts: { request: ZodObject<{ }, $strip>; response: ZodObject<{ active: ZodNumber; all: ZodNumber; archived: ZodNumber; closed: ZodNumber; discovered: ZodNumber; }, $strip>; }; list: { request: ZodObject<{ executionTargetId: ZodOptional<ZodString>; includePreview: ZodOptional<ZodBoolean>; limit: ZodOptional<ZodNumber>; offset: ZodOptional<ZodNumber>; status: ZodOptional<ZodEnum<{ active: "active"; all: "all"; archived: "archived"; closed: "closed"; discovered: "discovered"; }>>; }, $strip>; response: ZodObject<{ sessions: ZodArray<ZodObject<{ adapterId: ZodOptional<ZodString>; adapterName: ZodOptional<ZodString>; adapterSessionId: ZodOptional<ZodString>; agents: ZodArray<ZodObject<{ adapterId: …; adapterName: …; adapterSessionId: …; agentId: …; clientId: …; compressionMode: …; createdAt: …; cwd: …; harnessId: …; lastActivityAt: …; model: …; personaId: …; profileId: …; providerConfigId: …; role: …; sessionId: …; status: …; }, $strip>>; approvalPolicyOverride: ZodOptional<ZodNullable<ZodEnum<…>>>; branchKind: ZodOptional<ZodEnum<{ aside: …; branch: …; compress: …; coordinator: …; fork: …; rewrite: …; subagent: …; }>>; clientAccountId: ZodOptional<ZodString>; clientId: ZodOptional<ZodString>; createdAt: ZodNumber; executionTargetId: ZodOptional<ZodString>; forkPointMessageId: ZodOptional<ZodString>; forkTransforms: ZodOptional<ZodObject<{ appliedPipeline: …; removedMessageIds: …; segments: …; }, $strip>>; isImported: ZodOptional<ZodBoolean>; isOrchestrated: ZodOptional<ZodBoolean>; lastActivityAt: ZodNumber; lastClientIdentityObservation: ZodOptional<ZodObject<{ clientId: …; kind: …; observedAt: …; payload: …; source: …; }, $strip>>; leadAgentId: ZodOptional<ZodString>; parentSessionId: ZodOptional<ZodString>; preview: ZodOptional<ZodObject<{ firstUserMessage: …; messageCount: …; }, $strip>>; rootSessionId: ZodOptional<ZodString>; sessionId: ZodString; spawningToolCallId: ZodOptional<ZodString>; status: ZodEnum<{ active: "active"; archived: "archived"; closed: "closed"; discovered: "discovered"; }>; summary: ZodOptional<ZodString>; summaryUpdatedAt: ZodOptional<ZodNumber>; targetWorkingDirectory: ZodOptional<ZodString>; title: ZodOptional<ZodString>; }, $strip>>; total: ZodNumber; }, $strip>; }; search: { request: ZodObject<{ isImported: ZodOptional<ZodBoolean>; limit: ZodOptional<ZodNumber>; query: ZodString; status: ZodOptional<ZodEnum<{ active: "active"; all: "all"; archived: "archived"; closed: "closed"; discovered: "discovered"; }>>; }, $strip>; response: ZodObject<{ sessions: ZodArray<ZodObject<{ adapterId: ZodOptional<ZodString>; adapterName: ZodOptional<ZodString>; adapterSessionId: ZodOptional<ZodString>; agents: ZodArray<ZodObject<{ adapterId: …; adapterName: …; adapterSessionId: …; agentId: …; clientId: …; compressionMode: …; createdAt: …; cwd: …; harnessId: …; lastActivityAt: …; model: …; personaId: …; profileId: …; providerConfigId: …; role: …; sessionId: …; status: …; }, $strip>>; approvalPolicyOverride: ZodOptional<ZodNullable<ZodEnum<…>>>; branchKind: ZodOptional<ZodEnum<{ aside: …; branch: …; compress: …; coordinator: …; fork: …; rewrite: …; subagent: …; }>>; clientAccountId: ZodOptional<ZodString>; clientId: ZodOptional<ZodString>; createdAt: ZodNumber; executionTargetId: ZodOptional<ZodString>; forkPointMessageId: ZodOptional<ZodString>; forkTransforms: ZodOptional<ZodObject<{ appliedPipeline: …; removedMessageIds: …; segments: …; }, $strip>>; isImported: ZodOptional<ZodBoolean>; isOrchestrated: ZodOptional<ZodBoolean>; lastActivityAt: ZodNumber; lastClientIdentityObservation: ZodOptional<ZodObject<{ clientId: …; kind: …; observedAt: …; payload: …; source: …; }, $strip>>; leadAgentId: ZodOptional<ZodString>; parentSessionId: ZodOptional<ZodString>; preview: ZodObject<{ firstUserMessage: ZodNullable<…>; messageCount: ZodNumber; }, $strip>; rootSessionId: ZodOptional<ZodString>; sessionId: ZodString; spawningToolCallId: ZodOptional<ZodString>; status: ZodEnum<{ active: "active"; archived: "archived"; closed: "closed"; discovered: "discovered"; }>; summary: ZodOptional<ZodString>; summaryUpdatedAt: ZodOptional<ZodNumber>; targetWorkingDirectory: ZodOptional<ZodString>; title: ZodOptional<ZodString>; }, $strip>>; total: ZodNumber; }, $strip>; }; set: { request: ZodObject<{ ifAbsent: ZodOptional<ZodBoolean>; session: ZodObject<{ adapterId: ZodOptional<ZodString>; adapterName: ZodOptional<ZodString>; adapterSessionId: ZodOptional<ZodString>; agents: ZodArray<ZodObject<{ adapterId: ZodString; adapterName: ZodString; adapterSessionId: ZodOptional<…>; agentId: ZodString; clientId: ZodOptional<…>; compressionMode: ZodOptional<…>; createdAt: ZodNumber; cwd: ZodOptional<…>; harnessId: ZodOptional<…>; lastActivityAt: ZodNumber; model: ZodOptional<…>; personaId: ZodOptional<…>; profileId: ZodOptional<…>; providerConfigId: ZodOptional<…>; role: ZodEnum<…>; sessionId: ZodString; status: ZodEnum<…>; }, $strip>>; approvalPolicyOverride: ZodOptional<ZodNullable<ZodEnum<{ always-ask: …; full-access: …; reject: …; }>>>; branchKind: ZodOptional<ZodEnum<{ aside: "aside"; branch: "branch"; compress: "compress"; coordinator: "coordinator"; fork: "fork"; rewrite: "rewrite"; subagent: "subagent"; }>>; clientAccountId: ZodOptional<ZodString>; clientId: ZodOptional<ZodString>; createdAt: ZodNumber; executionTargetId: ZodOptional<ZodString>; forkPointMessageId: ZodOptional<ZodString>; forkTransforms: ZodOptional<ZodObject<{ appliedPipeline: ZodOptional<…>; removedMessageIds: ZodOptional<…>; segments: ZodOptional<…>; }, $strip>>; isImported: ZodOptional<ZodBoolean>; isOrchestrated: ZodOptional<ZodBoolean>; lastActivityAt: ZodNumber; lastClientIdentityObservation: ZodOptional<ZodObject<{ clientId: ZodString; kind: ZodString; observedAt: ZodNumber; payload: ZodType<…, …, …>; source: ZodString; }, $strip>>; leadAgentId: ZodOptional<ZodString>; parentSessionId: ZodOptional<ZodString>; rootSessionId: ZodOptional<ZodString>; sessionId: ZodString; spawningToolCallId: ZodOptional<ZodString>; status: ZodEnum<{ active: "active"; archived: "archived"; closed: "closed"; discovered: "discovered"; }>; summary: ZodOptional<ZodString>; summaryUpdatedAt: ZodOptional<ZodNumber>; targetWorkingDirectory: ZodOptional<ZodString>; title: ZodOptional<ZodString>; }, $strip>; sessionId: ZodString; }, $strip>; response: ZodObject<{ clientAccountChanged: ZodOptional<ZodBoolean>; success: ZodBoolean; }, $strip>; }; update: { request: ZodObject<{ approvalPolicyOverride: ZodOptional<ZodNullable<ZodEnum<{ always-ask: "always-ask"; full-access: "full-access"; reject: "reject"; }>>>; branchKind: ZodOptional<ZodEnum<{ aside: "aside"; branch: "branch"; compress: "compress"; coordinator: "coordinator"; fork: "fork"; rewrite: "rewrite"; subagent: "subagent"; }>>; clientAccountId: ZodOptional<ZodString>; clientId: ZodOptional<ZodString>; createdAt: ZodOptional<ZodNumber>; executionTargetId: ZodOptional<ZodNullable<ZodString>>; forkPointMessageId: ZodOptional<ZodString>; isOrchestrated: ZodOptional<ZodBoolean>; lastActivityAt: ZodOptional<ZodNumber>; lastClientIdentityObservation: ZodOptional<ZodObject<{ clientId: ZodString; kind: ZodString; observedAt: ZodNumber; payload: ZodType<Record<string, unknown>, unknown, $ZodTypeInternals<Record<…, …>, unknown>>; source: ZodString; }, $strip>>; parentSessionId: ZodOptional<ZodString>; rootSessionId: ZodOptional<ZodString>; sessionId: ZodString; spawningToolCallId: ZodOptional<ZodNullable<ZodString>>; status: ZodOptional<ZodEnum<{ active: "active"; archived: "archived"; closed: "closed"; discovered: "discovered"; }>>; targetWorkingDirectory: ZodOptional<ZodString>; title: ZodOptional<ZodString>; }, $strip>; response: ZodObject<{ clientAccountChanged: ZodOptional<ZodBoolean>; success: ZodBoolean; }, $strip>; }; }>

Defined in: ../../../packages/contracts/src/session/session-storage-namespace.ts:118

Session storage namespace.

Provides bus subjects for session CRUD operations. Registered under storage:session on the Makaio bus.

Storage backends register handlers; consumers communicate through subjects only, never importing directly from storage implementations.

import { SessionStorageSubjects } from '@makaio/contracts';
const { session } = await bus.request(SessionStorageSubjects.get, { sessionId: '123' });
const { sessions } = await bus.request(SessionStorageSubjects.list, { status: 'active' });