Skip to content

feat(runtime): add one-shot additional permission grants - #969

Merged
likun666661 merged 1 commit into
apache:mainfrom
YayoiNanoka:feat/runtime-additional-permission-grants
Jul 14, 2026
Merged

likun666661 merged 1 commit into
apache:mainfrom
YayoiNanoka:feat/runtime-additional-permission-grants

Conversation

@YayoiNanoka

Copy link
Copy Markdown
Contributor

Summary

  • add a discriminated additional-permission approval request contract without exposing raw tool arguments
  • extend PermissionEngine to validate proposals and combine base tool approval with one additional-permission prompt
  • issue immutable, intent-bound grants with a five-minute TTL and enforce exact single consumption
  • fail closed on tampering, explicit deny, unsupported modes, timeout, abort, expiry, reuse, and intent mismatch
  • project the bounded approval payload into RuntimeEvent while keeping the dedicated CLI and Desktop approval surfaces for a later slice

Scope

Refs #509.

This is the next independently mergeable slice extracted from #880, following #960 and #964. It implements the approval and grant lifecycle only. It does not yet wire additional-permission planning into ToolRuntime, apply grants during tool execution, or add the dedicated Desktop/CLI approval UI.

Verification

  • npm test --workspace @maka/core: 947 passed
  • npm test --workspace @maka/runtime: 1597 passed, 0 failed, 7 platform skips
  • npm run build
  • npm run typecheck
  • git diff --check

@likun666661
likun666661 merged commit 3ef895d into apache:main Jul 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants