Update agent policy and rule workspace handling#99
Open
qasim-nylas wants to merge 10 commits into
Open
Conversation
- Migrate agent integration tests to the workspace model: attach policies and rules via UpdateWorkspace and assert on workspace.PolicyID / workspace.RulesIDs instead of grant settings.policy_id / policy.rules. The policy.rules helpers are kept only for the non-agent (detached) policy exercised by the mixed-scope safety test. - Show "Workspace ID" in `nylas agent account list` (parity with create/get/update); update docs/commands/agent.md example. - Remove the legacy no-workspace fallback paths (attachRuleToPolicy, detachRuleFromPolicies, rollbackPolicyRuleUpdates, policiesLeftEmptyByRuleRemoval, refreshPolicies, buildRuleRefsByID shim, hasWorkspaceRefs branch, AllAgentPolicies scope field) now that the Nylas API backend performs that fallback server-side. Fail loud when an agent account has no workspace instead of silently no-oping rule create/delete. The cross-scope "shared with a non-agent policy" safety check is kept.
… /v3/policies - account list/status: resolve and display policy_id from workspace - policy list: list all policies from /v3/policies with workspace refs - Remove --all flag and resolveAgentAccountWorkspacePolicy (no longer needed)
…elete) - Add ListWorkspaces, CreateWorkspace, DeleteWorkspace to port/adapter - Add CreateWorkspaceRequest domain type - Wire up nylas workspace CLI with aliases (workspaces, ws)
…rkspaces - Remove --policy-id from account create and rule commands - Remove --all from policy list and rule list - Rules route through workspace rules_ids[] directly, not via policies - Policy list and rule list call /v3/policies and /v3/rules directly - Simplify detachRuleFromAgentWorkspaces to accept []policyAgentAccountRef - Add rollback on delete failure, strict error variant for mutation paths - Fix Air handlers to surface workspace fetch errors as 500s - Fix RuleAction.Value any-type print handling - Add workspace dedup in buildWorkspacePolicyRefs/buildWorkspaceRuleRefsStrict - Validate workspace update requires at least one flag - Update docs and integration tests to match new workspace flow - Fix auth list regression test for changed error message
- Update agent-policy.md to remove --all flag and --policy-id on create - Fix resolvePolicyForAgentOps error message referencing removed --all flag - Add workspace package unit tests for command structure and flags
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.