@openclaw/imessage 2026.10.1 → 2026.10.5-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/.setup/{accounts-evTpvJMv.mjs → accounts-DacCvDBt.mjs} +23 -45
- package/dist/.setup/{actions-DJqbUmbN.mjs → actions-Hxh12myO.mjs} +54 -101
- package/dist/.setup/{actions.runtime-DL5i-Y4J.mjs → actions.runtime-DOIX6Fkf.mjs} +29 -37
- package/dist/.setup/{api-oq_MryN7.mjs → api-BV8qHfLl.mjs} +7 -7
- package/dist/.setup/{api-SAVMfMoY.mjs → api-DC1yHVGj.mjs} +8 -8
- package/dist/.setup/{approval-handler.runtime-Bj2NGNXF.mjs → approval-handler.runtime-Dc3KzakG.mjs} +38 -66
- package/dist/.setup/{approval-reactions-L9Ul7PAu.mjs → approval-reactions-JvzJCJ4a.mjs} +26 -33
- package/dist/.setup/{channel-CL73qdMG.mjs → channel-9TWBUDkP.mjs} +14 -16
- package/dist/.setup/{channel.runtime-DY7JJ0_9.mjs → channel.runtime-DrLDEY4R.mjs} +198 -362
- package/dist/.setup/{client-12apu4Ip.mjs → client-HixFQQWY.mjs} +34 -38
- package/dist/.setup/{media-contract-DjQGZlfl.mjs → media-contract-BwWs5PM7.mjs} +1 -1
- package/dist/.setup/{message-tool-api-CqfRxLlT.mjs → message-tool-api-B5NfPnFL.mjs} +2 -2
- package/dist/.setup/{question-reactions-DJV-TnA8.mjs → question-reactions-9jrqVZgE.mjs} +20 -25
- package/dist/.setup/{reaction-context-By7kUMBC.mjs → reaction-context-CRXpeYAr.mjs} +1 -1
- package/dist/.setup/{remote-file-BU7pA-Zi.mjs → remote-file-Dq5Asi_F.mjs} +10 -16
- package/dist/.setup/{sanitize-outbound-C0x4BPky.mjs → sanitize-outbound-DpdQERYJ.mjs} +27 -62
- package/dist/.setup/{send-pkYwL6Rt.mjs → send-BZZzMbdi.mjs} +186 -251
- package/dist/.setup/{setup-core-DqOBe-n0.mjs → setup-core-CaRGbZOL.mjs} +15 -46
- package/dist/.setup/{setup-surface-zKhIinwY.mjs → setup-surface-BMWS7VuY.mjs} +2 -2
- package/dist/.setup/{targets-BicBiYsM.mjs → targets-B4oU7n-v.mjs} +47 -69
- package/dist/api.js +7 -7
- package/dist/channel-plugin-api.js +1 -1
- package/dist/contract-api.js +1 -1
- package/dist/doctor-contract-api.js +21 -45
- package/dist/media-contract-api.js +1 -1
- package/dist/message-tool-api.js +1 -1
- package/dist/runtime-api.js +1 -1
- package/dist/setup-entry.js +1 -1
- package/dist/src/chat-db.worker.js +1 -1
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as normalizeIMessageHandle } from "./targets-
|
|
2
|
-
import { a as resolveDefaultIMessageAccountId, o as resolveIMessageAccount } from "./accounts-
|
|
1
|
+
import { l as IMESSAGE_CHAT_TARGET_PREFIX_RE, o as normalizeIMessageHandle } from "./targets-B4oU7n-v.mjs";
|
|
2
|
+
import { a as resolveDefaultIMessageAccountId, o as resolveIMessageAccount } from "./accounts-DacCvDBt.mjs";
|
|
3
3
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { parseAllowFromEntries } from "openclaw/plugin-sdk/allow-from";
|
|
5
5
|
import { createChannelDmPolicy } from "openclaw/plugin-sdk/channel-dm-policy";
|
|
@@ -24,38 +24,10 @@ function isAutoManagedIMessageCliPath(cliPath, opts) {
|
|
|
24
24
|
const normalized = normalizeIMessageCliPathForSetup(cliPath);
|
|
25
25
|
return !opts?.explicit && normalized === "imsg" || HOMEBREW_IMSG_PATHS.has(normalized);
|
|
26
26
|
}
|
|
27
|
-
const CHAT_TARGET_ALLOWFROM_PREFIXES = [
|
|
28
|
-
"chat_id:",
|
|
29
|
-
"chatid:",
|
|
30
|
-
"chat:",
|
|
31
|
-
"chat_guid:",
|
|
32
|
-
"chatguid:",
|
|
33
|
-
"guid:",
|
|
34
|
-
"chat_identifier:",
|
|
35
|
-
"chatidentifier:",
|
|
36
|
-
"chatident:"
|
|
37
|
-
];
|
|
38
|
-
const SERVICE_ALLOWFROM_PREFIXES = [
|
|
39
|
-
"imessage:",
|
|
40
|
-
"sms:",
|
|
41
|
-
"auto:"
|
|
42
|
-
];
|
|
43
|
-
function normalizeAllowFromEntryForPrefixCheck(entry) {
|
|
44
|
-
let lower = normalizeLowercaseStringOrEmpty(entry);
|
|
45
|
-
let stripped = true;
|
|
46
|
-
while (stripped) {
|
|
47
|
-
stripped = false;
|
|
48
|
-
for (const prefix of SERVICE_ALLOWFROM_PREFIXES) if (lower.startsWith(prefix)) {
|
|
49
|
-
lower = lower.slice(prefix.length).trim();
|
|
50
|
-
stripped = true;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return lower;
|
|
54
|
-
}
|
|
55
27
|
function parseIMessageAllowFromEntries(raw) {
|
|
56
28
|
return parseAllowFromEntries(raw, (entry) => {
|
|
57
|
-
const lower =
|
|
58
|
-
if (
|
|
29
|
+
const lower = normalizeLowercaseStringOrEmpty(entry).replace(/^(?:(?:imessage|sms|auto):\s*)+/, "");
|
|
30
|
+
if (IMESSAGE_CHAT_TARGET_PREFIX_RE.test(lower)) return { error: `iMessage allowFrom entries must be sender handles: ${entry}` };
|
|
59
31
|
if (!normalizeIMessageHandle(entry)) return { error: `Invalid handle: ${entry}` };
|
|
60
32
|
return { value: entry };
|
|
61
33
|
});
|
|
@@ -68,8 +40,15 @@ function buildIMessageSetupPatch(input) {
|
|
|
68
40
|
...input.region ? { region: input.region } : {}
|
|
69
41
|
};
|
|
70
42
|
}
|
|
71
|
-
|
|
72
|
-
|
|
43
|
+
const imessageDmPolicy = createChannelDmPolicy({
|
|
44
|
+
label: "iMessage",
|
|
45
|
+
channel,
|
|
46
|
+
resolveAccount: (cfg, accountId) => resolveIMessageAccount({
|
|
47
|
+
cfg,
|
|
48
|
+
accountId
|
|
49
|
+
}),
|
|
50
|
+
setupSurface: () => imessageSetupAdapter,
|
|
51
|
+
promptAllowFrom: async (params) => promptParsedAllowFromForAccount({
|
|
73
52
|
cfg: params.cfg,
|
|
74
53
|
accountId: params.accountId,
|
|
75
54
|
defaultAccountId: resolveDefaultIMessageAccountId(params.cfg),
|
|
@@ -97,17 +76,7 @@ async function promptIMessageAllowFrom(params) {
|
|
|
97
76
|
allowFrom,
|
|
98
77
|
setupSurface: imessageSetupAdapter
|
|
99
78
|
})
|
|
100
|
-
})
|
|
101
|
-
}
|
|
102
|
-
const imessageDmPolicy = createChannelDmPolicy({
|
|
103
|
-
label: "iMessage",
|
|
104
|
-
channel,
|
|
105
|
-
resolveAccount: (cfg, accountId) => resolveIMessageAccount({
|
|
106
|
-
cfg,
|
|
107
|
-
accountId: accountId ?? resolveDefaultIMessageAccountId(cfg)
|
|
108
|
-
}),
|
|
109
|
-
setupSurface: () => imessageSetupAdapter,
|
|
110
|
-
promptAllowFrom: promptIMessageAllowFrom
|
|
79
|
+
})
|
|
111
80
|
});
|
|
112
81
|
function createIMessageCliPathTextInput(shouldPrompt) {
|
|
113
82
|
return createCliPathTextInput({
|
|
@@ -122,7 +91,7 @@ function createIMessageCliPathTextInput(shouldPrompt) {
|
|
|
122
91
|
helpLines: [
|
|
123
92
|
"imsg CLI path required to enable iMessage.",
|
|
124
93
|
`Install imsg on the Messages Mac: ${IMESSAGE_INSTALL_COMMAND}`,
|
|
125
|
-
`Update imsg when channel
|
|
94
|
+
`Update imsg when channel checks report missing RPC or private API capabilities: ${IMESSAGE_UPDATE_COMMAND}`
|
|
126
95
|
]
|
|
127
96
|
});
|
|
128
97
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as resolveIMessageAccount } from "./accounts-
|
|
2
|
-
import { a as imessageCompletionNote, c as imessageSetupStatusBase, l as isAutoManagedIMessageCliPath, o as imessageDmPolicy, r as createIMessageCliPathTextInput, t as IMESSAGE_INSTALL_COMMAND, u as normalizeIMessageCliPathForSetup } from "./setup-core-
|
|
1
|
+
import { o as resolveIMessageAccount } from "./accounts-DacCvDBt.mjs";
|
|
2
|
+
import { a as imessageCompletionNote, c as imessageSetupStatusBase, l as isAutoManagedIMessageCliPath, o as imessageDmPolicy, r as createIMessageCliPathTextInput, t as IMESSAGE_INSTALL_COMMAND, u as normalizeIMessageCliPathForSetup } from "./setup-core-CaRGbZOL.mjs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import fs from "node:fs/promises";
|
|
5
5
|
import { createDetectedBinaryStatus, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
|
|
@@ -13,12 +13,32 @@ function normalizeBareIMessageChatIdentifier(raw) {
|
|
|
13
13
|
}
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region extensions/imessage/src/normalize.ts
|
|
16
|
-
const
|
|
17
|
-
"imessage
|
|
18
|
-
"sms
|
|
19
|
-
"auto
|
|
20
|
-
]
|
|
21
|
-
|
|
16
|
+
const IMESSAGE_SERVICE_PREFIXES = [
|
|
17
|
+
"imessage",
|
|
18
|
+
"sms",
|
|
19
|
+
"auto"
|
|
20
|
+
].map((service) => ({
|
|
21
|
+
service,
|
|
22
|
+
prefix: `${service}:`
|
|
23
|
+
}));
|
|
24
|
+
const IMESSAGE_CHAT_TARGET_PREFIXES = {
|
|
25
|
+
chatIdPrefixes: [
|
|
26
|
+
"chat_id:",
|
|
27
|
+
"chatid:",
|
|
28
|
+
"chat:"
|
|
29
|
+
],
|
|
30
|
+
chatGuidPrefixes: [
|
|
31
|
+
"chat_guid:",
|
|
32
|
+
"chatguid:",
|
|
33
|
+
"guid:"
|
|
34
|
+
],
|
|
35
|
+
chatIdentifierPrefixes: [
|
|
36
|
+
"chat_identifier:",
|
|
37
|
+
"chatidentifier:",
|
|
38
|
+
"chatident:"
|
|
39
|
+
]
|
|
40
|
+
};
|
|
41
|
+
const IMESSAGE_CHAT_TARGET_PREFIX_RE = new RegExp(`^(${Object.values(IMESSAGE_CHAT_TARGET_PREFIXES).flat().join("|")})`, "i");
|
|
22
42
|
function normalizeIMessageHandleValue(trimmed) {
|
|
23
43
|
if (trimmed.includes("@")) return normalizeLowercaseStringOrEmpty(trimmed);
|
|
24
44
|
const bareChatIdentifier = normalizeBareIMessageChatIdentifier(trimmed);
|
|
@@ -26,70 +46,43 @@ function normalizeIMessageHandleValue(trimmed) {
|
|
|
26
46
|
const normalized = isIMessagePhoneLikeHandle(trimmed) ? normalizeE164(trimmed) : "";
|
|
27
47
|
if (normalized) return normalized;
|
|
28
48
|
}
|
|
29
|
-
function
|
|
49
|
+
function normalizeIMessageHandleInput(raw, mode, allowContactName = false) {
|
|
30
50
|
const trimmed = raw.trim();
|
|
31
51
|
if (!trimmed) return "";
|
|
32
52
|
const lowered = normalizeLowercaseStringOrEmpty(trimmed);
|
|
33
|
-
for (const prefix of
|
|
34
|
-
const prefix = trimmed.match(
|
|
53
|
+
for (const { prefix } of IMESSAGE_SERVICE_PREFIXES) if (lowered.startsWith(prefix)) return normalizeIMessageHandleInput(trimmed.slice(prefix.length), mode);
|
|
54
|
+
const prefix = trimmed.match(IMESSAGE_CHAT_TARGET_PREFIX_RE)?.[0];
|
|
35
55
|
if (prefix) {
|
|
36
56
|
const value = trimmed.slice(prefix.length).trim();
|
|
37
|
-
|
|
57
|
+
const normalizedPrefix = normalizeLowercaseStringOrEmpty(prefix);
|
|
58
|
+
const canonicalPrefix = IMESSAGE_CHAT_TARGET_PREFIXES.chatIdPrefixes.includes(normalizedPrefix) ? "chat_id:" : IMESSAGE_CHAT_TARGET_PREFIXES.chatGuidPrefixes.includes(normalizedPrefix) ? "chat_guid:" : "chat_identifier:";
|
|
59
|
+
return `${mode === "sender" ? canonicalPrefix : normalizedPrefix}${value}`;
|
|
38
60
|
}
|
|
39
|
-
return normalizeIMessageHandleValue(trimmed) ?? (allowContactName ? trimmed.replace(/\s+/g, "") : "");
|
|
61
|
+
return normalizeIMessageHandleValue(trimmed) ?? (mode === "sender" || allowContactName ? trimmed.replace(/\s+/g, "") : "");
|
|
40
62
|
}
|
|
41
63
|
function normalizeIMessageMessagingTarget(raw) {
|
|
42
64
|
const trimmed = normalizeOptionalString(raw);
|
|
43
65
|
if (!trimmed) return;
|
|
44
66
|
const lower = normalizeLowercaseStringOrEmpty(trimmed);
|
|
45
|
-
for (const prefix of
|
|
46
|
-
const normalizedHandle =
|
|
67
|
+
for (const { prefix } of IMESSAGE_SERVICE_PREFIXES) if (lower.startsWith(prefix)) {
|
|
68
|
+
const normalizedHandle = normalizeIMessageHandleInput(trimmed.slice(prefix.length).trim(), "target", true);
|
|
47
69
|
if (!normalizedHandle) return;
|
|
48
|
-
if (
|
|
70
|
+
if (IMESSAGE_CHAT_TARGET_PREFIX_RE.test(normalizedHandle)) return normalizedHandle;
|
|
49
71
|
return `${prefix}${normalizedHandle}`;
|
|
50
72
|
}
|
|
51
|
-
return
|
|
73
|
+
return normalizeIMessageHandleInput(trimmed, "target") || void 0;
|
|
52
74
|
}
|
|
53
75
|
function looksLikeIMessageTargetId(raw) {
|
|
54
76
|
const trimmed = normalizeOptionalString(raw);
|
|
55
77
|
if (!trimmed) return false;
|
|
56
|
-
if (
|
|
78
|
+
if (IMESSAGE_CHAT_TARGET_PREFIX_RE.test(trimmed)) return true;
|
|
57
79
|
if (normalizeBareIMessageChatIdentifier(trimmed)) return true;
|
|
58
80
|
return /^(imessage:|sms:|auto:)/i.test(trimmed) || trimmed.includes("@") || isIMessagePhoneLikeHandle(trimmed) && Boolean(normalizeE164(trimmed));
|
|
59
81
|
}
|
|
60
82
|
//#endregion
|
|
61
83
|
//#region extensions/imessage/src/targets.ts
|
|
62
|
-
const CHAT_ID_PREFIXES = [
|
|
63
|
-
"chat_id:",
|
|
64
|
-
"chatid:",
|
|
65
|
-
"chat:"
|
|
66
|
-
];
|
|
67
|
-
const CHAT_GUID_PREFIXES = [
|
|
68
|
-
"chat_guid:",
|
|
69
|
-
"chatguid:",
|
|
70
|
-
"guid:"
|
|
71
|
-
];
|
|
72
|
-
const CHAT_IDENTIFIER_PREFIXES = [
|
|
73
|
-
"chat_identifier:",
|
|
74
|
-
"chatidentifier:",
|
|
75
|
-
"chatident:"
|
|
76
|
-
];
|
|
77
|
-
const SERVICE_PREFIXES = [
|
|
78
|
-
{
|
|
79
|
-
prefix: "imessage:",
|
|
80
|
-
service: "imessage"
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
prefix: "sms:",
|
|
84
|
-
service: "sms"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
prefix: "auto:",
|
|
88
|
-
service: "auto"
|
|
89
|
-
}
|
|
90
|
-
];
|
|
91
84
|
function parseServicePrefixedBareChatIdentifier(params) {
|
|
92
|
-
for (const { prefix } of
|
|
85
|
+
for (const { prefix } of IMESSAGE_SERVICE_PREFIXES) {
|
|
93
86
|
if (!params.lower.startsWith(prefix)) continue;
|
|
94
87
|
const chatIdentifier = normalizeBareIMessageChatIdentifier(params.trimmed.slice(prefix.length));
|
|
95
88
|
if (chatIdentifier) return {
|
|
@@ -99,16 +92,7 @@ function parseServicePrefixedBareChatIdentifier(params) {
|
|
|
99
92
|
}
|
|
100
93
|
}
|
|
101
94
|
function normalizeIMessageHandle(raw) {
|
|
102
|
-
|
|
103
|
-
if (!trimmed) return "";
|
|
104
|
-
const lowered = normalizeLowercaseStringOrEmpty(trimmed);
|
|
105
|
-
for (const { prefix } of SERVICE_PREFIXES) if (lowered.startsWith(prefix)) return normalizeIMessageHandle(trimmed.slice(prefix.length));
|
|
106
|
-
for (const [kind, prefixes] of [
|
|
107
|
-
["chat_id", CHAT_ID_PREFIXES],
|
|
108
|
-
["chat_guid", CHAT_GUID_PREFIXES],
|
|
109
|
-
["chat_identifier", CHAT_IDENTIFIER_PREFIXES]
|
|
110
|
-
]) for (const prefix of prefixes) if (lowered.startsWith(prefix)) return `${kind}:${trimmed.slice(prefix.length).trim()}`;
|
|
111
|
-
return normalizeIMessageHandleValue(trimmed) ?? trimmed.replace(/\s+/g, "");
|
|
95
|
+
return normalizeIMessageHandleInput(raw, "sender");
|
|
112
96
|
}
|
|
113
97
|
function parseIMessageTarget(raw) {
|
|
114
98
|
const trimmed = raw.trim();
|
|
@@ -122,10 +106,8 @@ function parseIMessageTarget(raw) {
|
|
|
122
106
|
const servicePrefixed = resolveServicePrefixedChatTarget({
|
|
123
107
|
trimmed,
|
|
124
108
|
lower,
|
|
125
|
-
servicePrefixes:
|
|
126
|
-
|
|
127
|
-
chatGuidPrefixes: CHAT_GUID_PREFIXES,
|
|
128
|
-
chatIdentifierPrefixes: CHAT_IDENTIFIER_PREFIXES,
|
|
109
|
+
servicePrefixes: IMESSAGE_SERVICE_PREFIXES,
|
|
110
|
+
...IMESSAGE_CHAT_TARGET_PREFIXES,
|
|
129
111
|
parseTarget: parseIMessageTarget
|
|
130
112
|
});
|
|
131
113
|
if (servicePrefixed) {
|
|
@@ -138,9 +120,7 @@ function parseIMessageTarget(raw) {
|
|
|
138
120
|
const chatTarget = parseChatTargetPrefixesOrThrow({
|
|
139
121
|
trimmed,
|
|
140
122
|
lower,
|
|
141
|
-
|
|
142
|
-
chatGuidPrefixes: CHAT_GUID_PREFIXES,
|
|
143
|
-
chatIdentifierPrefixes: CHAT_IDENTIFIER_PREFIXES
|
|
123
|
+
...IMESSAGE_CHAT_TARGET_PREFIXES
|
|
144
124
|
});
|
|
145
125
|
if (chatTarget) return chatTarget;
|
|
146
126
|
const bareChatIdentifier = normalizeBareIMessageChatIdentifier(trimmed);
|
|
@@ -159,7 +139,7 @@ function looksLikeIMessageExplicitTargetId(raw) {
|
|
|
159
139
|
if (!trimmed) return false;
|
|
160
140
|
const lower = normalizeLowercaseStringOrEmpty(trimmed);
|
|
161
141
|
if (/^(imessage:|sms:|auto:)/.test(lower)) return true;
|
|
162
|
-
return
|
|
142
|
+
return IMESSAGE_CHAT_TARGET_PREFIX_RE.test(lower) || Boolean(normalizeBareIMessageChatIdentifier(trimmed));
|
|
163
143
|
}
|
|
164
144
|
function inferIMessageTargetChatType(raw) {
|
|
165
145
|
try {
|
|
@@ -179,11 +159,9 @@ function parseIMessageAllowTarget(raw) {
|
|
|
179
159
|
const servicePrefixed = resolveServicePrefixedOrChatAllowTarget({
|
|
180
160
|
trimmed,
|
|
181
161
|
lower,
|
|
182
|
-
servicePrefixes:
|
|
162
|
+
servicePrefixes: IMESSAGE_SERVICE_PREFIXES,
|
|
183
163
|
parseAllowTarget: parseIMessageAllowTarget,
|
|
184
|
-
|
|
185
|
-
chatGuidPrefixes: CHAT_GUID_PREFIXES,
|
|
186
|
-
chatIdentifierPrefixes: CHAT_IDENTIFIER_PREFIXES
|
|
164
|
+
...IMESSAGE_CHAT_TARGET_PREFIXES
|
|
187
165
|
});
|
|
188
166
|
if (servicePrefixed) return servicePrefixed;
|
|
189
167
|
return {
|
|
@@ -212,4 +190,4 @@ function formatIMessageChatTarget(chatId) {
|
|
|
212
190
|
return `chat_id:${chatId}`;
|
|
213
191
|
}
|
|
214
192
|
//#endregion
|
|
215
|
-
export { looksLikeIMessageExplicitTargetId as a, parseIMessageTarget as c,
|
|
193
|
+
export { looksLikeIMessageExplicitTargetId as a, parseIMessageTarget as c, normalizeIMessageMessagingTarget as d, isIMessagePhoneLikeHandle as f, isAllowedIMessageSender as i, IMESSAGE_CHAT_TARGET_PREFIX_RE as l, inferIMessageTargetChatType as n, normalizeIMessageHandle as o, isAllowedIMessageReplyContextSender as r, parseIMessageAllowTarget as s, formatIMessageChatTarget as t, looksLikeIMessageTargetId as u };
|
package/dist/api.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as looksLikeIMessageExplicitTargetId, c as parseIMessageTarget,
|
|
2
|
-
import { a as resolveDefaultIMessageAccountId, i as listIMessageAccountIds, o as resolveIMessageAccount, r as listEnabledIMessageAccounts } from "./.setup/accounts-
|
|
3
|
-
import { o as IMESSAGE_ACTIONS, s as IMESSAGE_ACTION_NAMES } from "./.setup/message-tool-api-
|
|
4
|
-
import { v as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS } from "./.setup/client-
|
|
5
|
-
import { n as probeIMessage } from "./.setup/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 "./.setup/channel-
|
|
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 "./.setup/targets-B4oU7n-v.mjs";
|
|
2
|
+
import { a as resolveDefaultIMessageAccountId, i as listIMessageAccountIds, o as resolveIMessageAccount, r as listEnabledIMessageAccounts } from "./.setup/accounts-DacCvDBt.mjs";
|
|
3
|
+
import { o as IMESSAGE_ACTIONS, s as IMESSAGE_ACTION_NAMES } from "./.setup/message-tool-api-B5NfPnFL.mjs";
|
|
4
|
+
import { v as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS } from "./.setup/client-HixFQQWY.mjs";
|
|
5
|
+
import { n as probeIMessage } from "./.setup/actions-Hxh12myO.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 "./.setup/channel-9TWBUDkP.mjs";
|
|
7
7
|
import { t as createIMessageConversationBindingManager } from "./.setup/conversation-bindings-GDQ_Laxj.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 "./.setup/api-
|
|
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 "./.setup/api-DC1yHVGj.mjs";
|
|
9
9
|
import { t as IMESSAGE_LEGACY_OUTBOUND_SEND_DEP_KEYS } from "./.setup/outbound-send-deps-B-QEsLSM.mjs";
|
|
10
10
|
export { DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, IMESSAGE_ACTIONS, IMESSAGE_ACTION_NAMES, IMESSAGE_LEGACY_OUTBOUND_SEND_DEP_KEYS, createAllowedChatSenderMatcher, createIMessageConversationBindingManager, 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 };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as imessagePlugin } from "./.setup/channel-
|
|
1
|
+
import { t as imessagePlugin } from "./.setup/channel-9TWBUDkP.mjs";
|
|
2
2
|
export { imessagePlugin };
|
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 "./.setup/media-contract-
|
|
1
|
+
import { n as resolveIMessageAttachmentRoots, r as resolveIMessageRemoteAttachmentRoots, t as DEFAULT_IMESSAGE_ATTACHMENT_ROOTS } from "./.setup/media-contract-BwWs5PM7.mjs";
|
|
2
2
|
import "./media-contract-api.js";
|
|
3
3
|
export { DEFAULT_IMESSAGE_ATTACHMENT_ROOTS, resolveIMessageAttachmentRoots, resolveIMessageAttachmentRoots as resolveInboundAttachmentRoots, resolveIMessageRemoteAttachmentRoots, resolveIMessageRemoteAttachmentRoots as resolveRemoteInboundAttachmentRoots };
|
|
@@ -47,7 +47,7 @@ function normalizeChannelAccounts(params) {
|
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
/** Applies the same channel-specific doctor migration at root and account scope. */
|
|
50
|
-
function normalizeChannelConfigEntries(params) {
|
|
50
|
+
function normalizeChannelConfigEntries$1(params) {
|
|
51
51
|
const changes = params.changes ?? [];
|
|
52
52
|
const channels = params.cfg.channels;
|
|
53
53
|
const entry = asNullableRecord$1(channels?.[params.channelId]);
|
|
@@ -119,7 +119,7 @@ function createLegacyWebhookListenerDoctorContract(params) {
|
|
|
119
119
|
const root = asNullableRecord$1(asNullableRecord$1(cfg.channels)?.[params.channelKey]);
|
|
120
120
|
const inherited = root && source(root);
|
|
121
121
|
const canonicalRoot = asNullableRecord$1(root?.legacyWebhook);
|
|
122
|
-
return normalizeChannelConfigEntries({
|
|
122
|
+
return normalizeChannelConfigEntries$1({
|
|
123
123
|
cfg,
|
|
124
124
|
channelId: params.channelKey,
|
|
125
125
|
normalizeEntry: ({ entry, accountId, pathPrefix, changes }) => {
|
|
@@ -188,51 +188,27 @@ const legacyConfigRules = [{
|
|
|
188
188
|
match: (value) => imessageEntryHasRetiredCatchup(value)
|
|
189
189
|
}, ...streamingAliasMigration.legacyConfigRules];
|
|
190
190
|
function normalizeCompatibilityConfig({ cfg }) {
|
|
191
|
-
const
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
let accountsChanged = false;
|
|
207
|
-
const nextAccounts = { ...nextImessage.accounts };
|
|
208
|
-
for (const [id, account] of Object.entries(nextImessage.accounts)) if (isRecord(account) && Object.hasOwn(account, "catchup") && !isEnabledCatchup(account.catchup)) {
|
|
209
|
-
const nextAccount = { ...account };
|
|
210
|
-
delete nextAccount.catchup;
|
|
211
|
-
nextAccounts[id] = nextAccount;
|
|
212
|
-
accountsChanged = true;
|
|
213
|
-
changes.push(`Removed disabled retired channels.imessage.accounts.${id}.catchup.`);
|
|
214
|
-
}
|
|
215
|
-
if (accountsChanged) nextImessage.accounts = nextAccounts;
|
|
191
|
+
const catchup = (0, runtime_doctor_migrations_exports.normalizeChannelConfigEntries)({
|
|
192
|
+
cfg,
|
|
193
|
+
channelId: "imessage",
|
|
194
|
+
normalizeEntry: ({ entry, pathPrefix, changes }) => {
|
|
195
|
+
if (!Object.hasOwn(entry, "catchup") || isEnabledCatchup(entry.catchup)) return {
|
|
196
|
+
entry,
|
|
197
|
+
changed: false
|
|
198
|
+
};
|
|
199
|
+
const next = { ...entry };
|
|
200
|
+
delete next.catchup;
|
|
201
|
+
changes.push(`Removed disabled retired ${pathPrefix}.catchup.`);
|
|
202
|
+
return {
|
|
203
|
+
entry: next,
|
|
204
|
+
changed: true
|
|
205
|
+
};
|
|
216
206
|
}
|
|
217
|
-
}
|
|
218
|
-
const aliases = streamingAliasMigration.normalizeChannelConfig({
|
|
219
|
-
cfg: nextImessage === imessage ? cfg : {
|
|
220
|
-
...cfg,
|
|
221
|
-
channels: {
|
|
222
|
-
...channels,
|
|
223
|
-
imessage: nextImessage
|
|
224
|
-
}
|
|
225
|
-
},
|
|
226
|
-
changes
|
|
227
207
|
});
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
changes:
|
|
231
|
-
};
|
|
232
|
-
return {
|
|
233
|
-
config: aliases.config,
|
|
234
|
-
changes
|
|
235
|
-
};
|
|
208
|
+
return streamingAliasMigration.normalizeChannelConfig({
|
|
209
|
+
cfg: catchup.config,
|
|
210
|
+
changes: catchup.changes
|
|
211
|
+
});
|
|
236
212
|
}
|
|
237
213
|
//#endregion
|
|
238
214
|
//#region extensions/imessage/doctor-contract-api.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as resolveIMessageAttachmentRoots, r as resolveIMessageRemoteAttachmentRoots, t as DEFAULT_IMESSAGE_ATTACHMENT_ROOTS } from "./.setup/media-contract-
|
|
1
|
+
import { n as resolveIMessageAttachmentRoots, r as resolveIMessageRemoteAttachmentRoots, t as DEFAULT_IMESSAGE_ATTACHMENT_ROOTS } from "./.setup/media-contract-BwWs5PM7.mjs";
|
|
2
2
|
export { DEFAULT_IMESSAGE_ATTACHMENT_ROOTS, resolveIMessageAttachmentRoots, resolveIMessageAttachmentRoots as resolveInboundAttachmentRoots, resolveIMessageRemoteAttachmentRoots, resolveIMessageRemoteAttachmentRoots as resolveRemoteInboundAttachmentRoots };
|
package/dist/message-tool-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as describeIMessageMessageTool } from "./.setup/message-tool-api-
|
|
1
|
+
import { t as describeIMessageMessageTool } from "./.setup/message-tool-api-B5NfPnFL.mjs";
|
|
2
2
|
export { describeIMessageMessageTool as describeMessageTool };
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as imessageMessageActions } from "./.setup/actions-
|
|
1
|
+
import { t as imessageMessageActions } from "./.setup/actions-Hxh12myO.mjs";
|
|
2
2
|
import { r as setIMessageRuntime } from "./.setup/runtime-Cza4CY5T.mjs";
|
|
3
3
|
export { imessageMessageActions, setIMessageRuntime };
|
package/dist/setup-entry.js
CHANGED
|
@@ -4,7 +4,7 @@ import { fileURLToPath } from "node:url";
|
|
|
4
4
|
var setup_entry_default = defineBundledChannelSetupEntry({
|
|
5
5
|
importMetaUrl: import.meta.url,
|
|
6
6
|
plugin: {
|
|
7
|
-
specifier: fileURLToPath(new URL(".setup/api-
|
|
7
|
+
specifier: fileURLToPath(new URL(".setup/api-BV8qHfLl.mjs", import.meta.url).href),
|
|
8
8
|
exportName: "imessageSetupPlugin"
|
|
9
9
|
}
|
|
10
10
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as normalizeIMessageHandle } from "../.setup/targets-
|
|
1
|
+
import { o as normalizeIMessageHandle } from "../.setup/targets-B4oU7n-v.mjs";
|
|
2
2
|
import { executeSqliteQuerySync, executeSqliteQueryTakeFirstSync, getNodeSqliteKysely, openNodeSqliteDatabase } from "openclaw/plugin-sdk/sqlite-worker-runtime";
|
|
3
3
|
//#region extensions/imessage/src/chat-db.worker.ts
|
|
4
4
|
function appleMessageDateLowerBoundMs(sentAfterMs) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/imessage",
|
|
3
|
-
"version": "2026.10.1",
|
|
3
|
+
"version": "2026.10.5-beta.1",
|
|
4
4
|
"description": "OpenClaw iMessage channel plugin using imsg on a signed-in Mac",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"zod": "4.6.5"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"openclaw": ">=2026.10.1"
|
|
15
|
+
"openclaw": ">=2026.10.5-beta.1"
|
|
16
16
|
},
|
|
17
17
|
"peerDependenciesMeta": {
|
|
18
18
|
"openclaw": {
|
|
@@ -92,10 +92,10 @@
|
|
|
92
92
|
"allowInvalidConfigRecovery": true
|
|
93
93
|
},
|
|
94
94
|
"compat": {
|
|
95
|
-
"pluginApi": ">=2026.10.1"
|
|
95
|
+
"pluginApi": ">=2026.10.5-beta.1"
|
|
96
96
|
},
|
|
97
97
|
"build": {
|
|
98
|
-
"openclawVersion": "2026.10.1",
|
|
98
|
+
"openclawVersion": "2026.10.5-beta.1",
|
|
99
99
|
"bundledDist": false,
|
|
100
100
|
"workerEntries": [
|
|
101
101
|
"./src/chat-db.worker.ts"
|