/** * Internal Agent Run System Prompt * * Composes the system prompt for project-runtime agent runs, mirroring the * hosted chat runtime's instruction assembly. Before this, internal runs used * the agent's authored instructions verbatim, so request-scoped agents (e.g. * Studio-created project agents) never learned the project reference, branch, * Studio environment context, or effective tool surface of the run they were * executing in and asked users for values the harness already knew. * * The composed prompt extends the agent's resolved base instructions (which * already include the factory's visible skill catalog) with: * - the shared project-context block (project reference + branch) * - the requested model * - the caller-supplied environment context (`studio_context` context item) * - the effective run tool inventory * * @module */ import type { Agent, AgentSystem } from "../agent/index.js"; import type { ChatSystemMessage } from "../chat/types.js"; import type { RuntimeRunAgentInput } from "./schema.js"; import type { ModelRuntime } from "../provider/index.js"; /** Caller-supplied run context extracted from the `studio_context` item. */ export type InternalAgentStudioRunContext = { environmentContext?: string; projectId?: string; branchId?: string | null; }; /** Extracts the Studio-supplied run context from run context items. */ export declare function getInternalAgentStudioRunContext(context: RuntimeRunAgentInput["context"]): InternalAgentStudioRunContext; /** Input payload for compose internal agent run system prompt. */ export type ComposeInternalAgentRunSystemPromptInput = { agent: Agent; resolvedBaseSystem?: AgentSystem; runInput: RuntimeRunAgentInput; projectId?: string | null; branchId?: string | null; toolNames: readonly string[]; providerOptionKey?: string; modelRuntime?: ModelRuntime; }; /** Composes the internal agent run system prompt. */ export declare function composeInternalAgentRunSystemPrompt(input: ComposeInternalAgentRunSystemPromptInput): Promise; //# sourceMappingURL=run-system-prompt.d.ts.map