@f-o-h/cli 0.1.74 → 0.1.76
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 +87 -223
- package/dist/foh.js +67 -49
- package/package.json +41 -41
package/README.md
CHANGED
|
@@ -1,177 +1,44 @@
|
|
|
1
|
-
# Front Of House CLI
|
|
2
|
-
|
|
3
|
-
AI-operator provisioning CLI for Front Of House.
|
|
4
|
-
|
|
5
|
-
Public mirror: https://github.com/iiko38/front-of-house-cli
|
|
6
|
-
|
|
7
|
-
Current published baseline: `@f-o-h/cli@0.1.48`
|
|
8
|
-
|
|
9
|
-
This mirror is a generated release artifact. The private product monorepo is not
|
|
10
|
-
published here, and no open-source license is granted unless stated separately.
|
|
11
|
-
|
|
12
|
-
Package-local examples and schemas ship with the npm artifact:
|
|
13
|
-
|
|
14
|
-
- `examples/scenario-suite.viewing.yml`
|
|
15
|
-
- `examples/proof-report.example.json`
|
|
16
|
-
- `examples/transcript-export.example.json`
|
|
17
|
-
- `examples/improvement-packet.example.json`
|
|
18
|
-
- `examples/external-agent-run.example.json`
|
|
19
|
-
- `schemas/cli-envelope.schema.json`
|
|
20
|
-
- `schemas/scenario-suite.schema.json`
|
|
21
|
-
- `schemas/transcript-export.schema.json`
|
|
22
|
-
- `schemas/improvement-packet.schema.json`
|
|
23
|
-
- `schemas/external-agent-run.schema.json`
|
|
24
|
-
|
|
25
|
-
## Install
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
npx @f-o-h/cli setup
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
Or install globally:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
npm install -g @f-o-h/cli
|
|
35
|
-
foh --help
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Verify the package version:
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
npx @f-o-h/cli --version
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## First Run
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
foh auth signup --web
|
|
48
|
-
foh auth login --web
|
|
49
|
-
foh auth login
|
|
50
|
-
foh org list
|
|
51
|
-
foh org use --org <org-id>
|
|
52
|
-
foh setup
|
|
53
|
-
foh prove --agent <agent-id> --json
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
For AI agents and text-only terminals:
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
foh auth signup --web --json
|
|
60
|
-
foh auth login --web --json
|
|
61
|
-
foh auth login --email "$FOH_EMAIL" --password "$FOH_PASSWORD" --json
|
|
62
|
-
foh org list --json
|
|
63
|
-
foh org use --org <org-id> --json
|
|
64
|
-
FOH_CLI_SPEND_POLICY=no_spend foh setup --org <org-id> --agent-template <template-id> --agent-name "Demo Agent" --phone-mode observe --json
|
|
65
|
-
foh prove --agent <agent-id> --json --out foh-proof.json
|
|
66
|
-
foh test run --suite ./suite.yml --agent <agent-id> --json --out foh-test-report.json
|
|
67
|
-
foh agent replay --file ./transcript-export.json --json
|
|
68
|
-
foh bug improve --from-file foh-proof.json --out foh-improvement.json --json
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
Trusted server-side automation can use a scoped service token without browser
|
|
72
|
-
approval:
|
|
1
|
+
# Front Of House CLI
|
|
73
2
|
|
|
74
|
-
|
|
75
|
-
FOH_SERVICE_TOKEN="$FOH_SERVICE_TOKEN" FOH_ORG_ID="$FOH_ORG_ID" foh auth whoami --json
|
|
76
|
-
```
|
|
3
|
+
AI-operator provisioning CLI for Front Of House.
|
|
77
4
|
|
|
78
|
-
|
|
79
|
-
without exposing the token. Refresh short-lived eval tokens before long
|
|
80
|
-
external-agent runs; controlled live eval execution fails closed when explicit
|
|
81
|
-
`FOH_EXTERNAL_AGENT_EVAL_*` credentials are missing, expired, or expire before
|
|
82
|
-
the run budget.
|
|
5
|
+
Public mirror: https://github.com/iiko38/front-of-house-cli
|
|
83
6
|
|
|
84
|
-
|
|
85
|
-
prints the fallback URL. `auth login --web` starts browser device
|
|
86
|
-
authorization, opens `/cli-auth`, waits for console approval, and stores the
|
|
87
|
-
returned short-lived token. Credential auth remains available as fallback.
|
|
88
|
-
|
|
89
|
-
`foh prove` produces a compact signed proof report across auth, org context,
|
|
90
|
-
agent validation, contact phone readiness, voice provider health, widget
|
|
91
|
-
channel/embed readiness, and widget smoke. It does not run release
|
|
92
|
-
certification by default; run `foh certify run --agent <id> --profile release` (budget-safe default)
|
|
93
|
-
before publish, or pass `--include-certification` only when you intentionally
|
|
94
|
-
want the slower certification check inside proof. It is read-only by default;
|
|
95
|
-
pass `--mutation-mode ensure` or `--repair` only when you explicitly want proof
|
|
96
|
-
to ensure missing widget state. Use `--strict` in automation when holds should
|
|
97
|
-
fail the command, and `--mission voice` or `--require-phone` when a
|
|
98
|
-
voice/contact number is mandatory for the demo.
|
|
99
|
-
Use `--contact-path byon` when the proof is meant to validate a
|
|
100
|
-
customer-owned/BYON phone route; missing BYON config then reports
|
|
101
|
-
`byon_voice_number_not_configured` instead of suggesting FOH number purchase.
|
|
102
|
-
For repeated or parallel explicit-certification proof missions in AI-agent
|
|
103
|
-
evals, pass `--include-certification --proof-cache-dir .foh/proof-cache` so
|
|
104
|
-
simulation certification runs once and sibling proofs reuse the same signed
|
|
105
|
-
certification detail.
|
|
106
|
-
|
|
107
|
-
For mass AI-agent evals and repeated demo rehearsals, keep setup on the free
|
|
108
|
-
scaffold lane:
|
|
109
|
-
|
|
110
|
-
```bash
|
|
111
|
-
FOH_CLI_SPEND_POLICY=no_spend foh setup --org <org-id> --agent-template <template-id> --agent-name "Demo Agent" --phone-mode observe --json
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
`--phone-mode observe` checks whether a contact phone already exists without
|
|
115
|
-
buying one. `--phone-mode skip` bypasses the phone step. `--phone-mode purchase`
|
|
116
|
-
is the explicit paid contact path and is fail-closed when
|
|
117
|
-
`FOH_CLI_SPEND_POLICY=no_spend` is set.
|
|
118
|
-
|
|
119
|
-
If managed-number provisioning is blocked by account/provider capacity or empty
|
|
120
|
-
reserve inventory, proof reports `provider_capacity_blocked`; fix capacity or
|
|
121
|
-
switch to BYON rather than retrying blindly.
|
|
7
|
+
Current published baseline: `@f-o-h/cli@0.1.76`
|
|
122
8
|
|
|
123
|
-
|
|
9
|
+
This mirror is a generated release artifact. The private product monorepo is not
|
|
10
|
+
published here, and no open-source license is granted unless stated separately.
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
Use npm/npx. Do not clone the private monorepo for public setup.
|
|
124
15
|
|
|
125
16
|
```bash
|
|
126
|
-
|
|
17
|
+
npx --yes @f-o-h/cli@latest --version
|
|
18
|
+
npx --yes @f-o-h/cli@latest start
|
|
127
19
|
```
|
|
128
20
|
|
|
129
|
-
|
|
130
|
-
voice channel, returns Twilio webhook URLs, and preserves the cost boundary:
|
|
131
|
-
the customer owns the number/provider account.
|
|
21
|
+
For repeat use:
|
|
132
22
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
Use this when testing whether a clean coding agent can start from public docs
|
|
138
|
-
and the public npm package without private repo context:
|
|
139
|
-
|
|
140
|
-
```bash
|
|
141
|
-
foh eval external-agent batch \
|
|
142
|
-
--models openai/codex,anthropic/claude,cursor/agent \
|
|
143
|
-
--prompt-version blank-setup.v1 \
|
|
144
|
-
--json
|
|
23
|
+
```bash
|
|
24
|
+
npm install -g @f-o-h/cli@latest
|
|
25
|
+
foh --help
|
|
145
26
|
```
|
|
146
|
-
|
|
147
|
-
Run each returned launch command in a clean agent terminal:
|
|
148
|
-
|
|
149
|
-
```bash
|
|
150
|
-
foh eval external-agent run \
|
|
151
|
-
--model-provider openai \
|
|
152
|
-
--model-name codex \
|
|
153
|
-
--prompt-version blank-setup.v1
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
The command writes a versioned prompt, launches an instrumented shell, captures
|
|
157
|
-
FOH CLI commands into `commands.ndjson`, and finalizes `run.json` as an
|
|
158
|
-
`external_agent_run.v1` artifact when the shell exits.
|
|
159
27
|
|
|
160
|
-
|
|
161
|
-
intent explicit: reuse the existing eval org, agent, and widget by default;
|
|
162
|
-
create ephemeral orgs only for explicit lifecycle tests; do not create paid
|
|
163
|
-
phone resources unless a BYON/customer-owned or operator-approved paid lane is
|
|
164
|
-
selected.
|
|
28
|
+
## First Customer Path
|
|
165
29
|
|
|
166
|
-
|
|
30
|
+
This is the path a blank AI coding agent or developer should try first:
|
|
167
31
|
|
|
168
32
|
```bash
|
|
169
|
-
|
|
170
|
-
|
|
33
|
+
npx --yes @f-o-h/cli@latest auth signup --web --json
|
|
34
|
+
npx --yes @f-o-h/cli@latest auth login --web --json
|
|
35
|
+
npx --yes @f-o-h/cli@latest setup --phone-mode observe --json
|
|
36
|
+
npx --yes @f-o-h/cli@latest prove --agent <agent-id> --mission widget --json
|
|
37
|
+
npx --yes @f-o-h/cli@latest publish --agent <agent-id> --json
|
|
171
38
|
```
|
|
172
39
|
|
|
173
|
-
|
|
174
|
-
|
|
40
|
+
`publish` consumes existing release evidence. If evidence is missing or stale,
|
|
41
|
+
it blocks with a reason code and `next_commands`; follow those commands exactly.
|
|
175
42
|
|
|
176
43
|
## Common Missions
|
|
177
44
|
|
|
@@ -180,80 +47,75 @@ than creating a second bronze-tier agent.
|
|
|
180
47
|
| Start | `foh start` |
|
|
181
48
|
| Setup | `foh setup --phone-mode observe --json` |
|
|
182
49
|
| Prove | `foh prove --agent <agent_id> --mission widget --json` |
|
|
183
|
-
|
|
|
50
|
+
| Publish | `foh publish --agent <agent_id> --json` |
|
|
184
51
|
| Debug | `foh debug --out test-results/foh-cli-diag.latest.json --json` |
|
|
185
|
-
| Platform feedback | `foh bug improve --from-file <artifact.json> --json` |
|
|
186
|
-
| Publish | `foh agent publish --agent <agent_id> --json` |
|
|
187
52
|
|
|
188
|
-
For
|
|
53
|
+
For AI agents: prefer `--json`, preserve command outputs as evidence, and follow
|
|
54
|
+
`next_commands` exactly when a command blocks.
|
|
55
|
+
|
|
56
|
+
## Cost-Safe Phone Setup
|
|
57
|
+
|
|
58
|
+
Use the free scaffold lane for demos and repeated AI-agent tests:
|
|
189
59
|
|
|
190
60
|
```bash
|
|
191
|
-
foh
|
|
192
|
-
--models openai/codex \
|
|
193
|
-
--prompt-version knowledge-miss.v1 \
|
|
194
|
-
--knowledge-question "Does 12 Acacia Avenue allow Saturday viewings?" \
|
|
195
|
-
--expected-answer "Saturday viewings are available by appointment only." \
|
|
196
|
-
--json
|
|
61
|
+
FOH_CLI_SPEND_POLICY=no_spend foh setup --phone-mode observe --json
|
|
197
62
|
```
|
|
198
63
|
|
|
199
|
-
|
|
200
|
-
|
|
64
|
+
`--phone-mode observe` checks whether a contact phone already exists without
|
|
65
|
+
buying one. `--phone-mode skip` bypasses the phone step. `--phone-mode purchase`
|
|
66
|
+
is the explicit paid contact path and is fail-closed when
|
|
67
|
+
`FOH_CLI_SPEND_POLICY=no_spend` is set.
|
|
201
68
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
```bash
|
|
205
|
-
foh
|
|
206
|
-
--runner codex \
|
|
207
|
-
--batch test-results/external-agent-runs/<batch>/batch.json \
|
|
208
|
-
--codex-model gpt-5.3-codex \
|
|
209
|
-
--dry-run \
|
|
210
|
-
--json
|
|
69
|
+
Attach a customer-owned voice number without FOH purchasing inventory:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
foh provision byon attach --phone-number <e164> --confirm-owned --org <org-id> --json
|
|
211
73
|
```
|
|
212
74
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
`
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
75
|
+
The attach command requires explicit ownership confirmation, writes the org's
|
|
76
|
+
voice channel, returns provider webhook URLs, and preserves the cost boundary:
|
|
77
|
+
the customer owns the number/provider account.
|
|
78
|
+
|
|
79
|
+
## Auth Modes
|
|
80
|
+
|
|
81
|
+
`auth signup --web` opens the console signup page when possible and always
|
|
82
|
+
prints the fallback URL. `auth login --web` starts browser device authorization,
|
|
83
|
+
opens `/cli-auth`, waits for console approval, and stores a short-lived token.
|
|
84
|
+
Credential auth remains available as fallback.
|
|
85
|
+
|
|
86
|
+
Trusted server-side automation can use a scoped service token without browser
|
|
87
|
+
approval:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
FOH_SERVICE_TOKEN="$FOH_SERVICE_TOKEN" FOH_ORG_ID="$FOH_ORG_ID" foh auth whoami --json
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
`auth whoami --json` includes `auth.expires_at` and `auth.token_ttl_seconds`
|
|
94
|
+
without exposing the token.
|
|
95
|
+
|
|
96
|
+
## Package Artifacts
|
|
97
|
+
|
|
98
|
+
Package-local examples and schemas ship with the npm artifact:
|
|
99
|
+
|
|
100
|
+
- `examples/scenario-suite.viewing.yml`
|
|
101
|
+
- `examples/proof-report.example.json`
|
|
102
|
+
- `examples/transcript-export.example.json`
|
|
103
|
+
- `examples/improvement-packet.example.json`
|
|
104
|
+
- `examples/external-agent-run.example.json`
|
|
105
|
+
- `schemas/cli-envelope.schema.json`
|
|
106
|
+
- `schemas/scenario-suite.schema.json`
|
|
107
|
+
- `schemas/transcript-export.schema.json`
|
|
108
|
+
- `schemas/improvement-packet.schema.json`
|
|
109
|
+
- `schemas/external-agent-run.schema.json`
|
|
110
|
+
|
|
111
|
+
## Advanced Operator Surfaces
|
|
112
|
+
|
|
113
|
+
These commands are intentionally outside the first customer path:
|
|
114
|
+
|
|
115
|
+
- `foh certify run --agent <agent_id> --profile release --json` produces release evidence when `publish` asks for it.
|
|
116
|
+
- `foh bug improve --from-file <artifact.json> --json` converts FOH product/docs/runtime failures into redacted improvement packets.
|
|
117
|
+
- `foh eval external-agent ...` runs the controlled external-agent benchmark harness.
|
|
118
|
+
- `foh sim ...` and Dojo-related certification flows are platform/operator testing surfaces.
|
|
257
119
|
## Local Scenario Suites
|
|
258
120
|
|
|
259
121
|
`foh test run --suite <file>` runs deterministic widget-runtime checks for a
|
|
@@ -327,3 +189,5 @@ foh bug improve \
|
|
|
327
189
|
The command emits a redacted `foh_improvement_packet.v1` with stable IDs,
|
|
328
190
|
reason code, promotion decision, evidence summary, and deterministic next
|
|
329
191
|
commands.
|
|
192
|
+
|
|
193
|
+
|
package/dist/foh.js
CHANGED
|
@@ -14383,6 +14383,11 @@ async function runSetupCertifyLoop(agentId, params) {
|
|
|
14383
14383
|
}
|
|
14384
14384
|
|
|
14385
14385
|
// src/lib/agent-publish-gate.ts
|
|
14386
|
+
function normalizePublishCertificationEvidence(publish) {
|
|
14387
|
+
const evidence = publish.certification_evidence;
|
|
14388
|
+
if (!evidence || typeof evidence !== "object" || Array.isArray(evidence)) return null;
|
|
14389
|
+
return evidence;
|
|
14390
|
+
}
|
|
14386
14391
|
async function validateCertifyAndPublishAgent(opts) {
|
|
14387
14392
|
const validation = await apiFetch(
|
|
14388
14393
|
`/v1/console/agents/${opts.agentId}/validate`,
|
|
@@ -14403,11 +14408,14 @@ async function validateCertifyAndPublishAgent(opts) {
|
|
|
14403
14408
|
apiUrlOverride: opts.apiUrlOverride,
|
|
14404
14409
|
orgId: opts.orgId
|
|
14405
14410
|
});
|
|
14411
|
+
const evidence = normalizePublishCertificationEvidence(publish);
|
|
14406
14412
|
return {
|
|
14407
14413
|
validation,
|
|
14408
14414
|
certification: {
|
|
14409
14415
|
status: "not_run",
|
|
14410
|
-
reason_code: "publish_consumes_existing_certification_evidence"
|
|
14416
|
+
reason_code: "publish_consumes_existing_certification_evidence",
|
|
14417
|
+
evidence_source: evidence?.source ?? null,
|
|
14418
|
+
evidence
|
|
14411
14419
|
},
|
|
14412
14420
|
publish
|
|
14413
14421
|
};
|
|
@@ -14453,55 +14461,65 @@ async function validateAgentLocalDraftShape(agentId, opts = {}) {
|
|
|
14453
14461
|
warnings: ["local-only draft-shape validation was used"]
|
|
14454
14462
|
});
|
|
14455
14463
|
}
|
|
14456
|
-
function
|
|
14457
|
-
|
|
14458
|
-
|
|
14459
|
-
|
|
14460
|
-
|
|
14461
|
-
|
|
14462
|
-
|
|
14463
|
-
|
|
14464
|
-
if (!opts.breakGlassReason || !opts.breakGlassIncident) {
|
|
14465
|
-
throw new FohError({
|
|
14466
|
-
step: "agent.publish",
|
|
14467
|
-
error: "Both --break-glass-reason and --break-glass-incident are required together",
|
|
14468
|
-
remediation: "Provide both break-glass fields, or omit both for normal publish.",
|
|
14469
|
-
statusCode: 400
|
|
14470
|
-
});
|
|
14471
|
-
}
|
|
14472
|
-
const data2 = await apiFetch(`/v1/console/agents/${opts.agent}/publish`, {
|
|
14473
|
-
method: "POST",
|
|
14474
|
-
body: JSON.stringify({
|
|
14475
|
-
break_glass: {
|
|
14476
|
-
reason: String(opts.breakGlassReason),
|
|
14477
|
-
incident_id: String(opts.breakGlassIncident)
|
|
14478
|
-
}
|
|
14479
|
-
}),
|
|
14480
|
-
orgId: opts.org,
|
|
14481
|
-
apiUrlOverride: opts.apiUrl
|
|
14464
|
+
async function publishAgentAction(opts) {
|
|
14465
|
+
if (opts.breakGlassReason || opts.breakGlassIncident) {
|
|
14466
|
+
if (!opts.breakGlassReason || !opts.breakGlassIncident) {
|
|
14467
|
+
throw new FohError({
|
|
14468
|
+
step: "agent.publish",
|
|
14469
|
+
error: "Both --break-glass-reason and --break-glass-incident are required together",
|
|
14470
|
+
remediation: "Provide both break-glass fields, or omit both for normal publish.",
|
|
14471
|
+
statusCode: 400
|
|
14482
14472
|
});
|
|
14483
|
-
format({
|
|
14484
|
-
status: "published_with_break_glass",
|
|
14485
|
-
warning: "break-glass bypassed the normal validate -> publish evidence gate CLI sequence",
|
|
14486
|
-
publish: data2
|
|
14487
|
-
}, { json: opts.json ?? false });
|
|
14488
|
-
return;
|
|
14489
14473
|
}
|
|
14490
|
-
const
|
|
14491
|
-
|
|
14474
|
+
const data2 = await apiFetch(`/v1/console/agents/${opts.agent}/publish`, {
|
|
14475
|
+
method: "POST",
|
|
14476
|
+
body: JSON.stringify({
|
|
14477
|
+
break_glass: {
|
|
14478
|
+
reason: String(opts.breakGlassReason),
|
|
14479
|
+
incident_id: String(opts.breakGlassIncident)
|
|
14480
|
+
}
|
|
14481
|
+
}),
|
|
14492
14482
|
orgId: opts.org,
|
|
14493
|
-
apiUrlOverride: opts.apiUrl
|
|
14494
|
-
certMode: opts.certMode,
|
|
14495
|
-
scenarioIds: opts.certScenarioIds,
|
|
14496
|
-
adaptiveRuns: Number(opts.certAdaptiveRuns),
|
|
14497
|
-
maxImprovementRounds: Number(opts.certMaxImprovementRounds)
|
|
14483
|
+
apiUrlOverride: opts.apiUrl
|
|
14498
14484
|
});
|
|
14499
14485
|
format({
|
|
14500
|
-
status: "
|
|
14501
|
-
|
|
14502
|
-
publish:
|
|
14486
|
+
status: "published_with_break_glass",
|
|
14487
|
+
warning: "break-glass bypassed the normal validate -> publish evidence gate CLI sequence",
|
|
14488
|
+
publish: data2
|
|
14503
14489
|
}, { json: opts.json ?? false });
|
|
14490
|
+
return;
|
|
14491
|
+
}
|
|
14492
|
+
const data = await validateCertifyAndPublishAgent({
|
|
14493
|
+
agentId: opts.agent,
|
|
14494
|
+
orgId: opts.org,
|
|
14495
|
+
apiUrlOverride: opts.apiUrl,
|
|
14496
|
+
certMode: opts.certMode ?? "quick",
|
|
14497
|
+
scenarioIds: opts.certScenarioIds,
|
|
14498
|
+
adaptiveRuns: Number(opts.certAdaptiveRuns ?? "30"),
|
|
14499
|
+
maxImprovementRounds: Number(opts.certMaxImprovementRounds ?? "1")
|
|
14500
|
+
});
|
|
14501
|
+
format({
|
|
14502
|
+
status: "validated_published",
|
|
14503
|
+
certification: data.certification,
|
|
14504
|
+
publish: data.publish
|
|
14505
|
+
}, { json: opts.json ?? false });
|
|
14506
|
+
}
|
|
14507
|
+
function registerAgentPublishCommand(parent, options = {}) {
|
|
14508
|
+
const publish = parent.command("publish").description(options.publicAlias ? "Publish an agent using existing certification evidence" : "Validate and publish an agent using existing certification evidence").requiredOption("--agent <id>", "Agent ID").option("--org <id>", "Org ID (default: stored org from foh org use)").option("--api-url <url>", "API base URL override").option("--json", "Output as JSON");
|
|
14509
|
+
if (!options.publicAlias) {
|
|
14510
|
+
publish.option("--cert-mode <m>", "Deprecated compatibility flag; publish consumes existing certification evidence", "quick").option("--cert-scenario-ids <csv>", "Deprecated compatibility flag; run foh certify before publish").option("--cert-adaptive-runs <n>", "Deprecated compatibility flag; run foh certify before publish", "30").option("--cert-max-improvement-rounds <n>", "Deprecated compatibility flag; run foh certify before publish", "1").option("--break-glass-reason <reason>", "Break-glass reason for publish override").option("--break-glass-incident <id>", "Break-glass incident ID for publish override");
|
|
14511
|
+
}
|
|
14512
|
+
publish.action(async (opts) => withCommandErrorHandling(async () => {
|
|
14513
|
+
await publishAgentAction(opts);
|
|
14514
|
+
}));
|
|
14515
|
+
}
|
|
14516
|
+
function registerAgentValidationCommands(agent) {
|
|
14517
|
+
agent.command("validate").description("Validate agent config \u2014 exits 1 if issues found").requiredOption("--agent <id>", "Agent ID").option("--local-only", "Run local draft-shape validation without calling remote validate endpoint").option("--api-url <url>", "API base URL override").option("--json", "Output as JSON").action(async (opts) => withCommandErrorHandling(async () => {
|
|
14518
|
+
const data = opts.localOnly ? await validateAgentLocalDraftShape(opts.agent, { apiUrlOverride: opts.apiUrl }) : await validateAgentRemoteOnly(opts.agent, { apiUrlOverride: opts.apiUrl });
|
|
14519
|
+
format(data, { json: opts.json ?? false });
|
|
14520
|
+
if (Array.isArray(data.issues) && data.issues.length > 0) markCommandFailed(1);
|
|
14504
14521
|
}));
|
|
14522
|
+
registerAgentPublishCommand(agent);
|
|
14505
14523
|
}
|
|
14506
14524
|
|
|
14507
14525
|
// src/commands/agent.ts
|
|
@@ -32790,7 +32808,7 @@ var StdioServerTransport = class {
|
|
|
32790
32808
|
};
|
|
32791
32809
|
|
|
32792
32810
|
// src/lib/cli-version.ts
|
|
32793
|
-
var CLI_VERSION = "0.1.
|
|
32811
|
+
var CLI_VERSION = "0.1.76";
|
|
32794
32812
|
|
|
32795
32813
|
// src/commands/mcp-serve.ts
|
|
32796
32814
|
var DEFAULT_TIMEOUT_MS = 12e4;
|
|
@@ -38057,6 +38075,7 @@ function registerProve(program3) {
|
|
|
38057
38075
|
attempts: loop.attempts?.length ?? 0,
|
|
38058
38076
|
improvement_runs: loop.improvement_runs,
|
|
38059
38077
|
scenario_summary: loop.certificate?.scenario_summary,
|
|
38078
|
+
performance_summary: loop.certificate?.performance_summary ?? null,
|
|
38060
38079
|
proof_cache: cached2.metadata
|
|
38061
38080
|
}));
|
|
38062
38081
|
}
|
|
@@ -41719,10 +41738,8 @@ var CLI_MISSION_EXAMPLES = [
|
|
|
41719
41738
|
{ mission: "Start", command: "foh start", description: "guided setup and next action selector" },
|
|
41720
41739
|
{ mission: "Setup", command: "foh setup --phone-mode observe --json", description: "create or update agent, widget, voice config, and proof scaffold" },
|
|
41721
41740
|
{ mission: "Prove", command: "foh prove --agent <agent_id> --mission widget --json", description: "produce a machine-readable proof report" },
|
|
41722
|
-
{ mission: "
|
|
41723
|
-
{ mission: "Debug", command: "foh debug --out test-results/foh-cli-diag.latest.json --json", description: "collect auth/org/API diagnostics" }
|
|
41724
|
-
{ mission: "Improve", command: "foh bug improve --from-file <artifact.json> --json", description: "convert a failure artifact into a redacted improvement packet" },
|
|
41725
|
-
{ mission: "Publish", command: "foh agent publish --agent <agent_id> --json", description: "publish after proof gates pass" }
|
|
41741
|
+
{ mission: "Publish", command: "foh publish --agent <agent_id> --json", description: "publish when proof and release evidence pass" },
|
|
41742
|
+
{ mission: "Debug", command: "foh debug --out test-results/foh-cli-diag.latest.json --json", description: "collect auth/org/API diagnostics" }
|
|
41726
41743
|
];
|
|
41727
41744
|
function missionHelpText() {
|
|
41728
41745
|
return [
|
|
@@ -41730,7 +41747,7 @@ function missionHelpText() {
|
|
|
41730
41747
|
"Common missions:",
|
|
41731
41748
|
...CLI_MISSION_EXAMPLES.map((item) => ` ${item.command.padEnd(66)} ${item.description}`),
|
|
41732
41749
|
"",
|
|
41733
|
-
"For AI agents: prefer --json
|
|
41750
|
+
"For AI agents: prefer --json, follow next_commands exactly, and treat certify/eval/bug as advanced operator surfaces."
|
|
41734
41751
|
].join("\n");
|
|
41735
41752
|
}
|
|
41736
41753
|
function addMissionHelp(program3) {
|
|
@@ -41823,6 +41840,7 @@ registerCertify(program2);
|
|
|
41823
41840
|
registerDiag(program2);
|
|
41824
41841
|
registerBug(program2);
|
|
41825
41842
|
registerProve(program2);
|
|
41843
|
+
registerAgentPublishCommand(program2, { publicAlias: true });
|
|
41826
41844
|
registerEval(program2);
|
|
41827
41845
|
registerUpdate(program2);
|
|
41828
41846
|
registerHome(program2);
|
package/package.json
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@f-o-h/cli",
|
|
3
|
+
"version": "0.1.76",
|
|
4
|
+
"description": "FOH CLI - AI-operator provisioning tool for Front Of House",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"bin": {
|
|
7
|
+
"foh": "dist/foh.js"
|
|
8
|
+
},
|
|
9
|
+
"main": "dist/foh.js",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist/",
|
|
12
|
+
"examples/",
|
|
13
|
+
"schemas/",
|
|
14
|
+
"README.md",
|
|
15
|
+
"package.json"
|
|
16
|
+
],
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public"
|
|
19
|
+
},
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": "\u003e=18"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "node build.mjs",
|
|
25
|
+
"test": "vitest run",
|
|
26
|
+
"typecheck": "tsc --noEmit"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
30
|
+
"commander": "^12.1.0",
|
|
31
|
+
"js-yaml": "^4.1.1",
|
|
32
|
+
"picocolors": "^1.1.1",
|
|
33
|
+
"zod": "^4.3.6"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/js-yaml": "^4.0.9",
|
|
37
|
+
"@types/node": "^22.0.0",
|
|
38
|
+
"esbuild": "^0.24.0",
|
|
39
|
+
"vitest": "^2.0.0"
|
|
40
|
+
}
|
|
41
|
+
}
|