@openclaw/clickclack 2026.8.1-beta.3 → 2026.9.1-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/api.js CHANGED
@@ -1,3 +1,3 @@
1
- import { _ as DEFAULT_ACCOUNT_ID, b as resolveClickClackAccount, p as clickClackConfigSchema, u as createClickClackClient, v as listClickClackAccountIds, x as resolveDefaultClickClackAccountId, y as listEnabledClickClackAccounts } from "./setup-surface-BQ1Zyohu.js";
2
- import { a as setClickClackRuntime, i as getClickClackRuntime, n as buildClickClackTarget, r as parseClickClackTarget, t as clickClackPlugin } from "./channel-ChO3E9i2.js";
1
+ import { _ as DEFAULT_ACCOUNT_ID, b as resolveClickClackAccount, p as clickClackConfigSchema, u as createClickClackClient, v as listClickClackAccountIds, x as resolveDefaultClickClackAccountId, y as listEnabledClickClackAccounts } from "./setup-surface-u7Mgy8Wp.js";
2
+ import { a as setClickClackRuntime, i as getClickClackRuntime, n as buildClickClackTarget, r as parseClickClackTarget, t as clickClackPlugin } from "./channel-DbE7fnUL.js";
3
3
  export { DEFAULT_ACCOUNT_ID, buildClickClackTarget, clickClackConfigSchema, clickClackPlugin, createClickClackClient, getClickClackRuntime, listClickClackAccountIds, listEnabledClickClackAccounts, parseClickClackTarget, resolveClickClackAccount, resolveDefaultClickClackAccountId, setClickClackRuntime };
@@ -1,10 +1,10 @@
1
- import { _ as DEFAULT_ACCOUNT_ID, b as resolveClickClackAccount, c as resolveWorkspaceId, f as normalizeClickClackCorrelationId, g as clickClackMeta, h as clickClackConfigAdapter, l as ClickClackHttpError, m as CLICKCLACK_CHANNEL_ID, n as clickClackSetupContract, p as clickClackConfigSchema, s as resolveChannelId, t as clickClackSetupWizard, u as createClickClackClient, y as listEnabledClickClackAccounts } from "./setup-surface-BQ1Zyohu.js";
1
+ import { _ as DEFAULT_ACCOUNT_ID, b as resolveClickClackAccount, c as resolveWorkspaceId, f as normalizeClickClackCorrelationId, g as clickClackMeta, h as clickClackConfigAdapter, l as ClickClackHttpError, m as CLICKCLACK_CHANNEL_ID, n as clickClackSetupContract, p as clickClackConfigSchema, s as resolveChannelId, t as clickClackSetupWizard, u as createClickClackClient, y as listEnabledClickClackAccounts } from "./setup-surface-u7Mgy8Wp.js";
2
2
  import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-BKkzzjBA.js";
3
3
  import { parseDateStringTimestampMs } from "openclaw/plugin-sdk/number-runtime";
4
4
  import { mergePairLoopGuardConfig } from "openclaw/plugin-sdk/pair-loop-guard-runtime";
