@openclaw/imessage 2026.8.1-beta.2 → 2026.8.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-CCirBEIm.js} +4 -5
- package/dist/{actions.runtime-DTFKDN5p.js → actions.runtime-CAl3WcqD.js} +2 -3
- package/dist/api.js +6 -5
- package/dist/{approval-handler.runtime-BtLs4gho.js → approval-handler.runtime-UBd1j2Sg.js} +15 -9
- package/dist/approval-reactions-LL5yn1Rc.js +562 -0
- package/dist/{channel-lppmI51h.js → channel-DNI9DKGN.js} +26 -21
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-5wpCKQb7.js → channel.runtime-HSkrmWfW.js} +58 -11
- package/dist/{config-schema-DV0KP5nC.js → config-schema-DuGbA8Kp.js} +8 -7
- package/dist/contract-api.js +1 -1
- package/dist/doctor-contract-api.js +8 -281
- package/dist/{group-policy-DF9xSdik.js → group-policy-Dvc-BcWo.js} +19 -651
- package/dist/{media-contract-BEgdvYhW.js → media-contract-D-FhGE98.js} +1 -1
- package/dist/media-contract-api.js +1 -1
- package/dist/{message-tool-api-CPDfJJoE.js → message-tool-api-CvIgJpOo.js} +7 -4
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-DnxJ8pW9.js → monitor-BywJn1QW.js} +343 -111
- package/dist/{question-reactions-DVe50UhB.js → question-reactions-viP7ZcyG.js} +2 -1
- package/dist/reaction-context-BAYI7pz0.js +105 -0
- package/dist/{remote-file-DLwO9ved.js → remote-file-6mCj2ZBy.js} +7 -3
- package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
- package/dist/runtime-Cza4CY5T.js +8 -0
- package/dist/runtime-api.js +10 -9
- package/dist/{sanitize-outbound-CoTZLXMw.js → sanitize-outbound-Du-r1lNQ.js} +345 -58
- package/dist/{send-BUXW76tw.js → send-mgWPKqSV.js} +147 -26
- package/dist/state-contract-4TK_cDDb.js +56 -0
- package/dist/state-migrations-SFdKp3GQ.js +277 -0
- 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/openclaw.plugin.json +0 -6
- package/package.json +5 -5
- package/dist/catchup-D32oYNxR.js +0 -294
- package/dist/monitor-reply-cache-DKlYGd5x.js +0 -348
- package/dist/persisted-echo-cache-BPWGUK-L.js +0 -143
- 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,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
2
2
|
import { accessSync, constants, readFileSync, realpathSync, statSync } from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { createAccountListHelpers } from "openclaw/plugin-sdk/account-helpers";
|
|
5
|
-
import {
|
|
6
|
-
import { normalizeAccountId as normalizeAccountId$1 } from "openclaw/plugin-sdk/account-resolution";
|
|
5
|
+
import { normalizeAccountId, resolveAccountEntry } from "openclaw/plugin-sdk/account-resolution";
|
|
7
6
|
import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
|
|
8
7
|
import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
9
8
|
import os from "node:os";
|
|
@@ -35,7 +34,7 @@ function resolveIMessageHomeDir() {
|
|
|
35
34
|
function expandIMessageUserPath(value) {
|
|
36
35
|
if (!value.startsWith("~")) return value;
|
|
37
36
|
const home = resolveIMessageHomeDir();
|
|
38
|
-
return home ? value.replace(/^~(?=$|[\\/])/, home) : value;
|
|
37
|
+
return home ? value.replace(/^~(?=$|[\\/])/, () => home) : value;
|
|
39
38
|
}
|
|
40
39
|
function resolveIMessageExecutable(cliPath) {
|
|
41
40
|
const expanded = expandIMessageUserPath(cliPath);
|
|
@@ -224,7 +223,7 @@ function mergeIMessageAccountConfig(cfg, accountId) {
|
|
|
224
223
|
} : merged;
|
|
225
224
|
}
|
|
226
225
|
function resolveIMessageAccount(params) {
|
|
227
|
-
const accountId = normalizeAccountId
|
|
226
|
+
const accountId = normalizeAccountId(params.accountId ?? resolveDefaultIMessageAccountId(params.cfg));
|
|
228
227
|
const baseEnabled = params.cfg.channels?.imessage?.enabled !== false;
|
|
229
228
|
const merged = mergeIMessageAccountConfig(params.cfg, accountId);
|
|
230
229
|
const accountEnabled = merged.enabled !== false;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { _ as normalizeDirectChatIdentifier,
|
|
2
|
-
import { n as
|
|
3
|
-
import { i as runIMessageCliJsonCommand, n as authorizeIMessageResourceReference, t as withIMessageRemoteFile } from "./remote-file-DLwO9ved.js";
|
|
1
|
+
import { _ as normalizeDirectChatIdentifier, f as resolveIMessageMessageId, n as sanitizeIMessageFinalOutboundText, o as createIMessageRpcClient } from "./sanitize-outbound-Du-r1lNQ.js";
|
|
2
|
+
import { i as runIMessageCliJsonCommand, n as authorizeIMessageResourceReference, t as withIMessageRemoteFile } from "./remote-file-6mCj2ZBy.js";
|
|
4
3
|
import { basename, parse, win32 } from "node:path";
|
|
5
4
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
5
|
import { asDateTimestampMs, parseStrictInteger, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
|
package/dist/api.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
import {
|
|
4
|
-
import { s as
|
|
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-CCirBEIm.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-CvIgJpOo.js";
|
|
3
|
+
import { p as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS } from "./sanitize-outbound-Du-r1lNQ.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-Dvc-BcWo.js";
|
|
5
|
+
import { n as createIMessagePluginBase, r as imessageSetupWizard, t as imessagePlugin } from "./channel-DNI9DKGN.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,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { o as resolveIMessageAccount } from "./accounts-CCirBEIm.js";
|
|
2
|
+
import { f as getCachedIMessagePrivateApiStatus, l as parseIMessageTarget } from "./message-tool-api-CvIgJpOo.js";
|
|
3
|
+
import { i as extractMarkdownFormatRuns } from "./sanitize-outbound-Du-r1lNQ.js";
|
|
4
|
+
import { c as normalizeIMessageMessagingTarget, l as getIMessageApprovalApprovers } from "./group-policy-Dvc-BcWo.js";
|
|
5
|
+
import { a as unregisterIMessageApprovalReactionTarget, c as buildIMessageApprovalConversationKeyForTarget, i as registerIMessageApprovalReactionTarget } from "./approval-reactions-LL5yn1Rc.js";
|
|
6
|
+
import { a as iMessageApprovalPollTargets, c as iMessageApprovalControlBindings, i as buildApprovalPollOptions, o as mapSentPollOptionsToDecisions, t as sendMessageIMessage } from "./send-mgWPKqSV.js";
|
|
6
7
|
import { createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
|
7
8
|
import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
|
|
8
9
|
import { createActionGate } from "openclaw/plugin-sdk/channel-actions";
|
|
@@ -12,7 +13,7 @@ import { buildChannelApprovalExpiredText, buildChannelApprovalResolvedText, crea
|
|
|
12
13
|
import { setTimeout } from "node:timers/promises";
|
|
13
14
|
//#region extensions/imessage/src/approval-handler.runtime.ts
|
|
14
15
|
const log = createSubsystemLogger("imessage/approvals");
|
|
15
|
-
const loadIMessageActionsRuntime = createLazyRuntimeNamedExport(() => import("./actions.runtime-
|
|
16
|
+
const loadIMessageActionsRuntime = createLazyRuntimeNamedExport(() => import("./actions.runtime-CAl3WcqD.js"), "imessageActionsRuntime");
|
|
16
17
|
const DEFAULT_PROBE_TIMEOUT_MS = 5e3;
|
|
17
18
|
const APPROVAL_POLL_ORDERING_DELAY_MS = 1100;
|
|
18
19
|
function buildPendingPayload(params) {
|
|
@@ -205,7 +206,7 @@ async function recoverIMessageApprovalTextFallback(params) {
|
|
|
205
206
|
try {
|
|
206
207
|
return (await sendMessageIMessage(params.target.to, params.fallbackText, {
|
|
207
208
|
config: params.cfg,
|
|
208
|
-
|
|
209
|
+
approvalPrompt: params.approvalPrompt,
|
|
209
210
|
conversationReadOrigin: "direct-operator",
|
|
210
211
|
...params.target.accountId ? { accountId: params.target.accountId } : {},
|
|
211
212
|
...params.promptMessageId ? { replyToId: params.promptMessageId } : {}
|
|
@@ -341,9 +342,14 @@ const imessageApprovalNativeRuntime = createChannelApprovalNativeRuntimeAdapter(
|
|
|
341
342
|
}) : "unknown";
|
|
342
343
|
const reactionFallbackVisible = !expectPoll || targetTransport !== "imessage";
|
|
343
344
|
const promptText = reactionFallbackVisible ? pendingPayload.text : pendingPayload.pollText;
|
|
345
|
+
const approvalPrompt = {
|
|
346
|
+
approvalId: view.approvalId,
|
|
347
|
+
approvalKind: view.approvalKind,
|
|
348
|
+
allowedDecisions: pendingPayload.allowedDecisions
|
|
349
|
+
};
|
|
344
350
|
const result = await sendMessageIMessage(preparedTarget.to, promptText, {
|
|
345
351
|
config: cfg,
|
|
346
|
-
...reactionFallbackVisible ? {
|
|
352
|
+
...reactionFallbackVisible ? { approvalPrompt } : {},
|
|
347
353
|
conversationReadOrigin: "direct-operator",
|
|
348
354
|
...preparedTarget.accountId ? { accountId: preparedTarget.accountId } : {}
|
|
349
355
|
});
|
|
@@ -363,7 +369,7 @@ const imessageApprovalNativeRuntime = createChannelApprovalNativeRuntimeAdapter(
|
|
|
363
369
|
target: preparedTarget,
|
|
364
370
|
promptMessageId: result.guid,
|
|
365
371
|
fallbackText: pendingPayload.text,
|
|
366
|
-
|
|
372
|
+
approvalPrompt
|
|
367
373
|
}) : void 0;
|
|
368
374
|
const entry = {
|
|
369
375
|
accountId,
|