import type { MemoryRegistry } from '../state/index.js'; import type { AgentRecord } from '../tools/agent/index.js'; type PromptContextDeps = { readonly workingDirectory: string; readonly knowledgeService?: { buildPromptPacketSync(task: string, writeScope?: readonly string[]): string | null; } | undefined; readonly memoryRegistry?: Pick | undefined; readonly archetypeLoader?: { loadArchetype(template: string): { systemPrompt?: string | undefined; } | null | undefined; } | undefined; }; /** * Build a layered system prompt from base instructions, archetype, project * context, conventions, knowledge injections, and task text. */ export declare function buildOrchestratorSystemPrompt(record: AgentRecord, skipLayers?: Set, deps?: PromptContextDeps): string; /** * Build a system prompt with progressively fewer layers based on token budget. * Layer order (dropped last to first when space is tight): * Layer 5: Task (always included) * Layer 1: Base instructions (always included) * Layer 2: Archetype overlay (always included) * Layer 3: Project context (dropped first when tight) * Layer 4: Conventions (dropped first when tightest) * * When remainingTokens is 0, returns the minimal prompt (layers 1+2+5 only). */ export declare function buildLayeredOrchestratorSystemPrompt(record: AgentRecord, remainingTokens: number, deps?: PromptContextDeps): string; /** * Append the owner profile's OPEN tier to a system prompt, if there is one. * * Lives here because this file is where a system prompt is assembled, and it is * reached from both per-turn composers, the main conversation loop's * (`core/orchestrator-turn-loop.ts`) and the agent runner's, so the wording * exists once and the two surfaces cannot drift. * * Two invariants the callers must keep, both of which cost real prompt tokens * when broken: * * - **Compose, never write back.** Call this on the way into the provider, on * the CURRENT base string, and throw the result away. Storing the result * back into a cached base makes the block compound once per tool round. * - **Absent is absent.** No profile, profile disabled, `profile.injectOpenTier` * off, or nothing in the open tier ⇒ the base comes back untouched. There is * deliberately no "profile unavailable" placeholder: that would put a file * path in front of the model on every single turn and buy nothing. * * The CLOSED tier, the owner's name, contact details, home address, everything * commercial, and the People / Places / Work / Notes sections, is never * injected by this or any other path. See docs/owner-profile.md §11.2. */ export declare function withOpenTierProfileBlock(base: string): string; export {}; //# sourceMappingURL=orchestrator-prompts.d.ts.map