5
5
  import { readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
6
6
  import { buildChannelOutboundSessionRoute, buildThreadAwareOutboundSessionRoute, createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
7
- import { buildChannelProgressDraftLine, createMessageReceiptFromOutboundResults, defineChannelMessageAdapter, deriveDurableFinalDeliveryRequirements } from "openclaw/plugin-sdk/channel-outbound";
7
+ import { buildChannelProgressDraftLine, createChannelMessageReplyPipeline, createMessageReceiptFromOutboundResults, defineChannelMessageAdapter, deriveDurableFinalDeliveryRequirements } from "openclaw/plugin-sdk/channel-outbound";
8
8
  import { createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
9
9
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
10
10
  import { channelReadyPatch, channelStoppedPatch } from "openclaw/plugin-sdk/gateway-runtime";
@@ -1592,7 +1592,7 @@ function resolveClickClackAgentRunId(messageId) {
1592
1592
  }
1593
1593
  async function dispatchModelReply(params) {
1594
1594
  const runtime = getClickClackRuntime();
1595
- const text = (await runtime.llm.complete({
1595
+ const result = await runtime.llm.complete({
1596
1596
  agentId: params.route.agentId,
1597
1597
  model: params.account.model,
1598
1598
  purpose: "clickclack bot reply",
@@ -1601,14 +1601,28 @@ async function dispatchModelReply(params) {
1601
1601
  role: "user",
1602
1602
  content: params.message.body
1603
1603
  }]
1604
- })).text.trim();
1605
- if (!text) {
1604
+ });
1605
+ const completion = result.text.trim();
1606
+ if (!completion) {
1606
1607
  runtime.logging.getChildLogger({
1607
1608
  plugin: "clickclack",
1608
1609
  feature: "model-reply"
1609
1610
  }).warn(`[${params.account.accountId}] ClickClack model reply produced no sendable text`);
1610
1611
  return;
1611
1612
  }
1613
+ const replyPipeline = createChannelMessageReplyPipeline({
1614
+ cfg: params.cfg,
1615
+ agentId: params.route.agentId,
1616
+ channel: CHANNEL_ID$1,
1617
+ accountId: params.account.accountId
1618
+ });
1619
+ replyPipeline.onModelSelected?.({
1620
+ provider: result.provider,
1621
+ model: result.model,
1622
+ thinkLevel: void 0
1623
+ });
1624
+ const responsePrefix = replyPipeline.resolveResponsePrefix?.();
1625
+ const text = responsePrefix && !completion.startsWith(responsePrefix) ? `${responsePrefix} ${completion}` : completion;
1612
1626
  await sendClickClackText({
1613
1627
  cfg: params.cfg,
1614
1628
  accountId: params.account.accountId,
@@ -1869,7 +1883,7 @@ function parseSocketEvent(data) {
1869
1883
  }
1870
1884
  async function processEvent(params) {
1871
1885
  if (params.event.type !== "message.created" && params.event.type !== "thread.reply_created") return;
1872
- if (payloadString(params.event, "author_id") === params.botUserId) return;
1886
+ if (params.abortSignal.aborted || payloadString(params.event, "author_id") === params.botUserId) return;
1873
1887
  const correlationId = eventCorrelationId(params.event);
1874
1888
  const message = await resolveEventMessage({
1875
1889
  client: correlationId ? createClickClackClient({
@@ -1883,12 +1897,13 @@ async function processEvent(params) {
1883
1897
  params.log?.warn?.(`[${params.account.accountId}] skipped unreadable ClickClack message before agent dispatch: type=${params.event.type} messageId=${payloadString(params.event, "message_id") || "unknown"}`);
1884
1898
  return;
1885
1899
  }
1886
- if (message.author_id === params.botUserId) return;
1900
+ if (params.abortSignal.aborted || message.author_id === params.botUserId) return;
1887
1901
  const access = await resolveClickClackInboundAccess({
1888
1902
  account: params.account,
1889
1903
  config: params.config,
1890
1904
  message
1891
1905
  });
1906
+ if (params.abortSignal.aborted) return;
1892
1907
  if (!access.shouldDispatch) {
1893
1908
  params.log?.info(`[${params.account.accountId}] skipped ClickClack message before agent dispatch: kind=${message.direct_conversation_id ? "dm" : "group"} requireMention=${access.requireMention ?? "unknown"} wasMentioned=${access.mentionFacts.wasMentioned} hasAnyMention=${access.mentionFacts.hasAnyMention ?? "unknown"} commandAuthorized=${access.commandAuthorized}`);
1894
1909
  return;
@@ -1938,6 +1953,7 @@ async function startClickClackGatewayAccount(ctx) {
1938
1953
  botHandle: me.handle
1939
1954
  };
1940
1955
  const processIncomingEvent = (event) => processEvent({
1956
+ abortSignal: ctx.abortSignal,
1941
1957
  account,
1942
1958
  config: ctx.cfg,
1943
1959
  client,
@@ -2017,6 +2033,7 @@ async function startClickClackGatewayAccount(ctx) {
2017
2033
  socket.on("message", (data) => {
2018
2034
  if (closing || settled) return;
2019
2035
  messageQueue = messageQueue.then(async () => {
2036
+ if (ctx.abortSignal.aborted) return;
2020
2037
  const event = parseSocketEvent(data);
2021
2038
  if (!event) {
2022
2039
  ctx.log?.warn?.(`[${account.accountId}] skipped malformed ClickClack websocket event`);
@@ -1,2 +1,2 @@
1
- import { t as clickClackPlugin } from "./channel-ChO3E9i2.js";
1
+ import { t as clickClackPlugin } from "./channel-DbE7fnUL.js";
2
2
  export { clickClackPlugin };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as registerClickClackDiscussions } from "./runtime-api-B0ChZLhm.js";
1
+ import { t as registerClickClackDiscussions } from "./runtime-api-Pul_CTEN.js";
2
2
  import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
3
3
  //#region extensions/clickclack/index.ts
4
4
  /**
@@ -1,5 +1,5 @@
1
- import { b as resolveClickClackAccount, d as isClickClackChannelNameConflict, l as ClickClackHttpError, u as createClickClackClient, v as listClickClackAccountIds } from "./setup-surface-BQ1Zyohu.js";
2
- import { C as slugifyDiscussionLabel, D as listPendingDiscussionOpens, E as clearPendingDiscussionOpen, O as recordPendingDiscussionOpen, S as resolveDiscussionLabel, T as clearDiscussionBindingGeneration, _ as getClickClackDiscussionBindingStore, b as fallbackDiscussionLabel, c as markClickClackDiscussionChannelIdentityRevoked, d as discussionInfoForBinding, f as normalizedServerBaseUrl, g as bindingMatchesActiveSessionIncarnation, h as attachBindingToCurrentActiveSession, k as reserveDiscussionBindingGeneration, l as markClickClackDiscussionChannelRevoked, o as clearClickClackDiscussionChannelRevoked, p as resolveDiscussionBindingAccount, s as isClickClackDiscussionChannelRevoked, u as discussionAccounts, v as discussionCredentialFingerprint, w as truncateDiscussionDisplayTitle, x as isDiscussionSessionKey, y as discussionExternalRef } from "./channel-ChO3E9i2.js";
1
+ import { b as resolveClickClackAccount, d as isClickClackChannelNameConflict, l as ClickClackHttpError, u as createClickClackClient, v as listClickClackAccountIds } from "./setup-surface-u7Mgy8Wp.js";
2
+ import { C as slugifyDiscussionLabel, D as listPendingDiscussionOpens, E as clearPendingDiscussionOpen, O as recordPendingDiscussionOpen, S as resolveDiscussionLabel, T as clearDiscussionBindingGeneration, _ as getClickClackDiscussionBindingStore, b as fallbackDiscussionLabel, c as markClickClackDiscussionChannelIdentityRevoked, d as discussionInfoForBinding, f as normalizedServerBaseUrl, g as bindingMatchesActiveSessionIncarnation, h as attachBindingToCurrentActiveSession, k as reserveDiscussionBindingGeneration, l as markClickClackDiscussionChannelRevoked, o as clearClickClackDiscussionChannelRevoked, p as resolveDiscussionBindingAccount, s as isClickClackDiscussionChannelRevoked, u as discussionAccounts, v as discussionCredentialFingerprint, w as truncateDiscussionDisplayTitle, x as isDiscussionSessionKey, y as discussionExternalRef } from "./channel-DbE7fnUL.js";
3
3
  import "./api.js";
4
4
  import { randomUUID } from "node:crypto";
5
5
  import { buildControlUiSessionPath, registerSessionDiscussionProvider } from "openclaw/plugin-sdk/session-discussion";
@@ -1,4 +1,4 @@
1
- import { b as resolveClickClackAccount, u as createClickClackClient } from "./setup-surface-BQ1Zyohu.js";
2
- import { a as setClickClackRuntime, r as parseClickClackTarget } from "./channel-ChO3E9i2.js";
3
- import { t as registerClickClackDiscussions } from "./runtime-api-B0ChZLhm.js";
1
+ import { b as resolveClickClackAccount, u as createClickClackClient } from "./setup-surface-u7Mgy8Wp.js";
2
+ import { a as setClickClackRuntime, r as parseClickClackTarget } from "./channel-DbE7fnUL.js";
3
+ import { t as registerClickClackDiscussions } from "./runtime-api-Pul_CTEN.js";
4
4
  export { createClickClackClient, parseClickClackTarget, registerClickClackDiscussions, resolveClickClackAccount, setClickClackRuntime };
@@ -1,4 +1,4 @@
1
- import { a as isClickClackSetupLoopbackHost, i as buildClickClackSetupClaimUrl, o as requireClickClackSetupApiBaseUrl } from "./setup-surface-BQ1Zyohu.js";
1
+ import { a as isClickClackSetupLoopbackHost, i as buildClickClackSetupClaimUrl, o as requireClickClackSetupApiBaseUrl } from "./setup-surface-u7Mgy8Wp.js";
2
2
  import { createProviderOperationDeadline, readProviderJsonResponse, readResponseTextLimited, resolveProviderOperationTimeoutMs } from "openclaw/plugin-sdk/provider-http";
3
3
  import { fetchWithSsrFGuard, resolvePinnedHostnameWithPolicy, ssrfPolicyFromHttpBaseUrlAllowedHostname } from "openclaw/plugin-sdk/ssrf-runtime";
4
4
  import { withTimeout } from "openclaw/plugin-sdk/text-utility-runtime";
@@ -1,4 +1,4 @@
1
- import { g as clickClackMeta, h as clickClackConfigAdapter, n as clickClackSetupContract, p as clickClackConfigSchema, t as clickClackSetupWizard } from "./setup-surface-BQ1Zyohu.js";
1
+ import { g as clickClackMeta, h as clickClackConfigAdapter, n as clickClackSetupContract, p as clickClackConfigSchema, t as clickClackSetupWizard } from "./setup-surface-u7Mgy8Wp.js";
2
2
  //#region extensions/clickclack/src/channel.setup.ts
3
3
  const clickClackSetupPlugin = {
4
4
  id: "clickclack",
@@ -246,6 +246,7 @@ const ClickClackAccountConfigSchema = z.object({
246
246
  name: z.string().optional(),
247
247
  enabled: z.boolean().optional(),
248
248
  configWrites: z.boolean().optional(),
249
+ responsePrefix: z.string().optional(),
249
250
  baseUrl: z.string().url().optional(),
250
251
  apiBaseUrl: z.string().url().optional(),
251
252
  token: buildSecretInputSchema().optional(),
@@ -284,7 +285,7 @@ const ClickClackAccountConfigSchema = z.object({
284
285
  * Config schema exported to core so `openclaw doctor` and config validation
285
286
  * understand both default and named ClickClack accounts.
286
287
  */
287
- const clickClackConfigSchema = buildChannelConfigSchema(buildMultiAccountChannelSchema(ClickClackAccountConfigSchema, { accountSchema: ClickClackAccountConfigSchema.partial() }));
288
+ const clickClackConfigSchema = buildChannelConfigSchema(buildMultiAccountChannelSchema(ClickClackAccountConfigSchema.extend({ historyLimit: z.number().int().min(0).optional() }), { accountSchema: ClickClackAccountConfigSchema.partial() }));
288
289
  //#endregion
289
290
  //#region extensions/clickclack/src/http-client.ts
290
291
  /**
@@ -813,7 +814,7 @@ const clickClackSetupAdapter = {
813
814
  const claimUrl = setup.exactClaimUrl && !privateApiBaseUrl ? setup.exactClaimUrl : buildClickClackSetupClaimUrl(privateApiBaseUrl ?? setup.baseUrl);
814
815
  let claim;
815
816
  try {
816
- const { claimClickClackSetupCode } = await import("./setup-claim--cdFCz2P.js");
817
+ const { claimClickClackSetupCode } = await import("./setup-claim-Dd4LkDU2.js");
817
818
  claim = await claimClickClackSetupCode({
818
819
  claimUrl,
819
820
  code: setup.code,
@@ -167,7 +167,9 @@ class PerMessageDeflate {
167
167
  (typeof opts.serverMaxWindowBits === 'number' &&
168
168
  opts.serverMaxWindowBits > params.server_max_window_bits))) ||
169
169
  (typeof opts.clientMaxWindowBits === 'number' &&
170
- !params.client_max_window_bits)
170
+ (typeof params.client_max_window_bits === 'number'
171
+ ? opts.clientMaxWindowBits > params.client_max_window_bits
172
+ : !params.client_max_window_bits))
171
173
  ) {
172
174
  return false;
173
175
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ws",
3
- "version": "8.21.1",
3
+ "version": "8.21.3",
4
4
  "description": "Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js",
5
5
  "keywords": [
6
6
  "HyBi",
@@ -24,6 +24,9 @@
24
24
  "configWrites": {
25
25
  "type": "boolean"
26
26
  },
27
+ "responsePrefix": {
28
+ "type": "string"
29
+ },
27
30
  "baseUrl": {
28
31
  "type": "string",
29
32
  "format": "uri"
@@ -306,6 +309,11 @@
306
309
  },
307
310
  "additionalProperties": false
308
311
  },
312
+ "historyLimit": {
313
+ "type": "integer",
314
+ "minimum": 0,
315
+ "maximum": 9007199254740991
316
+ },
309
317
  "accounts": {
310
318
  "type": "object",
311
319
  "propertyNames": {
@@ -323,6 +331,9 @@
323
331
  "configWrites": {
324
332
  "type": "boolean"
325
333
  },
334
+ "responsePrefix": {
335
+ "type": "string"
336
+ },
326
337
  "baseUrl": {
327
338
  "type": "string",
328
339
  "format": "uri"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/clickclack",
3
- "version": "2026.8.1-beta.3",
3
+ "version": "2026.9.1-beta.1",
4
4
  "description": "OpenClaw ClickClack channel plugin",
5
5
  "type": "module",
6
6
  "exports": {
@@ -9,11 +9,11 @@
9
9
  "./runtime-api.js": "./dist/runtime-api.js"
10
10
  },
11
11
  "dependencies": {
12
- "ws": "8.21.1",
12
+ "ws": "8.21.3",
13
13
  "zod": "4.4.3"
14
14
  },
15
15
  "peerDependencies": {
16
- "openclaw": ">=2026.8.1-beta.3"
16
+ "openclaw": ">=2026.9.1-beta.1"
17
17
  },
18
18
  "peerDependenciesMeta": {
19
19
  "openclaw": {
@@ -139,10 +139,10 @@
139
139
  "allowInvalidConfigRecovery": true
140
140
  },
141
141
  "compat": {
142
- "pluginApi": ">=2026.8.1-beta.3"
142
+ "pluginApi": ">=2026.9.1-beta.1"
143
143
  },
144
144
  "build": {
145
- "openclawVersion": "2026.8.1-beta.3",
145
+ "openclawVersion": "2026.9.1-beta.1",
146
146
  "bundledDist": false
147
147
  },
148
148
  "release": {