Skip to content

Interface: ForkOptions

Makaio Framework


Makaio Framework / contracts / ForkOptions

Defined in: ../../../packages/contracts/src/session/schemas/extension-context.ts:6

Options for forking a session.

optional inheritContext?: boolean

Defined in: ../../../packages/contracts/src/session/schemas/extension-context.ts:14

Whether to copy parent’s context to child (default: true)


optional initialMessage?: object

Defined in: ../../../packages/contracts/src/session/schemas/extension-context.ts:12

Initial message for child session

blocks: { content: string; type: "text"; } | { source: { data: string; mimeType: string; type: "base64"; } | { mimeType?: string; type: "url"; url: string; }; type: "image"; } | { source: { data: string; mimeType: string; type: "base64"; } | { mimeType?: string; type: "url"; url: string; }; type: "document"; } | { attachmentType: "file" | "directory"; displayName?: string; fileName: string; filePath: string; source: { data: string; mimeType: string; type: "base64"; } | { mimeType?: string; type: "url"; url: string; }; type: "attachment"; } | { content: string; metadata?: Record<string, unknown>; type: "reasoning"; } | { args: Record<string, unknown>; name: string; toolCallId: string; type: "tool_call"; } | { isError?: boolean; output: string; toolCallId: string; type: "tool_output"; } | ({ content: string; type: "text"; } | { source: { data: string; mimeType: string; type: "base64"; } | { mimeType?: string; type: "url"; url: string; }; type: "image"; } | { source: { data: string; mimeType: string; type: "base64"; } | { mimeType?: string; type: "url"; url: string; }; type: "document"; } | { attachmentType: "file" | "directory"; displayName?: string; fileName: string; filePath: string; source: { data: string; mimeType: string; type: "base64"; } | { mimeType?: string; type: "url"; url: string; }; type: "attachment"; } | { content: string; metadata?: Record<string, unknown>; type: "reasoning"; } | { args: Record<string, unknown>; name: string; toolCallId: string; type: "tool_call"; } | { isError?: boolean; output: string; toolCallId: string; type: "tool_output"; })[]

{ content: string; type: "text"; }


{ source: { data: string; mimeType: string; type: "base64"; } | { mimeType?: string; type: "url"; url: string; }; type: "image"; }


{ source: { data: string; mimeType: string; type: "base64"; } | { mimeType?: string; type: "url"; url: string; }; type: "document"; }


{ attachmentType: "file" | "directory"; displayName?: string; fileName: string; filePath: string; source: { data: string; mimeType: string; type: "base64"; } | { mimeType?: string; type: "url"; url: string; }; type: "attachment"; }

attachmentType: "file" | "directory" = AttachmentTypeSchema

Whether the attachment is a file or directory

optional displayName?: string

Optional human-readable display name override

fileName: string

Original filename with extension (e.g. “api-spec.yaml”) — for display and type inference

filePath: string

Server-side file path — always populated before message reaches adapters

source: { data: string; mimeType: string; type: "base64"; } | { mimeType?: string; type: "url"; url: string; } = ContentSourceSchema

Inline content — base64 for binary, raw string for text

type: "attachment"


{ content: string; metadata?: Record<string, unknown>; type: "reasoning"; }

content: string

optional metadata?: Record<string, unknown>

Optional provider/runtime metadata for reasoning blocks.

type: "reasoning"


{ args: Record<string, unknown>; name: string; toolCallId: string; type: "tool_call"; }


{ isError?: boolean; output: string; toolCallId: string; type: "tool_output"; }


({ content: string; type: "text"; } | { source: { data: string; mimeType: string; type: "base64"; } | { mimeType?: string; type: "url"; url: string; }; type: "image"; } | { source: { data: string; mimeType: string; type: "base64"; } | { mimeType?: string; type: "url"; url: string; }; type: "document"; } | { attachmentType: "file" | "directory"; displayName?: string; fileName: string; filePath: string; source: { data: string; mimeType: string; type: "base64"; } | { mimeType?: string; type: "url"; url: string; }; type: "attachment"; } | { content: string; metadata?: Record<string, unknown>; type: "reasoning"; } | { args: Record<string, unknown>; name: string; toolCallId: string; type: "tool_call"; } | { isError?: boolean; output: string; toolCallId: string; type: "tool_output"; })[]

optional role?: "user" | "assistant" | "system"


reason: string

Defined in: ../../../packages/contracts/src/session/schemas/extension-context.ts:8

Why this fork was created (for audit)


optional targetAgentId?: string

Defined in: ../../../packages/contracts/src/session/schemas/extension-context.ts:10

Which agent should handle the child session