@openclaw/irc 2026.7.2-beta.5 → 2026.7.2-beta.7
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
|
|
1
|
+
import { _ as resolveDefaultIrcAccountId, g as listIrcAccountIds, h as listEnabledIrcAccounts, n as ircSetupWizard, r as ircSetupAdapter, t as ircPlugin, v as resolveIrcAccount } from "./channel-DoavT7vs.js";
|
|
2
2
|
import { n as setIrcRuntime } from "./runtime-xy-FcjJC.js";
|
|
3
3
|
export { ircPlugin, ircSetupAdapter, ircSetupWizard, listEnabledIrcAccounts, listIrcAccountIds, resolveDefaultIrcAccountId, resolveIrcAccount, setIrcRuntime };
|
|
@@ -12,6 +12,7 @@ import { buildBaseChannelStatusSummary, createComputedAccountStatusAdapter, crea
|
|
|
12
12
|
import { resolveAccountWithDefaultFallback } from "openclaw/plugin-sdk/account-core";
|
|
13
13
|
import { DEFAULT_ACCOUNT_ID, DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$2, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
14
14
|
import { parseStrictPositiveInteger } from "openclaw/plugin-sdk/number-runtime";
|
|
15
|
+
import { isTruthyEnvValue } from "openclaw/plugin-sdk/runtime-env";
|
|
15
16
|
import { tryReadSecretFileSync } from "openclaw/plugin-sdk/secret-file-runtime";
|
|
16
17
|
import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
17
18
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries, normalizeStringifiedOptionalString, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -28,16 +29,6 @@ import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
|
|
|
28
29
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, normalizeAccountId as normalizeAccountId$1 } from "openclaw/plugin-sdk/routing";
|
|
29
30
|
import { applyAccountNameToChannelSection, createAllowFromSection, createPromptParsedAllowFromForAccount, createSetupInputPresenceValidator, createSetupTranslator, createStandardChannelSetupStatus, createTopLevelChannelAllowFromSetter, createTopLevelChannelDmPolicySetter, formatDocsLink, patchScopedAccountConfig, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
|
|
30
31
|
//#region extensions/irc/src/accounts.ts
|
|
31
|
-
const TRUTHY_ENV = /* @__PURE__ */ new Set([
|
|
32
|
-
"true",
|
|
33
|
-
"1",
|
|
34
|
-
"yes",
|
|
35
|
-
"on"
|
|
36
|
-
]);
|
|
37
|
-
function parseTruthy(value) {
|
|
38
|
-
if (!value) return false;
|
|
39
|
-
return TRUTHY_ENV.has(normalizeLowercaseStringOrEmpty(value));
|
|
40
|
-
}
|
|
41
32
|
function parseIntEnv(value) {
|
|
42
33
|
if (!value?.trim()) return;
|
|
43
34
|
const parsed = parseStrictPositiveInteger(value);
|
|
@@ -128,7 +119,7 @@ function resolveIrcAccount(params) {
|
|
|
128
119
|
const merged = mergeIrcAccountConfig(params.cfg, accountId);
|
|
129
120
|
const accountEnabled = merged.enabled !== false;
|
|
130
121
|
const enabled = baseEnabled && accountEnabled;
|
|
131
|
-
const tls = typeof merged.tls === "boolean" ? merged.tls : accountId === DEFAULT_ACCOUNT_ID && process.env.IRC_TLS ?
|
|
122
|
+
const tls = typeof merged.tls === "boolean" ? merged.tls : accountId === DEFAULT_ACCOUNT_ID && process.env.IRC_TLS ? isTruthyEnvValue(process.env.IRC_TLS) : true;
|
|
132
123
|
const envPort = accountId === DEFAULT_ACCOUNT_ID ? parseIntEnv(process.env.IRC_PORT) : void 0;
|
|
133
124
|
const port = merged.port ?? envPort ?? (tls ? 6697 : 6667);
|
|
134
125
|
const envChannels = accountId === DEFAULT_ACCOUNT_ID ? parseOptionalDelimitedEntries(process.env.IRC_CHANNELS) : void 0;
|
|
@@ -192,7 +183,7 @@ const collectIrcMutableAllowlistWarnings = createDangerousNameMatchingMutableAll
|
|
|
192
183
|
});
|
|
193
184
|
//#endregion
|
|
194
185
|
//#region extensions/irc/src/gateway.ts
|
|
195
|
-
const loadIrcChannelRuntime$1 = createLazyRuntimeModule(() => import("./channel-runtime-
|
|
186
|
+
const loadIrcChannelRuntime$1 = createLazyRuntimeModule(() => import("./channel-runtime-DsN_0hPp.js"));
|
|
196
187
|
async function startIrcGatewayAccount(ctx) {
|
|
197
188
|
const account = ctx.account;
|
|
198
189
|
const statusSink = createAccountStatusSink({
|
|
@@ -786,12 +777,15 @@ const ircMessageAdapter = defineChannelMessageAdapter({
|
|
|
786
777
|
});
|
|
787
778
|
//#endregion
|
|
788
779
|
//#region extensions/irc/src/outbound-base.ts
|
|
780
|
+
function sanitizeIrcAssistantText(text) {
|
|
781
|
+
return sanitizeForPlainText(sanitizeAssistantVisibleText(text));
|
|
782
|
+
}
|
|
789
783
|
const ircOutboundBaseAdapter = {
|
|
790
784
|
deliveryMode: "direct",
|
|
791
785
|
chunker: chunkTextForOutbound,
|
|
792
786
|
chunkerMode: "markdown",
|
|
793
787
|
textChunkLimit: 350,
|
|
794
|
-
sanitizeText: ({ text }) =>
|
|
788
|
+
sanitizeText: ({ text }) => sanitizeIrcAssistantText(text)
|
|
795
789
|
};
|
|
796
790
|
//#endregion
|
|
797
791
|
//#region extensions/irc/src/policy.ts
|
|
@@ -1404,7 +1398,7 @@ const meta = {
|
|
|
1404
1398
|
systemImage: "number",
|
|
1405
1399
|
markdownCapable: true
|
|
1406
1400
|
};
|
|
1407
|
-
const loadIrcChannelRuntime = createLazyRuntimeModule(() => import("./channel-runtime-
|
|
1401
|
+
const loadIrcChannelRuntime = createLazyRuntimeModule(() => import("./channel-runtime-DsN_0hPp.js"));
|
|
1408
1402
|
function normalizePairingTarget(raw) {
|
|
1409
1403
|
const normalized = normalizeIrcAllowEntry(raw);
|
|
1410
1404
|
if (!normalized) return "";
|
|
@@ -1644,4 +1638,4 @@ const ircPlugin = createChatChannelPlugin({
|
|
|
1644
1638
|
}
|
|
1645
1639
|
});
|
|
1646
1640
|
//#endregion
|
|
1647
|
-
export {
|
|
1641
|
+
export { resolveDefaultIrcAccountId as _, resolveIrcGroupRequireMention as a, buildIrcAllowlistCandidates as c, buildIrcConnectOptions as d, connectIrcClient as f, listIrcAccountIds as g, listEnabledIrcAccounts as h, resolveIrcGroupMatch as i, isChannelTarget as l, parseIrcPrefix as m, ircSetupWizard as n, sanitizeIrcAssistantText as o, parseIrcLine as p, ircSetupAdapter as r, sendMessageIrc as s, ircPlugin as t, normalizeIrcAllowEntry as u, resolveIrcAccount as v };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as ircPlugin } from "./channel-
|
|
1
|
+
import { t as ircPlugin } from "./channel-DoavT7vs.js";
|
|
2
2
|
export { ircPlugin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as resolveIrcGroupRequireMention, c as buildIrcAllowlistCandidates, d as buildIrcConnectOptions, f as connectIrcClient, i as resolveIrcGroupMatch, l as isChannelTarget, m as parseIrcPrefix, o as sanitizeIrcAssistantText, p as parseIrcLine, s as sendMessageIrc, u as normalizeIrcAllowEntry, v as resolveIrcAccount } from "./channel-DoavT7vs.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
|
-
import { bindIngressLifecycleToReplyOptions, createChannelIngressMonitor, resolveChannelStreamingBlockEnabled } from "openclaw/plugin-sdk/channel-outbound";
|
|
4
|
+
import { bindIngressLifecycleToReplyOptions, createChannelIngressError, createChannelIngressMonitor, resolveChannelStreamingBlockEnabled } from "openclaw/plugin-sdk/channel-outbound";
|
|
5
5
|
import { randomUUID } from "node:crypto";
|
|
6
6
|
import { resolveLoggerBackedRuntime } from "openclaw/plugin-sdk/extension-shared";
|
|
7
7
|
import { buildChannelInboundEventContext, logInboundDrop, resolveChannelInboundRouteEnvelope } from "openclaw/plugin-sdk/channel-inbound";
|
|
@@ -108,7 +108,10 @@ function routeDescriptorsForIrcGroup(params) {
|
|
|
108
108
|
}
|
|
109
109
|
async function deliverIrcReply(params) {
|
|
110
110
|
await deliverFormattedTextWithAttachments({
|
|
111
|
-
payload:
|
|
111
|
+
payload: {
|
|
112
|
+
...params.payload,
|
|
113
|
+
text: sanitizeIrcAssistantText(params.payload.text ?? "")
|
|
114
|
+
},
|
|
112
115
|
send: async ({ text, replyToId }) => {
|
|
113
116
|
if (params.sendReply) await params.sendReply(params.target, text, replyToId);
|
|
114
117
|
else await sendMessageIrc(params.target, text, {
|
|
@@ -386,15 +389,7 @@ async function handleIrcInbound(params) {
|
|
|
386
389
|
//#region extensions/irc/src/irc-ingress.ts
|
|
387
390
|
const IRC_INGRESS_PAYLOAD_VERSION = 1;
|
|
388
391
|
const IRC_INGRESS_POLL_INTERVAL_MS = 1e3;
|
|
389
|
-
const
|
|
390
|
-
const IRC_INGRESS_TOMBSTONE_TTL_MS = 720 * 60 * 60 * 1e3;
|
|
391
|
-
const IRC_INGRESS_TOMBSTONE_MAX_ENTRIES = 1e3;
|
|
392
|
-
var IrcIngressPayloadError = class extends Error {
|
|
393
|
-
constructor(message) {
|
|
394
|
-
super(message);
|
|
395
|
-
this.name = "IrcIngressPayloadError";
|
|
396
|
-
}
|
|
397
|
-
};
|
|
392
|
+
const IrcIngressPayloadError = createChannelIngressError("IrcIngressPayloadError");
|
|
398
393
|
function inspectRawPrivmsg(rawLine) {
|
|
399
394
|
const line = parseIrcLine(rawLine);
|
|
400
395
|
if (!line || line.command !== "PRIVMSG") throw new IrcIngressPayloadError("IRC ingress row is not a PRIVMSG line.");
|
|
@@ -481,11 +476,8 @@ function createIrcIngressMonitor(options) {
|
|
|
481
476
|
},
|
|
482
477
|
pollIntervalMs: options.pollIntervalMs ?? IRC_INGRESS_POLL_INTERVAL_MS,
|
|
483
478
|
retention: {
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
completedMaxEntries: IRC_INGRESS_TOMBSTONE_MAX_ENTRIES,
|
|
487
|
-
failedTtlMs: IRC_INGRESS_TOMBSTONE_TTL_MS,
|
|
488
|
-
failedMaxEntries: IRC_INGRESS_TOMBSTONE_MAX_ENTRIES
|
|
479
|
+
completedMaxEntries: 1e3,
|
|
480
|
+
failedMaxEntries: 1e3
|
|
489
481
|
},
|
|
490
482
|
drain: {
|
|
491
483
|
resolveNonRetryableFailure: resolveIrcIngressNonRetryableFailure,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/irc",
|
|
3
|
-
"version": "2026.7.2-beta.
|
|
3
|
+
"version": "2026.7.2-beta.7",
|
|
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.
|
|
120
|
+
"pluginApi": ">=2026.7.2-beta.7"
|
|
121
121
|
},
|
|
122
122
|
"build": {
|
|
123
|
-
"openclawVersion": "2026.7.2-beta.
|
|
123
|
+
"openclawVersion": "2026.7.2-beta.7",
|
|
124
124
|
"bundledDist": false
|
|
125
125
|
},
|
|
126
126
|
"release": {
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"README.md"
|
|
146
146
|
],
|
|
147
147
|
"peerDependencies": {
|
|
148
|
-
"openclaw": ">=2026.7.2-beta.
|
|
148
|
+
"openclaw": ">=2026.7.2-beta.7"
|
|
149
149
|
},
|
|
150
150
|
"peerDependenciesMeta": {
|
|
151
151
|
"openclaw": {
|