hadara 0.1.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 (121) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +109 -0
  3. package/dist/agent/evidence.js +50 -0
  4. package/dist/agent/loop.js +124 -0
  5. package/dist/cli/args.js +70 -0
  6. package/dist/cli/dashboard.js +185 -0
  7. package/dist/cli/debt.js +41 -0
  8. package/dist/cli/doctor.js +68 -0
  9. package/dist/cli/errors.js +58 -0
  10. package/dist/cli/evidence-json.js +75 -0
  11. package/dist/cli/evidence.js +80 -0
  12. package/dist/cli/handoff.js +16 -0
  13. package/dist/cli/harness.js +57 -0
  14. package/dist/cli/hermes-json.js +31 -0
  15. package/dist/cli/hermes.js +28 -0
  16. package/dist/cli/init.js +142 -0
  17. package/dist/cli/install.js +34 -0
  18. package/dist/cli/main.js +216 -0
  19. package/dist/cli/mcp.js +15 -0
  20. package/dist/cli/package-smoke.js +37 -0
  21. package/dist/cli/policy-json.js +22 -0
  22. package/dist/cli/policy.js +43 -0
  23. package/dist/cli/release-artifact.js +47 -0
  24. package/dist/cli/release-dry-run.js +24 -0
  25. package/dist/cli/release-gate.js +28 -0
  26. package/dist/cli/release-publish.js +41 -0
  27. package/dist/cli/run-scaffold.js +68 -0
  28. package/dist/cli/run-state.js +41 -0
  29. package/dist/cli/run.js +191 -0
  30. package/dist/cli/smoke.js +58 -0
  31. package/dist/cli/status-json.js +6 -0
  32. package/dist/cli/status.js +26 -0
  33. package/dist/cli/task-json.js +8 -0
  34. package/dist/cli/task.js +64 -0
  35. package/dist/cli/tools.js +25 -0
  36. package/dist/cli/tui.js +72 -0
  37. package/dist/cli/write-preflight.js +27 -0
  38. package/dist/core/audit.js +41 -0
  39. package/dist/core/events.js +63 -0
  40. package/dist/core/fs.js +44 -0
  41. package/dist/core/paths.js +59 -0
  42. package/dist/core/redaction.js +178 -0
  43. package/dist/core/schema.js +253 -0
  44. package/dist/core/workspace.js +47 -0
  45. package/dist/evidence/evidence.js +170 -0
  46. package/dist/evidence/private-manifest.js +101 -0
  47. package/dist/handoff/handoff.js +49 -0
  48. package/dist/harness/replay.js +200 -0
  49. package/dist/harness/validate.js +465 -0
  50. package/dist/hermes/context-export.js +104 -0
  51. package/dist/index.js +29 -0
  52. package/dist/mcp/server.js +104 -0
  53. package/dist/mcp/tool-dispatch.js +159 -0
  54. package/dist/mcp/tool-registry.js +150 -0
  55. package/dist/mcp/tool-schemas.js +18 -0
  56. package/dist/policy/command-risk.js +39 -0
  57. package/dist/policy/permission-matrix.js +42 -0
  58. package/dist/policy/policy.js +20 -0
  59. package/dist/policy/preflight.js +47 -0
  60. package/dist/policy/presets.js +24 -0
  61. package/dist/policy/tokenizer.js +53 -0
  62. package/dist/providers/fallback-executor.js +46 -0
  63. package/dist/providers/mock-provider.js +49 -0
  64. package/dist/providers/provider-contract.js +2 -0
  65. package/dist/providers/provider-preparation.js +220 -0
  66. package/dist/providers/scripted-provider.js +69 -0
  67. package/dist/schemas/active-run-projection.schema.json +73 -0
  68. package/dist/schemas/active-run-resume.schema.json +68 -0
  69. package/dist/schemas/clean-checkout-smoke.schema.json +126 -0
  70. package/dist/schemas/context-export.schema.json +35 -0
  71. package/dist/schemas/event.schema.json +17 -0
  72. package/dist/schemas/evidence-list.schema.json +49 -0
  73. package/dist/schemas/feature-smoke.schema.json +67 -0
  74. package/dist/schemas/install-plan.schema.json +93 -0
  75. package/dist/schemas/package-smoke.schema.json +130 -0
  76. package/dist/schemas/private-evidence.schema.json +48 -0
  77. package/dist/schemas/provider-call.schema.json +42 -0
  78. package/dist/schemas/provider-config.schema.json +43 -0
  79. package/dist/schemas/release-artifact-manifest.schema.json +55 -0
  80. package/dist/schemas/release-artifact.schema.json +140 -0
  81. package/dist/schemas/release-dry-run.schema.json +141 -0
  82. package/dist/schemas/release-gate.schema.json +42 -0
  83. package/dist/schemas/release-publish.schema.json +114 -0
  84. package/dist/schemas/schema-index.json +145 -0
  85. package/dist/schemas/smoke-evidence-summary.schema.json +88 -0
  86. package/dist/schemas/tools-list.schema.json +78 -0
  87. package/dist/schemas/write-preflight.schema.json +47 -0
  88. package/dist/services/active-run-state.js +215 -0
  89. package/dist/services/capability-registry.js +540 -0
  90. package/dist/services/clean-checkout-smoke.js +393 -0
  91. package/dist/services/evidence-list.js +136 -0
  92. package/dist/services/feature-smoke.js +155 -0
  93. package/dist/services/harness-service.js +7 -0
  94. package/dist/services/install-plan.js +233 -0
  95. package/dist/services/operational-debt.js +767 -0
  96. package/dist/services/operations-status-service.js +195 -0
  97. package/dist/services/package-smoke.js +676 -0
  98. package/dist/services/policy-service.js +25 -0
  99. package/dist/services/project-read-model.js +101 -0
  100. package/dist/services/release-artifact-evidence.js +77 -0
  101. package/dist/services/release-artifact.js +351 -0
  102. package/dist/services/release-dry-run.js +253 -0
  103. package/dist/services/release-evidence.js +138 -0
  104. package/dist/services/release-publish.js +163 -0
  105. package/dist/services/smoke-evidence.js +104 -0
  106. package/dist/services/task-read-model.js +125 -0
  107. package/dist/services/tools-list.js +26 -0
  108. package/dist/services/write-preflight.js +240 -0
  109. package/dist/task/task-capsule.js +121 -0
  110. package/dist/tools/fake-shell.js +56 -0
  111. package/dist/tui/cache.js +341 -0
  112. package/dist/tui/constants.js +44 -0
  113. package/dist/tui/layout.js +140 -0
  114. package/dist/tui/markdown.js +238 -0
  115. package/dist/tui/read-model-worker.js +24 -0
  116. package/dist/tui/read-model.js +502 -0
  117. package/dist/tui/snapshot.js +434 -0
  118. package/dist/tui/state.js +229 -0
  119. package/dist/tui/terminal.js +475 -0
  120. package/dist/tui/theme.js +86 -0
  121. package/package.json +16 -0
