aae-protocol 0.0.1 → 0.9.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.
@@ -0,0 +1,687 @@
1
+ /**
2
+ * Zod schemas + inferred TypeScript types for AAE protocol shapes.
3
+ *
4
+ * These mirror schemas/*.schema.json and the SPEC. When you change one,
5
+ * change the others and bump conformance test fixtures.
6
+ */
7
+ import { z } from "zod";
8
+ export declare const PROTOCOL_VERSION: "0.8";
9
+ export declare const BlastRadius: {
10
+ readonly READ_ONLY: "read_only";
11
+ readonly SINGLE_SERVICE: "single_service";
12
+ readonly SINGLE_HOST: "single_host";
13
+ readonly MULTI_HOST: "multi_host";
14
+ readonly IRREVERSIBLE: "irreversible";
15
+ };
16
+ export declare const BlastRadiusSchema: z.ZodEnum<["read_only", "single_service", "single_host", "multi_host", "irreversible"]>;
17
+ export type BlastRadius = z.infer<typeof BlastRadiusSchema>;
18
+ export declare const Decision: {
19
+ readonly ALLOW: "allow";
20
+ readonly DENY: "deny";
21
+ readonly REQUIRE_APPROVAL: "require_approval";
22
+ };
23
+ /**
24
+ * v0.8: the decision enum is closed at exactly these three values. Unknown
25
+ * decision values — including the two refined v0.3 values retired in v0.8 —
26
+ * MUST fail parsing; consumers reject rather than coerce.
27
+ */
28
+ export declare const DecisionSchema: z.ZodEnum<["allow", "deny", "require_approval"]>;
29
+ export type Decision = z.infer<typeof DecisionSchema>;
30
+ /** v0.3: whether a tool's effects can be undone. */
31
+ export declare const ReversibilitySchema: z.ZodEnum<["reversible", "partially_reversible", "irreversible"]>;
32
+ export type Reversibility = z.infer<typeof ReversibilitySchema>;
33
+ /** v0.7: standard ext.confidence shape on policy decisions. A low-confidence
34
+ * allow is still an allow (G-2-safe); hosts may route it to spot checks. */
35
+ export declare const ConfidenceSchema: z.ZodObject<{
36
+ score: z.ZodNumber;
37
+ basis: z.ZodOptional<z.ZodString>;
38
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
39
+ score: z.ZodNumber;
40
+ basis: z.ZodOptional<z.ZodString>;
41
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
42
+ score: z.ZodNumber;
43
+ basis: z.ZodOptional<z.ZodString>;
44
+ }, z.ZodTypeAny, "passthrough">>;
45
+ export type Confidence = z.infer<typeof ConfidenceSchema>;
46
+ /** v0.3: standard ext.cost_estimate shape for cost-aware policy. */
47
+ export declare const CostEstimateSchema: z.ZodObject<{
48
+ currency: z.ZodString;
49
+ amount: z.ZodNumber;
50
+ amount_max: z.ZodOptional<z.ZodNumber>;
51
+ basis: z.ZodOptional<z.ZodString>;
52
+ confidence: z.ZodOptional<z.ZodNumber>;
53
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
54
+ currency: z.ZodString;
55
+ amount: z.ZodNumber;
56
+ amount_max: z.ZodOptional<z.ZodNumber>;
57
+ basis: z.ZodOptional<z.ZodString>;
58
+ confidence: z.ZodOptional<z.ZodNumber>;
59
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
60
+ currency: z.ZodString;
61
+ amount: z.ZodNumber;
62
+ amount_max: z.ZodOptional<z.ZodNumber>;
63
+ basis: z.ZodOptional<z.ZodString>;
64
+ confidence: z.ZodOptional<z.ZodNumber>;
65
+ }, z.ZodTypeAny, "passthrough">>;
66
+ export type CostEstimate = z.infer<typeof CostEstimateSchema>;
67
+ /** Core strictness modes (SPEC §5.3). */
68
+ export declare const Strictness: {
69
+ readonly STRICT_LITERAL: "strict_literal";
70
+ readonly STRICT_TEMPLATE: "strict_template";
71
+ };
72
+ /**
73
+ * v0.8: strictness is an open string. Core normatively defines
74
+ * `strict_literal` (REQUIRED, default) and `strict_template` (OPTIONAL);
75
+ * any other value is a companion/extension mode, and a host that does not
76
+ * implement the requested mode MUST fail closed (C-16), never downgrade.
77
+ */
78
+ export declare const StrictnessSchema: z.ZodString;
79
+ export type Strictness = z.infer<typeof StrictnessSchema>;
80
+ export declare const StepSchema: z.ZodObject<{
81
+ tool: z.ZodString;
82
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
83
+ expected: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
84
+ blast_radius: z.ZodEnum<["read_only", "single_service", "single_host", "multi_host", "irreversible"]>;
85
+ }, "strict", z.ZodTypeAny, {
86
+ tool: string;
87
+ args: Record<string, unknown>;
88
+ blast_radius: "read_only" | "single_service" | "single_host" | "multi_host" | "irreversible";
89
+ expected?: Record<string, unknown> | undefined;
90
+ }, {
91
+ tool: string;
92
+ args: Record<string, unknown>;
93
+ blast_radius: "read_only" | "single_service" | "single_host" | "multi_host" | "irreversible";
94
+ expected?: Record<string, unknown> | undefined;
95
+ }>;
96
+ export type Step = z.infer<typeof StepSchema>;
97
+ export declare const ContextSchema: z.ZodObject<{
98
+ rationale: z.ZodString;
99
+ triggered_by: z.ZodOptional<z.ZodString>;
100
+ derived_from: z.ZodOptional<z.ZodString>;
101
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
102
+ rationale: z.ZodString;
103
+ triggered_by: z.ZodOptional<z.ZodString>;
104
+ derived_from: z.ZodOptional<z.ZodString>;
105
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
106
+ rationale: z.ZodString;
107
+ triggered_by: z.ZodOptional<z.ZodString>;
108
+ derived_from: z.ZodOptional<z.ZodString>;
109
+ }, z.ZodTypeAny, "passthrough">>;
110
+ export type Context = z.infer<typeof ContextSchema>;
111
+ export declare const ProposalSchema: z.ZodEffects<z.ZodObject<{
112
+ aae_version: z.ZodString;
113
+ proposal_id: z.ZodString;
114
+ agent_id: z.ZodString;
115
+ agent_chain: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
116
+ tenant_id: z.ZodString;
117
+ intent: z.ZodString;
118
+ context: z.ZodObject<{
119
+ rationale: z.ZodString;
120
+ triggered_by: z.ZodOptional<z.ZodString>;
121
+ derived_from: z.ZodOptional<z.ZodString>;
122
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
123
+ rationale: z.ZodString;
124
+ triggered_by: z.ZodOptional<z.ZodString>;
125
+ derived_from: z.ZodOptional<z.ZodString>;
126
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
127
+ rationale: z.ZodString;
128
+ triggered_by: z.ZodOptional<z.ZodString>;
129
+ derived_from: z.ZodOptional<z.ZodString>;
130
+ }, z.ZodTypeAny, "passthrough">>;
131
+ steps: z.ZodArray<z.ZodObject<{
132
+ tool: z.ZodString;
133
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
134
+ expected: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
135
+ blast_radius: z.ZodEnum<["read_only", "single_service", "single_host", "multi_host", "irreversible"]>;
136
+ }, "strict", z.ZodTypeAny, {
137
+ tool: string;
138
+ args: Record<string, unknown>;
139
+ blast_radius: "read_only" | "single_service" | "single_host" | "multi_host" | "irreversible";
140
+ expected?: Record<string, unknown> | undefined;
141
+ }, {
142
+ tool: string;
143
+ args: Record<string, unknown>;
144
+ blast_radius: "read_only" | "single_service" | "single_host" | "multi_host" | "irreversible";
145
+ expected?: Record<string, unknown> | undefined;
146
+ }>, "many">;
147
+ submitted_at: z.ZodString;
148
+ }, "strict", z.ZodTypeAny, {
149
+ aae_version: string;
150
+ proposal_id: string;
151
+ agent_id: string;
152
+ tenant_id: string;
153
+ intent: string;
154
+ context: {
155
+ rationale: string;
156
+ triggered_by?: string | undefined;
157
+ derived_from?: string | undefined;
158
+ } & {
159
+ [k: string]: unknown;
160
+ };
161
+ steps: {
162
+ tool: string;
163
+ args: Record<string, unknown>;
164
+ blast_radius: "read_only" | "single_service" | "single_host" | "multi_host" | "irreversible";
165
+ expected?: Record<string, unknown> | undefined;
166
+ }[];
167
+ submitted_at: string;
168
+ agent_chain?: string[] | undefined;
169
+ }, {
170
+ aae_version: string;
171
+ proposal_id: string;
172
+ agent_id: string;
173
+ tenant_id: string;
174
+ intent: string;
175
+ context: {
176
+ rationale: string;
177
+ triggered_by?: string | undefined;
178
+ derived_from?: string | undefined;
179
+ } & {
180
+ [k: string]: unknown;
181
+ };
182
+ steps: {
183
+ tool: string;
184
+ args: Record<string, unknown>;
185
+ blast_radius: "read_only" | "single_service" | "single_host" | "multi_host" | "irreversible";
186
+ expected?: Record<string, unknown> | undefined;
187
+ }[];
188
+ submitted_at: string;
189
+ agent_chain?: string[] | undefined;
190
+ }>, {
191
+ aae_version: string;
192
+ proposal_id: string;
193
+ agent_id: string;
194
+ tenant_id: string;
195
+ intent: string;
196
+ context: {
197
+ rationale: string;
198
+ triggered_by?: string | undefined;
199
+ derived_from?: string | undefined;
200
+ } & {
201
+ [k: string]: unknown;
202
+ };
203
+ steps: {
204
+ tool: string;
205
+ args: Record<string, unknown>;
206
+ blast_radius: "read_only" | "single_service" | "single_host" | "multi_host" | "irreversible";
207
+ expected?: Record<string, unknown> | undefined;
208
+ }[];
209
+ submitted_at: string;
210
+ agent_chain?: string[] | undefined;
211
+ }, {
212
+ aae_version: string;
213
+ proposal_id: string;
214
+ agent_id: string;
215
+ tenant_id: string;
216
+ intent: string;
217
+ context: {
218
+ rationale: string;
219
+ triggered_by?: string | undefined;
220
+ derived_from?: string | undefined;
221
+ } & {
222
+ [k: string]: unknown;
223
+ };
224
+ steps: {
225
+ tool: string;
226
+ args: Record<string, unknown>;
227
+ blast_radius: "read_only" | "single_service" | "single_host" | "multi_host" | "irreversible";
228
+ expected?: Record<string, unknown> | undefined;
229
+ }[];
230
+ submitted_at: string;
231
+ agent_chain?: string[] | undefined;
232
+ }>;
233
+ export type Proposal = z.infer<typeof ProposalSchema>;
234
+ export declare const EffectSchema: z.ZodObject<{
235
+ type: z.ZodString;
236
+ target: z.ZodString;
237
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
238
+ to: z.ZodOptional<z.ZodNullable<z.ZodString>>;
239
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
240
+ }, "strict", z.ZodTypeAny, {
241
+ type: string;
242
+ target: string;
243
+ from?: string | null | undefined;
244
+ to?: string | null | undefined;
245
+ details?: Record<string, unknown> | undefined;
246
+ }, {
247
+ type: string;
248
+ target: string;
249
+ from?: string | null | undefined;
250
+ to?: string | null | undefined;
251
+ details?: Record<string, unknown> | undefined;
252
+ }>;
253
+ export type Effect = z.infer<typeof EffectSchema>;
254
+ export declare const StepPreviewSchema: z.ZodObject<{
255
+ step_index: z.ZodNumber;
256
+ predicted_effects: z.ZodArray<z.ZodObject<{
257
+ type: z.ZodString;
258
+ target: z.ZodString;
259
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
260
+ to: z.ZodOptional<z.ZodNullable<z.ZodString>>;
261
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
262
+ }, "strict", z.ZodTypeAny, {
263
+ type: string;
264
+ target: string;
265
+ from?: string | null | undefined;
266
+ to?: string | null | undefined;
267
+ details?: Record<string, unknown> | undefined;
268
+ }, {
269
+ type: string;
270
+ target: string;
271
+ from?: string | null | undefined;
272
+ to?: string | null | undefined;
273
+ details?: Record<string, unknown> | undefined;
274
+ }>, "many">;
275
+ estimated_duration_ms: z.ZodOptional<z.ZodNumber>;
276
+ diff: z.ZodOptional<z.ZodNullable<z.ZodString>>;
277
+ warnings: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
278
+ preview_unsupported_reason: z.ZodOptional<z.ZodString>;
279
+ ext: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
280
+ }, "strict", z.ZodTypeAny, {
281
+ step_index: number;
282
+ predicted_effects: {
283
+ type: string;
284
+ target: string;
285
+ from?: string | null | undefined;
286
+ to?: string | null | undefined;
287
+ details?: Record<string, unknown> | undefined;
288
+ }[];
289
+ warnings: string[];
290
+ estimated_duration_ms?: number | undefined;
291
+ diff?: string | null | undefined;
292
+ preview_unsupported_reason?: string | undefined;
293
+ ext?: Record<string, unknown> | null | undefined;
294
+ }, {
295
+ step_index: number;
296
+ predicted_effects: {
297
+ type: string;
298
+ target: string;
299
+ from?: string | null | undefined;
300
+ to?: string | null | undefined;
301
+ details?: Record<string, unknown> | undefined;
302
+ }[];
303
+ estimated_duration_ms?: number | undefined;
304
+ diff?: string | null | undefined;
305
+ warnings?: string[] | undefined;
306
+ preview_unsupported_reason?: string | undefined;
307
+ ext?: Record<string, unknown> | null | undefined;
308
+ }>;
309
+ export type StepPreview = z.infer<typeof StepPreviewSchema>;
310
+ /** Parse a decision's ext.confidence into the standard shape, if present. */
311
+ export declare function confidenceOf(decision: PolicyDecision): Confidence | null;
312
+ /** Parse a step preview's ext.cost_estimate into the standard shape, if present. */
313
+ export declare function costEstimateOf(preview: StepPreview): CostEstimate | null;
314
+ export declare const PreviewSchema: z.ZodObject<{
315
+ aae_version: z.ZodString;
316
+ preview_id: z.ZodString;
317
+ proposal_id: z.ZodString;
318
+ step_previews: z.ZodArray<z.ZodObject<{
319
+ step_index: z.ZodNumber;
320
+ predicted_effects: z.ZodArray<z.ZodObject<{
321
+ type: z.ZodString;
322
+ target: z.ZodString;
323
+ from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
324
+ to: z.ZodOptional<z.ZodNullable<z.ZodString>>;
325
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
326
+ }, "strict", z.ZodTypeAny, {
327
+ type: string;
328
+ target: string;
329
+ from?: string | null | undefined;
330
+ to?: string | null | undefined;
331
+ details?: Record<string, unknown> | undefined;
332
+ }, {
333
+ type: string;
334
+ target: string;
335
+ from?: string | null | undefined;
336
+ to?: string | null | undefined;
337
+ details?: Record<string, unknown> | undefined;
338
+ }>, "many">;
339
+ estimated_duration_ms: z.ZodOptional<z.ZodNumber>;
340
+ diff: z.ZodOptional<z.ZodNullable<z.ZodString>>;
341
+ warnings: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
342
+ preview_unsupported_reason: z.ZodOptional<z.ZodString>;
343
+ ext: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
344
+ }, "strict", z.ZodTypeAny, {
345
+ step_index: number;
346
+ predicted_effects: {
347
+ type: string;
348
+ target: string;
349
+ from?: string | null | undefined;
350
+ to?: string | null | undefined;
351
+ details?: Record<string, unknown> | undefined;
352
+ }[];
353
+ warnings: string[];
354
+ estimated_duration_ms?: number | undefined;
355
+ diff?: string | null | undefined;
356
+ preview_unsupported_reason?: string | undefined;
357
+ ext?: Record<string, unknown> | null | undefined;
358
+ }, {
359
+ step_index: number;
360
+ predicted_effects: {
361
+ type: string;
362
+ target: string;
363
+ from?: string | null | undefined;
364
+ to?: string | null | undefined;
365
+ details?: Record<string, unknown> | undefined;
366
+ }[];
367
+ estimated_duration_ms?: number | undefined;
368
+ diff?: string | null | undefined;
369
+ warnings?: string[] | undefined;
370
+ preview_unsupported_reason?: string | undefined;
371
+ ext?: Record<string, unknown> | null | undefined;
372
+ }>, "many">;
373
+ aggregate_blast_radius: z.ZodEnum<["read_only", "single_service", "single_host", "multi_host", "irreversible"]>;
374
+ preview_unsupported: z.ZodBoolean;
375
+ generated_at: z.ZodString;
376
+ }, "strict", z.ZodTypeAny, {
377
+ aae_version: string;
378
+ proposal_id: string;
379
+ preview_id: string;
380
+ step_previews: {
381
+ step_index: number;
382
+ predicted_effects: {
383
+ type: string;
384
+ target: string;
385
+ from?: string | null | undefined;
386
+ to?: string | null | undefined;
387
+ details?: Record<string, unknown> | undefined;
388
+ }[];
389
+ warnings: string[];
390
+ estimated_duration_ms?: number | undefined;
391
+ diff?: string | null | undefined;
392
+ preview_unsupported_reason?: string | undefined;
393
+ ext?: Record<string, unknown> | null | undefined;
394
+ }[];
395
+ aggregate_blast_radius: "read_only" | "single_service" | "single_host" | "multi_host" | "irreversible";
396
+ preview_unsupported: boolean;
397
+ generated_at: string;
398
+ }, {
399
+ aae_version: string;
400
+ proposal_id: string;
401
+ preview_id: string;
402
+ step_previews: {
403
+ step_index: number;
404
+ predicted_effects: {
405
+ type: string;
406
+ target: string;
407
+ from?: string | null | undefined;
408
+ to?: string | null | undefined;
409
+ details?: Record<string, unknown> | undefined;
410
+ }[];
411
+ estimated_duration_ms?: number | undefined;
412
+ diff?: string | null | undefined;
413
+ warnings?: string[] | undefined;
414
+ preview_unsupported_reason?: string | undefined;
415
+ ext?: Record<string, unknown> | null | undefined;
416
+ }[];
417
+ aggregate_blast_radius: "read_only" | "single_service" | "single_host" | "multi_host" | "irreversible";
418
+ preview_unsupported: boolean;
419
+ generated_at: string;
420
+ }>;
421
+ export type Preview = z.infer<typeof PreviewSchema>;
422
+ export declare const PolicyDecisionSchema: z.ZodEffects<z.ZodObject<{
423
+ aae_version: z.ZodString;
424
+ decision_id: z.ZodString;
425
+ proposal_id: z.ZodString;
426
+ decision: z.ZodEnum<["allow", "deny", "require_approval"]>;
427
+ policy_version: z.ZodString;
428
+ rules_evaluated: z.ZodArray<z.ZodString, "many">;
429
+ reason: z.ZodString;
430
+ required_approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
431
+ expires_at: z.ZodOptional<z.ZodString>;
432
+ strictness: z.ZodDefault<z.ZodString>;
433
+ decided_at: z.ZodString;
434
+ ext: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
435
+ }, "strict", z.ZodTypeAny, {
436
+ aae_version: string;
437
+ proposal_id: string;
438
+ decision_id: string;
439
+ decision: "allow" | "deny" | "require_approval";
440
+ policy_version: string;
441
+ rules_evaluated: string[];
442
+ reason: string;
443
+ strictness: string;
444
+ decided_at: string;
445
+ ext?: Record<string, unknown> | null | undefined;
446
+ required_approvers?: string[] | undefined;
447
+ expires_at?: string | undefined;
448
+ }, {
449
+ aae_version: string;
450
+ proposal_id: string;
451
+ decision_id: string;
452
+ decision: "allow" | "deny" | "require_approval";
453
+ policy_version: string;
454
+ rules_evaluated: string[];
455
+ reason: string;
456
+ decided_at: string;
457
+ ext?: Record<string, unknown> | null | undefined;
458
+ required_approvers?: string[] | undefined;
459
+ expires_at?: string | undefined;
460
+ strictness?: string | undefined;
461
+ }>, {
462
+ aae_version: string;
463
+ proposal_id: string;
464
+ decision_id: string;
465
+ decision: "allow" | "deny" | "require_approval";
466
+ policy_version: string;
467
+ rules_evaluated: string[];
468
+ reason: string;
469
+ strictness: string;
470
+ decided_at: string;
471
+ ext?: Record<string, unknown> | null | undefined;
472
+ required_approvers?: string[] | undefined;
473
+ expires_at?: string | undefined;
474
+ }, {
475
+ aae_version: string;
476
+ proposal_id: string;
477
+ decision_id: string;
478
+ decision: "allow" | "deny" | "require_approval";
479
+ policy_version: string;
480
+ rules_evaluated: string[];
481
+ reason: string;
482
+ decided_at: string;
483
+ ext?: Record<string, unknown> | null | undefined;
484
+ required_approvers?: string[] | undefined;
485
+ expires_at?: string | undefined;
486
+ strictness?: string | undefined;
487
+ }>;
488
+ export type PolicyDecision = z.infer<typeof PolicyDecisionSchema>;
489
+ export declare const CapabilityScopeSchema: z.ZodObject<{
490
+ tool: z.ZodString;
491
+ approved_steps_hash: z.ZodString;
492
+ target_constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
493
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
494
+ tool: z.ZodString;
495
+ approved_steps_hash: z.ZodString;
496
+ target_constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
497
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
498
+ tool: z.ZodString;
499
+ approved_steps_hash: z.ZodString;
500
+ target_constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
501
+ }, z.ZodTypeAny, "passthrough">>;
502
+ export type CapabilityScope = z.infer<typeof CapabilityScopeSchema>;
503
+ export declare const CapabilityTokenSchema: z.ZodObject<{
504
+ aae_version: z.ZodString;
505
+ token_id: z.ZodString;
506
+ proposal_id: z.ZodString;
507
+ decision_id: z.ZodString;
508
+ scope: z.ZodObject<{
509
+ tool: z.ZodString;
510
+ approved_steps_hash: z.ZodString;
511
+ target_constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
512
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
513
+ tool: z.ZodString;
514
+ approved_steps_hash: z.ZodString;
515
+ target_constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
516
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
517
+ tool: z.ZodString;
518
+ approved_steps_hash: z.ZodString;
519
+ target_constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
520
+ }, z.ZodTypeAny, "passthrough">>;
521
+ iat: z.ZodNumber;
522
+ exp: z.ZodNumber;
523
+ iss: z.ZodString;
524
+ sub: z.ZodOptional<z.ZodString>;
525
+ max_uses: z.ZodNumber;
526
+ }, "strict", z.ZodTypeAny, {
527
+ aae_version: string;
528
+ proposal_id: string;
529
+ decision_id: string;
530
+ token_id: string;
531
+ scope: {
532
+ tool: string;
533
+ approved_steps_hash: string;
534
+ target_constraints?: Record<string, unknown> | undefined;
535
+ } & {
536
+ [k: string]: unknown;
537
+ };
538
+ iat: number;
539
+ exp: number;
540
+ iss: string;
541
+ max_uses: number;
542
+ sub?: string | undefined;
543
+ }, {
544
+ aae_version: string;
545
+ proposal_id: string;
546
+ decision_id: string;
547
+ token_id: string;
548
+ scope: {
549
+ tool: string;
550
+ approved_steps_hash: string;
551
+ target_constraints?: Record<string, unknown> | undefined;
552
+ } & {
553
+ [k: string]: unknown;
554
+ };
555
+ iat: number;
556
+ exp: number;
557
+ iss: string;
558
+ max_uses: number;
559
+ sub?: string | undefined;
560
+ }>;
561
+ export type CapabilityToken = z.infer<typeof CapabilityTokenSchema>;
562
+ export declare const EventSignatureSchema: z.ZodObject<{
563
+ alg: z.ZodEnum<["ed25519", "ecdsa-p256", "rsa-pss-sha256"]>;
564
+ key_id: z.ZodString;
565
+ value: z.ZodString;
566
+ }, "strict", z.ZodTypeAny, {
567
+ value: string;
568
+ alg: "ed25519" | "ecdsa-p256" | "rsa-pss-sha256";
569
+ key_id: string;
570
+ }, {
571
+ value: string;
572
+ alg: "ed25519" | "ecdsa-p256" | "rsa-pss-sha256";
573
+ key_id: string;
574
+ }>;
575
+ export type EventSignature = z.infer<typeof EventSignatureSchema>;
576
+ /**
577
+ * v0.8 core event type binding an out-of-chain artifact to a chain event by
578
+ * content hash. Required payload fields: `artifact_hash` (algorithm-prefixed
579
+ * canonical hash), `bound_event_id`, `artifact_kind` (free-form string, e.g.
580
+ * `legible_record`, `session_recording`). Optional: `uri`, `media_type`,
581
+ * `producer_id`, `producer_version`. Artifacts are advisory; the chain event
582
+ * is authoritative.
583
+ */
584
+ export declare const EVENT_TYPE_ARTIFACT_ATTESTED: "artifact_attested";
585
+ export declare const AuditEventSchema: z.ZodObject<{
586
+ aae_version: z.ZodString;
587
+ event_id: z.ZodString;
588
+ event_type: z.ZodString;
589
+ proposal_id: z.ZodString;
590
+ tenant_id: z.ZodString;
591
+ agent_id: z.ZodString;
592
+ actor: z.ZodString;
593
+ ts: z.ZodString;
594
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
595
+ prev_event_hash: z.ZodNullable<z.ZodString>;
596
+ this_event_hash: z.ZodString;
597
+ signature: z.ZodOptional<z.ZodNullable<z.ZodObject<{
598
+ alg: z.ZodEnum<["ed25519", "ecdsa-p256", "rsa-pss-sha256"]>;
599
+ key_id: z.ZodString;
600
+ value: z.ZodString;
601
+ }, "strict", z.ZodTypeAny, {
602
+ value: string;
603
+ alg: "ed25519" | "ecdsa-p256" | "rsa-pss-sha256";
604
+ key_id: string;
605
+ }, {
606
+ value: string;
607
+ alg: "ed25519" | "ecdsa-p256" | "rsa-pss-sha256";
608
+ key_id: string;
609
+ }>>>;
610
+ }, "strict", z.ZodTypeAny, {
611
+ aae_version: string;
612
+ proposal_id: string;
613
+ agent_id: string;
614
+ tenant_id: string;
615
+ event_id: string;
616
+ event_type: string;
617
+ actor: string;
618
+ ts: string;
619
+ payload: Record<string, unknown>;
620
+ prev_event_hash: string | null;
621
+ this_event_hash: string;
622
+ signature?: {
623
+ value: string;
624
+ alg: "ed25519" | "ecdsa-p256" | "rsa-pss-sha256";
625
+ key_id: string;
626
+ } | null | undefined;
627
+ }, {
628
+ aae_version: string;
629
+ proposal_id: string;
630
+ agent_id: string;
631
+ tenant_id: string;
632
+ event_id: string;
633
+ event_type: string;
634
+ actor: string;
635
+ ts: string;
636
+ payload: Record<string, unknown>;
637
+ prev_event_hash: string | null;
638
+ this_event_hash: string;
639
+ signature?: {
640
+ value: string;
641
+ alg: "ed25519" | "ecdsa-p256" | "rsa-pss-sha256";
642
+ key_id: string;
643
+ } | null | undefined;
644
+ }>;
645
+ export type AuditEvent = z.infer<typeof AuditEventSchema>;
646
+ export declare const ToolRegistrationSchema: z.ZodObject<{
647
+ aae_version: z.ZodString;
648
+ name: z.ZodString;
649
+ description: z.ZodOptional<z.ZodString>;
650
+ plan_schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
651
+ preview_schema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
652
+ preview_supported: z.ZodBoolean;
653
+ default_blast_radius: z.ZodEnum<["read_only", "single_service", "single_host", "multi_host", "irreversible"]>;
654
+ aae_required: z.ZodBoolean;
655
+ data_classes_touched: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
656
+ compliance_relevant: z.ZodDefault<z.ZodBoolean>;
657
+ systems_of_record: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
658
+ reversibility: z.ZodOptional<z.ZodEnum<["reversible", "partially_reversible", "irreversible"]>>;
659
+ }, "strict", z.ZodTypeAny, {
660
+ aae_version: string;
661
+ name: string;
662
+ plan_schema: Record<string, unknown>;
663
+ preview_supported: boolean;
664
+ default_blast_radius: "read_only" | "single_service" | "single_host" | "multi_host" | "irreversible";
665
+ aae_required: boolean;
666
+ data_classes_touched: string[];
667
+ compliance_relevant: boolean;
668
+ systems_of_record: string[];
669
+ description?: string | undefined;
670
+ preview_schema?: Record<string, unknown> | undefined;
671
+ reversibility?: "irreversible" | "reversible" | "partially_reversible" | undefined;
672
+ }, {
673
+ aae_version: string;
674
+ name: string;
675
+ plan_schema: Record<string, unknown>;
676
+ preview_supported: boolean;
677
+ default_blast_radius: "read_only" | "single_service" | "single_host" | "multi_host" | "irreversible";
678
+ aae_required: boolean;
679
+ description?: string | undefined;
680
+ preview_schema?: Record<string, unknown> | undefined;
681
+ data_classes_touched?: string[] | undefined;
682
+ compliance_relevant?: boolean | undefined;
683
+ systems_of_record?: string[] | undefined;
684
+ reversibility?: "irreversible" | "reversible" | "partially_reversible" | undefined;
685
+ }>;
686
+ export type ToolRegistration = z.infer<typeof ToolRegistrationSchema>;
687
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gBAAgB,EAAG,KAAc,CAAC;AAc/C,eAAO,MAAM,WAAW;;;;;;CAMd,CAAC;AACX,eAAO,MAAM,iBAAiB,yFAM5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,QAAQ;;;;CAIX,CAAC;AACX;;;;GAIG;AACH,eAAO,MAAM,cAAc,kDAAgD,CAAC;AAC5E,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,oDAAoD;AACpD,eAAO,MAAM,mBAAmB,mEAI9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;4EAC4E;AAC5E,eAAO,MAAM,gBAAgB;;;;;;;;;gCAKd,CAAC;AAChB,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,g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