@claudexor/schema 4.3.1 → 4.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.
Files changed (48) hide show
  1. package/dist/config.d.ts +2 -2
  2. package/dist/config.d.ts.map +1 -1
  3. package/dist/config.js +2 -2
  4. package/dist/config.js.map +1 -1
  5. package/dist/control-gc.d.ts +113 -0
  6. package/dist/control-gc.d.ts.map +1 -1
  7. package/dist/control-gc.js +28 -1
  8. package/dist/control-gc.js.map +1 -1
  9. package/dist/control-run-event-part.d.ts +53 -0
  10. package/dist/control-run-event-part.d.ts.map +1 -0
  11. package/dist/control-run-event-part.js +47 -0
  12. package/dist/control-run-event-part.js.map +1 -0
  13. package/dist/daemon-status.d.ts +327 -0
  14. package/dist/daemon-status.d.ts.map +1 -1
  15. package/dist/daemon-status.js +35 -0
  16. package/dist/daemon-status.js.map +1 -1
  17. package/dist/index.d.ts +2 -0
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +2 -0
  20. package/dist/index.js.map +1 -1
  21. package/dist/mcp-run-result.d.ts +251 -0
  22. package/dist/mcp-run-result.d.ts.map +1 -1
  23. package/dist/mcp-run-result.js +26 -2
  24. package/dist/mcp-run-result.js.map +1 -1
  25. package/dist/mcp-run-wait.d.ts +269 -0
  26. package/dist/mcp-run-wait.d.ts.map +1 -0
  27. package/dist/mcp-run-wait.js +73 -0
  28. package/dist/mcp-run-wait.js.map +1 -0
  29. package/dist/operation.d.ts +5 -0
  30. package/dist/operation.d.ts.map +1 -1
  31. package/dist/operation.js +7 -0
  32. package/dist/operation.js.map +1 -1
  33. package/dist/store-status.d.ts +10 -0
  34. package/dist/store-status.d.ts.map +1 -1
  35. package/dist/store-status.js +8 -0
  36. package/dist/store-status.js.map +1 -1
  37. package/generated/ControlDaemonStatus.schema.json +174 -6
  38. package/generated/ControlGcReceipt.schema.json +81 -1
  39. package/generated/ControlGcRequest.schema.json +4 -0
  40. package/generated/ControlHandshakeResponse.schema.json +5 -0
  41. package/generated/ControlRunEventPart.schema.json +140 -0
  42. package/generated/GlobalConfig.schema.json +1 -1
  43. package/generated/McpRunEventReadInput.schema.json +41 -0
  44. package/generated/McpRunHandleResult.schema.json +382 -0
  45. package/generated/McpRunToolResult.schema.json +10 -2
  46. package/generated/McpRunWaitInput.schema.json +50 -0
  47. package/generated/McpRunWaitResult.schema.json +411 -0
  48. package/package.json +2 -2
@@ -500,6 +500,28 @@
500
500
  }
501
501
  ],
502
502
  "description": "Longest COMMIT call; null before the first."
503
+ },
504
+ "p50_ms": {
505
+ "anyOf": [
506
+ {
507
+ "$ref": "#/definitions/ControlDaemonStatus/properties/store/properties/flusher/anyOf/0/properties/interval_ms"
508
+ },
509
+ {
510
+ "type": "null"
511
+ }
512
+ ],
513
+ "description": "Lifetime COMMIT p50, microsecond histogram with two significant digits; absent on older engines."
514
+ },
515
+ "p99_ms": {
516
+ "anyOf": [
517
+ {
518
+ "$ref": "#/definitions/ControlDaemonStatus/properties/store/properties/flusher/anyOf/0/properties/interval_ms"
519
+ },
520
+ {
521
+ "type": "null"
522
+ }
523
+ ],
524
+ "description": "Lifetime COMMIT p99, microsecond histogram with two significant digits; absent on older engines."
503
525
  }
504
526
  },
505
527
  "required": [
@@ -605,6 +627,153 @@
605
627
  ],
606
628
  "additionalProperties": false
607
629
  },
