@peac/schema 0.10.14 → 0.11.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.
@@ -14,7 +14,10 @@ import type { JsonValue } from '@peac/kernel';
14
14
  * - 'operator': Bot/crawler operated by a known organization (e.g., Googlebot, GPTBot)
15
15
  * - 'user-delegated': Agent acting on behalf of a human user (e.g., browser extension, AI assistant)
16
16
  */
17
- export declare const ControlTypeSchema: z.ZodEnum<["operator", "user-delegated"]>;
17
+ export declare const ControlTypeSchema: z.ZodEnum<{
18
+ operator: "operator";
19
+ "user-delegated": "user-delegated";
20
+ }>;
18
21
  export type ControlType = z.infer<typeof ControlTypeSchema>;
19
22
  /**
20
23
  * Array of valid control types for runtime checks
@@ -28,7 +31,12 @@ export declare const CONTROL_TYPES: readonly ["operator", "user-delegated"];
28
31
  * - 'mtls': Mutual TLS client certificate
29
32
  * - 'jwk-thumbprint': JWK Thumbprint confirmation (RFC 7638)
30
33
  */
31
- export declare const ProofMethodSchema: z.ZodEnum<["http-message-signature", "dpop", "mtls", "jwk-thumbprint"]>;
34
+ export declare const ProofMethodSchema: z.ZodEnum<{
35
+ "http-message-signature": "http-message-signature";
36
+ dpop: "dpop";
37
+ mtls: "mtls";
38
+ "jwk-thumbprint": "jwk-thumbprint";
39
+ }>;
32
40
  export type ProofMethod = z.infer<typeof ProofMethodSchema>;
33
41
  /**
34
42
  * Array of valid proof methods for runtime checks
@@ -40,100 +48,36 @@ export declare const PROOF_METHODS: readonly ["http-message-signature", "dpop",
40
48
  * This allows verifiers to reconstruct the binding message for verification.
41
49
  */
42
50
  export declare const BindingDetailsSchema: z.ZodObject<{
43
- /** HTTP method (uppercase: GET, POST, etc.) */
44
51
  method: z.ZodString;
45
- /** Target URI of the request */
46
52
  target: z.ZodString;
47
- /** Headers included in the signature (lowercase) */
48
- headers_included: z.ZodArray<z.ZodString, "many">;
49
- /** SHA-256 hash of request body (base64url), empty string if no body */
53
+ headers_included: z.ZodArray<z.ZodString>;
50
54
  body_hash: z.ZodOptional<z.ZodString>;
51
- /** When the binding was signed (RFC 3339) */
52
55
  signed_at: z.ZodString;
53
- }, "strict", z.ZodTypeAny, {
54
- method: string;
55
- target: string;
56
- headers_included: string[];
57
- signed_at: string;
58
- body_hash?: string | undefined;
59
- }, {
60
- method: string;
61
- target: string;
62
- headers_included: string[];
63
- signed_at: string;
64
- body_hash?: string | undefined;
65
- }>;
56
+ }, z.core.$strict>;
66
57
  export type BindingDetails = z.infer<typeof BindingDetailsSchema>;
67
58
  /**
68
59
  * Proof of control binding - cryptographic evidence that the agent controls the key.
69
60
  */
