feat(session): persist model tier overrides per session

Store per-session config in SQLite and route /model and /reset through command fast-paths so channel sessions keep independent model selection across reconnects and restarts.
This commit is contained in:
William Valentin
2026-02-13 01:04:26 -08:00
parent 3472a0b926
commit 9f81c01603
35 changed files with 1438 additions and 144 deletions
+20
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'
// Skills installer
| 'skills.installer.execution_blocked' | 'skills.installer.command_result'
// Session lifecycle
| 'session.create' | 'session.message' | 'session.delete' | 'session.transfer' | 'session.compact'
// Automation - Cron
@@ -75,6 +77,24 @@ export interface ToolDeniedEvent {
denial_type: 'policy' | 'hook' | 'not_found' | 'autonomy_override';
}
export interface SkillsInstallerExecutionBlockedEvent {
skill_name: string;
phase: 'install' | 'execute';
execution_requested: boolean;
execution_enabled: boolean;
reason: string;
attempted_command_count: number;
}
export interface SkillsInstallerCommandResultEvent {
skill_name: string;
phase: 'install' | 'execute';
installer_type: string;
command: string;
status: 'blocked' | 'skipped' | 'succeeded' | 'failed';
reason: string;
}
export interface SessionCreateEvent {
session_id: string;
frontend: string;