feat(memory): add read-only memory commands - #1836
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## refactor #1836 +/- ##
============================================
+ Coverage 95.60% 95.64% +0.03%
============================================
Files 181 185 +4
Lines 8834 8909 +75
============================================
+ Hits 8446 8521 +75
Misses 388 388 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
AI review failing because of a bug. Fix: #1823 |
Hweinstock
left a comment
There was a problem hiding this comment.
one question on TUI behavior, otherwise lgtm.
| name: "list", | ||
| description: "list AgentCore Memories", | ||
| flags: [ | ||
| flag("next-token", "pagination token returned by a previous request", z.string().optional()), |
There was a problem hiding this comment.
OOS here, but curious to others thoughts. Do we think its worth defining a shared flag for stuff like this? We already have the same definitions for runtime, harness, and now memory.
There was a problem hiding this comment.
Agreed, I’d prefer to keep that refactor out of this PR and follow up separately so it will be a follow-up once this is merged
There was a problem hiding this comment.
maybe we can raise as a parking lot. I do think there's an advantage to making them explicit so I'm curious to hear others' thoughts.
92d38f6 to
346e476
Compare
…only-cli # Conflicts: # README.md # src/handlers/index.tsx # src/handlers/root.test.tsx # src/testing/TestCoreClient.tsx
|
Follow up PR: shared flags |
- get: throw InputValidationError (modeled exception) instead of a raw TypeError when the required --id flag is omitted, matching current consensus error handling. - fixtures: replace the synthetic Memory fixtures (which RECORD=1 could not regenerate, since the IDs did not exist and recording overwrote the successes with not-found errors) with responses recorded against two persistent fixture Memories in the e2e-test account, matching Runtime and Identity. Assert an opaque list nextToken rather than a hand-authored value.
This PR adds the first Memory surface to the refactored CLI with Read-only commands.
Users can fetch a Memory with
agentcore memory get --id <memoryId>and list Memories with service-side pagination through--max-resultsand--next-token.getalso supports thefullandwithout_decryptionresponse views.The commands are backed by a feature-scoped core
MemoryClientusing the AWS SDK. This also wires Memory into the root command tree and test client, adds fixture-backed command coverage, and updates the REAMDE.Out of scope: data plane operations, memory mutations, TUI.
Next PR would be: dedicated TUI flows
Ran the bun CI checks and
bun buildsuccessfully.Manually tested all these commands E2E on my account and they were all successful and working as expected