@openclaw/signal 2026.11.3 → 2026.11.5-beta.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/.setup/{accounts-B0Pba1-q.mjs → accounts-enJKL3ci.mjs} +4 -8
- package/dist/.setup/api-CrasQEKI.mjs +14 -0
- package/dist/.setup/{api-CbN3mye4.mjs → api-DljZsfUn.mjs} +9 -11
- package/dist/.setup/{approval-auth-DhUKkSkA.mjs → approval-auth-B_5Ytx8K.mjs} +7 -11
- package/dist/.setup/{approval-handler.runtime-CsEcBZoc.mjs → approval-handler.runtime-0RbVmTxx.mjs} +7 -8
- package/dist/.setup/{approval-reactions-JsqCEOHK.mjs → approval-reactions-CvqVSSx8.mjs} +16 -24
- package/dist/.setup/{channel-CM-rLLPN.mjs → channel-ByJj8fSh.mjs} +417 -372
- package/dist/.setup/{client-Duwqbgqi.mjs → client-CesmEjRc.mjs} +170 -186
- package/dist/.setup/{config-schema-DvxZ18SD.mjs → config-schema-BCmW0BLB.mjs} +2 -5
- package/dist/.setup/{doctor-contract-api-BIdVW0PF.mjs → doctor-contract-api-CcLwIhsD.mjs} +88 -95
- package/dist/.setup/{identity-B3JyPqGO.mjs → identity-vKtR3DrM.mjs} +39 -2
- package/dist/.setup/{install-signal-cli-hYVLYGXe.mjs → install-signal-cli-DvLDZfpP.mjs} +95 -109
- package/dist/.setup/{transport-url-CAC0JcuI.mjs → legacy-transport-D_cZC3bS.mjs} +18 -1
- package/dist/.setup/{monitor-C6u1JV2C.mjs → monitor-Cf5sihwl.mjs} +166 -239
- package/dist/.setup/{probe-D_93QCe0.mjs → probe-Caq5Y4kA.mjs} +3 -3
- package/dist/.setup/{send-CM7-016e.mjs → send-BJuOWLky.mjs} +34 -66
- package/dist/.setup/{setup-surface-DvKLwYrl.mjs → setup-surface-DQ1yFZmY.mjs} +3 -3
- package/dist/.setup/{transport-detection-CmlgOybe.mjs → transport-detection-DvR6X_UQ.mjs} +3 -3
- package/dist/.setup/{transport-policy-B6C_LogW.mjs → transport-policy-zIR3lRUj.mjs} +1 -1
- package/dist/.setup/transport-probes.runtime-CoH6UFtc.mjs +1 -0
- package/dist/.source-module-urls/b02c526df8b90083105b63e5b51d5c8bbfe02676df72f6be8dd8f825817b32b9.json +1 -0
- package/dist/api.js +9 -11
- package/dist/channel-config-api.js +1 -2
- package/dist/channel-plugin-api.js +1 -2
- package/dist/contract-api.js +3 -4
- package/dist/doctor-contract-api.js +1 -2
- package/dist/runtime-api.js +1 -2
- package/dist/setup-entry.js +1 -1
- package/node_modules/@openclaw/fs-safe/CHANGELOG.md +94 -0
- package/node_modules/@openclaw/fs-safe/dist/archive-parser.wasm +0 -0
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-file-input.js +3 -1
- package/node_modules/@openclaw/fs-safe/dist/copy-path-admission.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/copy-root-file-sync.js +8 -1
- package/node_modules/@openclaw/fs-safe/dist/file-open-error.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/file-open-error.js +14 -0
- package/node_modules/@openclaw/fs-safe/dist/file-sync.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/file-sync.js +6 -1
- package/node_modules/@openclaw/fs-safe/dist/guest-native-python.js +3 -0
- package/node_modules/@openclaw/fs-safe/dist/native-binding.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/native-config.js +14 -3
- package/node_modules/@openclaw/fs-safe/dist/native-operations.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/native-pinned-write-windows.js +9 -2
- package/node_modules/@openclaw/fs-safe/dist/native-staged-file.js +40 -32
- package/node_modules/@openclaw/fs-safe/dist/output.js +6 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/owner-dacl.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/path.js +5 -1
- package/node_modules/@openclaw/fs-safe/dist/pinned-write-staged.js +25 -2
- package/node_modules/@openclaw/fs-safe/dist/publication-handle.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/publication-handle.js +32 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/publish-copy-stage.js +19 -9
- package/node_modules/@openclaw/fs-safe/dist/publish-file.js +23 -24
- package/node_modules/@openclaw/fs-safe/dist/publish-rename-fallback.d.ts +21 -0
- package/node_modules/@openclaw/fs-safe/dist/publish-rename-fallback.js +102 -0
- package/node_modules/@openclaw/fs-safe/dist/root-create-native.js +2 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.d.ts +3 -1
- package/node_modules/@openclaw/fs-safe/dist/root-directory-entry.js +8 -5
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list-types.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.d.ts +2 -1
- package/node_modules/@openclaw/fs-safe/dist/root-directory-list.js +19 -9
- package/node_modules/@openclaw/fs-safe/dist/root-file-final-admission.js +3 -3
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.d.ts +2 -2
- package/node_modules/@openclaw/fs-safe/dist/root-path-existing.js +27 -13
- package/node_modules/@openclaw/fs-safe/dist/root-path.js +2 -2
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.d.ts +3 -0
- package/node_modules/@openclaw/fs-safe/dist/sibling-staged-file.js +18 -3
- package/node_modules/@openclaw/fs-safe/dist/watch-hints.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/watch-hints.js +68 -21
- package/node_modules/@openclaw/fs-safe/dist/watch-io-error.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-io-error.js +27 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-io-worker.d.ts +1 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-io-worker.js +93 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-io.d.ts +47 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-io.js +236 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-native.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/watch-native.js +3 -3
- package/node_modules/@openclaw/fs-safe/dist/watch-probe.d.ts +16 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-probe.js +135 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-rescan.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/watch-rescan.js +86 -24
- package/node_modules/@openclaw/fs-safe/dist/watch-scan.d.ts +4 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-scan.js +78 -16
- package/node_modules/@openclaw/fs-safe/dist/watch-stream.d.ts +2 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-stream.js +23 -0
- package/node_modules/@openclaw/fs-safe/dist/watch-types.d.ts +3 -1
- package/node_modules/@openclaw/fs-safe/dist/watch.js +60 -13
- package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.d.ts +1 -1
- package/node_modules/@openclaw/fs-safe/dist/windows-security-facts.js +1 -0
- package/node_modules/@openclaw/fs-safe/dist/windows-security-helper.exe +0 -0
- package/node_modules/@openclaw/fs-safe/docs/advanced.md +5 -2
- package/node_modules/@openclaw/fs-safe/docs/compiler-qualification.md +392 -0
- package/node_modules/@openclaw/fs-safe/docs/config.md +7 -1
- package/node_modules/@openclaw/fs-safe/docs/contributing.md +25 -5
- package/node_modules/@openclaw/fs-safe/docs/copy.md +10 -0
- package/node_modules/@openclaw/fs-safe/docs/durability.md +9 -3
- package/node_modules/@openclaw/fs-safe/docs/errors.md +13 -0
- package/node_modules/@openclaw/fs-safe/docs/migrating-to-0.5.md +6 -4
- package/node_modules/@openclaw/fs-safe/docs/native-helper.md +6 -4
- package/node_modules/@openclaw/fs-safe/docs/output.md +4 -2
- package/node_modules/@openclaw/fs-safe/docs/path.md +5 -2
- package/node_modules/@openclaw/fs-safe/docs/permissions.md +15 -0
- package/node_modules/@openclaw/fs-safe/docs/security-model.md +9 -0
- package/node_modules/@openclaw/fs-safe/docs/staged-file.md +2 -0
- package/node_modules/@openclaw/fs-safe/docs/testing.md +1 -1
- package/node_modules/@openclaw/fs-safe/docs/watch.md +62 -5
- package/node_modules/@openclaw/fs-safe/docs/writing.md +6 -1
- package/node_modules/@openclaw/fs-safe/package.json +18 -16
- package/node_modules/@openclaw/fs-safe-darwin-arm64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-arm64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-darwin-x64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-darwin-x64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-freebsd-arm64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-freebsd-arm64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-freebsd-x64/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-freebsd-x64/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-arm64-gnu/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-arm64-musl/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-arm64-musl/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-x64-gnu/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-x64-gnu/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-linux-x64-musl/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-linux-x64-musl/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-win32-arm64-msvc/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-win32-arm64-msvc/package.json +1 -1
- package/node_modules/@openclaw/fs-safe-win32-x64-msvc/fs-safe-native.node +0 -0
- package/node_modules/@openclaw/fs-safe-win32-x64-msvc/package.json +1 -1
- package/node_modules/zod/package.json +1 -1
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +6 -0
- package/node_modules/zod/src/v4/core/compile.ts +9 -0
- package/node_modules/zod/src/v4/core/schemas.ts +35 -1
- package/node_modules/zod/src/v4/core/util.ts +13 -0
- package/node_modules/zod/src/v4/core/versions.ts +1 -1
- package/node_modules/zod/v4/core/compile.cjs +8 -0
- package/node_modules/zod/v4/core/compile.js +8 -0
- package/node_modules/zod/v4/core/schemas.cjs +30 -0
- package/node_modules/zod/v4/core/schemas.d.cts +3 -1
- package/node_modules/zod/v4/core/schemas.d.ts +3 -1
- package/node_modules/zod/v4/core/schemas.js +30 -0
- package/node_modules/zod/v4/core/util.cjs +15 -0
- package/node_modules/zod/v4/core/util.d.cts +2 -0
- package/node_modules/zod/v4/core/util.d.ts +2 -0
- package/node_modules/zod/v4/core/util.js +14 -0
- package/node_modules/zod/v4/core/versions.cjs +1 -1
- package/node_modules/zod/v4/core/versions.js +1 -1
- package/openclaw.plugin.json +0 -30
- package/package.json +6 -8
- package/dist/.setup/api-CJBtD3lT.mjs +0 -16
- package/dist/.setup/client-adapter-Chnbch_z.mjs +0 -30
- package/dist/.setup/legacy-transport-QIpaMNST.mjs +0 -18
- package/dist/.setup/normalize-D7kSomXt.mjs +0 -39
- package/dist/.setup/reaction-runtime-api-mdO4k0yv.mjs +0 -65
- package/dist/.setup/reaction-targets-BgPLDHBf.mjs +0 -72
- package/dist/.setup/rpc-context-BAXcX7dI.mjs +0 -13
- package/dist/.setup/transport-probes.runtime-D-xIMRcn.mjs +0 -2
- package/dist/reaction-runtime-api.js +0 -2
- package/node_modules/ws/LICENSE +0 -20
- package/node_modules/ws/README.md +0 -548
- package/node_modules/ws/browser.js +0 -8
- package/node_modules/ws/index.js +0 -22
- package/node_modules/ws/lib/buffer-util.js +0 -131
- package/node_modules/ws/lib/constants.js +0 -19
- package/node_modules/ws/lib/event-target.js +0 -292
- package/node_modules/ws/lib/extension.js +0 -203
- package/node_modules/ws/lib/limiter.js +0 -55
- package/node_modules/ws/lib/permessage-deflate.js +0 -530
- package/node_modules/ws/lib/receiver.js +0 -743
- package/node_modules/ws/lib/sender.js +0 -607
- package/node_modules/ws/lib/stream.js +0 -161
- package/node_modules/ws/lib/subprotocol.js +0 -62
- package/node_modules/ws/lib/validation.js +0 -152
- package/node_modules/ws/lib/websocket-server.js +0 -562
- package/node_modules/ws/lib/websocket.js +0 -1421
- package/node_modules/ws/package.json +0 -74
- package/node_modules/ws/wrapper.mjs +0 -21
|
@@ -1,39 +0,0 @@
|
|
|
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 normalized = raw.trim().replace(/^signal:/i, "").trim();
|
|
9
|
-
const prefix = /^(group|username|u|uuid):/i.exec(normalized)?.[0];
|
|
10
|
-
if (!prefix) return normalizeLowercaseStringOrEmpty(normalized) || void 0;
|
|
11
|
-
const id = normalized.slice(prefix.length).trim();
|
|
12
|
-
if (!id) return;
|
|
13
|
-
switch (prefix.toLowerCase()) {
|
|
14
|
-
case "group:": return `group:${id}`;
|
|
15
|
-
case "username:":
|
|
16
|
-
case "u:": return normalizeLowercaseStringOrEmpty(`username:${id}`);
|
|
17
|
-
default: return normalizeLowercaseStringOrEmpty(id);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
const UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
21
|
-
const UUID_COMPACT_PATTERN = /^[0-9a-f]{32}$/i;
|
|
22
|
-
function looksLikeSignalTargetId(raw, normalized) {
|
|
23
|
-
const candidates = normalizeStringEntries([raw, normalized ?? ""]);
|
|
24
|
-
for (const candidate of candidates) {
|
|
25
|
-
if (/^(signal:)?(group:|username:|u:)/i.test(candidate)) return true;
|
|
26
|
-
if (/^(signal:)?uuid:/i.test(candidate)) {
|
|
27
|
-
const stripped = candidate.replace(/^signal:/i, "").replace(/^uuid:/i, "").trim();
|
|
28
|
-
if (!stripped) continue;
|
|
29
|
-
if (UUID_PATTERN.test(stripped) || UUID_COMPACT_PATTERN.test(stripped)) return true;
|
|
30
|
-
continue;
|
|
31
|
-
}
|
|
32
|
-
const withoutSignalPrefix = candidate.replace(/^signal:/i, "").trim();
|
|
33
|
-
if (UUID_PATTERN.test(withoutSignalPrefix) || UUID_COMPACT_PATTERN.test(withoutSignalPrefix)) return true;
|
|
34
|
-
if (/^\+?\d{3,}$/.test(withoutSignalPrefix)) return true;
|
|
35
|
-
}
|
|
36
|
-
return false;
|
|
37
|
-
}
|
|
38
|
-
//#endregion
|
|
39
|
-
export { normalizeSignalMessagingTarget as n, normalizeSignalReactionRecipient as r, looksLikeSignalTargetId as t };
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { i as resolveSignalAccount } from "./accounts-B0Pba1-q.mjs";
|
|
2
|
-
import { r as normalizeSignalReactionRecipient } from "./normalize-D7kSomXt.mjs";
|
|
3
|
-
import { n as signalRpcRequest } from "./client-adapter-Chnbch_z.mjs";
|
|
4
|
-
import { t as resolveSignalRpcContext } from "./rpc-context-BAXcX7dI.mjs";
|
|
5
|
-
import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
6
|
-
//#region extensions/signal/src/send-reactions.ts
|
|
7
|
-
async function sendReactionSignalCore(params) {
|
|
8
|
-
const cfg = requireRuntimeConfig(params.opts.cfg, "Signal reactions");
|
|
9
|
-
const accountInfo = resolveSignalAccount({
|
|
10
|
-
cfg,
|
|
11
|
-
accountId: params.opts.accountId
|
|
12
|
-
});
|
|
13
|
-
const { baseUrl, account } = resolveSignalRpcContext(params.opts, accountInfo);
|
|
14
|
-
const normalizedRecipient = normalizeSignalReactionRecipient(params.recipient);
|
|
15
|
-
const groupId = params.opts.groupId?.trim();
|
|
16
|
-
const operation = `Signal reaction${params.remove ? " removal" : ""}`;
|
|
17
|
-
if (!normalizedRecipient && !groupId) throw new Error(`Recipient or groupId is required for ${operation}`);
|
|
18
|
-
if (!Number.isFinite(params.targetTimestamp) || params.targetTimestamp <= 0) throw new Error(`Valid targetTimestamp is required for ${operation}`);
|
|
19
|
-
const normalizedEmoji = params.emoji?.trim();
|
|
20
|
-
if (!normalizedEmoji) throw new Error(`Emoji is required for ${operation}`);
|
|
21
|
-
const targetAuthor = [
|
|
22
|
-
params.opts.targetAuthor,
|
|
23
|
-
params.opts.targetAuthorUuid,
|
|
24
|
-
normalizedRecipient
|
|
25
|
-
].map((candidate) => normalizeSignalReactionRecipient(candidate ?? "")).find(Boolean);
|
|
26
|
-
if (groupId && !targetAuthor) throw new Error(`targetAuthor is required for group reaction${params.remove ? " removal" : "s"}`);
|
|
27
|
-
const requestParams = {
|
|
28
|
-
emoji: normalizedEmoji,
|
|
29
|
-
targetTimestamp: params.targetTimestamp,
|
|
30
|
-
...params.remove ? { remove: true } : {},
|
|
31
|
-
...targetAuthor ? { targetAuthor } : {}
|
|
32
|
-
};
|
|
33
|
-
if (normalizedRecipient) requestParams.recipients = [normalizedRecipient];
|
|
34
|
-
if (groupId) requestParams.groupIds = [groupId];
|
|
35
|
-
if (account) requestParams.account = account;
|
|
36
|
-
return {
|
|
37
|
-
ok: true,
|
|
38
|
-
timestamp: (await signalRpcRequest("sendReaction", requestParams, {
|
|
39
|
-
baseUrl,
|
|
40
|
-
timeoutMs: params.opts.timeoutMs,
|
|
41
|
-
transportKind: params.opts.transportKind ?? accountInfo.transport.kind,
|
|
42
|
-
assertDirectAdapterHandoff: params.opts.assertDirectAdapterHandoff
|
|
43
|
-
}))?.timestamp
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
async function sendReactionSignal(recipient, targetTimestamp, emoji, opts) {
|
|
47
|
-
return await sendReactionSignalCore({
|
|
48
|
-
recipient,
|
|
49
|
-
targetTimestamp,
|
|
50
|
-
emoji,
|
|
51
|
-
remove: false,
|
|
52
|
-
opts
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
async function removeReactionSignal(recipient, targetTimestamp, emoji, opts) {
|
|
56
|
-
return await sendReactionSignalCore({
|
|
57
|
-
recipient,
|
|
58
|
-
targetTimestamp,
|
|
59
|
-
emoji,
|
|
60
|
-
remove: true,
|
|
61
|
-
opts
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
//#endregion
|
|
65
|
-
export { sendReactionSignal as n, removeReactionSignal as t };
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { o as __exportAll } from "./doctor-contract-api-BIdVW0PF.mjs";
|
|
2
|
-
import { i as resolveSignalDeliveredConversationKey } from "./approval-auth-DhUKkSkA.mjs";
|
|
3
|
-
import { c as resolveSignalApprovalTargetAuthorKeys, o as registerSignalApprovalReactionTargetForDeliveredPayload } from "./approval-reactions-JsqCEOHK.mjs";
|
|
4
|
-
import { createQuestionReactionTargetStore, 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
|
-
function buildKey(identity) {
|
|
8
|
-
const values = [
|
|
9
|
-
identity.accountId,
|
|
10
|
-
identity.conversationKey,
|
|
11
|
-
identity.messageId
|
|
12
|
-
].map((value) => value.trim());
|
|
13
|
-
return values.every(Boolean) ? values.join(":") : null;
|
|
14
|
-
}
|
|
15
|
-
const questionReactionTargets = createQuestionReactionTargetStore({
|
|
16
|
-
channel: "signal",
|
|
17
|
-
channelDisplayName: "Signal",
|
|
18
|
-
buildKey,
|
|
19
|
-
identityMatches: (stored, incoming) => Boolean(stored && incoming?.some((authorKey) => stored.includes(authorKey))),
|
|
20
|
-
registerChannelDelivery: questionGatewayRuntime.registerChannelDelivery,
|
|
21
|
-
resolveReaction: questionGatewayRuntime.resolveReaction
|
|
22
|
-
});
|
|
23
|
-
function registerSignalQuestionReactionTargetForDeliveredPayload(params) {
|
|
24
|
-
const binding = questionGatewayRuntime.readReactionBinding(params.payload);
|
|
25
|
-
if (params.target.channel !== "signal" || !binding) return false;
|
|
26
|
-
const conversationKey = resolveSignalDeliveredConversationKey({
|
|
27
|
-
cfg: params.cfg,
|
|
28
|
-
...params.target
|
|
29
|
-
});
|
|
30
|
-
const targetAuthorKeys = resolveSignalApprovalTargetAuthorKeys(params);
|
|
31
|
-
if (!conversationKey || targetAuthorKeys.length === 0) return false;
|
|
32
|
-
const accountId = normalizeAccountId(params.target.accountId ?? void 0);
|
|
33
|
-
let registered = false;
|
|
34
|
-
for (const result of params.results) {
|
|
35
|
-
const messageId = result.channel === "signal" ? result.messageId.trim() : "";
|
|
36
|
-
if (!messageId || messageId === "unknown") continue;
|
|
37
|
-
registered = questionReactionTargets.register(binding, {
|
|
38
|
-
accountId,
|
|
39
|
-
conversationKey,
|
|
40
|
-
messageId
|
|
41
|
-
}, targetAuthorKeys) || registered;
|
|
42
|
-
}
|
|
43
|
-
return registered;
|
|
44
|
-
}
|
|
45
|
-
async function maybeResolveSignalQuestionReaction(params) {
|
|
46
|
-
if (params.isRemove) return false;
|
|
47
|
-
const optionIndex = questionGatewayRuntime.resolveReactionIndex(params.reactionKey);
|
|
48
|
-
if (optionIndex === void 0) return false;
|
|
49
|
-
const authorKeys = resolveSignalApprovalTargetAuthorKeys(params);
|
|
50
|
-
return await questionReactionTargets.resolve({
|
|
51
|
-
identities: [{
|
|
52
|
-
accountId: params.accountId,
|
|
53
|
-
conversationKey: params.conversationKey,
|
|
54
|
-
messageId: params.messageId
|
|
55
|
-
}],
|
|
56
|
-
optionIndex,
|
|
57
|
-
cfg: params.cfg,
|
|
58
|
-
senderId: params.actorId,
|
|
59
|
-
gatewayUrl: params.gatewayUrl,
|
|
60
|
-
metadata: authorKeys,
|
|
61
|
-
logDebug: params.logDebug
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
//#endregion
|
|
65
|
-
//#region extensions/signal/src/reaction-targets.ts
|
|
66
|
-
var reaction_targets_exports = /* @__PURE__ */ __exportAll({ registerSignalReactionTargetsForDeliveredPayload: () => registerSignalReactionTargetsForDeliveredPayload });
|
|
67
|
-
async function registerSignalReactionTargetsForDeliveredPayload(params) {
|
|
68
|
-
registerSignalQuestionReactionTargetForDeliveredPayload(params);
|
|
69
|
-
await registerSignalApprovalReactionTargetForDeliveredPayload(params);
|
|
70
|
-
}
|
|
71
|
-
//#endregion
|
|
72
|
-
export { registerSignalReactionTargetsForDeliveredPayload as n, maybeResolveSignalQuestionReaction as r, reaction_targets_exports as t };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
//#region extensions/signal/src/rpc-context.ts
|
|
2
|
-
function resolveSignalRpcContext(opts, accountInfo) {
|
|
3
|
-
const baseUrlOverride = opts.baseUrl?.trim();
|
|
4
|
-
const accountOverride = opts.account?.trim();
|
|
5
|
-
const baseUrl = baseUrlOverride || accountInfo.baseUrl;
|
|
6
|
-
if (!baseUrl) throw new Error("Signal base URL is required");
|
|
7
|
-
return {
|
|
8
|
-
baseUrl,
|
|
9
|
-
account: accountOverride || accountInfo.config.account?.trim() || void 0
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
//#endregion
|
|
13
|
-
export { resolveSignalRpcContext as t };
|
package/node_modules/ws/LICENSE
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>
|
|
2
|
-
Copyright (c) 2013 Arnout Kazemier and contributors
|
|
3
|
-
Copyright (c) 2016 Luigi Pinca and contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
-
the Software without restriction, including without limitation the rights to
|
|
8
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
-
subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|