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:
@@ -446,8 +446,8 @@ export class AutonomyManager {
|
||||
const parsed = JSON.parse(raw);
|
||||
return { ...DEFAULT_AUTONOMY_CONFIGS.assisted, ...parsed };
|
||||
}
|
||||
} catch {
|
||||
// Ignore
|
||||
} catch (e) {
|
||||
log.debug('Failed to load autonomy config from localStorage', { error: e });
|
||||
}
|
||||
return DEFAULT_AUTONOMY_CONFIGS.assisted;
|
||||
}
|
||||
@@ -455,8 +455,8 @@ export class AutonomyManager {
|
||||
private saveConfig(): void {
|
||||
try {
|
||||
localStorage.setItem(AUTONOMY_CONFIG_KEY, JSON.stringify(this.config));
|
||||
} catch {
|
||||
// Ignore
|
||||
} catch (e) {
|
||||
log.debug('Failed to save autonomy config to localStorage', { error: e });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -466,7 +466,8 @@ export class AutonomyManager {
|
||||
if (raw) {
|
||||
this.auditLog = JSON.parse(raw);
|
||||
}
|
||||
} catch {
|
||||
} catch (e) {
|
||||
log.debug('Failed to load audit log from localStorage', { error: e });
|
||||
this.auditLog = [];
|
||||
}
|
||||
}
|
||||
@@ -474,8 +475,8 @@ export class AutonomyManager {
|
||||
private saveAuditLog(): void {
|
||||
try {
|
||||
localStorage.setItem(AUDIT_LOG_KEY, JSON.stringify(this.auditLog.slice(-100)));
|
||||
} catch {
|
||||
// Ignore
|
||||
} catch (e) {
|
||||
log.debug('Failed to save audit log to localStorage', { error: e });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -483,8 +484,8 @@ export class AutonomyManager {
|
||||
try {
|
||||
const pending = Array.from(this.pendingApprovals.entries());
|
||||
localStorage.setItem('zclaw-pending-approvals', JSON.stringify(pending));
|
||||
} catch {
|
||||
// Ignore
|
||||
} catch (e) {
|
||||
log.debug('Failed to persist pending approvals to localStorage', { error: e });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user