@agentproto/corpus-cli 0.11.2 → 0.11.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/cli.mjs +1 -1
  2. package/dist/cli.mjs.map +1 -1
  3. package/dist/specs/resources/aip-11/draft/LESSON.schema.json +2 -2
  4. package/dist/specs/resources/aip-12/draft/PLAYBOOK.schema.json +2 -1
  5. package/dist/specs/resources/aip-14/draft/TOOL.schema.json +2 -2
  6. package/dist/specs/resources/aip-22/draft/OFFICE.schema.json +8 -8
  7. package/dist/specs/resources/aip-23/draft/IDENTITY.schema.json +2 -2
  8. package/dist/specs/resources/aip-3/draft/SKILL.schema.json +2 -2
  9. package/dist/specs/resources/aip-34/draft/EXPORT.schema.json +2 -2
  10. package/dist/specs/resources/aip-34/draft/LOCK.schema.json +3 -3
  11. package/dist/specs/resources/aip-34/draft/PRESENCE.schema.json +3 -3
  12. package/dist/specs/resources/aip-34/draft/TYPES.schema.json +3 -3
  13. package/dist/specs/resources/aip-34/draft/WORKSPACE.schema.json +6 -3
  14. package/dist/specs/resources/aip-38/draft/POLICY.schema.json +36 -5
  15. package/dist/specs/resources/aip-4/draft/DESIGN.schema.json +2 -2
  16. package/dist/specs/resources/aip-42/draft/AGENT.schema.json +42 -4
  17. package/dist/specs/resources/aip-43/draft/Selector.schema.json +245 -0
  18. package/dist/specs/resources/aip-45/draft/{AGENT-CLI.schema.json → HARNESS.schema.json} +156 -9
  19. package/dist/specs/resources/aip-45/draft/STREAM-EVENTS.schema.json +151 -0
  20. package/dist/specs/resources/aip-46/draft/SessionConfig.schema.json +293 -0
  21. package/dist/specs/resources/aip-47/draft/ROLE.schema.json +93 -1
  22. package/dist/specs/resources/aip-48/draft/MultiAgentRuntime.schema.json +3 -3
  23. package/dist/specs/resources/aip-53/draft/APP.schema.json +36 -19
  24. package/dist/specs/resources/aip-54/draft/WS-REF.schema.json +2 -1
  25. package/dist/specs/resources/aip-6/draft/COMPANY.schema.json +69 -107
  26. package/dist/specs/resources/aip-62/draft/ATTESTATION.schema.json +11 -4
  27. package/dist/specs/resources/aip-63/draft/RECORDING.schema.json +2 -2
  28. package/dist/specs/resources/aip-69/draft/AuthProfile.schema.json +127 -0
  29. package/dist/specs/resources/aip-7/draft/GOVERNANCE.schema.json +436 -105
  30. package/dist/specs/resources/{pending/memory → aip-72}/draft/MEMORY.schema.json +115 -62
  31. package/dist/specs/resources/aip-9/draft/OPERATOR.schema.json +230 -139
  32. package/package.json +3 -3
  33. package/dist/specs/resources/pending/harness/HARNESS.schema.json +0 -254
  34. package/dist/specs/resources/pending/services/SERVICES.schema.json +0 -55
@@ -1,19 +1,32 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://agentproto.sh/schemas/aip-7/GOVERNANCE.schema.json",
4
- "title": "agentgovernance/v1 (AIP-7)",
4
+ "title": "governance/v1 (AIP-7)",
5
5
  "description": "Validates the five AIP-7 doctypes: signature (approval event), audit-event (append-only log line), policy (declarative autonomy rule), approval-request (pending human decision over a pinned payload), and governance.workspace/v1 (workspace manifest, root or view). Branch on the `doctype` (or for the workspace, the `schema`) field.",
