@openclaw/signal 2026.8.1-beta.3 → 2026.9.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 +8 -7
- package/dist/{approval-auth-BY6uuApE.js → approval-auth-BsYHLTHK.js} +2 -1
- package/dist/{approval-handler.runtime-Co6EVTqY.js → approval-handler.runtime-COrjDqm1.js} +4 -4
- package/dist/{approval-reactions-cs3Ox9Ow.js → approval-reactions-D8x4WFYZ.js} +4 -3
- package/dist/{channel-zIopSllO.js → channel-DBwSJm7U.js} +11 -10
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-CpDBElG8.js → channel.runtime-DvhLiRgJ.js} +1 -1
- package/dist/contract-api.js +3 -2
- package/dist/{identity-BQ4OzXXk.js → identity-YXPmgFMu.js} +2 -47
- package/dist/{monitor-BLFIkpH0.js → monitor-BIMAiZNm.js} +7 -6
- package/dist/normalize-l_b99hap.js +51 -0
- package/dist/{probe-B0E_cXQw.js → probe-C2Z15YNS.js} +1 -1
- package/dist/{question-reactions-BaatFqJ7.js → question-reactions-CkO8Q5i2.js} +2 -2
- package/dist/{reaction-runtime-api-YGD6hhDh.js → reaction-runtime-api-Ch0dk2sh.js} +9 -34
- package/dist/reaction-runtime-api.js +1 -1
- package/dist/runtime-api.js +6 -6
- package/dist/{send-BNl5folj.js → send-u8wH_fQM.js} +2 -2
- package/dist/{send.runtime-DnMoKk27.js → send.runtime-DolSm_sS.js} +1 -1
- package/dist/{transport-detection-D_M79R5f.js → transport-detection-B9TcrBCr.js} +9 -39
- package/dist/{transport-detection.runtime-DKuuIHvf.js → transport-detection.runtime-kDheC5_M.js} +1 -1
- package/node_modules/ws/lib/permessage-deflate.js +3 -1
- package/node_modules/ws/package.json +1 -1
- package/package.json +5 -5
package/dist/api.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { i as resolveSignalAccount, n as listSignalAccountIds, r as resolveDefaultSignalAccountId, t as listEnabledSignalAccounts } from "./accounts-DO4HMqaK.js";
|
|
2
|
-
import {
|
|
3
|
-
import { c as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { n as normalizeSignalMessagingTarget, t as looksLikeSignalTargetId } from "./normalize-l_b99hap.js";
|
|
3
|
+
import { a as normalizeSignalAllowRecipient, c as resolveSignalSender, i as isSignalSenderAllowed, l as looksLikeUuid, n as formatSignalSenderDisplay, o as resolveSignalPeerId, r as formatSignalSenderId, s as resolveSignalRecipient, t as formatSignalPairingIdLine } from "./identity-YXPmgFMu.js";
|
|
4
|
+
import { c as resolveSignalReactionLevel, d as markdownToSignalTextChunks, s as signalMessageActions, t as detectSignalTransport, u as markdownToSignalText } from "./transport-detection-B9TcrBCr.js";
|
|
5
|
+
import { n as sendReactionSignal, t as removeReactionSignal } from "./reaction-runtime-api-Ch0dk2sh.js";
|
|
6
|
+
import { a as normalizeSignalAccountInput, d as probeSignalTransport, f as writeSignalAccountTransport, l as signalSetupContract, n as createSignalPluginBase, p as resolveSignalOutboundTarget, r as signalSetupWizard, t as signalPlugin, u as prepareSignalManagedNativeTransport } from "./channel-DBwSJm7U.js";
|
|
6
7
|
import { i as installSignalCli } from "./install-signal-cli-Cpiyk0k1.js";
|
|
7
|
-
import { t as monitorSignalProvider } from "./monitor-
|
|
8
|
-
import { n as sendReadReceiptSignal, r as sendTypingSignal, t as sendMessageSignal } from "./send-
|
|
9
|
-
import { t as probeSignal } from "./probe-
|
|
8
|
+
import { t as monitorSignalProvider } from "./monitor-BIMAiZNm.js";
|
|
9
|
+
import { n as sendReadReceiptSignal, r as sendTypingSignal, t as sendMessageSignal } from "./send-u8wH_fQM.js";
|
|
10
|
+
import { t as probeSignal } from "./probe-C2Z15YNS.js";
|
|
10
11
|
//#region extensions/signal/src/channel.setup.ts
|
|
11
12
|
const signalSetupPlugin = { ...createSignalPluginBase({
|
|
12
13
|
setupWizard: signalSetupWizard,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { i as resolveSignalAccount } from "./accounts-DO4HMqaK.js";
|
|
2
|
-
import {
|
|
2
|
+
import { n as normalizeSignalMessagingTarget, t as looksLikeSignalTargetId } from "./normalize-l_b99hap.js";
|
|
3
|
+
import { l as looksLikeUuid } from "./identity-YXPmgFMu.js";
|
|
3
4
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
5
|
import { createChannelApprovalAuth } from "openclaw/plugin-sdk/approval-auth-runtime";
|
|
5
6
|
import { normalizeE164 } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as resolveDefaultSignalAccountId } from "./accounts-DO4HMqaK.js";
|
|
2
|
-
import {
|
|
3
|
-
import { i as resolveSignalTarget } from "./approval-auth-
|
|
4
|
-
import { a as registerSignalApprovalReactionTarget, c as resolveSignalApprovalTargetAuthorKeys, l as unregisterSignalApprovalReactionTarget, r as hasSignalApprovalReactionApprovers, s as resolveSignalApprovalConversationKey } from "./approval-reactions-
|
|
5
|
-
import { r as sendTypingSignal, t as sendMessageSignal } from "./send-
|
|
2
|
+
import { n as normalizeSignalMessagingTarget } from "./normalize-l_b99hap.js";
|
|
3
|
+
import { i as resolveSignalTarget } from "./approval-auth-BsYHLTHK.js";
|
|
4
|
+
import { a as registerSignalApprovalReactionTarget, c as resolveSignalApprovalTargetAuthorKeys, l as unregisterSignalApprovalReactionTarget, r as hasSignalApprovalReactionApprovers, s as resolveSignalApprovalConversationKey } from "./approval-reactions-D8x4WFYZ.js";
|
|
5
|
+
import { r as sendTypingSignal, t as sendMessageSignal } from "./send-u8wH_fQM.js";
|
|
6
6
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
7
7
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import {
|
|
3
|
-
import { i as resolveSignalTarget, n as signalApprovalAuth, t as getSignalApprovalApprovers } from "./approval-auth-
|
|
4
|
-
import {
|
|
2
|
+
import { n as normalizeSignalMessagingTarget } from "./normalize-l_b99hap.js";
|
|
3
|
+
import { i as resolveSignalTarget, n as signalApprovalAuth, t as getSignalApprovalApprovers } from "./approval-auth-BsYHLTHK.js";
|
|
4
|
+
import { l as looksLikeUuid } from "./identity-YXPmgFMu.js";
|
|
5
|
+
import { i as getOptionalSignalRuntime } from "./transport-detection-B9TcrBCr.js";
|
|
5
6
|
import { createLazyRuntimeSurface } from "openclaw/plugin-sdk/lazy-runtime";
|
|
6
7
|
import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
|
7
8
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { a as isSignalManagedNativeConnectionUrlForBind, i as assignSignalManagedNativePort, l as normalizeSignalTransportHost, o as isValidSignalManagedNativePort, r as allocateSignalManagedNativePort, s as resolveLocalSignalTransportPort, u as normalizeSignalTransportUrl } from "./transport-policy-DxvSMHp9.js";
|
|
2
2
|
import { a as resolveSignalAccountConfig, i as resolveSignalAccount, n as listSignalAccountIds, o as resolveSignalReplyToMode, r as resolveDefaultSignalAccountId, s as resolveSignalTransport } from "./accounts-DO4HMqaK.js";
|
|
3
|
-
import {
|
|
4
|
-
import { i as resolveSignalTarget, r as listSignalAliasDirectoryEntries } from "./approval-auth-
|
|
5
|
-
import { c as
|
|
3
|
+
import { n as normalizeSignalMessagingTarget, t as looksLikeSignalTargetId } from "./normalize-l_b99hap.js";
|
|
4
|
+
import { i as resolveSignalTarget, r as listSignalAliasDirectoryEntries } from "./approval-auth-BsYHLTHK.js";
|
|
5
|
+
import { c as resolveSignalSender, l as looksLikeUuid, o as resolveSignalPeerId, s as resolveSignalRecipient } from "./identity-YXPmgFMu.js";
|
|
6
|
+
import { c as resolveSignalReactionLevel, d as markdownToSignalTextChunks, l as formatSignalMediaText, m as signalApprovalCapability, o as materializeSignalPresentationFallback, p as shouldSuppressLocalSignalExecApprovalPrompt, r as resolveSignalReplyContextWithPersistence, s as signalMessageActions, t as detectSignalTransport } from "./transport-detection-B9TcrBCr.js";
|
|
6
7
|
import { i as migrateLegacySignalTransportConfig, n as normalizeCompatibilityConfig, r as clearLegacySignalTransportFieldsForAccount } from "./doctor-contract-api-Dnp5eQQJ.js";
|
|
7
8
|
import { t as SignalChannelConfigSchema } from "./config-schema-CkMIK7zp.js";
|
|
8
9
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
@@ -570,7 +571,7 @@ function createSignalSetupWizardProxy(loadWizard) {
|
|
|
570
571
|
const signalDoctor = {
|
|
571
572
|
normalizeCompatibilityConfig,
|
|
572
573
|
cleanStaleConfig: async ({ cfg }) => {
|
|
573
|
-
const { detectSignalTransport } = await import("./transport-detection.runtime-
|
|
574
|
+
const { detectSignalTransport } = await import("./transport-detection.runtime-kDheC5_M.js");
|
|
574
575
|
return await migrateLegacySignalTransportConfig({
|
|
575
576
|
cfg,
|
|
576
577
|
detect: detectSignalTransport
|
|
@@ -581,7 +582,7 @@ const signalDoctor = {
|
|
|
581
582
|
//#region extensions/signal/src/shared.ts
|
|
582
583
|
const SIGNAL_CHANNEL = "signal";
|
|
583
584
|
async function loadSignalChannelRuntime() {
|
|
584
|
-
return await import("./channel.runtime-
|
|
585
|
+
return await import("./channel.runtime-DvhLiRgJ.js");
|
|
585
586
|
}
|
|
586
587
|
const signalSetupWizard = createSignalSetupWizardProxy(async () => (await loadSignalChannelRuntime()).signalSetupWizard);
|
|
587
588
|
const signalConfigAdapter = {
|
|
@@ -666,10 +667,10 @@ function createSignalPluginBase(params) {
|
|
|
666
667
|
}
|
|
667
668
|
//#endregion
|
|
668
669
|
//#region extensions/signal/src/channel.ts
|
|
669
|
-
const loadSignalMonitorModule = createLazyRuntimeModule(() => import("./monitor-
|
|
670
|
-
const loadSignalProbeModule = createLazyRuntimeModule(() => import("./probe-
|
|
671
|
-
const loadSignalSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-
|
|
672
|
-
const loadSignalApprovalReactionsModule = createLazyRuntimeModule(() => import("./approval-reactions-
|
|
670
|
+
const loadSignalMonitorModule = createLazyRuntimeModule(() => import("./monitor-BIMAiZNm.js").then((n) => n.n));
|
|
671
|
+
const loadSignalProbeModule = createLazyRuntimeModule(() => import("./probe-C2Z15YNS.js").then((n) => n.n));
|
|
672
|
+
const loadSignalSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-DolSm_sS.js"));
|
|
673
|
+
const loadSignalApprovalReactionsModule = createLazyRuntimeModule(() => import("./approval-reactions-D8x4WFYZ.js").then((n) => n.n));
|
|
673
674
|
async function resolveSignalSendContext(params) {
|
|
674
675
|
return {
|
|
675
676
|
send: resolveOutboundSendDep(params.deps, "signal") ?? (await loadSignalSendRuntime()).sendMessageSignal,
|
|
@@ -896,7 +897,7 @@ async function registerDeliveredSignalApprovalPayloadForReactions(params) {
|
|
|
896
897
|
const targetAuthor = normalizeOptionalString(account.config.account);
|
|
897
898
|
const targetAuthorUuid = normalizeOptionalString(account.config.accountUuid);
|
|
898
899
|
if (!targetAuthor && !targetAuthorUuid) return;
|
|
899
|
-
const { registerSignalQuestionReactionTargetForDeliveredPayload } = await import("./question-reactions-
|
|
900
|
+
const { registerSignalQuestionReactionTargetForDeliveredPayload } = await import("./question-reactions-CkO8Q5i2.js").then((n) => n.n);
|
|
900
901
|
registerSignalQuestionReactionTargetForDeliveredPayload({
|
|
901
902
|
cfg: params.cfg,
|
|
902
903
|
target: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as signalPlugin } from "./channel-
|
|
1
|
+
import { t as signalPlugin } from "./channel-DBwSJm7U.js";
|
|
2
2
|
export { signalPlugin };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as resolveSignalAccount, n as listSignalAccountIds } from "./accounts-DO4HMqaK.js";
|
|
2
|
-
import { c as signalNumberTextInput, i as createSignalCliPathTextInput, o as signalCompletionNote, s as signalDmPolicy } from "./channel-
|
|
2
|
+
import { c as signalNumberTextInput, i as createSignalCliPathTextInput, o as signalCompletionNote, s as signalDmPolicy } from "./channel-DBwSJm7U.js";
|
|
3
3
|
import { i as installSignalCli } from "./install-signal-cli-Cpiyk0k1.js";
|
|
4
4
|
import { detectBinary } from "openclaw/plugin-sdk/setup-tools";
|
|
5
5
|
import { createDetectedBinaryStatus, createSetupTranslator, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
|
package/dist/contract-api.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as normalizeSignalMessagingTarget, r as normalizeSignalReactionRecipient, t as looksLikeSignalTargetId } from "./normalize-l_b99hap.js";
|
|
2
|
+
import { i as isSignalSenderAllowed } from "./identity-YXPmgFMu.js";
|
|
2
3
|
import { a as installSignalCliFromRelease, i as installSignalCli, n as downloadToFile, o as looksLikeArchive, r as extractSignalCliArchive, s as pickAsset, t as MAX_SIGNAL_CLI_EXTRACTED_BYTES } from "./install-signal-cli-Cpiyk0k1.js";
|
|
3
|
-
export { MAX_SIGNAL_CLI_EXTRACTED_BYTES, downloadToFile, extractSignalCliArchive, installSignalCli, installSignalCliFromRelease, isSignalSenderAllowed, looksLikeArchive, looksLikeSignalTargetId, normalizeSignalMessagingTarget, pickAsset };
|
|
4
|
+
export { MAX_SIGNAL_CLI_EXTRACTED_BYTES, downloadToFile, extractSignalCliArchive, installSignalCli, installSignalCliFromRelease, isSignalSenderAllowed, looksLikeArchive, looksLikeSignalTargetId, normalizeSignalMessagingTarget, normalizeSignalReactionRecipient, pickAsset };
|
|
@@ -1,51 +1,6 @@
|
|
|
1
|
-
import { normalizeLowercaseStringOrEmpty
|
|
1
|
+
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
2
|
import { normalizeE164 } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
3
3
|
import { resolveAllowlistMatchByCandidates } from "openclaw/plugin-sdk/allow-from";
|
|
4
|
-
//#region extensions/signal/src/normalize.ts
|
|
5
|
-
function normalizeSignalMessagingTarget(raw) {
|
|
6
|
-
const trimmed = raw.trim();
|
|
7
|
-
if (!trimmed) return;
|
|
8
|
-
let normalized = trimmed;
|
|
9
|
-
if (normalizeLowercaseStringOrEmpty(normalized).startsWith("signal:")) normalized = normalized.slice(7).trim();
|
|
10
|
-
if (!normalized) return;
|
|
11
|
-
const lower = normalizeLowercaseStringOrEmpty(normalized);
|
|
12
|
-
if (lower.startsWith("group:")) {
|
|
13
|
-
const id = normalized.slice(6).trim();
|
|
14
|
-
return id ? `group:${id}` : void 0;
|
|
15
|
-
}
|
|
16
|
-
if (lower.startsWith("username:")) {
|
|
17
|
-
const id = normalized.slice(9).trim();
|
|
18
|
-
return id ? normalizeLowercaseStringOrEmpty(`username:${id}`) : void 0;
|
|
19
|
-
}
|
|
20
|
-
if (lower.startsWith("u:")) {
|
|
21
|
-
const id = normalized.slice(2).trim();
|
|
22
|
-
return id ? normalizeLowercaseStringOrEmpty(`username:${id}`) : void 0;
|
|
23
|
-
}
|
|
24
|
-
if (lower.startsWith("uuid:")) {
|
|
25
|
-
const id = normalized.slice(5).trim();
|
|
26
|
-
return id ? normalizeLowercaseStringOrEmpty(id) : void 0;
|
|
27
|
-
}
|
|
28
|
-
return normalizeLowercaseStringOrEmpty(normalized);
|
|
29
|
-
}
|
|
30
|
-
const UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
31
|
-
const UUID_COMPACT_PATTERN = /^[0-9a-f]{32}$/i;
|
|
32
|
-
function looksLikeSignalTargetId(raw, normalized) {
|
|
33
|
-
const candidates = normalizeStringEntries([raw, normalized ?? ""]);
|
|
34
|
-
for (const candidate of candidates) {
|
|
35
|
-
if (/^(signal:)?(group:|username:|u:)/i.test(candidate)) return true;
|
|
36
|
-
if (/^(signal:)?uuid:/i.test(candidate)) {
|
|
37
|
-
const stripped = candidate.replace(/^signal:/i, "").replace(/^uuid:/i, "").trim();
|
|
38
|
-
if (!stripped) continue;
|
|
39
|
-
if (UUID_PATTERN.test(stripped) || UUID_COMPACT_PATTERN.test(stripped)) return true;
|
|
40
|
-
continue;
|
|
41
|
-
}
|
|
42
|
-
const withoutSignalPrefix = candidate.replace(/^signal:/i, "").trim();
|
|
43
|
-
if (UUID_PATTERN.test(withoutSignalPrefix) || UUID_COMPACT_PATTERN.test(withoutSignalPrefix)) return true;
|
|
44
|
-
if (/^\+?\d{3,}$/.test(withoutSignalPrefix)) return true;
|
|
45
|
-
}
|
|
46
|
-
return false;
|
|
47
|
-
}
|
|
48
|
-
//#endregion
|
|
49
4
|
//#region extensions/signal/src/uuid.ts
|
|
50
5
|
const UUID_HYPHENATED_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
51
6
|
const UUID_COMPACT_RE = /^[0-9a-f]{32}$/i;
|
|
@@ -143,4 +98,4 @@ function isSignalSenderAllowed(sender, allowFrom) {
|
|
|
143
98
|
}).allowed;
|
|
144
99
|
}
|
|
145
100
|
//#endregion
|
|
146
|
-
export { normalizeSignalAllowRecipient as a, resolveSignalSender as c,
|
|
101
|
+
export { normalizeSignalAllowRecipient as a, resolveSignalSender as c, isSignalSenderAllowed as i, looksLikeUuid as l, formatSignalSenderDisplay as n, resolveSignalPeerId as o, formatSignalSenderId as r, resolveSignalRecipient as s, formatSignalPairingIdLine as t };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
2
|
import { l as normalizeSignalTransportHost } from "./transport-policy-DxvSMHp9.js";
|
|
3
3
|
import { i as resolveSignalAccount, o as resolveSignalReplyToMode } from "./accounts-DO4HMqaK.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { n as normalizeSignalMessagingTarget } from "./normalize-l_b99hap.js";
|
|
5
|
+
import { a as normalizeSignalAllowRecipient, c as resolveSignalSender, i as isSignalSenderAllowed, l as looksLikeUuid, n as formatSignalSenderDisplay, o as resolveSignalPeerId, r as formatSignalSenderId, s as resolveSignalRecipient, t as formatSignalPairingIdLine } from "./identity-YXPmgFMu.js";
|
|
6
|
+
import { c as resolveSignalReactionLevel, f as isSignalNativeApprovalHandlerConfigured, i as getOptionalSignalRuntime, l as formatSignalMediaText, n as registerSignalReplyContext, o as materializeSignalPresentationFallback } from "./transport-detection-B9TcrBCr.js";
|
|
6
7
|
import { n as signalRpcRequest, r as streamSignalEvents, t as signalCheck } from "./client-adapter-D9SNPaNx.js";
|
|
7
|
-
import { n as sendReactionSignal } from "./reaction-runtime-api-
|
|
8
|
-
import { i as maybeResolveSignalApprovalReaction, o as registerSignalApprovalReactionTargetForDeliveredPayload, s as resolveSignalApprovalConversationKey, t as addSignalApprovalReactionHintToStructuredPayload } from "./approval-reactions-
|
|
9
|
-
import { r as registerSignalQuestionReactionTargetForDeliveredPayload, t as maybeResolveSignalQuestionReaction } from "./question-reactions-
|
|
10
|
-
import { n as sendReadReceiptSignal, r as sendTypingSignal, t as sendMessageSignal } from "./send-
|
|
8
|
+
import { n as sendReactionSignal } from "./reaction-runtime-api-Ch0dk2sh.js";
|
|
9
|
+
import { i as maybeResolveSignalApprovalReaction, o as registerSignalApprovalReactionTargetForDeliveredPayload, s as resolveSignalApprovalConversationKey, t as addSignalApprovalReactionHintToStructuredPayload } from "./approval-reactions-D8x4WFYZ.js";
|
|
10
|
+
import { r as registerSignalQuestionReactionTargetForDeliveredPayload, t as maybeResolveSignalQuestionReaction } from "./question-reactions-CkO8Q5i2.js";
|
|
11
|
+
import { n as sendReadReceiptSignal, r as sendTypingSignal, t as sendMessageSignal } from "./send-u8wH_fQM.js";
|
|
11
12
|
import { bindIngressLifecycleToReplyOptions, createChannelIngressError, createChannelIngressMonitor, createChannelMessageReplyPipeline, resolveChannelStreamingBlockEnabled } from "openclaw/plugin-sdk/channel-outbound";
|
|
12
13
|
import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing";
|
|
13
14
|
import { canonicalizeBase64, detectMime, estimateBase64DecodedBytes, kindFromMime, saveMediaBuffer } from "openclaw/plugin-sdk/media-runtime";
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { normalizeLowercaseStringOrEmpty, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
|
+
//#region extensions/signal/src/normalize.ts
|
|
3
|
+
function normalizeSignalReactionRecipient(raw) {
|
|
4
|
+
const withoutSignal = raw.trim().replace(/^signal:/i, "").trim();
|
|
5
|
+
return /^uuid:/i.test(withoutSignal) ? withoutSignal.slice(5).trim() : withoutSignal;
|
|
6
|
+
}
|
|
7
|
+
function normalizeSignalMessagingTarget(raw) {
|
|
8
|
+
const trimmed = raw.trim();
|
|
9
|
+
if (!trimmed) return;
|
|
10
|
+
let normalized = trimmed;
|
|
11
|
+
if (normalizeLowercaseStringOrEmpty(normalized).startsWith("signal:")) normalized = normalized.slice(7).trim();
|
|
12
|
+
if (!normalized) return;
|
|
13
|
+
const lower = normalizeLowercaseStringOrEmpty(normalized);
|
|
14
|
+
if (lower.startsWith("group:")) {
|
|
15
|
+
const id = normalized.slice(6).trim();
|
|
16
|
+
return id ? `group:${id}` : void 0;
|
|
17
|
+
}
|
|
18
|
+
if (lower.startsWith("username:")) {
|
|
19
|
+
const id = normalized.slice(9).trim();
|
|
20
|
+
return id ? normalizeLowercaseStringOrEmpty(`username:${id}`) : void 0;
|
|
21
|
+
}
|
|
22
|
+
if (lower.startsWith("u:")) {
|
|
23
|
+
const id = normalized.slice(2).trim();
|
|
24
|
+
return id ? normalizeLowercaseStringOrEmpty(`username:${id}`) : void 0;
|
|
25
|
+
}
|
|
26
|
+
if (lower.startsWith("uuid:")) {
|
|
27
|
+
const id = normalized.slice(5).trim();
|
|
28
|
+
return id ? normalizeLowercaseStringOrEmpty(id) : void 0;
|
|
29
|
+
}
|
|
30
|
+
return normalizeLowercaseStringOrEmpty(normalized);
|
|
31
|
+
}
|
|
32
|
+
const UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
33
|
+
const UUID_COMPACT_PATTERN = /^[0-9a-f]{32}$/i;
|
|
34
|
+
function looksLikeSignalTargetId(raw, normalized) {
|
|
35
|
+
const candidates = normalizeStringEntries([raw, normalized ?? ""]);
|
|
36
|
+
for (const candidate of candidates) {
|
|
37
|
+
if (/^(signal:)?(group:|username:|u:)/i.test(candidate)) return true;
|
|
38
|
+
if (/^(signal:)?uuid:/i.test(candidate)) {
|
|
39
|
+
const stripped = candidate.replace(/^signal:/i, "").replace(/^uuid:/i, "").trim();
|
|
40
|
+
if (!stripped) continue;
|
|
41
|
+
if (UUID_PATTERN.test(stripped) || UUID_COMPACT_PATTERN.test(stripped)) return true;
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
const withoutSignalPrefix = candidate.replace(/^signal:/i, "").trim();
|
|
45
|
+
if (UUID_PATTERN.test(withoutSignalPrefix) || UUID_COMPACT_PATTERN.test(withoutSignalPrefix)) return true;
|
|
46
|
+
if (/^\+?\d{3,}$/.test(withoutSignalPrefix)) return true;
|
|
47
|
+
}
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
//#endregion
|
|
51
|
+
export { normalizeSignalMessagingTarget as n, normalizeSignalReactionRecipient as r, looksLikeSignalTargetId as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { t as detectSignalTransport } from "./transport-detection-
|
|
2
|
+
import { t as detectSignalTransport } from "./transport-detection-B9TcrBCr.js";
|
|
3
3
|
import { n as signalRpcRequest, t as signalCheck } from "./client-adapter-D9SNPaNx.js";
|
|
4
4
|
import { runChannelProbe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
5
5
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { i as resolveSignalTarget } from "./approval-auth-
|
|
3
|
-
import { c as resolveSignalApprovalTargetAuthorKeys, s as resolveSignalApprovalConversationKey } from "./approval-reactions-
|
|
2
|
+
import { i as resolveSignalTarget } from "./approval-auth-BsYHLTHK.js";
|
|
3
|
+
import { c as resolveSignalApprovalTargetAuthorKeys, s as resolveSignalApprovalConversationKey } from "./approval-reactions-D8x4WFYZ.js";
|
|
4
4
|
import { createQuestionReactionTargetStore, questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
|
|
5
5
|
import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
|
6
6
|
//#region extensions/signal/src/question-reactions.ts
|
|
@@ -1,58 +1,33 @@
|
|
|
1
1
|
import { i as resolveSignalAccount } from "./accounts-DO4HMqaK.js";
|
|
2
|
+
import { r as normalizeSignalReactionRecipient } from "./normalize-l_b99hap.js";
|
|
2
3
|
import { n as signalRpcRequest } from "./client-adapter-D9SNPaNx.js";
|
|
3
4
|
import { t as resolveSignalRpcContext } from "./rpc-context-dXSy4NtF.js";
|
|
4
|
-
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
6
6
|
//#region extensions/signal/src/send-reactions.ts
|
|
7
|
-
function normalizeSignalId(raw) {
|
|
8
|
-
const trimmed = raw.trim();
|
|
9
|
-
if (!trimmed) return "";
|
|
10
|
-
return trimmed.replace(/^signal:/i, "").trim();
|
|
11
|
-
}
|
|
12
|
-
function normalizeSignalUuid(raw) {
|
|
13
|
-
const trimmed = normalizeSignalId(raw);
|
|
14
|
-
if (!trimmed) return "";
|
|
15
|
-
if (normalizeLowercaseStringOrEmpty(trimmed).startsWith("uuid:")) return trimmed.slice(5).trim();
|
|
16
|
-
return trimmed;
|
|
17
|
-
}
|
|
18
|
-
function resolveTargetAuthorParams(params) {
|
|
19
|
-
const candidates = [
|
|
20
|
-
params.targetAuthor,
|
|
21
|
-
params.targetAuthorUuid,
|
|
22
|
-
params.fallback
|
|
23
|
-
];
|
|
24
|
-
for (const candidate of candidates) {
|
|
25
|
-
const raw = candidate?.trim();
|
|
26
|
-
if (!raw) continue;
|
|
27
|
-
const normalized = normalizeSignalUuid(raw);
|
|
28
|
-
if (normalized) return { targetAuthor: normalized };
|
|
29
|
-
}
|
|
30
|
-
return {};
|
|
31
|
-
}
|
|
32
7
|
async function sendReactionSignalCore(params) {
|
|
33
8
|
const accountInfo = resolveSignalAccount({
|
|
34
9
|
cfg: requireRuntimeConfig(params.opts.cfg, "Signal reactions"),
|
|
35
10
|
accountId: params.opts.accountId
|
|
36
11
|
});
|
|
37
12
|
const { baseUrl, account } = resolveSignalRpcContext(params.opts, accountInfo);
|
|
38
|
-
const normalizedRecipient =
|
|
13
|
+
const normalizedRecipient = normalizeSignalReactionRecipient(params.recipient);
|
|
39
14
|
const groupId = params.opts.groupId?.trim();
|
|
40
15
|
const operation = `Signal reaction${params.remove ? " removal" : ""}`;
|
|
41
16
|
if (!normalizedRecipient && !groupId) throw new Error(`Recipient or groupId is required for ${operation}`);
|
|
42
17
|
if (!Number.isFinite(params.targetTimestamp) || params.targetTimestamp <= 0) throw new Error(`Valid targetTimestamp is required for ${operation}`);
|
|
43
18
|
const normalizedEmoji = params.emoji?.trim();
|
|
44
19
|
if (!normalizedEmoji) throw new Error(`Emoji is required for ${operation}`);
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
if (groupId && !
|
|
20
|
+
const targetAuthor = [
|
|
21
|
+
params.opts.targetAuthor,
|
|
22
|
+
params.opts.targetAuthorUuid,
|
|
23
|
+
normalizedRecipient
|
|
24
|
+
].map((candidate) => normalizeSignalReactionRecipient(candidate ?? "")).find(Boolean);
|
|
25
|
+
if (groupId && !targetAuthor) throw new Error(`targetAuthor is required for group reaction${params.remove ? " removal" : "s"}`);
|
|
51
26
|
const requestParams = {
|
|
52
27
|
emoji: normalizedEmoji,
|
|
53
28
|
targetTimestamp: params.targetTimestamp,
|
|
54
29
|
...params.remove ? { remove: true } : {},
|
|
55
|
-
...
|
|
30
|
+
...targetAuthor ? { targetAuthor } : {}
|
|
56
31
|
};
|
|
57
32
|
if (normalizedRecipient) requestParams.recipients = [normalizedRecipient];
|
|
58
33
|
if (groupId) requestParams.groupIds = [groupId];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as sendReactionSignal, t as removeReactionSignal } from "./reaction-runtime-api-
|
|
1
|
+
import { n as sendReactionSignal, t as removeReactionSignal } from "./reaction-runtime-api-Ch0dk2sh.js";
|
|
2
2
|
export { removeReactionSignal, sendReactionSignal };
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { i as resolveSignalAccount, n as listSignalAccountIds, r as resolveDefaultSignalAccountId, t as listEnabledSignalAccounts } from "./accounts-DO4HMqaK.js";
|
|
2
|
-
import {
|
|
3
|
-
import { a as setSignalRuntime, c as resolveSignalReactionLevel, s as signalMessageActions } from "./transport-detection-
|
|
4
|
-
import { n as sendReactionSignal, t as removeReactionSignal } from "./reaction-runtime-api-
|
|
2
|
+
import { n as normalizeSignalMessagingTarget, t as looksLikeSignalTargetId } from "./normalize-l_b99hap.js";
|
|
3
|
+
import { a as setSignalRuntime, c as resolveSignalReactionLevel, s as signalMessageActions } from "./transport-detection-B9TcrBCr.js";
|
|
4
|
+
import { n as sendReactionSignal, t as removeReactionSignal } from "./reaction-runtime-api-Ch0dk2sh.js";
|
|
5
5
|
import { n as SignalConfigSchema } from "./config-schema-CkMIK7zp.js";
|
|
6
6
|
import { i as installSignalCli } from "./install-signal-cli-Cpiyk0k1.js";
|
|
7
|
-
import { t as monitorSignalProvider } from "./monitor-
|
|
8
|
-
import { t as sendMessageSignal } from "./send-
|
|
9
|
-
import { t as probeSignal } from "./probe-
|
|
7
|
+
import { t as monitorSignalProvider } from "./monitor-BIMAiZNm.js";
|
|
8
|
+
import { t as sendMessageSignal } from "./send-u8wH_fQM.js";
|
|
9
|
+
import { t as probeSignal } from "./probe-C2Z15YNS.js";
|
|
10
10
|
import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
|
|
11
11
|
import { resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/media-runtime";
|
|
12
12
|
import { buildBaseAccountStatusSnapshot, buildBaseChannelStatusSummary, collectStatusIssuesFromLastError, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as resolveSignalAccount } from "./accounts-DO4HMqaK.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as registerSignalReplyContext, u as markdownToSignalText } from "./transport-detection-
|
|
2
|
+
import { n as normalizeSignalMessagingTarget } from "./normalize-l_b99hap.js";
|
|
3
|
+
import { n as registerSignalReplyContext, u as markdownToSignalText } from "./transport-detection-B9TcrBCr.js";
|
|
4
4
|
import { n as signalRpcRequest } from "./client-adapter-D9SNPaNx.js";
|
|
5
5
|
import { t as resolveSignalRpcContext } from "./rpc-context-dXSy4NtF.js";
|
|
6
6
|
import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as sendTypingSignal, t as sendMessageSignal } from "./send-
|
|
1
|
+
import { r as sendTypingSignal, t as sendMessageSignal } from "./send-u8wH_fQM.js";
|
|
2
2
|
export { sendMessageSignal, sendTypingSignal };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { u as normalizeSignalTransportUrl } from "./transport-policy-DxvSMHp9.js";
|
|
2
2
|
import { i as resolveSignalAccount, n as listSignalAccountIds, r as resolveDefaultSignalAccountId, t as listEnabledSignalAccounts } from "./accounts-DO4HMqaK.js";
|
|
3
|
-
import {
|
|
4
|
-
import { n as signalApprovalAuth, t as getSignalApprovalApprovers } from "./approval-auth-
|
|
5
|
-
import { n as sendReactionSignal, t as removeReactionSignal } from "./reaction-runtime-api-
|
|
3
|
+
import { n as normalizeSignalMessagingTarget, r as normalizeSignalReactionRecipient } from "./normalize-l_b99hap.js";
|
|
4
|
+
import { n as signalApprovalAuth, t as getSignalApprovalApprovers } from "./approval-auth-BsYHLTHK.js";
|
|
5
|
+
import { n as sendReactionSignal, t as removeReactionSignal } from "./reaction-runtime-api-Ch0dk2sh.js";
|
|
6
6
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
7
7
|
import { kindFromMime } from "openclaw/plugin-sdk/media-runtime";
|
|
8
8
|
import { questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
|
|
@@ -69,7 +69,7 @@ const signalApproval = createApproverRestrictedNativeApprovalCapabilityFromForwa
|
|
|
69
69
|
approvalKind,
|
|
70
70
|
request
|
|
71
71
|
}),
|
|
72
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
72
|
+
load: async () => (await import("./approval-handler.runtime-COrjDqm1.js")).signalApprovalNativeRuntime
|
|
73
73
|
})
|
|
74
74
|
});
|
|
75
75
|
const signalApprovalRouting = signalApproval.routing;
|
|
@@ -213,18 +213,8 @@ function resolveSignalReactionLevel(params) {
|
|
|
213
213
|
//#region extensions/signal/src/message-actions.ts
|
|
214
214
|
const providerId = "signal";
|
|
215
215
|
const GROUP_PREFIX = "group:";
|
|
216
|
-
function normalizeSignalReactionRecipient(raw) {
|
|
217
|
-
const trimmed = raw.trim();
|
|
218
|
-
if (!trimmed) return trimmed;
|
|
219
|
-
const withoutSignal = trimmed.replace(/^signal:/i, "").trim();
|
|
220
|
-
if (!withoutSignal) return withoutSignal;
|
|
221
|
-
if (normalizeLowercaseStringOrEmpty(withoutSignal).startsWith("uuid:")) return withoutSignal.slice(5).trim();
|
|
222
|
-
return withoutSignal;
|
|
223
|
-
}
|
|
224
216
|
function resolveSignalReactionTarget(raw) {
|
|
225
|
-
const
|
|
226
|
-
if (!trimmed) return {};
|
|
227
|
-
const withoutSignal = trimmed.replace(/^signal:/i, "").trim();
|
|
217
|
+
const withoutSignal = raw.trim().replace(/^signal:/i, "").trim();
|
|
228
218
|
if (!withoutSignal) return {};
|
|
229
219
|
if (normalizeLowercaseStringOrEmpty(withoutSignal).startsWith(GROUP_PREFIX)) {
|
|
230
220
|
const groupId = withoutSignal.slice(6).trim();
|
|
@@ -240,17 +230,10 @@ async function mutateSignalReaction(params) {
|
|
|
240
230
|
targetAuthor: params.targetAuthor,
|
|
241
231
|
targetAuthorUuid: params.targetAuthorUuid
|
|
242
232
|
};
|
|
243
|
-
|
|
244
|
-
await removeReactionSignal(params.target.recipient ?? "", params.timestamp, params.emoji, options);
|
|
245
|
-
return jsonResult({
|
|
246
|
-
ok: true,
|
|
247
|
-
removed: params.emoji
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
await sendReactionSignal(params.target.recipient ?? "", params.timestamp, params.emoji, options);
|
|
233
|
+
await (params.remove ? removeReactionSignal : sendReactionSignal)(params.target.recipient ?? "", params.timestamp, params.emoji, options);
|
|
251
234
|
return jsonResult({
|
|
252
235
|
ok: true,
|
|
253
|
-
added: params.emoji
|
|
236
|
+
[params.remove ? "removed" : "added"]: params.emoji
|
|
254
237
|
});
|
|
255
238
|
}
|
|
256
239
|
const signalMessageActions = {
|
|
@@ -307,27 +290,14 @@ const signalMessageActions = {
|
|
|
307
290
|
const remove = typeof params.remove === "boolean" ? params.remove : void 0;
|
|
308
291
|
const timestamp = parseStrictNonNegativeInteger(messageId);
|
|
309
292
|
if (timestamp === void 0) throw new Error(`Invalid messageId: ${messageId}. Expected numeric timestamp.`);
|
|
310
|
-
if (
|
|
311
|
-
if (!emoji) throw new Error("Emoji required to remove reaction.");
|
|
312
|
-
return await mutateSignalReaction({
|
|
313
|
-
cfg,
|
|
314
|
-
accountId: account.accountId,
|
|
315
|
-
target,
|
|
316
|
-
timestamp,
|
|
317
|
-
emoji,
|
|
318
|
-
remove: true,
|
|
319
|
-
targetAuthor,
|
|
320
|
-
targetAuthorUuid
|
|
321
|
-
});
|
|
322
|
-
}
|
|
323
|
-
if (!emoji) throw new Error("Emoji required to add reaction.");
|
|
293
|
+
if (!emoji) throw new Error(`Emoji required to ${remove ? "remove" : "add"} reaction.`);
|
|
324
294
|
return await mutateSignalReaction({
|
|
325
295
|
cfg,
|
|
326
296
|
accountId: account.accountId,
|
|
327
297
|
target,
|
|
328
298
|
timestamp,
|
|
329
299
|
emoji,
|
|
330
|
-
remove:
|
|
300
|
+
remove: Boolean(remove),
|
|
331
301
|
targetAuthor,
|
|
332
302
|
targetAuthorUuid
|
|
333
303
|
});
|
package/dist/{transport-detection.runtime-DKuuIHvf.js → transport-detection.runtime-kDheC5_M.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as detectSignalTransport } from "./transport-detection-
|
|
1
|
+
import { t as detectSignalTransport } from "./transport-detection-B9TcrBCr.js";
|
|
2
2
|
export { detectSignalTransport };
|
|
@@ -167,7 +167,9 @@ class PerMessageDeflate {
|
|
|
167
167
|
(typeof opts.serverMaxWindowBits === 'number' &&
|
|
168
168
|
opts.serverMaxWindowBits > params.server_max_window_bits))) ||
|
|
169
169
|
(typeof opts.clientMaxWindowBits === 'number' &&
|
|
170
|
-
|
|
170
|
+
(typeof params.client_max_window_bits === 'number'
|
|
171
|
+
? opts.clientMaxWindowBits > params.client_max_window_bits
|
|
172
|
+
: !params.client_max_window_bits))
|
|
171
173
|
) {
|
|
172
174
|
return false;
|
|
173
175
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/signal",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.9.1-beta.1",
|
|
4
4
|
"description": "OpenClaw Signal channel plugin",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"ws": "8.21.
|
|
7
|
+
"ws": "8.21.3",
|
|
8
8
|
"zod": "4.4.3"
|
|
9
9
|
},
|
|
10
10
|
"openclaw": {
|
|
@@ -93,10 +93,10 @@
|
|
|
93
93
|
"allowInvalidConfigRecovery": true
|
|
94
94
|
},
|
|
95
95
|
"compat": {
|
|
96
|
-
"pluginApi": ">=2026.
|
|
96
|
+
"pluginApi": ">=2026.9.1-beta.1"
|
|
97
97
|
},
|
|
98
98
|
"build": {
|
|
99
|
-
"openclawVersion": "2026.
|
|
99
|
+
"openclawVersion": "2026.9.1-beta.1",
|
|
100
100
|
"bundledDist": false
|
|
101
101
|
},
|
|
102
102
|
"release": {
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"README.md"
|
|
119
119
|
],
|
|
120
120
|
"peerDependencies": {
|
|
121
|
-
"openclaw": ">=2026.
|
|
121
|
+
"openclaw": ">=2026.9.1-beta.1"
|
|
122
122
|
},
|
|
123
123
|
"peerDependenciesMeta": {
|
|
124
124
|
"openclaw": {
|