@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.
@@ -0,0 +1,35 @@
1
+ {
2
+ "schema_version": "foh_improvement_packet.v1",
3
+ "created_at": "2026-05-01T00:00:00.000Z",
4
+ "source_type": "knowledge_miss",
5
+ "reason_code": "knowledge_query_no_match",
6
+ "promotion_decision": "fix_docs",
7
+ "ids": {
8
+ "org_id": "org_example",
9
+ "agent_id": "agent_example",
10
+ "conversation_id": "conversation_example",
11
+ "trace_id": "trace_example",
12
+ "correlation_id": "correlation_example"
13
+ },
14
+ "evidence": {
15
+ "summary": "Customer asked about opening hours and the agent had no matching knowledge chunk.",
16
+ "source_artifact_path": "test-results/knowledge-miss.example.json",
17
+ "source_command": "foh knowledge query --agent agent_example --text \"What are your opening hours?\" --json",
18
+ "redaction": {
19
+ "enabled": true,
20
+ "fields": ["email", "phone", "secret-like-token"]
21
+ },
22
+ "redacted_source": {
23
+ "truncated": false,
24
+ "value": {
25
+ "schema_version": "foh_knowledge_query_failure_packet.v1",
26
+ "agent_id": "agent_example",
27
+ "query": "What are your opening hours?",
28
+ "reason_code": "knowledge_query_no_match"
29
+ }
30
+ }
31
+ },
32
+ "next_commands": [
33
+ "foh knowledge query --agent agent_example --text \"<question>\" --explain --json"
34
+ ]
35
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "schema_version": "foh_cli_envelope.v1",
3
+ "ok": true,
4
+ "status": "pass",
5
+ "reason_code": "proof_passed",
6
+ "summary": "Agent is ready for the selected mission.",
7
+ "ids": {
8
+ "agent_id": "agent_123",
9
+ "mission": "setup",
10
+ "mutation_mode": "read-only"
11
+ },
12
+ "checks": [
13
+ {
14
+ "name": "agent_validation",
15
+ "category": "setup",
16
+ "status": "pass",
17
+ "reason_code": "agent_valid"
18
+ },
19
+ {
20
+ "name": "widget_smoke",
21
+ "category": "runtime",
22
+ "status": "pass",
23
+ "reason_code": "widget_smoke_passed"
24
+ }
25
+ ],
26
+ "artifacts": {
27
+ "proof_report": "foh-proof.json"
28
+ },
29
+ "next_commands": [
30
+ "foh test run --suite ./scenario-suite.viewing.yml --agent agent_123 --json"
31
+ ]
32
+ }
@@ -0,0 +1,26 @@
1
+ agent: agent_123
2
+ scenarios:
3
+ - id: viewing-request
4
+ turns:
5
+ - user: Can I book a viewing this week?
6
+ expect:
7
+ contains: viewing
8
+ trace_present: true
9
+ correlation_present: true
10
+ action: text
11
+ latency_ms:
12
+ max: 3000
13
+
14
+ - id: human-handoff
15
+ turns:
16
+ - user: My budget is 500k and I want someone to call me back.
17
+ expect:
18
+ contains:
19
+ - call
20
+ - back
21
+ tool_calls:
22
+ min_count: 0
23
+ escalation:
24
+ requested: true
25
+ lead_capture:
26
+ required: false
@@ -0,0 +1,39 @@
1
+ {
2
+ "schema_version": "foh_transcript_export.v2",
3
+ "redaction": {
4
+ "enabled": true,
5
+ "fields": ["email", "phone", "secret-like-token"]
6
+ },
7
+ "hydration": {
8
+ "enabled": true,
9
+ "include_traces": true
10
+ },
11
+ "conversations": [
12
+ {
13
+ "id": "conv_123",
14
+ "agent_id": "agent_123",
15
+ "terminal_state": "handoff_requested",
16
+ "transcript_text": "USER: Can I book a viewing?\\nASSISTANT: Yes, I can help with that.",
17
+ "traces": [
18
+ {
19
+ "id": "trace_123",
20
+ "trace_type": "agent_input",
21
+ "payload": {
22
+ "message": "Can I book a viewing?"
23
+ },
24
+ "created_at": "2026-04-30T00:00:00.000Z"
25
+ }
26
+ ],
27
+ "replay_command": "foh agent replay --agent agent_123 --conversation conv_123 --json",
28
+ "test_fixture": {
29
+ "schema_version": "foh_scenario_fixture.v1",
30
+ "conversation_id": "conv_123",
31
+ "turns": [
32
+ {
33
+ "user": "Can I book a viewing?"
34
+ }
35
+ ]
36
+ }
37
+ }
38
+ ]
39
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@f-o-h/cli",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "FOH CLI - AI-operator provisioning tool for Front Of House",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {
@@ -9,6 +9,8 @@
9
9
  "main": "dist/foh.js",
10
10
  "files": [
11
11
  "dist/",
12
+ "examples/",
13
+ "schemas/",
12
14
  "README.md",
13
15
  "package.json"
14
16
  ],
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://frontofhouse.okii.uk/schemas/cli-envelope.schema.json",
4
+ "title": "FOH CLI Envelope",
5
+ "type": "object",
6
+ "required": ["schema_version", "ok", "status", "reason_code", "summary", "ids", "checks", "artifacts", "next_commands"],
7
+ "properties": {
8
+ "schema_version": { "type": "string" },
9
+ "ok": { "type": "boolean" },
10
+ "status": { "type": "string" },
11
+ "reason_code": { "type": "string", "minLength": 1 },
12
+ "summary": { "type": "string" },
13
+ "ids": { "type": "object" },
14
+ "checks": { "type": "array" },
15
+ "artifacts": { "type": "object" },
16
+ "next_commands": {
17
+ "type": "array",
18
+ "items": { "type": "string" }
19
+ }
20
+ },
21
+ "additionalProperties": true
22
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://frontofhouse.okii.uk/schemas/improvement-packet.schema.json",
4
+ "title": "FOH Improvement Packet",
5
+ "type": "object",
6
+ "required": [
7
+ "schema_version",
8
+ "created_at",
9
+ "source_type",
10
+ "reason_code",
11
+ "promotion_decision",
12
+ "ids",
13
+ "evidence",
14
+ "next_commands"
15
+ ],
16
+ "properties": {
17
+ "schema_version": { "const": "foh_improvement_packet.v1" },
18
+ "created_at": { "type": "string" },
19
+ "source_type": {
20
+ "type": "string",
21
+ "enum": [
22
+ "setup_failure",
23
+ "proof_failure",
24
+ "replay_failure",
25
+ "knowledge_miss",
26
+ "runtime_miss",
27
+ "live_proof_failure"
28
+ ]
29
+ },
30
+ "reason_code": { "type": "string", "minLength": 1 },
31
+ "promotion_decision": {
32
+ "type": "string",
33
+ "enum": ["ignore", "fix_docs", "fix_config", "fix_runtime", "add_test"]
34
+ },
35
+ "ids": {
36
+ "type": "object",
37
+ "properties": {
38
+ "org_id": { "type": "string" },
39
+ "agent_id": { "type": "string" },
40
+ "conversation_id": { "type": "string" },
41
+ "trace_id": { "type": "string" },
42
+ "correlation_id": { "type": "string" },
43
+ "proof_artifact": { "type": "string" }
44
+ },
45
+ "additionalProperties": false
46
+ },
47
+ "evidence": {
48
+ "type": "object",
49
+ "required": ["summary", "redaction"],
50
+ "properties": {
51
+ "summary": { "type": "string", "minLength": 1 },
52
+ "source_artifact_path": { "type": ["string", "null"] },
53
+ "source_command": { "type": ["string", "null"] },
54
+ "redaction": {
55
+ "type": "object",
56
+ "required": ["enabled", "fields"],
57
+ "properties": {
58
+ "enabled": { "const": true },
59
+ "fields": {
60
+ "type": "array",
61
+ "items": { "type": "string" }
62
+ }
63
+ },
64
+ "additionalProperties": false
65
+ },
66
+ "redacted_source": {}
67
+ },
68
+ "additionalProperties": false
69
+ },
70
+ "next_commands": {
71
+ "type": "array",
72
+ "items": { "type": "string", "minLength": 1 }
73
+ }
74
+ },
75
+ "additionalProperties": false
76
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://frontofhouse.okii.uk/schemas/scenario-suite.schema.json",
4
+ "title": "FOH Local Scenario Suite",
5
+ "type": "object",
6
+ "required": ["scenarios"],
7
+ "properties": {
8
+ "schema_version": { "type": "string" },
9
+ "agent": { "type": "string" },
10
+ "scenarios": {
11
+ "type": "array",
12
+ "minItems": 1,
13
+ "items": {
14
+ "type": "object",
15
+ "properties": {
16
+ "id": { "type": "string" },
17
+ "name": { "type": "string" },
18
+ "fixture": { "type": "string" },
19
+ "fixture_transcript": { "type": "string" },
20
+ "transcript_fixture": { "type": "string" },
21
+ "turns": {
22
+ "type": "array",
23
+ "items": {
24
+ "type": "object",
25
+ "properties": {
26
+ "user": { "type": "string" },
27
+ "message": { "type": "string" },
28
+ "expect": {
29
+ "type": "object",
30
+ "additionalProperties": true
31
+ }
32
+ },
33
+ "additionalProperties": true
34
+ }
35
+ }
36
+ },
37
+ "additionalProperties": true
38
+ }
39
+ }
40
+ },
41
+ "additionalProperties": true
42
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://frontofhouse.okii.uk/schemas/transcript-export.schema.json",
4
+ "title": "FOH Transcript Export",
5
+ "type": "object",
6
+ "required": ["schema_version", "redaction", "hydration", "conversations"],
7
+ "properties": {
8
+ "schema_version": { "const": "foh_transcript_export.v2" },
9
+ "redaction": {
10
+ "type": "object",
11
+ "required": ["enabled", "fields"],
12
+ "properties": {
13
+ "enabled": { "type": "boolean" },
14
+ "fields": {
15
+ "type": "array",
16
+ "items": { "type": "string" }
17
+ }
18
+ },
19
+ "additionalProperties": true
20
+ },
21
+ "hydration": {
22
+ "type": "object",
23
+ "required": ["enabled", "include_traces"],
24
+ "properties": {
25
+ "enabled": { "type": "boolean" },
26
+ "include_traces": { "type": "boolean" }
27
+ },
28
+ "additionalProperties": true
29
+ },
30
+ "conversations": {
31
+ "type": "array",
32
+ "items": {
33
+ "type": "object",
34
+ "required": ["id", "replay_command", "test_fixture"],
35
+ "properties": {
36
+ "id": { "type": "string" },
37
+ "replay_command": { "type": ["string", "null"] },
38
+ "test_fixture": {
39
+ "type": "object",
40
+ "required": ["schema_version", "turns"],
41
+ "properties": {
42
+ "schema_version": { "const": "foh_scenario_fixture.v1" },
43
+ "conversation_id": { "type": ["string", "null"] },
44
+ "turns": { "type": "array" }
45
+ },
46
+ "additionalProperties": true
47
+ }
48
+ },
49
+ "additionalProperties": true
50
+ }
51
+ }
52
+ },
53
+ "additionalProperties": true
54
+ }