cueline 0.2.1 → 0.3.0

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.
Files changed (67) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +58 -0
  4. package/README.ja.md +12 -12
  5. package/README.ko.md +12 -12
  6. package/README.md +12 -12
  7. package/README.zh-CN.md +12 -12
  8. package/README.zh-TW.md +12 -12
  9. package/dist/src/api-controller-handoff.js +1 -1
  10. package/dist/src/api-controller-handoff.js.map +1 -1
  11. package/dist/src/api-run-prune.d.ts +41 -0
  12. package/dist/src/api-run-prune.js +218 -0
  13. package/dist/src/api-run-prune.js.map +1 -0
  14. package/dist/src/api-runtime-lifecycle.js +4 -4
  15. package/dist/src/api-runtime-lifecycle.js.map +1 -1
  16. package/dist/src/api.d.ts +3 -0
  17. package/dist/src/api.js +3 -0
  18. package/dist/src/api.js.map +1 -1
  19. package/dist/src/cli/health-commands.js +35 -0
  20. package/dist/src/cli/health-commands.js.map +1 -1
  21. package/dist/src/cli/main.js +95 -3
  22. package/dist/src/cli/main.js.map +1 -1
  23. package/dist/src/cli/observation-commands.js +94 -1
  24. package/dist/src/cli/observation-commands.js.map +1 -1
  25. package/dist/src/core/controller-command-execution.d.ts +1 -1
  26. package/dist/src/core/controller-command-execution.js +7 -7
  27. package/dist/src/core/controller-command-execution.js.map +1 -1
  28. package/dist/src/core/controller-evidence.d.ts +1 -0
  29. package/dist/src/core/controller-evidence.js +20 -0
  30. package/dist/src/core/controller-evidence.js.map +1 -1
  31. package/dist/src/core/controller-loop.js +11 -7
  32. package/dist/src/core/controller-loop.js.map +1 -1
  33. package/dist/src/core/controller-turn.d.ts +1 -1
  34. package/dist/src/core/controller-turn.js +16 -8
  35. package/dist/src/core/controller-turn.js.map +1 -1
  36. package/dist/src/diagnostics/offline-self-test.d.ts +23 -0
  37. package/dist/src/diagnostics/offline-self-test.js +163 -0
  38. package/dist/src/diagnostics/offline-self-test.js.map +1 -0
  39. package/dist/src/diagnostics/secret-audit.d.ts +25 -0
  40. package/dist/src/diagnostics/secret-audit.js +114 -0
  41. package/dist/src/diagnostics/secret-audit.js.map +1 -0
  42. package/dist/src/diagnostics/upgrade-preflight.d.ts +41 -0
  43. package/dist/src/diagnostics/upgrade-preflight.js +182 -0
  44. package/dist/src/diagnostics/upgrade-preflight.js.map +1 -0
  45. package/dist/src/observation/run-bundle.d.ts +27 -0
  46. package/dist/src/observation/run-bundle.js +55 -0
  47. package/dist/src/observation/run-bundle.js.map +1 -0
  48. package/dist/src/version.d.ts +1 -1
  49. package/dist/src/version.js +1 -1
  50. package/docs/1.0/ideas/machine-output-contracts.md +47 -0
  51. package/docs/1.0/ideas/node26-contract.md +50 -0
  52. package/docs/1.0/ideas/offline-self-test.md +52 -0
  53. package/docs/1.0/ideas/upgrade-preflight.md +46 -0
  54. package/docs/compatibility.md +5 -5
  55. package/docs/runner-contract.md +1 -1
  56. package/package.json +12 -2
  57. package/schemas/cli-doctor.schema.json +77 -0
  58. package/schemas/cli-routing-explain.schema.json +88 -0
  59. package/schemas/cli-routing.schema.json +65 -0
  60. package/schemas/cli-run-audit-secrets.schema.json +72 -0
  61. package/schemas/cli-run-export.schema.json +410 -0
  62. package/schemas/cli-runs-prune.schema.json +93 -0
  63. package/scripts/artifact-integrity.mjs +114 -0
  64. package/scripts/release-check.mjs +118 -0
  65. package/scripts/validate-cli-contracts.mjs +59 -0
  66. package/scripts/validate-doc-versions.mjs +79 -0
  67. package/scripts/validate-node-support.mjs +118 -0