630
+ "timing": {
631
+ "type": "object",
632
+ "properties": {
633
+ "windowMs": {
634
+ "anyOf": [
635
+ {
636
+ "type": "number",
637
+ "minimum": 0
638
+ },
639
+ {
640
+ "type": "null"
641
+ }
642
+ ]
643
+ },
644
+ "windowEndedAt": {
645
+ "anyOf": [
646
+ {
647
+ "$ref": "#/definitions/ControlDaemonStatus/properties/memory/properties/atAdmission/anyOf/0/properties/at"
648
+ },
649
+ {
650
+ "type": "null"
651
+ }
652
+ ],
653
+ "description": "ISO-8601 timestamp string."
654
+ },
655
+ "routes": {
656
+ "type": "array",
657
+ "items": {
658
+ "type": "object",
659
+ "properties": {
660
+ "method": {
661
+ "type": "string"
662
+ },
663
+ "route": {
664
+ "type": "string"
665
+ },
666
+ "lifetime": {
667
+ "type": "object",
668
+ "properties": {
669
+ "count": {
670
+ "type": "integer",
671
+ "minimum": 0
672
+ },
673
+ "p50Ms": {
674
+ "anyOf": [
675
+ {
676
+ "$ref": "#/definitions/ControlDaemonStatus/properties/timing/properties/windowMs/anyOf/0"
677
+ },
678
+ {
679
+ "type": "null"
680
+ }
681
+ ]
682
+ },
683
+ "p99Ms": {
684
+ "anyOf": [
685
+ {
686
+ "$ref": "#/definitions/ControlDaemonStatus/properties/timing/properties/windowMs/anyOf/0"
687
+ },
688
+ {
689
+ "type": "null"
690
+ }
691
+ ]
692
+ },
693
+ "maxMs": {
694
+ "anyOf": [
695
+ {
696
+ "$ref": "#/definitions/ControlDaemonStatus/properties/timing/properties/windowMs/anyOf/0"
697
+ },
698
+ {
699
+ "type": "null"
700
+ }
701
+ ]
702
+ }
703
+ },
704
+ "required": [
705
+ "count",
706
+ "p50Ms",
707
+ "p99Ms",
708
+ "maxMs"
709
+ ],
710
+ "additionalProperties": false
711
+ },
712
+ "window": {
713
+ "anyOf": [
714
+ {
715
+ "$ref": "#/definitions/ControlDaemonStatus/properties/timing/properties/routes/items/properties/lifetime"
716
+ },
717
+ {
718
+ "type": "null"
719
+ }
720
+ ]
721
+ }
722
+ },
723
+ "required": [
724
+ "method",
725
+ "route",
726
+ "lifetime",
727
+ "window"
728
+ ],
729
+ "additionalProperties": false
730
+ },
731
+ "maxItems": 256,
732
+ "description": "Completed responses or disconnects by method and catalog template (never raw URLs). SSE latency includes the stream lifetime. At most 256 keys including OTHER <unmatched>. Fixed histograms use microseconds and two significant digits; max is exact to a microsecond. Window is the last completed loop-facts window, null before the first; empty windows have count zero and null latencies."
733
+ },
734
+ "worstSync": {
735
+ "type": "array",
736
+ "items": {
737
+ "type": "object",
738
+ "properties": {
739
+ "operation": {
740
+ "type": "string",
741
+ "enum": [
742
+ "store.begin_immediate",
743
+ "store.commit",
744
+ "store.external_write",
745
+ "control.run_detail",
746
+ "control.run_summary",
747
+ "scope.persist"
748
+ ]
749
+ },
750
+ "durationMs": {
751
+ "$ref": "#/definitions/ControlDaemonStatus/properties/timing/properties/windowMs/anyOf/0"
752
+ },
753
+ "at": {
754
+ "$ref": "#/definitions/ControlDaemonStatus/properties/memory/properties/atAdmission/anyOf/0/properties/at"
755
+ }
756
+ },
757
+ "required": [
758
+ "operation",
759
+ "durationMs",
760
+ "at"
761
+ ],
762
+ "additionalProperties": false
763
+ },
764
+ "maxItems": 32,
765
+ "description": "The 32 longest instrumented synchronous sections since process start, descending by duration, retaining later samples on ties. Labels contain no SQL, paths, IDs or payloads. Scope persistence measures synchronous serialization only; its file writes are asynchronous. Sections can overlap; these facts do not attribute a stall to disk or another cause."
766
+ }
767
+ },
768
+ "required": [
769
+ "windowMs",
770
+ "windowEndedAt",
771
+ "routes",
772
+ "worstSync"
773
+ ],
774
+ "additionalProperties": false,
775
+ "description": "Bounded process timing facts; absent on older engines."
776
+ },
608
777
  "loop": {
609
778
  "anyOf": [
610
779
  {
@@ -633,14 +802,13 @@
633
802
  "minimum": 0
634
803
  },
635
804
  "p50Ms": {
636
- "type": "number",
637
- "minimum": 0
805
+ "$ref": "#/definitions/ControlDaemonStatus/properties/timing/properties/windowMs/anyOf/0"
638
806
  },
639
807
  "p99Ms": {
640
- "$ref": "#/definitions/ControlDaemonStatus/properties/loop/anyOf/0/properties/delay/anyOf/0/properties/p50Ms"
808
+ "$ref": "#/definitions/ControlDaemonStatus/properties/timing/properties/windowMs/anyOf/0"
641
809
  },
642
810
  "maxMs": {
643
- "$ref": "#/definitions/ControlDaemonStatus/properties/loop/anyOf/0/properties/delay/anyOf/0/properties/p50Ms"
811
+ "$ref": "#/definitions/ControlDaemonStatus/properties/timing/properties/windowMs/anyOf/0"
644
812
  }
645
813
  },
646
814
  "required": [
@@ -679,10 +847,10 @@
679
847
  "minimum": 0
680
848
  },
681
849
  "totalMs": {
682
- "$ref": "#/definitions/ControlDaemonStatus/properties/loop/anyOf/0/properties/delay/anyOf/0/properties/p50Ms"
850
+ "$ref": "#/definitions/ControlDaemonStatus/properties/timing/properties/windowMs/anyOf/0"
683
851
  },
684
852
  "maxMs": {
685
- "$ref": "#/definitions/ControlDaemonStatus/properties/loop/anyOf/0/properties/delay/anyOf/0/properties/p50Ms"
853
+ "$ref": "#/definitions/ControlDaemonStatus/properties/timing/properties/windowMs/anyOf/0"
686
854
  }
687
855
  },
