Skip to content
This repository was archived by the owner on Feb 27, 2026. It is now read-only.

Add reactions support and account autocreation#24

Draft
neekolas wants to merge 1 commit into
02-15-add_xmtp_extensionfrom
02-15-add_reactions_support
Draft

Add reactions support and account autocreation#24
neekolas wants to merge 1 commit into
02-15-add_xmtp_extensionfrom
02-15-add_reactions_support

Conversation

@neekolas
Copy link
Copy Markdown

@neekolas neekolas commented Feb 16, 2026

Summary

  • Problem: XMTP extension lacked support for message reactions and required manual configuration of encryption keys
  • Why it matters: Reactions are a core messaging feature, and manual key configuration creates friction for users
  • What changed: Added reaction support and auto-provisioning of XMTP wallet and encryption keys
  • What did NOT change: Core message handling and conversation management remain the same

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #

User-visible / Behavior Changes

  • Added support for message reactions in XMTP
  • XMTP accounts now auto-provision required keys when not manually configured
  • New agent action react available for XMTP messages with parameters: to, messageId, emoji, and optional remove

Security Impact (required)

  • New permissions/capabilities? (Yes)
  • Secrets/tokens handling changed? (Yes)
  • New/changed network calls? (Yes)
  • Command/tool execution surface changed? (No)
  • Data access scope changed? (No)
  • If any Yes, explain risk + mitigation:
    • Auto-generated wallet and encryption keys are securely stored in config
    • New reaction capability follows same security model as existing message sending
    • New network calls are limited to standard XMTP reaction protocol

Repro + Verification

Environment

  • OS: Linux
  • Runtime/container: Node.js
  • Model/provider: Any
  • Integration/channel: XMTP
  • Relevant config: XMTP channel configuration

Steps

  1. Configure XMTP extension without specifying keys
  2. Start the extension
  3. Send a message to a conversation
  4. React to a message using the new react action

Expected

  • Keys are auto-provisioned
  • Reaction is sent and appears in the conversation

Actual

  • Keys are auto-provisioned
  • Reaction is sent and appears in the conversation

Evidence

  • Failing test/log before + passing after

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios: Auto-provisioning of keys, sending and receiving reactions
  • Edge cases checked: Removing reactions, handling missing keys
  • What you did not verify: Long-term key storage persistence across restarts

Compatibility / Migration

  • Backward compatible? (Yes)
  • Config/env changes? (No)
  • Migration needed? (No)

Failure Recovery (if this breaks)

  • How to disable/revert this change quickly: Manually configure XMTP keys in config
  • Files/config to restore: Original XMTP configuration
  • Known bad symptoms reviewers should watch for: Failed key generation, reaction errors

Risks and Mitigations

  • Risk: Auto-generated keys might not be backed up by users
    • Mitigation: Keys are stored in config file which should be included in normal backup procedures

Copy link
Copy Markdown
Author

neekolas commented Feb 16, 2026

@macroscopeapp
Copy link
Copy Markdown

macroscopeapp Bot commented Feb 16, 2026

Add XMTP message reactions and auto-provision missing account keys in accounts.autoProvisionAccount

Implement accounts.autoProvisionAccount to generate and persist missing walletKey, publicAddress, and dbEncryptionKey; add react action handling and advertise reaction support; wire inbound reaction processing via channel.handleInboundReaction and lifecycle handlers; update tests and agent hints.

📍Where to Start

Start with startAccount and buildReactionHandler in gateway-lifecycle.ts, then review autoProvisionAccount in accounts.ts.


📊 Macroscope summarized 3f49f47. 5 files reviewed, 7 issues evaluated, 0 issues filtered, 1 comment posted. View details

@github-actions
Copy link
Copy Markdown

⚠️ Formal models conformance drift detected

The formal models extracted constants (generated/*) do not match this openclaw PR.

This check is informational (not blocking merges yet).
See the formal-models-conformance-drift artifact for the diff.

If this change is intentional, follow up by updating the formal models repo or regenerating the extracted artifacts there.

Comment on lines +148 to +149
const conversationId = msgCtx.conversation?.id as string;
const isDirect = msgCtx.isDm();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium

src/gateway-lifecycle.ts:148 conversationId is cast to string but msgCtx.conversation?.id can be undefined, causing a TypeError when .slice() is called later. Consider adding an early return if conversationId is falsy.

Suggested change
const conversationId = msgCtx.conversation?.id as string;
const isDirect = msgCtx.isDm();
const conversationId = msgCtx.conversation?.id as string;
const isDirect = msgCtx.isDm();
if (!conversationId) return;

🚀 Want me to fix this? Reply ex: "fix it for me".

🤖 Prompt for AI
In file extensions/xmtp/src/gateway-lifecycle.ts around lines 148-149:

`conversationId` is cast to `string` but `msgCtx.conversation?.id` can be `undefined`, causing a `TypeError` when `.slice()` is called later. Consider adding an early return if `conversationId` is falsy.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant