@atcn/subledger 1.4.1 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -6
- package/dist/documents.d.ts +1067 -26
- package/dist/documents.js +121 -7
- package/dist/exceptions.d.ts +47 -2
- package/dist/exceptions.js +173 -3
- package/dist/expectations.d.ts +96 -0
- package/dist/expectations.js +236 -0
- package/dist/importing.d.ts +53 -0
- package/dist/importing.js +192 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/outcome.d.ts +36 -0
- package/dist/outcome.js +64 -0
- package/dist/presets.d.ts +36 -0
- package/dist/presets.js +192 -0
- package/dist/projection.d.ts +28 -3
- package/dist/projection.js +69 -4
- package/dist/rails.d.ts +108 -0
- package/dist/rails.js +242 -0
- package/dist/response.d.ts +2 -0
- package/dist/response.js +1 -0
- package/dist/rollup.d.ts +1 -1
- package/dist/rollup.js +10 -4
- package/dist/types.d.ts +279 -7
- package/dist/types.js +179 -6
- package/dist/usage.d.ts +41 -0
- package/dist/usage.js +86 -0
- package/dist/verify.d.ts +8 -1
- package/dist/verify.js +385 -7
- package/package.json +6 -4
- package/test-vectors/reconciliation-results.json +151 -0
- package/test-vectors/reconciliation.json +107 -0
- package/test-vectors/vectors.json +25666 -1
package/dist/documents.d.ts
CHANGED
|
@@ -4,12 +4,15 @@ import { z } from "zod";
|
|
|
4
4
|
* Schema 1.3 adds closure `obligation_links`, the clearing-network claim asserters, and the `network_recorded` assurance label;
|
|
5
5
|
* 1.2 documents must use neither. Schema 1.4 adds delegation `execution`, the response statement fields `execution`,
|
|
6
6
|
* `issued_at`, `expires_at` and `refs`, and the `expired` and `revoked` labels; 1.2 and 1.3 documents must use none
|
|
7
|
-
* of them
|
|
7
|
+
* of them. Schema 1.5 adds delegation `pricing`, `refund_terms` and `witness_policy`, claim `usage`, the `delivery.usage`
|
|
8
|
+
* field, closure `usage_checks`, `additional_models` in runs, financial event `skill`, the `pending_finality` status,
|
|
9
|
+
* the statement `role`, the `estimate` and `hold` event types with `expectation`, task `estimate_tolerance_bps` and
|
|
10
|
+
* closure `expectation_report`; earlier documents must use none of them (see packages/schema/COMPATIBILITY.md).
|
|
8
11
|
*/
|
|
9
|
-
export declare const SUBLEDGER_SCHEMA_VERSION: "1.
|
|
10
|
-
export declare const SUPPORTED_SUBLEDGER_SCHEMA_VERSIONS: readonly ["1.2", "1.3", "1.4"];
|
|
12
|
+
export declare const SUBLEDGER_SCHEMA_VERSION: "1.5";
|
|
13
|
+
export declare const SUPPORTED_SUBLEDGER_SCHEMA_VERSIONS: readonly ["1.2", "1.3", "1.4", "1.5"];
|
|
11
14
|
/** Must equal this package's version in package.json (checked by a test). */
|
|
12
|
-
export declare const SUBLEDGER_VERIFIER_VERSION: "1.
|
|
15
|
+
export declare const SUBLEDGER_VERIFIER_VERSION: "1.5.1";
|
|
13
16
|
export declare const RECEIPT_DOCUMENT_TYPE: "atcn.subledger.receipt";
|
|
14
17
|
export declare const CLOSURE_DOCUMENT_TYPE: "atcn.subledger.closure";
|
|
15
18
|
export declare const RESPONSE_STATEMENT_TYPE: "atcn.subledger.receipt_response";
|
|
@@ -108,6 +111,8 @@ export declare const FinancialEventRecordSchema: z.ZodObject<{
|
|
|
108
111
|
credit: "credit";
|
|
109
112
|
adjustment: "adjustment";
|
|
110
113
|
fx_rate: "fx_rate";
|
|
114
|
+
estimate: "estimate";
|
|
115
|
+
hold: "hold";
|
|
111
116
|
}>;
|
|
112
117
|
source: z.ZodString;
|
|
113
118
|
source_event_id: z.ZodString;
|
|
@@ -123,6 +128,7 @@ export declare const FinancialEventRecordSchema: z.ZodObject<{
|
|
|
123
128
|
issued: "issued";
|
|
124
129
|
pending: "pending";
|
|
125
130
|
reported_paid: "reported_paid";
|
|
131
|
+
pending_finality: "pending_finality";
|
|
126
132
|
failed: "failed";
|
|
127
133
|
refunded: "refunded";
|
|
128
134
|
reversed: "reversed";
|
|
@@ -152,6 +158,38 @@ export declare const FinancialEventRecordSchema: z.ZodObject<{
|
|
|
152
158
|
rate_denominator: z.ZodNumber;
|
|
153
159
|
}, z.core.$strip>>;
|
|
154
160
|
reason: z.ZodNullable<z.ZodString>;
|
|
161
|
+
skill: z.ZodOptional<z.ZodObject<{
|
|
162
|
+
namespace: z.ZodString;
|
|
163
|
+
skill_id: z.ZodString;
|
|
164
|
+
agent_card_url: z.ZodOptional<z.ZodURL>;
|
|
165
|
+
}, z.core.$strip>>;
|
|
166
|
+
expectation: z.ZodOptional<z.ZodObject<{
|
|
167
|
+
issued_by: z.ZodEnum<{
|
|
168
|
+
agent: "agent";
|
|
169
|
+
gateway: "gateway";
|
|
170
|
+
operator: "operator";
|
|
171
|
+
}>;
|
|
172
|
+
source_ref: z.ZodNullable<z.ZodString>;
|
|
173
|
+
basis: z.ZodNullable<z.ZodString>;
|
|
174
|
+
expires_at: z.ZodNullable<z.ZodISODateTime>;
|
|
175
|
+
supersedes: z.ZodNullable<z.ZodString>;
|
|
176
|
+
hold_status: z.ZodOptional<z.ZodEnum<{
|
|
177
|
+
open: "open";
|
|
178
|
+
captured: "captured";
|
|
179
|
+
released: "released";
|
|
180
|
+
expired: "expired";
|
|
181
|
+
}>>;
|
|
182
|
+
signer: z.ZodOptional<z.ZodObject<{
|
|
183
|
+
provider_id: z.ZodString;
|
|
184
|
+
binding_id: z.ZodString;
|
|
185
|
+
key_id: z.ZodString;
|
|
186
|
+
value: z.ZodString;
|
|
187
|
+
}, z.core.$strict>>;
|
|
188
|
+
}, z.core.$strict>>;
|
|
189
|
+
rail_attestation: z.ZodOptional<z.ZodObject<{
|
|
190
|
+
scheme: z.ZodString;
|
|
191
|
+
record: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
192
|
+
}, z.core.$strict>>;
|
|
155
193
|
}, z.core.$strip>;
|
|
156
194
|
export declare const DeliveryClaimSchema: z.ZodObject<{
|
|
157
195
|
event_id: z.ZodString;
|
|
@@ -173,6 +211,7 @@ export declare const DeliveryClaimSchema: z.ZodObject<{
|
|
|
173
211
|
clearing_network: "clearing_network";
|
|
174
212
|
}>;
|
|
175
213
|
assurance: z.ZodArray<z.ZodEnum<{
|
|
214
|
+
expired: "expired";
|
|
176
215
|
issuer_signed: "issuer_signed";
|
|
177
216
|
buyer_recorded: "buyer_recorded";
|
|
178
217
|
network_recorded: "network_recorded";
|
|
@@ -182,8 +221,9 @@ export declare const DeliveryClaimSchema: z.ZodObject<{
|
|
|
182
221
|
provider_key_signed: "provider_key_signed";
|
|
183
222
|
contested: "contested";
|
|
184
223
|
superseded: "superseded";
|
|
185
|
-
expired: "expired";
|
|
186
224
|
revoked: "revoked";
|
|
225
|
+
gateway_signed: "gateway_signed";
|
|
226
|
+
rail_attested: "rail_attested";
|
|
187
227
|
}>>;
|
|
188
228
|
note: z.ZodNullable<z.ZodString>;
|
|
189
229
|
evidence: z.ZodArray<z.ZodObject<{
|
|
@@ -196,17 +236,43 @@ export declare const DeliveryClaimSchema: z.ZodObject<{
|
|
|
196
236
|
retrospective: z.ZodBoolean;
|
|
197
237
|
occurred_at: z.ZodString;
|
|
198
238
|
recorded_at: z.ZodString;
|
|
239
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
240
|
+
trace_digest: z.ZodString;
|
|
241
|
+
summary: z.ZodObject<{
|
|
242
|
+
models: z.ZodArray<z.ZodObject<{
|
|
243
|
+
provider: z.ZodString;
|
|
244
|
+
name: z.ZodString;
|
|
245
|
+
calls: z.ZodNumber;
|
|
246
|
+
input_tokens: z.ZodNumber;
|
|
247
|
+
output_tokens: z.ZodNumber;
|
|
248
|
+
cache_read_input_tokens: z.ZodNumber;
|
|
249
|
+
}, z.core.$strict>>;
|
|
250
|
+
tools: z.ZodArray<z.ZodObject<{
|
|
251
|
+
name: z.ZodString;
|
|
252
|
+
calls: z.ZodNumber;
|
|
253
|
+
}, z.core.$strict>>;
|
|
254
|
+
a2a_calls: z.ZodNumber;
|
|
255
|
+
}, z.core.$strict>;
|
|
256
|
+
}, z.core.$strict>>;
|
|
257
|
+
signer: z.ZodOptional<z.ZodObject<{
|
|
258
|
+
provider_id: z.ZodString;
|
|
259
|
+
binding_id: z.ZodString;
|
|
260
|
+
key_id: z.ZodString;
|
|
261
|
+
value: z.ZodString;
|
|
262
|
+
}, z.core.$strict>>;
|
|
199
263
|
}, z.core.$strip>;
|
|
200
264
|
export type DeliveryClaim = z.infer<typeof DeliveryClaimSchema>;
|
|
201
265
|
export declare const FIELD_STATES: readonly ["missing", "imported", "buyer_asserted", "provider_reported", "contested"];
|
|
202
266
|
export type FieldState = (typeof FIELD_STATES)[number];
|
|
267
|
+
/** Not exhaustive, because schema 1.5 added a field; the verifier checks the field set for the document's version. */
|
|
203
268
|
export declare const FieldStatusSchema: z.ZodRecord<z.ZodEnum<{
|
|
204
269
|
"delivery.status": "delivery.status";
|
|
205
270
|
"delivery.evidence": "delivery.evidence";
|
|
206
271
|
"scope.terms_digest": "scope.terms_digest";
|
|
207
272
|
"financial.amounts": "financial.amounts";
|
|
208
273
|
"financial.status": "financial.status";
|
|
209
|
-
|
|
274
|
+
"delivery.usage": "delivery.usage";
|
|
275
|
+
}> & z.core.$partial, z.ZodEnum<{
|
|
210
276
|
contested: "contested";
|
|
211
277
|
missing: "missing";
|
|
212
278
|
imported: "imported";
|
|
@@ -220,6 +286,7 @@ export declare const CorrectionSchema: z.ZodObject<{
|
|
|
220
286
|
"scope.terms_digest": "scope.terms_digest";
|
|
221
287
|
"financial.amounts": "financial.amounts";
|
|
222
288
|
"financial.status": "financial.status";
|
|
289
|
+
"delivery.usage": "delivery.usage";
|
|
223
290
|
}>;
|
|
224
291
|
proposed_value: z.ZodString;
|
|
225
292
|
reason: z.ZodString;
|
|
@@ -245,6 +312,7 @@ export declare const ResponseStatementSchema: z.ZodObject<{
|
|
|
245
312
|
"scope.terms_digest": "scope.terms_digest";
|
|
246
313
|
"financial.amounts": "financial.amounts";
|
|
247
314
|
"financial.status": "financial.status";
|
|
315
|
+
"delivery.usage": "delivery.usage";
|
|
248
316
|
}>>;
|
|
249
317
|
note: z.ZodNullable<z.ZodString>;
|
|
250
318
|
evidence: z.ZodArray<z.ZodObject<{
|
|
@@ -259,6 +327,7 @@ export declare const ResponseStatementSchema: z.ZodObject<{
|
|
|
259
327
|
"scope.terms_digest": "scope.terms_digest";
|
|
260
328
|
"financial.amounts": "financial.amounts";
|
|
261
329
|
"financial.status": "financial.status";
|
|
330
|
+
"delivery.usage": "delivery.usage";
|
|
262
331
|
}>;
|
|
263
332
|
proposed_value: z.ZodString;
|
|
264
333
|
reason: z.ZodString;
|
|
@@ -277,6 +346,7 @@ export declare const ResponseStatementSchema: z.ZodObject<{
|
|
|
277
346
|
attestation_digest: z.ZodString;
|
|
278
347
|
reason: z.ZodString;
|
|
279
348
|
}, z.core.$strip>>>;
|
|
349
|
+
role: z.ZodOptional<z.ZodLiteral<"witness">>;
|
|
280
350
|
}, z.core.$strip>;
|
|
281
351
|
export type ResponseStatement = z.infer<typeof ResponseStatementSchema>;
|
|
282
352
|
export declare const ResponseRecordSchema: z.ZodObject<{
|
|
@@ -303,6 +373,7 @@ export declare const ResponseRecordSchema: z.ZodObject<{
|
|
|
303
373
|
"scope.terms_digest": "scope.terms_digest";
|
|
304
374
|
"financial.amounts": "financial.amounts";
|
|
305
375
|
"financial.status": "financial.status";
|
|
376
|
+
"delivery.usage": "delivery.usage";
|
|
306
377
|
}>>;
|
|
307
378
|
note: z.ZodNullable<z.ZodString>;
|
|
308
379
|
evidence: z.ZodArray<z.ZodObject<{
|
|
@@ -317,6 +388,7 @@ export declare const ResponseRecordSchema: z.ZodObject<{
|
|
|
317
388
|
"scope.terms_digest": "scope.terms_digest";
|
|
318
389
|
"financial.amounts": "financial.amounts";
|
|
319
390
|
"financial.status": "financial.status";
|
|
391
|
+
"delivery.usage": "delivery.usage";
|
|
320
392
|
}>;
|
|
321
393
|
proposed_value: z.ZodString;
|
|
322
394
|
reason: z.ZodString;
|
|
@@ -335,6 +407,7 @@ export declare const ResponseRecordSchema: z.ZodObject<{
|
|
|
335
407
|
attestation_digest: z.ZodString;
|
|
336
408
|
reason: z.ZodString;
|
|
337
409
|
}, z.core.$strip>>>;
|
|
410
|
+
role: z.ZodOptional<z.ZodLiteral<"witness">>;
|
|
338
411
|
}, z.core.$strip>;
|
|
339
412
|
statement_digest: z.ZodString;
|
|
340
413
|
provider_signature: z.ZodNullable<z.ZodObject<{
|
|
@@ -343,6 +416,7 @@ export declare const ResponseRecordSchema: z.ZodObject<{
|
|
|
343
416
|
value: z.ZodString;
|
|
344
417
|
}, z.core.$strip>>;
|
|
345
418
|
assurance: z.ZodArray<z.ZodEnum<{
|
|
419
|
+
expired: "expired";
|
|
346
420
|
issuer_signed: "issuer_signed";
|
|
347
421
|
buyer_recorded: "buyer_recorded";
|
|
348
422
|
network_recorded: "network_recorded";
|
|
@@ -352,8 +426,9 @@ export declare const ResponseRecordSchema: z.ZodObject<{
|
|
|
352
426
|
provider_key_signed: "provider_key_signed";
|
|
353
427
|
contested: "contested";
|
|
354
428
|
superseded: "superseded";
|
|
355
|
-
expired: "expired";
|
|
356
429
|
revoked: "revoked";
|
|
430
|
+
gateway_signed: "gateway_signed";
|
|
431
|
+
rail_attested: "rail_attested";
|
|
357
432
|
}>>;
|
|
358
433
|
decision: z.ZodNullable<z.ZodObject<{
|
|
359
434
|
status: z.ZodEnum<{
|
|
@@ -402,10 +477,17 @@ export declare const ReceiptFinancialEventSchema: z.ZodObject<{
|
|
|
402
477
|
credit: "credit";
|
|
403
478
|
adjustment: "adjustment";
|
|
404
479
|
fx_rate: "fx_rate";
|
|
480
|
+
estimate: "estimate";
|
|
481
|
+
hold: "hold";
|
|
405
482
|
}>;
|
|
483
|
+
provider_id: z.ZodNullable<z.ZodString>;
|
|
406
484
|
currency: z.ZodString;
|
|
407
485
|
retrospective: z.ZodBoolean;
|
|
408
|
-
|
|
486
|
+
skill: z.ZodOptional<z.ZodObject<{
|
|
487
|
+
namespace: z.ZodString;
|
|
488
|
+
skill_id: z.ZodString;
|
|
489
|
+
agent_card_url: z.ZodOptional<z.ZodURL>;
|
|
490
|
+
}, z.core.$strip>>;
|
|
409
491
|
evidence: z.ZodNullable<z.ZodObject<{
|
|
410
492
|
uri: z.ZodString;
|
|
411
493
|
digest: z.ZodNullable<z.ZodString>;
|
|
@@ -423,6 +505,7 @@ export declare const ReceiptFinancialEventSchema: z.ZodObject<{
|
|
|
423
505
|
issued: "issued";
|
|
424
506
|
pending: "pending";
|
|
425
507
|
reported_paid: "reported_paid";
|
|
508
|
+
pending_finality: "pending_finality";
|
|
426
509
|
failed: "failed";
|
|
427
510
|
refunded: "refunded";
|
|
428
511
|
reversed: "reversed";
|
|
@@ -437,6 +520,33 @@ export declare const ReceiptFinancialEventSchema: z.ZodObject<{
|
|
|
437
520
|
included_in_event_id: z.ZodNullable<z.ZodString>;
|
|
438
521
|
reverses_event_id: z.ZodNullable<z.ZodString>;
|
|
439
522
|
settles_event_id: z.ZodNullable<z.ZodString>;
|
|
523
|
+
expectation: z.ZodOptional<z.ZodObject<{
|
|
524
|
+
issued_by: z.ZodEnum<{
|
|
525
|
+
agent: "agent";
|
|
526
|
+
gateway: "gateway";
|
|
527
|
+
operator: "operator";
|
|
528
|
+
}>;
|
|
529
|
+
source_ref: z.ZodNullable<z.ZodString>;
|
|
530
|
+
basis: z.ZodNullable<z.ZodString>;
|
|
531
|
+
expires_at: z.ZodNullable<z.ZodISODateTime>;
|
|
532
|
+
supersedes: z.ZodNullable<z.ZodString>;
|
|
533
|
+
hold_status: z.ZodOptional<z.ZodEnum<{
|
|
534
|
+
open: "open";
|
|
535
|
+
captured: "captured";
|
|
536
|
+
released: "released";
|
|
537
|
+
expired: "expired";
|
|
538
|
+
}>>;
|
|
539
|
+
signer: z.ZodOptional<z.ZodObject<{
|
|
540
|
+
provider_id: z.ZodString;
|
|
541
|
+
binding_id: z.ZodString;
|
|
542
|
+
key_id: z.ZodString;
|
|
543
|
+
value: z.ZodString;
|
|
544
|
+
}, z.core.$strict>>;
|
|
545
|
+
}, z.core.$strict>>;
|
|
546
|
+
rail_attestation: z.ZodOptional<z.ZodObject<{
|
|
547
|
+
scheme: z.ZodString;
|
|
548
|
+
record: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
549
|
+
}, z.core.$strict>>;
|
|
440
550
|
imported_at: z.ZodString;
|
|
441
551
|
financial_event_id: z.ZodString;
|
|
442
552
|
allocation_version: z.ZodNumber;
|
|
@@ -444,9 +554,10 @@ export declare const ReceiptFinancialEventSchema: z.ZodObject<{
|
|
|
444
554
|
export declare const ReceiptPayloadSchema: z.ZodObject<{
|
|
445
555
|
document_type: z.ZodLiteral<"atcn.subledger.receipt">;
|
|
446
556
|
schema_version: z.ZodEnum<{
|
|
447
|
-
1.4: "1.4";
|
|
448
557
|
1.2: "1.2";
|
|
449
558
|
1.3: "1.3";
|
|
559
|
+
1.4: "1.4";
|
|
560
|
+
1.5: "1.5";
|
|
450
561
|
}>;
|
|
451
562
|
receipt_id: z.ZodString;
|
|
452
563
|
revision: z.ZodNumber;
|
|
@@ -496,6 +607,11 @@ export declare const ReceiptPayloadSchema: z.ZodObject<{
|
|
|
496
607
|
name: z.ZodString;
|
|
497
608
|
version: z.ZodString;
|
|
498
609
|
}, z.core.$strip>>;
|
|
610
|
+
additional_models: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
611
|
+
provider: z.ZodString;
|
|
612
|
+
name: z.ZodString;
|
|
613
|
+
version: z.ZodString;
|
|
614
|
+
}, z.core.$strip>>>;
|
|
499
615
|
config_digest: z.ZodOptional<z.ZodString>;
|
|
500
616
|
}, z.core.$strip>;
|
|
501
617
|
skill: z.ZodOptional<z.ZodObject<{
|
|
@@ -504,6 +620,46 @@ export declare const ReceiptPayloadSchema: z.ZodObject<{
|
|
|
504
620
|
agent_card_url: z.ZodOptional<z.ZodURL>;
|
|
505
621
|
}, z.core.$strip>>;
|
|
506
622
|
}, z.core.$strip>>;
|
|
623
|
+
pricing: z.ZodOptional<z.ZodObject<{
|
|
624
|
+
rates: z.ZodArray<z.ZodObject<{
|
|
625
|
+
meter: z.ZodEnum<{
|
|
626
|
+
input_tokens: "input_tokens";
|
|
627
|
+
output_tokens: "output_tokens";
|
|
628
|
+
cache_read_input_tokens: "cache_read_input_tokens";
|
|
629
|
+
model_call: "model_call";
|
|
630
|
+
tool_call: "tool_call";
|
|
631
|
+
a2a_call: "a2a_call";
|
|
632
|
+
}>;
|
|
633
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
634
|
+
provider: z.ZodString;
|
|
635
|
+
name: z.ZodString;
|
|
636
|
+
}, z.core.$strict>>;
|
|
637
|
+
tool_name: z.ZodOptional<z.ZodString>;
|
|
638
|
+
price_numerator: z.ZodNumber;
|
|
639
|
+
price_denominator: z.ZodNumber;
|
|
640
|
+
}, z.core.$strict>>;
|
|
641
|
+
fixed_minor: z.ZodOptional<z.ZodNumber>;
|
|
642
|
+
tolerance_bps: z.ZodNumber;
|
|
643
|
+
}, z.core.$strict>>;
|
|
644
|
+
refund_terms: z.ZodOptional<z.ZodObject<{
|
|
645
|
+
on_failure: z.ZodEnum<{
|
|
646
|
+
dispute: "dispute";
|
|
647
|
+
refund: "refund";
|
|
648
|
+
}>;
|
|
649
|
+
on_timeout: z.ZodEnum<{
|
|
650
|
+
dispute: "dispute";
|
|
651
|
+
refund: "refund";
|
|
652
|
+
}>;
|
|
653
|
+
after_settlement: z.ZodObject<{
|
|
654
|
+
cap_minor: z.ZodNumber;
|
|
655
|
+
window_seconds: z.ZodNumber;
|
|
656
|
+
}, z.core.$strict>;
|
|
657
|
+
}, z.core.$strict>>;
|
|
658
|
+
witness_policy: z.ZodOptional<z.ZodObject<{
|
|
659
|
+
min_independent_witnesses: z.ZodNumber;
|
|
660
|
+
witness_provider_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
661
|
+
independence: z.ZodLiteral<"distinct_verified_domain">;
|
|
662
|
+
}, z.core.$strict>>;
|
|
507
663
|
}, z.core.$strip>;
|
|
508
664
|
provider: z.ZodObject<{
|
|
509
665
|
provider_id: z.ZodNullable<z.ZodString>;
|
|
@@ -524,6 +680,12 @@ export declare const ReceiptPayloadSchema: z.ZodObject<{
|
|
|
524
680
|
terms_update: "terms_update";
|
|
525
681
|
correction: "correction";
|
|
526
682
|
}>;
|
|
683
|
+
signer: z.ZodOptional<z.ZodObject<{
|
|
684
|
+
provider_id: z.ZodString;
|
|
685
|
+
binding_id: z.ZodString;
|
|
686
|
+
key_id: z.ZodString;
|
|
687
|
+
value: z.ZodString;
|
|
688
|
+
}, z.core.$strict>>;
|
|
527
689
|
retrospective: z.ZodBoolean;
|
|
528
690
|
occurred_at: z.ZodString;
|
|
529
691
|
asserted_by: z.ZodEnum<{
|
|
@@ -541,8 +703,27 @@ export declare const ReceiptPayloadSchema: z.ZodObject<{
|
|
|
541
703
|
}, z.core.$strip>>;
|
|
542
704
|
supersedes_event_id: z.ZodNullable<z.ZodString>;
|
|
543
705
|
reason: z.ZodNullable<z.ZodString>;
|
|
706
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
707
|
+
trace_digest: z.ZodString;
|
|
708
|
+
summary: z.ZodObject<{
|
|
709
|
+
models: z.ZodArray<z.ZodObject<{
|
|
710
|
+
provider: z.ZodString;
|
|
711
|
+
name: z.ZodString;
|
|
712
|
+
calls: z.ZodNumber;
|
|
713
|
+
input_tokens: z.ZodNumber;
|
|
714
|
+
output_tokens: z.ZodNumber;
|
|
715
|
+
cache_read_input_tokens: z.ZodNumber;
|
|
716
|
+
}, z.core.$strict>>;
|
|
717
|
+
tools: z.ZodArray<z.ZodObject<{
|
|
718
|
+
name: z.ZodString;
|
|
719
|
+
calls: z.ZodNumber;
|
|
720
|
+
}, z.core.$strict>>;
|
|
721
|
+
a2a_calls: z.ZodNumber;
|
|
722
|
+
}, z.core.$strict>;
|
|
723
|
+
}, z.core.$strict>>;
|
|
544
724
|
event_id: z.ZodString;
|
|
545
725
|
assurance: z.ZodArray<z.ZodEnum<{
|
|
726
|
+
expired: "expired";
|
|
546
727
|
issuer_signed: "issuer_signed";
|
|
547
728
|
buyer_recorded: "buyer_recorded";
|
|
548
729
|
network_recorded: "network_recorded";
|
|
@@ -552,8 +733,9 @@ export declare const ReceiptPayloadSchema: z.ZodObject<{
|
|
|
552
733
|
provider_key_signed: "provider_key_signed";
|
|
553
734
|
contested: "contested";
|
|
554
735
|
superseded: "superseded";
|
|
555
|
-
expired: "expired";
|
|
556
736
|
revoked: "revoked";
|
|
737
|
+
gateway_signed: "gateway_signed";
|
|
738
|
+
rail_attested: "rail_attested";
|
|
557
739
|
}>>;
|
|
558
740
|
recorded_at: z.ZodString;
|
|
559
741
|
}, z.core.$strip>>;
|
|
@@ -569,10 +751,17 @@ export declare const ReceiptPayloadSchema: z.ZodObject<{
|
|
|
569
751
|
credit: "credit";
|
|
570
752
|
adjustment: "adjustment";
|
|
571
753
|
fx_rate: "fx_rate";
|
|
754
|
+
estimate: "estimate";
|
|
755
|
+
hold: "hold";
|
|
572
756
|
}>;
|
|
757
|
+
provider_id: z.ZodNullable<z.ZodString>;
|
|
573
758
|
currency: z.ZodString;
|
|
574
759
|
retrospective: z.ZodBoolean;
|
|
575
|
-
|
|
760
|
+
skill: z.ZodOptional<z.ZodObject<{
|
|
761
|
+
namespace: z.ZodString;
|
|
762
|
+
skill_id: z.ZodString;
|
|
763
|
+
agent_card_url: z.ZodOptional<z.ZodURL>;
|
|
764
|
+
}, z.core.$strip>>;
|
|
576
765
|
evidence: z.ZodNullable<z.ZodObject<{
|
|
577
766
|
uri: z.ZodString;
|
|
578
767
|
digest: z.ZodNullable<z.ZodString>;
|
|
@@ -590,6 +779,7 @@ export declare const ReceiptPayloadSchema: z.ZodObject<{
|
|
|
590
779
|
issued: "issued";
|
|
591
780
|
pending: "pending";
|
|
592
781
|
reported_paid: "reported_paid";
|
|
782
|
+
pending_finality: "pending_finality";
|
|
593
783
|
failed: "failed";
|
|
594
784
|
refunded: "refunded";
|
|
595
785
|
reversed: "reversed";
|
|
@@ -604,6 +794,33 @@ export declare const ReceiptPayloadSchema: z.ZodObject<{
|
|
|
604
794
|
included_in_event_id: z.ZodNullable<z.ZodString>;
|
|
605
795
|
reverses_event_id: z.ZodNullable<z.ZodString>;
|
|
606
796
|
settles_event_id: z.ZodNullable<z.ZodString>;
|
|
797
|
+
expectation: z.ZodOptional<z.ZodObject<{
|
|
798
|
+
issued_by: z.ZodEnum<{
|
|
799
|
+
agent: "agent";
|
|
800
|
+
gateway: "gateway";
|
|
801
|
+
operator: "operator";
|
|
802
|
+
}>;
|
|
803
|
+
source_ref: z.ZodNullable<z.ZodString>;
|
|
804
|
+
basis: z.ZodNullable<z.ZodString>;
|
|
805
|
+
expires_at: z.ZodNullable<z.ZodISODateTime>;
|
|
806
|
+
supersedes: z.ZodNullable<z.ZodString>;
|
|
807
|
+
hold_status: z.ZodOptional<z.ZodEnum<{
|
|
808
|
+
open: "open";
|
|
809
|
+
captured: "captured";
|
|
810
|
+
released: "released";
|
|
811
|
+
expired: "expired";
|
|
812
|
+
}>>;
|
|
813
|
+
signer: z.ZodOptional<z.ZodObject<{
|
|
814
|
+
provider_id: z.ZodString;
|
|
815
|
+
binding_id: z.ZodString;
|
|
816
|
+
key_id: z.ZodString;
|
|
817
|
+
value: z.ZodString;
|
|
818
|
+
}, z.core.$strict>>;
|
|
819
|
+
}, z.core.$strict>>;
|
|
820
|
+
rail_attestation: z.ZodOptional<z.ZodObject<{
|
|
821
|
+
scheme: z.ZodString;
|
|
822
|
+
record: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
823
|
+
}, z.core.$strict>>;
|
|
607
824
|
imported_at: z.ZodString;
|
|
608
825
|
financial_event_id: z.ZodString;
|
|
609
826
|
allocation_version: z.ZodNumber;
|
|
@@ -628,7 +845,8 @@ export declare const ReceiptPayloadSchema: z.ZodObject<{
|
|
|
628
845
|
"scope.terms_digest": "scope.terms_digest";
|
|
629
846
|
"financial.amounts": "financial.amounts";
|
|
630
847
|
"financial.status": "financial.status";
|
|
631
|
-
|
|
848
|
+
"delivery.usage": "delivery.usage";
|
|
849
|
+
}> & z.core.$partial, z.ZodEnum<{
|
|
632
850
|
contested: "contested";
|
|
633
851
|
missing: "missing";
|
|
634
852
|
imported: "imported";
|
|
@@ -641,6 +859,7 @@ export declare const ReceiptPayloadSchema: z.ZodObject<{
|
|
|
641
859
|
"scope.terms_digest": "scope.terms_digest";
|
|
642
860
|
"financial.amounts": "financial.amounts";
|
|
643
861
|
"financial.status": "financial.status";
|
|
862
|
+
"delivery.usage": "delivery.usage";
|
|
644
863
|
}>>;
|
|
645
864
|
corrections: z.ZodArray<z.ZodObject<{
|
|
646
865
|
response_id: z.ZodString;
|
|
@@ -651,31 +870,47 @@ export declare const ReceiptPayloadSchema: z.ZodObject<{
|
|
|
651
870
|
"scope.terms_digest": "scope.terms_digest";
|
|
652
871
|
"financial.amounts": "financial.amounts";
|
|
653
872
|
"financial.status": "financial.status";
|
|
873
|
+
"delivery.usage": "delivery.usage";
|
|
654
874
|
}>>;
|
|
655
875
|
decision: z.ZodEnum<{
|
|
876
|
+
open: "open";
|
|
656
877
|
accepted: "accepted";
|
|
657
878
|
rejected: "rejected";
|
|
658
|
-
open: "open";
|
|
659
879
|
}>;
|
|
660
880
|
}, z.core.$strip>>;
|
|
661
881
|
lineage: z.ZodObject<{
|
|
662
882
|
complete: z.ZodBoolean;
|
|
663
883
|
capture_gaps: z.ZodArray<z.ZodObject<{
|
|
884
|
+
kind: z.ZodString;
|
|
664
885
|
detail: z.ZodString;
|
|
665
886
|
reported_at: z.ZodString;
|
|
666
887
|
gap_id: z.ZodString;
|
|
667
|
-
kind: z.ZodString;
|
|
668
888
|
}, z.core.$strip>>;
|
|
669
889
|
}, z.core.$strip>;
|
|
890
|
+
key_bindings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
891
|
+
binding_id: z.ZodString;
|
|
892
|
+
provider_id: z.ZodString;
|
|
893
|
+
key_id: z.ZodString;
|
|
894
|
+
public_key: z.ZodString;
|
|
895
|
+
method: z.ZodEnum<{
|
|
896
|
+
operator_configured: "operator_configured";
|
|
897
|
+
domain_challenge: "domain_challenge";
|
|
898
|
+
}>;
|
|
899
|
+
domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
900
|
+
created_by: z.ZodString;
|
|
901
|
+
created_at: z.ZodString;
|
|
902
|
+
revoked_at: z.ZodNullable<z.ZodString>;
|
|
903
|
+
}, z.core.$strip>>>;
|
|
670
904
|
}, z.core.$strip>;
|
|
671
905
|
export type ReceiptPayload = z.infer<typeof ReceiptPayloadSchema>;
|
|
672
906
|
export declare const SignedReceiptSchema: z.ZodObject<{
|
|
673
907
|
payload: z.ZodObject<{
|
|
674
908
|
document_type: z.ZodLiteral<"atcn.subledger.receipt">;
|
|
675
909
|
schema_version: z.ZodEnum<{
|
|
676
|
-
1.4: "1.4";
|
|
677
910
|
1.2: "1.2";
|
|
678
911
|
1.3: "1.3";
|
|
912
|
+
1.4: "1.4";
|
|
913
|
+
1.5: "1.5";
|
|
679
914
|
}>;
|
|
680
915
|
receipt_id: z.ZodString;
|
|
681
916
|
revision: z.ZodNumber;
|
|
@@ -725,6 +960,11 @@ export declare const SignedReceiptSchema: z.ZodObject<{
|
|
|
725
960
|
name: z.ZodString;
|
|
726
961
|
version: z.ZodString;
|
|
727
962
|
}, z.core.$strip>>;
|
|
963
|
+
additional_models: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
964
|
+
provider: z.ZodString;
|
|
965
|
+
name: z.ZodString;
|
|
966
|
+
version: z.ZodString;
|
|
967
|
+
}, z.core.$strip>>>;
|
|
728
968
|
config_digest: z.ZodOptional<z.ZodString>;
|
|
729
969
|
}, z.core.$strip>;
|
|
730
970
|
skill: z.ZodOptional<z.ZodObject<{
|
|
@@ -733,6 +973,46 @@ export declare const SignedReceiptSchema: z.ZodObject<{
|
|
|
733
973
|
agent_card_url: z.ZodOptional<z.ZodURL>;
|
|
734
974
|
}, z.core.$strip>>;
|
|
735
975
|
}, z.core.$strip>>;
|
|
976
|
+
pricing: z.ZodOptional<z.ZodObject<{
|
|
977
|
+
rates: z.ZodArray<z.ZodObject<{
|
|
978
|
+
meter: z.ZodEnum<{
|
|
979
|
+
input_tokens: "input_tokens";
|
|
980
|
+
output_tokens: "output_tokens";
|
|
981
|
+
cache_read_input_tokens: "cache_read_input_tokens";
|
|
982
|
+
model_call: "model_call";
|
|
983
|
+
tool_call: "tool_call";
|
|
984
|
+
a2a_call: "a2a_call";
|
|
985
|
+
}>;
|
|
986
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
987
|
+
provider: z.ZodString;
|
|
988
|
+
name: z.ZodString;
|
|
989
|
+
}, z.core.$strict>>;
|
|
990
|
+
tool_name: z.ZodOptional<z.ZodString>;
|
|
991
|
+
price_numerator: z.ZodNumber;
|
|
992
|
+
price_denominator: z.ZodNumber;
|
|
993
|
+
}, z.core.$strict>>;
|
|
994
|
+
fixed_minor: z.ZodOptional<z.ZodNumber>;
|
|
995
|
+
tolerance_bps: z.ZodNumber;
|
|
996
|
+
}, z.core.$strict>>;
|
|
997
|
+
refund_terms: z.ZodOptional<z.ZodObject<{
|
|
998
|
+
on_failure: z.ZodEnum<{
|
|
999
|
+
dispute: "dispute";
|
|
1000
|
+
refund: "refund";
|
|
1001
|
+
}>;
|
|
1002
|
+
on_timeout: z.ZodEnum<{
|
|
1003
|
+
dispute: "dispute";
|
|
1004
|
+
refund: "refund";
|
|
1005
|
+
}>;
|
|
1006
|
+
after_settlement: z.ZodObject<{
|
|
1007
|
+
cap_minor: z.ZodNumber;
|
|
1008
|
+
window_seconds: z.ZodNumber;
|
|
1009
|
+
}, z.core.$strict>;
|
|
1010
|
+
}, z.core.$strict>>;
|
|
1011
|
+
witness_policy: z.ZodOptional<z.ZodObject<{
|
|
1012
|
+
min_independent_witnesses: z.ZodNumber;
|
|
1013
|
+
witness_provider_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1014
|
+
independence: z.ZodLiteral<"distinct_verified_domain">;
|
|
1015
|
+
}, z.core.$strict>>;
|
|
736
1016
|
}, z.core.$strip>;
|
|
737
1017
|
provider: z.ZodObject<{
|
|
738
1018
|
provider_id: z.ZodNullable<z.ZodString>;
|
|
@@ -753,6 +1033,12 @@ export declare const SignedReceiptSchema: z.ZodObject<{
|
|
|
753
1033
|
terms_update: "terms_update";
|
|
754
1034
|
correction: "correction";
|
|
755
1035
|
}>;
|
|
1036
|
+
signer: z.ZodOptional<z.ZodObject<{
|
|
1037
|
+
provider_id: z.ZodString;
|
|
1038
|
+
binding_id: z.ZodString;
|
|
1039
|
+
key_id: z.ZodString;
|
|
1040
|
+
value: z.ZodString;
|
|
1041
|
+
}, z.core.$strict>>;
|
|
756
1042
|
retrospective: z.ZodBoolean;
|
|
757
1043
|
occurred_at: z.ZodString;
|
|
758
1044
|
asserted_by: z.ZodEnum<{
|
|
@@ -770,8 +1056,27 @@ export declare const SignedReceiptSchema: z.ZodObject<{
|
|
|
770
1056
|
}, z.core.$strip>>;
|
|
771
1057
|
supersedes_event_id: z.ZodNullable<z.ZodString>;
|
|
772
1058
|
reason: z.ZodNullable<z.ZodString>;
|
|
1059
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
1060
|
+
trace_digest: z.ZodString;
|
|
1061
|
+
summary: z.ZodObject<{
|
|
1062
|
+
models: z.ZodArray<z.ZodObject<{
|
|
1063
|
+
provider: z.ZodString;
|
|
1064
|
+
name: z.ZodString;
|
|
1065
|
+
calls: z.ZodNumber;
|
|
1066
|
+
input_tokens: z.ZodNumber;
|
|
1067
|
+
output_tokens: z.ZodNumber;
|
|
1068
|
+
cache_read_input_tokens: z.ZodNumber;
|
|
1069
|
+
}, z.core.$strict>>;
|
|
1070
|
+
tools: z.ZodArray<z.ZodObject<{
|
|
1071
|
+
name: z.ZodString;
|
|
1072
|
+
calls: z.ZodNumber;
|
|
1073
|
+
}, z.core.$strict>>;
|
|
1074
|
+
a2a_calls: z.ZodNumber;
|
|
1075
|
+
}, z.core.$strict>;
|
|
1076
|
+
}, z.core.$strict>>;
|
|
773
1077
|
event_id: z.ZodString;
|
|
774
1078
|
assurance: z.ZodArray<z.ZodEnum<{
|
|
1079
|
+
expired: "expired";
|
|
775
1080
|
issuer_signed: "issuer_signed";
|
|
776
1081
|
buyer_recorded: "buyer_recorded";
|
|
777
1082
|
network_recorded: "network_recorded";
|
|
@@ -781,8 +1086,9 @@ export declare const SignedReceiptSchema: z.ZodObject<{
|
|
|
781
1086
|
provider_key_signed: "provider_key_signed";
|
|
782
1087
|
contested: "contested";
|
|
783
1088
|
superseded: "superseded";
|
|
784
|
-
expired: "expired";
|
|
785
1089
|
revoked: "revoked";
|
|
1090
|
+
gateway_signed: "gateway_signed";
|
|
1091
|
+
rail_attested: "rail_attested";
|
|
786
1092
|
}>>;
|
|
787
1093
|
recorded_at: z.ZodString;
|
|
788
1094
|
}, z.core.$strip>>;
|
|
@@ -798,10 +1104,17 @@ export declare const SignedReceiptSchema: z.ZodObject<{
|
|
|
798
1104
|
credit: "credit";
|
|
799
1105
|
adjustment: "adjustment";
|
|
800
1106
|
fx_rate: "fx_rate";
|
|
1107
|
+
estimate: "estimate";
|
|
1108
|
+
hold: "hold";
|
|
801
1109
|
}>;
|
|
1110
|
+
provider_id: z.ZodNullable<z.ZodString>;
|
|
802
1111
|
currency: z.ZodString;
|
|
803
1112
|
retrospective: z.ZodBoolean;
|
|
804
|
-
|
|
1113
|
+
skill: z.ZodOptional<z.ZodObject<{
|
|
1114
|
+
namespace: z.ZodString;
|
|
1115
|
+
skill_id: z.ZodString;
|
|
1116
|
+
agent_card_url: z.ZodOptional<z.ZodURL>;
|
|
1117
|
+
}, z.core.$strip>>;
|
|
805
1118
|
evidence: z.ZodNullable<z.ZodObject<{
|
|
806
1119
|
uri: z.ZodString;
|
|
807
1120
|
digest: z.ZodNullable<z.ZodString>;
|
|
@@ -819,6 +1132,7 @@ export declare const SignedReceiptSchema: z.ZodObject<{
|
|
|
819
1132
|
issued: "issued";
|
|
820
1133
|
pending: "pending";
|
|
821
1134
|
reported_paid: "reported_paid";
|
|
1135
|
+
pending_finality: "pending_finality";
|
|
822
1136
|
failed: "failed";
|
|
823
1137
|
refunded: "refunded";
|
|
824
1138
|
reversed: "reversed";
|
|
@@ -833,6 +1147,33 @@ export declare const SignedReceiptSchema: z.ZodObject<{
|
|
|
833
1147
|
included_in_event_id: z.ZodNullable<z.ZodString>;
|
|
834
1148
|
reverses_event_id: z.ZodNullable<z.ZodString>;
|
|
835
1149
|
settles_event_id: z.ZodNullable<z.ZodString>;
|
|
1150
|
+
expectation: z.ZodOptional<z.ZodObject<{
|
|
1151
|
+
issued_by: z.ZodEnum<{
|
|
1152
|
+
agent: "agent";
|
|
1153
|
+
gateway: "gateway";
|
|
1154
|
+
operator: "operator";
|
|
1155
|
+
}>;
|
|
1156
|
+
source_ref: z.ZodNullable<z.ZodString>;
|
|
1157
|
+
basis: z.ZodNullable<z.ZodString>;
|
|
1158
|
+
expires_at: z.ZodNullable<z.ZodISODateTime>;
|
|
1159
|
+
supersedes: z.ZodNullable<z.ZodString>;
|
|
1160
|
+
hold_status: z.ZodOptional<z.ZodEnum<{
|
|
1161
|
+
open: "open";
|
|
1162
|
+
captured: "captured";
|
|
1163
|
+
released: "released";
|
|
1164
|
+
expired: "expired";
|
|
1165
|
+
}>>;
|
|
1166
|
+
signer: z.ZodOptional<z.ZodObject<{
|
|
1167
|
+
provider_id: z.ZodString;
|
|
1168
|
+
binding_id: z.ZodString;
|
|
1169
|
+
key_id: z.ZodString;
|
|
1170
|
+
value: z.ZodString;
|
|
1171
|
+
}, z.core.$strict>>;
|
|
1172
|
+
}, z.core.$strict>>;
|
|
1173
|
+
rail_attestation: z.ZodOptional<z.ZodObject<{
|
|
1174
|
+
scheme: z.ZodString;
|
|
1175
|
+
record: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1176
|
+
}, z.core.$strict>>;
|
|
836
1177
|
imported_at: z.ZodString;
|
|
837
1178
|
financial_event_id: z.ZodString;
|
|
838
1179
|
allocation_version: z.ZodNumber;
|
|
@@ -857,7 +1198,8 @@ export declare const SignedReceiptSchema: z.ZodObject<{
|
|
|
857
1198
|
"scope.terms_digest": "scope.terms_digest";
|
|
858
1199
|
"financial.amounts": "financial.amounts";
|
|
859
1200
|
"financial.status": "financial.status";
|
|
860
|
-
|
|
1201
|
+
"delivery.usage": "delivery.usage";
|
|
1202
|
+
}> & z.core.$partial, z.ZodEnum<{
|
|
861
1203
|
contested: "contested";
|
|
862
1204
|
missing: "missing";
|
|
863
1205
|
imported: "imported";
|
|
@@ -870,6 +1212,7 @@ export declare const SignedReceiptSchema: z.ZodObject<{
|
|
|
870
1212
|
"scope.terms_digest": "scope.terms_digest";
|
|
871
1213
|
"financial.amounts": "financial.amounts";
|
|
872
1214
|
"financial.status": "financial.status";
|
|
1215
|
+
"delivery.usage": "delivery.usage";
|
|
873
1216
|
}>>;
|
|
874
1217
|
corrections: z.ZodArray<z.ZodObject<{
|
|
875
1218
|
response_id: z.ZodString;
|
|
@@ -880,22 +1223,37 @@ export declare const SignedReceiptSchema: z.ZodObject<{
|
|
|
880
1223
|
"scope.terms_digest": "scope.terms_digest";
|
|
881
1224
|
"financial.amounts": "financial.amounts";
|
|
882
1225
|
"financial.status": "financial.status";
|
|
1226
|
+
"delivery.usage": "delivery.usage";
|
|
883
1227
|
}>>;
|
|
884
1228
|
decision: z.ZodEnum<{
|
|
1229
|
+
open: "open";
|
|
885
1230
|
accepted: "accepted";
|
|
886
1231
|
rejected: "rejected";
|
|
887
|
-
open: "open";
|
|
888
1232
|
}>;
|
|
889
1233
|
}, z.core.$strip>>;
|
|
890
1234
|
lineage: z.ZodObject<{
|
|
891
1235
|
complete: z.ZodBoolean;
|
|
892
1236
|
capture_gaps: z.ZodArray<z.ZodObject<{
|
|
1237
|
+
kind: z.ZodString;
|
|
893
1238
|
detail: z.ZodString;
|
|
894
1239
|
reported_at: z.ZodString;
|
|
895
1240
|
gap_id: z.ZodString;
|
|
896
|
-
kind: z.ZodString;
|
|
897
1241
|
}, z.core.$strip>>;
|
|
898
1242
|
}, z.core.$strip>;
|
|
1243
|
+
key_bindings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1244
|
+
binding_id: z.ZodString;
|
|
1245
|
+
provider_id: z.ZodString;
|
|
1246
|
+
key_id: z.ZodString;
|
|
1247
|
+
public_key: z.ZodString;
|
|
1248
|
+
method: z.ZodEnum<{
|
|
1249
|
+
operator_configured: "operator_configured";
|
|
1250
|
+
domain_challenge: "domain_challenge";
|
|
1251
|
+
}>;
|
|
1252
|
+
domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1253
|
+
created_by: z.ZodString;
|
|
1254
|
+
created_at: z.ZodString;
|
|
1255
|
+
revoked_at: z.ZodNullable<z.ZodString>;
|
|
1256
|
+
}, z.core.$strip>>>;
|
|
899
1257
|
}, z.core.$strip>;
|
|
900
1258
|
signature: z.ZodObject<{
|
|
901
1259
|
key_id: z.ZodString;
|
|
@@ -952,6 +1310,11 @@ export declare const ClosureDelegationSchema: z.ZodObject<{
|
|
|
952
1310
|
name: z.ZodString;
|
|
953
1311
|
version: z.ZodString;
|
|
954
1312
|
}, z.core.$strip>>;
|
|
1313
|
+
additional_models: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1314
|
+
provider: z.ZodString;
|
|
1315
|
+
name: z.ZodString;
|
|
1316
|
+
version: z.ZodString;
|
|
1317
|
+
}, z.core.$strip>>>;
|
|
955
1318
|
config_digest: z.ZodOptional<z.ZodString>;
|
|
956
1319
|
}, z.core.$strip>;
|
|
957
1320
|
skill: z.ZodOptional<z.ZodObject<{
|
|
@@ -960,8 +1323,178 @@ export declare const ClosureDelegationSchema: z.ZodObject<{
|
|
|
960
1323
|
agent_card_url: z.ZodOptional<z.ZodURL>;
|
|
961
1324
|
}, z.core.$strip>>;
|
|
962
1325
|
}, z.core.$strip>>;
|
|
1326
|
+
pricing: z.ZodOptional<z.ZodObject<{
|
|
1327
|
+
rates: z.ZodArray<z.ZodObject<{
|
|
1328
|
+
meter: z.ZodEnum<{
|
|
1329
|
+
input_tokens: "input_tokens";
|
|
1330
|
+
output_tokens: "output_tokens";
|
|
1331
|
+
cache_read_input_tokens: "cache_read_input_tokens";
|
|
1332
|
+
model_call: "model_call";
|
|
1333
|
+
tool_call: "tool_call";
|
|
1334
|
+
a2a_call: "a2a_call";
|
|
1335
|
+
}>;
|
|
1336
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
1337
|
+
provider: z.ZodString;
|
|
1338
|
+
name: z.ZodString;
|
|
1339
|
+
}, z.core.$strict>>;
|
|
1340
|
+
tool_name: z.ZodOptional<z.ZodString>;
|
|
1341
|
+
price_numerator: z.ZodNumber;
|
|
1342
|
+
price_denominator: z.ZodNumber;
|
|
1343
|
+
}, z.core.$strict>>;
|
|
1344
|
+
fixed_minor: z.ZodOptional<z.ZodNumber>;
|
|
1345
|
+
tolerance_bps: z.ZodNumber;
|
|
1346
|
+
}, z.core.$strict>>;
|
|
1347
|
+
refund_terms: z.ZodOptional<z.ZodObject<{
|
|
1348
|
+
on_failure: z.ZodEnum<{
|
|
1349
|
+
dispute: "dispute";
|
|
1350
|
+
refund: "refund";
|
|
1351
|
+
}>;
|
|
1352
|
+
on_timeout: z.ZodEnum<{
|
|
1353
|
+
dispute: "dispute";
|
|
1354
|
+
refund: "refund";
|
|
1355
|
+
}>;
|
|
1356
|
+
after_settlement: z.ZodObject<{
|
|
1357
|
+
cap_minor: z.ZodNumber;
|
|
1358
|
+
window_seconds: z.ZodNumber;
|
|
1359
|
+
}, z.core.$strict>;
|
|
1360
|
+
}, z.core.$strict>>;
|
|
1361
|
+
witness_policy: z.ZodOptional<z.ZodObject<{
|
|
1362
|
+
min_independent_witnesses: z.ZodNumber;
|
|
1363
|
+
witness_provider_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1364
|
+
independence: z.ZodLiteral<"distinct_verified_domain">;
|
|
1365
|
+
}, z.core.$strict>>;
|
|
963
1366
|
}, z.core.$strip>;
|
|
964
1367
|
export type ClosureDelegation = z.infer<typeof ClosureDelegationSchema>;
|
|
1368
|
+
/** One delegation's usage priced at its agreed rates and compared with what was billed (schema 1.5). */
|
|
1369
|
+
export declare const UsageCheckSchema: z.ZodObject<{
|
|
1370
|
+
delegation_id: z.ZodString;
|
|
1371
|
+
currency: z.ZodString;
|
|
1372
|
+
expected_minor: z.ZodNullable<z.ZodNumber>;
|
|
1373
|
+
lines: z.ZodArray<z.ZodObject<{
|
|
1374
|
+
meter: z.ZodEnum<{
|
|
1375
|
+
input_tokens: "input_tokens";
|
|
1376
|
+
output_tokens: "output_tokens";
|
|
1377
|
+
cache_read_input_tokens: "cache_read_input_tokens";
|
|
1378
|
+
model_call: "model_call";
|
|
1379
|
+
tool_call: "tool_call";
|
|
1380
|
+
a2a_call: "a2a_call";
|
|
1381
|
+
}>;
|
|
1382
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
1383
|
+
provider: z.ZodString;
|
|
1384
|
+
name: z.ZodString;
|
|
1385
|
+
}, z.core.$strip>>;
|
|
1386
|
+
tool_name: z.ZodOptional<z.ZodString>;
|
|
1387
|
+
units: z.ZodNumber;
|
|
1388
|
+
cost_minor: z.ZodNumber;
|
|
1389
|
+
}, z.core.$strip>>;
|
|
1390
|
+
billed_minor: z.ZodNumber;
|
|
1391
|
+
difference_minor: z.ZodNullable<z.ZodNumber>;
|
|
1392
|
+
allowed_difference_minor: z.ZodNullable<z.ZodNumber>;
|
|
1393
|
+
within_tolerance: z.ZodNullable<z.ZodBoolean>;
|
|
1394
|
+
unpriced: z.ZodArray<z.ZodString>;
|
|
1395
|
+
trace_digests: z.ZodArray<z.ZodString>;
|
|
1396
|
+
assurance: z.ZodArray<z.ZodEnum<{
|
|
1397
|
+
expired: "expired";
|
|
1398
|
+
issuer_signed: "issuer_signed";
|
|
1399
|
+
buyer_recorded: "buyer_recorded";
|
|
1400
|
+
network_recorded: "network_recorded";
|
|
1401
|
+
recipient_viewed: "recipient_viewed";
|
|
1402
|
+
link_authenticated_response: "link_authenticated_response";
|
|
1403
|
+
provider_identity_bound: "provider_identity_bound";
|
|
1404
|
+
provider_key_signed: "provider_key_signed";
|
|
1405
|
+
contested: "contested";
|
|
1406
|
+
superseded: "superseded";
|
|
1407
|
+
revoked: "revoked";
|
|
1408
|
+
gateway_signed: "gateway_signed";
|
|
1409
|
+
rail_attested: "rail_attested";
|
|
1410
|
+
}>>;
|
|
1411
|
+
}, z.core.$strip>;
|
|
1412
|
+
export type UsageCheck = z.infer<typeof UsageCheckSchema>;
|
|
1413
|
+
/** Estimate and hold against actual cost for one node (the task itself or a delegation), in the node's currency. */
|
|
1414
|
+
export declare const RailAttestationEntrySchema: z.ZodObject<{
|
|
1415
|
+
financial_event_id: z.ZodString;
|
|
1416
|
+
scheme: z.ZodString;
|
|
1417
|
+
rail: z.ZodString;
|
|
1418
|
+
rail_ref: z.ZodString;
|
|
1419
|
+
anchor: z.ZodString;
|
|
1420
|
+
assurance: z.ZodTuple<[z.ZodLiteral<"rail_attested">], null>;
|
|
1421
|
+
}, z.core.$strip>;
|
|
1422
|
+
export declare const ExpectationVarianceSchema: z.ZodObject<{
|
|
1423
|
+
estimated_minor: z.ZodNullable<z.ZodNumber>;
|
|
1424
|
+
held_minor: z.ZodNumber;
|
|
1425
|
+
actual_minor: z.ZodNumber;
|
|
1426
|
+
variance_vs_estimate_minor: z.ZodNullable<z.ZodNumber>;
|
|
1427
|
+
variance_vs_estimate_bps: z.ZodNullable<z.ZodNumber>;
|
|
1428
|
+
variance_vs_hold_minor: z.ZodNullable<z.ZodNumber>;
|
|
1429
|
+
variance_vs_hold_bps: z.ZodNullable<z.ZodNumber>;
|
|
1430
|
+
}, z.core.$strip>;
|
|
1431
|
+
/** Estimates and holds compared with actual cost (schema 1.5). Recorded only; nothing was enforced, blocked or reserved. */
|
|
1432
|
+
export declare const ExpectationReportSchema: z.ZodObject<{
|
|
1433
|
+
currency: z.ZodString;
|
|
1434
|
+
task: z.ZodObject<{
|
|
1435
|
+
estimated_minor: z.ZodNullable<z.ZodNumber>;
|
|
1436
|
+
held_minor: z.ZodNumber;
|
|
1437
|
+
actual_minor: z.ZodNumber;
|
|
1438
|
+
variance_vs_estimate_minor: z.ZodNullable<z.ZodNumber>;
|
|
1439
|
+
variance_vs_estimate_bps: z.ZodNullable<z.ZodNumber>;
|
|
1440
|
+
variance_vs_hold_minor: z.ZodNullable<z.ZodNumber>;
|
|
1441
|
+
variance_vs_hold_bps: z.ZodNullable<z.ZodNumber>;
|
|
1442
|
+
unestimated_minor: z.ZodNumber;
|
|
1443
|
+
}, z.core.$strip>;
|
|
1444
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
1445
|
+
estimated_minor: z.ZodNullable<z.ZodNumber>;
|
|
1446
|
+
held_minor: z.ZodNumber;
|
|
1447
|
+
actual_minor: z.ZodNumber;
|
|
1448
|
+
variance_vs_estimate_minor: z.ZodNullable<z.ZodNumber>;
|
|
1449
|
+
variance_vs_estimate_bps: z.ZodNullable<z.ZodNumber>;
|
|
1450
|
+
variance_vs_hold_minor: z.ZodNullable<z.ZodNumber>;
|
|
1451
|
+
variance_vs_hold_bps: z.ZodNullable<z.ZodNumber>;
|
|
1452
|
+
node_id: z.ZodString;
|
|
1453
|
+
estimate_event_id: z.ZodNullable<z.ZodString>;
|
|
1454
|
+
}, z.core.$strip>>;
|
|
1455
|
+
records: z.ZodArray<z.ZodObject<{
|
|
1456
|
+
financial_event_id: z.ZodString;
|
|
1457
|
+
node_id: z.ZodString;
|
|
1458
|
+
type: z.ZodEnum<{
|
|
1459
|
+
estimate: "estimate";
|
|
1460
|
+
hold: "hold";
|
|
1461
|
+
}>;
|
|
1462
|
+
issued_by: z.ZodEnum<{
|
|
1463
|
+
agent: "agent";
|
|
1464
|
+
gateway: "gateway";
|
|
1465
|
+
operator: "operator";
|
|
1466
|
+
}>;
|
|
1467
|
+
status: z.ZodEnum<{
|
|
1468
|
+
superseded: "superseded";
|
|
1469
|
+
current: "current";
|
|
1470
|
+
not_latest: "not_latest";
|
|
1471
|
+
after_charge: "after_charge";
|
|
1472
|
+
other_currency: "other_currency";
|
|
1473
|
+
}>;
|
|
1474
|
+
hold_status: z.ZodNullable<z.ZodEnum<{
|
|
1475
|
+
open: "open";
|
|
1476
|
+
captured: "captured";
|
|
1477
|
+
released: "released";
|
|
1478
|
+
expired: "expired";
|
|
1479
|
+
}>>;
|
|
1480
|
+
assurance: z.ZodArray<z.ZodEnum<{
|
|
1481
|
+
expired: "expired";
|
|
1482
|
+
issuer_signed: "issuer_signed";
|
|
1483
|
+
buyer_recorded: "buyer_recorded";
|
|
1484
|
+
network_recorded: "network_recorded";
|
|
1485
|
+
recipient_viewed: "recipient_viewed";
|
|
1486
|
+
link_authenticated_response: "link_authenticated_response";
|
|
1487
|
+
provider_identity_bound: "provider_identity_bound";
|
|
1488
|
+
provider_key_signed: "provider_key_signed";
|
|
1489
|
+
contested: "contested";
|
|
1490
|
+
superseded: "superseded";
|
|
1491
|
+
revoked: "revoked";
|
|
1492
|
+
gateway_signed: "gateway_signed";
|
|
1493
|
+
rail_attested: "rail_attested";
|
|
1494
|
+
}>>;
|
|
1495
|
+
}, z.core.$strip>>;
|
|
1496
|
+
}, z.core.$strip>;
|
|
1497
|
+
export type ExpectationReport = z.infer<typeof ExpectationReportSchema>;
|
|
965
1498
|
export declare const AllocationRecordSchema: z.ZodObject<{
|
|
966
1499
|
allocation_id: z.ZodString;
|
|
967
1500
|
financial_event_id: z.ZodString;
|
|
@@ -1015,6 +1548,24 @@ export declare const ExceptionRecordSchema: z.ZodObject<{
|
|
|
1015
1548
|
created_at: z.ZodString;
|
|
1016
1549
|
}, z.core.$strip>;
|
|
1017
1550
|
export type ExceptionRecord = z.infer<typeof ExceptionRecordSchema>;
|
|
1551
|
+
/** A derived exception a person resolved or dismissed while its condition still holds; schema 1.5 closures list these. */
|
|
1552
|
+
export declare const ResolvedExceptionSchema: z.ZodObject<{
|
|
1553
|
+
exception_id: z.ZodString;
|
|
1554
|
+
kind: z.ZodString;
|
|
1555
|
+
status: z.ZodEnum<{
|
|
1556
|
+
open: "open";
|
|
1557
|
+
resolved: "resolved";
|
|
1558
|
+
dismissed: "dismissed";
|
|
1559
|
+
}>;
|
|
1560
|
+
delegation_id: z.ZodNullable<z.ZodString>;
|
|
1561
|
+
financial_event_id: z.ZodNullable<z.ZodString>;
|
|
1562
|
+
detail: z.ZodString;
|
|
1563
|
+
created_at: z.ZodString;
|
|
1564
|
+
resolved_by: z.ZodString;
|
|
1565
|
+
resolved_at: z.ZodString;
|
|
1566
|
+
resolution: z.ZodNullable<z.ZodString>;
|
|
1567
|
+
}, z.core.$strip>;
|
|
1568
|
+
export type ResolvedException = z.infer<typeof ResolvedExceptionSchema>;
|
|
1018
1569
|
export declare const NodeRollupSchema: z.ZodObject<{
|
|
1019
1570
|
node_id: z.ZodString;
|
|
1020
1571
|
parent_id: z.ZodNullable<z.ZodString>;
|
|
@@ -1164,9 +1715,10 @@ export type ObligationLink = z.infer<typeof ObligationLinkSchema>;
|
|
|
1164
1715
|
export declare const ClosurePayloadSchema: z.ZodObject<{
|
|
1165
1716
|
document_type: z.ZodLiteral<"atcn.subledger.closure">;
|
|
1166
1717
|
schema_version: z.ZodEnum<{
|
|
1167
|
-
1.4: "1.4";
|
|
1168
1718
|
1.2: "1.2";
|
|
1169
1719
|
1.3: "1.3";
|
|
1720
|
+
1.4: "1.4";
|
|
1721
|
+
1.5: "1.5";
|
|
1170
1722
|
}>;
|
|
1171
1723
|
closure_id: z.ZodString;
|
|
1172
1724
|
version: z.ZodNumber;
|
|
@@ -1192,6 +1744,7 @@ export declare const ClosurePayloadSchema: z.ZodObject<{
|
|
|
1192
1744
|
scope_ref: z.ZodNullable<z.ZodString>;
|
|
1193
1745
|
retrospective: z.ZodBoolean;
|
|
1194
1746
|
created_at: z.ZodString;
|
|
1747
|
+
estimate_tolerance_bps: z.ZodOptional<z.ZodNumber>;
|
|
1195
1748
|
}, z.core.$strip>;
|
|
1196
1749
|
delegations: z.ZodArray<z.ZodObject<{
|
|
1197
1750
|
delegation_id: z.ZodString;
|
|
@@ -1234,6 +1787,11 @@ export declare const ClosurePayloadSchema: z.ZodObject<{
|
|
|
1234
1787
|
name: z.ZodString;
|
|
1235
1788
|
version: z.ZodString;
|
|
1236
1789
|
}, z.core.$strip>>;
|
|
1790
|
+
additional_models: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1791
|
+
provider: z.ZodString;
|
|
1792
|
+
name: z.ZodString;
|
|
1793
|
+
version: z.ZodString;
|
|
1794
|
+
}, z.core.$strip>>>;
|
|
1237
1795
|
config_digest: z.ZodOptional<z.ZodString>;
|
|
1238
1796
|
}, z.core.$strip>;
|
|
1239
1797
|
skill: z.ZodOptional<z.ZodObject<{
|
|
@@ -1242,6 +1800,46 @@ export declare const ClosurePayloadSchema: z.ZodObject<{
|
|
|
1242
1800
|
agent_card_url: z.ZodOptional<z.ZodURL>;
|
|
1243
1801
|
}, z.core.$strip>>;
|
|
1244
1802
|
}, z.core.$strip>>;
|
|
1803
|
+
pricing: z.ZodOptional<z.ZodObject<{
|
|
1804
|
+
rates: z.ZodArray<z.ZodObject<{
|
|
1805
|
+
meter: z.ZodEnum<{
|
|
1806
|
+
input_tokens: "input_tokens";
|
|
1807
|
+
output_tokens: "output_tokens";
|
|
1808
|
+
cache_read_input_tokens: "cache_read_input_tokens";
|
|
1809
|
+
model_call: "model_call";
|
|
1810
|
+
tool_call: "tool_call";
|
|
1811
|
+
a2a_call: "a2a_call";
|
|
1812
|
+
}>;
|
|
1813
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
1814
|
+
provider: z.ZodString;
|
|
1815
|
+
name: z.ZodString;
|
|
1816
|
+
}, z.core.$strict>>;
|
|
1817
|
+
tool_name: z.ZodOptional<z.ZodString>;
|
|
1818
|
+
price_numerator: z.ZodNumber;
|
|
1819
|
+
price_denominator: z.ZodNumber;
|
|
1820
|
+
}, z.core.$strict>>;
|
|
1821
|
+
fixed_minor: z.ZodOptional<z.ZodNumber>;
|
|
1822
|
+
tolerance_bps: z.ZodNumber;
|
|
1823
|
+
}, z.core.$strict>>;
|
|
1824
|
+
refund_terms: z.ZodOptional<z.ZodObject<{
|
|
1825
|
+
on_failure: z.ZodEnum<{
|
|
1826
|
+
dispute: "dispute";
|
|
1827
|
+
refund: "refund";
|
|
1828
|
+
}>;
|
|
1829
|
+
on_timeout: z.ZodEnum<{
|
|
1830
|
+
dispute: "dispute";
|
|
1831
|
+
refund: "refund";
|
|
1832
|
+
}>;
|
|
1833
|
+
after_settlement: z.ZodObject<{
|
|
1834
|
+
cap_minor: z.ZodNumber;
|
|
1835
|
+
window_seconds: z.ZodNumber;
|
|
1836
|
+
}, z.core.$strict>;
|
|
1837
|
+
}, z.core.$strict>>;
|
|
1838
|
+
witness_policy: z.ZodOptional<z.ZodObject<{
|
|
1839
|
+
min_independent_witnesses: z.ZodNumber;
|
|
1840
|
+
witness_provider_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1841
|
+
independence: z.ZodLiteral<"distinct_verified_domain">;
|
|
1842
|
+
}, z.core.$strict>>;
|
|
1245
1843
|
}, z.core.$strip>>;
|
|
1246
1844
|
delivery_claims: z.ZodArray<z.ZodObject<{
|
|
1247
1845
|
event_id: z.ZodString;
|
|
@@ -1263,6 +1861,7 @@ export declare const ClosurePayloadSchema: z.ZodObject<{
|
|
|
1263
1861
|
clearing_network: "clearing_network";
|
|
1264
1862
|
}>;
|
|
1265
1863
|
assurance: z.ZodArray<z.ZodEnum<{
|
|
1864
|
+
expired: "expired";
|
|
1266
1865
|
issuer_signed: "issuer_signed";
|
|
1267
1866
|
buyer_recorded: "buyer_recorded";
|
|
1268
1867
|
network_recorded: "network_recorded";
|
|
@@ -1272,8 +1871,9 @@ export declare const ClosurePayloadSchema: z.ZodObject<{
|
|
|
1272
1871
|
provider_key_signed: "provider_key_signed";
|
|
1273
1872
|
contested: "contested";
|
|
1274
1873
|
superseded: "superseded";
|
|
1275
|
-
expired: "expired";
|
|
1276
1874
|
revoked: "revoked";
|
|
1875
|
+
gateway_signed: "gateway_signed";
|
|
1876
|
+
rail_attested: "rail_attested";
|
|
1277
1877
|
}>>;
|
|
1278
1878
|
note: z.ZodNullable<z.ZodString>;
|
|
1279
1879
|
evidence: z.ZodArray<z.ZodObject<{
|
|
@@ -1286,6 +1886,30 @@ export declare const ClosurePayloadSchema: z.ZodObject<{
|
|
|
1286
1886
|
retrospective: z.ZodBoolean;
|
|
1287
1887
|
occurred_at: z.ZodString;
|
|
1288
1888
|
recorded_at: z.ZodString;
|
|
1889
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
1890
|
+
trace_digest: z.ZodString;
|
|
1891
|
+
summary: z.ZodObject<{
|
|
1892
|
+
models: z.ZodArray<z.ZodObject<{
|
|
1893
|
+
provider: z.ZodString;
|
|
1894
|
+
name: z.ZodString;
|
|
1895
|
+
calls: z.ZodNumber;
|
|
1896
|
+
input_tokens: z.ZodNumber;
|
|
1897
|
+
output_tokens: z.ZodNumber;
|
|
1898
|
+
cache_read_input_tokens: z.ZodNumber;
|
|
1899
|
+
}, z.core.$strict>>;
|
|
1900
|
+
tools: z.ZodArray<z.ZodObject<{
|
|
1901
|
+
name: z.ZodString;
|
|
1902
|
+
calls: z.ZodNumber;
|
|
1903
|
+
}, z.core.$strict>>;
|
|
1904
|
+
a2a_calls: z.ZodNumber;
|
|
1905
|
+
}, z.core.$strict>;
|
|
1906
|
+
}, z.core.$strict>>;
|
|
1907
|
+
signer: z.ZodOptional<z.ZodObject<{
|
|
1908
|
+
provider_id: z.ZodString;
|
|
1909
|
+
binding_id: z.ZodString;
|
|
1910
|
+
key_id: z.ZodString;
|
|
1911
|
+
value: z.ZodString;
|
|
1912
|
+
}, z.core.$strict>>;
|
|
1289
1913
|
}, z.core.$strip>>;
|
|
1290
1914
|
financial_events: z.ZodArray<z.ZodObject<{
|
|
1291
1915
|
record: z.ZodObject<{
|
|
@@ -1301,6 +1925,8 @@ export declare const ClosurePayloadSchema: z.ZodObject<{
|
|
|
1301
1925
|
credit: "credit";
|
|
1302
1926
|
adjustment: "adjustment";
|
|
1303
1927
|
fx_rate: "fx_rate";
|
|
1928
|
+
estimate: "estimate";
|
|
1929
|
+
hold: "hold";
|
|
1304
1930
|
}>;
|
|
1305
1931
|
source: z.ZodString;
|
|
1306
1932
|
source_event_id: z.ZodString;
|
|
@@ -1316,6 +1942,7 @@ export declare const ClosurePayloadSchema: z.ZodObject<{
|
|
|
1316
1942
|
issued: "issued";
|
|
1317
1943
|
pending: "pending";
|
|
1318
1944
|
reported_paid: "reported_paid";
|
|
1945
|
+
pending_finality: "pending_finality";
|
|
1319
1946
|
failed: "failed";
|
|
1320
1947
|
refunded: "refunded";
|
|
1321
1948
|
reversed: "reversed";
|
|
@@ -1345,6 +1972,38 @@ export declare const ClosurePayloadSchema: z.ZodObject<{
|
|
|
1345
1972
|
rate_denominator: z.ZodNumber;
|
|
1346
1973
|
}, z.core.$strip>>;
|
|
1347
1974
|
reason: z.ZodNullable<z.ZodString>;
|
|
1975
|
+
skill: z.ZodOptional<z.ZodObject<{
|
|
1976
|
+
namespace: z.ZodString;
|
|
1977
|
+
skill_id: z.ZodString;
|
|
1978
|
+
agent_card_url: z.ZodOptional<z.ZodURL>;
|
|
1979
|
+
}, z.core.$strip>>;
|
|
1980
|
+
expectation: z.ZodOptional<z.ZodObject<{
|
|
1981
|
+
issued_by: z.ZodEnum<{
|
|
1982
|
+
agent: "agent";
|
|
1983
|
+
gateway: "gateway";
|
|
1984
|
+
operator: "operator";
|
|
1985
|
+
}>;
|
|
1986
|
+
source_ref: z.ZodNullable<z.ZodString>;
|
|
1987
|
+
basis: z.ZodNullable<z.ZodString>;
|
|
1988
|
+
expires_at: z.ZodNullable<z.ZodISODateTime>;
|
|
1989
|
+
supersedes: z.ZodNullable<z.ZodString>;
|
|
1990
|
+
hold_status: z.ZodOptional<z.ZodEnum<{
|
|
1991
|
+
open: "open";
|
|
1992
|
+
captured: "captured";
|
|
1993
|
+
released: "released";
|
|
1994
|
+
expired: "expired";
|
|
1995
|
+
}>>;
|
|
1996
|
+
signer: z.ZodOptional<z.ZodObject<{
|
|
1997
|
+
provider_id: z.ZodString;
|
|
1998
|
+
binding_id: z.ZodString;
|
|
1999
|
+
key_id: z.ZodString;
|
|
2000
|
+
value: z.ZodString;
|
|
2001
|
+
}, z.core.$strict>>;
|
|
2002
|
+
}, z.core.$strict>>;
|
|
2003
|
+
rail_attestation: z.ZodOptional<z.ZodObject<{
|
|
2004
|
+
scheme: z.ZodString;
|
|
2005
|
+
record: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2006
|
+
}, z.core.$strict>>;
|
|
1348
2007
|
}, z.core.$strip>;
|
|
1349
2008
|
event_digest: z.ZodString;
|
|
1350
2009
|
attributed_to: z.ZodString;
|
|
@@ -1507,6 +2166,7 @@ export declare const ClosurePayloadSchema: z.ZodObject<{
|
|
|
1507
2166
|
"scope.terms_digest": "scope.terms_digest";
|
|
1508
2167
|
"financial.amounts": "financial.amounts";
|
|
1509
2168
|
"financial.status": "financial.status";
|
|
2169
|
+
"delivery.usage": "delivery.usage";
|
|
1510
2170
|
}>>;
|
|
1511
2171
|
note: z.ZodNullable<z.ZodString>;
|
|
1512
2172
|
evidence: z.ZodArray<z.ZodObject<{
|
|
@@ -1521,6 +2181,7 @@ export declare const ClosurePayloadSchema: z.ZodObject<{
|
|
|
1521
2181
|
"scope.terms_digest": "scope.terms_digest";
|
|
1522
2182
|
"financial.amounts": "financial.amounts";
|
|
1523
2183
|
"financial.status": "financial.status";
|
|
2184
|
+
"delivery.usage": "delivery.usage";
|
|
1524
2185
|
}>;
|
|
1525
2186
|
proposed_value: z.ZodString;
|
|
1526
2187
|
reason: z.ZodString;
|
|
@@ -1539,6 +2200,7 @@ export declare const ClosurePayloadSchema: z.ZodObject<{
|
|
|
1539
2200
|
attestation_digest: z.ZodString;
|
|
1540
2201
|
reason: z.ZodString;
|
|
1541
2202
|
}, z.core.$strip>>>;
|
|
2203
|
+
role: z.ZodOptional<z.ZodLiteral<"witness">>;
|
|
1542
2204
|
}, z.core.$strip>;
|
|
1543
2205
|
statement_digest: z.ZodString;
|
|
1544
2206
|
provider_signature: z.ZodNullable<z.ZodObject<{
|
|
@@ -1547,6 +2209,7 @@ export declare const ClosurePayloadSchema: z.ZodObject<{
|
|
|
1547
2209
|
value: z.ZodString;
|
|
1548
2210
|
}, z.core.$strip>>;
|
|
1549
2211
|
assurance: z.ZodArray<z.ZodEnum<{
|
|
2212
|
+
expired: "expired";
|
|
1550
2213
|
issuer_signed: "issuer_signed";
|
|
1551
2214
|
buyer_recorded: "buyer_recorded";
|
|
1552
2215
|
network_recorded: "network_recorded";
|
|
@@ -1556,8 +2219,9 @@ export declare const ClosurePayloadSchema: z.ZodObject<{
|
|
|
1556
2219
|
provider_key_signed: "provider_key_signed";
|
|
1557
2220
|
contested: "contested";
|
|
1558
2221
|
superseded: "superseded";
|
|
1559
|
-
expired: "expired";
|
|
1560
2222
|
revoked: "revoked";
|
|
2223
|
+
gateway_signed: "gateway_signed";
|
|
2224
|
+
rail_attested: "rail_attested";
|
|
1561
2225
|
}>>;
|
|
1562
2226
|
decision: z.ZodNullable<z.ZodObject<{
|
|
1563
2227
|
status: z.ZodEnum<{
|
|
@@ -1608,15 +2272,148 @@ export declare const ClosurePayloadSchema: z.ZodObject<{
|
|
|
1608
2272
|
decision_id: z.ZodNullable<z.ZodString>;
|
|
1609
2273
|
decision_digest: z.ZodNullable<z.ZodString>;
|
|
1610
2274
|
}, z.core.$strip>>>;
|
|
2275
|
+
usage_checks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2276
|
+
delegation_id: z.ZodString;
|
|
2277
|
+
currency: z.ZodString;
|
|
2278
|
+
expected_minor: z.ZodNullable<z.ZodNumber>;
|
|
2279
|
+
lines: z.ZodArray<z.ZodObject<{
|
|
2280
|
+
meter: z.ZodEnum<{
|
|
2281
|
+
input_tokens: "input_tokens";
|
|
2282
|
+
output_tokens: "output_tokens";
|
|
2283
|
+
cache_read_input_tokens: "cache_read_input_tokens";
|
|
2284
|
+
model_call: "model_call";
|
|
2285
|
+
tool_call: "tool_call";
|
|
2286
|
+
a2a_call: "a2a_call";
|
|
2287
|
+
}>;
|
|
2288
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
2289
|
+
provider: z.ZodString;
|
|
2290
|
+
name: z.ZodString;
|
|
2291
|
+
}, z.core.$strip>>;
|
|
2292
|
+
tool_name: z.ZodOptional<z.ZodString>;
|
|
2293
|
+
units: z.ZodNumber;
|
|
2294
|
+
cost_minor: z.ZodNumber;
|
|
2295
|
+
}, z.core.$strip>>;
|
|
2296
|
+
billed_minor: z.ZodNumber;
|
|
2297
|
+
difference_minor: z.ZodNullable<z.ZodNumber>;
|
|
2298
|
+
allowed_difference_minor: z.ZodNullable<z.ZodNumber>;
|
|
2299
|
+
within_tolerance: z.ZodNullable<z.ZodBoolean>;
|
|
2300
|
+
unpriced: z.ZodArray<z.ZodString>;
|
|
2301
|
+
trace_digests: z.ZodArray<z.ZodString>;
|
|
2302
|
+
assurance: z.ZodArray<z.ZodEnum<{
|
|
2303
|
+
expired: "expired";
|
|
2304
|
+
issuer_signed: "issuer_signed";
|
|
2305
|
+
buyer_recorded: "buyer_recorded";
|
|
2306
|
+
network_recorded: "network_recorded";
|
|
2307
|
+
recipient_viewed: "recipient_viewed";
|
|
2308
|
+
link_authenticated_response: "link_authenticated_response";
|
|
2309
|
+
provider_identity_bound: "provider_identity_bound";
|
|
2310
|
+
provider_key_signed: "provider_key_signed";
|
|
2311
|
+
contested: "contested";
|
|
2312
|
+
superseded: "superseded";
|
|
2313
|
+
revoked: "revoked";
|
|
2314
|
+
gateway_signed: "gateway_signed";
|
|
2315
|
+
rail_attested: "rail_attested";
|
|
2316
|
+
}>>;
|
|
2317
|
+
}, z.core.$strip>>>;
|
|
2318
|
+
expectation_report: z.ZodOptional<z.ZodObject<{
|
|
2319
|
+
currency: z.ZodString;
|
|
2320
|
+
task: z.ZodObject<{
|
|
2321
|
+
estimated_minor: z.ZodNullable<z.ZodNumber>;
|
|
2322
|
+
held_minor: z.ZodNumber;
|
|
2323
|
+
actual_minor: z.ZodNumber;
|
|
2324
|
+
variance_vs_estimate_minor: z.ZodNullable<z.ZodNumber>;
|
|
2325
|
+
variance_vs_estimate_bps: z.ZodNullable<z.ZodNumber>;
|
|
2326
|
+
variance_vs_hold_minor: z.ZodNullable<z.ZodNumber>;
|
|
2327
|
+
variance_vs_hold_bps: z.ZodNullable<z.ZodNumber>;
|
|
2328
|
+
unestimated_minor: z.ZodNumber;
|
|
2329
|
+
}, z.core.$strip>;
|
|
2330
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
2331
|
+
estimated_minor: z.ZodNullable<z.ZodNumber>;
|
|
2332
|
+
held_minor: z.ZodNumber;
|
|
2333
|
+
actual_minor: z.ZodNumber;
|
|
2334
|
+
variance_vs_estimate_minor: z.ZodNullable<z.ZodNumber>;
|
|
2335
|
+
variance_vs_estimate_bps: z.ZodNullable<z.ZodNumber>;
|
|
2336
|
+
variance_vs_hold_minor: z.ZodNullable<z.ZodNumber>;
|
|
2337
|
+
variance_vs_hold_bps: z.ZodNullable<z.ZodNumber>;
|
|
2338
|
+
node_id: z.ZodString;
|
|
2339
|
+
estimate_event_id: z.ZodNullable<z.ZodString>;
|
|
2340
|
+
}, z.core.$strip>>;
|
|
2341
|
+
records: z.ZodArray<z.ZodObject<{
|
|
2342
|
+
financial_event_id: z.ZodString;
|
|
2343
|
+
node_id: z.ZodString;
|
|
2344
|
+
type: z.ZodEnum<{
|
|
2345
|
+
estimate: "estimate";
|
|
2346
|
+
hold: "hold";
|
|
2347
|
+
}>;
|
|
2348
|
+
issued_by: z.ZodEnum<{
|
|
2349
|
+
agent: "agent";
|
|
2350
|
+
gateway: "gateway";
|
|
2351
|
+
operator: "operator";
|
|
2352
|
+
}>;
|
|
2353
|
+
status: z.ZodEnum<{
|
|
2354
|
+
superseded: "superseded";
|
|
2355
|
+
current: "current";
|
|
2356
|
+
not_latest: "not_latest";
|
|
2357
|
+
after_charge: "after_charge";
|
|
2358
|
+
other_currency: "other_currency";
|
|
2359
|
+
}>;
|
|
2360
|
+
hold_status: z.ZodNullable<z.ZodEnum<{
|
|
2361
|
+
open: "open";
|
|
2362
|
+
captured: "captured";
|
|
2363
|
+
released: "released";
|
|
2364
|
+
expired: "expired";
|
|
2365
|
+
}>>;
|
|
2366
|
+
assurance: z.ZodArray<z.ZodEnum<{
|
|
2367
|
+
expired: "expired";
|
|
2368
|
+
issuer_signed: "issuer_signed";
|
|
2369
|
+
buyer_recorded: "buyer_recorded";
|
|
2370
|
+
network_recorded: "network_recorded";
|
|
2371
|
+
recipient_viewed: "recipient_viewed";
|
|
2372
|
+
link_authenticated_response: "link_authenticated_response";
|
|
2373
|
+
provider_identity_bound: "provider_identity_bound";
|
|
2374
|
+
provider_key_signed: "provider_key_signed";
|
|
2375
|
+
contested: "contested";
|
|
2376
|
+
superseded: "superseded";
|
|
2377
|
+
revoked: "revoked";
|
|
2378
|
+
gateway_signed: "gateway_signed";
|
|
2379
|
+
rail_attested: "rail_attested";
|
|
2380
|
+
}>>;
|
|
2381
|
+
}, z.core.$strip>>;
|
|
2382
|
+
}, z.core.$strip>>;
|
|
2383
|
+
rail_attestations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2384
|
+
financial_event_id: z.ZodString;
|
|
2385
|
+
scheme: z.ZodString;
|
|
2386
|
+
rail: z.ZodString;
|
|
2387
|
+
rail_ref: z.ZodString;
|
|
2388
|
+
anchor: z.ZodString;
|
|
2389
|
+
assurance: z.ZodTuple<[z.ZodLiteral<"rail_attested">], null>;
|
|
2390
|
+
}, z.core.$strip>>>;
|
|
2391
|
+
resolved_exceptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2392
|
+
exception_id: z.ZodString;
|
|
2393
|
+
kind: z.ZodString;
|
|
2394
|
+
status: z.ZodEnum<{
|
|
2395
|
+
open: "open";
|
|
2396
|
+
resolved: "resolved";
|
|
2397
|
+
dismissed: "dismissed";
|
|
2398
|
+
}>;
|
|
2399
|
+
delegation_id: z.ZodNullable<z.ZodString>;
|
|
2400
|
+
financial_event_id: z.ZodNullable<z.ZodString>;
|
|
2401
|
+
detail: z.ZodString;
|
|
2402
|
+
created_at: z.ZodString;
|
|
2403
|
+
resolved_by: z.ZodString;
|
|
2404
|
+
resolved_at: z.ZodString;
|
|
2405
|
+
resolution: z.ZodNullable<z.ZodString>;
|
|
2406
|
+
}, z.core.$strip>>>;
|
|
1611
2407
|
}, z.core.$strip>;
|
|
1612
2408
|
export type ClosurePayload = z.infer<typeof ClosurePayloadSchema>;
|
|
1613
2409
|
export declare const SignedClosureSchema: z.ZodObject<{
|
|
1614
2410
|
payload: z.ZodObject<{
|
|
1615
2411
|
document_type: z.ZodLiteral<"atcn.subledger.closure">;
|
|
1616
2412
|
schema_version: z.ZodEnum<{
|
|
1617
|
-
1.4: "1.4";
|
|
1618
2413
|
1.2: "1.2";
|
|
1619
2414
|
1.3: "1.3";
|
|
2415
|
+
1.4: "1.4";
|
|
2416
|
+
1.5: "1.5";
|
|
1620
2417
|
}>;
|
|
1621
2418
|
closure_id: z.ZodString;
|
|
1622
2419
|
version: z.ZodNumber;
|
|
@@ -1642,6 +2439,7 @@ export declare const SignedClosureSchema: z.ZodObject<{
|
|
|
1642
2439
|
scope_ref: z.ZodNullable<z.ZodString>;
|
|
1643
2440
|
retrospective: z.ZodBoolean;
|
|
1644
2441
|
created_at: z.ZodString;
|
|
2442
|
+
estimate_tolerance_bps: z.ZodOptional<z.ZodNumber>;
|
|
1645
2443
|
}, z.core.$strip>;
|
|
1646
2444
|
delegations: z.ZodArray<z.ZodObject<{
|
|
1647
2445
|
delegation_id: z.ZodString;
|
|
@@ -1684,6 +2482,11 @@ export declare const SignedClosureSchema: z.ZodObject<{
|
|
|
1684
2482
|
name: z.ZodString;
|
|
1685
2483
|
version: z.ZodString;
|
|
1686
2484
|
}, z.core.$strip>>;
|
|
2485
|
+
additional_models: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2486
|
+
provider: z.ZodString;
|
|
2487
|
+
name: z.ZodString;
|
|
2488
|
+
version: z.ZodString;
|
|
2489
|
+
}, z.core.$strip>>>;
|
|
1687
2490
|
config_digest: z.ZodOptional<z.ZodString>;
|
|
1688
2491
|
}, z.core.$strip>;
|
|
1689
2492
|
skill: z.ZodOptional<z.ZodObject<{
|
|
@@ -1692,6 +2495,46 @@ export declare const SignedClosureSchema: z.ZodObject<{
|
|
|
1692
2495
|
agent_card_url: z.ZodOptional<z.ZodURL>;
|
|
1693
2496
|
}, z.core.$strip>>;
|
|
1694
2497
|
}, z.core.$strip>>;
|
|
2498
|
+
pricing: z.ZodOptional<z.ZodObject<{
|
|
2499
|
+
rates: z.ZodArray<z.ZodObject<{
|
|
2500
|
+
meter: z.ZodEnum<{
|
|
2501
|
+
input_tokens: "input_tokens";
|
|
2502
|
+
output_tokens: "output_tokens";
|
|
2503
|
+
cache_read_input_tokens: "cache_read_input_tokens";
|
|
2504
|
+
model_call: "model_call";
|
|
2505
|
+
tool_call: "tool_call";
|
|
2506
|
+
a2a_call: "a2a_call";
|
|
2507
|
+
}>;
|
|
2508
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
2509
|
+
provider: z.ZodString;
|
|
2510
|
+
name: z.ZodString;
|
|
2511
|
+
}, z.core.$strict>>;
|
|
2512
|
+
tool_name: z.ZodOptional<z.ZodString>;
|
|
2513
|
+
price_numerator: z.ZodNumber;
|
|
2514
|
+
price_denominator: z.ZodNumber;
|
|
2515
|
+
}, z.core.$strict>>;
|
|
2516
|
+
fixed_minor: z.ZodOptional<z.ZodNumber>;
|
|
2517
|
+
tolerance_bps: z.ZodNumber;
|
|
2518
|
+
}, z.core.$strict>>;
|
|
2519
|
+
refund_terms: z.ZodOptional<z.ZodObject<{
|
|
2520
|
+
on_failure: z.ZodEnum<{
|
|
2521
|
+
dispute: "dispute";
|
|
2522
|
+
refund: "refund";
|
|
2523
|
+
}>;
|
|
2524
|
+
on_timeout: z.ZodEnum<{
|
|
2525
|
+
dispute: "dispute";
|
|
2526
|
+
refund: "refund";
|
|
2527
|
+
}>;
|
|
2528
|
+
after_settlement: z.ZodObject<{
|
|
2529
|
+
cap_minor: z.ZodNumber;
|
|
2530
|
+
window_seconds: z.ZodNumber;
|
|
2531
|
+
}, z.core.$strict>;
|
|
2532
|
+
}, z.core.$strict>>;
|
|
2533
|
+
witness_policy: z.ZodOptional<z.ZodObject<{
|
|
2534
|
+
min_independent_witnesses: z.ZodNumber;
|
|
2535
|
+
witness_provider_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2536
|
+
independence: z.ZodLiteral<"distinct_verified_domain">;
|
|
2537
|
+
}, z.core.$strict>>;
|
|
1695
2538
|
}, z.core.$strip>>;
|
|
1696
2539
|
delivery_claims: z.ZodArray<z.ZodObject<{
|
|
1697
2540
|
event_id: z.ZodString;
|
|
@@ -1713,6 +2556,7 @@ export declare const SignedClosureSchema: z.ZodObject<{
|
|
|
1713
2556
|
clearing_network: "clearing_network";
|
|
1714
2557
|
}>;
|
|
1715
2558
|
assurance: z.ZodArray<z.ZodEnum<{
|
|
2559
|
+
expired: "expired";
|
|
1716
2560
|
issuer_signed: "issuer_signed";
|
|
1717
2561
|
buyer_recorded: "buyer_recorded";
|
|
1718
2562
|
network_recorded: "network_recorded";
|
|
@@ -1722,8 +2566,9 @@ export declare const SignedClosureSchema: z.ZodObject<{
|
|
|
1722
2566
|
provider_key_signed: "provider_key_signed";
|
|
1723
2567
|
contested: "contested";
|
|
1724
2568
|
superseded: "superseded";
|
|
1725
|
-
expired: "expired";
|
|
1726
2569
|
revoked: "revoked";
|
|
2570
|
+
gateway_signed: "gateway_signed";
|
|
2571
|
+
rail_attested: "rail_attested";
|
|
1727
2572
|
}>>;
|
|
1728
2573
|
note: z.ZodNullable<z.ZodString>;
|
|
1729
2574
|
evidence: z.ZodArray<z.ZodObject<{
|
|
@@ -1736,6 +2581,30 @@ export declare const SignedClosureSchema: z.ZodObject<{
|
|
|
1736
2581
|
retrospective: z.ZodBoolean;
|
|
1737
2582
|
occurred_at: z.ZodString;
|
|
1738
2583
|
recorded_at: z.ZodString;
|
|
2584
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
2585
|
+
trace_digest: z.ZodString;
|
|
2586
|
+
summary: z.ZodObject<{
|
|
2587
|
+
models: z.ZodArray<z.ZodObject<{
|
|
2588
|
+
provider: z.ZodString;
|
|
2589
|
+
name: z.ZodString;
|
|
2590
|
+
calls: z.ZodNumber;
|
|
2591
|
+
input_tokens: z.ZodNumber;
|
|
2592
|
+
output_tokens: z.ZodNumber;
|
|
2593
|
+
cache_read_input_tokens: z.ZodNumber;
|
|
2594
|
+
}, z.core.$strict>>;
|
|
2595
|
+
tools: z.ZodArray<z.ZodObject<{
|
|
2596
|
+
name: z.ZodString;
|
|
2597
|
+
calls: z.ZodNumber;
|
|
2598
|
+
}, z.core.$strict>>;
|
|
2599
|
+
a2a_calls: z.ZodNumber;
|
|
2600
|
+
}, z.core.$strict>;
|
|
2601
|
+
}, z.core.$strict>>;
|
|
2602
|
+
signer: z.ZodOptional<z.ZodObject<{
|
|
2603
|
+
provider_id: z.ZodString;
|
|
2604
|
+
binding_id: z.ZodString;
|
|
2605
|
+
key_id: z.ZodString;
|
|
2606
|
+
value: z.ZodString;
|
|
2607
|
+
}, z.core.$strict>>;
|
|
1739
2608
|
}, z.core.$strip>>;
|
|
1740
2609
|
financial_events: z.ZodArray<z.ZodObject<{
|
|
1741
2610
|
record: z.ZodObject<{
|
|
@@ -1751,6 +2620,8 @@ export declare const SignedClosureSchema: z.ZodObject<{
|
|
|
1751
2620
|
credit: "credit";
|
|
1752
2621
|
adjustment: "adjustment";
|
|
1753
2622
|
fx_rate: "fx_rate";
|
|
2623
|
+
estimate: "estimate";
|
|
2624
|
+
hold: "hold";
|
|
1754
2625
|
}>;
|
|
1755
2626
|
source: z.ZodString;
|
|
1756
2627
|
source_event_id: z.ZodString;
|
|
@@ -1766,6 +2637,7 @@ export declare const SignedClosureSchema: z.ZodObject<{
|
|
|
1766
2637
|
issued: "issued";
|
|
1767
2638
|
pending: "pending";
|
|
1768
2639
|
reported_paid: "reported_paid";
|
|
2640
|
+
pending_finality: "pending_finality";
|
|
1769
2641
|
failed: "failed";
|
|
1770
2642
|
refunded: "refunded";
|
|
1771
2643
|
reversed: "reversed";
|
|
@@ -1795,6 +2667,38 @@ export declare const SignedClosureSchema: z.ZodObject<{
|
|
|
1795
2667
|
rate_denominator: z.ZodNumber;
|
|
1796
2668
|
}, z.core.$strip>>;
|
|
1797
2669
|
reason: z.ZodNullable<z.ZodString>;
|
|
2670
|
+
skill: z.ZodOptional<z.ZodObject<{
|
|
2671
|
+
namespace: z.ZodString;
|
|
2672
|
+
skill_id: z.ZodString;
|
|
2673
|
+
agent_card_url: z.ZodOptional<z.ZodURL>;
|
|
2674
|
+
}, z.core.$strip>>;
|
|
2675
|
+
expectation: z.ZodOptional<z.ZodObject<{
|
|
2676
|
+
issued_by: z.ZodEnum<{
|
|
2677
|
+
agent: "agent";
|
|
2678
|
+
gateway: "gateway";
|
|
2679
|
+
operator: "operator";
|
|
2680
|
+
}>;
|
|
2681
|
+
source_ref: z.ZodNullable<z.ZodString>;
|
|
2682
|
+
basis: z.ZodNullable<z.ZodString>;
|
|
2683
|
+
expires_at: z.ZodNullable<z.ZodISODateTime>;
|
|
2684
|
+
supersedes: z.ZodNullable<z.ZodString>;
|
|
2685
|
+
hold_status: z.ZodOptional<z.ZodEnum<{
|
|
2686
|
+
open: "open";
|
|
2687
|
+
captured: "captured";
|
|
2688
|
+
released: "released";
|
|
2689
|
+
expired: "expired";
|
|
2690
|
+
}>>;
|
|
2691
|
+
signer: z.ZodOptional<z.ZodObject<{
|
|
2692
|
+
provider_id: z.ZodString;
|
|
2693
|
+
binding_id: z.ZodString;
|
|
2694
|
+
key_id: z.ZodString;
|
|
2695
|
+
value: z.ZodString;
|
|
2696
|
+
}, z.core.$strict>>;
|
|
2697
|
+
}, z.core.$strict>>;
|
|
2698
|
+
rail_attestation: z.ZodOptional<z.ZodObject<{
|
|
2699
|
+
scheme: z.ZodString;
|
|
2700
|
+
record: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2701
|
+
}, z.core.$strict>>;
|
|
1798
2702
|
}, z.core.$strip>;
|
|
1799
2703
|
event_digest: z.ZodString;
|
|
1800
2704
|
attributed_to: z.ZodString;
|
|
@@ -1957,6 +2861,7 @@ export declare const SignedClosureSchema: z.ZodObject<{
|
|
|
1957
2861
|
"scope.terms_digest": "scope.terms_digest";
|
|
1958
2862
|
"financial.amounts": "financial.amounts";
|
|
1959
2863
|
"financial.status": "financial.status";
|
|
2864
|
+
"delivery.usage": "delivery.usage";
|
|
1960
2865
|
}>>;
|
|
1961
2866
|
note: z.ZodNullable<z.ZodString>;
|
|
1962
2867
|
evidence: z.ZodArray<z.ZodObject<{
|
|
@@ -1971,6 +2876,7 @@ export declare const SignedClosureSchema: z.ZodObject<{
|
|
|
1971
2876
|
"scope.terms_digest": "scope.terms_digest";
|
|
1972
2877
|
"financial.amounts": "financial.amounts";
|
|
1973
2878
|
"financial.status": "financial.status";
|
|
2879
|
+
"delivery.usage": "delivery.usage";
|
|
1974
2880
|
}>;
|
|
1975
2881
|
proposed_value: z.ZodString;
|
|
1976
2882
|
reason: z.ZodString;
|
|
@@ -1989,6 +2895,7 @@ export declare const SignedClosureSchema: z.ZodObject<{
|
|
|
1989
2895
|
attestation_digest: z.ZodString;
|
|
1990
2896
|
reason: z.ZodString;
|
|
1991
2897
|
}, z.core.$strip>>>;
|
|
2898
|
+
role: z.ZodOptional<z.ZodLiteral<"witness">>;
|
|
1992
2899
|
}, z.core.$strip>;
|
|
1993
2900
|
statement_digest: z.ZodString;
|
|
1994
2901
|
provider_signature: z.ZodNullable<z.ZodObject<{
|
|
@@ -1997,6 +2904,7 @@ export declare const SignedClosureSchema: z.ZodObject<{
|
|
|
1997
2904
|
value: z.ZodString;
|
|
1998
2905
|
}, z.core.$strip>>;
|
|
1999
2906
|
assurance: z.ZodArray<z.ZodEnum<{
|
|
2907
|
+
expired: "expired";
|
|
2000
2908
|
issuer_signed: "issuer_signed";
|
|
2001
2909
|
buyer_recorded: "buyer_recorded";
|
|
2002
2910
|
network_recorded: "network_recorded";
|
|
@@ -2006,8 +2914,9 @@ export declare const SignedClosureSchema: z.ZodObject<{
|
|
|
2006
2914
|
provider_key_signed: "provider_key_signed";
|
|
2007
2915
|
contested: "contested";
|
|
2008
2916
|
superseded: "superseded";
|
|
2009
|
-
expired: "expired";
|
|
2010
2917
|
revoked: "revoked";
|
|
2918
|
+
gateway_signed: "gateway_signed";
|
|
2919
|
+
rail_attested: "rail_attested";
|
|
2011
2920
|
}>>;
|
|
2012
2921
|
decision: z.ZodNullable<z.ZodObject<{
|
|
2013
2922
|
status: z.ZodEnum<{
|
|
@@ -2058,6 +2967,138 @@ export declare const SignedClosureSchema: z.ZodObject<{
|
|
|
2058
2967
|
decision_id: z.ZodNullable<z.ZodString>;
|
|
2059
2968
|
decision_digest: z.ZodNullable<z.ZodString>;
|
|
2060
2969
|
}, z.core.$strip>>>;
|
|
2970
|
+
usage_checks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2971
|
+
delegation_id: z.ZodString;
|
|
2972
|
+
currency: z.ZodString;
|
|
2973
|
+
expected_minor: z.ZodNullable<z.ZodNumber>;
|
|
2974
|
+
lines: z.ZodArray<z.ZodObject<{
|
|
2975
|
+
meter: z.ZodEnum<{
|
|
2976
|
+
input_tokens: "input_tokens";
|
|
2977
|
+
output_tokens: "output_tokens";
|
|
2978
|
+
cache_read_input_tokens: "cache_read_input_tokens";
|
|
2979
|
+
model_call: "model_call";
|
|
2980
|
+
tool_call: "tool_call";
|
|
2981
|
+
a2a_call: "a2a_call";
|
|
2982
|
+
}>;
|
|
2983
|
+
model: z.ZodOptional<z.ZodObject<{
|
|
2984
|
+
provider: z.ZodString;
|
|
2985
|
+
name: z.ZodString;
|
|
2986
|
+
}, z.core.$strip>>;
|
|
2987
|
+
tool_name: z.ZodOptional<z.ZodString>;
|
|
2988
|
+
units: z.ZodNumber;
|
|
2989
|
+
cost_minor: z.ZodNumber;
|
|
2990
|
+
}, z.core.$strip>>;
|
|
2991
|
+
billed_minor: z.ZodNumber;
|
|
2992
|
+
difference_minor: z.ZodNullable<z.ZodNumber>;
|
|
2993
|
+
allowed_difference_minor: z.ZodNullable<z.ZodNumber>;
|
|
2994
|
+
within_tolerance: z.ZodNullable<z.ZodBoolean>;
|
|
2995
|
+
unpriced: z.ZodArray<z.ZodString>;
|
|
2996
|
+
trace_digests: z.ZodArray<z.ZodString>;
|
|
2997
|
+
assurance: z.ZodArray<z.ZodEnum<{
|
|
2998
|
+
expired: "expired";
|
|
2999
|
+
issuer_signed: "issuer_signed";
|
|
3000
|
+
buyer_recorded: "buyer_recorded";
|
|
3001
|
+
network_recorded: "network_recorded";
|
|
3002
|
+
recipient_viewed: "recipient_viewed";
|
|
3003
|
+
link_authenticated_response: "link_authenticated_response";
|
|
3004
|
+
provider_identity_bound: "provider_identity_bound";
|
|
3005
|
+
provider_key_signed: "provider_key_signed";
|
|
3006
|
+
contested: "contested";
|
|
3007
|
+
superseded: "superseded";
|
|
3008
|
+
revoked: "revoked";
|
|
3009
|
+
gateway_signed: "gateway_signed";
|
|
3010
|
+
rail_attested: "rail_attested";
|
|
3011
|
+
}>>;
|
|
3012
|
+
}, z.core.$strip>>>;
|
|
3013
|
+
expectation_report: z.ZodOptional<z.ZodObject<{
|
|
3014
|
+
currency: z.ZodString;
|
|
3015
|
+
task: z.ZodObject<{
|
|
3016
|
+
estimated_minor: z.ZodNullable<z.ZodNumber>;
|
|
3017
|
+
held_minor: z.ZodNumber;
|
|
3018
|
+
actual_minor: z.ZodNumber;
|
|
3019
|
+
variance_vs_estimate_minor: z.ZodNullable<z.ZodNumber>;
|
|
3020
|
+
variance_vs_estimate_bps: z.ZodNullable<z.ZodNumber>;
|
|
3021
|
+
variance_vs_hold_minor: z.ZodNullable<z.ZodNumber>;
|
|
3022
|
+
variance_vs_hold_bps: z.ZodNullable<z.ZodNumber>;
|
|
3023
|
+
unestimated_minor: z.ZodNumber;
|
|
3024
|
+
}, z.core.$strip>;
|
|
3025
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
3026
|
+
estimated_minor: z.ZodNullable<z.ZodNumber>;
|
|
3027
|
+
held_minor: z.ZodNumber;
|
|
3028
|
+
actual_minor: z.ZodNumber;
|
|
3029
|
+
variance_vs_estimate_minor: z.ZodNullable<z.ZodNumber>;
|
|
3030
|
+
variance_vs_estimate_bps: z.ZodNullable<z.ZodNumber>;
|
|
3031
|
+
variance_vs_hold_minor: z.ZodNullable<z.ZodNumber>;
|
|
3032
|
+
variance_vs_hold_bps: z.ZodNullable<z.ZodNumber>;
|
|
3033
|
+
node_id: z.ZodString;
|
|
3034
|
+
estimate_event_id: z.ZodNullable<z.ZodString>;
|
|
3035
|
+
}, z.core.$strip>>;
|
|
3036
|
+
records: z.ZodArray<z.ZodObject<{
|
|
3037
|
+
financial_event_id: z.ZodString;
|
|
3038
|
+
node_id: z.ZodString;
|
|
3039
|
+
type: z.ZodEnum<{
|
|
3040
|
+
estimate: "estimate";
|
|
3041
|
+
hold: "hold";
|
|
3042
|
+
}>;
|
|
3043
|
+
issued_by: z.ZodEnum<{
|
|
3044
|
+
agent: "agent";
|
|
3045
|
+
gateway: "gateway";
|
|
3046
|
+
operator: "operator";
|
|
3047
|
+
}>;
|
|
3048
|
+
status: z.ZodEnum<{
|
|
3049
|
+
superseded: "superseded";
|
|
3050
|
+
current: "current";
|
|
3051
|
+
not_latest: "not_latest";
|
|
3052
|
+
after_charge: "after_charge";
|
|
3053
|
+
other_currency: "other_currency";
|
|
3054
|
+
}>;
|
|
3055
|
+
hold_status: z.ZodNullable<z.ZodEnum<{
|
|
3056
|
+
open: "open";
|
|
3057
|
+
captured: "captured";
|
|
3058
|
+
released: "released";
|
|
3059
|
+
expired: "expired";
|
|
3060
|
+
}>>;
|
|
3061
|
+
assurance: z.ZodArray<z.ZodEnum<{
|
|
3062
|
+
expired: "expired";
|
|
3063
|
+
issuer_signed: "issuer_signed";
|
|
3064
|
+
buyer_recorded: "buyer_recorded";
|
|
3065
|
+
network_recorded: "network_recorded";
|
|
3066
|
+
recipient_viewed: "recipient_viewed";
|
|
3067
|
+
link_authenticated_response: "link_authenticated_response";
|
|
3068
|
+
provider_identity_bound: "provider_identity_bound";
|
|
3069
|
+
provider_key_signed: "provider_key_signed";
|
|
3070
|
+
contested: "contested";
|
|
3071
|
+
superseded: "superseded";
|
|
3072
|
+
revoked: "revoked";
|
|
3073
|
+
gateway_signed: "gateway_signed";
|
|
3074
|
+
rail_attested: "rail_attested";
|
|
3075
|
+
}>>;
|
|
3076
|
+
}, z.core.$strip>>;
|
|
3077
|
+
}, z.core.$strip>>;
|
|
3078
|
+
rail_attestations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3079
|
+
financial_event_id: z.ZodString;
|
|
3080
|
+
scheme: z.ZodString;
|
|
3081
|
+
rail: z.ZodString;
|
|
3082
|
+
rail_ref: z.ZodString;
|
|
3083
|
+
anchor: z.ZodString;
|
|
3084
|
+
assurance: z.ZodTuple<[z.ZodLiteral<"rail_attested">], null>;
|
|
3085
|
+
}, z.core.$strip>>>;
|
|
3086
|
+
resolved_exceptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3087
|
+
exception_id: z.ZodString;
|
|
3088
|
+
kind: z.ZodString;
|
|
3089
|
+
status: z.ZodEnum<{
|
|
3090
|
+
open: "open";
|
|
3091
|
+
resolved: "resolved";
|
|
3092
|
+
dismissed: "dismissed";
|
|
3093
|
+
}>;
|
|
3094
|
+
delegation_id: z.ZodNullable<z.ZodString>;
|
|
3095
|
+
financial_event_id: z.ZodNullable<z.ZodString>;
|
|
3096
|
+
detail: z.ZodString;
|
|
3097
|
+
created_at: z.ZodString;
|
|
3098
|
+
resolved_by: z.ZodString;
|
|
3099
|
+
resolved_at: z.ZodString;
|
|
3100
|
+
resolution: z.ZodNullable<z.ZodString>;
|
|
3101
|
+
}, z.core.$strip>>>;
|
|
2061
3102
|
}, z.core.$strip>;
|
|
2062
3103
|
signature: z.ZodObject<{
|
|
2063
3104
|
key_id: z.ZodString;
|