@peac/policy-kit 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.
package/dist/types.d.ts CHANGED
@@ -40,21 +40,18 @@ export type ControlDecision = z.infer<typeof ControlDecisionSchema>;
40
40
  * When multiple fields are present, all must match (AND logic).
41
41
  */
42
42
  export declare const SubjectMatcherSchema: z.ZodObject<{
43
- /** Match by subject type(s) - single type or array */
44
- type: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["human", "org", "agent"]>, z.ZodArray<z.ZodEnum<["human", "org", "agent"]>, "many">]>>;
45
- /** Match by label(s) - subject must have ALL specified labels */
46
- labels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
47
- /** Match by subject ID pattern (exact match or prefix with *) */
43
+ type: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
44
+ human: "human";
45
+ org: "org";
46
+ agent: "agent";
47
+ }>, z.ZodArray<z.ZodEnum<{
48
+ human: "human";
49
+ org: "org";
50
+ agent: "agent";
51
+ }>>]>>;
52
+ labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
48
53
  id: z.ZodOptional<z.ZodString>;
49
- }, "strict", z.ZodTypeAny, {
50
- type?: "human" | "org" | "agent" | ("human" | "org" | "agent")[] | undefined;
51
- labels?: string[] | undefined;
52
- id?: string | undefined;
53
- }, {
54
- type?: "human" | "org" | "agent" | ("human" | "org" | "agent")[] | undefined;
55
- labels?: string[] | undefined;
56
- id?: string | undefined;
57
- }>;
54
+ }, z.core.$strict>;
58
55
  export type SubjectMatcher = z.infer<typeof SubjectMatcherSchema>;
59
56
  /**
60
57
  * Policy rule - a single rule in the policy
@@ -62,185 +59,133 @@ export type SubjectMatcher = z.infer<typeof SubjectMatcherSchema>;
62
59
  * Evaluated in order; first match wins.
63
60
  */
64
61
  export declare const PolicyRuleSchema: z.ZodObject<{
65
- /** Rule name (for debugging/auditing) */
66
62
  name: z.ZodString;
67
- /** Subject matcher (omit for any subject) */
68
63
  subject: z.ZodOptional<z.ZodObject<{
69
- /** Match by subject type(s) - single type or array */
70
- type: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["human", "org", "agent"]>, z.ZodArray<z.ZodEnum<["human", "org", "agent"]>, "many">]>>;
71
- /** Match by label(s) - subject must have ALL specified labels */
72
- labels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
73
- /** Match by subject ID pattern (exact match or prefix with *) */
64
+ type: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
65
+ human: "human";
66
+ org: "org";
67
+ agent: "agent";
68
+ }>, z.ZodArray<z.ZodEnum<{
69
+ human: "human";
70
+ org: "org";
71
+ agent: "agent";
72
+ }>>]>>;
73
+ labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
74
74
  id: z.ZodOptional<z.ZodString>;
75
- }, "strict", z.ZodTypeAny, {
76
- type?: "human" | "org" | "agent" | ("human" | "org" | "agent")[] | undefined;
77
- labels?: string[] | undefined;
78
- id?: string | undefined;
79
- }, {
80
- type?: "human" | "org" | "agent" | ("human" | "org" | "agent")[] | undefined;
81
- labels?: string[] | undefined;
82
- id?: string | undefined;
83
- }>>;
84
- /** Purpose(s) this rule applies to - single purpose or array */
85
- purpose: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["crawl", "index", "train", "inference", "user_action", "ai_input", "ai_index", "search"]>, z.ZodArray<z.ZodEnum<["crawl", "index", "train", "inference", "user_action", "ai_input", "ai_index", "search"]>, "many">]>>;
86
- /** Licensing mode(s) this rule applies to */
87
- licensing_mode: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["subscription", "pay_per_crawl", "pay_per_inference"]>, z.ZodArray<z.ZodEnum<["subscription", "pay_per_crawl", "pay_per_inference"]>, "many">]>>;
88
- /** Decision if rule matches */
89
- decision: z.ZodEnum<["allow", "deny", "review"]>;
90
- /** Reason for decision (for audit trail) */
75
+ }, z.core.$strict>>;
76
+ purpose: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
77
+ search: "search";
78
+ inference: "inference";
79
+ crawl: "crawl";
80
+ index: "index";
81
+ train: "train";
82
+ user_action: "user_action";
83
+ ai_input: "ai_input";
84
+ ai_index: "ai_index";
85
+ }>, z.ZodArray<z.ZodEnum<{
86
+ search: "search";
87
+ inference: "inference";
88
+ crawl: "crawl";
89
+ index: "index";
90
+ train: "train";
91
+ user_action: "user_action";
92
+ ai_input: "ai_input";
93
+ ai_index: "ai_index";
94
+ }>>]>>;
95
+ licensing_mode: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
96
+ subscription: "subscription";
97
+ pay_per_crawl: "pay_per_crawl";
98
+ pay_per_inference: "pay_per_inference";
99
+ }>, z.ZodArray<z.ZodEnum<{
100
+ subscription: "subscription";
101
+ pay_per_crawl: "pay_per_crawl";
102
+ pay_per_inference: "pay_per_inference";
103
+ }>>]>>;
104
+ decision: z.ZodEnum<{
105
+ allow: "allow";
106
+ deny: "deny";
107
+ review: "review";
108
+ }>;
91
109
  reason: z.ZodOptional<z.ZodString>;
