@cairnkeep/cli 2.3.0 → 2.4.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.
- package/CHANGELOG.md +78 -0
- package/README.md +221 -6
- package/bin/cairn +43 -2
- package/claude/capability-contract/hooks/capability-command-finish.sh +81 -0
- package/claude/capability-contract/hooks/capability-command-start.sh +76 -0
- package/claude/hooks/compaction-capture.sh +34 -0
- package/claude/hooks/memory-capture.sh +47 -5
- package/claude/hooks/memory-wakeup.sh +55 -2
- package/docs/building-an-overlay.md +1 -1
- package/docs/design/meta-agent.md +439 -0
- package/docs/learning/lessons/L00-why-cairnkeep.md +1 -1
- package/docs/learning/lessons/L01-safe-trial.md +3 -3
- package/docs/learning/lessons/L02-installation.md +2 -2
- package/docs/learning/lessons/L03-first-project.md +1 -1
- package/docs/operating.md +531 -4
- package/docs/privacy-and-data-flow.md +417 -0
- package/docs/storage.md +252 -0
- package/examples/eval/README.md +42 -0
- package/examples/eval/adapter.json +12 -0
- package/examples/eval/bundled-fake.json +1 -0
- package/examples/eval/task-set.json +1 -0
- package/mcp-memory-server/dist/artifact-cli.js +184 -0
- package/mcp-memory-server/dist/artifact-schema.js +218 -0
- package/mcp-memory-server/dist/artifact-store.js +812 -0
- package/mcp-memory-server/dist/capability-adapter.js +286 -0
- package/mcp-memory-server/dist/capability-cli.js +361 -0
- package/mcp-memory-server/dist/capability-config.js +310 -0
- package/mcp-memory-server/dist/capability-harness.js +496 -0
- package/mcp-memory-server/dist/capability-registry.js +123 -0
- package/mcp-memory-server/dist/capability-schema.js +65 -0
- package/mcp-memory-server/dist/capability-store.js +431 -0
- package/mcp-memory-server/dist/compaction-normalize.js +267 -0
- package/mcp-memory-server/dist/eval-cli.js +523 -0
- package/mcp-memory-server/dist/eval-plan.js +346 -0
- package/mcp-memory-server/dist/eval-process.js +273 -0
- package/mcp-memory-server/dist/eval-report.js +609 -0
- package/mcp-memory-server/dist/eval-runner.js +827 -0
- package/mcp-memory-server/dist/eval-schema.js +368 -0
- package/mcp-memory-server/dist/eval-statistics.js +161 -0
- package/mcp-memory-server/dist/eval-workspace.js +313 -0
- package/mcp-memory-server/dist/failure-signature.js +141 -0
- package/mcp-memory-server/dist/index.js +600 -55
- package/mcp-memory-server/dist/node-cli.js +84 -0
- package/mcp-memory-server/dist/node-schema.js +170 -0
- package/mcp-memory-server/dist/node-store.js +455 -0
- package/mcp-memory-server/dist/note-cli.js +235 -0
- package/mcp-memory-server/dist/note-distiller.js +177 -0
- package/mcp-memory-server/dist/note-enrichment.js +93 -0
- package/mcp-memory-server/dist/note-schema.js +4 -0
- package/mcp-memory-server/dist/note-store.js +985 -0
- package/mcp-memory-server/dist/trajectory-cli.js +141 -0
- package/mcp-memory-server/dist/trajectory-normalize.js +448 -0
- package/mcp-memory-server/dist/trajectory-redaction.js +155 -0
- package/mcp-memory-server/dist/trajectory-schema.js +73 -0
- package/mcp-memory-server/dist/trajectory-store.js +339 -0
- package/mcp-memory-server/package.json +24 -2
- package/mcp-memory-server/scripts/fixtures/compaction-claude-code-2.1.219.json +9 -0
- package/mcp-memory-server/scripts/fixtures/compaction-claude-code-2.1.220.json +9 -0
- package/mcp-memory-server/scripts/fixtures/compaction-opencode-1.17.20-event.json +6 -0
- package/mcp-memory-server/scripts/fixtures/compaction-opencode-1.17.20-messages.json +119 -0
- package/mcp-memory-server/scripts/fixtures/compaction-unknown-version.json +17 -0
- package/opencode/capability-contract/plugins/capability-command.ts +319 -0
- package/opencode/command/graphify.md +25 -14
- package/opencode/plugins/memory-capture.ts +76 -10
- package/opencode/plugins/memory-wakeup.ts +58 -6
- package/package.json +9 -4
- package/pi/extensions/cairnkeep-trajectory.ts +55 -0
- package/schemas/artifact.schema.json +133 -0
- package/schemas/capability-callback.schema.json +68 -0
- package/schemas/capability-contract.schema.json +126 -0
- package/schemas/eval-adapter.schema.json +43 -0
- package/schemas/eval-protocol.schema.json +114 -0
- package/schemas/eval-report.schema.json +423 -0
- package/schemas/eval-task-set.schema.json +114 -0
- package/schemas/memory-node.schema.json +90 -0
- package/schemas/note.schema.json +112 -0
- package/schemas/trajectory-redaction.schema.json +25 -0
- package/schemas/trajectory.schema.json +82 -0
- package/scripts/bootstrap.sh +4 -0
- package/scripts/completion.sh +119 -5
- package/scripts/doctor.sh +284 -0
- package/scripts/fake-eval-adapter.mjs +120 -0
- package/scripts/fixtures/capability-harness-contracts.json +408 -0
- package/scripts/install-audit-timer.sh +3 -1
- package/scripts/lib/capability-opencode-plugin-harness.mjs +291 -0
- package/scripts/lib/trajectory-opencode-plugin-harness.mjs +25 -0
- package/scripts/lib/trajectory-pi-extension-harness.mjs +42 -0
- package/scripts/memory-wiki-audit.sh +49 -0
- package/scripts/smoke-bash32.sh +9 -0
- package/scripts/sync-claude-assets.sh +99 -6
- package/scripts/sync-opencode-graphify-assets.sh +24 -3
- package/scripts/sync-opencode-plugin-assets.sh +31 -5
- package/scripts/sync-opencode-security-assets.sh +24 -3
- package/scripts/sync-opencode-wiki-assets.sh +24 -3
- package/scripts/sync-pi-assets.sh +72 -0
- package/scripts/test-audit-timer.sh +98 -0
- package/scripts/test-bootstrap-untracked.sh +48 -0
- package/scripts/test-cli-dispatch.sh +41 -2
- package/scripts/test-compaction-hooks.sh +495 -0
- package/scripts/test-completion.sh +77 -0
- package/scripts/test-doctor.sh +348 -1
- package/scripts/test-eval-cli.sh +175 -0
- package/scripts/test-launcher-hooks.sh +602 -3
- package/scripts/test-notes-cli.sh +114 -0
- package/scripts/test-package-install.sh +251 -0
- package/scripts/test-phase16-node-lifecycle.sh +50 -0
- package/scripts/test-phase17-artifact-lifecycle.sh +370 -0
- package/scripts/test-phase18-capability-lifecycle.sh +504 -0
- package/scripts/test-phase18-harness-boundary.sh +1060 -0
- package/scripts/test-phase19-eval-lifecycle.sh +1015 -0
- package/scripts/test-trajectory-cli.sh +87 -0
- package/scripts/test-trajectory-hooks.sh +142 -0
- package/scripts/test-uninstall.sh +231 -5
- package/scripts/uninstall.sh +37 -5
- package/scripts/verify-dependency-security.mjs +121 -0
- package/scripts/verify-docs-parity.sh +527 -1
- package/scripts/verify-phase18-runtime-evidence.mjs +895 -0
- package/scripts/verify-phase19-runtime-evidence.mjs +947 -0
- package/templates/capabilities.json.template +7 -0
- package/templates/env.example.template +51 -0
- package/templates/memory-wiki-audit.service.template +1 -1
- package/templates/start-claude.sh.template +36 -0
- package/templates/start-opencode.sh.template +47 -5
- package/templates/start-pi.sh.template +30 -0
- package/templates/trajectory-redaction.json.template +4 -0
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/cairnkeep/cairnkeep/main/schemas/eval-report.schema.json",
|
|
4
|
+
"title": "Cairnkeep evaluation report v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schema_version", "experiment_id", "status", "experiment_kind", "task_set_digest", "adapter_config_digest", "source_revision", "schedule_digest", "created_at", "updated_at", "runtime", "schedule", "observations", "aggregates", "missingness", "warnings", "evidence"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema_version": { "const": 1 },
|
|
10
|
+
"experiment_id": { "$ref": "#/$defs/identifier" },
|
|
11
|
+
"status": { "enum": ["partial", "final"] },
|
|
12
|
+
"experiment_kind": { "enum": ["two_pass", "ablation"] },
|
|
13
|
+
"task_set_digest": { "$ref": "#/$defs/digest" },
|
|
14
|
+
"adapter_config_digest": { "$ref": "#/$defs/digest" },
|
|
15
|
+
"source_revision": { "$ref": "#/$defs/commit" },
|
|
16
|
+
"schedule_digest": { "$ref": "#/$defs/digest" },
|
|
17
|
+
"created_at": { "$ref": "#/$defs/timestamp" },
|
|
18
|
+
"updated_at": { "$ref": "#/$defs/timestamp" },
|
|
19
|
+
"runtime": { "$ref": "#/$defs/runtime" },
|
|
20
|
+
"schedule": { "type": "array", "maxItems": 1000000, "items": { "$ref": "#/$defs/scheduleRow" } },
|
|
21
|
+
"observations": { "type": "array", "maxItems": 1000000, "items": { "$ref": "#/$defs/observation" } },
|
|
22
|
+
"aggregates": { "type": "array", "maxItems": 10000, "items": { "$ref": "#/$defs/aggregate" } },
|
|
23
|
+
"missingness": { "$ref": "#/$defs/reportMissingness" },
|
|
24
|
+
"warnings": { "type": "array", "maxItems": 256, "items": { "$ref": "#/$defs/code" } },
|
|
25
|
+
"evidence": { "$ref": "#/$defs/evidence" }
|
|
26
|
+
},
|
|
27
|
+
"$defs": {
|
|
28
|
+
"identifier": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$" },
|
|
29
|
+
"reference": { "type": "string", "minLength": 1, "maxLength": 1024, "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/-]*$" },
|
|
30
|
+
"relativePath": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"minLength": 1,
|
|
33
|
+
"maxLength": 1024,
|
|
34
|
+
"pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*\\\\)(?!.*//)(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"
|
|
35
|
+
},
|
|
36
|
+
"code": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[a-z0-9][a-z0-9._-]*$" },
|
|
37
|
+
"digest": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
38
|
+
"commit": { "type": "string", "pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$" },
|
|
39
|
+
"timestamp": { "type": "string", "format": "date-time" },
|
|
40
|
+
"nonnegativeInteger": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
|
|
41
|
+
"nullableNumber": { "type": ["number", "null"] },
|
|
42
|
+
"capabilityId": {
|
|
43
|
+
"enum": ["memory.write", "memory.search", "notes.distill", "wiki", "graph", "security.audit", "route.check", "context.explore"]
|
|
44
|
+
},
|
|
45
|
+
"capabilityState": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"required": ["id", "enabled"],
|
|
49
|
+
"properties": {
|
|
50
|
+
"id": { "$ref": "#/$defs/capabilityId" },
|
|
51
|
+
"enabled": { "type": "boolean" }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"capabilityStates": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"minItems": 8,
|
|
57
|
+
"maxItems": 8,
|
|
58
|
+
"items": { "$ref": "#/$defs/capabilityState" }
|
|
59
|
+
},
|
|
60
|
+
"limits": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"additionalProperties": false,
|
|
63
|
+
"required": ["elapsed_ms", "stdout_bytes"],
|
|
64
|
+
"properties": {
|
|
65
|
+
"elapsed_ms": { "type": "integer", "minimum": 1, "maximum": 86400000 },
|
|
66
|
+
"stdout_bytes": { "type": "integer", "minimum": 1, "maximum": 16777216 }
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"usage": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"properties": {
|
|
73
|
+
"input_tokens": { "$ref": "#/$defs/nonnegativeInteger" },
|
|
74
|
+
"output_tokens": { "$ref": "#/$defs/nonnegativeInteger" },
|
|
75
|
+
"reasoning_tokens": { "$ref": "#/$defs/nonnegativeInteger" },
|
|
76
|
+
"cache_read_tokens": { "$ref": "#/$defs/nonnegativeInteger" },
|
|
77
|
+
"cache_write_tokens": { "$ref": "#/$defs/nonnegativeInteger" },
|
|
78
|
+
"total_tokens": { "$ref": "#/$defs/nonnegativeInteger" }
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"component": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"required": ["id"],
|
|
85
|
+
"properties": {
|
|
86
|
+
"id": { "$ref": "#/$defs/identifier" },
|
|
87
|
+
"version": { "type": "string", "minLength": 1, "maxLength": 128 }
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"adapterResult": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"additionalProperties": false,
|
|
93
|
+
"required": ["schema_version", "status"],
|
|
94
|
+
"properties": {
|
|
95
|
+
"schema_version": { "const": 1 },
|
|
96
|
+
"status": { "enum": ["completed", "adapter_error"] },
|
|
97
|
+
"error_code": { "$ref": "#/$defs/code" },
|
|
98
|
+
"turns": {
|
|
99
|
+
"type": "object",
|
|
100
|
+
"additionalProperties": false,
|
|
101
|
+
"required": ["value", "semantics"],
|
|
102
|
+
"properties": {
|
|
103
|
+
"value": { "$ref": "#/$defs/nonnegativeInteger" },
|
|
104
|
+
"semantics": { "$ref": "#/$defs/identifier" }
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"usage": { "$ref": "#/$defs/usage" },
|
|
108
|
+
"cost": {
|
|
109
|
+
"type": "object",
|
|
110
|
+
"additionalProperties": false,
|
|
111
|
+
"required": ["amount", "currency"],
|
|
112
|
+
"properties": {
|
|
113
|
+
"amount": { "type": "number", "minimum": 0 },
|
|
114
|
+
"currency": { "type": "string", "pattern": "^[A-Z]{3}$" }
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"harness": { "$ref": "#/$defs/component" },
|
|
118
|
+
"adapter": { "$ref": "#/$defs/component" },
|
|
119
|
+
"model": {
|
|
120
|
+
"type": "object",
|
|
121
|
+
"additionalProperties": false,
|
|
122
|
+
"required": ["id"],
|
|
123
|
+
"properties": {
|
|
124
|
+
"id": { "$ref": "#/$defs/identifier" },
|
|
125
|
+
"config_id": { "$ref": "#/$defs/identifier" }
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"observed_capability_digest": { "$ref": "#/$defs/digest" },
|
|
129
|
+
"trajectory_ref": { "$ref": "#/$defs/reference" },
|
|
130
|
+
"artifact_refs": { "type": "array", "maxItems": 10000, "items": { "$ref": "#/$defs/reference" } }
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"process": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"additionalProperties": false,
|
|
136
|
+
"required": ["exit_code", "signal", "error_code", "cleanup"],
|
|
137
|
+
"properties": {
|
|
138
|
+
"exit_code": { "type": ["integer", "null"] },
|
|
139
|
+
"signal": { "enum": ["SIGTERM", "SIGKILL", "SIGINT", "SIGHUP", null] },
|
|
140
|
+
"error_code": { "oneOf": [{ "$ref": "#/$defs/code" }, { "type": "null" }] },
|
|
141
|
+
"cleanup": { "enum": ["pending", "closed", "terminated", "killed", "failed"] }
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"verifier": {
|
|
145
|
+
"type": "object",
|
|
146
|
+
"additionalProperties": false,
|
|
147
|
+
"required": ["state", "reason"],
|
|
148
|
+
"properties": {
|
|
149
|
+
"state": { "enum": ["pending", "not_run", "completed", "error"] },
|
|
150
|
+
"reason": { "oneOf": [{ "$ref": "#/$defs/code" }, { "type": "null" }] }
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"noteSnapshotEntry": {
|
|
154
|
+
"type": "object",
|
|
155
|
+
"additionalProperties": false,
|
|
156
|
+
"required": ["path", "digest", "bytes"],
|
|
157
|
+
"properties": {
|
|
158
|
+
"path": { "$ref": "#/$defs/relativePath" },
|
|
159
|
+
"digest": { "$ref": "#/$defs/digest" },
|
|
160
|
+
"bytes": { "$ref": "#/$defs/nonnegativeInteger" }
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"notes": {
|
|
164
|
+
"type": "object",
|
|
165
|
+
"additionalProperties": false,
|
|
166
|
+
"required": ["distiller_id", "distiller_config_digest", "trajectory_ref", "distillation_outcome", "eligibility_reason", "note_snapshot_digest", "note_snapshot_manifest", "notes_exposed"],
|
|
167
|
+
"properties": {
|
|
168
|
+
"distiller_id": { "oneOf": [{ "$ref": "#/$defs/identifier" }, { "type": "null" }] },
|
|
169
|
+
"distiller_config_digest": { "oneOf": [{ "$ref": "#/$defs/digest" }, { "type": "null" }] },
|
|
170
|
+
"trajectory_ref": { "oneOf": [{ "$ref": "#/$defs/reference" }, { "type": "null" }] },
|
|
171
|
+
"distillation_outcome": { "enum": ["not_applicable", "success", "no_notes", "failed", "skipped"] },
|
|
172
|
+
"eligibility_reason": { "$ref": "#/$defs/code" },
|
|
173
|
+
"note_snapshot_digest": { "oneOf": [{ "$ref": "#/$defs/digest" }, { "type": "null" }] },
|
|
174
|
+
"note_snapshot_manifest": { "type": "array", "maxItems": 10000, "items": { "$ref": "#/$defs/noteSnapshotEntry" } },
|
|
175
|
+
"notes_exposed": { "type": "boolean" }
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"observation": {
|
|
179
|
+
"type": "object",
|
|
180
|
+
"additionalProperties": false,
|
|
181
|
+
"required": ["schema_version", "observation_id", "task_id", "schedule_index", "arm", "disabled_capability", "arm_order", "repetition", "pass", "seed", "state", "terminal_state", "process", "verifier", "pass_state", "expected_capabilities", "observed_capabilities", "expected_capability_digest", "observed_capability_digest", "capability_status", "capability_digest_match", "four_cell_id", "notes", "result", "missing_reasons"],
|
|
182
|
+
"properties": {
|
|
183
|
+
"schema_version": { "const": 1 },
|
|
184
|
+
"observation_id": { "$ref": "#/$defs/identifier" },
|
|
185
|
+
"task_id": { "$ref": "#/$defs/identifier" },
|
|
186
|
+
"schedule_index": { "$ref": "#/$defs/nonnegativeInteger" },
|
|
187
|
+
"arm": { "enum": ["baseline", "treatment"] },
|
|
188
|
+
"disabled_capability": { "oneOf": [{ "$ref": "#/$defs/capabilityId" }, { "type": "null" }] },
|
|
189
|
+
"arm_order": { "$ref": "#/$defs/nonnegativeInteger" },
|
|
190
|
+
"repetition": { "$ref": "#/$defs/nonnegativeInteger" },
|
|
191
|
+
"pass": { "enum": ["run1", "run2"] },
|
|
192
|
+
"seed": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
193
|
+
"state": { "enum": ["pending", "terminal"] },
|
|
194
|
+
"terminal_state": { "enum": ["completed", "verifier_failed", "timeout", "cancelled", "adapter_error", "invalid_result", null] },
|
|
195
|
+
"process": { "$ref": "#/$defs/process" },
|
|
196
|
+
"verifier": { "$ref": "#/$defs/verifier" },
|
|
197
|
+
"pass_state": { "enum": ["passed", "failed", "unknown"] },
|
|
198
|
+
"expected_capabilities": { "$ref": "#/$defs/capabilityStates" },
|
|
199
|
+
"observed_capabilities": { "$ref": "#/$defs/capabilityStates" },
|
|
200
|
+
"expected_capability_digest": { "$ref": "#/$defs/digest" },
|
|
201
|
+
"observed_capability_digest": { "oneOf": [{ "$ref": "#/$defs/digest" }, { "type": "null" }] },
|
|
202
|
+
"capability_status": { "enum": ["pending", "valid", "mismatch", "unavailable"] },
|
|
203
|
+
"capability_digest_match": { "type": ["boolean", "null"] },
|
|
204
|
+
"four_cell_id": { "$ref": "#/$defs/identifier" },
|
|
205
|
+
"notes": { "$ref": "#/$defs/notes" },
|
|
206
|
+
"result": { "oneOf": [{ "$ref": "#/$defs/adapterResult" }, { "type": "null" }] },
|
|
207
|
+
"missing_reasons": { "type": "array", "maxItems": 256, "items": { "$ref": "#/$defs/code" } }
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"scheduleRow": {
|
|
211
|
+
"type": "object",
|
|
212
|
+
"additionalProperties": false,
|
|
213
|
+
"required": ["observation_id", "task_id", "arm", "repetition", "pass", "seed"],
|
|
214
|
+
"properties": {
|
|
215
|
+
"observation_id": { "$ref": "#/$defs/identifier" },
|
|
216
|
+
"task_id": { "$ref": "#/$defs/identifier" },
|
|
217
|
+
"arm": { "enum": ["baseline", "treatment"] },
|
|
218
|
+
"repetition": { "$ref": "#/$defs/nonnegativeInteger" },
|
|
219
|
+
"pass": { "enum": ["run1", "run2"] },
|
|
220
|
+
"seed": { "type": "string", "minLength": 1, "maxLength": 256 }
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
"population": {
|
|
224
|
+
"type": "object",
|
|
225
|
+
"additionalProperties": false,
|
|
226
|
+
"required": ["full", "executed", "eligible", "paired", "note_eligible"],
|
|
227
|
+
"properties": {
|
|
228
|
+
"full": { "$ref": "#/$defs/nonnegativeInteger" },
|
|
229
|
+
"executed": { "$ref": "#/$defs/nonnegativeInteger" },
|
|
230
|
+
"eligible": { "$ref": "#/$defs/nonnegativeInteger" },
|
|
231
|
+
"paired": { "$ref": "#/$defs/nonnegativeInteger" },
|
|
232
|
+
"note_eligible": { "$ref": "#/$defs/nonnegativeInteger" }
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
"missing": {
|
|
236
|
+
"type": "object",
|
|
237
|
+
"additionalProperties": false,
|
|
238
|
+
"required": ["count", "reasons"],
|
|
239
|
+
"properties": {
|
|
240
|
+
"count": { "$ref": "#/$defs/nonnegativeInteger" },
|
|
241
|
+
"reasons": { "type": "array", "maxItems": 256, "items": { "$ref": "#/$defs/code" } }
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"conditionPopulation": {
|
|
245
|
+
"type": "object",
|
|
246
|
+
"additionalProperties": false,
|
|
247
|
+
"required": ["full", "executed", "eligible"],
|
|
248
|
+
"properties": {
|
|
249
|
+
"full": { "$ref": "#/$defs/nonnegativeInteger" },
|
|
250
|
+
"executed": { "$ref": "#/$defs/nonnegativeInteger" },
|
|
251
|
+
"eligible": { "$ref": "#/$defs/nonnegativeInteger" }
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"conditionLevel": {
|
|
255
|
+
"type": "object",
|
|
256
|
+
"additionalProperties": false,
|
|
257
|
+
"required": ["arm", "pass", "value", "valid_task_ids", "valid_task_count", "population", "missing"],
|
|
258
|
+
"properties": {
|
|
259
|
+
"arm": { "enum": ["baseline", "treatment"] },
|
|
260
|
+
"pass": { "enum": ["run1", "run2"] },
|
|
261
|
+
"value": { "$ref": "#/$defs/nullableNumber" },
|
|
262
|
+
"valid_task_ids": { "type": "array", "maxItems": 10000, "items": { "$ref": "#/$defs/identifier" } },
|
|
263
|
+
"valid_task_count": { "$ref": "#/$defs/nonnegativeInteger" },
|
|
264
|
+
"population": { "$ref": "#/$defs/conditionPopulation" },
|
|
265
|
+
"missing": { "$ref": "#/$defs/missing" }
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"baselineRun1Level": {
|
|
269
|
+
"allOf": [
|
|
270
|
+
{ "$ref": "#/$defs/conditionLevel" },
|
|
271
|
+
{ "type": "object", "properties": { "arm": { "const": "baseline" }, "pass": { "const": "run1" } } }
|
|
272
|
+
]
|
|
273
|
+
},
|
|
274
|
+
"baselineRun2Level": {
|
|
275
|
+
"allOf": [
|
|
276
|
+
{ "$ref": "#/$defs/conditionLevel" },
|
|
277
|
+
{ "type": "object", "properties": { "arm": { "const": "baseline" }, "pass": { "const": "run2" } } }
|
|
278
|
+
]
|
|
279
|
+
},
|
|
280
|
+
"treatmentRun1Level": {
|
|
281
|
+
"allOf": [
|
|
282
|
+
{ "$ref": "#/$defs/conditionLevel" },
|
|
283
|
+
{ "type": "object", "properties": { "arm": { "const": "treatment" }, "pass": { "const": "run1" } } }
|
|
284
|
+
]
|
|
285
|
+
},
|
|
286
|
+
"treatmentRun2Level": {
|
|
287
|
+
"allOf": [
|
|
288
|
+
{ "$ref": "#/$defs/conditionLevel" },
|
|
289
|
+
{ "type": "object", "properties": { "arm": { "const": "treatment" }, "pass": { "const": "run2" } } }
|
|
290
|
+
]
|
|
291
|
+
},
|
|
292
|
+
"baselineMemoryLevels": {
|
|
293
|
+
"type": "array", "minItems": 2, "maxItems": 2,
|
|
294
|
+
"prefixItems": [{ "$ref": "#/$defs/baselineRun1Level" }, { "$ref": "#/$defs/baselineRun2Level" }]
|
|
295
|
+
},
|
|
296
|
+
"treatmentMemoryLevels": {
|
|
297
|
+
"type": "array", "minItems": 2, "maxItems": 2,
|
|
298
|
+
"prefixItems": [{ "$ref": "#/$defs/treatmentRun1Level" }, { "$ref": "#/$defs/treatmentRun2Level" }]
|
|
299
|
+
},
|
|
300
|
+
"endpointLevels": {
|
|
301
|
+
"type": "array", "minItems": 2, "maxItems": 2,
|
|
302
|
+
"prefixItems": [{ "$ref": "#/$defs/baselineRun2Level" }, { "$ref": "#/$defs/treatmentRun2Level" }]
|
|
303
|
+
},
|
|
304
|
+
"differenceInDifferencesLevels": {
|
|
305
|
+
"type": "array", "minItems": 4, "maxItems": 4,
|
|
306
|
+
"prefixItems": [
|
|
307
|
+
{ "$ref": "#/$defs/baselineRun1Level" },
|
|
308
|
+
{ "$ref": "#/$defs/baselineRun2Level" },
|
|
309
|
+
{ "$ref": "#/$defs/treatmentRun1Level" },
|
|
310
|
+
{ "$ref": "#/$defs/treatmentRun2Level" }
|
|
311
|
+
]
|
|
312
|
+
},
|
|
313
|
+
"uncertainty": {
|
|
314
|
+
"type": "object",
|
|
315
|
+
"additionalProperties": false,
|
|
316
|
+
"required": ["algorithm", "version", "seed", "stream", "iterations", "confidence", "quantile", "interval", "null_reason"],
|
|
317
|
+
"properties": {
|
|
318
|
+
"algorithm": { "const": "paired-bootstrap" },
|
|
319
|
+
"version": { "const": 1 },
|
|
320
|
+
"seed": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
321
|
+
"stream": { "type": "string", "minLength": 1, "maxLength": 512 },
|
|
322
|
+
"iterations": { "type": "integer", "minimum": 1, "maximum": 1000000 },
|
|
323
|
+
"confidence": { "type": "number", "exclusiveMinimum": 0, "exclusiveMaximum": 1 },
|
|
324
|
+
"quantile": { "const": "percentile-nearest-rank-v1" },
|
|
325
|
+
"interval": {
|
|
326
|
+
"oneOf": [
|
|
327
|
+
{
|
|
328
|
+
"type": "object",
|
|
329
|
+
"additionalProperties": false,
|
|
330
|
+
"required": ["low", "high"],
|
|
331
|
+
"properties": { "low": { "type": "number" }, "high": { "type": "number" } }
|
|
332
|
+
},
|
|
333
|
+
{ "type": "null" }
|
|
334
|
+
]
|
|
335
|
+
},
|
|
336
|
+
"null_reason": { "oneOf": [{ "$ref": "#/$defs/code" }, { "type": "null" }] }
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
"aggregate": {
|
|
340
|
+
"type": "object",
|
|
341
|
+
"additionalProperties": false,
|
|
342
|
+
"required": ["comparison_id", "metric_id", "direction", "semantics", "currency", "estimate", "within_arm", "endpoint_delta", "difference_in_differences", "uncertainty", "warnings", "valid_task_ids", "valid_pair_count", "condition_levels", "population", "missing"],
|
|
343
|
+
"properties": {
|
|
344
|
+
"comparison_id": { "enum": ["memory-baseline", "memory-treatment", "endpoint-treatment-minus-baseline", "difference-in-differences"] },
|
|
345
|
+
"metric_id": { "$ref": "#/$defs/identifier" },
|
|
346
|
+
"direction": { "$ref": "#/$defs/identifier" },
|
|
347
|
+
"semantics": { "oneOf": [{ "$ref": "#/$defs/identifier" }, { "type": "null" }] },
|
|
348
|
+
"currency": { "type": ["string", "null"], "pattern": "^[A-Z]{3}$" },
|
|
349
|
+
"estimate": { "$ref": "#/$defs/nullableNumber" },
|
|
350
|
+
"within_arm": {
|
|
351
|
+
"type": "object",
|
|
352
|
+
"additionalProperties": false,
|
|
353
|
+
"required": ["baseline", "treatment"],
|
|
354
|
+
"properties": {
|
|
355
|
+
"baseline": { "$ref": "#/$defs/nullableNumber" },
|
|
356
|
+
"treatment": { "$ref": "#/$defs/nullableNumber" }
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
"endpoint_delta": { "$ref": "#/$defs/nullableNumber" },
|
|
360
|
+
"difference_in_differences": { "$ref": "#/$defs/nullableNumber" },
|
|
361
|
+
"uncertainty": { "$ref": "#/$defs/uncertainty" },
|
|
362
|
+
"warnings": { "type": "array", "maxItems": 256, "items": { "$ref": "#/$defs/code" } },
|
|
363
|
+
"valid_task_ids": { "type": "array", "maxItems": 10000, "items": { "$ref": "#/$defs/identifier" } },
|
|
364
|
+
"valid_pair_count": { "$ref": "#/$defs/nonnegativeInteger" },
|
|
365
|
+
"condition_levels": {
|
|
366
|
+
"oneOf": [
|
|
367
|
+
{ "$ref": "#/$defs/baselineMemoryLevels" },
|
|
368
|
+
{ "$ref": "#/$defs/treatmentMemoryLevels" },
|
|
369
|
+
{ "$ref": "#/$defs/endpointLevels" },
|
|
370
|
+
{ "$ref": "#/$defs/differenceInDifferencesLevels" }
|
|
371
|
+
]
|
|
372
|
+
},
|
|
373
|
+
"population": { "$ref": "#/$defs/population" },
|
|
374
|
+
"missing": { "$ref": "#/$defs/missing" }
|
|
375
|
+
},
|
|
376
|
+
"oneOf": [
|
|
377
|
+
{ "required": ["comparison_id", "condition_levels"], "properties": { "comparison_id": { "const": "memory-baseline" }, "condition_levels": { "$ref": "#/$defs/baselineMemoryLevels" } } },
|
|
378
|
+
{ "required": ["comparison_id", "condition_levels"], "properties": { "comparison_id": { "const": "memory-treatment" }, "condition_levels": { "$ref": "#/$defs/treatmentMemoryLevels" } } },
|
|
379
|
+
{ "required": ["comparison_id", "condition_levels"], "properties": { "comparison_id": { "const": "endpoint-treatment-minus-baseline" }, "condition_levels": { "$ref": "#/$defs/endpointLevels" } } },
|
|
380
|
+
{ "required": ["comparison_id", "condition_levels"], "properties": { "comparison_id": { "const": "difference-in-differences" }, "condition_levels": { "$ref": "#/$defs/differenceInDifferencesLevels" } } }
|
|
381
|
+
]
|
|
382
|
+
},
|
|
383
|
+
"reportMissingness": {
|
|
384
|
+
"type": "object",
|
|
385
|
+
"additionalProperties": false,
|
|
386
|
+
"required": ["digest", "count", "reasons"],
|
|
387
|
+
"properties": {
|
|
388
|
+
"digest": { "$ref": "#/$defs/digest" },
|
|
389
|
+
"count": { "$ref": "#/$defs/nonnegativeInteger" },
|
|
390
|
+
"reasons": { "type": "array", "maxItems": 256, "items": { "$ref": "#/$defs/code" } }
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
"runtime": {
|
|
394
|
+
"type": "object",
|
|
395
|
+
"additionalProperties": false,
|
|
396
|
+
"required": ["platform", "arch", "node", "cairnkeep"],
|
|
397
|
+
"properties": {
|
|
398
|
+
"platform": { "$ref": "#/$defs/identifier" },
|
|
399
|
+
"arch": { "$ref": "#/$defs/identifier" },
|
|
400
|
+
"node": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
401
|
+
"cairnkeep": { "type": "string", "minLength": 1, "maxLength": 128 }
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
"evidence": {
|
|
405
|
+
"type": "object",
|
|
406
|
+
"additionalProperties": false,
|
|
407
|
+
"required": ["schema_version", "evidence_scope", "source_commit", "package_version", "runtime_id", "task_set_digest", "report_digest", "schema_digests", "note_snapshot_digests", "missingness_digest", "claim_anchors"],
|
|
408
|
+
"properties": {
|
|
409
|
+
"schema_version": { "const": 1 },
|
|
410
|
+
"evidence_scope": { "enum": ["offline-framework", "live-evaluation"] },
|
|
411
|
+
"source_commit": { "$ref": "#/$defs/commit" },
|
|
412
|
+
"package_version": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
413
|
+
"runtime_id": { "$ref": "#/$defs/identifier" },
|
|
414
|
+
"task_set_digest": { "$ref": "#/$defs/digest" },
|
|
415
|
+
"report_digest": { "$ref": "#/$defs/digest" },
|
|
416
|
+
"schema_digests": { "type": "array", "minItems": 2, "maxItems": 2, "items": { "$ref": "#/$defs/digest" } },
|
|
417
|
+
"note_snapshot_digests": { "type": "array", "maxItems": 10000, "items": { "$ref": "#/$defs/digest" } },
|
|
418
|
+
"missingness_digest": { "$ref": "#/$defs/digest" },
|
|
419
|
+
"claim_anchors": { "type": "array", "maxItems": 256, "items": { "$ref": "#/$defs/reference" } }
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/cairnkeep/cairnkeep/main/schemas/eval-task-set.schema.json",
|
|
4
|
+
"title": "Cairnkeep evaluation task set v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schema_version", "id", "source", "tasks"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema_version": { "const": 1 },
|
|
10
|
+
"id": { "$ref": "#/$defs/identifier" },
|
|
11
|
+
"source": {
|
|
12
|
+
"oneOf": [
|
|
13
|
+
{ "$ref": "#/$defs/gitSource" },
|
|
14
|
+
{ "$ref": "#/$defs/bundledFakeSource" }
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"tasks": {
|
|
18
|
+
"type": "array",
|
|
19
|
+
"minItems": 1,
|
|
20
|
+
"maxItems": 10000,
|
|
21
|
+
"uniqueItems": true,
|
|
22
|
+
"items": { "$ref": "#/$defs/task" }
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"$defs": {
|
|
26
|
+
"identifier": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"minLength": 1,
|
|
29
|
+
"maxLength": 128,
|
|
30
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
|
|
31
|
+
},
|
|
32
|
+
"relativePath": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"minLength": 1,
|
|
35
|
+
"maxLength": 1024,
|
|
36
|
+
"pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*\\\\)(?!.*//)(?!.*[\\u0000-\\u001f\\u007f])(?!.*\\/$).+$"
|
|
37
|
+
},
|
|
38
|
+
"command": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"required": ["program", "args"],
|
|
42
|
+
"properties": {
|
|
43
|
+
"program": { "type": "string", "minLength": 1, "maxLength": 4096, "pattern": "^[^\\u0000\\r\\n]+$" },
|
|
44
|
+
"args": {
|
|
45
|
+
"type": "array",
|
|
46
|
+
"maxItems": 256,
|
|
47
|
+
"items": { "type": "string", "maxLength": 16384, "pattern": "^[^\\u0000]*$" }
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"limits": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"additionalProperties": false,
|
|
54
|
+
"required": ["elapsed_ms", "stdout_bytes"],
|
|
55
|
+
"properties": {
|
|
56
|
+
"elapsed_ms": { "type": "integer", "minimum": 1, "maximum": 86400000 },
|
|
57
|
+
"stdout_bytes": { "type": "integer", "minimum": 1, "maximum": 16777216 }
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"gitSource": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"additionalProperties": false,
|
|
63
|
+
"required": ["kind", "repository", "revision"],
|
|
64
|
+
"properties": {
|
|
65
|
+
"kind": { "const": "git" },
|
|
66
|
+
"repository": { "$ref": "#/$defs/relativePath" },
|
|
67
|
+
"revision": { "type": "string", "pattern": "^(?:[a-f0-9]{40}|[a-f0-9]{64})$" }
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"bundledFile": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"additionalProperties": false,
|
|
73
|
+
"required": ["path", "content"],
|
|
74
|
+
"properties": {
|
|
75
|
+
"path": { "$ref": "#/$defs/relativePath" },
|
|
76
|
+
"content": { "type": "string", "maxLength": 262144 }
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"bundledFakeSource": {
|
|
80
|
+
"type": "object",
|
|
81
|
+
"additionalProperties": false,
|
|
82
|
+
"required": ["kind", "identifier", "files"],
|
|
83
|
+
"properties": {
|
|
84
|
+
"kind": { "const": "bundled_fake" },
|
|
85
|
+
"identifier": { "const": "cairn-offline-fake-v1" },
|
|
86
|
+
"files": {
|
|
87
|
+
"type": "array",
|
|
88
|
+
"minItems": 1,
|
|
89
|
+
"maxItems": 1024,
|
|
90
|
+
"uniqueItems": true,
|
|
91
|
+
"items": { "$ref": "#/$defs/bundledFile" }
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"task": {
|
|
96
|
+
"type": "object",
|
|
97
|
+
"additionalProperties": false,
|
|
98
|
+
"required": ["id", "input", "workspace", "prepare", "verify", "limits"],
|
|
99
|
+
"properties": {
|
|
100
|
+
"id": { "$ref": "#/$defs/identifier" },
|
|
101
|
+
"input": { "type": "string", "maxLength": 1048576 },
|
|
102
|
+
"workspace": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"additionalProperties": false,
|
|
105
|
+
"required": ["path"],
|
|
106
|
+
"properties": { "path": { "$ref": "#/$defs/relativePath" } }
|
|
107
|
+
},
|
|
108
|
+
"prepare": { "$ref": "#/$defs/command" },
|
|
109
|
+
"verify": { "$ref": "#/$defs/command" },
|
|
110
|
+
"limits": { "$ref": "#/$defs/limits" }
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/cairnkeep/cairnkeep/main/schemas/memory-node.schema.json",
|
|
4
|
+
"title": "Cairnkeep typed memory node and import envelope",
|
|
5
|
+
"oneOf": [
|
|
6
|
+
{ "$ref": "#/$defs/nodeMetadata" },
|
|
7
|
+
{ "$ref": "#/$defs/importEnvelope" },
|
|
8
|
+
{ "$ref": "#/$defs/importResult" }
|
|
9
|
+
],
|
|
10
|
+
"$defs": {
|
|
11
|
+
"nodeType": {
|
|
12
|
+
"oneOf": [
|
|
13
|
+
{ "enum": ["memory", "knowledge", "hindsight", "shared", "provenance"] },
|
|
14
|
+
{ "type": "string", "pattern": "^[a-z][a-z0-9-]{0,31}:[a-z0-9][a-z0-9-]{0,63}$" }
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"tag": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]{0,127}$" },
|
|
18
|
+
"tags": { "type": "array", "items": { "$ref": "#/$defs/tag" }, "maxItems": 64, "uniqueItems": true },
|
|
19
|
+
"nodePath": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"minLength": 1,
|
|
22
|
+
"maxLength": 1024,
|
|
23
|
+
"pattern": "^(?!/)(?!.*(?:^|/)(?:\\.|\\.\\.)(?:/|$))(?!.*//)(?!.*\\\\)(?!__)(?!\\.cairnkeep)(?!.*[\\u0000-\\u001f\\u007f]).+(?<!/)$"
|
|
24
|
+
},
|
|
25
|
+
"nodeMetadata": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"additionalProperties": false,
|
|
28
|
+
"required": ["schema_version", "node_type", "tags"],
|
|
29
|
+
"properties": {
|
|
30
|
+
"schema_version": { "const": 1 },
|
|
31
|
+
"node_type": { "$ref": "#/$defs/nodeType" },
|
|
32
|
+
"tags": { "$ref": "#/$defs/tags" }
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"importNode": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"additionalProperties": false,
|
|
38
|
+
"required": ["key", "value", "node_type", "tags"],
|
|
39
|
+
"properties": {
|
|
40
|
+
"key": { "$ref": "#/$defs/nodePath" },
|
|
41
|
+
"value": { "type": "string", "maxLength": 262144 },
|
|
42
|
+
"node_type": { "$ref": "#/$defs/nodeType" },
|
|
43
|
+
"tags": { "$ref": "#/$defs/tags" },
|
|
44
|
+
"note": { "$ref": "note.schema.json" }
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"importEnvelope": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"additionalProperties": false,
|
|
50
|
+
"required": ["schema_version", "scope", "nodes"],
|
|
51
|
+
"properties": {
|
|
52
|
+
"schema_version": { "const": 1 },
|
|
53
|
+
"scope": { "type": "string", "minLength": 1, "not": { "const": "all" } },
|
|
54
|
+
"address_space": { "enum": ["memory", "project-notes", "shared-notes"], "default": "memory" },
|
|
55
|
+
"import_id": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$" },
|
|
56
|
+
"conflict_policy": { "enum": ["reject", "supersede"], "default": "reject" },
|
|
57
|
+
"dry_run": { "type": "boolean", "default": false },
|
|
58
|
+
"nodes": { "type": "array", "items": { "$ref": "#/$defs/importNode" }, "minItems": 1, "maxItems": 256 }
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"importAction": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"additionalProperties": false,
|
|
64
|
+
"required": ["key", "action"],
|
|
65
|
+
"properties": {
|
|
66
|
+
"key": { "$ref": "#/$defs/nodePath" },
|
|
67
|
+
"action": { "enum": ["would_create", "would_replace", "created", "replaced", "unchanged", "rejected"] },
|
|
68
|
+
"code": { "type": "string" }
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"importResult": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"additionalProperties": false,
|
|
74
|
+
"required": ["schema_version", "scope", "address_space", "batch_digest", "dry_run", "conflict_policy", "committed", "counts", "actions"],
|
|
75
|
+
"properties": {
|
|
76
|
+
"schema_version": { "const": 1 },
|
|
77
|
+
"scope": { "type": "string" },
|
|
78
|
+
"address_space": { "enum": ["memory", "project-notes", "shared-notes"] },
|
|
79
|
+
"batch_digest": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
80
|
+
"import_id": { "type": "string" },
|
|
81
|
+
"dry_run": { "type": "boolean" },
|
|
82
|
+
"conflict_policy": { "enum": ["reject", "supersede"] },
|
|
83
|
+
"committed": { "type": "boolean" },
|
|
84
|
+
"replayed": { "type": "boolean" },
|
|
85
|
+
"counts": { "type": "object" },
|
|
86
|
+
"actions": { "type": "array", "items": { "$ref": "#/$defs/importAction" }, "maxItems": 256 }
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|