@claudexor/schema 3.24.0 → 4.0.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 (79) hide show
  1. package/dist/account-resources.d.ts +6214 -0
  2. package/dist/account-resources.d.ts.map +1 -0
  3. package/dist/account-resources.js +165 -0
  4. package/dist/account-resources.js.map +1 -0
  5. package/dist/account-target.d.ts +39 -0
  6. package/dist/account-target.d.ts.map +1 -0
  7. package/dist/account-target.js +16 -0
  8. package/dist/account-target.js.map +1 -0
  9. package/dist/config.d.ts +74 -12
  10. package/dist/config.d.ts.map +1 -1
  11. package/dist/config.js +2 -1
  12. package/dist/config.js.map +1 -1
  13. package/dist/control.d.ts +226 -18
  14. package/dist/control.d.ts.map +1 -1
  15. package/dist/credential-profile-snapshot.d.ts +5987 -126
  16. package/dist/credential-profile-snapshot.d.ts.map +1 -1
  17. package/dist/credential-profile-snapshot.js +9 -1
  18. package/dist/credential-profile-snapshot.js.map +1 -1
  19. package/dist/daemon-status.d.ts +671 -5
  20. package/dist/daemon-status.d.ts.map +1 -1
  21. package/dist/daemon-status.js +31 -1
  22. package/dist/daemon-status.js.map +1 -1
  23. package/dist/harness-quota.d.ts +81 -0
  24. package/dist/harness-quota.d.ts.map +1 -0
  25. package/dist/harness-quota.js +20 -0
  26. package/dist/harness-quota.js.map +1 -0
  27. package/dist/harness.d.ts +116 -99
  28. package/dist/harness.d.ts.map +1 -1
  29. package/dist/harness.js +2 -12
  30. package/dist/harness.js.map +1 -1
  31. package/dist/host-binding.d.ts +23 -0
  32. package/dist/host-binding.d.ts.map +1 -0
  33. package/dist/host-binding.js +14 -0
  34. package/dist/host-binding.js.map +1 -0
  35. package/dist/index.d.ts +4 -0
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +4 -0
  38. package/dist/index.js.map +1 -1
  39. package/dist/model-operation.d.ts +93 -0
  40. package/dist/model-operation.d.ts.map +1 -1
  41. package/dist/model-operation.js +4 -0
  42. package/dist/model-operation.js.map +1 -1
  43. package/dist/project.d.ts +48 -0
  44. package/dist/project.d.ts.map +1 -1
  45. package/dist/project.js +8 -0
  46. package/dist/project.js.map +1 -1
  47. package/dist/quota-read.d.ts +554 -0
  48. package/dist/quota-read.d.ts.map +1 -0
  49. package/dist/quota-read.js +18 -0
  50. package/dist/quota-read.js.map +1 -0
  51. package/dist/quota.d.ts +1 -8
  52. package/dist/quota.d.ts.map +1 -1
  53. package/dist/quota.js +1 -10
  54. package/dist/quota.js.map +1 -1
  55. package/dist/runtime-concurrency.d.ts +359 -23
  56. package/dist/runtime-concurrency.d.ts.map +1 -1
  57. package/dist/runtime-concurrency.js +61 -17
  58. package/dist/runtime-concurrency.js.map +1 -1
  59. package/dist/store-status.d.ts +439 -0
  60. package/dist/store-status.d.ts.map +1 -0
  61. package/dist/store-status.js +58 -0
  62. package/dist/store-status.js.map +1 -0
  63. package/generated/ControlAccountResetRequest.schema.json +42 -0
  64. package/generated/ControlAccountResetResponse.schema.json +1024 -0
  65. package/generated/ControlAccountResourcesResponse.schema.json +912 -0
  66. package/generated/ControlCredentialProfilesQueryResponse.schema.json +600 -0
  67. package/generated/ControlCredentialProfilesResourcesResponse.schema.json +2324 -0
  68. package/generated/ControlDaemonStatus.schema.json +535 -7
  69. package/generated/ControlModelOperationDetail.schema.json +103 -0
  70. package/generated/ControlProjectRegisterResponse.schema.json +82 -0
  71. package/generated/ControlQuotaFreshnessResponse.schema.json +377 -0
  72. package/generated/ControlQuotaQueryResponse.schema.json +1048 -0
  73. package/generated/ControlQuotaReadRequest.schema.json +19 -0
  74. package/generated/ControlQuotaRefreshRequest.schema.json +18 -0
  75. package/generated/ControlSettingsSnapshot.schema.json +59 -6
  76. package/generated/ExternalHostBinding.schema.json +43 -0
  77. package/generated/GlobalConfig.schema.json +26 -8
  78. package/generated/HarnessEvent.schema.json +23 -0
  79. package/package.json +3 -3
