/**
 * olam setup linux-gate-status — Linux gate detector subcommand
 * (olam-setup-epic Phase F, F3).
 *
 * Checks two signals and reports whether the Linux platform gate is triggered:
 *   (a) ≥1 GitHub issue labeled `linux-platform-request` (any state)
 *   (b) ≥3 trust-audit-log entries with platform = 'linux'
 *
 * Usage:
 *   olam setup linux-gate-status
 *
 * Outputs JSON to stdout:
 *   { triggered, source, ghIssues, linuxInvocations }
 *   (plus ghError when the `gh` CLI is unavailable)
 *
 * Exit codes:
 *   0  — gate not triggered OR triggered (both cases print JSON; caller decides)
 *   1  — unexpected runtime error (not the same as "triggered")
 *
 * Design constraint: this file lives in @pleri/olam-cli and delegates to
 * the pure @olam/core helper (detectLinuxGateTrigger). @olam/core does NOT
 * import from @pleri/olam-cli (dep-cycle rule).
 */
import { detectLinuxGateTrigger } from '@olam/core/src/setup/linux-gate.js';
export function registerSetupLinuxGate(program) {
    program
        .command('setup-linux-gate-status')
        .description('Detect whether the Linux platform expansion gate has been triggered. ' +
        'Checks GitHub issues labeled linux-platform-request and the trust-audit-log ' +
        'for ≥3 Linux invocations. Outputs JSON.')
        .action(() => {
        try {
            const result = detectLinuxGateTrigger();
            process.stdout.write(JSON.stringify(result, null, 2) + '\n');
        }
        catch (err) {
            process.stderr.write(`error: ${err instanceof Error ? err.message : String(err)}\n`);
            process.exitCode = 1;
        }
    });
}
//# sourceMappingURL=setup-linux-gate.js.map