@@ -0,0 +1,47 @@
1
+ # Machine-output contracts experiment
2
+
3
+ ## Hypothesis and user value
4
+
5
+ Automation that consumes CueLine health output needs versioned, executable
6
+ contracts so a release cannot silently change field names, types, redaction or
7
+ nested structure.
8
+
9
+ ## Change boundary
10
+
11
+ - Adds explicit schema identifiers to `doctor --json` and `routing --json`;
12
+ preserves the existing `routing explain --json` identifier.
13
+ - Publishes strict JSON Schema 2020-12 contracts for those three outputs.
14
+ - Adds a real CLI contract validator to CI and a development-only Ajv
15
+ dependency; CueLine runtime dependencies remain empty.
16
+ - Does not change human output, routing decisions, browser behavior, provider
17
+ calls or durable state.
18
+
19
+ ## Acceptance and adversarial cases
20
+
21
+ 1. Real doctor, routing and routing-explain JSON validate against their schemas.
22
+ 2. Every public object uses `additionalProperties: false`.
23
+ 3. A secret-like top-level field is rejected.
24
+ 4. A runner `argv` field is rejected.
25
+ 5. Missing required fields and wrong schema versions are rejected.
26
+ 6. Valid and invalid routing configuration variants retain parseable output.
27
+
28
+ ## Verified evidence
29
+
30
+ - Targeted contract and CLI tests: 67 passed, 0 failed, including all three
31
+ degraded invalid-config variants.
32
+ - Contract validation command: 3 passed, 0 failed.
33
+ - Full test suite: 494 passed, 0 failed after updating four authoritative
34
+ machine-output snapshots for the new schema identifiers.
35
+ - TypeScript build: passed.
36
+ - Plugin validation: passed.
37
+ - `npm pack --dry-run`: passed; all three schema files and the validator are in
38
+ the package, while Ajv remains development-only.
39
+
40
+ ## Rollback
41
+
42
+ Revert this branch's commit. It owns the three schemas, validator, tests, Ajv
43
+ development dependency, CI step, schema identifiers and updated snapshots.
44
+
45
+ This experiment remains isolated on `codex/idea-machine-output-contract`. It
46
+ must not be merged into `main`; Vincent decides whether it is selected or
47
+ integrated.
@@ -0,0 +1,50 @@
1
+ # Node 26 support contract experiment
2
+
3
+ ## Hypothesis and user value
4
+
5
+ CueLine should preserve Node 22 as its minimum while proving current even-LTS
6
+ compatibility through one synchronized engines, CI and documentation contract.
7
+
8
+ ## Change boundary
9
+
10
+ - Expands the existing Ubuntu/macOS CI matrix from Node 22/24 to 22/24/26.
11
+ - Keeps `engines.node` at `>=22`.
12
+ - Synchronizes all five README development sections and the compatibility
13
+ matrix.
14
+ - Adds a read-only contract validator; it does not install, download or switch
15
+ Node versions.
16
+ - Does not change runtime behavior, browser control, routing, state or provider
17
+ access.
18
+
19
+ ## Acceptance and adversarial cases
20
+
21
+ 1. Engine requirement is exactly `>=22`.
22
+ 2. CI Node majors are exactly 22, 24 and 26 on Ubuntu and macOS.
23
+ 3. All localized README files and compatibility docs name the tested majors.
24
+ 4. Removing Node 26, leaving one README stale or changing engines makes the
25
+ validator fail.
26
+ 5. The current Node 26 runtime passes the complete local release-facing checks.
27
+
28
+ ## Verified evidence
29
+
30
+ - Node support validator: passed on Node 26.3.0.
31
+ - Targeted contract tests: 4 passed, 0 failed.
32
+ - Full test suite on Node 26.3.0: 494 passed, 0 failed.
33
+ - Fake smoke on Node 26.3.0: 6 passed, 0 failed.
34
+ - Shell install/reinstall/uninstall/foreign-file preservation: passed.
35
+ - npm tarball global install, skill install, doctor and uninstall: passed.
36
+ - TypeScript build, plugin validation and `npm pack --dry-run`: passed.
37
+
38
+ ## Remaining external verification
39
+
40
+ The workflow now requests Node 26 on both Ubuntu and macOS, but this isolated
41
+ branch has not been pushed. Therefore GitHub-hosted Node 26 results remain
42
+ unverified until Vincent selects and explicitly authorizes remote integration.
43
+
44
+ ## Rollback
45
+
46
+ Revert this branch's commit. It owns the CI matrix addition, support validator,
47
+ tests, documentation synchronization and this experiment record.
48
+
49
+ This experiment remains isolated on `codex/idea-node26-contract`. It must not be
50
+ merged into `main`; Vincent decides whether it is selected or integrated.
@@ -0,0 +1,52 @@
1
+ # Offline self-test experiment
2
+
3
+ ## Hypothesis and user value
4
+
5
+ An installed CueLine package should be able to prove that its controller loop,
6
+ process routing, durable state, final delivery, and run verifier work together
7
+ without opening a browser, contacting a provider, or touching the user's real
8
+ CueLine state.
9
+
10
+ ## Change boundary
11
+
12
+ - Adds `cueline self-test [--json]`.
13
+ - Uses an in-memory deterministic controller and the current Node executable.
14
+ - Creates two private temporary directories for run state and workspace, then
15
+ removes only those exact directories before returning.
16
+ - Does not read or write the configured `CUELINE_HOME` or `CUELINE_CONFIG`.
17
+ - Does not open a browser, use credentials, contact a provider, or make a
18
+ network request.
19
+ - Does not relax production controller provenance checks. The in-memory
20
+ adapter supplies fixed synthetic Pro-shaped evidence solely to exercise the
21
+ existing verifier; the report is explicitly marked `offline: true`.
22
+
23
+ ## Acceptance and adversarial cases
24
+
25
+ 1. The isolated controller completes exactly two rounds.
26
+ 2. One required local process job completes.
27
+ 3. The expected final delivery is recorded.
28
+ 4. `verifyCueLineRun` returns `verified` for the temporary run.
29
+ 5. A pre-existing `CUELINE_DEPTH` fails closed with
30
+ `NESTED_ROUTING_REJECTED` before temporary state is created.
31
+ 6. Unknown CLI arguments return exit code 2.
32
+ 7. JSON output contains neither temporary paths nor worker task content.
33
+ 8. Temporary-directory counts are unchanged across a real CLI invocation.
34
+
35
+ ## Verified evidence
36
+
37
+ - Targeted integration tests: 4 passed, 0 failed.
38
+ - Full test suite: 494 passed, 0 failed.
39
+ - TypeScript build: passed.
40
+ - Plugin validation: passed.
41
+ - Real `./bin/cueline self-test --json`: status `ok`; two controller rounds,
42
+ one completed job, final delivery true, durable verification true.
43
+ - Temporary cleanup check: 0 matching directories before and after.
44
+
45
+ ## Rollback
46
+
47
+ Revert this branch's commit. The feature owns only
48
+ `src/diagnostics/offline-self-test.ts`, its integration test and documentation,
49
+ plus the focused command/help additions in `src/cli/main.ts`.
50
+
51
+ This experiment remains isolated on `codex/idea-offline-self-test`. It must not
52
+ be merged into `main`; Vincent decides whether it is selected or integrated.
@@ -0,0 +1,46 @@
1
+ # Upgrade preflight experiment
2
+
3
+ ## Hypothesis and user value
4
+
5
+ Before replacing an installed CueLine version, operators need one read-only
6
+ command that proves the target is a valid forward upgrade and that local
7
+ configuration and durable state are safe to carry forward.
8
+
9
+ ## Change boundary
10
+
11
+ - Adds `cueline upgrade preflight --to <version> [--json]`.
12
+ - Reads the current Node version, active routing configuration, state-home file
13
+ type and permissions, and sanitized persisted run summaries.
14
+ - Never creates a state home, follows a state-home symlink, changes permissions,
15
+ migrates files, cancels runs, launches a browser, or contacts a provider.
16
+ - Accepts stable semantic target versions only; it does not authorize downgrade
17
+ or prerelease migration policy.
18
+
19
+ ## Blocking conditions
20
+
21
+ - Invalid or older target version.
22
+ - Node older than 22.
23
+ - Routing configuration unreadable by the installed version.
24
+ - State home is a symlink, non-directory, unreadable, or grants group/other
25
+ permissions.
26
+ - Any run is non-terminal or has unreadable durable evidence.
27
+
28
+ ## Verified evidence
29
+
30
+ - Targeted integration tests: 5 passed, 0 failed.
31
+ - Full test suite: 495 passed, 0 failed.
32
+ - TypeScript build: passed.
33
+ - Plugin validation: passed.
34
+ - Real `./bin/cueline upgrade preflight --to 1.0.0 --json`: status `ready`
35
+ with a missing isolated state home.
36
+ - The real CLI check verified that the missing state home remained absent.
37
+ - A persisted non-terminal run retained the exact event-log size and mtime
38
+ across preflight.
39
+
40
+ ## Rollback
41
+
42
+ Revert this branch's commit. It owns the preflight diagnostic, its tests and
43
+ documentation, plus focused health-command and help entries.
44
+
45
+ This experiment remains isolated on `codex/idea-upgrade-preflight`. It must not
46
+ be merged into `main`; Vincent decides whether it is selected or integrated.
@@ -2,9 +2,9 @@
2
2
 