@@ -0,0 +1,35 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "hadara.context.export.v1",
4
+ "x-hadara-schema-id": "hadara.context.export.v1",
5
+ "title": "HADARA Context Export Report",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": ["schemaVersion", "command", "ok", "format", "mode", "content", "contextPath", "wouldWritePath", "issues"],
9
+ "properties": {
10
+ "schemaVersion": { "const": "hadara.context.export.v1" },
11
+ "command": { "const": "context.export" },
12
+ "ok": { "type": "boolean" },
13
+ "format": { "type": "string", "enum": ["markdown", "json"] },
14
+ "mode": { "const": "memory" },
15
+ "content": { "type": "string" },
16
+ "contextPath": { "type": "null" },
17
+ "wouldWritePath": { "const": ".hadara/context/HADARA_CONTEXT.md" },
18
+ "issues": {
19
+ "type": "array",
20
+ "items": { "$ref": "#/$defs/issue" }
21
+ }
22
+ },
23
+ "$defs": {
24
+ "issue": {
25
+ "type": "object",
26
+ "additionalProperties": true,
27
+ "required": ["severity", "code", "message"],
28
+ "properties": {
29
+ "severity": { "type": "string", "enum": ["warning", "error"] },
30
+ "code": { "type": "string", "minLength": 1 },
31
+ "message": { "type": "string", "minLength": 1 }
32
+ }
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "hadara.event.v1",
4
+ "x-hadara-schema-id": "hadara.event.v1",
5
+ "type": "object",
6
+ "required": ["schemaVersion", "time", "level", "eventType", "actor", "summary"],
7
+ "properties": {
8
+ "schemaVersion": { "const": "hadara.event.v1" },
9
+ "time": { "type": "string", "minLength": 1 },
10
+ "level": { "type": "string", "enum": ["debug", "info", "warn", "error"] },
11
+ "eventType": { "type": "string", "minLength": 1, "pattern": "^[A-Za-z0-9_.:-]+$" },
12
+ "actor": { "type": "string", "enum": ["cli", "mcp", "system", "agent", "user"] },
13
+ "taskId": { "type": "string", "pattern": "^T-[0-9]{4}$" },
14
+ "summary": { "type": "string", "minLength": 1 },
15
+ "payload": { "type": ["object", "array", "string", "number", "boolean", "null"] }
16
+ }
17
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "hadara.evidence.list.v1",
4
+ "x-hadara-schema-id": "hadara.evidence.list.v1",
5
+ "title": "HADARA Evidence List Report",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": ["schemaVersion", "command", "ok", "taskId", "count", "records", "issues"],
9
+ "properties": {
10
+ "schemaVersion": { "const": "hadara.evidence.list.v1" },
11
+ "command": { "const": "evidence.list" },
12
+ "ok": { "type": "boolean" },
13
+ "taskId": { "type": "string", "pattern": "^T-[0-9]{4}$" },
14
+ "count": { "type": "integer", "minimum": 0 },
15
+ "records": {
16
+ "type": "array",
17
+ "items": {
18
+ "type": "object",
19
+ "additionalProperties": true,
20
+ "required": ["schemaVersion", "time", "taskId", "kind", "summary", "result", "visibility"],
21
+ "properties": {
22
+ "schemaVersion": { "const": "hadara.evidence.v1" },
23
+ "time": { "type": "string", "minLength": 1 },
24
+ "taskId": { "type": "string", "pattern": "^T-[0-9]{4}$" },
25
+ "kind": { "type": "string", "enum": ["test-log", "command-log", "diff-summary", "screenshot", "note"] },
26
+ "summary": { "type": "string", "minLength": 1 },
27
+ "result": { "type": "string", "enum": ["passed", "failed", "blocked", "unknown"] },
28
+ "visibility": { "type": "string", "enum": ["public", "private"] }
29
+ }
30
+ }
31
+ },
32
+ "issues": {
33
+ "type": "array",
34
+ "items": { "$ref": "#/$defs/issue" }
35
+ }
36
+ },
37
+ "$defs": {
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
+ }
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,67 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "hadara.featureSmoke.v1",
4
+ "x-hadara-schema-id": "hadara.featureSmoke.v1",
5
+ "title": "HADARA Feature Smoke Report",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": [
9
+ "schemaVersion",
10
+ "command",
11
+ "ok",
12
+ "profile",
13
+ "readOnly",
14
+ "executionMode",
15
+ "binaryExecuted",
16
+ "launcherChecked",
17
+ "packageInstallChecked",
18
+ "steps",
19
+ "issues"
20
+ ],
21
+ "properties": {
22
+ "schemaVersion": { "const": "hadara.featureSmoke.v1" },
23
+ "command": { "const": "feature-smoke.run" },
24
+ "ok": { "type": "boolean" },
25
+ "profile": { "type": "string", "enum": ["core", "release-readiness"] },
26
+ "readOnly": { "const": true },
27
+ "executionMode": { "const": "service-read-model" },
28
+ "binaryExecuted": { "const": false },
29
+ "launcherChecked": { "const": false },
30
+ "packageInstallChecked": { "const": false },
31
+ "steps": {
32
+ "type": "array",
33
+ "items": { "$ref": "#/$defs/step" }
34
+ },
35
+ "issues": {
36
+ "type": "array",
37
+ "items": { "$ref": "#/$defs/issue" }
38
+ }
39
+ },
40
+ "$defs": {
41
+ "step": {
42
+ "type": "object",
43
+ "additionalProperties": true,
44
+ "required": ["id", "command", "executionMode", "status", "summary"],
45
+ "properties": {
46
+ "id": { "type": "string", "minLength": 1 },
47
+ "command": { "type": "string", "minLength": 1 },
48
+ "executionMode": { "const": "service-read-model" },
49
+ "status": { "type": "string", "enum": ["passed", "failed", "skipped"] },
50
+ "schemaVersion": { "type": "string", "minLength": 1 },
51
+ "schemaStatus": { "type": "string", "enum": ["validated", "not-registered", "invalid"] },
52
+ "summary": { "type": "string", "minLength": 1 }
53
+ }
54
+ },
55
+ "issue": {
56
+ "type": "object",
57
+ "additionalProperties": true,
58
+ "required": ["severity", "code", "message"],
59
+ "properties": {
60
+ "severity": { "type": "string", "enum": ["warning", "error"] },
61
+ "code": { "type": "string", "minLength": 1 },
62
+ "message": { "type": "string", "minLength": 1 },
63
+ "stepId": { "type": "string", "minLength": 1 }
64
+ }
65
+ }
66
+ }
67
+ }
@@ -0,0 +1,93 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "hadara.install.plan.v1",
4
+ "x-hadara-schema-id": "hadara.install.plan.v1",
5
+ "title": "HADARA Install Plan Report",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": ["schemaVersion", "command", "ok", "mode", "platform", "source", "target", "execution", "actions", "issues"],
9
+ "properties": {
10
+ "schemaVersion": { "const": "hadara.install.plan.v1" },
11
+ "command": { "const": "install.plan" },
12
+ "ok": { "type": "boolean" },
13
+ "mode": { "type": "string", "enum": ["dry-run", "execute"] },
14
+ "platform": { "type": "string", "enum": ["linux", "posix", "windows", "wsl", "usb"] },
15
+ "source": {
16
+ "type": "object",
17
+ "additionalProperties": true,
18
+ "required": ["kind", "pathRedacted"],
19
+ "properties": {
20
+ "kind": { "type": "string", "enum": ["tarball", "directory", "portable-bundle"] },
21
+ "displayPath": { "type": "string", "minLength": 1 },
22
+ "pathRedacted": { "type": "boolean", "const": true },
23
+ "relativePath": { "type": "string", "minLength": 1 }
24
+ }
25
+ },
26
+ "target": {
27
+ "type": "object",
28
+ "additionalProperties": true,
29
+ "required": ["prefix", "launcher"],
30
+ "properties": {
31
+ "prefix": { "$ref": "#/$defs/publicPathRef" },
32
+ "launcher": { "$ref": "#/$defs/publicPathRef" }
33
+ }
34
+ },
35
+ "execution": {
36
+ "type": "object",
37
+ "additionalProperties": true,
38
+ "required": ["executeEnabled"],
39
+ "properties": {
40
+ "executeEnabled": { "type": "boolean" },
41
+ "disabledIssueCode": { "type": "string", "minLength": 1 }
42
+ }
43
+ },
44
+ "node": {
45
+ "type": "object",
46
+ "additionalProperties": true,
47
+ "properties": {
48
+ "requiredMajor": { "type": "integer" },
49
+ "detected": { "type": ["string", "null"] },
50
+ "windowsShimRejected": { "type": "boolean" }
51
+ }
52
+ },
53
+ "actions": {
54
+ "type": "array",
55
+ "items": {
56
+ "type": "object",
57
+ "additionalProperties": true,
58
+ "required": ["kind", "description", "wouldWrite"],
59
+ "properties": {
60
+ "kind": { "type": "string", "minLength": 1 },
61
+ "description": { "type": "string", "minLength": 1 },
62
+ "wouldWrite": { "type": "boolean" }
63
+ }
64
+ }
65
+ },
66
+ "issues": {
67
+ "type": "array",
68
+ "items": {
69
+ "type": "object",
70
+ "additionalProperties": true,
71
+ "required": ["severity", "code", "message"],
72
+ "properties": {
73
+ "severity": { "type": "string", "enum": ["warning", "error"] },
74
+ "code": { "type": "string", "minLength": 1 },
75
+ "message": { "type": "string", "minLength": 1 }
76
+ }
77
+ }
78
+ }
79
+ },
80
+ "$defs": {
81
+ "publicPathRef": {
82
+ "type": "object",
83
+ "additionalProperties": false,
84
+ "required": ["displayPath", "pathRedacted"],
85
+ "properties": {
86
+ "displayPath": { "type": "string", "minLength": 1 },
87
+ "pathRedacted": { "type": "boolean", "const": true },
88
+ "relativePath": { "type": "string", "minLength": 1 },
89
+ "kind": { "type": "string", "enum": ["default", "portable", "relative"] }
90
+ }
91
+ }
92
+ }
93
+ }
@@ -0,0 +1,130 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "hadara.packageSmoke.v1",
4
+ "x-hadara-schema-id": "hadara.packageSmoke.v1",
5
+ "title": "HADARA Package Smoke Report",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": [
9
+ "schemaVersion",
10
+ "command",
11
+ "ok",
12
+ "mode",
13
+ "readOnly",
14
+ "execution",
15
+ "workspace",
16
+ "source",
17
+ "steps",
18
+ "artifacts",
19
+ "privacy",
20
+ "issues"
21
+ ],
22
+ "properties": {
23
+ "schemaVersion": { "const": "hadara.packageSmoke.v1" },
24
+ "command": { "const": "package.smoke" },
25
+ "ok": { "type": "boolean" },
26
+ "mode": { "type": "string", "enum": ["dry-run", "local"] },
27
+ "readOnly": { "type": "boolean" },
28
+ "execution": {
29
+ "type": "object",
30
+ "additionalProperties": true,
31
+ "required": ["npmPackExecuted", "packageInstallExecuted", "featureSmokeExecuted", "releaseMutationExecuted", "publishExecuted"],
32
+ "properties": {
33
+ "npmPackExecuted": { "type": "boolean" },
34
+ "packageInstallExecuted": { "type": "boolean" },
35
+ "featureSmokeExecuted": { "type": "boolean" },
36
+ "releaseMutationExecuted": { "const": false },
37
+ "publishExecuted": { "const": false }
38
+ }
39
+ },
40
+ "workspace": {
41
+ "type": "object",
42
+ "additionalProperties": true,
43
+ "required": ["kind", "pathRedacted"],
44
+ "properties": {
45
+ "kind": { "type": "string", "enum": ["disposable", "project-source"] },
46
+ "displayPath": { "type": "string", "minLength": 1 },
47
+ "relativePath": { "type": "string", "minLength": 1 },
48
+ "pathRedacted": { "const": true },
49
+ "retention": { "type": "string", "enum": ["deleted", "kept-temporary", "private-local"] }
50
+ }
51
+ },
52
+ "source": {
53
+ "type": "object",
54
+ "additionalProperties": true,
55
+ "required": ["kind", "pathRedacted"],
56
+ "properties": {
57
+ "kind": { "type": "string", "enum": ["source-checkout", "tarball", "release-artifact"] },
58
+ "displayPath": { "type": "string", "minLength": 1 },
59
+ "relativePath": { "type": "string", "minLength": 1 },
60
+ "pathRedacted": { "const": true }
61
+ }
62
+ },
63
+ "steps": {
64
+ "type": "array",
65
+ "items": { "$ref": "#/$defs/step" }
66
+ },
67
+ "artifacts": {
68
+ "type": "array",
69
+ "items": { "$ref": "#/$defs/artifact" }
70
+ },
71
+ "privacy": {
72
+ "type": "object",
73
+ "additionalProperties": true,
74
+ "required": ["rawLogsIncluded", "rawPackageContentsIncluded", "privatePathsIncluded", "environmentSecretsIncluded", "privateStorePathsIncluded"],
75
+ "properties": {
76
+ "rawLogsIncluded": { "const": false },
77
+ "rawPackageContentsIncluded": { "const": false },
78
+ "privatePathsIncluded": { "const": false },
79
+ "environmentSecretsIncluded": { "const": false },
80
+ "privateStorePathsIncluded": { "const": false }
81
+ }
82
+ },
83
+ "issues": {
84
+ "type": "array",
85
+ "items": { "$ref": "#/$defs/issue" }
86
+ }
87
+ },
88
+ "$defs": {
89
+ "step": {
90
+ "type": "object",
91
+ "additionalProperties": true,
92
+ "required": ["id", "label", "status"],
93
+ "properties": {
94
+ "id": { "type": "string", "minLength": 1 },
95
+ "label": { "type": "string", "minLength": 1 },
96
+ "status": { "type": "string", "enum": ["planned", "passed", "failed", "skipped"] },
97
+ "command": { "type": "string", "minLength": 1 },
98
+ "exitCode": { "type": ["integer", "null"] },
99
+ "elapsedMs": { "type": "integer" },
100
+ "summary": { "type": "string", "minLength": 1 }
101
+ }
102
+ },
103
+ "artifact": {
104
+ "type": "object",
105
+ "additionalProperties": true,
106
+ "required": ["kind", "visibility"],
107
+ "properties": {
108
+ "kind": { "type": "string", "enum": ["summary", "command-log", "package-artifact", "install-tree"] },
109
+ "visibility": { "type": "string", "enum": ["public", "private", "temporary"] },
110
+ "evidencePath": { "type": "string", "pattern": "^tasks/T-[0-9]{4}-.+/artifacts/package-smoke/.+" },
111
+ "relativePath": { "type": "string", "minLength": 1 },
112
+ "pathRedacted": { "const": true },
113
+ "rawContentIncluded": { "const": false },
114
+ "byteLength": { "type": "integer" },
115
+ "hash": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
116
+ }
117
+ },
118
+ "issue": {
119
+ "type": "object",
120
+ "additionalProperties": true,
121
+ "required": ["severity", "code", "message"],
122
+ "properties": {
123
+ "severity": { "type": "string", "enum": ["warning", "error"] },
124
+ "code": { "type": "string", "minLength": 1 },
125
+ "message": { "type": "string", "minLength": 1 },
126
+ "stepId": { "type": "string", "minLength": 1 }
127
+ }
128
+ }
129
+ }
130
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "hadara.privateEvidence.v1",
4
+ "x-hadara-schema-id": "hadara.privateEvidence.v1",
5
+ "title": "HADARA Private Evidence Manifest Record",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": ["schemaVersion", "taskId", "evidenceId", "kind", "summary", "result", "storage", "createdAt", "retention", "encryption"],
9
+ "properties": {
10
+ "schemaVersion": { "const": "hadara.privateEvidence.v1" },
11
+ "taskId": { "type": "string", "pattern": "^T-[0-9]{4}$" },
12
+ "evidenceId": { "type": "string", "minLength": 1 },
13
+ "kind": { "type": "string", "enum": ["test-log", "command-log", "diff-summary", "screenshot", "note"] },
14
+ "summary": { "type": "string" },
15
+ "result": { "type": "string", "enum": ["passed", "failed", "blocked", "unknown"] },
16
+ "storage": {
17
+ "type": "object",
18
+ "additionalProperties": true,
19
+ "required": ["kind", "relativePath", "encrypted", "hash", "byteLength"],
20
+ "properties": {
21
+ "kind": { "const": "portable-store" },
22
+ "relativePath": { "type": "string", "pattern": "^data/private-evidence/" },
23
+ "encrypted": { "const": false },
24
+ "hash": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
25
+ "byteLength": { "type": "integer" }
26
+ }
27
+ },
28
+ "createdAt": { "type": "string", "minLength": 1 },
29
+ "retention": {
30
+ "type": "object",
31
+ "additionalProperties": true,
32
+ "required": ["policy", "includeInContextExport"],
33
+ "properties": {
34
+ "policy": { "const": "local-only" },
35
+ "includeInContextExport": { "const": false }
36
+ }
37
+ },
38
+ "encryption": {
39
+ "type": "object",
40
+ "additionalProperties": true,
41
+ "required": ["status", "reason"],
42
+ "properties": {
43
+ "status": { "const": "deferred" },
44
+ "reason": { "type": "string", "minLength": 1 }
45
+ }
46
+ }
47
+ }
48
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "hadara.provider.call.v1",
4
+ "x-hadara-schema-id": "hadara.provider.call.v1",
5
+ "type": "object",
6
+ "required": ["schemaVersion", "provider", "ok", "input", "issues"],
7
+ "properties": {
8
+ "schemaVersion": { "const": "hadara.provider.call.v1" },
9
+ "provider": { "type": "string", "minLength": 1, "pattern": "^[A-Za-z0-9_.:-]+$" },
10
+ "model": { "type": "string", "minLength": 1 },
11
+ "ok": { "type": "boolean" },
12
+ "input": {
13
+ "type": "object",
14
+ "required": ["messages", "approxTokens"],
15
+ "properties": {
16
+ "messages": { "type": "integer" },
17
+ "approxTokens": { "type": "integer" }
18
+ }
19
+ },
20
+ "output": {
21
+ "type": "object",
22
+ "required": ["finishReason", "approxTokens"],
23
+ "properties": {
24
+ "finishReason": { "type": "string", "enum": ["stop", "length", "tool_call", "error"] },
25
+ "approxTokens": { "type": "integer" }
26
+ }
27
+ },
28
+ "issues": {
29
+ "type": "array",
30
+ "items": {
31
+ "type": "object",
32
+ "required": ["severity", "code", "message"],
33
+ "properties": {
34
+ "severity": { "type": "string", "enum": ["warning", "error"] },
35
+ "code": { "type": "string", "minLength": 1, "pattern": "^[A-Z0-9_:-]+$" },
36
+ "message": { "type": "string", "minLength": 1 },
37
+ "retriable": { "type": "boolean" }
38
+ }
39
+ }
40
+ }
41
+ }
42
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "hadara.provider.config.v1",
4
+ "x-hadara-schema-id": "hadara.provider.config.v1",
5
+ "type": "object",
6
+ "required": ["schemaVersion", "providers", "defaultProvider"],
7
+ "properties": {
8
+ "schemaVersion": { "const": "hadara.provider.config.v1" },
9
+ "providers": {
10
+ "type": "array",
11
+ "items": {
12
+ "type": "object",
13
+ "required": ["id", "kind", "enabled", "model", "capabilities", "localOnly", "costProfile"],
14
+ "properties": {
15
+ "id": { "type": "string", "minLength": 1, "pattern": "^[A-Za-z0-9_.:-]+$" },
16
+ "kind": { "type": "string", "enum": ["openai-compatible", "ollama", "llama-cpp"] },
17
+ "enabled": { "type": "boolean" },
18
+ "baseUrlEnv": { "type": "string", "minLength": 1, "pattern": "^[A-Z_][A-Z0-9_]*$" },
19
+ "apiKeyEnv": { "type": "string", "minLength": 1, "pattern": "^[A-Z_][A-Z0-9_]*$" },
20
+ "model": { "type": "string", "minLength": 1 },
21
+ "capabilities": {
22
+ "type": "object",
23
+ "required": ["streaming", "toolCalling", "reasoning", "vision"],
24
+ "properties": {
25
+ "streaming": { "type": "boolean" },
26
+ "toolCalling": { "type": "boolean" },
27
+ "reasoning": { "type": "boolean" },
28
+ "vision": { "type": "boolean" }
29
+ }
30
+ },
31
+ "localOnly": { "type": "boolean" },
32
+ "costProfile": { "type": "string", "enum": ["free", "low", "medium", "high", "unknown"] }
33
+ }
34
+ }
35
+ },
36
+ "defaultProvider": {
37
+ "oneOf": [
38
+ { "type": "string", "minLength": 1, "pattern": "^[A-Za-z0-9_.:-]+$" },
39
+ { "type": "null" }
40
+ ]
41
+ }
42
+ }
43
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "hadara.releaseArtifact.manifest.v1",
4
+ "x-hadara-schema-id": "hadara.releaseArtifact.manifest.v1",
5
+ "title": "HADARA Release Artifact Manifest",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": [
9
+ "schemaVersion",
10
+ "package",
11
+ "tarball",
12
+ "files",
13
+ "releaseMutationExecuted",
14
+ "publishExecuted",
15
+ "githubReleaseCreated"
16
+ ],
17
+ "properties": {
18
+ "schemaVersion": { "const": "hadara.releaseArtifact.manifest.v1" },
19
+ "package": {
20
+ "type": "object",
21
+ "additionalProperties": true,
22
+ "required": ["name", "version", "private"],
23
+ "properties": {
24
+ "name": { "type": "string", "minLength": 1 },
25
+ "version": { "type": "string", "minLength": 1 },
26
+ "private": { "type": "boolean" },
27
+ "license": { "type": "string", "minLength": 1 }
28
+ }
29
+ },
30
+ "tarball": {
31
+ "type": "object",
32
+ "additionalProperties": true,
33
+ "required": ["fileName", "hash"],
34
+ "properties": {
35
+ "fileName": { "type": "string", "minLength": 1 },
36
+ "hash": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
37
+ }
38
+ },
39
+ "files": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "object",
43
+ "additionalProperties": true,
44
+ "required": ["path"],
45
+ "properties": {
46
+ "path": { "type": "string", "minLength": 1 },
47
+ "byteLength": { "type": "integer" }
48
+ }
49
+ }
50
+ },
51
+ "releaseMutationExecuted": { "const": false },
52
+ "publishExecuted": { "const": false },
53
+ "githubReleaseCreated": { "const": false }
54
+ }
55
+ }