@f-o-h/cli 0.1.66 → 0.1.68
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/README.md +1 -1
- package/dist/foh.js +16 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -89,7 +89,7 @@ returned short-lived token. Credential auth remains available as fallback.
|
|
|
89
89
|
`foh prove` produces a compact signed proof report across auth, org context,
|
|
90
90
|
agent validation, contact phone readiness, voice provider health, widget
|
|
91
91
|
channel/embed readiness, and widget smoke. It does not run release
|
|
92
|
-
certification by default; run `foh certify run --agent <id> --profile release`
|
|
92
|
+
certification by default; run `foh certify run --agent <id> --profile release` (budget-safe default)
|
|
93
93
|
before publish, or pass `--include-certification` only when you intentionally
|
|
94
94
|
want the slower certification check inside proof. It is read-only by default;
|
|
95
95
|
pass `--mutation-mode ensure` or `--repair` only when you explicitly want proof
|
package/dist/foh.js
CHANGED
|
@@ -14341,7 +14341,7 @@ async function publishAgentFromCurrentDraft(agentId, options) {
|
|
|
14341
14341
|
throw new FohError({
|
|
14342
14342
|
step: "publish_agent",
|
|
14343
14343
|
error: `Publish blocked by simulation certification (${blockers ?? 0} blocker(s)); top blocker: ${blockerLabel}`,
|
|
14344
|
-
remediation: suggestedFix ? `${suggestedFix} Re-run: foh
|
|
14344
|
+
remediation: suggestedFix ? `${suggestedFix} Re-run: foh certify run --agent ${agentId} --profile release` : `Re-run: foh certify run --agent ${agentId} --profile release, then retry publish.`,
|
|
14345
14345
|
statusCode: error2.statusCode,
|
|
14346
14346
|
detail
|
|
14347
14347
|
});
|
|
@@ -16239,7 +16239,7 @@ function registerVoice(program3) {
|
|
|
16239
16239
|
apiUrlOverride: opts.apiUrl
|
|
16240
16240
|
});
|
|
16241
16241
|
if (!opts.publish) {
|
|
16242
|
-
format({ status: "configured", note: "Run: foh
|
|
16242
|
+
format({ status: "configured", note: "Run: foh certify run --agent " + opts.agent + " --profile release, then foh agent publish --agent " + opts.agent + " to make live." }, { json: opts.json ?? false });
|
|
16243
16243
|
return;
|
|
16244
16244
|
}
|
|
16245
16245
|
const pub = await validateCertifyAndPublishAgent({
|
|
@@ -32786,7 +32786,7 @@ var StdioServerTransport = class {
|
|
|
32786
32786
|
};
|
|
32787
32787
|
|
|
32788
32788
|
// src/lib/cli-version.ts
|
|
32789
|
-
var CLI_VERSION = "0.1.
|
|
32789
|
+
var CLI_VERSION = "0.1.68";
|
|
32790
32790
|
|
|
32791
32791
|
// src/commands/mcp-serve.ts
|
|
32792
32792
|
var DEFAULT_TIMEOUT_MS = 12e4;
|
|
@@ -35415,6 +35415,11 @@ function modeForProfile(profile) {
|
|
|
35415
35415
|
if (profile === "stress") return "stress";
|
|
35416
35416
|
return "full";
|
|
35417
35417
|
}
|
|
35418
|
+
function defaultAdaptiveRuns(profile) {
|
|
35419
|
+
if (profile === "smoke") return 1;
|
|
35420
|
+
if (profile === "stress") return 30;
|
|
35421
|
+
return 5;
|
|
35422
|
+
}
|
|
35418
35423
|
function csv(raw) {
|
|
35419
35424
|
if (!raw) return void 0;
|
|
35420
35425
|
const values = String(raw).split(",").map((value) => value.trim()).filter(Boolean);
|
|
@@ -35427,11 +35432,11 @@ function channel(raw) {
|
|
|
35427
35432
|
}
|
|
35428
35433
|
function registerCertify(program3) {
|
|
35429
35434
|
const certify = program3.command("certify").description("Produce release certification evidence for an agent");
|
|
35430
|
-
certify.command("run").description("Run certification for an exact agent draft/profile and emit release evidence").requiredOption("--agent <id>", "Agent ID to certify").option("--profile <profile>", "Certification profile: smoke, release, or stress", "release").option("--adaptive-runs <n>", "Adaptive runs
|
|
35435
|
+
certify.command("run").description("Run certification for an exact agent draft/profile and emit release evidence").requiredOption("--agent <id>", "Agent ID to certify").option("--profile <profile>", "Certification profile: smoke, release, or stress", "release").option("--adaptive-runs <n>", "Adaptive runs override; release defaults to a budget-safe 5").option("--journeys <list>", "Comma-separated journey allowlist").option("--scenario-ids <list>", "Comma-separated scenario ID allowlist").option("--channel <channel>", "Channel filter: chat, voice, or mixed", "mixed").option("--out <path>", "Write certification run JSON to this file path").option("--api-url <url>", "API base URL override").option("--json", "Output as machine-readable JSON").action(async (opts) => {
|
|
35431
35436
|
try {
|
|
35432
35437
|
const profile = normalizeProfile(opts.profile);
|
|
35433
35438
|
const mode = modeForProfile(profile);
|
|
35434
|
-
const adaptiveRuns = Math.max(1, Math.min(120, Number(opts.adaptiveRuns ??
|
|
35439
|
+
const adaptiveRuns = Math.max(1, Math.min(120, Number(opts.adaptiveRuns ?? defaultAdaptiveRuns(profile)) || defaultAdaptiveRuns(profile)));
|
|
35435
35440
|
const response = await apiFetch(
|
|
35436
35441
|
`/v1/console/agents/${opts.agent}/sim-certify`,
|
|
35437
35442
|
{
|
|
@@ -35462,7 +35467,7 @@ function registerCertify(program3) {
|
|
|
35462
35467
|
profile,
|
|
35463
35468
|
mode,
|
|
35464
35469
|
certificate: response.certificate,
|
|
35465
|
-
next_commands: passed ? [`foh agent publish --agent ${opts.agent} --json`] : [`foh
|
|
35470
|
+
next_commands: passed ? [`foh agent publish --agent ${opts.agent} --json`] : [`foh certify run --agent ${opts.agent} --profile ${profile} --json`]
|
|
35466
35471
|
};
|
|
35467
35472
|
if (opts.out) {
|
|
35468
35473
|
(0, import_node_fs2.writeFileSync)(opts.out, JSON.stringify(result, null, 2) + "\n", "utf-8");
|
|
@@ -37878,13 +37883,13 @@ function registerProve(program3) {
|
|
|
37878
37883
|
}
|
|
37879
37884
|
}
|
|
37880
37885
|
if (opts.skipCert) {
|
|
37881
|
-
checks.push(skipped("simulation_certification", "operator_skipped", "Skipped by --skip-cert.", `foh
|
|
37886
|
+
checks.push(skipped("simulation_certification", "operator_skipped", "Skipped by --skip-cert.", `foh certify run --agent ${ctx.agentId} --profile release --json`));
|
|
37882
37887
|
} else if (!opts.includeCertification) {
|
|
37883
37888
|
checks.push(skipped(
|
|
37884
37889
|
"simulation_certification",
|
|
37885
37890
|
"certification_explicitly_required",
|
|
37886
37891
|
"Runtime proof does not run release certification by default.",
|
|
37887
|
-
`foh
|
|
37892
|
+
`foh certify run --agent ${ctx.agentId} --profile release --json`
|
|
37888
37893
|
));
|
|
37889
37894
|
} else {
|
|
37890
37895
|
try {
|
|
@@ -37917,7 +37922,7 @@ function registerProve(program3) {
|
|
|
37917
37922
|
proof_cache: cached2.metadata
|
|
37918
37923
|
};
|
|
37919
37924
|
if (!loop.overall_pass) {
|
|
37920
|
-
checks.push(hold("simulation_certification", "simulation_certification_failed", "Simulation certification did not pass.", `foh
|
|
37925
|
+
checks.push(hold("simulation_certification", "simulation_certification_failed", "Simulation certification did not pass.", `foh certify run --agent ${agentId} --profile ${certMode === "quick" ? "smoke" : certMode === "stress" ? "stress" : "release"} --json`, loopWithCache));
|
|
37921
37926
|
} else {
|
|
37922
37927
|
checks.push(pass("simulation_certification", "Simulation certification passed.", {
|
|
37923
37928
|
mode: loop.mode,
|
|
@@ -37928,7 +37933,7 @@ function registerProve(program3) {
|
|
|
37928
37933
|
}));
|
|
37929
37934
|
}
|
|
37930
37935
|
} catch (error2) {
|
|
37931
|
-
checks.push(fail("simulation_certification", "simulation_certification_failed", error2, `foh
|
|
37936
|
+
checks.push(fail("simulation_certification", "simulation_certification_failed", error2, `foh certify run --agent ${ctx.agentId} --profile release --json`));
|
|
37932
37937
|
}
|
|
37933
37938
|
}
|
|
37934
37939
|
} else {
|
|
@@ -40414,7 +40419,7 @@ async function executeExternalAgentExecutorPlan(plan, options = {}) {
|
|
|
40414
40419
|
var DEFAULT_PROMPT_VERSION = "blank-setup.v1";
|
|
40415
40420
|
var DEFAULT_BATCH_MODELS = "openai/codex,anthropic/claude,cursor/agent";
|
|
40416
40421
|
var PROMPTS = {
|
|
40417
|
-
"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. Mass evals reuse existing eval state: run `npx --yes @f-o-h/cli@latest org status --json` and `npx --yes @f-o-h/cli@latest agent list --json` before trying to create a fresh agent; if an existing eval agent is present, configure and prove that agent instead of creating a second bronze-tier agent. 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 --phone-mode observe` for the free scaffold path: agent, widget, voice config, smoke test, certification, and publish readiness together. Treat phone-number purchasing as an explicit paid/scarce contact-path step, not part of high-volume eval setup. If `FOH_CLI_SPEND_POLICY=no_spend` is active and a command returns `paid_resource_blocked_by_spend_policy`, do not try to bypass it; continue widget/setup proof and report that exact reason code for the phone path. If the customer/operator explicitly owns a number and asks for real PSTN proof, use `npx --yes @f-o-h/cli@latest provision byon attach --phone-number <e164> --confirm-owned --json`; do not invent ownership or buy a FOH-owned number. Run proof/smoke/certification where available, including widget proof, voice proof, and one explicit `foh
|
|
40422
|
+
"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. Mass evals reuse existing eval state: run `npx --yes @f-o-h/cli@latest org status --json` and `npx --yes @f-o-h/cli@latest agent list --json` before trying to create a fresh agent; if an existing eval agent is present, configure and prove that agent instead of creating a second bronze-tier agent. 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 --phone-mode observe` for the free scaffold path: agent, widget, voice config, smoke test, certification, and publish readiness together. Treat phone-number purchasing as an explicit paid/scarce contact-path step, not part of high-volume eval setup. If `FOH_CLI_SPEND_POLICY=no_spend` is active and a command returns `paid_resource_blocked_by_spend_policy`, do not try to bypass it; continue widget/setup proof and report that exact reason code for the phone path. If the customer/operator explicitly owns a number and asks for real PSTN proof, use `npx --yes @f-o-h/cli@latest provision byon attach --phone-number <e164> --confirm-owned --json`; do not invent ownership or buy a FOH-owned number. Run proof/smoke/certification where available, including widget proof, voice proof, and one explicit `foh certify run --agent <id> --profile release --json` before publish. `foh prove` does not run release certification by default; only pass `--include-certification --proof-cache-dir .foh/proof-cache` when an explicit combined proof/certification run is required. If voice proof returns `contact_phone_missing` or `voice_contact_expected_no_spend_hold`, report that exact reason code unless a BYON/customer-approved phone path already exists. If `FOH_EXTERNAL_AGENT_RUN_DIR` is set, write `${FOH_EXTERNAL_AGENT_RUN_DIR}/external-agent-metadata.json` with `schema_version`, `docs_pages_used`, key decisions, and blocker reason codes before finishing. 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.",
|
|
40418
40423
|
"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.",
|
|
40419
40424
|
"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.",
|
|
40420
40425
|
"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."
|