@peac/schema 0.9.18 → 0.9.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/LICENSE +190 -0
  2. package/dist/agent-identity.d.ts +684 -0
  3. package/dist/agent-identity.d.ts.map +1 -0
  4. package/dist/agent-identity.js +357 -0
  5. package/dist/agent-identity.js.map +1 -0
  6. package/dist/attribution.d.ts +792 -0
  7. package/dist/attribution.d.ts.map +1 -0
  8. package/dist/attribution.js +444 -0
  9. package/dist/attribution.js.map +1 -0
  10. package/dist/constants.d.ts +15 -0
  11. package/dist/constants.d.ts.map +1 -1
  12. package/dist/constants.js +16 -1
  13. package/dist/constants.js.map +1 -1
  14. package/dist/control.d.ts +2 -1
  15. package/dist/control.d.ts.map +1 -1
  16. package/dist/dispute.d.ts +1279 -0
  17. package/dist/dispute.d.ts.map +1 -0
  18. package/dist/dispute.js +832 -0
  19. package/dist/dispute.js.map +1 -0
  20. package/dist/envelope.d.ts +14 -7
  21. package/dist/envelope.d.ts.map +1 -1
  22. package/dist/errors.d.ts +19 -8
  23. package/dist/errors.d.ts.map +1 -1
  24. package/dist/errors.js +35 -7
  25. package/dist/errors.js.map +1 -1
  26. package/dist/evidence.d.ts +127 -3
  27. package/dist/evidence.d.ts.map +1 -1
  28. package/dist/index.d.ts +17 -1
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +133 -1
  31. package/dist/index.js.map +1 -1
  32. package/dist/json.d.ts +114 -0
  33. package/dist/json.d.ts.map +1 -0
  34. package/dist/json.js +267 -0
  35. package/dist/json.js.map +1 -0
  36. package/dist/obligations.d.ts +364 -0
  37. package/dist/obligations.d.ts.map +1 -0
  38. package/dist/obligations.js +337 -0
  39. package/dist/obligations.js.map +1 -0
  40. package/dist/purpose.d.ts +272 -0
  41. package/dist/purpose.d.ts.map +1 -0
  42. package/dist/purpose.js +296 -0
  43. package/dist/purpose.js.map +1 -0
  44. package/dist/types.d.ts +22 -0
  45. package/dist/types.d.ts.map +1 -1
  46. package/dist/validators.d.ts +316 -50
  47. package/dist/validators.d.ts.map +1 -1
  48. package/dist/validators.js +138 -7
  49. package/dist/validators.js.map +1 -1
  50. package/package.json +10 -10
@@ -0,0 +1,357 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgentIdentityVerifiedSchema = exports.IdentityBindingSchema = exports.AgentIdentityAttestationSchema = exports.AGENT_IDENTITY_TYPE = exports.AgentIdentityEvidenceSchema = exports.AgentProofSchema = exports.BindingDetailsSchema = exports.PROOF_METHODS = exports.ProofMethodSchema = exports.CONTROL_TYPES = exports.ControlTypeSchema = void 0;
4
+ exports.validateAgentIdentityAttestation = validateAgentIdentityAttestation;
5
+ exports.isAgentIdentityAttestation = isAgentIdentityAttestation;
6
+ exports.createAgentIdentityAttestation = createAgentIdentityAttestation;
7
+ exports.validateIdentityBinding = validateIdentityBinding;
8
+ exports.isAttestationExpired = isAttestationExpired;
9
+ exports.isAttestationNotYetValid = isAttestationNotYetValid;
10
+ /**
11
+ * Agent Identity Attestation Types and Validators (v0.9.25+)
12
+ *
13
+ * Provides cryptographic proof-of-control binding for agents,
14
+ * distinguishing operator-verified bots from user-delegated agents.
15
+ *
16
+ * @see docs/specs/AGENT-IDENTITY.md for normative specification
17
+ */
18
+ const zod_1 = require("zod");
19
+ const json_1 = require("./json");
20
+ // =============================================================================
21
+ // CONTROL TYPE (v0.9.25+)
22
+ // =============================================================================
23
+ /**
24
+ * Control type distinguishes operator-verified bots from user-delegated agents.
25
+ *
26
+ * - 'operator': Bot/crawler operated by a known organization (e.g., Googlebot, GPTBot)
27
+ * - 'user-delegated': Agent acting on behalf of a human user (e.g., browser extension, AI assistant)
28
+ */
29
+ exports.ControlTypeSchema = zod_1.z.enum(['operator', 'user-delegated']);
30
+ /**
31
+ * Array of valid control types for runtime checks
32
+ */
33
+ exports.CONTROL_TYPES = ['operator', 'user-delegated'];
34
+ // =============================================================================
35
+ // PROOF METHOD (v0.9.25+)
36
+ // =============================================================================
37
+ /**
38
+ * Proof method used to establish agent identity.
39
+ *
40
+ * - 'http-message-signature': RFC 9421 HTTP Message Signatures
41
+ * - 'dpop': RFC 9449 DPoP token binding
42
+ * - 'mtls': Mutual TLS client certificate
43
+ * - 'jwk-thumbprint': JWK Thumbprint confirmation (RFC 7638)
44
+ */
45
+ exports.ProofMethodSchema = zod_1.z.enum([
46
+ 'http-message-signature',
47
+ 'dpop',
48
+ 'mtls',
49
+ 'jwk-thumbprint',
50
+ ]);
51
+ /**
52
+ * Array of valid proof methods for runtime checks
53
+ */
54
+ exports.PROOF_METHODS = ['http-message-signature', 'dpop', 'mtls', 'jwk-thumbprint'];
55
+ // =============================================================================
56
+ // BINDING DETAILS (v0.9.25+)
57
+ // =============================================================================
58
+ /**
59
+ * Details of what was included in the binding message for http-message-signature.
60
+ *
61
+ * This allows verifiers to reconstruct the binding message for verification.
62
+ */
63
+ exports.BindingDetailsSchema = zod_1.z
64
+ .object({
65
+ /** HTTP method (uppercase: GET, POST, etc.) */
66
+ method: zod_1.z.string().min(1).max(16),
67
+ /** Target URI of the request */
68
+ target: zod_1.z.string().min(1).max(2048),
69
+ /** Headers included in the signature (lowercase) */
70
+ headers_included: zod_1.z.array(zod_1.z.string().max(64)).max(32),
71
+ /** SHA-256 hash of request body (base64url), empty string if no body */
72
+ body_hash: zod_1.z.string().max(64).optional(),
73
+ /** When the binding was signed (RFC 3339) */
74
+ signed_at: zod_1.z.string().datetime(),
75
+ })
76
+ .strict();
77
+ // =============================================================================
78
+ // AGENT PROOF (v0.9.25+)
79
+ // =============================================================================
80
+ /**
81
+ * Proof of control binding - cryptographic evidence that the agent controls the key.
82
+ */
83
+ exports.AgentProofSchema = zod_1.z
84
+ .object({
85
+ /** Proof method used */
86
+ method: exports.ProofMethodSchema,
87
+ /** Key ID (matches kid in JWS header or JWKS) */
88
+ key_id: zod_1.z.string().min(1).max(256),
89
+ /** Algorithm used (default: EdDSA for Ed25519) */
90
+ alg: zod_1.z.string().max(32).default('EdDSA'),
91
+ /** Signature over binding message (base64url, for http-message-signature) */
92
+ signature: zod_1.z.string().max(512).optional(),
93
+ /** DPoP proof JWT (for dpop method) */
94
+ dpop_proof: zod_1.z.string().max(4096).optional(),
95
+ /** Certificate fingerprint (for mtls method, SHA-256 base64url) */
96
+ cert_thumbprint: zod_1.z.string().max(64).optional(),
97
+ /** Binding details for http-message-signature */
98
+ binding: exports.BindingDetailsSchema.optional(),
99
+ })
100
+ .strict();
101
+ // =============================================================================
102
+ // AGENT IDENTITY EVIDENCE (v0.9.25+)
103
+ // =============================================================================
104
+ /**
105
+ * Agent identity evidence - the payload of an AgentIdentityAttestation.
106
+ *
107
+ * Contains the agent identifier, control type, capabilities, and optional
108
+ * cryptographic proof of key control.
109
+ */
110
+ exports.AgentIdentityEvidenceSchema = zod_1.z
111
+ .object({
112
+ /** Stable agent identifier (opaque string, REQUIRED) */
113
+ agent_id: zod_1.z.string().min(1).max(256),
114
+ /** Control type: operator-verified or user-delegated (REQUIRED) */
115
+ control_type: exports.ControlTypeSchema,
116
+ /** Agent capabilities/scopes (optional, for fine-grained access) */
117
+ capabilities: zod_1.z.array(zod_1.z.string().max(64)).max(32).optional(),
118
+ /** Delegation chain for user-delegated agents (optional) */
119
+ delegation_chain: zod_1.z.array(zod_1.z.string().max(256)).max(8).optional(),
120
+ /** Cryptographic proof of key control (optional) */
121
+ proof: exports.AgentProofSchema.optional(),
122
+ /** Key directory URL for public key discovery (optional) */
123
+ key_directory_url: zod_1.z.string().url().max(2048).optional(),
124
+ /** Agent operator/organization (optional, for operator type) */
125
+ operator: zod_1.z.string().max(256).optional(),
126
+ /** User identifier (optional, for user-delegated type, should be opaque) */
127
+ user_id: zod_1.z.string().max(256).optional(),
128
+ /** Additional type-specific metadata (optional) */
129
+ metadata: zod_1.z.record(zod_1.z.string(), json_1.JsonValueSchema).optional(),
130
+ })
131
+ .strict();
132
+ // =============================================================================
133
+ // AGENT IDENTITY ATTESTATION (v0.9.25+)
134
+ // =============================================================================
135
+ /**
136
+ * Attestation type literal for agent identity
137
+ */
138
+ exports.AGENT_IDENTITY_TYPE = 'peac/agent-identity';
139
+ /**
140
+ * AgentIdentityAttestation - extends generic Attestation with agent-specific evidence.
141
+ *
142
+ * This attestation proves cryptographic control over an agent identity,
143
+ * distinguishing operator-verified bots from user-delegated agents.
144
+ *
145
+ * @example
146
+ * ```typescript
147
+ * const attestation: AgentIdentityAttestation = {
148
+ * type: 'peac/agent-identity',
149
+ * issuer: 'https://crawler.example.com',
150
+ * issued_at: '2026-01-03T12:00:00Z',
151
+ * evidence: {
152
+ * agent_id: 'bot:crawler-prod-001',
153
+ * control_type: 'operator',
154
+ * operator: 'Example Crawler Inc.',
155
+ * capabilities: ['crawl', 'index'],
156
+ * proof: {
157
+ * method: 'http-message-signature',
158
+ * key_id: 'key-2026-01',
159
+ * alg: 'EdDSA',
160
+ * },
161
+ * },
162
+ * };
163
+ * ```
164
+ */
165
+ exports.AgentIdentityAttestationSchema = zod_1.z
166
+ .object({
167
+ /** Attestation type (MUST be 'peac/agent-identity') */
168
+ type: zod_1.z.literal(exports.AGENT_IDENTITY_TYPE),
169
+ /** Issuer of the attestation (agent operator, IdP, or platform) */
170
+ issuer: zod_1.z.string().min(1).max(2048),
171
+ /** When the attestation was issued (RFC 3339) */
172
+ issued_at: zod_1.z.string().datetime(),
173
+ /** When the attestation expires (RFC 3339, optional) */
174
+ expires_at: zod_1.z.string().datetime().optional(),
175
+ /** Reference to external verification endpoint (optional) */
176
+ ref: zod_1.z.string().url().max(2048).optional(),
177
+ /** Agent identity evidence */
178
+ evidence: exports.AgentIdentityEvidenceSchema,
179
+ })
180
+ .strict();
181
+ // =============================================================================
182
+ // IDENTITY BINDING (v0.9.25+)
183
+ // =============================================================================
184
+ /**
185
+ * Identity binding result from constructBindingMessage().
186
+ *
187
+ * Used to tie an agent identity attestation to a specific HTTP request.
188
+ */
189
+ exports.IdentityBindingSchema = zod_1.z
190
+ .object({
191
+ /** SHA-256 hash of the canonical binding message (base64url) */
192
+ binding_message_hash: zod_1.z.string().min(1).max(64),
193
+ /** Ed25519 signature over binding message (base64url) */
194
+ signature: zod_1.z.string().min(1).max(512),
195
+ /** Key ID used for signing */
196
+ key_id: zod_1.z.string().min(1).max(256),
197
+ /** When the binding was created (RFC 3339) */
198
+ signed_at: zod_1.z.string().datetime(),
199
+ })
200
+ .strict();
201
+ // =============================================================================
202
+ // AGENT IDENTITY VERIFIED BLOCK (v0.9.25+)
203
+ // =============================================================================
204
+ /**
205
+ * Agent identity verification result to include in receipt evidence.
206
+ *
207
+ * This block is added by the publisher after verifying an agent identity
208
+ * attestation, binding the verified identity to the issued receipt.
209
+ */
210
+ exports.AgentIdentityVerifiedSchema = zod_1.z
211
+ .object({
212
+ /** Agent ID from the verified attestation */
213
+ agent_id: zod_1.z.string().min(1).max(256),
214
+ /** Control type from the verified attestation */
215
+ control_type: exports.ControlTypeSchema,
216
+ /** When the publisher verified the identity (RFC 3339) */
217
+ verified_at: zod_1.z.string().datetime(),
218
+ /** Key ID that was used for verification */
219
+ key_id: zod_1.z.string().min(1).max(256),
220
+ /** SHA-256 hash of the binding message (base64url) */
221
+ binding_hash: zod_1.z.string().min(1).max(64),
222
+ })
223
+ .strict();
224
+ // =============================================================================
225
+ // VALIDATION HELPERS (v0.9.25+)
226
+ // =============================================================================
227
+ /**
228
+ * Validate an AgentIdentityAttestation.
229
+ *
230
+ * @param data - Unknown data to validate
231
+ * @returns Result with validated attestation or error message
232
+ *
233
+ * @example
234
+ * ```typescript
235
+ * const result = validateAgentIdentityAttestation(data);
236
+ * if (result.ok) {
237
+ * console.log('Agent ID:', result.value.evidence.agent_id);
238
+ * } else {
239
+ * console.error('Validation error:', result.error);
240
+ * }
241
+ * ```
242
+ */
243
+ function validateAgentIdentityAttestation(data) {
244
+ const result = exports.AgentIdentityAttestationSchema.safeParse(data);
245
+ if (result.success) {
246
+ return { ok: true, value: result.data };
247
+ }
248
+ return { ok: false, error: result.error.message };
249
+ }
250
+ /**
251
+ * Check if an object is an AgentIdentityAttestation.
252
+ *
253
+ * @param attestation - Object with a type field
254
+ * @returns True if the type is 'peac/agent-identity'
255
+ */
256
+ function isAgentIdentityAttestation(attestation) {
257
+ return attestation.type === exports.AGENT_IDENTITY_TYPE;
258
+ }
259
+ /**
260
+ * Create an AgentIdentityAttestation with current timestamp.
261
+ *
262
+ * @param params - Attestation parameters
263
+ * @returns A valid AgentIdentityAttestation
264
+ *
265
+ * @example
266
+ * ```typescript
267
+ * const attestation = createAgentIdentityAttestation({
268
+ * issuer: 'https://crawler.example.com',
269
+ * agent_id: 'bot:crawler-prod-001',
270
+ * control_type: 'operator',
271
+ * operator: 'Example Crawler Inc.',
272
+ * capabilities: ['crawl', 'index'],
273
+ * });
274
+ * ```
275
+ */
276
+ function createAgentIdentityAttestation(params) {
277
+ const evidence = {
278
+ agent_id: params.agent_id,
279
+ control_type: params.control_type,
280
+ };
281
+ if (params.capabilities) {
282
+ evidence.capabilities = params.capabilities;
283
+ }
284
+ if (params.delegation_chain) {
285
+ evidence.delegation_chain = params.delegation_chain;
286
+ }
287
+ if (params.proof) {
288
+ evidence.proof = params.proof;
289
+ }
290
+ if (params.key_directory_url) {
291
+ evidence.key_directory_url = params.key_directory_url;
292
+ }
293
+ if (params.operator) {
294
+ evidence.operator = params.operator;
295
+ }
296
+ if (params.user_id) {
297
+ evidence.user_id = params.user_id;
298
+ }
299
+ if (params.metadata) {
300
+ // Validate metadata is JSON-safe at runtime
301
+ evidence.metadata = params.metadata;
302
+ }
303
+ const attestation = {
304
+ type: exports.AGENT_IDENTITY_TYPE,
305
+ issuer: params.issuer,
306
+ issued_at: new Date().toISOString(),
307
+ evidence,
308
+ };
309
+ if (params.expires_at) {
310
+ attestation.expires_at = params.expires_at;
311
+ }
312
+ if (params.ref) {
313
+ attestation.ref = params.ref;
314
+ }
315
+ return attestation;
316
+ }
317
+ /**
318
+ * Validate an IdentityBinding.
319
+ *
320
+ * @param data - Unknown data to validate
321
+ * @returns Result with validated binding or error message
322
+ */
323
+ function validateIdentityBinding(data) {
324
+ const result = exports.IdentityBindingSchema.safeParse(data);
325
+ if (result.success) {
326
+ return { ok: true, value: result.data };
327
+ }
328
+ return { ok: false, error: result.error.message };
329
+ }
330
+ /**
331
+ * Check if an agent identity attestation is expired.
332
+ *
333
+ * @param attestation - The attestation to check
334
+ * @param clockSkew - Optional clock skew tolerance in milliseconds (default: 30000)
335
+ * @returns True if the attestation has expired
336
+ */
337
+ function isAttestationExpired(attestation, clockSkew = 30000) {
338
+ if (!attestation.expires_at) {
339
+ return false; // No expiry = never expires
340
+ }
341
+ const expiresAt = new Date(attestation.expires_at).getTime();
342
+ const now = Date.now();
343
+ return expiresAt < now - clockSkew;
344
+ }
345
+ /**
346
+ * Check if an agent identity attestation is not yet valid.
347
+ *
348
+ * @param attestation - The attestation to check
349
+ * @param clockSkew - Optional clock skew tolerance in milliseconds (default: 30000)
350
+ * @returns True if the attestation is not yet valid (issued_at in the future)
351
+ */
352
+ function isAttestationNotYetValid(attestation, clockSkew = 30000) {
353
+ const issuedAt = new Date(attestation.issued_at).getTime();
354
+ const now = Date.now();
355
+ return issuedAt > now + clockSkew;
356
+ }
357
+ //# sourceMappingURL=agent-identity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-identity.js","sourceRoot":"","sources":["../src/agent-identity.ts"],"names":[],"mappings":";;;AAqSA,4EAQC;AAQD,gEAIC;AAiDD,wEA8CC;AAQD,0DAQC;AASD,oDAUC;AASD,4DAOC;AA3cD;;;;;;;GAOG;AACH,6BAAwB;AAExB,iCAAyC;AAEzC,gFAAgF;AAChF,0BAA0B;AAC1B,gFAAgF;AAEhF;;;;;GAKG;AACU,QAAA,iBAAiB,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAGxE;;GAEG;AACU,QAAA,aAAa,GAAG,CAAC,UAAU,EAAE,gBAAgB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