/** * SkillShield — Cryptographic Audit Trail * * Hash-chained log of every action during skill execution. * Each entry is linked to the previous via SHA-256, creating * a tamper-evident chain (like Aegis, but integrated with our * scanner + runtime instead of being a separate tool). */ export interface AuditEntry { /** Sequential ID */ id: number; /** ISO 8601 timestamp */ timestamp: string; /** SHA-256 hash of this entry (computed from content + previousHash) */ hash: string; /** Hash of the previous entry (genesis = "0") */ previousHash: string; /** Type of event */ type: AuditEventType; /** Skill being executed */ skillId: string; /** Human-readable description */ description: string; /** Structured data for the event */ data?: Record; /** Severity of the event */ severity: 'INFO' | 'WARN' | 'CRITICAL'; } export type AuditEventType = 'SCAN_START' | 'SCAN_COMPLETE' | 'THREAT_FOUND' | 'EXECUTION_START' | 'EXECUTION_END' | 'NETWORK_REQUEST' | 'NETWORK_BLOCKED' | 'FILE_READ' | 'FILE_WRITE' | 'FILE_BLOCKED' | 'KILL_SWITCH' | 'POLICY_VIOLATION' | 'RESOURCE_LIMIT' | 'APPROVAL' | 'REJECTION'; export declare class AuditTrail { private chain; private skillId; constructor(skillId: string); /** * Record an event in the audit trail. */ record(type: AuditEventType, description: string, severity?: AuditEntry['severity'], data?: Record): AuditEntry; scanStart(patterns: number, categories: number): AuditEntry; scanComplete(score: number, threats: number, status: string): AuditEntry; threatFound(patternId: string, category: string, severity: string, evidence: string): AuditEntry; executionStart(sandbox: string, policies: string[]): AuditEntry; executionEnd(exitCode: number | null, durationMs: number, killed: boolean): AuditEntry; networkBlocked(domain: string, reason: string): AuditEntry; fileBlocked(path: string, operation: string, reason: string): AuditEntry; killSwitch(reason: string): AuditEntry; /** * Verify the integrity of the entire chain. * Returns true if no tampering detected. */ verify(): { valid: boolean; brokenAt?: number; details?: string; }; /** * Export the full chain as JSON (for storage / compliance). */ toJSON(): string; /** * Export as compact summary for CLI display. */ toSummary(): string; getChain(): AuditEntry[]; getLength(): number; getLatestHash(): string | null; } //# sourceMappingURL=audit-trail.d.ts.map