@gecho-ai/gecho-bridge 1.1.4 → 1.1.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gecho-ai/gecho-bridge",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "MCP Bridge for TikTok Extension Relay - Connecting LLMs to TikTok via Chrome Extension",
5
5
  "main": "mcp-client.js",
6
6
  "bin": {
package/search_direct.js CHANGED
@@ -55,7 +55,10 @@ async function searchTikTok(query) {
55
55
  reject(error);
56
56
  });
57
57
 
58
- req.write(JSON.stringify({ query }));
58
+ req.write(JSON.stringify({
59
+ action:'tiktok_insight',
60
+ query:query,
61
+ }));
59
62
  req.end();
60
63
  });
61
64
  }
package/server.js CHANGED
@@ -174,7 +174,8 @@ const server = http.createServer(async (req, res) => {
174
174
 
175
175
  console.log(`🚀 Dispatching action: [${action}]`);
176
176
  const requestId = `svc-${Date.now()}-${requestIdCounter++}`;
177
-
177
+ // 通用透传逻辑:将 payload 中的所有参数(除去 action)作为 params 传给插件
178
+ const { action: _a, ...params } = payload;
178
179
  const result = await new Promise((resolve) => {
179
180
  const timeoutId = setTimeout(() => {
180
181
  pendingRequests.delete(requestId);
@@ -183,8 +184,7 @@ const server = http.createServer(async (req, res) => {
183
184
 
184
185
  pendingRequests.set(requestId, { resolve, timeoutId });
185
186
 
186
- // 通用透传逻辑:将 payload 中的所有参数(除去 action)作为 params 传给插件
187
- const { action: _a, ...params } = payload;
187
+
188
188
 
189
189
  extensionSocket.send(JSON.stringify({
190
190
  method: "execute_action",