cueline 0.2.2 → 0.3.1

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 (53) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +53 -0
  4. package/README.ja.md +9 -12
  5. package/README.ko.md +9 -12
  6. package/README.md +9 -12
  7. package/README.zh-CN.md +9 -12
  8. package/README.zh-TW.md +9 -12
  9. package/dist/src/api-run-prune.d.ts +41 -0
  10. package/dist/src/api-run-prune.js +218 -0
  11. package/dist/src/api-run-prune.js.map +1 -0
  12. package/dist/src/api.d.ts +3 -0
  13. package/dist/src/api.js +3 -0
  14. package/dist/src/api.js.map +1 -1
  15. package/dist/src/cli/health-commands.js +35 -0
  16. package/dist/src/cli/health-commands.js.map +1 -1
  17. package/dist/src/cli/main.js +95 -3
  18. package/dist/src/cli/main.js.map +1 -1
  19. package/dist/src/cli/observation-commands.js +94 -1
  20. package/dist/src/cli/observation-commands.js.map +1 -1
  21. package/dist/src/diagnostics/offline-self-test.d.ts +23 -0
  22. package/dist/src/diagnostics/offline-self-test.js +163 -0
  23. package/dist/src/diagnostics/offline-self-test.js.map +1 -0
  24. package/dist/src/diagnostics/secret-audit.d.ts +25 -0
  25. package/dist/src/diagnostics/secret-audit.js +114 -0
  26. package/dist/src/diagnostics/secret-audit.js.map +1 -0
  27. package/dist/src/diagnostics/upgrade-preflight.d.ts +41 -0
  28. package/dist/src/diagnostics/upgrade-preflight.js +182 -0
  29. package/dist/src/diagnostics/upgrade-preflight.js.map +1 -0
  30. package/dist/src/jobs/status.js +11 -1
  31. package/dist/src/jobs/status.js.map +1 -1
  32. package/dist/src/observation/run-bundle.d.ts +27 -0
  33. package/dist/src/observation/run-bundle.js +55 -0
  34. package/dist/src/observation/run-bundle.js.map +1 -0
  35. package/dist/src/version.d.ts +1 -1
  36. package/dist/src/version.js +1 -1
  37. package/docs/1.0/ideas/machine-output-contracts.md +47 -0
  38. package/docs/1.0/ideas/node26-contract.md +50 -0
  39. package/docs/1.0/ideas/offline-self-test.md +52 -0
  40. package/docs/1.0/ideas/upgrade-preflight.md +46 -0
  41. package/docs/compatibility.md +5 -5
  42. package/package.json +12 -2
  43. package/schemas/cli-doctor.schema.json +77 -0
  44. package/schemas/cli-routing-explain.schema.json +88 -0
  45. package/schemas/cli-routing.schema.json +65 -0
  46. package/schemas/cli-run-audit-secrets.schema.json +72 -0
  47. package/schemas/cli-run-export.schema.json +410 -0
  48. package/schemas/cli-runs-prune.schema.json +93 -0
  49. package/scripts/artifact-integrity.mjs +114 -0
  50. package/scripts/release-check.mjs +118 -0
  51. package/scripts/validate-cli-contracts.mjs +59 -0
  52. package/scripts/validate-doc-versions.mjs +79 -0
  53. package/scripts/validate-node-support.mjs +118 -0
@@ -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
+ }