-
Notifications
You must be signed in to change notification settings - Fork 5.4k
feat: add get action results #6081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Claude finished @standujar's task —— View job PR Review Complete ✅Todo List:
Review Feedback:✅ APPROVED - This is a clean, well-implemented addition. Key Findings:
Implementation Quality:
Security & Best Practices:
This change provides a clean public API for plugins to access action results, replacing the need for unsafe casting to internal implementation details. The implementation is solid and the tests are comprehensive. |
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
was going to balk but encapsulation, I get it. Thumbs up from me |
Risks
Low. This change is purely additive - it adds a new public method to the
IAgentRuntime
interface without modifying any existing functionality. No breaking changes.What could be affected:
Background
What does this PR do?
Adds a public
getActionResults(messageId: UUID): ActionResult[]
method to theIAgentRuntime
interface andAgentRuntime
class, providing a clean, type-safe API for plugins to retrieve action execution results after callingprocessActions()
.Currently, plugins that need to execute actions and retrieve their results must cast
IAgentRuntime
toAgentRuntime
to access the internalstateCache
, which is not type-safe and relies on implementation details.What kind of change is this?
Why are we doing this? Any context or related work?
Plugins like workers need to execute actions programmatically and retrieve structured results for further processing. The current workaround requires casting to the concrete implementation and accessing internal cache, which is fragile and not part of the public API.
This PR provides:
Documentation changes needed?
My changes require a change to the project documentation.
getActionResults()
method added in code commentsTesting
Where should a reviewer start?
packages/core/src/types/runtime.ts
packages/core/src/runtime.ts
packages/core/src/__tests__/runtime.test.ts
Detailed testing steps
None: Automated tests are acceptable.
All tests pass (33 pass, 0 fail):