70
61
  export declare const AgentProofSchema: z.ZodObject<{
71
- /** Proof method used */
72
- method: z.ZodEnum<["http-message-signature", "dpop", "mtls", "jwk-thumbprint"]>;
73
- /** Key ID (matches kid in JWS header or JWKS) */
62
+ method: z.ZodEnum<{
63
+ "http-message-signature": "http-message-signature";
64
+ dpop: "dpop";
65
+ mtls: "mtls";
66
+ "jwk-thumbprint": "jwk-thumbprint";
67
+ }>;
74
68
  key_id: z.ZodString;
75
- /** Algorithm used (default: EdDSA for Ed25519) */
76
69
  alg: z.ZodDefault<z.ZodString>;
77
- /** Signature over binding message (base64url, for http-message-signature) */
78
70
  signature: z.ZodOptional<z.ZodString>;
79
- /** DPoP proof JWT (for dpop method) */
80
71
  dpop_proof: z.ZodOptional<z.ZodString>;
81
- /** Certificate fingerprint (for mtls method, SHA-256 base64url) */
82
72
  cert_thumbprint: z.ZodOptional<z.ZodString>;
83
- /** Binding details for http-message-signature */
84
73
  binding: z.ZodOptional<z.ZodObject<{
85
- /** HTTP method (uppercase: GET, POST, etc.) */
86
74
  method: z.ZodString;
87
- /** Target URI of the request */
88
75
  target: z.ZodString;
89
- /** Headers included in the signature (lowercase) */
90
- headers_included: z.ZodArray<z.ZodString, "many">;
91
- /** SHA-256 hash of request body (base64url), empty string if no body */
76
+ headers_included: z.ZodArray<z.ZodString>;
92
77
  body_hash: z.ZodOptional<z.ZodString>;
93
- /** When the binding was signed (RFC 3339) */
94
78
  signed_at: z.ZodString;
95
- }, "strict", z.ZodTypeAny, {
96
- method: string;
97
- target: string;
98
- headers_included: string[];
99
- signed_at: string;
100
- body_hash?: string | undefined;
101
- }, {
102
- method: string;
103
- target: string;
104
- headers_included: string[];
105
- signed_at: string;
106
- body_hash?: string | undefined;
107
- }>>;
108
- }, "strict", z.ZodTypeAny, {
109
- method: "http-message-signature" | "dpop" | "mtls" | "jwk-thumbprint";
110
- key_id: string;
111
- alg: string;
112
- signature?: string | undefined;
113
- dpop_proof?: string | undefined;
114
- cert_thumbprint?: string | undefined;
115
- binding?: {
116
- method: string;
117
- target: string;
118
- headers_included: string[];
119
- signed_at: string;
120
- body_hash?: string | undefined;
121
- } | undefined;
122
- }, {
123
- method: "http-message-signature" | "dpop" | "mtls" | "jwk-thumbprint";
124
- key_id: string;
125
- alg?: string | undefined;
126
- signature?: string | undefined;
127
- dpop_proof?: string | undefined;
128
- cert_thumbprint?: string | undefined;
129
- binding?: {
130
- method: string;
131
- target: string;
132
- headers_included: string[];
133
- signed_at: string;
134
- body_hash?: string | undefined;
135
- } | undefined;
136
- }>;
79
+ }, z.core.$strict>>;
80
+ }, z.core.$strict>;
137
81
  export type AgentProof = z.infer<typeof AgentProofSchema>;
138
82
  /**
139
83
  * Agent identity evidence - the payload of an AgentIdentityAttestation.
@@ -142,139 +86,38 @@ export type AgentProof = z.infer<typeof AgentProofSchema>;
142
86
  * cryptographic proof of key control.
143
87
  */
