@openclaw/clickclack 2026.10.10 → 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 (58) hide show
  1. package/dist/.setup/{channel-CaLQ1zSw.mjs → channel-ByAANbh8.mjs} +363 -504
  2. package/dist/.setup/{resolve-C2XmZanM.mjs → resolve-CRj6QjdF.mjs} +27 -41
  3. package/dist/.setup/{rolldown-runtime-nwUcYXjP.mjs → rolldown-runtime-782esTHO.mjs} +0 -1
  4. package/dist/.setup/{runtime-api-HO9-jJAP.mjs → runtime-api-BsRK-sfA.mjs} +324 -368
  5. package/dist/.setup/{setup-claim-D50o9egr.mjs → setup-claim-BAKxfObl.mjs} +4 -9
  6. package/dist/.setup/{setup-plugin-api-COv8knUv.mjs → setup-plugin-api-BTqE973B.mjs} +1 -1
  7. package/dist/.setup/setup-plugin-api-CfuhJJvK.mjs +1 -0
  8. package/dist/.setup/{setup-surface-BuNtdRQY.mjs → setup-surface-5wSYr6p2.mjs} +5 -5
  9. package/dist/.setup/{setup-verify-CSI-GwUA.mjs → setup-verify-IayKkFWq.mjs} +12 -24
  10. package/dist/.source-module-urls/aa673c321fe9be084b8926cbe5388ff5e2a41371389e19ca60a1983f2b634030.json +1 -1
  11. package/dist/api.js +3 -3
  12. package/dist/channel-plugin-api.js +1 -1
  13. package/dist/doctor-contract-api.js +1 -1
  14. package/dist/index.js +1 -1
  15. package/dist/runtime-api.js +4 -4
  16. package/dist/setup-entry.js +1 -1
  17. package/dist/setup-plugin-api.js +1 -1
  18. package/node_modules/zod/package.json +1 -1
  19. package/node_modules/zod/src/v4/classic/tests/array.test.ts +27 -0
  20. package/node_modules/zod/src/v4/classic/tests/map.test.ts +7 -0
  21. package/node_modules/zod/src/v4/classic/tests/set.test.ts +6 -0
  22. package/node_modules/zod/src/v4/core/compile.ts +9 -0
  23. package/node_modules/zod/src/v4/core/schemas.ts +35 -1
  24. package/node_modules/zod/src/v4/core/util.ts +13 -0
  25. package/node_modules/zod/src/v4/core/versions.ts +1 -1
  26. package/node_modules/zod/v4/core/compile.cjs +8 -0
  27. package/node_modules/zod/v4/core/compile.js +8 -0
  28. package/node_modules/zod/v4/core/schemas.cjs +30 -0
  29. package/node_modules/zod/v4/core/schemas.d.cts +3 -1
  30. package/node_modules/zod/v4/core/schemas.d.ts +3 -1
  31. package/node_modules/zod/v4/core/schemas.js +30 -0
  32. package/node_modules/zod/v4/core/util.cjs +15 -0
  33. package/node_modules/zod/v4/core/util.d.cts +2 -0
  34. package/node_modules/zod/v4/core/util.d.ts +2 -0
  35. package/node_modules/zod/v4/core/util.js +14 -0
  36. package/node_modules/zod/v4/core/versions.cjs +1 -1
  37. package/node_modules/zod/v4/core/versions.js +1 -1
  38. package/package.json +5 -7
  39. package/dist/.setup/setup-plugin-api-wzfSSaGz.mjs +0 -1
  40. package/node_modules/ws/LICENSE +0 -20
  41. package/node_modules/ws/README.md +0 -548
  42. package/node_modules/ws/browser.js +0 -8
  43. package/node_modules/ws/index.js +0 -22
  44. package/node_modules/ws/lib/buffer-util.js +0 -131
  45. package/node_modules/ws/lib/constants.js +0 -19
  46. package/node_modules/ws/lib/event-target.js +0 -292
  47. package/node_modules/ws/lib/extension.js +0 -203
  48. package/node_modules/ws/lib/limiter.js +0 -55
  49. package/node_modules/ws/lib/permessage-deflate.js +0 -530
  50. package/node_modules/ws/lib/receiver.js +0 -743
  51. package/node_modules/ws/lib/sender.js +0 -607
  52. package/node_modules/ws/lib/stream.js +0 -161
  53. package/node_modules/ws/lib/subprotocol.js +0 -62
  54. package/node_modules/ws/lib/validation.js +0 -152
  55. package/node_modules/ws/lib/websocket-server.js +0 -562
  56. package/node_modules/ws/lib/websocket.js +0 -1421
  57. package/node_modules/ws/package.json +0 -74
  58. package/node_modules/ws/wrapper.mjs +0 -21
@@ -1,12 +1,8 @@
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
- // 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
6
  // extensions/clickclack/src/http-client.ts
