/** * Prompt injection sanitizer — strips common injection patterns from agent outputs. * Applied at the boundary where sub-agent results re-enter the orchestrator's context. */ export interface SanitizeResult { text: string; flagged: boolean; warnings: string[]; } export interface ResearchArtifactEnvelope { query: string; scope: string; sources: string[]; findings: string[]; open_questions: string[]; next_actions: string[]; } interface ArtifactBuildOptions { query?: string; scope?: string; } /** * Sanitize text from agent outputs to prevent prompt injection. * Returns the cleaned text plus any warnings. */ export declare function sanitizeAgentOutput(input: unknown): SanitizeResult; export declare function buildResearchArtifactEnvelope(input: unknown, options?: ArtifactBuildOptions): ResearchArtifactEnvelope; export declare function formatResearchArtifactEnvelope(envelope: ResearchArtifactEnvelope): string; /** * Apply sanitizer to a spawn_agent result string. * Adds a warning banner if injection was detected. */ export declare function sanitizeSpawnResult(result: unknown): string; export {};