@openclaw/irc 2026.10.10-beta.4 → 2026.10.10
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/.setup/channel-plugin-api-DRR9Fg5C.mjs +2 -0
- package/dist/.setup/{channel-runtime-CxEHlDNB.mjs → channel-runtime-exb5AWhn.mjs} +6 -10
- package/dist/.setup/{channel-BBSRLy1I.mjs → channel-t-k-A5n4.mjs} +38 -41
- package/dist/.setup/{config-schema-Cy9tItsu.mjs → config-schema-DFqPW9AB.mjs} +2 -4
- package/dist/.setup/{runtime-C_V9tmpk.mjs → runtime-CsdAoZex.mjs} +1 -2
- package/dist/.setup/{secret-contract-C5i-29Hz.mjs → secret-contract-0Ccz8X9F.mjs} +1 -2
- package/dist/.setup/{secret-contract-api-4IT9_EK6.mjs → secret-contract-api-BabNUhhB.mjs} +1 -1
- package/dist/.source-module-urls/4751df78f545ae971ceb22b6e4bff6086f63313240899a1d9884b970424a305e.json +1 -1
- package/dist/api.js +2 -2
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/doctor-contract-api.js +6 -12
- package/dist/index.js +1 -2
- package/dist/runtime-api.js +1 -1
- package/dist/secret-contract-api.js +1 -1
- package/dist/setup-entry.js +3 -4
- package/package.json +4 -4
- package/dist/.setup/channel-plugin-api-8bCK12Fl.mjs +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as resolveIrcGroupRequireMention, c as connectIrcClient, d as sanitizeIrcAssistantText, f as createIrcIngressSubject, h as normalizeIrcAllowEntry, i as resolveIrcGroupMatch, l as parseIrcLine, m as isChannelTarget, o as sendMessageIrc, p as ircIngressIdentity, s as buildIrcConnectOptions, u as parseIrcPrefix, y as resolveIrcAccount } from "./channel-
|
|
2
|
-
import { t as getIrcRuntime } from "./runtime-
|
|
1
|
+
import { a as resolveIrcGroupRequireMention, c as connectIrcClient, d as sanitizeIrcAssistantText, f as createIrcIngressSubject, h as normalizeIrcAllowEntry, i as resolveIrcGroupMatch, l as parseIrcLine, m as isChannelTarget, o as sendMessageIrc, p as ircIngressIdentity, s as buildIrcConnectOptions, u as parseIrcPrefix, y as resolveIrcAccount } from "./channel-t-k-A5n4.mjs";
|
|
2
|
+
import { t as getIrcRuntime } from "./runtime-CsdAoZex.mjs";
|
|
3
3
|
import { channelIngressRoutes } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
4
4
|
import { computeBackoff } from "openclaw/plugin-sdk/runtime-env";
|
|
5
5
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -14,7 +14,7 @@ import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-na
|
|
|
14
14
|
import { deliverFormattedTextWithAttachments } from "openclaw/plugin-sdk/reply-payload";
|
|
15
15
|
import { GROUP_POLICY_BLOCKED_LABEL, resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
16
16
|
import { escapeRegExp } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
17
|
-
|
|
17
|
+
// extensions/irc/src/inbound.ts
|
|
18
18
|
const CHANNEL_ID = "irc";
|
|
19
19
|
const IRC_NICK_CHARACTER = String.raw`[A-Za-z0-9_\-\[\]\\\x60^{}|~]`;
|
|
20
20
|
const IRC_RFC1459_CASE_EQUIVALENTS = /* @__PURE__ */ new Map([
|
|
@@ -335,8 +335,7 @@ async function handleIrcInbound(params) {
|
|
|
335
335
|
}
|
|
336
336
|
return ingressState.handoff === "deferred" || ingressState.handoff === "abandoned" ? { kind: "deferred" } : { kind: "completed" };
|
|
337
337
|
}
|
|
338
|
-
|
|
339
|
-
//#region extensions/irc/src/irc-ingress.ts
|
|
338
|
+
// extensions/irc/src/irc-ingress.ts
|
|
340
339
|
const IRC_INGRESS_PAYLOAD_VERSION = 1;
|
|
341
340
|
const IRC_INGRESS_POLL_INTERVAL_MS = 1e3;
|
|
342
341
|
const IrcIngressPayloadError = createChannelIngressError("IrcIngressPayloadError");
|
|
@@ -469,8 +468,7 @@ function createIrcIngressMonitor(options) {
|
|
|
469
468
|
waitForIdle: monitor.waitForIdle
|
|
470
469
|
};
|
|
471
470
|
}
|
|
472
|
-
|
|
473
|
-
//#region extensions/irc/src/reconnect-backoff.ts
|
|
471
|
+
// extensions/irc/src/reconnect-backoff.ts
|
|
474
472
|
const IRC_RECONNECT_BACKOFF = {
|
|
475
473
|
initialMs: 1e3,
|
|
476
474
|
maxMs: 3e4,
|
|
@@ -493,8 +491,7 @@ function createIrcReconnectBackoff(now = Date.now) {
|
|
|
493
491
|
}
|
|
494
492
|
};
|
|
495
493
|
}
|
|
496
|
-
|
|
497
|
-
//#region extensions/irc/src/monitor.ts
|
|
494
|
+
// extensions/irc/src/monitor.ts
|
|
498
495
|
async function monitorIrcProvider(opts) {
|
|
499
496
|
const core = getIrcRuntime();
|
|
500
497
|
const cfg = opts.config ?? core.config.current();
|
|
@@ -648,5 +645,4 @@ async function monitorIrcProvider(opts) {
|
|
|
648
645
|
return stopTask;
|
|
649
646
|
} };
|
|
650
647
|
}
|
|
651
|
-
//#endregion
|
|
652
648
|
export { monitorIrcProvider, sendMessageIrc };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as IrcChannelConfigSchema } from "./config-schema-
|
|
2
|
-
import { n as getOptionalIrcRuntime } from "./runtime-
|
|
3
|
-
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-
|
|
1
|
+
import { t as IrcChannelConfigSchema } from "./config-schema-DFqPW9AB.mjs";
|
|
2
|
+
import { n as getOptionalIrcRuntime } from "./runtime-CsdAoZex.mjs";
|
|
3
|
+
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-0Ccz8X9F.mjs";
|
|
4
4
|
import { createAccountListHelpers, describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
5
5
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
6
6
|
import { formatNormalizedAllowFromEntries } from "openclaw/plugin-sdk/allow-from";
|
|
@@ -34,7 +34,7 @@ import { assertSecretOwnerAvailable } from "openclaw/plugin-sdk/channel-secret-o
|
|
|
34
34
|
import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
|
|
35
35
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, normalizeAccountId as normalizeAccountId$1 } from "openclaw/plugin-sdk/routing";
|
|
36
36
|
import { applyAccountNameToChannelSection, createAllowFromSection, createPromptParsedAllowFromForAccount, createSetupInputPresenceValidator, createSetupTranslator, createStandardChannelSetupStatus, createTopLevelChannelAllowFromSetter, createTopLevelChannelDmPolicySetter, formatDocsLink, patchScopedAccountConfig, setSetupChannelEnabled, splitSetupEntries } from "openclaw/plugin-sdk/setup";
|
|
37
|
-
|
|
37
|
+
// extensions/irc/src/accounts.ts
|
|
38
38
|
const { listAccountIds: listIrcAccountIds, resolveDefaultAccountId: resolveDefaultIrcAccountId, resolveAccountConfig: mergeIrcAccountConfig } = createAccountListHelpers("irc", {
|
|
39
39
|
normalizeAccountId,
|
|
40
40
|
omitKeys: ["defaultAccount"],
|
|
@@ -186,8 +186,7 @@ function listEnabledIrcAccounts(cfg) {
|
|
|
186
186
|
accountId
|
|
187
187
|
})).filter((account) => account.enabled);
|
|
188
188
|
}
|
|
189
|
-
|
|
190
|
-
//#region extensions/irc/src/doctor.ts
|
|
189
|
+
// extensions/irc/src/doctor.ts
|
|
191
190
|
const isIrcMutableAllowEntry = buildMutableAllowEntryDetector({ stableIdPattern: /^(?:(?:irc|user):)*[^@]*@/i });
|
|
192
191
|
const collectIrcMutableAllowlistWarnings = createDangerousNameMatchingMutableAllowlistWarningCollector({
|
|
193
192
|
channel: "irc",
|
|
@@ -197,8 +196,7 @@ const collectIrcMutableAllowlistWarnings = createDangerousNameMatchingMutableAll
|
|
|
197
196
|
groupField: "allowFrom"
|
|
198
197
|
})
|
|
199
198
|
});
|
|
200
|
-
|
|
201
|
-
//#region extensions/irc/src/gateway.ts
|
|
199
|
+
// extensions/irc/src/gateway.ts
|
|
202
200
|
async function startIrcGatewayAccount(ctx) {
|
|
203
201
|
const account = ctx.account;
|
|
204
202
|
const statusSink = createAccountStatusSink({
|
|
@@ -207,7 +205,7 @@ async function startIrcGatewayAccount(ctx) {
|
|
|
207
205
|
});
|
|
208
206
|
if (!account.configured) throw new Error(`IRC is not configured for account "${account.accountId}" (need host and nick in channels.irc).`);
|
|
209
207
|
ctx.log?.info?.(`[${account.accountId}] starting IRC provider (${account.host}:${account.port}${account.tls ? " tls" : ""})`);
|
|
210
|
-
const { monitorIrcProvider } = await import("./channel-runtime-
|
|
208
|
+
const { monitorIrcProvider } = await import("./channel-runtime-exb5AWhn.mjs");
|
|
211
209
|
await runPassiveAccountLifecycle({
|
|
212
210
|
abortSignal: ctx.abortSignal,
|
|
213
211
|
start: async () => await monitorIrcProvider({
|
|
@@ -222,8 +220,7 @@ async function startIrcGatewayAccount(ctx) {
|
|
|
222
220
|
}
|
|
223
221
|
});
|
|
224
222
|
}
|
|
225
|
-
|
|
226
|
-
//#region extensions/irc/src/control-chars.ts
|
|
223
|
+
// extensions/irc/src/control-chars.ts
|
|
227
224
|
function isIrcControlChar(charCode) {
|
|
228
225
|
return charCode <= 31 || charCode === 127;
|
|
229
226
|
}
|
|
@@ -232,8 +229,7 @@ function stripIrcControlChars(value) {
|
|
|
232
229
|
for (const char of value) if (!isIrcControlChar(char.charCodeAt(0))) out += char;
|
|
233
230
|
return out;
|
|
234
231
|
}
|
|
235
|
-
|
|
236
|
-
//#region extensions/irc/src/normalize.ts
|
|
232
|
+
// extensions/irc/src/normalize.ts
|
|
237
233
|
const IRC_TARGET_PATTERN$1 = /^[^\s:]+$/u;
|
|
238
234
|
function isChannelTarget(target) {
|
|
239
235
|
return target.startsWith("#") || target.startsWith("&");
|
|
@@ -370,8 +366,7 @@ function createIrcIngressSubject(message) {
|
|
|
370
366
|
}
|
|
371
367
|
};
|
|
372
368
|
}
|
|
373
|
-
|
|
374
|
-
//#region extensions/irc/src/outbound-base.ts
|
|
369
|
+
// extensions/irc/src/outbound-base.ts
|
|
375
370
|
function sanitizeIrcAssistantText(text) {
|
|
376
371
|
return sanitizeForPlainText(sanitizeAssistantVisibleText(text));
|
|
377
372
|
}
|
|
@@ -382,8 +377,7 @@ const ircOutboundBaseAdapter = {
|
|
|
382
377
|
textChunkLimit: 350,
|
|
383
378
|
sanitizeText: ({ text }) => sanitizeIrcAssistantText(text)
|
|
384
379
|
};
|
|
385
|
-
|
|
386
|
-
//#region packages/normalization-core/src/utf16-slice.ts
|
|
380
|
+
// packages/normalization-core/src/utf16-slice.ts
|
|
387
381
|
function isHighSurrogate(codeUnit) {
|
|
388
382
|
return codeUnit >= 55296 && codeUnit <= 56319;
|
|
389
383
|
}
|
|
@@ -396,8 +390,7 @@ function avoidTrailingHighSurrogateBreak(text, start, end) {
|
|
|
396
390
|
const adjusted = end - 1;
|
|
397
391
|
return adjusted > start ? adjusted : end + 1;
|
|
398
392
|
}
|
|
399
|
-
|
|
400
|
-
//#region packages/normalization-core/src/grapheme.ts
|
|
393
|
+
// packages/normalization-core/src/grapheme.ts
|
|
401
394
|
let graphemeSegmenter;
|
|
402
395
|
function getGraphemeSegmenter() {
|
|
403
396
|
graphemeSegmenter ??= new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
@@ -421,8 +414,7 @@ function findGraphemeChunkEnd(text, start, maxEnd, preferredEnd = maxEnd, allowP
|
|
|
421
414
|
if (end <= start && preferred < hardEnd) end = hardEnd === text.length ? hardEnd : segments.containing(hardEnd)?.index ?? hardEnd;
|
|
422
415
|
return end > start ? end : allowPartial ? avoidTrailingHighSurrogateBreak(text, start, hardEnd) : start;
|
|
423
416
|
}
|
|
424
|
-
|
|
425
|
-
//#region extensions/irc/src/protocol.ts
|
|
417
|
+
// extensions/irc/src/protocol.ts
|
|
426
418
|
const IRC_TARGET_PATTERN = /^[^\s:]+$/u;
|
|
427
419
|
function parseIrcLine(line) {
|
|
428
420
|
const raw = line.replace(/[\r\n]+/g, "").trim();
|
|
@@ -495,8 +487,7 @@ function sanitizeIrcTarget(raw) {
|
|
|
495
487
|
if (raw !== raw.trim() || hasIrcControlChars(raw) || !IRC_TARGET_PATTERN.test(raw)) throw new Error(`Invalid IRC target: ${raw}`);
|
|
496
488
|
return raw;
|
|
497
489
|
}
|
|
498
|
-
|
|
499
|
-
//#region extensions/irc/src/client.ts
|
|
490
|
+
// extensions/irc/src/client.ts
|
|
500
491
|
const IRC_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
501
492
|
"432",
|
|
502
493
|
"464",
|
|
@@ -507,6 +498,7 @@ const IRC_MAX_LINE_BYTES = 512;
|
|
|
507
498
|
const IRC_MAX_RELAY_USER_BYTES = 11;
|
|
508
499
|
const IRC_MAX_RELAY_HOST_BYTES = 63;
|
|
509
500
|
const IRC_MAX_INBOUND_LINE_LENGTH = 16384;
|
|
501
|
+
const IRC_LIVENESS_TIMEOUT_MS = 24e4;
|
|
510
502
|
function takeIrcPrivmsgChunk(text, maxChars, maxBytes) {
|
|
511
503
|
let end = 0;
|
|
512
504
|
let bytes = 0;
|
|
@@ -646,9 +638,20 @@ async function connectIrcClient(options) {
|
|
|
646
638
|
throw error;
|
|
647
639
|
});
|
|
648
640
|
};
|
|
641
|
+
let lastReceivedAt = Date.now();
|
|
642
|
+
const livenessTimer = setInterval(() => {
|
|
643
|
+
if (!ready || closed) return;
|
|
644
|
+
const silentMs = Date.now() - lastReceivedAt;
|
|
645
|
+
if (silentMs >= IRC_LIVENESS_TIMEOUT_MS) {
|
|
646
|
+
fail(/* @__PURE__ */ new Error(`IRC server sent nothing for ${Math.round(silentMs / 1e3)}s; reconnecting`));
|
|
647
|
+
socket.destroy();
|
|
648
|
+
} else if (silentMs >= IRC_LIVENESS_TIMEOUT_MS / 2) sendRaw("PING :openclaw");
|
|
649
|
+
}, 3e4);
|
|
650
|
+
livenessTimer.unref();
|
|
649
651
|
const quit = (reason) => {
|
|
650
652
|
if (closed) return;
|
|
651
653
|
closed = true;
|
|
654
|
+
clearInterval(livenessTimer);
|
|
652
655
|
removeAbortListener?.();
|
|
653
656
|
removeAbortListener = null;
|
|
654
657
|
const safeReason = sanitizeIrcOutboundText(reason ?? "bye");
|
|
@@ -661,6 +664,7 @@ async function connectIrcClient(options) {
|
|
|
661
664
|
const close = () => {
|
|
662
665
|
if (closed) return;
|
|
663
666
|
closed = true;
|
|
667
|
+
clearInterval(livenessTimer);
|
|
664
668
|
removeAbortListener?.();
|
|
665
669
|
removeAbortListener = null;
|
|
666
670
|
socket.destroy();
|
|
@@ -675,6 +679,7 @@ async function connectIrcClient(options) {
|
|
|
675
679
|
};
|
|
676
680
|
socket.on("data", (chunk) => {
|
|
677
681
|
if (receiveOverflowed) return;
|
|
682
|
+
lastReceivedAt = Date.now();
|
|
678
683
|
buffer += chunk;
|
|
679
684
|
let idx = buffer.indexOf("\n");
|
|
680
685
|
while (idx !== -1) {
|
|
@@ -763,6 +768,7 @@ async function connectIrcClient(options) {
|
|
|
763
768
|
fail(err);
|
|
764
769
|
});
|
|
765
770
|
socket.once("close", () => {
|
|
771
|
+
clearInterval(livenessTimer);
|
|
766
772
|
if (!closed) {
|
|
767
773
|
closed = true;
|
|
768
774
|
removeAbortListener?.();
|
|
@@ -803,8 +809,7 @@ async function connectIrcClient(options) {
|
|
|
803
809
|
close
|
|
804
810
|
};
|
|
805
811
|
}
|
|
806
|
-
|
|
807
|
-
//#region extensions/irc/src/connect-options.ts
|
|
812
|
+
// extensions/irc/src/connect-options.ts
|
|
808
813
|
function buildIrcConnectOptions(account, overrides = {}) {
|
|
809
814
|
assertSecretOwnerAvailable("account", `irc:${account.accountId}`);
|
|
810
815
|
if (account.tokenStatus === "configured_unavailable") throw new Error(`IRC credentials for account "${account.accountId}" are configured but unavailable.`);
|
|
@@ -826,8 +831,7 @@ function buildIrcConnectOptions(account, overrides = {}) {
|
|
|
826
831
|
...overrides
|
|
827
832
|
};
|
|
828
833
|
}
|
|
829
|
-
|
|
830
|
-
//#region extensions/irc/src/send.ts
|
|
834
|
+
// extensions/irc/src/send.ts
|
|
831
835
|
async function sendIrcMessages(to, text, opts, planMessages = (preparedText) => [{
|
|
832
836
|
text: preparedText,
|
|
833
837
|
replyTo: opts.replyTo
|
|
@@ -924,8 +928,7 @@ async function sendMessageIrc(to, text, opts) {
|
|
|
924
928
|
if (!result) throw new Error("Message must be non-empty for IRC sends");
|
|
925
929
|
return result;
|
|
926
930
|
}
|
|
927
|
-
|
|
928
|
-
//#region extensions/irc/src/message-adapter.ts
|
|
931
|
+
// extensions/irc/src/message-adapter.ts
|
|
929
932
|
function toIrcMessageResult({ target, ...result }) {
|
|
930
933
|
return {
|
|
931
934
|
...result,
|
|
@@ -974,8 +977,7 @@ const ircMessageAdapter = defineChannelMessageAdapter({
|
|
|
974
977
|
media: (ctx) => sendIrcMessage(ctx, ctx.mediaUrl ? `${ctx.text}\n\nAttachment: ${ctx.mediaUrl}` : ctx.text)
|
|
975
978
|
}
|
|
976
979
|
});
|
|
977
|
-
|
|
978
|
-
//#region extensions/irc/src/policy.ts
|
|
980
|
+
// extensions/irc/src/policy.ts
|
|
979
981
|
function resolveIrcGroupScope(params) {
|
|
980
982
|
const { "*": wildcard, ...groups } = params.groups ?? {};
|
|
981
983
|
const project = (entry) => ({
|
|
@@ -1018,8 +1020,7 @@ function resolveIrcGroupToolPolicy(params) {
|
|
|
1018
1020
|
path
|
|
1019
1021
|
});
|
|
1020
1022
|
}
|
|
1021
|
-
|
|
1022
|
-
//#region extensions/irc/src/probe.ts
|
|
1023
|
+
// extensions/irc/src/probe.ts
|
|
1023
1024
|
function formatError(err) {
|
|
1024
1025
|
if (err instanceof Error) return err.message;
|
|
1025
1026
|
return typeof err === "string" ? err : JSON.stringify(err);
|
|
@@ -1057,8 +1058,7 @@ async function probeIrc(cfg, opts) {
|
|
|
1057
1058
|
};
|
|
1058
1059
|
}
|
|
1059
1060
|
}
|
|
1060
|
-
|
|
1061
|
-
//#region extensions/irc/src/setup-core.ts
|
|
1061
|
+
// extensions/irc/src/setup-core.ts
|
|
1062
1062
|
const channel$1 = "irc";
|
|
1063
1063
|
const setIrcDmPolicy = createTopLevelChannelDmPolicySetter({ channel: channel$1 });
|
|
1064
1064
|
const setIrcAllowFrom = createTopLevelChannelAllowFromSetter({ channel: channel$1 });
|
|
@@ -1207,8 +1207,7 @@ const ircSetupContract = defineChannelSetupContract({
|
|
|
1207
1207
|
},
|
|
1208
1208
|
legacyAdapter: ircSetupAdapter
|
|
1209
1209
|
});
|
|
1210
|
-
|
|
1211
|
-
//#region extensions/irc/src/setup-surface.ts
|
|
1210
|
+
// extensions/irc/src/setup-surface.ts
|
|
1212
1211
|
const t = createSetupTranslator();
|
|
1213
1212
|
const channel = "irc";
|
|
1214
1213
|
const USE_ENV_FLAG = "__ircUseEnv";
|
|
@@ -1526,8 +1525,7 @@ const ircSetupWizard = {
|
|
|
1526
1525
|
dmPolicy: ircDmPolicy,
|
|
1527
1526
|
disable: (cfg) => setSetupChannelEnabled(cfg, channel, false)
|
|
1528
1527
|
};
|
|
1529
|
-
|
|
1530
|
-
//#region extensions/irc/src/channel.ts
|
|
1528
|
+
// extensions/irc/src/channel.ts
|
|
1531
1529
|
const meta = {
|
|
1532
1530
|
id: "irc",
|
|
1533
1531
|
label: "IRC",
|
|
@@ -1775,7 +1773,7 @@ const ircPlugin = createChatChannelPlugin({
|
|
|
1775
1773
|
notify: async ({ cfg, id, message, accountId }) => {
|
|
1776
1774
|
const target = normalizePairingTarget(id);
|
|
1777
1775
|
if (!target) throw new Error(`invalid IRC pairing id: ${id}`);
|
|
1778
|
-
const { sendMessageIrc } = await import("./channel-runtime-
|
|
1776
|
+
const { sendMessageIrc } = await import("./channel-runtime-exb5AWhn.mjs");
|
|
1779
1777
|
await sendMessageIrc(target, message, {
|
|
1780
1778
|
cfg,
|
|
1781
1779
|
accountId
|
|
@@ -1801,5 +1799,4 @@ const ircPlugin = createChatChannelPlugin({
|
|
|
1801
1799
|
}
|
|
1802
1800
|
}
|
|
1803
1801
|
});
|
|
1804
|
-
//#endregion
|
|
1805
1802
|
export { listIrcAccountIds as _, resolveIrcGroupRequireMention as a, connectIrcClient as c, sanitizeIrcAssistantText as d, createIrcIngressSubject as f, listEnabledIrcAccounts as g, normalizeIrcAllowEntry as h, resolveIrcGroupMatch as i, parseIrcLine as l, isChannelTarget as m, ircSetupWizard as n, sendMessageIrc as o, ircIngressIdentity as p, ircSetupAdapter as r, buildIrcConnectOptions as s, ircPlugin as t, parseIrcPrefix as u, resolveDefaultIrcAccountId as v, resolveIrcAccount as y };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createChannelConfigUiHints } from "openclaw/plugin-sdk/channel-core";
|
|
2
2
|
import { ChannelGroupEntrySchema, DmPolicySchema, GroupPolicySchema, MarkdownConfigSchema, ReplyRuntimeConfigSchemaShape, ReplyToModeSchema, buildChannelConfigSchema, buildMultiAccountChannelSchema, requireOpenAllowFrom } from "openclaw/plugin-sdk/channel-config-schema";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
|
|
4
|
+
// extensions/irc/src/config-ui-hints.ts
|
|
5
5
|
const ircChannelConfigUiHints = {
|
|
6
6
|
"": {
|
|
7
7
|
label: "IRC",
|
|
@@ -40,8 +40,7 @@ const ircChannelConfigUiHints = {
|
|
|
40
40
|
configWrites: true
|
|
41
41
|
})
|
|
42
42
|
};
|
|
43
|
-
|
|
44
|
-
//#region extensions/irc/src/config-schema.ts
|
|
43
|
+
// extensions/irc/src/config-schema.ts
|
|
45
44
|
const IrcNickServSchema = z.object({
|
|
46
45
|
enabled: z.boolean().optional(),
|
|
47
46
|
service: z.string().optional(),
|
|
@@ -95,5 +94,4 @@ const IrcConfigSchema = buildMultiAccountChannelSchema(IrcAccountSchemaBase, {
|
|
|
95
94
|
}
|
|
96
95
|
});
|
|
97
96
|
const IrcChannelConfigSchema = buildChannelConfigSchema(IrcConfigSchema, { uiHints: ircChannelConfigUiHints });
|
|
98
|
-
//#endregion
|
|
99
97
|
export { IrcChannelConfigSchema as t };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
2
|
-
|
|
2
|
+
// extensions/irc/src/runtime.ts
|
|
3
3
|
const { setRuntime: setIrcRuntime, getRuntime: getIrcRuntime, tryGetRuntime: getOptionalIrcRuntime } = createPluginRuntimeStore({
|
|
4
4
|
pluginId: "irc",
|
|
5
5
|
errorMessage: "IRC runtime not initialized"
|
|
6
6
|
});
|
|
7
|
-
//#endregion
|
|
8
7
|
export { getOptionalIrcRuntime as n, setIrcRuntime as r, getIrcRuntime as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { collectNestedChannelFieldAssignments, collectSimpleChannelFieldAssignments, createChannelSecretContract, isBaseFieldActiveForChannelSurface, isEnabledFlag, isRecord } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
|
|
2
|
-
|
|
2
|
+
// extensions/irc/src/secret-contract.ts
|
|
3
3
|
const channelSecrets = createChannelSecretContract({
|
|
4
4
|
channelKey: "irc",
|
|
5
5
|
account: ["nickserv.password", "password"],
|
|
@@ -25,5 +25,4 @@ const channelSecrets = createChannelSecretContract({
|
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
const { secretTargetRegistryEntries, collectRuntimeConfigAssignments } = channelSecrets;
|
|
28
|
-
//#endregion
|
|
29
28
|
export { collectRuntimeConfigAssignments as n, secretTargetRegistryEntries as r, channelSecrets as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { t as channelSecrets, n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-
|
|
1
|
+
export { t as channelSecrets, n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-0Ccz8X9F.mjs";
|
|
2
2
|
import "../secret-contract-api.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"entries":[{"output":"api.js","source":"extensions/irc/api.ts"},{"output":"channel-config-api.js","source":"extensions/irc/channel-config-api.ts"},{"output":"channel-plugin-api.js","source":"extensions/irc/channel-plugin-api.ts"},{"output":"doctor-contract-api.js","source":"extensions/irc/doctor-contract-api.ts"},{"output":"index.js","source":"extensions/irc/index.ts"},{"output":"runtime-api.js","source":"extensions/irc/runtime-api.ts"},{"output":"secret-contract-api.js","source":"extensions/irc/secret-contract-api.ts"},{"output":"setup-entry.js","source":"extensions/irc/setup-entry.ts"}],"chunks":[{"output":".setup/channel-
|
|
1
|
+
{"version":3,"entries":[{"output":"api.js","source":"extensions/irc/api.ts"},{"output":"channel-config-api.js","source":"extensions/irc/channel-config-api.ts"},{"output":"channel-plugin-api.js","source":"extensions/irc/channel-plugin-api.ts"},{"output":"doctor-contract-api.js","source":"extensions/irc/doctor-contract-api.ts"},{"output":"index.js","source":"extensions/irc/index.ts"},{"output":"runtime-api.js","source":"extensions/irc/runtime-api.ts"},{"output":"secret-contract-api.js","source":"extensions/irc/secret-contract-api.ts"},{"output":"setup-entry.js","source":"extensions/irc/setup-entry.ts"}],"chunks":[{"output":".setup/channel-plugin-api-DRR9Fg5C.mjs","sha256":"595f8cb5fadb89d6916c3b2ee4461442252a6bcc3e734c0f20afb0e5476b1f12","facadeSource":"extensions/irc/channel-plugin-api.ts","sources":[]},{"output":".setup/channel-runtime-exb5AWhn.mjs","sha256":"481aebc6ffcb9c6ac70f148f7c8e8087633f5a2ed47a35512e9ba1296354b867","facadeSource":"extensions/irc/src/channel-runtime.ts","sources":["extensions/irc/src/inbound.ts","extensions/irc/src/irc-ingress.ts","extensions/irc/src/monitor.ts","extensions/irc/src/reconnect-backoff.ts"]},{"output":".setup/channel-t-k-A5n4.mjs","sha256":"235bad2d1ca030fec268f94da263a398f8045a2e15648e5065e7dbfcf84f57ce","facadeSource":null,"sources":["extensions/irc/src/accounts.ts","extensions/irc/src/channel.ts","extensions/irc/src/client.ts","extensions/irc/src/connect-options.ts","extensions/irc/src/control-chars.ts","extensions/irc/src/doctor.ts","extensions/irc/src/gateway.ts","extensions/irc/src/ingress-identity.ts","extensions/irc/src/message-adapter.ts","extensions/irc/src/normalize.ts","extensions/irc/src/outbound-base.ts","extensions/irc/src/policy.ts","extensions/irc/src/probe.ts","extensions/irc/src/protocol.ts","extensions/irc/src/send.ts","extensions/irc/src/setup-core.ts","extensions/irc/src/setup-surface.ts","packages/normalization-core/src/grapheme.ts","packages/normalization-core/src/utf16-slice.ts"]},{"output":".setup/config-schema-DFqPW9AB.mjs","sha256":"6d746ae292f6e0eb8f2955d4f0420e2b7e7ae1d38b70f0be5ca9bc58a58a3abc","facadeSource":null,"sources":["extensions/irc/src/config-schema.ts","extensions/irc/src/config-ui-hints.ts"]},{"output":".setup/runtime-CsdAoZex.mjs","sha256":"b482d973b5d4bf23cc5ec66bdc228ee7151794a36eec497e57ad9e9e27aa48b0","facadeSource":null,"sources":["extensions/irc/src/runtime.ts"]},{"output":".setup/secret-contract-0Ccz8X9F.mjs","sha256":"a2107dd2d2a2f07298fa31d9228fba57db3af18a0cf3f2e8039db0f6cbe9de15","facadeSource":null,"sources":["extensions/irc/src/secret-contract.ts"]},{"output":".setup/secret-contract-api-BabNUhhB.mjs","sha256":"f6810408d2a21938d4e2b0e823f443859ca71d84723d877f9497b6a7221c5c0d","facadeSource":"extensions/irc/secret-contract-api.ts","sources":[]},{"output":"api.js","sha256":"c1b630eb59bd96e7beac2dc42b7248139950c923e47d0f2975d82df84aa26b63","facadeSource":"extensions/irc/api.ts","sources":[]},{"output":"channel-config-api.js","sha256":"32df3451c98b492d9a4c77d3617b5511e3f21b938bb3e1e5cc3e7742fffcebd6","facadeSource":"extensions/irc/channel-config-api.ts","sources":[]},{"output":"channel-plugin-api.js","sha256":"814b49bb90e10a19f0c585e6bab086f98eb3de619e86a8ef140628e702b69c2a","facadeSource":"extensions/irc/channel-plugin-api.ts","sources":[]},{"output":"doctor-contract-api.js","sha256":"8b0484eda902108365f4548d42566303c6dcbb3ccfc89ba0e06a8633a6864819","facadeSource":"extensions/irc/doctor-contract-api.ts","sources":["extensions/irc/config-doctor-api.ts","packages/normalization-core/src/record-coerce.ts","src/config/channel-config-normalization.ts","src/plugin-sdk/legacy-webhook-listener-migration.ts"]},{"output":"index.js","sha256":"c399885749c923bf11c27c34eb67cc4f07def79ee3610b899d92db1a75e944f6","facadeSource":"extensions/irc/index.ts","sources":["extensions/irc/index.ts"]},{"output":"runtime-api.js","sha256":"71a18976cee49bc28f82b6e930e758f6efe6ea5527dff725f7cac5a823600190","facadeSource":"extensions/irc/runtime-api.ts","sources":[]},{"output":"secret-contract-api.js","sha256":"01ed5e83bd4b44f756a0591ab306fb1f569fe95d78d19671a9c41e48a0a4857d","facadeSource":"extensions/irc/secret-contract-api.ts","sources":[]},{"output":"setup-entry.js","sha256":"6c7a77c5764106ad3b98d108a762e1026bd5def3ae83b43a2013a3c8e0d084de","facadeSource":"extensions/irc/setup-entry.ts","sources":["extensions/irc/setup-entry.ts"]}],"unrenderedSources":["extensions/irc/api.ts","extensions/irc/channel-config-api.ts","extensions/irc/channel-plugin-api.ts","extensions/irc/doctor-contract-api.ts","extensions/irc/runtime-api.ts","extensions/irc/secret-contract-api.ts","extensions/irc/src/channel-runtime.ts","src/plugin-sdk/text-grapheme.ts"]}
|
package/dist/api.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { _ as listIrcAccountIds, g as listEnabledIrcAccounts, n as ircSetupWizard, r as ircSetupAdapter, t as ircPlugin, v as resolveDefaultIrcAccountId, y as resolveIrcAccount } from "./.setup/channel-
|
|
2
|
-
import { r as setIrcRuntime } from "./.setup/runtime-
|
|
1
|
+
import { _ as listIrcAccountIds, g as listEnabledIrcAccounts, n as ircSetupWizard, r as ircSetupAdapter, t as ircPlugin, v as resolveDefaultIrcAccountId, y as resolveIrcAccount } from "./.setup/channel-t-k-A5n4.mjs";
|
|
2
|
+
import { r as setIrcRuntime } from "./.setup/runtime-CsdAoZex.mjs";
|
|
3
3
|
export { ircPlugin, ircSetupAdapter, ircSetupWizard, listEnabledIrcAccounts, listIrcAccountIds, resolveDefaultIrcAccountId, resolveIrcAccount, setIrcRuntime };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as IrcChannelConfigSchema } from "./.setup/config-schema-
|
|
1
|
+
export { t as IrcChannelConfigSchema } from "./.setup/config-schema-DFqPW9AB.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as ircPlugin } from "./.setup/channel-
|
|
1
|
+
export { t as ircPlugin } from "./.setup/channel-t-k-A5n4.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -23,8 +23,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
23
23
|
return to;
|
|
24
24
|
};
|
|
25
25
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
26
|
-
|
|
27
|
-
//#region packages/normalization-core/src/record-coerce.ts
|
|
26
|
+
// packages/normalization-core/src/record-coerce.ts
|
|
28
27
|
/** Type guard for non-array object records at browser-safe boundaries. */
|
|
29
28
|
function isRecord(value) {
|
|
30
29
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
@@ -33,8 +32,7 @@ function isRecord(value) {
|
|
|
33
32
|
function asNullableRecord(value) {
|
|
34
33
|
return isRecord(value) ? value : null;
|
|
35
34
|
}
|
|
36
|
-
|
|
37
|
-
//#region src/config/channel-config-normalization.ts
|
|
35
|
+
// src/config/channel-config-normalization.ts
|
|
38
36
|
/** Applies one channel-specific doctor migration to every object-shaped account. */
|
|
39
37
|
function normalizeChannelAccounts(params) {
|
|
40
38
|
const rawAccounts = asNullableRecord(params.entry.accounts);
|
|
@@ -110,8 +108,7 @@ function normalizeChannelConfigEntries(params) {
|
|
|
110
108
|
changes
|
|
111
109
|
};
|
|
112
110
|
}
|
|
113
|
-
|
|
114
|
-
//#region src/plugin-sdk/legacy-webhook-listener-migration.ts
|
|
111
|
+
// src/plugin-sdk/legacy-webhook-listener-migration.ts
|
|
115
112
|
/** Preserve explicitly configured webhook listeners while moving ingress onto Gateway routes. */
|
|
116
113
|
function createLegacyWebhookListenerDoctorContract(params) {
|
|
117
114
|
const portKey = params.portKey ?? "webhookPort";
|
|
@@ -181,13 +178,11 @@ function createLegacyWebhookListenerDoctorContract(params) {
|
|
|
181
178
|
}
|
|
182
179
|
};
|
|
183
180
|
}
|
|
184
|
-
|
|
185
|
-
//#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
|
|
181
|
+
// \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
|
|
186
182
|
var runtime_doctor_migrations_exports = /* @__PURE__ */ __exportAll({ createLegacyWebhookListenerDoctorContract: () => createLegacyWebhookListenerDoctorContract });
|
|
187
183
|
import * as import_openclaw_plugin_sdk_runtime_doctor_migrations from "openclaw/plugin-sdk/runtime-doctor-migrations";
|
|
188
184
|
__reExport(runtime_doctor_migrations_exports, import_openclaw_plugin_sdk_runtime_doctor_migrations);
|
|
189
|
-
|
|
190
|
-
//#region extensions/irc/config-doctor-api.ts
|
|
185
|
+
// extensions/irc/config-doctor-api.ts
|
|
191
186
|
const streamingAliasMigration = (0, runtime_doctor_migrations_exports.defineChannelAliasMigration)({
|
|
192
187
|
channelId: "irc",
|
|
193
188
|
streaming: {
|
|
@@ -230,5 +225,4 @@ function normalizeCompatibilityConfig({ cfg }) {
|
|
|
230
225
|
changes
|
|
231
226
|
};
|
|
232
227
|
}
|
|
233
|
-
//#endregion
|
|
234
228
|
export { legacyConfigRules, normalizeCompatibilityConfig };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
2
|
-
|
|
2
|
+
// extensions/irc/index.ts
|
|
3
3
|
var irc_default = defineBundledChannelEntry({
|
|
4
4
|
id: "irc",
|
|
5
5
|
name: "IRC",
|
|
@@ -18,5 +18,4 @@ var irc_default = defineBundledChannelEntry({
|
|
|
18
18
|
exportName: "setIrcRuntime"
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
|
-
//#endregion
|
|
22
21
|
export { irc_default as default };
|
package/dist/runtime-api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { r as setIrcRuntime } from "./.setup/runtime-
|
|
1
|
+
export { r as setIrcRuntime } from "./.setup/runtime-CsdAoZex.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as channelSecrets, n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./.setup/secret-contract-
|
|
1
|
+
export { t as channelSecrets, n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./.setup/secret-contract-0Ccz8X9F.mjs";
|
package/dist/setup-entry.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { defineBundledChannelSetupEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
-
|
|
3
|
+
// extensions/irc/setup-entry.ts
|
|
4
4
|
var setup_entry_default = defineBundledChannelSetupEntry({
|
|
5
5
|
importMetaUrl: import.meta.url,
|
|
6
6
|
plugin: {
|
|
7
|
-
specifier: fileURLToPath(new URL(".setup/channel-plugin-api-
|
|
7
|
+
specifier: fileURLToPath(new URL(".setup/channel-plugin-api-DRR9Fg5C.mjs", import.meta.url).href),
|
|
8
8
|
exportName: "ircPlugin"
|
|
9
9
|
},
|
|
10
10
|
secrets: {
|
|
11
|
-
specifier: fileURLToPath(new URL(".setup/secret-contract-api-
|
|
11
|
+
specifier: fileURLToPath(new URL(".setup/secret-contract-api-BabNUhhB.mjs", import.meta.url).href),
|
|
12
12
|
exportName: "channelSecrets"
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
|
-
//#endregion
|
|
16
15
|
export { setup_entry_default as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/irc",
|
|
3
|
-
"version": "2026.10.10
|
|
3
|
+
"version": "2026.10.10",
|
|
4
4
|
"description": "OpenClaw IRC channel plugin",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"openclaw": {
|
|
@@ -121,10 +121,10 @@
|
|
|
121
121
|
}
|
|
122
122
|
},
|
|
123
123
|
"compat": {
|
|
124
|
-
"pluginApi": ">=2026.10.10
|
|
124
|
+
"pluginApi": ">=2026.10.10"
|
|
125
125
|
},
|
|
126
126
|
"build": {
|
|
127
|
-
"openclawVersion": "2026.10.10
|
|
127
|
+
"openclawVersion": "2026.10.10",
|
|
128
128
|
"bundledDist": false
|
|
129
129
|
},
|
|
130
130
|
"release": {
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"assets/activity.svg"
|
|
152
152
|
],
|
|
153
153
|
"peerDependencies": {
|
|
154
|
-
"openclaw": ">=2026.10.10
|
|
154
|
+
"openclaw": ">=2026.10.10"
|
|
155
155
|
},
|
|
156
156
|
"peerDependenciesMeta": {
|
|
157
157
|
"openclaw": {
|