@openclaw/irc 2026.6.11 → 2026.7.1-beta.2

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 { g as resolveIrcAccount, h as resolveDefaultIrcAccountId, m as listIrcAccountIds, n as ircSetupWizard, p as listEnabledIrcAccounts, r as ircSetupAdapter, t as ircPlugin } from "./channel-wk_lzdJy.js";
1
+ import { g as resolveIrcAccount, h as resolveDefaultIrcAccountId, m as listIrcAccountIds, n as ircSetupWizard, p as listEnabledIrcAccounts, r as ircSetupAdapter, t as ircPlugin } from "./channel-BTyt-Cxx.js";
2
2
  import { n as setIrcRuntime } from "./runtime-DZfYm3vY.js";
3
3
  export { ircPlugin, ircSetupAdapter, ircSetupWizard, listEnabledIrcAccounts, listIrcAccountIds, resolveDefaultIrcAccountId, resolveIrcAccount, setIrcRuntime };
@@ -7,6 +7,7 @@ import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter, createSco
7
7
  import { createChatChannelPlugin, parseOptionalDelimitedEntries, tryReadSecretFileSync } from "openclaw/plugin-sdk/channel-core";
8
8
  import { composeAccountWarningCollectors, createAllowlistProviderOpenWarningCollector, createDangerousNameMatchingMutableAllowlistWarningCollector } from "openclaw/plugin-sdk/channel-policy";
9
9
  import { createChannelDirectoryAdapter, createResolvedDirectoryEntriesLister } from "openclaw/plugin-sdk/directory-runtime";
