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 +17 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
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
|
-
|
|
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 =
|
|
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';
|
package/openclaw.plugin.json
CHANGED