92
- }, "strict", z.ZodTypeAny, {
93
- name: string;
94
- decision: "allow" | "deny" | "review";
95
- subject?: {
96
- type?: "human" | "org" | "agent" | ("human" | "org" | "agent")[] | undefined;
97
- labels?: string[] | undefined;
98
- id?: string | undefined;
99
- } | undefined;
100
- purpose?: "crawl" | "index" | "train" | "inference" | "user_action" | "ai_input" | "ai_index" | "search" | ("crawl" | "index" | "train" | "inference" | "user_action" | "ai_input" | "ai_index" | "search")[] | undefined;
101
- licensing_mode?: "subscription" | "pay_per_crawl" | "pay_per_inference" | ("subscription" | "pay_per_crawl" | "pay_per_inference")[] | undefined;
102
- reason?: string | undefined;
103
- }, {
104
- name: string;
105
- decision: "allow" | "deny" | "review";
106
- subject?: {
107
- type?: "human" | "org" | "agent" | ("human" | "org" | "agent")[] | undefined;
108
- labels?: string[] | undefined;
109
- id?: string | undefined;
110
- } | undefined;
111
- purpose?: "crawl" | "index" | "train" | "inference" | "user_action" | "ai_input" | "ai_index" | "search" | ("crawl" | "index" | "train" | "inference" | "user_action" | "ai_input" | "ai_index" | "search")[] | undefined;
112
- licensing_mode?: "subscription" | "pay_per_crawl" | "pay_per_inference" | ("subscription" | "pay_per_crawl" | "pay_per_inference")[] | undefined;
113
- reason?: string | undefined;
114
- }>;
110
+ }, z.core.$strict>;
115
111
  export type PolicyRule = z.infer<typeof PolicyRuleSchema>;
116
112
  /**
117
113
  * Policy defaults - fallback values when no rule matches
118
114
  */
119
115
  export declare const PolicyDefaultsSchema: z.ZodObject<{
120
- /** Default decision when no rule matches */
121
- decision: z.ZodEnum<["allow", "deny", "review"]>;
122
- /** Default reason for audit trail */
116
+ decision: z.ZodEnum<{
117
+ allow: "allow";
118
+ deny: "deny";
119
+ review: "review";
120
+ }>;
123
121
  reason: z.ZodOptional<z.ZodString>;
124
- }, "strict", z.ZodTypeAny, {
125
- decision: "allow" | "deny" | "review";
126
- reason?: string | undefined;
127
- }, {
128
- decision: "allow" | "deny" | "review";
129
- reason?: string | undefined;
130
- }>;
122
+ }, z.core.$strict>;
131
123
  export type PolicyDefaults = z.infer<typeof PolicyDefaultsSchema>;
132
124
  /**
133
125
  * Complete policy document
134
126
  */
135
127
  export declare const PolicyDocumentSchema: z.ZodObject<{
136
- /** Policy format version */
137
128
  version: z.ZodLiteral<"peac-policy/0.1">;
138
- /** Policy name/description (optional) */
139
129
  name: z.ZodOptional<z.ZodString>;
140
- /** Default decision (required) */
141
130
  defaults: z.ZodObject<{
142
- /** Default decision when no rule matches */
143
- decision: z.ZodEnum<["allow", "deny", "review"]>;
144
- /** Default reason for audit trail */
131
+ decision: z.ZodEnum<{
132
+ allow: "allow";
133
+ deny: "deny";
134
+ review: "review";
135
+ }>;
145
136
  reason: z.ZodOptional<z.ZodString>;
146
- }, "strict", z.ZodTypeAny, {
147
- decision: "allow" | "deny" | "review";
148
- reason?: string | undefined;
149
- }, {
150
- decision: "allow" | "deny" | "review";
151
- reason?: string | undefined;
152
- }>;
153
- /** Rules evaluated in order (first match wins) */
137
+ }, z.core.$strict>;
154
138
  rules: z.ZodArray<z.ZodObject<{
155
- /** Rule name (for debugging/auditing) */
156
139
  name: z.ZodString;
157
- /** Subject matcher (omit for any subject) */
158
140
  subject: z.ZodOptional<z.ZodObject<{
159
- /** Match by subject type(s) - single type or array */
160
- type: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["human", "org", "agent"]>, z.ZodArray<z.ZodEnum<["human", "org", "agent"]>, "many">]>>;
161
- /** Match by label(s) - subject must have ALL specified labels */
162
- labels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
163
- /** Match by subject ID pattern (exact match or prefix with *) */
141
+ type: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
142
+ human: "human";
143
+ org: "org";
144
+ agent: "agent";
145
+ }>, z.ZodArray<z.ZodEnum<{
146
+ human: "human";
147
+ org: "org";
148
+ agent: "agent";
149
+ }>>]>>;
150
+ labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
164
151
  id: z.ZodOptional<z.ZodString>;
