Skip to content

H: generalize ungated capability request/grant as a native core/management primitive #77

Description

@Mearman

Parent: #28

core/room's room.join/room.invite (spec/room.cddl:126-155) hand-built the ungated-request-then-human-approves-then-mint-and-return-token flow for one scope kind. This generalizes it into a domain-agnostic primitive any capability can use, adds the timeout handling neither room.join nor agent-comms' connect_request currently has, then migrates room.join/room.invite onto it rather than leaving two parallel implementations of the same idea.

Sub-issues below cover the wire addition (capability-request/capability-grant-ok), a queryable canGrant() helper pulled out of mintCapabilityToken's own narrowing check, requester- and receiver-side timeouts for any held-open manage-request, an optional valid-until field reusing the message/token-lifetime mechanism from section E, and the migration of room.join/room.invite onto the new primitive.

Extended by a further design pass into three more pieces, no longer deliberately deferred:

A request/approval round trip stays single-round-trip even for a narrowed-plus-conditioned grant: the approver mints and returns a token for whatever it's actually willing to give (narrower capability, added conditions), and the requester's own decision to use or discard that token is what stands in for "accept the counter-offer" -- no separate negotiation protocol needed on top of the existing mechanism.


PR #93 opened: the wire shape for #78 (capability-request/capability-grant-ok) is now added to core/management. Migrating room.join/room.invite onto it, and the canGrant/canSatisfy check, timeouts, and valid-until field it unblocks (#79-#83), remain open follow-up work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions