@f-o-h/cli 0.1.8 → 0.1.9
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 +174 -174
- package/dist/foh.js +8 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,175 +1,175 @@
|
|
|
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.
|
|
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 setup --org <org-id> --agent-template <template-id> --agent-name "Demo Agent" --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
|
-
`auth signup --web` opens the console signup page when possible and always
|
|
72
|
-
prints the fallback URL. `auth login --web` starts browser device
|
|
73
|
-
authorization, opens `/cli-auth`, waits for console approval, and stores the
|
|
74
|
-
returned short-lived token. Credential auth remains available as fallback.
|
|
75
|
-
|
|
76
|
-
`foh prove` produces a compact signed proof report across auth, org context,
|
|
77
|
-
agent validation, contact phone readiness, voice provider health, widget
|
|
78
|
-
channel/embed readiness, widget smoke, and simulation certification. It is
|
|
79
|
-
read-only by default; pass `--mutation-mode ensure` or `--repair` only when you
|
|
80
|
-
explicitly want proof to ensure missing widget state. Use `--strict` in
|
|
81
|
-
automation when holds should fail the command, and `--mission voice` or
|
|
82
|
-
`--require-phone` when a voice/contact number is mandatory for the demo.
|
|
83
|
-
|
|
84
|
-
The CLI defaults to the production API at `https://api.frontofhouse.okii.uk`.
|
|
85
|
-
|
|
86
|
-
## External-Agent Eval Capture
|
|
87
|
-
|
|
88
|
-
Use this when testing whether a clean coding agent can start from public docs
|
|
89
|
-
and the public npm package without private repo context:
|
|
90
|
-
|
|
91
|
-
```bash
|
|
92
|
-
foh eval external-agent run \
|
|
93
|
-
--model-provider openai \
|
|
94
|
-
--model-name codex \
|
|
95
|
-
--prompt-version blank-setup.v1
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
The command writes a versioned prompt, launches an instrumented shell, captures
|
|
99
|
-
FOH CLI commands into `commands.ndjson`, and finalizes `run.json` as an
|
|
100
|
-
`external_agent_run.v1` artifact when the shell exits.
|
|
101
|
-
|
|
102
|
-
## Local Scenario Suites
|
|
103
|
-
|
|
104
|
-
`foh test run --suite <file>` runs deterministic widget-runtime checks for a
|
|
105
|
-
specific agent. The suite format supports reply text checks plus structured
|
|
106
|
-
runtime assertions for trace/correlation IDs, action or terminal state, latency,
|
|
107
|
-
variables, tool calls, escalation/handoff, lead capture, and exact response
|
|
108
|
-
field paths.
|
|
109
|
-
|
|
110
|
-
```yaml
|
|
111
|
-
agent: agent_123
|
|
112
|
-
scenarios:
|
|
113
|
-
- id: viewing
|
|
114
|
-
turns:
|
|
115
|
-
- user: Can I book a viewing this week?
|
|
116
|
-
expect:
|
|
117
|
-
contains: viewing
|
|
118
|
-
trace_present: true
|
|
119
|
-
correlation_present: true
|
|
120
|
-
action: text
|
|
121
|
-
latency_ms:
|
|
122
|
-
max: 3000
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
Use transcript fixtures when turning real user conversations into regression
|
|
126
|
-
tests:
|
|
127
|
-
|
|
128
|
-
```yaml
|
|
129
|
-
agent: agent_123
|
|
130
|
-
scenarios:
|
|
131
|
-
- id: replay-viewing
|
|
132
|
-
fixture_transcript: ./fixtures/viewing-transcript.json
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
## Transcript Export
|
|
136
|
-
|
|
137
|
-
Use hydrated transcript export to turn real behavior into replay/debug artifacts:
|
|
138
|
-
|
|
139
|
-
```bash
|
|
140
|
-
foh transcripts export \
|
|
141
|
-
--agent <agent-id> \
|
|
142
|
-
--hydrate \
|
|
143
|
-
--include-traces \
|
|
144
|
-
--format json \
|
|
145
|
-
--out foh-transcripts.json \
|
|
146
|
-
--json
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
Exports redact obvious emails, phone numbers, and secret-like tokens by default.
|
|
150
|
-
Each exported conversation includes a `replay_command` and `test_fixture` seed
|
|
151
|
-
so operators or AI agents can move from observed failure to replay or scenario
|
|
152
|
-
regression without opening the console.
|
|
153
|
-
|
|
154
|
-
Replay a local export without API access:
|
|
155
|
-
|
|
156
|
-
```bash
|
|
157
|
-
foh agent replay --file foh-transcripts.json --json
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
## Improvement Packets
|
|
161
|
-
|
|
162
|
-
Use `foh bug improve` when a setup, proof, replay, knowledge, runtime, or
|
|
163
|
-
live-proof failure should become actionable backlog/test/config/docs work:
|
|
164
|
-
|
|
165
|
-
```bash
|
|
166
|
-
foh bug improve \
|
|
167
|
-
--from-file test-results/proof-or-replay-failure.json \
|
|
168
|
-
--out test-results/improvement-packet.json \
|
|
169
|
-
--json
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
The command emits a redacted `foh_improvement_packet.v1` with stable IDs,
|
|
173
|
-
reason code, promotion decision, evidence summary, and deterministic next
|
|
174
|
-
commands.
|
|
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.9`
|
|
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 setup --org <org-id> --agent-template <template-id> --agent-name "Demo Agent" --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
|
+
`auth signup --web` opens the console signup page when possible and always
|
|
72
|
+
prints the fallback URL. `auth login --web` starts browser device
|
|
73
|
+
authorization, opens `/cli-auth`, waits for console approval, and stores the
|
|
74
|
+
returned short-lived token. Credential auth remains available as fallback.
|
|
75
|
+
|
|
76
|
+
`foh prove` produces a compact signed proof report across auth, org context,
|
|
77
|
+
agent validation, contact phone readiness, voice provider health, widget
|
|
78
|
+
channel/embed readiness, widget smoke, and simulation certification. It is
|
|
79
|
+
read-only by default; pass `--mutation-mode ensure` or `--repair` only when you
|
|
80
|
+
explicitly want proof to ensure missing widget state. Use `--strict` in
|
|
81
|
+
automation when holds should fail the command, and `--mission voice` or
|
|
82
|
+
`--require-phone` when a voice/contact number is mandatory for the demo.
|
|
83
|
+
|
|
84
|
+
The CLI defaults to the production API at `https://api.frontofhouse.okii.uk`.
|
|
85
|
+
|
|
86
|
+
## External-Agent Eval Capture
|
|
87
|
+
|
|
88
|
+
Use this when testing whether a clean coding agent can start from public docs
|
|
89
|
+
and the public npm package without private repo context:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
foh eval external-agent run \
|
|
93
|
+
--model-provider openai \
|
|
94
|
+
--model-name codex \
|
|
95
|
+
--prompt-version blank-setup.v1
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
The command writes a versioned prompt, launches an instrumented shell, captures
|
|
99
|
+
FOH CLI commands into `commands.ndjson`, and finalizes `run.json` as an
|
|
100
|
+
`external_agent_run.v1` artifact when the shell exits.
|
|
101
|
+
|
|
102
|
+
## Local Scenario Suites
|
|
103
|
+
|
|
104
|
+
`foh test run --suite <file>` runs deterministic widget-runtime checks for a
|
|
105
|
+
specific agent. The suite format supports reply text checks plus structured
|
|
106
|
+
runtime assertions for trace/correlation IDs, action or terminal state, latency,
|
|
107
|
+
variables, tool calls, escalation/handoff, lead capture, and exact response
|
|
108
|
+
field paths.
|
|
109
|
+
|
|
110
|
+
```yaml
|
|
111
|
+
agent: agent_123
|
|
112
|
+
scenarios:
|
|
113
|
+
- id: viewing
|
|
114
|
+
turns:
|
|
115
|
+
- user: Can I book a viewing this week?
|
|
116
|
+
expect:
|
|
117
|
+
contains: viewing
|
|
118
|
+
trace_present: true
|
|
119
|
+
correlation_present: true
|
|
120
|
+
action: text
|
|
121
|
+
latency_ms:
|
|
122
|
+
max: 3000
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Use transcript fixtures when turning real user conversations into regression
|
|
126
|
+
tests:
|
|
127
|
+
|
|
128
|
+
```yaml
|
|
129
|
+
agent: agent_123
|
|
130
|
+
scenarios:
|
|
131
|
+
- id: replay-viewing
|
|
132
|
+
fixture_transcript: ./fixtures/viewing-transcript.json
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Transcript Export
|
|
136
|
+
|
|
137
|
+
Use hydrated transcript export to turn real behavior into replay/debug artifacts:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
foh transcripts export \
|
|
141
|
+
--agent <agent-id> \
|
|
142
|
+
--hydrate \
|
|
143
|
+
--include-traces \
|
|
144
|
+
--format json \
|
|
145
|
+
--out foh-transcripts.json \
|
|
146
|
+
--json
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Exports redact obvious emails, phone numbers, and secret-like tokens by default.
|
|
150
|
+
Each exported conversation includes a `replay_command` and `test_fixture` seed
|
|
151
|
+
so operators or AI agents can move from observed failure to replay or scenario
|
|
152
|
+
regression without opening the console.
|
|
153
|
+
|
|
154
|
+
Replay a local export without API access:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
foh agent replay --file foh-transcripts.json --json
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Improvement Packets
|
|
161
|
+
|
|
162
|
+
Use `foh bug improve` when a setup, proof, replay, knowledge, runtime, or
|
|
163
|
+
live-proof failure should become actionable backlog/test/config/docs work:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
foh bug improve \
|
|
167
|
+
--from-file test-results/proof-or-replay-failure.json \
|
|
168
|
+
--out test-results/improvement-packet.json \
|
|
169
|
+
--json
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
The command emits a redacted `foh_improvement_packet.v1` with stable IDs,
|
|
173
|
+
reason code, promotion decision, evidence summary, and deterministic next
|
|
174
|
+
commands.
|
|
175
175
|
|
package/dist/foh.js
CHANGED
|
@@ -32640,7 +32640,7 @@ var StdioServerTransport = class {
|
|
|
32640
32640
|
};
|
|
32641
32641
|
|
|
32642
32642
|
// src/lib/cli-version.ts
|
|
32643
|
-
var CLI_VERSION = "0.1.
|
|
32643
|
+
var CLI_VERSION = "0.1.9";
|
|
32644
32644
|
|
|
32645
32645
|
// src/commands/mcp-serve.ts
|
|
32646
32646
|
var DEFAULT_TIMEOUT_MS = 12e4;
|
|
@@ -38267,6 +38267,12 @@ var SECRET_RE2 = /\b(?:Bearer\s+)?(?:sk|pk|xai|whsec|EAAN|ghp|gho|github_pat|npm
|
|
|
38267
38267
|
function redactText(value) {
|
|
38268
38268
|
return value.replace(SECRET_RE2, "[redacted_secret]");
|
|
38269
38269
|
}
|
|
38270
|
+
function redactPath(value) {
|
|
38271
|
+
let redacted = redactText(value);
|
|
38272
|
+
const home = process.env.USERPROFILE || process.env.HOME;
|
|
38273
|
+
if (home) redacted = redacted.replace(home, "~");
|
|
38274
|
+
return redacted;
|
|
38275
|
+
}
|
|
38270
38276
|
function safeJsonLine(value) {
|
|
38271
38277
|
return JSON.stringify(value).replace(/\r?\n/g, " ") + "\n";
|
|
38272
38278
|
}
|
|
@@ -38285,7 +38291,7 @@ function recordExternalAgentCliInvocation(input) {
|
|
|
38285
38291
|
schema_version: "external_agent_cli_command.v1",
|
|
38286
38292
|
recorded_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
38287
38293
|
cli_version: input.cliVersion,
|
|
38288
|
-
cwd:
|
|
38294
|
+
cwd: redactPath(process.cwd()),
|
|
38289
38295
|
argv: args,
|
|
38290
38296
|
command: args.join(" "),
|
|
38291
38297
|
json_requested: args.includes("--json"),
|