165
- }, "strict", z.ZodTypeAny, {
166
- type?: "human" | "org" | "agent" | ("human" | "org" | "agent")[] | undefined;
167
- labels?: string[] | undefined;
168
- id?: string | undefined;
169
- }, {
170
- type?: "human" | "org" | "agent" | ("human" | "org" | "agent")[] | undefined;
171
- labels?: string[] | undefined;
172
- id?: string | undefined;
173
- }>>;
174
- /** Purpose(s) this rule applies to - single purpose or array */
175
- purpose: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["crawl", "index", "train", "inference", "user_action", "ai_input", "ai_index", "search"]>, z.ZodArray<z.ZodEnum<["crawl", "index", "train", "inference", "user_action", "ai_input", "ai_index", "search"]>, "many">]>>;
176
- /** Licensing mode(s) this rule applies to */
177
- licensing_mode: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["subscription", "pay_per_crawl", "pay_per_inference"]>, z.ZodArray<z.ZodEnum<["subscription", "pay_per_crawl", "pay_per_inference"]>, "many">]>>;
178
- /** Decision if rule matches */
179
- decision: z.ZodEnum<["allow", "deny", "review"]>;
180
- /** Reason for decision (for audit trail) */
152
+ }, z.core.$strict>>;
153
+ purpose: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
154
+ search: "search";
155
+ inference: "inference";
156
+ crawl: "crawl";
157
+ index: "index";
158
+ train: "train";
159
+ user_action: "user_action";
160
+ ai_input: "ai_input";
161
+ ai_index: "ai_index";
162
+ }>, z.ZodArray<z.ZodEnum<{
163
+ search: "search";
164
+ inference: "inference";
165
+ crawl: "crawl";
166
+ index: "index";
167
+ train: "train";
168
+ user_action: "user_action";
169
+ ai_input: "ai_input";
170
+ ai_index: "ai_index";
171
+ }>>]>>;
172
+ licensing_mode: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
173
+ subscription: "subscription";
174
+ pay_per_crawl: "pay_per_crawl";
175
+ pay_per_inference: "pay_per_inference";
176
+ }>, z.ZodArray<z.ZodEnum<{
177
+ subscription: "subscription";
178
+ pay_per_crawl: "pay_per_crawl";
179
+ pay_per_inference: "pay_per_inference";
180
+ }>>]>>;
181
+ decision: z.ZodEnum<{
182
+ allow: "allow";
183
+ deny: "deny";
184
+ review: "review";
185
+ }>;
181
186
  reason: z.ZodOptional<z.ZodString>;
182
- }, "strict", z.ZodTypeAny, {
183
- name: string;
184
- decision: "allow" | "deny" | "review";
185
- subject?: {
186
- type?: "human" | "org" | "agent" | ("human" | "org" | "agent")[] | undefined;
187
- labels?: string[] | undefined;
188
- id?: string | undefined;
189
- } | undefined;
190
- purpose?: "crawl" | "index" | "train" | "inference" | "user_action" | "ai_input" | "ai_index" | "search" | ("crawl" | "index" | "train" | "inference" | "user_action" | "ai_input" | "ai_index" | "search")[] | undefined;
191
- licensing_mode?: "subscription" | "pay_per_crawl" | "pay_per_inference" | ("subscription" | "pay_per_crawl" | "pay_per_inference")[] | undefined;
192
- reason?: string | undefined;
193
- }, {
194
- name: string;
195
- decision: "allow" | "deny" | "review";
196
- subject?: {
197
- type?: "human" | "org" | "agent" | ("human" | "org" | "agent")[] | undefined;
198
- labels?: string[] | undefined;
199
- id?: string | undefined;
200
- } | undefined;
201
- purpose?: "crawl" | "index" | "train" | "inference" | "user_action" | "ai_input" | "ai_index" | "search" | ("crawl" | "index" | "train" | "inference" | "user_action" | "ai_input" | "ai_index" | "search")[] | undefined;
202
- licensing_mode?: "subscription" | "pay_per_crawl" | "pay_per_inference" | ("subscription" | "pay_per_crawl" | "pay_per_inference")[] | undefined;
203
- reason?: string | undefined;
204
- }>, "many">;
205
- }, "strict", z.ZodTypeAny, {
206
- version: "peac-policy/0.1";
207
- defaults: {
208
- decision: "allow" | "deny" | "review";
209
- reason?: string | undefined;
210
- };
211
- rules: {
212
- name: string;
213
- decision: "allow" | "deny" | "review";
214
- subject?: {
215
- type?: "human" | "org" | "agent" | ("human" | "org" | "agent")[] | undefined;
216
- labels?: string[] | undefined;
217
- id?: string | undefined;
218
- } | undefined;
219
- purpose?: "crawl" | "index" | "train" | "inference" | "user_action" | "ai_input" | "ai_index" | "search" | ("crawl" | "index" | "train" | "inference" | "user_action" | "ai_input" | "ai_index" | "search")[] | undefined;
220
- licensing_mode?: "subscription" | "pay_per_crawl" | "pay_per_inference" | ("subscription" | "pay_per_crawl" | "pay_per_inference")[] | undefined;
221
- reason?: string | undefined;
222
- }[];
223
- name?: string | undefined;
224
- }, {
225
- version: "peac-policy/0.1";
226
- defaults: {
227
- decision: "allow" | "deny" | "review";
228
- reason?: string | undefined;
229
- };
230
- rules: {
231
- name: string;
232
- decision: "allow" | "deny" | "review";
233
- subject?: {
234
- type?: "human" | "org" | "agent" | ("human" | "org" | "agent")[] | undefined;
235
- labels?: string[] | undefined;
236
- id?: string | undefined;
237
- } | undefined;
238
- purpose?: "crawl" | "index" | "train" | "inference" | "user_action" | "ai_input" | "ai_index" | "search" | ("crawl" | "index" | "train" | "inference" | "user_action" | "ai_input" | "ai_index" | "search")[] | undefined;
239
- licensing_mode?: "subscription" | "pay_per_crawl" | "pay_per_inference" | ("subscription" | "pay_per_crawl" | "pay_per_inference")[] | undefined;
240
- reason?: string | undefined;
241
- }[];
242
- name?: string | undefined;
243
- }>;
187
+ }, z.core.$strict>>;
188
+ }, z.core.$strict>;
244
189
  export type PolicyDocument = z.infer<typeof PolicyDocumentSchema>;
245
190
  /**
246
191
  * Evaluation context - input to policy evaluation
@@ -290,25 +235,15 @@ export interface EvaluationResult {
290
235
  * ```
291
236
  */
