@claudexor/schema 4.4.0 → 4.5.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.
@@ -4,6 +4,72 @@
4
4
  "ControlAccountRoutingEvidenceResponse": {
5
5
  "type": "object",
6
6
  "properties": {
7
+ "capabilities": {
8
+ "type": "array",
9
+ "items": {
10
+ "type": "object",
11
+ "properties": {
12
+ "harness_id": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "description": "Harness family of the account."
16
+ },
17
+ "profile_id": {
18
+ "type": "string",
19
+ "minLength": 1,
20
+ "description": "Account row that refused this model before generation started."
21
+ },
22
+ "requested_model": {
23
+ "type": "string",
24
+ "description": "Model the refused request named."
25
+ },
26
+ "account_fingerprint": {
27
+ "type": [
28
+ "string",
29
+ "null"
30
+ ],
31
+ "description": "Provider account identity the mark is bound to; null when the adapter has none."
32
+ },
33
+ "provider_reason": {
34
+ "type": "string",
35
+ "description": "Latest refusal diagnostic, redacted and at most 1024 characters: the provider's reason for a recognized refusal, the engine's message and vendor code otherwise."
36
+ },
37
+ "observed_at": {
38
+ "type": "string",
39
+ "minLength": 1,
40
+ "description": "Start of this mark's episode, when its row was created (a recognized refusal, or the service elsewhere that confirmed an unrecognized one); renewals and probes keep it."
41
+ },
42
+ "expires_at": {
43
+ "type": "string",
44
+ "minLength": 1,
45
+ "description": "Probe becomes eligible at this time; not a vendor reset."
46
+ },
47
+ "state": {
48
+ "type": "string",
49
+ "enum": [
50
+ "provisional",
51
+ "confirmed",
52
+ "probe_due",
53
+ "probing"
54
+ ],
55
+ "description": "provisional = refused here; confirmed = another account then served the correlated retry; probe_due = expired, the next selection may probe it; probing = one operation holds that probe."
56
+ }
57
+ },
58
+ "required": [
59
+ "harness_id",
60
+ "profile_id",
61
+ "requested_model",
62
+ "account_fingerprint",
63
+ "provider_reason",
64
+ "observed_at",
65
+ "expires_at",
66
+ "state"
67
+ ],
68
+ "additionalProperties": false,
69
+ "description": "A temporary capability mark for one account and one model. It only orders auto selection: the account stays enabled and usable as a last fallback."
70
+ },
71
+ "description": "Temporary capability marks; absent from engines that predate them. A mark clears on a success there or a catalog or credential change; after expires_at one operation may probe the account."
72
+ },
7
73
  "refusals": {
8
74
  "type": "array",
9
75
  "items": {
@@ -94,7 +160,7 @@
94
160
  "lastService"
95
161
  ],
96
162
  "additionalProperties": false,
97
- "description": "Model-scoped account routing evidence: live refusal marks and the durable last-served order."
163
+ "description": "Model-scoped account routing evidence: live refusal marks, temporary capability marks and the durable last-served order."
98
164
  }
99
165
  },
100
166
  "$schema": "http://json-schema.org/draft-07/schema#"
@@ -102,6 +102,10 @@
102
102
  "null"
103
103
  ]
104
104
  },
105
+ "capabilityFingerprint": {
106
+ "type": "string",
107
+ "description": "Opaque capability identity including plan when available; an invalidation token, never cached admission."
108
+ },
105
109
  "observedAt": {
106
110
  "type": "string",
107
111
  "minLength": 1,
@@ -20,6 +20,10 @@
20
20
  "null"
21
21
  ]
22
22
  },
23
+ "capabilityFingerprint": {
24
+ "type": "string",
25
+ "description": "Opaque capability identity including plan when available; an invalidation token, never cached admission."
26
+ },
23
27
  "observedAt": {
24
28
  "type": "string",
25
29
  "minLength": 1,
@@ -18,6 +18,10 @@
18
18
  "null"
19
19
  ]
20
20
  },
21
+ "capabilityFingerprint": {
22
+ "type": "string",
23
+ "description": "Opaque capability identity including plan when available; an invalidation token, never cached admission."
24
+ },
21
25
  "observedAt": {
22
26
  "type": "string",
23
27
  "minLength": 1,
@@ -222,6 +222,60 @@
222
222
  "additionalProperties": false,
223
223
  "description": "Started means the physical send may have begun, not proof the upstream accepted it. A terminal not_started may refine that attempted send only with typed proof no complete inference request was delivered; startedAt and route retain the attempt."
224
224
  },
