@openclaw/imessage 2026.8.1-beta.3 → 2026.9.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{accounts-D00Njxg2.js → accounts-DIpGOIiN.js} +2 -2
- package/dist/{actions.runtime-B_xJiBXF.js → actions.runtime-BhggncbG.js} +2 -2
- package/dist/api.js +6 -5
- package/dist/{approval-handler.runtime-BKku8aUf.js → approval-handler.runtime-BC-YsgAf.js} +7 -7
- package/dist/{approval-reactions-BME5eA6T.js → approval-reactions-Cvwmdlev.js} +3 -3
- package/dist/{channel-BFQTpvrG.js → channel-CnKQ2MVB.js} +16 -14
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-BjkXwX9_.js → channel.runtime-BQLCh7bE.js} +6 -4
- package/dist/contract-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{group-policy-Ca3c5KES.js → group-policy-BipELT2x.js} +11 -15
- package/dist/{media-contract-BEgdvYhW.js → media-contract-BVXuQHG2.js} +1 -1
- package/dist/media-contract-api.js +1 -1
- package/dist/{message-tool-api-TZiNYA17.js → message-tool-api-BwIxJDoz.js} +3 -3
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-Uv5RaRTk.js → monitor-DRD_Dnp9.js} +18 -20
- package/dist/{question-reactions-to0i8vxE.js → question-reactions-viP7ZcyG.js} +1 -1
- package/dist/{reaction-context-DaNrZqYo.js → reaction-context-BAYI7pz0.js} +2 -2
- package/dist/{remote-file-CDuk0joc.js → remote-file-CyTTuRAt.js} +1 -1
- package/dist/runtime-api.js +8 -7
- package/dist/{sanitize-outbound-DaLmdkbf.js → sanitize-outbound-g651fIhi.js} +1 -1
- package/dist/{send-Dake4Awx.js → send-DVQY6M5M.js} +7 -7
- package/node_modules/typebox/build/format/date.d.mts +1 -1
- package/node_modules/typebox/build/format/date.mjs +1 -1
- package/node_modules/typebox/build/format/date_time.d.mts +2 -2
- package/node_modules/typebox/build/format/date_time.mjs +3 -3
- package/node_modules/typebox/build/format/email.d.mts +1 -1
- package/node_modules/typebox/build/format/email.mjs +2 -2
- package/node_modules/typebox/build/format/hostname.mjs +2 -10
- package/node_modules/typebox/build/format/idn_email.d.mts +1 -1
- package/node_modules/typebox/build/format/idn_email.mjs +3 -3
- package/node_modules/typebox/build/format/idn_hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idn_hostname.mjs +3 -11
- package/node_modules/typebox/build/format/idna/format/bidi.d.mts +3 -0
- package/node_modules/typebox/build/format/idna/format/bidi.mjs +98 -0
- package/node_modules/typebox/build/format/idna/format/puny.d.mts +3 -0
- package/node_modules/typebox/build/format/idna/format/puny.mjs +144 -0
- package/node_modules/typebox/build/format/idna/hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/hostname.mjs +16 -0
- package/node_modules/typebox/build/format/idna/idn-hostname.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +23 -0
- package/node_modules/typebox/build/format/idna/index.d.mts +2 -0
- package/node_modules/typebox/build/format/idna/index.mjs +2 -0
- package/node_modules/typebox/build/format/idna/label/ascii.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/ascii.mjs +9 -0
- package/node_modules/typebox/build/format/idna/label/puny.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/puny.mjs +28 -0
- package/node_modules/typebox/build/format/idna/label/unicode.d.mts +1 -0
- package/node_modules/typebox/build/format/idna/label/unicode.mjs +106 -0
- package/node_modules/typebox/build/format/idna/pattern/pattern.d.mts +30 -0
- package/node_modules/typebox/build/format/idna/pattern/pattern.mjs +70 -0
- package/node_modules/typebox/build/format/ipv4.d.mts +0 -1
- package/node_modules/typebox/build/format/ipv4.mjs +2 -32
- package/node_modules/typebox/build/format/ipv6.mjs +2 -61
- package/node_modules/typebox/build/format/iri.d.mts +2 -2
- package/node_modules/typebox/build/format/iri.mjs +26 -8
- package/node_modules/typebox/build/format/iri_reference.d.mts +2 -2
- package/node_modules/typebox/build/format/iri_reference.mjs +9 -55
- package/node_modules/typebox/build/format/regex.d.mts +1 -2
- package/node_modules/typebox/build/format/regex.mjs +2 -6
- package/node_modules/typebox/build/format/time.d.mts +2 -2
- package/node_modules/typebox/build/format/time.mjs +19 -14
- package/node_modules/typebox/build/format/uri.d.mts +1 -1
- package/node_modules/typebox/build/format/uri.mjs +3 -130
- package/node_modules/typebox/build/format/uri_reference.d.mts +1 -1
- package/node_modules/typebox/build/format/uri_reference.mjs +2 -3
- package/node_modules/typebox/build/format/uri_template.d.mts +2 -3
- package/node_modules/typebox/build/format/uri_template.mjs +4 -5
- package/node_modules/typebox/build/format/url.d.mts +3 -3
- package/node_modules/typebox/build/format/url.mjs +4 -5
- package/node_modules/typebox/build/guard/emit.d.mts +3 -1
- package/node_modules/typebox/build/guard/emit.mjs +12 -5
- package/node_modules/typebox/build/guard/guard.d.mts +8 -2
- package/node_modules/typebox/build/guard/guard.mjs +25 -4
- package/node_modules/typebox/build/guard/string.d.mts +2 -2
- package/node_modules/typebox/build/guard/string.mjs +7 -7
- package/node_modules/typebox/build/schema/engine/_context.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -2
- package/node_modules/typebox/build/schema/engine/_regexp.d.mts +2 -0
- package/node_modules/typebox/build/schema/engine/_regexp.mjs +4 -0
- package/node_modules/typebox/build/schema/engine/_stack.mjs +12 -13
- package/node_modules/typebox/build/schema/engine/additionalItems.mjs +17 -7
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +4 -3
- package/node_modules/typebox/build/schema/engine/contains.mjs +18 -6
- package/node_modules/typebox/build/schema/engine/enum.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/items.mjs +26 -6
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/minContains.mjs +14 -4
- package/node_modules/typebox/build/schema/engine/not.mjs +4 -2
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +7 -6
- package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -2
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +4 -3
- package/node_modules/typebox/build/schema/engine/ref.mjs +1 -7
- package/node_modules/typebox/build/schema/engine/schema.mjs +13 -4
- package/node_modules/typebox/build/schema/engine/type.mjs +1 -1
- package/node_modules/typebox/build/schema/resolve/resolve.d.mts +4 -1
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +202 -1
- package/node_modules/typebox/build/schema/static/propertyNames.d.mts +5 -0
- package/node_modules/typebox/build/schema/static/propertyNames.mjs +3 -0
- package/node_modules/typebox/build/schema/static/schema.d.mts +3 -0
- package/node_modules/typebox/build/schema/types/index.d.mts +0 -2
- package/node_modules/typebox/build/schema/types/index.mjs +0 -2
- package/node_modules/typebox/build/system/memory/clone.mjs +14 -11
- package/node_modules/typebox/build/system/memory/discard.mjs +6 -5
- package/node_modules/typebox/build/system/settings/settings.d.mts +9 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +2 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.d.mts +6 -1
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +16 -3
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +34 -4
- package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +5 -5
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +20 -26
- package/node_modules/typebox/build/type/engine/evaluate/compare.d.mts +6 -10
- package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +9 -13
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +7 -4
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +12 -19
- package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +4 -20
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +8 -20
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +4 -4
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +11 -8
- package/node_modules/typebox/build/type/engine/evaluate/flatten.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +3 -4
- package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +17 -2
- package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +26 -6
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +3 -4
- package/node_modules/typebox/build/type/engine/extract/operation.d.mts +1 -1
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +3 -4
- package/node_modules/typebox/build/type/engine/priority/priority.d.mts +2 -2
- package/node_modules/typebox/build/type/engine/priority/priority.mjs +3 -4
- package/node_modules/typebox/build/type/script/mapping.d.mts +32 -29
- package/node_modules/typebox/build/type/script/mapping.mjs +18 -25
- package/node_modules/typebox/build/type/script/parser.d.mts +19 -25
- package/node_modules/typebox/build/type/script/parser.mjs +27 -23
- package/node_modules/typebox/build/value/errors/errors.d.mts +2 -2
- package/node_modules/typebox/build/value/errors/errors.mjs +1 -1
- package/node_modules/typebox/package.json +27 -27
- package/node_modules/typebox/readme.md +79 -82
- package/package.json +5 -5
- package/node_modules/typebox/build/format/_idna.d.mts +0 -2
- package/node_modules/typebox/build/format/_idna.mjs +0 -246
- package/node_modules/typebox/build/format/_puny.d.mts +0 -1
- package/node_modules/typebox/build/format/_puny.mjs +0 -77
- package/node_modules/typebox/build/schema/resolve/ref.d.mts +0 -3
- package/node_modules/typebox/build/schema/resolve/ref.mjs +0 -146
- package/node_modules/typebox/build/schema/types/contentEncoding.d.mts +0 -9
- package/node_modules/typebox/build/schema/types/contentEncoding.mjs +0 -13
- package/node_modules/typebox/build/schema/types/contentMediaType.d.mts +0 -9
- package/node_modules/typebox/build/schema/types/contentMediaType.mjs +0 -13
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
1
2
|
import { resolveAccountEntry } from "openclaw/plugin-sdk/routing";
|
|
2
3
|
import { accessSync, constants, readFileSync, realpathSync, statSync } from "node:fs";
|
|
3
4
|
import path from "node:path";
|
|
4
5
|
import { createAccountListHelpers } from "openclaw/plugin-sdk/account-helpers";
|
|
5
|
-
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
6
6
|
import { normalizeAccountId as normalizeAccountId$1 } from "openclaw/plugin-sdk/account-resolution";
|
|
7
7
|
import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
|
|
8
8
|
import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -35,7 +35,7 @@ function resolveIMessageHomeDir() {
|
|
|
35
35
|
function expandIMessageUserPath(value) {
|
|
36
36
|
if (!value.startsWith("~")) return value;
|
|
37
37
|
const home = resolveIMessageHomeDir();
|
|
38
|
-
return home ? value.replace(/^~(?=$|[\\/])/, home) : value;
|
|
38
|
+
return home ? value.replace(/^~(?=$|[\\/])/, () => home) : value;
|
|
39
39
|
}
|
|
40
40
|
function resolveIMessageExecutable(cliPath) {
|
|
41
41
|
const expanded = expandIMessageUserPath(cliPath);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as normalizeDirectChatIdentifier, u as resolveIMessageMessageId } from "./monitor-reply-cache-BdeUQaHO.js";
|
|
2
|
-
import { n as sanitizeIMessageFinalOutboundText, o as createIMessageRpcClient } from "./sanitize-outbound-
|
|
3
|
-
import { i as runIMessageCliJsonCommand, n as authorizeIMessageResourceReference, t as withIMessageRemoteFile } from "./remote-file-
|
|
2
|
+
import { n as sanitizeIMessageFinalOutboundText, o as createIMessageRpcClient } from "./sanitize-outbound-g651fIhi.js";
|
|
3
|
+
import { i as runIMessageCliJsonCommand, n as authorizeIMessageResourceReference, t as withIMessageRemoteFile } from "./remote-file-CyTTuRAt.js";
|
|
4
4
|
import { basename, parse, win32 } from "node:path";
|
|
5
5
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { asDateTimestampMs, parseStrictInteger, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
|
package/dist/api.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { a as resolveDefaultIMessageAccountId, i as listIMessageAccountIds, o as resolveIMessageAccount, r as listEnabledIMessageAccounts } from "./accounts-
|
|
2
|
-
import {
|
|
3
|
-
import { s as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS } from "./sanitize-outbound-
|
|
4
|
-
import {
|
|
5
|
-
import { n as createIMessagePluginBase, r as imessageSetupWizard, t as imessagePlugin } from "./channel-
|
|
1
|
+
import { a as resolveDefaultIMessageAccountId, i as listIMessageAccountIds, o as resolveIMessageAccount, r as listEnabledIMessageAccounts } from "./accounts-DIpGOIiN.js";
|
|
2
|
+
import { a as isAllowedIMessageSender, c as parseIMessageAllowTarget, g as IMESSAGE_ACTION_NAMES, h as IMESSAGE_ACTIONS, l as parseIMessageTarget, n as formatIMessageChatTarget, o as looksLikeIMessageExplicitTargetId, r as inferIMessageTargetChatType, s as normalizeIMessageHandle } from "./message-tool-api-BwIxJDoz.js";
|
|
3
|
+
import { s as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS } from "./sanitize-outbound-g651fIhi.js";
|
|
4
|
+
import { a as normalizeIMessageAcpConversationId, c as normalizeIMessageMessagingTarget, f as probeIMessage, i as matchIMessageAcpConversation, n as resolveIMessageGroupToolPolicy, o as resolveIMessageConversationIdFromTarget, r as resolveIMessageInboundConversationId, s as looksLikeIMessageTargetId, t as resolveIMessageGroupRequireMention, v as imessageSetupContract } from "./group-policy-BipELT2x.js";
|
|
5
|
+
import { n as createIMessagePluginBase, r as imessageSetupWizard, t as imessagePlugin } from "./channel-CnKQ2MVB.js";
|
|
6
6
|
import { t as createIMessageConversationBindingManager } from "./conversation-bindings-GDQ_Laxj.js";
|
|
7
7
|
import { t as IMESSAGE_LEGACY_OUTBOUND_SEND_DEP_KEYS } from "./outbound-send-deps-B-QEsLSM.js";
|
|
8
|
+
import { createAllowedChatSenderMatcher, parseChatAllowTargetPrefixes, parseChatTargetPrefixesOrThrow, resolveServicePrefixedAllowTarget, resolveServicePrefixedChatTarget, resolveServicePrefixedOrChatAllowTarget, resolveServicePrefixedTarget } from "openclaw/plugin-sdk/channel-targets";
|
|
8
9
|
//#region extensions/imessage/src/channel.setup.ts
|
|
9
10
|
const imessageSetupPlugin = { ...createIMessagePluginBase({
|
|
10
11
|
setupWizard: imessageSetupWizard,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { o as resolveIMessageAccount } from "./accounts-
|
|
2
|
-
import {
|
|
3
|
-
import { i as extractMarkdownFormatRuns } from "./sanitize-outbound-
|
|
4
|
-
import {
|
|
5
|
-
import { a as unregisterIMessageApprovalReactionTarget, c as buildIMessageApprovalConversationKeyForTarget, i as registerIMessageApprovalReactionTarget } from "./approval-reactions-
|
|
6
|
-
import { i as mapSentPollOptionsToDecisions, n as buildApprovalPollOptions, o as iMessageApprovalControlBindings, r as iMessageApprovalPollTargets, t as sendMessageIMessage } from "./send-
|
|
1
|
+
import { o as resolveIMessageAccount } from "./accounts-DIpGOIiN.js";
|
|
2
|
+
import { f as getCachedIMessagePrivateApiStatus, l as parseIMessageTarget } from "./message-tool-api-BwIxJDoz.js";
|
|
3
|
+
import { i as extractMarkdownFormatRuns } from "./sanitize-outbound-g651fIhi.js";
|
|
4
|
+
import { c as normalizeIMessageMessagingTarget, l as getIMessageApprovalApprovers } from "./group-policy-BipELT2x.js";
|
|
5
|
+
import { a as unregisterIMessageApprovalReactionTarget, c as buildIMessageApprovalConversationKeyForTarget, i as registerIMessageApprovalReactionTarget } from "./approval-reactions-Cvwmdlev.js";
|
|
6
|
+
import { i as mapSentPollOptionsToDecisions, n as buildApprovalPollOptions, o as iMessageApprovalControlBindings, r as iMessageApprovalPollTargets, t as sendMessageIMessage } from "./send-DVQY6M5M.js";
|
|
7
7
|
import { createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
|
8
8
|
import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
|
|
9
9
|
import { createActionGate } from "openclaw/plugin-sdk/channel-actions";
|
|
@@ -13,7 +13,7 @@ import { buildChannelApprovalExpiredText, buildChannelApprovalResolvedText, crea
|
|
|
13
13
|
import { setTimeout } from "node:timers/promises";
|
|
14
14
|
//#region extensions/imessage/src/approval-handler.runtime.ts
|
|
15
15
|
const log = createSubsystemLogger("imessage/approvals");
|
|
16
|
-
const loadIMessageActionsRuntime = createLazyRuntimeNamedExport(() => import("./actions.runtime-
|
|
16
|
+
const loadIMessageActionsRuntime = createLazyRuntimeNamedExport(() => import("./actions.runtime-BhggncbG.js"), "imessageActionsRuntime");
|
|
17
17
|
const DEFAULT_PROBE_TIMEOUT_MS = 5e3;
|
|
18
18
|
const APPROVAL_POLL_ORDERING_DELAY_MS = 1100;
|
|
19
19
|
function buildPendingPayload(params) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { l as parseIMessageTarget, s as normalizeIMessageHandle } from "./message-tool-api-
|
|
2
|
+
import { l as parseIMessageTarget, s as normalizeIMessageHandle } from "./message-tool-api-BwIxJDoz.js";
|
|
3
3
|
import { p as getOptionalIMessageRuntime } from "./monitor-reply-cache-BdeUQaHO.js";
|
|
4
|
-
import {
|
|
5
|
-
import { t as resolveIMessageReactionContext } from "./reaction-context-
|
|
4
|
+
import { l as getIMessageApprovalApprovers, u as imessageApprovalAuth } from "./group-policy-BipELT2x.js";
|
|
5
|
+
import { t as resolveIMessageReactionContext } from "./reaction-context-BAYI7pz0.js";
|
|
6
6
|
import { createLazyRuntimeSurface } from "openclaw/plugin-sdk/lazy-runtime";
|
|
7
7
|
import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { asDateTimestampMs, isFutureDateTimestampMs, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { a as resolveDefaultIMessageAccountId, i as listIMessageAccountIds, o as resolveIMessageAccount, t as collectIMessageDuplicateAccountSourceWarnings } from "./accounts-
|
|
2
|
-
import {
|
|
1
|
+
import { a as resolveDefaultIMessageAccountId, i as listIMessageAccountIds, o as resolveIMessageAccount, t as collectIMessageDuplicateAccountSourceWarnings } from "./accounts-DIpGOIiN.js";
|
|
2
|
+
import { l as parseIMessageTarget, o as looksLikeIMessageExplicitTargetId, r as inferIMessageTargetChatType, s as normalizeIMessageHandle, u as isIMessagePhoneLikeHandle } from "./message-tool-api-BwIxJDoz.js";
|
|
3
3
|
import { v as resolveIMessageDirectChatService } from "./monitor-reply-cache-BdeUQaHO.js";
|
|
4
|
-
import { n as sanitizeIMessageFinalOutboundText, r as sanitizeOutboundText } from "./sanitize-outbound-
|
|
5
|
-
import {
|
|
4
|
+
import { n as sanitizeIMessageFinalOutboundText, r as sanitizeOutboundText } from "./sanitize-outbound-g651fIhi.js";
|
|
5
|
+
import { a as normalizeIMessageAcpConversationId, c as normalizeIMessageMessagingTarget, d as imessageMessageActions, h as createIMessageSetupWizardProxy, i as matchIMessageAcpConversation, l as getIMessageApprovalApprovers, n as resolveIMessageGroupToolPolicy, o as resolveIMessageConversationIdFromTarget, t as resolveIMessageGroupRequireMention, u as imessageApprovalAuth, v as imessageSetupContract } from "./group-policy-BipELT2x.js";
|
|
6
6
|
import { t as createIMessageConversationBindingManager } from "./conversation-bindings-GDQ_Laxj.js";
|
|
7
7
|
import { t as IMessageChannelConfigSchema } from "./config-schema-DV0KP5nC.js";
|
|
8
|
-
import { n as resolveIMessageAttachmentRoots, r as resolveIMessageRemoteAttachmentRoots } from "./media-contract-
|
|
8
|
+
import { n as resolveIMessageAttachmentRoots, r as resolveIMessageRemoteAttachmentRoots } from "./media-contract-BVXuQHG2.js";
|
|
9
|
+
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
9
10
|
import { buildDmGroupAccountAllowlistAdapter } from "openclaw/plugin-sdk/allowlist-config-edit";
|
|
11
|
+
import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter, formatTrimmedAllowFromEntries } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
10
12
|
import { createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
|
|
11
13
|
import { createMessageReceiptFromOutboundResults, defineChannelMessageAdapter, sanitizeForPlainText } from "openclaw/plugin-sdk/channel-outbound";
|
|
12
14
|
import { buildPassiveProbedChannelStatusSummary } from "openclaw/plugin-sdk/extension-shared";
|
|
@@ -14,7 +16,7 @@ import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
|
14
16
|
import { questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
|
|
15
17
|
import { chunkMarkdownText } from "openclaw/plugin-sdk/reply-runtime";
|
|
16
18
|
import { buildOutboundBaseSessionKey, normalizeAccountId, parseAgentSessionKey } from "openclaw/plugin-sdk/routing";
|
|
17
|
-
import { createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
|
|
19
|
+
import { collectStatusIssuesFromLastError, createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
|
|
18
20
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
19
21
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
20
22
|
import { createApproverRestrictedNativeApprovalCapabilityFromForwardingRoutes } from "openclaw/plugin-sdk/approval-delivery-runtime";
|
|
@@ -23,9 +25,8 @@ import { shouldSuppressLocalNativeExecApprovalPrompt } from "openclaw/plugin-sdk
|
|
|
23
25
|
import { addApprovalReactionHintToText } from "openclaw/plugin-sdk/approval-reaction-runtime";
|
|
24
26
|
import { buildTypedExecApprovalPendingReplyPayload, buildTypedPluginApprovalPendingReplyPayload } from "openclaw/plugin-sdk/approval-reply-runtime";
|
|
25
27
|
import { getExecApprovalReplyMetadata, resolveExecApprovalCommandDisplay, resolveExecApprovalRequestAllowedDecisions } from "openclaw/plugin-sdk/approval-runtime";
|
|
26
|
-
import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter, formatTrimmedAllowFromEntries } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
27
|
-
import { createChannelPluginBase } from "openclaw/plugin-sdk/core";
|
|
28
28
|
import { createRestrictSendersChannelSecurity } from "openclaw/plugin-sdk/channel-policy";
|
|
29
|
+
import { createChannelPluginBase, getChatChannelMeta } from "openclaw/plugin-sdk/core";
|
|
29
30
|
//#region extensions/imessage/src/approval-text.ts
|
|
30
31
|
function replaceApprovalIdPlaceholder(text, approvalId) {
|
|
31
32
|
const safeApprovalId = approvalId.replace(/\$/g, "$$$$");
|
|
@@ -86,7 +87,7 @@ const imessageApproval = createApproverRestrictedNativeApprovalCapabilityFromFor
|
|
|
86
87
|
approvalKind,
|
|
87
88
|
request
|
|
88
89
|
}),
|
|
89
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
90
|
+
load: async () => (await import("./approval-handler.runtime-BC-YsgAf.js")).imessageApprovalNativeRuntime
|
|
90
91
|
})
|
|
91
92
|
});
|
|
92
93
|
const imessageApprovalRouting = imessageApproval.routing;
|
|
@@ -161,6 +162,7 @@ function buildIMessageExecPendingPayload(params) {
|
|
|
161
162
|
cwd: params.request.request.cwd ?? void 0,
|
|
162
163
|
host: params.request.request.host === "node" ? "node" : "gateway",
|
|
163
164
|
nodeId: params.request.request.nodeId ?? void 0,
|
|
165
|
+
scope: params.request.request.scope ?? void 0,
|
|
164
166
|
sessionKey: params.request.request.sessionKey ?? null,
|
|
165
167
|
expiresAtMs: params.request.expiresAtMs,
|
|
166
168
|
nowMs: params.nowMs
|
|
@@ -200,7 +202,7 @@ const imessageDoctor = {
|
|
|
200
202
|
//#region extensions/imessage/src/shared.ts
|
|
201
203
|
const IMESSAGE_CHANNEL = "imessage";
|
|
202
204
|
async function loadIMessageChannelRuntime$1() {
|
|
203
|
-
return await import("./channel.runtime-
|
|
205
|
+
return await import("./channel.runtime-BQLCh7bE.js");
|
|
204
206
|
}
|
|
205
207
|
const imessageSetupWizard = createIMessageSetupWizardProxy(async () => (await loadIMessageChannelRuntime$1()).imessageSetupWizard);
|
|
206
208
|
const imessageConfigAdapter = createScopedChannelConfigAdapter({
|
|
@@ -299,7 +301,7 @@ async function probeIMessageStatusAccount(params) {
|
|
|
299
301
|
}
|
|
300
302
|
//#endregion
|
|
301
303
|
//#region extensions/imessage/src/channel.ts
|
|
302
|
-
const loadIMessageChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-
|
|
304
|
+
const loadIMessageChannelRuntime = createLazyRuntimeModule(() => import("./channel.runtime-BQLCh7bE.js"));
|
|
303
305
|
function toIMessageMessageSendResult(result, kind, replyToId) {
|
|
304
306
|
const receipt = result.receipt ?? createMessageReceiptFromOutboundResults({
|
|
305
307
|
results: result.messageId ? [{
|
|
@@ -315,8 +317,8 @@ function toIMessageMessageSendResult(result, kind, replyToId) {
|
|
|
315
317
|
...result.meta && Object.keys(result.meta).length > 0 ? { meta: result.meta } : {}
|
|
316
318
|
};
|
|
317
319
|
}
|
|
318
|
-
const loadIMessageApprovalReactionsModule = createLazyRuntimeModule(() => import("./approval-reactions-
|
|
319
|
-
const loadIMessageQuestionReactionsModule = createLazyRuntimeModule(() => import("./question-reactions-
|
|
320
|
+
const loadIMessageApprovalReactionsModule = createLazyRuntimeModule(() => import("./approval-reactions-Cvwmdlev.js").then((n) => n.t));
|
|
321
|
+
const loadIMessageQuestionReactionsModule = createLazyRuntimeModule(() => import("./question-reactions-viP7ZcyG.js").then((n) => n.r));
|
|
320
322
|
async function prepareForwardedIMessageApprovalPayload(params) {
|
|
321
323
|
const prepared = (await loadIMessageApprovalReactionsModule()).addIMessageApprovalReactionHintToStructuredPayload(params);
|
|
322
324
|
if (prepared) Object.assign(params.payload, prepared);
|
|
@@ -454,7 +456,7 @@ const imessagePlugin = createChatChannelPlugin({
|
|
|
454
456
|
allowlist: buildDmGroupAccountAllowlistAdapter({
|
|
455
457
|
channelId: "imessage",
|
|
456
458
|
resolveAccount: resolveIMessageAccount,
|
|
457
|
-
normalize: ({ values }) => formatTrimmedAllowFromEntries
|
|
459
|
+
normalize: ({ values }) => formatTrimmedAllowFromEntries(values),
|
|
458
460
|
resolveDmAllowFrom: (account) => account.config.allowFrom,
|
|
459
461
|
resolveGroupAllowFrom: (account) => account.config.groupAllowFrom,
|
|
460
462
|
resolveDmPolicy: (account) => account.config.dmPolicy,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as imessagePlugin } from "./channel-
|
|
1
|
+
import { t as imessagePlugin } from "./channel-CnKQ2MVB.js";
|
|
2
2
|
export { imessagePlugin };
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { l as resolveIMessageRemoteHost, o as resolveIMessageAccount, r as listEnabledIMessageAccounts, s as resolveIMessageDuplicateSourceOwner } from "./accounts-
|
|
2
|
-
import {
|
|
1
|
+
import { l as resolveIMessageRemoteHost, o as resolveIMessageAccount, r as listEnabledIMessageAccounts, s as resolveIMessageDuplicateSourceOwner } from "./accounts-DIpGOIiN.js";
|
|
2
|
+
import { _ as imessageDmPolicy, b as isAutoManagedIMessageCliPath, f as probeIMessage, g as imessageCompletionNote, m as createIMessageCliPathTextInput, p as IMESSAGE_INSTALL_COMMAND, x as normalizeIMessageCliPathForSetup, y as imessageSetupStatusBase } from "./group-policy-BipELT2x.js";
|
|
3
3
|
import { t as IMESSAGE_LEGACY_OUTBOUND_SEND_DEP_KEYS } from "./outbound-send-deps-B-QEsLSM.js";
|
|
4
|
-
import { t as sendMessageIMessage } from "./send-
|
|
5
|
-
import { t as monitorIMessageProvider } from "./monitor-
|
|
4
|
+
import { t as sendMessageIMessage } from "./send-DVQY6M5M.js";
|
|
5
|
+
import { t as monitorIMessageProvider } from "./monitor-DRD_Dnp9.js";
|
|
6
6
|
import { createAccountStatusSink, resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import fs from "node:fs/promises";
|
|
9
|
+
import { resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/media-runtime";
|
|
9
10
|
import { createDetectedBinaryStatus, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
|
|
10
11
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
11
12
|
import { detectBinary as detectBinary$1, resolveBrewExecutable } from "openclaw/plugin-sdk/setup-tools";
|
|
13
|
+
import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
|
|
12
14
|
import { runPluginCommandWithTimeout } from "openclaw/plugin-sdk/run-command";
|
|
13
15
|
//#region extensions/imessage/src/install-imsg.ts
|
|
14
16
|
async function resolveBrewIMessageCliPath(brewExe) {
|
package/dist/contract-api.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as resolveIMessageAttachmentRoots, r as resolveIMessageRemoteAttachmentRoots, t as DEFAULT_IMESSAGE_ATTACHMENT_ROOTS } from "./media-contract-
|
|
1
|
+
import { n as resolveIMessageAttachmentRoots, r as resolveIMessageRemoteAttachmentRoots, t as DEFAULT_IMESSAGE_ATTACHMENT_ROOTS } from "./media-contract-BVXuQHG2.js";
|
|
2
2
|
import "./media-contract-api.js";
|
|
3
3
|
export { DEFAULT_IMESSAGE_ATTACHMENT_ROOTS, resolveIMessageAttachmentRoots, resolveIMessageAttachmentRoots as resolveInboundAttachmentRoots, resolveIMessageRemoteAttachmentRoots, resolveIMessageRemoteAttachmentRoots as resolveRemoteInboundAttachmentRoots };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as resolveDefaultIMessageAccountId, i as listIMessageAccountIds, o as resolveIMessageAccount } from "./accounts-
|
|
1
|
+
import { a as resolveDefaultIMessageAccountId, i as listIMessageAccountIds, o as resolveIMessageAccount } from "./accounts-DIpGOIiN.js";
|
|
2
2
|
import { d as resolveIMessageReplyCacheEntryKey, i as IMESSAGE_REPLY_CACHE_NAMESPACE, n as IMESSAGE_REPLY_CACHE_COUNTER_NAMESPACE, r as IMESSAGE_REPLY_CACHE_MAX_ENTRIES, t as IMESSAGE_REPLY_CACHE_COUNTER_KEY } from "./monitor-reply-cache-BdeUQaHO.js";
|
|
3
3
|
import { o as resolveIMessageCatchupCursorKey, r as capFailureRetriesMap, t as IMESSAGE_CATCHUP_CURSOR_NAMESPACE } from "./catchup-Dh-Rv4Ur.js";
|
|
4
4
|
import { n as IMESSAGE_SENT_ECHOES_TTL_MS, s as resolveIMessageSentEchoEntryKey, t as IMESSAGE_SENT_ECHOES_NAMESPACE } from "./persisted-echo-cache-DGxy-J4t.js";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { a as resolveDefaultIMessageAccountId, l as resolveIMessageRemoteHost, n as hasExclusiveIMessageLocalDatabase, o as resolveIMessageAccount, u as expandIMessageUserPath } from "./accounts-
|
|
2
|
-
import {
|
|
1
|
+
import { a as resolveDefaultIMessageAccountId, l as resolveIMessageRemoteHost, n as hasExclusiveIMessageLocalDatabase, o as resolveIMessageAccount, u as expandIMessageUserPath } from "./accounts-DIpGOIiN.js";
|
|
2
|
+
import { d as normalizeBareIMessageChatIdentifier, f as getCachedIMessagePrivateApiStatus, g as IMESSAGE_ACTION_NAMES, h as IMESSAGE_ACTIONS, l as parseIMessageTarget, m as setCachedIMessagePrivateApiStatus, p as imessageRpcSupportsMethod, s as normalizeIMessageHandle$1, t as describeIMessageMessageTool, u as isIMessagePhoneLikeHandle } from "./message-tool-api-BwIxJDoz.js";
|
|
3
3
|
import { a as findLatestIMessageEntryForChat, c as rememberIMessageReplyCache, h as chatContextFromIMessageTarget, o as isIMessageCurrentMessageInChat } from "./monitor-reply-cache-BdeUQaHO.js";
|
|
4
|
-
import { o as createIMessageRpcClient } from "./sanitize-outbound-
|
|
4
|
+
import { o as createIMessageRpcClient } from "./sanitize-outbound-g651fIhi.js";
|
|
5
5
|
import { createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
|
6
|
-
import { collectStatusIssuesFromLastError } from "openclaw/plugin-sdk/status-helpers";
|
|
7
6
|
import path from "node:path";
|
|
8
7
|
import { normalizeE164 } from "openclaw/plugin-sdk/account-resolution";
|
|
9
8
|
import { filterStringEntries, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
10
9
|
import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
|
|
11
10
|
import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
|
|
12
11
|
import { createActionGate, jsonResult, readNonNegativeIntegerParam, readPositiveIntegerParam, readReactionParams, readStringArrayParam, readStringParam } from "openclaw/plugin-sdk/channel-actions";
|
|
12
|
+
import { canonicalizeBase64 } from "openclaw/plugin-sdk/media-runtime";
|
|
13
13
|
import { normalizePollInput } from "openclaw/plugin-sdk/poll-runtime";
|
|
14
14
|
import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
|
|
15
15
|
import { asDateTimestampMs, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
|
|
@@ -23,11 +23,6 @@ import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
|
|
|
23
23
|
import { createCliPathTextInput, createDelegatedSetupWizardProxy, createDelegatedTextInputShouldPrompt, createPatchedAccountSetupAdapter, createSetupTranslator, promptParsedAllowFromForAccount, setAccountAllowFromForChannel, setSetupChannelEnabled as setSetupChannelEnabled$1 } from "openclaw/plugin-sdk/setup-runtime";
|
|
24
24
|
import { formatDocsLink } from "openclaw/plugin-sdk/setup-tools";
|
|
25
25
|
import { createChannelApprovalAuth } from "openclaw/plugin-sdk/approval-auth-runtime";
|
|
26
|
-
import { formatTrimmedAllowFromEntries as formatTrimmedAllowFromEntries$1 } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
27
|
-
import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
|
|
28
|
-
import { DEFAULT_ACCOUNT_ID, getChatChannelMeta } from "openclaw/plugin-sdk/core";
|
|
29
|
-
import { resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/media-runtime";
|
|
30
|
-
import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
|
|
31
26
|
import { buildChannelGroupsScopeTree, resolveScopeRequireMention, resolveScopeToolsPolicy } from "openclaw/plugin-sdk/channel-policy";
|
|
32
27
|
//#region extensions/imessage/src/message-action-reference.ts
|
|
33
28
|
async function resolveAuthorizedIMessageActionReference(params) {
|
|
@@ -525,7 +520,7 @@ async function probeIMessage(timeoutMs, opts = {}) {
|
|
|
525
520
|
}
|
|
526
521
|
//#endregion
|
|
527
522
|
//#region extensions/imessage/src/actions.ts
|
|
528
|
-
const loadIMessageActionsRuntime = createLazyRuntimeNamedExport(() => import("./actions.runtime-
|
|
523
|
+
const loadIMessageActionsRuntime = createLazyRuntimeNamedExport(() => import("./actions.runtime-BhggncbG.js"), "imessageActionsRuntime");
|
|
529
524
|
const log = createSubsystemLogger("channels/imessage");
|
|
530
525
|
const providerId = "imessage";
|
|
531
526
|
const SUPPORTED_ACTIONS = /* @__PURE__ */ new Set([...IMESSAGE_ACTION_NAMES, "upload-file"]);
|
|
@@ -686,7 +681,9 @@ function mapTapbackReaction(emoji) {
|
|
|
686
681
|
function decodeBase64Buffer(params, action) {
|
|
687
682
|
const base64Buffer = readStringParam(params, "buffer");
|
|
688
683
|
if (!base64Buffer) throw new Error(`iMessage ${action} requires buffer (base64) parameter.`);
|
|
689
|
-
|
|
684
|
+
const canonical = canonicalizeBase64(base64Buffer.replaceAll("-", "+").replaceAll("_", "/"));
|
|
685
|
+
if (!canonical) throw new Error(`iMessage ${action} buffer must be valid base64.`);
|
|
686
|
+
return Uint8Array.from(Buffer.from(canonical, "base64"));
|
|
690
687
|
}
|
|
691
688
|
const REPLY_ATTACHMENT_PATH_PARAM_NAMES = [
|
|
692
689
|
"filePath",
|
|
@@ -696,13 +693,12 @@ const REPLY_ATTACHMENT_PATH_PARAM_NAMES = [
|
|
|
696
693
|
"fileUrl"
|
|
697
694
|
];
|
|
698
695
|
function extractReplyAttachment(params) {
|
|
699
|
-
|
|
700
|
-
if (buffer) {
|
|
696
|
+
if (readStringParam(params, "buffer")) {
|
|
701
697
|
const filename = readStringParam(params, "filename") ?? "attachment.bin";
|
|
702
698
|
return {
|
|
703
699
|
spec: {
|
|
704
700
|
kind: "buffer",
|
|
705
|
-
buffer:
|
|
701
|
+
buffer: decodeBase64Buffer(params, "reply attachment"),
|
|
706
702
|
filename
|
|
707
703
|
},
|
|
708
704
|
sourceParam: "buffer"
|
|
@@ -1302,4 +1298,4 @@ function resolveIMessageGroupToolPolicy(params) {
|
|
|
1302
1298
|
});
|
|
1303
1299
|
}
|
|
1304
1300
|
//#endregion
|
|
1305
|
-
export {
|
|
1301
|
+
export { imessageDmPolicy as _, normalizeIMessageAcpConversationId as a, isAutoManagedIMessageCliPath as b, normalizeIMessageMessagingTarget as c, imessageMessageActions as d, probeIMessage as f, imessageCompletionNote as g, createIMessageSetupWizardProxy as h, matchIMessageAcpConversation as i, getIMessageApprovalApprovers as l, createIMessageCliPathTextInput as m, resolveIMessageGroupToolPolicy as n, resolveIMessageConversationIdFromTarget as o, IMESSAGE_INSTALL_COMMAND as p, resolveIMessageInboundConversationId as r, looksLikeIMessageTargetId as s, resolveIMessageGroupRequireMention as t, imessageApprovalAuth as u, imessageSetupContract as v, normalizeIMessageCliPathForSetup as x, imessageSetupStatusBase as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as resolveIMessageAccount } from "./accounts-
|
|
1
|
+
import { o as resolveIMessageAccount } from "./accounts-DIpGOIiN.js";
|
|
2
2
|
import { mergeInboundPathRoots } from "openclaw/plugin-sdk/channel-inbound";
|
|
3
3
|
//#region extensions/imessage/src/media-contract.ts
|
|
4
4
|
const DEFAULT_IMESSAGE_ATTACHMENT_ROOTS = ["/Users/*/Library/Messages/Attachments"];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as resolveIMessageAttachmentRoots, r as resolveIMessageRemoteAttachmentRoots, t as DEFAULT_IMESSAGE_ATTACHMENT_ROOTS } from "./media-contract-
|
|
1
|
+
import { n as resolveIMessageAttachmentRoots, r as resolveIMessageRemoteAttachmentRoots, t as DEFAULT_IMESSAGE_ATTACHMENT_ROOTS } from "./media-contract-BVXuQHG2.js";
|
|
2
2
|
export { DEFAULT_IMESSAGE_ATTACHMENT_ROOTS, resolveIMessageAttachmentRoots, resolveIMessageAttachmentRoots as resolveInboundAttachmentRoots, resolveIMessageRemoteAttachmentRoots, resolveIMessageRemoteAttachmentRoots as resolveRemoteInboundAttachmentRoots };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { c as getCachedIMessageRemoteHost, o as resolveIMessageAccount } from "./accounts-
|
|
1
|
+
import { c as getCachedIMessageRemoteHost, o as resolveIMessageAccount } from "./accounts-DIpGOIiN.js";
|
|
2
2
|
import { normalizeE164 } from "openclaw/plugin-sdk/account-resolution";
|
|
3
3
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { createActionGate } from "openclaw/plugin-sdk/channel-actions";
|
|
5
5
|
import { Type } from "typebox";
|
|
6
6
|
import { asDateTimestampMs } from "openclaw/plugin-sdk/number-runtime";
|
|
7
|
-
import { createAllowedChatSenderMatcher,
|
|
7
|
+
import { createAllowedChatSenderMatcher, parseChatTargetPrefixesOrThrow, resolveServicePrefixedChatTarget, resolveServicePrefixedOrChatAllowTarget } from "openclaw/plugin-sdk/channel-targets";
|
|
8
8
|
//#region extensions/imessage/src/actions-contract.ts
|
|
9
9
|
const IMESSAGE_ACTIONS = {
|
|
10
10
|
react: { gate: "reactions" },
|
|
@@ -315,4 +315,4 @@ function describeIMessageMessageTool({ cfg, accountId, currentChannelId }) {
|
|
|
315
315
|
};
|
|
316
316
|
}
|
|
317
317
|
//#endregion
|
|
318
|
-
export {
|
|
318
|
+
export { isAllowedIMessageSender as a, parseIMessageAllowTarget as c, normalizeBareIMessageChatIdentifier as d, getCachedIMessagePrivateApiStatus as f, IMESSAGE_ACTION_NAMES as g, IMESSAGE_ACTIONS as h, isAllowedIMessageReplyContextSender as i, parseIMessageTarget as l, setCachedIMessagePrivateApiStatus as m, formatIMessageChatTarget as n, looksLikeIMessageExplicitTargetId as o, imessageRpcSupportsMethod as p, inferIMessageTargetChatType as r, normalizeIMessageHandle as s, describeIMessageMessageTool as t, isIMessagePhoneLikeHandle as u };
|
package/dist/message-tool-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as describeIMessageMessageTool } from "./message-tool-api-
|
|
1
|
+
import { t as describeIMessageMessageTool } from "./message-tool-api-BwIxJDoz.js";
|
|
2
2
|
export { describeIMessageMessageTool as describeMessageTool };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { d as resolveIMessageChatDbLookupPath, f as resolveIMessageHomeDir, l as resolveIMessageRemoteHost, o as resolveIMessageAccount } from "./accounts-
|
|
2
|
-
import {
|
|
1
|
+
import { d as resolveIMessageChatDbLookupPath, f as resolveIMessageHomeDir, l as resolveIMessageRemoteHost, o as resolveIMessageAccount } from "./accounts-DIpGOIiN.js";
|
|
2
|
+
import { c as parseIMessageAllowTarget, f as getCachedIMessagePrivateApiStatus, i as isAllowedIMessageReplyContextSender, l as parseIMessageTarget, n as formatIMessageChatTarget, p as imessageRpcSupportsMethod, s as normalizeIMessageHandle } from "./message-tool-api-BwIxJDoz.js";
|
|
3
3
|
import { c as rememberIMessageReplyCache, f as getIMessageRuntime, s as isKnownFromMeIMessageMessageId, v as resolveIMessageDirectChatService } from "./monitor-reply-cache-BdeUQaHO.js";
|
|
4
|
-
import { o as createIMessageRpcClient, r as sanitizeOutboundText } from "./sanitize-outbound-
|
|
5
|
-
import {
|
|
6
|
-
import { n as resolveIMessageAttachmentRoots, r as resolveIMessageRemoteAttachmentRoots } from "./media-contract-
|
|
4
|
+
import { o as createIMessageRpcClient, r as sanitizeOutboundText } from "./sanitize-outbound-g651fIhi.js";
|
|
5
|
+
import { f as probeIMessage, r as resolveIMessageInboundConversationId } from "./group-policy-BipELT2x.js";
|
|
6
|
+
import { n as resolveIMessageAttachmentRoots, r as resolveIMessageRemoteAttachmentRoots } from "./media-contract-BVXuQHG2.js";
|
|
7
7
|
import { a as resolveCatchupConfig, i as performIMessageCatchup, n as advanceIMessageCatchupCursor } from "./catchup-Dh-Rv4Ur.js";
|
|
8
8
|
import { c as stripLeadingEchoTextCorruptionMarkers, i as hasPersistedIMessageEcho, o as resolveIMessageEchoMediaKey } from "./persisted-echo-cache-DGxy-J4t.js";
|
|
9
|
-
import { i as registerIMessageApprovalReactionTarget, n as handleIMessageApprovalReaction, o as listPendingIMessageApprovalReactionPollTargets, r as maybeResolveIMessageApprovalReaction, s as buildIMessageApprovalConversationKeyForInbound } from "./approval-reactions-
|
|
10
|
-
import { a as maybeResolveIMessageApprovalPollVote, o as iMessageApprovalControlBindings, t as sendMessageIMessage } from "./send-
|
|
11
|
-
import { t as resolveIMessageReactionContext } from "./reaction-context-
|
|
12
|
-
import { n as maybeResolveIMessageQuestionReaction, t as hasIMessageQuestionReactionTarget } from "./question-reactions-
|
|
9
|
+
import { i as registerIMessageApprovalReactionTarget, n as handleIMessageApprovalReaction, o as listPendingIMessageApprovalReactionPollTargets, r as maybeResolveIMessageApprovalReaction, s as buildIMessageApprovalConversationKeyForInbound } from "./approval-reactions-Cvwmdlev.js";
|
|
10
|
+
import { a as maybeResolveIMessageApprovalPollVote, o as iMessageApprovalControlBindings, t as sendMessageIMessage } from "./send-DVQY6M5M.js";
|
|
11
|
+
import { t as resolveIMessageReactionContext } from "./reaction-context-BAYI7pz0.js";
|
|
12
|
+
import { n as maybeResolveIMessageQuestionReaction, t as hasIMessageQuestionReactionTarget } from "./question-reactions-viP7ZcyG.js";
|
|
13
13
|
import { bindIngressLifecycleToReplyOptions, createChannelIngressError, createChannelIngressMonitor, createChannelMessageReplyPipeline, createMessageReceiptFromOutboundResults, listMessageReceiptPlatformIds, resolveChannelStreamingBlockEnabled } from "openclaw/plugin-sdk/channel-outbound";
|
|
14
14
|
import { chunkMarkdownTextWithMode as chunkTextWithMode, resolveChunkMode, resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-runtime";
|
|
15
15
|
import { resolveAgentRoute, resolveInboundLastRouteSessionKey } from "openclaw/plugin-sdk/routing";
|
|
@@ -18,14 +18,14 @@ import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
|
|
|
18
18
|
import { asSafeIntegerInRange, hasNonEmptyString, isRecord, normalizeOptionalString, normalizeStringEntries, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
19
19
|
import fs from "node:fs/promises";
|
|
20
20
|
import { createNonExitingRuntime, danger, logVerbose, shouldLogVerbose, warn } from "openclaw/plugin-sdk/runtime-env";
|
|
21
|
+
import { isInboundPathAllowed, kindFromMime } from "openclaw/plugin-sdk/media-runtime";
|
|
21
22
|
import { asDateTimestampMs, asPositiveFiniteNumber, parseDateStringTimestampMs, timestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
|
|
22
23
|
import { createHash } from "node:crypto";
|
|
23
24
|
import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot";
|
|
24
25
|
import { sliceUtf16Safe, truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
25
26
|
import { collectErrorGraphCandidates, formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
26
|
-
import { isInboundPathAllowed, kindFromMime } from "openclaw/plugin-sdk/media-runtime";
|
|
27
|
-
import { convertMarkdownTables as convertMarkdownTables$1, findCodeRegions, isInsideCode, sanitizeTerminalText } from "openclaw/plugin-sdk/text-chunking";
|
|
28
27
|
import { buildChannelGroupsScopeTree, resolveChannelGroupPolicy, resolveScopeRequireMention } from "openclaw/plugin-sdk/channel-policy";
|
|
28
|
+
import { convertMarkdownTables as convertMarkdownTables$1, findCodeRegions, isInsideCode, sanitizeTerminalText } from "openclaw/plugin-sdk/text-chunking";
|
|
29
29
|
import { buildChannelInboundEventContext, buildMentionRegexes, createChannelInboundDebouncer, createChannelPartialDeliveryError, filterChannelInboundQuoteContext, formatInboundEnvelope, formatInboundFromLabel, formatInboundMediaUnavailableText, formatMediaPlaceholderText, isChannelPartialDeliveryError, logInboundDrop, matchesMentionPatterns, resolveEnvelopeFormatOptions, resolveInboundMentionDecision, resolveInboundSupplementalSenderAllowed, runChannelInboundEvent, shouldDebounceTextInbound, toInboundMediaFactsWithMetadata } from "openclaw/plugin-sdk/channel-inbound";
|
|
30
30
|
import { openLocalFileSafely, resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/security-runtime";
|
|
31
31
|
import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
|
|
@@ -304,9 +304,6 @@ function stripImessageLengthPrefixedUtf8Text(text) {
|
|
|
304
304
|
function isOptionalString(value) {
|
|
305
305
|
return value === void 0 || value === null || typeof value === "string";
|
|
306
306
|
}
|
|
307
|
-
function isOptionalStringOrNumber(value) {
|
|
308
|
-
return value === void 0 || value === null || typeof value === "string" || typeof value === "number";
|
|
309
|
-
}
|
|
310
307
|
function isOptionalNumber(value) {
|
|
311
308
|
return value === void 0 || value === null || typeof value === "number";
|
|
312
309
|
}
|
|
@@ -329,7 +326,7 @@ function parseIMessageNotification(raw) {
|
|
|
329
326
|
const maybeMessage = raw.message;
|
|
330
327
|
if (!isRecord(maybeMessage)) return null;
|
|
331
328
|
const message = maybeMessage;
|
|
332
|
-
if (!isOptionalNumber(message.id) || !isOptionalString(message.guid) || !isOptionalNumber(message.chat_id) || !isOptionalString(message.sender) || !isOptionalString(message.destination_caller_id) || !isOptionalBoolean(message.is_from_me) || !isOptionalString(message.text) || !
|
|
329
|
+
if (!isOptionalNumber(message.id) || !isOptionalString(message.guid) || !isOptionalNumber(message.chat_id) || !isOptionalString(message.sender) || !isOptionalString(message.destination_caller_id) || !isOptionalBoolean(message.is_from_me) || !isOptionalString(message.text) || !isOptionalString(message.thread_originator_guid) || !isOptionalString(message.reply_to_guid) || !isOptionalString(message.reply_to_text) || !isOptionalString(message.reply_to_sender) || !isOptionalString(message.created_at) || !isOptionalBoolean(message.is_reaction) || !isOptionalBoolean(message.is_tapback) || !isOptionalString(message.associated_message_guid) || !isOptionalNumber(message.associated_message_type) || !isOptionalString(message.reaction_type) || !isOptionalString(message.reaction_emoji) || !isOptionalBoolean(message.is_reaction_add) || !isOptionalString(message.reacted_to_guid) || !isOptionalAttachments(message.attachments) || !isOptionalString(message.chat_identifier) || !isOptionalString(message.chat_guid) || !isOptionalString(message.chat_name) || !isOptionalStringArray(message.participants) || !isOptionalBoolean(message.is_group)) return null;
|
|
333
330
|
return {
|
|
334
331
|
...message,
|
|
335
332
|
text: typeof message.text === "string" ? stripImessageLengthPrefixedUtf8Text(message.text) : message.text,
|
|
@@ -549,15 +546,16 @@ function combineIMessagePayloads(payloads) {
|
|
|
549
546
|
seenGuids.add(guid);
|
|
550
547
|
coalescedMessageGuids.push(guid);
|
|
551
548
|
}
|
|
552
|
-
const
|
|
549
|
+
const reply = payloads.find((payload) => payload.thread_originator_guid != null || payload.reply_to_guid != null) ?? first;
|
|
553
550
|
return {
|
|
554
551
|
...first,
|
|
555
552
|
text: combinedText,
|
|
556
553
|
attachments: allAttachments.length > 0 ? allAttachments : null,
|
|
557
554
|
created_at: latestCreatedAt,
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
555
|
+
thread_originator_guid: reply.thread_originator_guid ?? null,
|
|
556
|
+
reply_to_guid: reply.reply_to_guid ?? null,
|
|
557
|
+
reply_to_text: reply.reply_to_text ?? null,
|
|
558
|
+
reply_to_sender: reply.reply_to_sender ?? null,
|
|
561
559
|
coalescedMessageGuids: coalescedMessageGuids.length > 0 ? coalescedMessageGuids : void 0,
|
|
562
560
|
coalescedCatchupCursor: Number.isFinite(maxRowid) && Number.isFinite(maxDateMs) ? {
|
|
563
561
|
lastSeenMs: maxDateMs,
|
|
@@ -1177,7 +1175,7 @@ function describeReplyContext(message) {
|
|
|
1177
1175
|
if (!body) return null;
|
|
1178
1176
|
return {
|
|
1179
1177
|
body,
|
|
1180
|
-
id: normalizeReplyField(message.
|
|
1178
|
+
id: normalizeReplyField(message.thread_originator_guid) ?? normalizeReplyField(message.reply_to_guid),
|
|
1181
1179
|
sender: normalizeReplyField(message.reply_to_sender)
|
|
1182
1180
|
};
|
|
1183
1181
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { t as resolveIMessageReactionContext } from "./reaction-context-
|
|
2
|
+
import { t as resolveIMessageReactionContext } from "./reaction-context-BAYI7pz0.js";
|
|
3
3
|
import { createQuestionReactionTargetStore, questionGatewayRuntime } from "openclaw/plugin-sdk/question-gateway-runtime";
|
|
4
4
|
//#region extensions/imessage/src/question-reactions.ts
|
|
5
5
|
var question_reactions_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -80,11 +80,11 @@ function resolveTapbackTextContext(bodyText) {
|
|
|
80
80
|
for (const pattern of TAPBACK_TEXT_PATTERNS) {
|
|
81
81
|
if (!lower.startsWith(pattern.prefix)) continue;
|
|
82
82
|
const afterPrefix = bodyText.slice(pattern.prefix.length).trim();
|
|
83
|
-
if (!/^["
|
|
83
|
+
if (!/^(?:"[\s\S]*"|“[\s\S]*”)$/u.test(afterPrefix)) continue;
|
|
84
84
|
return {
|
|
85
85
|
action: pattern.action,
|
|
86
86
|
emoji: pattern.emoji,
|
|
87
|
-
targetText: afterPrefix.
|
|
87
|
+
targetText: afterPrefix.slice(1, -1).trim()
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
90
|
return null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as resolveLocalIMessageChatDbPath, u as expandIMessageUserPath } from "./accounts-
|
|
1
|
+
import { p as resolveLocalIMessageChatDbPath, u as expandIMessageUserPath } from "./accounts-DIpGOIiN.js";
|
|
2
2
|
import { g as isIMessageEmailChatIdentifier, h as chatContextFromIMessageTarget, l as resolveIMessageCachedResourceBinding, u as resolveIMessageMessageId } from "./monitor-reply-cache-BdeUQaHO.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { normalizeScpRemoteHost } from "openclaw/plugin-sdk/host-runtime";
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { o as resolveIMessageAccount } from "./accounts-
|
|
1
|
+
import { o as resolveIMessageAccount } from "./accounts-DIpGOIiN.js";
|
|
2
2
|
import { m as setIMessageRuntime } from "./monitor-reply-cache-BdeUQaHO.js";
|
|
3
|
-
import {
|
|
3
|
+
import { c as normalizeIMessageMessagingTarget, d as imessageMessageActions, f as probeIMessage, n as resolveIMessageGroupToolPolicy, s as looksLikeIMessageTargetId, t as resolveIMessageGroupRequireMention } from "./group-policy-BipELT2x.js";
|
|
4
4
|
import { n as IMessageConfigSchema } from "./config-schema-DV0KP5nC.js";
|
|
5
|
-
import { t as sendMessageIMessage } from "./send-
|
|
6
|
-
import { t as monitorIMessageProvider } from "./monitor-
|
|
7
|
-
import { buildComputedAccountStatusSnapshot, collectStatusIssuesFromLastError } from "openclaw/plugin-sdk/status-helpers";
|
|
5
|
+
import { t as sendMessageIMessage } from "./send-DVQY6M5M.js";
|
|
6
|
+
import { t as monitorIMessageProvider } from "./monitor-DRD_Dnp9.js";
|
|
8
7
|
import { formatTrimmedAllowFromEntries } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
9
|
-
import {
|
|
10
|
-
import { DEFAULT_ACCOUNT_ID, getChatChannelMeta } from "openclaw/plugin-sdk/core";
|
|
8
|
+
import { buildComputedAccountStatusSnapshot, collectStatusIssuesFromLastError } from "openclaw/plugin-sdk/status-helpers";
|
|
11
9
|
import { resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/media-runtime";
|
|
10
|
+
import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
|
|
11
|
+
import { DEFAULT_ACCOUNT_ID, getChatChannelMeta } from "openclaw/plugin-sdk/core";
|
|
12
12
|
import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
|
|
13
|
+
import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
|
|
13
14
|
//#region extensions/imessage/src/config-accessors.ts
|
|
14
15
|
function resolveIMessageConfigAllowFrom(params) {
|
|
15
16
|
return (resolveIMessageAccount(params).config.allowFrom ?? []).map((entry) => String(entry));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as expandIMessageUserPath } from "./accounts-
|
|
1
|
+
import { u as expandIMessageUserPath } from "./accounts-DIpGOIiN.js";
|
|
2
2
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { resolveUserPath } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
4
4
|
import { spawn } from "node:child_process";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { d as resolveIMessageChatDbLookupPath, l as resolveIMessageRemoteHost, n as hasExclusiveIMessageLocalDatabase, o as resolveIMessageAccount } from "./accounts-
|
|
2
|
-
import { l as parseIMessageTarget, n as formatIMessageChatTarget, s as normalizeIMessageHandle } from "./message-tool-api-
|
|
1
|
+
import { d as resolveIMessageChatDbLookupPath, l as resolveIMessageRemoteHost, n as hasExclusiveIMessageLocalDatabase, o as resolveIMessageAccount } from "./accounts-DIpGOIiN.js";
|
|
2
|
+
import { l as parseIMessageTarget, n as formatIMessageChatTarget, s as normalizeIMessageHandle } from "./message-tool-api-BwIxJDoz.js";
|
|
3
3
|
import { c as rememberIMessageReplyCache, h as chatContextFromIMessageTarget, p as getOptionalIMessageRuntime, v as resolveIMessageDirectChatService } from "./monitor-reply-cache-BdeUQaHO.js";
|
|
4
|
-
import { a as IMessageRpcRequestError, n as sanitizeIMessageFinalOutboundText, o as createIMessageRpcClient, t as protectIMessageFencedRoleMarkers } from "./sanitize-outbound-
|
|
5
|
-
import {
|
|
4
|
+
import { a as IMessageRpcRequestError, n as sanitizeIMessageFinalOutboundText, o as createIMessageRpcClient, t as protectIMessageFencedRoleMarkers } from "./sanitize-outbound-g651fIhi.js";
|
|
5
|
+
import { l as getIMessageApprovalApprovers, u as imessageApprovalAuth } from "./group-policy-BipELT2x.js";
|
|
6
6
|
import { a as rememberPersistedIMessageEcho, r as forgetPersistedIMessageEchoKey } from "./persisted-echo-cache-DGxy-J4t.js";
|
|
7
|
-
import { d as normalizeConversationKey, f as normalizeIMessageGuid, i as registerIMessageApprovalReactionTarget, l as enumerateApprovalTargetKeys, s as buildIMessageApprovalConversationKeyForInbound, u as enumerateConversationKeyForms } from "./approval-reactions-
|
|
8
|
-
import { i as runIMessageCliJsonCommand, r as resolveAuthorizedIMessageReplyReference, t as withIMessageRemoteFile } from "./remote-file-
|
|
7
|
+
import { d as normalizeConversationKey, f as normalizeIMessageGuid, i as registerIMessageApprovalReactionTarget, l as enumerateApprovalTargetKeys, s as buildIMessageApprovalConversationKeyForInbound, u as enumerateConversationKeyForms } from "./approval-reactions-Cvwmdlev.js";
|
|
8
|
+
import { i as runIMessageCliJsonCommand, r as resolveAuthorizedIMessageReplyReference, t as withIMessageRemoteFile } from "./remote-file-CyTTuRAt.js";
|
|
9
9
|
import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
|
|
10
10
|
import { createLazyRuntimeSurface } from "openclaw/plugin-sdk/lazy-runtime";
|
|
11
11
|
import { accessSync, constants } from "node:fs";
|
|
12
12
|
import { basename } from "node:path";
|
|
13
13
|
import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
14
14
|
import { sleep } from "openclaw/plugin-sdk/runtime-env";
|
|
15
|
+
import { extractOriginalFilename, kindFromMime, resolveOutboundAttachmentFromUrl } from "openclaw/plugin-sdk/media-runtime";
|
|
15
16
|
import { asDateTimestampMs } from "openclaw/plugin-sdk/number-runtime";
|
|
16
17
|
import { PlatformMessageNotDispatchedError, isApprovalNotFoundError } from "openclaw/plugin-sdk/error-runtime";
|
|
17
18
|
import { addApprovalReactionHintToText, createApprovalReactionTargetStore, listApprovalReactionBindings } from "openclaw/plugin-sdk/approval-reaction-runtime";
|
|
18
|
-
import { extractOriginalFilename, kindFromMime, resolveOutboundAttachmentFromUrl } from "openclaw/plugin-sdk/media-runtime";
|
|
19
19
|
import { convertMarkdownTables, stripInlineDirectiveTagsForDelivery } from "openclaw/plugin-sdk/text-chunking";
|
|
20
20
|
import { createChannelPartialDeliveryError } from "openclaw/plugin-sdk/channel-inbound";
|
|
21
21
|
import { openNodeSqliteDatabase } from "openclaw/plugin-sdk/sqlite-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Returns true if the value is a ISO8601 DateTime string
|
|
3
|
-
* @
|
|
3
|
+
* @specification https://datatracker.ietf.org/doc/html/rfc3339
|
|
4
4
|
* @example `2020-12-12T20:20:40+00:00`
|
|
5
5
|
*/
|
|
6
|
-
export declare function IsDateTime(value: string
|
|
6
|
+
export declare function IsDateTime(value: string): boolean;
|