/** * The runtime probe for an extension-registered option (map #300, ticket * #302 decision 2): spawn the harness's own probe argv (pi: `--help`) * through the injected runner deps, under the caller's merged environment * and cwd, bounded, and answer whether the declared token appears. The * helper never writes stderr and never renders anything - the CLI gate * owns the refusal and the provenance line. * * Evidence base (ticket #301): `--help` is the only reliable probe - * extensions follow PI_CODING_AGENT_DIR (so the caller's env must apply), * `pi list` is blind to the subagent extension, and parse-level * acceptance is fooled by stock pi's early-exit `--version` path. */ import type { HarnessDescriptor, OptionProbe } from "../knowledge/descriptor.js"; import type { RunnerDeps } from "./deps.js"; export type ExtensionProbeReason = "flag-present" | "flag-absent" | "spawn-failed" | "timeout"; export interface ExtensionProbeOutcome { readonly ok: boolean; readonly reason: ExtensionProbeReason; /** The extension the option's probe names; rides refusal and provenance. */ readonly providedBy: string; /** Human-readable probe shape for refusal detail, e.g. "pi --help". */ readonly probeShape: string; /** Set when the probe ran but the flag was absent: the probe's exit code. */ readonly exitCode?: number | null; /** Set when the probe never ran (spawn failure) - the adapter's message. */ readonly startupError?: string; } export declare const probeExtensionOption: (h: HarnessDescriptor, probe: OptionProbe, opts: { readonly cwd?: string; readonly env?: Readonly>; /** Injectable for tests; production uses the 10 s bound. */ readonly timeoutMs?: number; }, deps: RunnerDeps) => Promise; //# sourceMappingURL=extension-probe.d.ts.map