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

Function buildCodexExecArgs

core/codex/native-integrations.js:454–479  ·  view source on GitHub ↗
(options = {})

Source from the content-addressed store, hash-verified

452 summary: `${findings.length} Codex review finding(s) ingested`,
453 recordedAt: result.ingestedAt,
454 }];
455 writeJson(filePath, current);
456 }
457
458 return result;
459}
460
461function buildCodexExecArgs(options = {}) {
462 const projectRoot = path.resolve(options.projectRoot || process.cwd());
463 const sandbox = options.sandbox || 'read-only';
464 const args = ['exec'];
465
466 if (options.resumeSessionId || options.resumeLast) {
467 args.push('resume');
468 args.push('--cd', projectRoot);
469 if (options.resumeLast) args.push('--last');
470 if (options.resumeSessionId) args.push(options.resumeSessionId);
471 if (options.prompt) args.push(options.prompt);
472 return args;
473 }
474
475 args.push('--cd', projectRoot);
476 args.push('--sandbox', sandbox);
477 args.push('--color', 'never');
478 args.push('--skip-git-repo-check');
479 if (options.json !== false) args.push('--json');
480 if (options.model) args.push('--model', options.model);
481 if (options.profile) args.push('--profile', options.profile);
482 if (options.outputLastMessagePath) args.push('--output-last-message', options.outputLastMessagePath);

Callers 2

executeCodexScenarioFunction · 0.85
testBridgeUtilitiesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected