@openclaw/irc 2026.7.2-beta.1 → 2026.7.2-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-DVkIYl85.js";
2
- import { n as setIrcRuntime } from "./runtime-DZfYm3vY.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-DivPJINh.js";
2
+ import { n as setIrcRuntime } from "./runtime-xy-FcjJC.js";
3
3
  export { ircPlugin, ircSetupAdapter, ircSetupWizard, listEnabledIrcAccounts, listIrcAccountIds, resolveDefaultIrcAccountId, resolveIrcAccount, setIrcRuntime };
@@ -1,11 +1,11 @@
1
- import { t as IrcChannelConfigSchema } from "./config-schema-nFnbvojz.js";
2
- import { t as getIrcRuntime } from "./runtime-DZfYm3vY.js";
1
+ import { t as IrcChannelConfigSchema } from "./config-schema-BPoye3--.js";
2
+ import { t as getIrcRuntime } from "./runtime-xy-FcjJC.js";
3
3
  import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-PJHaoTSe.js";
4
4
  import { createAccountListHelpers, describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
5
5
  import { formatNormalizedAllowFromEntries } from "openclaw/plugin-sdk/allow-from";
6
6
  import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter, createScopedDmSecurityResolver } from "openclaw/plugin-sdk/channel-config-helpers";
7
7
  import { buildChannelOutboundSessionRoute, createChatChannelPlugin, parseOptionalDelimitedEntries, tryReadSecretFileSync } from "openclaw/plugin-sdk/channel-core";
8
- import { composeAccountWarningCollectors, createAllowlistProviderOpenWarningCollector, createDangerousNameMatchingMutableAllowlistWarningCollector, resolveScopeKeyCaseInsensitive, resolveScopeRequireMention, resolveScopeToolsPolicy } from "openclaw/plugin-sdk/channel-policy";
8
+ import { buildMutableAllowEntryDetector, collectStandardAllowlistLists, composeAccountWarningCollectors, createAllowlistProviderOpenWarningCollector, createDangerousNameMatchingMutableAllowlistWarningCollector, resolveScopeKeyCaseInsensitive, resolveScopeRequireMention, resolveScopeToolsPolicy } from "openclaw/plugin-sdk/channel-policy";
9
9
  import { createChannelDirectoryAdapter, createResolvedDirectoryEntriesLister } from "openclaw/plugin-sdk/directory-runtime";
10
10
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
11
11
  import { buildBaseChannelStatusSummary, createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
@@ -162,42 +162,17 @@ function listEnabledIrcAccounts(cfg) {
162
162
  accountId
163
163
  })).filter((account) => account.enabled);
164
164
  }
165
- //#endregion
166
- //#region extensions/irc/src/doctor.ts
167
- function asObjectRecord(value) {
168
- return value && typeof value === "object" && !Array.isArray(value) ? value : null;
169
- }
170
- function isIrcMutableAllowEntry(raw) {
171
- const text = normalizeLowercaseStringOrEmpty(raw);
172
- if (!text || text === "*") return false;
173
- return !text.replace(/^irc:/, "").replace(/^user:/, "").trim().includes("@");
174
- }
175
165
  const collectIrcMutableAllowlistWarnings = createDangerousNameMatchingMutableAllowlistWarningCollector({
176
166
  channel: "irc",
177
- detector: isIrcMutableAllowEntry,
178
- collectLists: (scope) => {
179
- const lists = [{
180
- pathLabel: `${scope.prefix}.allowFrom`,
181
- list: scope.account.allowFrom
182
- }, {
183
- pathLabel: `${scope.prefix}.groupAllowFrom`,
184
- list: scope.account.groupAllowFrom
185
- }];
186
- const groups = asObjectRecord(scope.account.groups);
187
- if (groups) for (const [groupKey, groupRaw] of Object.entries(groups)) {
188
- const group = asObjectRecord(groupRaw);
189
- if (!group) continue;
190
- lists.push({
191
- pathLabel: `${scope.prefix}.groups.${groupKey}.allowFrom`,
192
- list: group.allowFrom
193
- });
194
- }
195
- return lists;
196
- }
167
+ detector: buildMutableAllowEntryDetector({ stableIdPattern: /^(?:(?:irc|user):)*[^@]*@/i }),
168
+ collectLists: (scope) => collectStandardAllowlistLists(scope, {
169
+ includeGroups: true,
170
+ groupField: "allowFrom"
171
+ })
197
172
  });
198
173
  //#endregion
199
174
  //#region extensions/irc/src/gateway.ts