6
6
  "oneOf": [
7
- { "$ref": "#/$defs/signature" },
8
- { "$ref": "#/$defs/auditEvent" },
9
- { "$ref": "#/$defs/policy" },
10
- { "$ref": "#/$defs/approvalRequest" },
11
- { "$ref": "#/$defs/workspace" }
7
+ {
8
+ "$ref": "#/$defs/signature"
9
+ },
10
+ {
11
+ "$ref": "#/$defs/auditEvent"
12
+ },
13
+ {
14
+ "$ref": "#/$defs/policy"
15
+ },
16
+ {
17
+ "$ref": "#/$defs/approvalRequest"
18
+ },
19
+ {
20
+ "$ref": "#/$defs/workspace"
21
+ }
12
22
  ],
13
23
  "$defs": {
14
24
  "schemaTag": {
15
- "const": "agentgovernance/v1",
16
- "description": "Doctype family. Constant across all three doctypes."
25
+ "enum": [
26
+ "governance/v1",
27
+ "agentgovernance/v1"
28
+ ],
29
+ "description": "Doctype family. Constant across all three doctypes. `agentgovernance/v1` is accepted as a legacy alias (AIP-70)."
17
30
  },
18
31
  "isoDateTime": {
19
32
  "type": "string",
@@ -39,21 +52,39 @@
39
52
  },
40
53
  "signer": {
41
54
  "type": "object",
42
- "required": ["id"],
55
+ "required": [
56
+ "id"
57
+ ],
43
58
  "additionalProperties": false,
44
59
  "properties": {
45
- "id": { "$ref": "#/$defs/principalId" },
46
- "role": { "type": "string", "maxLength": 64 },
47
- "displayName": { "type": "string", "maxLength": 120 }
60
+ "id": {
61
+ "$ref": "#/$defs/principalId"
62
+ },
63
+ "role": {
64
+ "type": "string",
65
+ "maxLength": 64
66
+ },
67
+ "displayName": {
68
+ "type": "string",
69
+ "maxLength": 120
70
+ }
48
71
  }
49
72
  },
50
73
  "signatureBlock": {
51
74
  "type": "object",
52
- "required": ["alg", "value"],
75
+ "required": [
76
+ "alg",
77
+ "value"
78
+ ],
53
79
  "additionalProperties": false,
54
80
  "properties": {
55
81
  "alg": {
56
- "enum": ["Ed25519", "ECDSA-P256", "RSA-PSS-SHA256", "Sigstore"],
82
+ "enum": [
83
+ "Ed25519",
84
+ "ECDSA-P256",
85
+ "RSA-PSS-SHA256",
86
+ "Sigstore"
87
+ ],
57
88
  "description": "Cryptographic algorithm. Default Ed25519."
58
89
  },
59
90
  "value": {
@@ -68,22 +99,37 @@
68
99
  },
69
100
  "policyRef": {
70
101
  "type": "object",
71
- "required": ["ref"],
102
+ "required": [
103
+ "ref"
104
+ ],
72
105
  "additionalProperties": false,
73
106
  "properties": {
74
- "ref": { "$ref": "#/$defs/slug" },
107
+ "ref": {
108
+ "$ref": "#/$defs/slug"
109
+ },
75
110
  "decision": {
76
- "enum": ["allow", "deny", "require-approval", "escalate"]
111
+ "enum": [
112
+ "allow",
113
+ "deny",
114
+ "require-approval",
115
+ "escalate"
116
+ ]
77
117
  }
78
118
  }
79
119
  },
80
120
  "redactedValue": {
81
121
  "type": "object",
82
- "required": ["$redacted"],
122
+ "required": [
123
+ "$redacted"
124
+ ],
83
125
  "additionalProperties": false,
84
126
  "properties": {
85
- "$redacted": { "const": true },
86
- "reason": { "type": "string" }
127
+ "$redacted": {
128
+ "const": true
129
+ },
130
+ "reason": {
131
+ "type": "string"
132
+ }
87
133
  }
88
134
  },
89
135
  "signature": {
@@ -99,14 +145,22 @@
99
145
  ],
100
146
  "additionalProperties": false,
101
147
  "properties": {
102
- "$schema": { "$ref": "#/$defs/schemaTag" },
103
- "doctype": { "const": "signature" },
148
+ "$schema": {
149
+ "$ref": "#/$defs/schemaTag"
150
+ },
151
+ "doctype": {
152
+ "const": "signature"
153
+ },
104
154
  "artifact": {
105
155
  "type": "string",
106
156
  "description": "Slug or workspace-relative path of the artifact being approved."
107
157
  },
108
158
  "decision": {
109
- "enum": ["approve", "reject", "abstain"]
159
+ "enum": [
160
+ "approve",
161
+ "reject",
162
+ "abstain"
163
+ ]
110
164
  },
111
165
  "reason": {
112
166
  "type": "string",
@@ -118,26 +172,50 @@
118
172
  "pattern": "^[0-9a-f]{64}$",
119
173
  "description": "Lowercase hex SHA-256 of the artifact's bytes at signing time. For a signature that resolves an approval-request, MUST equal that request's payloadHash."
120
174
  },
121
- "signer": { "$ref": "#/$defs/signer" },
175
+ "signer": {
176
+ "$ref": "#/$defs/signer"
177
+ },
122
178
  "signerKind": {
123
- "enum": ["operator", "user", "counterparty", "agent", "external"],
179
+ "enum": [
180
+ "operator",
181
+ "user",
182
+ "counterparty",
183
+ "agent",
184
+ "external"
185
+ ],
124
186
  "description": "What kind of principal signed. An approve that resolves an approval-request MUST carry 'user'."
125
187
  },
126
188
  "method": {
127
- "enum": ["typed_name", "agent_confirm", "click_through", "esign_external"],
189
+ "enum": [
190
+ "typed_name",
191
+ "agent_confirm",
192
+ "click_through",
193
+ "esign_external"
194
+ ],
128
195
  "description": "How the signature was produced. An approve that resolves an approval-request MUST carry 'click_through'."
129
196
  },
130
197
  "evidence": {
131
198
  "type": "object",
132
- "required": ["kind"],
199
+ "required": [
200
+ "kind"
201
+ ],
133
202
  "additionalProperties": true,
134
203
  "properties": {
135
204
  "kind": {
136
- "enum": ["typed_name", "agent_confirm", "click_through", "esign_external"],
205
+ "enum": [
206
+ "typed_name",
207
+ "agent_confirm",
208
+ "click_through",
209
+ "esign_external"
210
+ ],
137
211
  "description": "MUST equal `method` when both are present."
138
212
  },
139
- "ipAddress": { "type": "string" },
140
- "userAgent": { "type": "string" },
213
+ "ipAddress": {
214
+ "type": "string"
215
+ },
216
+ "userAgent": {
217
+ "type": "string"
218
+ },
141
219
  "signedUrlToken": {
142
220
  "type": "string",
143
221
  "description": "click_through: a value unique to this decision. For a ui_card decision, the hash of the one-time ticket, never the ticket."
@@ -145,9 +223,15 @@
145
223
  },
146
224
  "description": "Method-specific evidence. Shape shown is for click_through; other methods define their own members."
147
225
  },
148
- "signedAt": { "$ref": "#/$defs/isoDateTime" },
149
- "policy": { "$ref": "#/$defs/policyRef" },
150
- "signature": { "$ref": "#/$defs/signatureBlock" },
226
+ "signedAt": {
227
+ "$ref": "#/$defs/isoDateTime"
228
+ },
229
+ "policy": {
230
+ "$ref": "#/$defs/policyRef"
231
+ },
232
+ "signature": {
233
+ "$ref": "#/$defs/signatureBlock"
234
+ },
151
235
  "metadata": {
152
236
  "type": "object",
153
237
  "additionalProperties": true,
@@ -156,8 +240,18 @@
156
240
  },
157
241
  "allOf": [
158
242
  {
159
- "if": { "properties": { "decision": { "const": "reject" } } },
160
- "then": { "required": ["reason"] }
243
+ "if": {
244
+ "properties": {
245
+ "decision": {
246
+ "const": "reject"
247
+ }
248
+ }
249
+ },
250
+ "then": {
251
+ "required": [
252
+ "reason"
253
+ ]
254
+ }
161
255
  }
162
256
  ]
163
257
  },
@@ -178,8 +272,12 @@
178
272
  ],
179
273
  "additionalProperties": false,
180
274
  "properties": {
181
- "$schema": { "$ref": "#/$defs/schemaTag" },
182
- "doctype": { "const": "approval-request" },
275
+ "$schema": {
276
+ "$ref": "#/$defs/schemaTag"
277
+ },
278
+ "doctype": {
279
+ "const": "approval-request"
280
+ },
183
281
  "id": {
184
282
  "type": "string",
185
283
  "minLength": 1,
@@ -193,7 +291,11 @@
193
291
  "maxLength": 128,
194
292
  "description": "Free-form class of the thing being approved."
195
293
  },
196
- "title": { "type": "string", "minLength": 1, "maxLength": 256 },
294
+ "title": {
295
+ "type": "string",
296
+ "minLength": 1,
297
+ "maxLength": 256
298
+ },
197
299
  "preview": {
198
300
  "description": "JSON value supplied by the requester for a human-facing surface to render. Opaque to the host and NOT covered by payloadHash."
199
301
  },
@@ -203,76 +305,166 @@
203
305
  "description": "Lowercase hex SHA-256 of the UTF-8 bytes of the canonical JSON of the pinned payload (keys sorted recursively by UTF-16 code unit, arrays in order, undefined as null)."
204
306
  },
205
307
  "status": {
206
- "enum": ["pending", "approved", "denied", "expired", "consumed"],
308
+ "enum": [
309
+ "pending",
310
+ "approved",
311
+ "denied",
312
+ "expired",
313
+ "consumed"
314
+ ],
207
315
  "description": "pending -> approved | denied | expired; approved -> consumed. denied, expired, and consumed are terminal."
208
316
  },
209
317
  "requestedBy": {
210
318
  "oneOf": [
211
319
  {
212
320
  "type": "object",
213
- "required": ["sessionId"],
321
+ "required": [
322
+ "sessionId"
323
+ ],
214
324
  "additionalProperties": false,
215
325
  "properties": {
216
- "sessionId": { "type": "string", "minLength": 1 }
326
+ "sessionId": {
327
+ "type": "string",
328
+ "minLength": 1
329
+ }
217
330
  }
218
331
  },
219
332
  {
220
333
  "type": "object",
221
- "required": ["operator"],
334
+ "required": [
335
+ "operator"
336
+ ],
222
337
  "additionalProperties": false,
223
338
  "properties": {
224
- "operator": { "const": true }
339
+ "operator": {
340
+ "const": true
341
+ }
225
342
  }
226
343
  }
227
344
  ],
228
345
  "description": "The requester: an agent session, or the operator acting directly. Only the requester (an operator for operator-made requests) may consume."
229
346
  },
230
- "taskId": { "type": "string", "minLength": 1 },
231
- "appId": { "type": "string", "minLength": 1 },
347
+ "taskId": {
348
+ "type": "string",
349
+ "minLength": 1
350
+ },
351
+ "appId": {
352
+ "type": "string",
353
+ "minLength": 1
354
+ },
232
355
  "channels": {
233
356
  "type": "array",
234
357
  "uniqueItems": true,
235
- "items": { "$ref": "#/$defs/approvalChannel" },
358
+ "items": {
359
+ "$ref": "#/$defs/approvalChannel"
360
+ },
236
361
  "description": "Human channels allowed to decide this request. A decision on any other channel MUST be rejected. Empty when no declared channel is enabled."
237
362
  },
238
- "requestedAt": { "$ref": "#/$defs/isoDateTime" },
239
- "expiresAt": { "$ref": "#/$defs/isoDateTime" },
363
+ "requestedAt": {
364
+ "$ref": "#/$defs/isoDateTime"
365
+ },
366
+ "expiresAt": {
367
+ "$ref": "#/$defs/isoDateTime"
368
+ },
240
369
  "decision": {
241
370
  "type": "object",
242
- "required": ["decision", "channel", "decidedAt"],
371
+ "required": [
372
+ "decision",
373
+ "channel",
374
+ "decidedAt"
375
+ ],
243
376
  "additionalProperties": false,
244
377
  "properties": {
245
- "decision": { "enum": ["approved", "denied"] },
246
- "channel": { "$ref": "#/$defs/approvalChannel" },
247
- "decidedAt": { "$ref": "#/$defs/isoDateTime" },
378
+ "decision": {
379
+ "enum": [
380
+ "approved",
381
+ "denied"
382
+ ]
383
+ },
384
+ "channel": {
385
+ "$ref": "#/$defs/approvalChannel"
386
+ },
387
+ "decidedAt": {
388
+ "$ref": "#/$defs/isoDateTime"
389
+ },
248
390
  "signaturePath": {
249
391
  "type": "string",
250
392
  "description": "Workspace-relative path to the signature.json. Present only when decision is 'approved', and written after the signature exists."
251
393
  }
252
394
  }
253
395
  },
254
- "consumedAt": { "$ref": "#/$defs/isoDateTime" }
396
+ "consumedAt": {
397
+ "$ref": "#/$defs/isoDateTime"
398
+ }
255
399
  },
256
400
  "allOf": [
257
401
  {
258
- "if": { "properties": { "status": { "enum": ["approved", "denied", "consumed"] } } },
259
- "then": { "required": ["decision"] }
402
+ "if": {
403
+ "properties": {
404
+ "status": {
405
+ "enum": [
406
+ "approved",
407
+ "denied",
408
+ "consumed"
409
+ ]
410
+ }
411
+ }
412
+ },
413
+ "then": {
414
+ "required": [
415
+ "decision"
416
+ ]
417
+ }
260
418
  },
261
419
  {
262
- "if": { "properties": { "status": { "const": "consumed" } } },
263
- "then": { "required": ["consumedAt"] }
420
+ "if": {
421
+ "properties": {
422
+ "status": {
423
+ "const": "consumed"
424
+ }
425
+ }
426
+ },
427
+ "then": {
428
+ "required": [
429
+ "consumedAt"
430
+ ]
431
+ }
264
432
  },
265
433
  {
266
434
  "if": {
267
- "required": ["decision"],
268
- "properties": { "decision": { "properties": { "decision": { "const": "denied" } } } }
435
+ "required": [
436
+ "decision"
437
+ ],
438
+ "properties": {
439
+ "decision": {
440
+ "properties": {
441
+ "decision": {
442
+ "const": "denied"
443
+ }
444
+ }
445
+ }
446
+ }
269
447
  },
270
- "then": { "properties": { "decision": { "not": { "required": ["signaturePath"] } } } }
448
+ "then": {
449
+ "properties": {
450
+ "decision": {
451
+ "not": {
452
+ "required": [
453
+ "signaturePath"
454
+ ]
455
+ }
456
+ }
457
+ }
458
+ }
271
459
  }
272
460
  ]
273
461
  },
274
462
  "approvalChannel": {
275
- "enum": ["web_click", "ui_card", "telegram"],
463
+ "enum": [
464
+ "web_click",
465
+ "ui_card",
466
+ "telegram"
467
+ ],
276
468
  "description": "A declared human channel. web_click: bearer credential plus an Origin on a configured allowlist. ui_card: one-time ticket minted per card render, app-only decide action, served on a surface agent sessions cannot reach. telegram: a shared bot-bridge bearer secret, in place of an Origin (a Telegram webhook callback has none). Further channels MAY be registered; each MUST satisfy the AIP-7 human channel rule."
277
469
  },
278
470
  "auditEvent": {
@@ -291,21 +483,34 @@
291
483
  ],
292
484
  "additionalProperties": false,
293
485
  "properties": {
294
- "$schema": { "$ref": "#/$defs/schemaTag" },
295
- "doctype": { "const": "audit-event" },
486
+ "$schema": {
487
+ "$ref": "#/$defs/schemaTag"
488
+ },
489
+ "doctype": {
490
+ "const": "audit-event"
491
+ },
296
492
  "seq": {
297
493
  "type": "integer",
298
494
  "minimum": 0,
299
495
  "description": "Monotonic sequence number per chain. Starts at 0; gaps are spec violations."
300
496
  },
301
- "ts": { "$ref": "#/$defs/isoDateTime" },
497
+ "ts": {
498
+ "$ref": "#/$defs/isoDateTime"
499
+ },
302
500
  "actor": {
303
501
  "type": "object",
304
- "required": ["id"],
502
+ "required": [
503
+ "id"
504
+ ],
305
505
  "additionalProperties": false,
306
506
  "properties": {
307
- "id": { "$ref": "#/$defs/principalId" },
308
- "role": { "type": "string", "maxLength": 64 }
507
+ "id": {
508
+ "$ref": "#/$defs/principalId"
509
+ },
510
+ "role": {
511
+ "type": "string",
512
+ "maxLength": 64
513
+ }
309
514
  }
310
515
  },
311
516
  "action": {
@@ -316,23 +521,50 @@
316
521
  },
317
522
  "subject": {
318
523
  "type": "object",
319
- "required": ["kind"],
524
+ "required": [
525
+ "kind"
526
+ ],
320
527
  "additionalProperties": false,
321
528
  "properties": {
322
- "kind": { "type": "string", "maxLength": 32 },
323
- "ref": { "type": "string", "maxLength": 256 },
324
- "path": { "type": "string", "maxLength": 1024 }
529
+ "kind": {
530
+ "type": "string",
531
+ "maxLength": 32
532
+ },
533
+ "ref": {
534
+ "type": "string",
535
+ "maxLength": 256
536
+ },
537
+ "path": {
538
+ "type": "string",
539
+ "maxLength": 1024
540
+ }
325
541
  }
326
542
  },
327
543
  "input": {
328
544
  "description": "Input arguments (or {$redacted: true} placeholder).",
329
- "anyOf": [{ "type": "object" }, { "$ref": "#/$defs/redactedValue" }]
545
+ "anyOf": [
546
+ {
547
+ "type": "object"
548
+ },
549
+ {
550
+ "$ref": "#/$defs/redactedValue"
551
+ }
552
+ ]
330
553
  },
331
554
  "output": {
332
555
  "description": "Output payload (or {$redacted: true} placeholder).",
333
- "anyOf": [{ "type": "object" }, { "$ref": "#/$defs/redactedValue" }]
556
+ "anyOf": [
557
+ {
558
+ "type": "object"
559
+ },
560
+ {
561
+ "$ref": "#/$defs/redactedValue"
562
+ }
563
+ ]
564
+ },
565
+ "policy": {
566
+ "$ref": "#/$defs/policyRef"
334
567
  },
335
- "policy": { "$ref": "#/$defs/policyRef" },
336
568
  "signatures": {
337
569
  "type": "array",
338
570
  "items": {
@@ -341,14 +573,20 @@
341
573
  },
342
574
  "default": []
343
575
  },
344
- "prevHash": { "$ref": "#/$defs/hexHash" },
576
+ "prevHash": {
577
+ "$ref": "#/$defs/hexHash"
578
+ },
345
579
  "hash": {
346
580
  "type": "string",
347
581
  "pattern": "^[0-9a-f]{32,128}$",
348
582
  "description": "Hash of the canonical JSON of every other field. Recomputed on read."
349
583
  },
350
584
  "hashAlg": {
351
- "enum": ["sha256", "sha512", "blake2b-256"],
585
+ "enum": [
586
+ "sha256",
587
+ "sha512",
588
+ "blake2b-256"
589
+ ],
352
590
  "default": "sha256"
353
591
  },
354
592
  "metadata": {
@@ -361,19 +599,34 @@
361
599
  "policy": {
362
600
  "type": "object",
363
601
  "title": "policy (declarative autonomy rule)",
364
- "required": ["schema", "doctype", "slug", "version", "match", "decision"],
602
+ "required": [
603
+ "schema",
604
+ "doctype",
605
+ "slug",
606
+ "version",
607
+ "match",
608
+ "decision"
609
+ ],
365
610
  "additionalProperties": false,
366
611
  "properties": {
367
- "schema": { "$ref": "#/$defs/schemaTag" },
368
- "doctype": { "const": "policy" },
369
- "slug": { "$ref": "#/$defs/slug" },
612
+ "schema": {
613
+ "$ref": "#/$defs/schemaTag"
614
+ },
615
+ "doctype": {
616
+ "const": "policy"
617
+ },
618
+ "slug": {
619
+ "$ref": "#/$defs/slug"
620
+ },
370
621
  "version": {
371
622
  "type": "string",
372
623
  "pattern": "^\\d+\\.\\d+\\.\\d+(?:[-+][a-zA-Z0-9.-]+)?$"
373
624
  },
374
625
  "match": {
375
626
  "type": "object",
376
- "required": ["action"],
627
+ "required": [
628
+ "action"
629
+ ],
377
630
  "additionalProperties": false,
378
631
  "properties": {
379
632
  "action": {
@@ -394,7 +647,12 @@
394
647
  }
395
648
  },
396
649
  "decision": {
397
- "enum": ["allow", "deny", "require-approval", "escalate"]
650
+ "enum": [
651
+ "allow",
652
+ "deny",
653
+ "require-approval",
654
+ "escalate"
655
+ ]
398
656
  },
399
657
  "signers": {
400
658
  "type": "array",
@@ -403,17 +661,34 @@
403
661
  "additionalProperties": false,
404
662
  "anyOf": [
405
663
  {
406
- "required": ["role"],
407
- "properties": { "role": { "type": "string" } }
664
+ "required": [
665
+ "role"
666
+ ],
667
+ "properties": {
668
+ "role": {
669
+ "type": "string"
670
+ }
671
+ }
408
672
  },
409
673
  {
410
- "required": ["userId"],
411
- "properties": { "userId": { "$ref": "#/$defs/principalId" } }
674
+ "required": [
675
+ "userId"
676
+ ],
677
+ "properties": {
678
+ "userId": {
679
+ "$ref": "#/$defs/principalId"
680
+ }
681
+ }
412
682
  }
413
683
  ],
414
684
  "properties": {
415
- "role": { "type": "string", "maxLength": 64 },
416
- "userId": { "$ref": "#/$defs/principalId" }
685
+ "role": {
686
+ "type": "string",
687
+ "maxLength": 64
688
+ },
689
+ "userId": {
690
+ "$ref": "#/$defs/principalId"
691
+ }
417
692
  }
418
693
  }
419
694
  },
@@ -434,9 +709,18 @@
434
709
  "type": "object",
435
710
  "additionalProperties": false,
436
711
  "properties": {
437
- "max_per_hour": { "type": "integer", "minimum": 1 },
438
- "max_per_day": { "type": "integer", "minimum": 1 },
439
- "max_amount_cents": { "type": "integer", "minimum": 1 },
712
+ "max_per_hour": {
713
+ "type": "integer",
714
+ "minimum": 1
715
+ },
716
+ "max_per_day": {
717
+ "type": "integer",
718
+ "minimum": 1
719
+ },
720
+ "max_amount_cents": {
721
+ "type": "integer",
722
+ "minimum": 1
723
+ },
440
724
  "currency": {
441
725
  "type": "string",
442
726
  "pattern": "^[A-Z]{3}$",
@@ -453,9 +737,17 @@
453
737
  "allOf": [
454
738
  {
455
739
  "if": {
456
- "properties": { "decision": { "const": "require-approval" } }
740
+ "properties": {
741
+ "decision": {
742
+ "const": "require-approval"
743
+ }
744
+ }
457
745
  },
458
- "then": { "required": ["signers"] }
746
+ "then": {
747
+ "required": [
748
+ "signers"
749
+ ]
750
+ }
459
751
  }
460
752
  ]
461
753
  },
@@ -463,7 +755,13 @@
463
755
  "type": "object",
464
756
  "title": "governance.workspace/v1 (manifest, root or view)",
465
757
  "description": "Workspace manifest doctype for AIP-7. Used both as the root manifest of a governance scope (no `extends`) and as a per-consumer view (with `extends`). The same schema validates both modes; the host distinguishes by checking whether `extends` is set. One-way switches (audit.appendOnly, signing.required) are enforced by the host at merge time and cannot be relaxed by a descendant view.",
466
- "required": ["schema", "name", "title", "description", "version"],
758
+ "required": [
759
+ "schema",
760
+ "name",
761
+ "title",
762
+ "description",
763
+ "version"
764
+ ],
467
765
  "additionalProperties": false,
468
766
  "properties": {
469
767
  "schema": {
@@ -529,10 +827,19 @@
529
827
  "approvalEscalation": {
530
828
  "type": "object",
531
829
  "additionalProperties": false,
532
- "required": ["from", "to"],
830
+ "required": [
831
+ "from",
832
+ "to"
833
+ ],
533
834
  "properties": {
534
- "from": { "type": "string", "maxLength": 96 },
535
- "to": { "type": "string", "maxLength": 96 }
835
+ "from": {
836
+ "type": "string",
837
+ "maxLength": 96
838
+ },
839
+ "to": {
840
+ "type": "string",
841
+ "maxLength": 96
842
+ }
536
843
  },
537
844
  "description": "Fallback route when defaultApproval can't resolve a quorum. 'from' and 'to' name approval classes."
538
845
  }
@@ -544,7 +851,11 @@
544
851
  "additionalProperties": false,
545
852
  "properties": {
546
853
  "algo": {
547
- "enum": ["ed25519", "ecdsa-p256", "rsa-pss-sha256"],
854
+ "enum": [
855
+ "ed25519",
856
+ "ecdsa-p256",
857
+ "rsa-pss-sha256"
858
+ ],
548
859
  "description": "Default signing algorithm. Hosts MUST support ed25519; others are OPTIONAL."
549
860
  },
550
861
  "keyring": {
@@ -570,7 +881,11 @@
570
881
  "description": "Audit-log retention. 'forever' or 'days:<n>'."
571
882
  },
572
883
  "hashAlgo": {
573
- "enum": ["sha256", "sha512", "blake3"],
884
+ "enum": [
885
+ "sha256",
886
+ "sha512",
887
+ "blake3"
888
+ ],
574
889
  "description": "Hash algorithm for the audit chain. Default sha256."
575
890
  },
576
891
  "appendOnly": {
@@ -594,7 +909,10 @@
594
909
  "type": "array",
595
910
  "items": {
596
911
  "type": "object",
597
- "required": ["id", "ref"],
912
+ "required": [
913
+ "id",
914
+ "ref"
915
+ ],
598
916
  "additionalProperties": false,
599
917
  "properties": {
600
918
  "id": {
@@ -614,7 +932,11 @@
614
932
  "description": "AIP-7 action class to bind this policy to (e.g. 'workspace.write', 'tool.call', 'mutates') or '*' for all actions."
615
933
  },
616
934
  "severity": {
617
- "enum": ["error", "warn", "info"],
935
+ "enum": [
936
+ "error",
937
+ "warn",
938
+ "info"
939
+ ],
618
940
  "description": "Severity when this policy is violated. 'error' = block; 'warn' = surface; 'info' = log only."
619
941
  },
620
942
  "params": {
@@ -631,7 +953,9 @@
631
953
  "type": "array",
632
954
  "items": {
633
955
  "type": "object",
634
- "required": ["id"],
956
+ "required": [
957
+ "id"
958
+ ],
635
959
  "additionalProperties": false,
636
960
  "properties": {
637
961
  "id": {
@@ -712,13 +1036,20 @@
712
1036
  {
713
1037
  "description": "A view (any manifest with appliesTo set) MUST extend a parent. A workspace-root manifest has neither field.",
714
1038
  "if": {
715
- "required": ["appliesTo"],
1039
+ "required": [
1040
+ "appliesTo"
1041
+ ],
716
1042
  "properties": {
717
- "appliesTo": { "type": "array", "minItems": 1 }
1043
+ "appliesTo": {
1044
+ "type": "array",
1045
+ "minItems": 1
1046
+ }
718
1047
  }
719
1048
  },
720
1049
  "then": {
721
- "required": ["extends"]
1050
+ "required": [
1051
+ "extends"
1052
+ ]
722
1053
  }
723
1054
  }
724
1055
  ]