11
7
  /**
12
8
  * Serializes optional provenance into the wire fields. Unknown JSON fields
@@ -69,31 +65,25 @@ function createClickClackClient(options) {
69
65
  for (const [key, value] of Object.entries(headers)) requestHeaders.set(key, value);
70
66
  if (correlationId) requestHeaders.set(CLICKCLACK_CORRELATION_ID_HEADER, correlationId);
71
67
  if (init.body && !(init.body instanceof FormData)) requestHeaders.set("Content-Type", "application/json");
72
- const controller = requestOptions.timeoutMs !== void 0 && !init.signal ? new AbortController() : void 0;
73
- const timeout = controller ? setTimeout(() => controller.abort(), requestOptions.timeoutMs) : void 0;
74
- try {
75
- const response = await captureEffectAuthority().initiate(() => {
76
- options.beforeRequest?.();
77
- return fetcher(`${baseUrl}${path}`, {
78
- ...init,
79
- ...controller ? { signal: controller.signal } : {},
80
- headers: requestHeaders
81
- });
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
82
74
  });
83
- if (!response.ok) {
84
- const detail = await readResponseTextLimited(response, CLICKCLACK_ERROR_BODY_LIMIT_BYTES);
85
- throw new ClickClackHttpError(response.status, redactToolPayloadText(detail), new Headers(response.headers));
86
- }
87
- if (requestOptions.responseMode === "none") {
88
- try {
89
- await response.body?.cancel();
90
- } catch {}
91
- return;
92
- }
93
- return await readProviderJsonResponse(response, "ClickClack response", { maxBytes: CLICKCLACK_INBOUND_JSON_LIMIT_BYTES });
94
- } finally {
95
- 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;
96
85
  }
86
+ return await readProviderJsonResponse(response, "ClickClack response", { maxBytes: CLICKCLACK_INBOUND_JSON_LIMIT_BYTES });
97
87
  }
98
88
  async function requestObject(key, path, init) {
99
89
  return (await request(path, init))[key];
@@ -109,11 +99,15 @@ function createClickClackClient(options) {
109
99
  ...typeof data.tail_cursor === "string" ? { tailCursor: data.tail_cursor } : {}
110
100
  };
111
101
  }
112
- async function createMessage(path, body, opts) {
102
+ async function createMessage(path, body, opts, activity) {
113
103
  return requestObject("message", path, {
114
104
  method: "POST",
115
105
  body: JSON.stringify({
116
106
  body,
107
+ ...activity ? {
108
+ kind: activity.kind,
109
+ turn_id: activity.turnId
110
+ } : {},
117
111
  ...opts?.quotedMessageId ? { quoted_message_id: opts.quotedMessageId } : {},
118
112
  ...opts?.nonce ? { nonce: opts.nonce } : {},
119
113
  ...provenanceFields(opts?.provenance)
@@ -139,12 +133,12 @@ function createClickClackClient(options) {
139
133
  return async (id, afterSeq, limit = 20) => requestObject("messages", `/api/${resource}/${encodeURIComponent(id)}/messages?after_seq=${afterSeq}&limit=${limit}`);
140
134
  }
141
135
  return {
142
- me: async () => requestObject("user", "/api/me"),
136
+ me: () => requestObject("user", "/api/me"),
143
137
  setBotCommands: async (commands) => requestObject("bot_commands", "/api/bots/self/commands", {
144
138
  method: "PUT",
145
139
  body: JSON.stringify({ commands })
146
140
  }),
147
- workspaces: async () => requestObject("workspaces", "/api/workspaces"),
141
+ workspaces: () => requestObject("workspaces", "/api/workspaces"),
148
142
  channels: async (workspaceId) => requestObject("channels", `/api/workspaces/${encodeURIComponent(workspaceId)}/channels`),
149
143
  createChannel: async (workspaceId, channel) => requestObject("channel", `/api/workspaces/${encodeURIComponent(workspaceId)}/channels`, {
150
144
  method: "POST",
@@ -200,7 +194,7 @@ function createClickClackClient(options) {
200
194
  directMessages: messageList("dms"),
201
195
  thread: async (messageId) => await request(`/api/messages/${encodeURIComponent(messageId)}/thread`),
202
196
  message: async (messageId) => requestObject("message", `/api/messages/${encodeURIComponent(messageId)}`),
203
- findMessageByNonce: async (params) => findByNonce("message", params),
197
+ findMessageByNonce: (params) => findByNonce("message", params),
204
198
  createChannelMessage: async (channelId, body, opts) => createMessage(`/api/channels/${encodeURIComponent(channelId)}/messages`, body, opts),
205
199
  createThreadReply: async (messageId, body, opts) => createMessage(`/api/messages/${encodeURIComponent(messageId)}/thread/replies`, body, {
206
200
  nonce: opts?.nonce,
@@ -238,15 +232,7 @@ function createClickClackClient(options) {
238
232
  */
239
233
  createActivityMessage: async (params) => {
240
234
  if (!params.channelId && !params.conversationId) throw new Error("createActivityMessage requires a channelId or conversationId");
241
- return requestObject("message", params.channelId ? `/api/channels/${encodeURIComponent(params.channelId)}/messages` : `/api/dms/${encodeURIComponent(params.conversationId ?? "")}/messages`, {
242
- method: "POST",
243
- body: JSON.stringify({
244
- body: params.body,
245
- kind: params.kind,
246
- turn_id: params.turnId,
247
- ...provenanceFields(params.provenance)
248
- })
249
- });
235
+ return createMessage(params.channelId ? `/api/channels/${encodeURIComponent(params.channelId)}/messages` : `/api/dms/${encodeURIComponent(params.conversationId ?? "")}/messages`, params.body, { provenance: params.provenance }, params);
250
236
  },
251
237
  updateMessageBody: async (messageId, body) => requestObject("message", `/api/messages/${encodeURIComponent(messageId)}`, {
252
238
  method: "PATCH",
@@ -1,4 +1,3 @@
1
- import "node:module";
2
1
  // \0rolldown/runtime.js
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;