@wakeshift/openclaw 1.4.44 → 1.4.46
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/beacon.js +33 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/beacon.js
CHANGED
|
@@ -157,10 +157,24 @@ function metaIn(result, depth) {
|
|
|
157
157
|
export function mcpServer(tool) {
|
|
158
158
|
if (typeof tool !== "string")
|
|
159
159
|
return "";
|
|
160
|
+
const dotted = codexItemName(tool);
|
|
161
|
+
if (dotted)
|
|
162
|
+
return dotted[0];
|
|
160
163
|
const rest = tool.startsWith("mcp__") ? tool.slice(5) : tool;
|
|
161
164
|
const i = rest.indexOf("__");
|
|
162
165
|
return i > 0 && i + 2 < rest.length ? rest.slice(0, i) : "";
|
|
163
166
|
}
|
|
167
|
+
/**
|
|
168
|
+
* [server, tool] for the name OpenClaw's Codex event projector gives an MCP
|
|
169
|
+
* call's after_tool_call (`<server>.<tool>`, extensions/codex itemName):
|
|
170
|
+
* the install turn's results arrive so after a mid-turn install, before
|
|
171
|
+
* Codex's PostToolUse is relayed (`mcp__<server>__<tool>`). Only with
|
|
172
|
+
* exactly one dot, so a server named with a dot can't pass for another.
|
|
173
|
+
*/
|
|
174
|
+
function codexItemName(tool) {
|
|
175
|
+
const m = /^([A-Za-z0-9_-]+)\.([A-Za-z0-9_-]+)$/.exec(tool);
|
|
176
|
+
return m && !tool.includes("__") ? [m[1], m[2]] : undefined;
|
|
177
|
+
}
|
|
164
178
|
/**
|
|
165
179
|
* The MCP tool an OpenClaw tool name names (what follows its server's
|
|
166
180
|
* "__", as mcpServer splits it), "" for a tool that isn't an MCP server's.
|
|
@@ -170,6 +184,9 @@ export function mcpTool(tool) {
|
|
|
170
184
|
if (!server)
|
|
171
185
|
return "";
|
|
172
186
|
const name = tool;
|
|
187
|
+
const dotted = codexItemName(name);
|
|
188
|
+
if (dotted)
|
|
189
|
+
return dotted[1];
|
|
173
190
|
const rest = name.startsWith("mcp__") ? name.slice(5) : name;
|
|
174
191
|
return rest.slice(server.length + 2);
|
|
175
192
|
}
|
|
@@ -219,6 +236,21 @@ export function resultText(result, depth = 0) {
|
|
|
219
236
|
}
|
|
220
237
|
return "";
|
|
221
238
|
}
|
|
239
|
+
/**
|
|
240
|
+
* The MCP result's own _meta where OpenClaw hands after_tool_call a Codex
|
|
241
|
+
* mcpToolCall item's result as {status, durationMs, error?, result: <the
|
|
242
|
+
* MCP CallToolResult>} (extensions/codex, event-projector-tool-items.ts
|
|
243
|
+
* itemToolResult: the event projector's path, taken when Codex's
|
|
244
|
+
* PostToolUse isn't relayed for the turn, as after a plugin is installed
|
|
245
|
+
* mid-thread). That result is the server's own, not text a tool returned:
|
|
246
|
+
* only an object whose result has the CallToolResult's content array.
|
|
247
|
+
*/
|
|
248
|
+
function codexItemMeta(v) {
|
|
249
|
+
const r = v.result;
|
|
250
|
+
if (typeof v.status !== "string" || !r || typeof r !== "object" || !Array.isArray(r.content))
|
|
251
|
+
return "";
|
|
252
|
+
return ownMeta(r);
|
|
253
|
+
}
|
|
222
254
|
function ownMeta(v) {
|
|
223
255
|
if (!v || typeof v !== "object")
|
|
224
256
|
return "";
|
|
@@ -253,7 +285,7 @@ export function findBeacon(result) {
|
|
|
253
285
|
const t = trailer(resultText(result));
|
|
254
286
|
return t ? { token: t, carried: "text" } : { token: "", carried: "" };
|
|
255
287
|
}
|
|
256
|
-
const own = ownMeta(v) || (v && typeof v === "object" ? ownMeta(v.details) : "");
|
|
288
|
+
const own = ownMeta(v) || (v && typeof v === "object" ? ownMeta(v.details) || codexItemMeta(v) : "");
|
|
257
289
|
if (own)
|
|
258
290
|
return { token: own, carried: "meta" };
|
|
259
291
|
// The text's last line before a _meta further in: a document a tool
|
package/dist/version.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// ask the user to update. "dev" here; `npm run pack` stamps the build's
|
|
4
4
|
// version into dist/version.js (scripts/stamp-version.mjs, from
|
|
5
5
|
// WAKESHIFT_VERSION).
|
|
6
|
-
export const VERSION = "2026.11.
|
|
6
|
+
export const VERSION = "2026.11.11.2130+8e504c8";
|
|
7
7
|
export const CLIENT_HEADER = "X-Wakeshift-Connector";
|
|
8
8
|
/** X-Wakeshift-Connector's value: wakeshift-openclaw/<version> openclaw. */
|
|
9
9
|
export function clientHeader(version = VERSION) {
|
package/package.json
CHANGED