292
237
  export declare const RateLimitConfigSchema: z.ZodObject<{
293
- /** Maximum requests allowed in the window */
294
238
  limit: z.ZodNumber;
295
- /** Window size in seconds (e.g., 3600 for 1 hour) */
296
239
  window_seconds: z.ZodNumber;
297
- /** Optional burst allowance above the limit */
298
240
  burst: z.ZodOptional<z.ZodNumber>;
299
- /** How to partition rate limits (default: per-agent) */
300
- partition: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["agent", "ip", "account"]>, z.ZodString]>>;
301
- }, "strict", z.ZodTypeAny, {
302
- limit: number;
303
- window_seconds: number;
304
- burst?: number | undefined;
305
- partition?: string | undefined;
306
- }, {
307
- limit: number;
308
- window_seconds: number;
309
- burst?: number | undefined;
310
- partition?: string | undefined;
311
- }>;
241
+ partition: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
242
+ agent: "agent";
243
+ ip: "ip";
244
+ account: "account";
245
+ }>, z.ZodString]>>;
246
+ }, z.core.$strict>;
312
247
  export type RateLimitConfig = z.infer<typeof RateLimitConfigSchema>;
313
248
  /**
314
249
  * Parse a human-friendly rate limit string to RateLimitConfig.
@@ -346,13 +281,8 @@ export declare function formatRateLimit(config: RateLimitConfig): string;
346
281
  * ```
347
282
  */
348
283
  export declare const DecisionRequirementsSchema: z.ZodObject<{
349
- /** Require a valid PEAC receipt */
350
284
  receipt: z.ZodOptional<z.ZodBoolean>;
351
- }, "strict", z.ZodTypeAny, {
352
- receipt?: boolean | undefined;
353
- }, {
354
- receipt?: boolean | undefined;
355
- }>;
285
+ }, z.core.$strict>;
356
286
  export type DecisionRequirements = z.infer<typeof DecisionRequirementsSchema>;
357
287
  /**
358
288
  * Profile parameter definition.
@@ -360,29 +290,16 @@ export type DecisionRequirements = z.infer<typeof DecisionRequirementsSchema>;
360
290
  * Defines a configurable parameter for a profile.
361
291
  */
362
292
  export declare const ProfileParameterSchema: z.ZodObject<{
363
- /** Human-readable description */
364
293
  description: z.ZodString;
365
- /** Whether this parameter is required */
366
294
  required: z.ZodOptional<z.ZodBoolean>;
367
- /** Default value if not provided */
368
- default: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
369
- /** Example value for documentation */
295
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
370
296
  example: z.ZodOptional<z.ZodString>;
371
- /** Validation type for the parameter */
372
- validate: z.ZodOptional<z.ZodEnum<["email", "url", "rate_limit"]>>;
373
- }, "strict", z.ZodTypeAny, {
374
- description: string;
375
- required?: boolean | undefined;
376
- default?: string | number | boolean | undefined;
377
- example?: string | undefined;
378
- validate?: "email" | "url" | "rate_limit" | undefined;
379
- }, {
380
- description: string;
381
- required?: boolean | undefined;
382
- default?: string | number | boolean | undefined;
383
- example?: string | undefined;
384
- validate?: "email" | "url" | "rate_limit" | undefined;
385
- }>;
297
+ validate: z.ZodOptional<z.ZodEnum<{
298
+ email: "email";
299
+ url: "url";
300
+ rate_limit: "rate_limit";
301
+ }>>;
302
+ }, z.core.$strict>;
386
303
  export type ProfileParameter = z.infer<typeof ProfileParameterSchema>;
387
304
  /**
388
305
  * Profile definition.
@@ -413,285 +330,98 @@ export type ProfileParameter = z.infer<typeof ProfileParameterSchema>;
413
330
  * ```
414
331
  */
415
332
  export declare const ProfileDefinitionSchema: z.ZodObject<{
416
- /** Unique profile identifier (e.g., 'news-media') */
417
333
  id: z.ZodString;
418
- /** Human-readable profile name */
419
334
  name: z.ZodString;
420
- /** Multi-line description of the profile */
421
335
  description: z.ZodString;
422
- /** Base policy document */
423
336
  policy: z.ZodObject<{
424
- /** Policy format version */
425
337
  version: z.ZodLiteral<"peac-policy/0.1">;
426
- /** Policy name/description (optional) */
427
338
  name: z.ZodOptional<z.ZodString>;
428
- /** Default decision (required) */
429
339
  defaults: z.ZodObject<{
430
- /** Default decision when no rule matches */
431
- decision: z.ZodEnum<["allow", "deny", "review"]>;
432
- /** Default reason for audit trail */
340
+ decision: z.ZodEnum<{
341
+ allow: "allow";
342
+ deny: "deny";
343
+ review: "review";
344
+ }>;
433
345
  reason: z.ZodOptional<z.ZodString>;
434
- }, "strict", z.ZodTypeAny, {
435
- decision: "allow" | "deny" | "review";
436
- reason?: string | undefined;
437
- }, {
438
- decision: "allow" | "deny" | "review";
439
- reason?: string | undefined;
440
- }>;
441
- /** Rules evaluated in order (first match wins) */
346
+ }, z.core.$strict>;
442
347
  rules: z.ZodArray<z.ZodObject<{
443
- /** Rule name (for debugging/auditing) */
444
348
  name: z.ZodString;
445
- /** Subject matcher (omit for any subject) */
446
349
  subject: z.ZodOptional<z.ZodObject<{
447
- /** Match by subject type(s) - single type or array */
448
- type: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["human", "org", "agent"]>, z.ZodArray<z.ZodEnum<["human", "org", "agent"]>, "many">]>>;
449
- /** Match by label(s) - subject must have ALL specified labels */
450
- labels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
451
- /** Match by subject ID pattern (exact match or prefix with *) */
350
+ type: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
351
+ human: "human";
352
+ org: "org";
353
+ agent: "agent";
354
+ }>, z.ZodArray<z.ZodEnum<{
355
+ human: "human";
356
+ org: "org";
357
+ agent: "agent";
358
+ }>>]>>;
359
+ labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
452
360
  id: z.ZodOptional<z.ZodString>;
