palz-connector 1.1.2 → 1.1.3
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/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/palz-connector.config.json +2 -2
- package/src/bot.ts +8 -1
- package/src/types.ts +2 -0
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
package/src/bot.ts
CHANGED
|
@@ -141,7 +141,7 @@ async function dispatchPalzMessage(params: HandlePalzMessageParams): Promise<voi
|
|
|
141
141
|
log(`${tag}: [STEP 4 输出] mediaList=${JSON.stringify(mediaList.map((m) => ({ path: m.path, contentType: m.contentType })))} mediaPayload=${JSON.stringify(mediaPayload)}`);
|
|
142
142
|
|
|
143
143
|
// STEP 5: 解析路由
|
|
144
|
-
const routeInput = { cfg: "(cfg)", channel: "palz-connector", accountId, peer: { kind: "direct", id: peerId } };
|
|
144
|
+
const routeInput = { cfg: "(cfg)", channel: "palz-connector", accountId, peer: { kind: "direct", id: peerId }, agent_id: msg.agent_id };
|
|
145
145
|
log(`${tag}: [STEP 5/6 路由解析] 输入: ${JSON.stringify(routeInput)}`);
|
|
146
146
|
const route = core.channel.routing.resolveAgentRoute({
|
|
147
147
|
cfg,
|
|
@@ -149,6 +149,13 @@ async function dispatchPalzMessage(params: HandlePalzMessageParams): Promise<voi
|
|
|
149
149
|
accountId,
|
|
150
150
|
peer: { kind: "direct", id: peerId },
|
|
151
151
|
});
|
|
152
|
+
|
|
153
|
+
// 如果 IM 传入了 agent_id,覆盖路由结果
|
|
154
|
+
if (msg.agent_id) {
|
|
155
|
+
log(`${tag}: [STEP 5 覆盖] IM指定agent_id="${msg.agent_id}",覆盖原agentId="${route.agentId}"`);
|
|
156
|
+
route.agentId = msg.agent_id;
|
|
157
|
+
}
|
|
158
|
+
|
|
152
159
|
log(`${tag}: [STEP 5 输出] agentId=${route.agentId} sessionKey=${route.sessionKey} accountId=${route.accountId} matchedBy=${route.matchedBy}`);
|
|
153
160
|
|
|
154
161
|
// STEP 6a: 构建 envelope body
|