Skip to content

Interface: ConnectorSendMessageOptions

Makaio Framework


Makaio Framework / ai-adapters-core / ConnectorSendMessageOptions

Defined in: ../../../adapters/core/src/agent/types.ts:297

Options for connector-level message operations. Extends AgentSendMessageOptions with turnContext for internal AIAgent to Connector communication. AIAgent extracts sessionContext.turnContext and passes it here. Inherits responseSchema from AgentSendMessageOptions.

optional deliveryMode?: "replace" | "enqueue" | "immediate"

Defined in: ../../../adapters/core/src/message-handle/types.ts:38

Controls delivery behavior.

'enqueue'

AgentSendMessageOptions.deliveryMode


optional messageHistory?: object[]

Defined in: ../../../adapters/core/src/agent/types.ts:260

Curated message history from orchestration layer

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"

AgentSendMessageOptions.messageHistory


optional messageId?: string

Defined in: ../../../adapters/core/src/message-handle/types.ts:32

Custom identifier for message tracking (generated if not provided).

AgentSendMessageOptions.messageId


optional responseSchema?: Record<string, unknown>

Defined in: ../../../adapters/core/src/agent/types.ts:282

JSON Schema for structured output. When present and the adapter declares structuredOutput capability, the adapter enforces this schema at the model level. Ignored by adapters that lack the capability.

AgentSendMessageOptions.responseSchema


optional sessionContext?: object

Defined in: ../../../adapters/core/src/agent/types.ts:274

Context signals assembled by SessionOrchestrator. Used by AIAgent to decide: native resume vs fresh with history. Hooks inject context via sessionContext.turnContext (set by replacePayload).

optional extractedContext?: unknown

Structured context from compression (if hasCompression=true).

optional hasCompression?: boolean

Whether compression is active (extractedContext present). If true, Agent should use fresh mode with compressed context.

optional hasConnectorSwap?: boolean

Whether a connector swap occurred before this message (e.g., cwd/model change). If true, native resume is infeasible and adapters should use fresh mode.

optional hasNewTransforms?: boolean

Whether transforms have been applied since last turn. If true, Agent should use fresh mode (history changed).

optional isFirstTurn?: boolean

Whether this is the first turn in the session. If true, no native history exists yet.

optional messageHistory?: object[]

Curated message history assembled via getFullConversation(). Only used if Agent decides to inject (fresh mode).

optional turnContext?: Record<string, JsonValue>

Turn-scoped context assembled by PreUserMessage hooks and the orchestrator. Keys are plugin-defined (e.g., ‘skillCatalog’, ‘skills’, ‘predictedTools’). Adapters consume this to prepend context blocks.

Constrained to JSON-safe types to ensure serialization succeeds.

ADAPTER CONTRACT: Every adapter MUST materialize turnContext into the LLM-facing message using serializeTurnContext().

AgentSendMessageOptions.sessionContext


optional systemPrompt?: string | { content: string; mode: "append"; }

Defined in: ../../../adapters/core/src/agent/types.ts:267

System prompt configuration.

  • string: Replace/set the entire system prompt
  • { mode: 'append', content: string }: Append to adapter’s default system prompt

AgentSendMessageOptions.systemPrompt


optional turnContext?: Record<string, JsonValue>

Defined in: ../../../adapters/core/src/agent/types.ts:306

Turn-scoped context assembled by PreUserMessage hooks and the orchestrator. Extracted from sessionContext.turnContext by AIAgent. Adapters use this to prepend context blocks to the SDK message.

ADAPTER CONTRACT: Every adapter MUST materialize turnContext into the LLM-facing message using serializeTurnContext().