@f-o-h/cli 0.1.5 → 0.1.7

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,53 @@
1
+ {
2
+ "schema_version": "external_agent_run.v1",
3
+ "run_id": "2026-05-04-codex-001",
4
+ "status": "fail",
5
+ "failure_reason_code": "docs_widget_proof_path_unclear",
6
+ "model_provider": "openai",
7
+ "model_name": "codex",
8
+ "agent_shell": "vscode-terminal",
9
+ "workspace_type": "clean-no-repo",
10
+ "prompt_version": "blank-setup.v1",
11
+ "prompt_path": "Docs/operations/external-agent-feedback-loop.md#blank-setupv1",
12
+ "started_at": "2026-05-04T09:00:00.000Z",
13
+ "ended_at": "2026-05-04T09:30:00.000Z",
14
+ "manual_intervention_count": 1,
15
+ "manual_interventions": [
16
+ {
17
+ "at": "2026-05-04T09:12:00.000Z",
18
+ "summary": "Human pointed the agent from generic docs to the CLI install guide."
19
+ }
20
+ ],
21
+ "environment": {
22
+ "os": "windows",
23
+ "node_version": "v24.11.1",
24
+ "npm_version": "10.x",
25
+ "foh_cli_version": "0.1.6"
26
+ },
27
+ "public_entrypoints": [
28
+ "https://frontofhouse.okii.uk",
29
+ "https://frontofhouse.okii.uk/llms.txt",
30
+ "npx --yes @f-o-h/cli@latest"
31
+ ],
32
+ "commands_run": [
33
+ "npx --yes @f-o-h/cli@latest --version",
34
+ "npx --yes @f-o-h/cli@latest setup --help",
35
+ "npx --yes @f-o-h/cli@latest prove --help"
36
+ ],
37
+ "docs_pages_used": [
38
+ "https://frontofhouse.okii.uk/guides/cli-install-and-upgrade",
39
+ "https://frontofhouse.okii.uk/guides/error-handling-and-debugging"
40
+ ],
41
+ "artifacts": {
42
+ "terminal_transcript": "terminal-transcript.txt",
43
+ "proof_bundle": null,
44
+ "replay_packet": null,
45
+ "knowledge_packet": null,
46
+ "improvement_packet": "improvement-packet.json",
47
+ "notes": "notes.md"
48
+ },
49
+ "summary": "Agent installed the CLI but could not identify the shortest widget proof path without human direction.",
50
+ "next_commands": [
51
+ "foh bug improve --from external-agent-run --file run.json --out improvement-packet.json --json"
52
+ ]
53
+ }
@@ -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.7",
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,95 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://frontofhouse.okii.uk/schemas/external-agent-run.schema.json",
4
+ "title": "FOH External Agent Run",
5
+ "type": "object",
6
+ "required": [
7
+ "schema_version",
8
+ "run_id",
9
+ "status",
10
+ "model_provider",
11
+ "model_name",
12
+ "prompt_version",
13
+ "started_at",
14
+ "manual_intervention_count",
15
+ "environment",
16
+ "public_entrypoints",
17
+ "commands_run",
18
+ "docs_pages_used",
19
+ "artifacts"
20
+ ],
21
+ "properties": {
22
+ "schema_version": { "const": "external_agent_run.v1" },
23
+ "run_id": { "type": "string", "minLength": 1 },
24
+ "status": { "type": "string", "enum": ["pass", "hold", "fail"] },
25
+ "failure_reason_code": { "type": ["string", "null"] },
26
+ "model_provider": { "type": "string", "minLength": 1 },
27
+ "model_name": { "type": "string", "minLength": 1 },
28
+ "agent_shell": { "type": "string" },
29
+ "workspace_type": { "type": "string" },
30
+ "prompt_version": { "type": "string", "minLength": 1 },
31
+ "prompt_path": { "type": "string" },
32
+ "started_at": { "type": "string" },
33
+ "ended_at": { "type": ["string", "null"] },
34
+ "manual_intervention_count": { "type": "integer", "minimum": 0 },
35
+ "manual_interventions": {
36
+ "type": "array",
37
+ "items": {
38
+ "type": "object",
39
+ "properties": {
40
+ "at": { "type": "string" },
41
+ "summary": { "type": "string" }
42
+ },
43
+ "additionalProperties": true
44
+ }
45
+ },
46
+ "environment": {
47
+ "type": "object",
48
+ "required": ["os", "foh_cli_version"],
49
+ "properties": {
50
+ "os": { "type": "string", "minLength": 1 },
51
+ "node_version": { "type": ["string", "null"] },
52
+ "npm_version": { "type": ["string", "null"] },
53
+ "foh_cli_version": { "type": "string", "minLength": 1 }
54
+ },
55
+ "additionalProperties": true
56
+ },
57
+ "public_entrypoints": {
58
+ "type": "array",
59
+ "minItems": 1,
60
+ "items": { "type": "string", "minLength": 1 }
61
+ },
62
+ "commands_run": {
63
+ "type": "array",
64
+ "items": { "type": "string" }
65
+ },
66
+ "docs_pages_used": {
67
+ "type": "array",
68
+ "items": { "type": "string" }
69
+ },
70
+ "artifacts": {
71
+ "type": "object",
72
+ "properties": {
73
+ "terminal_transcript": { "type": ["string", "null"] },
74
+ "proof_bundle": { "type": ["string", "null"] },
75
+ "replay_packet": { "type": ["string", "null"] },
76
+ "knowledge_packet": { "type": ["string", "null"] },
77
+ "improvement_packet": { "type": ["string", "null"] },
78
+ "notes": { "type": ["string", "null"] }
79
+ },
80
+ "additionalProperties": true
81
+ },
82
+ "summary": { "type": "string" },
83
+ "next_commands": {
84
+ "type": "array",
85
+ "items": { "type": "string" }
86
+ }
87
+ },
88
+ "additionalProperties": true,
89
+ "allOf": [
90
+ {
91
+ "if": { "properties": { "status": { "enum": ["hold", "fail"] } }, "required": ["status"] },
92
+ "then": { "required": ["failure_reason_code"] }
93
+ }
94
+ ]
95
+ }
@@ -0,0 +1,78 @@
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
+ "external_agent_run",
23
+ "setup_failure",
24
+ "proof_failure",
25
+ "replay_failure",
26
+ "knowledge_miss",
27
+ "runtime_miss",
28
+ "live_proof_failure"
29
+ ]
30
+ },
31
+ "reason_code": { "type": "string", "minLength": 1 },
32
+ "promotion_decision": {
33
+ "type": "string",
34
+ "enum": ["ignore", "fix_docs", "fix_config", "fix_cli", "fix_api", "fix_runtime", "add_test"]
35
+ },
36
+ "ids": {
37
+ "type": "object",
38
+ "properties": {
39
+ "org_id": { "type": "string" },
40
+ "agent_id": { "type": "string" },
41
+ "conversation_id": { "type": "string" },
42
+ "trace_id": { "type": "string" },
43
+ "correlation_id": { "type": "string" },
44
+ "proof_artifact": { "type": "string" }
45
+ },
46
+ "additionalProperties": false
47
+ },
48
+ "evidence": {
49
+ "type": "object",
50
+ "required": ["summary", "redaction"],
51
+ "properties": {
52
+ "summary": { "type": "string", "minLength": 1 },
53
+ "source_artifact_path": { "type": ["string", "null"] },
54
+ "source_command": { "type": ["string", "null"] },
55
+ "redaction": {
56
+ "type": "object",
57
+ "required": ["enabled", "fields"],
58
+ "properties": {
59
+ "enabled": { "const": true },
60
+ "fields": {
61
+ "type": "array",
62
+ "items": { "type": "string" }
63
+ }
64
+ },
65
+ "additionalProperties": false
66
+ },
67
+ "redacted_source": {}
68
+ },
69
+ "additionalProperties": false
70
+ },
71
+ "next_commands": {
72
+ "type": "array",
73
+ "items": { "type": "string", "minLength": 1 }
74
+ }
75
+ },
76
+ "additionalProperties": false
77
+ }
78
+
@@ -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
+ }