225
+ "routing": {
226
+ "type": "object",
227
+ "properties": {
228
+ "selectionReason": {
229
+ "type": "string",
230
+ "enum": [
231
+ "listed",
232
+ "unlisted_fallback",
233
+ "marked_fallback",
234
+ "preferred",
235
+ "pinned",
236
+ "probe"
237
+ ]
238
+ },
239
+ "retryOfOperationId": {
240
+ "$ref": "#/definitions/ControlModelOperationDetail/properties/id",
241
+ "description": "Non-empty identifier string."
242
+ },
243
+ "differentialOutcome": {
244
+ "type": "string",
245
+ "enum": [
246
+ "provisional",
247
+ "confirmed",
248
+ "equivalent_refusal",
249
+ "inconclusive"
250
+ ]
251
+ },
252
+ "poolEvents": {
253
+ "type": "array",
254
+ "items": {
255
+ "type": "object",
256
+ "properties": {
257
+ "type": {
258
+ "type": "string"
259
+ },
260
+ "payload": {
261
+ "type": "object",
262
+ "additionalProperties": {}
263
+ }
264
+ },
265
+ "required": [
266
+ "type",
267
+ "payload"
268
+ ],
269
+ "additionalProperties": false
270
+ }
271
+ }
272
+ },
273
+ "required": [
274
+ "selectionReason",
275
+ "poolEvents"
276
+ ],
277
+ "additionalProperties": false
278
+ },
225
279
  "response": {
226
280
  "anyOf": [
227
281
  {
@@ -52,7 +52,7 @@
52
52
  "additionalProperties": false
53
53
  }
54
54
  ],
55
- "description": "Auto keeps a usable prior account; pin never selects another account."
55
+ "description": "Auto text operations prefer preferredProfileId among unmarked accounts of the same catalog tier (listed before unlisted); a listed alternative, a mark or a recent refusal outranks it. History bound to that account keeps it first over a catalog miss only while it has neither a mark nor a recent refusal. Image operations order accounts by the pool alone. Pin never selects another account."
56
56
  },
