Skip to content

Interface: ConfigFactoryInput<TBus>

Makaio Framework


Makaio Framework / ai-adapters-core / ConfigFactoryInput

Defined in: ../../../adapters/core/src/adapter/ai-adapter-config.ts:27

Input provided by agent to the config factory. Contains partial configuration - adapters provide defaults for missing required fields.

Includes all runtime options from StartAgentRequest (allowedTools, disallowedTools, etc.) to ensure they flow through to the connector.

TBus extends ScopedBus<string> = ScopedBus<string>

adapterId: string

Defined in: ../../../adapters/core/src/adapter/ai-adapter-config.ts:33

Adapter instance identifier (required - provided by AIAgent from adapter)


adapterName: string

Defined in: ../../../adapters/core/src/adapter/ai-adapter-config.ts:35

Adapter type name (required - provided by AIAgent from adapter)


optional adapterSessionId?: string

Defined in: ../../../adapters/core/src/adapter/ai-adapter-config.ts:42

Provider’s session ID for resuming existing conversations


agentId: string

Defined in: ../../../adapters/core/src/adapter/ai-adapter-config.ts:31

Unique agent identifier (required - generated by AIAgent)


optional allowedDirectories?: string[]

Defined in: ../../../adapters/core/src/adapter/ai-adapter-config.ts:66

Directory restrictions for file-system tool execution.


optional allowedTools?: string[]

Defined in: ../../../adapters/core/src/adapter/ai-adapter-config.ts:62

Allowed tool names (adapter-specific). Empty array = disable all tools.


bus: TBus

Defined in: ../../../adapters/core/src/adapter/ai-adapter-config.ts:29

Scoped bus for adapter-specific events


optional clientId?: string

Defined in: ../../../adapters/core/src/adapter/ai-adapter-config.ts:74

Client identifier for the application this adapter belongs to (e.g., ‘claude-code’, ‘gemini’).


optional cwd?: string

Defined in: ../../../adapters/core/src/adapter/ai-adapter-config.ts:50

Working directory for agent execution


optional disallowedTools?: string[]

Defined in: ../../../adapters/core/src/adapter/ai-adapter-config.ts:64

Disallowed tool names (adapter-specific). Takes precedence over allowedTools.


optional env?: Record<string, string>

Defined in: ../../../adapters/core/src/adapter/ai-adapter-config.ts:52

Environment variables to pass to agent execution


optional errorHandler?: (error, terminate) => void

Defined in: ../../../adapters/core/src/adapter/ai-adapter-config.ts:58

Error handler for connector errors

Error

boolean

void


optional mcpSessionContext?: { directTools: object[]; discoverableTools: object[]; profileId: string | null; projectId: string | null; servers: object[]; sessionId: string; } | LedgerSessionContext

Defined in: ../../../adapters/core/src/adapter/ai-adapter-config.ts:80

Resolved MCP session context including upstream server configs. When present, native-passthrough adapters use servers to configure SDK MCP connections.

{ directTools: object[]; discoverableTools: object[]; profileId: string | null; projectId: string | null; servers: object[]; sessionId: string; }

directTools: object[]

Tools resolved as direct-inject for this session

discoverableTools: object[]

Tools available for discovery in this session

profileId: string | null

Profile identifier (null for default)

projectId: string | null

Project identifier (null for global)

servers: object[]

Servers enabled for this session (post-project-filter)

sessionId: string

Session identifier


LedgerSessionContext


optional model?: string

Defined in: ../../../adapters/core/src/adapter/ai-adapter-config.ts:48

Model to use - optional, adapters provide defaults


optional providerConfig?: Record<string, unknown>

Defined in: ../../../adapters/core/src/adapter/ai-adapter-config.ts:69

Provider-specific configuration (non-credential settings). Adapters merge with defaults.


providerContext: object

Defined in: ../../../adapters/core/src/adapter/ai-adapter-config.ts:40

Unresolved provider context (credential refs, not plaintext). Connectors resolve credentials locally via resolveConnectorCredentials().

optional credentialEnvVars?: Record<string, string>

Maps credential keys to environment variable names for subprocess adapters. E.g., { apiKey: 'ANTHROPIC_API_KEY' }.

credentialRefs: Record<string, string & $brand<"CredentialRef">>

Credential references resolved at the connector layer, not on the bus.

definitionId: string

Provider definition ID (e.g., 'anthropic', 'alibaba').

optional endpointOverrides?: object

Endpoint URL overrides keyed by protocol.

optional anthropic?: string

optional openai?: string

providerConfigId: string

Provider config UUID. Links back to the ProviderConfig that produced this context.


optional reasoningEffort?: "none" | "low" | "medium" | "high" | "extra-high"

Defined in: ../../../adapters/core/src/adapter/ai-adapter-config.ts:54

Reasoning effort for supporting adapters


optional resumeAdapterSessionId?: string

Defined in: ../../../adapters/core/src/adapter/ai-adapter-config.ts:46

Previous adapter session ID for resume attempts (from recovery).


optional runtimeTimeouts?: Partial<RequiredTimeoutConfig>

Defined in: ../../../adapters/core/src/adapter/ai-adapter-config.ts:71


optional sessionId?: string

Defined in: ../../../adapters/core/src/adapter/ai-adapter-config.ts:44

Makaio session ID for tool execution context and multi-session correlation


optional supportedReasoningLevels?: object

Defined in: ../../../adapters/core/src/adapter/ai-adapter-config.ts:56

Reasoning levels supported by the resolved model, forwarded to the connector.

optional extra-high?: string | number = reasoningLevelValue

optional high?: string | number = reasoningLevelValue

optional low?: string | number = reasoningLevelValue

optional medium?: string | number = reasoningLevelValue

optional none?: string | number = reasoningLevelValue


optional toolLedger?: ISessionToolLedger

Defined in: ../../../adapters/core/src/adapter/ai-adapter-config.ts:85

Session-scoped MCP tool ledger. Passed through unchanged so connectors can track injection and mcp_call usage.