hadara 0.3.3 → 0.4.0-rc.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 (80) hide show
  1. package/README.md +26 -18
  2. package/dist/cli/dashboard.js +28 -9
  3. package/dist/cli/docs.js +50 -0
  4. package/dist/cli/evidence.js +113 -0
  5. package/dist/cli/handoff.js +13 -0
  6. package/dist/cli/help.js +4 -3
  7. package/dist/cli/init.js +615 -111
  8. package/dist/cli/legacy-boundary.js +77 -0
  9. package/dist/cli/main.js +31 -0
  10. package/dist/cli/package-smoke.js +34 -1
  11. package/dist/cli/release-artifact.js +9 -0
  12. package/dist/cli/release-closeout.js +22 -0
  13. package/dist/cli/release-publish.js +9 -0
  14. package/dist/cli/task.js +85 -21
  15. package/dist/cli/validation.js +71 -0
  16. package/dist/context/context-pack.js +204 -26
  17. package/dist/context/session-start.js +85 -6
  18. package/dist/context/task-extractors.js +3 -2
  19. package/dist/core/schema.js +22 -0
  20. package/dist/evidence/evidence.js +131 -9
  21. package/dist/evidence/semantics.js +3 -1
  22. package/dist/handoff/handoff-stale-problems.js +155 -0
  23. package/dist/handoff/handoff-suggestion.js +6 -1
  24. package/dist/harness/validate.js +316 -58
  25. package/dist/schemas/close-source.schema.json +33 -0
  26. package/dist/schemas/context-pack.schema.json +23 -0
  27. package/dist/schemas/docs-inbox.schema.json +50 -0
  28. package/dist/schemas/docs-read-map.schema.json +83 -0
  29. package/dist/schemas/docs-register.schema.json +70 -0
  30. package/dist/schemas/evidence-projection.schema.json +35 -0
  31. package/dist/schemas/evidence-summary.schema.json +73 -0
  32. package/dist/schemas/handoff-stale-problems.schema.json +64 -0
  33. package/dist/schemas/package-recycle.schema.json +150 -0
  34. package/dist/schemas/release-closeout.schema.json +39 -0
  35. package/dist/schemas/schema-index.json +79 -2
  36. package/dist/schemas/session-start.schema.json +30 -0
  37. package/dist/schemas/smoke-evidence-summary.schema.json +1 -1
  38. package/dist/schemas/task-audit-close.schema.json +7 -0
  39. package/dist/schemas/task-close.schema.json +4 -0
  40. package/dist/schemas/task-finalize.schema.json +40 -1
  41. package/dist/schemas/task-status.schema.json +117 -0
  42. package/dist/schemas/task-workbench.schema.json +97 -2
  43. package/dist/schemas/validation-run.schema.json +103 -0
  44. package/dist/services/capability-registry.js +326 -47
  45. package/dist/services/ci-gate.js +4 -2
  46. package/dist/services/dashboard-bootstrap.js +6 -6
  47. package/dist/services/dashboard-cache.js +2 -0
  48. package/dist/services/dashboard-task-detail.js +42 -13
  49. package/dist/services/dashboard-timeline.js +2 -2
  50. package/dist/services/docs-registry.js +485 -30
  51. package/dist/services/evidence-lint.js +9 -3
  52. package/dist/services/evidence-summary.js +66 -0
  53. package/dist/services/lifecycle-guide.js +11 -12
  54. package/dist/services/operational-debt.js +8 -14
  55. package/dist/services/operations-status-service.js +7 -1
  56. package/dist/services/package-recycle.js +762 -0
  57. package/dist/services/protocol-consistency.js +11 -5
  58. package/dist/services/protocol-migration.js +1 -1
  59. package/dist/services/release-closeout.js +136 -0
  60. package/dist/services/state-projection.js +31 -16
  61. package/dist/services/task-read-model.js +3 -7
  62. package/dist/services/task-workbench.js +582 -29
  63. package/dist/services/validation-run.js +325 -0
  64. package/dist/services/workbench-next-actions.js +31 -20
  65. package/dist/services/write-preflight.js +0 -7
  66. package/dist/task/authoring-guidance.js +74 -0
  67. package/dist/task/lifecycle-next-actions.js +0 -1
  68. package/dist/task/task-capsule.js +6 -11
  69. package/dist/task/task-close-repair-plan.js +3 -2
  70. package/dist/task/task-close.js +319 -39
  71. package/dist/task/task-complete-flow.js +4 -3
  72. package/dist/task/task-finalize.js +184 -20
  73. package/dist/task/task-finish.js +36 -8
  74. package/dist/task/task-lifecycle.js +14 -9
  75. package/dist/task/task-templates.js +5 -24
  76. package/dist/task/task-upgrade-scaffold.js +9 -60
  77. package/dist/tui/constants.js +1 -7
  78. package/dist/tui/read-model.js +4 -4
  79. package/dist/tui/snapshot.js +14 -2
  80. package/package.json +1 -1
