@f-o-h/cli 0.1.31 → 0.1.33

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 +16 -4
  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.31`
7
+ Current published baseline: `@f-o-h/cli@0.1.33`
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
@@ -32698,7 +32698,7 @@ var StdioServerTransport = class {
32698
32698
  };
32699
32699
 
32700
32700
  // src/lib/cli-version.ts
32701
- var CLI_VERSION = "0.1.31";
32701
+ var CLI_VERSION = "0.1.33";
32702
32702
 
32703
32703
  // src/commands/mcp-serve.ts
32704
32704
  var DEFAULT_TIMEOUT_MS = 12e4;
@@ -34343,8 +34343,8 @@ function buildMissingOptionsPlan(missing, opts) {
34343
34343
  "foh auth signup --web --json",
34344
34344
  "foh auth login --web --json",
34345
34345
  ...buildCliAuthFallbackCommands(),
34346
- "foh templates list --category buyer --json",
34347
- 'foh setup --org <org-id> --agent-template <buyer-template-id> --agent-name "Demo Buyer Agent" --widget-domains <domain> --voice-provider openai --voice-id alloy --report-out setup-report.json --json'
34346
+ "npx --yes @f-o-h/cli@latest templates list --category buyer --json",
34347
+ 'npx --yes @f-o-h/cli@latest setup --org <org-id> --agent-template <buyer-template-id> --agent-name "Demo Buyer Agent" --widget-domains <domain> --voice-provider openai --voice-id alloy --report-out setup-report.json --json'
34348
34348
  ],
34349
34349
  extra: {
34350
34350
  code: "setup_required_options_missing",
@@ -34355,6 +34355,7 @@ function buildMissingOptionsPlan(missing, opts) {
34355
34355
  ai_agent_instruction: [
34356
34356
  "Do not guess org IDs, template IDs, or customer domains.",
34357
34357
  "If no browser is available, print sign_in_url and ask the user to sign in.",
34358
+ "Use npx --yes @f-o-h/cli@latest for every CLI command; do not use unpinned npx @f-o-h/cli.",
34358
34359
  "After auth, discover orgs and certification-oriented buyer templates with the listed commands.",
34359
34360
  "Prefer UK Buyer Qualification or Viewing Booking; do not use greeting-only templates for proof/certification.",
34360
34361
  "Rerun setup only after all missing_options are resolved."
@@ -36499,8 +36500,11 @@ function inferReasonCode(artifact) {
36499
36500
  function inferPromotionDecision(sourceType, reasonCode) {
36500
36501
  const reason = String(reasonCode || "").toLowerCase();
36501
36502
  if (sourceType === "external_agent_run") {
36503
+ if (reason.includes("friendlyname") || reason.includes("api") || reason.includes("500")) return "fix_api";
36504
+ if (reason.includes("contact_phone") || reason.includes("voice_contact") || reason.includes("voice_not_included") || reason.includes("agent_limit") || reason.includes("org_") || reason.includes("template_apply")) return "fix_config";
36502
36505
  if (reason.includes("exec_policy") || reason.includes("policy_blocked") || reason.includes("auth") || reason.includes("config")) return "fix_config";
36503
36506
  if (reason.includes("cli") || reason.includes("command") || reason.includes("flag")) return "fix_cli";
36507
+ if (reason.includes("proof") || reason.includes("certification") || reason.includes("simulation")) return "add_test";
36504
36508
  return "fix_docs";
36505
36509
  }
36506
36510
  if (sourceType === "knowledge_miss") return "fix_docs";
@@ -38725,6 +38729,10 @@ function buildCodexExecutorEnv(input) {
38725
38729
  env[childKey] = value;
38726
38730
  }
38727
38731
  }
38732
+ env.npm_config_cache = (0, import_path12.join)((0, import_path12.dirname)(input.runDir), ".npm-cache");
38733
+ env.npm_config_prefer_online = "true";
38734
+ env.npm_config_update_notifier = "false";
38735
+ env.npm_config_yes = "true";
38728
38736
  env[EXTERNAL_AGENT_RUN_DIR_ENV] = input.runDir;
38729
38737
  env[EXTERNAL_AGENT_PROMPT_VERSION_ENV] = input.promptVersion;
38730
38738
  env.FOH_CLI_SUPPRESS_BANNER = "1";
@@ -39026,6 +39034,10 @@ function classifyRun(input) {
39026
39034
  if (input.timedOut) return { status: "hold", reasonCode: "codex_runner_timeout" };
39027
39035
  if (!input.artifactSafetyOk) return { status: "fail", reasonCode: "external_agent_artifact_safety_blocked" };
39028
39036
  const completedCommands = readCommandRecords(input.run.run_dir).filter((record2) => record2.phase === "completed");
39037
+ const observedVersions = completedCommands.map((record2) => String(record2.cli_version || "").trim()).filter((version2) => /^\d+\.\d+\.\d+$/.test(version2));
39038
+ if (observedVersions.some((version2) => version2 !== CLI_VERSION)) {
39039
+ return { status: "hold", reasonCode: "external_agent_cli_version_drift" };
39040
+ }
39029
39041
  const commandReasonCodes = completedCommands.flatMap((record2) => [
39030
39042
  String(record2.reason_code || ""),
39031
39043
  ...Array.isArray(record2.check_reason_codes) ? record2.check_reason_codes.map((code) => String(code || "")) : []
@@ -39269,7 +39281,7 @@ async function executeExternalAgentExecutorPlan(plan, options = {}) {
39269
39281
  var DEFAULT_PROMPT_VERSION = "blank-setup.v1";
39270
39282
  var DEFAULT_BATCH_MODELS = "openai/codex,anthropic/claude,cursor/agent";
39271
39283
  var PROMPTS = {
39272
- "blank-setup.v1": "Go to https://frontofhouse.okii.uk. Use only public docs, public API docs, and the public npm CLI package. Install the FOH CLI, authenticate or reach a deterministic auth blocker, then create or configure a Front Of House voice agent and website widget. Prefer the certification-oriented buyer templates: run `foh templates list --category buyer --json` and use `UK Buyer Qualification` or `Viewing Booking` when available; do not use a greeting-only template for proof/certification. Prefer `foh setup` for end-to-end provisioning because it can provision the contact phone path, widget, voice config, smoke test, certification, and publish readiness together. Run proof/smoke/certification where available, including widget proof and voice proof. If voice proof returns `contact_phone_missing`, run the printed provision command or report that exact reason code. Produce a final evidence summary with commands run, docs used, artifacts created, and any blocker reason codes. Do not assume access to the private source repository.",
39284
+ "blank-setup.v1": "Go to https://frontofhouse.okii.uk. Use only public docs, public API docs, and the public npm CLI package. Always invoke the CLI with `npx --yes @f-o-h/cli@latest ...`; do not use unpinned `npx @f-o-h/cli ...`, because cached older packages can produce invalid evidence. Install or verify the FOH CLI, authenticate or reach a deterministic auth blocker, then create or configure a Front Of House voice agent and website widget. Prefer the certification-oriented buyer templates: run `npx --yes @f-o-h/cli@latest templates list --category buyer --json` and use `UK Buyer Qualification` or `Viewing Booking` when available; do not use a greeting-only template for proof/certification. Prefer `npx --yes @f-o-h/cli@latest setup` for end-to-end provisioning because it can provision the contact phone path, widget, voice config, smoke test, certification, and publish readiness together. Run proof/smoke/certification where available, including widget proof and voice proof. If voice proof returns `contact_phone_missing`, run the printed provision command or report that exact reason code. Produce a final evidence summary with commands run, docs used, artifacts created, and any blocker reason codes. Do not assume access to the private source repository.",
39273
39285
  "debug-proof-failure.v1": "You are given a FOH proof or debug artifact. Use public docs and FOH CLI/API behavior to classify whether the blocker is docs, auth, org setup, agent config, widget, channel, runtime, or product bug. Produce a redacted improvement packet or the exact command needed to produce one. Do not ask the human to interpret logs manually unless no machine-readable artifact exists.",
39274
39286
  "knowledge-miss.v1": "A FOH agent failed to answer a business question. Use CLI/API/docs to determine whether this is a knowledge-ingestion issue, retrieval issue, config issue, prompt/behavior issue, or runtime issue. Prefer foh knowledge query, transcript export, replay, and foh bug improve artifacts over screenshots.",
39275
39287
  "replay-failure.v1": "You are given a FOH transcript or replay artifact. Use CLI/API/docs to replay or inspect the failed interaction, identify expected vs actual behavior, and produce a scenario-test or improvement-packet candidate."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@f-o-h/cli",
3
- "version": "0.1.31",
3
+ "version": "0.1.33",
4
4
  "description": "FOH CLI - AI-operator provisioning tool for Front Of House",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {