import type { ExecutionContext } from '../core/ExecutionContext.ts'; export type SkillIntegrityStatus = 'clean' | 'drift' | 'corrupt' | 'no-lockfile' | 'missing'; /** Reasons that surface the integrity gate as inactive or violated — everything except 'clean'. */ export type SkillIntegrityFailure = 'drift' | 'corrupt' | 'no-lockfile' | 'missing'; export interface SkillIntegrityOptions { lockfilePath?: string; } /** * Injection-time persistence-vector check (ADR-020, extended by #604): the member * SKILL.md is injected into the system prompt like the paper's SOUL.md, so hash it * against agenthood.lock at prompt-assembly time. Drift means the injected file may * have been tampered with (a mind-virus persistence vector); a corrupt lockfile is * treated as suspicious rather than silently skipped, since tampering may also leave * the lock unreadable. When the lock entry carries `resources`, the member's * scripts/ and references/ are checked too — those are the files that execute. * Pure — never throws; callers decide whether drift/corruption is a hard block. */ export declare function checkSkillIntegrity(member: string, skillPath: string, options?: SkillIntegrityOptions): SkillIntegrityStatus; export declare function collectResourceHashes(memberDir: string): Record; export declare function checkResourceIntegrity(memberDir: string, locked?: Record): string[]; /** * Single source for mapping an integrity failure reason to its canonical * human phrase. Every consumer (SkillIntegrityError, the durable record, and * the console warning) composes from this so the operator-facing vocabulary * cannot drift between spellings. Per-surface *guidance* text intentionally * differs (a strict-mode throw tells the operator what to fix; a warning * tells them the run continued and how to re-lock) — only the reason phrases * are centralized here. */ export declare function describeIntegrityFailure(member: string, reason: SkillIntegrityFailure): string; /** Thrown by the caller when strict mode turns a detected integrity failure into a hard block. */ export declare class SkillIntegrityError extends Error { constructor(member: string, reason: SkillIntegrityFailure); } /** * Records a drift/corruption detection durably into decisions + provenance so * the audit trail survives regardless of whether the caller warns or blocks * next. Non-fatal: a recording failure never aborts the member run. */ export declare function recordSkillIntegrityDrift(context: ExecutionContext, member: string, reason?: SkillIntegrityFailure): Promise; //# sourceMappingURL=skillIntegrity.d.ts.map