MCPcopy Create free account
hub / github.com/SethGammon/Citadel / summarizeAppServerEvents

Function summarizeAppServerEvents

core/codex/native-integrations.js:567–602  ·  view source on GitHub ↗
(input)

Source from the content-addressed store, hash-verified

565 },
566 ];
567
568 return {
569 projectRoot,
570 isWindows,
571 isWsl,
572 configPath,
573 checks,
574 pass: checks.every((check) => check.pass),
575 recommendation: isWindows
576 ? 'Prefer [windows] sandbox = "elevated"; use "unelevated" only when elevated setup is blocked.'
577 : 'Native Windows sandbox checks are advisory outside Windows.',
578 };
579}
580
581function createAppServerProbe(options = {}) {
582 const listen = options.listen || 'stdio://';
583 const args = ['app-server', '--listen', listen];
584 if (options.wsAuth) args.push('--ws-auth', options.wsAuth);
585 if (options.wsTokenFile) args.push('--ws-token-file', path.resolve(options.wsTokenFile));
586
587 return {
588 command: 'codex',
589 args,
590 localOnly: listen === 'stdio://' || listen.startsWith('unix://') || listen.startsWith('ws://127.0.0.1') || listen.startsWith('ws://localhost'),
591 warning: listen.startsWith('ws://') && !options.wsAuth
592 ? 'WebSocket app-server probes should use a local listener or explicit auth.'
593 : null,
594 improvesOnScraping: 'App-server emits structured protocol events instead of requiring terminal scraping.',
595 };
596}
597
598function parseAppServerMessages(input) {
599 if (Array.isArray(input)) return input;
600 return String(input || '')
601 .split(/\r?\n/)
602 .filter(Boolean)
603 .map((line) => JSON.parse(line));
604}
605

Calls 1

parseAppServerMessagesFunction · 0.85

Tested by

no test coverage detected