Skip to content

TT-4413: add agent account, policy, and rule management#52

Merged
qasim-nylas merged 2 commits intomainfrom
qasim/tt-4413-agent-policy-rule
Apr 15, 2026
Merged

TT-4413: add agent account, policy, and rule management#52
qasim-nylas merged 2 commits intomainfrom
qasim/tt-4413-agent-policy-rule

Conversation

@qasim-nylas
Copy link
Copy Markdown
Collaborator

Summary

  • move managed agent grant operations under nylas agent account, add account get, and support --policy-id during agent account creation
  • add agent-scoped nylas agent policy CRUD with default-account scoping, --all visibility across provider=nylas accounts, richer text rendering, and attachment guardrails
  • add agent-scoped nylas agent rule CRUD with default-policy scoping, common-case flag-based create/update flows, scope validation, and rule/policy safety checks
  • add detailed command docs for agent policy and rule workflows, and expand unit/integration coverage for the new account/policy/rule paths

What Changed

  • renamed the original flat agent account commands into the nylas agent account namespace and kept nylas agent status as the top-level health/check entrypoint
  • added new policy domain/port/adapter implementations plus demo/mock clients for policy CRUD
  • added new rule domain/port/adapter implementations plus demo/mock clients for rule CRUD
  • implemented nylas agent policy list|get|read|create|update|delete
  • implemented nylas agent rule list|get|read|create|update|delete
  • made agent policy list and agent rule list resolve through provider=nylas accounts and attached policies instead of exposing app-global resources directly
  • added rule creation/update flag UX for common cases: --name, --description, --priority, --enabled / --disabled, --trigger, repeatable --condition, repeatable --action
  • added guardrails to block deleting attached policies, deleting the last rule on an attached policy, and mutating rules that fall outside agent scope or are shared outside agent scope
  • split out dedicated docs for policy and rule usage under docs/commands/agent-policy.md and docs/commands/agent-rule.md
  • added supporting reliability/test fixes in the Nylas adapter and integration suite used by this branch

Validation

  • make test-integration
  • make test-air-integration

@qasim-nylas qasim-nylas requested a review from AaronDDM April 15, 2026 16:53
AaronDDM
AaronDDM previously approved these changes Apr 15, 2026
Copy link
Copy Markdown
Collaborator

@AaronDDM AaronDDM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link
Copy Markdown
Collaborator

@AaronDDM AaronDDM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@qasim-nylas qasim-nylas merged commit 989ab37 into main Apr 15, 2026
6 checks passed
@qasim-nylas qasim-nylas deleted the qasim/tt-4413-agent-policy-rule branch April 15, 2026 17:39
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