Repository navigation
Description
Priority: P1 | Area: plugins | Labels: feat,P1,area:plugins | Milestone: v0.1.0 | Design: dynamic extension-API registration (2/4)
Summary
Capability gating for dynamically provided APIs: a provided interface
can only project already-existing Core capability heads through a
grant — it can never mint new authority. Provide-side declares,
consume-side consents, execution stays argv-first and budgeted.
Trust model (non-negotiable, shared with 1/4)
Allowlist membership = participation only. A provided fetch-shaped
API from a listed extension still answers to the egress policy (#1905),
digest arbitration (#1906), consent levels, and budgets. The gate below
is what makes "trusted list" safe to have.
Current state
bitty.services.provide(iface, impl-table)takes 2 args with no
capability linkage; a provided callable's underlying authority is
undeclared and unmediated.- Manifest
services.provided/requiredfields exist but carry no
authority semantics.
Target state
- Provide-side manifest declaration (extends
services.provided):
which interface, which version(s), and which Core capability head(s)
back it (e.g. anhttpinterface must name thenetwork.egress
head; unbacked provides are rejected at install/record time). - Consume-side:
services.getrequires the consumer's grant to cover
the backing head; otherwise fail-closed (indistinguishable from
absent, same posture asbitty.env). - Execution: argv-first invocation, deadlines, and per-call budgets
unchanged; the broker records provider owner + backing head per call
for the observability issue (4/4).
Acceptance criteria
- Undeclared provide (no backing head) rejected at record/install
time with a naming diagnostic. - Ungranted consume fails closed; granted consume works; grant
revocation takes effect without restart where the store supports
it (document where it does not). - Hostile tests: confused-deputy (A provides, B consumes without
grant), head-spoofing (provide naming a head it was never granted). - No new ambient authority:
rgclean for direct socket/process/fs
paths from the broker.
Dependencies
- Sibling issues: name arbitration (1/4), version negotiation (3/4),
observability (4/4). Builds on [feat] installer trust: builtin CDN egress + auto-download consent levels (1902 deltas 2+6) #1905 (egress+consent) and [feat] digest arbitration: registry sha256 vs CDN SHA256SUMS, TOFU vs signed first contact (1902 delta 3) #1906
(digest+TOFU) semantics — reuses, does not weaken.
Scheduling
Post-0.0.23, 0.0.24 window (milestone v0.1.0). No implementation until a
CarryCtx task is claimed; this issue is the 立案 record only.
Activity
[CTX-1175] feat(dynapi): capability gating for provided APIs (#2005)
[CTX-1175] feat(dynapi): capability gating for provided APIs (#2037)
[CTX-1185] fix(dynapi): scope gating renewal test and docs to proven …
[CTX-1185] feat(dynapi): grant-revocation renewal semantics for provi…