@f-o-h/cli 0.1.39 → 0.1.40
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 +40 -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.
|
|
7
|
+
Current published baseline: `@f-o-h/cli@0.1.40`
|
|
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
|
@@ -14341,6 +14341,31 @@ function boundedInt(value, params) {
|
|
|
14341
14341
|
if (!Number.isFinite(parsed)) return params.fallback;
|
|
14342
14342
|
return Math.max(params.min, Math.min(params.max, Math.trunc(parsed)));
|
|
14343
14343
|
}
|
|
14344
|
+
function certModeFlag(mode) {
|
|
14345
|
+
if (mode === "full") return ["--full"];
|
|
14346
|
+
if (mode === "stress") return ["--stress"];
|
|
14347
|
+
return [];
|
|
14348
|
+
}
|
|
14349
|
+
function buildCertificationFailureCommands(params) {
|
|
14350
|
+
const modeFlags = certModeFlag(params.certMode);
|
|
14351
|
+
const orgFlags = params.orgId ? ["--org", params.orgId] : [];
|
|
14352
|
+
const scenarioFlags = params.topBlocker?.scenario_id ? ["--scenario-ids", params.topBlocker.scenario_id] : [];
|
|
14353
|
+
const command = [
|
|
14354
|
+
"foh",
|
|
14355
|
+
"sim",
|
|
14356
|
+
"certify-loop",
|
|
14357
|
+
"--agent",
|
|
14358
|
+
params.agentId,
|
|
14359
|
+
...orgFlags,
|
|
14360
|
+
...modeFlags,
|
|
14361
|
+
...scenarioFlags,
|
|
14362
|
+
"--json"
|
|
14363
|
+
].join(" ");
|
|
14364
|
+
return [
|
|
14365
|
+
command,
|
|
14366
|
+
`foh bug improve --from external-agent-run --file <run_dir>/run.json --json`
|
|
14367
|
+
];
|
|
14368
|
+
}
|
|
14344
14369
|
function resolveCertifiedPublishOptions(opts) {
|
|
14345
14370
|
const rawMode = String(opts.certMode || "quick").toLowerCase();
|
|
14346
14371
|
const certMode = normalizeAgentCertMode(rawMode);
|
|
@@ -14392,10 +14417,22 @@ async function validateCertifyAndPublishAgent(opts) {
|
|
|
14392
14417
|
const certificate = certification.certificate;
|
|
14393
14418
|
if (!certification.ok || !certification.overall_pass || !certificate) {
|
|
14394
14419
|
const topBlocker = certificate?.blockers?.[0];
|
|
14420
|
+
const blockerLabel = topBlocker?.invariant && topBlocker?.scenario_id ? `${topBlocker.invariant} in ${topBlocker.scenario_id}` : "unknown";
|
|
14421
|
+
const nextCommands = buildCertificationFailureCommands({
|
|
14422
|
+
agentId: opts.agentId,
|
|
14423
|
+
orgId: opts.orgId,
|
|
14424
|
+
certMode,
|
|
14425
|
+
topBlocker
|
|
14426
|
+
});
|
|
14395
14427
|
throw new FohError({
|
|
14396
14428
|
step: "agent.publish",
|
|
14397
|
-
error: `Simulation certification failed before publish: ${certificate?.scenario_summary?.failed ?? "unknown"}/${certificate?.scenario_summary?.total ?? "unknown"} scenario(s) failed.`,
|
|
14398
|
-
remediation:
|
|
14429
|
+
error: `Simulation certification failed before publish: ${certificate?.scenario_summary?.failed ?? "unknown"}/${certificate?.scenario_summary?.total ?? "unknown"} scenario(s) failed. Top blocker: ${blockerLabel}.`,
|
|
14430
|
+
remediation: [
|
|
14431
|
+
topBlocker?.suggested_fix ?? certificate?.recommendations?.[0] ?? "Fix the top simulation blocker before publishing.",
|
|
14432
|
+
`Re-run: ${nextCommands[0]}`
|
|
14433
|
+
].filter(Boolean).join(" "),
|
|
14434
|
+
reasonCode: "simulation_certification_failed",
|
|
14435
|
+
nextCommands,
|
|
14399
14436
|
detail: {
|
|
14400
14437
|
certification,
|
|
14401
14438
|
top_blocker: topBlocker ?? null
|
|
@@ -32764,7 +32801,7 @@ var StdioServerTransport = class {
|
|
|
32764
32801
|
};
|
|
32765
32802
|
|
|
32766
32803
|
// src/lib/cli-version.ts
|
|
32767
|
-
var CLI_VERSION = "0.1.
|
|
32804
|
+
var CLI_VERSION = "0.1.40";
|
|
32768
32805
|
|
|
32769
32806
|
// src/commands/mcp-serve.ts
|
|
32770
32807
|
var DEFAULT_TIMEOUT_MS = 12e4;
|