Variable: AgentRuntimeSchemas
Makaio Framework / services-core/agent-runtime/schemas / AgentRuntimeSchemas
Variable: AgentRuntimeSchemas
Section titled “Variable: AgentRuntimeSchemas”
constAgentRuntimeSchemas:object
Defined in: ../../../packages/services/core/src/agent-runtime/schemas.ts:93
Schemas for the agentRuntime bus namespace.
Framework-tier spawn/get/send/kill protocol for tool-spawned agents.
Replaces PersonaRuntimeSubjects and ProfileRuntimeSubjects as the
single interface framework tools use to spawn agents by runtime-compatible
selections. Transient selections such as canonical-model must resolve
before this boundary.
Host packages register the handler that dispatches on agent.kind to
the appropriate domain service (PersonaService, ProfileService, etc.).
Type Declaration
Section titled “Type Declaration”completed
Section titled “completed”completed:
ZodObject<{error:ZodOptional<ZodString>;instanceId:ZodString;result:ZodOptional<ZodString>;success:ZodBoolean; },$strip>
Emitted when an agent instance completes or fails.
Subject: agentRuntime.completed
Type: Event (fire-and-forget)
get:
object
Get the status of a spawned agent instance.
Subject: agentRuntime.get
Type: Request (RPC)
get.request
Section titled “get.request”request:
ZodObject<{instanceId:ZodString; },$strip>
get.response
Section titled “get.response”response:
ZodObject<{displayName:ZodString;error:ZodOptional<ZodString>;instanceId:ZodString;kind:ZodString;progress:ZodOptional<ZodArray<ZodString>>;result:ZodOptional<ZodString>;status:ZodEnum<{cancelled:"cancelled";completed:"completed";failed:"failed";running:"running";waiting_input:"waiting_input"; }>;subagentId:ZodString; },$strip> =AgentInstanceStatusSchema
kill:
object
Kill a running agent instance.
Subject: agentRuntime.kill
Type: Request (RPC)
kill.request
Section titled “kill.request”request:
ZodObject<{instanceId:ZodString; },$strip>
kill.response
Section titled “kill.response”response:
ZodObject<{killed:ZodBoolean; },$strip>
send:
object
Send a message to a running agent instance.
Subject: agentRuntime.send
Type: Request (RPC)
send.request
Section titled “send.request”request:
ZodObject<{content:ZodString;instanceId:ZodString; },$strip>
send.response
Section titled “send.response”response:
ZodObject<{sent:ZodBoolean; },$strip>
spawn:
object
Spawn an agent from a runtime-compatible selection.
Subject: agentRuntime.spawn
Type: Request (RPC)
The host-tier handler resolves the selection (persona → profile → config),
creates a subagent via SubagentSubjects.spawn, and returns the instance ID.
Example
Section titled “Example”// Framework tool spawns by persona ID (no host imports needed)const { instanceId } = await bus.request(AgentRuntimeSubjects.spawn, { agent: { kind: 'persona', personaId: 'p-123' }, prompt: 'Explore the authentication module', sessionId: parentSessionId,});spawn.request
Section titled “spawn.request”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> &ZodType<{[key:string]:unknown;adapterId?:string;adapterName?:string;allowedDirectories?:string[];allowedTools?:string[];cwd?:string;disallowedTools?:string[];kind:"adapter";model?:string;providerConfigId?:string;reasoningEffort?:"none"|"low"|"medium"|"high"|"extra-high";systemPrompt?:string| {content:string;mode:"append"; }; }, {[key:string]:unknown;allowedDirectories?:string[];allowedTools?:string[];cwd?:string;disallowedTools?:string[];kind:string;model?:string;providerConfigId?:string;reasoningEffort?:"none"|"low"|"medium"|"high"|"extra-high";systemPrompt?:string| {content:string;mode:"append"; }; },$ZodTypeInternals<{[key:string]:unknown;adapterId?:string;adapterName?:string;allowedDirectories?:string[];allowedTools?:string[];cwd?:string;disallowedTools?:string[];kind:"adapter";model?:string;providerConfigId?:string;reasoningEffort?:"none"|"low"|"medium"|"high"|"extra-high";systemPrompt?:string| {content:string;mode:"append"; }; }, {[key:string]:unknown;allowedDirectories?:string[];allowedTools?:string[];cwd?:string;disallowedTools?:string[];kind:string;model?:string;providerConfigId?:string;reasoningEffort?:"none"|"low"|"medium"|"high"|"extra-high";systemPrompt?:string| {content:string;mode:"append"; }; }>>;projectId:ZodOptional<ZodString>;prompt:ZodString;sessionId:ZodString; },$strip>
spawn.response
Section titled “spawn.response”response:
ZodObject<{instanceId:ZodString; },$strip>
spawned
Section titled “spawned”spawned:
ZodObject<{displayName:ZodString;instanceId:ZodString;kind:ZodString; },$strip>
Emitted when an agent instance is spawned.
Subject: agentRuntime.spawned
Type: Event (fire-and-forget)