57
57
  "prompt": {
58
58
  "type": "string",
@@ -381,6 +381,72 @@
381
381
  "routingEvidence": {
382
382
  "type": "object",
383
383
  "properties": {
384
+ "capabilities": {
385
+ "type": "array",
386
+ "items": {
387
+ "type": "object",
388
+ "properties": {
389
+ "harness_id": {
390
+ "type": "string",
391
+ "minLength": 1,
392
+ "description": "Harness family of the account."
393
+ },
394
+ "profile_id": {
395
+ "type": "string",
396
+ "minLength": 1,
397
+ "description": "Account row that refused this model before generation started."
398
+ },
399
+ "requested_model": {
400
+ "type": "string",
401
+ "description": "Model the refused request named."
402
+ },
403
+ "account_fingerprint": {
404
+ "type": [
405
+ "string",
406
+ "null"
407
+ ],
408
+ "description": "Provider account identity the mark is bound to; null when the adapter has none."
409
+ },
410
+ "provider_reason": {
411
+ "type": "string",
412
+ "description": "Latest refusal diagnostic, redacted and at most 1024 characters: the provider's reason for a recognized refusal, the engine's message and vendor code otherwise."
413
+ },
414
+ "observed_at": {
415
+ "type": "string",
416
+ "minLength": 1,
417
+ "description": "Start of this mark's episode, when its row was created (a recognized refusal, or the service elsewhere that confirmed an unrecognized one); renewals and probes keep it."
418
+ },
419
+ "expires_at": {
420
+ "type": "string",
421
+ "minLength": 1,
422
+ "description": "Probe becomes eligible at this time; not a vendor reset."
423
+ },
424
+ "state": {
425
+ "type": "string",
426
+ "enum": [
427
+ "provisional",
428
+ "confirmed",
429
+ "probe_due",
430
+ "probing"
431
+ ],
432
+ "description": "provisional = refused here; confirmed = another account then served the correlated retry; probe_due = expired, the next selection may probe it; probing = one operation holds that probe."
433
+ }
434
+ },
435
+ "required": [
436
+ "harness_id",
437
+ "profile_id",
438
+ "requested_model",
439
+ "account_fingerprint",
440
+ "provider_reason",
441
+ "observed_at",
442
+ "expires_at",
443
+ "state"
444
+ ],
445
+ "additionalProperties": false,
446
+ "description": "A temporary capability mark for one account and one model. It only orders auto selection: the account stays enabled and usable as a last fallback."
447
+ },
448
+ "description": "Temporary capability marks; absent from engines that predate them. A mark clears on a success there or a catalog or credential change; after expires_at one operation may probe the account."
449
+ },
384
450
  "refusals": {
385
451
  "type": "array",
386
452
  "items": {
@@ -52,7 +52,11 @@
52
52
  "additionalProperties": false
53
53
  }
54
54
  ],
55
- "description": "Auto keeps a usable prior account; pin never selects another account."
55
+ "description": "Auto text operations prefer preferredProfileId among unmarked accounts of the same catalog tier (listed before unlisted); a listed alternative, a mark or a recent refusal outranks it. History bound to that account keeps it first over a catalog miss only while it has neither a mark nor a recent refusal. Image operations order accounts by the pool alone. Pin never selects another account."
56
+ },
57
+ "retryOfOperationId": {
58
+ "$ref": "#/definitions/ModelCallRequest/properties/source",
59
+ "description": "One host-owned capability retry of a failed auto operation with otherwise identical generation input. No engine re-dispatch; unavailable after daemon restart or four hours."
56
60
  },
57
61
  "messages": {
58
62
  "type": "array",
@@ -4,6 +4,61 @@
4
4
  "ModelCallResult": {
5
5
  "type": "object",
6
6
  "properties": {
7
+ "routing": {
8
+ "type": "object",
9
+ "properties": {
10
+ "selectionReason": {
11
+ "type": "string",
12
+ "enum": [
13
+ "listed",
14
+ "unlisted_fallback",
15
+ "marked_fallback",
16
+ "preferred",
17
+ "pinned",
18
+ "probe"
19
+ ]
20
+ },
21
+ "retryOfOperationId": {
22
+ "type": "string",
23
+ "minLength": 1,
24
+ "description": "Non-empty identifier string."
25
+ },
26
+ "differentialOutcome": {
27
+ "type": "string",
28
+ "enum": [
29
+ "provisional",
30
+ "confirmed",
31
+ "equivalent_refusal",
32
+ "inconclusive"
33
+ ]
34
+ },
35
+ "poolEvents": {
36
+ "type": "array",
37
+ "items": {
38
+ "type": "object",
39
+ "properties": {
40
+ "type": {
41
+ "type": "string"
42
+ },
43
+ "payload": {
44
+ "type": "object",
45
+ "additionalProperties": {}
46
+ }
47
+ },
48
+ "required": [
49
+ "type",
50
+ "payload"
51
+ ],
52
+ "additionalProperties": false
53
+ }
54
+ }
55
+ },
56
+ "required": [
57
+ "selectionReason",
58
+ "poolEvents"
59
+ ],
60
+ "additionalProperties": false
61
+ },
7
62
  "outcome": {
8
63
  "type": "string",
9
64
  "enum": [
@@ -53,8 +108,7 @@
53
108
  "type": "string"
54
109
  },
55
110
  "tool_call_id": {
56
- "type": "string",
57
- "minLength": 1,
111
+ "$ref": "#/definitions/ModelCallResult/properties/routing/properties/retryOfOperationId",
58
112
  "description": "Non-empty identifier string."
59
113
  },
60
114
  "tool_calls": {
@@ -63,7 +117,7 @@
63
117
  "type": "object",
64
118
  "properties": {
65
119
  "id": {
66
- "$ref": "#/definitions/ModelCallResult/properties/message/anyOf/0/properties/tool_call_id"
120
+ "$ref": "#/definitions/ModelCallResult/properties/routing/properties/retryOfOperationId"
67
121
  },
68
122
  "type": {
69
123
  "type": "string",
@@ -104,10 +158,10 @@
104
158
  "type": "object",
105
159
  "properties": {
106
160
  "source": {
107
- "$ref": "#/definitions/ModelCallResult/properties/message/anyOf/0/properties/tool_call_id"
161
+ "$ref": "#/definitions/ModelCallResult/properties/routing/properties/retryOfOperationId"
108
162
  },
109
163
  "credentialProfileId": {
110
- "$ref": "#/definitions/ModelCallResult/properties/message/anyOf/0/properties/tool_call_id"
164
+ "$ref": "#/definitions/ModelCallResult/properties/routing/properties/retryOfOperationId"
111
165
  },
112
166
  "accountFingerprint": {
113
167
  "type": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claudexor/schema",
3
- "version": "4.4.0",
3
+ "version": "4.5.0",
4
4
  "license": "MIT",
5
5
  "description": "Single source of truth for all Claudexor data shapes (Zod + generated JSON Schema).",
6
6
  "type": "module",
@@ -20,7 +20,7 @@
20
20
  "dependencies": {
21
21
  "zod": "^4.6.5",
22
22
  "zod-to-json-schema": "^3.24.1",
23
- "@claudexor/util": "4.4.0"
23
+ "@claudexor/util": "4.5.0"
24
24
  },
25
25
  "repository": {
26
26
  "type": "git",