refactor(desktop): split kernel_commands/pipeline_commands into modules, add SaaS client libs and gateway modules

Split monolithic kernel_commands.rs (2185 lines) and pipeline_commands.rs (1391 lines)
into focused sub-modules under kernel_commands/ and pipeline_commands/ directories.
Add gateway module (commands, config, io, runtime), health_check, and 15 new
TypeScript client libraries for SaaS relay, auth, admin, telemetry, and kernel
sub-systems (a2a, agent, chat, hands, skills, triggers).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
iven
2026-03-31 11:12:47 +08:00
parent d0ae7d2770
commit f79560a911
71 changed files with 8521 additions and 5997 deletions

View File

@@ -136,8 +136,12 @@ function persistEvent(event: SecurityEvent): void {
}
localStorage.setItem(SECURITY_LOG_KEY, JSON.stringify(events));
} catch {
} catch (e) {
// Ignore persistence failures to prevent application disruption
// eslint-disable-next-line no-console
if (process.env.NODE_ENV === 'development') {
console.warn('[SecurityAudit] Failed to persist security event', e);
}
}
}
@@ -149,7 +153,11 @@ function getStoredEvents(): SecurityEvent[] {
const stored = localStorage.getItem(SECURITY_LOG_KEY);
if (!stored) return [];
return JSON.parse(stored) as SecurityEvent[];
} catch {
} catch (e) {
// eslint-disable-next-line no-console
if (process.env.NODE_ENV === 'development') {
console.warn('[SecurityAudit] Failed to read security events', e);
}
return [];
}
}