@f-o-h/cli 0.1.4 → 0.1.6
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 +99 -1
- package/dist/foh.js +1724 -138
- package/examples/improvement-packet.example.json +35 -0
- package/examples/proof-report.example.json +32 -0
- package/examples/scenario-suite.viewing.yml +26 -0
- package/examples/transcript-export.example.json +39 -0
- package/package.json +3 -1
- package/schemas/cli-envelope.schema.json +22 -0
- package/schemas/improvement-packet.schema.json +76 -0
- package/schemas/scenario-suite.schema.json +42 -0
- package/schemas/transcript-export.schema.json +54 -0
package/README.md
CHANGED
|
@@ -4,11 +4,22 @@ 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.5`
|
|
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.
|
|
11
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
|
+
- `schemas/cli-envelope.schema.json`
|
|
19
|
+
- `schemas/scenario-suite.schema.json`
|
|
20
|
+
- `schemas/transcript-export.schema.json`
|
|
21
|
+
- `schemas/improvement-packet.schema.json`
|
|
22
|
+
|
|
12
23
|
## Install
|
|
13
24
|
|
|
14
25
|
```bash
|
|
@@ -37,6 +48,7 @@ foh auth login
|
|
|
37
48
|
foh org list
|
|
38
49
|
foh org use --org <org-id>
|
|
39
50
|
foh setup
|
|
51
|
+
foh prove --agent <agent-id> --json
|
|
40
52
|
```
|
|
41
53
|
|
|
42
54
|
For AI agents and text-only terminals:
|
|
@@ -48,6 +60,10 @@ foh auth login --email "$FOH_EMAIL" --password "$FOH_PASSWORD" --json
|
|
|
48
60
|
foh org list --json
|
|
49
61
|
foh org use --org <org-id> --json
|
|
50
62
|
foh setup --org <org-id> --agent-template <template-id> --agent-name "Demo Agent" --json
|
|
63
|
+
foh prove --agent <agent-id> --json --out foh-proof.json
|
|
64
|
+
foh test run --suite ./suite.yml --agent <agent-id> --json --out foh-test-report.json
|
|
65
|
+
foh agent replay --file ./transcript-export.json --json
|
|
66
|
+
foh bug improve --from-file foh-proof.json --out foh-improvement.json --json
|
|
51
67
|
```
|
|
52
68
|
|
|
53
69
|
`auth signup --web` opens the console signup page when possible and always
|
|
@@ -55,5 +71,87 @@ prints the fallback URL. `auth login --web` starts browser device
|
|
|
55
71
|
authorization, opens `/cli-auth`, waits for console approval, and stores the
|
|
56
72
|
returned short-lived token. Credential auth remains available as fallback.
|
|
57
73
|
|
|
74
|
+
`foh prove` produces a compact signed proof report across auth, org context,
|
|
75
|
+
agent validation, contact phone readiness, voice provider health, widget
|
|
76
|
+
channel/embed readiness, widget smoke, and simulation certification. It is
|
|
77
|
+
read-only by default; pass `--mutation-mode ensure` or `--repair` only when you
|
|
78
|
+
explicitly want proof to ensure missing widget state. Use `--strict` in
|
|
79
|
+
automation when holds should fail the command, and `--mission voice` or
|
|
80
|
+
`--require-phone` when a voice/contact number is mandatory for the demo.
|
|
81
|
+
|
|
58
82
|
The CLI defaults to the production API at `https://api.frontofhouse.okii.uk`.
|
|
83
|
+
|
|
84
|
+
## Local Scenario Suites
|
|
85
|
+
|
|
86
|
+
`foh test run --suite <file>` runs deterministic widget-runtime checks for a
|
|
87
|
+
specific agent. The suite format supports reply text checks plus structured
|
|
88
|
+
runtime assertions for trace/correlation IDs, action or terminal state, latency,
|
|
89
|
+
variables, tool calls, escalation/handoff, lead capture, and exact response
|
|
90
|
+
field paths.
|
|
91
|
+
|
|
92
|
+
```yaml
|
|
93
|
+
agent: agent_123
|
|
94
|
+
scenarios:
|
|
95
|
+
- id: viewing
|
|
96
|
+
turns:
|
|
97
|
+
- user: Can I book a viewing this week?
|
|
98
|
+
expect:
|
|
99
|
+
contains: viewing
|
|
100
|
+
trace_present: true
|
|
101
|
+
correlation_present: true
|
|
102
|
+
action: text
|
|
103
|
+
latency_ms:
|
|
104
|
+
max: 3000
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Use transcript fixtures when turning real user conversations into regression
|
|
108
|
+
tests:
|
|
109
|
+
|
|
110
|
+
```yaml
|
|
111
|
+
agent: agent_123
|
|
112
|
+
scenarios:
|
|
113
|
+
- id: replay-viewing
|
|
114
|
+
fixture_transcript: ./fixtures/viewing-transcript.json
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Transcript Export
|
|
118
|
+
|
|
119
|
+
Use hydrated transcript export to turn real behavior into replay/debug artifacts:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
foh transcripts export \
|
|
123
|
+
--agent <agent-id> \
|
|
124
|
+
--hydrate \
|
|
125
|
+
--include-traces \
|
|
126
|
+
--format json \
|
|
127
|
+
--out foh-transcripts.json \
|
|
128
|
+
--json
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Exports redact obvious emails, phone numbers, and secret-like tokens by default.
|
|
132
|
+
Each exported conversation includes a `replay_command` and `test_fixture` seed
|
|
133
|
+
so operators or AI agents can move from observed failure to replay or scenario
|
|
134
|
+
regression without opening the console.
|
|
135
|
+
|
|
136
|
+
Replay a local export without API access:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
foh agent replay --file foh-transcripts.json --json
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Improvement Packets
|
|
143
|
+
|
|
144
|
+
Use `foh bug improve` when a setup, proof, replay, knowledge, runtime, or
|
|
145
|
+
live-proof failure should become actionable backlog/test/config/docs work:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
foh bug improve \
|
|
149
|
+
--from-file test-results/proof-or-replay-failure.json \
|
|
150
|
+
--out test-results/improvement-packet.json \
|
|
151
|
+
--json
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
The command emits a redacted `foh_improvement_packet.v1` with stable IDs,
|
|
155
|
+
reason code, promotion decision, evidence summary, and deterministic next
|
|
156
|
+
commands.
|
|
59
157
|
|