@gloablehive/ipad-wechat-plugin 1.0.22 → 1.0.24

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/dist/index.js CHANGED
@@ -17,10 +17,10 @@ export default defineChannelPluginEntry({
17
17
  plugin: ipadWeChatPlugin,
18
18
  registerFull(api) {
19
19
  console.log("[iPad WeChat] registerFull called, registering webhook route");
20
- // Register webhook endpoint - use the standard path pattern
20
+ // Test with a simple different path
21
21
  api.registerHttpRoute({
22
- path: "/api/channels/ipad-wechat/webhook",
23
- auth: "gateway", // Use gateway auth for standard path
22
+ path: "/ipad-test-webhook",
23
+ auth: "plugin",
24
24
  match: "exact",
25
25
  handler: async (req, res) => {
26
26
  console.log("[iPad WeChat] Handler called, url:", req.url);
@@ -79,9 +79,19 @@ function getCacheManager(cfg) {
79
79
  // Initialize registry with accounts
80
80
  initializeRegistry(cfg);
81
81
  const basePath = section?.cachePath || "./cache/wechat-ipad";
82
+ // Build knowledge config if provided in section
83
+ let knowledgeConfig;
84
+ if (section?.knowledge) {
85
+ knowledgeConfig = {
86
+ ...section.knowledge,
87
+ nodeId: section.knowledge.nodeId || 'ipad-wechat-node',
88
+ agentId: section.knowledge.agentId || section.agentId || 'default-agent',
89
+ };
90
+ }
82
91
  cacheManager = createCacheManager({
83
92
  basePath,
84
93
  accounts,
94
+ knowledgeConfig,
85
95
  });
86
96
  // Initialize cache manager - await for ready state
87
97
  cacheManagerReady = cacheManager.init().catch(err => {
package/index.ts CHANGED
@@ -21,10 +21,10 @@ export default defineChannelPluginEntry({
21
21
  registerFull(api) {
22
22
  console.log("[iPad WeChat] registerFull called, registering webhook route");
23
23
 
24
- // Register webhook endpoint - use the standard path pattern
24
+ // Test with a simple different path
25
25
  api.registerHttpRoute({
26
- path: "/api/channels/ipad-wechat/webhook",
27
- auth: "gateway", // Use gateway auth for standard path
26
+ path: "/ipad-test-webhook",
27
+ auth: "plugin",
28
28
  match: "exact",
29
29
  handler: async (req, res) => {
30
30
  console.log("[iPad WeChat] Handler called, url:", (req as any).url);
@@ -91,7 +91,7 @@
91
91
  "channels": ["ipad-wechat"],
92
92
  "http": {
93
93
  "outbound": ["*"],
94
- "inbound": ["/ipad-wechat/webhook"]
94
+ "inbound": ["/api/channels/ipad-wechat/webhook"]
95
95
  }
96
96
  },
97
97
  "apiVersion": "1.0.0"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gloablehive/ipad-wechat-plugin",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
4
4
  "type": "module",
5
5
  "description": "OpenClaw channel plugin for iPad WeChat protocol - enables sending/receiving WeChat messages through iPad protocol",
6
6
  "main": "index.ts",
@@ -20,7 +20,7 @@
20
20
  }
21
21
  },
22
22
  "dependencies": {
23
- "@gloablehive/wechat-cache": "^1.0.2",
23
+ "@gloablehive/wechat-cache": "file:../wechat-cache",
24
24
  "openclaw": ">=1.0.0"
25
25
  },
26
26
  "devDependencies": {
package/src/channel.ts CHANGED
@@ -26,6 +26,7 @@ import {
26
26
  AccountRegistry,
27
27
  createAccountRegistry,
28
28
  RegisteredAccount,
29
+ KnowledgeConfig,
29
30
  } from "@gloablehive/wechat-cache";
30
31
 
31
32
  // Import client pool
@@ -107,9 +108,20 @@ function getCacheManager(cfg: OpenClawConfig): CacheManager {
107
108
 
108
109
  const basePath = section?.cachePath || "./cache/wechat-ipad";
109
110
 
111
+ // Build knowledge config if provided in section
112
+ let knowledgeConfig: (Partial<KnowledgeConfig> & { nodeId: string; agentId: string }) | undefined;
113
+ if (section?.knowledge) {
114
+ knowledgeConfig = {
115
+ ...section.knowledge,
116
+ nodeId: section.knowledge.nodeId || 'ipad-wechat-node',
117
+ agentId: section.knowledge.agentId || section.agentId || 'default-agent',
118
+ };
119
+ }
120
+
110
121
  cacheManager = createCacheManager({
111
122
  basePath,
112
123
  accounts,
124
+ knowledgeConfig,
113
125
  });
114
126
 
115
127
  // Initialize cache manager - await for ready state