feat(skills): add install-by-registry-id flow
This commit is contained in:
@@ -11,6 +11,7 @@ import type {
|
||||
SkillsInstallerExecutionBlockedEvent,
|
||||
SkillsInstallerCommandResultEvent,
|
||||
SkillsScanEvent,
|
||||
SkillsRegistryInstallEvent,
|
||||
SessionCreateEvent,
|
||||
SessionMessageEvent,
|
||||
SessionDeleteEvent,
|
||||
@@ -126,6 +127,16 @@ export class AuditLogger {
|
||||
});
|
||||
}
|
||||
|
||||
skillsRegistryInstall(event: SkillsRegistryInstallEvent): void {
|
||||
const level = event.outcome === 'succeeded' ? 'info' : 'warn';
|
||||
if (!this.shouldLog('tools', level)) {return;}
|
||||
this.write({
|
||||
level,
|
||||
event_type: 'skills.registry_install',
|
||||
event: event as unknown as Record<string, unknown>,
|
||||
});
|
||||
}
|
||||
|
||||
securityElevationEnabled(event: SecurityElevationEvent): void {
|
||||
if (!this.shouldLog('tools', 'info')) {return;}
|
||||
this.write({ level: 'info', event_type: 'security.elevation.enabled', event: event as unknown as Record<string, unknown> });
|
||||
|
||||
+12
-1
@@ -8,7 +8,7 @@ export type AuditEventType =
|
||||
// Skills scan
|
||||
| 'skills.scan.pass' | 'skills.scan.fail'
|
||||
// Skills installer
|
||||
| 'skills.installer.execution_blocked' | 'skills.installer.command_result'
|
||||
| 'skills.installer.execution_blocked' | 'skills.installer.command_result' | 'skills.registry_install'
|
||||
// Session lifecycle
|
||||
| 'session.create' | 'session.message' | 'session.delete' | 'session.transfer' | 'session.compact'
|
||||
// Automation - Cron
|
||||
@@ -136,6 +136,17 @@ export interface SkillsScanEvent {
|
||||
issue_codes: string[];
|
||||
}
|
||||
|
||||
export interface SkillsRegistryInstallEvent {
|
||||
registry_id: string;
|
||||
registry_source: string;
|
||||
source: string;
|
||||
source_kind: 'local' | 'git' | 'archive';
|
||||
mode: 'plan-only' | 'stub' | 'install';
|
||||
outcome: 'succeeded' | 'failed';
|
||||
skill_name?: string;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export interface SecurityElevationEvent {
|
||||
session_id: string;
|
||||
channel: string;
|
||||
|
||||
Reference in New Issue
Block a user