@claudexor/schema 4.0.1 → 4.1.1

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 (98) hide show
  1. package/dist/account-resources.d.ts +64 -27
  2. package/dist/account-resources.d.ts.map +1 -1
  3. package/dist/account-target.d.ts +3 -0
  4. package/dist/account-target.d.ts.map +1 -1
  5. package/dist/account-target.js +2 -0
  6. package/dist/account-target.js.map +1 -1
  7. package/dist/attachment.js +1 -1
  8. package/dist/attachment.js.map +1 -1
  9. package/dist/budget.d.ts +3 -0
  10. package/dist/budget.d.ts.map +1 -1
  11. package/dist/budget.js +2 -0
  12. package/dist/budget.js.map +1 -1
  13. package/dist/control-operation-responses.d.ts +54 -0
  14. package/dist/control-operation-responses.d.ts.map +1 -1
  15. package/dist/control-process-scope.d.ts +58 -0
  16. package/dist/control-process-scope.d.ts.map +1 -0
  17. package/dist/control-process-scope.js +39 -0
  18. package/dist/control-process-scope.js.map +1 -0
  19. package/dist/control-run-detail.d.ts +108 -0
  20. package/dist/control-run-detail.d.ts.map +1 -1
  21. package/dist/control.d.ts +39 -0
  22. package/dist/control.d.ts.map +1 -1
  23. package/dist/control.js +3 -0
  24. package/dist/control.js.map +1 -1
  25. package/dist/credential-profile-snapshot.d.ts +64 -28
  26. package/dist/credential-profile-snapshot.d.ts.map +1 -1
  27. package/dist/daemon-status.d.ts +40 -0
  28. package/dist/daemon-status.d.ts.map +1 -1
  29. package/dist/gate.d.ts.map +1 -1
  30. package/dist/gate.js +1 -1
  31. package/dist/gate.js.map +1 -1
  32. package/dist/harness-quota.d.ts +8 -3
  33. package/dist/harness-quota.d.ts.map +1 -1
  34. package/dist/harness.d.ts +17 -5
  35. package/dist/harness.d.ts.map +1 -1
  36. package/dist/index.d.ts +3 -0
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +3 -0
  39. package/dist/index.js.map +1 -1
  40. package/dist/model-image.d.ts +416 -0
  41. package/dist/model-image.d.ts.map +1 -0
  42. package/dist/model-image.js +77 -0
  43. package/dist/model-image.js.map +1 -0
  44. package/dist/model-operation.d.ts +143 -0
  45. package/dist/model-operation.d.ts.map +1 -1
  46. package/dist/model-operation.js +22 -0
  47. package/dist/model-operation.js.map +1 -1
  48. package/dist/process-scope.d.ts +125 -0
  49. package/dist/process-scope.d.ts.map +1 -0
  50. package/dist/process-scope.js +81 -0
  51. package/dist/process-scope.js.map +1 -0
  52. package/dist/quota-availability.d.ts +33 -0
  53. package/dist/quota-availability.d.ts.map +1 -0
  54. package/dist/quota-availability.js +130 -0
  55. package/dist/quota-availability.js.map +1 -0
  56. package/dist/quota-read.d.ts +38 -9
  57. package/dist/quota-read.d.ts.map +1 -1
  58. package/dist/quota-read.js +5 -3
  59. package/dist/quota-read.js.map +1 -1
  60. package/dist/quota-request-kind.d.ts +9 -0
  61. package/dist/quota-request-kind.d.ts.map +1 -0
  62. package/dist/quota-request-kind.js +8 -0
  63. package/dist/quota-request-kind.js.map +1 -0
  64. package/dist/quota.d.ts +60 -49
  65. package/dist/quota.d.ts.map +1 -1
  66. package/dist/quota.js +17 -126
  67. package/dist/quota.js.map +1 -1
  68. package/dist/rate-limit.d.ts +3 -0
  69. package/dist/rate-limit.d.ts.map +1 -1
  70. package/dist/rate-limit.js +2 -0
  71. package/dist/rate-limit.js.map +1 -1
  72. package/dist/store-status.d.ts +28 -0
  73. package/dist/store-status.d.ts.map +1 -1
  74. package/dist/store-status.js +10 -0
  75. package/dist/store-status.js.map +1 -1
  76. package/generated/BudgetObservation.schema.json +11 -0
  77. package/generated/ControlAccountResetResponse.schema.json +14 -1
  78. package/generated/ControlAccountResourcesResponse.schema.json +14 -1
  79. package/generated/ControlCredentialProfilesQueryResponse.schema.json +14 -1
  80. package/generated/ControlCredentialProfilesResourcesResponse.schema.json +14 -1
  81. package/generated/ControlCredentialProfilesSnapshotResponse.schema.json +14 -1
  82. package/generated/ControlDaemonStatus.schema.json +52 -0
  83. package/generated/ControlModelSourcesAccountsResponse.schema.json +62 -0
  84. package/generated/ControlModelSourcesQueryResponse.schema.json +62 -0
  85. package/generated/ControlQuotaFreshnessResponse.schema.json +14 -1
  86. package/generated/ControlQuotaQueryResponse.schema.json +17 -1
  87. package/generated/ControlQuotaReadRequest.schema.json +15 -1
  88. package/generated/ControlQuotaRefreshRequest.schema.json +8 -0
  89. package/generated/ControlQuotaResponse.schema.json +14 -1
  90. package/generated/ControlRunDetail.schema.json +62 -0
  91. package/generated/ControlRunListResponse.schema.json +62 -0
  92. package/generated/ControlRunSummary.schema.json +62 -0
  93. package/generated/ControlUploadCreateRequest.schema.json +1 -1
  94. package/generated/GateResult.schema.json +1 -1
  95. package/generated/HarnessEvent.schema.json +21 -1
  96. package/generated/ImageCallRequest.schema.json +145 -0
  97. package/generated/ImageCallResult.schema.json +415 -0
  98. package/package.json +2 -2
