"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const RuntimeProbe_1 = require("./orchestrator/RuntimeProbe");
function assert(condition, message) {
    if (!condition)
        throw new Error(message);
}
async function main() {
    const okCommand = [process.execPath, '-e', 'process.stdout.write(process.argv[1])'];
    const probe = new RuntimeProbe_1.RuntimeProbe({
        timeoutMs: 2_000,
        commands: {
            codex: [...okCommand, 'codex-mock'],
            gemini: [...okCommand, 'gemini-mock'],
            claude: [...okCommand, 'claude-mock'],
            openclaude: [...okCommand, 'openclaude-mock'],
        },
    });
    const results = await probe.probeAll();
    assert(results.length === 4, 'should probe all four executors');
    assert(results.every((result) => Array.isArray(result.command) && result.command.length > 0), 'every probe should expose the command used');
    assert(results.every((result) => typeof result.available === 'boolean'), 'every probe should report availability');
    console.log('TEST_RUNTIME_PROBE_OK');
}
main().catch((error) => {
    console.error(error.message || error);
    process.exit(1);
});
