import type { AgentSystem } from "../types.js"; import type { ChatSystemMessage } from "../../chat/types.js"; import type { ProviderModelMessage } from "../../chat/types.js"; import type { Message as AgentMessage } from "../schemas/index.js"; /** Public API contract for hosted child fork runtime step system resolver. */ export type HostedChildForkRuntimeStepSystemResolver = (input: { /** Flattened system text retained for compatibility with existing resolvers. */ system: string; /** Structured system messages when provider metadata is available. */ structuredSystem?: readonly ChatSystemMessage[]; compactedMessages: readonly ProviderModelMessage[]; }) => AgentSystem | null | undefined; /** Input payload for prepare hosted child fork runtime step messages. */ export type PrepareHostedChildForkRuntimeStepMessagesInput = { messages: AgentMessage[]; buildInstructions: () => AgentSystem; forkToolNames: readonly string[]; /** Provider-options key used by the child model runtime. */ providerOptionKey?: string; resolveSystem?: HostedChildForkRuntimeStepSystemResolver; /** * Tool names that are always present. Required when `getActivatedToolNames` * is supplied. * * @deprecated No framework path supplies this. Retained because * `PrepareHostedChildForkRuntimeStepMessagesInput` is public API. */ pinnedToolNames?: readonly string[]; /** * Returns the currently activated tool names. The result is merged with * `pinnedToolNames` and returned as `forkToolNames`, letting a caller refresh * the exposed tool set per step without mutating its own fixed array. * * @deprecated Use `tool_search` deferred loading. See * `docs/architecture/28-model-driven-tool-discovery.md`. */ getActivatedToolNames?: () => readonly string[]; }; /** Public API contract for hosted child fork runtime step messages. */ export type HostedChildForkRuntimeStepMessages = { messages: AgentMessage[]; system: AgentSystem; /** * The live `pinned + activated` set for this step. Present only when * `getActivatedToolNames` was supplied; callers otherwise keep their own * fixed `forkToolNames`. */ forkToolNames?: readonly string[]; }; /** Clone structured child instructions before exposing them to a resolver. */ export declare function cloneHostedChildForkRuntimeStepSystem(system: ChatSystemMessage[], providerOptionKey: string | undefined, proxyDetectionAvailable?: boolean): ChatSystemMessage[]; /** Convert compacted provider messages to child fork runtime messages. */ export declare function convertCompactedProviderMessagesToChildForkRuntimeMessages(compactedMessages: readonly ProviderModelMessage[]): AgentMessage[]; /** Prepare hosted child fork runtime step messages. */ export declare function prepareHostedChildForkRuntimeStepMessages(input: PrepareHostedChildForkRuntimeStepMessagesInput): HostedChildForkRuntimeStepMessages; //# sourceMappingURL=child-fork-step-message-preparation.d.ts.map