144
88
  export declare const AgentIdentityEvidenceSchema: z.ZodObject<{
145
- /** Stable agent identifier (opaque string, REQUIRED) */
146
89
  agent_id: z.ZodString;
147
- /** Control type: operator-verified or user-delegated (REQUIRED) */
148
- control_type: z.ZodEnum<["operator", "user-delegated"]>;
149
- /** Agent capabilities/scopes (optional, for fine-grained access) */
150
- capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
151
- /** Delegation chain for user-delegated agents (optional) */
152
- delegation_chain: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
153
- /** Cryptographic proof of key control (optional) */
90
+ control_type: z.ZodEnum<{
91
+ operator: "operator";
92
+ "user-delegated": "user-delegated";
93
+ }>;
94
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
95
+ delegation_chain: z.ZodOptional<z.ZodArray<z.ZodString>>;
154
96
  proof: z.ZodOptional<z.ZodObject<{
155
- /** Proof method used */
156
- method: z.ZodEnum<["http-message-signature", "dpop", "mtls", "jwk-thumbprint"]>;
157
- /** Key ID (matches kid in JWS header or JWKS) */
97
+ method: z.ZodEnum<{
98
+ "http-message-signature": "http-message-signature";
99
+ dpop: "dpop";
100
+ mtls: "mtls";
101
+ "jwk-thumbprint": "jwk-thumbprint";
102
+ }>;
158
103
  key_id: z.ZodString;
159
- /** Algorithm used (default: EdDSA for Ed25519) */
160
104
  alg: z.ZodDefault<z.ZodString>;
161
- /** Signature over binding message (base64url, for http-message-signature) */
162
105
  signature: z.ZodOptional<z.ZodString>;
163
- /** DPoP proof JWT (for dpop method) */
164
106
  dpop_proof: z.ZodOptional<z.ZodString>;
165
- /** Certificate fingerprint (for mtls method, SHA-256 base64url) */
166
107
  cert_thumbprint: z.ZodOptional<z.ZodString>;
167
- /** Binding details for http-message-signature */
168
108
  binding: z.ZodOptional<z.ZodObject<{
169
- /** HTTP method (uppercase: GET, POST, etc.) */
170
109
  method: z.ZodString;
171
- /** Target URI of the request */
172
110
  target: z.ZodString;
173
- /** Headers included in the signature (lowercase) */
174
- headers_included: z.ZodArray<z.ZodString, "many">;
175
- /** SHA-256 hash of request body (base64url), empty string if no body */
111
+ headers_included: z.ZodArray<z.ZodString>;
176
112
  body_hash: z.ZodOptional<z.ZodString>;
177
- /** When the binding was signed (RFC 3339) */
178
113
  signed_at: z.ZodString;
179
- }, "strict", z.ZodTypeAny, {
180
- method: string;
181
- target: string;
182
- headers_included: string[];
183
- signed_at: string;
184
- body_hash?: string | undefined;
185
- }, {
186
- method: string;
187
- target: string;
188
- headers_included: string[];
189
- signed_at: string;
190
- body_hash?: string | undefined;
191
- }>>;
192
- }, "strict", z.ZodTypeAny, {
193
- method: "http-message-signature" | "dpop" | "mtls" | "jwk-thumbprint";
194
- key_id: string;
195
- alg: string;
196
- signature?: string | undefined;
197
- dpop_proof?: string | undefined;
198
- cert_thumbprint?: string | undefined;
199
- binding?: {
200
- method: string;
201
- target: string;
202
- headers_included: string[];
203
- signed_at: string;
204
- body_hash?: string | undefined;
205
- } | undefined;
206
- }, {
207
- method: "http-message-signature" | "dpop" | "mtls" | "jwk-thumbprint";
208
- key_id: string;
209
- alg?: string | undefined;
210
- signature?: string | undefined;
211
- dpop_proof?: string | undefined;
212
- cert_thumbprint?: string | undefined;
213
- binding?: {
214
- method: string;
215
- target: string;
216
- headers_included: string[];
217
- signed_at: string;
218
- body_hash?: string | undefined;
219
- } | undefined;
220
- }>>;
221
- /** Key directory URL for public key discovery (optional) */
114
+ }, z.core.$strict>>;
115
+ }, z.core.$strict>>;
222
116
  key_directory_url: z.ZodOptional<z.ZodString>;
223
- /** Agent operator/organization (optional, for operator type) */
224
117
  operator: z.ZodOptional<z.ZodString>;
225
- /** User identifier (optional, for user-delegated type, should be opaque) */
226
118
  user_id: z.ZodOptional<z.ZodString>;
227
- /** Additional type-specific metadata (optional) */
228
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>>>;
229
- }, "strict", z.ZodTypeAny, {
230
- agent_id: string;
231
- control_type: "operator" | "user-delegated";
232
- operator?: string | undefined;
233
- capabilities?: string[] | undefined;
234
- delegation_chain?: string[] | undefined;
235
- proof?: {
236
- method: "http-message-signature" | "dpop" | "mtls" | "jwk-thumbprint";
237
- key_id: string;
238
- alg: string;
239
- signature?: string | undefined;
240
- dpop_proof?: string | undefined;
241
- cert_thumbprint?: string | undefined;
242
- binding?: {
243
- method: string;
244
- target: string;
245
- headers_included: string[];
246
- signed_at: string;
247
- body_hash?: string | undefined;
248
- } | undefined;
249
- } | undefined;
250
- key_directory_url?: string | undefined;
251
- user_id?: string | undefined;
252
- metadata?: Record<string, JsonValue> | undefined;
253
- }, {
254
- agent_id: string;
255
- control_type: "operator" | "user-delegated";
256
- operator?: string | undefined;
257
- capabilities?: string[] | undefined;
258
- delegation_chain?: string[] | undefined;
259
- proof?: {
260
- method: "http-message-signature" | "dpop" | "mtls" | "jwk-thumbprint";
261
- key_id: string;
262
- alg?: string | undefined;
263
- signature?: string | undefined;
264
- dpop_proof?: string | undefined;
265
- cert_thumbprint?: string | undefined;
266
- binding?: {
267
- method: string;
268
- target: string;
269
- headers_included: string[];
270
- signed_at: string;
271
- body_hash?: string | undefined;
272
- } | undefined;
273
- } | undefined;
274
- key_directory_url?: string | undefined;
275
- user_id?: string | undefined;
276
- metadata?: Record<string, JsonValue> | undefined;
277
- }>;
119
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
120
+ }, z.core.$strict>;
278
121
  export type AgentIdentityEvidence = z.infer<typeof AgentIdentityEvidenceSchema>;
