MCPcopy
hub / github.com/neomjs/neo / main

Function main

ai/scripts/diagnostics/bootstrapCodexSandbox.mjs:243–261  ·  view source on GitHub ↗
({
    projectRoot    = process.cwd(),
    DatabaseClass  = Database,
    fsImpl         = fs,
    env            = process.env,
    log            = console.log,
    error          = console.error
} = {})

Source from the content-addressed store, hash-verified

241 * @returns {Number} Process exit code.
242 */
243export function main({
244 projectRoot = process.cwd(),
245 DatabaseClass = Database,
246 fsImpl = fs,
247 env = process.env,
248 log = console.log,
249 error = console.error
250} = {}) {
251 const result = runCodexSandboxProbe({projectRoot, DatabaseClass, fsImpl, env});
252 const report = formatProbeResult(result);
253
254 if (result.ok) {
255 log(report);
256 return 0;
257 }
258
259 error(report);
260 return 1;
261}
262
263if (process.argv[1] && path.resolve(process.argv[1]) === __filename) {
264 process.exitCode = main({projectRoot: resolveCliProjectRoot()});

Callers 1

Calls 3

runCodexSandboxProbeFunction · 0.85
formatProbeResultFunction · 0.85
logFunction · 0.50

Tested by

no test coverage detected