openclaw-app 1.1.1 → 1.1.2

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/index.ts CHANGED
@@ -913,18 +913,16 @@ async function handleInbound(ctx: any, accountId: string, msg: any) {
913
913
  peer: { kind: "direct", id: senderId },
914
914
  });
915
915
 
916
- // If the app specified a sessionKey (UUID-based), derive an isolated
917
- // Gateway session so each mobile conversation has its own context.
918
- // Format: "agent:main:mobile-<uuid>"
919
- // No appSessionKey use the route's mainSessionKey (default conversation).
916
+ // Derive an isolated Gateway session for each mobile conversation.
917
+ // If the app provides an agentId, route to that agent's session:
918
+ // agent:<agentId>:mobile-<appSessionKey>
919
+ // Otherwise fall back to the default main agent route.
920
920
  let sessionKey: string;
921
921
  const appSessionKey = msg.sessionKey ? String(msg.sessionKey) : null;
922
+ const msgAgentId = msg.agentId ? String(msg.agentId) : null;
922
923
  if (appSessionKey) {
923
- // Extract agent prefix from mainSessionKey e.g. "agent:main:" from "agent:main:main"
924
- const mainKey = route.mainSessionKey as string;
925
- const colonIdx = mainKey.lastIndexOf(':');
926
- const agentPrefix = colonIdx > 0 ? mainKey.substring(0, colonIdx + 1) : '';
927
- sessionKey = `${agentPrefix}mobile-${appSessionKey}`;
924
+ const agentId = msgAgentId || 'main';
925
+ sessionKey = `agent:${agentId}:mobile-${appSessionKey}`;
928
926
  } else {
929
927
  sessionKey = route.mainSessionKey;
930
928
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "openclaw-app",
3
3
  "name": "OpenClaw App",
4
- "version": "1.1.1",
4
+ "version": "1.1.2",
5
5
  "description": "Mobile app channel for OpenClaw — chat via the OpenClaw App app through a Cloudflare Worker relay.",
6
6
  "channels": [
7
7
  "openclaw-app"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-app",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "OpenClaw App channel plugin — relay bridge for the OpenClaw App app",
5
5
  "main": "index.ts",
6
6
  "type": "module",