@openclaw/signal 2026.8.1 → 2026.8.2
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 +7 -7
- package/dist/{approval-auth-BsYHLTHK.js → approval-auth-CkljhI65.js} +2 -1
- package/dist/{approval-handler.runtime-PqC23XbY.js → approval-handler.runtime-C5SsJ5ko.js} +3 -3
- package/dist/{approval-reactions-DB-86mqK.js → approval-reactions-C5MzjYo0.js} +5 -4
- package/dist/{channel-C4vwPXz8.js → channel-CU23CLyl.js} +28 -24
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-CSviXPlC.js → channel.runtime-CdtB9bsX.js} +4 -3
- package/dist/{client-CvnR8_XA.js → client-DtHac18U.js} +4 -4
- package/dist/{client-adapter-D9SNPaNx.js → client-adapter-E06RAM6-.js} +1 -1
- package/dist/{config-schema-q_QuhDy2.js → config-schema-CHihQTOp.js} +2 -1
- package/dist/contract-api.js +1 -1
- package/dist/{install-signal-cli-Cpiyk0k1.js → install-signal-cli-7tEL37_j.js} +11 -7
- package/dist/{monitor-fR9bCL2p.js → monitor-CfRPorq9.js} +12 -11
- package/dist/{probe-D7BV0KJ5.js → probe-CiVqVfko.js} +2 -2
- package/dist/{question-reactions-D04hVKsE.js → question-reactions-Bw30cacw.js} +2 -2
- package/dist/{reaction-runtime-api-Ch0dk2sh.js → reaction-runtime-api-BUy1VGT6.js} +3 -2
- package/dist/reaction-runtime-api.js +1 -1
- package/dist/runtime-api.js +7 -7
- package/dist/{send-DO3rs413.js → send-G6zfBh13.js} +19 -15
- package/dist/{send.runtime-FRY_sREg.js → send.runtime-CmnwC2vm.js} +1 -1
- package/dist/{transport-detection-BSXAOmuH.js → transport-detection-DROVGqJp.js} +15 -12
- package/dist/{transport-detection.runtime-Cnykqcu0.js → transport-detection.runtime-BD5NyqbG.js} +1 -1
- package/dist/{transport-probes.runtime-BsJdp0oI.js → transport-probes.runtime-BMxOPSFh.js} +1 -1
- package/package.json +4 -4
package/dist/api.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { i as resolveSignalAccount, n as listSignalAccountIds, r as resolveDefaultSignalAccountId, t as listEnabledSignalAccounts } from "./accounts-DO4HMqaK.js";
|
|
2
2
|
import { n as normalizeSignalMessagingTarget, t as looksLikeSignalTargetId } from "./normalize-l_b99hap.js";
|
|
3
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-
|
|
5
|
-
import { n as sendReactionSignal, t as removeReactionSignal } from "./reaction-runtime-api-
|
|
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-
|
|
7
|
-
import { i as installSignalCli } from "./install-signal-cli-
|
|
8
|
-
import { t as monitorSignalProvider } from "./monitor-
|
|
9
|
-
import { n as sendReadReceiptSignal, r as sendTypingSignal, t as sendMessageSignal } from "./send-
|
|
10
|
-
import { t as probeSignal } from "./probe-
|
|
4
|
+
import { c as resolveSignalReactionLevel, d as markdownToSignalTextChunks, s as signalMessageActions, t as detectSignalTransport, u as markdownToSignalText } from "./transport-detection-DROVGqJp.js";
|
|
5
|
+
import { n as sendReactionSignal, t as removeReactionSignal } from "./reaction-runtime-api-BUy1VGT6.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-CU23CLyl.js";
|
|
7
|
+
import { i as installSignalCli } from "./install-signal-cli-7tEL37_j.js";
|
|
8
|
+
import { t as monitorSignalProvider } from "./monitor-CfRPorq9.js";
|
|
9
|
+
import { n as sendReadReceiptSignal, r as sendTypingSignal, t as sendMessageSignal } from "./send-G6zfBh13.js";
|
|
10
|
+
import { t as probeSignal } from "./probe-CiVqVfko.js";
|
|
11
11
|
//#region extensions/signal/src/channel.setup.ts
|
|
12
12
|
const signalSetupPlugin = { ...createSignalPluginBase({
|
|
13
13
|
setupWizard: signalSetupWizard,
|
|
@@ -8,7 +8,8 @@ import { normalizeE164 } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
|
8
8
|
function normalizeAliasKey(raw) {
|
|
9
9
|
const trimmed = raw.trim();
|
|
10
10
|
if (!trimmed) return;
|
|
11
|
-
|
|
11
|
+
const withoutSignal = /^signal:/i.test(trimmed) ? trimmed.slice(7).trim() : trimmed;
|
|
12
|
+
return normalizeLowercaseStringOrEmpty(withoutSignal) || void 0;
|
|
12
13
|
}
|
|
13
14
|
function resolveAliasMap(params) {
|
|
14
15
|
const account = resolveSignalAccount({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as resolveDefaultSignalAccountId } from "./accounts-DO4HMqaK.js";
|
|
2
2
|
import { n as normalizeSignalMessagingTarget } from "./normalize-l_b99hap.js";
|
|
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-
|
|
3
|
+
import { i as resolveSignalTarget } from "./approval-auth-CkljhI65.js";
|
|
4
|
+
import { a as registerSignalApprovalReactionTarget, c as resolveSignalApprovalTargetAuthorKeys, l as unregisterSignalApprovalReactionTarget, r as hasSignalApprovalReactionApprovers, s as resolveSignalApprovalConversationKey } from "./approval-reactions-C5MzjYo0.js";
|
|
5
|
+
import { r as sendTypingSignal, t as sendMessageSignal } from "./send-G6zfBh13.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,8 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
2
|
import { n as normalizeSignalMessagingTarget } from "./normalize-l_b99hap.js";
|
|
3
|
-
import { i as resolveSignalTarget, n as signalApprovalAuth, t as getSignalApprovalApprovers } from "./approval-auth-
|
|
3
|
+
import { i as resolveSignalTarget, n as signalApprovalAuth, t as getSignalApprovalApprovers } from "./approval-auth-CkljhI65.js";
|
|
4
4
|
import { l as looksLikeUuid } from "./identity-YXPmgFMu.js";
|
|
5
|
-
import { i as getOptionalSignalRuntime } from "./transport-detection-
|
|
5
|
+
import { i as getOptionalSignalRuntime } from "./transport-detection-DROVGqJp.js";
|
|
6
6
|
import { createLazyRuntimeSurface } from "openclaw/plugin-sdk/lazy-runtime";
|
|
7
7
|
import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
|
8
8
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -127,14 +127,15 @@ var approval_reactions_exports = /* @__PURE__ */ __exportAll({
|
|
|
127
127
|
});
|
|
128
128
|
const PERSISTENT_NAMESPACE = "signal.approval-reactions.v2";
|
|
129
129
|
const PERSISTENT_MAX_ENTRIES = 1e3;
|
|
130
|
-
const DEFAULT_REACTION_TARGET_TTL_MS =
|
|
130
|
+
const DEFAULT_REACTION_TARGET_TTL_MS = 864e5;
|
|
131
131
|
const loadResolveApprovalOverGateway = createLazyRuntimeSurface(() => import("openclaw/plugin-sdk/approval-gateway-runtime"), (runtime) => runtime.resolveApprovalOverGateway);
|
|
132
|
+
const reportPersistentApprovalReactionError = createPluginStateErrorReporter(getOptionalSignalRuntime, "signal", "approval-reaction-state", "Signal persistent approval reaction state failed");
|
|
132
133
|
const signalApprovalReactionTargets = createApprovalReactionTargetStore({
|
|
133
134
|
namespace: PERSISTENT_NAMESPACE,
|
|
134
135
|
maxEntries: PERSISTENT_MAX_ENTRIES,
|
|
135
136
|
defaultTtlMs: DEFAULT_REACTION_TARGET_TTL_MS,
|
|
136
137
|
openStore: (storeParams) => getOptionalSignalRuntime()?.state.openKeyedStore(storeParams),
|
|
137
|
-
logPersistentError:
|
|
138
|
+
logPersistentError: reportPersistentApprovalReactionError,
|
|
138
139
|
readPersistedTarget
|
|
139
140
|
});
|
|
140
141
|
function resolveSignalApprovalConversationKey(to) {
|
|
@@ -1,11 +1,11 @@
|
|
|
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
3
|
import { n as normalizeSignalMessagingTarget, t as looksLikeSignalTargetId } from "./normalize-l_b99hap.js";
|
|
4
|
-
import { i as resolveSignalTarget, r as listSignalAliasDirectoryEntries } from "./approval-auth-
|
|
4
|
+
import { i as resolveSignalTarget, r as listSignalAliasDirectoryEntries } from "./approval-auth-CkljhI65.js";
|
|
5
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-
|
|
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-DROVGqJp.js";
|
|
7
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-
|
|
8
|
+
import { t as SignalChannelConfigSchema } from "./config-schema-CHihQTOp.js";
|
|
9
9
|
import { describeAccountSnapshot, resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/account-helpers";
|
|
10
10
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
11
11
|
import { buildDmGroupAccountAllowlistAdapter } from "openclaw/plugin-sdk/allowlist-config-edit";
|
|
@@ -208,13 +208,14 @@ function prepareSignalManagedNativeTransport(params) {
|
|
|
208
208
|
}
|
|
209
209
|
async function probeSignalTransport(params) {
|
|
210
210
|
const timeoutMs = params.timeoutMs ?? 1e4;
|
|
211
|
-
const
|
|
211
|
+
const transport = params.transport.kind === "managed-native" ? prepareSignalManagedNativeTransport({
|
|
212
212
|
cfg: params.cfg,
|
|
213
213
|
accountId: params.accountId,
|
|
214
214
|
overrides: managedTransportOptions(params.transport)
|
|
215
|
-
}) : params.transport
|
|
216
|
-
|
|
217
|
-
return (params.
|
|
215
|
+
}) : params.transport;
|
|
216
|
+
const resolved = resolveSignalTransport(transport);
|
|
217
|
+
if (resolved.kind === "container") return (params.probeContainer ?? (await import("./transport-probes.runtime-BMxOPSFh.js")).containerCheck)(resolved.baseUrl, timeoutMs, params.account);
|
|
218
|
+
return (params.probeNative ?? (await import("./transport-probes.runtime-BMxOPSFh.js")).nativeCheck)(resolved.baseUrl, timeoutMs);
|
|
218
219
|
}
|
|
219
220
|
function writeSignalAccountTransport(params) {
|
|
220
221
|
const transport = normalizeTransport(params.transport);
|
|
@@ -228,13 +229,14 @@ function writeSignalAccountTransport(params) {
|
|
|
228
229
|
accountId: params.accountId,
|
|
229
230
|
transport
|
|
230
231
|
});
|
|
232
|
+
const next = patchChannelConfigForAccount({
|
|
233
|
+
cfg: params.cfg,
|
|
234
|
+
channel: "signal",
|
|
235
|
+
accountId: params.accountId,
|
|
236
|
+
patch: { transport }
|
|
237
|
+
});
|
|
231
238
|
const canonical = clearLegacySignalTransportFieldsForAccount({
|
|
232
|
-
cfg:
|
|
233
|
-
cfg: params.cfg,
|
|
234
|
-
channel: "signal",
|
|
235
|
-
accountId: params.accountId,
|
|
236
|
-
patch: { transport }
|
|
237
|
-
}),
|
|
239
|
+
cfg: next,
|
|
238
240
|
accountId: params.accountId
|
|
239
241
|
});
|
|
240
242
|
if (transport.kind === "managed-native") resolveSignalAccount({
|
|
@@ -570,7 +572,7 @@ function createSignalSetupWizardProxy(loadWizard) {
|
|
|
570
572
|
const signalDoctor = {
|
|
571
573
|
normalizeCompatibilityConfig,
|
|
572
574
|
cleanStaleConfig: async ({ cfg }) => {
|
|
573
|
-
const { detectSignalTransport } = await import("./transport-detection.runtime-
|
|
575
|
+
const { detectSignalTransport } = await import("./transport-detection.runtime-BD5NyqbG.js");
|
|
574
576
|
return await migrateLegacySignalTransportConfig({
|
|
575
577
|
cfg,
|
|
576
578
|
detect: detectSignalTransport
|
|
@@ -581,7 +583,7 @@ const signalDoctor = {
|
|
|
581
583
|
//#region extensions/signal/src/shared.ts
|
|
582
584
|
const SIGNAL_CHANNEL = "signal";
|
|
583
585
|
async function loadSignalChannelRuntime() {
|
|
584
|
-
return await import("./channel.runtime-
|
|
586
|
+
return await import("./channel.runtime-CdtB9bsX.js");
|
|
585
587
|
}
|
|
586
588
|
const signalSetupWizard = createSignalSetupWizardProxy(async () => (await loadSignalChannelRuntime()).signalSetupWizard);
|
|
587
589
|
const signalConfigAdapter = {
|
|
@@ -666,10 +668,10 @@ function createSignalPluginBase(params) {
|
|
|
666
668
|
}
|
|
667
669
|
//#endregion
|
|
668
670
|
//#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-
|
|
671
|
+
const loadSignalMonitorModule = createLazyRuntimeModule(() => import("./monitor-CfRPorq9.js").then((n) => n.n));
|
|
672
|
+
const loadSignalProbeModule = createLazyRuntimeModule(() => import("./probe-CiVqVfko.js").then((n) => n.n));
|
|
673
|
+
const loadSignalSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-CmnwC2vm.js"));
|
|
674
|
+
const loadSignalApprovalReactionsModule = createLazyRuntimeModule(() => import("./approval-reactions-C5MzjYo0.js").then((n) => n.n));
|
|
673
675
|
async function resolveSignalSendContext(params) {
|
|
674
676
|
return {
|
|
675
677
|
send: resolveOutboundSendDep(params.deps, "signal") ?? (await loadSignalSendRuntime()).sendMessageSignal,
|
|
@@ -834,14 +836,15 @@ async function sendFormattedSignalText(ctx) {
|
|
|
834
836
|
accountId: ctx.accountId,
|
|
835
837
|
replyToId
|
|
836
838
|
});
|
|
837
|
-
const
|
|
839
|
+
const result = await send(to, chunk.text, {
|
|
838
840
|
cfg: ctx.cfg,
|
|
839
841
|
maxBytes,
|
|
840
842
|
accountId: ctx.accountId ?? void 0,
|
|
841
843
|
textMode: "plain",
|
|
842
844
|
textStyles: chunk.styles,
|
|
843
845
|
...replyOptions
|
|
844
|
-
})
|
|
846
|
+
});
|
|
847
|
+
const deliveryResult = attachChannelToResult("signal", attachSignalVisibleText(result, chunk.text));
|
|
845
848
|
results.push(deliveryResult);
|
|
846
849
|
await ctx.onDeliveryResult?.(deliveryResult);
|
|
847
850
|
}
|
|
@@ -874,7 +877,7 @@ async function sendFormattedSignalMedia(ctx) {
|
|
|
874
877
|
accountId: ctx.accountId,
|
|
875
878
|
replyToId: ctx.replyToId
|
|
876
879
|
});
|
|
877
|
-
|
|
880
|
+
const result = await send(to, formatted.text, {
|
|
878
881
|
cfg: ctx.cfg,
|
|
879
882
|
mediaUrl: ctx.mediaUrl,
|
|
880
883
|
...ctx.mediaAccess ? { mediaAccess: ctx.mediaAccess } : {},
|
|
@@ -885,7 +888,8 @@ async function sendFormattedSignalMedia(ctx) {
|
|
|
885
888
|
textMode: "plain",
|
|
886
889
|
textStyles: formatted.styles,
|
|
887
890
|
...replyOptions
|
|
888
|
-
})
|
|
891
|
+
});
|
|
892
|
+
return attachChannelToResult("signal", attachSignalVisibleText(result, formatted.text));
|
|
889
893
|
}
|
|
890
894
|
async function registerDeliveredSignalApprovalPayloadForReactions(params) {
|
|
891
895
|
const account = resolveSignalAccount({
|
|
@@ -895,7 +899,7 @@ async function registerDeliveredSignalApprovalPayloadForReactions(params) {
|
|
|
895
899
|
const targetAuthor = normalizeOptionalString(account.config.account);
|
|
896
900
|
const targetAuthorUuid = normalizeOptionalString(account.config.accountUuid);
|
|
897
901
|
if (!targetAuthor && !targetAuthorUuid) return;
|
|
898
|
-
const { registerSignalQuestionReactionTargetForDeliveredPayload } = await import("./question-reactions-
|
|
902
|
+
const { registerSignalQuestionReactionTargetForDeliveredPayload } = await import("./question-reactions-Bw30cacw.js").then((n) => n.n);
|
|
899
903
|
registerSignalQuestionReactionTargetForDeliveredPayload({
|
|
900
904
|
cfg: params.cfg,
|
|
901
905
|
target: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SignalChannelConfigSchema } from "./config-schema-
|
|
1
|
+
import { t as SignalChannelConfigSchema } from "./config-schema-CHihQTOp.js";
|
|
2
2
|
export { SignalChannelConfigSchema };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as signalPlugin } from "./channel-
|
|
1
|
+
import { t as signalPlugin } from "./channel-CU23CLyl.js";
|
|
2
2
|
export { signalPlugin };
|
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
3
|
-
import { i as installSignalCli } from "./install-signal-cli-
|
|
2
|
+
import { c as signalNumberTextInput, i as createSignalCliPathTextInput, o as signalCompletionNote, s as signalDmPolicy } from "./channel-CU23CLyl.js";
|
|
3
|
+
import { i as installSignalCli } from "./install-signal-cli-7tEL37_j.js";
|
|
4
4
|
import { detectBinary } from "openclaw/plugin-sdk/setup-tools";
|
|
5
5
|
import { createDetectedBinaryStatus, createSetupTranslator, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
|
|
6
6
|
//#region extensions/signal/src/setup-surface.ts
|
|
@@ -59,7 +59,8 @@ const signalSetupWizard = {
|
|
|
59
59
|
accountId
|
|
60
60
|
}).transport;
|
|
61
61
|
if (transport.kind !== "managed-native") return;
|
|
62
|
-
const
|
|
62
|
+
const currentCliPath = (typeof credentialValues.cliPath === "string" ? credentialValues.cliPath : void 0) ?? (transport.kind === "managed-native" ? transport.cliPath : void 0) ?? "signal-cli";
|
|
63
|
+
const cliDetected = await detectBinary(currentCliPath);
|
|
63
64
|
if (!await prompter.confirm({
|
|
64
65
|
message: cliDetected ? t("wizard.signal.reinstallPrompt") : t("wizard.signal.installPrompt"),
|
|
65
66
|
initialValue: !cliDetected
|
|
@@ -19,12 +19,12 @@ import { generateSecureUuid } from "openclaw/plugin-sdk/core";
|
|
|
19
19
|
*/
|
|
20
20
|
const DEFAULT_TIMEOUT_MS$1 = 1e4;
|
|
21
21
|
const DEFAULT_ATTACHMENT_RESPONSE_MAX_BYTES = 1048576;
|
|
22
|
-
const SIGNAL_REST_ERROR_RESPONSE_MAX_BYTES =
|
|
23
|
-
const SIGNAL_REST_SUCCESS_RESPONSE_MAX_BYTES =
|
|
24
|
-
const WS_MAX_PAYLOAD =
|
|
22
|
+
const SIGNAL_REST_ERROR_RESPONSE_MAX_BYTES = 16384;
|
|
23
|
+
const SIGNAL_REST_SUCCESS_RESPONSE_MAX_BYTES = 16777216;
|
|
24
|
+
const WS_MAX_PAYLOAD = 1048576;
|
|
25
25
|
const WS_HANDSHAKE_MS = 3e4;
|
|
26
26
|
const WS_SHUTDOWN_DRAIN_TIMEOUT_MS = 1500;
|
|
27
|
-
const DEFAULT_SIGNAL_CONTAINER_MAX_ATTACHMENT_BYTES =
|
|
27
|
+
const DEFAULT_SIGNAL_CONTAINER_MAX_ATTACHMENT_BYTES = 8388608;
|
|
28
28
|
const CONTAINER_TEXT_STYLE_MARKERS = {
|
|
29
29
|
BOLD: "**",
|
|
30
30
|
ITALIC: "*",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as containerRpcRequest, i as containerCheck, n as signalRpcRequest$1, o as streamContainerEvents, r as streamSignalEvents$1, t as signalCheck$1 } from "./client-
|
|
1
|
+
import { a as containerRpcRequest, i as containerCheck, n as signalRpcRequest$1, o as streamContainerEvents, r as streamSignalEvents$1, t as signalCheck$1 } from "./client-DtHac18U.js";
|
|
2
2
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
3
3
|
//#region extensions/signal/src/client-adapter.ts
|
|
4
4
|
/**
|
|
@@ -198,7 +198,8 @@ function validateSignalContainerAccounts(value, ctx) {
|
|
|
198
198
|
if (!account || !channelEnabled || account.enabled === false) continue;
|
|
199
199
|
const isDefaultAccount = normalizeAccountId(accountId) === DEFAULT_ACCOUNT_ID;
|
|
200
200
|
if ((isDefaultAccount && value.transport ? value.transport : account.transport)?.kind !== "container" || isDefaultAccount && value.transport) continue;
|
|
201
|
-
|
|
201
|
+
const effectiveAccount = account.account === void 0 ? value.account : account.account;
|
|
202
|
+
if (!normalizeOptionalString(effectiveAccount)) ctx.addIssue({
|
|
202
203
|
code: z.ZodIssueCode.custom,
|
|
203
204
|
message: "channels.signal account container transport requires an account number on the account or channel",
|
|
204
205
|
path: [
|
package/dist/contract-api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { n as normalizeSignalMessagingTarget, r as normalizeSignalReactionRecipient, t as looksLikeSignalTargetId } from "./normalize-l_b99hap.js";
|
|
2
2
|
import { i as isSignalSenderAllowed } from "./identity-YXPmgFMu.js";
|
|
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-
|
|
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-7tEL37_j.js";
|
|
4
4
|
export { MAX_SIGNAL_CLI_EXTRACTED_BYTES, downloadToFile, extractSignalCliArchive, installSignalCli, installSignalCliFromRelease, isSignalSenderAllowed, looksLikeArchive, looksLikeSignalTargetId, normalizeSignalMessagingTarget, normalizeSignalReactionRecipient, pickAsset };
|
|
@@ -12,10 +12,10 @@ import { runPluginCommandWithTimeout } from "openclaw/plugin-sdk/run-command";
|
|
|
12
12
|
import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
13
13
|
import { withTempDownloadPath } from "openclaw/plugin-sdk/temp-path";
|
|
14
14
|
//#region extensions/signal/src/install-signal-cli.ts
|
|
15
|
-
const MAX_SIGNAL_CLI_ARCHIVE_BYTES =
|
|
15
|
+
const MAX_SIGNAL_CLI_ARCHIVE_BYTES = 268435456;
|
|
16
16
|
/** @internal Exported for testing. */
|
|
17
|
-
const MAX_SIGNAL_CLI_EXTRACTED_BYTES =
|
|
18
|
-
const SIGNAL_CLI_DOWNLOAD_TIMEOUT_MS =
|
|
17
|
+
const MAX_SIGNAL_CLI_EXTRACTED_BYTES = 402653184;
|
|
18
|
+
const SIGNAL_CLI_DOWNLOAD_TIMEOUT_MS = 3e5;
|
|
19
19
|
const SIGNAL_CLI_RELEASE_INFO_TIMEOUT_MS = 3e4;
|
|
20
20
|
const CONTENT_LENGTH_RE = /^\d+$/;
|
|
21
21
|
/** @internal Exported for testing. */
|
|
@@ -57,7 +57,8 @@ function normalizeReleaseAsset(value) {
|
|
|
57
57
|
} : void 0;
|
|
58
58
|
}
|
|
59
59
|
function normalizeSignalCliRelease(value) {
|
|
60
|
-
const
|
|
60
|
+
const tagName = normalizeOptionalString(value.tag_name);
|
|
61
|
+
const version = normalizeOptionalString(tagName?.replace(/^v/, ""));
|
|
61
62
|
if (!version || !Array.isArray(value.assets)) return;
|
|
62
63
|
return {
|
|
63
64
|
version,
|
|
@@ -114,14 +115,17 @@ async function downloadToFile(url, dest, maxRedirects = 5, maxBytes = MAX_SIGNAL
|
|
|
114
115
|
}
|
|
115
116
|
let totalBytes = 0;
|
|
116
117
|
const body = response.body;
|
|
117
|
-
|
|
118
|
+
const readable = isNodeReadableStream(body) ? body : Readable.fromWeb(body);
|
|
119
|
+
const limiter = new Transform({ transform(chunk, _encoding, callback) {
|
|
118
120
|
totalBytes += chunkByteLength(chunk);
|
|
119
121
|
if (totalBytes > maxBytes) {
|
|
120
122
|
callback(/* @__PURE__ */ new Error(`signal-cli archive exceeded the ${maxBytes}-byte download cap.`));
|
|
121
123
|
return;
|
|
122
124
|
}
|
|
123
125
|
callback(null, chunk);
|
|
124
|
-
} })
|
|
126
|
+
} });
|
|
127
|
+
const out = createWriteStream(dest);
|
|
128
|
+
await pipeline(readable, limiter, out);
|
|
125
129
|
completed = true;
|
|
126
130
|
} finally {
|
|
127
131
|
await release();
|
|
@@ -178,7 +182,7 @@ async function installSignalCliViaBrew(runtime) {
|
|
|
178
182
|
"install",
|
|
179
183
|
"signal-cli"
|
|
180
184
|
],
|
|
181
|
-
timeoutMs:
|
|
185
|
+
timeoutMs: 9e5
|
|
182
186
|
});
|
|
183
187
|
if (result.code !== 0) return {
|
|
184
188
|
ok: false,
|
|
@@ -3,12 +3,12 @@ import { l as normalizeSignalTransportHost } from "./transport-policy-DxvSMHp9.j
|
|
|
3
3
|
import { i as resolveSignalAccount, o as resolveSignalReplyToMode } from "./accounts-DO4HMqaK.js";
|
|
4
4
|
import { n as normalizeSignalMessagingTarget } from "./normalize-l_b99hap.js";
|
|
5
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-
|
|
7
|
-
import { n as signalRpcRequest, r as streamSignalEvents, t as signalCheck } from "./client-adapter-
|
|
8
|
-
import { n as sendReactionSignal } from "./reaction-runtime-api-
|
|
9
|
-
import { i as maybeResolveSignalApprovalReaction, o as registerSignalApprovalReactionTargetForDeliveredPayload, s as resolveSignalApprovalConversationKey, t as addSignalApprovalReactionHintToStructuredPayload } from "./approval-reactions-
|
|
10
|
-
import { r as registerSignalQuestionReactionTargetForDeliveredPayload, t as maybeResolveSignalQuestionReaction } from "./question-reactions-
|
|
11
|
-
import { n as sendReadReceiptSignal, r as sendTypingSignal, t as sendMessageSignal } from "./send-
|
|
6
|
+
import { c as resolveSignalReactionLevel, f as isSignalNativeApprovalHandlerConfigured, i as getOptionalSignalRuntime, l as formatSignalMediaText, n as registerSignalReplyContext, o as materializeSignalPresentationFallback } from "./transport-detection-DROVGqJp.js";
|
|
7
|
+
import { n as signalRpcRequest, r as streamSignalEvents, t as signalCheck } from "./client-adapter-E06RAM6-.js";
|
|
8
|
+
import { n as sendReactionSignal } from "./reaction-runtime-api-BUy1VGT6.js";
|
|
9
|
+
import { i as maybeResolveSignalApprovalReaction, o as registerSignalApprovalReactionTargetForDeliveredPayload, s as resolveSignalApprovalConversationKey, t as addSignalApprovalReactionHintToStructuredPayload } from "./approval-reactions-C5MzjYo0.js";
|
|
10
|
+
import { r as registerSignalQuestionReactionTargetForDeliveredPayload, t as maybeResolveSignalQuestionReaction } from "./question-reactions-Bw30cacw.js";
|
|
11
|
+
import { n as sendReadReceiptSignal, r as sendTypingSignal, t as sendMessageSignal } from "./send-G6zfBh13.js";
|
|
12
12
|
import { bindIngressLifecycleToReplyOptions, createChannelIngressError, createChannelIngressMonitor, createChannelMessageReplyPipeline, resolveChannelStreamingBlockEnabled } from "openclaw/plugin-sdk/channel-outbound";
|
|
13
13
|
import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing";
|
|
14
14
|
import { resolveAgentRoute, resolveInboundLastRouteSessionKey } from "openclaw/plugin-sdk/routing";
|
|
@@ -1816,7 +1816,7 @@ function buildSignalReactionSystemEventText(params) {
|
|
|
1816
1816
|
const withTarget = params.targetLabel ? `${base} from ${params.targetLabel}` : base;
|
|
1817
1817
|
return params.groupLabel ? `${withTarget} in ${params.groupLabel}` : withTarget;
|
|
1818
1818
|
}
|
|
1819
|
-
const SIGNAL_ATTACHMENT_RPC_RESPONSE_HEADROOM_BYTES =
|
|
1819
|
+
const SIGNAL_ATTACHMENT_RPC_RESPONSE_HEADROOM_BYTES = 65536;
|
|
1820
1820
|
const SIGNAL_BASE64_OVERHEAD_NUMERATOR = 4;
|
|
1821
1821
|
const SIGNAL_BASE64_OVERHEAD_DENOMINATOR = 3;
|
|
1822
1822
|
function deriveSignalAttachmentRpcMaxResponseBytes(maxBytes) {
|
|
@@ -1826,7 +1826,7 @@ function deriveSignalAttachmentRpcMaxResponseBytes(maxBytes) {
|
|
|
1826
1826
|
async function fetchAttachment(params) {
|
|
1827
1827
|
const { attachment } = params;
|
|
1828
1828
|
if (!attachment?.id) return null;
|
|
1829
|
-
if (typeof attachment.size === "number" && attachment.size > params.maxBytes) throw new Error(`Signal attachment ${attachment.id} exceeds ${(params.maxBytes /
|
|
1829
|
+
if (typeof attachment.size === "number" && attachment.size > params.maxBytes) throw new Error(`Signal attachment ${attachment.id} exceeds ${(params.maxBytes / 1048576).toFixed(0)}MB limit`);
|
|
1830
1830
|
const rpcParams = { id: attachment.id };
|
|
1831
1831
|
if (params.account) rpcParams.account = params.account;
|
|
1832
1832
|
if (params.groupId) rpcParams.groupId = params.groupId;
|
|
@@ -1838,15 +1838,16 @@ async function fetchAttachment(params) {
|
|
|
1838
1838
|
transportKind: params.transportKind
|
|
1839
1839
|
});
|
|
1840
1840
|
if (!result?.data) return null;
|
|
1841
|
-
if (estimateBase64DecodedBytes(result.data) > params.maxBytes) throw new Error(`Signal attachment ${attachment.id} exceeds ${(params.maxBytes /
|
|
1841
|
+
if (estimateBase64DecodedBytes(result.data) > params.maxBytes) throw new Error(`Signal attachment ${attachment.id} exceeds ${(params.maxBytes / 1048576).toFixed(0)}MB limit`);
|
|
1842
1842
|
const canonicalData = canonicalizeBase64(result.data);
|
|
1843
1843
|
if (!canonicalData) throw new Error(`Signal attachment ${attachment.id} returned malformed base64 data`);
|
|
1844
1844
|
const buffer = Buffer.from(canonicalData, "base64");
|
|
1845
1845
|
const originalFilename = normalizeOptionalString(attachment.filename ?? void 0);
|
|
1846
|
-
const
|
|
1846
|
+
const contentType = normalizeOptionalString(attachment.contentType ?? void 0) ?? await detectMime({
|
|
1847
1847
|
buffer,
|
|
1848
1848
|
filePath: originalFilename
|
|
1849
|
-
})
|
|
1849
|
+
});
|
|
1850
|
+
const saved = await saveMediaBuffer(buffer, contentType, "inbound", params.maxBytes, originalFilename);
|
|
1850
1851
|
return {
|
|
1851
1852
|
path: saved.path,
|
|
1852
1853
|
contentType: saved.contentType
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { t as detectSignalTransport } from "./transport-detection-
|
|
3
|
-
import { n as signalRpcRequest, t as signalCheck } from "./client-adapter-
|
|
2
|
+
import { t as detectSignalTransport } from "./transport-detection-DROVGqJp.js";
|
|
3
|
+
import { n as signalRpcRequest, t as signalCheck } from "./client-adapter-E06RAM6-.js";
|
|
4
4
|
import { runChannelProbe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
5
5
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
6
6
|
//#region extensions/signal/src/probe.ts
|
|
@@ -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-CkljhI65.js";
|
|
3
|
+
import { c as resolveSignalApprovalTargetAuthorKeys, s as resolveSignalApprovalConversationKey } from "./approval-reactions-C5MzjYo0.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,12 +1,13 @@
|
|
|
1
1
|
import { i as resolveSignalAccount } from "./accounts-DO4HMqaK.js";
|
|
2
2
|
import { r as normalizeSignalReactionRecipient } from "./normalize-l_b99hap.js";
|
|
3
|
-
import { n as signalRpcRequest } from "./client-adapter-
|
|
3
|
+
import { n as signalRpcRequest } from "./client-adapter-E06RAM6-.js";
|
|
4
4
|
import { t as resolveSignalRpcContext } from "./rpc-context-dXSy4NtF.js";
|
|
5
5
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
6
6
|
//#region extensions/signal/src/send-reactions.ts
|
|
7
7
|
async function sendReactionSignalCore(params) {
|
|
8
|
+
const cfg = requireRuntimeConfig(params.opts.cfg, "Signal reactions");
|
|
8
9
|
const accountInfo = resolveSignalAccount({
|
|
9
|
-
cfg
|
|
10
|
+
cfg,
|
|
10
11
|
accountId: params.opts.accountId
|
|
11
12
|
});
|
|
12
13
|
const { baseUrl, account } = resolveSignalRpcContext(params.opts, accountInfo);
|
|
@@ -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-BUy1VGT6.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
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-
|
|
4
|
-
import { n as sendReactionSignal, t as removeReactionSignal } from "./reaction-runtime-api-
|
|
5
|
-
import { n as SignalConfigSchema } from "./config-schema-
|
|
6
|
-
import { i as installSignalCli } from "./install-signal-cli-
|
|
7
|
-
import { t as monitorSignalProvider } from "./monitor-
|
|
8
|
-
import { t as sendMessageSignal } from "./send-
|
|
9
|
-
import { t as probeSignal } from "./probe-
|
|
3
|
+
import { a as setSignalRuntime, c as resolveSignalReactionLevel, s as signalMessageActions } from "./transport-detection-DROVGqJp.js";
|
|
4
|
+
import { n as sendReactionSignal, t as removeReactionSignal } from "./reaction-runtime-api-BUy1VGT6.js";
|
|
5
|
+
import { n as SignalConfigSchema } from "./config-schema-CHihQTOp.js";
|
|
6
|
+
import { i as installSignalCli } from "./install-signal-cli-7tEL37_j.js";
|
|
7
|
+
import { t as monitorSignalProvider } from "./monitor-CfRPorq9.js";
|
|
8
|
+
import { t as sendMessageSignal } from "./send-G6zfBh13.js";
|
|
9
|
+
import { t as probeSignal } from "./probe-CiVqVfko.js";
|
|
10
10
|
import { resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/account-helpers";
|
|
11
11
|
import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
|
|
12
12
|
import { buildBaseAccountStatusSnapshot, buildBaseChannelStatusSummary, collectStatusIssuesFromLastError, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as resolveSignalAccount } from "./accounts-DO4HMqaK.js";
|
|
2
2
|
import { n as normalizeSignalMessagingTarget } from "./normalize-l_b99hap.js";
|
|
3
|
-
import { n as registerSignalReplyContext, u as markdownToSignalText } from "./transport-detection-
|
|
4
|
-
import { n as signalRpcRequest } from "./client-adapter-
|
|
3
|
+
import { n as registerSignalReplyContext, u as markdownToSignalText } from "./transport-detection-DROVGqJp.js";
|
|
4
|
+
import { n as signalRpcRequest } from "./client-adapter-E06RAM6-.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";
|
|
@@ -28,8 +28,9 @@ function assertSignalRecipientDelivery(result, target) {
|
|
|
28
28
|
}
|
|
29
29
|
async function resolveSignalRpcAccountInfo(opts) {
|
|
30
30
|
if (!opts.cfg) throw new Error("Signal RPC account resolution requires a resolved runtime config. Load and resolve config at the command or gateway boundary, then pass cfg through the runtime path.");
|
|
31
|
+
const cfg = requireRuntimeConfig(opts.cfg, "Signal RPC account resolution");
|
|
31
32
|
return resolveSignalAccount({
|
|
32
|
-
cfg
|
|
33
|
+
cfg,
|
|
33
34
|
accountId: opts.accountId
|
|
34
35
|
});
|
|
35
36
|
}
|
|
@@ -111,7 +112,8 @@ function resolveSignalQuoteParams(opts) {
|
|
|
111
112
|
};
|
|
112
113
|
}
|
|
113
114
|
function isSignalQuoteMetadataRejection(error) {
|
|
114
|
-
const
|
|
115
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
116
|
+
const normalized = normalizeLowercaseStringOrEmpty(message);
|
|
115
117
|
const rpcCode = /^signal rpc (-?\d+):/u.exec(normalized)?.[1];
|
|
116
118
|
if (rpcCode !== void 0) {
|
|
117
119
|
if (rpcCode !== "-32602") return false;
|
|
@@ -142,7 +144,7 @@ async function sendMessageSignal(to, text, opts) {
|
|
|
142
144
|
if (typeof opts.maxBytes === "number") return opts.maxBytes;
|
|
143
145
|
if (typeof accountInfo.config.mediaMaxMb === "number") return accountInfo.config.mediaMaxMb * 1024 * 1024;
|
|
144
146
|
if (typeof cfg.agents?.defaults?.mediaMaxMb === "number") return cfg.agents.defaults.mediaMaxMb * 1024 * 1024;
|
|
145
|
-
return
|
|
147
|
+
return 8388608;
|
|
146
148
|
})();
|
|
147
149
|
let attachments;
|
|
148
150
|
if (opts.mediaUrl?.trim()) {
|
|
@@ -157,16 +159,18 @@ async function sendMessageSignal(to, text, opts) {
|
|
|
157
159
|
kind: kindFromMime(resolved.contentType ?? void 0) ?? "unknown"
|
|
158
160
|
};
|
|
159
161
|
}
|
|
160
|
-
if (message.trim())
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
162
|
+
if (message.trim()) {
|
|
163
|
+
if (textMode === "plain") textStyles = opts.textStyles ?? [];
|
|
164
|
+
else {
|
|
165
|
+
const tableMode = resolveMarkdownTableMode({
|
|
166
|
+
cfg,
|
|
167
|
+
channel: "signal",
|
|
168
|
+
accountId: accountInfo.accountId
|
|
169
|
+
});
|
|
170
|
+
const formatted = markdownToSignalText(message, { tableMode });
|
|
171
|
+
message = formatted.text;
|
|
172
|
+
textStyles = formatted.styles;
|
|
173
|
+
}
|
|
170
174
|
}
|
|
171
175
|
if (!message.trim() && (!attachments || attachments.length === 0)) throw new Error("Signal send requires text or media");
|
|
172
176
|
const params = { message };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as sendTypingSignal, t as sendMessageSignal } from "./send-
|
|
1
|
+
import { r as sendTypingSignal, t as sendMessageSignal } from "./send-G6zfBh13.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
3
|
import { n as normalizeSignalMessagingTarget, r as normalizeSignalReactionRecipient } from "./normalize-l_b99hap.js";
|
|
4
|
-
import { n as signalApprovalAuth, t as getSignalApprovalApprovers } from "./approval-auth-
|
|
5
|
-
import { n as sendReactionSignal, t as removeReactionSignal } from "./reaction-runtime-api-
|
|
4
|
+
import { n as signalApprovalAuth, t as getSignalApprovalApprovers } from "./approval-auth-CkljhI65.js";
|
|
5
|
+
import { n as sendReactionSignal, t as removeReactionSignal } from "./reaction-runtime-api-BUy1VGT6.js";
|
|
6
6
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
7
7
|
import { questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
|
|
8
8
|
import { parseAgentSessionKey } from "openclaw/plugin-sdk/routing";
|
|
@@ -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-C5SsJ5ko.js")).signalApprovalNativeRuntime
|
|
73
73
|
})
|
|
74
74
|
});
|
|
75
75
|
const signalApprovalRouting = signalApproval.routing;
|
|
@@ -164,8 +164,9 @@ function markdownToSignalText(markdown, options = {}) {
|
|
|
164
164
|
return renderSignalText(markdownToSignalIR(markdown, options));
|
|
165
165
|
}
|
|
166
166
|
function markdownToSignalTextChunks(markdown, limit, options = {}) {
|
|
167
|
+
const ir = markdownToSignalIR(markdown, options);
|
|
167
168
|
return renderMarkdownIRChunksWithinLimit({
|
|
168
|
-
ir
|
|
169
|
+
ir,
|
|
169
170
|
limit,
|
|
170
171
|
assistantTranscriptRoleMessageBoundaries: true,
|
|
171
172
|
renderChunk: renderSignalText,
|
|
@@ -200,11 +201,12 @@ function formatSignalMediaText(media) {
|
|
|
200
201
|
* - "extensive": Agent can react liberally
|
|
201
202
|
*/
|
|
202
203
|
function resolveSignalReactionLevel(params) {
|
|
204
|
+
const account = resolveSignalAccount({
|
|
205
|
+
cfg: params.cfg,
|
|
206
|
+
accountId: params.accountId
|
|
207
|
+
});
|
|
203
208
|
return resolveReactionLevel({
|
|
204
|
-
value:
|
|
205
|
-
cfg: params.cfg,
|
|
206
|
-
accountId: params.accountId
|
|
207
|
-
}).config.reactionLevel,
|
|
209
|
+
value: account.config.reactionLevel,
|
|
208
210
|
defaultLevel: "minimal",
|
|
209
211
|
invalidFallback: "minimal"
|
|
210
212
|
});
|
|
@@ -317,10 +319,11 @@ function materializeSignalPresentationFallback(payload, presentationOverride) {
|
|
|
317
319
|
const presentation = presentationOverride ?? normalizeMessagePresentation(payload.presentation);
|
|
318
320
|
if (!presentation) return payload;
|
|
319
321
|
const currentText = payload.text?.trim() ?? "";
|
|
320
|
-
const
|
|
322
|
+
const fallbackPresentation = Boolean(getExecApprovalReplyMetadata(payload) && currentText) ? {
|
|
321
323
|
...presentation,
|
|
322
324
|
blocks: presentation.blocks.filter((block) => !isMessagePresentationInteractiveBlock(block))
|
|
323
|
-
} : presentation
|
|
325
|
+
} : presentation;
|
|
326
|
+
const presentationFallback = renderMessagePresentationFallbackText({ presentation: fallbackPresentation });
|
|
324
327
|
const text = currentText.includes(presentationFallback) ? currentText : [currentText, presentationFallback].filter(Boolean).join("\n\n");
|
|
325
328
|
const { presentation: _presentation, ...withoutPresentation } = payload;
|
|
326
329
|
return {
|
|
@@ -344,7 +347,7 @@ const { setRuntime: setSignalRuntime, tryGetRuntime: getOptionalSignalRuntime }
|
|
|
344
347
|
//#region extensions/signal/src/reply-authors.ts
|
|
345
348
|
const PERSISTENT_NAMESPACE = "signal.reply-authors.v1";
|
|
346
349
|
const PERSISTENT_MAX_ENTRIES = 5e3;
|
|
347
|
-
const DEFAULT_REPLY_AUTHOR_TTL_MS =
|
|
350
|
+
const DEFAULT_REPLY_AUTHOR_TTL_MS = 6048e5;
|
|
348
351
|
const { memoryReplyContexts } = signalReplyAuthorState;
|
|
349
352
|
function openSignalReplyAuthorStore() {
|
|
350
353
|
if (signalReplyAuthorState.persistentStoreDisabled) return;
|
|
@@ -515,7 +518,7 @@ const DEFAULT_PROBE_TIMEOUT_MS = 1e4;
|
|
|
515
518
|
async function detectSignalTransport(params) {
|
|
516
519
|
const url = normalizeSignalTransportUrl(params.url);
|
|
517
520
|
const timeoutMs = params.timeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS;
|
|
518
|
-
const probes = params.probeNative && params.probeContainer ? void 0 : await import("./transport-probes.runtime-
|
|
521
|
+
const probes = params.probeNative && params.probeContainer ? void 0 : await import("./transport-probes.runtime-BMxOPSFh.js");
|
|
519
522
|
const probeNative = params.probeNative ?? probes?.nativeCheck;
|
|
520
523
|
const probeContainer = params.probeContainer ?? probes?.containerCheck;
|
|
521
524
|
if (!probeNative || !probeContainer) throw new Error("Signal transport probes are unavailable");
|
package/dist/{transport-detection.runtime-Cnykqcu0.js → transport-detection.runtime-BD5NyqbG.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as detectSignalTransport } from "./transport-detection-
|
|
1
|
+
import { t as detectSignalTransport } from "./transport-detection-DROVGqJp.js";
|
|
2
2
|
export { detectSignalTransport };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as containerCheck, t as signalCheck } from "./client-
|
|
1
|
+
import { i as containerCheck, t as signalCheck } from "./client-DtHac18U.js";
|
|
2
2
|
export { containerCheck, signalCheck as nativeCheck };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/signal",
|
|
3
|
-
"version": "2026.8.
|
|
3
|
+
"version": "2026.8.2",
|
|
4
4
|
"description": "OpenClaw Signal channel plugin",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
@@ -93,10 +93,10 @@
|
|
|
93
93
|
"allowInvalidConfigRecovery": true
|
|
94
94
|
},
|
|
95
95
|
"compat": {
|
|
96
|
-
"pluginApi": ">=2026.8.
|
|
96
|
+
"pluginApi": ">=2026.8.2"
|
|
97
97
|
},
|
|
98
98
|
"build": {
|
|
99
|
-
"openclawVersion": "2026.8.
|
|
99
|
+
"openclawVersion": "2026.8.2",
|
|
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.
|
|
121
|
+
"openclaw": ">=2026.8.2"
|
|
122
122
|
},
|
|
123
123
|
"peerDependenciesMeta": {
|
|
124
124
|
"openclaw": {
|