@f-o-h/cli 0.1.5 → 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 CHANGED
@@ -9,6 +9,17 @@ Current published baseline: `@f-o-h/cli@0.1.5`
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
@@ -50,6 +61,9 @@ foh org list --json
50
61
  foh org use --org <org-id> --json
51
62
  foh setup --org <org-id> --agent-template <template-id> --agent-name "Demo Agent" --json
52
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
53
67
  ```
54
68
 
55
69
  `auth signup --web` opens the console signup page when possible and always
@@ -59,9 +73,85 @@ returned short-lived token. Credential auth remains available as fallback.
59
73
 
60
74
  `foh prove` produces a compact signed proof report across auth, org context,
61
75
  agent validation, contact phone readiness, voice provider health, widget
62
- channel/embed readiness, widget smoke, and simulation certification. Use
63
- `--strict` in automation when holds should fail the command, and
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
64
80
  `--require-phone` when a voice/contact number is mandatory for the demo.
65
81
 
66
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.
67
157