453
- }, "strict", z.ZodTypeAny, {
454
- type?: "human" | "org" | "agent" | ("human" | "org" | "agent")[] | undefined;
455
- labels?: string[] | undefined;
456
- id?: string | undefined;
457
- }, {
458
- type?: "human" | "org" | "agent" | ("human" | "org" | "agent")[] | undefined;
459
- labels?: string[] | undefined;
460
- id?: string | undefined;
461
- }>>;
462
- /** Purpose(s) this rule applies to - single purpose or array */
463
- purpose: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["crawl", "index", "train", "inference", "user_action", "ai_input", "ai_index", "search"]>, z.ZodArray<z.ZodEnum<["crawl", "index", "train", "inference", "user_action", "ai_input", "ai_index", "search"]>, "many">]>>;
464
- /** Licensing mode(s) this rule applies to */
465
- licensing_mode: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["subscription", "pay_per_crawl", "pay_per_inference"]>, z.ZodArray<z.ZodEnum<["subscription", "pay_per_crawl", "pay_per_inference"]>, "many">]>>;
466
- /** Decision if rule matches */
467
- decision: z.ZodEnum<["allow", "deny", "review"]>;
468
- /** Reason for decision (for audit trail) */
361
+ }, z.core.$strict>>;
362
+ purpose: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
363
+ search: "search";
364
+ inference: "inference";
365
+ crawl: "crawl";
366
+ index: "index";
367
+ train: "train";
368
+ user_action: "user_action";
369
+ ai_input: "ai_input";
370
+ ai_index: "ai_index";
371
+ }>, z.ZodArray<z.ZodEnum<{
372
+ search: "search";
373
+ inference: "inference";
374
+ crawl: "crawl";
375
+ index: "index";
376
+ train: "train";
377
+ user_action: "user_action";
378
+ ai_input: "ai_input";
379
+ ai_index: "ai_index";
380
+ }>>]>>;
381
+ licensing_mode: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
382
+ subscription: "subscription";
383
+ pay_per_crawl: "pay_per_crawl";
384
+ pay_per_inference: "pay_per_inference";
385
+ }>, z.ZodArray<z.ZodEnum<{
386
+ subscription: "subscription";
387
+ pay_per_crawl: "pay_per_crawl";
388
+ pay_per_inference: "pay_per_inference";
389
+ }>>]>>;
390
+ decision: z.ZodEnum<{
391
+ allow: "allow";
392
+ deny: "deny";
393
+ review: "review";
394
+ }>;
469
395
  reason: z.ZodOptional<z.ZodString>;
