Initial MVP: Claude Permission Observability CLI tool

This commit is contained in:
Bun Bun
2026-06-16 00:30:52 +00:00
commit 50a2f9058c
14 changed files with 1701 additions and 0 deletions
+54
View File
@@ -0,0 +1,54 @@
export interface PermissionRule {
type: 'file' | 'command' | 'network' | 'env';
pattern: string;
action: 'allow' | 'deny' | 'warn';
description?: string;
}
export interface PermissionManifest {
name: string;
version: string;
rules: PermissionRule[];
defaultAction: 'allow' | 'deny' | 'warn';
compression: {
enabled: boolean;
maxTrailSize: number; // in MB
retentionDays: number;
};
sensitivePatterns: string[];
}
export interface AgentAction {
id: string;
timestamp: Date;
agentId: string;
type: 'file' | 'command' | 'network' | 'env' | 'bypass_attempt';
action: string;
target: string;
resolvedAction: 'allow' | 'deny' | 'warn' | 'unknown';
matchedRule?: string;
details?: Record<string, unknown>;
}
export interface AuditTrail {
manifest: string;
startedAt: Date;
endedAt?: Date;
actions: AgentAction[];
summary: {
total: number;
allowed: number;
denied: number;
warned: number;
bypassAttempts: number;
};
}
export interface ViolationReport {
timestamp: Date;
manifest: string;
violations: AgentAction[];
topViolatedRules: Array<{ rule: string; count: number }>;
topAgents: Array<{ agentId: string; violations: number }>;
riskScore: number; // 0-100
}