@openclaw/clickclack 2026.10.10 → 2026.10.34
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-CaLQ1zSw.mjs → channel-BX2RqmGn.mjs} +44 -24
- package/dist/.setup/{resolve-C2XmZanM.mjs → resolve-B-W04sGX.mjs} +31 -19
- package/dist/.setup/{rolldown-runtime-nwUcYXjP.mjs → rolldown-runtime-B4FMCO8f.mjs} +2 -1
- package/dist/.setup/{runtime-api-HO9-jJAP.mjs → runtime-api-DIu-sNJs.mjs} +23 -13
- package/dist/.setup/{secret-contract-Dj8nibUr.mjs → secret-contract-CF7TKtkU.mjs} +2 -1
- package/dist/.setup/secret-contract-api-CBcsgIYZ.mjs +3 -0
- package/dist/.setup/{setup-claim-D50o9egr.mjs → setup-claim-BJPvHiWS.mjs} +3 -2
- package/dist/.setup/{setup-plugin-api-COv8knUv.mjs → setup-plugin-api-BiMffAUC.mjs} +3 -2
- package/dist/.setup/setup-plugin-api-bSnZClKM.mjs +2 -0
- package/dist/.setup/{setup-surface-BuNtdRQY.mjs → setup-surface-fPdDl0l2.mjs} +15 -9
- package/dist/.setup/{setup-verify-CSI-GwUA.mjs → setup-verify-B5iJBDrk.mjs} +4 -3
- package/dist/api.js +3 -3
- package/dist/channel-plugin-api.js +2 -1
- package/dist/doctor-contract-api.js +11 -6
- package/dist/index.js +3 -2
- package/dist/runtime-api.js +4 -4
- package/dist/secret-contract-api.js +2 -1
- package/dist/setup-entry.js +4 -3
- package/dist/setup-plugin-api.js +2 -1
- package/package.json +4 -4
- package/dist/.setup/secret-contract-api-DS3Vv0Gu.mjs +0 -2
- package/dist/.setup/setup-plugin-api-wzfSSaGz.mjs +0 -1
- package/dist/.source-module-urls/aa673c321fe9be084b8926cbe5388ff5e2a41371389e19ca60a1983f2b634030.json +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as __reExport, t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { c as CLICKCLACK_CHANNEL_ID, d as DEFAULT_ACCOUNT_ID, f as isClickClackAccountCurrent, g as resolveClickClackAccountConfig, h as resolveClickClackAccount, l as clickClackConfigAdapter, m as listEnabledClickClackAccounts, n as clickClackSetupContract, s as clickClackConfigSchema, t as clickClackSetupWizard, u as clickClackMeta } from "./setup-surface-
|
|
3
|
-
import { a as createClickClackClient, i as ClickClackHttpError, n as resolveChannelId, r as resolveWorkspaceId, s as normalizeClickClackCorrelationId } from "./resolve-
|
|
4
|
-
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-
|
|
1
|
+
import { n as __reExport, t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
|
|
2
|
+
import { c as CLICKCLACK_CHANNEL_ID, d as DEFAULT_ACCOUNT_ID, f as isClickClackAccountCurrent, g as resolveClickClackAccountConfig, h as resolveClickClackAccount, l as clickClackConfigAdapter, m as listEnabledClickClackAccounts, n as clickClackSetupContract, s as clickClackConfigSchema, t as clickClackSetupWizard, u as clickClackMeta } from "./setup-surface-fPdDl0l2.mjs";
|
|
3
|
+
import { a as createClickClackClient, i as ClickClackHttpError, n as resolveChannelId, r as resolveWorkspaceId, s as normalizeClickClackCorrelationId } from "./resolve-B-W04sGX.mjs";
|
|
4
|
+
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-CF7TKtkU.mjs";
|
|
5
5
|
import { resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/account-helpers";
|
|
6
6
|
import { parseDateStringTimestampMs } from "openclaw/plugin-sdk/number-runtime";
|
|
7
7
|
import { mergePairLoopGuardConfig } from "openclaw/plugin-sdk/pair-loop-guard-runtime";
|
|
@@ -28,7 +28,7 @@ import { extensionForMime } from "openclaw/plugin-sdk/media-mime";
|
|
|
28
28
|
import { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/outbound-media";
|
|
29
29
|
import { sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
|
|
30
30
|
import { raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
|
|
31
|
-
|
|
31
|
+
//#region src/channels/mention-gating.ts
|
|
32
32
|
function resolveBotThreadMentionPolicy(params) {
|
|
33
33
|
if (!params.isBotOwnedThread || params.requireMentionInBotThreads === void 0) return {
|
|
34
34
|
requireMention: params.requireMention,
|
|
@@ -39,11 +39,13 @@ function resolveBotThreadMentionPolicy(params) {
|
|
|
39
39
|
implicitMentionKinds: params.requireMentionInBotThreads ? params.implicitMentionKinds?.filter((kind) => kind === "native") : params.implicitMentionKinds
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/channel-mention-gating
|
|
43
44
|
var channel_mention_gating_exports = /* @__PURE__ */ __exportAll({ resolveBotThreadMentionPolicy: () => resolveBotThreadMentionPolicy });
|
|
44
45
|
import * as import_openclaw_plugin_sdk_channel_mention_gating from "openclaw/plugin-sdk/channel-mention-gating";
|
|
45
46
|
__reExport(channel_mention_gating_exports, import_openclaw_plugin_sdk_channel_mention_gating);
|
|
46
|
-
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region extensions/clickclack/src/discussions/binding-generation.ts
|
|
47
49
|
const GENERATION_STORE_OPTIONS = {
|
|
48
50
|
namespace: "discussion-binding-generations",
|
|
49
51
|
maxEntries: 1e4,
|
|
@@ -170,7 +172,8 @@ async function hasPendingDiscussionOpenForDestination(params) {
|
|
|
170
172
|
const serverBaseUrl = params.serverBaseUrl.replace(/\/+$/u, "");
|
|
171
173
|
return (await listPendingDiscussionOpens(params.runtime)).some((pending) => pending.serverBaseUrl === serverBaseUrl && pending.workspaceId === params.workspaceId);
|
|
172
174
|
}
|
|
173
|
-
|
|
175
|
+
//#endregion
|
|
176
|
+
//#region extensions/clickclack/src/discussions/binding-store.ts
|
|
174
177
|
function bindingMatchesActiveSessionIncarnation(runtime, sessionKey, binding) {
|
|
175
178
|
const entry = runtime.agent.session.getSessionEntry({
|
|
176
179
|
sessionKey,
|
|
@@ -391,7 +394,8 @@ function getClickClackDiscussionBindingStore(runtime) {
|
|
|
391
394
|
storesByRuntime$1.set(runtime, created);
|
|
392
395
|
return created;
|
|
393
396
|
}
|
|
394
|
-
|
|
397
|
+
//#endregion
|
|
398
|
+
//#region extensions/clickclack/src/discussions/naming.ts
|
|
395
399
|
function shortSessionHash(sessionKey) {
|
|
396
400
|
return createHash("sha256").update(sessionKey).digest("hex").slice(0, 32);
|
|
397
401
|
}
|
|
@@ -445,7 +449,8 @@ function discussionSessionKey(params) {
|
|
|
445
449
|
}
|
|
446
450
|
});
|
|
447
451
|
}
|
|
448
|
-
|
|
452
|
+
//#endregion
|
|
453
|
+
//#region extensions/clickclack/src/discussions/eligibility.ts
|
|
449
454
|
function discussionAccounts(cfg) {
|
|
450
455
|
return listEnabledClickClackAccounts(cfg).filter((account) => account.configured && account.discussions.enabled);
|
|
451
456
|
}
|
|
@@ -476,7 +481,8 @@ function discussionInfoForBinding(binding, account) {
|
|
|
476
481
|
openUrl: `${baseUrl}/app/${encodeURIComponent(binding.workspaceRouteId)}/${encodeURIComponent(binding.channelRouteId)}`
|
|
477
482
|
};
|
|
478
483
|
}
|
|
479
|
-
|
|
484
|
+
//#endregion
|
|
485
|
+
//#region extensions/clickclack/src/discussions/revoked-channel-store.ts
|
|
480
486
|
const STORE_OPTIONS = {
|
|
481
487
|
namespace: "discussion-revoked-channels",
|
|
482
488
|
maxEntries: 1e5,
|
|
@@ -573,7 +579,8 @@ async function isClickClackDiscussionChannelRevokedAsync(params) {
|
|
|
573
579
|
function revocationApplies(revoked, binding) {
|
|
574
580
|
return Boolean(revoked && (!binding || !revoked.binding || isDeepStrictEqual(revoked.binding, binding)));
|
|
575
581
|
}
|
|
576
|
-
|
|
582
|
+
//#endregion
|
|
583
|
+
//#region extensions/clickclack/src/discussions/routing.ts
|
|
577
584
|
async function resolveClickClackDiscussionRoute(params) {
|
|
578
585
|
const store = getClickClackDiscussionBindingStore(params.runtime);
|
|
579
586
|
await store.prepare();
|
|
@@ -643,7 +650,8 @@ async function resolveClickClackDiscussionRoute(params) {
|
|
|
643
650
|
revocation?.release();
|
|
644
651
|
}
|
|
645
652
|
}
|
|
646
|
-
|
|
653
|
+
//#endregion
|
|
654
|
+
//#region extensions/clickclack/src/group-policy.ts
|
|
647
655
|
function resolveClickClackGroupPolicy(params) {
|
|
648
656
|
const { account, channelId } = params;
|
|
649
657
|
const channelKey = channelId?.trim();
|
|
@@ -658,7 +666,8 @@ function resolveClickClackGroupPolicy(params) {
|
|
|
658
666
|
botLoopProtection: mergePairLoopGuardConfig(account.botLoopProtection, wildcard?.botLoopProtection, exact?.botLoopProtection)
|
|
659
667
|
};
|
|
660
668
|
}
|
|
661
|
-
|
|
669
|
+
//#endregion
|
|
670
|
+
//#region extensions/clickclack/src/mention-facts.ts
|
|
662
671
|
const CLICKCLACK_MENTION_PATTERN = /(?:^|[^a-z0-9_@-])@([a-z0-9][a-z0-9_-]{1,31})(?![a-z0-9_-])/giu;
|
|
663
672
|
function buildLocalMentionRegexes(params) {
|
|
664
673
|
if (params.mentionPatterns.length === 0) return [];
|
|
@@ -712,7 +721,8 @@ function resolveClickClackMentionFacts(params) {
|
|
|
712
721
|
hasAnyMention: mentionHandles.length > 0 || hasConfiguredMention
|
|
713
722
|
};
|
|
714
723
|
}
|
|
715
|
-
|
|
724
|
+
//#endregion
|
|
725
|
+
//#region extensions/clickclack/src/runtime.ts
|
|
716
726
|
/**
|
|
717
727
|
* Runtime store for host-provided OpenClaw services used by the ClickClack
|
|
718
728
|
* bundled plugin.
|
|
@@ -721,7 +731,8 @@ const { setRuntime: setClickClackRuntime, getRuntime: getClickClackRuntime } = c
|
|
|
721
731
|
pluginId: "clickclack",
|
|
722
732
|
errorMessage: "ClickClack runtime not initialized"
|
|
723
733
|
});
|
|
724
|
-
|
|
734
|
+
//#endregion
|
|
735
|
+
//#region extensions/clickclack/src/target.ts
|
|
725
736
|
/**
|
|
726
737
|
* Parses `channel:name`, `thread:msg_id`, `dm:usr_id`, or a bare channel name.
|
|
727
738
|
*/
|
|
@@ -761,7 +772,8 @@ function normalizeClickClackTarget(raw) {
|
|
|
761
772
|
function looksLikeClickClackTarget(raw) {
|
|
762
773
|
return raw.trim().length > 0;
|
|
763
774
|
}
|
|
764
|
-
|
|
775
|
+
//#endregion
|
|
776
|
+
//#region extensions/clickclack/src/access.ts
|
|
765
777
|
const CHANNEL_ID$2 = "clickclack";
|
|
766
778
|
function normalizeClickClackUserId(value) {
|
|
767
779
|
const trimmed = value.trim();
|
|
@@ -1051,7 +1063,8 @@ async function resolveClickClackInboundAccess(params) {
|
|
|
1051
1063
|
channelIngress: resolved
|
|
1052
1064
|
};
|
|
1053
1065
|
}
|
|
1054
|
-
|
|
1066
|
+
//#endregion
|
|
1067
|
+
//#region extensions/clickclack/src/command-menu.ts
|
|
1055
1068
|
const CLICKCLACK_COMMAND_PATTERN = /^[a-z0-9_-]{1,32}$/u;
|
|
1056
1069
|
const CLICKCLACK_MAX_COMMANDS = 100;
|
|
1057
1070
|
const CLICKCLACK_MAX_DESCRIPTION_LENGTH = 100;
|
|
@@ -1106,7 +1119,8 @@ async function syncClickClackCommandMenu(params) {
|
|
|
1106
1119
|
params.log?.warn?.(`${messagePrefix} failed: ${formatErrorMessage(error)}`);
|
|
1107
1120
|
}
|
|
1108
1121
|
}
|
|
1109
|
-
|
|
1122
|
+
//#endregion
|
|
1123
|
+
//#region extensions/clickclack/src/activity.ts
|
|
1110
1124
|
const CLICKCLACK_COMMENTARY_FLUSH_MS = 700;
|
|
1111
1125
|
/** Item kinds rendered as agent_tool rows; everything else is commentary. */
|
|
1112
1126
|
const TOOL_ITEM_KINDS = /* @__PURE__ */ new Set([
|
|
@@ -1295,7 +1309,8 @@ function createClickClackActivityPublisher(params) {
|
|
|
1295
1309
|
}
|
|
1296
1310
|
};
|
|
1297
1311
|
}
|
|
1298
|
-
|
|
1312
|
+
//#endregion
|
|
1313
|
+
//#region extensions/clickclack/src/outbound.ts
|
|
1299
1314
|
const CLICKCLACK_MAX_UPLOAD_BYTES = 67108864;
|
|
1300
1315
|
async function createTargetMessage(params) {
|
|
1301
1316
|
const parsed = parseClickClackTarget(params.to);
|
|
@@ -1566,7 +1581,8 @@ async function reconcileClickClackUnknownSend(ctx) {
|
|
|
1566
1581
|
receipt
|
|
1567
1582
|
};
|
|
1568
1583
|
}
|
|
1569
|
-
|
|
1584
|
+
//#endregion
|
|
1585
|
+
//#region extensions/clickclack/src/progress.ts
|
|
1570
1586
|
function normalizedKind(payload) {
|
|
1571
1587
|
const kind = payload.kind?.trim().toLowerCase();
|
|
1572
1588
|
if (!kind || kind === "preamble" || kind === "analysis" || kind === "thinking" || kind === "reasoning" || kind === "missing") return "commentary";
|
|
@@ -1753,7 +1769,8 @@ function createClickClackAgentProgressPublisher(params) {
|
|
|
1753
1769
|
}
|
|
1754
1770
|
};
|
|
1755
1771
|
}
|
|
1756
|
-
|
|
1772
|
+
//#endregion
|
|
1773
|
+
//#region extensions/clickclack/src/inbound.ts
|
|
1757
1774
|
const CHANNEL_ID$1 = "clickclack";
|
|
1758
1775
|
const CLICKCLACK_MESSAGE_ID_PATTERN = /^msg_[0-9a-hjkmnp-tv-z]{26}$/u;
|
|
1759
1776
|
function hasClickClackReplyMedia(payload) {
|
|
@@ -2023,7 +2040,8 @@ async function handleClickClackInbound(params) {
|
|
|
2023
2040
|
await activity?.finalize();
|
|
2024
2041
|
}
|
|
2025
2042
|
}
|
|
2026
|
-
|
|
2043
|
+
//#endregion
|
|
2044
|
+
//#region extensions/clickclack/src/gateway.ts
|
|
2027
2045
|
const CLICKCLACK_EVENT_PAGE_LIMIT = 500;
|
|
2028
2046
|
function payloadString(event, key) {
|
|
2029
2047
|
return readStringField(event.payload, key) ?? "";
|
|
@@ -2244,7 +2262,8 @@ async function startClickClackGatewayAccount(ctx) {
|
|
|
2244
2262
|
ctx.setStatus(channelStoppedPatch({ accountId: account.accountId }));
|
|
2245
2263
|
}
|
|
2246
2264
|
}
|
|
2247
|
-
|
|
2265
|
+
//#endregion
|
|
2266
|
+
//#region extensions/clickclack/src/channel.ts
|
|
2248
2267
|
const CHANNEL_ID = CLICKCLACK_CHANNEL_ID;
|
|
2249
2268
|
const clickClackMessageAdapter = defineChannelMessageAdapter({
|
|
2250
2269
|
id: CHANNEL_ID,
|
|
@@ -2419,4 +2438,5 @@ const clickClackPlugin = createChatChannelPlugin({
|
|
|
2419
2438
|
}
|
|
2420
2439
|
}
|
|
2421
2440
|
});
|
|
2441
|
+
//#endregion
|
|
2422
2442
|
export { clearPendingDiscussionOpen as A, truncateDiscussionDisplayTitle as C, getClickClackDiscussionBindingStore as D, bindingMatchesActiveSessionIncarnation as E, listPendingDiscussionOpens as M, recordPendingDiscussionOpen as N, readDiscussionSessionEntry as O, reserveDiscussionBindingGeneration as P, slugifyDiscussionLabel as S, attachBindingToCurrentActiveSession as T, discussionExternalRef as _, setClickClackRuntime as a, isDiscussionSessionKey as b, isClickClackDiscussionChannelRevokedAsync as c, prepareClickClackDiscussionChannelRevocation as d, discussionAccounts as f, discussionCredentialFingerprint as g, resolveDiscussionBindingAccount as h, getClickClackRuntime as i, getPendingDiscussionOpen as j, clearDiscussionBindingGeneration as k, markClickClackDiscussionChannelIdentityRevoked as l, normalizedServerBaseUrl as m, buildClickClackTarget as n, clearClickClackDiscussionChannelRevoked as o, discussionInfoForBinding as p, parseClickClackTarget as r, isClickClackDiscussionChannelRevoked as s, clickClackPlugin as t, markClickClackDiscussionChannelRevoked as u, discussionSessionKey as v, MAX_RETAINED_DETACHED_DISCUSSION_BINDINGS as w, resolveDiscussionLabel as x, fallbackDiscussionLabel as y };
|
|
@@ -3,11 +3,13 @@ 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 { fetchWithSsrFGuard, ssrfPolicyFromHttpBaseUrlAllowedOrigin } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
6
7
|
import path from "node:path";
|
|
7
|
-
|
|
8
|
+
//#region extensions/clickclack/src/ws-runtime.ts
|
|
8
9
|
const require = createRequire(import.meta.url);
|
|
9
10
|
const WebSocket = require(path.join(path.dirname(require.resolve("ws/package.json")), "index.js"));
|
|
10
|
-
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region extensions/clickclack/src/http-client.ts
|
|
11
13
|
/**
|
|
12
14
|
* Serializes optional provenance into the wire fields. Unknown JSON fields
|
|
13
15
|
* are ignored by servers without the provenance columns, so these are safe
|
|
@@ -58,7 +60,7 @@ function normalizeClickClackCorrelationId(value) {
|
|
|
58
60
|
}
|
|
59
61
|
function createClickClackClient(options) {
|
|
60
62
|
const baseUrl = options.baseUrl.replace(/\/$/, "");
|
|
61
|
-
const
|
|
63
|
+
const ssrfPolicy = ssrfPolicyFromHttpBaseUrlAllowedOrigin(baseUrl);
|
|
62
64
|
const correlationId = normalizeClickClackCorrelationId(options.correlationId);
|
|
63
65
|
const headers = {
|
|
64
66
|
Authorization: `Bearer ${options.token}`,
|
|
@@ -72,25 +74,33 @@ function createClickClackClient(options) {
|
|
|
72
74
|
const controller = requestOptions.timeoutMs !== void 0 && !init.signal ? new AbortController() : void 0;
|
|
73
75
|
const timeout = controller ? setTimeout(() => controller.abort(), requestOptions.timeoutMs) : void 0;
|
|
74
76
|
try {
|
|
75
|
-
const response = await captureEffectAuthority().initiate(() => {
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
const { response, release } = await captureEffectAuthority().initiate(() => fetchWithSsrFGuard({
|
|
78
|
+
url: `${baseUrl}${path}`,
|
|
79
|
+
fetchImpl: options.fetch,
|
|
80
|
+
beforeRequest: options.beforeRequest,
|
|
81
|
+
init: {
|
|
78
82
|
...init,
|
|
79
83
|
...controller ? { signal: controller.signal } : {},
|
|
80
84
|
headers: requestHeaders
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
85
|
+
},
|
|
86
|
+
policy: ssrfPolicy,
|
|
87
|
+
auditContext: "clickclack-api"
|
|
88
|
+
}));
|
|
89
|
+
try {
|
|
90
|
+
if (!response.ok) {
|
|
91
|
+
const detail = await readResponseTextLimited(response, CLICKCLACK_ERROR_BODY_LIMIT_BYTES);
|
|
92
|
+
throw new ClickClackHttpError(response.status, redactToolPayloadText(detail), new Headers(response.headers));
|
|
93
|
+
}
|
|
94
|
+
if (requestOptions.responseMode === "none") {
|
|
95
|
+
try {
|
|
96
|
+
await response.body?.cancel();
|
|
97
|
+
} catch {}
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
return await readProviderJsonResponse(response, "ClickClack response", { maxBytes: CLICKCLACK_INBOUND_JSON_LIMIT_BYTES });
|
|
101
|
+
} finally {
|
|
102
|
+
await release();
|
|
92
103
|
}
|
|
93
|
-
return await readProviderJsonResponse(response, "ClickClack response", { maxBytes: CLICKCLACK_INBOUND_JSON_LIMIT_BYTES });
|
|
94
104
|
} finally {
|
|
95
105
|
if (timeout) clearTimeout(timeout);
|
|
96
106
|
}
|
|
@@ -290,7 +300,8 @@ function createClickClackClient(options) {
|
|
|
290
300
|
}
|
|
291
301
|
};
|
|
292
302
|
}
|
|
293
|
-
|
|
303
|
+
//#endregion
|
|
304
|
+
//#region extensions/clickclack/src/resolve.ts
|
|
294
305
|
function findClickClackWorkspace(workspaces, selector) {
|
|
295
306
|
return workspaces.find((candidate) => candidate.id === selector || candidate.slug === selector || candidate.name === selector);
|
|
296
307
|
}
|
|
@@ -306,4 +317,5 @@ async function resolveChannelId(client, workspaceId, channel) {
|
|
|
306
317
|
if (!found) throw new Error(`ClickClack channel not found: ${channel}`);
|
|
307
318
|
return found.id;
|
|
308
319
|
}
|
|
320
|
+
//#endregion
|
|
309
321
|
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,5 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -24,4 +24,5 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
24
24
|
return to;
|
|
25
25
|
};
|
|
26
26
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
27
|
+
//#endregion
|
|
27
28
|
export { __reExport as n, __exportAll as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h as resolveClickClackAccount, p as listClickClackAccountIds } from "./setup-surface-
|
|
2
|
-
import { A as clearPendingDiscussionOpen, C as truncateDiscussionDisplayTitle, D as getClickClackDiscussionBindingStore, E as bindingMatchesActiveSessionIncarnation, M as listPendingDiscussionOpens, N as recordPendingDiscussionOpen, O as readDiscussionSessionEntry, P as reserveDiscussionBindingGeneration, S as slugifyDiscussionLabel, T as attachBindingToCurrentActiveSession, _ as discussionExternalRef, b as isDiscussionSessionKey, c as isClickClackDiscussionChannelRevokedAsync, d as prepareClickClackDiscussionChannelRevocation, f as discussionAccounts, g as discussionCredentialFingerprint, h as resolveDiscussionBindingAccount, j as getPendingDiscussionOpen, k as clearDiscussionBindingGeneration, l as markClickClackDiscussionChannelIdentityRevoked, m as normalizedServerBaseUrl, o as clearClickClackDiscussionChannelRevoked, p as discussionInfoForBinding, s as isClickClackDiscussionChannelRevoked, u as markClickClackDiscussionChannelRevoked, v as discussionSessionKey, x as resolveDiscussionLabel, y as fallbackDiscussionLabel } from "./channel-
|
|
3
|
-
import { a as createClickClackClient, i as ClickClackHttpError, o as isClickClackChannelNameConflict, t as findClickClackWorkspace } from "./resolve-
|
|
1
|
+
import { h as resolveClickClackAccount, p as listClickClackAccountIds } from "./setup-surface-fPdDl0l2.mjs";
|
|
2
|
+
import { A as clearPendingDiscussionOpen, C as truncateDiscussionDisplayTitle, D as getClickClackDiscussionBindingStore, E as bindingMatchesActiveSessionIncarnation, M as listPendingDiscussionOpens, N as recordPendingDiscussionOpen, O as readDiscussionSessionEntry, P as reserveDiscussionBindingGeneration, S as slugifyDiscussionLabel, T as attachBindingToCurrentActiveSession, _ as discussionExternalRef, b as isDiscussionSessionKey, c as isClickClackDiscussionChannelRevokedAsync, d as prepareClickClackDiscussionChannelRevocation, f as discussionAccounts, g as discussionCredentialFingerprint, h as resolveDiscussionBindingAccount, j as getPendingDiscussionOpen, k as clearDiscussionBindingGeneration, l as markClickClackDiscussionChannelIdentityRevoked, m as normalizedServerBaseUrl, o as clearClickClackDiscussionChannelRevoked, p as discussionInfoForBinding, s as isClickClackDiscussionChannelRevoked, u as markClickClackDiscussionChannelRevoked, v as discussionSessionKey, x as resolveDiscussionLabel, y as fallbackDiscussionLabel } from "./channel-BX2RqmGn.mjs";
|
|
3
|
+
import { a as createClickClackClient, i as ClickClackHttpError, o as isClickClackChannelNameConflict, t as findClickClackWorkspace } from "./resolve-B-W04sGX.mjs";
|
|
4
4
|
import "../api.js";
|
|
5
5
|
import { isDeepStrictEqual } from "node:util";
|
|
6
6
|
import { randomUUID } from "node:crypto";
|
|
@@ -10,7 +10,7 @@ import { createSessionVisibilityChecker } from "openclaw/plugin-sdk/session-visi
|
|
|
10
10
|
import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
|
|
11
11
|
import { resolveSessionAgentIdStrict } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
12
12
|
import { textResult } from "openclaw/plugin-sdk/tool-results";
|
|
13
|
-
|
|
13
|
+
//#region extensions/clickclack/src/discussions/binding-retention.ts
|
|
14
14
|
var DetachedDiscussionBindingRetention = class {
|
|
15
15
|
#runtime;
|
|
16
16
|
#store;
|
|
@@ -69,7 +69,8 @@ var DetachedDiscussionBindingRetention = class {
|
|
|
69
69
|
})) throw new Error("ClickClack discussion session returned before retention committed");
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
|
-
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region extensions/clickclack/src/discussions/control-session-url.ts
|
|
73
74
|
function controlSessionUrl(baseUrl, sessionKey, fallbackAgentId, mainKey, displayName) {
|
|
74
75
|
if (!baseUrl) return;
|
|
75
76
|
const url = new URL(baseUrl);
|
|
@@ -86,7 +87,8 @@ function controlSessionUrl(baseUrl, sessionKey, fallbackAgentId, mainKey, displa
|
|
|
86
87
|
url.hash = "";
|
|
87
88
|
return url.toString();
|
|
88
89
|
}
|
|
89
|
-
|
|
90
|
+
//#endregion
|
|
91
|
+
//#region extensions/clickclack/src/discussions/history-format.ts
|
|
90
92
|
function discussionRecordJson(value) {
|
|
91
93
|
return JSON.stringify(value).replace(/[\u0085\u2028\u2029]/gu, (separator) => `\\u${separator.charCodeAt(0).toString(16).padStart(4, "0")}`);
|
|
92
94
|
}
|
|
@@ -99,7 +101,8 @@ function formatDiscussionHistory(history) {
|
|
|
99
101
|
const truncationNote = history.truncated ? "\n[History scan reached its safety bound; older active threads may be omitted.]" : "";
|
|
100
102
|
return text ? `${text}${truncationNote}` : "";
|
|
101
103
|
}
|
|
102
|
-
|
|
104
|
+
//#endregion
|
|
105
|
+
//#region extensions/clickclack/src/discussions/installation.ts
|
|
103
106
|
const INSTALLATION_NAMESPACE = "discussion-installation";
|
|
104
107
|
const INSTALLATION_KEY = "current";
|
|
105
108
|
/** Returns the durable installation namespace used in server-visible ownership refs. */
|
|
@@ -117,7 +120,8 @@ async function getClickClackDiscussionInstallationId(runtime) {
|
|
|
117
120
|
if (!persisted) throw new Error("ClickClack discussion installation identity is unavailable; retry opening the discussion");
|
|
118
121
|
return persisted;
|
|
119
122
|
}
|
|
120
|
-
|
|
123
|
+
//#endregion
|
|
124
|
+
//#region extensions/clickclack/src/discussions/reconcile-scheduler.ts
|
|
121
125
|
const RECONCILE_DEBOUNCE_MS = 250;
|
|
122
126
|
const RECONCILE_RETRY_MS = 1e3;
|
|
123
127
|
const RECONCILE_RETRY_MAX_MS = 6e4;
|
|
@@ -173,7 +177,8 @@ var DiscussionReconcileScheduler = class {
|
|
|
173
177
|
});
|
|
174
178
|
}
|
|
175
179
|
};
|
|
176
|
-
|
|
180
|
+
//#endregion
|
|
181
|
+
//#region extensions/clickclack/src/discussions/service-open.ts
|
|
177
182
|
const CHANNEL_NAME_MUTATION_ATTEMPTS = 4;
|
|
178
183
|
function isDefinitiveNoCreateHttpError(error) {
|
|
179
184
|
if (!(error instanceof ClickClackHttpError) || error.status < 400 || error.status >= 500) return false;
|
|
@@ -519,7 +524,8 @@ async function reconcilePendingDiscussionOpen(params) {
|
|
|
519
524
|
expectedGeneration: pending.generation
|
|
520
525
|
});
|
|
521
526
|
}
|
|
522
|
-
|
|
527
|
+
//#endregion
|
|
528
|
+
//#region extensions/clickclack/src/discussions/service.ts
|
|
523
529
|
const RECONCILE_INTERVAL_MS = 6e4;
|
|
524
530
|
var ClickClackDiscussionService = class {
|
|
525
531
|
#runtime;
|
|
@@ -939,7 +945,8 @@ var ClickClackDiscussionService = class {
|
|
|
939
945
|
return operation;
|
|
940
946
|
}
|
|
941
947
|
};
|
|
942
|
-
|
|
948
|
+
//#endregion
|
|
949
|
+
//#region extensions/clickclack/src/discussions/tool-policy.ts
|
|
943
950
|
const TARGETED_SESSION_TOOLS = /* @__PURE__ */ new Set([
|
|
944
951
|
"sessions_history",
|
|
945
952
|
"sessions_send",
|
|
@@ -1017,7 +1024,8 @@ async function enforceClickClackDiscussionToolTarget(params) {
|
|
|
1017
1024
|
})) return;
|
|
1018
1025
|
return blockedResult();
|
|
1019
1026
|
}
|
|
1020
|
-
|
|
1027
|
+
//#endregion
|
|
1028
|
+
//#region extensions/clickclack/src/discussions/tool.ts
|
|
1021
1029
|
const DEFAULT_MESSAGE_LIMIT = 30;
|
|
1022
1030
|
const MAX_MESSAGE_LIMIT = 200;
|
|
1023
1031
|
function createClickClackDiscussionTool(params) {
|
|
@@ -1048,7 +1056,8 @@ function createClickClackDiscussionTool(params) {
|
|
|
1048
1056
|
}
|
|
1049
1057
|
};
|
|
1050
1058
|
}
|
|
1051
|
-
|
|
1059
|
+
//#endregion
|
|
1060
|
+
//#region extensions/clickclack/src/discussions/register.ts
|
|
1052
1061
|
function registerClickClackDiscussions(api) {
|
|
1053
1062
|
if (api.registrationMode === "tool-discovery") {
|
|
1054
1063
|
api.registerTool(() => null, { name: "discussion" });
|
|
@@ -1097,4 +1106,5 @@ function registerClickClackDiscussions(api) {
|
|
|
1097
1106
|
}
|
|
1098
1107
|
});
|
|
1099
1108
|
}
|
|
1109
|
+
//#endregion
|
|
1100
1110
|
export { registerClickClackDiscussions as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
2
|
import { collectConditionalChannelFieldAssignments, createChannelSecretContract, hasConfiguredSecretInputValue } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
|
|
3
|
-
|
|
3
|
+
//#region extensions/clickclack/src/secret-contract.ts
|
|
4
4
|
const channelSecrets = createChannelSecretContract({
|
|
5
5
|
channelKey: "clickclack",
|
|
6
6
|
account: ["token"],
|
|
@@ -22,4 +22,5 @@ const channelSecrets = createChannelSecretContract({
|
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
const { secretTargetRegistryEntries, collectRuntimeConfigAssignments } = channelSecrets;
|
|
25
|
+
//#endregion
|
|
25
26
|
export { collectRuntimeConfigAssignments as n, secretTargetRegistryEntries as r, channelSecrets as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as isClickClackSetupLoopbackHost, i as buildClickClackSetupClaimUrl, o as requireClickClackSetupApiBaseUrl } from "./setup-surface-
|
|
1
|
+
import { a as isClickClackSetupLoopbackHost, i as buildClickClackSetupClaimUrl, o as requireClickClackSetupApiBaseUrl } from "./setup-surface-fPdDl0l2.mjs";
|
|
2
2
|
import { withTimeout } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
3
3
|
import { createProviderOperationDeadline, readProviderJsonResponse, readResponseTextLimited, resolveProviderOperationTimeoutMs } from "openclaw/plugin-sdk/provider-http";
|
|
4
4
|
import { fetchWithSsrFGuard, resolvePinnedHostnameWithPolicy, ssrfPolicyFromHttpBaseUrlAllowedHostname } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
5
|
-
|
|
5
|
+
//#region extensions/clickclack/src/setup-claim.ts
|
|
6
6
|
const CLICKCLACK_ERROR_BODY_LIMIT_BYTES = 8192;
|
|
7
7
|
const CLICKCLACK_SETUP_CODE_CLAIM_JSON_LIMIT_BYTES = 65536;
|
|
8
8
|
const CLICKCLACK_SETUP_CODE_CLAIM_TIMEOUT_MS = 3e4;
|
|
@@ -127,4 +127,5 @@ async function claimClickClackSetupCode(params) {
|
|
|
127
127
|
await release();
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
+
//#endregion
|
|
130
131
|
export { claimClickClackSetupCode };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as clickClackConfigAdapter, n as clickClackSetupContract, s as clickClackConfigSchema, t as clickClackSetupWizard, u as clickClackMeta } from "./setup-surface-
|
|
2
|
-
|
|
1
|
+
import { l as clickClackConfigAdapter, n as clickClackSetupContract, s as clickClackConfigSchema, t as clickClackSetupWizard, u as clickClackMeta } from "./setup-surface-fPdDl0l2.mjs";
|
|
2
|
+
//#region extensions/clickclack/src/channel.setup.ts
|
|
3
3
|
const clickClackSetupPlugin = {
|
|
4
4
|
id: "clickclack",
|
|
5
5
|
meta: clickClackMeta,
|
|
@@ -14,4 +14,5 @@ const clickClackSetupPlugin = {
|
|
|
14
14
|
setupContract: clickClackSetupContract,
|
|
15
15
|
setupWizard: clickClackSetupWizard
|
|
16
16
|
};
|
|
17
|
+
//#endregion
|
|
17
18
|
export { clickClackSetupPlugin as t };
|
|
@@ -15,7 +15,7 @@ import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
|
|
|
15
15
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, applyAccountNameToChannelSection, baseUrlTextInput, createSetupTranslator, createStandardChannelSetupStatus, defineTokenCredential, formatDocsLink, hasConfiguredSecretInput, moveSingleAccountChannelSectionToDefaultAccount, patchScopedAccountConfig, prepareScopedSetupConfig, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
|
|
16
16
|
import { createSetupInputPresenceValidator } from "openclaw/plugin-sdk/setup-runtime";
|
|
17
17
|
import net from "node:net";
|
|
18
|
-
|
|
18
|
+
//#region extensions/clickclack/src/accounts.ts
|
|
19
19
|
const DEFAULT_RECONNECT_MS = 1500;
|
|
20
20
|
const MIN_RECONNECT_MS = 100;
|
|
21
21
|
const MAX_RECONNECT_MS = 6e4;
|
|
@@ -209,7 +209,8 @@ function listEnabledClickClackAccounts(cfg) {
|
|
|
209
209
|
accountId
|
|
210
210
|
})).filter((account) => account.enabled);
|
|
211
211
|
}
|
|
212
|
-
|
|
212
|
+
//#endregion
|
|
213
|
+
//#region extensions/clickclack/src/channel-config.ts
|
|
213
214
|
const CLICKCLACK_CHANNEL_ID = "clickclack";
|
|
214
215
|
const clickClackMeta = { ...getChatChannelMeta(CLICKCLACK_CHANNEL_ID) };
|
|
215
216
|
const clickClackConfigAdapter = {
|
|
@@ -229,7 +230,8 @@ const clickClackConfigAdapter = {
|
|
|
229
230
|
accountId
|
|
230
231
|
}).defaultTo
|
|
231
232
|
};
|
|
232
|
-
|
|
233
|
+
//#endregion
|
|
234
|
+
//#region extensions/clickclack/src/config-schema.ts
|
|
233
235
|
const ClickClackAccountConfigSchema = z.object({
|
|
234
236
|
name: z.string().optional(),
|
|
235
237
|
enabled: z.boolean().optional(),
|
|
@@ -295,7 +297,8 @@ const clickClackConfigSchema = buildChannelConfigSchema(ClickClackConfigSchema,
|
|
|
295
297
|
help: "Override the account policy for threads rooted in this bot's messages in this channel."
|
|
296
298
|
}
|
|
297
299
|
} });
|
|
298
|
-
|
|
300
|
+
//#endregion
|
|
301
|
+
//#region extensions/clickclack/src/setup-contract.ts
|
|
299
302
|
const CLICKCLACK_SETUP_CODE_CLAIM_PATH = "/api/bot-setup-codes/claim";
|
|
300
303
|
const LOOPBACK_ADDRESSES = new net.BlockList();
|
|
301
304
|
LOOPBACK_ADDRESSES.addSubnet("127.0.0.0", 8, "ipv4");
|
|
@@ -337,7 +340,8 @@ function requireClickClackSetupClaimUrl(value) {
|
|
|
337
340
|
function buildClickClackSetupClaimUrl(baseUrl) {
|
|
338
341
|
return baseUrl.replace(/\/+$/u, "") + CLICKCLACK_SETUP_CODE_CLAIM_PATH;
|
|
339
342
|
}
|
|
340
|
-
|
|
343
|
+
//#endregion
|
|
344
|
+
//#region extensions/clickclack/src/setup-core.ts
|
|
341
345
|
const channel$1 = "clickclack";
|
|
342
346
|
const SETUP_CODE_ALPHABET = "0123456789ABCDEFGHJKMNPQRSTVWXYZ";
|
|
343
347
|
const SETUP_CODE_LENGTH = 12;
|
|
@@ -446,7 +450,7 @@ const clickClackSetupAdapter = {
|
|
|
446
450
|
const claimUrl = setup.exactClaimUrl && !privateApiBaseUrl ? setup.exactClaimUrl : buildClickClackSetupClaimUrl(privateApiBaseUrl ?? setup.baseUrl);
|
|
447
451
|
let claim;
|
|
448
452
|
try {
|
|
449
|
-
const { claimClickClackSetupCode } = await import("./setup-claim-
|
|
453
|
+
const { claimClickClackSetupCode } = await import("./setup-claim-BJPvHiWS.mjs");
|
|
450
454
|
claim = await claimClickClackSetupCode({
|
|
451
455
|
claimUrl,
|
|
452
456
|
code: setup.code,
|
|
@@ -526,7 +530,7 @@ const clickClackSetupAdapter = {
|
|
|
526
530
|
});
|
|
527
531
|
},
|
|
528
532
|
afterAccountConfigWritten: async ({ cfg, accountId, runtime }) => {
|
|
529
|
-
const { verifyClickClackAccountAfterSetup } = await import("./setup-verify-
|
|
533
|
+
const { verifyClickClackAccountAfterSetup } = await import("./setup-verify-B5iJBDrk.mjs");
|
|
530
534
|
await verifyClickClackAccountAfterSetup({
|
|
531
535
|
cfg,
|
|
532
536
|
accountId,
|
|
@@ -606,7 +610,8 @@ const clickClackSetupContract = defineChannelSetupContract({
|
|
|
606
610
|
},
|
|
607
611
|
legacyAdapter: clickClackSetupAdapter
|
|
608
612
|
});
|
|
609
|
-
|
|
613
|
+
//#endregion
|
|
614
|
+
//#region extensions/clickclack/src/setup-surface.ts
|
|
610
615
|
const t = createSetupTranslator();
|
|
611
616
|
const channel = "clickclack";
|
|
612
617
|
function hasConfiguredClickClackCredential(account) {
|
|
@@ -707,7 +712,7 @@ const clickClackSetupWizard = {
|
|
|
707
712
|
})
|
|
708
713
|
}],
|
|
709
714
|
finalize: async ({ cfg, accountId, credentialValues, prompter }) => {
|
|
710
|
-
const { checkClickClackSetupConnection } = await import("./setup-verify-
|
|
715
|
+
const { checkClickClackSetupConnection } = await import("./setup-verify-B5iJBDrk.mjs");
|
|
711
716
|
const result = await checkClickClackSetupConnection({
|
|
712
717
|
cfg,
|
|
713
718
|
accountId,
|
|
@@ -726,4 +731,5 @@ const clickClackSetupWizard = {
|
|
|
726
731
|
},
|
|
727
732
|
disable: (cfg) => setSetupChannelEnabled(cfg, channel, false)
|
|
728
733
|
};
|
|
734
|
+
//#endregion
|
|
729
735
|
export { resolveDefaultClickClackAccountId as _, isClickClackSetupLoopbackHost as a, CLICKCLACK_CHANNEL_ID as c, DEFAULT_ACCOUNT_ID$2 as d, isClickClackAccountCurrent as f, resolveClickClackAccountConfig as g, resolveClickClackAccount as h, buildClickClackSetupClaimUrl as i, clickClackConfigAdapter as l, listEnabledClickClackAccounts as m, clickClackSetupContract as n, requireClickClackSetupApiBaseUrl as o, listClickClackAccountIds as p, CLICKCLACK_SETUP_CODE_CLAIM_PATH as r, clickClackConfigSchema as s, clickClackSetupWizard as t, clickClackMeta as u };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { h as resolveClickClackAccount } from "./setup-surface-
|
|
2
|
-
import { a as createClickClackClient, t as findClickClackWorkspace } from "./resolve-
|
|
1
|
+
import { h as resolveClickClackAccount } from "./setup-surface-fPdDl0l2.mjs";
|
|
2
|
+
import { a as createClickClackClient, t as findClickClackWorkspace } from "./resolve-B-W04sGX.mjs";
|
|
3
3
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
4
4
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
5
5
|
import { hasConfiguredSecretInput } from "openclaw/plugin-sdk/setup";
|
|
6
|
-
|
|
6
|
+
//#region extensions/clickclack/src/setup-verify.ts
|
|
7
7
|
const GATEWAY_RUNNING_MESSAGE = "OpenClaw is running — ClickClack will connect automatically.";
|
|
8
8
|
const GATEWAY_NOT_RUNNING_MESSAGE = "Start OpenClaw to connect: openclaw gateway";
|
|
9
9
|
const GATEWAY_UNKNOWN_MESSAGE = "If OpenClaw is running it connects automatically; otherwise start it with: openclaw gateway";
|
|
@@ -90,4 +90,5 @@ async function verifyClickClackAccountAfterSetup(params) {
|
|
|
90
90
|
if (message) params.runtime.log(message);
|
|
91
91
|
params.runtime.log(await probeClickClackGatewayStatus());
|
|
92
92
|
}
|
|
93
|
+
//#endregion
|
|
93
94
|
export { checkClickClackSetupConnection, verifyClickClackAccountAfterSetup };
|
package/dist/api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as resolveDefaultClickClackAccountId, d as DEFAULT_ACCOUNT_ID, h as resolveClickClackAccount, m as listEnabledClickClackAccounts, p as listClickClackAccountIds, s as clickClackConfigSchema } from "./.setup/setup-surface-
|
|
2
|
-
import { a as setClickClackRuntime, i as getClickClackRuntime, n as buildClickClackTarget, r as parseClickClackTarget, t as clickClackPlugin } from "./.setup/channel-
|
|
3
|
-
import { a as createClickClackClient } from "./.setup/resolve-
|
|
1
|
+
import { _ as resolveDefaultClickClackAccountId, d as DEFAULT_ACCOUNT_ID, h as resolveClickClackAccount, m as listEnabledClickClackAccounts, p as listClickClackAccountIds, s as clickClackConfigSchema } from "./.setup/setup-surface-fPdDl0l2.mjs";
|
|
2
|
+
import { a as setClickClackRuntime, i as getClickClackRuntime, n as buildClickClackTarget, r as parseClickClackTarget, t as clickClackPlugin } from "./.setup/channel-BX2RqmGn.mjs";
|
|
3
|
+
import { a as createClickClackClient } from "./.setup/resolve-B-W04sGX.mjs";
|
|
4
4
|
export { DEFAULT_ACCOUNT_ID, buildClickClackTarget, clickClackConfigSchema, clickClackPlugin, createClickClackClient, getClickClackRuntime, listClickClackAccountIds, listEnabledClickClackAccounts, parseClickClackTarget, resolveClickClackAccount, resolveDefaultClickClackAccountId, setClickClackRuntime };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { t as clickClackPlugin } from "./.setup/channel-BX2RqmGn.mjs";
|
|
2
|
+
export { clickClackPlugin };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as __reExport, t as __exportAll } from "./.setup/rolldown-runtime-
|
|
2
|
-
|
|
1
|
+
import { n as __reExport, t as __exportAll } from "./.setup/rolldown-runtime-B4FMCO8f.mjs";
|
|
2
|
+
//#region packages/normalization-core/src/record-coerce.ts
|
|
3
3
|
/** Type guard for non-array object records at browser-safe boundaries. */
|
|
4
4
|
function isRecord(value) {
|
|
5
5
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
@@ -8,7 +8,8 @@ function isRecord(value) {
|
|
|
8
8
|
function asNullableRecord(value) {
|
|
9
9
|
return isRecord(value) ? value : null;
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/config/channel-config-normalization.ts
|
|
12
13
|
/** Applies one channel-specific doctor migration to every object-shaped account. */
|
|
13
14
|
function normalizeChannelAccounts(params) {
|
|
14
15
|
const rawAccounts = asNullableRecord(params.entry.accounts);
|
|
@@ -84,7 +85,8 @@ function normalizeChannelConfigEntries(params) {
|
|
|
84
85
|
changes
|
|
85
86
|
};
|
|
86
87
|
}
|
|
87
|
-
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region src/plugin-sdk/legacy-webhook-listener-migration.ts
|
|
88
90
|
/** Preserve explicitly configured webhook listeners while moving ingress onto Gateway routes. */
|
|
89
91
|
function createLegacyWebhookListenerDoctorContract(params) {
|
|
90
92
|
const portKey = params.portKey ?? "webhookPort";
|
|
@@ -154,11 +156,13 @@ function createLegacyWebhookListenerDoctorContract(params) {
|
|
|
154
156
|
}
|
|
155
157
|
};
|
|
156
158
|
}
|
|
157
|
-
|
|
159
|
+
//#endregion
|
|
160
|
+
//#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
|
|
158
161
|
var runtime_doctor_migrations_exports = /* @__PURE__ */ __exportAll({ createLegacyWebhookListenerDoctorContract: () => createLegacyWebhookListenerDoctorContract });
|
|
159
162
|
import * as import_openclaw_plugin_sdk_runtime_doctor_migrations from "openclaw/plugin-sdk/runtime-doctor-migrations";
|
|
160
163
|
__reExport(runtime_doctor_migrations_exports, import_openclaw_plugin_sdk_runtime_doctor_migrations);
|
|
161
|
-
|
|
164
|
+
//#endregion
|
|
165
|
+
//#region extensions/clickclack/src/doctor-contract.ts
|
|
162
166
|
function stripTimeoutSeconds(value) {
|
|
163
167
|
const record = (0, runtime_doctor_migrations_exports.asObjectRecord)(value);
|
|
164
168
|
if (!record) return {
|
|
@@ -203,4 +207,5 @@ function normalizeCompatibilityConfig({ cfg }) {
|
|
|
203
207
|
changes: ["Removed retired ClickClack timeout tuning knobs."]
|
|
204
208
|
};
|
|
205
209
|
}
|
|
210
|
+
//#endregion
|
|
206
211
|
export { normalizeCompatibilityConfig };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as registerClickClackDiscussions } from "./.setup/runtime-api-
|
|
1
|
+
import { t as registerClickClackDiscussions } from "./.setup/runtime-api-DIu-sNJs.mjs";
|
|
2
2
|
import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
3
|
-
|
|
3
|
+
//#region extensions/clickclack/index.ts
|
|
4
4
|
var clickclack_default = defineBundledChannelEntry({
|
|
5
5
|
id: "clickclack",
|
|
6
6
|
name: "ClickClack",
|
|
@@ -16,4 +16,5 @@ var clickclack_default = defineBundledChannelEntry({
|
|
|
16
16
|
},
|
|
17
17
|
registerFull: registerClickClackDiscussions
|
|
18
18
|
});
|
|
19
|
+
//#endregion
|
|
19
20
|
export { clickclack_default as default };
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h as resolveClickClackAccount } from "./.setup/setup-surface-
|
|
2
|
-
import { a as setClickClackRuntime, r as parseClickClackTarget } from "./.setup/channel-
|
|
3
|
-
import { a as createClickClackClient } from "./.setup/resolve-
|
|
4
|
-
import { t as registerClickClackDiscussions } from "./.setup/runtime-api-
|
|
1
|
+
import { h as resolveClickClackAccount } from "./.setup/setup-surface-fPdDl0l2.mjs";
|
|
2
|
+
import { a as setClickClackRuntime, r as parseClickClackTarget } from "./.setup/channel-BX2RqmGn.mjs";
|
|
3
|
+
import { a as createClickClackClient } from "./.setup/resolve-B-W04sGX.mjs";
|
|
4
|
+
import { t as registerClickClackDiscussions } from "./.setup/runtime-api-DIu-sNJs.mjs";
|
|
5
5
|
export { createClickClackClient, parseClickClackTarget, registerClickClackDiscussions, resolveClickClackAccount, setClickClackRuntime };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries, t as channelSecrets } from "./.setup/secret-contract-CF7TKtkU.mjs";
|
|
2
|
+
export { channelSecrets, collectRuntimeConfigAssignments, secretTargetRegistryEntries };
|
package/dist/setup-entry.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { defineBundledChannelSetupEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
-
|
|
3
|
+
//#region extensions/clickclack/setup-entry.ts
|
|
4
4
|
var setup_entry_default = defineBundledChannelSetupEntry({
|
|
5
5
|
importMetaUrl: import.meta.url,
|
|
6
6
|
plugin: {
|
|
7
|
-
specifier: fileURLToPath(new URL(".setup/setup-plugin-api-
|
|
7
|
+
specifier: fileURLToPath(new URL(".setup/setup-plugin-api-bSnZClKM.mjs", import.meta.url).href),
|
|
8
8
|
exportName: "clickClackSetupPlugin"
|
|
9
9
|
},
|
|
10
10
|
secrets: {
|
|
11
|
-
specifier: fileURLToPath(new URL(".setup/secret-contract-api-
|
|
11
|
+
specifier: fileURLToPath(new URL(".setup/secret-contract-api-CBcsgIYZ.mjs", import.meta.url).href),
|
|
12
12
|
exportName: "channelSecrets"
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
|
+
//#endregion
|
|
15
16
|
export { setup_entry_default as default };
|
package/dist/setup-plugin-api.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { t as clickClackSetupPlugin } from "./.setup/setup-plugin-api-BiMffAUC.mjs";
|
|
2
|
+
export { clickClackSetupPlugin };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/clickclack",
|
|
3
|
-
"version": "2026.10.
|
|
3
|
+
"version": "2026.10.34",
|
|
4
4
|
"description": "OpenClaw ClickClack channel plugin",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"zod": "4.6.5"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"openclaw": ">=2026.
|
|
16
|
+
"openclaw": ">=2026.11.4"
|
|
17
17
|
},
|
|
18
18
|
"peerDependenciesMeta": {
|
|
19
19
|
"openclaw": {
|
|
@@ -139,10 +139,10 @@
|
|
|
139
139
|
"allowInvalidConfigRecovery": true
|
|
140
140
|
},
|
|
141
141
|
"compat": {
|
|
142
|
-
"pluginApi": ">=2026.
|
|
142
|
+
"pluginApi": ">=2026.11.4"
|
|
143
143
|
},
|
|
144
144
|
"build": {
|
|
145
|
-
"openclawVersion": "2026.10.
|
|
145
|
+
"openclawVersion": "2026.10.34",
|
|
146
146
|
"bundledDist": false
|
|
147
147
|
},
|
|
148
148
|
"release": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { t as clickClackSetupPlugin } from "./setup-plugin-api-COv8knUv.mjs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"entries":[{"output":"api.js","source":"extensions/clickclack/api.ts"},{"output":"channel-plugin-api.js","source":"extensions/clickclack/channel-plugin-api.ts"},{"output":"doctor-contract-api.js","source":"extensions/clickclack/doctor-contract-api.ts"},{"output":"index.js","source":"extensions/clickclack/index.ts"},{"output":"runtime-api.js","source":"extensions/clickclack/runtime-api.ts"},{"output":"secret-contract-api.js","source":"extensions/clickclack/secret-contract-api.ts"},{"output":"setup-entry.js","source":"extensions/clickclack/setup-entry.ts"},{"output":"setup-plugin-api.js","source":"extensions/clickclack/setup-plugin-api.ts"}],"chunks":[{"output":".setup/channel-CaLQ1zSw.mjs","sha256":"5826753e5b7757609f22548fd14366a461988d8941cb43b06a2b58e32f799ab2","facadeSource":null,"sources":["extensions/clickclack/src/access.ts","extensions/clickclack/src/activity.ts","extensions/clickclack/src/channel.ts","extensions/clickclack/src/command-menu.ts","extensions/clickclack/src/discussions/binding-generation.ts","extensions/clickclack/src/discussions/binding-store.ts","extensions/clickclack/src/discussions/eligibility.ts","extensions/clickclack/src/discussions/naming.ts","extensions/clickclack/src/discussions/revoked-channel-store.ts","extensions/clickclack/src/discussions/routing.ts","extensions/clickclack/src/gateway.ts","extensions/clickclack/src/group-policy.ts","extensions/clickclack/src/inbound.ts","extensions/clickclack/src/mention-facts.ts","extensions/clickclack/src/outbound.ts","extensions/clickclack/src/progress.ts","extensions/clickclack/src/runtime.ts","extensions/clickclack/src/target.ts","src/channels/mention-gating.ts"]},{"output":".setup/resolve-C2XmZanM.mjs","sha256":"06e4530c42642ec1e8f2a3b38bbc4a3191420070dcbefec3fd1d82aa865c8eee","facadeSource":null,"sources":["extensions/clickclack/src/http-client.ts","extensions/clickclack/src/resolve.ts","extensions/clickclack/src/ws-runtime.ts"]},{"output":".setup/rolldown-runtime-nwUcYXjP.mjs","sha256":"c827e1b96e0d1ec7d087de7243d1db40c16377e1d4b741434e8ecf8858e13dca","facadeSource":null,"sources":[]},{"output":".setup/runtime-api-HO9-jJAP.mjs","sha256":"84b01301a0a949fd28191306fd8cfaad58134f5ea9595822761cbe2d4658eeee","facadeSource":null,"sources":["extensions/clickclack/src/discussions/binding-retention.ts","extensions/clickclack/src/discussions/control-session-url.ts","extensions/clickclack/src/discussions/history-format.ts","extensions/clickclack/src/discussions/installation.ts","extensions/clickclack/src/discussions/reconcile-scheduler.ts","extensions/clickclack/src/discussions/register.ts","extensions/clickclack/src/discussions/service-open.ts","extensions/clickclack/src/discussions/service.ts","extensions/clickclack/src/discussions/tool-policy.ts","extensions/clickclack/src/discussions/tool.ts"]},{"output":".setup/secret-contract-api-DS3Vv0Gu.mjs","sha256":"1f4fbfb7031408f8896ccf43ddb8548914c3262c87011904190d9b28c40ebb80","facadeSource":"extensions/clickclack/secret-contract-api.ts","sources":[]},{"output":".setup/secret-contract-Dj8nibUr.mjs","sha256":"2c29e39e3a80ffa74c2141f7a8b2a0beb63b1094f030860bd26bda2319d04d9b","facadeSource":null,"sources":["extensions/clickclack/src/secret-contract.ts"]},{"output":".setup/setup-claim-D50o9egr.mjs","sha256":"e9c3198e379b29630ec076825b271282683e3dce224ce4e68c734a24d1553030","facadeSource":"extensions/clickclack/src/setup-claim.ts","sources":["extensions/clickclack/src/setup-claim.ts"]},{"output":".setup/setup-plugin-api-COv8knUv.mjs","sha256":"7b91276efb32310db09a147122fd14ab6541cf72bd36681c66e0fe53fd6ee2c0","facadeSource":null,"sources":["extensions/clickclack/src/channel.setup.ts"]},{"output":".setup/setup-plugin-api-wzfSSaGz.mjs","sha256":"75e1b9092d70642a8373410ab52eac88204b0e74965221ad3db4f6bc53b605fc","facadeSource":"extensions/clickclack/setup-plugin-api.ts","sources":[]},{"output":".setup/setup-surface-BuNtdRQY.mjs","sha256":"f4320f44a3a8614d909738b1c5522538f3b0d0ca855b8328dc635f27512a229a","facadeSource":null,"sources":["extensions/clickclack/src/accounts.ts","extensions/clickclack/src/channel-config.ts","extensions/clickclack/src/config-schema.ts","extensions/clickclack/src/setup-contract.ts","extensions/clickclack/src/setup-core.ts","extensions/clickclack/src/setup-surface.ts"]},{"output":".setup/setup-verify-CSI-GwUA.mjs","sha256":"3bb374ac15fc84c61b341765b440604056113b295e3a2726bedcbe4bb337ac1e","facadeSource":"extensions/clickclack/src/setup-verify.ts","sources":["extensions/clickclack/src/setup-verify.ts"]},{"output":"api.js","sha256":"b74bb911247cd92ecfe4416047cf4fbc2e12532ff33203798bfc8a0178a1dbf2","facadeSource":"extensions/clickclack/api.ts","sources":[]},{"output":"channel-plugin-api.js","sha256":"a614b3428fe7f25fa8945e8827c4a83138881615723c599d11435971cb151014","facadeSource":"extensions/clickclack/channel-plugin-api.ts","sources":[]},{"output":"doctor-contract-api.js","sha256":"4c9aa609ba3c4b3ed643dfcdd3be2ba7f3623c249e27f5885b9a98d0d35ee02c","facadeSource":"extensions/clickclack/doctor-contract-api.ts","sources":["extensions/clickclack/src/doctor-contract.ts","packages/normalization-core/src/record-coerce.ts","src/config/channel-config-normalization.ts","src/plugin-sdk/legacy-webhook-listener-migration.ts"]},{"output":"index.js","sha256":"04a4e282561ef5d0acca07f22f2047fef309c424aeb48b492c186e99dc462abc","facadeSource":"extensions/clickclack/index.ts","sources":["extensions/clickclack/index.ts"]},{"output":"runtime-api.js","sha256":"5b876c518eb90e7d4d7164e695e57b3f05f311a1251144281f1bf4aad7dec658","facadeSource":"extensions/clickclack/runtime-api.ts","sources":[]},{"output":"secret-contract-api.js","sha256":"cff9cd4ef5118483a955a1375f95db91532f9f9755b43e54e4b04561b9ee7810","facadeSource":"extensions/clickclack/secret-contract-api.ts","sources":[]},{"output":"setup-entry.js","sha256":"80f784ce722288bf8c8a86f161deb4d82d3c7f0b62963c855a2f2e840d4523b1","facadeSource":"extensions/clickclack/setup-entry.ts","sources":["extensions/clickclack/setup-entry.ts"]},{"output":"setup-plugin-api.js","sha256":"bafa47823ec8fdd8772f8da717fb100be9456e3b18bf5716438c471d692d7cb1","facadeSource":"extensions/clickclack/setup-plugin-api.ts","sources":[]}],"unrenderedSources":["extensions/clickclack/api.ts","extensions/clickclack/channel-plugin-api.ts","extensions/clickclack/config-doctor-api.ts","extensions/clickclack/doctor-contract-api.ts","extensions/clickclack/runtime-api.ts","extensions/clickclack/secret-contract-api.ts","extensions/clickclack/setup-plugin-api.ts"]}
|