470
- }, "strict", z.ZodTypeAny, {
471
- name: string;
472
- decision: "allow" | "deny" | "review";
473
- subject?: {
474
- type?: "human" | "org" | "agent" | ("human" | "org" | "agent")[] | undefined;
475
- labels?: string[] | undefined;
476
- id?: string | undefined;
477
- } | undefined;
478
- purpose?: "crawl" | "index" | "train" | "inference" | "user_action" | "ai_input" | "ai_index" | "search" | ("crawl" | "index" | "train" | "inference" | "user_action" | "ai_input" | "ai_index" | "search")[] | undefined;
479
- licensing_mode?: "subscription" | "pay_per_crawl" | "pay_per_inference" | ("subscription" | "pay_per_crawl" | "pay_per_inference")[] | undefined;
480
- reason?: string | undefined;
481
- }, {
482
- name: string;
483
- decision: "allow" | "deny" | "review";
484
- subject?: {
485
- type?: "human" | "org" | "agent" | ("human" | "org" | "agent")[] | undefined;
486
- labels?: string[] | undefined;
487
- id?: string | undefined;
488
- } | undefined;
489
- purpose?: "crawl" | "index" | "train" | "inference" | "user_action" | "ai_input" | "ai_index" | "search" | ("crawl" | "index" | "train" | "inference" | "user_action" | "ai_input" | "ai_index" | "search")[] | undefined;
490
- licensing_mode?: "subscription" | "pay_per_crawl" | "pay_per_inference" | ("subscription" | "pay_per_crawl" | "pay_per_inference")[] | undefined;
491
- reason?: string | undefined;
492
- }>, "many">;
493
- }, "strict", z.ZodTypeAny, {
494
- version: "peac-policy/0.1";
495
- defaults: {
496
- decision: "allow" | "deny" | "review";
497
- reason?: string | undefined;
498
- };
499
- rules: {
500
- name: string;
501
- decision: "allow" | "deny" | "review";
502
- subject?: {
503
- type?: "human" | "org" | "agent" | ("human" | "org" | "agent")[] | undefined;
504
- labels?: string[] | undefined;
505
- id?: string | undefined;
506
- } | undefined;
507
- purpose?: "crawl" | "index" | "train" | "inference" | "user_action" | "ai_input" | "ai_index" | "search" | ("crawl" | "index" | "train" | "inference" | "user_action" | "ai_input" | "ai_index" | "search")[] | undefined;
508
- licensing_mode?: "subscription" | "pay_per_crawl" | "pay_per_inference" | ("subscription" | "pay_per_crawl" | "pay_per_inference")[] | undefined;
509
- reason?: string | undefined;
510
- }[];
511
- name?: string | undefined;
512
- }, {
513
- version: "peac-policy/0.1";
514
- defaults: {
515
- decision: "allow" | "deny" | "review";
516
- reason?: string | undefined;
517
- };
518
- rules: {
519
- name: string;
520
- decision: "allow" | "deny" | "review";
521
- subject?: {
522
- type?: "human" | "org" | "agent" | ("human" | "org" | "agent")[] | undefined;
523
- labels?: string[] | undefined;
524
- id?: string | undefined;
525
- } | undefined;
526
- purpose?: "crawl" | "index" | "train" | "inference" | "user_action" | "ai_input" | "ai_index" | "search" | ("crawl" | "index" | "train" | "inference" | "user_action" | "ai_input" | "ai_index" | "search")[] | undefined;
527
- licensing_mode?: "subscription" | "pay_per_crawl" | "pay_per_inference" | ("subscription" | "pay_per_crawl" | "pay_per_inference")[] | undefined;
528
- reason?: string | undefined;
529
- }[];
530
- name?: string | undefined;
531
- }>;
532
- /** Configurable parameters */
396
+ }, z.core.$strict>>;
397
+ }, z.core.$strict>;
533
398
  parameters: z.ZodRecord<z.ZodString, z.ZodObject<{
534
- /** Human-readable description */
535
399
  description: z.ZodString;
536
- /** Whether this parameter is required */
537
400
  required: z.ZodOptional<z.ZodBoolean>;
538
- /** Default value if not provided */
539
- default: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
540
- /** Example value for documentation */
401
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
541
402
  example: z.ZodOptional<z.ZodString>;
542
- /** Validation type for the parameter */
543
- validate: z.ZodOptional<z.ZodEnum<["email", "url", "rate_limit"]>>;
544
- }, "strict", z.ZodTypeAny, {
545
- description: string;
546
- required?: boolean | undefined;
547
- default?: string | number | boolean | undefined;
548
- example?: string | undefined;
549
- validate?: "email" | "url" | "rate_limit" | undefined;
550
- }, {
551
- description: string;
552
- required?: boolean | undefined;
553
- default?: string | number | boolean | undefined;
554
- example?: string | undefined;
555
- validate?: "email" | "url" | "rate_limit" | undefined;
556
- }>>;
557
- /** Default values for profile instances */
403
+ validate: z.ZodOptional<z.ZodEnum<{
404
+ email: "email";
405
+ url: "url";
406
+ rate_limit: "rate_limit";
407
+ }>>;
408
+ }, z.core.$strict>>;
558
409
  defaults: z.ZodOptional<z.ZodObject<{
559
- /** Default requirements for 'review' decisions */
560
410
  requirements: z.ZodOptional<z.ZodObject<{
561
- /** Require a valid PEAC receipt */
562
411
  receipt: z.ZodOptional<z.ZodBoolean>;
563
- }, "strict", z.ZodTypeAny, {
564
- receipt?: boolean | undefined;
565
- }, {
566
- receipt?: boolean | undefined;
567
- }>>;
568
- /** Default rate limit */
412
+ }, z.core.$strict>>;
569
413
  rate_limit: z.ZodOptional<z.ZodObject<{
570
- /** Maximum requests allowed in the window */
571
414
  limit: z.ZodNumber;
572
- /** Window size in seconds (e.g., 3600 for 1 hour) */
573
415
  window_seconds: z.ZodNumber;
574
- /** Optional burst allowance above the limit */
575
416
  burst: z.ZodOptional<z.ZodNumber>;
576
- /** How to partition rate limits (default: per-agent) */
577
- partition: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["agent", "ip", "account"]>, z.ZodString]>>;
578
- }, "strict", z.ZodTypeAny, {
579
- limit: number;
580
- window_seconds: number;
581
- burst?: number | undefined;
582
- partition?: string | undefined;
583
- }, {
584
- limit: number;
585
- window_seconds: number;
586
- burst?: number | undefined;
587
- partition?: string | undefined;
588
- }>>;
589
- }, "strict", z.ZodTypeAny, {
590
- rate_limit?: {
591
- limit: number;
592
- window_seconds: number;
593
- burst?: number | undefined;
594
- partition?: string | undefined;
595
- } | undefined;
596
- requirements?: {
597
- receipt?: boolean | undefined;
598
- } | undefined;
599
- }, {
600
- rate_limit?: {
601
- limit: number;
602
- window_seconds: number;
603
- burst?: number | undefined;
604
- partition?: string | undefined;
605
- } | undefined;
606
- requirements?: {
607
- receipt?: boolean | undefined;
608
- } | undefined;
609
- }>>;
610
- }, "strict", z.ZodTypeAny, {
611
- id: string;
612
- name: string;
613
- description: string;
614
- policy: {
615
- version: "peac-policy/0.1";
616
- defaults: {
617
- decision: "allow" | "deny" | "review";
618
- reason?: string | undefined;
619
- };
620
- rules: {
621
- name: string;
622
- decision: "allow" | "deny" | "review";
623
- subject?: {
624
- type?: "human" | "org" | "agent" | ("human" | "org" | "agent")[] | undefined;
625
- labels?: string[] | undefined;
626
- id?: string | undefined;
627
- } | undefined;
628
- purpose?: "crawl" | "index" | "train" | "inference" | "user_action" | "ai_input" | "ai_index" | "search" | ("crawl" | "index" | "train" | "inference" | "user_action" | "ai_input" | "ai_index" | "search")[] | undefined;
629
- licensing_mode?: "subscription" | "pay_per_crawl" | "pay_per_inference" | ("subscription" | "pay_per_crawl" | "pay_per_inference")[] | undefined;
630
- reason?: string | undefined;
631
- }[];
632
- name?: string | undefined;
633
- };
634
- parameters: Record<string, {
635
- description: string;
636
- required?: boolean | undefined;
637
- default?: string | number | boolean | undefined;
638
- example?: string | undefined;
639
- validate?: "email" | "url" | "rate_limit" | undefined;
640
- }>;
641
- defaults?: {
642
- rate_limit?: {
643
- limit: number;
644
- window_seconds: number;
645
- burst?: number | undefined;
646
- partition?: string | undefined;
647
- } | undefined;
648
- requirements?: {
649
- receipt?: boolean | undefined;
650
- } | undefined;
651
- } | undefined;
652
- }, {
653
- id: string;
654
- name: string;
655
- description: string;
656
- policy: {
657
- version: "peac-policy/0.1";
658
- defaults: {
659
- decision: "allow" | "deny" | "review";
660
- reason?: string | undefined;
661
- };
662
- rules: {
663
- name: string;
664
- decision: "allow" | "deny" | "review";
665
- subject?: {
666
- type?: "human" | "org" | "agent" | ("human" | "org" | "agent")[] | undefined;
667
- labels?: string[] | undefined;
668
- id?: string | undefined;
669
- } | undefined;
670
- purpose?: "crawl" | "index" | "train" | "inference" | "user_action" | "ai_input" | "ai_index" | "search" | ("crawl" | "index" | "train" | "inference" | "user_action" | "ai_input" | "ai_index" | "search")[] | undefined;
671
- licensing_mode?: "subscription" | "pay_per_crawl" | "pay_per_inference" | ("subscription" | "pay_per_crawl" | "pay_per_inference")[] | undefined;
672
- reason?: string | undefined;
673
- }[];
674
- name?: string | undefined;
675
- };
676
- parameters: Record<string, {
677
- description: string;
678
- required?: boolean | undefined;
679
- default?: string | number | boolean | undefined;
680
- example?: string | undefined;
681
- validate?: "email" | "url" | "rate_limit" | undefined;
682
- }>;
683
- defaults?: {
684
- rate_limit?: {
685
- limit: number;
686
- window_seconds: number;
687
- burst?: number | undefined;
688
- partition?: string | undefined;
689
- } | undefined;
690
- requirements?: {
691
- receipt?: boolean | undefined;
692
- } | undefined;
693
- } | undefined;
694
- }>;
417
+ partition: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
418
+ agent: "agent";
419
+ ip: "ip";
420
+ account: "account";
421
+ }>, z.ZodString]>>;
422
+ }, z.core.$strict>>;
423
+ }, z.core.$strict>>;
424
+ }, z.core.$strict>;
695
425
  export type ProfileDefinition = z.infer<typeof ProfileDefinitionSchema>;
