oomi-ai 0.2.6 → 0.2.7

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/bin/oomi-ai.js CHANGED
@@ -771,10 +771,25 @@ function prepareGatewayFrameForLocalGateway(frameText, gatewayAuth, options = {}
771
771
  const params = frame.params && typeof frame.params === 'object' ? frame.params : {};
772
772
 
773
773
  const client = params.client && typeof params.client === 'object' ? params.client : {};
774
- client.id = typeof client.id === 'string' && client.id.trim() ? client.id.trim() : 'webchat-ui';
774
+ const incomingClientId = typeof client.id === 'string' ? client.id.trim().toLowerCase() : '';
775
+ const incomingClientMode = typeof client.mode === 'string' ? client.mode.trim().toLowerCase() : '';
776
+ const proxiedBrowserClient =
777
+ incomingClientMode === 'webchat' ||
778
+ incomingClientId === 'webchat-ui' ||
779
+ incomingClientId === 'webchat' ||
780
+ incomingClientId === 'clawdbot-control-ui';
781
+
782
+ // Frames relayed by this bridge originate from a local Node websocket, not a browser.
783
+ // Keep gateway auth/nonce flow, but normalize browser-mode connects to backend identity
784
+ // so Control UI/webchat Origin checks don't reject proxied sessions.
785
+ client.id = proxiedBrowserClient
786
+ ? 'node-host'
787
+ : (typeof client.id === 'string' && client.id.trim() ? client.id.trim() : 'node-host');
775
788
  client.version = typeof client.version === 'string' && client.version.trim() ? client.version.trim() : '0.1.0';
776
789
  client.platform = typeof client.platform === 'string' && client.platform.trim() ? client.platform.trim() : process.platform;
777
- client.mode = typeof client.mode === 'string' && client.mode.trim() ? client.mode.trim() : 'webchat';
790
+ client.mode = proxiedBrowserClient
791
+ ? 'backend'
792
+ : (typeof client.mode === 'string' && client.mode.trim() ? client.mode.trim() : 'backend');
778
793
  params.client = client;
779
794
 
780
795
  params.role = typeof params.role === 'string' && params.role.trim() ? params.role.trim() : 'operator';
@@ -2,7 +2,7 @@
2
2
  "id": "oomi-ai",
3
3
  "name": "Oomi Channel Plugin",
4
4
  "description": "Managed Oomi channel integration for OpenClaw.",
5
- "version": "0.2.4",
5
+ "version": "0.2.6",
6
6
  "author": "Oomi",
7
7
  "license": "MIT",
8
8
  "openclawVersion": ">=0.5.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oomi-ai",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "Oomi CLI for OpenClaw setup",
5
5
  "bin": {
6
6
  "oomi": "bin/oomi-ai.js"