@openclaw/imessage 2026.10.10-beta.4 → 2026.10.10
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-DacCvDBt.mjs → accounts-BH0coL46.mjs} +3 -6
- package/dist/.setup/{actions-CZHoxlpi.mjs → actions-CW7XYYF4.mjs} +10 -14
- package/dist/.setup/{actions.runtime-B-OHCffC.mjs → actions.runtime-B2ZHQ3TJ.mjs} +6 -9
- package/dist/.setup/{api-dHebtZYA.mjs → api-6xi-NBrt.mjs} +8 -9
- package/dist/.setup/{api-BifRABgX.mjs → api-B0ih8Iof.mjs} +9 -9
- package/dist/.setup/{approval-handler.runtime-jO19jL0F.mjs → approval-handler.runtime-BKmqba3L.mjs} +10 -11
- package/dist/.setup/{approval-reactions-DFgEJMz2.mjs → approval-reactions-B9CJS0NT.mjs} +9 -12
- package/dist/.setup/{channel-D-E9DvQL.mjs → channel-6kcKpSRw.mjs} +23 -32
- package/dist/.setup/{channel.runtime-Cx_lRd-J.mjs → channel.runtime-BW4A0m4h.mjs} +50 -82
- package/dist/.setup/{client-BEZ_gLk-.mjs → client-C3e7ZLqA.mjs} +15 -18
- package/dist/.setup/{config-schema-DXwa_3V5.mjs → config-schema-DRkdRC21.mjs} +2 -4
- package/dist/.setup/{conversation-bindings-DR-dbHjs.mjs → conversation-bindings-vZFn6sN2.mjs} +1 -2
- package/dist/.setup/{media-contract-BwWs5PM7.mjs → media-contract-CoixpXRX.mjs} +2 -3
- package/dist/.setup/{message-tool-api-B5NfPnFL.mjs → message-tool-api-CxSY_rh7.mjs} +5 -8
- package/dist/.setup/{outbound-send-deps-B-QEsLSM.mjs → outbound-send-deps-_da8jqeo.mjs} +1 -2
- package/dist/.setup/{question-reactions-BUSvdHlF.mjs → question-reactions-DTj-VH3N.mjs} +4 -5
- package/dist/.setup/{reaction-context-DbYCapmR.mjs → reaction-context-Bw00FkmU.mjs} +2 -3
- package/dist/.setup/{remote-file-vdoCnZze.mjs → remote-file-CCgMYZ-u.mjs} +6 -10
- package/dist/.setup/{rolldown-runtime-BBjsoOtd.mjs → rolldown-runtime-782esTHO.mjs} +1 -2
- package/dist/.setup/{runtime-Cza4CY5T.mjs → runtime-BRQCPuAD.mjs} +1 -2
- package/dist/.setup/{sanitize-outbound-BtEY324R.mjs → sanitize-outbound-C02fJrn6.mjs} +2 -4
- package/dist/.setup/{send-Jaf5eIJS.mjs → send-D98hQFdv.mjs} +14 -19
- package/dist/.setup/{setup-core-BHyLkAEJ.mjs → setup-core-BWnW0czE.mjs} +3 -4
- package/dist/.setup/{setup-surface-DPqiLGy0.mjs → setup-surface-aRZhAzzQ.mjs} +4 -6
- package/dist/.setup/{targets-B4oU7n-v.mjs → targets-CIx4BKqL.mjs} +3 -6
- package/dist/.source-module-urls/929c518fa2986b0f85f66bceefead22868db0ab452dee914dc6a2bb86b2e60ad.json +1 -1
- package/dist/api.js +9 -9
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/contract-api.js +1 -1
- package/dist/doctor-contract-api.js +7 -13
- package/dist/index.js +1 -2
- package/dist/media-contract-api.js +1 -1
- package/dist/message-tool-api.js +1 -1
- package/dist/runtime-api.js +2 -2
- package/dist/secret-contract-api.js +1 -2
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/setup-entry.js +2 -3
- package/dist/src/chat-db.worker.js +2 -3
- package/package.json +4 -4
|
@@ -8,7 +8,7 @@ import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
|
|
|
8
8
|
import os from "node:os";
|
|
9
9
|
import fs from "node:fs/promises";
|
|
10
10
|
import { normalizeScpRemoteHost } from "openclaw/plugin-sdk/host-runtime";
|
|
11
|
-
|
|
11
|
+
// extensions/imessage/src/cli-path.ts
|
|
12
12
|
const localCliPathCache = /* @__PURE__ */ new Map();
|
|
13
13
|
const MACH_O_MAGICS = /* @__PURE__ */ new Set([
|
|
14
14
|
"feedface",
|
|
@@ -101,8 +101,7 @@ function resolveLocalIMessageChatDbPath(params) {
|
|
|
101
101
|
const configured = params.dbPath?.trim();
|
|
102
102
|
return configured ? expandIMessageUserPath(configured) : defaultMessagesDbPath();
|
|
103
103
|
}
|
|
104
|
-
|
|
105
|
-
//#region extensions/imessage/src/remote-host.ts
|
|
104
|
+
// extensions/imessage/src/remote-host.ts
|
|
106
105
|
const ambiguousSshWrapper = Symbol("ambiguous-ssh-wrapper");
|
|
107
106
|
const detectedRemoteHosts = /* @__PURE__ */ new Map();
|
|
108
107
|
const remoteHostLookups = /* @__PURE__ */ new Map();
|
|
@@ -179,8 +178,7 @@ async function resolveIMessageRemoteHost(params) {
|
|
|
179
178
|
remoteHostLookups.set(key, lookup);
|
|
180
179
|
return await lookup;
|
|
181
180
|
}
|
|
182
|
-
|
|
183
|
-
//#region extensions/imessage/src/accounts.ts
|
|
181
|
+
// extensions/imessage/src/accounts.ts
|
|
184
182
|
const { listAccountIds, resolveDefaultAccountId, resolveAccountConfig: resolveMergedIMessageAccountConfig } = createAccountListHelpers("imessage", { implicitDefaultAccount: { channelKeys: ["cliPath", "dbPath"] } });
|
|
185
183
|
const listIMessageAccountIds = listAccountIds;
|
|
186
184
|
const resolveDefaultIMessageAccountId = resolveDefaultAccountId;
|
|
@@ -332,5 +330,4 @@ function collectIMessageDuplicateAccountSourceWarnings(params) {
|
|
|
332
330
|
}
|
|
333
331
|
return warnings;
|
|
334
332
|
}
|
|
335
|
-
//#endregion
|
|
336
333
|
export { resolveDefaultIMessageAccountId as a, getCachedIMessageRemoteHost as c, resolveIMessageChatDbLookupPath as d, resolveIMessageHomeDir as f, listIMessageAccountIds as i, resolveIMessageRemoteHost as l, hasExclusiveIMessageLocalDatabase as n, resolveIMessageAccount as o, resolveLocalIMessageChatDbPath as p, listEnabledIMessageAccounts as r, resolveIMessageDuplicateSourceOwner as s, collectIMessageDuplicateAccountSourceWarnings as t, expandIMessageUserPath as u };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as parseIMessageTarget } from "./targets-
|
|
2
|
-
import { l as resolveIMessageRemoteHost, n as hasExclusiveIMessageLocalDatabase, o as resolveIMessageAccount, u as expandIMessageUserPath } from "./accounts-
|
|
3
|
-
import { a as setCachedIMessagePrivateApiStatus, n as getCachedIMessagePrivateApiStatus, o as IMESSAGE_ACTIONS, r as imessageRpcSupportsMethod, s as IMESSAGE_ACTION_NAMES, t as describeIMessageMessageTool } from "./message-tool-api-
|
|
4
|
-
import { a as isIMessageCurrentMessageInChatAsync, i as findLatestIMessageEntryForChat, n as createIMessageRpcClient, s as rememberIMessageReplyCache, y as chatContextFromIMessageTarget } from "./client-
|
|
5
|
-
import { l as isAutoManagedIMessageCliPath, n as IMESSAGE_UPDATE_COMMAND, t as IMESSAGE_INSTALL_COMMAND } from "./setup-core-
|
|
1
|
+
import { c as parseIMessageTarget } from "./targets-CIx4BKqL.mjs";
|
|
2
|
+
import { l as resolveIMessageRemoteHost, n as hasExclusiveIMessageLocalDatabase, o as resolveIMessageAccount, u as expandIMessageUserPath } from "./accounts-BH0coL46.mjs";
|
|
3
|
+
import { a as setCachedIMessagePrivateApiStatus, n as getCachedIMessagePrivateApiStatus, o as IMESSAGE_ACTIONS, r as imessageRpcSupportsMethod, s as IMESSAGE_ACTION_NAMES, t as describeIMessageMessageTool } from "./message-tool-api-CxSY_rh7.mjs";
|
|
4
|
+
import { a as isIMessageCurrentMessageInChatAsync, i as findLatestIMessageEntryForChat, n as createIMessageRpcClient, s as rememberIMessageReplyCache, y as chatContextFromIMessageTarget } from "./client-C3e7ZLqA.mjs";
|
|
5
|
+
import { l as isAutoManagedIMessageCliPath, n as IMESSAGE_UPDATE_COMMAND, t as IMESSAGE_INSTALL_COMMAND } from "./setup-core-BWnW0czE.mjs";
|
|
6
6
|
import { filterStringEntries, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
|
8
8
|
import path from "node:path";
|
|
@@ -17,7 +17,7 @@ import { runCommandWithTimeout } from "openclaw/plugin-sdk/process-runtime";
|
|
|
17
17
|
import { captureRuntimeConfigAsyncReader } from "openclaw/plugin-sdk/runtime-config-snapshot";
|
|
18
18
|
import { detectBinary } from "openclaw/plugin-sdk/setup";
|
|
19
19
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
20
|
-
|
|
20
|
+
// extensions/imessage/src/message-action-reference.ts
|
|
21
21
|
async function resolveAuthorizedIMessageActionReference(params) {
|
|
22
22
|
const options = {
|
|
23
23
|
requireKnownShortId: true,
|
|
@@ -44,8 +44,7 @@ async function resolveAuthorizedIMessageActionReference(params) {
|
|
|
44
44
|
chatGuid
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
//#region extensions/imessage/src/message-guid.ts
|
|
47
|
+
// extensions/imessage/src/message-guid.ts
|
|
49
48
|
/** Strip the `p:<n>/` part prefix Messages puts on some GUIDs so keys match. */
|
|
50
49
|
function normalizeIMessageGuid(value) {
|
|
51
50
|
return value.trim().replace(/^p:\d+\//iu, "");
|
|
@@ -55,8 +54,7 @@ function normalizeIMessageMessageId(value) {
|
|
|
55
54
|
const id = value?.trim();
|
|
56
55
|
return id && id !== "ok" && id !== "unknown" ? id : void 0;
|
|
57
56
|
}
|
|
58
|
-
|
|
59
|
-
//#region extensions/imessage/src/probe.ts
|
|
57
|
+
// extensions/imessage/src/probe.ts
|
|
60
58
|
const RPC_SUPPORT_CACHE_TTL_MS = 3e5;
|
|
61
59
|
const PRIVATE_API_NEGATIVE_TTL_MS = 1e4;
|
|
62
60
|
const rpcSupportCache = /* @__PURE__ */ new Map();
|
|
@@ -258,9 +256,8 @@ async function probeIMessage(timeoutMs, opts = {}) {
|
|
|
258
256
|
await client.stop();
|
|
259
257
|
}
|
|
260
258
|
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
const loadIMessageActionsRuntime = createLazyRuntimeNamedExport(() => import("./actions.runtime-B-OHCffC.mjs"), "imessageActionsRuntime");
|
|
259
|
+
// extensions/imessage/src/actions.ts
|
|
260
|
+
const loadIMessageActionsRuntime = createLazyRuntimeNamedExport(() => import("./actions.runtime-B2ZHQ3TJ.mjs"), "imessageActionsRuntime");
|
|
264
261
|
const log = createSubsystemLogger("channels/imessage");
|
|
265
262
|
const providerId = "imessage";
|
|
266
263
|
const SUPPORTED_ACTIONS = /* @__PURE__ */ new Set([...IMESSAGE_ACTION_NAMES, "upload-file"]);
|
|
@@ -776,5 +773,4 @@ const imessageMessageActions = {
|
|
|
776
773
|
throw new Error(`Action ${action} is not supported for provider ${providerId}.`);
|
|
777
774
|
}
|
|
778
775
|
};
|
|
779
|
-
//#endregion
|
|
780
776
|
export { normalizeIMessageMessageId as a, normalizeIMessageGuid as i, probeIMessage as n, probeIMessagePrivateApi as r, imessageMessageActions as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as resolveIMessageMessageId, n as createIMessageRpcClient, r as runIMessageCliJsonCommand, x as normalizeDirectChatIdentifier } from "./client-
|
|
2
|
-
import { n as sanitizeIMessageFinalOutboundText } from "./sanitize-outbound-
|
|
3
|
-
import { n as authorizeIMessageResourceReference, t as withIMessageRemoteFile } from "./remote-file-
|
|
1
|
+
import { l as resolveIMessageMessageId, n as createIMessageRpcClient, r as runIMessageCliJsonCommand, x as normalizeDirectChatIdentifier } from "./client-C3e7ZLqA.mjs";
|
|
2
|
+
import { n as sanitizeIMessageFinalOutboundText } from "./sanitize-outbound-C02fJrn6.mjs";
|
|
3
|
+
import { n as authorizeIMessageResourceReference, t as withIMessageRemoteFile } from "./remote-file-CCgMYZ-u.mjs";
|
|
4
4
|
import { isRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { basename, parse, win32 } from "node:path";
|
|
6
6
|
import { parseStrictInteger } from "openclaw/plugin-sdk/number-runtime";
|
|
@@ -8,7 +8,7 @@ import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
|
8
8
|
import { captureChannelReadAuthority, captureEffectAuthority } from "openclaw/plugin-sdk/fetch-runtime";
|
|
9
9
|
import { sanitizeUntrustedFileName } from "openclaw/plugin-sdk/security-runtime";
|
|
10
10
|
import { resolvePreferredOpenClawTmpDir, withTempWorkspace } from "openclaw/plugin-sdk/temp-path";
|
|
11
|
-
|
|
11
|
+
// extensions/imessage/src/actions-chat-guid.ts
|
|
12
12
|
const CHAT_LIST_CACHE_TTL_MS = 3e4;
|
|
13
13
|
const chatListCache = /* @__PURE__ */ new Map();
|
|
14
14
|
function numberFromUnknown(value) {
|
|
@@ -50,8 +50,7 @@ async function resolveIMessageActionChatGuid(params) {
|
|
|
50
50
|
await client.stop();
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
|
|
54
|
-
//#region extensions/imessage/src/actions-transport.ts
|
|
53
|
+
// extensions/imessage/src/actions-transport.ts
|
|
55
54
|
var IMessageRemoteUnsupportedError = class extends Error {
|
|
56
55
|
constructor(message) {
|
|
57
56
|
super(message);
|
|
@@ -86,8 +85,7 @@ async function runIMessageAction(options, method, params, args) {
|
|
|
86
85
|
await client.stop();
|
|
87
86
|
}
|
|
88
87
|
}
|
|
89
|
-
|
|
90
|
-
//#region extensions/imessage/src/actions.runtime.ts
|
|
88
|
+
// extensions/imessage/src/actions.runtime.ts
|
|
91
89
|
/**
|
|
92
90
|
* Messages mints the option UUIDs, so the send response is the only place they
|
|
93
91
|
* appear before someone votes. Approval bindings key decisions off these ids
|
|
@@ -330,5 +328,4 @@ const imessageActionsRuntime = {
|
|
|
330
328
|
});
|
|
331
329
|
}
|
|
332
330
|
};
|
|
333
|
-
//#endregion
|
|
334
331
|
export { imessageActionsRuntime };
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import "./targets-
|
|
2
|
-
import "./accounts-
|
|
3
|
-
import "./message-tool-api-
|
|
4
|
-
import "./actions-
|
|
5
|
-
import { s as imessageSetupContract } from "./setup-core-
|
|
6
|
-
import { n as createIMessagePluginBase, r as imessageSetupWizard } from "./channel-
|
|
7
|
-
import "./conversation-bindings-
|
|
1
|
+
import "./targets-CIx4BKqL.mjs";
|
|
2
|
+
import "./accounts-BH0coL46.mjs";
|
|
3
|
+
import "./message-tool-api-CxSY_rh7.mjs";
|
|
4
|
+
import "./actions-CW7XYYF4.mjs";
|
|
5
|
+
import { s as imessageSetupContract } from "./setup-core-BWnW0czE.mjs";
|
|
6
|
+
import { n as createIMessagePluginBase, r as imessageSetupWizard } from "./channel-6kcKpSRw.mjs";
|
|
7
|
+
import "./conversation-bindings-vZFn6sN2.mjs";
|
|
8
8
|
import { createAllowedChatSenderMatcher as createAllowedChatSenderMatcher$1, parseChatAllowTargetPrefixes, parseChatTargetPrefixesOrThrow as parseChatTargetPrefixesOrThrow$1, resolveServicePrefixedAllowTarget, resolveServicePrefixedChatTarget as resolveServicePrefixedChatTarget$1, resolveServicePrefixedOrChatAllowTarget as resolveServicePrefixedOrChatAllowTarget$1, resolveServicePrefixedTarget } from "openclaw/plugin-sdk/channel-targets";
|
|
9
|
-
|
|
9
|
+
// extensions/imessage/src/channel.setup.ts
|
|
10
10
|
const imessageSetupPlugin = createIMessagePluginBase({
|
|
11
11
|
setupWizard: imessageSetupWizard,
|
|
12
12
|
setupContract: imessageSetupContract
|
|
13
13
|
});
|
|
14
|
-
//#endregion
|
|
15
14
|
export { resolveServicePrefixedChatTarget$1 as a, imessageSetupPlugin as c, resolveServicePrefixedAllowTarget as i, parseChatAllowTargetPrefixes as n, resolveServicePrefixedOrChatAllowTarget$1 as o, parseChatTargetPrefixesOrThrow$1 as r, resolveServicePrefixedTarget as s, createAllowedChatSenderMatcher$1 as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as looksLikeIMessageExplicitTargetId, c as parseIMessageTarget, d as normalizeIMessageMessagingTarget, i as isAllowedIMessageSender, n as inferIMessageTargetChatType, o as normalizeIMessageHandle, s as parseIMessageAllowTarget, t as formatIMessageChatTarget, u as looksLikeIMessageTargetId } from "./targets-
|
|
2
|
-
import { a as resolveDefaultIMessageAccountId, i as listIMessageAccountIds, o as resolveIMessageAccount, r as listEnabledIMessageAccounts } from "./accounts-
|
|
3
|
-
import { o as IMESSAGE_ACTIONS, s as IMESSAGE_ACTION_NAMES } from "./message-tool-api-
|
|
4
|
-
import { _ as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS } from "./client-
|
|
5
|
-
import { n as probeIMessage } from "./actions-
|
|
6
|
-
import { c as matchIMessageAcpConversation, i as resolveIMessageGroupRequireMention, l as normalizeIMessageAcpConversationId, o as resolveIMessageGroupToolPolicy, s as resolveIMessageInboundConversationId, t as imessagePlugin, u as resolveIMessageConversationIdFromTarget } from "./channel-
|
|
7
|
-
import { n as createIMessageConversationBindingManagerV2, t as createIMessageConversationBindingManager } from "./conversation-bindings-
|
|
8
|
-
import { a as resolveServicePrefixedChatTarget, c as imessageSetupPlugin, i as resolveServicePrefixedAllowTarget, n as parseChatAllowTargetPrefixes, o as resolveServicePrefixedOrChatAllowTarget, r as parseChatTargetPrefixesOrThrow, s as resolveServicePrefixedTarget, t as createAllowedChatSenderMatcher } from "./api-
|
|
9
|
-
import { t as IMESSAGE_LEGACY_OUTBOUND_SEND_DEP_KEYS } from "./outbound-send-deps-
|
|
1
|
+
import { a as looksLikeIMessageExplicitTargetId, c as parseIMessageTarget, d as normalizeIMessageMessagingTarget, i as isAllowedIMessageSender, n as inferIMessageTargetChatType, o as normalizeIMessageHandle, s as parseIMessageAllowTarget, t as formatIMessageChatTarget, u as looksLikeIMessageTargetId } from "./targets-CIx4BKqL.mjs";
|
|
2
|
+
import { a as resolveDefaultIMessageAccountId, i as listIMessageAccountIds, o as resolveIMessageAccount, r as listEnabledIMessageAccounts } from "./accounts-BH0coL46.mjs";
|
|
3
|
+
import { o as IMESSAGE_ACTIONS, s as IMESSAGE_ACTION_NAMES } from "./message-tool-api-CxSY_rh7.mjs";
|
|
4
|
+
import { _ as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS } from "./client-C3e7ZLqA.mjs";
|
|
5
|
+
import { n as probeIMessage } from "./actions-CW7XYYF4.mjs";
|
|
6
|
+
import { c as matchIMessageAcpConversation, i as resolveIMessageGroupRequireMention, l as normalizeIMessageAcpConversationId, o as resolveIMessageGroupToolPolicy, s as resolveIMessageInboundConversationId, t as imessagePlugin, u as resolveIMessageConversationIdFromTarget } from "./channel-6kcKpSRw.mjs";
|
|
7
|
+
import { n as createIMessageConversationBindingManagerV2, t as createIMessageConversationBindingManager } from "./conversation-bindings-vZFn6sN2.mjs";
|
|
8
|
+
import { a as resolveServicePrefixedChatTarget, c as imessageSetupPlugin, i as resolveServicePrefixedAllowTarget, n as parseChatAllowTargetPrefixes, o as resolveServicePrefixedOrChatAllowTarget, r as parseChatTargetPrefixesOrThrow, s as resolveServicePrefixedTarget, t as createAllowedChatSenderMatcher } from "./api-6xi-NBrt.mjs";
|
|
9
|
+
import { t as IMESSAGE_LEGACY_OUTBOUND_SEND_DEP_KEYS } from "./outbound-send-deps-_da8jqeo.mjs";
|
|
10
10
|
export { DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, IMESSAGE_ACTIONS, IMESSAGE_ACTION_NAMES, IMESSAGE_LEGACY_OUTBOUND_SEND_DEP_KEYS, createAllowedChatSenderMatcher, createIMessageConversationBindingManager, createIMessageConversationBindingManagerV2, formatIMessageChatTarget, imessagePlugin, imessageSetupPlugin, inferIMessageTargetChatType, isAllowedIMessageSender, listEnabledIMessageAccounts, listIMessageAccountIds, looksLikeIMessageExplicitTargetId, looksLikeIMessageTargetId, matchIMessageAcpConversation, normalizeIMessageAcpConversationId, normalizeIMessageHandle, normalizeIMessageMessagingTarget, parseChatAllowTargetPrefixes, parseChatTargetPrefixesOrThrow, parseIMessageAllowTarget, parseIMessageTarget, probeIMessage, resolveDefaultIMessageAccountId, resolveIMessageAccount, resolveIMessageConversationIdFromTarget, resolveIMessageGroupRequireMention, resolveIMessageGroupToolPolicy, resolveIMessageInboundConversationId, resolveServicePrefixedAllowTarget, resolveServicePrefixedChatTarget, resolveServicePrefixedOrChatAllowTarget, resolveServicePrefixedTarget };
|
package/dist/.setup/{approval-handler.runtime-jO19jL0F.mjs → approval-handler.runtime-BKmqba3L.mjs}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { c as parseIMessageTarget, d as normalizeIMessageMessagingTarget } from "./targets-
|
|
2
|
-
import { o as resolveIMessageAccount } from "./accounts-
|
|
3
|
-
import { n as getCachedIMessagePrivateApiStatus } from "./message-tool-api-
|
|
4
|
-
import { a as normalizeIMessageMessageId } from "./actions-
|
|
5
|
-
import { d as getIMessageApprovalApprovers } from "./channel-
|
|
6
|
-
import { i as extractMarkdownFormatRuns } from "./sanitize-outbound-
|
|
7
|
-
import { a as unregisterIMessageApprovalReactionTarget, c as buildIMessageApprovalConversationKeyForTarget, i as registerIMessageApprovalReactionTarget } from "./approval-reactions-
|
|
8
|
-
import { a as iMessageApprovalPollTargets, i as buildApprovalPollOptions, o as mapSentPollOptionsToDecisions, t as sendMessageIMessage } from "./send-
|
|
1
|
+
import { c as parseIMessageTarget, d as normalizeIMessageMessagingTarget } from "./targets-CIx4BKqL.mjs";
|
|
2
|
+
import { o as resolveIMessageAccount } from "./accounts-BH0coL46.mjs";
|
|
3
|
+
import { n as getCachedIMessagePrivateApiStatus } from "./message-tool-api-CxSY_rh7.mjs";
|
|
4
|
+
import { a as normalizeIMessageMessageId } from "./actions-CW7XYYF4.mjs";
|
|
5
|
+
import { d as getIMessageApprovalApprovers } from "./channel-6kcKpSRw.mjs";
|
|
6
|
+
import { i as extractMarkdownFormatRuns } from "./sanitize-outbound-C02fJrn6.mjs";
|
|
7
|
+
import { a as unregisterIMessageApprovalReactionTarget, c as buildIMessageApprovalConversationKeyForTarget, i as registerIMessageApprovalReactionTarget } from "./approval-reactions-B9CJS0NT.mjs";
|
|
8
|
+
import { a as iMessageApprovalPollTargets, i as buildApprovalPollOptions, o as mapSentPollOptionsToDecisions, t as sendMessageIMessage } from "./send-D98hQFdv.mjs";
|
|
9
9
|
import { createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
|
10
10
|
import { createActionGate } from "openclaw/plugin-sdk/channel-actions";
|
|
11
11
|
import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
|
|
@@ -13,9 +13,9 @@ import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approva
|
|
|
13
13
|
import { buildApprovalNativeControlsPromptText, buildApprovalReactionPendingContent } from "openclaw/plugin-sdk/approval-reaction-runtime";
|
|
14
14
|
import { setTimeout } from "node:timers/promises";
|
|
15
15
|
import { buildChannelApprovalExpiredText, buildChannelApprovalResolvedText, createChannelApprovalNativeRuntimeAdapterAsync, resolvePreparedApprovalAccountId } from "openclaw/plugin-sdk/approval-handler-runtime";
|
|
16
|
-
|
|
16
|
+
// extensions/imessage/src/approval-handler.runtime.ts
|
|
17
17
|
const log = createSubsystemLogger("imessage/approvals");
|
|
18
|
-
const loadIMessageActionsRuntime = createLazyRuntimeNamedExport(() => import("./actions.runtime-
|
|
18
|
+
const loadIMessageActionsRuntime = createLazyRuntimeNamedExport(() => import("./actions.runtime-B2ZHQ3TJ.mjs"), "imessageActionsRuntime");
|
|
19
19
|
const DEFAULT_PROBE_TIMEOUT_MS = 5e3;
|
|
20
20
|
const APPROVAL_POLL_ORDERING_DELAY_MS = 1100;
|
|
21
21
|
function classifyIMessageApprovalTargetTransport(params) {
|
|
@@ -363,5 +363,4 @@ const imessageApprovalNativeRuntime = createChannelApprovalNativeRuntimeAdapterA
|
|
|
363
363
|
log.error(`imessage approvals: failed to send request ${request.id}: ${String(error)}`);
|
|
364
364
|
} }
|
|
365
365
|
});
|
|
366
|
-
//#endregion
|
|
367
366
|
export { imessageApprovalNativeRuntime };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { c as parseIMessageTarget, o as normalizeIMessageHandle } from "./targets-
|
|
3
|
-
import { i as normalizeIMessageGuid } from "./actions-
|
|
4
|
-
import { n as getOptionalIMessageRuntime } from "./runtime-
|
|
5
|
-
import { d as getIMessageApprovalApprovers, f as imessageApprovalAuth } from "./channel-
|
|
6
|
-
import { t as resolveIMessageReactionContext } from "./reaction-context-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-782esTHO.mjs";
|
|
2
|
+
import { c as parseIMessageTarget, o as normalizeIMessageHandle } from "./targets-CIx4BKqL.mjs";
|
|
3
|
+
import { i as normalizeIMessageGuid } from "./actions-CW7XYYF4.mjs";
|
|
4
|
+
import { n as getOptionalIMessageRuntime } from "./runtime-BRQCPuAD.mjs";
|
|
5
|
+
import { d as getIMessageApprovalApprovers, f as imessageApprovalAuth } from "./channel-6kcKpSRw.mjs";
|
|
6
|
+
import { t as resolveIMessageReactionContext } from "./reaction-context-Bw00FkmU.mjs";
|
|
7
7
|
import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { createLazyRuntimeSurface } from "openclaw/plugin-sdk/lazy-runtime";
|
|
9
9
|
import { asDateTimestampMs, isFutureDateTimestampMs, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
|
|
10
10
|
import { addApprovalReactionHintToText, approvalReactionDecisionSetsMatch, buildApprovalReactionDeliveredBindingMarker, buildApprovalReactionHint, createApprovalReactionTargetStore, listApprovalReactionBindings, normalizeApprovalReactionDecision, readApprovalReactionDecisionList, readApprovalReactionDeliveredBinding, readApprovalReactionPresentationBinding, readApprovalReactionTargetRecord, resolveTypedApprovalReactionTarget, settleApprovalReaction } from "openclaw/plugin-sdk/approval-reaction-runtime";
|
|
11
11
|
import { createPluginStateErrorReporter } from "openclaw/plugin-sdk/plugin-state-runtime";
|
|
12
|
-
|
|
12
|
+
// extensions/imessage/src/approval-target-keys.ts
|
|
13
13
|
function chatIdToKeyValue(chatId) {
|
|
14
14
|
if (chatId == null || chatId === "") return null;
|
|
15
15
|
if (typeof chatId === "number") return Number.isFinite(chatId) && chatId > 0 ? String(chatId) : null;
|
|
@@ -69,8 +69,7 @@ function resolveIMessageApprovalControlActor(message) {
|
|
|
69
69
|
const destination = normalizeIMessageHandle(message.destination_caller_id ?? "");
|
|
70
70
|
return (message.is_from_me !== true && Boolean(sender) && sender === destination ? "" : sender) || (message.is_from_me === true ? destination : "");
|
|
71
71
|
}
|
|
72
|
-
|
|
73
|
-
//#region extensions/imessage/src/approval-reaction-poll-targets.ts
|
|
72
|
+
// extensions/imessage/src/approval-reaction-poll-targets.ts
|
|
74
73
|
const PERSISTENT_POLL_TARGET_NAMESPACE = "imessage.approval-reaction-poll-targets";
|
|
75
74
|
const PERSISTENT_MAX_ENTRIES$1 = 1e3;
|
|
76
75
|
const DEFAULT_REACTION_TARGET_TTL_MS$1 = 864e5;
|
|
@@ -210,8 +209,7 @@ function clearIMessageApprovalReactionPollTargetsForTest() {
|
|
|
210
209
|
pendingReactionPollTargets.clear();
|
|
211
210
|
pendingReactionPollTargetStore = void 0;
|
|
212
211
|
}
|
|
213
|
-
|
|
214
|
-
//#region extensions/imessage/src/approval-reactions.ts
|
|
212
|
+
// extensions/imessage/src/approval-reactions.ts
|
|
215
213
|
var approval_reactions_exports = /* @__PURE__ */ __exportAll({
|
|
216
214
|
addIMessageApprovalReactionHintToStructuredPayload: () => addIMessageApprovalReactionHintToStructuredPayload,
|
|
217
215
|
buildIMessageApprovalConversationKeyForTarget: () => buildIMessageApprovalConversationKeyForTarget,
|
|
@@ -509,5 +507,4 @@ function clearIMessageApprovalReactionTargetsForTest() {
|
|
|
509
507
|
clearIMessageApprovalReactionPollTargetsForTest();
|
|
510
508
|
loadResolveApprovalOverGateway.clear();
|
|
511
509
|
}
|
|
512
|
-
//#endregion
|
|
513
510
|
export { unregisterIMessageApprovalReactionTarget as a, buildIMessageApprovalConversationKeyForTarget as c, resolveIMessageApprovalControlActor as d, registerIMessageApprovalReactionTarget as i, enumerateApprovalTargetKeys as l, handleIMessageApprovalReaction as n, listPendingIMessageApprovalReactionPollTargets as o, maybeResolveIMessageApprovalReaction as r, buildIMessageApprovalConversationKeyForInbound as s, approval_reactions_exports as t, normalizeConversationKey as u };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { a as looksLikeIMessageExplicitTargetId, c as parseIMessageTarget, d as normalizeIMessageMessagingTarget, f as isIMessagePhoneLikeHandle, n as inferIMessageTargetChatType, o as normalizeIMessageHandle } from "./targets-
|
|
2
|
-
import { a as resolveDefaultIMessageAccountId, i as listIMessageAccountIds, o as resolveIMessageAccount, t as collectIMessageDuplicateAccountSourceWarnings } from "./accounts-
|
|
3
|
-
import { S as resolveIMessageDirectChatService } from "./client-
|
|
4
|
-
import { t as imessageMessageActions } from "./actions-
|
|
5
|
-
import { i as createIMessageSetupWizardProxy, s as imessageSetupContract } from "./setup-core-
|
|
6
|
-
import { n as createIMessageConversationBindingManagerV2 } from "./conversation-bindings-
|
|
7
|
-
import { n as sanitizeIMessageFinalOutboundText, r as sanitizeOutboundText } from "./sanitize-outbound-
|
|
8
|
-
import { t as IMessageChannelConfigSchema } from "./config-schema-
|
|
9
|
-
import { n as resolveIMessageAttachmentRoots, r as resolveIMessageRemoteAttachmentRoots } from "./media-contract-
|
|
1
|
+
import { a as looksLikeIMessageExplicitTargetId, c as parseIMessageTarget, d as normalizeIMessageMessagingTarget, f as isIMessagePhoneLikeHandle, n as inferIMessageTargetChatType, o as normalizeIMessageHandle } from "./targets-CIx4BKqL.mjs";
|
|
2
|
+
import { a as resolveDefaultIMessageAccountId, i as listIMessageAccountIds, o as resolveIMessageAccount, t as collectIMessageDuplicateAccountSourceWarnings } from "./accounts-BH0coL46.mjs";
|
|
3
|
+
import { S as resolveIMessageDirectChatService } from "./client-C3e7ZLqA.mjs";
|
|
4
|
+
import { t as imessageMessageActions } from "./actions-CW7XYYF4.mjs";
|
|
5
|
+
import { i as createIMessageSetupWizardProxy, s as imessageSetupContract } from "./setup-core-BWnW0czE.mjs";
|
|
6
|
+
import { n as createIMessageConversationBindingManagerV2 } from "./conversation-bindings-vZFn6sN2.mjs";
|
|
7
|
+
import { n as sanitizeIMessageFinalOutboundText, r as sanitizeOutboundText } from "./sanitize-outbound-C02fJrn6.mjs";
|
|
8
|
+
import { t as IMessageChannelConfigSchema } from "./config-schema-DRkdRC21.mjs";
|
|
9
|
+
import { n as resolveIMessageAttachmentRoots, r as resolveIMessageRemoteAttachmentRoots } from "./media-contract-CoixpXRX.mjs";
|
|
10
10
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
11
11
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
12
12
|
import { buildDmGroupAccountAllowlistAdapter } from "openclaw/plugin-sdk/allowlist-config-edit";
|
|
@@ -30,7 +30,7 @@ import { getExecApprovalReplyMetadata, resolveExecApprovalCommandDisplay, resolv
|
|
|
30
30
|
import { createChannelApprovalAuth } from "openclaw/plugin-sdk/approval-auth-runtime";
|
|
31
31
|
import { buildChannelGroupsScopeTree, createRestrictSendersChannelSecurity, resolveScopeRequireMention, resolveScopeToolsPolicy } from "openclaw/plugin-sdk/channel-policy";
|
|
32
32
|
import { createChannelPluginBase, getChatChannelMeta } from "openclaw/plugin-sdk/core";
|
|
33
|
-
|
|
33
|
+
// extensions/imessage/src/approval-auth.ts
|
|
34
34
|
function normalizeIMessageApproverId(value) {
|
|
35
35
|
const normalized = normalizeIMessageHandle(String(value));
|
|
36
36
|
if (!normalized || normalized.startsWith("chat_id:") || normalized.startsWith("chat_guid:") || normalized.startsWith("chat_identifier:")) return;
|
|
@@ -53,13 +53,11 @@ const imessageApproval$1 = createChannelApprovalAuth({
|
|
|
53
53
|
});
|
|
54
54
|
const getIMessageApprovalApprovers = imessageApproval$1.resolveApprovers;
|
|
55
55
|
const imessageApprovalAuth = imessageApproval$1.approvalAuth;
|
|
56
|
-
|
|
57
|
-
//#region extensions/imessage/src/approval-text.ts
|
|
56
|
+
// extensions/imessage/src/approval-text.ts
|
|
58
57
|
function replaceApprovalIdPlaceholder(text, approvalId) {
|
|
59
58
|
return (text ?? "").replace(/\/approve\s+<id>/g, () => `/approve ${approvalId}`);
|
|
60
59
|
}
|
|
61
|
-
|
|
62
|
-
//#region extensions/imessage/src/approval-native.ts
|
|
60
|
+
// extensions/imessage/src/approval-native.ts
|
|
63
61
|
const DEFAULT_PLUGIN_APPROVAL_DECISIONS = [
|
|
64
62
|
"allow-once",
|
|
65
63
|
"allow-always",
|
|
@@ -118,7 +116,7 @@ const imessageApproval = createApproverRestrictedNativeApprovalCapabilityFromFor
|
|
|
118
116
|
approvalKind,
|
|
119
117
|
request
|
|
120
118
|
}),
|
|
121
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
119
|
+
load: async () => (await import("./approval-handler.runtime-BKmqba3L.mjs")).imessageApprovalNativeRuntime
|
|
122
120
|
})
|
|
123
121
|
});
|
|
124
122
|
const imessageApprovalRouting = imessageApproval.routing;
|
|
@@ -217,8 +215,7 @@ function buildIMessagePluginPendingPayload(params) {
|
|
|
217
215
|
};
|
|
218
216
|
}
|
|
219
217
|
const imessageApprovalCapability = imessageApproval.capability;
|
|
220
|
-
|
|
221
|
-
//#region extensions/imessage/src/conversation-id-core.ts
|
|
218
|
+
// extensions/imessage/src/conversation-id-core.ts
|
|
222
219
|
function normalizeIMessageAcpConversationId(conversationId) {
|
|
223
220
|
const trimmed = conversationId.trim();
|
|
224
221
|
if (!trimmed) return null;
|
|
@@ -249,20 +246,17 @@ function matchIMessageAcpConversation(params) {
|
|
|
249
246
|
function resolveIMessageConversationIdFromTarget(target) {
|
|
250
247
|
return normalizeIMessageAcpConversationId(target)?.conversationId;
|
|
251
248
|
}
|
|
252
|
-
|
|
253
|
-
//#region extensions/imessage/src/conversation-id.ts
|
|
249
|
+
// extensions/imessage/src/conversation-id.ts
|
|
254
250
|
function resolveIMessageInboundConversationId(params) {
|
|
255
251
|
if (params.isGroup) return params.chatId != null && Number.isFinite(params.chatId) ? String(params.chatId) : void 0;
|
|
256
252
|
return normalizeIMessageHandle(params.sender) || void 0;
|
|
257
253
|
}
|
|
258
|
-
|
|
259
|
-
//#region extensions/imessage/src/doctor.ts
|
|
254
|
+
// extensions/imessage/src/doctor.ts
|
|
260
255
|
const imessageDoctor = {
|
|
261
256
|
groupAllowFromFallbackToAllowFrom: false,
|
|
262
257
|
collectPreviewWarnings: ({ cfg }) => collectIMessageDuplicateAccountSourceWarnings({ cfg })
|
|
263
258
|
};
|
|
264
|
-
|
|
265
|
-
//#region extensions/imessage/src/group-policy.ts
|
|
259
|
+
// extensions/imessage/src/group-policy.ts
|
|
266
260
|
function resolveScopePath(params) {
|
|
267
261
|
return params.groupId ? [params.groupId] : [];
|
|
268
262
|
}
|
|
@@ -284,10 +278,9 @@ function resolveIMessageGroupSystemPrompt(params) {
|
|
|
284
278
|
const prompt = params.groupConfig?.systemPrompt ?? params.defaultConfig?.systemPrompt;
|
|
285
279
|
return typeof prompt === "string" ? prompt.trim() || void 0 : void 0;
|
|
286
280
|
}
|
|
287
|
-
|
|
288
|
-
//#region extensions/imessage/src/shared.ts
|
|
281
|
+
// extensions/imessage/src/shared.ts
|
|
289
282
|
const IMESSAGE_CHANNEL = "imessage";
|
|
290
|
-
const imessageSetupWizard = createIMessageSetupWizardProxy(async () => (await import("./setup-surface-
|
|
283
|
+
const imessageSetupWizard = createIMessageSetupWizardProxy(async () => (await import("./setup-surface-aRZhAzzQ.mjs")).imessageSetupWizard);
|
|
291
284
|
const imessageConfigAdapter = createScopedChannelConfigAdapter({
|
|
292
285
|
sectionKey: IMESSAGE_CHANNEL,
|
|
293
286
|
listAccountIds: listIMessageAccountIds,
|
|
@@ -369,9 +362,8 @@ function createIMessagePluginBase(params) {
|
|
|
369
362
|
}
|
|
370
363
|
};
|
|
371
364
|
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
const loadIMessageChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-Cx_lRd-J.mjs"));
|
|
365
|
+
// extensions/imessage/src/channel.ts
|
|
366
|
+
const loadIMessageChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-BW4A0m4h.mjs"));
|
|
375
367
|
async function sendIMessageOutbound(ctx, kind, options = {}) {
|
|
376
368
|
return await (await loadIMessageChannelRuntime()).sendIMessageOutbound({
|
|
377
369
|
cfg: ctx.cfg,
|
|
@@ -407,8 +399,8 @@ function toIMessageMessageSendResult(result, kind, replyToId) {
|
|
|
407
399
|
...result.meta && Object.keys(result.meta).length > 0 ? { meta: result.meta } : {}
|
|
408
400
|
};
|
|
409
401
|
}
|
|
410
|
-
const loadIMessageApprovalReactionsModule = createLazyRuntimeModule(() => import("./approval-reactions-
|
|
411
|
-
const loadIMessageQuestionReactionsModule = createLazyRuntimeModule(() => import("./question-reactions-
|
|
402
|
+
const loadIMessageApprovalReactionsModule = createLazyRuntimeModule(() => import("./approval-reactions-B9CJS0NT.mjs").then((n) => n.t));
|
|
403
|
+
const loadIMessageQuestionReactionsModule = createLazyRuntimeModule(() => import("./question-reactions-DTj-VH3N.mjs").then((n) => n.r));
|
|
412
404
|
const imessageMessageAdapter = defineChannelMessageAdapter({
|
|
413
405
|
id: "imessage",
|
|
414
406
|
durableFinal: { capabilities: {
|
|
@@ -675,5 +667,4 @@ const imessagePlugin = createChatChannelPlugin({
|
|
|
675
667
|
}
|
|
676
668
|
}
|
|
677
669
|
});
|
|
678
|
-
//#endregion
|
|
679
670
|
export { resolveIMessageGroupSystemPrompt as a, matchIMessageAcpConversation as c, getIMessageApprovalApprovers as d, imessageApprovalAuth as f, resolveIMessageGroupRequireMention as i, normalizeIMessageAcpConversationId as l, createIMessagePluginBase as n, resolveIMessageGroupToolPolicy as o, imessageSetupWizard as r, resolveIMessageInboundConversationId as s, imessagePlugin as t, resolveIMessageConversationIdFromTarget as u };
|