696
426
  /**
697
427
  * Policy constraints for rate limiting and budget control.
@@ -708,57 +438,16 @@ export type ProfileDefinition = z.infer<typeof ProfileDefinitionSchema>;
708
438
  * ```
709
439
  */
710
440
  export declare const PolicyConstraintsSchema: z.ZodObject<{
711
- /** Rate limit configuration */
712
441
  rate_limit: z.ZodOptional<z.ZodObject<{
713
- /** Window size in seconds */
714
442
  window_s: z.ZodNumber;
715
- /** Maximum requests allowed in the window */
716
443
  max: z.ZodNumber;
717
- /** Retry-After header value in seconds (optional) */
718
444
  retry_after_s: z.ZodOptional<z.ZodNumber>;
719
- }, "strict", z.ZodTypeAny, {
720
- window_s: number;
721
- max: number;
722
- retry_after_s?: number | undefined;
723
- }, {
724
- window_s: number;
725
- max: number;
726
- retry_after_s?: number | undefined;
727
- }>>;
728
- /** Budget constraints */
445
+ }, z.core.$strict>>;
729
446
  budget: z.ZodOptional<z.ZodObject<{
730
- /** Maximum tokens allowed */
731
447
  max_tokens: z.ZodOptional<z.ZodNumber>;
732
- /** Maximum requests allowed */
733
448
  max_requests: z.ZodOptional<z.ZodNumber>;
734
- }, "strict", z.ZodTypeAny, {
735
- max_tokens?: number | undefined;
736
- max_requests?: number | undefined;
737
- }, {
738
- max_tokens?: number | undefined;
739
- max_requests?: number | undefined;
740
- }>>;
741
- }, "strict", z.ZodTypeAny, {
742
- rate_limit?: {
743
- window_s: number;
744
- max: number;
745
- retry_after_s?: number | undefined;
746
- } | undefined;
747
- budget?: {
748
- max_tokens?: number | undefined;
749
- max_requests?: number | undefined;
750
- } | undefined;
751
- }, {
752
- rate_limit?: {
753
- window_s: number;
754
- max: number;
755
- retry_after_s?: number | undefined;
756
- } | undefined;
757
- budget?: {
758
- max_tokens?: number | undefined;
759
- max_requests?: number | undefined;
760
- } | undefined;
761
- }>;
449
+ }, z.core.$strict>>;
450
+ }, z.core.$strict>;
762
451
  export type PolicyConstraints = z.infer<typeof PolicyConstraintsSchema>;
763
452
  /**
764
453
  * Enforcement profile for purpose handling.
@@ -778,111 +467,47 @@ export type EnforcementProfileId = 'strict' | 'balanced' | 'open';
778
467
  * Specifies how to handle requests with undeclared, unknown, or missing purposes.
779
468
  */
