Commit 8a1986c
feat(capabilities/access): add access/grant binding
Mirrors the go-libstoracha access.Grant shape with UCAN 1.0 framing:
- Arguments carry an Attenuations list (capabilities the agent wishes
to be granted) and an optional Cause CID. cid.Undef on Cause means
no cause.
- OK aliases ClaimOK — a successful grant resolves into a bundle of
delegation CIDs. Delegation envelopes themselves ride in the receipt
response container as metadata, following the libforge pattern used
by /access/claim and /access/confirm.
- Stable receipt failure names match the go-libstoracha originals so
existing callers can keep their error matching.
This unblocks piri-signing-service's UCAN 1.0 migration: that service
gates all /pdp/sign/* abilities behind an /access/grant delegation and
needs a libforge binding to switch off go-libstoracha.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 2f71f7c commit 8a1986c
5 files changed
Lines changed: 419 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
0 commit comments