10
+ import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
10
11
  import { buildBaseChannelStatusSummary, createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
11
12
  import { DEFAULT_ACCOUNT_ID, DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$2, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
12
13
  import { resolveMergedAccountConfig } from "openclaw/plugin-sdk/account-resolution";
@@ -15,7 +16,7 @@ import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-i
15
16
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries, normalizeStringifiedOptionalString, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
16
17
  import { createAccountStatusSink, createMessageReceiptFromOutboundResults, defineChannelMessageAdapter, sanitizeForPlainText } from "openclaw/plugin-sdk/channel-outbound";
17
18
  import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
18
- import { chunkTextForOutbound, convertMarkdownTables } from "openclaw/plugin-sdk/text-chunking";
19
+ import { chunkTextForOutbound, convertMarkdownTables, sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
19
20
  import { runStoppablePassiveMonitor } from "openclaw/plugin-sdk/extension-shared";
20
21
  import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
21
22
  import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
@@ -169,8 +170,7 @@ function asObjectRecord(value) {
169
170
  function isIrcMutableAllowEntry(raw) {
170
171
  const text = normalizeLowercaseStringOrEmpty(raw);
171
172
  if (!text || text === "*") return false;
172
- const normalized = text.replace(/^irc:/, "").replace(/^user:/, "").trim();
173
- return !normalized.includes("!") && !normalized.includes("@");
173
+ return !text.replace(/^irc:/, "").replace(/^user:/, "").trim().includes("@");
174
174
  }
175
175
  const collectIrcMutableAllowlistWarnings = createDangerousNameMatchingMutableAllowlistWarningCollector({
176
176
  channel: "irc",
@@ -197,11 +197,7 @@ const collectIrcMutableAllowlistWarnings = createDangerousNameMatchingMutableAll
197
197
  });
198
198
  //#endregion
199
199
  //#region extensions/irc/src/gateway.ts
200
- let ircChannelRuntimePromise$1;
201
- async function loadIrcChannelRuntime$1() {
202
- ircChannelRuntimePromise$1 ??= import("./channel-runtime-DFIO_jtC.js");
203
- return await ircChannelRuntimePromise$1;
204
- }
200
+ const loadIrcChannelRuntime$1 = createLazyRuntimeModule(() => import("./channel-runtime-CdlR5F_m.js"));
205
201
  async function startIrcGatewayAccount(ctx) {
206
202
  const account = ctx.account;
207
203
  const statusSink = createAccountStatusSink({
@@ -304,7 +300,10 @@ function parseIrcPrefix(prefix) {
304
300
  return { nick: prefix };
305
301
  }
306
302
  function decodeLiteralEscapes(input) {
307
- return input.replace(/\\r/g, "\r").replace(/\\n/g, "\n").replace(/\\t/g, " ").replace(/\\0/g, "\0").replace(/\\x([0-9a-fA-F]{2})/g, (_, hex) => String.fromCharCode(Number.parseInt(hex, 16))).replace(/\\u([0-9a-fA-F]{4})/g, (_, hex) => String.fromCharCode(Number.parseInt(hex, 16)));
303
+ return input.replace(/\\r/g, "\r").replace(/\\n/g, "\n").replace(/\\t/g, " ").replace(/\\0/g, "\0").replace(/\\x([0-9a-fA-F]{2})/g, (_, hex) => String.fromCharCode(Number.parseInt(hex, 16))).replace(/\\u([dD][89abAB][0-9a-fA-F]{2})\\u([dD][c-fC-F][0-9a-fA-F]{2})/g, (_match, h, l) => String.fromCodePoint(65536 + (Number.parseInt(h, 16) - 55296 << 10) + (Number.parseInt(l, 16) - 56320))).replace(/\\u([0-9a-fA-F]{4})/g, (match, hex) => {
304
+ const codePoint = Number.parseInt(hex, 16);
305
+ return codePoint >= 55296 && codePoint <= 57343 ? match : String.fromCharCode(codePoint);
306
+ });
308
307
  }
309
308
  function sanitizeIrcOutboundText(text) {
310
309
  return stripIrcControlChars(decodeLiteralEscapes(text).replace(/\r?\n/g, " ")).trim();
@@ -332,11 +331,13 @@ function toError(err) {
332
331
  if (err instanceof Error) return err;
333
332
  return new Error(typeof err === "string" ? err : JSON.stringify(err));
334
333
  }
334
+ let nickCollisionFallbackSeq = 0;
335
335
  function buildFallbackNick(nick) {
336
336
  const base = nick.replace(/\s+/g, "").replace(/[^A-Za-z0-9_\-[\]\\`^{}|]/g, "") || "openclaw";
337
- const suffix = "_";
337
+ const seq = ++nickCollisionFallbackSeq;
338
+ const suffix = seq === 1 ? "_" : `_${seq}`;
338
339
  const maxNickLen = 30;
339
- if (base.length >= maxNickLen) return `${base.slice(0, maxNickLen - 1)}${suffix}`;
340
+ if (base.length >= maxNickLen) return `${base.slice(0, maxNickLen - suffix.length)}${suffix}`;
340
341
  return `${base}${suffix}`;
341
342
  }
342
343
  function normalizeIrcNick(value) {
@@ -748,7 +749,7 @@ const ircOutboundBaseAdapter = {
748
749
  chunker: chunkTextForOutbound,
749
750
  chunkerMode: "markdown",
750
751
  textChunkLimit: 350,
751
- sanitizeText: ({ text }) => sanitizeForPlainText(text)
752
+ sanitizeText: ({ text }) => sanitizeForPlainText(sanitizeAssistantVisibleText(text))
752
753
  };
753
754
  //#endregion
754
755
  //#region extensions/irc/src/policy.ts
@@ -1285,11 +1286,7 @@ const meta = {
1285
1286
  systemImage: "number",
1286
1287
  markdownCapable: true
1287
1288
  };
1288
- let ircChannelRuntimePromise;
1289
- async function loadIrcChannelRuntime() {
1290
- ircChannelRuntimePromise ??= import("./channel-runtime-DFIO_jtC.js");
1291
- return await ircChannelRuntimePromise;
1292
- }
1289
+ const loadIrcChannelRuntime = createLazyRuntimeModule(() => import("./channel-runtime-CdlR5F_m.js"));
1293
1290
  function normalizePairingTarget(raw) {
1294
1291
  const normalized = normalizeIrcAllowEntry(raw);
1295
1292
  if (!normalized) return "";
@@ -1,2 +1,2 @@
1
- import { t as ircPlugin } from "./channel-wk_lzdJy.js";
1
+ import { t as ircPlugin } from "./channel-BTyt-Cxx.js";
2
2
  export { ircPlugin };
@@ -1,4 +1,4 @@
1
- import { a as resolveIrcRequireMention, c as isChannelTarget, d as connectIrcClient, f as makeIrcMessageId, g as resolveIrcAccount, i as resolveIrcGroupMatch, l as normalizeIrcAllowEntry, o as sendMessageIrc, s as buildIrcAllowlistCandidates, u as buildIrcConnectOptions } from "./channel-wk_lzdJy.js";
1
+ import { a as resolveIrcRequireMention, c as isChannelTarget, d as connectIrcClient, f as makeIrcMessageId, g as resolveIrcAccount, i as resolveIrcGroupMatch, l as normalizeIrcAllowEntry, o as sendMessageIrc, s as buildIrcAllowlistCandidates, u as buildIrcConnectOptions } from "./channel-BTyt-Cxx.js";
2
2
  import { t as getIrcRuntime } from "./runtime-DZfYm3vY.js";
3
3
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  import { resolveLoggerBackedRuntime } from "openclaw/plugin-sdk/extension-shared";
@@ -11,26 +11,36 @@ import { deliverFormattedTextWithAttachments } from "openclaw/plugin-sdk/reply-p
11
11
  import { GROUP_POLICY_BLOCKED_LABEL, resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
12
12
  //#region extensions/irc/src/inbound.ts
13
13
  const CHANNEL_ID = "irc";
14
- const IRC_NICK_KIND = "plugin:irc-nick";
15
14
  const ircIngressIdentity = defineStableChannelIngressIdentity({
16
15
  key: "irc-id",
17
16
  normalizeEntry: normalizeIrcStableEntry,
18
17
  normalizeSubject: normalizeLowercaseStringOrEmpty,
19
18
  sensitivity: "pii",
20
- aliases: [...["irc-id-nick-user", "irc-id-nick-host"].map((key) => ({
21
- key,
22
- kind: "stable-id",
23
- normalizeEntry: () => null,
24
- normalizeSubject: normalizeLowercaseStringOrEmpty,
25
- sensitivity: "pii"
26
- })), {
27
- key: "irc-nick",
28
- kind: IRC_NICK_KIND,
29
- normalizeEntry: normalizeIrcNickEntry,
30
- normalizeSubject: normalizeLowercaseStringOrEmpty,
31
- dangerous: true,
32
- sensitivity: "pii"
33
- }],
19
+ aliases: [
20
+ {
21
+ key: "irc-id-nick-user",
22
+ kind: "stable-id",
23
+ normalizeEntry: normalizeIrcNickUserEntry,
24
+ normalizeSubject: normalizeLowercaseStringOrEmpty,
25
+ dangerous: true,
26
+ sensitivity: "pii"
27
+ },
28
+ {
29
+ key: "irc-id-nick-host",
30
+ kind: "stable-id",
31
+ normalizeEntry: () => null,
32
+ normalizeSubject: normalizeLowercaseStringOrEmpty,
33
+ sensitivity: "pii"
34
+ },
35
+ {
36
+ key: "irc-nick",
37
+ kind: "plugin:irc-nick",
38
+ normalizeEntry: normalizeIrcNickEntry,
39
+ normalizeSubject: normalizeLowercaseStringOrEmpty,
40
+ dangerous: true,
41
+ sensitivity: "pii"
42
+ }
43
+ ],
34
44
  isWildcardEntry: (entry) => normalizeIrcAllowEntry(entry) === "*",
35
45
  resolveEntryId: ({ entryIndex, fieldKey }) => `irc-entry-${entryIndex + 1}:${fieldKey === "irc-nick" ? "nick" : "id"}`
36
46
  });
@@ -38,9 +48,20 @@ const escapeIrcRegexLiteral = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\
38
48
  function isBareNick(value) {
39
49
  return !value.includes("!") && !value.includes("@");
40
50
  }
51
+ function hasVerifiedHost(value) {
52
+ return value.includes("@");
53
+ }
54
+ function isHostlessNickUser(value) {
55
+ return value.includes("!") && !value.includes("@");
56
+ }
41
57
  function normalizeIrcStableEntry(value) {
42
58
  const normalized = normalizeIrcAllowEntry(value);
43
- if (!normalized || normalized === "*" || isBareNick(normalized)) return null;
59
+ if (!normalized || normalized === "*" || !hasVerifiedHost(normalized)) return null;
60
+ return normalized;
61
+ }
62
+ function normalizeIrcNickUserEntry(value) {
63
+ const normalized = normalizeIrcAllowEntry(value);
64
+ if (!normalized || normalized === "*" || !isHostlessNickUser(normalized)) return null;
44
65
  return normalized;
45
66
  }
46
67
  function normalizeIrcNickEntry(value) {
@@ -52,12 +73,13 @@ function hasEntries(entries) {
52
73
  return normalizeStringEntries(entries).some((entry) => normalizeIrcAllowEntry(entry));
53
74
  }
54
75
  function createIrcIngressSubject(message) {
55
- const stableCandidates = buildIrcAllowlistCandidates(message, { allowNameMatching: true }).filter((candidate) => !isBareNick(candidate));
76
+ const candidates = buildIrcAllowlistCandidates(message, { allowNameMatching: true });
77
+ const stableCandidates = candidates.filter((candidate) => hasVerifiedHost(candidate));
56
78
  const nick = normalizeLowercaseStringOrEmpty(message.senderNick);
57
79
  return {
58
80
  stableId: stableCandidates[stableCandidates.length - 1] ?? nick,
59
81
  aliases: {
60
- "irc-id-nick-user": stableCandidates.find((candidate) => candidate.includes("!") && !candidate.includes("@")),
82
+ "irc-id-nick-user": candidates.find((candidate) => isHostlessNickUser(candidate)),
61
83
  "irc-id-nick-host": stableCandidates.find((candidate) => !candidate.includes("!") && candidate.includes("@")),
62
84
  "irc-nick": nick
63
85
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@openclaw/irc",
3
- "version": "2026.6.11",
3
+ "version": "2026.7.1-beta.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/irc",
9
- "version": "2026.6.11",
9
+ "version": "2026.7.1-beta.2",
10
10
  "dependencies": {
11
11
  "zod": "4.4.3"
12
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/irc",
3
- "version": "2026.6.11",
3
+ "version": "2026.7.1-beta.2",
4
4
  "description": "OpenClaw IRC channel plugin",
5
5
  "type": "module",
6
6
  "openclaw": {
@@ -39,10 +39,10 @@
39
39
  }
40
40
  },
41
41
  "compat": {
42
- "pluginApi": ">=2026.6.11"
42
+ "pluginApi": ">=2026.7.1-beta.2"
43
43
  },
44
44
  "build": {
45
- "openclawVersion": "2026.6.11",
45
+ "openclawVersion": "2026.7.1-beta.2",
46
46
  "bundledDist": false
47
47
  },
48
48
  "release": {
@@ -68,7 +68,7 @@
68
68
  "README.md"
69
69
  ],
70
70
  "peerDependencies": {
71
- "openclaw": ">=2026.6.11"
71
+ "openclaw": ">=2026.7.1-beta.2"
72
72
  },
73
73
  "peerDependenciesMeta": {
74
74
  "openclaw": {