Commit 91de234
feat(caprock): capture deny-list snapshot and provision_match events
Two observability additions to the caprock hook, prerequisite to the
audit CLI but independently useful for transcript-driven inspection.
- Reads `permissions.deny` from each watched settings file (in addition
to the existing allow list) and captures it on the session state as
`settingsDenySnapshot`, so the at-start view of authority is complete.
- Records a `provision_match` event in the session log whenever a
PreToolUse routing succeeds, naming the matched provisions. This makes
"which provision authorized this tool use" inspectable from the event
stream rather than only from the in-vat ledger.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent da670ca commit 91de234
3 files changed
Lines changed: 51 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
394 | 395 | | |
395 | 396 | | |
396 | 397 | | |
397 | | - | |
| 398 | + | |
| 399 | + | |
398 | 400 | | |
399 | 401 | | |
400 | 402 | | |
401 | 403 | | |
402 | 404 | | |
403 | 405 | | |
404 | | - | |
| 406 | + | |
405 | 407 | | |
406 | | - | |
| 408 | + | |
407 | 409 | | |
408 | | - | |
409 | | - | |
410 | | - | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
411 | 422 | | |
412 | 423 | | |
413 | 424 | | |
| |||
484 | 495 | | |
485 | 496 | | |
486 | 497 | | |
487 | | - | |
| 498 | + | |
| 499 | + | |
488 | 500 | | |
489 | 501 | | |
490 | 502 | | |
| |||
495 | 507 | | |
496 | 508 | | |
497 | 509 | | |
498 | | - | |
| 510 | + | |
499 | 511 | | |
500 | 512 | | |
501 | 513 | | |
| |||
506 | 518 | | |
507 | 519 | | |
508 | 520 | | |
509 | | - | |
| 521 | + | |
510 | 522 | | |
511 | 523 | | |
512 | 524 | | |
| |||
566 | 578 | | |
567 | 579 | | |
568 | 580 | | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
569 | 589 | | |
570 | 590 | | |
571 | 591 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
116 | 135 | | |
117 | 136 | | |
118 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | | - | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
0 commit comments