@@ -18,6 +18,7 @@
18
18
  "validateWith",
19
19
  "writeBoundaries",
20
20
  "sliceCandidates",
21
+ "agentActions",
21
22
  "knownProblems",
22
23
  "stateProjection",
23
24
  "sourceSummary",
@@ -38,6 +39,7 @@
38
39
  "validateWith": { "type": "array", "items": { "$ref": "#/$defs/validationSuggestion" } },
39
40
  "writeBoundaries": { "type": "array", "items": { "$ref": "#/$defs/writeBoundary" } },
40
41
  "sliceCandidates": { "type": "array", "items": { "$ref": "#/$defs/sliceCandidate" } },
42
+ "agentActions": { "type": "array", "items": { "$ref": "#/$defs/agentAction" } },
41
43
  "knownProblems": { "type": "array", "items": { "$ref": "#/$defs/item" } },
42
44
  "stateProjection": { "$ref": "#/$defs/stateProjection" },
43
45
  "sourceSummary": { "$ref": "#/$defs/sourceSummary" },
@@ -151,6 +153,27 @@
151
153
  }
152
154
  }
153
155
  },
156
+ "agentAction": {
157
+ "type": "object",
158
+ "additionalProperties": true,
159
+ "required": ["id", "kind", "priority", "reason", "command", "writeBoundary"],
160
+ "properties": {
161
+ "id": { "type": "string", "minLength": 1 },
162
+ "kind": { "enum": ["read-first", "slice", "validate"] },
163
+ "priority": { "type": "number" },
164
+ "reason": { "type": "string", "minLength": 1 },
165
+ "command": { "type": "string", "minLength": 1 },
166
+ "commandArgs": {
167
+ "type": "array",
168
+ "minItems": 1,
169
+ "items": { "type": "string", "minLength": 1 }
170
+ },
171
+ "sourceItemId": { "type": "string" },
172
+ "sliceCandidateId": { "type": "string" },
173
+ "path": { "type": "string" },
174
+ "writeBoundary": { "const": "read-only" }
175
+ }
176
+ },
154
177
  "stateProjection": {
155
178
  "type": "object",
156
179
  "additionalProperties": true,
@@ -0,0 +1,50 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "hadara.docs.inbox.v1",
4
+ "x-hadara-schema-id": "hadara.docs.inbox.v1",
5
+ "title": "HADARA Docs Inbox Report",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": ["schemaVersion", "command", "ok", "source", "summary", "items", "issues"],
9
+ "properties": {
10
+ "schemaVersion": { "const": "hadara.docs.inbox.v1" },
11
+ "command": { "const": "docs.inbox" },
12
+ "ok": { "type": "boolean" },
13
+ "source": { "$ref": "#/$defs/source" },
14
+ "summary": {
15
+ "type": "object",
16
+ "additionalProperties": true,
17
+ "required": ["items", "errors", "warnings"],
18
+ "properties": {
19
+ "items": { "type": "number" },
20
+ "errors": { "type": "number" },
21
+ "warnings": { "type": "number" }
22
+ }
23
+ },
24
+ "items": { "type": "array", "items": { "$ref": "#/$defs/issue" } },
25
+ "issues": { "type": "array", "items": { "$ref": "#/$defs/issue" } }
26
+ },
27
+ "$defs": {
28
+ "source": {
29
+ "type": "object",
30
+ "additionalProperties": true,
31
+ "required": ["registryPath", "registryPresent", "inferred"],
32
+ "properties": {
33
+ "registryPath": { "const": ".hadara/docs-registry.json" },
34
+ "registryPresent": { "type": "boolean" },
35
+ "inferred": { "type": "boolean" }
36
+ }
37
+ },
38
+ "issue": {
39
+ "type": "object",
40
+ "additionalProperties": true,
41
+ "required": ["severity", "code", "message"],
42
+ "properties": {
43
+ "severity": { "type": "string", "enum": ["warning", "error"] },
44
+ "code": { "type": "string", "minLength": 1 },
45
+ "message": { "type": "string", "minLength": 1 },
46
+ "path": { "type": "string", "minLength": 1 }
47
+ }
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,83 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "hadara.docs.readMap.v1",
4
+ "x-hadara-schema-id": "hadara.docs.readMap.v1",
5
+ "title": "HADARA Docs Read Map Report",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": ["schemaVersion", "command", "ok", "taskId", "source", "task", "readFirst", "readIfNeeded", "doNotReadByDefault", "driftWarnings", "issues"],
9
+ "properties": {
10
+ "schemaVersion": { "const": "hadara.docs.readMap.v1" },
11
+ "command": { "const": "docs.read-map" },
12
+ "ok": { "type": "boolean" },
13
+ "taskId": { "type": "string" },
14
+ "source": { "$ref": "#/$defs/source" },
15
+ "task": {
16
+ "type": "object",
17
+ "additionalProperties": true,
18
+ "required": ["capsulePath", "capsulePresent", "title"],
19
+ "properties": {
20
+ "capsulePath": { "oneOf": [{ "type": "string" }, { "type": "null" }] },
21
+ "capsulePresent": { "type": "boolean" },
22
+ "title": { "oneOf": [{ "type": "string" }, { "type": "null" }] }
23
+ }
24
+ },
25
+ "readFirst": { "type": "array", "items": { "$ref": "#/$defs/entry" } },
26
+ "readIfNeeded": { "type": "array", "items": { "$ref": "#/$defs/entry" } },
27
+ "doNotReadByDefault": { "type": "array", "items": { "$ref": "#/$defs/entry" } },
28
+ "driftWarnings": { "type": "array", "items": { "$ref": "#/$defs/driftWarning" } },
29
+ "issues": { "type": "array", "items": { "$ref": "#/$defs/issue" } }
30
+ },
31
+ "$defs": {
32
+ "source": {
33
+ "type": "object",
34
+ "additionalProperties": true,
35
+ "required": ["registryPath", "registryPresent", "inferred"],
36
+ "properties": {
37
+ "registryPath": { "const": ".hadara/docs-registry.json" },
38
+ "registryPresent": { "type": "boolean" },
39
+ "inferred": { "type": "boolean" }
40
+ }
41
+ },
42
+ "entry": {
43
+ "type": "object",
44
+ "additionalProperties": true,
45
+ "required": ["path", "title", "kind", "status", "readWhen", "readTier", "authority", "editPolicy", "source", "reason"],
46
+ "properties": {
47
+ "path": { "type": "string", "minLength": 1 },
48
+ "title": { "type": "string", "minLength": 1 },
49
+ "kind": { "type": "string", "minLength": 1 },
50
+ "status": { "type": "string", "minLength": 1 },
51
+ "readWhen": { "type": "array", "items": { "type": "string", "minLength": 1 } },
52
+ "readTier": { "type": "string", "minLength": 1 },
53
+ "authority": { "type": "string", "minLength": 1 },
54
+ "editPolicy": { "type": "string", "minLength": 1 },
55
+ "source": { "type": "string", "enum": ["registry", "task-capsule", "discovery"] },
56
+ "reason": { "type": "string", "minLength": 1 }
57
+ }
58
+ },
59
+ "driftWarning": {
60
+ "type": "object",
61
+ "additionalProperties": true,
62
+ "required": ["code", "path", "risk", "reviewRequiredBeforeUse", "reason"],
63
+ "properties": {
64
+ "code": { "type": "string", "minLength": 1 },
65
+ "path": { "type": "string", "minLength": 1 },
66
+ "risk": { "type": "string", "enum": ["low", "medium", "high"] },
67
+ "reviewRequiredBeforeUse": { "type": "boolean" },
68
+ "reason": { "type": "string", "minLength": 1 }
69
+ }
70
+ },
71
+ "issue": {
72
+ "type": "object",
73
+ "additionalProperties": true,
74
+ "required": ["severity", "code", "message"],
75
+ "properties": {
76
+ "severity": { "type": "string", "enum": ["warning", "error"] },
77
+ "code": { "type": "string", "minLength": 1 },
78
+ "message": { "type": "string", "minLength": 1 },
79
+ "path": { "type": "string", "minLength": 1 }
80
+ }
81
+ }
82
+ }
83
+ }
@@ -0,0 +1,70 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "hadara.docs.register.v1",
4
+ "x-hadara-schema-id": "hadara.docs.register.v1",
5
+ "title": "HADARA Docs Register Report",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": ["schemaVersion", "command", "ok", "mode", "path", "source", "action", "document", "writes", "issues"],
9
+ "properties": {
10
+ "schemaVersion": { "const": "hadara.docs.register.v1" },
11
+ "command": { "const": "docs.register" },
12
+ "ok": { "type": "boolean" },
13
+ "mode": { "type": "string", "enum": ["dry-run", "execute"] },
14
+ "path": { "type": "string" },
15
+ "source": {
16
+ "type": "object",
17
+ "additionalProperties": true,
18
+ "required": ["registryPath", "registryPresent", "inferred"],
19
+ "properties": {
20
+ "registryPath": { "const": ".hadara/docs-registry.json" },
21
+ "registryPresent": { "type": "boolean" },
22
+ "inferred": { "type": "boolean" }
23
+ }
24
+ },
25
+ "action": { "type": "string", "enum": ["create", "already-registered", "blocked"] },
26
+ "document": { "oneOf": [{ "$ref": "#/$defs/document" }, { "type": "null" }] },
27
+ "writes": {
28
+ "type": "array",
29
+ "items": { "type": "string", "minLength": 1 }
30
+ },
31
+ "issues": {
32
+ "type": "array",
33
+ "items": { "$ref": "#/$defs/issue" }
34
+ }
35
+ },
36
+ "$defs": {
37
+ "document": {
38
+ "type": "object",
39
+ "additionalProperties": true,
40
+ "required": ["path", "title", "kind", "status", "readWhen", "requiredReading", "updateOwner", "updatedByCommands"],
41
+ "properties": {
42
+ "path": { "type": "string", "minLength": 1 },
43
+ "title": { "type": "string", "minLength": 1 },
44
+ "kind": { "type": "string", "minLength": 1 },
45
+ "status": { "type": "string", "minLength": 1 },
46
+ "readWhen": {
47
+ "type": "array",
48
+ "items": { "type": "string", "minLength": 1 }
49
+ },
50
+ "requiredReading": { "type": "boolean" },
51
+ "updateOwner": { "type": "string", "minLength": 1 },
52
+ "updatedByCommands": {
53
+ "type": "array",
54
+ "items": { "type": "string", "minLength": 1 }
55
+ }
56
+ }
57
+ },
58
+ "issue": {
59
+ "type": "object",
60
+ "additionalProperties": true,
61
+ "required": ["severity", "code", "message"],
62
+ "properties": {
63
+ "severity": { "type": "string", "enum": ["warning", "error"] },
64
+ "code": { "type": "string", "minLength": 1 },
65
+ "message": { "type": "string", "minLength": 1 },
66
+ "path": { "type": "string", "minLength": 1 }
67
+ }
68
+ }
69
+ }
70
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "hadara.evidence.projection.v1",
4
+ "x-hadara-schema-id": "hadara.evidence.projection.v1",
5
+ "title": "HADARA Evidence Projection Report",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": ["schemaVersion", "command", "ok", "taskId", "mode", "source", "target", "wouldChange", "generatedSlots", "afterHash", "issues"],
9
+ "properties": {
10
+ "schemaVersion": { "const": "hadara.evidence.projection.v1" },
11
+ "command": { "const": "evidence.project" },
12
+ "ok": { "type": "boolean" },
13
+ "taskId": { "type": "string", "pattern": "^T-[0-9]{4,}$" },
14
+ "mode": { "enum": ["dry-run", "execute"] },
15
+ "source": { "type": "string" },
16
+ "target": { "type": "string" },
17
+ "wouldChange": { "type": "boolean" },
18
+ "generatedSlots": { "type": "array", "items": { "type": "string" } },
19
+ "beforeHash": { "type": "string" },
20
+ "afterHash": { "type": "string" },
21
+ "issues": { "type": "array", "items": { "$ref": "#/$defs/issue" } }
22
+ },
23
+ "$defs": {
24
+ "issue": {
25
+ "type": "object",
26
+ "additionalProperties": true,
27
+ "required": ["severity", "code", "message"],
28
+ "properties": {
29
+ "severity": { "enum": ["error", "warning", "info"] },
30
+ "code": { "type": "string" },
31
+ "message": { "type": "string" }
32
+ }
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,73 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "hadara.evidence.summary.v1",
4
+ "x-hadara-schema-id": "hadara.evidence.summary.v1",
5
+ "title": "HADARA Evidence Summary Report",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": ["schemaVersion", "command", "ok", "readOnly", "taskId", "summary", "records", "latest", "latestCloseEvidence", "copyHints", "issues"],
9
+ "properties": {
10
+ "schemaVersion": { "const": "hadara.evidence.summary.v1" },
11
+ "command": { "const": "evidence.summary" },
12
+ "ok": { "type": "boolean" },
13
+ "readOnly": { "const": true },
14
+ "taskId": { "type": "string", "pattern": "^T-[0-9]{4}$" },
15
+ "summary": {
16
+ "type": "object",
17
+ "additionalProperties": true,
18
+ "required": ["count", "durableCount", "unstableCount", "privateIncluded", "latestId", "latestCloseEvidenceId"],
19
+ "properties": {
20
+ "count": { "type": "integer", "minimum": 0 },
21
+ "durableCount": { "type": "integer", "minimum": 0 },
22
+ "unstableCount": { "type": "integer", "minimum": 0 },
23
+ "privateIncluded": { "type": "boolean" },
24
+ "latestId": { "type": ["string", "null"] },
25
+ "latestCloseEvidenceId": { "type": ["string", "null"] }
26
+ }
27
+ },
28
+ "records": { "type": "array", "items": { "$ref": "#/$defs/summaryRecord" } },
29
+ "latest": { "oneOf": [{ "$ref": "#/$defs/summaryRecord" }, { "type": "null" }] },
30
+ "latestCloseEvidence": { "oneOf": [{ "$ref": "#/$defs/summaryRecord" }, { "type": "null" }] },
31
+ "copyHints": {
32
+ "type": "object",
33
+ "additionalProperties": true,
34
+ "required": ["latestId", "latestCloseEvidenceId", "durableIds"],
35
+ "properties": {
36
+ "latestId": { "type": ["string", "null"] },
37
+ "latestCloseEvidenceId": { "type": ["string", "null"] },
38
+ "durableIds": { "type": "array", "items": { "type": "string", "minLength": 1 } }
39
+ }
40
+ },
41
+ "issues": { "type": "array", "items": { "$ref": "#/$defs/issue" } }
42
+ },
43
+ "$defs": {
44
+ "summaryRecord": {
45
+ "type": "object",
46
+ "additionalProperties": true,
47
+ "required": ["id", "time", "category", "outcome", "visibility", "summary", "tags", "sourceLine", "idSource", "idStability", "persistedSchemaVersion"],
48
+ "properties": {
49
+ "id": { "type": "string", "minLength": 1 },
50
+ "time": { "type": "string", "minLength": 1 },
51
+ "category": { "type": "string", "enum": ["validation", "implementation", "release", "security", "policy", "operation", "decision", "handoff", "audit", "note", "observation"] },
52
+ "outcome": { "type": "string", "enum": ["passed", "failed", "blocked", "unknown", "recorded", "not-applicable"] },
53
+ "visibility": { "type": "string", "enum": ["public", "private"] },
54
+ "summary": { "type": "string", "minLength": 1 },
55
+ "tags": { "type": "array", "items": { "type": "string" } },
56
+ "sourceLine": { "type": "integer", "minimum": 1 },
57
+ "idSource": { "type": "string", "enum": ["persisted", "line-fallback"] },
58
+ "idStability": { "type": "string", "enum": ["durable", "unstable-on-reorder"] },
59
+ "persistedSchemaVersion": { "type": "string", "enum": ["hadara.evidence.v1", "hadara.evidence.v2"] }
60
+ }
61
+ },
62
+ "issue": {
63
+ "type": "object",
64
+ "additionalProperties": true,
65
+ "required": ["severity", "code", "message"],
66
+ "properties": {
67
+ "severity": { "type": "string", "enum": ["warning", "error"] },
68
+ "code": { "type": "string", "minLength": 1 },
69
+ "message": { "type": "string", "minLength": 1 }
70
+ }
71
+ }
72
+ }
73
+ }
@@ -0,0 +1,64 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "hadara.handoff.staleProblems.v1",
4
+ "x-hadara-schema-id": "hadara.handoff.staleProblems.v1",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": ["schemaVersion", "command", "ok", "readOnly", "generatedAt", "target", "summary", "candidates", "issues"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "hadara.handoff.staleProblems.v1" },
10
+ "command": { "const": "handoff.stale-problems" },
11
+ "ok": { "type": "boolean" },
12
+ "readOnly": { "const": true },
13
+ "generatedAt": { "type": "string" },
14
+ "target": {
15
+ "type": "object",
16
+ "additionalProperties": true,
17
+ "required": ["path", "beforeHash", "writeBoundary"],
18
+ "properties": {
19
+ "path": { "const": "docs/AGENT_HANDOFF.md" },
20
+ "beforeHash": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
21
+ "writeBoundary": { "const": "read-only" }
22
+ }
23
+ },
24
+ "summary": {
25
+ "type": "object",
26
+ "additionalProperties": true,
27
+ "required": ["knownProblemRows", "candidates"],
28
+ "properties": {
29
+ "knownProblemRows": { "type": "integer", "minimum": 0 },
30
+ "candidates": { "type": "integer", "minimum": 0 }
31
+ }
32
+ },
33
+ "candidates": {
34
+ "type": "array",
35
+ "items": {
36
+ "type": "object",
37
+ "additionalProperties": true,
38
+ "required": ["id", "rowIndex", "cells", "rowText", "confidence", "reason", "matchedSources", "suggestedAction"],
39
+ "properties": {
40
+ "id": { "type": "string" },
41
+ "rowIndex": { "type": "integer", "minimum": 1 },
42
+ "cells": { "type": "array", "items": { "type": "string" } },
43
+ "rowText": { "type": "string" },
44
+ "confidence": { "enum": ["medium", "high"] },
45
+ "reason": { "type": "string" },
46
+ "matchedSources": {
47
+ "type": "array",
48
+ "items": {
49
+ "type": "object",
50
+ "additionalProperties": true,
51
+ "required": ["path", "summary"],
52
+ "properties": {
53
+ "path": { "type": "string" },
54
+ "summary": { "type": "string" }
55
+ }
56
+ }
57
+ },
58
+ "suggestedAction": { "type": "string" }
59
+ }
60
+ }
61
+ },
62
+ "issues": { "type": "array", "items": { "type": "object", "additionalProperties": true } }
63
+ }
64
+ }
@@ -0,0 +1,150 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "hadara.packageRecycle.v1",
4
+ "x-hadara-schema-id": "hadara.packageRecycle.v1",
5
+ "title": "HADARA Installed Package Recycle Report",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": [
9
+ "schemaVersion",
10
+ "command",
11
+ "ok",
12
+ "mode",
13
+ "readOnly",
14
+ "package",
15
+ "networkPolicy",
16
+ "execution",
17
+ "workspace",
18
+ "steps",
19
+ "artifacts",
20
+ "privacy",
21
+ "issues"
22
+ ],
23
+ "properties": {
24
+ "schemaVersion": { "const": "hadara.packageRecycle.v1" },
25
+ "command": { "const": "package.recycle" },
26
+ "ok": { "type": "boolean" },
27
+ "mode": { "type": "string", "enum": ["dry-run", "execute"] },
28
+ "readOnly": { "type": "boolean" },
29
+ "package": {
30
+ "type": "object",
31
+ "additionalProperties": true,
32
+ "required": ["specifier", "name", "expectedVersion", "observedVersion", "latestVersion", "distTags"],
33
+ "properties": {
34
+ "specifier": { "type": "string", "minLength": 1 },
35
+ "name": { "type": "string", "minLength": 1 },
36
+ "expectedVersion": { "type": ["string", "null"] },
37
+ "observedVersion": { "type": ["string", "null"] },
38
+ "latestVersion": { "type": ["string", "null"] },
39
+ "distTags": {
40
+ "type": "object",
41
+ "additionalProperties": { "type": "string" }
42
+ }
43
+ }
44
+ },
45
+ "networkPolicy": {
46
+ "type": "object",
47
+ "additionalProperties": true,
48
+ "required": ["mode", "enforced", "notes"],
49
+ "properties": {
50
+ "mode": { "const": "environment-inherited" },
51
+ "enforced": { "const": false },
52
+ "notes": { "type": "array", "items": { "type": "string", "minLength": 1 } }
53
+ }
54
+ },
55
+ "execution": {
56
+ "type": "object",
57
+ "additionalProperties": true,
58
+ "required": [
59
+ "npmViewExecuted",
60
+ "npmDistTagExecuted",
61
+ "packageInstallExecuted",
62
+ "installedVersionExecuted",
63
+ "lifecycleHelpExecuted",
64
+ "initExecuted",
65
+ "taskLifecycleExecuted",
66
+ "contextSmokeExecuted",
67
+ "releaseMutationExecuted",
68
+ "publishExecuted"
69
+ ],
70
+ "properties": {
71
+ "npmViewExecuted": { "type": "boolean" },
72
+ "npmDistTagExecuted": { "type": "boolean" },
73
+ "packageInstallExecuted": { "type": "boolean" },
74
+ "installedVersionExecuted": { "type": "boolean" },
75
+ "lifecycleHelpExecuted": { "type": "boolean" },
76
+ "initExecuted": { "type": "boolean" },
77
+ "taskLifecycleExecuted": { "type": "boolean" },
78
+ "contextSmokeExecuted": { "type": "boolean" },
79
+ "releaseMutationExecuted": { "const": false },
80
+ "publishExecuted": { "const": false }
81
+ }
82
+ },
83
+ "workspace": {
84
+ "type": "object",
85
+ "additionalProperties": true,
86
+ "required": ["kind", "displayPath", "pathRedacted", "retention"],
87
+ "properties": {
88
+ "kind": { "const": "disposable" },
89
+ "displayPath": { "type": "string", "minLength": 1 },
90
+ "pathRedacted": { "const": true },
91
+ "retention": { "type": "string", "enum": ["deleted", "kept-temporary"] }
92
+ }
93
+ },
94
+ "steps": { "type": "array", "items": { "$ref": "#/$defs/step" } },
95
+ "artifacts": { "type": "array", "items": { "$ref": "#/$defs/artifact" } },
96
+ "privacy": {
97
+ "type": "object",
98
+ "additionalProperties": true,
99
+ "required": ["rawLogsIncluded", "rawPackageContentsIncluded", "privatePathsIncluded", "environmentSecretsIncluded", "privateStorePathsIncluded"],
100
+ "properties": {
101
+ "rawLogsIncluded": { "const": false },
102
+ "rawPackageContentsIncluded": { "const": false },
103
+ "privatePathsIncluded": { "const": false },
104
+ "environmentSecretsIncluded": { "const": false },
105
+ "privateStorePathsIncluded": { "const": false }
106
+ }
107
+ },
108
+ "issues": { "type": "array", "items": { "$ref": "#/$defs/issue" } }
109
+ },
110
+ "$defs": {
111
+ "step": {
112
+ "type": "object",
113
+ "additionalProperties": true,
114
+ "required": ["id", "label", "status", "summary"],
115
+ "properties": {
116
+ "id": { "type": "string", "minLength": 1 },
117
+ "label": { "type": "string", "minLength": 1 },
118
+ "status": { "type": "string", "enum": ["planned", "passed", "failed", "skipped"] },
119
+ "command": { "type": "string", "minLength": 1 },
120
+ "exitCode": { "type": ["integer", "null"] },
121
+ "elapsedMs": { "type": "integer" },
122
+ "summary": { "type": "string", "minLength": 1 }
123
+ }
124
+ },
125
+ "artifact": {
126
+ "type": "object",
127
+ "additionalProperties": true,
128
+ "required": ["kind", "visibility", "rawContentIncluded"],
129
+ "properties": {
130
+ "kind": { "type": "string", "enum": ["summary", "command-log", "install-tree"] },
131
+ "visibility": { "type": "string", "enum": ["public", "private", "temporary"] },
132
+ "evidencePath": { "type": "string", "pattern": "^tasks/T-[0-9]{4}-.+/artifacts/package-recycle/.+" },
133
+ "relativePath": { "type": "string", "minLength": 1 },
134
+ "pathRedacted": { "const": true },
135
+ "rawContentIncluded": { "const": false }
136
+ }
137
+ },
138
+ "issue": {
139
+ "type": "object",
140
+ "additionalProperties": true,
141
+ "required": ["severity", "code", "message"],
142
+ "properties": {
143
+ "severity": { "type": "string", "enum": ["warning", "error"] },
144
+ "code": { "type": "string", "minLength": 1 },
145
+ "message": { "type": "string", "minLength": 1 },
146
+ "stepId": { "type": "string", "minLength": 1 }
147
+ }
148
+ }
149
+ }
150
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "hadara.releaseCloseout.v1",
4
+ "x-hadara-schema-id": "hadara.releaseCloseout.v1",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": ["schemaVersion", "command", "ok", "readOnly", "generatedAt", "input", "summary", "surfaces", "suggestedFragments", "issues"],
8
+ "properties": {
9
+ "schemaVersion": { "const": "hadara.releaseCloseout.v1" },
10
+ "command": { "const": "release.closeout" },
11
+ "ok": { "type": "boolean" },
12
+ "readOnly": { "const": true },
13
+ "generatedAt": { "type": "string" },
14
+ "input": {
15
+ "type": "object",
16
+ "additionalProperties": true,
17
+ "required": ["version", "taskId"],
18
+ "properties": {
19
+ "version": { "type": ["string", "null"] },
20
+ "taskId": { "type": ["string", "null"] }
21
+ }
22
+ },
23
+ "summary": {
24
+ "type": "object",
25
+ "additionalProperties": true,
26
+ "required": ["files", "current", "stale", "missing", "suggestedFragments"],
27
+ "properties": {
28
+ "files": { "type": "integer", "minimum": 0 },
29
+ "current": { "type": "integer", "minimum": 0 },
30
+ "stale": { "type": "integer", "minimum": 0 },
31
+ "missing": { "type": "integer", "minimum": 0 },
32
+ "suggestedFragments": { "type": "integer", "minimum": 0 }
33
+ }
34
+ },
35
+ "surfaces": { "type": "array", "items": { "type": "object", "additionalProperties": true } },
36
+ "suggestedFragments": { "type": "array", "items": { "type": "object", "additionalProperties": true } },
37
+ "issues": { "type": "array", "items": { "type": "object", "additionalProperties": true } }
38
+ }
39
+ }