Skip to content

feat(protos): require a delegation permission before an agent may dispatch to another - #607

Merged
yordis merged 1 commit into
yordis/feat-model-ceilingsfrom
yordis/feat-delegation-permissions
Oct 19, 2026
Merged

yordis merged 1 commit into
yordis/feat-model-ceilingsfrom
yordis/feat-delegation-permissions

Conversation

@yordis

@yordis yordis commented Oct 18, 2026 •

Copy link
Copy Markdown
Member
  • A delegate declaration grants no authority by design, yet nothing else granted it either, so a delegation was admitted on the strength of a declaration alone.
  • Absence is denial from the first day because a default derived from declarations would be a grant with no record of who made it.
  • Initialization exists so provisioning can install the permission an Agent with a required delegate declaration needs before its first Session.

…patch to another

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@yordis
yordis added this pull request to stack #608 October 18, 2026 05:03
@cursor

cursor Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

PR Summary

High Risk
Defines authorization for agent-to-agent delegation (deny-by-default, provisioning hooks, and admission ordering); incorrect semantics would directly affect who may dispatch to whom.

Overview
Introduces a new policy.delegation_permissions protobuf module so delegation is deny-by-default: a DelegateDeclaration no longer implies authority; dispatch requires an explicit DelegationPermissionPolicy on the subject or an ancestor (union of permits), with identity-based targets (exact AgentId or agents_under a hierarchy node), uniqueness validation, and event-sourced initialize / set / clear commands plus fold state, events, and Decider fault templates.

DelegateDeclaration comments now state that delegate resolution runs in the Session hierarchy scope first, then the resolved Agent is checked against the dispatching Agent’s delegation permissions—policy may refuse but never substitute another target (ADR#0071).

Adds POLICY_RULE_KIND_DELEGATION_PERMISSION to PolicyRuleRef so admission and accounting can record which delegation-permission stream revision was evaluated.

Reviewed by Cursor Bugbot for commit 0e4af7f. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9f0ec8d1-2827-4c0e-a25b-bd71f1e6fc43
📥 Commits

Reviewing files that changed from the base of the PR and between 331aed9 and 0e4af7f.

📒 Files selected for processing: 12
  • proto/trogonai/agents/agents/v1alpha1/dependencies.proto
  • proto/trogonai/policy/delegation_permissions/state/v1alpha1/state.proto
  • proto/trogonai/policy/delegation_permissions/v1alpha1/clear_delegation_permission.proto
  • proto/trogonai/policy/delegation_permissions/v1alpha1/delegation_permission_cleared.proto
  • proto/trogonai/policy/delegation_permissions/v1alpha1/delegation_permission_initialized.proto
  • proto/trogonai/policy/delegation_permissions/v1alpha1/delegation_permission_set.proto
  • proto/trogonai/policy/delegation_permissions/v1alpha1/events.proto
  • proto/trogonai/policy/delegation_permissions/v1alpha1/faults.proto
  • proto/trogonai/policy/delegation_permissions/v1alpha1/initialize_delegation_permission.proto
  • proto/trogonai/policy/delegation_permissions/v1alpha1/permission_policy.proto
  • proto/trogonai/policy/delegation_permissions/v1alpha1/set_delegation_permission.proto
  • proto/trogonai/policy/subjects/v1alpha1/rule_ref.proto
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@yordis
yordis marked this pull request as ready for review October 19, 2026 11:53
@yordis
yordis merged commit 62c66d8 into main Oct 19, 2026
18 of 24 checks passed
@yordis
yordis deleted the yordis/feat-delegation-permissions branch October 19, 2026 11:53
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.

1 participant