3
3
  ## Runtime matrix
4
4
 
5
- | Surface | v0.1 status | Notes |
5
+ | Surface | Current status | Notes |
6
6
  |---|---|---|
7
- | Node.js 22+ ESM | Supported | Core protocol, state, router, runners, fake browser tests |
7
+ | Node.js 22+ ESM | Supported | CI: 22, 24, 26 on Ubuntu and macOS; core protocol, state, router, runners, fake browser tests |
8
8
  | Codex Node REPL + built-in Browser (IAB) | Required for live control | Provides the imported API with the authenticated ChatGPT tab/browser client |
9
9
  | Current Codex caller | Default local executor | Performs caller `advise`; caller `work` requires durable claim/start/heartbeat/result proof |
10
10
  | `codex` CLI | Required only by bundled process route | Double authorization plus `--ignore-user-config`; auth remains under `CODEX_HOME`, user MCP config is not loaded |
@@ -19,9 +19,9 @@ The npm package has no runtime dependencies. Development requires TypeScript and
19
19
 
20
20
  CueLine is designed for a conversation already authenticated by the user at `chatgpt.com`. CueLine neither handles credentials nor verifies plan entitlement. Before each controller turn it may switch the composer to `Pro`; that is its only automatic model switch. It also requires Pro evidence on the completed response.
21
21
 
22
- The v0.1 adapter relies on accessible textbox/button roles, attachment chips, and assistant-message markup in the current ChatGPT web UI. ChatGPT's automatic conversion of a long filled prompt into an attachment is supported. Deliberate file upload is not. UI changes can cause explicit `COMPOSER_MISSING`, `SEND_BUTTON_MISSING`, or response-timeout errors. A fake adapter test cannot prove that the current live page still matches.
22
+ The browser adapter relies on accessible textbox/button roles, attachment chips, and assistant-message markup in the current ChatGPT web UI. ChatGPT's automatic conversion of a long filled prompt into an attachment is supported. Deliberate file upload is not. UI changes can cause explicit `COMPOSER_MISSING`, `SEND_BUTTON_MISSING`, or response-timeout errors. A fake adapter test cannot prove that the current live page still matches.
23
23
 
24
- ## Supported in v0.1
24
+ ## Supported contract
25
25
 
26
26
  - one ChatGPT conversation per run
27
27
  - text controller observations and commands
@@ -40,7 +40,7 @@ The v0.1 adapter relies on accessible textbox/button roles, attachment chips, an
40
40
  - process status with resolved runner, PID, phase, last progress, and safely observed model/provider
41
41
  - injected fake browser/runner for offline tests
42
42
 
43
- ## Not supported in v0.1
43
+ ## Not supported
44
44
 
45
45
  - model switching other than CueLine selecting `Pro`
46
46
  - images, screenshots as controller input, audio, or binary payloads
