@claudexor/schema 3.9.8 → 3.10.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.
@@ -0,0 +1,2158 @@
1
+ import { z } from "zod/v3";
2
+ export declare const ModelPayloadRef: z.ZodObject<{
3
+ resourceId: z.ZodString;
4
+ sha256: z.ZodString;
5
+ sizeBytes: z.ZodNumber;
6
+ }, "strict", z.ZodTypeAny, {
7
+ resourceId: string;
8
+ sha256: string;
9
+ sizeBytes: number;
10
+ }, {
11
+ resourceId: string;
12
+ sha256: string;
13
+ sizeBytes: number;
14
+ }>;
15
+ export type ModelPayloadRef = z.infer<typeof ModelPayloadRef>;
16
+ export declare const ModelAccountChoice: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
17
+ mode: z.ZodLiteral<"auto">;
18
+ preferredProfileId: z.ZodOptional<z.ZodString>;
19
+ }, "strict", z.ZodTypeAny, {
20
+ mode: "auto";
21
+ preferredProfileId?: string | undefined;
22
+ }, {
23
+ mode: "auto";
24
+ preferredProfileId?: string | undefined;
25
+ }>, z.ZodObject<{
26
+ mode: z.ZodLiteral<"pin">;
27
+ profileId: z.ZodString;
28
+ }, "strict", z.ZodTypeAny, {
29
+ mode: "pin";
30
+ profileId: string;
31
+ }, {
32
+ mode: "pin";
33
+ profileId: string;
34
+ }>]>;
35
+ export type ModelAccountChoice = z.infer<typeof ModelAccountChoice>;
36
+ export declare const ModelRoute: z.ZodObject<{
37
+ source: z.ZodString;
38
+ credentialProfileId: z.ZodString;
39
+ accountFingerprint: z.ZodNullable<z.ZodString>;
40
+ model: z.ZodNullable<z.ZodString>;
41
+ }, "strict", z.ZodTypeAny, {
42
+ source: string;
43
+ credentialProfileId: string;
44
+ accountFingerprint: string | null;
45
+ model: string | null;
46
+ }, {
47
+ source: string;
48
+ credentialProfileId: string;
49
+ accountFingerprint: string | null;
50
+ model: string | null;
51
+ }>;
52
+ export type ModelRoute = z.infer<typeof ModelRoute>;
53
+ export declare const ModelNativeContinuation: z.ZodObject<{
54
+ route: z.ZodObject<{
55
+ source: z.ZodString;
56
+ credentialProfileId: z.ZodString;
57
+ accountFingerprint: z.ZodNullable<z.ZodString>;
58
+ model: z.ZodNullable<z.ZodString>;
59
+ }, "strict", z.ZodTypeAny, {
60
+ source: string;
61
+ credentialProfileId: string;
62
+ accountFingerprint: string | null;
63
+ model: string | null;
64
+ }, {
65
+ source: string;
66
+ credentialProfileId: string;
67
+ accountFingerprint: string | null;
68
+ model: string | null;
69
+ }>;
70
+ format: z.ZodString;
71
+ payload: z.ZodUnknown;
72
+ }, "strict", z.ZodTypeAny, {
73
+ route: {
74
+ source: string;
75
+ credentialProfileId: string;
76
+ accountFingerprint: string | null;
77
+ model: string | null;
78
+ };
79
+ format: string;
80
+ payload?: unknown;
81
+ }, {
82
+ route: {
83
+ source: string;
84
+ credentialProfileId: string;
85
+ accountFingerprint: string | null;
86
+ model: string | null;
87
+ };
88
+ format: string;
89
+ payload?: unknown;
90
+ }>;
91
+ export type ModelNativeContinuation = z.infer<typeof ModelNativeContinuation>;
92
+ export declare const ModelToolCall: z.ZodObject<{
93
+ id: z.ZodString;
94
+ type: z.ZodLiteral<"function">;
95
+ function: z.ZodObject<{
96
+ name: z.ZodString;
97
+ arguments: z.ZodString;
98
+ }, "strict", z.ZodTypeAny, {
99
+ name: string;
100
+ arguments: string;
101
+ }, {
102
+ name: string;
103
+ arguments: string;
104
+ }>;
105
+ }, "strict", z.ZodTypeAny, {
106
+ id: string;
107
+ type: "function";
108
+ function: {
109
+ name: string;
110
+ arguments: string;
111
+ };
112
+ }, {
113
+ id: string;
114
+ type: "function";
115
+ function: {
116
+ name: string;
117
+ arguments: string;
118
+ };
119
+ }>;
120
+ export type ModelToolCall = z.infer<typeof ModelToolCall>;
121
+ export declare const ModelMessage: z.ZodObject<{
122
+ role: z.ZodEnum<["system", "developer", "user", "assistant", "tool"]>;
123
+ content: z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">]>>;
124
+ name: z.ZodOptional<z.ZodString>;
125
+ tool_call_id: z.ZodOptional<z.ZodString>;
126
+ tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
127
+ id: z.ZodString;
128
+ type: z.ZodLiteral<"function">;
129
+ function: z.ZodObject<{
130
+ name: z.ZodString;
131
+ arguments: z.ZodString;
132
+ }, "strict", z.ZodTypeAny, {
133
+ name: string;
134
+ arguments: string;
135
+ }, {
136
+ name: string;
137
+ arguments: string;
138
+ }>;
139
+ }, "strict", z.ZodTypeAny, {
140
+ id: string;
141
+ type: "function";
142
+ function: {
143
+ name: string;
144
+ arguments: string;
145
+ };
146
+ }, {
147
+ id: string;
148
+ type: "function";
149
+ function: {
150
+ name: string;
151
+ arguments: string;
152
+ };
153
+ }>, "many">>;
154
+ nativeContinuation: z.ZodOptional<z.ZodObject<{
155
+ route: z.ZodObject<{
156
+ source: z.ZodString;
157
+ credentialProfileId: z.ZodString;
158
+ accountFingerprint: z.ZodNullable<z.ZodString>;
159
+ model: z.ZodNullable<z.ZodString>;
160
+ }, "strict", z.ZodTypeAny, {
161
+ source: string;
162
+ credentialProfileId: string;
163
+ accountFingerprint: string | null;
164
+ model: string | null;
165
+ }, {
166
+ source: string;
167
+ credentialProfileId: string;
168
+ accountFingerprint: string | null;
169
+ model: string | null;
170
+ }>;
171
+ format: z.ZodString;
172
+ payload: z.ZodUnknown;
173
+ }, "strict", z.ZodTypeAny, {
174
+ route: {
175
+ source: string;
176
+ credentialProfileId: string;
177
+ accountFingerprint: string | null;
178
+ model: string | null;
179
+ };
180
+ format: string;
181
+ payload?: unknown;
182
+ }, {
183
+ route: {
184
+ source: string;
185
+ credentialProfileId: string;
186
+ accountFingerprint: string | null;
187
+ model: string | null;
188
+ };
189
+ format: string;
190
+ payload?: unknown;
191
+ }>>;
192
+ }, "strict", z.ZodTypeAny, {
193
+ role: "assistant" | "developer" | "system" | "tool" | "user";
194
+ content: string | Record<string, unknown>[] | null;
195
+ name?: string | undefined;
196
+ tool_call_id?: string | undefined;
197
+ tool_calls?: {
198
+ id: string;
199
+ type: "function";
200
+ function: {
201
+ name: string;
202
+ arguments: string;
203
+ };
204
+ }[] | undefined;
205
+ nativeContinuation?: {
206
+ route: {
207
+ source: string;
208
+ credentialProfileId: string;
209
+ accountFingerprint: string | null;
210
+ model: string | null;
211
+ };
212
+ format: string;
213
+ payload?: unknown;
214
+ } | undefined;
215
+ }, {
216
+ role: "assistant" | "developer" | "system" | "tool" | "user";
217
+ content: string | Record<string, unknown>[] | null;
218
+ name?: string | undefined;
219
+ tool_call_id?: string | undefined;
220
+ tool_calls?: {
221
+ id: string;
222
+ type: "function";
223
+ function: {
224
+ name: string;
225
+ arguments: string;
226
+ };
227
+ }[] | undefined;
228
+ nativeContinuation?: {
229
+ route: {
230
+ source: string;
231
+ credentialProfileId: string;
232
+ accountFingerprint: string | null;
233
+ model: string | null;
234
+ };
235
+ format: string;
236
+ payload?: unknown;
237
+ } | undefined;
238
+ }>;
239
+ export type ModelMessage = z.infer<typeof ModelMessage>;
240
+ export declare const ModelTool: z.ZodObject<{
241
+ type: z.ZodLiteral<"function">;
242
+ function: z.ZodObject<{
243
+ name: z.ZodString;
244
+ description: z.ZodOptional<z.ZodString>;
245
+ parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
246
+ strict: z.ZodOptional<z.ZodBoolean>;
247
+ }, "strict", z.ZodTypeAny, {
248
+ name: string;
249
+ description?: string | undefined;
250
+ parameters: Record<string, unknown>;
251
+ strict?: boolean | undefined;
252
+ }, {
253
+ name: string;
254
+ description?: string | undefined;
255
+ parameters: Record<string, unknown>;
256
+ strict?: boolean | undefined;
257
+ }>;
258
+ }, "strict", z.ZodTypeAny, {
259
+ type: "function";
260
+ function: {
261
+ name: string;
262
+ description?: string | undefined;
263
+ parameters: Record<string, unknown>;
264
+ strict?: boolean | undefined;
265
+ };
266
+ }, {
267
+ type: "function";
268
+ function: {
269
+ name: string;
270
+ description?: string | undefined;
271
+ parameters: Record<string, unknown>;
272
+ strict?: boolean | undefined;
273
+ };
274
+ }>;
275
+ export type ModelTool = z.infer<typeof ModelTool>;
276
+ export declare const ModelToolChoice: z.ZodUnion<[z.ZodEnum<["auto", "none", "required"]>, z.ZodObject<{
277
+ type: z.ZodLiteral<"function">;
278
+ function: z.ZodObject<{
279
+ name: z.ZodString;
280
+ }, "strict", z.ZodTypeAny, {
281
+ name: string;
282
+ }, {
283
+ name: string;
284
+ }>;
285
+ }, "strict", z.ZodTypeAny, {
286
+ type: "function";
287
+ function: {
288
+ name: string;
289
+ };
290
+ }, {
291
+ type: "function";
292
+ function: {
293
+ name: string;
294
+ };
295
+ }>]>;
296
+ export type ModelToolChoice = z.infer<typeof ModelToolChoice>;
297
+ export declare const ModelCallOptions: z.ZodObject<{
298
+ reasoningEffort: z.ZodOptional<z.ZodString>;
299
+ serviceTier: z.ZodOptional<z.ZodString>;
300
+ parallelToolCalls: z.ZodOptional<z.ZodBoolean>;
301
+ cacheKey: z.ZodOptional<z.ZodString>;
302
+ maxOutputTokens: z.ZodOptional<z.ZodNumber>;
303
+ temperature: z.ZodOptional<z.ZodNumber>;
304
+ }, "strict", z.ZodTypeAny, {
305
+ reasoningEffort?: string | undefined;
306
+ serviceTier?: string | undefined;
307
+ parallelToolCalls?: boolean | undefined;
308
+ cacheKey?: string | undefined;
309
+ maxOutputTokens?: number | undefined;
310
+ temperature?: number | undefined;
311
+ }, {
312
+ reasoningEffort?: string | undefined;
313
+ serviceTier?: string | undefined;
314
+ parallelToolCalls?: boolean | undefined;
315
+ cacheKey?: string | undefined;
316
+ maxOutputTokens?: number | undefined;
317
+ temperature?: number | undefined;
318
+ }>;
319
+ export type ModelCallOptions = z.infer<typeof ModelCallOptions>;
320
+ export declare const ModelCallRequest: z.ZodObject<{
321
+ source: z.ZodString;
322
+ model: z.ZodString;
323
+ account: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
324
+ mode: z.ZodLiteral<"auto">;
325
+ preferredProfileId: z.ZodOptional<z.ZodString>;
326
+ }, "strict", z.ZodTypeAny, {
327
+ mode: "auto";
328
+ preferredProfileId?: string | undefined;
329
+ }, {
330
+ mode: "auto";
331
+ preferredProfileId?: string | undefined;
332
+ }>, z.ZodObject<{
333
+ mode: z.ZodLiteral<"pin">;
334
+ profileId: z.ZodString;
335
+ }, "strict", z.ZodTypeAny, {
336
+ mode: "pin";
337
+ profileId: string;
338
+ }, {
339
+ mode: "pin";
340
+ profileId: string;
341
+ }>]>;
342
+ messages: z.ZodArray<z.ZodObject<{
343
+ role: z.ZodEnum<["system", "developer", "user", "assistant", "tool"]>;
344
+ content: z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">]>>;
345
+ name: z.ZodOptional<z.ZodString>;
346
+ tool_call_id: z.ZodOptional<z.ZodString>;
347
+ tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
348
+ id: z.ZodString;
349
+ type: z.ZodLiteral<"function">;
350
+ function: z.ZodObject<{
351
+ name: z.ZodString;
352
+ arguments: z.ZodString;
353
+ }, "strict", z.ZodTypeAny, {
354
+ name: string;
355
+ arguments: string;
356
+ }, {
357
+ name: string;
358
+ arguments: string;
359
+ }>;
360
+ }, "strict", z.ZodTypeAny, {
361
+ id: string;
362
+ type: "function";
363
+ function: {
364
+ name: string;
365
+ arguments: string;
366
+ };
367
+ }, {
368
+ id: string;
369
+ type: "function";
370
+ function: {
371
+ name: string;
372
+ arguments: string;
373
+ };
374
+ }>, "many">>;
375
+ nativeContinuation: z.ZodOptional<z.ZodObject<{
376
+ route: z.ZodObject<{
377
+ source: z.ZodString;
378
+ credentialProfileId: z.ZodString;
379
+ accountFingerprint: z.ZodNullable<z.ZodString>;
380
+ model: z.ZodNullable<z.ZodString>;
381
+ }, "strict", z.ZodTypeAny, {
382
+ source: string;
383
+ credentialProfileId: string;
384
+ accountFingerprint: string | null;
385
+ model: string | null;
386
+ }, {
387
+ source: string;
388
+ credentialProfileId: string;
389
+ accountFingerprint: string | null;
390
+ model: string | null;
391
+ }>;
392
+ format: z.ZodString;
393
+ payload: z.ZodUnknown;
394
+ }, "strict", z.ZodTypeAny, {
395
+ route: {
396
+ source: string;
397
+ credentialProfileId: string;
398
+ accountFingerprint: string | null;
399
+ model: string | null;
400
+ };
401
+ format: string;
402
+ payload?: unknown;
403
+ }, {
404
+ route: {
405
+ source: string;
406
+ credentialProfileId: string;
407
+ accountFingerprint: string | null;
408
+ model: string | null;
409
+ };
410
+ format: string;
411
+ payload?: unknown;
412
+ }>>;
413
+ }, "strict", z.ZodTypeAny, {
414
+ role: "assistant" | "developer" | "system" | "tool" | "user";
415
+ content: string | Record<string, unknown>[] | null;
416
+ name?: string | undefined;
417
+ tool_call_id?: string | undefined;
418
+ tool_calls?: {
419
+ id: string;
420
+ type: "function";
421
+ function: {
422
+ name: string;
423
+ arguments: string;
424
+ };
425
+ }[] | undefined;
426
+ nativeContinuation?: {
427
+ route: {
428
+ source: string;
429
+ credentialProfileId: string;
430
+ accountFingerprint: string | null;
431
+ model: string | null;
432
+ };
433
+ format: string;
434
+ payload?: unknown;
435
+ } | undefined;
436
+ }, {
437
+ role: "assistant" | "developer" | "system" | "tool" | "user";
438
+ content: string | Record<string, unknown>[] | null;
439
+ name?: string | undefined;
440
+ tool_call_id?: string | undefined;
441
+ tool_calls?: {
442
+ id: string;
443
+ type: "function";
444
+ function: {
445
+ name: string;
446
+ arguments: string;
447
+ };
448
+ }[] | undefined;
449
+ nativeContinuation?: {
450
+ route: {
451
+ source: string;
452
+ credentialProfileId: string;
453
+ accountFingerprint: string | null;
454
+ model: string | null;
455
+ };
456
+ format: string;
457
+ payload?: unknown;
458
+ } | undefined;
459
+ }>, "many">;
460
+ tools: z.ZodDefault<z.ZodArray<z.ZodObject<{
461
+ type: z.ZodLiteral<"function">;
462
+ function: z.ZodObject<{
463
+ name: z.ZodString;
464
+ description: z.ZodOptional<z.ZodString>;
465
+ parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
466
+ strict: z.ZodOptional<z.ZodBoolean>;
467
+ }, "strict", z.ZodTypeAny, {
468
+ name: string;
469
+ description?: string | undefined;
470
+ parameters: Record<string, unknown>;
471
+ strict?: boolean | undefined;
472
+ }, {
473
+ name: string;
474
+ description?: string | undefined;
475
+ parameters: Record<string, unknown>;
476
+ strict?: boolean | undefined;
477
+ }>;
478
+ }, "strict", z.ZodTypeAny, {
479
+ type: "function";
480
+ function: {
481
+ name: string;
482
+ description?: string | undefined;
483
+ parameters: Record<string, unknown>;
484
+ strict?: boolean | undefined;
485
+ };
486
+ }, {
487
+ type: "function";
488
+ function: {
489
+ name: string;
490
+ description?: string | undefined;
491
+ parameters: Record<string, unknown>;
492
+ strict?: boolean | undefined;
493
+ };
494
+ }>, "many">>;
495
+ toolChoice: z.ZodDefault<z.ZodUnion<[z.ZodEnum<["auto", "none", "required"]>, z.ZodObject<{
496
+ type: z.ZodLiteral<"function">;
497
+ function: z.ZodObject<{
498
+ name: z.ZodString;
499
+ }, "strict", z.ZodTypeAny, {
500
+ name: string;
501
+ }, {
502
+ name: string;
503
+ }>;
504
+ }, "strict", z.ZodTypeAny, {
505
+ type: "function";
506
+ function: {
507
+ name: string;
508
+ };
509
+ }, {
510
+ type: "function";
511
+ function: {
512
+ name: string;
513
+ };
514
+ }>]>>;
515
+ options: z.ZodDefault<z.ZodObject<{
516
+ reasoningEffort: z.ZodOptional<z.ZodString>;
517
+ serviceTier: z.ZodOptional<z.ZodString>;
518
+ parallelToolCalls: z.ZodOptional<z.ZodBoolean>;
519
+ cacheKey: z.ZodOptional<z.ZodString>;
520
+ maxOutputTokens: z.ZodOptional<z.ZodNumber>;
521
+ temperature: z.ZodOptional<z.ZodNumber>;
522
+ }, "strict", z.ZodTypeAny, {
523
+ reasoningEffort?: string | undefined;
524
+ serviceTier?: string | undefined;
525
+ parallelToolCalls?: boolean | undefined;
526
+ cacheKey?: string | undefined;
527
+ maxOutputTokens?: number | undefined;
528
+ temperature?: number | undefined;
529
+ }, {
530
+ reasoningEffort?: string | undefined;
531
+ serviceTier?: string | undefined;
532
+ parallelToolCalls?: boolean | undefined;
533
+ cacheKey?: string | undefined;
534
+ maxOutputTokens?: number | undefined;
535
+ temperature?: number | undefined;
536
+ }>>;
537
+ }, "strict", z.ZodTypeAny, {
538
+ source: string;
539
+ model: string;
540
+ account: {
541
+ mode: "auto";
542
+ preferredProfileId?: string | undefined;
543
+ } | {
544
+ mode: "pin";
545
+ profileId: string;
546
+ };
547
+ messages: {
548
+ role: "assistant" | "developer" | "system" | "tool" | "user";
549
+ content: string | Record<string, unknown>[] | null;
550
+ name?: string | undefined;
551
+ tool_call_id?: string | undefined;
552
+ tool_calls?: {
553
+ id: string;
554
+ type: "function";
555
+ function: {
556
+ name: string;
557
+ arguments: string;
558
+ };
559
+ }[] | undefined;
560
+ nativeContinuation?: {
561
+ route: {
562
+ source: string;
563
+ credentialProfileId: string;
564
+ accountFingerprint: string | null;
565
+ model: string | null;
566
+ };
567
+ format: string;
568
+ payload?: unknown;
569
+ } | undefined;
570
+ }[];
571
+ tools: {
572
+ type: "function";
573
+ function: {
574
+ name: string;
575
+ description?: string | undefined;
576
+ parameters: Record<string, unknown>;
577
+ strict?: boolean | undefined;
578
+ };
579
+ }[];
580
+ toolChoice: "auto" | "none" | "required" | {
581
+ type: "function";
582
+ function: {
583
+ name: string;
584
+ };
585
+ };
586
+ options: {
587
+ reasoningEffort?: string | undefined;
588
+ serviceTier?: string | undefined;
589
+ parallelToolCalls?: boolean | undefined;
590
+ cacheKey?: string | undefined;
591
+ maxOutputTokens?: number | undefined;
592
+ temperature?: number | undefined;
593
+ };
594
+ }, {
595
+ source: string;
596
+ model: string;
597
+ account: {
598
+ mode: "auto";
599
+ preferredProfileId?: string | undefined;
600
+ } | {
601
+ mode: "pin";
602
+ profileId: string;
603
+ };
604
+ messages: {
605
+ role: "assistant" | "developer" | "system" | "tool" | "user";
606
+ content: string | Record<string, unknown>[] | null;
607
+ name?: string | undefined;
608
+ tool_call_id?: string | undefined;
609
+ tool_calls?: {
610
+ id: string;
611
+ type: "function";
612
+ function: {
613
+ name: string;
614
+ arguments: string;
615
+ };
616
+ }[] | undefined;
617
+ nativeContinuation?: {
618
+ route: {
619
+ source: string;
620
+ credentialProfileId: string;
621
+ accountFingerprint: string | null;
622
+ model: string | null;
623
+ };
624
+ format: string;
625
+ payload?: unknown;
626
+ } | undefined;
627
+ }[];
628
+ tools?: {
629
+ type: "function";
630
+ function: {
631
+ name: string;
632
+ description?: string | undefined;
633
+ parameters: Record<string, unknown>;
634
+ strict?: boolean | undefined;
635
+ };
636
+ }[] | undefined;
637
+ toolChoice?: "auto" | "none" | "required" | {
638
+ type: "function";
639
+ function: {
640
+ name: string;
641
+ };
642
+ } | undefined;
643
+ options?: {
644
+ reasoningEffort?: string | undefined;
645
+ serviceTier?: string | undefined;
646
+ parallelToolCalls?: boolean | undefined;
647
+ cacheKey?: string | undefined;
648
+ maxOutputTokens?: number | undefined;
649
+ temperature?: number | undefined;
650
+ } | undefined;
651
+ }>;
652
+ export type ModelCallRequest = z.infer<typeof ModelCallRequest>;
653
+ export declare const ModelUsage: z.ZodObject<{
654
+ input_tokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
655
+ output_tokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
656
+ cached_input_tokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
657
+ } & {
658
+ cache_write_tokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
659
+ reasoning_tokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
660
+ }, "strip", z.ZodTypeAny, {
661
+ input_tokens: number | null;
662
+ output_tokens: number | null;
663
+ cached_input_tokens: number | null;
664
+ cache_write_tokens: number | null;
665
+ reasoning_tokens: number | null;
666
+ }, {
667
+ input_tokens?: number | null | undefined;
668
+ output_tokens?: number | null | undefined;
669
+ cached_input_tokens?: number | null | undefined;
670
+ cache_write_tokens?: number | null | undefined;
671
+ reasoning_tokens?: number | null | undefined;
672
+ }>;
673
+ export type ModelUsage = z.infer<typeof ModelUsage>;
674
+ export declare const ModelCostEvidence: z.ZodObject<{
675
+ knowledge: z.ZodEnum<["exact", "estimated", "unknown"]>;
676
+ billing: z.ZodEnum<["proven_zero", "subscription_entitlement", "metered", "unknown"]>;
677
+ source: z.ZodString;
678
+ provenance: z.ZodArray<z.ZodString, "many">;
679
+ estimatedUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
680
+ } & {
681
+ cashUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
682
+ valuationUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
683
+ valuationKnowledge: z.ZodDefault<z.ZodEnum<["exact", "estimated", "unknown"]>>;
684
+ }, "strict", z.ZodTypeAny, {
685
+ knowledge: "estimated" | "exact" | "unknown";
686
+ billing: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
687
+ source: string;
688
+ provenance: string[];
689
+ estimatedUsd: number | null;
690
+ cashUsd: number | null;
691
+ valuationUsd: number | null;
692
+ valuationKnowledge: "estimated" | "exact" | "unknown";
693
+ }, {
694
+ knowledge: "estimated" | "exact" | "unknown";
695
+ billing: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
696
+ source: string;
697
+ provenance: string[];
698
+ estimatedUsd?: number | null | undefined;
699
+ cashUsd?: number | null | undefined;
700
+ valuationUsd?: number | null | undefined;
701
+ valuationKnowledge?: "estimated" | "exact" | "unknown" | undefined;
702
+ }>;
703
+ export type ModelCostEvidence = z.infer<typeof ModelCostEvidence>;
704
+ export declare const ModelCallResult: z.ZodObject<{
705
+ outcome: z.ZodEnum<["completed", "incomplete", "failed", "unknown"]>;
706
+ message: z.ZodNullable<z.ZodObject<{
707
+ role: z.ZodEnum<["system", "developer", "user", "assistant", "tool"]>;
708
+ content: z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">]>>;
709
+ name: z.ZodOptional<z.ZodString>;
710
+ tool_call_id: z.ZodOptional<z.ZodString>;
711
+ tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
712
+ id: z.ZodString;
713
+ type: z.ZodLiteral<"function">;
714
+ function: z.ZodObject<{
715
+ name: z.ZodString;
716
+ arguments: z.ZodString;
717
+ }, "strict", z.ZodTypeAny, {
718
+ name: string;
719
+ arguments: string;
720
+ }, {
721
+ name: string;
722
+ arguments: string;
723
+ }>;
724
+ }, "strict", z.ZodTypeAny, {
725
+ id: string;
726
+ type: "function";
727
+ function: {
728
+ name: string;
729
+ arguments: string;
730
+ };
731
+ }, {
732
+ id: string;
733
+ type: "function";
734
+ function: {
735
+ name: string;
736
+ arguments: string;
737
+ };
738
+ }>, "many">>;
739
+ nativeContinuation: z.ZodOptional<z.ZodObject<{
740
+ route: z.ZodObject<{
741
+ source: z.ZodString;
742
+ credentialProfileId: z.ZodString;
743
+ accountFingerprint: z.ZodNullable<z.ZodString>;
744
+ model: z.ZodNullable<z.ZodString>;
745
+ }, "strict", z.ZodTypeAny, {
746
+ source: string;
747
+ credentialProfileId: string;
748
+ accountFingerprint: string | null;
749
+ model: string | null;
750
+ }, {
751
+ source: string;
752
+ credentialProfileId: string;
753
+ accountFingerprint: string | null;
754
+ model: string | null;
755
+ }>;
756
+ format: z.ZodString;
757
+ payload: z.ZodUnknown;
758
+ }, "strict", z.ZodTypeAny, {
759
+ route: {
760
+ source: string;
761
+ credentialProfileId: string;
762
+ accountFingerprint: string | null;
763
+ model: string | null;
764
+ };
765
+ format: string;
766
+ payload?: unknown;
767
+ }, {
768
+ route: {
769
+ source: string;
770
+ credentialProfileId: string;
771
+ accountFingerprint: string | null;
772
+ model: string | null;
773
+ };
774
+ format: string;
775
+ payload?: unknown;
776
+ }>>;
777
+ }, "strict", z.ZodTypeAny, {
778
+ role: "assistant" | "developer" | "system" | "tool" | "user";
779
+ content: string | Record<string, unknown>[] | null;
780
+ name?: string | undefined;
781
+ tool_call_id?: string | undefined;
782
+ tool_calls?: {
783
+ id: string;
784
+ type: "function";
785
+ function: {
786
+ name: string;
787
+ arguments: string;
788
+ };
789
+ }[] | undefined;
790
+ nativeContinuation?: {
791
+ route: {
792
+ source: string;
793
+ credentialProfileId: string;
794
+ accountFingerprint: string | null;
795
+ model: string | null;
796
+ };
797
+ format: string;
798
+ payload?: unknown;
799
+ } | undefined;
800
+ }, {
801
+ role: "assistant" | "developer" | "system" | "tool" | "user";
802
+ content: string | Record<string, unknown>[] | null;
803
+ name?: string | undefined;
804
+ tool_call_id?: string | undefined;
805
+ tool_calls?: {
806
+ id: string;
807
+ type: "function";
808
+ function: {
809
+ name: string;
810
+ arguments: string;
811
+ };
812
+ }[] | undefined;
813
+ nativeContinuation?: {
814
+ route: {
815
+ source: string;
816
+ credentialProfileId: string;
817
+ accountFingerprint: string | null;
818
+ model: string | null;
819
+ };
820
+ format: string;
821
+ payload?: unknown;
822
+ } | undefined;
823
+ }>>;
824
+ route: z.ZodObject<{
825
+ source: z.ZodString;
826
+ credentialProfileId: z.ZodString;
827
+ accountFingerprint: z.ZodNullable<z.ZodString>;
828
+ model: z.ZodNullable<z.ZodString>;
829
+ }, "strict", z.ZodTypeAny, {
830
+ source: string;
831
+ credentialProfileId: string;
832
+ accountFingerprint: string | null;
833
+ model: string | null;
834
+ }, {
835
+ source: string;
836
+ credentialProfileId: string;
837
+ accountFingerprint: string | null;
838
+ model: string | null;
839
+ }>;
840
+ usage: z.ZodObject<{
841
+ input_tokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
842
+ output_tokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
843
+ cached_input_tokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
844
+ } & {
845
+ cache_write_tokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
846
+ reasoning_tokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
847
+ }, "strip", z.ZodTypeAny, {
848
+ input_tokens: number | null;
849
+ output_tokens: number | null;
850
+ cached_input_tokens: number | null;
851
+ cache_write_tokens: number | null;
852
+ reasoning_tokens: number | null;
853
+ }, {
854
+ input_tokens?: number | null | undefined;
855
+ output_tokens?: number | null | undefined;
856
+ cached_input_tokens?: number | null | undefined;
857
+ cache_write_tokens?: number | null | undefined;
858
+ reasoning_tokens?: number | null | undefined;
859
+ }>;
860
+ cost: z.ZodObject<{
861
+ knowledge: z.ZodEnum<["exact", "estimated", "unknown"]>;
862
+ billing: z.ZodEnum<["proven_zero", "subscription_entitlement", "metered", "unknown"]>;
863
+ source: z.ZodString;
864
+ provenance: z.ZodArray<z.ZodString, "many">;
865
+ estimatedUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
866
+ } & {
867
+ cashUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
868
+ valuationUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
869
+ valuationKnowledge: z.ZodDefault<z.ZodEnum<["exact", "estimated", "unknown"]>>;
870
+ }, "strict", z.ZodTypeAny, {
871
+ knowledge: "estimated" | "exact" | "unknown";
872
+ billing: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
873
+ source: string;
874
+ provenance: string[];
875
+ estimatedUsd: number | null;
876
+ cashUsd: number | null;
877
+ valuationUsd: number | null;
878
+ valuationKnowledge: "estimated" | "exact" | "unknown";
879
+ }, {
880
+ knowledge: "estimated" | "exact" | "unknown";
881
+ billing: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
882
+ source: string;
883
+ provenance: string[];
884
+ estimatedUsd?: number | null | undefined;
885
+ cashUsd?: number | null | undefined;
886
+ valuationUsd?: number | null | undefined;
887
+ valuationKnowledge?: "estimated" | "exact" | "unknown" | undefined;
888
+ }>;
889
+ appliedOptions: z.ZodObject<{
890
+ reasoningEffort: z.ZodOptional<z.ZodString>;
891
+ serviceTier: z.ZodOptional<z.ZodString>;
892
+ parallelToolCalls: z.ZodOptional<z.ZodBoolean>;
893
+ cacheKey: z.ZodOptional<z.ZodString>;
894
+ maxOutputTokens: z.ZodOptional<z.ZodNumber>;
895
+ temperature: z.ZodOptional<z.ZodNumber>;
896
+ }, "strict", z.ZodTypeAny, {
897
+ reasoningEffort?: string | undefined;
898
+ serviceTier?: string | undefined;
899
+ parallelToolCalls?: boolean | undefined;
900
+ cacheKey?: string | undefined;
901
+ maxOutputTokens?: number | undefined;
902
+ temperature?: number | undefined;
903
+ }, {
904
+ reasoningEffort?: string | undefined;
905
+ serviceTier?: string | undefined;
906
+ parallelToolCalls?: boolean | undefined;
907
+ cacheKey?: string | undefined;
908
+ maxOutputTokens?: number | undefined;
909
+ temperature?: number | undefined;
910
+ }>;
911
+ problem: z.ZodNullable<z.ZodObject<{
912
+ code: z.ZodString;
913
+ message: z.ZodString;
914
+ retryable: z.ZodBoolean;
915
+ fieldErrors: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
916
+ requiredActions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
917
+ evidenceRefs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
918
+ context: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
919
+ }, "strict", z.ZodTypeAny, {
920
+ code: string;
921
+ message: string;
922
+ retryable: boolean;
923
+ fieldErrors: Record<string, string[]>;
924
+ requiredActions: string[];
925
+ evidenceRefs: string[];
926
+ context: Record<string, unknown>;
927
+ }, {
928
+ code: string;
929
+ message: string;
930
+ retryable: boolean;
931
+ fieldErrors?: Record<string, string[]> | undefined;
932
+ requiredActions?: string[] | undefined;
933
+ evidenceRefs?: string[] | undefined;
934
+ context?: Record<string, unknown> | undefined;
935
+ }>>;
936
+ }, "strict", z.ZodTypeAny, {
937
+ outcome: "completed" | "failed" | "incomplete" | "unknown";
938
+ message: {
939
+ role: "assistant" | "developer" | "system" | "tool" | "user";
940
+ content: string | Record<string, unknown>[] | null;
941
+ name?: string | undefined;
942
+ tool_call_id?: string | undefined;
943
+ tool_calls?: {
944
+ id: string;
945
+ type: "function";
946
+ function: {
947
+ name: string;
948
+ arguments: string;
949
+ };
950
+ }[] | undefined;
951
+ nativeContinuation?: {
952
+ route: {
953
+ source: string;
954
+ credentialProfileId: string;
955
+ accountFingerprint: string | null;
956
+ model: string | null;
957
+ };
958
+ format: string;
959
+ payload?: unknown;
960
+ } | undefined;
961
+ } | null;
962
+ route: {
963
+ source: string;
964
+ credentialProfileId: string;
965
+ accountFingerprint: string | null;
966
+ model: string | null;
967
+ };
968
+ usage: {
969
+ input_tokens: number | null;
970
+ output_tokens: number | null;
971
+ cached_input_tokens: number | null;
972
+ cache_write_tokens: number | null;
973
+ reasoning_tokens: number | null;
974
+ };
975
+ cost: {
976
+ knowledge: "estimated" | "exact" | "unknown";
977
+ billing: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
978
+ source: string;
979
+ provenance: string[];
980
+ estimatedUsd: number | null;
981
+ cashUsd: number | null;
982
+ valuationUsd: number | null;
983
+ valuationKnowledge: "estimated" | "exact" | "unknown";
984
+ };
985
+ appliedOptions: {
986
+ reasoningEffort?: string | undefined;
987
+ serviceTier?: string | undefined;
988
+ parallelToolCalls?: boolean | undefined;
989
+ cacheKey?: string | undefined;
990
+ maxOutputTokens?: number | undefined;
991
+ temperature?: number | undefined;
992
+ };
993
+ problem: {
994
+ code: string;
995
+ message: string;
996
+ retryable: boolean;
997
+ fieldErrors: Record<string, string[]>;
998
+ requiredActions: string[];
999
+ evidenceRefs: string[];
1000
+ context: Record<string, unknown>;
1001
+ } | null;
1002
+ }, {
1003
+ outcome: "completed" | "failed" | "incomplete" | "unknown";
1004
+ message: {
1005
+ role: "assistant" | "developer" | "system" | "tool" | "user";
1006
+ content: string | Record<string, unknown>[] | null;
1007
+ name?: string | undefined;
1008
+ tool_call_id?: string | undefined;
1009
+ tool_calls?: {
1010
+ id: string;
1011
+ type: "function";
1012
+ function: {
1013
+ name: string;
1014
+ arguments: string;
1015
+ };
1016
+ }[] | undefined;
1017
+ nativeContinuation?: {
1018
+ route: {
1019
+ source: string;
1020
+ credentialProfileId: string;
1021
+ accountFingerprint: string | null;
1022
+ model: string | null;
1023
+ };
1024
+ format: string;
1025
+ payload?: unknown;
1026
+ } | undefined;
1027
+ } | null;
1028
+ route: {
1029
+ source: string;
1030
+ credentialProfileId: string;
1031
+ accountFingerprint: string | null;
1032
+ model: string | null;
1033
+ };
1034
+ usage: {
1035
+ input_tokens?: number | null | undefined;
1036
+ output_tokens?: number | null | undefined;
1037
+ cached_input_tokens?: number | null | undefined;
1038
+ cache_write_tokens?: number | null | undefined;
1039
+ reasoning_tokens?: number | null | undefined;
1040
+ };
1041
+ cost: {
1042
+ knowledge: "estimated" | "exact" | "unknown";
1043
+ billing: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1044
+ source: string;
1045
+ provenance: string[];
1046
+ estimatedUsd?: number | null | undefined;
1047
+ cashUsd?: number | null | undefined;
1048
+ valuationUsd?: number | null | undefined;
1049
+ valuationKnowledge?: "estimated" | "exact" | "unknown" | undefined;
1050
+ };
1051
+ appliedOptions: {
1052
+ reasoningEffort?: string | undefined;
1053
+ serviceTier?: string | undefined;
1054
+ parallelToolCalls?: boolean | undefined;
1055
+ cacheKey?: string | undefined;
1056
+ maxOutputTokens?: number | undefined;
1057
+ temperature?: number | undefined;
1058
+ };
1059
+ problem: {
1060
+ code: string;
1061
+ message: string;
1062
+ retryable: boolean;
1063
+ fieldErrors?: Record<string, string[]> | undefined;
1064
+ requiredActions?: string[] | undefined;
1065
+ evidenceRefs?: string[] | undefined;
1066
+ context?: Record<string, unknown> | undefined;
1067
+ } | null;
1068
+ }>;
1069
+ export type ModelCallResult = z.infer<typeof ModelCallResult>;
1070
+ export declare const ModelCatalogEntry: z.ZodObject<{
1071
+ id: z.ZodString;
1072
+ label: z.ZodNullable<z.ZodString>;
1073
+ isDefault: z.ZodBoolean;
1074
+ contextWindow: z.ZodNullable<z.ZodNumber>;
1075
+ maxContextWindow: z.ZodNullable<z.ZodNumber>;
1076
+ maxOutputTokens: z.ZodNullable<z.ZodNumber>;
1077
+ inputModalities: z.ZodArray<z.ZodString, "many">;
1078
+ reasoningEfforts: z.ZodArray<z.ZodString, "many">;
1079
+ defaultReasoningEffort: z.ZodNullable<z.ZodString>;
1080
+ supportedOptions: z.ZodArray<z.ZodString, "many">;
1081
+ }, "strict", z.ZodTypeAny, {
1082
+ id: string;
1083
+ label: string | null;
1084
+ isDefault: boolean;
1085
+ contextWindow: number | null;
1086
+ maxContextWindow: number | null;
1087
+ maxOutputTokens: number | null;
1088
+ inputModalities: string[];
1089
+ reasoningEfforts: string[];
1090
+ defaultReasoningEffort: string | null;
1091
+ supportedOptions: string[];
1092
+ }, {
1093
+ id: string;
1094
+ label: string | null;
1095
+ isDefault: boolean;
1096
+ contextWindow: number | null;
1097
+ maxContextWindow: number | null;
1098
+ maxOutputTokens: number | null;
1099
+ inputModalities: string[];
1100
+ reasoningEfforts: string[];
1101
+ defaultReasoningEffort: string | null;
1102
+ supportedOptions: string[];
1103
+ }>;
1104
+ export type ModelCatalogEntry = z.infer<typeof ModelCatalogEntry>;
1105
+ export declare const ControlModelSourcesResponse: z.ZodObject<{
1106
+ sources: z.ZodArray<z.ZodObject<{
1107
+ id: z.ZodString;
1108
+ label: z.ZodString;
1109
+ credentialHarness: z.ZodString;
1110
+ }, "strict", z.ZodTypeAny, {
1111
+ id: string;
1112
+ label: string;
1113
+ credentialHarness: string;
1114
+ }, {
1115
+ id: string;
1116
+ label: string;
1117
+ credentialHarness: string;
1118
+ }>, "many">;
1119
+ }, "strict", z.ZodTypeAny, {
1120
+ sources: {
1121
+ id: string;
1122
+ label: string;
1123
+ credentialHarness: string;
1124
+ }[];
1125
+ }, {
1126
+ sources: {
1127
+ id: string;
1128
+ label: string;
1129
+ credentialHarness: string;
1130
+ }[];
1131
+ }>;
1132
+ export type ControlModelSourcesResponse = z.infer<typeof ControlModelSourcesResponse>;
1133
+ export declare const ControlModelCatalogResponse: z.ZodObject<{
1134
+ source: z.ZodString;
1135
+ credentialProfileId: z.ZodString;
1136
+ accountFingerprint: z.ZodNullable<z.ZodString>;
1137
+ observedAt: z.ZodString;
1138
+ provenance: z.ZodString;
1139
+ models: z.ZodArray<z.ZodObject<{
1140
+ id: z.ZodString;
1141
+ label: z.ZodNullable<z.ZodString>;
1142
+ isDefault: z.ZodBoolean;
1143
+ contextWindow: z.ZodNullable<z.ZodNumber>;
1144
+ maxContextWindow: z.ZodNullable<z.ZodNumber>;
1145
+ maxOutputTokens: z.ZodNullable<z.ZodNumber>;
1146
+ inputModalities: z.ZodArray<z.ZodString, "many">;
1147
+ reasoningEfforts: z.ZodArray<z.ZodString, "many">;
1148
+ defaultReasoningEffort: z.ZodNullable<z.ZodString>;
1149
+ supportedOptions: z.ZodArray<z.ZodString, "many">;
1150
+ }, "strict", z.ZodTypeAny, {
1151
+ id: string;
1152
+ label: string | null;
1153
+ isDefault: boolean;
1154
+ contextWindow: number | null;
1155
+ maxContextWindow: number | null;
1156
+ maxOutputTokens: number | null;
1157
+ inputModalities: string[];
1158
+ reasoningEfforts: string[];
1159
+ defaultReasoningEffort: string | null;
1160
+ supportedOptions: string[];
1161
+ }, {
1162
+ id: string;
1163
+ label: string | null;
1164
+ isDefault: boolean;
1165
+ contextWindow: number | null;
1166
+ maxContextWindow: number | null;
1167
+ maxOutputTokens: number | null;
1168
+ inputModalities: string[];
1169
+ reasoningEfforts: string[];
1170
+ defaultReasoningEffort: string | null;
1171
+ supportedOptions: string[];
1172
+ }>, "many">;
1173
+ }, "strict", z.ZodTypeAny, {
1174
+ source: string;
1175
+ credentialProfileId: string;
1176
+ accountFingerprint: string | null;
1177
+ observedAt: string;
1178
+ provenance: string;
1179
+ models: {
1180
+ id: string;
1181
+ label: string | null;
1182
+ isDefault: boolean;
1183
+ contextWindow: number | null;
1184
+ maxContextWindow: number | null;
1185
+ maxOutputTokens: number | null;
1186
+ inputModalities: string[];
1187
+ reasoningEfforts: string[];
1188
+ defaultReasoningEffort: string | null;
1189
+ supportedOptions: string[];
1190
+ }[];
1191
+ }, {
1192
+ source: string;
1193
+ credentialProfileId: string;
1194
+ accountFingerprint: string | null;
1195
+ observedAt: string;
1196
+ provenance: string;
1197
+ models: {
1198
+ id: string;
1199
+ label: string | null;
1200
+ isDefault: boolean;
1201
+ contextWindow: number | null;
1202
+ maxContextWindow: number | null;
1203
+ maxOutputTokens: number | null;
1204
+ inputModalities: string[];
1205
+ reasoningEfforts: string[];
1206
+ defaultReasoningEffort: string | null;
1207
+ supportedOptions: string[];
1208
+ }[];
1209
+ }>;
1210
+ export type ControlModelCatalogResponse = z.infer<typeof ControlModelCatalogResponse>;
1211
+ export declare const ModelDispatch: z.ZodObject<{
1212
+ state: z.ZodEnum<["not_started", "started", "response_received", "unknown"]>;
1213
+ startedAt: z.ZodNullable<z.ZodString>;
1214
+ route: z.ZodNullable<z.ZodObject<{
1215
+ source: z.ZodString;
1216
+ credentialProfileId: z.ZodString;
1217
+ accountFingerprint: z.ZodNullable<z.ZodString>;
1218
+ model: z.ZodNullable<z.ZodString>;
1219
+ }, "strict", z.ZodTypeAny, {
1220
+ source: string;
1221
+ credentialProfileId: string;
1222
+ accountFingerprint: string | null;
1223
+ model: string | null;
1224
+ }, {
1225
+ source: string;
1226
+ credentialProfileId: string;
1227
+ accountFingerprint: string | null;
1228
+ model: string | null;
1229
+ }>>;
1230
+ }, "strict", z.ZodTypeAny, {
1231
+ state: "not_started" | "response_received" | "started" | "unknown";
1232
+ startedAt: string | null;
1233
+ route: {
1234
+ source: string;
1235
+ credentialProfileId: string;
1236
+ accountFingerprint: string | null;
1237
+ model: string | null;
1238
+ } | null;
1239
+ }, {
1240
+ state: "not_started" | "response_received" | "started" | "unknown";
1241
+ startedAt: string | null;
1242
+ route: {
1243
+ source: string;
1244
+ credentialProfileId: string;
1245
+ accountFingerprint: string | null;
1246
+ model: string | null;
1247
+ } | null;
1248
+ }>;
1249
+ export type ModelDispatch = z.infer<typeof ModelDispatch>;
1250
+ export declare const ModelResponseCustody: z.ZodDiscriminatedUnion<"state", [z.ZodObject<{
1251
+ state: z.ZodLiteral<"absent">;
1252
+ }, "strict", z.ZodTypeAny, {
1253
+ state: "absent";
1254
+ }, {
1255
+ state: "absent";
1256
+ }>, z.ZodObject<{
1257
+ state: z.ZodLiteral<"ready">;
1258
+ ref: z.ZodObject<{
1259
+ resourceId: z.ZodString;
1260
+ sha256: z.ZodString;
1261
+ sizeBytes: z.ZodNumber;
1262
+ }, "strict", z.ZodTypeAny, {
1263
+ resourceId: string;
1264
+ sha256: string;
1265
+ sizeBytes: number;
1266
+ }, {
1267
+ resourceId: string;
1268
+ sha256: string;
1269
+ sizeBytes: number;
1270
+ }>;
1271
+ readyAt: z.ZodString;
1272
+ expiresAt: z.ZodString;
1273
+ }, "strict", z.ZodTypeAny, {
1274
+ state: "ready";
1275
+ ref: {
1276
+ resourceId: string;
1277
+ sha256: string;
1278
+ sizeBytes: number;
1279
+ };
1280
+ readyAt: string;
1281
+ expiresAt: string;
1282
+ }, {
1283
+ state: "ready";
1284
+ ref: {
1285
+ resourceId: string;
1286
+ sha256: string;
1287
+ sizeBytes: number;
1288
+ };
1289
+ readyAt: string;
1290
+ expiresAt: string;
1291
+ }>, z.ZodObject<{
1292
+ state: z.ZodLiteral<"acknowledged">;
1293
+ ref: z.ZodObject<{
1294
+ resourceId: z.ZodString;
1295
+ sha256: z.ZodString;
1296
+ sizeBytes: z.ZodNumber;
1297
+ }, "strict", z.ZodTypeAny, {
1298
+ resourceId: string;
1299
+ sha256: string;
1300
+ sizeBytes: number;
1301
+ }, {
1302
+ resourceId: string;
1303
+ sha256: string;
1304
+ sizeBytes: number;
1305
+ }>;
1306
+ releasedAt: z.ZodString;
1307
+ }, "strict", z.ZodTypeAny, {
1308
+ state: "acknowledged";
1309
+ ref: {
1310
+ resourceId: string;
1311
+ sha256: string;
1312
+ sizeBytes: number;
1313
+ };
1314
+ releasedAt: string;
1315
+ }, {
1316
+ state: "acknowledged";
1317
+ ref: {
1318
+ resourceId: string;
1319
+ sha256: string;
1320
+ sizeBytes: number;
1321
+ };
1322
+ releasedAt: string;
1323
+ }>, z.ZodObject<{
1324
+ state: z.ZodLiteral<"expired">;
1325
+ ref: z.ZodObject<{
1326
+ resourceId: z.ZodString;
1327
+ sha256: z.ZodString;
1328
+ sizeBytes: z.ZodNumber;
1329
+ }, "strict", z.ZodTypeAny, {
1330
+ resourceId: string;
1331
+ sha256: string;
1332
+ sizeBytes: number;
1333
+ }, {
1334
+ resourceId: string;
1335
+ sha256: string;
1336
+ sizeBytes: number;
1337
+ }>;
1338
+ releasedAt: z.ZodString;
1339
+ }, "strict", z.ZodTypeAny, {
1340
+ state: "expired";
1341
+ ref: {
1342
+ resourceId: string;
1343
+ sha256: string;
1344
+ sizeBytes: number;
1345
+ };
1346
+ releasedAt: string;
1347
+ }, {
1348
+ state: "expired";
1349
+ ref: {
1350
+ resourceId: string;
1351
+ sha256: string;
1352
+ sizeBytes: number;
1353
+ };
1354
+ releasedAt: string;
1355
+ }>]>;
1356
+ export type ModelResponseCustody = z.infer<typeof ModelResponseCustody>;
1357
+ export declare const ModelOperationParams: z.ZodObject<{
1358
+ kind: z.ZodLiteral<"model">;
1359
+ request: z.ZodObject<{
1360
+ resourceId: z.ZodString;
1361
+ sha256: z.ZodString;
1362
+ sizeBytes: z.ZodNumber;
1363
+ }, "strict", z.ZodTypeAny, {
1364
+ resourceId: string;
1365
+ sha256: string;
1366
+ sizeBytes: number;
1367
+ }, {
1368
+ resourceId: string;
1369
+ sha256: string;
1370
+ sizeBytes: number;
1371
+ }>;
1372
+ }, "strict", z.ZodTypeAny, {
1373
+ kind: "model";
1374
+ request: {
1375
+ resourceId: string;
1376
+ sha256: string;
1377
+ sizeBytes: number;
1378
+ };
1379
+ }, {
1380
+ kind: "model";
1381
+ request: {
1382
+ resourceId: string;
1383
+ sha256: string;
1384
+ sizeBytes: number;
1385
+ };
1386
+ }>;
1387
+ export type ModelOperationParams = z.infer<typeof ModelOperationParams>;
1388
+ /** Command-kind discrimination only; execution validates the complete params.
1389
+ * History scans need the kind, not a new Zod parse of every retained receipt. */
1390
+ export declare function isModelOperation(params: unknown): boolean;
1391
+ export declare const ModelOperationReceipt: z.ZodObject<{
1392
+ lifecycle: z.ZodEnum<["succeeded", "failed", "cancelled", "interrupted"]>;
1393
+ dispatch: z.ZodObject<{
1394
+ state: z.ZodEnum<["not_started", "started", "response_received", "unknown"]>;
1395
+ startedAt: z.ZodNullable<z.ZodString>;
1396
+ route: z.ZodNullable<z.ZodObject<{
1397
+ source: z.ZodString;
1398
+ credentialProfileId: z.ZodString;
1399
+ accountFingerprint: z.ZodNullable<z.ZodString>;
1400
+ model: z.ZodNullable<z.ZodString>;
1401
+ }, "strict", z.ZodTypeAny, {
1402
+ source: string;
1403
+ credentialProfileId: string;
1404
+ accountFingerprint: string | null;
1405
+ model: string | null;
1406
+ }, {
1407
+ source: string;
1408
+ credentialProfileId: string;
1409
+ accountFingerprint: string | null;
1410
+ model: string | null;
1411
+ }>>;
1412
+ }, "strict", z.ZodTypeAny, {
1413
+ state: "not_started" | "response_received" | "started" | "unknown";
1414
+ startedAt: string | null;
1415
+ route: {
1416
+ source: string;
1417
+ credentialProfileId: string;
1418
+ accountFingerprint: string | null;
1419
+ model: string | null;
1420
+ } | null;
1421
+ }, {
1422
+ state: "not_started" | "response_received" | "started" | "unknown";
1423
+ startedAt: string | null;
1424
+ route: {
1425
+ source: string;
1426
+ credentialProfileId: string;
1427
+ accountFingerprint: string | null;
1428
+ model: string | null;
1429
+ } | null;
1430
+ }>;
1431
+ response: z.ZodDiscriminatedUnion<"state", [z.ZodObject<{
1432
+ state: z.ZodLiteral<"absent">;
1433
+ }, "strict", z.ZodTypeAny, {
1434
+ state: "absent";
1435
+ }, {
1436
+ state: "absent";
1437
+ }>, z.ZodObject<{
1438
+ state: z.ZodLiteral<"ready">;
1439
+ ref: z.ZodObject<{
1440
+ resourceId: z.ZodString;
1441
+ sha256: z.ZodString;
1442
+ sizeBytes: z.ZodNumber;
1443
+ }, "strict", z.ZodTypeAny, {
1444
+ resourceId: string;
1445
+ sha256: string;
1446
+ sizeBytes: number;
1447
+ }, {
1448
+ resourceId: string;
1449
+ sha256: string;
1450
+ sizeBytes: number;
1451
+ }>;
1452
+ readyAt: z.ZodString;
1453
+ expiresAt: z.ZodString;
1454
+ }, "strict", z.ZodTypeAny, {
1455
+ state: "ready";
1456
+ ref: {
1457
+ resourceId: string;
1458
+ sha256: string;
1459
+ sizeBytes: number;
1460
+ };
1461
+ readyAt: string;
1462
+ expiresAt: string;
1463
+ }, {
1464
+ state: "ready";
1465
+ ref: {
1466
+ resourceId: string;
1467
+ sha256: string;
1468
+ sizeBytes: number;
1469
+ };
1470
+ readyAt: string;
1471
+ expiresAt: string;
1472
+ }>, z.ZodObject<{
1473
+ state: z.ZodLiteral<"acknowledged">;
1474
+ ref: z.ZodObject<{
1475
+ resourceId: z.ZodString;
1476
+ sha256: z.ZodString;
1477
+ sizeBytes: z.ZodNumber;
1478
+ }, "strict", z.ZodTypeAny, {
1479
+ resourceId: string;
1480
+ sha256: string;
1481
+ sizeBytes: number;
1482
+ }, {
1483
+ resourceId: string;
1484
+ sha256: string;
1485
+ sizeBytes: number;
1486
+ }>;
1487
+ releasedAt: z.ZodString;
1488
+ }, "strict", z.ZodTypeAny, {
1489
+ state: "acknowledged";
1490
+ ref: {
1491
+ resourceId: string;
1492
+ sha256: string;
1493
+ sizeBytes: number;
1494
+ };
1495
+ releasedAt: string;
1496
+ }, {
1497
+ state: "acknowledged";
1498
+ ref: {
1499
+ resourceId: string;
1500
+ sha256: string;
1501
+ sizeBytes: number;
1502
+ };
1503
+ releasedAt: string;
1504
+ }>, z.ZodObject<{
1505
+ state: z.ZodLiteral<"expired">;
1506
+ ref: z.ZodObject<{
1507
+ resourceId: z.ZodString;
1508
+ sha256: z.ZodString;
1509
+ sizeBytes: z.ZodNumber;
1510
+ }, "strict", z.ZodTypeAny, {
1511
+ resourceId: string;
1512
+ sha256: string;
1513
+ sizeBytes: number;
1514
+ }, {
1515
+ resourceId: string;
1516
+ sha256: string;
1517
+ sizeBytes: number;
1518
+ }>;
1519
+ releasedAt: z.ZodString;
1520
+ }, "strict", z.ZodTypeAny, {
1521
+ state: "expired";
1522
+ ref: {
1523
+ resourceId: string;
1524
+ sha256: string;
1525
+ sizeBytes: number;
1526
+ };
1527
+ releasedAt: string;
1528
+ }, {
1529
+ state: "expired";
1530
+ ref: {
1531
+ resourceId: string;
1532
+ sha256: string;
1533
+ sizeBytes: number;
1534
+ };
1535
+ releasedAt: string;
1536
+ }>]>;
1537
+ usage: z.ZodObject<{
1538
+ input_tokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1539
+ output_tokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1540
+ cached_input_tokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1541
+ } & {
1542
+ cache_write_tokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1543
+ reasoning_tokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1544
+ }, "strip", z.ZodTypeAny, {
1545
+ input_tokens: number | null;
1546
+ output_tokens: number | null;
1547
+ cached_input_tokens: number | null;
1548
+ cache_write_tokens: number | null;
1549
+ reasoning_tokens: number | null;
1550
+ }, {
1551
+ input_tokens?: number | null | undefined;
1552
+ output_tokens?: number | null | undefined;
1553
+ cached_input_tokens?: number | null | undefined;
1554
+ cache_write_tokens?: number | null | undefined;
1555
+ reasoning_tokens?: number | null | undefined;
1556
+ }>;
1557
+ cost: z.ZodNullable<z.ZodObject<{
1558
+ knowledge: z.ZodEnum<["exact", "estimated", "unknown"]>;
1559
+ billing: z.ZodEnum<["proven_zero", "subscription_entitlement", "metered", "unknown"]>;
1560
+ source: z.ZodString;
1561
+ provenance: z.ZodArray<z.ZodString, "many">;
1562
+ estimatedUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1563
+ } & {
1564
+ cashUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1565
+ valuationUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1566
+ valuationKnowledge: z.ZodDefault<z.ZodEnum<["exact", "estimated", "unknown"]>>;
1567
+ }, "strict", z.ZodTypeAny, {
1568
+ knowledge: "estimated" | "exact" | "unknown";
1569
+ billing: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1570
+ source: string;
1571
+ provenance: string[];
1572
+ estimatedUsd: number | null;
1573
+ cashUsd: number | null;
1574
+ valuationUsd: number | null;
1575
+ valuationKnowledge: "estimated" | "exact" | "unknown";
1576
+ }, {
1577
+ knowledge: "estimated" | "exact" | "unknown";
1578
+ billing: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1579
+ source: string;
1580
+ provenance: string[];
1581
+ estimatedUsd?: number | null | undefined;
1582
+ cashUsd?: number | null | undefined;
1583
+ valuationUsd?: number | null | undefined;
1584
+ valuationKnowledge?: "estimated" | "exact" | "unknown" | undefined;
1585
+ }>>;
1586
+ problem: z.ZodNullable<z.ZodObject<{
1587
+ code: z.ZodString;
1588
+ message: z.ZodString;
1589
+ retryable: z.ZodBoolean;
1590
+ fieldErrors: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
1591
+ requiredActions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1592
+ evidenceRefs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1593
+ context: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1594
+ }, "strict", z.ZodTypeAny, {
1595
+ code: string;
1596
+ message: string;
1597
+ retryable: boolean;
1598
+ fieldErrors: Record<string, string[]>;
1599
+ requiredActions: string[];
1600
+ evidenceRefs: string[];
1601
+ context: Record<string, unknown>;
1602
+ }, {
1603
+ code: string;
1604
+ message: string;
1605
+ retryable: boolean;
1606
+ fieldErrors?: Record<string, string[]> | undefined;
1607
+ requiredActions?: string[] | undefined;
1608
+ evidenceRefs?: string[] | undefined;
1609
+ context?: Record<string, unknown> | undefined;
1610
+ }>>;
1611
+ }, "strict", z.ZodTypeAny, {
1612
+ lifecycle: "cancelled" | "failed" | "interrupted" | "succeeded";
1613
+ dispatch: {
1614
+ state: "not_started" | "response_received" | "started" | "unknown";
1615
+ startedAt: string | null;
1616
+ route: {
1617
+ source: string;
1618
+ credentialProfileId: string;
1619
+ accountFingerprint: string | null;
1620
+ model: string | null;
1621
+ } | null;
1622
+ };
1623
+ response: {
1624
+ state: "absent";
1625
+ } | {
1626
+ state: "ready";
1627
+ ref: {
1628
+ resourceId: string;
1629
+ sha256: string;
1630
+ sizeBytes: number;
1631
+ };
1632
+ readyAt: string;
1633
+ expiresAt: string;
1634
+ } | {
1635
+ state: "acknowledged";
1636
+ ref: {
1637
+ resourceId: string;
1638
+ sha256: string;
1639
+ sizeBytes: number;
1640
+ };
1641
+ releasedAt: string;
1642
+ } | {
1643
+ state: "expired";
1644
+ ref: {
1645
+ resourceId: string;
1646
+ sha256: string;
1647
+ sizeBytes: number;
1648
+ };
1649
+ releasedAt: string;
1650
+ };
1651
+ usage: {
1652
+ input_tokens: number | null;
1653
+ output_tokens: number | null;
1654
+ cached_input_tokens: number | null;
1655
+ cache_write_tokens: number | null;
1656
+ reasoning_tokens: number | null;
1657
+ };
1658
+ cost: {
1659
+ knowledge: "estimated" | "exact" | "unknown";
1660
+ billing: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1661
+ source: string;
1662
+ provenance: string[];
1663
+ estimatedUsd: number | null;
1664
+ cashUsd: number | null;
1665
+ valuationUsd: number | null;
1666
+ valuationKnowledge: "estimated" | "exact" | "unknown";
1667
+ } | null;
1668
+ problem: {
1669
+ code: string;
1670
+ message: string;
1671
+ retryable: boolean;
1672
+ fieldErrors: Record<string, string[]>;
1673
+ requiredActions: string[];
1674
+ evidenceRefs: string[];
1675
+ context: Record<string, unknown>;
1676
+ } | null;
1677
+ }, {
1678
+ lifecycle: "cancelled" | "failed" | "interrupted" | "succeeded";
1679
+ dispatch: {
1680
+ state: "not_started" | "response_received" | "started" | "unknown";
1681
+ startedAt: string | null;
1682
+ route: {
1683
+ source: string;
1684
+ credentialProfileId: string;
1685
+ accountFingerprint: string | null;
1686
+ model: string | null;
1687
+ } | null;
1688
+ };
1689
+ response: {
1690
+ state: "absent";
1691
+ } | {
1692
+ state: "ready";
1693
+ ref: {
1694
+ resourceId: string;
1695
+ sha256: string;
1696
+ sizeBytes: number;
1697
+ };
1698
+ readyAt: string;
1699
+ expiresAt: string;
1700
+ } | {
1701
+ state: "acknowledged";
1702
+ ref: {
1703
+ resourceId: string;
1704
+ sha256: string;
1705
+ sizeBytes: number;
1706
+ };
1707
+ releasedAt: string;
1708
+ } | {
1709
+ state: "expired";
1710
+ ref: {
1711
+ resourceId: string;
1712
+ sha256: string;
1713
+ sizeBytes: number;
1714
+ };
1715
+ releasedAt: string;
1716
+ };
1717
+ usage: {
1718
+ input_tokens?: number | null | undefined;
1719
+ output_tokens?: number | null | undefined;
1720
+ cached_input_tokens?: number | null | undefined;
1721
+ cache_write_tokens?: number | null | undefined;
1722
+ reasoning_tokens?: number | null | undefined;
1723
+ };
1724
+ cost: {
1725
+ knowledge: "estimated" | "exact" | "unknown";
1726
+ billing: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1727
+ source: string;
1728
+ provenance: string[];
1729
+ estimatedUsd?: number | null | undefined;
1730
+ cashUsd?: number | null | undefined;
1731
+ valuationUsd?: number | null | undefined;
1732
+ valuationKnowledge?: "estimated" | "exact" | "unknown" | undefined;
1733
+ } | null;
1734
+ problem: {
1735
+ code: string;
1736
+ message: string;
1737
+ retryable: boolean;
1738
+ fieldErrors?: Record<string, string[]> | undefined;
1739
+ requiredActions?: string[] | undefined;
1740
+ evidenceRefs?: string[] | undefined;
1741
+ context?: Record<string, unknown> | undefined;
1742
+ } | null;
1743
+ }>;
1744
+ export type ModelOperationReceipt = z.infer<typeof ModelOperationReceipt>;
1745
+ export declare const ControlModelOperationCreateRequest: z.ZodObject<{
1746
+ request: z.ZodObject<{
1747
+ resourceId: z.ZodString;
1748
+ sha256: z.ZodString;
1749
+ sizeBytes: z.ZodNumber;
1750
+ }, "strict", z.ZodTypeAny, {
1751
+ resourceId: string;
1752
+ sha256: string;
1753
+ sizeBytes: number;
1754
+ }, {
1755
+ resourceId: string;
1756
+ sha256: string;
1757
+ sizeBytes: number;
1758
+ }>;
1759
+ }, "strict", z.ZodTypeAny, {
1760
+ request: {
1761
+ resourceId: string;
1762
+ sha256: string;
1763
+ sizeBytes: number;
1764
+ };
1765
+ }, {
1766
+ request: {
1767
+ resourceId: string;
1768
+ sha256: string;
1769
+ sizeBytes: number;
1770
+ };
1771
+ }>;
1772
+ export type ControlModelOperationCreateRequest = z.infer<typeof ControlModelOperationCreateRequest>;
1773
+ export declare const ControlModelOperationAckRequest: z.ZodObject<{
1774
+ sha256: z.ZodString;
1775
+ }, "strict", z.ZodTypeAny, {
1776
+ sha256: string;
1777
+ }, {
1778
+ sha256: string;
1779
+ }>;
1780
+ export type ControlModelOperationAckRequest = z.infer<typeof ControlModelOperationAckRequest>;
1781
+ export declare const ControlModelOperationControlRequest: z.ZodObject<{
1782
+ action: z.ZodLiteral<"cancel">;
1783
+ reasonCode: z.ZodOptional<z.ZodEnum<["user_cancelled", "host_cancelled", "owner_task_gone"]>>;
1784
+ }, "strict", z.ZodTypeAny, {
1785
+ action: "cancel";
1786
+ reasonCode?: "host_cancelled" | "owner_task_gone" | "user_cancelled" | undefined;
1787
+ }, {
1788
+ action: "cancel";
1789
+ reasonCode?: "host_cancelled" | "owner_task_gone" | "user_cancelled" | undefined;
1790
+ }>;
1791
+ export type ControlModelOperationControlRequest = z.infer<typeof ControlModelOperationControlRequest>;
1792
+ export declare const ControlModelOperationDetail: z.ZodObject<{
1793
+ id: z.ZodString;
1794
+ state: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled", "interrupted"]>;
1795
+ createdAt: z.ZodString;
1796
+ startedAt: z.ZodNullable<z.ZodString>;
1797
+ finishedAt: z.ZodNullable<z.ZodString>;
1798
+ dispatch: z.ZodObject<{
1799
+ state: z.ZodEnum<["not_started", "started", "response_received", "unknown"]>;
1800
+ startedAt: z.ZodNullable<z.ZodString>;
1801
+ route: z.ZodNullable<z.ZodObject<{
1802
+ source: z.ZodString;
1803
+ credentialProfileId: z.ZodString;
1804
+ accountFingerprint: z.ZodNullable<z.ZodString>;
1805
+ model: z.ZodNullable<z.ZodString>;
1806
+ }, "strict", z.ZodTypeAny, {
1807
+ source: string;
1808
+ credentialProfileId: string;
1809
+ accountFingerprint: string | null;
1810
+ model: string | null;
1811
+ }, {
1812
+ source: string;
1813
+ credentialProfileId: string;
1814
+ accountFingerprint: string | null;
1815
+ model: string | null;
1816
+ }>>;
1817
+ }, "strict", z.ZodTypeAny, {
1818
+ state: "not_started" | "response_received" | "started" | "unknown";
1819
+ startedAt: string | null;
1820
+ route: {
1821
+ source: string;
1822
+ credentialProfileId: string;
1823
+ accountFingerprint: string | null;
1824
+ model: string | null;
1825
+ } | null;
1826
+ }, {
1827
+ state: "not_started" | "response_received" | "started" | "unknown";
1828
+ startedAt: string | null;
1829
+ route: {
1830
+ source: string;
1831
+ credentialProfileId: string;
1832
+ accountFingerprint: string | null;
1833
+ model: string | null;
1834
+ } | null;
1835
+ }>;
1836
+ response: z.ZodDiscriminatedUnion<"state", [z.ZodObject<{
1837
+ state: z.ZodLiteral<"absent">;
1838
+ }, "strict", z.ZodTypeAny, {
1839
+ state: "absent";
1840
+ }, {
1841
+ state: "absent";
1842
+ }>, z.ZodObject<{
1843
+ state: z.ZodLiteral<"ready">;
1844
+ ref: z.ZodObject<{
1845
+ resourceId: z.ZodString;
1846
+ sha256: z.ZodString;
1847
+ sizeBytes: z.ZodNumber;
1848
+ }, "strict", z.ZodTypeAny, {
1849
+ resourceId: string;
1850
+ sha256: string;
1851
+ sizeBytes: number;
1852
+ }, {
1853
+ resourceId: string;
1854
+ sha256: string;
1855
+ sizeBytes: number;
1856
+ }>;
1857
+ readyAt: z.ZodString;
1858
+ expiresAt: z.ZodString;
1859
+ }, "strict", z.ZodTypeAny, {
1860
+ state: "ready";
1861
+ ref: {
1862
+ resourceId: string;
1863
+ sha256: string;
1864
+ sizeBytes: number;
1865
+ };
1866
+ readyAt: string;
1867
+ expiresAt: string;
1868
+ }, {
1869
+ state: "ready";
1870
+ ref: {
1871
+ resourceId: string;
1872
+ sha256: string;
1873
+ sizeBytes: number;
1874
+ };
1875
+ readyAt: string;
1876
+ expiresAt: string;
1877
+ }>, z.ZodObject<{
1878
+ state: z.ZodLiteral<"acknowledged">;
1879
+ ref: z.ZodObject<{
1880
+ resourceId: z.ZodString;
1881
+ sha256: z.ZodString;
1882
+ sizeBytes: z.ZodNumber;
1883
+ }, "strict", z.ZodTypeAny, {
1884
+ resourceId: string;
1885
+ sha256: string;
1886
+ sizeBytes: number;
1887
+ }, {
1888
+ resourceId: string;
1889
+ sha256: string;
1890
+ sizeBytes: number;
1891
+ }>;
1892
+ releasedAt: z.ZodString;
1893
+ }, "strict", z.ZodTypeAny, {
1894
+ state: "acknowledged";
1895
+ ref: {
1896
+ resourceId: string;
1897
+ sha256: string;
1898
+ sizeBytes: number;
1899
+ };
1900
+ releasedAt: string;
1901
+ }, {
1902
+ state: "acknowledged";
1903
+ ref: {
1904
+ resourceId: string;
1905
+ sha256: string;
1906
+ sizeBytes: number;
1907
+ };
1908
+ releasedAt: string;
1909
+ }>, z.ZodObject<{
1910
+ state: z.ZodLiteral<"expired">;
1911
+ ref: z.ZodObject<{
1912
+ resourceId: z.ZodString;
1913
+ sha256: z.ZodString;
1914
+ sizeBytes: z.ZodNumber;
1915
+ }, "strict", z.ZodTypeAny, {
1916
+ resourceId: string;
1917
+ sha256: string;
1918
+ sizeBytes: number;
1919
+ }, {
1920
+ resourceId: string;
1921
+ sha256: string;
1922
+ sizeBytes: number;
1923
+ }>;
1924
+ releasedAt: z.ZodString;
1925
+ }, "strict", z.ZodTypeAny, {
1926
+ state: "expired";
1927
+ ref: {
1928
+ resourceId: string;
1929
+ sha256: string;
1930
+ sizeBytes: number;
1931
+ };
1932
+ releasedAt: string;
1933
+ }, {
1934
+ state: "expired";
1935
+ ref: {
1936
+ resourceId: string;
1937
+ sha256: string;
1938
+ sizeBytes: number;
1939
+ };
1940
+ releasedAt: string;
1941
+ }>]>;
1942
+ usage: z.ZodObject<{
1943
+ input_tokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1944
+ output_tokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1945
+ cached_input_tokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1946
+ } & {
1947
+ cache_write_tokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1948
+ reasoning_tokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1949
+ }, "strip", z.ZodTypeAny, {
1950
+ input_tokens: number | null;
1951
+ output_tokens: number | null;
1952
+ cached_input_tokens: number | null;
1953
+ cache_write_tokens: number | null;
1954
+ reasoning_tokens: number | null;
1955
+ }, {
1956
+ input_tokens?: number | null | undefined;
1957
+ output_tokens?: number | null | undefined;
1958
+ cached_input_tokens?: number | null | undefined;
1959
+ cache_write_tokens?: number | null | undefined;
1960
+ reasoning_tokens?: number | null | undefined;
1961
+ }>;
1962
+ cost: z.ZodNullable<z.ZodObject<{
1963
+ knowledge: z.ZodEnum<["exact", "estimated", "unknown"]>;
1964
+ billing: z.ZodEnum<["proven_zero", "subscription_entitlement", "metered", "unknown"]>;
1965
+ source: z.ZodString;
1966
+ provenance: z.ZodArray<z.ZodString, "many">;
1967
+ estimatedUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1968
+ } & {
1969
+ cashUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1970
+ valuationUsd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1971
+ valuationKnowledge: z.ZodDefault<z.ZodEnum<["exact", "estimated", "unknown"]>>;
1972
+ }, "strict", z.ZodTypeAny, {
1973
+ knowledge: "estimated" | "exact" | "unknown";
1974
+ billing: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1975
+ source: string;
1976
+ provenance: string[];
1977
+ estimatedUsd: number | null;
1978
+ cashUsd: number | null;
1979
+ valuationUsd: number | null;
1980
+ valuationKnowledge: "estimated" | "exact" | "unknown";
1981
+ }, {
1982
+ knowledge: "estimated" | "exact" | "unknown";
1983
+ billing: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
1984
+ source: string;
1985
+ provenance: string[];
1986
+ estimatedUsd?: number | null | undefined;
1987
+ cashUsd?: number | null | undefined;
1988
+ valuationUsd?: number | null | undefined;
1989
+ valuationKnowledge?: "estimated" | "exact" | "unknown" | undefined;
1990
+ }>>;
1991
+ problem: z.ZodNullable<z.ZodObject<{
1992
+ code: z.ZodString;
1993
+ message: z.ZodString;
1994
+ retryable: z.ZodBoolean;
1995
+ fieldErrors: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
1996
+ requiredActions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1997
+ evidenceRefs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1998
+ context: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1999
+ }, "strict", z.ZodTypeAny, {
2000
+ code: string;
2001
+ message: string;
2002
+ retryable: boolean;
2003
+ fieldErrors: Record<string, string[]>;
2004
+ requiredActions: string[];
2005
+ evidenceRefs: string[];
2006
+ context: Record<string, unknown>;
2007
+ }, {
2008
+ code: string;
2009
+ message: string;
2010
+ retryable: boolean;
2011
+ fieldErrors?: Record<string, string[]> | undefined;
2012
+ requiredActions?: string[] | undefined;
2013
+ evidenceRefs?: string[] | undefined;
2014
+ context?: Record<string, unknown> | undefined;
2015
+ }>>;
2016
+ }, "strict", z.ZodTypeAny, {
2017
+ id: string;
2018
+ state: "cancelled" | "failed" | "interrupted" | "queued" | "running" | "succeeded";
2019
+ createdAt: string;
2020
+ startedAt: string | null;
2021
+ finishedAt: string | null;
2022
+ dispatch: {
2023
+ state: "not_started" | "response_received" | "started" | "unknown";
2024
+ startedAt: string | null;
2025
+ route: {
2026
+ source: string;
2027
+ credentialProfileId: string;
2028
+ accountFingerprint: string | null;
2029
+ model: string | null;
2030
+ } | null;
2031
+ };
2032
+ response: {
2033
+ state: "absent";
2034
+ } | {
2035
+ state: "ready";
2036
+ ref: {
2037
+ resourceId: string;
2038
+ sha256: string;
2039
+ sizeBytes: number;
2040
+ };
2041
+ readyAt: string;
2042
+ expiresAt: string;
2043
+ } | {
2044
+ state: "acknowledged";
2045
+ ref: {
2046
+ resourceId: string;
2047
+ sha256: string;
2048
+ sizeBytes: number;
2049
+ };
2050
+ releasedAt: string;
2051
+ } | {
2052
+ state: "expired";
2053
+ ref: {
2054
+ resourceId: string;
2055
+ sha256: string;
2056
+ sizeBytes: number;
2057
+ };
2058
+ releasedAt: string;
2059
+ };
2060
+ usage: {
2061
+ input_tokens: number | null;
2062
+ output_tokens: number | null;
2063
+ cached_input_tokens: number | null;
2064
+ cache_write_tokens: number | null;
2065
+ reasoning_tokens: number | null;
2066
+ };
2067
+ cost: {
2068
+ knowledge: "estimated" | "exact" | "unknown";
2069
+ billing: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
2070
+ source: string;
2071
+ provenance: string[];
2072
+ estimatedUsd: number | null;
2073
+ cashUsd: number | null;
2074
+ valuationUsd: number | null;
2075
+ valuationKnowledge: "estimated" | "exact" | "unknown";
2076
+ } | null;
2077
+ problem: {
2078
+ code: string;
2079
+ message: string;
2080
+ retryable: boolean;
2081
+ fieldErrors: Record<string, string[]>;
2082
+ requiredActions: string[];
2083
+ evidenceRefs: string[];
2084
+ context: Record<string, unknown>;
2085
+ } | null;
2086
+ }, {
2087
+ id: string;
2088
+ state: "cancelled" | "failed" | "interrupted" | "queued" | "running" | "succeeded";
2089
+ createdAt: string;
2090
+ startedAt: string | null;
2091
+ finishedAt: string | null;
2092
+ dispatch: {
2093
+ state: "not_started" | "response_received" | "started" | "unknown";
2094
+ startedAt: string | null;
2095
+ route: {
2096
+ source: string;
2097
+ credentialProfileId: string;
2098
+ accountFingerprint: string | null;
2099
+ model: string | null;
2100
+ } | null;
2101
+ };
2102
+ response: {
2103
+ state: "absent";
2104
+ } | {
2105
+ state: "ready";
2106
+ ref: {
2107
+ resourceId: string;
2108
+ sha256: string;
2109
+ sizeBytes: number;
2110
+ };
2111
+ readyAt: string;
2112
+ expiresAt: string;
2113
+ } | {
2114
+ state: "acknowledged";
2115
+ ref: {
2116
+ resourceId: string;
2117
+ sha256: string;
2118
+ sizeBytes: number;
2119
+ };
2120
+ releasedAt: string;
2121
+ } | {
2122
+ state: "expired";
2123
+ ref: {
2124
+ resourceId: string;
2125
+ sha256: string;
2126
+ sizeBytes: number;
2127
+ };
2128
+ releasedAt: string;
2129
+ };
2130
+ usage: {
2131
+ input_tokens?: number | null | undefined;
2132
+ output_tokens?: number | null | undefined;
2133
+ cached_input_tokens?: number | null | undefined;
2134
+ cache_write_tokens?: number | null | undefined;
2135
+ reasoning_tokens?: number | null | undefined;
2136
+ };
2137
+ cost: {
2138
+ knowledge: "estimated" | "exact" | "unknown";
2139
+ billing: "metered" | "proven_zero" | "subscription_entitlement" | "unknown";
2140
+ source: string;
2141
+ provenance: string[];
2142
+ estimatedUsd?: number | null | undefined;
2143
+ cashUsd?: number | null | undefined;
2144
+ valuationUsd?: number | null | undefined;
2145
+ valuationKnowledge?: "estimated" | "exact" | "unknown" | undefined;
2146
+ } | null;
2147
+ problem: {
2148
+ code: string;
2149
+ message: string;
2150
+ retryable: boolean;
2151
+ fieldErrors?: Record<string, string[]> | undefined;
2152
+ requiredActions?: string[] | undefined;
2153
+ evidenceRefs?: string[] | undefined;
2154
+ context?: Record<string, unknown> | undefined;
2155
+ } | null;
2156
+ }>;
2157
+ export type ControlModelOperationDetail = z.infer<typeof ControlModelOperationDetail>;
2158
+ //# sourceMappingURL=model-operation.d.ts.map