You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 99a02bf
Browse filesBrowse the repository at this point in the historyBrowse files
feat(approvals): typed approval scope summaries on channel cards (#130116)
* feat(approvals): typed approval scope summaries on channel cards
Approval owners can attach a closed ApprovalScope union (message-send,
payment, external-post) describing an action's blast radius. The gateway
sanitizes it once at the producer boundary, the core view model renders a
Scope metadata row so Slack/Discord/Google Chat cards show it unchanged,
shared text builders cover Telegram/WhatsApp/Signal/iMessage/Matrix, and
the durable presentation carries it additively for operator surfaces.
Scope is display-only, never authorization; missing scope keeps today's
cards.
* fix(approvals): emit native ApprovalScope union and clamp recipient previews
Name the three scope variants as registered protocol schemas so the Swift
generator emits the ApprovalScope discriminated union the presentation
structs reference, and commit the regenerated GatewayModels.swift. Clamp
recipient previews to the declared recipientCount at the sanitize boundary
so a count of 1 with 2 previews can no longer render inconsistently.
Addresses both ClawSweeper findings on #130116.
* refactor(approvals): extract text sanitizer to break the exec-approvals import cycle
check:architecture flagged approval-scope joining the exec-approvals SCC
through exec-approval-command-display. Move the self-contained display
sanitizer into a leaf module (exec-approval-text-sanitize) with no
exec-approvals imports and migrate all sanitize importers; command-display
keeps only the payload-typed command/preview resolver.
* chore(plugin-sdk): ratchet public surface budgets down after sanitizer extraction
The approval display sanitizers left the publicly reachable SDK graph when
they moved to the exec-approval-text-sanitize leaf: exports 4343 -> 4338,
callable exports 2582 -> 2578. Shrink-only budget pin.
Copy file name to clipboardExpand all lines: docs/tools/exec-approvals.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -511,6 +511,23 @@ context when forwarding approved `system.run` requests:
511
511
- Once approved, the final forwarded `system.run` call reuses the stored plan instead of trusting later caller edits.
512
512
- If the caller changes `command`, `rawCommand`, `cwd`, `agentId`, or `sessionKey` after the approval request was created, the gateway rejects the forwarded run as an approval mismatch.
513
513
514
+
## Approval scope summaries
515
+
516
+
An approval owner can attach a typed, display-only scope describing the action's
517
+
blast radius. OpenClaw renders the sanitized summary on channel approval cards
518
+
and includes the bounded scope in the safe approval presentation available to
519
+
Control UI clients. Scope never grants authorization or changes approval policy.
520
+
521
+
-`message-send`: destination, recipient count, optional recipient preview, and
522
+
whether the audience is internal or external.
523
+
-`payment`: exact decimal amount, currency, and payee or payment system.
524
+
-`external-post`: destination and whether the post is public or restricted.
525
+
526
+
For example, an email approval might show `Send to 3 recipients via email
0 commit comments