memoryking 0.1.0__py3-none-any.whl

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 (179) hide show
  1. memoryking/__init__.py +3 -0
  2. memoryking/__main__.py +1328 -0
  3. memoryking/adapters/__init__.py +1 -0
  4. memoryking/adapters/adapter_state.py +242 -0
  5. memoryking/adapters/anchor_schema.sql +7 -0
  6. memoryking/adapters/atlas.py +441 -0
  7. memoryking/adapters/browser_commands.py +125 -0
  8. memoryking/adapters/dashboard.py +510 -0
  9. memoryking/adapters/dense_search.py +86 -0
  10. memoryking/adapters/egress_policy.py +244 -0
  11. memoryking/adapters/egress_schema.sql +13 -0
  12. memoryking/adapters/embedding.schema.json +302 -0
  13. memoryking/adapters/embedding_store.py +469 -0
  14. memoryking/adapters/execution.py +369 -0
  15. memoryking/adapters/experience.py +423 -0
  16. memoryking/adapters/experience.schema.json +1508 -0
  17. memoryking/adapters/experience_records.py +239 -0
  18. memoryking/adapters/experience_schema.sql +23 -0
  19. memoryking/adapters/handoff.py +494 -0
  20. memoryking/adapters/handoff.schema.json +299 -0
  21. memoryking/adapters/handoff_schema.sql +17 -0
  22. memoryking/adapters/index_schema.sql +11 -0
  23. memoryking/adapters/inference.py +454 -0
  24. memoryking/adapters/inference.schema.json +541 -0
  25. memoryking/adapters/inspection.py +1128 -0
  26. memoryking/adapters/inspection.schema.json +568 -0
  27. memoryking/adapters/knowledge.schema.json +633 -0
  28. memoryking/adapters/knowledge_schema.sql +37 -0
  29. memoryking/adapters/knowledge_store.py +800 -0
  30. memoryking/adapters/legacy_snapshot.py +358 -0
  31. memoryking/adapters/legacy_tables.py +49 -0
  32. memoryking/adapters/local_contract.py +45 -0
  33. memoryking/adapters/local_embeddings.py +189 -0
  34. memoryking/adapters/local_files.py +242 -0
  35. memoryking/adapters/local_ipc.py +258 -0
  36. memoryking/adapters/local_schema.sql +44 -0
  37. memoryking/adapters/local_store.py +632 -0
  38. memoryking/adapters/local_wire.schema.json +7672 -0
  39. memoryking/adapters/models/minilm-l6-v2-onnx.json +57 -0
  40. memoryking/adapters/models/ms-marco-minilm-l6-v2-onnx.json +57 -0
  41. memoryking/adapters/optional_schema.sql +43 -0
  42. memoryking/adapters/plan_dashboard.py +51 -0
  43. memoryking/adapters/plans.py +253 -0
  44. memoryking/adapters/postgres_admin.py +300 -0
  45. memoryking/adapters/postgres_anchor_schema.sql +9 -0
  46. memoryking/adapters/postgres_counter.sql +14 -0
  47. memoryking/adapters/postgres_egress_schema.sql +15 -0
  48. memoryking/adapters/postgres_experience_schema.sql +39 -0
  49. memoryking/adapters/postgres_index_schema.sql +7 -0
  50. memoryking/adapters/postgres_optional_schema.sql +71 -0
  51. memoryking/adapters/postgres_pool.py +77 -0
  52. memoryking/adapters/postgres_recovery.py +525 -0
  53. memoryking/adapters/postgres_schema.sql +365 -0
  54. memoryking/adapters/postgres_sql.py +102 -0
  55. memoryking/adapters/postgres_store.py +428 -0
  56. memoryking/adapters/postgres_summary_schema.sql +12 -0
  57. memoryking/adapters/postgres_trust_schema.sql +20 -0
  58. memoryking/adapters/processing.schema.json +471 -0
  59. memoryking/adapters/processing_store.py +346 -0
  60. memoryking/adapters/projects.py +83 -0
  61. memoryking/adapters/proposals.py +238 -0
  62. memoryking/adapters/ranking.py +315 -0
  63. memoryking/adapters/repository.schema.json +664 -0
  64. memoryking/adapters/repository_git.py +264 -0
  65. memoryking/adapters/repository_schema.sql +25 -0
  66. memoryking/adapters/repository_store.py +960 -0
  67. memoryking/adapters/retrieval.py +1285 -0
  68. memoryking/adapters/retrieval.schema.json +553 -0
  69. memoryking/adapters/retrieval_schema.sql +10 -0
  70. memoryking/adapters/shared_control.py +40 -0
  71. memoryking/adapters/shared_dashboard.py +636 -0
  72. memoryking/adapters/shared_gateway.py +63 -0
  73. memoryking/adapters/shared_http.py +216 -0
  74. memoryking/adapters/shared_mcp.py +159 -0
  75. memoryking/adapters/shared_service.py +124 -0
  76. memoryking/adapters/stdio.py +193 -0
  77. memoryking/adapters/stdio.tools.json +6776 -0
  78. memoryking/adapters/summary_schema.sql +10 -0
  79. memoryking/adapters/team.py +253 -0
  80. memoryking/adapters/timeline.py +80 -0
  81. memoryking/adapters/token_count.py +55 -0
  82. memoryking/adapters/tokenizers/LICENSE +21 -0
  83. memoryking/adapters/tokenizers/cl100k_base.tiktoken +100256 -0
  84. memoryking/adapters/trust.py +123 -0
  85. memoryking/adapters/trust_schema.sql +13 -0
  86. memoryking/adapters/web/app.css +1251 -0
  87. memoryking/adapters/web/app.js +907 -0
  88. memoryking/adapters/web/brand.js +44 -0
  89. memoryking/adapters/web/crown-mono.svg +1 -0
  90. memoryking/adapters/web/crown.svg +8 -0
  91. memoryking/adapters/web/elephant.png +0 -0
  92. memoryking/adapters/web/favicon.svg +8 -0
  93. memoryking/adapters/web/graph-layout.js +52 -0
  94. memoryking/adapters/web/graph-worker.js +10 -0
  95. memoryking/adapters/web/graph.js +570 -0
  96. memoryking/adapters/web/index.html +208 -0
  97. memoryking/adapters/web/observatory.js +1208 -0
  98. memoryking/adapters/web/team.js +151 -0
  99. memoryking/adapters/web/wordmark.svg +1 -0
  100. memoryking/adapters/working.py +971 -0
  101. memoryking/adapters/working.schema.json +1717 -0
  102. memoryking/adapters/working_schema.sql +24 -0
  103. memoryking/application/__init__.py +1 -0
  104. memoryking/application/conformance.py +50 -0
  105. memoryking/application/legacy_import.py +337 -0
  106. memoryking/application/local_port.py +9 -0
  107. memoryking/application/storage.py +117 -0
  108. memoryking/application/store_core.py +1292 -0
  109. memoryking/backups.py +131 -0
  110. memoryking/contracts/__init__.py +6 -0
  111. memoryking/contracts/__main__.py +20 -0
  112. memoryking/contracts/canonical.py +88 -0
  113. memoryking/contracts/embedding.schema.json +302 -0
  114. memoryking/contracts/embedding_generated.py +65 -0
  115. memoryking/contracts/experience.schema.json +1508 -0
  116. memoryking/contracts/experience_generated.py +239 -0
  117. memoryking/contracts/generated.py +122 -0
  118. memoryking/contracts/handoff.schema.json +299 -0
  119. memoryking/contracts/handoff_generated.py +69 -0
  120. memoryking/contracts/inference.schema.json +541 -0
  121. memoryking/contracts/inference_generated.py +106 -0
  122. memoryking/contracts/processing.schema.json +471 -0
  123. memoryking/contracts/processing_generated.py +82 -0
  124. memoryking/contracts/py.typed +0 -0
  125. memoryking/contracts/repository.schema.json +664 -0
  126. memoryking/contracts/repository_generated.py +144 -0
  127. memoryking/contracts/retrieval.schema.json +553 -0
  128. memoryking/contracts/retrieval_generated.py +110 -0
  129. memoryking/contracts/schema.json +696 -0
  130. memoryking/contracts/validation.py +92 -0
  131. memoryking/contracts/working.schema.json +1717 -0
  132. memoryking/contracts/working_generated.py +291 -0
  133. memoryking/domain/__init__.py +1 -0
  134. memoryking/domain/anchors.py +97 -0
  135. memoryking/domain/briefing.py +108 -0
  136. memoryking/domain/briefing_text.py +222 -0
  137. memoryking/domain/checkpoint.py +118 -0
  138. memoryking/domain/compression.py +64 -0
  139. memoryking/domain/delta.py +129 -0
  140. memoryking/domain/embeddings.py +90 -0
  141. memoryking/domain/hints.py +465 -0
  142. memoryking/domain/http_status.py +45 -0
  143. memoryking/domain/learning.py +62 -0
  144. memoryking/domain/local.py +65 -0
  145. memoryking/domain/plans.py +140 -0
  146. memoryking/domain/repository.py +118 -0
  147. memoryking/domain/selectors.py +356 -0
  148. memoryking/domain/summary.py +88 -0
  149. memoryking/domain/usage.py +163 -0
  150. memoryking/embedding_loop.py +98 -0
  151. memoryking/embedding_worker.py +131 -0
  152. memoryking/harness.py +882 -0
  153. memoryking/harness_context.py +376 -0
  154. memoryking/hooks.py +171 -0
  155. memoryking/host_hooks.py +454 -0
  156. memoryking/lean.py +352 -0
  157. memoryking/memory_tool.py +776 -0
  158. memoryking/migration.py +194 -0
  159. memoryking/model_install.py +78 -0
  160. memoryking/observability.py +101 -0
  161. memoryking/observability_metrics.py +100 -0
  162. memoryking/profiles.py +150 -0
  163. memoryking/providers.py +330 -0
  164. memoryking/py.typed +0 -0
  165. memoryking/pytest_plugin.py +69 -0
  166. memoryking/reference_agent.py +152 -0
  167. memoryking/repository_worker.py +57 -0
  168. memoryking/resume_adapter.py +154 -0
  169. memoryking/sdk.py +302 -0
  170. memoryking/shared.py +301 -0
  171. memoryking/shared_sdk.py +101 -0
  172. memoryking/vault.py +176 -0
  173. memoryking-0.1.0.dist-info/METADATA +157 -0
  174. memoryking-0.1.0.dist-info/RECORD +179 -0
  175. memoryking-0.1.0.dist-info/WHEEL +5 -0
  176. memoryking-0.1.0.dist-info/entry_points.txt +7 -0
  177. memoryking-0.1.0.dist-info/licenses/LICENSE +202 -0
  178. memoryking-0.1.0.dist-info/licenses/NOTICE +12 -0
  179. memoryking-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1717 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://memoryking.invalid/contracts/working-v1",
4
+ "title": "MemoryKing durable working state v1",
5
+ "oneOf": [
6
+ {
7
+ "type": "object",
8
+ "properties": {
9
+ "version": {
10
+ "const": 1
11
+ },
12
+ "incarnation": {
13
+ "type": "string",
14
+ "pattern": "^hist_[a-f0-9]{32}(?![\\s\\S])"
15
+ },
16
+ "action": {
17
+ "const": "save"
18
+ },
19
+ "args": {
20
+ "$ref": "#/$defs/Save"
21
+ },
22
+ "key": {
23
+ "type": "string",
24
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
25
+ }
26
+ },
27
+ "required": [
28
+ "version",
29
+ "incarnation",
30
+ "action",
31
+ "args",
32
+ "key"
33
+ ],
34
+ "additionalProperties": false
35
+ },
36
+ {
37
+ "type": "object",
38
+ "properties": {
39
+ "version": {
40
+ "const": 1
41
+ },
42
+ "incarnation": {
43
+ "type": "string",
44
+ "pattern": "^hist_[a-f0-9]{32}(?![\\s\\S])"
45
+ },
46
+ "action": {
47
+ "const": "resume"
48
+ },
49
+ "args": {
50
+ "$ref": "#/$defs/Resume"
51
+ }
52
+ },
53
+ "required": [
54
+ "version",
55
+ "incarnation",
56
+ "action",
57
+ "args"
58
+ ],
59
+ "additionalProperties": false
60
+ },
61
+ {
62
+ "type": "object",
63
+ "properties": {
64
+ "version": {
65
+ "const": 1
66
+ },
67
+ "incarnation": {
68
+ "type": "string",
69
+ "pattern": "^hist_[a-f0-9]{32}(?![\\s\\S])"
70
+ },
71
+ "action": {
72
+ "const": "assign_writer"
73
+ },
74
+ "args": {
75
+ "$ref": "#/$defs/AssignWriter"
76
+ },
77
+ "key": {
78
+ "type": "string",
79
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
80
+ }
81
+ },
82
+ "required": [
83
+ "version",
84
+ "incarnation",
85
+ "action",
86
+ "args",
87
+ "key"
88
+ ],
89
+ "additionalProperties": false
90
+ },
91
+ {
92
+ "type": "object",
93
+ "properties": {
94
+ "version": {
95
+ "const": 1
96
+ },
97
+ "incarnation": {
98
+ "type": "string",
99
+ "pattern": "^hist_[a-f0-9]{32}(?![\\s\\S])"
100
+ },
101
+ "action": {
102
+ "const": "operation_intent"
103
+ },
104
+ "args": {
105
+ "$ref": "#/$defs/OperationIntent"
106
+ },
107
+ "key": {
108
+ "type": "string",
109
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
110
+ }
111
+ },
112
+ "required": [
113
+ "version",
114
+ "incarnation",
115
+ "action",
116
+ "args",
117
+ "key"
118
+ ],
119
+ "additionalProperties": false
120
+ },
121
+ {
122
+ "type": "object",
123
+ "properties": {
124
+ "version": {
125
+ "const": 1
126
+ },
127
+ "incarnation": {
128
+ "type": "string",
129
+ "pattern": "^hist_[a-f0-9]{32}(?![\\s\\S])"
130
+ },
131
+ "action": {
132
+ "const": "operation_transition"
133
+ },
134
+ "args": {
135
+ "$ref": "#/$defs/OperationTransition"
136
+ },
137
+ "key": {
138
+ "type": "string",
139
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
140
+ }
141
+ },
142
+ "required": [
143
+ "version",
144
+ "incarnation",
145
+ "action",
146
+ "args",
147
+ "key"
148
+ ],
149
+ "additionalProperties": false
150
+ },
151
+ {
152
+ "type": "object",
153
+ "properties": {
154
+ "version": {
155
+ "const": 1
156
+ },
157
+ "incarnation": {
158
+ "type": "string",
159
+ "pattern": "^hist_[a-f0-9]{32}(?![\\s\\S])"
160
+ },
161
+ "action": {
162
+ "const": "operations"
163
+ },
164
+ "args": {
165
+ "$ref": "#/$defs/OperationList"
166
+ }
167
+ },
168
+ "required": [
169
+ "version",
170
+ "incarnation",
171
+ "action",
172
+ "args"
173
+ ],
174
+ "additionalProperties": false
175
+ },
176
+ {
177
+ "type": "object",
178
+ "properties": {
179
+ "version": {
180
+ "const": 1
181
+ },
182
+ "incarnation": {
183
+ "type": "string",
184
+ "pattern": "^hist_[a-f0-9]{32}(?![\\s\\S])"
185
+ },
186
+ "action": {
187
+ "const": "adapter_resume"
188
+ },
189
+ "args": {
190
+ "$ref": "#/$defs/AdapterResume"
191
+ }
192
+ },
193
+ "required": [
194
+ "version",
195
+ "incarnation",
196
+ "action",
197
+ "args"
198
+ ],
199
+ "additionalProperties": false
200
+ },
201
+ {
202
+ "type": "object",
203
+ "properties": {
204
+ "version": {
205
+ "const": 1
206
+ },
207
+ "incarnation": {
208
+ "type": "string",
209
+ "pattern": "^hist_[a-f0-9]{32}(?![\\s\\S])"
210
+ },
211
+ "action": {
212
+ "const": "summarize"
213
+ },
214
+ "args": {
215
+ "$ref": "#/$defs/Summarize"
216
+ },
217
+ "key": {
218
+ "type": "string",
219
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
220
+ }
221
+ },
222
+ "required": [
223
+ "version",
224
+ "incarnation",
225
+ "action",
226
+ "args",
227
+ "key"
228
+ ],
229
+ "additionalProperties": false
230
+ },
231
+ {
232
+ "type": "object",
233
+ "properties": {
234
+ "version": {
235
+ "const": 1
236
+ },
237
+ "incarnation": {
238
+ "type": "string",
239
+ "pattern": "^hist_[a-f0-9]{32}(?![\\s\\S])"
240
+ },
241
+ "action": {
242
+ "const": "plan_save"
243
+ },
244
+ "args": {
245
+ "$ref": "#/$defs/PlanSave"
246
+ },
247
+ "key": {
248
+ "type": "string",
249
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
250
+ }
251
+ },
252
+ "required": [
253
+ "version",
254
+ "incarnation",
255
+ "action",
256
+ "args",
257
+ "key"
258
+ ],
259
+ "additionalProperties": false
260
+ },
261
+ {
262
+ "type": "object",
263
+ "properties": {
264
+ "version": {
265
+ "const": 1
266
+ },
267
+ "incarnation": {
268
+ "type": "string",
269
+ "pattern": "^hist_[a-f0-9]{32}(?![\\s\\S])"
270
+ },
271
+ "action": {
272
+ "const": "plan_step"
273
+ },
274
+ "args": {
275
+ "$ref": "#/$defs/PlanStepUpdate"
276
+ },
277
+ "key": {
278
+ "type": "string",
279
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
280
+ }
281
+ },
282
+ "required": [
283
+ "version",
284
+ "incarnation",
285
+ "action",
286
+ "args",
287
+ "key"
288
+ ],
289
+ "additionalProperties": false
290
+ },
291
+ {
292
+ "type": "object",
293
+ "properties": {
294
+ "version": {
295
+ "const": 1
296
+ },
297
+ "incarnation": {
298
+ "type": "string",
299
+ "pattern": "^hist_[a-f0-9]{32}(?![\\s\\S])"
300
+ },
301
+ "action": {
302
+ "const": "plan_get"
303
+ },
304
+ "args": {
305
+ "$ref": "#/$defs/PlanGet"
306
+ }
307
+ },
308
+ "required": [
309
+ "version",
310
+ "incarnation",
311
+ "action",
312
+ "args"
313
+ ],
314
+ "additionalProperties": false
315
+ },
316
+ {
317
+ "type": "object",
318
+ "properties": {
319
+ "version": {
320
+ "const": 1
321
+ },
322
+ "incarnation": {
323
+ "type": "string",
324
+ "pattern": "^hist_[a-f0-9]{32}(?![\\s\\S])"
325
+ },
326
+ "action": {
327
+ "const": "plan_list"
328
+ },
329
+ "args": {
330
+ "$ref": "#/$defs/PlanList"
331
+ }
332
+ },
333
+ "required": [
334
+ "version",
335
+ "incarnation",
336
+ "action",
337
+ "args"
338
+ ],
339
+ "additionalProperties": false
340
+ }
341
+ ],
342
+ "$defs": {
343
+ "Dependency": {
344
+ "type": "object",
345
+ "properties": {
346
+ "kind": {
347
+ "enum": [
348
+ "observation",
349
+ "revision"
350
+ ]
351
+ },
352
+ "id": {
353
+ "type": "string",
354
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
355
+ }
356
+ },
357
+ "required": [
358
+ "kind",
359
+ "id"
360
+ ],
361
+ "additionalProperties": false
362
+ },
363
+ "Artifact": {
364
+ "type": "object",
365
+ "properties": {
366
+ "path": {
367
+ "type": "string",
368
+ "minLength": 1,
369
+ "maxLength": 512
370
+ },
371
+ "availability": {
372
+ "enum": [
373
+ "stored",
374
+ "external",
375
+ "missing"
376
+ ]
377
+ },
378
+ "observation": {
379
+ "anyOf": [
380
+ {
381
+ "type": "string",
382
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
383
+ },
384
+ {
385
+ "type": "null"
386
+ }
387
+ ]
388
+ },
389
+ "content_hash": {
390
+ "anyOf": [
391
+ {
392
+ "type": "string",
393
+ "pattern": "^[a-f0-9]{64}(?![\\s\\S])"
394
+ },
395
+ {
396
+ "type": "null"
397
+ }
398
+ ]
399
+ },
400
+ "required": {
401
+ "type": "boolean"
402
+ }
403
+ },
404
+ "required": [
405
+ "path",
406
+ "availability",
407
+ "observation",
408
+ "content_hash",
409
+ "required"
410
+ ],
411
+ "additionalProperties": false
412
+ },
413
+ "Repository": {
414
+ "type": "object",
415
+ "properties": {
416
+ "repository": {
417
+ "anyOf": [
418
+ {
419
+ "type": "string",
420
+ "minLength": 1,
421
+ "maxLength": 256
422
+ },
423
+ {
424
+ "type": "null"
425
+ }
426
+ ]
427
+ },
428
+ "base_commit": {
429
+ "anyOf": [
430
+ {
431
+ "type": "string",
432
+ "minLength": 1,
433
+ "maxLength": 256
434
+ },
435
+ {
436
+ "type": "null"
437
+ }
438
+ ]
439
+ },
440
+ "current_commit": {
441
+ "anyOf": [
442
+ {
443
+ "type": "string",
444
+ "minLength": 1,
445
+ "maxLength": 256
446
+ },
447
+ {
448
+ "type": "null"
449
+ }
450
+ ]
451
+ },
452
+ "dirty": {
453
+ "type": "boolean"
454
+ },
455
+ "artifacts": {
456
+ "type": "array",
457
+ "items": {
458
+ "$ref": "#/$defs/Artifact"
459
+ },
460
+ "maxItems": 32
461
+ },
462
+ "snapshot_id": {
463
+ "anyOf": [
464
+ {
465
+ "type": "string",
466
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
467
+ },
468
+ {
469
+ "type": "null"
470
+ }
471
+ ]
472
+ },
473
+ "environment": {
474
+ "type": "string",
475
+ "minLength": 1,
476
+ "maxLength": 256
477
+ },
478
+ "change_scope": {
479
+ "type": "array",
480
+ "items": {
481
+ "type": "string",
482
+ "minLength": 1,
483
+ "maxLength": 256
484
+ },
485
+ "minItems": 1,
486
+ "maxItems": 256,
487
+ "uniqueItems": true
488
+ },
489
+ "deleted_paths": {
490
+ "type": "array",
491
+ "items": {
492
+ "type": "string",
493
+ "minLength": 1,
494
+ "maxLength": 256
495
+ },
496
+ "maxItems": 256,
497
+ "uniqueItems": true
498
+ },
499
+ "clone": {
500
+ "type": "string",
501
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
502
+ }
503
+ },
504
+ "required": [
505
+ "repository",
506
+ "base_commit",
507
+ "current_commit",
508
+ "dirty",
509
+ "artifacts"
510
+ ],
511
+ "additionalProperties": false
512
+ },
513
+ "Criterion": {
514
+ "type": "object",
515
+ "properties": {
516
+ "id": {
517
+ "type": "string",
518
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
519
+ },
520
+ "text": {
521
+ "type": "string",
522
+ "minLength": 1,
523
+ "maxLength": 8192
524
+ },
525
+ "state": {
526
+ "enum": [
527
+ "pending",
528
+ "passed",
529
+ "failed",
530
+ "waived"
531
+ ]
532
+ },
533
+ "evidence": {
534
+ "type": "array",
535
+ "items": {
536
+ "$ref": "#/$defs/Dependency"
537
+ },
538
+ "maxItems": 16
539
+ },
540
+ "decision": {
541
+ "anyOf": [
542
+ {
543
+ "type": "string",
544
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
545
+ },
546
+ {
547
+ "type": "null"
548
+ }
549
+ ]
550
+ },
551
+ "weight": {
552
+ "type": "integer",
553
+ "minimum": 1,
554
+ "maximum": 1000,
555
+ "description": "Declared relative criterion weight; absent means 1. Weight changes alter the scope denominator, not evidence validity."
556
+ }
557
+ },
558
+ "required": [
559
+ "id",
560
+ "text",
561
+ "state",
562
+ "evidence",
563
+ "decision"
564
+ ],
565
+ "additionalProperties": false
566
+ },
567
+ "Finding": {
568
+ "type": "object",
569
+ "properties": {
570
+ "text": {
571
+ "type": "string",
572
+ "minLength": 1,
573
+ "maxLength": 8192
574
+ },
575
+ "kind": {
576
+ "enum": [
577
+ "decision",
578
+ "hypothesis"
579
+ ]
580
+ },
581
+ "evidence": {
582
+ "type": "array",
583
+ "items": {
584
+ "$ref": "#/$defs/Dependency"
585
+ },
586
+ "maxItems": 16
587
+ }
588
+ },
589
+ "required": [
590
+ "text",
591
+ "kind",
592
+ "evidence"
593
+ ],
594
+ "additionalProperties": false
595
+ },
596
+ "FailedAttempt": {
597
+ "type": "object",
598
+ "properties": {
599
+ "action": {
600
+ "type": "string",
601
+ "minLength": 1,
602
+ "maxLength": 8192
603
+ },
604
+ "outcome": {
605
+ "type": "string",
606
+ "minLength": 1,
607
+ "maxLength": 8192
608
+ },
609
+ "do_not_repeat_when": {
610
+ "type": "string",
611
+ "minLength": 1,
612
+ "maxLength": 8192
613
+ }
614
+ },
615
+ "required": [
616
+ "action",
617
+ "outcome",
618
+ "do_not_repeat_when"
619
+ ],
620
+ "additionalProperties": false
621
+ },
622
+ "Verification": {
623
+ "type": "object",
624
+ "properties": {
625
+ "name": {
626
+ "type": "string",
627
+ "minLength": 1,
628
+ "maxLength": 256
629
+ },
630
+ "target_revision": {
631
+ "anyOf": [
632
+ {
633
+ "type": "string",
634
+ "minLength": 1,
635
+ "maxLength": 256
636
+ },
637
+ {
638
+ "type": "null"
639
+ }
640
+ ]
641
+ },
642
+ "environment": {
643
+ "type": "string",
644
+ "minLength": 1,
645
+ "maxLength": 256
646
+ },
647
+ "result": {
648
+ "enum": [
649
+ "passed",
650
+ "failed",
651
+ "not_evaluated",
652
+ "inconclusive"
653
+ ]
654
+ },
655
+ "evidence": {
656
+ "type": "array",
657
+ "items": {
658
+ "$ref": "#/$defs/Dependency"
659
+ },
660
+ "maxItems": 16
661
+ }
662
+ },
663
+ "required": [
664
+ "name",
665
+ "target_revision",
666
+ "environment",
667
+ "result",
668
+ "evidence"
669
+ ],
670
+ "additionalProperties": false
671
+ },
672
+ "Blocker": {
673
+ "type": "object",
674
+ "properties": {
675
+ "text": {
676
+ "type": "string",
677
+ "minLength": 1,
678
+ "maxLength": 8192
679
+ },
680
+ "owner": {
681
+ "anyOf": [
682
+ {
683
+ "type": "string",
684
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
685
+ },
686
+ {
687
+ "type": "null"
688
+ }
689
+ ]
690
+ }
691
+ },
692
+ "required": [
693
+ "text",
694
+ "owner"
695
+ ],
696
+ "additionalProperties": false
697
+ },
698
+ "Capture": {
699
+ "type": "object",
700
+ "properties": {
701
+ "last_event": {
702
+ "anyOf": [
703
+ {
704
+ "type": "string",
705
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
706
+ },
707
+ {
708
+ "type": "null"
709
+ }
710
+ ]
711
+ },
712
+ "observed_ms": {
713
+ "type": "integer",
714
+ "minimum": 0,
715
+ "maximum": 9007199254740991
716
+ },
717
+ "gaps": {
718
+ "type": "array",
719
+ "items": {
720
+ "type": "string",
721
+ "minLength": 1,
722
+ "maxLength": 8192
723
+ },
724
+ "maxItems": 32
725
+ }
726
+ },
727
+ "required": [
728
+ "last_event",
729
+ "observed_ms",
730
+ "gaps"
731
+ ],
732
+ "additionalProperties": false
733
+ },
734
+ "Checkpoint": {
735
+ "type": "object",
736
+ "properties": {
737
+ "objective": {
738
+ "type": "string",
739
+ "minLength": 1,
740
+ "maxLength": 8192
741
+ },
742
+ "acceptance": {
743
+ "type": "array",
744
+ "items": {
745
+ "$ref": "#/$defs/Criterion"
746
+ },
747
+ "maxItems": 32
748
+ },
749
+ "hard_constraints": {
750
+ "type": "array",
751
+ "items": {
752
+ "type": "string",
753
+ "minLength": 1,
754
+ "maxLength": 8192
755
+ },
756
+ "maxItems": 32
757
+ },
758
+ "current_state": {
759
+ "type": "string",
760
+ "minLength": 1,
761
+ "maxLength": 8192
762
+ },
763
+ "repository": {
764
+ "$ref": "#/$defs/Repository"
765
+ },
766
+ "findings": {
767
+ "type": "array",
768
+ "items": {
769
+ "$ref": "#/$defs/Finding"
770
+ },
771
+ "maxItems": 32
772
+ },
773
+ "failed_attempts": {
774
+ "type": "array",
775
+ "items": {
776
+ "$ref": "#/$defs/FailedAttempt"
777
+ },
778
+ "maxItems": 32
779
+ },
780
+ "verification": {
781
+ "type": "array",
782
+ "items": {
783
+ "$ref": "#/$defs/Verification"
784
+ },
785
+ "maxItems": 32
786
+ },
787
+ "blockers": {
788
+ "type": "array",
789
+ "items": {
790
+ "$ref": "#/$defs/Blocker"
791
+ },
792
+ "maxItems": 32
793
+ },
794
+ "next_actions": {
795
+ "type": "array",
796
+ "items": {
797
+ "type": "string",
798
+ "minLength": 1,
799
+ "maxLength": 8192
800
+ },
801
+ "maxItems": 32
802
+ },
803
+ "references": {
804
+ "type": "array",
805
+ "items": {
806
+ "$ref": "#/$defs/Dependency"
807
+ },
808
+ "maxItems": 128
809
+ },
810
+ "operation_ids": {
811
+ "type": "array",
812
+ "items": {
813
+ "type": "string",
814
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
815
+ },
816
+ "maxItems": 32
817
+ },
818
+ "capture": {
819
+ "$ref": "#/$defs/Capture"
820
+ },
821
+ "plan": {
822
+ "$ref": "#/$defs/Plan"
823
+ }
824
+ },
825
+ "required": [
826
+ "objective",
827
+ "acceptance",
828
+ "hard_constraints",
829
+ "current_state",
830
+ "repository",
831
+ "findings",
832
+ "failed_attempts",
833
+ "verification",
834
+ "blockers",
835
+ "next_actions",
836
+ "references",
837
+ "operation_ids",
838
+ "capture"
839
+ ],
840
+ "additionalProperties": false
841
+ },
842
+ "Save": {
843
+ "type": "object",
844
+ "properties": {
845
+ "project": {
846
+ "type": "string",
847
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
848
+ },
849
+ "task": {
850
+ "type": "string",
851
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
852
+ },
853
+ "run": {
854
+ "anyOf": [
855
+ {
856
+ "type": "string",
857
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
858
+ },
859
+ {
860
+ "type": "null"
861
+ }
862
+ ]
863
+ },
864
+ "expected_revision": {
865
+ "anyOf": [
866
+ {
867
+ "type": "integer",
868
+ "minimum": 0,
869
+ "maximum": 9007199254740991
870
+ },
871
+ {
872
+ "type": "null"
873
+ }
874
+ ],
875
+ "description": "The revision last seen; null accepts the current revision without a compare-and-set check."
876
+ },
877
+ "readers": {
878
+ "anyOf": [
879
+ {
880
+ "type": "array",
881
+ "items": {
882
+ "type": "string",
883
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
884
+ },
885
+ "maxItems": 32,
886
+ "minItems": 1,
887
+ "uniqueItems": true
888
+ },
889
+ {
890
+ "type": "null"
891
+ }
892
+ ],
893
+ "description": "Who may read the checkpoint; null keeps the stream's current readers (the writer alone on a first save)."
894
+ },
895
+ "checkpoint": {
896
+ "$ref": "#/$defs/Checkpoint"
897
+ }
898
+ },
899
+ "required": [
900
+ "project",
901
+ "task",
902
+ "run",
903
+ "expected_revision",
904
+ "readers",
905
+ "checkpoint"
906
+ ],
907
+ "additionalProperties": false
908
+ },
909
+ "Resume": {
910
+ "type": "object",
911
+ "properties": {
912
+ "project": {
913
+ "type": "string",
914
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
915
+ },
916
+ "task": {
917
+ "type": "string",
918
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
919
+ },
920
+ "run": {
921
+ "anyOf": [
922
+ {
923
+ "type": "string",
924
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
925
+ },
926
+ {
927
+ "type": "null"
928
+ }
929
+ ]
930
+ },
931
+ "checkpoint": {
932
+ "anyOf": [
933
+ {
934
+ "type": "string",
935
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
936
+ },
937
+ {
938
+ "type": "null"
939
+ }
940
+ ]
941
+ },
942
+ "bindings": {
943
+ "type": "array",
944
+ "items": {
945
+ "type": "object"
946
+ },
947
+ "maxItems": 256
948
+ },
949
+ "max_output_tokens": {
950
+ "type": "integer",
951
+ "minimum": 1,
952
+ "maximum": 65536
953
+ },
954
+ "tokenizer": {
955
+ "type": "string",
956
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
957
+ },
958
+ "format": {
959
+ "enum": [
960
+ "json",
961
+ "text"
962
+ ],
963
+ "description": "json (default) returns the structured packet; text returns a cited Markdown rendering in a compact envelope with the same receipt."
964
+ }
965
+ },
966
+ "required": [
967
+ "project",
968
+ "task",
969
+ "run",
970
+ "checkpoint",
971
+ "bindings",
972
+ "max_output_tokens",
973
+ "tokenizer"
974
+ ],
975
+ "additionalProperties": false
976
+ },
977
+ "AssignWriter": {
978
+ "type": "object",
979
+ "properties": {
980
+ "project": {
981
+ "type": "string",
982
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
983
+ },
984
+ "task": {
985
+ "type": "string",
986
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
987
+ },
988
+ "run": {
989
+ "anyOf": [
990
+ {
991
+ "type": "string",
992
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
993
+ },
994
+ {
995
+ "type": "null"
996
+ }
997
+ ]
998
+ },
999
+ "expected_revision": {
1000
+ "type": "integer",
1001
+ "minimum": 0,
1002
+ "maximum": 9007199254740991
1003
+ },
1004
+ "writer": {
1005
+ "type": "string",
1006
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1007
+ },
1008
+ "reason": {
1009
+ "type": "string",
1010
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1011
+ }
1012
+ },
1013
+ "required": [
1014
+ "project",
1015
+ "task",
1016
+ "run",
1017
+ "expected_revision",
1018
+ "writer",
1019
+ "reason"
1020
+ ],
1021
+ "additionalProperties": false
1022
+ },
1023
+ "OperationIntent": {
1024
+ "type": "object",
1025
+ "properties": {
1026
+ "project": {
1027
+ "type": "string",
1028
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1029
+ },
1030
+ "task": {
1031
+ "type": "string",
1032
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1033
+ },
1034
+ "run": {
1035
+ "anyOf": [
1036
+ {
1037
+ "type": "string",
1038
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1039
+ },
1040
+ {
1041
+ "type": "null"
1042
+ }
1043
+ ]
1044
+ },
1045
+ "operation": {
1046
+ "type": "string",
1047
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1048
+ },
1049
+ "target_hash": {
1050
+ "type": "string",
1051
+ "pattern": "^[a-f0-9]{64}(?![\\s\\S])"
1052
+ },
1053
+ "parameters_hash": {
1054
+ "type": "string",
1055
+ "pattern": "^[a-f0-9]{64}(?![\\s\\S])"
1056
+ },
1057
+ "method": {
1058
+ "enum": [
1059
+ "readback",
1060
+ "idempotent_retry",
1061
+ "manual"
1062
+ ]
1063
+ },
1064
+ "provider_key": {
1065
+ "anyOf": [
1066
+ {
1067
+ "type": "string",
1068
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1069
+ },
1070
+ {
1071
+ "type": "null"
1072
+ }
1073
+ ]
1074
+ }
1075
+ },
1076
+ "required": [
1077
+ "project",
1078
+ "task",
1079
+ "run",
1080
+ "operation",
1081
+ "target_hash",
1082
+ "parameters_hash",
1083
+ "method",
1084
+ "provider_key"
1085
+ ],
1086
+ "additionalProperties": false
1087
+ },
1088
+ "OperationTransition": {
1089
+ "type": "object",
1090
+ "properties": {
1091
+ "project": {
1092
+ "type": "string",
1093
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1094
+ },
1095
+ "operation": {
1096
+ "type": "string",
1097
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1098
+ },
1099
+ "expected_revision": {
1100
+ "type": "integer",
1101
+ "minimum": 0,
1102
+ "maximum": 9007199254740991
1103
+ },
1104
+ "state": {
1105
+ "enum": [
1106
+ "dispatching",
1107
+ "unknown",
1108
+ "succeeded",
1109
+ "failed"
1110
+ ]
1111
+ },
1112
+ "reconciled": {
1113
+ "type": "boolean"
1114
+ },
1115
+ "evidence": {
1116
+ "type": "array",
1117
+ "items": {
1118
+ "$ref": "#/$defs/Dependency"
1119
+ },
1120
+ "maxItems": 16
1121
+ },
1122
+ "result_hash": {
1123
+ "anyOf": [
1124
+ {
1125
+ "type": "string",
1126
+ "pattern": "^[a-f0-9]{64}(?![\\s\\S])"
1127
+ },
1128
+ {
1129
+ "type": "null"
1130
+ }
1131
+ ]
1132
+ }
1133
+ },
1134
+ "required": [
1135
+ "project",
1136
+ "operation",
1137
+ "expected_revision",
1138
+ "state",
1139
+ "reconciled",
1140
+ "evidence",
1141
+ "result_hash"
1142
+ ],
1143
+ "additionalProperties": false
1144
+ },
1145
+ "OperationList": {
1146
+ "type": "object",
1147
+ "properties": {
1148
+ "project": {
1149
+ "type": "string",
1150
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1151
+ },
1152
+ "task": {
1153
+ "type": "string",
1154
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1155
+ },
1156
+ "run": {
1157
+ "anyOf": [
1158
+ {
1159
+ "type": "string",
1160
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1161
+ },
1162
+ {
1163
+ "type": "null"
1164
+ }
1165
+ ]
1166
+ }
1167
+ },
1168
+ "required": [
1169
+ "project",
1170
+ "task",
1171
+ "run"
1172
+ ],
1173
+ "additionalProperties": false
1174
+ },
1175
+ "AdapterResume": {
1176
+ "type": "object",
1177
+ "properties": {
1178
+ "project": {
1179
+ "type": "string",
1180
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1181
+ },
1182
+ "task": {
1183
+ "type": "string",
1184
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1185
+ },
1186
+ "run": {
1187
+ "anyOf": [
1188
+ {
1189
+ "type": "string",
1190
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1191
+ },
1192
+ {
1193
+ "type": "null"
1194
+ }
1195
+ ]
1196
+ },
1197
+ "checkpoint": {
1198
+ "anyOf": [
1199
+ {
1200
+ "type": "string",
1201
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1202
+ },
1203
+ {
1204
+ "type": "null"
1205
+ }
1206
+ ]
1207
+ },
1208
+ "bindings": {
1209
+ "type": "array",
1210
+ "items": {
1211
+ "type": "object"
1212
+ },
1213
+ "maxItems": 256
1214
+ },
1215
+ "max_output_tokens": {
1216
+ "type": "integer",
1217
+ "minimum": 1,
1218
+ "maximum": 65536
1219
+ },
1220
+ "tokenizer": {
1221
+ "type": "string",
1222
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1223
+ },
1224
+ "base": {
1225
+ "anyOf": [
1226
+ {
1227
+ "type": "null"
1228
+ },
1229
+ {
1230
+ "$ref": "#/$defs/AdapterBase"
1231
+ }
1232
+ ]
1233
+ },
1234
+ "adapter_context": {
1235
+ "$ref": "#/$defs/AdapterContext"
1236
+ }
1237
+ },
1238
+ "required": [
1239
+ "project",
1240
+ "task",
1241
+ "run",
1242
+ "checkpoint",
1243
+ "bindings",
1244
+ "max_output_tokens",
1245
+ "tokenizer",
1246
+ "base",
1247
+ "adapter_context"
1248
+ ],
1249
+ "additionalProperties": false
1250
+ },
1251
+ "AdapterBase": {
1252
+ "type": "object",
1253
+ "additionalProperties": false,
1254
+ "properties": {
1255
+ "id": {
1256
+ "type": "string",
1257
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1258
+ },
1259
+ "hash": {
1260
+ "type": "string",
1261
+ "pattern": "^[a-f0-9]{64}(?![\\s\\S])"
1262
+ },
1263
+ "sequence": {
1264
+ "type": "integer",
1265
+ "minimum": 1,
1266
+ "maximum": 9007199254740991
1267
+ },
1268
+ "schema": {
1269
+ "type": "string",
1270
+ "minLength": 1,
1271
+ "maxLength": 96
1272
+ }
1273
+ },
1274
+ "required": [
1275
+ "id",
1276
+ "hash",
1277
+ "sequence",
1278
+ "schema"
1279
+ ]
1280
+ },
1281
+ "AdapterContext": {
1282
+ "type": "object",
1283
+ "additionalProperties": false,
1284
+ "properties": {
1285
+ "model_session": {
1286
+ "type": "string",
1287
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1288
+ },
1289
+ "context_epoch": {
1290
+ "type": "integer",
1291
+ "minimum": 0,
1292
+ "maximum": 9007199254740991
1293
+ }
1294
+ },
1295
+ "required": [
1296
+ "model_session",
1297
+ "context_epoch"
1298
+ ]
1299
+ },
1300
+ "Summarize": {
1301
+ "type": "object",
1302
+ "properties": {
1303
+ "project": {
1304
+ "type": "string",
1305
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1306
+ },
1307
+ "task": {
1308
+ "type": "string",
1309
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1310
+ },
1311
+ "run": {
1312
+ "anyOf": [
1313
+ {
1314
+ "type": "string",
1315
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1316
+ },
1317
+ {
1318
+ "type": "null"
1319
+ }
1320
+ ]
1321
+ },
1322
+ "checkpoint": {
1323
+ "anyOf": [
1324
+ {
1325
+ "type": "string",
1326
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1327
+ },
1328
+ {
1329
+ "type": "null"
1330
+ }
1331
+ ]
1332
+ },
1333
+ "source": {
1334
+ "enum": [
1335
+ "extractive",
1336
+ "provider"
1337
+ ]
1338
+ },
1339
+ "text": {
1340
+ "anyOf": [
1341
+ {
1342
+ "type": "string",
1343
+ "minLength": 1,
1344
+ "maxLength": 4096
1345
+ },
1346
+ {
1347
+ "type": "null"
1348
+ }
1349
+ ]
1350
+ },
1351
+ "permit": {
1352
+ "anyOf": [
1353
+ {
1354
+ "type": "string",
1355
+ "pattern": "^permit_[a-f0-9]{32}(?![\\s\\S])"
1356
+ },
1357
+ {
1358
+ "type": "null"
1359
+ }
1360
+ ]
1361
+ },
1362
+ "readers": {
1363
+ "anyOf": [
1364
+ {
1365
+ "type": "array",
1366
+ "items": {
1367
+ "type": "string",
1368
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1369
+ },
1370
+ "minItems": 1,
1371
+ "maxItems": 64
1372
+ },
1373
+ {
1374
+ "type": "null"
1375
+ }
1376
+ ]
1377
+ }
1378
+ },
1379
+ "required": [
1380
+ "project",
1381
+ "task",
1382
+ "run",
1383
+ "checkpoint",
1384
+ "source",
1385
+ "text",
1386
+ "permit",
1387
+ "readers"
1388
+ ],
1389
+ "additionalProperties": false
1390
+ },
1391
+ "PlanPhase": {
1392
+ "type": "object",
1393
+ "properties": {
1394
+ "id": {
1395
+ "type": "string",
1396
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1397
+ },
1398
+ "title": {
1399
+ "type": "string",
1400
+ "minLength": 1,
1401
+ "maxLength": 256
1402
+ }
1403
+ },
1404
+ "required": [
1405
+ "id",
1406
+ "title"
1407
+ ],
1408
+ "additionalProperties": false
1409
+ },
1410
+ "PlanStep": {
1411
+ "type": "object",
1412
+ "properties": {
1413
+ "id": {
1414
+ "type": "string",
1415
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1416
+ },
1417
+ "phase": {
1418
+ "type": "string",
1419
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1420
+ },
1421
+ "description": {
1422
+ "type": "string",
1423
+ "minLength": 1,
1424
+ "maxLength": 2048
1425
+ },
1426
+ "status": {
1427
+ "enum": [
1428
+ "todo",
1429
+ "doing",
1430
+ "done",
1431
+ "blocked",
1432
+ "skipped",
1433
+ "unknown"
1434
+ ]
1435
+ },
1436
+ "notes": {
1437
+ "type": "string",
1438
+ "minLength": 0,
1439
+ "maxLength": 2048
1440
+ },
1441
+ "depends_on": {
1442
+ "type": "array",
1443
+ "items": {
1444
+ "type": "string",
1445
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1446
+ },
1447
+ "maxItems": 64,
1448
+ "uniqueItems": true
1449
+ },
1450
+ "evidence": {
1451
+ "type": "array",
1452
+ "items": {
1453
+ "$ref": "#/$defs/Dependency"
1454
+ },
1455
+ "maxItems": 16
1456
+ },
1457
+ "decision": {
1458
+ "anyOf": [
1459
+ {
1460
+ "type": "string",
1461
+ "minLength": 1,
1462
+ "maxLength": 1024
1463
+ },
1464
+ {
1465
+ "type": "null"
1466
+ }
1467
+ ]
1468
+ }
1469
+ },
1470
+ "required": [
1471
+ "id",
1472
+ "phase",
1473
+ "description",
1474
+ "status",
1475
+ "notes",
1476
+ "depends_on",
1477
+ "evidence",
1478
+ "decision"
1479
+ ],
1480
+ "additionalProperties": false
1481
+ },
1482
+ "Plan": {
1483
+ "type": "object",
1484
+ "properties": {
1485
+ "title": {
1486
+ "type": "string",
1487
+ "minLength": 1,
1488
+ "maxLength": 256
1489
+ },
1490
+ "objective": {
1491
+ "type": "string",
1492
+ "minLength": 1,
1493
+ "maxLength": 4096
1494
+ },
1495
+ "context": {
1496
+ "type": "string",
1497
+ "minLength": 0,
1498
+ "maxLength": 4096
1499
+ },
1500
+ "status": {
1501
+ "enum": [
1502
+ "draft",
1503
+ "active",
1504
+ "done",
1505
+ "abandoned"
1506
+ ]
1507
+ },
1508
+ "closure_note": {
1509
+ "type": "string",
1510
+ "minLength": 0,
1511
+ "maxLength": 2048
1512
+ },
1513
+ "phases": {
1514
+ "type": "array",
1515
+ "items": {
1516
+ "$ref": "#/$defs/PlanPhase"
1517
+ },
1518
+ "maxItems": 32
1519
+ },
1520
+ "steps": {
1521
+ "type": "array",
1522
+ "items": {
1523
+ "$ref": "#/$defs/PlanStep"
1524
+ },
1525
+ "maxItems": 256
1526
+ },
1527
+ "lessons": {
1528
+ "type": "array",
1529
+ "items": {
1530
+ "$ref": "#/$defs/Dependency"
1531
+ },
1532
+ "maxItems": 32
1533
+ }
1534
+ },
1535
+ "required": [
1536
+ "title",
1537
+ "objective",
1538
+ "context",
1539
+ "status",
1540
+ "closure_note",
1541
+ "phases",
1542
+ "steps",
1543
+ "lessons"
1544
+ ],
1545
+ "additionalProperties": false
1546
+ },
1547
+ "PlanSave": {
1548
+ "type": "object",
1549
+ "properties": {
1550
+ "project": {
1551
+ "type": "string",
1552
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1553
+ },
1554
+ "task": {
1555
+ "type": "string",
1556
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1557
+ },
1558
+ "expected_revision": {
1559
+ "type": "integer",
1560
+ "minimum": 0,
1561
+ "maximum": 9007199254740990
1562
+ },
1563
+ "readers": {
1564
+ "type": "array",
1565
+ "items": {
1566
+ "type": "string",
1567
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1568
+ },
1569
+ "maxItems": 256,
1570
+ "minItems": 1,
1571
+ "uniqueItems": true
1572
+ },
1573
+ "plan": {
1574
+ "$ref": "#/$defs/Plan"
1575
+ }
1576
+ },
1577
+ "required": [
1578
+ "project",
1579
+ "task",
1580
+ "expected_revision",
1581
+ "readers",
1582
+ "plan"
1583
+ ],
1584
+ "additionalProperties": false
1585
+ },
1586
+ "PlanStepUpdate": {
1587
+ "type": "object",
1588
+ "properties": {
1589
+ "project": {
1590
+ "type": "string",
1591
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1592
+ },
1593
+ "task": {
1594
+ "type": "string",
1595
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1596
+ },
1597
+ "expected_revision": {
1598
+ "type": "integer",
1599
+ "minimum": 0,
1600
+ "maximum": 9007199254740990
1601
+ },
1602
+ "step": {
1603
+ "type": "string",
1604
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1605
+ },
1606
+ "status": {
1607
+ "enum": [
1608
+ "todo",
1609
+ "doing",
1610
+ "done",
1611
+ "blocked",
1612
+ "skipped",
1613
+ "unknown"
1614
+ ]
1615
+ },
1616
+ "notes": {
1617
+ "type": "string",
1618
+ "minLength": 0,
1619
+ "maxLength": 2048
1620
+ },
1621
+ "evidence": {
1622
+ "type": "array",
1623
+ "items": {
1624
+ "$ref": "#/$defs/Dependency"
1625
+ },
1626
+ "maxItems": 16
1627
+ },
1628
+ "decision": {
1629
+ "anyOf": [
1630
+ {
1631
+ "type": "string",
1632
+ "minLength": 1,
1633
+ "maxLength": 1024
1634
+ },
1635
+ {
1636
+ "type": "null"
1637
+ }
1638
+ ]
1639
+ }
1640
+ },
1641
+ "required": [
1642
+ "project",
1643
+ "task",
1644
+ "expected_revision",
1645
+ "step",
1646
+ "status",
1647
+ "notes",
1648
+ "evidence",
1649
+ "decision"
1650
+ ],
1651
+ "additionalProperties": false
1652
+ },
1653
+ "PlanGet": {
1654
+ "type": "object",
1655
+ "properties": {
1656
+ "project": {
1657
+ "type": "string",
1658
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1659
+ },
1660
+ "task": {
1661
+ "type": "string",
1662
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1663
+ },
1664
+ "revision": {
1665
+ "anyOf": [
1666
+ {
1667
+ "type": "integer",
1668
+ "minimum": 1,
1669
+ "maximum": 9007199254740991
1670
+ },
1671
+ {
1672
+ "type": "null"
1673
+ }
1674
+ ]
1675
+ }
1676
+ },
1677
+ "required": [
1678
+ "project",
1679
+ "task",
1680
+ "revision"
1681
+ ],
1682
+ "additionalProperties": false
1683
+ },
1684
+ "PlanList": {
1685
+ "type": "object",
1686
+ "properties": {
1687
+ "project": {
1688
+ "type": "string",
1689
+ "pattern": "^[A-Za-z0-9_-]{1,96}(?![\\s\\S])"
1690
+ },
1691
+ "cursor": {
1692
+ "anyOf": [
1693
+ {
1694
+ "type": "string",
1695
+ "minLength": 1,
1696
+ "maxLength": 8192
1697
+ },
1698
+ {
1699
+ "type": "null"
1700
+ }
1701
+ ]
1702
+ },
1703
+ "limit": {
1704
+ "type": "integer",
1705
+ "minimum": 1,
1706
+ "maximum": 50
1707
+ }
1708
+ },
1709
+ "required": [
1710
+ "project",
1711
+ "cursor",
1712
+ "limit"
1713
+ ],
1714
+ "additionalProperties": false
1715
+ }
1716
+ }
1717
+ }