@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.
Files changed (61) hide show
  1. package/dist/.setup/{channel-DRcZ_twH.mjs → channel-ByAANbh8.mjs} +382 -543
  2. package/dist/.setup/{resolve-Br3ylpSz.mjs → resolve-CRj6QjdF.mjs} +29 -46
  3. package/dist/.setup/{rolldown-runtime-B4FMCO8f.mjs → rolldown-runtime-782esTHO.mjs} +1 -3
  4. package/dist/.setup/{runtime-api-BrlvVAQJ.mjs → runtime-api-BsRK-sfA.mjs} +329 -383
  5. package/dist/.setup/{secret-contract-CF7TKtkU.mjs → secret-contract-Dj8nibUr.mjs} +1 -2
  6. package/dist/.setup/{secret-contract-api--45pFCg3.mjs → secret-contract-api-DS3Vv0Gu.mjs} +1 -1
  7. package/dist/.setup/{setup-claim-BPuQuMKW.mjs → setup-claim-BAKxfObl.mjs} +5 -11
  8. package/dist/.setup/{setup-plugin-api-Ccxm2ydn.mjs → setup-plugin-api-BTqE973B.mjs} +2 -3
  9. package/dist/.setup/setup-plugin-api-CfuhJJvK.mjs +1 -0
  10. package/dist/.setup/{setup-surface-BJ3jioqA.mjs → setup-surface-5wSYr6p2.mjs} +11 -17
  11. package/dist/.setup/{setup-verify-DGsYtVh9.mjs → setup-verify-IayKkFWq.mjs} +13 -26
  12. package/dist/.source-module-urls/aa673c321fe9be084b8926cbe5388ff5e2a41371389e19ca60a1983f2b634030.json +1 -1
  13. package/dist/api.js +3 -3
  14. package/dist/channel-plugin-api.js +1 -1
  15. package/dist/doctor-contract-api.js +6 -11
  16. package/dist/index.js +2 -3
  17. package/dist/runtime-api.js +4 -4
  18. package/dist/secret-contract-api.js +1 -1
  19. package/dist/setup-entry.js +3 -4
  20. package/dist/setup-plugin-api.js +1 -1
  21. package/node_modules/zod/package.json +1 -1
  22. package/node_modules/zod/src/v4/classic/tests/array.test.ts +27 -0
  23. package/node_modules/zod/src/v4/classic/tests/map.test.ts +7 -0
  24. package/node_modules/zod/src/v4/classic/tests/set.test.ts +6 -0
  25. package/node_modules/zod/src/v4/core/compile.ts +9 -0
  26. package/node_modules/zod/src/v4/core/schemas.ts +35 -1
  27. package/node_modules/zod/src/v4/core/util.ts +13 -0
  28. package/node_modules/zod/src/v4/core/versions.ts +1 -1
  29. package/node_modules/zod/v4/core/compile.cjs +8 -0
  30. package/node_modules/zod/v4/core/compile.js +8 -0
  31. package/node_modules/zod/v4/core/schemas.cjs +30 -0
  32. package/node_modules/zod/v4/core/schemas.d.cts +3 -1
  33. package/node_modules/zod/v4/core/schemas.d.ts +3 -1
  34. package/node_modules/zod/v4/core/schemas.js +30 -0
  35. package/node_modules/zod/v4/core/util.cjs +15 -0
  36. package/node_modules/zod/v4/core/util.d.cts +2 -0
  37. package/node_modules/zod/v4/core/util.d.ts +2 -0
  38. package/node_modules/zod/v4/core/util.js +14 -0
  39. package/node_modules/zod/v4/core/versions.cjs +1 -1
  40. package/node_modules/zod/v4/core/versions.js +1 -1
  41. package/package.json +5 -7
  42. package/dist/.setup/setup-plugin-api-0RMVREuM.mjs +0 -1
  43. package/node_modules/ws/LICENSE +0 -20
  44. package/node_modules/ws/README.md +0 -548
  45. package/node_modules/ws/browser.js +0 -8
  46. package/node_modules/ws/index.js +0 -22
  47. package/node_modules/ws/lib/buffer-util.js +0 -131
  48. package/node_modules/ws/lib/constants.js +0 -19
  49. package/node_modules/ws/lib/event-target.js +0 -292
  50. package/node_modules/ws/lib/extension.js +0 -203
  51. package/node_modules/ws/lib/limiter.js +0 -55
  52. package/node_modules/ws/lib/permessage-deflate.js +0 -530
  53. package/node_modules/ws/lib/receiver.js +0 -743
  54. package/node_modules/ws/lib/sender.js +0 -607
  55. package/node_modules/ws/lib/stream.js +0 -161
  56. package/node_modules/ws/lib/subprotocol.js +0 -62
  57. package/node_modules/ws/lib/validation.js +0 -152
  58. package/node_modules/ws/lib/websocket-server.js +0 -562
  59. package/node_modules/ws/lib/websocket.js +0 -1421
  60. package/node_modules/ws/package.json +0 -74
  61. package/node_modules/ws/wrapper.mjs +0 -21
@@ -1,14 +1,9 @@
1
- import { createRequire } from "node:module";
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
- import path from "node:path";
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 controller = requestOptions.timeoutMs !== void 0 && !init.signal ? new AbortController() : void 0;
74
- const timeout = controller ? setTimeout(() => controller.abort(), requestOptions.timeoutMs) : void 0;
75
- try {
76
- const response = await captureEffectAuthority().initiate(() => {
77
- options.beforeRequest?.();
78
- return fetcher(`${baseUrl}${path}`, {
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
- if (!response.ok) {
85
- const detail = await readResponseTextLimited(response, CLICKCLACK_ERROR_BODY_LIMIT_BYTES);
86
- throw new ClickClackHttpError(response.status, redactToolPayloadText(detail), new Headers(response.headers));
87
- }
88
- if (requestOptions.responseMode === "none") {
89
- try {
90
- await response.body?.cancel();
91
- } catch {}
92
- return;
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: async () => requestObject("user", "/api/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: async () => requestObject("workspaces", "/api/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: async (params) => findByNonce("message", params),
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 requestObject("message", params.channelId ? `/api/channels/${encodeURIComponent(params.channelId)}/messages` : `/api/dms/${encodeURIComponent(params.conversationId ?? "")}/messages`, {
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
- //#endregion
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
- import "node:module";
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 };