@@ -0,0 +1,554 @@
1
+ import { z } from "zod/v3";
2
+ /** Response-only schemas: neither persisted evidence nor legacy wire shapes
3
+ * accept constraint freshness. Clients explicitly select the read projection;
4
+ * operation discovery is optional, and old engines may return strict legacy data
5
+ * (3.24) or reject the selector with HTTP 400 (3.25.0/3.25.1). */
6
+ export declare const ControlQuotaReadRequest: z.ZodObject<{
7
+ view: z.ZodOptional<z.ZodEnum<["resources", "constraint_freshness"]>>;
8
+ }, "strict", z.ZodTypeAny, {
9
+ view?: "constraint_freshness" | "resources" | undefined;
10
+ }, {
11
+ view?: "constraint_freshness" | "resources" | undefined;
12
+ }>;
13
+ export type ControlQuotaReadRequest = z.infer<typeof ControlQuotaReadRequest>;
14
+ export declare const ControlQuotaFreshnessSnapshot: z.ZodObject<{
15
+ subject: z.ZodObject<{
16
+ harness: z.ZodString;
17
+ credential_route: z.ZodEnum<["vendor_native", "managed_api_key", "local"]>;
18
+ plan_label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
19
+ subject_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
20
+ }, "strict", z.ZodTypeAny, {
21
+ harness: string;
22
+ credential_route: "local" | "managed_api_key" | "vendor_native";
23
+ plan_label: string | null;
24
+ subject_id: string | null;
25
+ }, {
26
+ harness: string;
27
+ credential_route: "local" | "managed_api_key" | "vendor_native";
28
+ plan_label?: string | null | undefined;
29
+ subject_id?: string | null | undefined;
30
+ }>;
31
+ source: z.ZodEnum<["codex_app_server", "codex_rollout", "claude_statusline", "claude_api_retry", "claude_oauth_usage", "agy_command_usage", "cursor_rate_limit", "claude_rate_limit_event", "codex_app_server_event"]>;
32
+ observed_at: z.ZodString;
33
+ freshness: z.ZodEnum<["fresh", "stale", "unknown"]>;
34
+ snapshot_id: z.ZodOptional<z.ZodString>;
35
+ availability: z.ZodOptional<z.ZodObject<{
36
+ state: z.ZodEnum<["available", "exhausted", "cooldown"]>;
37
+ blocking_constraints: z.ZodArray<z.ZodString, "many">;
38
+ resets_at: z.ZodNullable<z.ZodString>;
39
+ model_scoped_exhaustions: z.ZodArray<z.ZodObject<{
40
+ constraint_id: z.ZodString;
41
+ applies_to_models: z.ZodArray<z.ZodString, "many">;
42
+ applies_to_model_prefixes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
43
+ resets_at: z.ZodNullable<z.ZodString>;
44
+ }, "strict", z.ZodTypeAny, {
45
+ constraint_id: string;
46
+ applies_to_models: string[];
47
+ applies_to_model_prefixes?: string[] | undefined;
48
+ resets_at: string | null;
49
+ }, {
50
+ constraint_id: string;
51
+ applies_to_models: string[];
52
+ applies_to_model_prefixes?: string[] | undefined;
53
+ resets_at: string | null;
54
+ }>, "many">;
55
+ }, "strict", z.ZodTypeAny, {
56
+ state: "available" | "cooldown" | "exhausted";
57
+ blocking_constraints: string[];
58
+ resets_at: string | null;
59
+ model_scoped_exhaustions: {
60
+ constraint_id: string;
61
+ applies_to_models: string[];
62
+ applies_to_model_prefixes?: string[] | undefined;
63
+ resets_at: string | null;
64
+ }[];
65
+ }, {
66
+ state: "available" | "cooldown" | "exhausted";
67
+ blocking_constraints: string[];
68
+ resets_at: string | null;
69
+ model_scoped_exhaustions: {
70
+ constraint_id: string;
71
+ applies_to_models: string[];
72
+ applies_to_model_prefixes?: string[] | undefined;
73
+ resets_at: string | null;
74
+ }[];
75
+ }>>;
76
+ } & {
77
+ constraints: z.ZodArray<z.ZodObject<{
78
+ id: z.ZodString;
79
+ label: z.ZodString;
80
+ applies_to_models: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
81
+ applies_to_model_prefixes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
82
+ applies_to_unspecified_model: z.ZodOptional<z.ZodBoolean>;
83
+ used_ratio: z.ZodNullable<z.ZodNumber>;
84
+ window_seconds: z.ZodNullable<z.ZodNumber>;
85
+ resets_at: z.ZodNullable<z.ZodString>;
86
+ cooldown_until: z.ZodDefault<z.ZodNullable<z.ZodString>>;
87
+ } & {
88
+ freshness: z.ZodEnum<["fresh", "stale", "unknown"]>;
89
+ }, "strict", z.ZodTypeAny, {
90
+ id: string;
91
+ label: string;
92
+ applies_to_models?: string[] | null | undefined;
93
+ applies_to_model_prefixes?: string[] | undefined;
94
+ applies_to_unspecified_model?: boolean | undefined;
95
+ used_ratio: number | null;
96
+ window_seconds: number | null;
97
+ resets_at: string | null;
98
+ cooldown_until: string | null;
99
+ freshness: "fresh" | "stale" | "unknown";
100
+ }, {
101
+ id: string;
102
+ label: string;
103
+ applies_to_models?: string[] | null | undefined;
104
+ applies_to_model_prefixes?: string[] | undefined;
105
+ applies_to_unspecified_model?: boolean | undefined;
106
+ used_ratio: number | null;
107
+ window_seconds: number | null;
108
+ resets_at: string | null;
109
+ cooldown_until?: string | null | undefined;
110
+ freshness: "fresh" | "stale" | "unknown";
111
+ }>, "many">;
112
+ }, "strict", z.ZodTypeAny, {
113
+ subject: {
114
+ harness: string;
115
+ credential_route: "local" | "managed_api_key" | "vendor_native";
116
+ plan_label: string | null;
117
+ subject_id: string | null;
118
+ };
119
+ source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_rate_limit_event" | "claude_statusline" | "codex_app_server" | "codex_app_server_event" | "codex_rollout" | "cursor_rate_limit";
120
+ observed_at: string;
121
+ freshness: "fresh" | "stale" | "unknown";
122
+ snapshot_id?: string | undefined;
123
+ availability?: {
124
+ state: "available" | "cooldown" | "exhausted";
125
+ blocking_constraints: string[];
126
+ resets_at: string | null;
127
+ model_scoped_exhaustions: {
128
+ constraint_id: string;
129
+ applies_to_models: string[];
130
+ applies_to_model_prefixes?: string[] | undefined;
131
+ resets_at: string | null;
132
+ }[];
133
+ } | undefined;
134
+ constraints: {
135
+ id: string;
136
+ label: string;
137
+ applies_to_models?: string[] | null | undefined;
138
+ applies_to_model_prefixes?: string[] | undefined;
139
+ applies_to_unspecified_model?: boolean | undefined;
140
+ used_ratio: number | null;
141
+ window_seconds: number | null;
142
+ resets_at: string | null;
143
+ cooldown_until: string | null;
144
+ freshness: "fresh" | "stale" | "unknown";
145
+ }[];
146
+ }, {
147
+ subject: {
148
+ harness: string;
149
+ credential_route: "local" | "managed_api_key" | "vendor_native";
150
+ plan_label?: string | null | undefined;
151
+ subject_id?: string | null | undefined;
152
+ };
153
+ source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_rate_limit_event" | "claude_statusline" | "codex_app_server" | "codex_app_server_event" | "codex_rollout" | "cursor_rate_limit";
154
+ observed_at: string;
155
+ freshness: "fresh" | "stale" | "unknown";
156
+ snapshot_id?: string | undefined;
157
+ availability?: {
158
+ state: "available" | "cooldown" | "exhausted";
159
+ blocking_constraints: string[];
160
+ resets_at: string | null;
161
+ model_scoped_exhaustions: {
162
+ constraint_id: string;
163
+ applies_to_models: string[];
164
+ applies_to_model_prefixes?: string[] | undefined;
165
+ resets_at: string | null;
166
+ }[];
167
+ } | undefined;
168
+ constraints: {
169
+ id: string;
170
+ label: string;
171
+ applies_to_models?: string[] | null | undefined;
172
+ applies_to_model_prefixes?: string[] | undefined;
173
+ applies_to_unspecified_model?: boolean | undefined;
174
+ used_ratio: number | null;
175
+ window_seconds: number | null;
176
+ resets_at: string | null;
177
+ cooldown_until?: string | null | undefined;
178
+ freshness: "fresh" | "stale" | "unknown";
179
+ }[];
180
+ }>;
181
+ export type ControlQuotaFreshnessSnapshot = z.infer<typeof ControlQuotaFreshnessSnapshot>;
182
+ export declare const ControlQuotaFreshnessResponse: z.ZodObject<{
183
+ absences: z.ZodDefault<z.ZodArray<z.ZodObject<{
184
+ subject: z.ZodObject<{
185
+ harness: z.ZodString;
186
+ credential_route: z.ZodEnum<["vendor_native", "managed_api_key", "local"]>;
187
+ plan_label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
188
+ subject_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
189
+ }, "strict", z.ZodTypeAny, {
190
+ harness: string;
191
+ credential_route: "local" | "managed_api_key" | "vendor_native";
192
+ plan_label: string | null;
193
+ subject_id: string | null;
194
+ }, {
195
+ harness: string;
196
+ credential_route: "local" | "managed_api_key" | "vendor_native";
197
+ plan_label?: string | null | undefined;
198
+ subject_id?: string | null | undefined;
199
+ }>;
200
+ reason: z.ZodEnum<["not_logged_in", "transport_unavailable", "platform_unsupported", "refresh_failed", "no_source", "auth_revoked", "rate_limited", "probe_skipped_rate_limited", "poll_paced", "credential_profile_ambiguous"]>;
201
+ detail: z.ZodDefault<z.ZodNullable<z.ZodString>>;
202
+ observed_at: z.ZodString;
203
+ retry_after_ms: z.ZodOptional<z.ZodNumber>;
204
+ }, "strict", z.ZodTypeAny, {
205
+ subject: {
206
+ harness: string;
207
+ credential_route: "local" | "managed_api_key" | "vendor_native";
208
+ plan_label: string | null;
209
+ subject_id: string | null;
210
+ };
211
+ reason: "auth_revoked" | "credential_profile_ambiguous" | "no_source" | "not_logged_in" | "platform_unsupported" | "poll_paced" | "probe_skipped_rate_limited" | "rate_limited" | "refresh_failed" | "transport_unavailable";
212
+ detail: string | null;
213
+ observed_at: string;
214
+ retry_after_ms?: number | undefined;
215
+ }, {
216
+ subject: {
217
+ harness: string;
218
+ credential_route: "local" | "managed_api_key" | "vendor_native";
219
+ plan_label?: string | null | undefined;
220
+ subject_id?: string | null | undefined;
221
+ };
222
+ reason: "auth_revoked" | "credential_profile_ambiguous" | "no_source" | "not_logged_in" | "platform_unsupported" | "poll_paced" | "probe_skipped_rate_limited" | "rate_limited" | "refresh_failed" | "transport_unavailable";
223
+ detail?: string | null | undefined;
224
+ observed_at: string;
225
+ retry_after_ms?: number | undefined;
226
+ }>, "many">>;
227
+ refreshed_at: z.ZodNullable<z.ZodString>;
228
+ refresh_skipped: z.ZodOptional<z.ZodArray<z.ZodObject<{
229
+ vendor: z.ZodString;
230
+ subject: z.ZodOptional<z.ZodObject<{
231
+ harness: z.ZodString;
232
+ credential_route: z.ZodEnum<["vendor_native", "managed_api_key", "local"]>;
233
+ plan_label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
234
+ subject_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
235
+ }, "strict", z.ZodTypeAny, {
236
+ harness: string;
237
+ credential_route: "local" | "managed_api_key" | "vendor_native";
238
+ plan_label: string | null;
239
+ subject_id: string | null;
240
+ }, {
241
+ harness: string;
242
+ credential_route: "local" | "managed_api_key" | "vendor_native";
243
+ plan_label?: string | null | undefined;
244
+ subject_id?: string | null | undefined;
245
+ }>>;
246
+ not_before: z.ZodString;
247
+ }, "strict", z.ZodTypeAny, {
248
+ vendor: string;
249
+ subject?: {
250
+ harness: string;
251
+ credential_route: "local" | "managed_api_key" | "vendor_native";
252
+ plan_label: string | null;
253
+ subject_id: string | null;
254
+ } | undefined;
255
+ not_before: string;
256
+ }, {
257
+ vendor: string;
258
+ subject?: {
259
+ harness: string;
260
+ credential_route: "local" | "managed_api_key" | "vendor_native";
261
+ plan_label?: string | null | undefined;
262
+ subject_id?: string | null | undefined;
263
+ } | undefined;
264
+ not_before: string;
265
+ }>, "many">>;
266
+ } & {
267
+ snapshots: z.ZodArray<z.ZodObject<{
268
+ subject: z.ZodObject<{
269
+ harness: z.ZodString;
270
+ credential_route: z.ZodEnum<["vendor_native", "managed_api_key", "local"]>;
271
+ plan_label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
272
+ subject_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
273
+ }, "strict", z.ZodTypeAny, {
274
+ harness: string;
275
+ credential_route: "local" | "managed_api_key" | "vendor_native";
276
+ plan_label: string | null;
277
+ subject_id: string | null;
278
+ }, {
279
+ harness: string;
280
+ credential_route: "local" | "managed_api_key" | "vendor_native";
281
+ plan_label?: string | null | undefined;
282
+ subject_id?: string | null | undefined;
283
+ }>;
284
+ source: z.ZodEnum<["codex_app_server", "codex_rollout", "claude_statusline", "claude_api_retry", "claude_oauth_usage", "agy_command_usage", "cursor_rate_limit", "claude_rate_limit_event", "codex_app_server_event"]>;
285
+ observed_at: z.ZodString;
286
+ freshness: z.ZodEnum<["fresh", "stale", "unknown"]>;
287
+ snapshot_id: z.ZodOptional<z.ZodString>;
288
+ availability: z.ZodOptional<z.ZodObject<{
289
+ state: z.ZodEnum<["available", "exhausted", "cooldown"]>;
290
+ blocking_constraints: z.ZodArray<z.ZodString, "many">;
291
+ resets_at: z.ZodNullable<z.ZodString>;
292
+ model_scoped_exhaustions: z.ZodArray<z.ZodObject<{
293
+ constraint_id: z.ZodString;
294
+ applies_to_models: z.ZodArray<z.ZodString, "many">;
295
+ applies_to_model_prefixes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
296
+ resets_at: z.ZodNullable<z.ZodString>;
297
+ }, "strict", z.ZodTypeAny, {
298
+ constraint_id: string;
299
+ applies_to_models: string[];
300
+ applies_to_model_prefixes?: string[] | undefined;
301
+ resets_at: string | null;
302
+ }, {
303
+ constraint_id: string;
304
+ applies_to_models: string[];
305
+ applies_to_model_prefixes?: string[] | undefined;
306
+ resets_at: string | null;
307
+ }>, "many">;
308
+ }, "strict", z.ZodTypeAny, {
309
+ state: "available" | "cooldown" | "exhausted";
310
+ blocking_constraints: string[];
311
+ resets_at: string | null;
312
+ model_scoped_exhaustions: {
313
+ constraint_id: string;
314
+ applies_to_models: string[];
315
+ applies_to_model_prefixes?: string[] | undefined;
316
+ resets_at: string | null;
317
+ }[];
318
+ }, {
319
+ state: "available" | "cooldown" | "exhausted";
320
+ blocking_constraints: string[];
321
+ resets_at: string | null;
322
+ model_scoped_exhaustions: {
323
+ constraint_id: string;
324
+ applies_to_models: string[];
325
+ applies_to_model_prefixes?: string[] | undefined;
326
+ resets_at: string | null;
327
+ }[];
328
+ }>>;
329
+ } & {
330
+ constraints: z.ZodArray<z.ZodObject<{
331
+ id: z.ZodString;
332
+ label: z.ZodString;
333
+ applies_to_models: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
334
+ applies_to_model_prefixes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
335
+ applies_to_unspecified_model: z.ZodOptional<z.ZodBoolean>;
336
+ used_ratio: z.ZodNullable<z.ZodNumber>;
337
+ window_seconds: z.ZodNullable<z.ZodNumber>;
338
+ resets_at: z.ZodNullable<z.ZodString>;
339
+ cooldown_until: z.ZodDefault<z.ZodNullable<z.ZodString>>;
340
+ } & {
341
+ freshness: z.ZodEnum<["fresh", "stale", "unknown"]>;
342
+ }, "strict", z.ZodTypeAny, {
343
+ id: string;
344
+ label: string;
345
+ applies_to_models?: string[] | null | undefined;
346
+ applies_to_model_prefixes?: string[] | undefined;
347
+ applies_to_unspecified_model?: boolean | undefined;
348
+ used_ratio: number | null;
349
+ window_seconds: number | null;
350
+ resets_at: string | null;
351
+ cooldown_until: string | null;
352
+ freshness: "fresh" | "stale" | "unknown";
353
+ }, {
354
+ id: string;
355
+ label: string;
356
+ applies_to_models?: string[] | null | undefined;
357
+ applies_to_model_prefixes?: string[] | undefined;
358
+ applies_to_unspecified_model?: boolean | undefined;
359
+ used_ratio: number | null;
360
+ window_seconds: number | null;
361
+ resets_at: string | null;
362
+ cooldown_until?: string | null | undefined;
363
+ freshness: "fresh" | "stale" | "unknown";
364
+ }>, "many">;
365
+ }, "strict", z.ZodTypeAny, {
366
+ subject: {
367
+ harness: string;
368
+ credential_route: "local" | "managed_api_key" | "vendor_native";
369
+ plan_label: string | null;
370
+ subject_id: string | null;
371
+ };
372
+ source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_rate_limit_event" | "claude_statusline" | "codex_app_server" | "codex_app_server_event" | "codex_rollout" | "cursor_rate_limit";
373
+ observed_at: string;
374
+ freshness: "fresh" | "stale" | "unknown";
375
+ snapshot_id?: string | undefined;
376
+ availability?: {
377
+ state: "available" | "cooldown" | "exhausted";
378
+ blocking_constraints: string[];
379
+ resets_at: string | null;
380
+ model_scoped_exhaustions: {
381
+ constraint_id: string;
382
+ applies_to_models: string[];
383
+ applies_to_model_prefixes?: string[] | undefined;
384
+ resets_at: string | null;
385
+ }[];
386
+ } | undefined;
387
+ constraints: {
388
+ id: string;
389
+ label: string;
390
+ applies_to_models?: string[] | null | undefined;
391
+ applies_to_model_prefixes?: string[] | undefined;
392
+ applies_to_unspecified_model?: boolean | undefined;
393
+ used_ratio: number | null;
394
+ window_seconds: number | null;
395
+ resets_at: string | null;
396
+ cooldown_until: string | null;
397
+ freshness: "fresh" | "stale" | "unknown";
398
+ }[];
399
+ }, {
400
+ subject: {
401
+ harness: string;
402
+ credential_route: "local" | "managed_api_key" | "vendor_native";
403
+ plan_label?: string | null | undefined;
404
+ subject_id?: string | null | undefined;
405
+ };
406
+ source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_rate_limit_event" | "claude_statusline" | "codex_app_server" | "codex_app_server_event" | "codex_rollout" | "cursor_rate_limit";
407
+ observed_at: string;
408
+ freshness: "fresh" | "stale" | "unknown";
409
+ snapshot_id?: string | undefined;
410
+ availability?: {
411
+ state: "available" | "cooldown" | "exhausted";
412
+ blocking_constraints: string[];
413
+ resets_at: string | null;
414
+ model_scoped_exhaustions: {
415
+ constraint_id: string;
416
+ applies_to_models: string[];
417
+ applies_to_model_prefixes?: string[] | undefined;
418
+ resets_at: string | null;
419
+ }[];
420
+ } | undefined;
421
+ constraints: {
422
+ id: string;
423
+ label: string;
424
+ applies_to_models?: string[] | null | undefined;
425
+ applies_to_model_prefixes?: string[] | undefined;
426
+ applies_to_unspecified_model?: boolean | undefined;
427
+ used_ratio: number | null;
428
+ window_seconds: number | null;
429
+ resets_at: string | null;
430
+ cooldown_until?: string | null | undefined;
431
+ freshness: "fresh" | "stale" | "unknown";
432
+ }[];
433
+ }>, "many">;
434
+ }, "strict", z.ZodTypeAny, {
435
+ absences: {
436
+ subject: {
437
+ harness: string;
438
+ credential_route: "local" | "managed_api_key" | "vendor_native";
439
+ plan_label: string | null;
440
+ subject_id: string | null;
441
+ };
442
+ reason: "auth_revoked" | "credential_profile_ambiguous" | "no_source" | "not_logged_in" | "platform_unsupported" | "poll_paced" | "probe_skipped_rate_limited" | "rate_limited" | "refresh_failed" | "transport_unavailable";
443
+ detail: string | null;
444
+ observed_at: string;
445
+ retry_after_ms?: number | undefined;
446
+ }[];
447
+ refreshed_at: string | null;
448
+ refresh_skipped?: {
449
+ vendor: string;
450
+ subject?: {
451
+ harness: string;
452
+ credential_route: "local" | "managed_api_key" | "vendor_native";
453
+ plan_label: string | null;
454
+ subject_id: string | null;
455
+ } | undefined;
456
+ not_before: string;
457
+ }[] | undefined;
458
+ snapshots: {
459
+ subject: {
460
+ harness: string;
461
+ credential_route: "local" | "managed_api_key" | "vendor_native";
462
+ plan_label: string | null;
463
+ subject_id: string | null;
464
+ };
465
+ source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_rate_limit_event" | "claude_statusline" | "codex_app_server" | "codex_app_server_event" | "codex_rollout" | "cursor_rate_limit";
466
+ observed_at: string;
467
+ freshness: "fresh" | "stale" | "unknown";
468
+ snapshot_id?: string | undefined;
469
+ availability?: {
470
+ state: "available" | "cooldown" | "exhausted";
471
+ blocking_constraints: string[];
472
+ resets_at: string | null;
473
+ model_scoped_exhaustions: {
474
+ constraint_id: string;
475
+ applies_to_models: string[];
476
+ applies_to_model_prefixes?: string[] | undefined;
477
+ resets_at: string | null;
478
+ }[];
479
+ } | undefined;
480
+ constraints: {
481
+ id: string;
482
+ label: string;
483
+ applies_to_models?: string[] | null | undefined;
484
+ applies_to_model_prefixes?: string[] | undefined;
485
+ applies_to_unspecified_model?: boolean | undefined;
486
+ used_ratio: number | null;
487
+ window_seconds: number | null;
488
+ resets_at: string | null;
489
+ cooldown_until: string | null;
490
+ freshness: "fresh" | "stale" | "unknown";
491
+ }[];
492
+ }[];
493
+ }, {
494
+ absences?: {
495
+ subject: {
496
+ harness: string;
497
+ credential_route: "local" | "managed_api_key" | "vendor_native";
498
+ plan_label?: string | null | undefined;
499
+ subject_id?: string | null | undefined;
500
+ };
501
+ reason: "auth_revoked" | "credential_profile_ambiguous" | "no_source" | "not_logged_in" | "platform_unsupported" | "poll_paced" | "probe_skipped_rate_limited" | "rate_limited" | "refresh_failed" | "transport_unavailable";
502
+ detail?: string | null | undefined;
503
+ observed_at: string;
504
+ retry_after_ms?: number | undefined;
505
+ }[] | undefined;
506
+ refreshed_at: string | null;
507
+ refresh_skipped?: {
508
+ vendor: string;
509
+ subject?: {
510
+ harness: string;
511
+ credential_route: "local" | "managed_api_key" | "vendor_native";
512
+ plan_label?: string | null | undefined;
513
+ subject_id?: string | null | undefined;
514
+ } | undefined;
515
+ not_before: string;
516
+ }[] | undefined;
517
+ snapshots: {
518
+ subject: {
519
+ harness: string;
520
+ credential_route: "local" | "managed_api_key" | "vendor_native";
521
+ plan_label?: string | null | undefined;
522
+ subject_id?: string | null | undefined;
523
+ };
524
+ source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_rate_limit_event" | "claude_statusline" | "codex_app_server" | "codex_app_server_event" | "codex_rollout" | "cursor_rate_limit";
525
+ observed_at: string;
526
+ freshness: "fresh" | "stale" | "unknown";
527
+ snapshot_id?: string | undefined;
528
+ availability?: {
529
+ state: "available" | "cooldown" | "exhausted";
530
+ blocking_constraints: string[];
531
+ resets_at: string | null;
532
+ model_scoped_exhaustions: {
533
+ constraint_id: string;
534
+ applies_to_models: string[];
535
+ applies_to_model_prefixes?: string[] | undefined;
536
+ resets_at: string | null;
537
+ }[];
538
+ } | undefined;
539
+ constraints: {
540
+ id: string;
541
+ label: string;
542
+ applies_to_models?: string[] | null | undefined;
543
+ applies_to_model_prefixes?: string[] | undefined;
544
+ applies_to_unspecified_model?: boolean | undefined;
545
+ used_ratio: number | null;
546
+ window_seconds: number | null;
547
+ resets_at: string | null;
548
+ cooldown_until?: string | null | undefined;
549
+ freshness: "fresh" | "stale" | "unknown";
550
+ }[];
551
+ }[];
552
+ }>;
553
+ export type ControlQuotaFreshnessResponse = z.infer<typeof ControlQuotaFreshnessResponse>;
554
+ //# sourceMappingURL=quota-read.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quota-read.d.ts","sourceRoot":"","sources":["../src/quota-read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAQ3B;;;kEAGkE;AAClE,eAAO,MAAM,uBAAuB;;;;;;EAEzB,CAAC;AACZ,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE9E,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQxC,CAAC;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAE1F,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIzC,CAAC;AACF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { z } from "zod/v3";
2
+ import { ControlQuotaResponse, ControlQuotaSnapshot, QuotaConstraint, QuotaFreshness, } from "./quota.js";
3
+ /** Response-only schemas: neither persisted evidence nor legacy wire shapes
4
+ * accept constraint freshness. Clients explicitly select the read projection;
5
+ * operation discovery is optional, and old engines may return strict legacy data
6
+ * (3.24) or reject the selector with HTTP 400 (3.25.0/3.25.1). */
7
+ export const ControlQuotaReadRequest = z
8
+ .object({ view: z.enum(["resources", "constraint_freshness"]).optional() })
9
+ .strict();
10
+ export const ControlQuotaFreshnessSnapshot = ControlQuotaSnapshot.extend({
11
+ constraints: z.array(QuotaConstraint.extend({
12
+ freshness: QuotaFreshness.describe("Read-time freshness from raw snapshot freshness, observation age (stale after 300000ms), and this constraint's own reset (stale at equality); a reset cutoff stales earlier evidence. Never inferred from aggregate freshness or a sibling reset; no refill is inferred. The compatibility reset_credits row reports its resets facet's freshness instead."),
13
+ })),
14
+ });
15
+ export const ControlQuotaFreshnessResponse = ControlQuotaResponse.extend({
16
+ snapshots: z.array(ControlQuotaFreshnessSnapshot),
17
+ }).describe("Opt-in GET /v2/quota?view=constraint_freshness response. Adds constraint freshness while preserving aggregate snapshot freshness and all observed values. No refresh or durable write.");
18
+ //# sourceMappingURL=quota-read.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quota-read.js","sourceRoot":"","sources":["../src/quota-read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,cAAc,GACf,MAAM,YAAY,CAAC;AAEpB;;;kEAGkE;AAClE,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC;KACrC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,sBAAsB,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC;KAC1E,MAAM,EAAE,CAAC;AAGZ,MAAM,CAAC,MAAM,6BAA6B,GAAG,oBAAoB,CAAC,MAAM,CAAC;IACvE,WAAW,EAAE,CAAC,CAAC,KAAK,CAClB,eAAe,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE,cAAc,CAAC,QAAQ,CAChC,4VAA4V,CAC7V;KACF,CAAC,CACH;CACF,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,6BAA6B,GAAG,oBAAoB,CAAC,MAAM,CAAC;IACvE,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,6BAA6B,CAAC;CAClD,CAAC,CAAC,QAAQ,CACT,wLAAwL,CACzL,CAAC"}
package/dist/quota.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod/v3";
2
+ export { ControlQuotaRefreshRequest } from "./account-target.js";
2
3
  export declare const QuotaSource: z.ZodEnum<["codex_app_server", "codex_rollout", "claude_statusline", "claude_api_retry", "claude_oauth_usage", "agy_command_usage", "cursor_rate_limit", "claude_rate_limit_event", "codex_app_server_event"]>;
