@openclaw/imessage 2026.9.1-beta.1 → 2026.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{accounts-DIpGOIiN.js → accounts-CCirBEIm.js} +2 -3
- package/dist/{actions.runtime-BhggncbG.js → actions.runtime-D5MAgeSs.js} +5 -5
- package/dist/api.js +5 -5
- package/dist/{approval-handler.runtime-BC-YsgAf.js → approval-handler.runtime-47rs6THN.js} +14 -9
- package/dist/{approval-reactions-Cvwmdlev.js → approval-reactions-sVpDno7d.js} +8 -16
- package/dist/{channel-CnKQ2MVB.js → channel-BxraMrmK.js} +21 -14
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.runtime-BQLCh7bE.js → channel.runtime-2jwkMPGR.js} +59 -14
- 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-BipELT2x.js → group-policy-Cp8SDG4G.js} +18 -12
- package/dist/media-contract-api.js +1 -1
- package/dist/{media-contract-BVXuQHG2.js → media-contract-pns3TSS5.js} +3 -2
- package/dist/{message-tool-api-BwIxJDoz.js → message-tool-api-CUoFESHj.js} +11 -6
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-DRD_Dnp9.js → monitor-CESwxMQ4.js} +319 -48
- package/dist/{question-reactions-viP7ZcyG.js → question-reactions-9tBYB1_F.js} +4 -7
- package/dist/{reaction-context-BAYI7pz0.js → reaction-context-Br-vAJFp.js} +9 -3
- package/dist/{remote-file-CyTTuRAt.js → remote-file-Biz5PjXi.js} +5 -53
- package/dist/runtime-Cza4CY5T.js +8 -0
- package/dist/runtime-api.js +7 -7
- package/dist/{sanitize-outbound-g651fIhi.js → sanitize-outbound-Bvo4g1Mp.js} +470 -82
- package/dist/{send-DVQY6M5M.js → send-DC981dqK.js} +146 -23
- package/dist/state-contract-DvahEY4X.js +56 -0
- package/dist/state-migrations-D-fyHVcb.js +277 -0
- package/node_modules/typebox/build/format/email.mjs +1 -1
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +19 -1
- package/node_modules/typebox/build/format/json_pointer.d.mts +2 -2
- package/node_modules/typebox/build/format/json_pointer.mjs +2 -2
- package/node_modules/typebox/build/format/json_pointer_uri_fragment.d.mts +2 -2
- package/node_modules/typebox/build/format/json_pointer_uri_fragment.mjs +2 -2
- package/node_modules/typebox/build/format/relative_json_pointer.d.mts +2 -2
- package/node_modules/typebox/build/format/relative_json_pointer.mjs +2 -2
- package/node_modules/typebox/build/system/memory/assign.mjs +2 -1
- package/node_modules/typebox/build/system/memory/create.mjs +3 -4
- package/node_modules/typebox/build/system/memory/discard.mjs +2 -2
- package/node_modules/typebox/build/system/memory/freeze.d.mts +4 -0
- package/node_modules/typebox/build/system/memory/freeze.mjs +6 -0
- package/node_modules/typebox/build/system/memory/update.mjs +3 -2
- package/node_modules/typebox/package.json +1 -1
- package/openclaw.plugin.json +2 -7
- package/package.json +5 -5
- package/dist/catchup-Dh-Rv4Ur.js +0 -294
- package/dist/monitor-reply-cache-BdeUQaHO.js +0 -353
- package/dist/persisted-echo-cache-DGxy-J4t.js +0 -143
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as resolveLocalIMessageChatDbPath
|
|
2
|
-
import {
|
|
1
|
+
import { p as resolveLocalIMessageChatDbPath } from "./accounts-CCirBEIm.js";
|
|
2
|
+
import { _ as isIMessageEmailChatIdentifier, f as resolveIMessageCachedResourceBinding, g as chatContextFromIMessageTarget, p as resolveIMessageMessageId } from "./sanitize-outbound-Bvo4g1Mp.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { normalizeScpRemoteHost } from "openclaw/plugin-sdk/host-runtime";
|
|
5
5
|
import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
|
|
@@ -8,54 +8,6 @@ import { randomUUID } from "node:crypto";
|
|
|
8
8
|
import { runCommandWithTimeout } from "openclaw/plugin-sdk/process-runtime";
|
|
9
9
|
import { openNodeSqliteDatabase } from "openclaw/plugin-sdk/sqlite-runtime";
|
|
10
10
|
import { sanitizeTempFileName } from "openclaw/plugin-sdk/temp-path";
|
|
11
|
-
//#region extensions/imessage/src/cli-output.ts
|
|
12
|
-
const IMESSAGE_CLI_STDOUT_MAX_BYTES = 8 * 1024 * 1024;
|
|
13
|
-
const IMESSAGE_CLI_STDERR_TAIL_BYTES = 64 * 1024;
|
|
14
|
-
function parseLastJsonObject(stdout) {
|
|
15
|
-
const last = stdout.split(/\r?\n/u).findLast((line) => line.trim().length > 0)?.trim();
|
|
16
|
-
if (!last) return null;
|
|
17
|
-
try {
|
|
18
|
-
const value = JSON.parse(last);
|
|
19
|
-
return value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
20
|
-
} catch {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
async function runIMessageCliJsonCommand(params) {
|
|
25
|
-
const dbPath = params.dbPath?.trim();
|
|
26
|
-
const result = await runCommandWithTimeout([
|
|
27
|
-
expandIMessageUserPath(params.cliPath),
|
|
28
|
-
...params.args,
|
|
29
|
-
...dbPath ? ["--db", dbPath] : [],
|
|
30
|
-
"--json"
|
|
31
|
-
], {
|
|
32
|
-
killProcessTree: true,
|
|
33
|
-
maxOutputBytes: {
|
|
34
|
-
stdout: IMESSAGE_CLI_STDOUT_MAX_BYTES,
|
|
35
|
-
stderr: IMESSAGE_CLI_STDERR_TAIL_BYTES
|
|
36
|
-
},
|
|
37
|
-
outputCapture: {
|
|
38
|
-
stdout: "head",
|
|
39
|
-
stderr: "tail"
|
|
40
|
-
},
|
|
41
|
-
terminateOnOutputLimit: { stdout: true },
|
|
42
|
-
timeoutMs: params.timeoutMs
|
|
43
|
-
});
|
|
44
|
-
if (result.termination === "timeout") throw new Error(`iMessage action timed out after ${params.timeoutMs}ms`);
|
|
45
|
-
if (result.outputLimitExceeded || result.stdoutTruncatedBytes) throw new Error(`imsg stdout exceeded ${IMESSAGE_CLI_STDOUT_MAX_BYTES} bytes`);
|
|
46
|
-
const parsed = parseLastJsonObject(result.stdout);
|
|
47
|
-
if (result.code !== 0) {
|
|
48
|
-
const detail = typeof parsed?.error === "string" && parsed.error.trim() || result.stderr.trim() || result.stdout.trim() || `imsg exited with code ${result.code}`;
|
|
49
|
-
throw new Error(detail);
|
|
50
|
-
}
|
|
51
|
-
if (!parsed) throw new Error(`imsg returned non-JSON output: ${result.stdout.trim() || result.stderr.trim()}`);
|
|
52
|
-
if (parsed.success === false) {
|
|
53
|
-
const detail = typeof parsed.error === "string" && parsed.error.trim() ? parsed.error.trim() : "iMessage action failed";
|
|
54
|
-
throw new Error(detail);
|
|
55
|
-
}
|
|
56
|
-
return parsed;
|
|
57
|
-
}
|
|
58
|
-
//#endregion
|
|
59
11
|
//#region extensions/imessage/src/message-resource-db.ts
|
|
60
12
|
function normalizeIMessageMessageGuidForLookup(messageId) {
|
|
61
13
|
const trimmed = messageId.trim();
|
|
@@ -213,8 +165,8 @@ async function runChecked(run, label, argv, options) {
|
|
|
213
165
|
const result = await run(argv, {
|
|
214
166
|
killProcessTree: true,
|
|
215
167
|
maxOutputBytes: {
|
|
216
|
-
stdout:
|
|
217
|
-
stderr:
|
|
168
|
+
stdout: 4096,
|
|
169
|
+
stderr: 65536
|
|
218
170
|
},
|
|
219
171
|
outputCapture: {
|
|
220
172
|
stdout: "head",
|
|
@@ -290,4 +242,4 @@ rm -rf -- ${remoteDir}
|
|
|
290
242
|
}
|
|
291
243
|
}
|
|
292
244
|
//#endregion
|
|
293
|
-
export {
|
|
245
|
+
export { authorizeIMessageResourceReference as n, resolveAuthorizedIMessageReplyReference as r, withIMessageRemoteFile as t };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
2
|
+
//#region extensions/imessage/src/runtime.ts
|
|
3
|
+
const { getRuntime: getIMessageRuntime, setRuntime: setIMessageRuntime, tryGetRuntime: getOptionalIMessageRuntime } = createPluginRuntimeStore({
|
|
4
|
+
pluginId: "imessage",
|
|
5
|
+
errorMessage: "iMessage runtime not initialized"
|
|
6
|
+
});
|
|
7
|
+
//#endregion
|
|
8
|
+
export { getOptionalIMessageRuntime as n, setIMessageRuntime as r, getIMessageRuntime as t };
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { o as resolveIMessageAccount } from "./accounts-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as IMessageConfigSchema } from "./config-schema-
|
|
5
|
-
import { t as sendMessageIMessage } from "./send-
|
|
6
|
-
import { t as monitorIMessageProvider } from "./monitor-
|
|
1
|
+
import { o as resolveIMessageAccount } from "./accounts-CCirBEIm.js";
|
|
2
|
+
import { c as normalizeIMessageMessagingTarget, d as imessageMessageActions, f as probeIMessage, n as resolveIMessageGroupToolPolicy, s as looksLikeIMessageTargetId, t as resolveIMessageGroupRequireMention } from "./group-policy-Cp8SDG4G.js";
|
|
3
|
+
import { r as setIMessageRuntime } from "./runtime-Cza4CY5T.js";
|
|
4
|
+
import { n as IMessageConfigSchema } from "./config-schema-DuGbA8Kp.js";
|
|
5
|
+
import { t as sendMessageIMessage } from "./send-DC981dqK.js";
|
|
6
|
+
import { t as monitorIMessageProvider } from "./monitor-CESwxMQ4.js";
|
|
7
7
|
import { formatTrimmedAllowFromEntries } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
8
8
|
import { buildComputedAccountStatusSnapshot, collectStatusIssuesFromLastError } from "openclaw/plugin-sdk/status-helpers";
|
|
9
|
-
import { resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/
|
|
9
|
+
import { resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/account-helpers";
|
|
10
10
|
import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
|
|
11
11
|
import { DEFAULT_ACCOUNT_ID, getChatChannelMeta } from "openclaw/plugin-sdk/core";
|
|
12
12
|
import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
|