Open
Conversation
Add Cedar authorization policy support to AgentCore CLI: - Schema: PolicyEngine and Policy schemas with Zod validation - TUI: Full add/remove wizards for policy engines and policies - Source methods: Cedar file, inline statement, or AI generation - Gateway selection for generation flow - Expandable text input for generation prompts - CLI: Non-interactive add/remove commands with all flags - agentcore add policy-engine --name <name> - agentcore add policy --name <name> --engine <engine> --source/--statement/--generate - agentcore remove policy-engine/policy --name <name> - Deploy: CDK construct integration, CloudFormation output parsing, deployed state tracking with composite engine/policy keys - Status: Policy engines and policies shown in status command and ResourceGraph TUI with correct deployment state diffing - Generation: StartPolicyGeneration + waiter integration with deployed engine ID and gateway ARN resolution - Validation: Schema validation for names, statements, validation modes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…e collisions Policies are nested under engines, so the same policy name can exist in multiple engines. Switch getRemovable/remove/previewRemove to use an "engineName/policyName" composite key so the generic TUI remove flow can uniquely identify policies with a single string. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Regenerate lock file with npm@10 to resolve missing yaml@2.8.2 dependency entry that caused `npm ci` failures on Node 20.x and 22.x. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Merge duplicate imports in policy-generation.ts - Use dot notation instead of bracket notation in outputs test - Replace Array<T> with T[] in outputs.ts and useDeployFlow.ts - Add void operator for floating promises in AddPolicyFlow - Wrap async handlers with void for no-misused-promises - Escape quotes in JSX text in AddPolicyScreen - Fix prettier formatting across all changed files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… policy Previously, passing multiple source flags (e.g. --statement + --source) was silently accepted with an implicit precedence order. Now the command returns a clear error if more than one is provided. Also fix pre-existing type errors in dev config tests by adding the required policyEngines field to test fixtures. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add interactive TUI support for removing policy engines and policies, including menu entries, selection screens, confirmation, and success states. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…h credentials The createManagedOAuthCredential method was only writing the client secret with an incorrect env var name. Now correctly writes both _CLIENT_ID and _CLIENT_SECRET suffixed env vars, matching the pattern used by CredentialPrimitive. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The "Generate a Cedar policy" option's disabled description was too long
("Requires deployed engine — run `deploy` first") and got cut off in
narrow terminals. Shortened to "Deploy engine first".
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ion-truncation fix: shorten disabled policy generate description to prevent truncation
Screenshots of the complete TUI flow: create project, add agent, deploy, invoke, remove agent, deploy removal. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Full end-to-end test of policy engine lifecycle: - Gateway creation with OAuth (screenshots 01-10) - Gateway target creation - ExaSearch MCP (screenshot 11) - Agent creation - SearchAgent Strands/Python (screenshot 12) - Deploy and invoke - 4 tools available, web search works (screenshots 13-14) - Policy engine creation and ENFORCE mode deploy (screenshots 15-16) - Default deny verification - tools blocked (screenshot 17) - Natural language policy generation for Cedar (screenshot 18) - Final deploy with policy and invoke verification (screenshots 19-21) - Permitted: "cloud computing" search returns results - Blocked: "Jesse Turner" search restricted by policy Issues found: progress bar counter overflow, LOG_ONLY default mode, TTY requirement. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Package Tarballaws-agentcore-0.3.0-preview.6.1.tgz How to installnpm install https://github.com/jesseturner21/agentcore-cli/releases/download/pr-10-tarball/aws-agentcore-0.3.0-preview.6.1.tgz |
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.
Policy E2E Test Evidence (2026-03-22)
Full end-to-end test of the policy engine lifecycle through the CLI TUI. All 13 steps completed successfully.
1. Main Menu & Add Resource
2. Gateway Creation (OAuth)
Gateway creation success output
3. Gateway Target Creation (ExaSearch MCP)
4. Agent Creation (SearchAgent - Strands/Python/Bedrock)
5. First Deploy — Verified: 4 tools available, web search works
Deploy completed output
6. First Invoke — Web search works
7. Policy Engine Creation (TestEngine → TestGateway)
8. Deploy with Policy Engine (ENFORCE mode) — Tools blocked by default deny
Deploy with enforce output
9. Invoke — Default Deny Verified (only add_numbers available)
10. Policy Generation via Natural Language
Prompt: "permit all web search calls unless the input contains Jesse Turner"
Generated Cedar Policy
11. Final Deploy with Policy
12. ✅ Invoke PERMITTED — "cloud computing" search returns results
13. ✅ Invoke BLOCKED — "Jesse Turner" search restricted by policy
Issues Found
String.repeaterror with negative valueagentcore deployrequires interactive terminal for Ink TUIProgress Flow
See
progress.txtfor the full step-by-step test log.🤖 Generated with Claude Code