@openclaw/irc 2026.7.2-beta.4 → 2026.7.2-beta.5

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 resolveIrcAccount, g as resolveDefaultIrcAccountId, h as listIrcAccountIds, m as listEnabledIrcAccounts, n as ircSetupWizard, r as ircSetupAdapter, t as ircPlugin } from "./channel-BuxKUEja.js";
1
+ import { _ as resolveIrcAccount, g as resolveDefaultIrcAccountId, h as listIrcAccountIds, m as listEnabledIrcAccounts, n as ircSetupWizard, r as ircSetupAdapter, t as ircPlugin } from "./channel-BZclM5wY.js";
2
2
  import { n as setIrcRuntime } from "./runtime-xy-FcjJC.js";
3
3
  export { ircPlugin, ircSetupAdapter, ircSetupWizard, listEnabledIrcAccounts, listIrcAccountIds, resolveDefaultIrcAccountId, resolveIrcAccount, setIrcRuntime };
@@ -9,8 +9,8 @@ import { buildMutableAllowEntryDetector, collectStandardAllowlistLists, composeA
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";
12
+ import { resolveAccountWithDefaultFallback } from "openclaw/plugin-sdk/account-core";
12
13
  import { DEFAULT_ACCOUNT_ID, DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$2, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
13
- import { resolveMergedAccountConfig } from "openclaw/plugin-sdk/account-resolution";
14
14
  import { parseStrictPositiveInteger } from "openclaw/plugin-sdk/number-runtime";
15
15
  import { tryReadSecretFileSync } from "openclaw/plugin-sdk/secret-file-runtime";
16
16
  import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input";
@@ -44,20 +44,12 @@ function parseIntEnv(value) {
44
44
  if (parsed === void 0 || parsed > 65535) return;
45
45
  return parsed;
46
46
  }
47
- const { listAccountIds: listIrcAccountIds, resolveDefaultAccountId: resolveDefaultIrcAccountId } = createAccountListHelpers("irc", {
47
+ const { listAccountIds: listIrcAccountIds, resolveDefaultAccountId: resolveDefaultIrcAccountId, resolveAccountConfig: mergeIrcAccountConfig } = createAccountListHelpers("irc", {
48
48
  normalizeAccountId,
49
+ omitKeys: ["defaultAccount"],
50
+ nestedObjectKeys: ["nickserv"],
49
51
  hasImplicitDefaultAccount: (cfg) => Boolean((cfg.channels?.irc?.host?.trim() || process.env.IRC_HOST?.trim()) && (cfg.channels?.irc?.nick?.trim() || process.env.IRC_NICK?.trim()))
50
52
  });
51
- function mergeIrcAccountConfig(cfg, accountId) {
52
- return resolveMergedAccountConfig({
53
- channelConfig: cfg.channels?.irc,
54
- accounts: cfg.channels?.irc?.accounts,
55
- accountId,
56
- omitKeys: ["defaultAccount"],
57
- normalizeAccountId,
58
- nestedObjectKeys: ["nickserv"]
59
- });
60
- }
61
53
  function resolvePassword(accountId, merged) {
62
54
  if (accountId === DEFAULT_ACCOUNT_ID) {
63
55
  const envPassword = process.env.IRC_PASSWORD?.trim();
@@ -131,7 +123,6 @@ function resolveNickServConfig(accountId, nickserv) {
131
123
  };
132
124
  }
133
125
  function resolveIrcAccount(params) {
134
- const hasExplicitAccountId = Boolean(params.accountId?.trim());
135
126
  const baseEnabled = params.cfg.channels?.irc?.enabled !== false;
136
127
  const resolve = (accountId) => {
137
128
  const merged = mergeIrcAccountConfig(params.cfg, accountId);
@@ -177,14 +168,13 @@ function resolveIrcAccount(params) {
177
168
  config
178
169
  };
179
170
  };
180
- const primary = resolve(normalizeAccountId(params.accountId));
181
- if (hasExplicitAccountId) return primary;
182
- if (primary.configured) return primary;
183
- const fallbackId = resolveDefaultIrcAccountId(params.cfg);
184
- if (fallbackId === primary.accountId) return primary;
185
- const fallback = resolve(fallbackId);
186
- if (!fallback.configured) return primary;
187
- return fallback;
171
+ return resolveAccountWithDefaultFallback({
172
+ accountId: params.accountId,
173
+ normalizeAccountId,
174
+ resolvePrimary: resolve,
175
+ hasCredential: (account) => account.configured,
176
+ resolveDefaultAccountId: () => resolveDefaultIrcAccountId(params.cfg)
177
+ });
188
178
  }
189
179
  function listEnabledIrcAccounts(cfg) {
190
180
  return listIrcAccountIds(cfg).map((accountId) => resolveIrcAccount({
@@ -202,7 +192,7 @@ const collectIrcMutableAllowlistWarnings = createDangerousNameMatchingMutableAll
202
192
  });
203
193
  //#endregion
204
194
  //#region extensions/irc/src/gateway.ts
205
- const loadIrcChannelRuntime$1 = createLazyRuntimeModule(() => import("./channel-runtime-BrNJqIB_.js"));
195
+ const loadIrcChannelRuntime$1 = createLazyRuntimeModule(() => import("./channel-runtime-CRzAwKGK.js"));
206
196
  async function startIrcGatewayAccount(ctx) {
207
197
  const account = ctx.account;
208
198
  const statusSink = createAccountStatusSink({
@@ -1414,7 +1404,7 @@ const meta = {
1414
1404
  systemImage: "number",
1415
1405
  markdownCapable: true
1416
1406
  };
1417
- const loadIrcChannelRuntime = createLazyRuntimeModule(() => import("./channel-runtime-BrNJqIB_.js"));
1407
+ const loadIrcChannelRuntime = createLazyRuntimeModule(() => import("./channel-runtime-CRzAwKGK.js"));
1418
1408
  function normalizePairingTarget(raw) {
1419
1409
  const normalized = normalizeIrcAllowEntry(raw);
1420
1410
  if (!normalized) return "";
@@ -1645,22 +1635,11 @@ const ircPlugin = createChatChannelPlugin({
1645
1635
  base: ircOutboundBaseAdapter,
1646
1636
  attachedResults: {
1647
1637
  channel: "irc",
1648
- sendText: async ({ cfg, to, text, accountId, replyToId }) => {
1649
- const { sendMessageIrc } = await loadIrcChannelRuntime();
1650
- return await sendMessageIrc(to, text, {
1651
- cfg,
1652
- accountId: accountId ?? void 0,
1653
- replyTo: replyToId ?? void 0
1654
- });
1655
- },
1656
- sendMedia: async ({ cfg, to, text, mediaUrl, accountId, replyToId }) => {
1657
- const { sendMessageIrc } = await loadIrcChannelRuntime();
1658
- return await sendMessageIrc(to, mediaUrl ? `${text}\n\nAttachment: ${mediaUrl}` : text, {
1659
- cfg,
1660
- accountId: accountId ?? void 0,
1661
- replyTo: replyToId ?? void 0
1662
- });
1663
- }
1638
+ sendText: ({ onDeliveryResult: _onDeliveryResult, ...ctx }) => ircMessageAdapter.send.text(ctx),
1639
+ sendMedia: ({ onDeliveryResult: _onDeliveryResult, mediaUrl, ...ctx }) => ircMessageAdapter.send.media({
1640
+ ...ctx,
1641
+ mediaUrl: mediaUrl ?? ""
1642
+ })
1664
1643
  }
1665
1644
  }
1666
1645
  });
@@ -1,2 +1,2 @@
1
- import { t as ircPlugin } from "./channel-BuxKUEja.js";
1
+ import { t as ircPlugin } from "./channel-BZclM5wY.js";
2
2
  export { ircPlugin };
@@ -1,4 +1,4 @@
1
- import { _ as resolveIrcAccount, a as resolveIrcGroupRequireMention, c as isChannelTarget, d as connectIrcClient, f as parseIrcLine, i as resolveIrcGroupMatch, l as normalizeIrcAllowEntry, o as sendMessageIrc, p as parseIrcPrefix, s as buildIrcAllowlistCandidates, u as buildIrcConnectOptions } from "./channel-BuxKUEja.js";
1
+ import { _ as resolveIrcAccount, a as resolveIrcGroupRequireMention, c as isChannelTarget, d as connectIrcClient, f as parseIrcLine, i as resolveIrcGroupMatch, l as normalizeIrcAllowEntry, o as sendMessageIrc, p as parseIrcPrefix, s as buildIrcAllowlistCandidates, u as buildIrcConnectOptions } from "./channel-BZclM5wY.js";
2
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 { bindIngressLifecycleToReplyOptions, createChannelIngressMonitor, resolveChannelStreamingBlockEnabled } from "openclaw/plugin-sdk/channel-outbound";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/irc",
3
- "version": "2026.7.2-beta.4",
3
+ "version": "2026.7.2-beta.5",
4
4
  "description": "OpenClaw IRC channel plugin",
5
5
  "type": "module",
6
6
  "openclaw": {
@@ -117,10 +117,10 @@
117
117
  }
118
118
  },
119
119
  "compat": {
120
- "pluginApi": ">=2026.7.2-beta.4"
120
+ "pluginApi": ">=2026.7.2-beta.5"
121
121
  },
122
122
  "build": {
123
- "openclawVersion": "2026.7.2-beta.4",
123
+ "openclawVersion": "2026.7.2-beta.5",
124
124
  "bundledDist": false
125
125
  },
126
126
  "release": {
@@ -142,11 +142,10 @@
142
142
  "files": [
143
143
  "dist/**",
144
144
  "openclaw.plugin.json",
145
- "npm-shrinkwrap.json",
146
145
  "README.md"
147
146
  ],
148
147
  "peerDependencies": {
149
- "openclaw": ">=2026.7.2-beta.4"
148
+ "openclaw": ">=2026.7.2-beta.5"
150
149
  },
151
150
  "peerDependenciesMeta": {
152
151
  "openclaw": {
@@ -1,24 +0,0 @@
1
- {
2
- "name": "@openclaw/irc",
3
- "version": "2026.7.2-beta.4",
4
- "lockfileVersion": 3,
5
- "requires": true,
6
- "packages": {
7
- "": {
8
- "name": "@openclaw/irc",
9
- "version": "2026.7.2-beta.4",
10
- "dependencies": {
11
- "zod": "4.4.3"
12
- }
13
- },
14
- "node_modules/zod": {
15
- "version": "4.4.3",
16
- "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz",
17
- "integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==",
18
- "license": "MIT",
19
- "funding": {
20
- "url": "https://github.com/sponsors/colinhacks"
21
- }
22
- }
23
- }
24
- }