Variable: SessionNamespace
Makaio Framework / contracts / SessionNamespace
Variable: SessionNamespace
Section titled “Variable: SessionNamespace”
constSessionNamespace:BusNamespace<"session",SubjectRecordFromSchemaRecord<{abandon: {request:ZodObject<{childSessionId:ZodString;extensionId:ZodOptional<ZodString>;parentSessionId:ZodString;source:ZodOptional<ZodEnum<{extension:"extension";system:"system";user:"user"; }>>; },$strip>;response:ZodObject<{success:ZodBoolean; },$strip>; };abandoned:ZodObject<{parentSessionId:ZodOptional<ZodString>;sessionId:ZodString; },$strip>;agent.added:ZodObject<{adapterId:ZodString;adapterName:ZodString;adapterSessionId:ZodString;agentId:ZodString;cwd:ZodOptional<ZodString>;model:ZodOptional<ZodString>;role:ZodOptional<ZodEnum<{lead:"lead";member:"member"; }>>;sessionId:ZodString; },$strip>;agent.attach: {request:ZodObject<{agent:ZodObject<{allowedDirectories:ZodOptional<ZodArray<ZodString>>;allowedTools:ZodOptional<ZodArray<ZodString>>;cwd:ZodOptional<ZodString>;disallowedTools:ZodOptional<ZodArray<ZodString>>;kind:ZodString;model:ZodOptional<ZodString>;providerConfigId:ZodOptional<ZodString>;reasoningEffort:ZodOptional<ZodEnum<{extra-high: …;high: …;low: …;medium: …;none: …; }>>;systemPrompt:ZodOptional<ZodUnion<readonly […, …]>>; },$loose>;initialMessage:ZodOptional<ZodUnion<readonly [ZodString,ZodObject<{blocks: …;role: …; },$strip>]>>;role:ZodOptional<ZodEnum<{lead:"lead";member:"member"; }>>;sessionId:ZodString; },$strip>;response:ZodObject<{adapterSessionId:ZodString;agentId:ZodString;messageId:ZodOptional<ZodString>;role:ZodEnum<{lead:"lead";member:"member"; }>;turnId:ZodOptional<ZodString>; },$strip>; };agent.removed:ZodObject<{agentId:ZodString;sessionId:ZodString; },$strip>;archive: {request:ZodObject<{sessionId:ZodString; },$strip>;response:ZodObject<{success:ZodBoolean; },$strip>; };archived:ZodObject<{sessionId:ZodString; },$strip>;branch.created:ZodObject<{childSessionId:ZodString;forkPointMessageId:ZodOptional<ZodString>;kind:ZodEnum<{aside:"aside";branch:"branch";compress:"compress";coordinator:"coordinator";fork:"fork";rewrite:"rewrite";subagent:"subagent"; }>;parentSessionId:ZodString;sessionId:ZodString;transforms:ZodOptional<ZodObject<{appliedPipeline:ZodOptional<ZodArray<ZodObject<…, …>>>;removedMessageIds:ZodOptional<ZodArray<ZodString>>;segments:ZodOptional<ZodArray<ZodObject<…, …>>>; },$strip>>; },$strip>;branch.merged:ZodObject<{childSessionId:ZodString;parentSessionId:ZodString;resultJson:ZodOptional<ZodString>;resultMessageId:ZodOptional<ZodString>;sessionId:ZodString; },$strip>;childCompleted:ZodObject<{childSessionId:ZodString;parentSessionId:ZodString;result:ZodUnknown; },$strip>;clientAccount.changed:ZodObject<{clientAccountId:ZodString;clientId:ZodString;lastClientIdentityObservation:ZodObject<{clientId:ZodString;kind:ZodString;observedAt:ZodNumber;payload:ZodType<Record<string,unknown>,unknown,$ZodTypeInternals<Record<string,unknown>,unknown>>;source:ZodString; },$strip>;observedAt:ZodNumber;previousClientAccountId:ZodNullable<ZodString>;sessionId:ZodString;source:ZodString; },$strip>;close: {request:ZodObject<{sessionId:ZodString; },$strip>;response:ZodObject<{success:ZodBoolean; },$strip>; };closed:ZodObject<{reason:ZodOptional<ZodString>;sessionId:ZodString; },$strip>;compress: {request:ZodObject<{pipeline:ZodArray<ZodObject<{actionId:ZodString;options:ZodOptional<ZodRecord<…, …>>; },$strip>>;sessionId:ZodString; },$strip>;response:ZodObject<{contextJson:ZodRecord<ZodString,ZodUnknown>;eventId:ZodString;tokensAfter:ZodOptional<ZodNumber>;tokensBefore:ZodNumber; },$strip>; };compressed:ZodObject<{eventId:ZodString;sessionId:ZodString; },$strip>;compressionRequested:ZodObject<{extensionId:ZodOptional<ZodString>;reason:ZodString;sessionId:ZodString;source:ZodOptional<ZodEnum<{extension:"extension";system:"system";user:"user"; }>>; },$strip>;connectorSwap.editRequested:ZodObject<{agentId:ZodString;newCwd:ZodOptional<ZodString>;newModel:ZodOptional<ZodString>;previousCwd:ZodOptional<ZodString>;previousModel:ZodOptional<ZodString>;sessionId:ZodString; },$strip>;create: {request:ZodObject<{branchKind:ZodOptional<ZodEnum<{aside:"aside";branch:"branch";compress:"compress";coordinator:"coordinator";fork:"fork";rewrite:"rewrite";subagent:"subagent"; }>>;executionTargetId:ZodOptional<ZodString>;forkPointMessageId:ZodOptional<ZodString>;forkTransforms:ZodOptional<ZodObject<{appliedPipeline:ZodOptional<ZodArray<…>>;removedMessageIds:ZodOptional<ZodArray<…>>;segments:ZodOptional<ZodArray<…>>; },$strip>>;originWindowId:ZodOptional<ZodString>;parentSessionId:ZodOptional<ZodString>;sessionId:ZodOptional<ZodString>;spawningToolCallId:ZodOptional<ZodString>;targetWorkingDirectory:ZodOptional<ZodString>;title:ZodOptional<ZodString>; },$strip>;response:ZodObject<{sessionId:ZodString; },$strip>; };created:ZodObject<{branchKind:ZodNullable<ZodEnum<{aside:"aside";branch:"branch";compress:"compress";coordinator:"coordinator";fork:"fork";rewrite:"rewrite";subagent:"subagent"; }>>;createdAt:ZodNumber;originWindowId:ZodOptional<ZodString>;parentSessionId:ZodNullable<ZodString>;sessionId:ZodString; },$strip>;enrichContext: {request:ZodObject<{sessionId:ZodString; },$strip>;response:ZodRecord<ZodString,ZodUnknown>; };event:ZodUnion<readonly [ZodDiscriminatedUnion<[ZodObject<{eventId:ZodString;payload:ZodObject<{adapterId: …;adapterName: …;adapterSessionId: …;agentId: …;cwd: …;model: …;role: …;sessionId: …; },$strip>;sessionId:ZodString;timestamp:ZodNumber;type:ZodLiteral<"agent.added">; },$strip>,ZodObject<{eventId:ZodString;payload:ZodObject<{agentIds: …;content: …;messageId: …;origin: …;sessionId: …;source: …;turnId: …;turnNumber: …; },$strip>;sessionId:ZodString;timestamp:ZodNumber;type:ZodLiteral<"user_message.sent">; },$strip>,ZodObject<{eventId:ZodString;payload:ZodObject<{agentId: …;messageId: …;sessionId: …;turnId: …;turnNumber: …; },$strip>;sessionId:ZodString;timestamp:ZodNumber;type:ZodLiteral<"user_message.acknowledged">; },$strip>],"type">,ZodObject<{eventId:ZodString;payload:ZodRecord<ZodString,ZodUnknown>;sessionId:ZodString;timestamp:ZodNumber;type:ZodString; },$strip>]>;fork: {request:ZodObject<{branchKind:ZodOptional<ZodEnum<{aside:"aside";branch:"branch";fork:"fork"; }>>;existingSessionId:ZodOptional<ZodString>;fromMessageId:ZodOptional<ZodString>;name:ZodOptional<ZodString>;sourceSessionId:ZodString;targetWorkingDirectory:ZodOptional<ZodString>;transforms:ZodOptional<ZodObject<{appliedPipeline:ZodOptional<ZodArray<…>>;removedMessageIds:ZodOptional<ZodArray<…>>;segments:ZodOptional<ZodArray<…>>; },$strip>>; },$strip>;response:ZodObject<{sessionId:ZodString; },$strip>; };forked:ZodObject<{childSessionId:ZodString;forkPoint:ZodOptional<ZodString>;parentSessionId:ZodString; },$strip>;forking:ZodObject<{childSessionId:ZodString;parentSessionId:ZodString;reason:ZodString; },$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>; };getContextWindowState: {request:ZodObject<{sessionId:ZodString; },$strip>;response:ZodObject<{state:ZodNullable<ZodObject<{currentTokens:ZodNumber;lastUpdatedAt:ZodNumber;level:ZodEnum<{critical: …;ok: …;warn: …; }>;maxTokens:ZodNumber;percentage:ZodNumber; },$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>; };merge: {request:ZodObject<{childSessionId:ZodString;extensionId:ZodOptional<ZodString>;parentSessionId:ZodString;source:ZodOptional<ZodEnum<{extension:"extension";system:"system";user:"user"; }>>;summary:ZodOptional<ZodString>; },$strip>;response:ZodObject<{handoff:ZodOptional<ZodString>;success:ZodBoolean; },$strip>; };merged:ZodObject<{childSessionId:ZodString;handoff:ZodString;parentSessionId:ZodString; },$strip>;merging:ZodObject<{childSessionId:ZodString;parentSessionId:ZodString; },$strip>;purge: {request:ZodObject<{sessionId:ZodString; },$strip>;response:ZodObject<{error:ZodOptional<ZodString>;eventsDeleted:ZodOptional<ZodNumber>;success:ZodBoolean; },$strip>; };purged:ZodObject<{sessionId:ZodString; },$strip>;resolveAgentConfig: {request:ZodObject<{projectId:ZodOptional<ZodString>;selection:ZodObject<{allowedDirectories:ZodOptional<ZodArray<ZodString>>;allowedTools:ZodOptional<ZodArray<ZodString>>;cwd:ZodOptional<ZodString>;disallowedTools:ZodOptional<ZodArray<ZodString>>;kind:ZodString;model:ZodOptional<ZodString>;providerConfigId:ZodOptional<ZodString>;reasoningEffort:ZodOptional<ZodEnum<{extra-high: …;high: …;low: …;medium: …;none: …; }>>;systemPrompt:ZodOptional<ZodUnion<readonly […, …]>>; },$loose>; },$strip>;response:ZodObject<{adapterName:ZodString;allowedDirectories:ZodOptional<ZodArray<ZodString>>;allowedTools:ZodOptional<ZodArray<ZodString>>;disallowedTools:ZodOptional<ZodArray<ZodString>>;model:ZodOptional<ZodString>;providerConfigId:ZodOptional<ZodString>;reasoningEffort:ZodOptional<ZodEnum<{extra-high:"extra-high";high:"high";low:"low";medium:"medium";none:"none"; }>>;supportedReasoningLevels:ZodOptional<ZodObject<{extra-high:ZodOptional<ZodUnion<…>>;high:ZodOptional<ZodUnion<…>>;low:ZodOptional<ZodUnion<…>>;medium:ZodOptional<ZodUnion<…>>;none:ZodOptional<ZodUnion<…>>; },$strip>>;systemPrompt:ZodOptional<ZodUnion<readonly [ZodString,ZodObject<{content: …;mode: …; },$strip>]>>; },$strip>; };resolveSystemPrompt: {request:ZodObject<{personaId:ZodOptional<ZodString>;profileId:ZodOptional<ZodString>;sessionId:ZodString; },$strip>;response:ZodObject<{personaName:ZodOptional<ZodString>;profileName:ZodOptional<ZodString>;systemPrompt:ZodString; },$strip>; };resume: {request:ZodObject<{sessionId:ZodString; },$strip>;response:ZodObject<{success:ZodBoolean; },$strip>; };resumed:ZodObject<{sessionId:ZodString; },$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: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>; };sendMessage: {request:ZodObject<{agent:ZodOptional<ZodUnion<readonly [ZodObject<{adapterId: …;adapterName: …;allowedDirectories: …;allowedTools: …;cwd: …;disallowedTools: …;kind: …;model: …;providerConfigId: …;reasoningEffort: …;systemPrompt: …; },$loose>,ZodObject<{allowedDirectories: …;allowedTools: …;cwd: …;disallowedTools: …;kind: …;model: …;providerConfigId: …;reasoningEffort: …;systemPrompt: …; },$loose>,ZodObject<{allowedDirectories: …;allowedTools: …;cwd: …;disallowedTools: …;kind: …;model: …;providerConfigId: …;reasoningEffort: …;systemPrompt: …; },$loose>]>>;agentIds:ZodOptional<ZodUnion<readonly [ZodArray<ZodString>,ZodLiteral<"all">]>>;deliveryMode:ZodOptional<ZodEnum<{enqueue:"enqueue"; }>>;extensionId:ZodOptional<ZodString>;message:ZodUnion<readonly [ZodString,ZodObject<{blocks:ZodUnion<…>;role:ZodOptional<…>; },$strip>]>;origin:ZodOptional<ZodEnum<{compact:"compact";text:"text";voice:"voice"; }>>;originWindowId:ZodOptional<ZodString>;sessionContext:ZodOptional<ZodObject<{extractedContext:ZodOptional<ZodUnknown>;hasCompression:ZodOptional<ZodBoolean>;hasConnectorSwap:ZodOptional<ZodBoolean>;hasNewTransforms:ZodOptional<ZodBoolean>;isFirstTurn:ZodOptional<ZodBoolean>;messageHistory:ZodOptional<ZodArray<…>>;turnContext:ZodOptional<ZodRecord<…, …>>; },$strip>>;sessionId:ZodString;skipConnectorSwapWarning:ZodOptional<ZodBoolean>;source:ZodOptional<ZodEnum<{extension:"extension";system:"system";user:"user"; }>>;turnId:ZodOptional<ZodString>; },$strip>;response:ZodObject<{messageId:ZodString;sessionId:ZodString;turnId:ZodString; },$strip>; };snapshot.export: {request:ZodObject<{options:ZodOptional<ZodObject<{includeAncestors:ZodDefault<ZodBoolean>;includeChildren:ZodDefault<ZodBoolean>;includeEvents:ZodDefault<ZodBoolean>;includeToolOutputs:ZodDefault<ZodBoolean>; },$strip>>;sessionId:ZodString; },$strip>;response:ZodObject<{snapshot:ZodObject<{agents:ZodArray<ZodObject<{adapterId: …;adapterName: …;adapterSessionId: …;agentId: …;clientId: …;compressionMode: …;createdAt: …;cwd: …;harnessId: …;lastActivityAt: …;model: …;personaId: …;profileId: …;providerConfigId: …;role: …;sessionId: …;status: …; },$strip>>;events:ZodOptional<ZodArray<ZodUnion<…>>>;exportedAt:ZodNumber;messages:ZodArray<ZodObject<{adapterMessageId: …;adapterSessionId: …;agentId: …;blocks: …;contentText: …;editOf: …;messageId: …;origin: …;role: …;sessionId: …;timestamp: …;turnId: …; },$strip>>;options:ZodObject<{includeAncestors:ZodDefault<…>;includeChildren:ZodDefault<…>;includeEvents:ZodDefault<…>;includeToolOutputs:ZodDefault<…>; },$strip>;sessions:ZodArray<ZodObject<{adapterId: …;adapterName: …;adapterSessionId: …;agents: …;approvalPolicyOverride: …;branchKind: …;clientAccountId: …;clientId: …;createdAt: …;executionTargetId: …;forkPointMessageId: …;forkTransforms: …;isImported: …;isOrchestrated: …;lastActivityAt: …;lastClientIdentityObservation: …;leadAgentId: …;parentSessionId: …;rootSessionId: …;sessionId: …;spawningToolCallId: …;status: …;summary: …;summaryUpdatedAt: …;targetWorkingDirectory: …;title: …; },$strip>>;turns:ZodArray<ZodObject<{completedAt: …;error: …;sessionId: …;startedAt: …;status: …;turnId: …;turnNumber: …;usage: …; },$strip>>;version:ZodLiteral<"1.0">; },$strip>; },$strip>; };snapshot.import: {request:ZodObject<{onConflict:ZodDefault<ZodEnum<{fail:"fail";overwrite:"overwrite";skip:"skip"; }>>;snapshot:ZodObject<{agents:ZodArray<ZodObject<{adapterId: …;adapterName: …;adapterSessionId: …;agentId: …;clientId: …;compressionMode: …;createdAt: …;cwd: …;harnessId: …;lastActivityAt: …;model: …;personaId: …;profileId: …;providerConfigId: …;role: …;sessionId: …;status: …; },$strip>>;events:ZodOptional<ZodArray<ZodUnion<…>>>;exportedAt:ZodNumber;messages:ZodArray<ZodObject<{adapterMessageId: …;adapterSessionId: …;agentId: …;blocks: …;contentText: …;editOf: …;messageId: …;origin: …;role: …;sessionId: …;timestamp: …;turnId: …; },$strip>>;options:ZodObject<{includeAncestors:ZodDefault<…>;includeChildren:ZodDefault<…>;includeEvents:ZodDefault<…>;includeToolOutputs:ZodDefault<…>; },$strip>;sessions:ZodArray<ZodObject<{adapterId: …;adapterName: …;adapterSessionId: …;agents: …;approvalPolicyOverride: …;branchKind: …;clientAccountId: …;clientId: …;createdAt: …;executionTargetId: …;forkPointMessageId: …;forkTransforms: …;isImported: …;isOrchestrated: …;lastActivityAt: …;lastClientIdentityObservation: …;leadAgentId: …;parentSessionId: …;rootSessionId: …;sessionId: …;spawningToolCallId: …;status: …;summary: …;summaryUpdatedAt: …;targetWorkingDirectory: …;title: …; },$strip>>;turns:ZodArray<ZodObject<{completedAt: …;error: …;sessionId: …;startedAt: …;status: …;turnId: …;turnNumber: …;usage: …; },$strip>>;version:ZodLiteral<"1.0">; },$strip>; },$strip>;response:ZodObject<{errors:ZodArray<ZodObject<{error:ZodString;sessionId:ZodString; },$strip>>;imported:ZodArray<ZodString>;skipped:ZodArray<ZodString>; },$strip>; };snapshot.validate: {request:ZodObject<{snapshot:ZodUnknown; },$strip>;response:ZodObject<{errors:ZodArray<ZodString>;valid:ZodBoolean; },$strip>; };squash:ZodObject<{compressedMessageIds:ZodOptional<ZodArray<ZodString>>;sessionId:ZodString;summaryJson:ZodString;tokensAfter:ZodOptional<ZodNumber>;tokensBefore:ZodOptional<ZodNumber>; },$strip>;turn.completed:ZodObject<{error:ZodOptional<ZodString>;initiator:ZodOptional<ZodObject<{source:ZodEnum<{extension:"extension";system:"system";user:"user"; }>;sourceId:ZodOptional<ZodString>; },$strip>>;sessionId:ZodString;success:ZodBoolean;turnId:ZodString;turnNumber:ZodNumber; },$strip>;turn.started:ZodObject<{agentIds:ZodArray<ZodString>;initiator:ZodOptional<ZodObject<{source:ZodEnum<{extension:"extension";system:"system";user:"user"; }>;sourceId:ZodOptional<ZodString>; },$strip>>;messageId:ZodString;sessionId:ZodString;turnId:ZodString;turnNumber:ZodNumber; },$strip>;update: {request:ZodObject<{approvalPolicyOverride:ZodOptional<ZodNullable<ZodEnum<{always-ask:"always-ask";full-access:"full-access";reject:"reject"; }>>>;executionTargetId:ZodOptional<ZodNullable<ZodString>>;sessionId:ZodString; },$strip>;response:ZodObject<{success:ZodBoolean; },$strip>; };updated:ZodObject<{changedProperties:ZodArray<ZodString>;sessionId:ZodString; },$strip>;usage: {request:ZodObject<{adapterCount:ZodNumber;sessionId:ZodString;totalCalls:ZodNumber;totalInputTokens:ZodNumber;totalOutputTokens:ZodNumber;totalTokens:ZodNumber; },$strip>;response:ZodObject<{acknowledged:ZodLiteral<true>; },$strip>; };user_message.acknowledged:ZodObject<{agentId:ZodString;messageId:ZodString;sessionId:ZodString;turnId:ZodString;turnNumber:ZodNumber; },$strip>;user_message.completed:ZodObject<{agentId:ZodString;error:ZodOptional<ZodString>;mergedInto:ZodOptional<ZodString>;messageId:ZodString;outcome:ZodEnum<{cancelled:"cancelled";completed:"completed";error:"error";merged:"merged";rejected:"rejected";superseded:"superseded"; }>;sessionId:ZodString;supersededBy:ZodOptional<ZodString>;turnId:ZodString;turnNumber:ZodNumber; },$strip>;user_message.sent:ZodObject<{agentIds:ZodArray<ZodString>;content:ZodUnion<readonly [ZodString,ZodObject<{blocks:ZodUnion<readonly […, …]>;role:ZodOptional<ZodEnum<…>>; },$strip>]>;messageId:ZodString;origin:ZodOptional<ZodEnum<{compact:"compact";text:"text";voice:"voice"; }>>;sessionId:ZodString;source:ZodOptional<ZodEnum<{extension:"extension";system:"system";user:"user"; }>>;turnId:ZodString;turnNumber:ZodNumber; },$strip>; }>, {[key:string]:unknown; }, {abandon: {request:ZodObject<{childSessionId:ZodString;extensionId:ZodOptional<ZodString>;parentSessionId:ZodString;source:ZodOptional<ZodEnum<{extension:"extension";system:"system";user:"user"; }>>; },$strip>;response:ZodObject<{success:ZodBoolean; },$strip>; };abandoned:ZodObject<{parentSessionId:ZodOptional<ZodString>;sessionId:ZodString; },$strip>;agent.added:ZodObject<{adapterId:ZodString;adapterName:ZodString;adapterSessionId:ZodString;agentId:ZodString;cwd:ZodOptional<ZodString>;model:ZodOptional<ZodString>;role:ZodOptional<ZodEnum<{lead:"lead";member:"member"; }>>;sessionId:ZodString; },$strip>;agent.attach: {request:ZodObject<{agent:ZodObject<{allowedDirectories:ZodOptional<ZodArray<ZodString>>;allowedTools:ZodOptional<ZodArray<ZodString>>;cwd:ZodOptional<ZodString>;disallowedTools:ZodOptional<ZodArray<ZodString>>;kind:ZodString;model:ZodOptional<ZodString>;providerConfigId:ZodOptional<ZodString>;reasoningEffort:ZodOptional<ZodEnum<{extra-high:"extra-high";high:"high";low:"low";medium:"medium";none:"none"; }>>;systemPrompt:ZodOptional<ZodUnion<readonly [ZodString,ZodObject<…, …>]>>; },$loose>;initialMessage:ZodOptional<ZodUnion<readonly [ZodString,ZodObject<{blocks:ZodUnion<…>;role:ZodOptional<…>; },$strip>]>>;role:ZodOptional<ZodEnum<{lead:"lead";member:"member"; }>>;sessionId:ZodString; },$strip>;response:ZodObject<{adapterSessionId:ZodString;agentId:ZodString;messageId:ZodOptional<ZodString>;role:ZodEnum<{lead:"lead";member:"member"; }>;turnId:ZodOptional<ZodString>; },$strip>; };agent.removed:ZodObject<{agentId:ZodString;sessionId:ZodString; },$strip>;archive: {request:ZodObject<{sessionId:ZodString; },$strip>;response:ZodObject<{success:ZodBoolean; },$strip>; };archived:ZodObject<{sessionId:ZodString; },$strip>;branch.created:ZodObject<{childSessionId:ZodString;forkPointMessageId:ZodOptional<ZodString>;kind:ZodEnum<{aside:"aside";branch:"branch";compress:"compress";coordinator:"coordinator";fork:"fork";rewrite:"rewrite";subagent:"subagent"; }>;parentSessionId:ZodString;sessionId:ZodString;transforms:ZodOptional<ZodObject<{appliedPipeline:ZodOptional<ZodArray<ZodObject<{actionId: …;options: …; },$strip>>>;removedMessageIds:ZodOptional<ZodArray<ZodString>>;segments:ZodOptional<ZodArray<ZodObject<{fromMessageId: …;overrides: …;policy: …;stripReasoning: …;stripToolOutputs: …;summaryText: …;toMessageId: …; },$strip>>>; },$strip>>; },$strip>;branch.merged:ZodObject<{childSessionId:ZodString;parentSessionId:ZodString;resultJson:ZodOptional<ZodString>;resultMessageId:ZodOptional<ZodString>;sessionId:ZodString; },$strip>;childCompleted:ZodObject<{childSessionId:ZodString;parentSessionId:ZodString;result:ZodUnknown; },$strip>;clientAccount.changed:ZodObject<{clientAccountId:ZodString;clientId:ZodString;lastClientIdentityObservation:ZodObject<{clientId:ZodString;kind:ZodString;observedAt:ZodNumber;payload:ZodType<Record<string,unknown>,unknown,$ZodTypeInternals<Record<string,unknown>,unknown>>;source:ZodString; },$strip>;observedAt:ZodNumber;previousClientAccountId:ZodNullable<ZodString>;sessionId:ZodString;source:ZodString; },$strip>;close: {request:ZodObject<{sessionId:ZodString; },$strip>;response:ZodObject<{success:ZodBoolean; },$strip>; };closed:ZodObject<{reason:ZodOptional<ZodString>;sessionId:ZodString; },$strip>;compress: {request:ZodObject<{pipeline:ZodArray<ZodObject<{actionId:ZodString;options:ZodOptional<ZodRecord<ZodString,ZodUnknown>>; },$strip>>;sessionId:ZodString; },$strip>;response:ZodObject<{contextJson:ZodRecord<ZodString,ZodUnknown>;eventId:ZodString;tokensAfter:ZodOptional<ZodNumber>;tokensBefore:ZodNumber; },$strip>; };compressed:ZodObject<{eventId:ZodString;sessionId:ZodString; },$strip>;compressionRequested:ZodObject<{extensionId:ZodOptional<ZodString>;reason:ZodString;sessionId:ZodString;source:ZodOptional<ZodEnum<{extension:"extension";system:"system";user:"user"; }>>; },$strip>;connectorSwap.editRequested:ZodObject<{agentId:ZodString;newCwd:ZodOptional<ZodString>;newModel:ZodOptional<ZodString>;previousCwd:ZodOptional<ZodString>;previousModel:ZodOptional<ZodString>;sessionId:ZodString; },$strip>;create: {request:ZodObject<{branchKind:ZodOptional<ZodEnum<{aside:"aside";branch:"branch";compress:"compress";coordinator:"coordinator";fork:"fork";rewrite:"rewrite";subagent:"subagent"; }>>;executionTargetId:ZodOptional<ZodString>;forkPointMessageId:ZodOptional<ZodString>;forkTransforms:ZodOptional<ZodObject<{appliedPipeline:ZodOptional<ZodArray<ZodObject<…, …>>>;removedMessageIds:ZodOptional<ZodArray<ZodString>>;segments:ZodOptional<ZodArray<ZodObject<…, …>>>; },$strip>>;originWindowId:ZodOptional<ZodString>;parentSessionId:ZodOptional<ZodString>;sessionId:ZodOptional<ZodString>;spawningToolCallId:ZodOptional<ZodString>;targetWorkingDirectory:ZodOptional<ZodString>;title:ZodOptional<ZodString>; },$strip>;response:ZodObject<{sessionId:ZodString; },$strip>; };created:ZodObject<{branchKind:ZodNullable<ZodEnum<{aside:"aside";branch:"branch";compress:"compress";coordinator:"coordinator";fork:"fork";rewrite:"rewrite";subagent:"subagent"; }>>;createdAt:ZodNumber;originWindowId:ZodOptional<ZodString>;parentSessionId:ZodNullable<ZodString>;sessionId:ZodString; },$strip>;enrichContext: {request:ZodObject<{sessionId:ZodString; },$strip>;response:ZodRecord<ZodString,ZodUnknown>; };event:ZodUnion<readonly [ZodDiscriminatedUnion<[ZodObject<{eventId:ZodString;payload:ZodObject<{adapterId:ZodString;adapterName:ZodString;adapterSessionId:ZodString;agentId:ZodString;cwd:ZodOptional<…>;model:ZodOptional<…>;role:ZodOptional<…>;sessionId:ZodString; },$strip>;sessionId:ZodString;timestamp:ZodNumber;type:ZodLiteral<"agent.added">; },$strip>,ZodObject<{eventId:ZodString;payload:ZodObject<{agentIds:ZodArray<…>;content:ZodUnion<…>;messageId:ZodString;origin:ZodOptional<…>;sessionId:ZodString;source:ZodOptional<…>;turnId:ZodString;turnNumber:ZodNumber; },$strip>;sessionId:ZodString;timestamp:ZodNumber;type:ZodLiteral<"user_message.sent">; },$strip>,ZodObject<{eventId:ZodString;payload:ZodObject<{agentId:ZodString;messageId:ZodString;sessionId:ZodString;turnId:ZodString;turnNumber:ZodNumber; },$strip>;sessionId:ZodString;timestamp:ZodNumber;type:ZodLiteral<"user_message.acknowledged">; },$strip>],"type">,ZodObject<{eventId:ZodString;payload:ZodRecord<ZodString,ZodUnknown>;sessionId:ZodString;timestamp:ZodNumber;type:ZodString; },$strip>]>;fork: {request:ZodObject<{branchKind:ZodOptional<ZodEnum<{aside:"aside";branch:"branch";fork:"fork"; }>>;existingSessionId:ZodOptional<ZodString>;fromMessageId:ZodOptional<ZodString>;name:ZodOptional<ZodString>;sourceSessionId:ZodString;targetWorkingDirectory:ZodOptional<ZodString>;transforms:ZodOptional<ZodObject<{appliedPipeline:ZodOptional<ZodArray<ZodObject<…, …>>>;removedMessageIds:ZodOptional<ZodArray<ZodString>>;segments:ZodOptional<ZodArray<ZodObject<…, …>>>; },$strip>>; },$strip>;response:ZodObject<{sessionId:ZodString; },$strip>; };forked:ZodObject<{childSessionId:ZodString;forkPoint:ZodOptional<ZodString>;parentSessionId:ZodString; },$strip>;forking:ZodObject<{childSessionId:ZodString;parentSessionId:ZodString;reason:ZodString; },$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>; };getContextWindowState: {request:ZodObject<{sessionId:ZodString; },$strip>;response:ZodObject<{state:ZodNullable<ZodObject<{currentTokens:ZodNumber;lastUpdatedAt:ZodNumber;level:ZodEnum<{critical:"critical";ok:"ok";warn:"warn"; }>;maxTokens:ZodNumber;percentage:ZodNumber; },$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>; };merge: {request:ZodObject<{childSessionId:ZodString;extensionId:ZodOptional<ZodString>;parentSessionId:ZodString;source:ZodOptional<ZodEnum<{extension:"extension";system:"system";user:"user"; }>>;summary:ZodOptional<ZodString>; },$strip>;response:ZodObject<{handoff:ZodOptional<ZodString>;success:ZodBoolean; },$strip>; };merged:ZodObject<{childSessionId:ZodString;handoff:ZodString;parentSessionId:ZodString; },$strip>;merging:ZodObject<{childSessionId:ZodString;parentSessionId:ZodString; },$strip>;purge: {request:ZodObject<{sessionId:ZodString; },$strip>;response:ZodObject<{error:ZodOptional<ZodString>;eventsDeleted:ZodOptional<ZodNumber>;success:ZodBoolean; },$strip>; };purged:ZodObject<{sessionId:ZodString; },$strip>;resolveAgentConfig: {request:ZodObject<{projectId:ZodOptional<ZodString>;selection:ZodObject<{allowedDirectories:ZodOptional<ZodArray<ZodString>>;allowedTools:ZodOptional<ZodArray<ZodString>>;cwd:ZodOptional<ZodString>;disallowedTools:ZodOptional<ZodArray<ZodString>>;kind:ZodString;model:ZodOptional<ZodString>;providerConfigId:ZodOptional<ZodString>;reasoningEffort:ZodOptional<ZodEnum<{extra-high:"extra-high";high:"high";low:"low";medium:"medium";none:"none"; }>>;systemPrompt:ZodOptional<ZodUnion<readonly [ZodString,ZodObject<…, …>]>>; },$loose>; },$strip>;response:ZodObject<{adapterName:ZodString;allowedDirectories:ZodOptional<ZodArray<ZodString>>;allowedTools:ZodOptional<ZodArray<ZodString>>;disallowedTools:ZodOptional<ZodArray<ZodString>>;model:ZodOptional<ZodString>;providerConfigId:ZodOptional<ZodString>;reasoningEffort:ZodOptional<ZodEnum<{extra-high:"extra-high";high:"high";low:"low";medium:"medium";none:"none"; }>>;supportedReasoningLevels:ZodOptional<ZodObject<{extra-high:ZodOptional<ZodUnion<readonly […, …]>>;high:ZodOptional<ZodUnion<readonly […, …]>>;low:ZodOptional<ZodUnion<readonly […, …]>>;medium:ZodOptional<ZodUnion<readonly […, …]>>;none:ZodOptional<ZodUnion<readonly […, …]>>; },$strip>>;systemPrompt:ZodOptional<ZodUnion<readonly [ZodString,ZodObject<{content:ZodString;mode:ZodLiteral<…>; },$strip>]>>; },$strip>; };resolveSystemPrompt: {request:ZodObject<{personaId:ZodOptional<ZodString>;profileId:ZodOptional<ZodString>;sessionId:ZodString; },$strip>;response:ZodObject<{personaName:ZodOptional<ZodString>;profileName:ZodOptional<ZodString>;systemPrompt:ZodString; },$strip>; };resume: {request:ZodObject<{sessionId:ZodString; },$strip>;response:ZodObject<{success:ZodBoolean; },$strip>; };resumed:ZodObject<{sessionId:ZodString; },$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: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>; };sendMessage: {request:ZodObject<{agent:ZodOptional<ZodUnion<readonly [ZodObject<{adapterId:ZodOptional<…>;adapterName:ZodOptional<…>;allowedDirectories:ZodOptional<…>;allowedTools:ZodOptional<…>;cwd:ZodOptional<…>;disallowedTools:ZodOptional<…>;kind:ZodLiteral<…>;model:ZodOptional<…>;providerConfigId:ZodOptional<…>;reasoningEffort:ZodOptional<…>;systemPrompt:ZodOptional<…>; },$loose>,ZodObject<{allowedDirectories:ZodOptional<…>;allowedTools:ZodOptional<…>;cwd:ZodOptional<…>;disallowedTools:ZodOptional<…>;kind:ZodLiteral<…>;model:ZodString;providerConfigId:ZodOptional<…>;reasoningEffort:ZodOptional<…>;systemPrompt:ZodOptional<…>; },$loose>,ZodObject<{allowedDirectories:ZodOptional<…>;allowedTools:ZodOptional<…>;cwd:ZodOptional<…>;disallowedTools:ZodOptional<…>;kind:ZodString;model:ZodOptional<…>;providerConfigId:ZodOptional<…>;reasoningEffort:ZodOptional<…>;systemPrompt:ZodOptional<…>; },$loose>]>>;agentIds:ZodOptional<ZodUnion<readonly [ZodArray<ZodString>,ZodLiteral<"all">]>>;deliveryMode:ZodOptional<ZodEnum<{enqueue:"enqueue"; }>>;extensionId:ZodOptional<ZodString>;message:ZodUnion<readonly [ZodString,ZodObject<{blocks:ZodUnion<readonly […, …]>;role:ZodOptional<ZodEnum<…>>; },$strip>]>;origin:ZodOptional<ZodEnum<{compact:"compact";text:"text";voice:"voice"; }>>;originWindowId:ZodOptional<ZodString>;sessionContext:ZodOptional<ZodObject<{extractedContext:ZodOptional<ZodUnknown>;hasCompression:ZodOptional<ZodBoolean>;hasConnectorSwap:ZodOptional<ZodBoolean>;hasNewTransforms:ZodOptional<ZodBoolean>;isFirstTurn:ZodOptional<ZodBoolean>;messageHistory:ZodOptional<ZodArray<ZodObject<…, …>>>;turnContext:ZodOptional<ZodRecord<ZodString,ZodType<…, …, …>>>; },$strip>>;sessionId:ZodString;skipConnectorSwapWarning:ZodOptional<ZodBoolean>;source:ZodOptional<ZodEnum<{extension:"extension";system:"system";user:"user"; }>>;turnId:ZodOptional<ZodString>; },$strip>;response:ZodObject<{messageId:ZodString;sessionId:ZodString;turnId:ZodString; },$strip>; };snapshot.export: {request:ZodObject<{options:ZodOptional<ZodObject<{includeAncestors:ZodDefault<ZodBoolean>;includeChildren:ZodDefault<ZodBoolean>;includeEvents:ZodDefault<ZodBoolean>;includeToolOutputs:ZodDefault<ZodBoolean>; },$strip>>;sessionId:ZodString; },$strip>;response:ZodObject<{snapshot:ZodObject<{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>>;events:ZodOptional<ZodArray<ZodUnion<readonly […, …]>>>;exportedAt:ZodNumber;messages:ZodArray<ZodObject<{adapterMessageId:ZodOptional<…>;adapterSessionId:ZodOptional<…>;agentId:ZodOptional<…>;blocks:ZodArray<…>;contentText:ZodString;editOf:ZodOptional<…>;messageId:ZodString;origin:ZodOptional<…>;role:ZodEnum<…>;sessionId:ZodString;timestamp:ZodNumber;turnId:ZodNullable<…>; },$strip>>;options:ZodObject<{includeAncestors:ZodDefault<ZodBoolean>;includeChildren:ZodDefault<ZodBoolean>;includeEvents:ZodDefault<ZodBoolean>;includeToolOutputs:ZodDefault<ZodBoolean>; },$strip>;sessions:ZodArray<ZodObject<{adapterId:ZodOptional<…>;adapterName:ZodOptional<…>;adapterSessionId:ZodOptional<…>;agents:ZodArray<…>;approvalPolicyOverride:ZodOptional<…>;branchKind:ZodOptional<…>;clientAccountId:ZodOptional<…>;clientId:ZodOptional<…>;createdAt:ZodNumber;executionTargetId:ZodOptional<…>;forkPointMessageId:ZodOptional<…>;forkTransforms:ZodOptional<…>;isImported:ZodOptional<…>;isOrchestrated:ZodOptional<…>;lastActivityAt:ZodNumber;lastClientIdentityObservation:ZodOptional<…>;leadAgentId:ZodOptional<…>;parentSessionId:ZodOptional<…>;rootSessionId:ZodOptional<…>;sessionId:ZodString;spawningToolCallId:ZodOptional<…>;status:ZodEnum<…>;summary:ZodOptional<…>;summaryUpdatedAt:ZodOptional<…>;targetWorkingDirectory:ZodOptional<…>;title:ZodOptional<…>; },$strip>>;turns:ZodArray<ZodObject<{completedAt:ZodOptional<…>;error:ZodOptional<…>;sessionId:ZodString;startedAt:ZodNumber;status:ZodEnum<…>;turnId:ZodString;turnNumber:ZodNumber;usage:ZodOptional<…>; },$strip>>;version:ZodLiteral<"1.0">; },$strip>; },$strip>; };snapshot.import: {request:ZodObject<{onConflict:ZodDefault<ZodEnum<{fail:"fail";overwrite:"overwrite";skip:"skip"; }>>;snapshot:ZodObject<{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>>;events:ZodOptional<ZodArray<ZodUnion<readonly […, …]>>>;exportedAt:ZodNumber;messages:ZodArray<ZodObject<{adapterMessageId:ZodOptional<…>;adapterSessionId:ZodOptional<…>;agentId:ZodOptional<…>;blocks:ZodArray<…>;contentText:ZodString;editOf:ZodOptional<…>;messageId:ZodString;origin:ZodOptional<…>;role:ZodEnum<…>;sessionId:ZodString;timestamp:ZodNumber;turnId:ZodNullable<…>; },$strip>>;options:ZodObject<{includeAncestors:ZodDefault<ZodBoolean>;includeChildren:ZodDefault<ZodBoolean>;includeEvents:ZodDefault<ZodBoolean>;includeToolOutputs:ZodDefault<ZodBoolean>; },$strip>;sessions:ZodArray<ZodObject<{adapterId:ZodOptional<…>;adapterName:ZodOptional<…>;adapterSessionId:ZodOptional<…>;agents:ZodArray<…>;approvalPolicyOverride:ZodOptional<…>;branchKind:ZodOptional<…>;clientAccountId:ZodOptional<…>;clientId:ZodOptional<…>;createdAt:ZodNumber;executionTargetId:ZodOptional<…>;forkPointMessageId:ZodOptional<…>;forkTransforms:ZodOptional<…>;isImported:ZodOptional<…>;isOrchestrated:ZodOptional<…>;lastActivityAt:ZodNumber;lastClientIdentityObservation:ZodOptional<…>;leadAgentId:ZodOptional<…>;parentSessionId:ZodOptional<…>;rootSessionId:ZodOptional<…>;sessionId:ZodString;spawningToolCallId:ZodOptional<…>;status:ZodEnum<…>;summary:ZodOptional<…>;summaryUpdatedAt:ZodOptional<…>;targetWorkingDirectory:ZodOptional<…>;title:ZodOptional<…>; },$strip>>;turns:ZodArray<ZodObject<{completedAt:ZodOptional<…>;error:ZodOptional<…>;sessionId:ZodString;startedAt:ZodNumber;status:ZodEnum<…>;turnId:ZodString;turnNumber:ZodNumber;usage:ZodOptional<…>; },$strip>>;version:ZodLiteral<"1.0">; },$strip>; },$strip>;response:ZodObject<{errors:ZodArray<ZodObject<{error:ZodString;sessionId:ZodString; },$strip>>;imported:ZodArray<ZodString>;skipped:ZodArray<ZodString>; },$strip>; };snapshot.validate: {request:ZodObject<{snapshot:ZodUnknown; },$strip>;response:ZodObject<{errors:ZodArray<ZodString>;valid:ZodBoolean; },$strip>; };squash:ZodObject<{compressedMessageIds:ZodOptional<ZodArray<ZodString>>;sessionId:ZodString;summaryJson:ZodString;tokensAfter:ZodOptional<ZodNumber>;tokensBefore:ZodOptional<ZodNumber>; },$strip>;turn.completed:ZodObject<{error:ZodOptional<ZodString>;initiator:ZodOptional<ZodObject<{source:ZodEnum<{extension:"extension";system:"system";user:"user"; }>;sourceId:ZodOptional<ZodString>; },$strip>>;sessionId:ZodString;success:ZodBoolean;turnId:ZodString;turnNumber:ZodNumber; },$strip>;turn.started:ZodObject<{agentIds:ZodArray<ZodString>;initiator:ZodOptional<ZodObject<{source:ZodEnum<{extension:"extension";system:"system";user:"user"; }>;sourceId:ZodOptional<ZodString>; },$strip>>;messageId:ZodString;sessionId:ZodString;turnId:ZodString;turnNumber:ZodNumber; },$strip>;update: {request:ZodObject<{approvalPolicyOverride:ZodOptional<ZodNullable<ZodEnum<{always-ask:"always-ask";full-access:"full-access";reject:"reject"; }>>>;executionTargetId:ZodOptional<ZodNullable<ZodString>>;sessionId:ZodString; },$strip>;response:ZodObject<{success:ZodBoolean; },$strip>; };updated:ZodObject<{changedProperties:ZodArray<ZodString>;sessionId:ZodString; },$strip>;usage: {request:ZodObject<{adapterCount:ZodNumber;sessionId:ZodString;totalCalls:ZodNumber;totalInputTokens:ZodNumber;totalOutputTokens:ZodNumber;totalTokens:ZodNumber; },$strip>;response:ZodObject<{acknowledged:ZodLiteral<true>; },$strip>; };user_message.acknowledged:ZodObject<{agentId:ZodString;messageId:ZodString;sessionId:ZodString;turnId:ZodString;turnNumber:ZodNumber; },$strip>;user_message.completed:ZodObject<{agentId:ZodString;error:ZodOptional<ZodString>;mergedInto:ZodOptional<ZodString>;messageId:ZodString;outcome:ZodEnum<{cancelled:"cancelled";completed:"completed";error:"error";merged:"merged";rejected:"rejected";superseded:"superseded"; }>;sessionId:ZodString;supersededBy:ZodOptional<ZodString>;turnId:ZodString;turnNumber:ZodNumber; },$strip>;user_message.sent:ZodObject<{agentIds:ZodArray<ZodString>;content:ZodUnion<readonly [ZodString,ZodObject<{blocks:ZodUnion<readonly [ZodDiscriminatedUnion<…, …>,ZodArray<…>]>;role:ZodOptional<ZodEnum<{assistant: …;system: …;user: …; }>>; },$strip>]>;messageId:ZodString;origin:ZodOptional<ZodEnum<{compact:"compact";text:"text";voice:"voice"; }>>;sessionId:ZodString;source:ZodOptional<ZodEnum<{extension:"extension";system:"system";user:"user"; }>>;turnId:ZodString;turnNumber:ZodNumber; },$strip>; }>
Defined in: ../../../packages/contracts/src/session/namespace.ts:4