3
4
  export type QuotaSource = z.infer<typeof QuotaSource>;
4
5
  /** Orthogonal capabilities of every quota evidence source. Keep this
@@ -912,14 +913,6 @@ export declare const ControlQuotaSnapshot: z.ZodObject<{
912
913
  } | undefined;
913
914
  }>;
914
915
  export type ControlQuotaSnapshot = z.infer<typeof ControlQuotaSnapshot>;
915
- export declare const ControlQuotaRefreshRequest: z.ZodObject<{
916
- model: z.ZodOptional<z.ZodString>;
917
- }, "strict", z.ZodTypeAny, {
918
- model?: string | undefined;
919
- }, {
920
- model?: string | undefined;
921
- }>;
922
- export type ControlQuotaRefreshRequest = z.infer<typeof ControlQuotaRefreshRequest>;
923
916
  export declare const QuotaRefreshSkipped: z.ZodObject<{
924
917
  vendor: z.ZodString;
925
918
  subject: z.ZodOptional<z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"quota.d.ts","sourceRoot":"","sources":["../src/quota.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,eAAO,MAAM,WAAW,gNAYoE,CAAC;AAC7F,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtD;;u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AA;CAAO,GAC/C,oBAAoB,CAStB"}
package/dist/quota.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod/v3";
2
+ export { ControlQuotaRefreshRequest } from "./account-target.js";
2
3
  import { Id } from "./primitives.js";
3
4
  export const QuotaSource = z
4
5
  .enum([
@@ -319,16 +320,6 @@ export const ControlQuotaSnapshot = QuotaSnapshot.extend({
319
320
  .describe("Server-derived stable snapshot identity for consumers; absent from raw journal evidence and optional for legacy responses."),
320
321
  availability: QuotaAvailability.optional().describe("Typed server-owned availability projection derived at the /v2/quota and atomic Accounts response boundaries; absent from raw journal/projection storage."),
321
322
  }).describe("One vendor-owned quota snapshot plus its derived availability projection.");
322
- export const ControlQuotaRefreshRequest = z
323
- .object({
324
- model: z
325
- .string()
326
- .min(1)
327
- .optional()
328
- .describe("Optional model id/alias the caller intends to spend against. When present, each snapshot's availability.state is computed against this model (case-insensitive alias containment in either direction), so windows scoped to OTHER models never report the subject exhausted."),
329
- })
330
- .strict()
331
- .describe("Optional POST /v2/quota body; an empty or absent body keeps the model-agnostic projection.");
332
323
  export const QuotaRefreshSkipped = z
333
324
  .object({
334
325
  vendor: Id,