200
- const loadIrcChannelRuntime$1 = createLazyRuntimeModule(() => import("./channel-runtime-DQUHlrj4.js"));
175
+ const loadIrcChannelRuntime$1 = createLazyRuntimeModule(() => import("./channel-runtime-Dg0LFlsh.js"));
201
176
  async function startIrcGatewayAccount(ctx) {
202
177
  const account = ctx.account;
203
178
  const statusSink = createAccountStatusSink({
@@ -1335,7 +1310,7 @@ const meta = {
1335
1310
  systemImage: "number",
1336
1311
  markdownCapable: true
1337
1312
  };
1338
- const loadIrcChannelRuntime = createLazyRuntimeModule(() => import("./channel-runtime-DQUHlrj4.js"));
1313
+ const loadIrcChannelRuntime = createLazyRuntimeModule(() => import("./channel-runtime-Dg0LFlsh.js"));
1339
1314
  function normalizePairingTarget(raw) {
1340
1315
  const normalized = normalizeIrcAllowEntry(raw);
1341
1316
  if (!normalized) return "";
@@ -1,2 +1,2 @@
1
- import { t as IrcChannelConfigSchema } from "./config-schema-nFnbvojz.js";
1
+ import { t as IrcChannelConfigSchema } from "./config-schema-BPoye3--.js";
2
2
  export { IrcChannelConfigSchema };
@@ -1,2 +1,2 @@
1
- import { t as ircPlugin } from "./channel-DVkIYl85.js";
1
+ import { t as ircPlugin } from "./channel-DivPJINh.js";
2
2
  export { ircPlugin };
@@ -1,5 +1,5 @@
1
- import { a as resolveIrcGroupRequireMention, 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-DVkIYl85.js";
2
- import { t as getIrcRuntime } from "./runtime-DZfYm3vY.js";
1
+ import { a as resolveIrcGroupRequireMention, 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-DivPJINh.js";
2
+ import { t as getIrcRuntime } from "./runtime-xy-FcjJC.js";
3
3
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  import { resolveChannelStreamingBlockEnabled } from "openclaw/plugin-sdk/channel-outbound";
5
5
  import { resolveLoggerBackedRuntime } from "openclaw/plugin-sdk/extension-shared";
@@ -1,5 +1,5 @@
1
1
  import { createChannelConfigUiHints } from "openclaw/plugin-sdk/channel-core";
2
- import { DmPolicySchema, GroupPolicySchema, MarkdownConfigSchema, ReplyRuntimeConfigSchemaShape, ToolPolicySchema, buildChannelConfigSchema, requireOpenAllowFrom } from "openclaw/plugin-sdk/channel-config-schema";
2
+ import { ChannelGroupEntrySchema, DmPolicySchema, GroupPolicySchema, MarkdownConfigSchema, ReplyRuntimeConfigSchemaShape, buildChannelConfigSchema, buildMultiAccountChannelSchema, requireOpenAllowFrom } from "openclaw/plugin-sdk/channel-config-schema";
3
3
  import { z } from "zod";
4
4
  //#region extensions/irc/src/config-ui-hints.ts
5
5
  const ircChannelConfigUiHints = {
@@ -42,15 +42,6 @@ const ircChannelConfigUiHints = {
42
42
  };
43
43
  //#endregion
44
44
  //#region extensions/irc/src/config-schema.ts
45
- const IrcGroupSchema = z.object({
46
- requireMention: z.boolean().optional(),
47
- tools: ToolPolicySchema,
48
- toolsBySender: z.record(z.string(), ToolPolicySchema).optional(),
49
- skills: z.array(z.string()).optional(),
50
- enabled: z.boolean().optional(),
51
- allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
52
- systemPrompt: z.string().optional()
53
- }).strict();
54
45
  const IrcNickServSchema = z.object({
55
46
  enabled: z.boolean().optional(),
56
47
  service: z.string().optional(),
@@ -65,7 +56,7 @@ const IrcNickServSchema = z.object({
65
56
  message: "channels.irc.nickserv.register=true requires channels.irc.nickserv.registerEmail"
66
57
  });
67
58
  });
68
- const IrcAccountSchemaBase = z.object({
59
+ const IrcChannelConfigSchema = buildChannelConfigSchema(buildMultiAccountChannelSchema(z.object({
69
60
  name: z.string().optional(),
70
61
  enabled: z.boolean().optional(),
71
62
  dangerouslyAllowNameMatching: z.boolean().optional(),
@@ -82,32 +73,22 @@ const IrcAccountSchemaBase = z.object({
82
73
  allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
83
74
  groupPolicy: GroupPolicySchema.optional().default("allowlist"),
84
75
  groupAllowFrom: z.array(z.union([z.string(), z.number()])).optional(),
85
- groups: z.record(z.string(), IrcGroupSchema.optional()).optional(),
76
+ groups: z.record(z.string(), ChannelGroupEntrySchema.optional()).optional(),
86
77
  channels: z.array(z.string()).optional(),
87
78
  mentionPatterns: z.array(z.string()).optional(),
88
79
  markdown: MarkdownConfigSchema,
89
80
  ...ReplyRuntimeConfigSchemaShape
90
- }).strict();
91
- const IrcAccountSchema = IrcAccountSchemaBase.superRefine((value, ctx) => {
92
- requireOpenAllowFrom({
93
- policy: value.dmPolicy,
94
- allowFrom: value.allowFrom,
95
- ctx,
96
- path: ["allowFrom"],
97
- message: "channels.irc.dmPolicy=\"open\" requires channels.irc.allowFrom to include \"*\""
98
- });
99
- });
100
- const IrcChannelConfigSchema = buildChannelConfigSchema(IrcAccountSchemaBase.extend({
101
- accounts: z.record(z.string(), IrcAccountSchema.optional()).optional(),
102
- defaultAccount: z.string().optional()
103
- }).superRefine((value, ctx) => {
104
- requireOpenAllowFrom({
105
- policy: value.dmPolicy,
106
- allowFrom: value.allowFrom,
107
- ctx,
108
- path: ["allowFrom"],
109
- message: "channels.irc.dmPolicy=\"open\" requires channels.irc.allowFrom to include \"*\""
110
- });
81
+ }).strict(), {
82
+ optionalAccount: true,
83
+ refine: (value, ctx) => {
84
+ requireOpenAllowFrom({
85
+ policy: value.dmPolicy,
86
+ allowFrom: value.allowFrom,
87
+ ctx,
88
+ path: ["allowFrom"],
89
+ message: "channels.irc.dmPolicy=\"open\" requires channels.irc.allowFrom to include \"*\""
90
+ });
91
+ }
111
92
  }), { uiHints: ircChannelConfigUiHints });
112
93
  //#endregion
113
94
  export { IrcChannelConfigSchema as t };
@@ -1,2 +1,2 @@
1
- import { n as setIrcRuntime } from "./runtime-DZfYm3vY.js";
1
+ import { n as setIrcRuntime } from "./runtime-xy-FcjJC.js";
2
2
  export { setIrcRuntime };
@@ -1,6 +1,6 @@
1
1
  import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
2
2
  //#region extensions/irc/src/runtime.ts
3
- const { setRuntime: setIrcRuntime, clearRuntime: clearStoredIrcRuntime, getRuntime: getIrcRuntime } = createPluginRuntimeStore({
3
+ const { setRuntime: setIrcRuntime, getRuntime: getIrcRuntime } = createPluginRuntimeStore({
4
4
  pluginId: "irc",
5
5
  errorMessage: "IRC runtime not initialized"
6
6
  });
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@openclaw/irc",
3
- "version": "2026.7.2-beta.1",
3
+ "version": "2026.7.2-beta.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/irc",
9
- "version": "2026.7.2-beta.1",
9
+ "version": "2026.7.2-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.7.2-beta.1",
3
+ "version": "2026.7.2-beta.2",
4
4
  "description": "OpenClaw IRC channel plugin",
5
5
  "type": "module",
6
6
  "openclaw": {
@@ -33,16 +33,14 @@
33
33
  "IRC_HOST",
34
34
  "IRC_NICK"
35
35
  ]
36
- },
37
- "specifier": "./configured-state",
38
- "exportName": "hasIrcConfiguredState"
36
+ }
39
37
  }
40
38
  },
41
39
  "compat": {
42
- "pluginApi": ">=2026.7.2-beta.1"
40
+ "pluginApi": ">=2026.7.2-beta.2"
43
41
  },
44
42
  "build": {
45
- "openclawVersion": "2026.7.2-beta.1",
43
+ "openclawVersion": "2026.7.2-beta.2",
46
44
  "bundledDist": false
47
45
  },
48
46
  "release": {
@@ -68,7 +66,7 @@
68
66
  "README.md"
69
67
  ],
70
68
  "peerDependencies": {
71
- "openclaw": ">=2026.7.2-beta.1"
69
+ "openclaw": ">=2026.7.2-beta.2"
72
70
  },
73
71
  "peerDependenciesMeta": {
74
72
  "openclaw": {
@@ -1,6 +0,0 @@
1
- //#region extensions/irc/configured-state.ts
2
- function hasIrcConfiguredState(params) {
3
- return typeof params.env?.IRC_HOST === "string" && params.env.IRC_HOST.trim().length > 0 && typeof params.env?.IRC_NICK === "string" && params.env.IRC_NICK.trim().length > 0;
4
- }
5
- //#endregion
6
- export { hasIrcConfiguredState };