MCPcopy Create free account
hub / github.com/Noumena-Network/code / runRuntimeDynamicProbe

Function runRuntimeDynamicProbe

scripts/generate_slash_command_appendix.mjs:832–861  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

830}
831
832async function runRuntimeDynamicProbe() {
833 const preferredBun = process.env.BUN_BIN || path.join(process.env.HOME ?? '', '.bun', 'bin', 'bun')
834 const bunBinary = (preferredBun && await fileExists(preferredBun)) ? preferredBun : 'bun'
835 try {
836 const output = execFileSync(bunBinary, [runtimeProbeRunnerPath], {
837 cwd: rootDir,
838 encoding: 'utf8',
839 })
840 return {
841 probeStatus: 'ok',
842 probeError: '',
843 ...JSON.parse(output),
844 }
845 } catch (error) {
846 const stderr =
847 error && typeof error === 'object' && 'stderr' in error ? String(error.stderr || '') : ''
848 const status =
849 error && typeof error === 'object' && 'status' in error ? String(error.status ?? '') : ''
850 return {
851 probeStatus: 'error',
852 probeError: [status ? `exit=${status}` : '', stderr.trim()].filter(Boolean).join(' '),
853 cwd: rootDir,
854 shouldAutoEnableClaudeInChrome: null,
855 shouldAutoEnableClaudeInChromeStatus: 'error',
856 shouldAutoEnableClaudeInChromeError: stderr.trim(),
857 buckets: {},
858 counts: {},
859 }
860 }
861}
862
863function evaluateBuildGate(gate, buildFeatureSet, runtimeProbe) {
864 if (!gate || gate === 'always') return true

Calls 1

fileExistsFunction · 0.70

Tested by

no test coverage detected