@openclaw/signal 2026.8.1-beta.3 → 2026.8.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-PqC23XbY.js} +4 -4
- package/dist/{approval-reactions-cs3Ox9Ow.js → approval-reactions-DB-86mqK.js} +5 -4
- package/dist/{channel-zIopSllO.js → channel-C4vwPXz8.js} +15 -16
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-CpDBElG8.js → channel.runtime-CSviXPlC.js} +1 -1
- package/dist/{config-schema-CkMIK7zp.js → config-schema-q_QuhDy2.js} +8 -7
- package/dist/contract-api.js +3 -2
- package/dist/{doctor-contract-api-Dnp5eQQJ.js → doctor-contract-api-C18u1hW0.js} +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{identity-BQ4OzXXk.js → identity-YXPmgFMu.js} +2 -47
- package/dist/{monitor-BLFIkpH0.js → monitor-fR9bCL2p.js} +10 -9
- package/dist/normalize-l_b99hap.js +51 -0
- package/dist/{probe-B0E_cXQw.js → probe-D7BV0KJ5.js} +1 -1
- package/dist/{question-reactions-BaatFqJ7.js → question-reactions-D04hVKsE.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 +8 -8
- package/dist/{send-BNl5folj.js → send-DO3rs413.js} +3 -3
- package/dist/{send.runtime-DnMoKk27.js → send.runtime-FRY_sREg.js} +1 -1
- package/dist/{transport-detection-D_M79R5f.js → transport-detection-BSXAOmuH.js} +10 -40
- package/dist/{transport-detection.runtime-DKuuIHvf.js → transport-detection.runtime-Cnykqcu0.js} +1 -1
- package/node_modules/ws/lib/permessage-deflate.js +3 -1
- package/node_modules/ws/package.json +1 -1
- package/openclaw.plugin.json +0 -6
- 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-BSXAOmuH.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-C4vwPXz8.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-fR9bCL2p.js";
|
|
9
|
+
import { n as sendReadReceiptSignal, r as sendTypingSignal, t as sendMessageSignal } from "./send-DO3rs413.js";
|
|
10
|
+
import { t as probeSignal } from "./probe-D7BV0KJ5.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-DB-86mqK.js";
|
|
5
|
+
import { r as sendTypingSignal, t as sendMessageSignal } from "./send-DO3rs413.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-BSXAOmuH.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";
|
|
@@ -420,7 +421,7 @@ async function maybeResolveSignalApprovalReaction(params) {
|
|
|
420
421
|
return true;
|
|
421
422
|
}
|
|
422
423
|
params.logVerboseMessage?.(`signal: approval reaction failed id=${target.approvalId} sender=${actorId}: ${String(error)}`);
|
|
423
|
-
|
|
424
|
+
throw error;
|
|
424
425
|
}
|
|
425
426
|
}
|
|
426
427
|
function clearSignalApprovalReactionTargetsForTest() {
|
|
@@ -1,10 +1,12 @@
|
|
|
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
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
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-BSXAOmuH.js";
|
|
7
|
+
import { i as migrateLegacySignalTransportConfig, n as normalizeCompatibilityConfig, r as clearLegacySignalTransportFieldsForAccount } from "./doctor-contract-api-C18u1hW0.js";
|
|
8
|
+
import { t as SignalChannelConfigSchema } from "./config-schema-q_QuhDy2.js";
|
|
9
|
+
import { describeAccountSnapshot, resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/account-helpers";
|
|
8
10
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
9
11
|
import { buildDmGroupAccountAllowlistAdapter } from "openclaw/plugin-sdk/allowlist-config-edit";
|
|
10
12
|
import { createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
|
|
@@ -14,7 +16,6 @@ import { attachChannelToResult } from "openclaw/plugin-sdk/channel-send-result";
|
|
|
14
16
|
import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
|
|
15
17
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
16
18
|
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
17
|
-
import { resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/media-runtime";
|
|
18
19
|
import { questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
|
|
19
20
|
import { chunkText, resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-chunking";
|
|
20
21
|
import { buildOutboundBaseSessionKey } from "openclaw/plugin-sdk/routing";
|
|
@@ -29,7 +30,6 @@ import { createChannelDmPolicy } from "openclaw/plugin-sdk/channel-dm-policy";
|
|
|
29
30
|
import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
|
|
30
31
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$2, createCliPathTextInput, createDelegatedSetupWizardProxy, createDelegatedTextInputShouldPrompt, createPatchedAccountSetupAdapter, createSetupInputPresenceValidator, createSetupTranslator, patchChannelConfigForAccount, promptParsedAllowFromForAccount, setAccountAllowFromForChannel, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup-runtime";
|
|
31
32
|
import { formatCliCommand, formatDocsLink } from "openclaw/plugin-sdk/setup-tools";
|
|
32
|
-
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
33
33
|
import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
34
34
|
import { createRestrictSendersChannelSecurity } from "openclaw/plugin-sdk/channel-policy";
|
|
35
35
|
//#region extensions/signal/src/outbound-session.ts
|
|
@@ -570,7 +570,7 @@ function createSignalSetupWizardProxy(loadWizard) {
|
|
|
570
570
|
const signalDoctor = {
|
|
571
571
|
normalizeCompatibilityConfig,
|
|
572
572
|
cleanStaleConfig: async ({ cfg }) => {
|
|
573
|
-
const { detectSignalTransport } = await import("./transport-detection.runtime-
|
|
573
|
+
const { detectSignalTransport } = await import("./transport-detection.runtime-Cnykqcu0.js");
|
|
574
574
|
return await migrateLegacySignalTransportConfig({
|
|
575
575
|
cfg,
|
|
576
576
|
detect: detectSignalTransport
|
|
@@ -581,7 +581,7 @@ const signalDoctor = {
|
|
|
581
581
|
//#region extensions/signal/src/shared.ts
|
|
582
582
|
const SIGNAL_CHANNEL = "signal";
|
|
583
583
|
async function loadSignalChannelRuntime() {
|
|
584
|
-
return await import("./channel.runtime-
|
|
584
|
+
return await import("./channel.runtime-CSviXPlC.js");
|
|
585
585
|
}
|
|
586
586
|
const signalSetupWizard = createSignalSetupWizardProxy(async () => (await loadSignalChannelRuntime()).signalSetupWizard);
|
|
587
587
|
const signalConfigAdapter = {
|
|
@@ -666,17 +666,16 @@ function createSignalPluginBase(params) {
|
|
|
666
666
|
}
|
|
667
667
|
//#endregion
|
|
668
668
|
//#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-
|
|
669
|
+
const loadSignalMonitorModule = createLazyRuntimeModule(() => import("./monitor-fR9bCL2p.js").then((n) => n.n));
|
|
670
|
+
const loadSignalProbeModule = createLazyRuntimeModule(() => import("./probe-D7BV0KJ5.js").then((n) => n.n));
|
|
671
|
+
const loadSignalSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-FRY_sREg.js"));
|
|
672
|
+
const loadSignalApprovalReactionsModule = createLazyRuntimeModule(() => import("./approval-reactions-DB-86mqK.js").then((n) => n.n));
|
|
673
673
|
async function resolveSignalSendContext(params) {
|
|
674
674
|
return {
|
|
675
675
|
send: resolveOutboundSendDep(params.deps, "signal") ?? (await loadSignalSendRuntime()).sendMessageSignal,
|
|
676
676
|
maxBytes: resolveChannelMediaMaxBytes({
|
|
677
677
|
cfg: params.cfg,
|
|
678
|
-
resolveChannelLimitMb: (
|
|
679
|
-
accountId: params.accountId
|
|
678
|
+
resolveChannelLimitMb: () => resolveSignalAccount(params).config.mediaMaxMb
|
|
680
679
|
})
|
|
681
680
|
};
|
|
682
681
|
}
|
|
@@ -896,7 +895,7 @@ async function registerDeliveredSignalApprovalPayloadForReactions(params) {
|
|
|
896
895
|
const targetAuthor = normalizeOptionalString(account.config.account);
|
|
897
896
|
const targetAuthorUuid = normalizeOptionalString(account.config.accountUuid);
|
|
898
897
|
if (!targetAuthor && !targetAuthorUuid) return;
|
|
899
|
-
const { registerSignalQuestionReactionTargetForDeliveredPayload } = await import("./question-reactions-
|
|
898
|
+
const { registerSignalQuestionReactionTargetForDeliveredPayload } = await import("./question-reactions-D04hVKsE.js").then((n) => n.n);
|
|
900
899
|
registerSignalQuestionReactionTargetForDeliveredPayload({
|
|
901
900
|
cfg: params.cfg,
|
|
902
901
|
target: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SignalChannelConfigSchema } from "./config-schema-
|
|
1
|
+
import { t as SignalChannelConfigSchema } from "./config-schema-q_QuhDy2.js";
|
|
2
2
|
export { SignalChannelConfigSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as signalPlugin } from "./channel-
|
|
1
|
+
import { t as signalPlugin } from "./channel-C4vwPXz8.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-C4vwPXz8.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";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createChannelConfigUiHints } from "openclaw/plugin-sdk/channel-core";
|
|
2
2
|
import { isRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId, resolveAccountEntry } from "openclaw/plugin-sdk/account-resolution";
|
|
4
|
-
import { ChannelDeliveryStreamingConfigSchema, ChannelSendReadReceiptsSchema, ExecutableTokenSchema, ReplyToModeSchema, buildChannelConfigSchema, buildChannelReactionShape,
|
|
4
|
+
import { ChannelDeliveryStreamingConfigSchema, ChannelSendReadReceiptsSchema, ExecutableTokenSchema, ReplyToModeSchema, buildChannelAccountSchemaParts, buildChannelConfigSchema, buildChannelReactionShape, buildGroupEntrySchema, requireAllowlistAllowFrom, requireOpenAllowFrom } from "openclaw/plugin-sdk/channel-config-schema";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
//#region extensions/signal/src/config-ui-hints.ts
|
|
7
7
|
const signalChannelConfigUiHints = {
|
|
@@ -104,13 +104,13 @@ const SignalGroupEntrySchema = buildGroupEntrySchema({ ingest: z.boolean().optio
|
|
|
104
104
|
"systemPrompt"
|
|
105
105
|
] });
|
|
106
106
|
const SignalGroupsSchema = z.record(z.string(), SignalGroupEntrySchema.optional()).optional();
|
|
107
|
+
const { accountShape, rootPolicyShape } = buildChannelAccountSchemaParts({
|
|
108
|
+
omit: ["mentionPatterns"],
|
|
109
|
+
streaming: ChannelDeliveryStreamingConfigSchema.optional(),
|
|
110
|
+
mediaMaxMb: z.number().int().positive().optional()
|
|
111
|
+
});
|
|
107
112
|
const SignalAccountSchemaBase = z.object({
|
|
108
|
-
...
|
|
109
|
-
useDefaults: true,
|
|
110
|
-
omit: ["mentionPatterns"],
|
|
111
|
-
streaming: ChannelDeliveryStreamingConfigSchema.optional(),
|
|
112
|
-
mediaMaxMb: z.number().int().positive().optional()
|
|
113
|
-
}),
|
|
113
|
+
...accountShape,
|
|
114
114
|
account: z.string().optional(),
|
|
115
115
|
accountUuid: z.string().optional(),
|
|
116
116
|
transport: SignalTransportSchema.optional(),
|
|
@@ -137,6 +137,7 @@ const SignalAccountSchemaBase = z.object({
|
|
|
137
137
|
actions: z.object({ reactions: z.boolean().optional() }).strict().optional()
|
|
138
138
|
}).strict();
|
|
139
139
|
const SignalConfigSchemaBase = SignalAccountSchemaBase.extend({
|
|
140
|
+
...rootPolicyShape,
|
|
140
141
|
accounts: z.record(z.string(), SignalAccountSchemaBase.optional()).optional(),
|
|
141
142
|
defaultAccount: z.string().optional()
|
|
142
143
|
});
|
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 };
|
|
@@ -428,7 +428,7 @@ function migrateLegacySignalTransportConfigSync(cfg) {
|
|
|
428
428
|
};
|
|
429
429
|
}
|
|
430
430
|
//#endregion
|
|
431
|
-
//#region extensions/signal/doctor-
|
|
431
|
+
//#region extensions/signal/config-doctor-api.ts
|
|
432
432
|
const RETIRED_SIGNAL_ACCOUNT_TRANSPORT_FIELDS = [
|
|
433
433
|
"configPath",
|
|
434
434
|
"httpUrl",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-api-
|
|
1
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-api-C18u1hW0.js";
|
|
2
2
|
export { legacyConfigRules, normalizeCompatibilityConfig };
|
|
@@ -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,21 +1,22 @@
|
|
|
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-BSXAOmuH.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-DB-86mqK.js";
|
|
10
|
+
import { r as registerSignalQuestionReactionTargetForDeliveredPayload, t as maybeResolveSignalQuestionReaction } from "./question-reactions-D04hVKsE.js";
|
|
11
|
+
import { n as sendReadReceiptSignal, r as sendTypingSignal, t as sendMessageSignal } from "./send-DO3rs413.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
|
-
import { canonicalizeBase64, detectMime, estimateBase64DecodedBytes, kindFromMime, saveMediaBuffer } from "openclaw/plugin-sdk/media-runtime";
|
|
14
14
|
import { resolveAgentRoute, resolveInboundLastRouteSessionKey } from "openclaw/plugin-sdk/routing";
|
|
15
15
|
import { asPositiveSafeInteger, isRecord, normalizeNullableString, normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
16
16
|
import { CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
|
|
17
17
|
import { normalizeE164, truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
18
18
|
import { buildChannelInboundEventContext, buildMentionRegexes, createChannelInboundDebouncer, filterChannelInboundQuoteContext, formatInboundEnvelope, formatInboundFromLabel, formatInboundMediaUnavailableText, hasVisibleInboundReplyDispatch, logInboundDrop, matchesMentionPatterns, readAgentRunTerminalOutcome, resolveEnvelopeFormatOptions, resolveInboundMentionDecision, resolveInboundSupplementalSenderAllowed, runChannelInboundEvent, shouldDebounceTextInbound, toHistoryMediaEntries, toInboundMediaFactsWithMetadata } from "openclaw/plugin-sdk/channel-inbound";
|
|
19
|
+
import { canonicalizeBase64, detectMime, estimateBase64DecodedBytes, kindFromMime, saveMediaBuffer } from "openclaw/plugin-sdk/media-runtime";
|
|
19
20
|
import { collectErrorGraphCandidates, formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
20
21
|
import { ensurePortAvailable, extractErrorCode, formatErrorMessage as formatErrorMessage$1, resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/security-runtime";
|
|
21
22
|
import { resolveChannelGroupPolicy, resolveChannelGroupRequireMention } from "openclaw/plugin-sdk/channel-policy";
|
|
@@ -1647,10 +1648,10 @@ async function startSignalIngressMonitor(params) {
|
|
|
1647
1648
|
createClaimError: (_kind, claim) => new SignalIngressPermanentError("unsupported-event", `Signal ingress row ${claim.id} has an invalid payload`)
|
|
1648
1649
|
},
|
|
1649
1650
|
deliver: ([event, parsedPayload], lifecycle) => parsedPayload ? params.dispatch(event, lifecycle, parsedPayload) : void 0,
|
|
1650
|
-
onDurableAdmission: async (_event, { facts }) => {
|
|
1651
|
+
onDurableAdmission: async (_event, { facts, isNew }) => {
|
|
1651
1652
|
const { numberAliasEventId } = facts;
|
|
1652
1653
|
if (!numberAliasEventId) return;
|
|
1653
|
-
if (!await ingressQueue.complete(numberAliasEventId)) await ingressQueue.complete(facts.eventId);
|
|
1654
|
+
if (!await ingressQueue.complete(numberAliasEventId) && isNew) await ingressQueue.complete(facts.eventId);
|
|
1654
1655
|
},
|
|
1655
1656
|
pollIntervalMs: SIGNAL_INGRESS_DRAIN_INTERVAL_MS,
|
|
1656
1657
|
retention: {
|
|
@@ -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-BSXAOmuH.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-DB-86mqK.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,14 +1,14 @@
|
|
|
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-
|
|
5
|
-
import { n as SignalConfigSchema } from "./config-schema-
|
|
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-BSXAOmuH.js";
|
|
4
|
+
import { n as sendReactionSignal, t as removeReactionSignal } from "./reaction-runtime-api-Ch0dk2sh.js";
|
|
5
|
+
import { n as SignalConfigSchema } from "./config-schema-q_QuhDy2.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-fR9bCL2p.js";
|
|
8
|
+
import { t as sendMessageSignal } from "./send-DO3rs413.js";
|
|
9
|
+
import { t as probeSignal } from "./probe-D7BV0KJ5.js";
|
|
10
|
+
import { resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/account-helpers";
|
|
10
11
|
import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
|
|
11
|
-
import { resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/media-runtime";
|
|
12
12
|
import { buildBaseAccountStatusSnapshot, buildBaseChannelStatusSummary, collectStatusIssuesFromLastError, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
|
|
13
13
|
import { normalizeE164 } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
14
14
|
import { DEFAULT_ACCOUNT_ID, applyAccountNameToChannelSection, deleteAccountFromConfigSection, emptyPluginConfigSchema, formatPairingApproveHint, getChatChannelMeta, migrateBaseNameToDefaultAccount, normalizeAccountId, setAccountEnabledInConfigSection } from "openclaw/plugin-sdk/core";
|
|
@@ -1,12 +1,12 @@
|
|
|
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-BSXAOmuH.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";
|
|
7
7
|
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
8
|
-
import { kindFromMime, resolveOutboundAttachmentFromUrl } from "openclaw/plugin-sdk/media-runtime";
|
|
9
8
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
|
+
import { kindFromMime, resolveOutboundAttachmentFromUrl } from "openclaw/plugin-sdk/media-runtime";
|
|
10
10
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
11
11
|
//#region extensions/signal/src/send.ts
|
|
12
12
|
function assertSignalRecipientDelivery(result, target) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as sendTypingSignal, t as sendMessageSignal } from "./send-
|
|
1
|
+
import { r as sendTypingSignal, t as sendMessageSignal } from "./send-DO3rs413.js";
|
|
2
2
|
export { sendMessageSignal, sendTypingSignal };
|
|
@@ -1,10 +1,9 @@
|
|
|
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
|
-
import { kindFromMime } from "openclaw/plugin-sdk/media-runtime";
|
|
8
7
|
import { questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
|
|
9
8
|
import { parseAgentSessionKey } from "openclaw/plugin-sdk/routing";
|
|
10
9
|
import { resolveReactionLevel } from "openclaw/plugin-sdk/status-helpers";
|
|
@@ -15,6 +14,7 @@ import { createLazyChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-s
|
|
|
15
14
|
import { shouldSuppressLocalNativeExecApprovalPrompt } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
16
15
|
import { buildApprovalReactionPendingContentForRequest } from "openclaw/plugin-sdk/approval-reaction-runtime";
|
|
17
16
|
import { formatMediaPlaceholderText } from "openclaw/plugin-sdk/channel-inbound";
|
|
17
|
+
import { kindFromMime } from "openclaw/plugin-sdk/media-runtime";
|
|
18
18
|
import { createActionGate, jsonResult, readStringParam, resolveReactionMessageId } from "openclaw/plugin-sdk/channel-actions";
|
|
19
19
|
import { parseStrictNonNegativeInteger } from "openclaw/plugin-sdk/number-runtime";
|
|
20
20
|
import { getExecApprovalReplyMetadata } from "openclaw/plugin-sdk/approval-reply-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-PqC23XbY.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-Cnykqcu0.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as detectSignalTransport } from "./transport-detection-
|
|
1
|
+
import { t as detectSignalTransport } from "./transport-detection-BSXAOmuH.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/openclaw.plugin.json
CHANGED
|
@@ -543,7 +543,6 @@
|
|
|
543
543
|
"type": "boolean"
|
|
544
544
|
},
|
|
545
545
|
"dmPolicy": {
|
|
546
|
-
"default": "pairing",
|
|
547
546
|
"type": "string",
|
|
548
547
|
"enum": [
|
|
549
548
|
"pairing",
|
|
@@ -582,7 +581,6 @@
|
|
|
582
581
|
}
|
|
583
582
|
},
|
|
584
583
|
"groupPolicy": {
|
|
585
|
-
"default": "allowlist",
|
|
586
584
|
"type": "string",
|
|
587
585
|
"enum": [
|
|
588
586
|
"open",
|
|
@@ -996,10 +994,6 @@
|
|
|
996
994
|
"additionalProperties": false
|
|
997
995
|
}
|
|
998
996
|
},
|
|
999
|
-
"required": [
|
|
1000
|
-
"dmPolicy",
|
|
1001
|
-
"groupPolicy"
|
|
1002
|
-
],
|
|
1003
997
|
"additionalProperties": false
|
|
1004
998
|
}
|
|
1005
999
|
},
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/signal",
|
|
3
|
-
"version": "2026.8.1
|
|
3
|
+
"version": "2026.8.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.8.1
|
|
96
|
+
"pluginApi": ">=2026.8.1"
|
|
97
97
|
},
|
|
98
98
|
"build": {
|
|
99
|
-
"openclawVersion": "2026.8.1
|
|
99
|
+
"openclawVersion": "2026.8.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.8.1
|
|
121
|
+
"openclaw": ">=2026.8.1"
|
|
122
122
|
},
|
|
123
123
|
"peerDependenciesMeta": {
|
|
124
124
|
"openclaw": {
|