-
Notifications
You must be signed in to change notification settings - Fork 0
hybrid 59 add sender and subjects back to runtime #93
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
Draft
ian
wants to merge
9
commits into
main
Choose a base branch
from
hybrid-59-add-sender-and-subjects-back-to-runtime
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
- Add isFromSelf() method to FilterAPI as alias for fromSelf() - Add async isFrom(address) method to filter by Ethereum address - Update filterMessages to support both sync and async filter callbacks - Implement address resolution using AddressResolver with caching - Add comprehensive test coverage for both new methods - Export AddressResolver from @hybrd/xmtp package - Update README with new filter methods and async usage example
Move AddressResolver instantiation outside filterAPI to enable cache reuse across multiple isFrom() filter calls within the same context, improving performance as recommended by code review.
- Uncommented sender and subjects fields in AgentRuntime interface - Added resolveSender() helper function in XMTP plugin to resolve sender addresses - Integrated address resolution using AddressResolver and BasenameResolver - Added subjects extraction from message content using extractSubjects() - Updated all 4 message handler locations to populate runtime.sender and runtime.subjects - Simplified isFrom() filter to use runtime.sender.address directly - Updated tests to mock runtime.sender and runtime.subjects - Removed redundant AddressResolver instantiation from filter-messages behavior This resolves the performance concern by resolving addresses once at the runtime level rather than repeatedly in filter methods. Fixes HYBRID-59 Relates to HYBRID-57
Resolved merge conflict in packages/xmtp/src/plugin.ts by accepting origin/main's restructured event handler architecture which already includes the HYBRID-59 sender/subjects resolution logic.
…lvers - Replace individual resolver imports with top-level Resolver class - Remove custom resolveSender() function, use Resolver.createXmtpSender() - Update extractSubjects() to accept Resolver instance - Use Resolver.resolveName() for universal name resolution - Create single Resolver instance shared across all event handlers - Fix test mock to include required senderInboxId field Addresses code review feedback from Ian on PR #88
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
Deploying hybrid with
|
| Latest commit: |
d8ac202
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://8e3dd1c7.hybrid-2zz.pages.dev |
| Branch Preview URL: | https://hybrid-59-add-sender-and-sub.hybrid-2zz.pages.dev |
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.
Summary by cubic
Adds sender and subjects to the Agent runtime and introduces new message filters (isFromSelf and async isFrom) for address-aware behaviors. Refactors XMTP integration with a unified resolver and caching for more reliable, faster address/name resolution, aligning with HYBRID-59 and supporting HYBRID-57.
New Features
Refactors