@@ -65,7 +65,7 @@ interface RunnerSpec {
65
65
  - Empty output is explicitly recorded instead of being replaced with invented content.
66
66
  - Results are never marked retryable by the process runner.
67
67
 
68
- Advise workers must return focused evidence, not whole-file dumps: absolute paths, relevant line references, exact code or error identifiers, and short excerpts sufficient for the decision. When total unserved evidence exceeds the remaining rounds multiplied by the 12,000-character per-round budget, CueLine warns the controller to decide from available summaries or dispatch a summarization task instead of paging every omitted tail. The controller may decide as soon as evidence is sufficient and is never required to read every omitted tail.
68
+ Advise workers must return focused evidence, not whole-file dumps: absolute paths, relevant line references, exact code or error identifiers, and short excerpts sufficient for the decision. Capacity arithmetic uses only unserved characters in the capped representations that the controller can actually page through. When that servable total exceeds the remaining rounds multiplied by the 12,000-character per-round budget, CueLine warns the controller to decide from available summaries or dispatch a summarization task instead of paging every omitted tail. True source totals beyond the durable per-job caps are deliberately outside this cursor coordinate system and produce a separate durable-cap notice instead of inflating the capacity warning with forever-unservable characters. The controller may decide as soon as evidence is sufficient and is never required to read every omitted tail.
69
69
 
70
70
  For an unsuccessful process `work` job, `ambiguousSideEffects` is true because CueLine cannot prove how much mutation occurred before failure. That flag is preserved in the job result. For caller work, every non-success result after durable start is normalized to terminal `ambiguous`, so the controller cannot mistake `failed`, `timed_out`, or `cancelled` for proof of no side effects. Such work must be inspected and explicitly decided by the web controller; it must not be auto-retried.
71
71
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cueline",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "A ChatGPT web conversation directs; CueLine validates each command and hands durable advice or explicitly claimed work to the current Codex.",
5
5
  "keywords": [
6
6
  "chatgpt",
@@ -66,10 +66,20 @@
66
66
  "test:unit": "npm run build && node --test dist/test/unit/*.test.js",
67
67
  "test:integration": "npm run build && node --test dist/test/integration/*.test.js",
68
68
  "smoke:fake": "npm run build && node --test dist/test/smoke/fake-smoke.test.js",
69
- "validate:plugin": "node scripts/validate-plugin.mjs"
69
+ "validate:node-support": "node scripts/validate-node-support.mjs --json",
70
+ "validate:cli-contracts": "npm run build && node scripts/validate-cli-contracts.mjs",
71
+ "validate:plugin": "node scripts/validate-plugin.mjs",
72
+ "validate:docs": "node scripts/validate-doc-versions.mjs",
73
+ "test:docs": "node --test test/release/doc-version-guard.test.mjs",
74
+ "release:check": "node scripts/release-check.mjs",
75
+ "test:release-check": "node --test test/release/release-check.test.mjs",
76
+ "artifact:build": "node scripts/artifact-integrity.mjs build",
77
+ "artifact:verify": "node scripts/artifact-integrity.mjs verify",
78
+ "test:artifact": "node --test test/release/artifact-integrity.test.mjs"
70
79
  },
71
80
  "devDependencies": {
72
81
  "@types/node": "^22.20.1",
82
+ "ajv": "^8.20.0",
73
83
  "typescript": "^7.0.2"
74
84
  }
75
85
  }