780
469
  export declare const EnforcementProfileSchema: z.ZodObject<{
781
- /** Profile identifier */
782
- id: z.ZodEnum<["strict", "balanced", "open"]>;
783
- /** Human-readable name */
470
+ id: z.ZodEnum<{
471
+ strict: "strict";
472
+ balanced: "balanced";
473
+ open: "open";
474
+ }>;
784
475
  name: z.ZodString;
785
- /** Description of when to use this profile */
786
476
  description: z.ZodString;
787
- /** Decision for requests with no purpose declared (missing header) */
788
- undeclared_decision: z.ZodEnum<["allow", "deny", "review"]>;
789
- /** Decision for requests with unknown purpose tokens */
790
- unknown_decision: z.ZodEnum<["allow", "deny", "review"]>;
791
- /** Purpose reason to record when undeclared/unknown is processed */
792
- purpose_reason: z.ZodEnum<["allowed", "constrained", "denied", "downgraded", "undeclared_default", "unknown_preserved"]>;
793
- /** Default constraints to apply for 'review' decisions */
477
+ undeclared_decision: z.ZodEnum<{
478
+ allow: "allow";
479
+ deny: "deny";
480
+ review: "review";
481
+ }>;
482
+ unknown_decision: z.ZodEnum<{
483
+ allow: "allow";
484
+ deny: "deny";
485
+ review: "review";
486
+ }>;
487
+ purpose_reason: z.ZodEnum<{
488
+ allowed: "allowed";
489
+ constrained: "constrained";
490
+ denied: "denied";
491
+ downgraded: "downgraded";
492
+ undeclared_default: "undeclared_default";
493
+ unknown_preserved: "unknown_preserved";
494
+ }>;
794
495
  default_constraints: z.ZodOptional<z.ZodObject<{
795
- /** Rate limit configuration */
796
496
  rate_limit: z.ZodOptional<z.ZodObject<{
797
- /** Window size in seconds */
798
497
  window_s: z.ZodNumber;
799
- /** Maximum requests allowed in the window */
800
498
  max: z.ZodNumber;
801
- /** Retry-After header value in seconds (optional) */
802
499
  retry_after_s: z.ZodOptional<z.ZodNumber>;
803
- }, "strict", z.ZodTypeAny, {
804
- window_s: number;
805
- max: number;
806
- retry_after_s?: number | undefined;
807
- }, {
808
- window_s: number;
809
- max: number;
810
- retry_after_s?: number | undefined;
811
- }>>;
812
- /** Budget constraints */
500
+ }, z.core.$strict>>;
813
501
  budget: z.ZodOptional<z.ZodObject<{
814
- /** Maximum tokens allowed */
815
502
  max_tokens: z.ZodOptional<z.ZodNumber>;
816
- /** Maximum requests allowed */
817
503
  max_requests: z.ZodOptional<z.ZodNumber>;
818
- }, "strict", z.ZodTypeAny, {
819
- max_tokens?: number | undefined;
820
- max_requests?: number | undefined;
821
- }, {
822
- max_tokens?: number | undefined;
823
- max_requests?: number | undefined;
824
- }>>;
825
- }, "strict", z.ZodTypeAny, {
826
- rate_limit?: {
827
- window_s: number;
828
- max: number;
829
- retry_after_s?: number | undefined;
830
- } | undefined;
831
- budget?: {
832
- max_tokens?: number | undefined;
833
- max_requests?: number | undefined;
834
- } | undefined;
835
- }, {
836
- rate_limit?: {
837
- window_s: number;
838
- max: number;
839
- retry_after_s?: number | undefined;
840
- } | undefined;
841
- budget?: {
842
- max_tokens?: number | undefined;
843
- max_requests?: number | undefined;
844
- } | undefined;
845
- }>>;
846
- /** Whether receipts are required for allowed requests */
847
- receipts: z.ZodEnum<["required", "optional", "omit"]>;
848
- }, "strict", z.ZodTypeAny, {
849
- id: "strict" | "balanced" | "open";
850
- name: string;
851
- description: string;
852
- undeclared_decision: "allow" | "deny" | "review";
853
- unknown_decision: "allow" | "deny" | "review";
854
- purpose_reason: "allowed" | "constrained" | "denied" | "downgraded" | "undeclared_default" | "unknown_preserved";
855
- receipts: "required" | "omit" | "optional";
856
- default_constraints?: {
857
- rate_limit?: {
858
- window_s: number;
859
- max: number;
860
- retry_after_s?: number | undefined;
861
- } | undefined;
862
- budget?: {
863
- max_tokens?: number | undefined;
864
- max_requests?: number | undefined;
865
- } | undefined;
866
- } | undefined;
867
- }, {
868
- id: "strict" | "balanced" | "open";
869
- name: string;
870
- description: string;
871
- undeclared_decision: "allow" | "deny" | "review";
872
- unknown_decision: "allow" | "deny" | "review";
873
- purpose_reason: "allowed" | "constrained" | "denied" | "downgraded" | "undeclared_default" | "unknown_preserved";
874
- receipts: "required" | "omit" | "optional";
875
- default_constraints?: {
876
- rate_limit?: {
877
- window_s: number;
878
- max: number;
879
- retry_after_s?: number | undefined;
880
- } | undefined;
881
- budget?: {
882
- max_tokens?: number | undefined;
883
- max_requests?: number | undefined;
884
- } | undefined;
885
- } | undefined;
886
- }>;
504
+ }, z.core.$strict>>;
505
+ }, z.core.$strict>>;
506
+ receipts: z.ZodEnum<{
507
+ optional: "optional";
508
+ required: "required";
509
+ omit: "omit";
510
+ }>;
511
+ }, z.core.$strict>;
887
512
  export type EnforcementProfile = z.infer<typeof EnforcementProfileSchema>;
888
513
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC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,CAAC;AAM9E;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;kBAiBxB,CAAC;AAEZ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgCzB,CAAC;AAEZ,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAMxE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;kBA0BzB,CAAC;AAEZ,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAMxE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;AAElE;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAiC1B,CAAC;AAEZ,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peac/policy-kit",
3
- "version": "0.10.14",
3
+ "version": "0.11.0",
4
4
  "description": "PEAC Policy Kit - deterministic policy evaluation for CAL semantics",
5
5
  "main": "dist/index.cjs",
6
6
  "types": "dist/index.d.ts",
@@ -24,8 +24,8 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "yaml": "^2.3.4",
27
- "zod": "^3.22.4",
28
- "@peac/schema": "0.10.14"
27
+ "zod": "^4.3.6",
28
+ "@peac/schema": "0.11.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^22.19.11",