279
122
  /**
280
123
  * Attestation type literal for agent identity
@@ -307,214 +150,45 @@ export declare const AGENT_IDENTITY_TYPE: "peac/agent-identity";
307
150
  * ```
308
151
  */
309
152
  export declare const AgentIdentityAttestationSchema: z.ZodObject<{
310
- /** Attestation type (MUST be 'peac/agent-identity') */
311
153
  type: z.ZodLiteral<"peac/agent-identity">;
312
- /** Issuer of the attestation (agent operator, IdP, or platform) */
313
154
  issuer: z.ZodString;
314
- /** When the attestation was issued (RFC 3339) */
315
155
  issued_at: z.ZodString;
316
- /** When the attestation expires (RFC 3339, optional) */
317
156
  expires_at: z.ZodOptional<z.ZodString>;
318
- /** Reference to external verification endpoint (optional) */
319
157
  ref: z.ZodOptional<z.ZodString>;
320
- /** Agent identity evidence */
321
158
  evidence: z.ZodObject<{
322
- /** Stable agent identifier (opaque string, REQUIRED) */
323
159
  agent_id: z.ZodString;
324
- /** Control type: operator-verified or user-delegated (REQUIRED) */
325
- control_type: z.ZodEnum<["operator", "user-delegated"]>;
326
- /** Agent capabilities/scopes (optional, for fine-grained access) */
327
- capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
328
- /** Delegation chain for user-delegated agents (optional) */
329
- delegation_chain: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
330
- /** Cryptographic proof of key control (optional) */
160
+ control_type: z.ZodEnum<{
161
+ operator: "operator";
162
+ "user-delegated": "user-delegated";
163
+ }>;
164
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
165
+ delegation_chain: z.ZodOptional<z.ZodArray<z.ZodString>>;
331
166
  proof: z.ZodOptional<z.ZodObject<{
332
- /** Proof method used */
333
- method: z.ZodEnum<["http-message-signature", "dpop", "mtls", "jwk-thumbprint"]>;
334
- /** Key ID (matches kid in JWS header or JWKS) */
167
+ method: z.ZodEnum<{
168
+ "http-message-signature": "http-message-signature";
169
+ dpop: "dpop";
170
+ mtls: "mtls";
171
+ "jwk-thumbprint": "jwk-thumbprint";
172
+ }>;
335
173
  key_id: z.ZodString;
336
- /** Algorithm used (default: EdDSA for Ed25519) */
337
174
  alg: z.ZodDefault<z.ZodString>;
338
- /** Signature over binding message (base64url, for http-message-signature) */
339
175
  signature: z.ZodOptional<z.ZodString>;
340
- /** DPoP proof JWT (for dpop method) */
341
176
  dpop_proof: z.ZodOptional<z.ZodString>;
342
- /** Certificate fingerprint (for mtls method, SHA-256 base64url) */
343
177
  cert_thumbprint: z.ZodOptional<z.ZodString>;
344
- /** Binding details for http-message-signature */
345
178
  binding: z.ZodOptional<z.ZodObject<{
346
- /** HTTP method (uppercase: GET, POST, etc.) */
347
179
  method: z.ZodString;
348
- /** Target URI of the request */
349
180
  target: z.ZodString;
350
- /** Headers included in the signature (lowercase) */
351
- headers_included: z.ZodArray<z.ZodString, "many">;
352
- /** SHA-256 hash of request body (base64url), empty string if no body */
181
+ headers_included: z.ZodArray<z.ZodString>;
353
182
  body_hash: z.ZodOptional<z.ZodString>;
354
- /** When the binding was signed (RFC 3339) */
355
183
  signed_at: z.ZodString;
356
- }, "strict", z.ZodTypeAny, {
357
- method: string;
358
- target: string;
359
- headers_included: string[];
360
- signed_at: string;
361
- body_hash?: string | undefined;
362
- }, {
363
- method: string;
364
- target: string;
365
- headers_included: string[];
366
- signed_at: string;
367
- body_hash?: string | undefined;
368
- }>>;
369
- }, "strict", z.ZodTypeAny, {
370
- method: "http-message-signature" | "dpop" | "mtls" | "jwk-thumbprint";
371
- key_id: string;
372
- alg: string;
373
- signature?: string | undefined;
374
- dpop_proof?: string | undefined;
375
- cert_thumbprint?: string | undefined;
376
- binding?: {
377
- method: string;
378
- target: string;
379
- headers_included: string[];
380
- signed_at: string;
381
- body_hash?: string | undefined;
382
- } | undefined;
383
- }, {
384
- method: "http-message-signature" | "dpop" | "mtls" | "jwk-thumbprint";
385
- key_id: string;
386
- alg?: string | undefined;
387
- signature?: string | undefined;
388
- dpop_proof?: string | undefined;
389
- cert_thumbprint?: string | undefined;
390
- binding?: {
391
- method: string;
392
- target: string;
393
- headers_included: string[];
394
- signed_at: string;
395
- body_hash?: string | undefined;
396
- } | undefined;
397
- }>>;
398
- /** Key directory URL for public key discovery (optional) */
184
+ }, z.core.$strict>>;
185
+ }, z.core.$strict>>;
399
186
  key_directory_url: z.ZodOptional<z.ZodString>;
400
- /** Agent operator/organization (optional, for operator type) */
401
187
  operator: z.ZodOptional<z.ZodString>;
402
- /** User identifier (optional, for user-delegated type, should be opaque) */
403
188
  user_id: z.ZodOptional<z.ZodString>;
404
- /** Additional type-specific metadata (optional) */
405
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>>>;
406
- }, "strict", z.ZodTypeAny, {
407
- agent_id: string;
408
- control_type: "operator" | "user-delegated";
409
- operator?: string | undefined;
410
- capabilities?: string[] | undefined;
411
- delegation_chain?: string[] | undefined;
412
- proof?: {
413
- method: "http-message-signature" | "dpop" | "mtls" | "jwk-thumbprint";
414
- key_id: string;
415
- alg: string;
416
- signature?: string | undefined;
417
- dpop_proof?: string | undefined;
418
- cert_thumbprint?: string | undefined;
419
- binding?: {
420
- method: string;
421
- target: string;
422
- headers_included: string[];
423
- signed_at: string;
424
- body_hash?: string | undefined;
425
- } | undefined;
426
- } | undefined;
427
- key_directory_url?: string | undefined;
428
- user_id?: string | undefined;
429
- metadata?: Record<string, JsonValue> | undefined;
430
- }, {
431
- agent_id: string;
432
- control_type: "operator" | "user-delegated";
433
- operator?: string | undefined;
434
- capabilities?: string[] | undefined;
435
- delegation_chain?: string[] | undefined;
436
- proof?: {
437
- method: "http-message-signature" | "dpop" | "mtls" | "jwk-thumbprint";
438
- key_id: string;
439
- alg?: string | undefined;
440
- signature?: string | undefined;
441
- dpop_proof?: string | undefined;
442
- cert_thumbprint?: string | undefined;
443
- binding?: {
444
- method: string;
445
- target: string;
446
- headers_included: string[];
447
- signed_at: string;
448
- body_hash?: string | undefined;
449
- } | undefined;
450
- } | undefined;
451
- key_directory_url?: string | undefined;
452
- user_id?: string | undefined;
453
- metadata?: Record<string, JsonValue> | undefined;
454
- }>;
455
- }, "strict", z.ZodTypeAny, {
456
- type: "peac/agent-identity";
457
- issuer: string;
458
- issued_at: string;
459
- evidence: {
460
- agent_id: string;
461
- control_type: "operator" | "user-delegated";
462
- operator?: string | undefined;
463
- capabilities?: string[] | undefined;
464
- delegation_chain?: string[] | undefined;
465
- proof?: {
466
- method: "http-message-signature" | "dpop" | "mtls" | "jwk-thumbprint";
467
- key_id: string;
468
- alg: string;
469
- signature?: string | undefined;
470
- dpop_proof?: string | undefined;
471
- cert_thumbprint?: string | undefined;
472
- binding?: {
473
- method: string;
474
- target: string;
475
- headers_included: string[];
476
- signed_at: string;
477
- body_hash?: string | undefined;
478
- } | undefined;
479
- } | undefined;
480
- key_directory_url?: string | undefined;
481
- user_id?: string | undefined;
482
- metadata?: Record<string, JsonValue> | undefined;
483
- };
484
- expires_at?: string | undefined;
485
- ref?: string | undefined;
486
- }, {
487
- type: "peac/agent-identity";
488
- issuer: string;
489
- issued_at: string;
490
- evidence: {
491
- agent_id: string;
492
- control_type: "operator" | "user-delegated";
493
- operator?: string | undefined;
494
- capabilities?: string[] | undefined;
495
- delegation_chain?: string[] | undefined;
496
- proof?: {
497
- method: "http-message-signature" | "dpop" | "mtls" | "jwk-thumbprint";
498
- key_id: string;
499
- alg?: string | undefined;
500
- signature?: string | undefined;
501
- dpop_proof?: string | undefined;
502
- cert_thumbprint?: string | undefined;
503
- binding?: {
504
- method: string;
505
- target: string;
506
- headers_included: string[];
507
- signed_at: string;
508
- body_hash?: string | undefined;
509
- } | undefined;
510
- } | undefined;
511
- key_directory_url?: string | undefined;
512
- user_id?: string | undefined;
513
- metadata?: Record<string, JsonValue> | undefined;
514
- };
515
- expires_at?: string | undefined;
516
- ref?: string | undefined;
517
- }>;
189
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
190
+ }, z.core.$strict>;
191
+ }, z.core.$strict>;
518
192
  export type AgentIdentityAttestation = z.infer<typeof AgentIdentityAttestationSchema>;
519
193
  /**
520
194
  * Identity binding result from constructBindingMessage().
@@ -522,25 +196,11 @@ export type AgentIdentityAttestation = z.infer<typeof AgentIdentityAttestationSc
522
196
  * Used to tie an agent identity attestation to a specific HTTP request.
523
197
  */
524
198
  export declare const IdentityBindingSchema: z.ZodObject<{
525
- /** SHA-256 hash of the canonical binding message (base64url) */
526
199
  binding_message_hash: z.ZodString;
527
- /** Ed25519 signature over binding message (base64url) */
528
200
  signature: z.ZodString;
529
- /** Key ID used for signing */
530
201
  key_id: z.ZodString;
531
- /** When the binding was created (RFC 3339) */
532
202
  signed_at: z.ZodString;
533
- }, "strict", z.ZodTypeAny, {
534
- signed_at: string;
535
- key_id: string;
536
- signature: string;
537
- binding_message_hash: string;
538
- }, {
539
- signed_at: string;
540
- key_id: string;
541
- signature: string;
542
- binding_message_hash: string;
543
- }>;
203
+ }, z.core.$strict>;
544
204
  export type IdentityBinding = z.infer<typeof IdentityBindingSchema>;
545
205
  /**
546
206
  * Agent identity verification result to include in receipt evidence.
@@ -549,29 +209,15 @@ export type IdentityBinding = z.infer<typeof IdentityBindingSchema>;
549
209
  * attestation, binding the verified identity to the issued receipt.
550
210
  */
551
211
  export declare const AgentIdentityVerifiedSchema: z.ZodObject<{
552
- /** Agent ID from the verified attestation */
553
212
  agent_id: z.ZodString;
554
- /** Control type from the verified attestation */
555
- control_type: z.ZodEnum<["operator", "user-delegated"]>;
556
- /** When the publisher verified the identity (RFC 3339) */
213
+ control_type: z.ZodEnum<{
214
+ operator: "operator";
215
+ "user-delegated": "user-delegated";
216
+ }>;
557
217
  verified_at: z.ZodString;
558
- /** Key ID that was used for verification */
559
218
  key_id: z.ZodString;
560
- /** SHA-256 hash of the binding message (base64url) */
561
219
  binding_hash: z.ZodString;
562
- }, "strict", z.ZodTypeAny, {
563
- key_id: string;
564
- agent_id: string;
565
- control_type: "operator" | "user-delegated";
566
- verified_at: string;
567
- binding_hash: string;
568
- }, {
569
- key_id: string;
570
- agent_id: string;
571
- control_type: "operator" | "user-delegated";
572
- verified_at: string;
573
- binding_hash: string;
574
- }>;
220
+ }, z.core.$strict>;
575
221
  export type AgentIdentityVerified = z.infer<typeof AgentIdentityVerifiedSchema>;
576
222
  /**
577
223
  * Validate an AgentIdentityAttestation.
@@ -1 +1 @@
1
- {"version":3,"file":"agent-identity.d.ts","sourceRoot":"","sources":["../src/agent-identity.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAO9C;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,2CAAyC,CAAC;AACxE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK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;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,wBAAwB,EACrC,SAAS,GAAE,MAAc,GACxB,OAAO,CAOT;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,wBAAwB,EACrC,SAAS,GAAE,MAAc,GACxB,OAAO,CAIT"}
@@ -58,21 +58,10 @@ export declare const ATTESTATION_LIMITS: {
58
58
  * leaking sensitive data (API keys, tokens, PII in parameters).
59
59
  */
60
60
  export declare const MinimalInteractionBindingSchema: z.ZodObject<{
61
- /** HTTP method (uppercase, e.g., GET, POST) */
62
- method: z.ZodEffects<z.ZodString, string, string>;
63
- /** Request path (no query string by default) */
61
+ method: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
64
62
  path: z.ZodString;
65
- /** HTTP response status code */
66
63
  status: z.ZodNumber;
67
- }, "strict", z.ZodTypeAny, {
68
- path: string;
69
- status: number;
70
- method: string;
71
- }, {
72
- path: string;
73
- status: number;
74
- method: string;
75
- }>;
64
+ }, z.core.$strict>;
76
65
  /**
77
66
  * Attestation receipt extensions schema
78
67
  *
@@ -87,37 +76,14 @@ export declare const AttestationExtensionsSchema: z.ZodRecord<z.ZodString, z.Zod
87
76
  * ReceiptClaimsSchema from ./validators.ts
88
77
  */
89
78
  export declare const AttestationReceiptClaimsSchema: z.ZodObject<{
90
- /** Issuer URL (normalized, no trailing slash) */
91
- iss: z.ZodEffects<z.ZodString, string, string>;
92
- /** Audience URL */
93
- aud: z.ZodEffects<z.ZodString, string, string>;
94
- /** Issued at (Unix seconds) */
79
+ iss: z.ZodString;
80
+ aud: z.ZodString;
95
81
  iat: z.ZodNumber;
96
- /** Expiration (Unix seconds) */
97
82
  exp: z.ZodNumber;
98
- /** Receipt ID (UUIDv7) */
99
83
  rid: z.ZodString;
100
- /** Subject identifier (optional) */
101
84
  sub: z.ZodOptional<z.ZodString>;
102
- /** Extensions (optional) */
103
85
  ext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
104
- }, "strict", z.ZodTypeAny, {
105
- iss: string;
106
- aud: string;
107
- iat: number;
108
- exp: number;
109
- rid: string;
110
- sub?: string | undefined;
111
- ext?: Record<string, unknown> | undefined;
112
- }, {
113
- iss: string;
114
- aud: string;
115
- iat: number;
116
- exp: number;
117
- rid: string;
118
- sub?: string | undefined;
119
- ext?: Record<string, unknown> | undefined;
120
- }>;
86
+ }, z.core.$strict>;
121
87
  export type MinimalInteractionBinding = z.infer<typeof MinimalInteractionBindingSchema>;
122
88
  export type AttestationExtensions = z.infer<typeof AttestationExtensionsSchema>;
123
89
  export type AttestationReceiptClaims = z.infer<typeof AttestationReceiptClaimsSchema>;