Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion spec/management.cddl
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,15 @@ manage-response-frame = { type: "manage-response", request-id: uint, outcome: ma
; (freshly minted token on the same response) rather than inventing a new
; response frame; a denial is an ordinary manage-error, the same convention
; room.join's own denial already uses.
; valid-until (wire-mesh#82) lets a requester bound how long its own ask is
; worth granting -- a receiver refuses a request whose deadline has already
; passed outright rather than presenting a stale ask to a human for
; approval, and a future relay/facilitator forwarding the request can drop
; it once expired rather than keep holding or forwarding it. Reuses the
; same message/token-lifetime concept the plan's own section E already
; names as its own open item, rather than inventing a second TTL field.
$manage-command-params /= capability-request
capability-request = { verb: "capability.request", capability: tstr, * tstr => any }
capability-request = { verb: "capability.request", capability: tstr, ? valid-until: uint, * tstr => any }
capability-grant-ok = { result: "ok", "granted-token": capability-token, * tstr => any }

; Revocation — new, not present in Cascade's frozen set. Gossiped revocation
Expand Down
9 changes: 8 additions & 1 deletion spec/protocol.cddl
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,15 @@ manage-response-frame = { type: "manage-response", request-id: uint, outcome: ma
; (freshly minted token on the same response) rather than inventing a new
; response frame; a denial is an ordinary manage-error, the same convention
; room.join's own denial already uses.
; valid-until (wire-mesh#82) lets a requester bound how long its own ask is
; worth granting -- a receiver refuses a request whose deadline has already
; passed outright rather than presenting a stale ask to a human for
; approval, and a future relay/facilitator forwarding the request can drop
; it once expired rather than keep holding or forwarding it. Reuses the
; same message/token-lifetime concept the plan's own section E already
; names as its own open item, rather than inventing a second TTL field.
$manage-command-params /= capability-request
capability-request = { verb: "capability.request", capability: tstr, * tstr => any }
capability-request = { verb: "capability.request", capability: tstr, ? valid-until: uint, * tstr => any }
capability-grant-ok = { result: "ok", "granted-token": capability-token, * tstr => any }

; Revocation — new, not present in Cascade's frozen set. Gossiped revocation
Expand Down
1 change: 1 addition & 0 deletions ts/packages/core/src/generated/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ export const manageResponseFrameSchema = z.lazy(() => z.object({
export const capabilityRequestSchema = z.lazy(() => z.object({
"verb": z.literal("capability.request"),
"capability": z.string(),
"valid-until": z.number().int().nonnegative().optional(),
}).catchall(z.unknown()));
export const capabilityGrantOkSchema = z.lazy(() => z.object({
"result": z.literal("ok"),
Expand Down