@f-o-h/cli 0.1.58 → 0.1.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/foh.js +38 -3
- package/package.json +1 -1
package/dist/foh.js
CHANGED
|
@@ -32853,7 +32853,7 @@ var StdioServerTransport = class {
|
|
|
32853
32853
|
};
|
|
32854
32854
|
|
|
32855
32855
|
// src/lib/cli-version.ts
|
|
32856
|
-
var CLI_VERSION = "0.1.
|
|
32856
|
+
var CLI_VERSION = "0.1.59";
|
|
32857
32857
|
|
|
32858
32858
|
// src/commands/mcp-serve.ts
|
|
32859
32859
|
var DEFAULT_TIMEOUT_MS = 12e4;
|
|
@@ -39244,6 +39244,7 @@ function readExternalAgentMetadata(runDir) {
|
|
|
39244
39244
|
}
|
|
39245
39245
|
|
|
39246
39246
|
// src/lib/external-agent-executor.ts
|
|
39247
|
+
var GEMINI_HEADLESS_PROBE_TIMEOUT_MS = 15e3;
|
|
39247
39248
|
var CODEX_EXECUTOR_DENIED_ENV_PREFIXES = [
|
|
39248
39249
|
"SUPABASE_",
|
|
39249
39250
|
"DATABASE_",
|
|
@@ -39411,11 +39412,16 @@ function readBatch(batchPath) {
|
|
|
39411
39412
|
return parsed;
|
|
39412
39413
|
}
|
|
39413
39414
|
function defaultRunnerProbe(command, args) {
|
|
39415
|
+
const isGeminiHeadlessSmoke = args.includes("FOH_GEMINI_HEADLESS_PROBE");
|
|
39416
|
+
const spawnOptions = {
|
|
39417
|
+
encoding: "utf8",
|
|
39418
|
+
timeout: isGeminiHeadlessSmoke ? GEMINI_HEADLESS_PROBE_TIMEOUT_MS : void 0
|
|
39419
|
+
};
|
|
39414
39420
|
const result = process.platform === "win32" && command.toLowerCase().endsWith(".cmd") ? (0, import_child_process4.spawnSync)(
|
|
39415
39421
|
"powershell.exe",
|
|
39416
39422
|
["-NoLogo", "-NoProfile", "-ExecutionPolicy", "Bypass", "-Command", `& ${[command, ...args].map(quotePowerShellArg).join(" ")}`],
|
|
39417
|
-
|
|
39418
|
-
) : (0, import_child_process4.spawnSync)(command, args,
|
|
39423
|
+
spawnOptions
|
|
39424
|
+
) : (0, import_child_process4.spawnSync)(command, args, spawnOptions);
|
|
39419
39425
|
return {
|
|
39420
39426
|
status: typeof result.status === "number" ? result.status : null,
|
|
39421
39427
|
stdout: String(result.stdout || ""),
|
|
@@ -39423,6 +39429,9 @@ function defaultRunnerProbe(command, args) {
|
|
|
39423
39429
|
error: result.error
|
|
39424
39430
|
};
|
|
39425
39431
|
}
|
|
39432
|
+
function geminiCapacityUnavailable(text) {
|
|
39433
|
+
return /MODEL_CAPACITY_EXHAUSTED|RESOURCE_EXHAUSTED|No capacity available|rateLimitExceeded|exhausted your capacity|status 429/i.test(text);
|
|
39434
|
+
}
|
|
39426
39435
|
function quotePowerShellArg(value) {
|
|
39427
39436
|
return `'${value.replace(/'/g, "''")}'`;
|
|
39428
39437
|
}
|
|
@@ -39629,7 +39638,19 @@ ${smoke.stderr}`;
|
|
|
39629
39638
|
"Gemini runner sandbox is unavailable on this host. Install/configure Docker/Podman or rerun only on an externally isolated host with --gemini-sandbox-mode disabled."
|
|
39630
39639
|
);
|
|
39631
39640
|
}
|
|
39641
|
+
if (geminiCapacityUnavailable(smokeText)) {
|
|
39642
|
+
throw new ExternalAgentExecutorError(
|
|
39643
|
+
"external_agent_runner_capacity_unavailable",
|
|
39644
|
+
"Gemini runner reached the provider but the selected model has no available capacity. Retry later or configure a supported lower-contention Gemini model before live eval."
|
|
39645
|
+
);
|
|
39646
|
+
}
|
|
39632
39647
|
if (smoke.error || smoke.status !== 0 && !/Auth method|GEMINI_API_KEY|GOOGLE_GENAI_USE_VERTEXAI|GOOGLE_GENAI_USE_GCA/i.test(smokeText)) {
|
|
39648
|
+
if (smoke.error?.code === "ETIMEDOUT") {
|
|
39649
|
+
throw new ExternalAgentExecutorError(
|
|
39650
|
+
"external_agent_runner_headless_probe_timed_out",
|
|
39651
|
+
"Gemini runner headless invocation probe timed out before reaching an auth boundary or provider response."
|
|
39652
|
+
);
|
|
39653
|
+
}
|
|
39633
39654
|
throw new ExternalAgentExecutorError(
|
|
39634
39655
|
"external_agent_runner_headless_probe_failed",
|
|
39635
39656
|
"Gemini runner headless invocation probe failed before reaching an auth boundary."
|
|
@@ -40330,6 +40351,20 @@ function executorRecoveryCommands(reasonCode, runner) {
|
|
|
40330
40351
|
"Upgrade, downgrade, or reconfigure the runner CLI until the planned non-interactive invocation reaches an auth boundary without parser errors."
|
|
40331
40352
|
];
|
|
40332
40353
|
}
|
|
40354
|
+
if (reasonCode === "external_agent_runner_headless_probe_timed_out") {
|
|
40355
|
+
return [
|
|
40356
|
+
`${normalizedRunner} --version`,
|
|
40357
|
+
`${normalizedRunner} --help`,
|
|
40358
|
+
"Retry the dry-run once. If it repeats, reduce the probe/model contention or use a different subscribed runner before launching live evals."
|
|
40359
|
+
];
|
|
40360
|
+
}
|
|
40361
|
+
if (reasonCode === "external_agent_runner_capacity_unavailable") {
|
|
40362
|
+
return [
|
|
40363
|
+
"gemini --version",
|
|
40364
|
+
"gemini --help",
|
|
40365
|
+
"Retry after the Gemini capacity window resets, or configure a supported lower-contention Gemini model before rerunning the same executor dry-run."
|
|
40366
|
+
];
|
|
40367
|
+
}
|
|
40333
40368
|
return [
|
|
40334
40369
|
"Fix the executor plan input or workspace path and rerun with --dry-run."
|
|
40335
40370
|
];
|