openclaw-threema 0.6.3 → 0.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.4 (2026-05-04)
4
+
5
+ ### Fixed
6
+ - v0.6.3 introduced a regression where file inbounds always fell back to
7
+ the legacy `enqueueSystemEvent` path. The new pipeline branch was
8
+ trying to call a non-existent `channelRuntime.reply.resolveDirectSession-
9
+ Key`. The text path doesn't use that helper at all; it uses
10
+ `channelRuntime.routing.resolveAgentRoute` + `buildAgentSessionKey`.
11
+ This release applies the same approach to the file path, so file
12
+ inbounds finally land in the live Threema DM session.
13
+ - Symptom: `Threema file inbound pipeline error: channelRuntime.reply.
14
+ resolveDirectSessionKey is not a function` followed by
15
+ `dispatched via enqueueSystemEvent (fallback)` for every file message.
16
+
3
17
  ## 0.6.3 (2026-05-04)
4
18
 
5
19
  ### Fixed
package/dist/index.js CHANGED
@@ -1677,11 +1677,22 @@ export default function register(api) {
1677
1677
  // session, runs the agent in-context, and lets us reply via
1678
1678
  // dispatchReplyWithBufferedBlockDispatcher just like text.
1679
1679
  const channelRuntime = runtime?.channel;
1680
- if (channelRuntime?.reply?.finalizeInboundContext
1680
+ if (channelRuntime?.routing?.resolveAgentRoute
1681
+ && channelRuntime?.routing?.buildAgentSessionKey
1682
+ && channelRuntime?.reply?.finalizeInboundContext
1681
1683
  && channelRuntime?.reply?.dispatchReplyWithBufferedBlockDispatcher) {
1682
1684
  try {
1683
1685
  const currentCfg = runtime.config.loadConfig();
1684
- const sessionKey = channelRuntime.reply.resolveDirectSessionKey({
1686
+ // Resolve the same agent route + session key the text path uses
1687
+ // so file inbounds end up in the live Threema DM session.
1688
+ const route = channelRuntime.routing.resolveAgentRoute({
1689
+ cfg: currentCfg,
1690
+ channel: "threema",
1691
+ accountId: "default",
1692
+ peer: { kind: "direct", id: from },
1693
+ });
1694
+ const sessionKey = channelRuntime.routing.buildAgentSessionKey({
1695
+ agentId: route.agentId,
1685
1696
  channel: "threema",
1686
1697
  accountId: "default",
1687
1698
  peer: { kind: "direct", id: from },
package/index.ts CHANGED
@@ -2121,11 +2121,24 @@ export default function register(api: any) {
2121
2121
  // session, runs the agent in-context, and lets us reply via
2122
2122
  // dispatchReplyWithBufferedBlockDispatcher just like text.
2123
2123
  const channelRuntime = runtime?.channel;
2124
- if (channelRuntime?.reply?.finalizeInboundContext
2124
+ if (channelRuntime?.routing?.resolveAgentRoute
2125
+ && channelRuntime?.routing?.buildAgentSessionKey
2126
+ && channelRuntime?.reply?.finalizeInboundContext
2125
2127
  && channelRuntime?.reply?.dispatchReplyWithBufferedBlockDispatcher) {
2126
2128
  try {
2127
2129
  const currentCfg = runtime.config.loadConfig();
2128
- const sessionKey = channelRuntime.reply.resolveDirectSessionKey({
2130
+
2131
+ // Resolve the same agent route + session key the text path uses
2132
+ // so file inbounds end up in the live Threema DM session.
2133
+ const route = channelRuntime.routing.resolveAgentRoute({
2134
+ cfg: currentCfg,
2135
+ channel: "threema",
2136
+ accountId: "default",
2137
+ peer: { kind: "direct", id: from },
2138
+ });
2139
+
2140
+ const sessionKey = channelRuntime.routing.buildAgentSessionKey({
2141
+ agentId: route.agentId,
2129
2142
  channel: "threema",
2130
2143
  accountId: "default",
2131
2144
  peer: { kind: "direct", id: from },
@@ -2,7 +2,7 @@
2
2
  "id": "threema",
3
3
  "name": "Threema Gateway",
4
4
  "description": "Threema messaging channel via Threema Gateway API (E2E encrypted)",
5
- "version": "0.6.3",
5
+ "version": "0.6.4",
6
6
  "channels": [
7
7
  "threema"
8
8
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-threema",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "description": "Threema Gateway channel plugin for OpenClaw",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",