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:
@@ -12,6 +12,10 @@
|
||||
* - Content Security Policy helpers
|
||||
*/
|
||||
|
||||
import { createLogger } from './logger';
|
||||
|
||||
const logger = createLogger('SecurityUtils');
|
||||
|
||||
// ============================================================================
|
||||
// HTML Sanitization
|
||||
// ============================================================================
|
||||
@@ -232,7 +236,8 @@ export function validateUrl(
|
||||
}
|
||||
|
||||
return parsed.toString();
|
||||
} catch {
|
||||
} catch (e) {
|
||||
logger.debug('URL validation failed', { error: e });
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -341,7 +346,8 @@ export function validatePath(
|
||||
return null;
|
||||
}
|
||||
normalized = resolved;
|
||||
} catch {
|
||||
} catch (e) {
|
||||
logger.debug('Path resolution failed', { error: e });
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -553,7 +559,8 @@ export function sanitizeJson<T = unknown>(json: string): T | null {
|
||||
}
|
||||
|
||||
return parsed as T;
|
||||
} catch {
|
||||
} catch (e) {
|
||||
logger.debug('JSON sanitize parse failed', { error: e });
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user