@openclaw/signal 2026.7.2-beta.1 → 2026.7.2-beta.3
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 -8
- package/dist/{approval-handler.runtime-I1SMFwwR.js → approval-handler.runtime-p8gabljn.js} +4 -4
- package/dist/{approval-reactions-ChcS2rQN.js → approval-reactions-DcpZRS5-.js} +2 -2
- package/dist/{channel-DK8XZHPe.js → channel-ChLRPIuC.js} +26 -8
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-BbDh5UIr.js → channel.runtime-ts_U4_q4.js} +2 -2
- package/dist/{client-adapter-aEM0kGhC.js → client-adapter-DZD8DCai.js} +36 -17
- package/dist/contract-api.js +2 -2
- package/dist/{identity-BF8taj7g.js → identity-BQ4OzXXk.js} +17 -8
- package/dist/{install-signal-cli-CtusY3tN.js → install-signal-cli-l35FqIbP.js} +14 -5
- package/dist/{monitor-BdzH3U64.js → monitor-D2nTNhM2.js} +320 -88
- package/dist/{probe-CbWkI24J.js → probe-sSH6ggyy.js} +1 -1
- package/dist/question-reactions-BFFJNQsu.js +109 -0
- package/dist/{reaction-runtime-api-DifyinAU.js → reaction-runtime-api-tPkUVRoL.js} +1 -1
- package/dist/reaction-runtime-api.js +1 -1
- package/dist/{reply-authors-osU_SY4J.js → reply-authors-DcNqGpX-.js} +20 -9
- package/dist/{runtime-BZ9hnS3a.js → runtime-B900w6lc.js} +1 -1
- package/dist/runtime-api.js +8 -8
- package/dist/{send-BWtA6h3J.js → send-f6JLstd2.js} +4 -4
- package/dist/{send.runtime-D4WBNNgn.js → send.runtime-B_UYsXWd.js} +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +4 -4
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
+
import { o as resolveSignalTarget } from "./runtime-B900w6lc.js";
|
|
3
|
+
import { l as resolveSignalApprovalConversationKey, u as resolveSignalApprovalTargetAuthorKeys } from "./approval-reactions-DcpZRS5-.js";
|
|
4
|
+
import { questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
|
|
5
|
+
import { normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
|
6
|
+
//#region extensions/signal/src/question-reactions.ts
|
|
7
|
+
var question_reactions_exports = /* @__PURE__ */ __exportAll({
|
|
8
|
+
maybeResolveSignalQuestionReaction: () => maybeResolveSignalQuestionReaction,
|
|
9
|
+
registerSignalQuestionReactionTargetForDeliveredPayload: () => registerSignalQuestionReactionTargetForDeliveredPayload
|
|
10
|
+
});
|
|
11
|
+
const TARGET_TTL_MS = 1440 * 60 * 1e3;
|
|
12
|
+
const targets = /* @__PURE__ */ new Map();
|
|
13
|
+
function storeTarget(key, binding, targetAuthorKeys) {
|
|
14
|
+
const existing = targets.get(key);
|
|
15
|
+
if (existing) clearTimeout(existing.cleanupTimer);
|
|
16
|
+
const target = {
|
|
17
|
+
...binding,
|
|
18
|
+
targetAuthorKeys,
|
|
19
|
+
terminal: false,
|
|
20
|
+
expiresAtMs: Date.now() + TARGET_TTL_MS,
|
|
21
|
+
cleanupTimer: setTimeout(() => {
|
|
22
|
+
if (targets.get(key) === target) targets.delete(key);
|
|
23
|
+
}, TARGET_TTL_MS)
|
|
24
|
+
};
|
|
25
|
+
target.cleanupTimer.unref?.();
|
|
26
|
+
targets.set(key, target);
|
|
27
|
+
questionGatewayRuntime.registerChannelDelivery({
|
|
28
|
+
questionId: binding.questionId,
|
|
29
|
+
deliveryId: `signal-reaction:${key}`,
|
|
30
|
+
finalize: () => {
|
|
31
|
+
target.terminal = true;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function buildKey(accountId, conversationKey, messageId) {
|
|
36
|
+
const values = [
|
|
37
|
+
accountId,
|
|
38
|
+
conversationKey,
|
|
39
|
+
messageId
|
|
40
|
+
].map((value) => value.trim());
|
|
41
|
+
return values.every(Boolean) ? values.join(":") : null;
|
|
42
|
+
}
|
|
43
|
+
function resolveConversationKey(params) {
|
|
44
|
+
try {
|
|
45
|
+
return resolveSignalTarget({
|
|
46
|
+
cfg: params.cfg,
|
|
47
|
+
accountId: params.accountId,
|
|
48
|
+
input: params.to
|
|
49
|
+
})?.to ?? resolveSignalApprovalConversationKey(params.to);
|
|
50
|
+
} catch {
|
|
51
|
+
return resolveSignalApprovalConversationKey(params.to);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function registerSignalQuestionReactionTargetForDeliveredPayload(params) {
|
|
55
|
+
const binding = questionGatewayRuntime.readReactionBinding(params.payload);
|
|
56
|
+
if (params.target.channel !== "signal" || !binding) return false;
|
|
57
|
+
const conversationKey = resolveConversationKey({
|
|
58
|
+
cfg: params.cfg,
|
|
59
|
+
...params.target
|
|
60
|
+
});
|
|
61
|
+
const targetAuthorKeys = resolveSignalApprovalTargetAuthorKeys(params);
|
|
62
|
+
if (!conversationKey || targetAuthorKeys.length === 0) return false;
|
|
63
|
+
const accountId = normalizeAccountId(params.target.accountId ?? void 0);
|
|
64
|
+
let registered = false;
|
|
65
|
+
for (const result of params.results) {
|
|
66
|
+
const messageId = result.channel === "signal" ? result.messageId.trim() : "";
|
|
67
|
+
const key = messageId && messageId !== "unknown" ? buildKey(accountId, conversationKey, messageId) : null;
|
|
68
|
+
if (!key) continue;
|
|
69
|
+
storeTarget(key, binding, targetAuthorKeys);
|
|
70
|
+
registered = true;
|
|
71
|
+
}
|
|
72
|
+
return registered;
|
|
73
|
+
}
|
|
74
|
+
async function maybeResolveSignalQuestionReaction(params) {
|
|
75
|
+
if (params.isRemove) return false;
|
|
76
|
+
const optionIndex = questionGatewayRuntime.resolveReactionIndex(params.reactionKey);
|
|
77
|
+
const key = buildKey(params.accountId, params.conversationKey, params.messageId);
|
|
78
|
+
if (optionIndex === void 0 || !key) return false;
|
|
79
|
+
const target = targets.get(key);
|
|
80
|
+
if (!target) return false;
|
|
81
|
+
if (!resolveSignalApprovalTargetAuthorKeys(params).some((authorKey) => target.targetAuthorKeys.includes(authorKey))) return false;
|
|
82
|
+
if (target.expiresAtMs <= Date.now() || target.terminal) {
|
|
83
|
+
target.terminal = true;
|
|
84
|
+
params.logDebug?.(`signal: stale question reaction ignored id=${target.questionId}`);
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
const optionValue = target.optionValues[optionIndex];
|
|
88
|
+
if (!optionValue) {
|
|
89
|
+
params.logDebug?.(`signal: out-of-range question reaction ignored id=${target.questionId}`);
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
try {
|
|
93
|
+
const result = await questionGatewayRuntime.resolveReaction({
|
|
94
|
+
cfg: params.cfg,
|
|
95
|
+
questionId: target.questionId,
|
|
96
|
+
optionValue,
|
|
97
|
+
senderId: params.actorId,
|
|
98
|
+
gatewayUrl: params.gatewayUrl,
|
|
99
|
+
clientDisplayName: `Signal question (${params.actorId})`
|
|
100
|
+
});
|
|
101
|
+
target.terminal = result?.status === "answered" || result?.status === "already-terminal";
|
|
102
|
+
if (result?.status === "already-terminal") params.logDebug?.(`signal: stale question reaction ignored id=${target.questionId}`);
|
|
103
|
+
} catch (error) {
|
|
104
|
+
params.logDebug?.(`signal: question reaction failed id=${target.questionId}: ${String(error)}`);
|
|
105
|
+
}
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
//#endregion
|
|
109
|
+
export { question_reactions_exports as n, registerSignalQuestionReactionTargetForDeliveredPayload as r, maybeResolveSignalQuestionReaction as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as resolveSignalAccount } from "./accounts-Bz4HtP0g.js";
|
|
2
|
-
import { n as signalRpcRequest } from "./client-adapter-
|
|
2
|
+
import { n as signalRpcRequest } from "./client-adapter-DZD8DCai.js";
|
|
3
3
|
import { t as resolveSignalRpcContext } from "./rpc-context-DsHWh2hc.js";
|
|
4
4
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
@@ -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-tPkUVRoL.js";
|
|
2
2
|
export { removeReactionSignal, sendReactionSignal };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { i as resolveSignalAccount, n as listSignalAccountIds, r as resolveDefaultSignalAccountId, t as listEnabledSignalAccounts } from "./accounts-Bz4HtP0g.js";
|
|
2
|
-
import { d as normalizeSignalMessagingTarget } from "./identity-
|
|
3
|
-
import { i as signalApprovalAuth, r as getSignalApprovalApprovers, t as getOptionalSignalRuntime } from "./runtime-
|
|
4
|
-
import { n as sendReactionSignal, t as removeReactionSignal } from "./reaction-runtime-api-
|
|
2
|
+
import { d as normalizeSignalMessagingTarget } from "./identity-BQ4OzXXk.js";
|
|
3
|
+
import { i as signalApprovalAuth, r as getSignalApprovalApprovers, t as getOptionalSignalRuntime } from "./runtime-B900w6lc.js";
|
|
4
|
+
import { n as sendReactionSignal, t as removeReactionSignal } from "./reaction-runtime-api-tPkUVRoL.js";
|
|
5
5
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
6
|
+
import { questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
|
|
6
7
|
import { parseAgentSessionKey } from "openclaw/plugin-sdk/routing";
|
|
7
8
|
import { resolveReactionLevel } from "openclaw/plugin-sdk/status-helpers";
|
|
8
9
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -214,7 +215,7 @@ const signalApprovalCapability = createChannelApprovalCapability({
|
|
|
214
215
|
approvalKind,
|
|
215
216
|
request
|
|
216
217
|
}),
|
|
217
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
218
|
+
load: async () => (await import("./approval-handler.runtime-p8gabljn.js")).signalApprovalNativeRuntime
|
|
218
219
|
})
|
|
219
220
|
});
|
|
220
221
|
//#endregion
|
|
@@ -547,6 +548,11 @@ const signalMessageActions = {
|
|
|
547
548
|
//#region extensions/signal/src/presentation-fallback.ts
|
|
548
549
|
/** Materialize presentation content once before Signal's text-only delivery funnels. */
|
|
549
550
|
function materializeSignalPresentationFallback(payload, presentationOverride) {
|
|
551
|
+
const reactionPayload = questionGatewayRuntime.prepareReactionPayloadForDelivery({
|
|
552
|
+
payload,
|
|
553
|
+
presentation: presentationOverride ?? payload.presentation
|
|
554
|
+
});
|
|
555
|
+
if (reactionPayload) return reactionPayload;
|
|
550
556
|
const presentation = presentationOverride ?? normalizeMessagePresentation(payload.presentation);
|
|
551
557
|
if (!presentation) return payload;
|
|
552
558
|
const currentText = payload.text?.trim() ?? "";
|
|
@@ -562,14 +568,19 @@ function materializeSignalPresentationFallback(payload, presentationOverride) {
|
|
|
562
568
|
};
|
|
563
569
|
}
|
|
564
570
|
//#endregion
|
|
571
|
+
//#region extensions/signal/src/reply-authors-state.ts
|
|
572
|
+
const signalReplyAuthorState = {
|
|
573
|
+
memoryReplyContexts: /* @__PURE__ */ new Map(),
|
|
574
|
+
persistentStoreDisabled: false
|
|
575
|
+
};
|
|
576
|
+
//#endregion
|
|
565
577
|
//#region extensions/signal/src/reply-authors.ts
|
|
566
578
|
const PERSISTENT_NAMESPACE = "signal.reply-authors.v1";
|
|
567
579
|
const PERSISTENT_MAX_ENTRIES = 5e3;
|
|
568
580
|
const DEFAULT_REPLY_AUTHOR_TTL_MS = 10080 * 60 * 1e3;
|
|
569
|
-
const memoryReplyContexts =
|
|
570
|
-
let persistentStoreDisabled = false;
|
|
581
|
+
const { memoryReplyContexts } = signalReplyAuthorState;
|
|
571
582
|
function openSignalReplyAuthorStore() {
|
|
572
|
-
if (persistentStoreDisabled) return;
|
|
583
|
+
if (signalReplyAuthorState.persistentStoreDisabled) return;
|
|
573
584
|
const runtime = getOptionalSignalRuntime();
|
|
574
585
|
try {
|
|
575
586
|
return runtime?.state.openKeyedStore({
|
|
@@ -578,7 +589,7 @@ function openSignalReplyAuthorStore() {
|
|
|
578
589
|
defaultTtlMs: DEFAULT_REPLY_AUTHOR_TTL_MS
|
|
579
590
|
});
|
|
580
591
|
} catch (error) {
|
|
581
|
-
persistentStoreDisabled = true;
|
|
592
|
+
signalReplyAuthorState.persistentStoreDisabled = true;
|
|
582
593
|
runtime?.logging.getChildLogger({
|
|
583
594
|
plugin: "signal",
|
|
584
595
|
feature: "reply-author-state"
|
|
@@ -664,7 +675,7 @@ async function registerSignalReplyContext(params) {
|
|
|
664
675
|
expiresAt
|
|
665
676
|
});
|
|
666
677
|
pruneMemoryReplyContexts(registeredAt);
|
|
667
|
-
persistentStoreDisabled = true;
|
|
678
|
+
signalReplyAuthorState.persistentStoreDisabled = true;
|
|
668
679
|
getOptionalSignalRuntime()?.logging.getChildLogger({
|
|
669
680
|
plugin: "signal",
|
|
670
681
|
feature: "reply-author-state"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as resolveSignalAccount } from "./accounts-Bz4HtP0g.js";
|
|
2
|
-
import { d as normalizeSignalMessagingTarget, l as looksLikeUuid, u as looksLikeSignalTargetId } from "./identity-
|
|
2
|
+
import { d as normalizeSignalMessagingTarget, l as looksLikeUuid, u as looksLikeSignalTargetId } from "./identity-BQ4OzXXk.js";
|
|
3
3
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { createChannelApprovalAuth } from "openclaw/plugin-sdk/approval-auth-runtime";
|
|
5
5
|
import { normalizeE164 } from "openclaw/plugin-sdk/text-utility-runtime";
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { i as resolveSignalAccount, n as listSignalAccountIds, r as resolveDefaultSignalAccountId, t as listEnabledSignalAccounts } from "./accounts-Bz4HtP0g.js";
|
|
2
|
-
import { d as normalizeSignalMessagingTarget, u as looksLikeSignalTargetId } from "./identity-
|
|
3
|
-
import { n as setSignalRuntime } from "./runtime-
|
|
4
|
-
import { a as resolveSignalReactionLevel, i as signalMessageActions } from "./reply-authors-
|
|
5
|
-
import { n as sendReactionSignal, t as removeReactionSignal } from "./reaction-runtime-api-
|
|
2
|
+
import { d as normalizeSignalMessagingTarget, u as looksLikeSignalTargetId } from "./identity-BQ4OzXXk.js";
|
|
3
|
+
import { n as setSignalRuntime } from "./runtime-B900w6lc.js";
|
|
4
|
+
import { a as resolveSignalReactionLevel, i as signalMessageActions } from "./reply-authors-DcNqGpX-.js";
|
|
5
|
+
import { n as sendReactionSignal, t as removeReactionSignal } from "./reaction-runtime-api-tPkUVRoL.js";
|
|
6
6
|
import { n as buildChannelConfigSchema, t as SignalConfigSchema } from "./config-api-DIg1lInT.js";
|
|
7
|
-
import { i as installSignalCli } from "./install-signal-cli-
|
|
8
|
-
import { t as monitorSignalProvider } from "./monitor-
|
|
9
|
-
import { t as sendMessageSignal } from "./send-
|
|
10
|
-
import { t as probeSignal } from "./probe-
|
|
7
|
+
import { i as installSignalCli } from "./install-signal-cli-l35FqIbP.js";
|
|
8
|
+
import { t as monitorSignalProvider } from "./monitor-D2nTNhM2.js";
|
|
9
|
+
import { t as sendMessageSignal } from "./send-f6JLstd2.js";
|
|
10
|
+
import { t as probeSignal } from "./probe-sSH6ggyy.js";
|
|
11
11
|
import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
|
|
12
12
|
import { resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/media-runtime";
|
|
13
13
|
import { buildBaseAccountStatusSnapshot, buildBaseChannelStatusSummary, collectStatusIssuesFromLastError, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { i as resolveSignalAccount } from "./accounts-Bz4HtP0g.js";
|
|
2
|
-
import { d as normalizeSignalMessagingTarget } from "./identity-
|
|
3
|
-
import { o as markdownToSignalText, t as registerSignalReplyContext } from "./reply-authors-
|
|
4
|
-
import { n as signalRpcRequest } from "./client-adapter-
|
|
2
|
+
import { d as normalizeSignalMessagingTarget } from "./identity-BQ4OzXXk.js";
|
|
3
|
+
import { o as markdownToSignalText, t as registerSignalReplyContext } from "./reply-authors-DcNqGpX-.js";
|
|
4
|
+
import { n as signalRpcRequest } from "./client-adapter-DZD8DCai.js";
|
|
5
5
|
import { t as resolveSignalRpcContext } from "./rpc-context-DsHWh2hc.js";
|
|
6
|
-
import { c as registerSignalApprovalReactionTargetForOutboundMessage, n as appendSignalApprovalReactionHintForOutboundMessage } from "./approval-reactions-
|
|
6
|
+
import { c as registerSignalApprovalReactionTargetForOutboundMessage, n as appendSignalApprovalReactionHintForOutboundMessage } from "./approval-reactions-DcpZRS5-.js";
|
|
7
7
|
import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
|
|
8
8
|
import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
9
9
|
import { kindFromMime, resolveOutboundAttachmentFromUrl } from "openclaw/plugin-sdk/media-runtime";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as sendTypingSignal, t as sendMessageSignal } from "./send-
|
|
1
|
+
import { r as sendTypingSignal, t as sendMessageSignal } from "./send-f6JLstd2.js";
|
|
2
2
|
export { sendMessageSignal, sendTypingSignal };
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/signal",
|
|
3
|
-
"version": "2026.7.2-beta.
|
|
3
|
+
"version": "2026.7.2-beta.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/signal",
|
|
9
|
-
"version": "2026.7.2-beta.
|
|
9
|
+
"version": "2026.7.2-beta.3",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"ws": "8.21.0"
|
|
12
12
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/signal",
|
|
3
|
-
"version": "2026.7.2-beta.
|
|
3
|
+
"version": "2026.7.2-beta.3",
|
|
4
4
|
"description": "OpenClaw Signal channel plugin",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"allowInvalidConfigRecovery": true
|
|
45
45
|
},
|
|
46
46
|
"compat": {
|
|
47
|
-
"pluginApi": ">=2026.7.2-beta.
|
|
47
|
+
"pluginApi": ">=2026.7.2-beta.3"
|
|
48
48
|
},
|
|
49
49
|
"build": {
|
|
50
|
-
"openclawVersion": "2026.7.2-beta.
|
|
50
|
+
"openclawVersion": "2026.7.2-beta.3",
|
|
51
51
|
"bundledDist": false
|
|
52
52
|
},
|
|
53
53
|
"release": {
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"README.md"
|
|
71
71
|
],
|
|
72
72
|
"peerDependencies": {
|
|
73
|
-
"openclaw": ">=2026.7.2-beta.
|
|
73
|
+
"openclaw": ">=2026.7.2-beta.3"
|
|
74
74
|
},
|
|
75
75
|
"peerDependenciesMeta": {
|
|
76
76
|
"openclaw": {
|