import type { ContextBlock, InstructionContext, InstructionInjector, SystemPromptContribution } from "./contracts.js"; import type { ContributionRegistry } from "./contributions.js"; /** Run each selected injector against `ctx`, returning the matching contributions as * `package`-source `SystemPromptContribution[]` (for `composeSystemPrompt`) and * `ContextBlock[]` (for the context merge). Aborts on `ctx.signal`. Non-matching * injectors contribute nothing; only `instructions`/`contextBlocks` are honored — * injectors cannot register tools, skills, or permissions. */ export declare function runInstructionInjectors(injectors: readonly InstructionInjector[], ctx: InstructionContext): { readonly instructions: readonly SystemPromptContribution[]; readonly contextBlocks: readonly ContextBlock[]; }; export interface ResolveInstructionInjectorsOptions { /** Explicit injector list (e.g. from AgentConfig/RunOptions). Returned as-is when `names` is absent. */ readonly configured?: readonly InstructionInjector[]; /** Registry to resolve `names` against. */ readonly registry?: ContributionRegistry; /** Names resolved against `registry` (fail closed on miss); ignored when `configured` is set. */ readonly names?: readonly string[]; } /** * Resolve the effective injector list for a run. Mirrors {@link resolveActiveSkills} * fail-closed name resolution. When `configured` is provided it wins (RunOptions * supplies an explicit list); otherwise names are resolved against `registry`. * An unknown name throws `Unknown instruction injector: `. * * ponytail: no toolNames enforcement — injectors grant no tools (unlike skills). */ export declare function resolveInstructionInjectors(options: ResolveInstructionInjectorsOptions): readonly InstructionInjector[];