@f-o-h/cli 0.1.47 → 0.1.49

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/dist/foh.js +34 -13
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -4,7 +4,7 @@ AI-operator provisioning CLI for Front Of House.
4
4
 
5
5
  Public mirror: https://github.com/iiko38/front-of-house-cli
6
6
 
7
- Current published baseline: `@f-o-h/cli@0.1.47`
7
+ Current published baseline: `@f-o-h/cli@0.1.48`
8
8
 
9
9
  This mirror is a generated release artifact. The private product monorepo is not
10
10
  published here, and no open-source license is granted unless stated separately.
package/dist/foh.js CHANGED
@@ -32801,7 +32801,7 @@ var StdioServerTransport = class {
32801
32801
  };
32802
32802
 
32803
32803
  // src/lib/cli-version.ts
32804
- var CLI_VERSION = "0.1.47";
32804
+ var CLI_VERSION = "0.1.49";
32805
32805
 
32806
32806
  // src/commands/mcp-serve.ts
32807
32807
  var DEFAULT_TIMEOUT_MS = 12e4;
@@ -36710,7 +36710,7 @@ function inferOwnerSubsystem(sourceType, reasonCode) {
36710
36710
  if (sourceType === "external_agent_run") {
36711
36711
  if (reason.includes("simulation") || reason.includes("certification") || reason.includes("scenario")) return "dojo_certification";
36712
36712
  if (reason.includes("contact_phone") || reason.includes("voice_contact") || reason.includes("voice_not_included") || reason.includes("byon") || reason.includes("provider_capacity")) return "voice_contact";
36713
- if (reason.includes("exec_policy") || reason.includes("policy_blocked") || reason.includes("sandbox") || reason.includes("runner") || reason.includes("codex")) return "infra_runner";
36713
+ if (reason.includes("eval_auth") || reason.includes("exec_policy") || reason.includes("policy_blocked") || reason.includes("sandbox") || reason.includes("runner") || reason.includes("codex")) return "infra_runner";
36714
36714
  if (reason.includes("friendlyname") || reason.includes("guardrail") || reason.includes("rule_id") || reason.includes("api") || reason.includes("http_4") || reason.includes("http_5") || reason.includes("404") || reason.includes("500") || reason.includes("roundtrip")) return "api_contract";
36715
36715
  if (reason.includes("cli") || reason.includes("command") || reason.includes("flag")) return "cli";
36716
36716
  if (reason.includes("docs") || reason.includes("unclear") || reason.includes("not_found")) return "docs";
@@ -36769,6 +36769,10 @@ function defaultNextCommands(input) {
36769
36769
  commands.push("foh provision status --json");
36770
36770
  commands.push(input.ids.agent_id ? `foh prove --agent ${input.ids.agent_id} --mission voice --contact-path auto --json` : "foh prove --mission voice --contact-path auto --json");
36771
36771
  }
36772
+ if (input.ownerSubsystem === "infra_runner") {
36773
+ commands.push("foh auth whoami --json");
36774
+ commands.push("foh eval external-agent execute --runner codex --dry-run --json");
36775
+ }
36772
36776
  if (input.sourceArtifactPath) {
36773
36777
  commands.push(`foh bug report --out test-results/bug-report.from-improvement.json --command "investigate ${input.reasonCode}" --request-url https://front-of-house-api.stldocs.app/api --response-status 500 --next-check "Review ${(0, import_path7.basename)(input.sourceArtifactPath)}" --json`);
36774
36778
  }
@@ -39879,9 +39883,33 @@ async function executeExternalAgentExecutorPlan(plan, options = {}) {
39879
39883
  const startedAt = (/* @__PURE__ */ new Date()).toISOString();
39880
39884
  const results = [];
39881
39885
  const runnerCommand = options.runnerCommand || resolveCodexExecutionCommand();
39882
- const authPreflight = await runExternalAgentEvalAuthPreflight(options.env);
39886
+ const authPreflight = options.env ? await runExternalAgentEvalAuthPreflight(options.env) : null;
39883
39887
  if (authPreflight && !authPreflight.ok) {
39884
39888
  const endedAt2 = (/* @__PURE__ */ new Date()).toISOString();
39889
+ const blockedResults = plan.runs.map((run) => {
39890
+ (0, import_fs15.mkdirSync)(run.run_dir, { recursive: true });
39891
+ const runArtifact = buildExecutedRunArtifact({
39892
+ run,
39893
+ startedAt,
39894
+ endedAt: endedAt2,
39895
+ status: "hold",
39896
+ reasonCode: authPreflight.reason_code,
39897
+ exitCode: null,
39898
+ timedOut: false,
39899
+ durationMs: 0
39900
+ });
39901
+ (0, import_fs15.writeFileSync)(run.outputs.run, `${JSON.stringify(runArtifact, null, 2)}
39902
+ `, "utf8");
39903
+ return {
39904
+ run_id: run.run_id,
39905
+ status: "hold",
39906
+ failure_reason_code: authPreflight.reason_code,
39907
+ exit_code: null,
39908
+ timed_out: false,
39909
+ duration_ms: 0,
39910
+ artifacts: run.outputs
39911
+ };
39912
+ });
39885
39913
  return {
39886
39914
  schema_version: "external_agent_execution_batch_result.v1",
39887
39915
  ok: false,
@@ -39892,15 +39920,7 @@ async function executeExternalAgentExecutorPlan(plan, options = {}) {
39892
39920
  ended_at: endedAt2,
39893
39921
  runner: plan.runner,
39894
39922
  run_count: plan.runs.length,
39895
- results: plan.runs.map((run) => ({
39896
- run_id: run.run_id,
39897
- status: "hold",
39898
- failure_reason_code: authPreflight.reason_code,
39899
- exit_code: null,
39900
- timed_out: false,
39901
- duration_ms: 0,
39902
- artifacts: run.outputs
39903
- }))
39923
+ results: blockedResults
39904
39924
  };
39905
39925
  }
39906
39926
  for (const run of plan.runs) {
@@ -40311,7 +40331,8 @@ Exit the shell to finalize run.json.
40311
40331
  return;
40312
40332
  }
40313
40333
  const result = await executeExternalAgentExecutorPlan(plan, {
40314
- privateRepoRoot: plan.private_repo_root
40334
+ privateRepoRoot: plan.private_repo_root,
40335
+ env: process.env
40315
40336
  });
40316
40337
  const resultPath = (0, import_path14.join)(plan.batch_dir, "execution-result.json");
40317
40338
  (0, import_fs16.writeFileSync)(resultPath, `${JSON.stringify(result, null, 2)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@f-o-h/cli",
3
- "version": "0.1.47",
3
+ "version": "0.1.49",
4
4
  "description": "FOH CLI - AI-operator provisioning tool for Front Of House",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {