@openclaw/clickclack 2026.10.10-beta.5 → 2026.11.5-beta.1
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/.setup/{channel-DRcZ_twH.mjs → channel-ByAANbh8.mjs} +382 -543
- package/dist/.setup/{resolve-Br3ylpSz.mjs → resolve-CRj6QjdF.mjs} +29 -46
- package/dist/.setup/{rolldown-runtime-B4FMCO8f.mjs → rolldown-runtime-782esTHO.mjs} +1 -3
- package/dist/.setup/{runtime-api-BrlvVAQJ.mjs → runtime-api-BsRK-sfA.mjs} +329 -383
- package/dist/.setup/{secret-contract-CF7TKtkU.mjs → secret-contract-Dj8nibUr.mjs} +1 -2
- package/dist/.setup/{secret-contract-api--45pFCg3.mjs → secret-contract-api-DS3Vv0Gu.mjs} +1 -1
- package/dist/.setup/{setup-claim-BPuQuMKW.mjs → setup-claim-BAKxfObl.mjs} +5 -11
- package/dist/.setup/{setup-plugin-api-Ccxm2ydn.mjs → setup-plugin-api-BTqE973B.mjs} +2 -3
- package/dist/.setup/setup-plugin-api-CfuhJJvK.mjs +1 -0
- package/dist/.setup/{setup-surface-BJ3jioqA.mjs → setup-surface-5wSYr6p2.mjs} +11 -17
- package/dist/.setup/{setup-verify-DGsYtVh9.mjs → setup-verify-IayKkFWq.mjs} +13 -26
- package/dist/.source-module-urls/aa673c321fe9be084b8926cbe5388ff5e2a41371389e19ca60a1983f2b634030.json +1 -1
- package/dist/api.js +3 -3
- package/dist/channel-plugin-api.js +1 -1
- package/dist/doctor-contract-api.js +6 -11
- package/dist/index.js +2 -3
- package/dist/runtime-api.js +4 -4
- package/dist/secret-contract-api.js +1 -1
- package/dist/setup-entry.js +3 -4
- package/dist/setup-plugin-api.js +1 -1
- package/node_modules/zod/package.json +1 -1
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +6 -0
- package/node_modules/zod/src/v4/core/compile.ts +9 -0
- package/node_modules/zod/src/v4/core/schemas.ts +35 -1
- package/node_modules/zod/src/v4/core/util.ts +13 -0
- package/node_modules/zod/src/v4/core/versions.ts +1 -1
- package/node_modules/zod/v4/core/compile.cjs +8 -0
- package/node_modules/zod/v4/core/compile.js +8 -0
- package/node_modules/zod/v4/core/schemas.cjs +30 -0
- package/node_modules/zod/v4/core/schemas.d.cts +3 -1
- package/node_modules/zod/v4/core/schemas.d.ts +3 -1
- package/node_modules/zod/v4/core/schemas.js +30 -0
- package/node_modules/zod/v4/core/util.cjs +15 -0
- package/node_modules/zod/v4/core/util.d.cts +2 -0
- package/node_modules/zod/v4/core/util.d.ts +2 -0
- package/node_modules/zod/v4/core/util.js +14 -0
- package/node_modules/zod/v4/core/versions.cjs +1 -1
- package/node_modules/zod/v4/core/versions.js +1 -1
- package/package.json +5 -7
- package/dist/.setup/setup-plugin-api-0RMVREuM.mjs +0 -1
- package/node_modules/ws/LICENSE +0 -20
- package/node_modules/ws/README.md +0 -548
- package/node_modules/ws/browser.js +0 -8
- package/node_modules/ws/index.js +0 -22
- package/node_modules/ws/lib/buffer-util.js +0 -131
- package/node_modules/ws/lib/constants.js +0 -19
- package/node_modules/ws/lib/event-target.js +0 -292
- package/node_modules/ws/lib/extension.js +0 -203
- package/node_modules/ws/lib/limiter.js +0 -55
- package/node_modules/ws/lib/permessage-deflate.js +0 -530
- package/node_modules/ws/lib/receiver.js +0 -743
- package/node_modules/ws/lib/sender.js +0 -607
- package/node_modules/ws/lib/stream.js +0 -161
- package/node_modules/ws/lib/subprotocol.js +0 -62
- package/node_modules/ws/lib/validation.js +0 -152
- package/node_modules/ws/lib/websocket-server.js +0 -562
- package/node_modules/ws/lib/websocket.js +0 -1421
- package/node_modules/ws/package.json +0 -74
- package/node_modules/ws/wrapper.mjs +0 -21
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WebSocket } from "openclaw/plugin-sdk/websocket-runtime";
|
|
2
2
|
import { bufferToBlobPart } from "openclaw/plugin-sdk/blob-runtime";
|
|
3
3
|
import { captureEffectAuthority } from "openclaw/plugin-sdk/fetch-runtime";
|
|
4
4
|
import { redactToolPayloadText } from "openclaw/plugin-sdk/logging-core";
|
|
5
5
|
import { readProviderJsonResponse, readResponseTextLimited } from "openclaw/plugin-sdk/provider-http";
|
|
6
|
-
|
|
7
|
-
//#region extensions/clickclack/src/ws-runtime.ts
|
|
8
|
-
const require = createRequire(import.meta.url);
|
|
9
|
-
const WebSocket = require(path.join(path.dirname(require.resolve("ws/package.json")), "index.js"));
|
|
10
|
-
//#endregion
|
|
11
|
-
//#region extensions/clickclack/src/http-client.ts
|
|
6
|
+
// extensions/clickclack/src/http-client.ts
|
|
12
7
|
/**
|
|
13
8
|
* Serializes optional provenance into the wire fields. Unknown JSON fields
|
|
14
9
|
* are ignored by servers without the provenance columns, so these are safe
|
|
@@ -70,31 +65,25 @@ function createClickClackClient(options) {
|
|
|
70
65
|
for (const [key, value] of Object.entries(headers)) requestHeaders.set(key, value);
|
|
71
66
|
if (correlationId) requestHeaders.set(CLICKCLACK_CORRELATION_ID_HEADER, correlationId);
|
|
72
67
|
if (init.body && !(init.body instanceof FormData)) requestHeaders.set("Content-Type", "application/json");
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
...init,
|
|
80
|
-
...controller ? { signal: controller.signal } : {},
|
|
81
|
-
headers: requestHeaders
|
|
82
|
-
});
|
|
68
|
+
const response = await captureEffectAuthority().initiate(() => {
|
|
69
|
+
options.beforeRequest?.();
|
|
70
|
+
return fetcher(`${baseUrl}${path}`, {
|
|
71
|
+
...init,
|
|
72
|
+
...requestOptions.timeoutMs !== void 0 && !init.signal ? { signal: AbortSignal.timeout(requestOptions.timeoutMs) } : {},
|
|
73
|
+
headers: requestHeaders
|
|
83
74
|
});
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
return await readProviderJsonResponse(response, "ClickClack response", { maxBytes: CLICKCLACK_INBOUND_JSON_LIMIT_BYTES });
|
|
95
|
-
} finally {
|
|
96
|
-
if (timeout) clearTimeout(timeout);
|
|
75
|
+
});
|
|
76
|
+
if (!response.ok) {
|
|
77
|
+
const detail = await readResponseTextLimited(response, CLICKCLACK_ERROR_BODY_LIMIT_BYTES);
|
|
78
|
+
throw new ClickClackHttpError(response.status, redactToolPayloadText(detail), response.headers);
|
|
79
|
+
}
|
|
80
|
+
if (requestOptions.responseMode === "none") {
|
|
81
|
+
try {
|
|
82
|
+
await response.body?.cancel();
|
|
83
|
+
} catch {}
|
|
84
|
+
return;
|
|
97
85
|
}
|
|
86
|
+
return await readProviderJsonResponse(response, "ClickClack response", { maxBytes: CLICKCLACK_INBOUND_JSON_LIMIT_BYTES });
|
|
98
87
|
}
|
|
99
88
|
async function requestObject(key, path, init) {
|
|
100
89
|
return (await request(path, init))[key];
|
|
@@ -110,11 +99,15 @@ function createClickClackClient(options) {
|
|
|
110
99
|
...typeof data.tail_cursor === "string" ? { tailCursor: data.tail_cursor } : {}
|
|
111
100
|
};
|
|
112
101
|
}
|
|
113
|
-
async function createMessage(path, body, opts) {
|
|
102
|
+
async function createMessage(path, body, opts, activity) {
|
|
114
103
|
return requestObject("message", path, {
|
|
115
104
|
method: "POST",
|
|
116
105
|
body: JSON.stringify({
|
|
117
106
|
body,
|
|
107
|
+
...activity ? {
|
|
108
|
+
kind: activity.kind,
|
|
109
|
+
turn_id: activity.turnId
|
|
110
|
+
} : {},
|
|
118
111
|
...opts?.quotedMessageId ? { quoted_message_id: opts.quotedMessageId } : {},
|
|
119
112
|
...opts?.nonce ? { nonce: opts.nonce } : {},
|
|
120
113
|
...provenanceFields(opts?.provenance)
|
|
@@ -140,12 +133,12 @@ function createClickClackClient(options) {
|
|
|
140
133
|
return async (id, afterSeq, limit = 20) => requestObject("messages", `/api/${resource}/${encodeURIComponent(id)}/messages?after_seq=${afterSeq}&limit=${limit}`);
|
|
141
134
|
}
|
|
142
135
|
return {
|
|
143
|
-
me:
|
|
136
|
+
me: () => requestObject("user", "/api/me"),
|
|
144
137
|
setBotCommands: async (commands) => requestObject("bot_commands", "/api/bots/self/commands", {
|
|
145
138
|
method: "PUT",
|
|
146
139
|
body: JSON.stringify({ commands })
|
|
147
140
|
}),
|
|
148
|
-
workspaces:
|
|
141
|
+
workspaces: () => requestObject("workspaces", "/api/workspaces"),
|
|
149
142
|
channels: async (workspaceId) => requestObject("channels", `/api/workspaces/${encodeURIComponent(workspaceId)}/channels`),
|
|
150
143
|
createChannel: async (workspaceId, channel) => requestObject("channel", `/api/workspaces/${encodeURIComponent(workspaceId)}/channels`, {
|
|
151
144
|
method: "POST",
|
|
@@ -201,7 +194,7 @@ function createClickClackClient(options) {
|
|
|
201
194
|
directMessages: messageList("dms"),
|
|
202
195
|
thread: async (messageId) => await request(`/api/messages/${encodeURIComponent(messageId)}/thread`),
|
|
203
196
|
message: async (messageId) => requestObject("message", `/api/messages/${encodeURIComponent(messageId)}`),
|
|
204
|
-
findMessageByNonce:
|
|
197
|
+
findMessageByNonce: (params) => findByNonce("message", params),
|
|
205
198
|
createChannelMessage: async (channelId, body, opts) => createMessage(`/api/channels/${encodeURIComponent(channelId)}/messages`, body, opts),
|
|
206
199
|
createThreadReply: async (messageId, body, opts) => createMessage(`/api/messages/${encodeURIComponent(messageId)}/thread/replies`, body, {
|
|
207
200
|
nonce: opts?.nonce,
|
|
@@ -239,15 +232,7 @@ function createClickClackClient(options) {
|
|
|
239
232
|
*/
|
|
240
233
|
createActivityMessage: async (params) => {
|
|
241
234
|
if (!params.channelId && !params.conversationId) throw new Error("createActivityMessage requires a channelId or conversationId");
|
|
242
|
-
return
|
|
243
|
-
method: "POST",
|
|
244
|
-
body: JSON.stringify({
|
|
245
|
-
body: params.body,
|
|
246
|
-
kind: params.kind,
|
|
247
|
-
turn_id: params.turnId,
|
|
248
|
-
...provenanceFields(params.provenance)
|
|
249
|
-
})
|
|
250
|
-
});
|
|
235
|
+
return createMessage(params.channelId ? `/api/channels/${encodeURIComponent(params.channelId)}/messages` : `/api/dms/${encodeURIComponent(params.conversationId ?? "")}/messages`, params.body, { provenance: params.provenance }, params);
|
|
251
236
|
},
|
|
252
237
|
updateMessageBody: async (messageId, body) => requestObject("message", `/api/messages/${encodeURIComponent(messageId)}`, {
|
|
253
238
|
method: "PATCH",
|
|
@@ -291,8 +276,7 @@ function createClickClackClient(options) {
|
|
|
291
276
|
}
|
|
292
277
|
};
|
|
293
278
|
}
|
|
294
|
-
|
|
295
|
-
//#region extensions/clickclack/src/resolve.ts
|
|
279
|
+
// extensions/clickclack/src/resolve.ts
|
|
296
280
|
function findClickClackWorkspace(workspaces, selector) {
|
|
297
281
|
return workspaces.find((candidate) => candidate.id === selector || candidate.slug === selector || candidate.name === selector);
|
|
298
282
|
}
|
|
@@ -308,5 +292,4 @@ async function resolveChannelId(client, workspaceId, channel) {
|
|
|
308
292
|
if (!found) throw new Error(`ClickClack channel not found: ${channel}`);
|
|
309
293
|
return found.id;
|
|
310
294
|
}
|
|
311
|
-
//#endregion
|
|
312
295
|
export { createClickClackClient as a, ClickClackHttpError as i, resolveChannelId as n, isClickClackChannelNameConflict as o, resolveWorkspaceId as r, normalizeClickClackCorrelationId as s, findClickClackWorkspace as t };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
//#region \0rolldown/runtime.js
|
|
1
|
+
// \0rolldown/runtime.js
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -24,5 +23,4 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
24
23
|
return to;
|
|
25
24
|
};
|
|
26
25
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
27
|
-
//#endregion
|
|
28
26
|
export { __reExport as n, __exportAll as t };
|