@@ -0,0 +1,77 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://cueline.dev/schemas/cli-doctor.schema.json",
4
+ "title": "CueLine doctor machine output",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schema", "version", "status", "node", "config", "home", "caller", "process", "findings"],
8
+ "properties": {
9
+ "schema": { "const": "cueline-doctor/1" },
10
+ "version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
11
+ "status": { "enum": ["ok", "degraded"] },
12
+ "node": {
13
+ "type": "object",
14
+ "additionalProperties": false,
15
+ "required": ["version", "ok", "requirement"],
16
+ "properties": {
17
+ "version": { "type": "string", "minLength": 1 },
18
+ "ok": { "type": "boolean" },
19
+ "requirement": { "const": ">=22" }
20
+ }
21
+ },
22
+ "config": {
23
+ "oneOf": [
24
+ {
25
+ "type": "object",
26
+ "additionalProperties": false,
27
+ "required": ["path", "valid"],
28
+ "properties": {
29
+ "path": { "type": "string", "minLength": 1 },
30
+ "valid": { "const": true }
31
+ }
32
+ },
33
+ {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "required": ["path", "valid", "errorCode"],
37
+ "properties": {
38
+ "path": { "type": "string", "minLength": 1 },
39
+ "valid": { "const": false },
40
+ "errorCode": { "const": "ROUTING_CONFIG_INVALID" }
41
+ }
42
+ }
43
+ ]
44
+ },
45
+ "home": { "type": "string", "minLength": 1 },
46
+ "caller": {
47
+ "type": "object",
48
+ "additionalProperties": false,
49
+ "required": ["ready", "enabledLanes"],
50
+ "properties": {
51
+ "ready": { "type": "boolean" },
52
+ "enabledLanes": { "type": "integer", "minimum": 0 }
53
+ }
54
+ },
55
+ "process": {
56
+ "type": "object",
57
+ "additionalProperties": false,
58
+ "required": ["availableLanes"],
59
+ "properties": {
60
+ "availableLanes": { "type": "integer", "minimum": 0 }
61
+ }
62
+ },
63
+ "findings": {
64
+ "type": "array",
65
+ "items": {
66
+ "type": "object",
67
+ "additionalProperties": false,
68
+ "required": ["code", "surface", "message"],
69
+ "properties": {
70
+ "code": { "type": "string", "minLength": 1 },
71
+ "surface": { "enum": ["node", "config", "caller"] },
72
+ "message": { "type": "string", "minLength": 1 }
73
+ }
74
+ }
75
+ }
76
+ }
77
+ }
@@ -0,0 +1,88 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://cueline.dev/schemas/cli-routing-explain.schema.json",
4
+ "title": "CueLine routing explanation machine output",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schema", "version", "config", "requestedLane", "availableLanes", "lanes", "findings"],
8
+ "properties": {
9
+ "schema": { "const": "cueline-routing-explain/0.1" },
10
+ "version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
11
+ "config": {
12
+ "oneOf": [
13
+ {
14
+ "type": "object",
15
+ "additionalProperties": false,
16
+ "required": ["path", "valid"],
17
+ "properties": {
18
+ "path": { "type": "string", "minLength": 1 },
19
+ "valid": { "const": true }
20
+ }
21
+ },
22
+ {
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": ["path", "valid", "errorCode"],
26
+ "properties": {
27
+ "path": { "type": "string", "minLength": 1 },
28
+ "valid": { "const": false },
29
+ "errorCode": { "const": "ROUTING_CONFIG_INVALID" }
30
+ }
31
+ }
32
+ ]
33
+ },
34
+ "requestedLane": {
35
+ "anyOf": [{ "type": "string", "minLength": 1 }, { "type": "null" }]
36
+ },
37
+ "availableLanes": { "type": "integer", "minimum": 0 },
38
+ "lanes": {
39
+ "type": "array",
40
+ "items": {
41
+ "type": "object",
42
+ "additionalProperties": false,
43
+ "required": ["name", "enabled", "status", "selectedRunnerId", "candidates"],
44
+ "properties": {
45
+ "name": { "type": "string", "minLength": 1 },
46
+ "enabled": { "type": "boolean" },
47
+ "status": { "enum": ["available", "unavailable", "disabled"] },
48
+ "selectedRunnerId": {
49
+ "anyOf": [{ "type": "string", "minLength": 1 }, { "type": "null" }]
50
+ },
51
+ "errorCode": { "const": "ROUTE_NO_CANDIDATE" },
52
+ "candidates": {
53
+ "type": "array",
54
+ "items": {
55
+ "type": "object",
56
+ "additionalProperties": false,
57
+ "required": ["id", "index", "enabled", "available", "selected", "reasonCode"],
58
+ "properties": {
59
+ "id": { "type": "string", "minLength": 1 },
60
+ "index": { "type": "integer", "minimum": 0 },
61
+ "enabled": { "type": "boolean" },
62
+ "available": {
63
+ "anyOf": [{ "type": "boolean" }, { "type": "null" }]
64
+ },
65
+ "selected": { "type": "boolean" },
66
+ "reasonCode": {
67
+ "enum": ["LANE_DISABLED", "RUNNER_DISABLED", "RUNNER_UNAVAILABLE", "SELECTED_FIRST_AVAILABLE", "AVAILABLE_FALLBACK"]
68
+ }
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
74
+ },
75
+ "findings": {
76
+ "type": "array",
77
+ "items": {
78
+ "type": "object",
79
+ "additionalProperties": false,
80
+ "required": ["code", "message"],
81
+ "properties": {
82
+ "code": { "type": "string", "minLength": 1 },
83
+ "message": { "type": "string", "minLength": 1 }
84
+ }
85
+ }
86
+ }
87
+ }
88
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://cueline.dev/schemas/cli-routing.schema.json",
4
+ "title": "CueLine routing machine output",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schema", "version", "config", "availableLanes", "lanes", "findings"],
8
+ "properties": {
9
+ "schema": { "const": "cueline-routing/1" },
10
+ "version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
11
+ "config": {
12
+ "oneOf": [
13
+ {
14
+ "type": "object",
15
+ "additionalProperties": false,
16
+ "required": ["path", "valid"],
17
+ "properties": {
18
+ "path": { "type": "string", "minLength": 1 },
19
+ "valid": { "const": true }
20
+ }
21
+ },
22
+ {
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": ["path", "valid", "errorCode"],
26
+ "properties": {
27
+ "path": { "type": "string", "minLength": 1 },
28
+ "valid": { "const": false },
29
+ "errorCode": { "const": "ROUTING_CONFIG_INVALID" }
30
+ }
31
+ }
32
+ ]
33
+ },
34
+ "availableLanes": { "type": "integer", "minimum": 0 },
35
+ "lanes": {
36
+ "type": "array",
37
+ "items": {
38
+ "type": "object",
39
+ "additionalProperties": false,
40
+ "required": ["name", "enabled", "status", "selectedRunnerId"],
41
+ "properties": {
42
+ "name": { "type": "string", "minLength": 1 },
43
+ "enabled": { "type": "boolean" },
44
+ "status": { "enum": ["available", "unavailable", "disabled"] },
45
+ "selectedRunnerId": {
46
+ "anyOf": [{ "type": "string", "minLength": 1 }, { "type": "null" }]
47
+ },
48
+ "errorCode": { "type": "string", "minLength": 1 }
49
+ }
50
+ }
51
+ },
52
+ "findings": {
53
+ "type": "array",
54
+ "items": {
55
+ "type": "object",
56
+ "additionalProperties": false,
57
+ "required": ["code", "message"],
58
+ "properties": {
59
+ "code": { "type": "string", "minLength": 1 },
60
+ "message": { "type": "string", "minLength": 1 }
61
+ }
62
+ }
63
+ }
64
+ }
65
+ }
@@ -0,0 +1,72 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://cueline.dev/schemas/cli-run-audit-secrets.schema.json",
4
+ "title": "cueline run audit-secrets --json output",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema",
9
+ "version",
10
+ "protocol",
11
+ "runId",
12
+ "scannedEvents",
13
+ "scannedFields",
14
+ "findings",
15
+ "clean"
16
+ ],
17
+ "allOf": [
18
+ {
19
+ "if": { "properties": { "clean": { "const": true } }, "required": ["clean"] },
20
+ "then": { "properties": { "findings": { "type": "array", "maxItems": 0 } } },
21
+ "else": { "properties": { "findings": { "type": "array", "minItems": 1 } } }
22
+ }
23
+ ],
24
+ "properties": {
25
+ "schema": { "const": "cueline-run-audit-secrets/1" },
26
+ "version": { "type": "string", "minLength": 1 },
27
+ "protocol": { "const": "cueline-secret-audit/0.1" },
28
+ "runId": { "type": "string", "minLength": 1 },
29
+ "scannedEvents": { "type": "integer", "minimum": 1 },
30
+ "scannedFields": { "type": "integer", "minimum": 0 },
31
+ "clean": { "type": "boolean" },
32
+ "findings": {
33
+ "type": "array",
34
+ "items": {
35
+ "type": "object",
36
+ "additionalProperties": false,
37
+ "required": [
38
+ "kind",
39
+ "sequence",
40
+ "eventType",
41
+ "path",
42
+ "matchLength",
43
+ "maskedPreview"
44
+ ],
45
+ "properties": {
46
+ "kind": {
47
+ "enum": [
48
+ "aws_access_key_id",
49
+ "github_token",
50
+ "slack_token",
51
+ "anthropic_api_key",
52
+ "openai_api_key",
53
+ "google_api_key",
54
+ "jwt",
55
+ "private_key_block",
56
+ "bearer_token",
57
+ "credential_assignment"
58
+ ]
59
+ },
60
+ "sequence": { "type": "integer", "minimum": 1 },
61
+ "eventType": { "type": "string", "minLength": 1 },
62
+ "path": { "type": "string", "minLength": 1 },
63
+ "matchLength": { "type": "integer", "minimum": 1 },
64
+ "maskedPreview": {
65
+ "type": "string",
66
+ "pattern": "^.{1,4}…\\([0-9]+ chars\\)$"
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }
72
+ }