688
856
  "required": [
@@ -61,7 +61,7 @@
61
61
  },
62
62
  "project_root": {
63
63
  "type": "string",
64
- "description": "Canonical project root owning the run tree."
64
+ "description": "Canonical project root, or the owned runtime namespace when no project record remains."
65
65
  },
66
66
  "freed_bytes": {
67
67
  "type": "integer",
@@ -159,6 +159,86 @@
159
159
  },
160
160
  "description": "Names of top-level entries in the Claudexor-owned data root that the engine does not own and will never touch (advisory only — nothing here is ever deleted). The full sorted list. Present ONLY when the request opted in via data_root_report; ABSENT (not empty) when the request did not opt in, the scan failed, or the serving daemon predates the feature; a scan failure is disclosed in errors instead."
161
161
  },
162
+ "native_homes": {
163
+ "type": "array",
164
+ "items": {
165
+ "type": "object",
166
+ "properties": {
167
+ "harness_id": {
168
+ "type": "string"
169
+ },
170
+ "profile_id": {
171
+ "type": [
172
+ "string",
173
+ "null"
174
+ ]
175
+ },
176
+ "home": {
177
+ "type": [
178
+ "string",
179
+ "null"
180
+ ]
181
+ },
182
+ "status": {
183
+ "type": "string",
184
+ "enum": [
185
+ "checked",
186
+ "not_pruned"
187
+ ]
188
+ },
189
+ "reason": {
190
+ "type": "string"
191
+ },
192
+ "deleted_files": {
193
+ "type": "array",
194
+ "items": {
195
+ "type": "string"
196
+ }
197
+ },
198
+ "errors": {
199
+ "type": "array",
200
+ "items": {
201
+ "type": "string"
202
+ }
203
+ },
204
+ "freed_bytes": {
205
+ "type": "integer",
206
+ "minimum": 0
207
+ },
208
+ "kept_referenced": {
209
+ "type": "integer",
210
+ "minimum": 0
211
+ },
212
+ "kept_recent": {
213
+ "type": "integer",
214
+ "minimum": 0
215
+ },
216
+ "kept_unknown": {
217
+ "type": "integer",
218
+ "minimum": 0
219
+ },
220
+ "truncated": {
221
+ "type": "boolean"
222
+ }
223
+ },
224
+ "required": [
225
+ "harness_id",
226
+ "profile_id",
227
+ "home",
228
+ "status",
229
+ "reason",
230
+ "deleted_files",
231
+ "errors",
232
+ "freed_bytes",
233
+ "kept_referenced",
234
+ "kept_recent",
235
+ "kept_unknown",
236
+ "truncated"
237
+ ],
238
+ "additionalProperties": false
239
+ },
240
+ "description": "Per-home adapter retirement decisions; present only when native_home_report was requested. Unknown vendor data and unreadable references are kept with a reason."
241
+ },
162
242
  "model_payloads": {
163
243
  "type": "object",
164
244
  "properties": {
@@ -17,6 +17,10 @@
17
17
  "type": "boolean",
18
18
  "description": "Opt in to the advisory data-root scan: when true, the receipt carries data_root_unrecognized. Capability negotiation for engine-version skew — a client omits this unless the serving daemon is the SAME engine version, so an older daemon never sees the unknown request key and an older client never receives the unknown receipt key."
19
19
  },
20
+ "native_home_report": {
21
+ "type": "boolean",
22
+ "description": "Include adapter-owned native-home retirement outcomes. Cleanup always runs; lockstep opt-in keeps older strict clients compatible."
23
+ },
20
24
  "trash_purge_report": {
21
25
  "type": "boolean",
22
26
  "description": "Opt in to the thread-purge disclosure: when true, the receipt carries purged_threads and purge_leftovers. The purges themselves always run; the same lockstep capability negotiation as data_root_report keeps older strict receipt readers compatible."
@@ -16,6 +16,11 @@
16
16
  "type": "string",
17
17
  "const": "/v2/operations"
18
18
  },
19
+ "storeId": {
20
+ "type": "string",
21
+ "minLength": 1,
22
+ "description": "Immutable UUID of the durable engine store, stable across restarts; a run 404 is meaningful only with the same storeId. Returned only to a request sending `X-Claudexor-Store-Identity: 1` (older strict clients keep the legacy shape); absent when the store is unavailable or the daemon predates this field."
23
+ },
19
24
  "engine": {
20
25
  "type": "object",
21
26
  "properties": {
@@ -0,0 +1,140 @@
1
+ {
2
+ "$ref": "#/definitions/ControlRunEventPart",
3
+ "definitions": {
4
+ "ControlRunEventPart": {
5
+ "type": "object",
6
+ "properties": {
7
+ "runId": {
8
+ "type": "string",
9
+ "minLength": 1,
10
+ "description": "Canonical run id."
11
+ },
12
+ "seq": {
13
+ "type": "integer",
14
+ "exclusiveMinimum": 0,
15
+ "maximum": 9007199254740991,
16
+ "description": "Durable seq of the event (its event-stream id)."
17
+ },
18
+ "type": {
19
+ "type": "string",
20
+ "enum": [
21
+ "run.created",
22
+ "task.contract.created",
23
+ "context.pack.created",
24
+ "project.git.initialized",
25
+ "project.claude_bridge.created",
26
+ "budget.lease.created",
27
+ "budget.observation",
28
+ "budget.cash",
29
+ "policy.web.upgraded",
30
+ "harness.started",
31
+ "harness.event",
32
+ "harness.completed",
33
+ "route.fallback.started",
34
+ "route.fallback.completed",
35
+ "route.fallback.exhausted",
36
+ "route.transient.detected",
37
+ "route.transient.retry_scheduled",
38
+ "route.profile.headroom_exceeded",
39
+ "route.profile.rotated",
40
+ "route.profile.rotation_exhausted",
41
+ "route.profile.credential_unusable",
42
+ "route.account.pool_selected",
43
+ "route.account.lane_switch",
44
+ "route.account.pool_exhausted",
45
+ "route.transient.exhausted",
46
+ "route.fallback.auth_switched",
47
+ "route.primary.diverged",
48
+ "route.pool.degraded",
49
+ "session.continuity",
50
+ "interaction.requested",
51
+ "interaction.answered",
52
+ "interaction.timeout",
53
+ "interaction.answer_discarded",
54
+ "interaction.withdrawn",
55
+ "message.accepted",
56
+ "message.delivered",
57
+ "message.refused",
58
+ "plan.progress",
59
+ "plan.questions",
60
+ "plan.brief.materialized",
61
+ "council.started",
62
+ "council.draft",
63
+ "council.member.failed",
64
+ "council.merged",
65
+ "budget.quota_pressure",
66
+ "delegation.belt.unavailable",
67
+ "delegation.belt.degraded",
68
+ "output.ready",
69
+ "gate.started",
70
+ "gate.completed",
71
+ "review.preflight",
72
+ "review.started",
73
+ "review.skipped",
74
+ "reviewer.started",
75
+ "reviewer.first_event",
76
+ "reviewer.auth_switched",
77
+ "reviewer.completed",
78
+ "reviewer.timed_out",
79
+ "reviewer.failed",
80
+ "finding.revalidated",
81
+ "synthesis.started",
82
+ "arbitration.completed",
83
+ "work_product.emitted",
84
+ "work_product.adopted",
85
+ "control.requested",
86
+ "control.applied",
87
+ "control.rejected",
88
+ "run.blocked",
89
+ "run.completed",
90
+ "run.failed",
91
+ "run.continuation",
92
+ "run.continuation.denied",
93
+ "run.continuity",
94
+ "workspace.retained"
95
+ ],
96
+ "description": "Type of an append-only run event, covering run lifecycle, contract/context creation, budget, routing fallbacks, harness activity, interactions, gates, review, arbitration, work products, and control verbs."
97
+ },
98
+ "totalBytes": {
99
+ "type": "integer",
100
+ "exclusiveMinimum": 0,
101
+ "description": "UTF-8 byte length of the event's complete stream serialization: the redacted JSON line the run event stream delivers."
102
+ },
103
+ "sha256": {
104
+ "type": "string",
105
+ "pattern": "^[0-9a-f]{64}$",
106
+ "description": "SHA-256 of all totalBytes; verify the reassembled text before parsing it."
107
+ },
108
+ "offset": {
109
+ "type": "integer",
110
+ "minimum": 0,
111
+ "maximum": 9007199254740991,
112
+ "description": "UTF-8 byte offset where this part starts."
113
+ },
114
+ "nextOffset": {
115
+ "type": "integer",
116
+ "minimum": 0,
117
+ "maximum": 9007199254740991,
118
+ "description": "Where the next part starts; equal to totalBytes when this part ends the event."
119
+ },
120
+ "text": {
121
+ "type": "string",
122
+ "description": "Bytes [offset, nextOffset) decoded as UTF-8; a boundary never splits a character."
123
+ }
124
+ },
125
+ "required": [
126
+ "runId",
127
+ "seq",
128
+ "type",
129
+ "totalBytes",
130
+ "sha256",
131
+ "offset",
132
+ "nextOffset",
133
+ "text"
134
+ ],
135
+ "additionalProperties": false,
136
+ "description": "One bounded part of a single validated run event, read from the run's own event log by run id and seq. Concatenate parts in offset order until nextOffset equals totalBytes; only then is the event consumed."
137
+ }
138
+ },
139
+ "$schema": "http://json-schema.org/draft-07/schema#"
140
+ }
@@ -313,7 +313,7 @@
313
313
  "type": "integer",
314
314
  "minimum": 0,
315
315
  "default": 20,
316
- "description": "The newest N runs per project always survive, regardless of age."
316
+ "description": "The newest N runs survive for active registrations (even with missing roots), archived registrations whose roots exist, and the built-in no-project scope. Orphaned namespaces have no keep-last protection."
317
317
  }
318
318
  },
319
319
  "additionalProperties": false,
@@ -0,0 +1,41 @@
1
+ {
2
+ "$ref": "#/definitions/McpRunEventReadInput",
3
+ "definitions": {
4
+ "McpRunEventReadInput": {
5
+ "type": "object",
6
+ "properties": {
7
+ "runId": {
8
+ "type": "string",
9
+ "minLength": 1,
10
+ "maxLength": 256
11
+ },
12
+ "seq": {
13
+ "type": "integer",
14
+ "exclusiveMinimum": 0,
15
+ "maximum": 9007199254740991,
16
+ "description": "The event to read, e.g. claudexor_run_wait's oversizedEvent.seq."
17
+ },
18
+ "offset": {
19
+ "type": "integer",
20
+ "minimum": 0,
21
+ "maximum": 9007199254740991,
22
+ "default": 0,
23
+ "description": "0, or the previous part's nextOffset."
24
+ },
25
+ "maxBytes": {
26
+ "type": "integer",
27
+ "minimum": 4,
28
+ "maximum": 65536,
29
+ "default": 32768,
30
+ "description": "Upper bound of this part's UTF-8 bytes; a part may end earlier at a character boundary."
31
+ }
32
+ },
33
+ "required": [
34
+ "runId",
35
+ "seq"
36
+ ],
37
+ "additionalProperties": false
38
+ }
39
+ },
40
+ "$schema": "http://json-schema.org/draft-07/schema#"
41
+ }