@@ -0,0 +1,145 @@
1
+ {
2
+ "$ref": "#/definitions/ImageCallRequest",
3
+ "definitions": {
4
+ "ImageCallRequest": {
5
+ "type": "object",
6
+ "properties": {
7
+ "source": {
8
+ "type": "string",
9
+ "minLength": 1,
10
+ "description": "Non-empty identifier string."
11
+ },
12
+ "model": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "pattern": "\\S",
16
+ "description": "Explicit image model; never derived from a text model."
17
+ },
18
+ "account": {
19
+ "anyOf": [
20
+ {
21
+ "type": "object",
22
+ "properties": {
23
+ "mode": {
24
+ "type": "string",
25
+ "const": "auto"
26
+ },
27
+ "preferredProfileId": {
28
+ "$ref": "#/definitions/ImageCallRequest/properties/source",
29
+ "description": "Non-empty identifier string."
30
+ }
31
+ },
32
+ "required": [
33
+ "mode"
34
+ ],
35
+ "additionalProperties": false
36
+ },
37
+ {
38
+ "type": "object",
39
+ "properties": {
40
+ "mode": {
41
+ "type": "string",
42
+ "const": "pin"
43
+ },
44
+ "profileId": {
45
+ "$ref": "#/definitions/ImageCallRequest/properties/source"
46
+ }
47
+ },
48
+ "required": [
49
+ "mode",
50
+ "profileId"
51
+ ],
52
+ "additionalProperties": false
53
+ }
54
+ ],
55
+ "description": "Auto keeps a usable prior account; pin never selects another account."
56
+ },
57
+ "prompt": {
58
+ "type": "string",
59
+ "minLength": 1,
60
+ "pattern": "\\S",
61
+ "description": "User-supplied string that must contain visible content, not just whitespace."
62
+ },
63
+ "images": {
64
+ "type": "array",
65
+ "items": {
66
+ "type": "object",
67
+ "properties": {
68
+ "mime": {
69
+ "type": "string",
70
+ "enum": [
71
+ "image/png",
72
+ "image/jpeg",
73
+ "image/webp"
74
+ ]
75
+ },
76
+ "sha256": {
77
+ "type": "string",
78
+ "pattern": "^sha256:[a-f0-9]{64}$",
79
+ "description": "Digest of the decoded bytes."
80
+ },
81
+ "dataBase64": {
82
+ "type": "string",
83
+ "minLength": 1,
84
+ "description": "The caller's exact bytes in standard base64; forwarded verbatim, never re-encoded."
85
+ }
86
+ },
87
+ "required": [
88
+ "mime",
89
+ "sha256",
90
+ "dataBase64"
91
+ ],
92
+ "additionalProperties": false,
93
+ "description": "One caller-owned edit reference; decoded bytes must match mime and sha256."
94
+ },
95
+ "default": [],
96
+ "description": "Empty selects generation; one or more selects an edit of these references."
97
+ },
98
+ "options": {
99
+ "type": "object",
100
+ "properties": {
101
+ "size": {
102
+ "$ref": "#/definitions/ImageCallRequest/properties/prompt",
103
+ "description": "Vendor size token, e.g. \"auto\" or \"1024x1024\"."
104
+ },
105
+ "quality": {
106
+ "type": "string",
107
+ "enum": [
108
+ "low",
109
+ "medium",
110
+ "high",
111
+ "auto"
112
+ ]
113
+ },
114
+ "background": {
115
+ "type": "string",
116
+ "enum": [
117
+ "transparent",
118
+ "opaque",
119
+ "auto"
120
+ ]
121
+ },
122
+ "n": {
123
+ "type": "integer",
124
+ "exclusiveMinimum": 0,
125
+ "maximum": 10,
126
+ "description": "Requested image count in ONE provider request. Omitted sends no n; the provider may return several items either way."
127
+ }
128
+ },
129
+ "additionalProperties": false,
130
+ "description": "Only explicit options are sent; this transport adds no defaults of its own.",
131
+ "default": {}
132
+ }
133
+ },
134
+ "required": [
135
+ "source",
136
+ "model",
137
+ "account",
138
+ "prompt"
139
+ ],
140
+ "additionalProperties": false,
141
+ "description": "One image generation or edit request, stored only in a model-purpose payload outside the command journal."
142
+ }
143
+ },
144
+ "$schema": "http://json-schema.org/draft-07/schema#"
145
+ }
@@ -0,0 +1,415 @@
1
+ {
2
+ "$ref": "#/definitions/ImageCallResult",
3
+ "definitions": {
4
+ "ImageCallResult": {
5
+ "type": "object",
6
+ "properties": {
7
+ "outcome": {
8
+ "type": "string",
9
+ "enum": [
10
+ "completed",
11
+ "failed",
12
+ "unknown"
13
+ ]
14
+ },
15
+ "operation": {
16
+ "type": "string",
17
+ "enum": [
18
+ "generate",
19
+ "edit"
20
+ ]
21
+ },
22
+ "requestedModel": {
23
+ "type": "string",
24
+ "minLength": 1,
25
+ "pattern": "\\S",
26
+ "description": "The model the caller asked for. route.model contains only a provider-observed model, or null."
27
+ },
28
+ "images": {
29
+ "type": "array",
30
+ "items": {
31
+ "type": "object",
32
+ "properties": {
33
+ "mime": {
34
+ "type": "string",
35
+ "enum": [
36
+ "image/png",
37
+ "image/jpeg",
38
+ "image/webp"
39
+ ],
40
+ "description": "Sniffed from the decoded bytes."
41
+ },
42
+ "sha256": {
43
+ "type": "string",
44
+ "pattern": "^sha256:[a-f0-9]{64}$",
45
+ "description": "Digest of the decoded bytes."
46
+ },
47
+ "sizeBytes": {
48
+ "type": "integer",
49
+ "minimum": 0
50
+ },
51
+ "dataBase64": {
52
+ "type": "string",
53
+ "minLength": 1,
54
+ "description": "The provider's b64_json, exact."
55
+ },
56
+ "generationId": {
57
+ "type": [
58
+ "string",
59
+ "null"
60
+ ]
61
+ }
62
+ },
63
+ "required": [
64
+ "mime",
65
+ "sha256",
66
+ "sizeBytes",
67
+ "dataBase64",
68
+ "generationId"
69
+ ],
70
+ "additionalProperties": false
71
+ },
72
+ "description": "Every usable returned item, in provider order; rejected items are diagnosed in problem."
73
+ },
74
+ "route": {
75
+ "type": "object",
76
+ "properties": {
77
+ "source": {
78
+ "type": "string",
79
+ "minLength": 1,
80
+ "description": "Non-empty identifier string."
81
+ },
82
+ "credentialProfileId": {
83
+ "$ref": "#/definitions/ImageCallResult/properties/route/properties/source"
84
+ },
85
+ "accountFingerprint": {
86
+ "type": [
87
+ "string",
88
+ "null"
89
+ ]
90
+ },
91
+ "model": {
92
+ "type": [
93
+ "string",
94
+ "null"
95
+ ]
96
+ }
97
+ },
98
+ "required": [
99
+ "source",
100
+ "credentialProfileId",
101
+ "accountFingerprint",
102
+ "model"
103
+ ],
104
+ "additionalProperties": false,
105
+ "description": "Selected route at dispatch; a result records the actually observed model, or null."
106
+ },
107
+ "appliedOptions": {
108
+ "type": "object",
109
+ "properties": {
110
+ "size": {
111
+ "type": "string",
112
+ "minLength": 1,
113
+ "pattern": "\\S",
114
+ "description": "Vendor size token, e.g. \"auto\" or \"1024x1024\"."
115
+ },
116
+ "quality": {
117
+ "type": "string",
118
+ "enum": [
119
+ "low",
120
+ "medium",
121
+ "high",
122
+ "auto"
123
+ ]
124
+ },
125
+ "background": {
126
+ "type": "string",
127
+ "enum": [
128
+ "transparent",
129
+ "opaque",
130
+ "auto"
131
+ ]
132
+ },
133
+ "n": {
134
+ "type": "integer",
135
+ "exclusiveMinimum": 0,
136
+ "maximum": 10,
137
+ "description": "Requested image count in ONE provider request. Omitted sends no n; the provider may return several items either way."
138
+ }
139
+ },
140
+ "additionalProperties": false,
141
+ "description": "As reported by the provider response."
142
+ },
143
+ "usage": {
144
+ "type": "object",
145
+ "properties": {
146
+ "input_tokens": {
147
+ "anyOf": [
148
+ {
149
+ "type": "integer",
150
+ "minimum": 0
151
+ },
152
+ {
153
+ "type": "null"
154
+ }
155
+ ],
156
+ "default": null
157
+ },
158
+ "output_tokens": {
159
+ "anyOf": [
160
+ {
161
+ "type": "integer",
162
+ "minimum": 0
163
+ },
164
+ {
165
+ "type": "null"
166
+ }
167
+ ],
168
+ "default": null
169
+ },
170
+ "cached_input_tokens": {
171
+ "anyOf": [
172
+ {
173
+ "type": "integer",
174
+ "minimum": 0
175
+ },
176
+ {
177
+ "type": "null"
178
+ }
179
+ ],
180
+ "default": null
181
+ },
182
+ "cache_write_tokens": {
183
+ "anyOf": [
184
+ {
185
+ "type": "integer",
186
+ "minimum": 0
187
+ },
188
+ {
189
+ "type": "null"
190
+ }
191
+ ],
192
+ "default": null
193
+ },
194
+ "reasoning_tokens": {
195
+ "anyOf": [
196
+ {
197
+ "type": "integer",
198
+ "minimum": 0
199
+ },
200
+ {
201
+ "type": "null"
202
+ }
203
+ ],
204
+ "default": null
205
+ }
206
+ },
207
+ "additionalProperties": false,
208
+ "description": "Provider-reported counters for one generation; missing counters remain null."
209
+ },
210
+ "cost": {
211
+ "type": "object",
212
+ "properties": {
213
+ "processing": {
214
+ "type": "object",
215
+ "properties": {
216
+ "nativeMode": {
217
+ "anyOf": [
218
+ {
219
+ "$ref": "#/definitions/ImageCallResult/properties/appliedOptions/properties/size"
220
+ },
221
+ {
222
+ "type": "null"
223
+ }
224
+ ],
225
+ "description": "User-supplied string that must contain visible content, not just whitespace."
226
+ },
227
+ "kind": {
228
+ "type": "string",
229
+ "enum": [
230
+ "included",
231
+ "paid_credits",
232
+ "cash",
233
+ "valuation",
234
+ "unknown"
235
+ ]
236
+ },
237
+ "source": {
238
+ "$ref": "#/definitions/ImageCallResult/properties/appliedOptions/properties/size"
239
+ }
240
+ },
241
+ "required": [
242
+ "nativeMode",
243
+ "kind",
244
+ "source"
245
+ ],
246
+ "additionalProperties": false,
247
+ "description": "Mode-qualified billing evidence for an existing cost record. Authentication alone does not establish included premium service; credits, cash, and token valuation stay distinct."
248
+ },
249
+ "knowledge": {
250
+ "type": "string",
251
+ "enum": [
252
+ "exact",
253
+ "estimated",
254
+ "unknown"
255
+ ],
256
+ "description": "Quality of incremental-cash cost evidence for an operation."
257
+ },
258
+ "billing": {
259
+ "type": "string",
260
+ "enum": [
261
+ "proven_zero",
262
+ "subscription_entitlement",
263
+ "metered",
264
+ "unknown"
265
+ ],
266
+ "description": "What is actually known about incremental billing; a native credential route alone never proves entitlement or zero cost."
267
+ },
268
+ "source": {
269
+ "type": "string",
270
+ "minLength": 1
271
+ },
272
+ "provenance": {
273
+ "type": "array",
274
+ "items": {
275
+ "type": "string",
276
+ "minLength": 1
277
+ },
278
+ "minItems": 1
279
+ },
280
+ "estimatedUsd": {
281
+ "anyOf": [
282
+ {
283
+ "type": "number",
284
+ "minimum": 0
285
+ },
286
+ {
287
+ "type": "null"
288
+ }
289
+ ],
290
+ "default": null
291
+ },
292
+ "cashUsd": {
293
+ "anyOf": [
294
+ {
295
+ "type": "number",
296
+ "minimum": 0
297
+ },
298
+ {
299
+ "type": "null"
300
+ }
301
+ ],
302
+ "default": null
303
+ },
304
+ "valuationUsd": {
305
+ "anyOf": [
306
+ {
307
+ "type": "number",
308
+ "minimum": 0
309
+ },
310
+ {
311
+ "type": "null"
312
+ }
313
+ ],
314
+ "default": null
315
+ },
316
+ "valuationKnowledge": {
317
+ "$ref": "#/definitions/ImageCallResult/properties/cost/properties/knowledge",
318
+ "default": "unknown",
319
+ "description": "Quality of incremental-cash cost evidence for an operation."
320
+ }
321
+ },
322
+ "required": [
323
+ "knowledge",
324
+ "billing",
325
+ "source",
326
+ "provenance"
327
+ ],
328
+ "additionalProperties": false,
329
+ "description": "Incremental cash and token valuation are independent; subscription credentials alone never invent a cash receipt."
330
+ },
331
+ "providerRequestId": {
332
+ "type": [
333
+ "string",
334
+ "null"
335
+ ]
336
+ },
337
+ "problem": {
338
+ "anyOf": [
339
+ {
340
+ "type": "object",
341
+ "properties": {
342
+ "code": {
343
+ "type": "string",
344
+ "minLength": 1
345
+ },
346
+ "message": {
347
+ "type": "string"
348
+ },
349
+ "retryable": {
350
+ "type": "boolean"
351
+ },
352
+ "fieldErrors": {
353
+ "type": "object",
354
+ "additionalProperties": {
355
+ "type": "array",
356
+ "items": {
357
+ "type": "string"
358
+ }
359
+ },
360
+ "default": {}
361
+ },
362
+ "requiredActions": {
363
+ "type": "array",
364
+ "items": {
365
+ "type": "string",
366
+ "minLength": 1
367
+ },
368
+ "default": []
369
+ },
370
+ "evidenceRefs": {
371
+ "type": "array",
372
+ "items": {
373
+ "type": "string",
374
+ "minLength": 1
375
+ },
376
+ "default": []
377
+ },
378
+ "context": {
379
+ "type": "object",
380
+ "additionalProperties": {},
381
+ "default": {},
382
+ "description": "Typed route-specific recovery context; never a duplicate error message."
383
+ }
384
+ },
385
+ "required": [
386
+ "code",
387
+ "message",
388
+ "retryable"
389
+ ],
390
+ "additionalProperties": false
391
+ },
392
+ {
393
+ "type": "null"
394
+ }
395
+ ]
396
+ }
397
+ },
398
+ "required": [
399
+ "outcome",
400
+ "operation",
401
+ "requestedModel",
402
+ "images",
403
+ "route",
404
+ "appliedOptions",
405
+ "usage",
406
+ "cost",
407
+ "providerRequestId",
408
+ "problem"
409
+ ],
410
+ "additionalProperties": false,
411
+ "description": "One provider image outcome; base64 lives only in this private result resource, never in model text."
412
+ }
413
+ },
414
+ "$schema": "http://json-schema.org/draft-07/schema#"
415
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claudexor/schema",
3
- "version": "4.0.1",
3
+ "version": "4.1.1",
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.0.1"
23
+ "@claudexor/util": "4.1.1"
24
24
  },
25
25
  "repository": {
26
26
  "type": "git",