Interface: IMakaioSession
Makaio Framework / contracts / IMakaioSession
Interface: IMakaioSession
Section titled “Interface: IMakaioSession”Defined in: ../../../packages/contracts/src/session/types.ts:25
A makaio orchestration session.
Represents a logical conversation context that may span multiple agents and adapters over time. Sessions track which agents have participated and the overall lifecycle state.
Declared as an interface (rather than a plain type alias) to allow
host-tier code to add host-owned fields via TypeScript declaration
merging without touching framework source. Host consumers augment this
interface inside a declare module '@makaio/contracts' block.
Extends
Section titled “Extends”output<typeofMakaioSessionSchema>
Properties
Section titled “Properties”adapterId?
Section titled “adapterId?”
optionaladapterId?:string
Defined in: ../../../packages/contracts/src/session/schemas/session.ts:67
Adapter instance ID (machine/installation specific). Used to determine if native resume is possible.
Inherited from
Section titled “Inherited from”z.infer.adapterId
adapterName?
Section titled “adapterName?”
optionaladapterName?:string
Defined in: ../../../packages/contracts/src/session/schemas/session.ts:57
Adapter type name (e.g., ‘claude-code’, ‘codex-mcp’). Identifies the source adapter for native imports.
Inherited from
Section titled “Inherited from”z.infer.adapterName
adapterSessionId?
Section titled “adapterSessionId?”
optionaladapterSessionId?:string
Defined in: ../../../packages/contracts/src/session/schemas/session.ts:62
Provider’s session ID. For native imports, this is the external tool’s session identifier.
Inherited from
Section titled “Inherited from”z.infer.adapterSessionId
agents
Section titled “agents”agents:
object[]
Defined in: ../../../packages/contracts/src/session/schemas/session.ts:22
Agents currently or previously attached to this session
adapterId
Section titled “adapterId”adapterId:
string
Adapter instance that owns this agent
adapterName
Section titled “adapterName”adapterName:
string
Adapter type name (e.g., ‘claude-code’, ‘copilot’)
adapterSessionId?
Section titled “adapterSessionId?”
optionaladapterSessionId?:string
Provider’s session ID for native resume support
agentId
Section titled “agentId”agentId:
string
Unique agent execution unit ID (stable across connector swaps and restarts)
clientId?
Section titled “clientId?”
optionalclientId?:string
Client identifier for the client application this agent runs under (e.g., ‘claude-code’, ‘codex’). Omit for API-only adapters.
compressionMode?
Section titled “compressionMode?”
optionalcompressionMode?:"manual"|"auto"|"off"
Compression mode for session context management.
createdAt
Section titled “createdAt”createdAt:
number
Timestamp when agent was created (= when added to session)
optionalcwd?:string
Current working directory
harnessId?
Section titled “harnessId?”
optionalharnessId?:string
Resolved harness ID for this agent.
lastActivityAt
Section titled “lastActivityAt”lastActivityAt:
number
Timestamp of last activity (message sent/received)
model?
Section titled “model?”
optionalmodel?:string
Current model identifier
personaId?
Section titled “personaId?”
optionalpersonaId?:string
Persona used to configure this agent (if any).
profileId?
Section titled “profileId?”
optionalprofileId?:string
Profile used to configure this agent (if any).
providerConfigId?
Section titled “providerConfigId?”
optionalproviderConfigId?:string
Provider config UUID for credential/endpoint resolution
role:
"lead"|"member"=AgentRoleSchema
Agent’s role in the session
sessionId
Section titled “sessionId”sessionId:
string
Makaio session this agent belongs to
status
Section titled “status”status:
"active"|"idle"|"dead"|"disposed"=AgentStatusSchema
Agent lifecycle status
Inherited from
Section titled “Inherited from”z.infer.agents
approvalPolicyOverride?
Section titled “approvalPolicyOverride?”
optionalapprovalPolicyOverride?:"always-ask"|"reject"|"full-access"|null
Defined in: ../../../packages/contracts/src/session/schemas/session.ts:110
User-set approval policy override for this session. When set, takes precedence over the persona → profile → harness cascade. Null means “use the cascade” (default behavior).
Inherited from
Section titled “Inherited from”z.infer.approvalPolicyOverride
branchKind?
Section titled “branchKind?”
optionalbranchKind?:"fork"|"branch"|"aside"|"subagent"|"compress"|"rewrite"|"coordinator"
Defined in: ../../../packages/contracts/src/session/schemas/session.ts:52
Type of branch this session represents. Undefined for root sessions (not created from another session).
Inherited from
Section titled “Inherited from”z.infer.branchKind
clientAccountId?
Section titled “clientAccountId?”
optionalclientAccountId?:string
Defined in: ../../../packages/contracts/src/session/schemas/session.ts:71
Canonical client account linked to this session.
Inherited from
Section titled “Inherited from”z.infer.clientAccountId
clientId?
Section titled “clientId?”
optionalclientId?:string
Defined in: ../../../packages/contracts/src/session/schemas/session.ts:69
Client application this session is linked to (for example claude-code).
Inherited from
Section titled “Inherited from”z.infer.clientId
createdAt
Section titled “createdAt”createdAt:
number
Defined in: ../../../packages/contracts/src/session/schemas/session.ts:18
Timestamp when the session was created
Inherited from
Section titled “Inherited from”z.infer.createdAt
executionTargetId?
Section titled “executionTargetId?”
optionalexecutionTargetId?:string
Defined in: ../../../packages/contracts/src/session/schemas/session.ts:103
Stamped execution target — set during first startAgent resolution.
Inherited from
Section titled “Inherited from”z.infer.executionTargetId
forkPointMessageId?
Section titled “forkPointMessageId?”
optionalforkPointMessageId?:string
Defined in: ../../../packages/contracts/src/session/schemas/session.ts:47
Message ID where this session forked from parent. The last message that was copied from parent to this fork. Undefined for root sessions.
Inherited from
Section titled “Inherited from”z.infer.forkPointMessageId
forkTransforms?
Section titled “forkTransforms?”
optionalforkTransforms?:object
Defined in: ../../../packages/contracts/src/session/schemas/session.ts:96
Fork transforms for context projection (fork sessions only). Contains removedMessageIds and appliedPipeline configuration.
appliedPipeline?
Section titled “appliedPipeline?”
optionalappliedPipeline?:object[]
Pipeline steps to apply (must be ‘transformation’ category)
removedMessageIds?
Section titled “removedMessageIds?”
optionalremovedMessageIds?:string[]
Message IDs to exclude from projected context
segments?
Section titled “segments?”
optionalsegments?:object[]
Segment-based context curation policies. When present, supersedes removedMessageIds and appliedPipeline.
Inherited from
Section titled “Inherited from”z.infer.forkTransforms
isImported?
Section titled “isImported?”
optionalisImported?:boolean
Defined in: ../../../packages/contracts/src/session/schemas/session.ts:91
Whether this session was imported from external source.
- true: Imported (allow incremental re-imports)
- false: Created by Makaio runtime (skip on import)
Inherited from
Section titled “Inherited from”z.infer.isImported
isOrchestrated?
Section titled “isOrchestrated?”
optionalisOrchestrated?:boolean
Defined in: ../../../packages/contracts/src/session/schemas/session.ts:79
Whether this session has been modified by Makaio orchestration. False = native session, can use adapter’s native resume. True = Makaio modified history, must inject context.
Inherited from
Section titled “Inherited from”z.infer.isOrchestrated
lastActivityAt
Section titled “lastActivityAt”lastActivityAt:
number
Defined in: ../../../packages/contracts/src/session/schemas/session.ts:20
Timestamp of last activity in the session
Inherited from
Section titled “Inherited from”z.infer.lastActivityAt
lastClientIdentityObservation?
Section titled “lastClientIdentityObservation?”
optionallastClientIdentityObservation?:object
Defined in: ../../../packages/contracts/src/session/schemas/session.ts:73
Latest raw client identity observation persisted for the session.
clientId
Section titled “clientId”clientId:
string
kind:
string
observedAt
Section titled “observedAt”observedAt:
number=EpochMillisecondsSchema
payload
Section titled “payload”payload:
Record<string,unknown> =JsonObjectSchema
source
Section titled “source”source:
string
Inherited from
Section titled “Inherited from”z.infer.lastClientIdentityObservation
leadAgentId?
Section titled “leadAgentId?”
optionalleadAgentId?:string
Defined in: ../../../packages/contracts/src/session/schemas/session.ts:33
Lead agent ID (receives messages by default). Undefined if no agents yet.
Inherited from
Section titled “Inherited from”z.infer.leadAgentId
parentSessionId?
Section titled “parentSessionId?”
optionalparentSessionId?:string
Defined in: ../../../packages/contracts/src/session/schemas/session.ts:35
Parent session ID (for forked sessions). Undefined for root sessions.
Inherited from
Section titled “Inherited from”z.infer.parentSessionId
rootSessionId?
Section titled “rootSessionId?”
optionalrootSessionId?:string
Defined in: ../../../packages/contracts/src/session/schemas/session.ts:41
Root session ID for fork chains. Denormalized for efficient “find all sessions in family” queries. Undefined for root sessions (they ARE the root).
Inherited from
Section titled “Inherited from”z.infer.rootSessionId
sessionId
Section titled “sessionId”sessionId:
string
Defined in: ../../../packages/contracts/src/session/schemas/session.ts:16
Unique session identifier
Inherited from
Section titled “Inherited from”z.infer.sessionId
spawningToolCallId?
Section titled “spawningToolCallId?”
optionalspawningToolCallId?:string
Defined in: ../../../packages/contracts/src/session/schemas/session.ts:105
Tool call ID of the Agent/spawn_subagent invocation that spawned this session. Only present for subagent sessions.
Inherited from
Section titled “Inherited from”z.infer.spawningToolCallId
status
Section titled “status”status:
"active"|"closed"|"archived"|"discovered"
Defined in: ../../../packages/contracts/src/session/schemas/session.ts:31
Current session status.
'active': Ongoing session, agent is running or paused.'closed': Completed session, no longer active.'archived': Manually archived by the user.'discovered': Stub created from log discovery; full import not yet done.
Inherited from
Section titled “Inherited from”z.infer.status
summary?
Section titled “summary?”
optionalsummary?:string
Defined in: ../../../packages/contracts/src/session/schemas/session.ts:83
Session summary for search and context. Undefined until generated.
Inherited from
Section titled “Inherited from”z.infer.summary
summaryUpdatedAt?
Section titled “summaryUpdatedAt?”
optionalsummaryUpdatedAt?:number
Defined in: ../../../packages/contracts/src/session/schemas/session.ts:85
Timestamp when summary was last updated. Used to detect staleness.
Inherited from
Section titled “Inherited from”z.infer.summaryUpdatedAt
targetWorkingDirectory?
Section titled “targetWorkingDirectory?”
optionaltargetWorkingDirectory?:string
Defined in: ../../../packages/contracts/src/session/schemas/session.ts:101
Target working directory for this session. Used to override the default working directory for forked sessions.
Inherited from
Section titled “Inherited from”z.infer.targetWorkingDirectory
title?
Section titled “title?”
optionaltitle?:string
Defined in: ../../../packages/contracts/src/session/schemas/session.ts:81
Session title for sidebar display. Undefined until generated.
Inherited from
Section titled “Inherited from”z.infer.title