@openclaw/irc 2026.6.11 → 2026.7.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 { 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-X7F4NSHn.js";
2
2
  import { n as setIrcRuntime } from "./runtime-DZfYm3vY.js";
3
3
  export { ircPlugin, ircSetupAdapter, ircSetupWizard, listEnabledIrcAccounts, listIrcAccountIds, resolveDefaultIrcAccountId, resolveIrcAccount, setIrcRuntime };
@@ -15,7 +15,7 @@ import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-i
15
15
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries, normalizeStringifiedOptionalString, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
16
16
  import { createAccountStatusSink, createMessageReceiptFromOutboundResults, defineChannelMessageAdapter, sanitizeForPlainText } from "openclaw/plugin-sdk/channel-outbound";
17
17
  import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
18
- import { chunkTextForOutbound, convertMarkdownTables } from "openclaw/plugin-sdk/text-chunking";
18
+ import { chunkTextForOutbound, convertMarkdownTables, sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
19
19
  import { runStoppablePassiveMonitor } from "openclaw/plugin-sdk/extension-shared";
20
20
  import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
21
21
  import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
@@ -169,8 +169,7 @@ function asObjectRecord(value) {
169
169
  function isIrcMutableAllowEntry(raw) {
170
170
  const text = normalizeLowercaseStringOrEmpty(raw);
171
171
  if (!text || text === "*") return false;
172
- const normalized = text.replace(/^irc:/, "").replace(/^user:/, "").trim();
173
- return !normalized.includes("!") && !normalized.includes("@");
172
+ return !text.replace(/^irc:/, "").replace(/^user:/, "").trim().includes("@");
174
173
  }
175
174
  const collectIrcMutableAllowlistWarnings = createDangerousNameMatchingMutableAllowlistWarningCollector({
176
175
  channel: "irc",
@@ -199,7 +198,7 @@ const collectIrcMutableAllowlistWarnings = createDangerousNameMatchingMutableAll
199
198
  //#region extensions/irc/src/gateway.ts
200
199
  let ircChannelRuntimePromise$1;
201
200
  async function loadIrcChannelRuntime$1() {
202
- ircChannelRuntimePromise$1 ??= import("./channel-runtime-DFIO_jtC.js");
201
+ ircChannelRuntimePromise$1 ??= import("./channel-runtime-BUK62iQX.js");
203
202
  return await ircChannelRuntimePromise$1;
204
203
  }
205
204
  async function startIrcGatewayAccount(ctx) {
@@ -304,7 +303,10 @@ function parseIrcPrefix(prefix) {
304
303
  return { nick: prefix };
305
304
  }
306
305
  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)));
306
+ 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) => {
307
+ const codePoint = Number.parseInt(hex, 16);
308
+ return codePoint >= 55296 && codePoint <= 57343 ? match : String.fromCharCode(codePoint);
309
+ });
308
310
  }
309
311
  function sanitizeIrcOutboundText(text) {
310
312
  return stripIrcControlChars(decodeLiteralEscapes(text).replace(/\r?\n/g, " ")).trim();
@@ -332,11 +334,13 @@ function toError(err) {
332
334
  if (err instanceof Error) return err;
333
335
  return new Error(typeof err === "string" ? err : JSON.stringify(err));
334
336
  }
337
+ let nickCollisionFallbackSeq = 0;
335
338
  function buildFallbackNick(nick) {
336
339
  const base = nick.replace(/\s+/g, "").replace(/[^A-Za-z0-9_\-[\]\\`^{}|]/g, "") || "openclaw";
337
- const suffix = "_";
340
+ const seq = ++nickCollisionFallbackSeq;
341
+ const suffix = seq === 1 ? "_" : `_${seq}`;
338
342
  const maxNickLen = 30;
339
- if (base.length >= maxNickLen) return `${base.slice(0, maxNickLen - 1)}${suffix}`;
343
+ if (base.length >= maxNickLen) return `${base.slice(0, maxNickLen - suffix.length)}${suffix}`;
340
344
  return `${base}${suffix}`;
341
345
  }
342
346
  function normalizeIrcNick(value) {
@@ -748,7 +752,7 @@ const ircOutboundBaseAdapter = {
748
752
  chunker: chunkTextForOutbound,
749
753
  chunkerMode: "markdown",
750
754
  textChunkLimit: 350,
751
- sanitizeText: ({ text }) => sanitizeForPlainText(text)
755
+ sanitizeText: ({ text }) => sanitizeForPlainText(sanitizeAssistantVisibleText(text))
752
756
  };
753
757
  //#endregion
754
758
  //#region extensions/irc/src/policy.ts
@@ -1287,7 +1291,7 @@ const meta = {
1287
1291
  };
1288
1292
  let ircChannelRuntimePromise;
1289
1293
  async function loadIrcChannelRuntime() {
1290
- ircChannelRuntimePromise ??= import("./channel-runtime-DFIO_jtC.js");
1294
+ ircChannelRuntimePromise ??= import("./channel-runtime-BUK62iQX.js");
1291
1295
  return await ircChannelRuntimePromise;
1292
1296
  }
1293
1297
  function normalizePairingTarget(raw) {
@@ -1,2 +1,2 @@
1
- import { t as ircPlugin } from "./channel-wk_lzdJy.js";
1
+ import { t as ircPlugin } from "./channel-X7F4NSHn.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-X7F4NSHn.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.1",
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.1",
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.1",
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.1"
43
43
  },
44
44
  "build": {
45
- "openclawVersion": "2026.6.11",
45
+ "openclawVersion": "2026.7.1-beta.1",
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.1"
72
72
  },
73
73
  "peerDependenciesMeta": {
74
74
  "openclaw": {