feat(security): add /elevate command and audit events

This commit is contained in:
William Valentin
2026-02-15 16:56:49 -08:00
parent 692a0c5ea3
commit 735f14d0b1
6 changed files with 93 additions and 1 deletions
+12
View File
@@ -3,6 +3,8 @@ export type AuditLevel = 'debug' | 'info' | 'warn' | 'error';
export type AuditEventType =
// Tool execution
| 'tool.start' | 'tool.success' | 'tool.error' | 'tool.denied' | 'tool.approval'
// Security
| 'security.elevation.enabled' | 'security.elevation.disabled' | 'security.elevation.expired'
// Skills scan
| 'skills.scan.pass' | 'skills.scan.fail'
// Skills installer
@@ -134,6 +136,16 @@ export interface SkillsScanEvent {
issue_codes: string[];
}
export interface SecurityElevationEvent {
session_id: string;
channel: string;
sender: string;
elevation_id: string;
until_ms?: number;
ttl_ms?: number;
reason?: string;
}
export interface SessionCreateEvent {
session_id: string;
frontend: string;