@peac/schema 0.12.0 → 0.12.2
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/dist/actor-binding.d.ts +10 -10
- package/dist/agent-identity.d.ts +8 -6
- package/dist/agent-identity.d.ts.map +1 -1
- package/dist/carrier.d.ts +7 -7
- package/dist/carrier.d.ts.map +1 -1
- package/dist/constraints.d.ts +4 -4
- package/dist/constraints.d.ts.map +1 -1
- package/dist/extensions/control-action.d.ts +1 -1
- package/dist/extensions/credential-event.d.ts +4 -4
- package/dist/extensions/fingerprint-ref.d.ts +1 -1
- package/dist/extensions/index.d.ts +1 -1
- package/dist/extensions/tool-registry.d.ts +1 -1
- package/dist/extensions/treaty.d.ts +2 -2
- package/dist/index.cjs +733 -44
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +684 -46
- package/dist/index.mjs.map +1 -1
- package/dist/issuer-config.d.ts +1 -1
- package/dist/policy-binding.d.ts +2 -2
- package/dist/receipt-parser.cjs +626 -14
- package/dist/receipt-parser.cjs.map +1 -1
- package/dist/receipt-parser.mjs +627 -15
- package/dist/receipt-parser.mjs.map +1 -1
- package/dist/subject.d.ts +33 -12
- package/dist/subject.d.ts.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/wire-02-envelope.d.ts +2 -2
- package/dist/wire-02-extensions/access.d.ts +19 -0
- package/dist/wire-02-extensions/access.d.ts.map +1 -0
- package/dist/wire-02-extensions/accessors.d.ts +44 -0
- package/dist/wire-02-extensions/accessors.d.ts.map +1 -0
- package/dist/wire-02-extensions/attribution.d.ts +44 -0
- package/dist/wire-02-extensions/attribution.d.ts.map +1 -0
- package/dist/wire-02-extensions/challenge.d.ts +60 -0
- package/dist/wire-02-extensions/challenge.d.ts.map +1 -0
- package/dist/wire-02-extensions/commerce.d.ts +29 -0
- package/dist/wire-02-extensions/commerce.d.ts.map +1 -0
- package/dist/wire-02-extensions/compliance.d.ts +49 -0
- package/dist/wire-02-extensions/compliance.d.ts.map +1 -0
- package/dist/wire-02-extensions/consent.d.ts +48 -0
- package/dist/wire-02-extensions/consent.d.ts.map +1 -0
- package/dist/wire-02-extensions/correlation.d.ts +18 -0
- package/dist/wire-02-extensions/correlation.d.ts.map +1 -0
- package/dist/wire-02-extensions/grammar.d.ts +40 -0
- package/dist/wire-02-extensions/grammar.d.ts.map +1 -0
- package/dist/wire-02-extensions/identity.d.ts +13 -0
- package/dist/wire-02-extensions/identity.d.ts.map +1 -0
- package/dist/wire-02-extensions/index.d.ts +40 -0
- package/dist/wire-02-extensions/index.d.ts.map +1 -0
- package/dist/wire-02-extensions/limits.d.ts +80 -0
- package/dist/wire-02-extensions/limits.d.ts.map +1 -0
- package/dist/wire-02-extensions/privacy.d.ts +64 -0
- package/dist/wire-02-extensions/privacy.d.ts.map +1 -0
- package/dist/wire-02-extensions/provenance.d.ts +58 -0
- package/dist/wire-02-extensions/provenance.d.ts.map +1 -0
- package/dist/wire-02-extensions/purpose-extension.d.ts +26 -0
- package/dist/wire-02-extensions/purpose-extension.d.ts.map +1 -0
- package/dist/wire-02-extensions/safety.d.ts +65 -0
- package/dist/wire-02-extensions/safety.d.ts.map +1 -0
- package/dist/wire-02-extensions/schema-map.d.ts +13 -0
- package/dist/wire-02-extensions/schema-map.d.ts.map +1 -0
- package/dist/wire-02-extensions/shared-validators.d.ts +192 -0
- package/dist/wire-02-extensions/shared-validators.d.ts.map +1 -0
- package/dist/wire-02-extensions/validation.d.ts +57 -0
- package/dist/wire-02-extensions/validation.d.ts.map +1 -0
- package/dist/wire-02-extensions.d.ts +7 -211
- package/dist/wire-02-extensions.d.ts.map +1 -1
- package/dist/wire-02-registries.d.ts +5 -2
- package/dist/wire-02-registries.d.ts.map +1 -1
- package/dist/wire-02-representation.d.ts +3 -3
- package/dist/wire-02-warnings.d.ts +5 -1
- package/dist/wire-02-warnings.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,216 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Wire 0.2 Typed Extension Group Schemas and Accessors
|
|
2
|
+
* Wire 0.2 Typed Extension Group Schemas and Accessors
|
|
3
3
|
*
|
|
4
|
-
* This file
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* - 5 extension group Zod schemas (.strict()):
|
|
8
|
-
* CommerceExtensionSchema, AccessExtensionSchema, ChallengeExtensionSchema,
|
|
9
|
-
* IdentityExtensionSchema, CorrelationExtensionSchema
|
|
10
|
-
* - 5 extension key constants (org.peacprotocol/*)
|
|
11
|
-
* - 5 typed accessor helpers (getCommerceExtension, etc.)
|
|
12
|
-
* - validateKnownExtensions(): superRefine helper for Wire02ClaimsSchema
|
|
4
|
+
* BACKWARD-COMPATIBILITY BARREL: This file re-exports everything from
|
|
5
|
+
* the per-group module directory `wire-02-extensions/`. All import paths
|
|
6
|
+
* that previously resolved to this file continue to work.
|
|
13
7
|
*
|
|
14
|
-
*
|
|
15
|
-
* malformed extension key grammar with hard Zod issues. Schema does NOT emit
|
|
16
|
-
* warnings; the unknown_extension_preserved warning belongs in
|
|
17
|
-
* @peac/protocol.verifyLocal() (Layer 3).
|
|
18
|
-
*
|
|
19
|
-
* All 5 group schemas use .strict() (reject unknown keys). The RFC 9457
|
|
20
|
-
* problem nested object uses .passthrough() per RFC 9457 Section 6.2.
|
|
21
|
-
*
|
|
22
|
-
* Layer 1 (@peac/schema): pure Zod validation, zero I/O (DD-141).
|
|
23
|
-
*/
|
|
24
|
-
import { z } from 'zod';
|
|
25
|
-
/**
|
|
26
|
-
* Normative bounds for Wire 0.2 extension group fields.
|
|
27
|
-
*
|
|
28
|
-
* Centralised to prevent magic numbers and allow external reference.
|
|
29
|
-
* Follows repo _LIMITS convention.
|
|
30
|
-
*/
|
|
31
|
-
export declare const EXTENSION_LIMITS: {
|
|
32
|
-
readonly maxExtensionKeyLength: 512;
|
|
33
|
-
readonly maxDnsLabelLength: 63;
|
|
34
|
-
readonly maxDnsDomainLength: 253;
|
|
35
|
-
readonly maxPaymentRailLength: 128;
|
|
36
|
-
readonly maxCurrencyLength: 16;
|
|
37
|
-
readonly maxAmountMinorLength: 64;
|
|
38
|
-
readonly maxReferenceLength: 256;
|
|
39
|
-
readonly maxAssetLength: 256;
|
|
40
|
-
readonly maxResourceLength: 2048;
|
|
41
|
-
readonly maxActionLength: 256;
|
|
42
|
-
readonly maxProblemTypeLength: 2048;
|
|
43
|
-
readonly maxProblemTitleLength: 256;
|
|
44
|
-
readonly maxProblemDetailLength: 4096;
|
|
45
|
-
readonly maxProblemInstanceLength: 2048;
|
|
46
|
-
readonly maxProofRefLength: 256;
|
|
47
|
-
readonly maxTraceIdLength: 32;
|
|
48
|
-
readonly maxSpanIdLength: 16;
|
|
49
|
-
readonly maxWorkflowIdLength: 256;
|
|
50
|
-
readonly maxParentJtiLength: 256;
|
|
51
|
-
readonly maxDependsOnLength: 64;
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* Validate that an extension key conforms to the Wire 0.2 extension key
|
|
55
|
-
* grammar: `<domain>/<segment>`.
|
|
56
|
-
*
|
|
57
|
-
* Domain rules:
|
|
58
|
-
* - At least one dot (distinguishes from single-label paths)
|
|
59
|
-
* - Each label matches [a-z0-9]([a-z0-9-]*[a-z0-9])? (lowercase only)
|
|
60
|
-
* - No uppercase letters anywhere in the domain
|
|
61
|
-
*
|
|
62
|
-
* Segment rules:
|
|
63
|
-
* - Matches [a-z0-9][a-z0-9_-]* (lowercase only)
|
|
64
|
-
* - Underscores are permitted (for extension names like credential_event)
|
|
65
|
-
*
|
|
66
|
-
* @param key - Extension key to validate
|
|
67
|
-
* @returns true if valid extension key grammar; false otherwise
|
|
68
|
-
*/
|
|
69
|
-
export declare function isValidExtensionKey(key: string): boolean;
|
|
70
|
-
export declare const COMMERCE_EXTENSION_KEY: "org.peacprotocol/commerce";
|
|
71
|
-
export declare const ACCESS_EXTENSION_KEY: "org.peacprotocol/access";
|
|
72
|
-
export declare const CHALLENGE_EXTENSION_KEY: "org.peacprotocol/challenge";
|
|
73
|
-
export declare const IDENTITY_EXTENSION_KEY: "org.peacprotocol/identity";
|
|
74
|
-
export declare const CORRELATION_EXTENSION_KEY: "org.peacprotocol/correlation";
|
|
75
|
-
export declare const CommerceExtensionSchema: z.ZodObject<{
|
|
76
|
-
payment_rail: z.ZodString;
|
|
77
|
-
amount_minor: z.ZodString;
|
|
78
|
-
currency: z.ZodString;
|
|
79
|
-
reference: z.ZodOptional<z.ZodString>;
|
|
80
|
-
asset: z.ZodOptional<z.ZodString>;
|
|
81
|
-
env: z.ZodOptional<z.ZodEnum<{
|
|
82
|
-
live: "live";
|
|
83
|
-
test: "test";
|
|
84
|
-
}>>;
|
|
85
|
-
}, z.core.$strict>;
|
|
86
|
-
export type CommerceExtension = z.infer<typeof CommerceExtensionSchema>;
|
|
87
|
-
export declare const AccessExtensionSchema: z.ZodObject<{
|
|
88
|
-
resource: z.ZodString;
|
|
89
|
-
action: z.ZodString;
|
|
90
|
-
decision: z.ZodEnum<{
|
|
91
|
-
allow: "allow";
|
|
92
|
-
deny: "deny";
|
|
93
|
-
review: "review";
|
|
94
|
-
}>;
|
|
95
|
-
}, z.core.$strict>;
|
|
96
|
-
export type AccessExtension = z.infer<typeof AccessExtensionSchema>;
|
|
97
|
-
/**
|
|
98
|
-
* Challenge type values (7 total, P0-6).
|
|
99
|
-
* Includes purpose_disallowed (reviewer fix: 7 not 6).
|
|
100
|
-
*/
|
|
101
|
-
export declare const CHALLENGE_TYPES: readonly ["payment_required", "identity_required", "consent_required", "attestation_required", "rate_limited", "purpose_disallowed", "custom"];
|
|
102
|
-
export declare const ChallengeTypeSchema: z.ZodEnum<{
|
|
103
|
-
custom: "custom";
|
|
104
|
-
payment_required: "payment_required";
|
|
105
|
-
identity_required: "identity_required";
|
|
106
|
-
consent_required: "consent_required";
|
|
107
|
-
attestation_required: "attestation_required";
|
|
108
|
-
rate_limited: "rate_limited";
|
|
109
|
-
purpose_disallowed: "purpose_disallowed";
|
|
110
|
-
}>;
|
|
111
|
-
export type ChallengeType = z.infer<typeof ChallengeTypeSchema>;
|
|
112
|
-
/**
|
|
113
|
-
* RFC 9457 Problem Details schema (P0-5).
|
|
114
|
-
*
|
|
115
|
-
* Uses .passthrough() for extension members per RFC 9457 Section 6.2.
|
|
116
|
-
* Required fields: status (HTTP status code), type (problem type URI).
|
|
117
|
-
* Optional fields: title, detail, instance.
|
|
118
|
-
*/
|
|
119
|
-
export declare const ProblemDetailsSchema: z.ZodObject<{
|
|
120
|
-
status: z.ZodNumber;
|
|
121
|
-
type: z.ZodString;
|
|
122
|
-
title: z.ZodOptional<z.ZodString>;
|
|
123
|
-
detail: z.ZodOptional<z.ZodString>;
|
|
124
|
-
instance: z.ZodOptional<z.ZodString>;
|
|
125
|
-
}, z.core.$loose>;
|
|
126
|
-
export declare const ChallengeExtensionSchema: z.ZodObject<{
|
|
127
|
-
challenge_type: z.ZodEnum<{
|
|
128
|
-
custom: "custom";
|
|
129
|
-
payment_required: "payment_required";
|
|
130
|
-
identity_required: "identity_required";
|
|
131
|
-
consent_required: "consent_required";
|
|
132
|
-
attestation_required: "attestation_required";
|
|
133
|
-
rate_limited: "rate_limited";
|
|
134
|
-
purpose_disallowed: "purpose_disallowed";
|
|
135
|
-
}>;
|
|
136
|
-
problem: z.ZodObject<{
|
|
137
|
-
status: z.ZodNumber;
|
|
138
|
-
type: z.ZodString;
|
|
139
|
-
title: z.ZodOptional<z.ZodString>;
|
|
140
|
-
detail: z.ZodOptional<z.ZodString>;
|
|
141
|
-
instance: z.ZodOptional<z.ZodString>;
|
|
142
|
-
}, z.core.$loose>;
|
|
143
|
-
resource: z.ZodOptional<z.ZodString>;
|
|
144
|
-
action: z.ZodOptional<z.ZodString>;
|
|
145
|
-
requirements: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
146
|
-
}, z.core.$strict>;
|
|
147
|
-
export type ChallengeExtension = z.infer<typeof ChallengeExtensionSchema>;
|
|
148
|
-
export declare const IdentityExtensionSchema: z.ZodObject<{
|
|
149
|
-
proof_ref: z.ZodOptional<z.ZodString>;
|
|
150
|
-
}, z.core.$strict>;
|
|
151
|
-
export type IdentityExtension = z.infer<typeof IdentityExtensionSchema>;
|
|
152
|
-
export declare const CorrelationExtensionSchema: z.ZodObject<{
|
|
153
|
-
trace_id: z.ZodOptional<z.ZodString>;
|
|
154
|
-
span_id: z.ZodOptional<z.ZodString>;
|
|
155
|
-
workflow_id: z.ZodOptional<z.ZodString>;
|
|
156
|
-
parent_jti: z.ZodOptional<z.ZodString>;
|
|
157
|
-
depends_on: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
158
|
-
}, z.core.$strict>;
|
|
159
|
-
export type CorrelationExtension = z.infer<typeof CorrelationExtensionSchema>;
|
|
160
|
-
/**
|
|
161
|
-
* Get the commerce extension group from a Wire 0.2 receipt's extensions.
|
|
162
|
-
*
|
|
163
|
-
* @param extensions - Wire 0.2 extensions record (or undefined)
|
|
164
|
-
* @returns Parsed CommerceExtension, or undefined if key absent
|
|
165
|
-
* @throws PEACError with RFC 6901 pointer if present but invalid
|
|
166
|
-
*/
|
|
167
|
-
export declare function getCommerceExtension(extensions?: Record<string, unknown>): CommerceExtension | undefined;
|
|
168
|
-
/**
|
|
169
|
-
* Get the access extension group from a Wire 0.2 receipt's extensions.
|
|
170
|
-
*
|
|
171
|
-
* @param extensions - Wire 0.2 extensions record (or undefined)
|
|
172
|
-
* @returns Parsed AccessExtension, or undefined if key absent
|
|
173
|
-
* @throws PEACError with RFC 6901 pointer if present but invalid
|
|
174
|
-
*/
|
|
175
|
-
export declare function getAccessExtension(extensions?: Record<string, unknown>): AccessExtension | undefined;
|
|
176
|
-
/**
|
|
177
|
-
* Get the challenge extension group from a Wire 0.2 receipt's extensions.
|
|
178
|
-
*
|
|
179
|
-
* @param extensions - Wire 0.2 extensions record (or undefined)
|
|
180
|
-
* @returns Parsed ChallengeExtension, or undefined if key absent
|
|
181
|
-
* @throws PEACError with RFC 6901 pointer if present but invalid
|
|
182
|
-
*/
|
|
183
|
-
export declare function getChallengeExtension(extensions?: Record<string, unknown>): ChallengeExtension | undefined;
|
|
184
|
-
/**
|
|
185
|
-
* Get the identity extension group from a Wire 0.2 receipt's extensions.
|
|
186
|
-
*
|
|
187
|
-
* @param extensions - Wire 0.2 extensions record (or undefined)
|
|
188
|
-
* @returns Parsed IdentityExtension, or undefined if key absent
|
|
189
|
-
* @throws PEACError with RFC 6901 pointer if present but invalid
|
|
190
|
-
*/
|
|
191
|
-
export declare function getIdentityExtension(extensions?: Record<string, unknown>): IdentityExtension | undefined;
|
|
192
|
-
/**
|
|
193
|
-
* Get the correlation extension group from a Wire 0.2 receipt's extensions.
|
|
194
|
-
*
|
|
195
|
-
* @param extensions - Wire 0.2 extensions record (or undefined)
|
|
196
|
-
* @returns Parsed CorrelationExtension, or undefined if key absent
|
|
197
|
-
* @throws PEACError with RFC 6901 pointer if present but invalid
|
|
198
|
-
*/
|
|
199
|
-
export declare function getCorrelationExtension(extensions?: Record<string, unknown>): CorrelationExtension | undefined;
|
|
200
|
-
/**
|
|
201
|
-
* Validate extensions record in Wire02ClaimsSchema.superRefine().
|
|
202
|
-
*
|
|
203
|
-
* For each key in the extensions record:
|
|
204
|
-
* 1. Check key grammar via isValidExtensionKey(): if malformed,
|
|
205
|
-
* add hard Zod issue (ERROR_CODES.E_INVALID_EXTENSION_KEY)
|
|
206
|
-
* 2. If key matches a known group, validate value against its schema;
|
|
207
|
-
* if invalid, add Zod issue with message from first schema error
|
|
208
|
-
*
|
|
209
|
-
* Schema does NOT emit unknown_extension_preserved warning for
|
|
210
|
-
* unrecognized keys (that belongs in @peac/protocol.verifyLocal()).
|
|
211
|
-
*
|
|
212
|
-
* @param extensions - The extensions record from Wire 0.2 claims
|
|
213
|
-
* @param ctx - Zod refinement context
|
|
8
|
+
* @see wire-02-extensions/index.ts for the canonical module barrel
|
|
214
9
|
*/
|
|
215
|
-
export
|
|
10
|
+
export { EXTENSION_LIMITS, EXTENSION_BUDGET, isValidExtensionKey, COMMERCE_EXTENSION_KEY, CommerceExtensionSchema, getCommerceExtension, ACCESS_EXTENSION_KEY, AccessExtensionSchema, getAccessExtension, CHALLENGE_EXTENSION_KEY, CHALLENGE_TYPES, ChallengeTypeSchema, ProblemDetailsSchema, ChallengeExtensionSchema, getChallengeExtension, IDENTITY_EXTENSION_KEY, IdentityExtensionSchema, getIdentityExtension, CORRELATION_EXTENSION_KEY, CorrelationExtensionSchema, getCorrelationExtension, CONSENT_EXTENSION_KEY, CONSENT_STATUSES, ConsentStatusSchema, ConsentExtensionSchema, getConsentExtension, PRIVACY_EXTENSION_KEY, RETENTION_MODES, RetentionModeSchema, RECIPIENT_SCOPES, RecipientScopeSchema, PrivacyExtensionSchema, getPrivacyExtension, SAFETY_EXTENSION_KEY, REVIEW_STATUSES, ReviewStatusSchema, RISK_LEVELS, RiskLevelSchema, SafetyExtensionSchema, getSafetyExtension, COMPLIANCE_EXTENSION_KEY, COMPLIANCE_STATUSES, ComplianceStatusSchema, ComplianceExtensionSchema, getComplianceExtension, PROVENANCE_EXTENSION_KEY, CustodyEntrySchema, SlsaLevelSchema, ProvenanceExtensionSchema, getProvenanceExtension, ATTRIBUTION_EXTENSION_KEY, CONTENT_SIGNAL_SOURCES, ContentSignalSourceSchema, AttributionExtensionSchema, getAttributionExtension, PURPOSE_EXTENSION_KEY, PurposeExtensionSchema, getPurposeExtension, validateKnownExtensions, Sha256DigestSchema, HttpsUriHintSchema, Iso8601DurationSchema, Iso8601DateStringSchema, Iso8601DateSchema, Iso8601OffsetDateTimeSchema, Rfc3339DateTimeSchema, Rfc3339TimestampSchema, SpdxExpressionSchema, } from './wire-02-extensions/index.js';
|
|
11
|
+
export type { CommerceExtension, AccessExtension, ChallengeType, ChallengeExtension, IdentityExtension, CorrelationExtension, ConsentStatus, ConsentExtension, RetentionMode, RecipientScope, PrivacyExtension, ReviewStatus, RiskLevel, SafetyExtension, ComplianceStatus, ComplianceExtension, CustodyEntry, SlsaLevel, ProvenanceExtension, ContentSignalSource, AttributionExtension, PurposeExtension, } from './wire-02-extensions/index.js';
|
|
216
12
|
//# sourceMappingURL=wire-02-extensions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wire-02-extensions.d.ts","sourceRoot":"","sources":["../src/wire-02-extensions.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"wire-02-extensions.d.ts","sourceRoot":"","sources":["../src/wire-02-extensions.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAEL,gBAAgB,EAChB,gBAAgB,EAEhB,mBAAmB,EAEnB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EAEpB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAElB,uBAAuB,EACvB,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EAErB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EAEpB,yBAAyB,EACzB,0BAA0B,EAC1B,uBAAuB,EAEvB,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EAEnB,qBAAqB,EACrB,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EAEnB,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAElB,wBAAwB,EACxB,mBAAmB,EACnB,sBAAsB,EACtB,yBAAyB,EACzB,sBAAsB,EAEtB,wBAAwB,EACxB,kBAAkB,EAClB,eAAe,EACf,yBAAyB,EACzB,sBAAsB,EAEtB,yBAAyB,EACzB,sBAAsB,EACtB,yBAAyB,EACzB,0BAA0B,EAC1B,uBAAuB,EAEvB,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EAEnB,uBAAuB,EAEvB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,2BAA2B,EAC3B,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,+BAA+B,CAAC;AAEvC,YAAY,EACV,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,+BAA+B,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Wire 0.2 recommended receipt type and extension group registries.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Single source of truth: specs/kernel/registries.json
|
|
5
|
+
* Generated constants: @peac/kernel registries.generated.ts
|
|
6
6
|
*
|
|
7
7
|
* Used by @peac/protocol.verifyLocal() to emit type_unregistered and
|
|
8
8
|
* unknown_extension_preserved warnings for valid-but-unrecognized values.
|
|
@@ -16,6 +16,9 @@ export declare const REGISTERED_RECEIPT_TYPES: ReadonlySet<string>;
|
|
|
16
16
|
* Core extension group keys that have typed schemas in @peac/schema.
|
|
17
17
|
* An extension key NOT in this set (but passing grammar validation)
|
|
18
18
|
* triggers an unknown_extension_preserved warning (not an error).
|
|
19
|
+
*
|
|
20
|
+
* Derived from EXTENSION_GROUPS in @peac/kernel (generated from
|
|
21
|
+
* specs/kernel/registries.json). No manual maintenance required.
|
|
19
22
|
*/
|
|
20
23
|
export declare const REGISTERED_EXTENSION_GROUP_KEYS: ReadonlySet<string>;
|
|
21
24
|
//# sourceMappingURL=wire-02-registries.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wire-02-registries.d.ts","sourceRoot":"","sources":["../src/wire-02-registries.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"wire-02-registries.d.ts","sourceRoot":"","sources":["../src/wire-02-registries.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAQH;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,WAAW,CAAC,MAAM,CAExD,CAAC;AAMF;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B,EAAE,WAAW,CAAC,MAAM,CAE/D,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Wire 0.2 RepresentationFields schema
|
|
2
|
+
* Wire 0.2 RepresentationFields schema
|
|
3
3
|
*
|
|
4
4
|
* Records metadata about the content representation that was observed or served,
|
|
5
5
|
* enabling reproducible content drift detection.
|
|
6
6
|
*
|
|
7
|
-
* Layer 1 (@peac/schema): pure Zod validation, zero I/O
|
|
7
|
+
* Layer 1 (@peac/schema): pure Zod validation, zero I/O.
|
|
8
8
|
*
|
|
9
9
|
* content_hash validation uses stringToFingerprintRef() as the parser gate
|
|
10
10
|
* and additionally requires alg === 'sha256'. The hmac-sha256 algorithm is
|
|
@@ -23,7 +23,7 @@ export declare const REPRESENTATION_LIMITS: {
|
|
|
23
23
|
readonly maxContentTypeLength: 256;
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
|
-
* Zod schema for Wire 0.2 representation fields
|
|
26
|
+
* Zod schema for Wire 0.2 representation fields.
|
|
27
27
|
*
|
|
28
28
|
* All fields are optional; an empty object is valid.
|
|
29
29
|
* Unknown keys are rejected (.strict()).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Wire 0.2 verification warning codes and collector (v0.12.0-preview.1
|
|
2
|
+
* Wire 0.2 verification warning codes and collector (v0.12.0-preview.1)
|
|
3
3
|
*
|
|
4
4
|
* Warning codes are append-only stable string literals. Warnings do NOT affect
|
|
5
5
|
* the allow/deny decision unless caller policy requires it.
|
|
@@ -18,6 +18,10 @@ export declare const WARNING_UNKNOWN_EXTENSION: "unknown_extension_preserved";
|
|
|
18
18
|
export declare const WARNING_OCCURRED_AT_SKEW: "occurred_at_skew";
|
|
19
19
|
/** JWS typ header was absent; interop mode accepted the token without typ */
|
|
20
20
|
export declare const WARNING_TYP_MISSING: "typ_missing";
|
|
21
|
+
/** Registered type has a mapped extension group, but that group is absent from extensions */
|
|
22
|
+
export declare const WARNING_EXTENSION_GROUP_MISSING: "extension_group_missing";
|
|
23
|
+
/** Registered type has a mapped extension group, but a different registered group is present instead */
|
|
24
|
+
export declare const WARNING_EXTENSION_GROUP_MISMATCH: "extension_group_mismatch";
|
|
21
25
|
/**
|
|
22
26
|
* Sort warnings by (pointer ascending, code ascending).
|
|
23
27
|
* Warnings with undefined pointer sort before those with a defined pointer.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wire-02-warnings.d.ts","sourceRoot":"","sources":["../src/wire-02-warnings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAMxD,kFAAkF;AAClF,eAAO,MAAM,yBAAyB,EAAG,mBAA4B,CAAC;AAEtE,iFAAiF;AACjF,eAAO,MAAM,yBAAyB,EAAG,6BAAsC,CAAC;AAEhF,iFAAiF;AACjF,eAAO,MAAM,wBAAwB,EAAG,kBAA2B,CAAC;AAEpE,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB,EAAG,aAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"wire-02-warnings.d.ts","sourceRoot":"","sources":["../src/wire-02-warnings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAMxD,kFAAkF;AAClF,eAAO,MAAM,yBAAyB,EAAG,mBAA4B,CAAC;AAEtE,iFAAiF;AACjF,eAAO,MAAM,yBAAyB,EAAG,6BAAsC,CAAC;AAEhF,iFAAiF;AACjF,eAAO,MAAM,wBAAwB,EAAG,kBAA2B,CAAC;AAEpE,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB,EAAG,aAAsB,CAAC;AAE1D,6FAA6F;AAC7F,eAAO,MAAM,+BAA+B,EAAG,yBAAkC,CAAC;AAElF,wGAAwG;AACxG,eAAO,MAAM,gCAAgC,EAAG,0BAAmC,CAAC;AAMpF;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,mBAAmB,EAAE,GAAG,mBAAmB,EAAE,CAkBnF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peac/schema",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"description": "PEAC Protocol JSON schemas, OpenAPI specs, and TypeScript types",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"zod": "^4.3.6",
|
|
66
|
-
"@peac/kernel": "0.12.
|
|
66
|
+
"@peac/kernel": "0.12.2"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@types/node": "^22.19.11",
|