remoteclaw 0.1.0-next.b9d22ea → 0.1.0-next.e3d3913
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-6bE7_6RL.js → accounts-DesSv1wD.js} +1 -1
- package/dist/boot/handler.js +29 -29
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-BZbNMyql.js → channel-activity-hPfValKp.js} +2 -2
- package/dist/command-logger/handler.js +1 -1
- package/dist/{fetch-BFuS-EfP.js → fetch-DMmdxAp3.js} +1 -1
- package/dist/{media-BrtsoHDf.js → media-DHIjuVaq.js} +47 -47
- package/dist/{outbound-attachment-DvxfVMMN.js → outbound-attachment-D0PBuR8U.js} +2 -2
- package/dist/{retry-D_-vU9CD.js → retry-C81p7BZU.js} +1 -1
- package/dist/{secure-random-B7stcuHs.js → secure-random-C8Siev1-.js} +1 -1
- package/dist/{send-fmudAAFF.js → send-1l8en2au.js} +3 -3
- package/dist/{send-uNEzfw9q.js → send-B8r5IJ7q.js} +6 -6
- package/dist/{send-C2BVmzi6.js → send-BdYZ_7sw.js} +7 -7
- package/dist/{send-DD5szdZD.js → send-Bt4yJ4_Z.js} +13 -13
- package/dist/{send-DIO6FcGs.js → send-DAJqND45.js} +4 -4
- package/dist/send-DlK-DVCQ.js +11 -0
- package/dist/{store-Bxy7EHAf.js → store-C6xUjjK-.js} +5 -5
- package/dist/{subsystem-C_FedsH7.js → subsystem-CDhxwtDd.js} +18 -18
- package/dist/{tables-BO6GU4qX.js → tables-DoSY1jjh.js} +1 -1
- package/dist/{targets-B-hWtwfx.js → targets-BDsqoJet.js} +3 -3
- package/dist/{targets-CMhBAn87.js → targets-JCISV-hS.js} +3 -3
- package/dist/{usage-DY7X9Iud.js → usage-BXUxy7CN.js} +56 -56
- package/dist/{web-C5EBMd1-.js → web-CmJpHiFE.js} +16 -16
- package/package.json +1 -1
- package/dist/send-D9zlp5S9.js +0 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as createAccountListHelpers, V as resolveAccountEntry, ft as normalizeAccountId } from "./media-
|
|
1
|
+
import { B as createAccountListHelpers, V as resolveAccountEntry, ft as normalizeAccountId } from "./media-DHIjuVaq.js";
|
|
2
2
|
|
|
3
3
|
//#region src/imessage/accounts.ts
|
|
4
4
|
const { listAccountIds, resolveDefaultAccountId } = createAccountListHelpers("imessage");
|
package/dist/boot/handler.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { $ as normalizeModelRef, A as normalizeChannelId, G as isGatewayMessageChannel, J as normalizeMessageChannel, K as isInternalMessageChannel, O as getChannelPlugin, Q as isCliProvider, U as INTERNAL_MESSAGE_CHANNEL, W as isDeliverableMessageChannel, Y as resolveMessageChannel, _ as resolveTextChunkLimit, at as resolveSessionAgentId, ct as normalizeAgentId, d as getAgentScopedMediaLocalRoots, ft as normalizeAccountId, g as resolveChunkMode, h as chunkMarkdownTextWithMode, it as resolveAgentWorkspaceDir, k as listChannelPlugins, lt as normalizeMainKey, m as chunkByParagraph, nt as listAgentIds, p as resolveMarkdownTableMode, q as listDeliverableMessageChannels, rt as resolveAgentConfig, tt as formatCliCommand, ut as resolveAgentIdFromSessionKey, x as loadConfig } from "../media-
|
|
2
|
-
import { D as createInternalHookEvent, M as resolveGatewayPort, O as isGatewayStartupEvent, P as resolveStateDir, k as triggerInternalHook, n as defaultRuntime, s as getActivePluginRegistry, t as createSubsystemLogger } from "../subsystem-
|
|
3
|
-
import { A as parseSessionThreadInfo, B as resolveChannelResetConfig, C as DEFAULT_CONTEXT_TOKENS, D as setCliSessionId, E as getCliSessionId, F as updateSessionStore, G as resolveSessionTranscriptPath, H as resolveSessionResetType, I as normalizeAccountId$1, J as resolveExplicitAgentSessionKey, K as resolveStorePath, M as resolveMirroredTranscriptText, N as resolveAndPersistSessionFile, O as resolveChannelMessageToolHints, P as loadSessionStore, R as resolveSessionKey, S as ensureAgentWorkspace, T as DEFAULT_PROVIDER, U as setSessionRuntimeModel, V as resolveSessionResetPolicy, W as resolveSessionFilePathOptions, X as ensureAuthProfileStore, Y as resolveMainSessionKey, Z as SILENT_REPLY_TOKEN, _ as formatThinkingLevels, a as parseReplyDirectives, b as normalizeVerboseLevel, c as AGENT_LANE_NESTED, d as ChannelBridge, f as getGlobalHookRunner, g as resolveGatewayCredentialsFromConfig, h as registerAgentRunContext, i as shouldSuppressReasoningPayload, j as appendAssistantMessageToSessionTranscript, k as clearSessionAuthProfileOverride, l as resolveSendPolicy, m as emitAgentEvent, n as hasNonzeroUsage, o as resolveOutboundTarget, p as clearAgentRunContext, q as resolveAgentMainSessionKey, r as isRenderablePayload, s as resolveSessionDeliveryTarget, t as deriveSessionTotalTokens, u as applyVerboseOverride, v as formatXHighModelHint, w as DEFAULT_MODEL, x as supportsXHighThinking, y as normalizeThinkLevel, z as evaluateSessionFreshness } from "../usage-
|
|
4
|
-
import "../targets-
|
|
5
|
-
import "../accounts-
|
|
6
|
-
import { t as generateSecureUuid } from "../secure-random-
|
|
7
|
-
import "../fetch-
|
|
8
|
-
import "../retry-
|
|
9
|
-
import "../targets-
|
|
10
|
-
import { n as markdownToSignalTextChunks, t as sendMessageSignal } from "../send-
|
|
11
|
-
import "../store-
|
|
12
|
-
import "../outbound-attachment-
|
|
1
|
+
import { $ as normalizeModelRef, A as normalizeChannelId, G as isGatewayMessageChannel, J as normalizeMessageChannel, K as isInternalMessageChannel, O as getChannelPlugin, Q as isCliProvider, U as INTERNAL_MESSAGE_CHANNEL, W as isDeliverableMessageChannel, Y as resolveMessageChannel, _ as resolveTextChunkLimit, at as resolveSessionAgentId, ct as normalizeAgentId, d as getAgentScopedMediaLocalRoots, ft as normalizeAccountId, g as resolveChunkMode, h as chunkMarkdownTextWithMode, it as resolveAgentWorkspaceDir, k as listChannelPlugins, lt as normalizeMainKey, m as chunkByParagraph, nt as listAgentIds, p as resolveMarkdownTableMode, q as listDeliverableMessageChannels, rt as resolveAgentConfig, tt as formatCliCommand, ut as resolveAgentIdFromSessionKey, x as loadConfig } from "../media-DHIjuVaq.js";
|
|
2
|
+
import { D as createInternalHookEvent, M as resolveGatewayPort, O as isGatewayStartupEvent, P as resolveStateDir, k as triggerInternalHook, n as defaultRuntime, s as getActivePluginRegistry, t as createSubsystemLogger } from "../subsystem-CDhxwtDd.js";
|
|
3
|
+
import { A as parseSessionThreadInfo, B as resolveChannelResetConfig, C as DEFAULT_CONTEXT_TOKENS, D as setCliSessionId, E as getCliSessionId, F as updateSessionStore, G as resolveSessionTranscriptPath, H as resolveSessionResetType, I as normalizeAccountId$1, J as resolveExplicitAgentSessionKey, K as resolveStorePath, M as resolveMirroredTranscriptText, N as resolveAndPersistSessionFile, O as resolveChannelMessageToolHints, P as loadSessionStore, R as resolveSessionKey, S as ensureAgentWorkspace, T as DEFAULT_PROVIDER, U as setSessionRuntimeModel, V as resolveSessionResetPolicy, W as resolveSessionFilePathOptions, X as ensureAuthProfileStore, Y as resolveMainSessionKey, Z as SILENT_REPLY_TOKEN, _ as formatThinkingLevels, a as parseReplyDirectives, b as normalizeVerboseLevel, c as AGENT_LANE_NESTED, d as ChannelBridge, f as getGlobalHookRunner, g as resolveGatewayCredentialsFromConfig, h as registerAgentRunContext, i as shouldSuppressReasoningPayload, j as appendAssistantMessageToSessionTranscript, k as clearSessionAuthProfileOverride, l as resolveSendPolicy, m as emitAgentEvent, n as hasNonzeroUsage, o as resolveOutboundTarget, p as clearAgentRunContext, q as resolveAgentMainSessionKey, r as isRenderablePayload, s as resolveSessionDeliveryTarget, t as deriveSessionTotalTokens, u as applyVerboseOverride, v as formatXHighModelHint, w as DEFAULT_MODEL, x as supportsXHighThinking, y as normalizeThinkLevel, z as evaluateSessionFreshness } from "../usage-BXUxy7CN.js";
|
|
4
|
+
import "../targets-JCISV-hS.js";
|
|
5
|
+
import "../accounts-DesSv1wD.js";
|
|
6
|
+
import { t as generateSecureUuid } from "../secure-random-C8Siev1-.js";
|
|
7
|
+
import "../fetch-DMmdxAp3.js";
|
|
8
|
+
import "../retry-C81p7BZU.js";
|
|
9
|
+
import "../targets-BDsqoJet.js";
|
|
10
|
+
import { n as markdownToSignalTextChunks, t as sendMessageSignal } from "../send-DAJqND45.js";
|
|
11
|
+
import "../store-C6xUjjK-.js";
|
|
12
|
+
import "../outbound-attachment-D0PBuR8U.js";
|
|
13
13
|
import path from "node:path";
|
|
14
|
-
import
|
|
15
|
-
import fs from "node:fs/promises";
|
|
14
|
+
import fs from "node:fs";
|
|
15
|
+
import fs$1 from "node:fs/promises";
|
|
16
16
|
import crypto from "node:crypto";
|
|
17
17
|
|
|
18
18
|
//#region src/cli/outbound-send-mapping.ts
|
|
@@ -32,27 +32,27 @@ function createOutboundSendDepsFromCliSource(deps) {
|
|
|
32
32
|
function createDefaultDeps() {
|
|
33
33
|
return {
|
|
34
34
|
sendMessageWhatsApp: async (...args) => {
|
|
35
|
-
const { sendMessageWhatsApp } = await import("../web-
|
|
35
|
+
const { sendMessageWhatsApp } = await import("../web-CmJpHiFE.js");
|
|
36
36
|
return await sendMessageWhatsApp(...args);
|
|
37
37
|
},
|
|
38
38
|
sendMessageTelegram: async (...args) => {
|
|
39
|
-
const { sendMessageTelegram } = await import("../send-
|
|
39
|
+
const { sendMessageTelegram } = await import("../send-Bt4yJ4_Z.js");
|
|
40
40
|
return await sendMessageTelegram(...args);
|
|
41
41
|
},
|
|
42
42
|
sendMessageDiscord: async (...args) => {
|
|
43
|
-
const { sendMessageDiscord } = await import("../send-
|
|
43
|
+
const { sendMessageDiscord } = await import("../send-DlK-DVCQ.js");
|
|
44
44
|
return await sendMessageDiscord(...args);
|
|
45
45
|
},
|
|
46
46
|
sendMessageSlack: async (...args) => {
|
|
47
|
-
const { sendMessageSlack } = await import("../send-
|
|
47
|
+
const { sendMessageSlack } = await import("../send-1l8en2au.js");
|
|
48
48
|
return await sendMessageSlack(...args);
|
|
49
49
|
},
|
|
50
50
|
sendMessageSignal: async (...args) => {
|
|
51
|
-
const { sendMessageSignal } = await import("../send-
|
|
51
|
+
const { sendMessageSignal } = await import("../send-BdYZ_7sw.js");
|
|
52
52
|
return await sendMessageSignal(...args);
|
|
53
53
|
},
|
|
54
54
|
sendMessageIMessage: async (...args) => {
|
|
55
|
-
const { sendMessageIMessage } = await import("../send-
|
|
55
|
+
const { sendMessageIMessage } = await import("../send-B8r5IJ7q.js");
|
|
56
56
|
return await sendMessageIMessage(...args);
|
|
57
57
|
}
|
|
58
58
|
};
|
|
@@ -253,11 +253,11 @@ function resolveFailedDir(stateDir) {
|
|
|
253
253
|
/** Ensure the queue directory (and failed/ subdirectory) exist. */
|
|
254
254
|
async function ensureQueueDir(stateDir) {
|
|
255
255
|
const queueDir = resolveQueueDir(stateDir);
|
|
256
|
-
await
|
|
256
|
+
await fs.promises.mkdir(queueDir, {
|
|
257
257
|
recursive: true,
|
|
258
258
|
mode: 448
|
|
259
259
|
});
|
|
260
|
-
await
|
|
260
|
+
await fs.promises.mkdir(resolveFailedDir(stateDir), {
|
|
261
261
|
recursive: true,
|
|
262
262
|
mode: 448
|
|
263
263
|
});
|
|
@@ -284,18 +284,18 @@ async function enqueueDelivery(params, stateDir) {
|
|
|
284
284
|
const filePath = path.join(queueDir, `${id}.json`);
|
|
285
285
|
const tmp = `${filePath}.${process.pid}.tmp`;
|
|
286
286
|
const json = JSON.stringify(entry, null, 2);
|
|
287
|
-
await
|
|
287
|
+
await fs.promises.writeFile(tmp, json, {
|
|
288
288
|
encoding: "utf-8",
|
|
289
289
|
mode: 384
|
|
290
290
|
});
|
|
291
|
-
await
|
|
291
|
+
await fs.promises.rename(tmp, filePath);
|
|
292
292
|
return id;
|
|
293
293
|
}
|
|
294
294
|
/** Remove a successfully delivered entry from the queue. */
|
|
295
295
|
async function ackDelivery(id, stateDir) {
|
|
296
296
|
const filePath = path.join(resolveQueueDir(stateDir), `${id}.json`);
|
|
297
297
|
try {
|
|
298
|
-
await
|
|
298
|
+
await fs.promises.unlink(filePath);
|
|
299
299
|
} catch (err) {
|
|
300
300
|
if ((err && typeof err === "object" && "code" in err ? String(err.code) : null) !== "ENOENT") throw err;
|
|
301
301
|
}
|
|
@@ -303,16 +303,16 @@ async function ackDelivery(id, stateDir) {
|
|
|
303
303
|
/** Update a queue entry after a failed delivery attempt. */
|
|
304
304
|
async function failDelivery(id, error, stateDir) {
|
|
305
305
|
const filePath = path.join(resolveQueueDir(stateDir), `${id}.json`);
|
|
306
|
-
const raw = await
|
|
306
|
+
const raw = await fs.promises.readFile(filePath, "utf-8");
|
|
307
307
|
const entry = JSON.parse(raw);
|
|
308
308
|
entry.retryCount += 1;
|
|
309
309
|
entry.lastError = error;
|
|
310
310
|
const tmp = `${filePath}.${process.pid}.tmp`;
|
|
311
|
-
await
|
|
311
|
+
await fs.promises.writeFile(tmp, JSON.stringify(entry, null, 2), {
|
|
312
312
|
encoding: "utf-8",
|
|
313
313
|
mode: 384
|
|
314
314
|
});
|
|
315
|
-
await
|
|
315
|
+
await fs.promises.rename(tmp, filePath);
|
|
316
316
|
}
|
|
317
317
|
|
|
318
318
|
//#endregion
|
|
@@ -1341,7 +1341,7 @@ async function resolveBootPrompt(boot, workspaceDir) {
|
|
|
1341
1341
|
if (boot.file !== void 0) {
|
|
1342
1342
|
const filePath = path.isAbsolute(boot.file) ? boot.file : path.join(workspaceDir, boot.file);
|
|
1343
1343
|
try {
|
|
1344
|
-
const trimmed = (await fs.readFile(filePath, "utf-8")).trim();
|
|
1344
|
+
const trimmed = (await fs$1.readFile(filePath, "utf-8")).trim();
|
|
1345
1345
|
if (!trimmed) return { status: "empty" };
|
|
1346
1346
|
return {
|
|
1347
1347
|
status: "ok",
|
package/dist/build-info.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.1.0-next.
|
|
3
|
-
"commit": "
|
|
4
|
-
"builtAt": "2026-03-
|
|
2
|
+
"version": "0.1.0-next.e3d3913",
|
|
3
|
+
"commit": "e3d3913af311c352fe887cba789f35e7baa5f30c",
|
|
4
|
+
"builtAt": "2026-03-07T17:23:24.159Z"
|
|
5
5
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
c5b98c34274a88195207ff5d0954db9e897e930eb2d60f95a70bc08b5a407591
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as resolveNodeRequireFromMeta, t as createSubsystemLogger } from "./subsystem-
|
|
2
|
-
import { n as retryAsync, t as resolveRetryConfig } from "./retry-
|
|
1
|
+
import { T as resolveNodeRequireFromMeta, t as createSubsystemLogger } from "./subsystem-CDhxwtDd.js";
|
|
2
|
+
import { n as retryAsync, t as resolveRetryConfig } from "./retry-C81p7BZU.js";
|
|
3
3
|
import { RateLimitError } from "@buape/carbon";
|
|
4
4
|
|
|
5
5
|
//#region src/security/safe-regex.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as resolveStateDir, t as createSubsystemLogger } from "../subsystem-
|
|
1
|
+
import { P as resolveStateDir, t as createSubsystemLogger } from "../subsystem-CDhxwtDd.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import fs from "node:fs/promises";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { A as resolveConfigPath, E as resolvePreferredRemoteClawTmpDir, I as resolveRequiredHomeDir, N as resolveOAuthDir, P as resolveStateDir, S as warn, _ as isPlainObject$2, a as normalizeAnyChannelId, b as logVerboseConsole, c as requireActivePluginRegistry, d as isRecord, f as normalizeE164, i as CHAT_CHANNEL_ORDER, j as resolveDefaultConfigCandidates, m as resolveUserPath, n as defaultRuntime, o as normalizeChatChannelId, p as resolveConfigDir, r as CHANNEL_IDS, s as getActivePluginRegistry, t as createSubsystemLogger, v as danger, w as getLogger, x as shouldLogVerbose, y as logVerbose } from "./subsystem-
|
|
1
|
+
import { A as resolveConfigPath, E as resolvePreferredRemoteClawTmpDir, I as resolveRequiredHomeDir, N as resolveOAuthDir, P as resolveStateDir, S as warn, _ as isPlainObject$2, a as normalizeAnyChannelId, b as logVerboseConsole, c as requireActivePluginRegistry, d as isRecord, f as normalizeE164, i as CHAT_CHANNEL_ORDER, j as resolveDefaultConfigCandidates, m as resolveUserPath, n as defaultRuntime, o as normalizeChatChannelId, p as resolveConfigDir, r as CHANNEL_IDS, s as getActivePluginRegistry, t as createSubsystemLogger, v as danger, w as getLogger, x as shouldLogVerbose, y as logVerbose } from "./subsystem-CDhxwtDd.js";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import
|
|
4
|
+
import fs, { constants } from "node:fs";
|
|
5
5
|
import os from "node:os";
|
|
6
6
|
import JSON5 from "json5";
|
|
7
7
|
import util, { isDeepStrictEqual, promisify } from "node:util";
|
|
8
|
-
import fs from "node:fs/promises";
|
|
8
|
+
import fs$1 from "node:fs/promises";
|
|
9
9
|
import crypto from "node:crypto";
|
|
10
10
|
import dotenv from "dotenv";
|
|
11
11
|
import { execFile, execFileSync, spawn } from "node:child_process";
|
|
@@ -679,7 +679,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
679
679
|
const accountCfg = resolveAccountCfg(accountId !== DEFAULT_ACCOUNT_ID ? accountId : DEFAULT_ACCOUNT_ID);
|
|
680
680
|
const accountTokenFile = accountCfg?.tokenFile?.trim();
|
|
681
681
|
if (accountTokenFile) {
|
|
682
|
-
if (!
|
|
682
|
+
if (!fs.existsSync(accountTokenFile)) {
|
|
683
683
|
opts.logMissingFile?.(`channels.telegram.accounts.${accountId}.tokenFile not found: ${accountTokenFile}`);
|
|
684
684
|
return {
|
|
685
685
|
token: "",
|
|
@@ -687,7 +687,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
687
687
|
};
|
|
688
688
|
}
|
|
689
689
|
try {
|
|
690
|
-
const token =
|
|
690
|
+
const token = fs.readFileSync(accountTokenFile, "utf-8").trim();
|
|
691
691
|
if (token) return {
|
|
692
692
|
token,
|
|
693
693
|
source: "tokenFile"
|
|
@@ -712,7 +712,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
712
712
|
const allowEnv = accountId === DEFAULT_ACCOUNT_ID;
|
|
713
713
|
const tokenFile = telegramCfg?.tokenFile?.trim();
|
|
714
714
|
if (tokenFile && allowEnv) {
|
|
715
|
-
if (!
|
|
715
|
+
if (!fs.existsSync(tokenFile)) {
|
|
716
716
|
opts.logMissingFile?.(`channels.telegram.tokenFile not found: ${tokenFile}`);
|
|
717
717
|
return {
|
|
718
718
|
token: "",
|
|
@@ -720,7 +720,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
720
720
|
};
|
|
721
721
|
}
|
|
722
722
|
try {
|
|
723
|
-
const token =
|
|
723
|
+
const token = fs.readFileSync(tokenFile, "utf-8").trim();
|
|
724
724
|
if (token) return {
|
|
725
725
|
token,
|
|
726
726
|
source: "tokenFile"
|
|
@@ -850,7 +850,7 @@ function resolveLegacyAuthDir() {
|
|
|
850
850
|
}
|
|
851
851
|
function legacyAuthExists(authDir) {
|
|
852
852
|
try {
|
|
853
|
-
return
|
|
853
|
+
return fs.existsSync(path.join(authDir, "creds.json"));
|
|
854
854
|
} catch {
|
|
855
855
|
return false;
|
|
856
856
|
}
|
|
@@ -1043,7 +1043,7 @@ function loadDotEnv(opts) {
|
|
|
1043
1043
|
const quiet = opts?.quiet ?? true;
|
|
1044
1044
|
dotenv.config({ quiet });
|
|
1045
1045
|
const globalEnvPath = path.join(resolveConfigDir(process.env), ".env");
|
|
1046
|
-
if (!
|
|
1046
|
+
if (!fs.existsSync(globalEnvPath)) return;
|
|
1047
1047
|
dotenv.config({
|
|
1048
1048
|
quiet,
|
|
1049
1049
|
path: globalEnvPath,
|
|
@@ -1164,7 +1164,7 @@ function resolveTimeoutMs(timeoutMs) {
|
|
|
1164
1164
|
function readEtcShells() {
|
|
1165
1165
|
if (cachedEtcShells !== void 0) return cachedEtcShells;
|
|
1166
1166
|
try {
|
|
1167
|
-
const entries =
|
|
1167
|
+
const entries = fs.readFileSync("/etc/shells", "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#") && path.isAbsolute(line));
|
|
1168
1168
|
cachedEtcShells = new Set(entries);
|
|
1169
1169
|
} catch {
|
|
1170
1170
|
cachedEtcShells = null;
|
|
@@ -1539,7 +1539,7 @@ function resolveActiveTalkProviderConfig(talk) {
|
|
|
1539
1539
|
};
|
|
1540
1540
|
}
|
|
1541
1541
|
function readTalkApiKeyFromProfile(deps = {}) {
|
|
1542
|
-
const fsImpl = deps.fs ??
|
|
1542
|
+
const fsImpl = deps.fs ?? fs;
|
|
1543
1543
|
const osImpl = deps.os ?? os;
|
|
1544
1544
|
const pathImpl = deps.path ?? path;
|
|
1545
1545
|
const home = osImpl.homedir();
|
|
@@ -2088,7 +2088,7 @@ function isPathInside$1(basePath, candidatePath) {
|
|
|
2088
2088
|
}
|
|
2089
2089
|
function safeRealpathSync$1(filePath) {
|
|
2090
2090
|
try {
|
|
2091
|
-
return
|
|
2091
|
+
return fs.realpathSync(filePath);
|
|
2092
2092
|
} catch {
|
|
2093
2093
|
return null;
|
|
2094
2094
|
}
|
|
@@ -2197,7 +2197,7 @@ var IncludeProcessor = class IncludeProcessor {
|
|
|
2197
2197
|
const normalized = path.normalize(resolved);
|
|
2198
2198
|
if (!isPathInside$1(this.rootDir, normalized)) throw new ConfigIncludeError(`Include path escapes config directory: ${includePath} (root: ${this.rootDir})`, includePath);
|
|
2199
2199
|
try {
|
|
2200
|
-
const real =
|
|
2200
|
+
const real = fs.realpathSync(normalized);
|
|
2201
2201
|
if (!isPathInside$1(this.rootRealDir, real)) throw new ConfigIncludeError(`Include path resolves outside config directory (symlink): ${includePath} (root: ${this.rootDir})`, includePath);
|
|
2202
2202
|
} catch (err) {
|
|
2203
2203
|
if (err instanceof ConfigIncludeError) throw err;
|
|
@@ -2233,13 +2233,13 @@ var IncludeProcessor = class IncludeProcessor {
|
|
|
2233
2233
|
};
|
|
2234
2234
|
function safeRealpath(target) {
|
|
2235
2235
|
try {
|
|
2236
|
-
return
|
|
2236
|
+
return fs.realpathSync(target);
|
|
2237
2237
|
} catch {
|
|
2238
2238
|
return target;
|
|
2239
2239
|
}
|
|
2240
2240
|
}
|
|
2241
2241
|
const defaultResolver = {
|
|
2242
|
-
readFile: (p) =>
|
|
2242
|
+
readFile: (p) => fs.readFileSync(p, "utf-8"),
|
|
2243
2243
|
parseJson: (raw) => JSON5.parse(raw)
|
|
2244
2244
|
};
|
|
2245
2245
|
/**
|
|
@@ -3436,13 +3436,13 @@ function resolveBundledPluginsDir() {
|
|
|
3436
3436
|
try {
|
|
3437
3437
|
const execDir = path.dirname(process.execPath);
|
|
3438
3438
|
const sibling = path.join(execDir, "extensions");
|
|
3439
|
-
if (
|
|
3439
|
+
if (fs.existsSync(sibling)) return sibling;
|
|
3440
3440
|
} catch {}
|
|
3441
3441
|
try {
|
|
3442
3442
|
let cursor = path.dirname(fileURLToPath(import.meta.url));
|
|
3443
3443
|
for (let i = 0; i < 6; i += 1) {
|
|
3444
3444
|
const candidate = path.join(cursor, "extensions");
|
|
3445
|
-
if (
|
|
3445
|
+
if (fs.existsSync(candidate)) return candidate;
|
|
3446
3446
|
const parent = path.dirname(cursor);
|
|
3447
3447
|
if (parent === cursor) break;
|
|
3448
3448
|
cursor = parent;
|
|
@@ -3469,20 +3469,20 @@ function normalizeStringList(value) {
|
|
|
3469
3469
|
function resolvePluginManifestPath(rootDir) {
|
|
3470
3470
|
for (const filename of PLUGIN_MANIFEST_FILENAMES) {
|
|
3471
3471
|
const candidate = path.join(rootDir, filename);
|
|
3472
|
-
if (
|
|
3472
|
+
if (fs.existsSync(candidate)) return candidate;
|
|
3473
3473
|
}
|
|
3474
3474
|
return path.join(rootDir, PLUGIN_MANIFEST_FILENAME);
|
|
3475
3475
|
}
|
|
3476
3476
|
function loadPluginManifest(rootDir) {
|
|
3477
3477
|
const manifestPath = resolvePluginManifestPath(rootDir);
|
|
3478
|
-
if (!
|
|
3478
|
+
if (!fs.existsSync(manifestPath)) return {
|
|
3479
3479
|
ok: false,
|
|
3480
3480
|
error: `plugin manifest not found: ${manifestPath}`,
|
|
3481
3481
|
manifestPath
|
|
3482
3482
|
};
|
|
3483
3483
|
let raw;
|
|
3484
3484
|
try {
|
|
3485
|
-
raw = JSON.parse(
|
|
3485
|
+
raw = JSON.parse(fs.readFileSync(manifestPath, "utf-8"));
|
|
3486
3486
|
} catch (err) {
|
|
3487
3487
|
return {
|
|
3488
3488
|
ok: false,
|
|
@@ -3554,7 +3554,7 @@ function safeRealpathSync(targetPath, cache) {
|
|
|
3554
3554
|
const cached = cache?.get(targetPath);
|
|
3555
3555
|
if (cached) return cached;
|
|
3556
3556
|
try {
|
|
3557
|
-
const resolved =
|
|
3557
|
+
const resolved = fs.realpathSync(targetPath);
|
|
3558
3558
|
cache?.set(targetPath, resolved);
|
|
3559
3559
|
return resolved;
|
|
3560
3560
|
} catch {
|
|
@@ -3563,7 +3563,7 @@ function safeRealpathSync(targetPath, cache) {
|
|
|
3563
3563
|
}
|
|
3564
3564
|
function safeStatSync(targetPath) {
|
|
3565
3565
|
try {
|
|
3566
|
-
return
|
|
3566
|
+
return fs.statSync(targetPath);
|
|
3567
3567
|
} catch {
|
|
3568
3568
|
return null;
|
|
3569
3569
|
}
|
|
@@ -3685,9 +3685,9 @@ function shouldIgnoreScannedDirectory(dirName) {
|
|
|
3685
3685
|
}
|
|
3686
3686
|
function readPackageManifest(dir) {
|
|
3687
3687
|
const manifestPath = path.join(dir, "package.json");
|
|
3688
|
-
if (!
|
|
3688
|
+
if (!fs.existsSync(manifestPath)) return null;
|
|
3689
3689
|
try {
|
|
3690
|
-
const raw =
|
|
3690
|
+
const raw = fs.readFileSync(manifestPath, "utf-8");
|
|
3691
3691
|
return JSON.parse(raw);
|
|
3692
3692
|
} catch {
|
|
3693
3693
|
return null;
|
|
@@ -3745,10 +3745,10 @@ function resolvePackageEntrySource(params) {
|
|
|
3745
3745
|
return source;
|
|
3746
3746
|
}
|
|
3747
3747
|
function discoverInDirectory(params) {
|
|
3748
|
-
if (!
|
|
3748
|
+
if (!fs.existsSync(params.dir)) return;
|
|
3749
3749
|
let entries = [];
|
|
3750
3750
|
try {
|
|
3751
|
-
entries =
|
|
3751
|
+
entries = fs.readdirSync(params.dir, { withFileTypes: true });
|
|
3752
3752
|
} catch (err) {
|
|
3753
3753
|
params.diagnostics.push({
|
|
3754
3754
|
level: "warn",
|
|
@@ -3811,7 +3811,7 @@ function discoverInDirectory(params) {
|
|
|
3811
3811
|
"index.js",
|
|
3812
3812
|
"index.mjs",
|
|
3813
3813
|
"index.cjs"
|
|
3814
|
-
].map((candidate) => path.join(fullPath, candidate)).find((candidate) =>
|
|
3814
|
+
].map((candidate) => path.join(fullPath, candidate)).find((candidate) => fs.existsSync(candidate));
|
|
3815
3815
|
if (indexFile && isExtensionFile(indexFile)) addCandidate({
|
|
3816
3816
|
candidates: params.candidates,
|
|
3817
3817
|
diagnostics: params.diagnostics,
|
|
@@ -3829,7 +3829,7 @@ function discoverInDirectory(params) {
|
|
|
3829
3829
|
}
|
|
3830
3830
|
function discoverFromPath(params) {
|
|
3831
3831
|
const resolved = resolveUserPath(params.rawPath);
|
|
3832
|
-
if (!
|
|
3832
|
+
if (!fs.existsSync(resolved)) {
|
|
3833
3833
|
params.diagnostics.push({
|
|
3834
3834
|
level: "error",
|
|
3835
3835
|
message: `plugin path not found: ${resolved}`,
|
|
@@ -3837,7 +3837,7 @@ function discoverFromPath(params) {
|
|
|
3837
3837
|
});
|
|
3838
3838
|
return;
|
|
3839
3839
|
}
|
|
3840
|
-
const stat =
|
|
3840
|
+
const stat = fs.statSync(resolved);
|
|
3841
3841
|
if (stat.isFile()) {
|
|
3842
3842
|
if (!isExtensionFile(resolved)) {
|
|
3843
3843
|
params.diagnostics.push({
|
|
@@ -3897,7 +3897,7 @@ function discoverFromPath(params) {
|
|
|
3897
3897
|
"index.js",
|
|
3898
3898
|
"index.mjs",
|
|
3899
3899
|
"index.cjs"
|
|
3900
|
-
].map((candidate) => path.join(resolved, candidate)).find((candidate) =>
|
|
3900
|
+
].map((candidate) => path.join(resolved, candidate)).find((candidate) => fs.existsSync(candidate));
|
|
3901
3901
|
if (indexFile && isExtensionFile(indexFile)) {
|
|
3902
3902
|
addCandidate({
|
|
3903
3903
|
candidates: params.candidates,
|
|
@@ -4011,7 +4011,7 @@ function buildCacheKey(params) {
|
|
|
4011
4011
|
}
|
|
4012
4012
|
function safeStatMtimeMs(filePath) {
|
|
4013
4013
|
try {
|
|
4014
|
-
return
|
|
4014
|
+
return fs.statSync(filePath).mtimeMs;
|
|
4015
4015
|
} catch {
|
|
4016
4016
|
return null;
|
|
4017
4017
|
}
|
|
@@ -7499,7 +7499,7 @@ function resolveConfigPathForDeps(deps) {
|
|
|
7499
7499
|
}
|
|
7500
7500
|
function normalizeDeps(overrides = {}) {
|
|
7501
7501
|
return {
|
|
7502
|
-
fs: overrides.fs ??
|
|
7502
|
+
fs: overrides.fs ?? fs,
|
|
7503
7503
|
json5: overrides.json5 ?? JSON5,
|
|
7504
7504
|
env: overrides.env ?? process.env,
|
|
7505
7505
|
homedir: overrides.homedir ?? (() => resolveRequiredHomeDir(overrides.env ?? process.env, os.homedir)),
|
|
@@ -9090,19 +9090,19 @@ const OPEN_READ_FLAGS = constants.O_RDONLY | (SUPPORTS_NOFOLLOW ? constants.O_NO
|
|
|
9090
9090
|
async function openVerifiedLocalFile(filePath) {
|
|
9091
9091
|
let handle;
|
|
9092
9092
|
try {
|
|
9093
|
-
handle = await fs.open(filePath, OPEN_READ_FLAGS);
|
|
9093
|
+
handle = await fs$1.open(filePath, OPEN_READ_FLAGS);
|
|
9094
9094
|
} catch (err) {
|
|
9095
9095
|
if (isNotFoundPathError(err)) throw new SafeOpenError("not-found", "file not found");
|
|
9096
9096
|
if (isSymlinkOpenError(err)) throw new SafeOpenError("symlink", "symlink open blocked", { cause: err });
|
|
9097
9097
|
throw err;
|
|
9098
9098
|
}
|
|
9099
9099
|
try {
|
|
9100
|
-
const [stat, lstat] = await Promise.all([handle.stat(), fs.lstat(filePath)]);
|
|
9100
|
+
const [stat, lstat] = await Promise.all([handle.stat(), fs$1.lstat(filePath)]);
|
|
9101
9101
|
if (lstat.isSymbolicLink()) throw new SafeOpenError("symlink", "symlink not allowed");
|
|
9102
9102
|
if (!stat.isFile()) throw new SafeOpenError("not-file", "not a file");
|
|
9103
9103
|
if (!sameFileIdentity(stat, lstat)) throw new SafeOpenError("path-mismatch", "path changed during read");
|
|
9104
|
-
const realPath = await fs.realpath(filePath);
|
|
9105
|
-
if (!sameFileIdentity(stat, await fs.stat(realPath))) throw new SafeOpenError("path-mismatch", "path mismatch");
|
|
9104
|
+
const realPath = await fs$1.realpath(filePath);
|
|
9105
|
+
if (!sameFileIdentity(stat, await fs$1.stat(realPath))) throw new SafeOpenError("path-mismatch", "path mismatch");
|
|
9106
9106
|
return {
|
|
9107
9107
|
handle,
|
|
9108
9108
|
realPath,
|
|
@@ -9961,11 +9961,11 @@ function readJpegExifOrientation(buffer) {
|
|
|
9961
9961
|
return null;
|
|
9962
9962
|
}
|
|
9963
9963
|
async function withTempDir(fn) {
|
|
9964
|
-
const dir = await fs.mkdtemp(path.join(os.tmpdir(), "remoteclaw-img-"));
|
|
9964
|
+
const dir = await fs$1.mkdtemp(path.join(os.tmpdir(), "remoteclaw-img-"));
|
|
9965
9965
|
try {
|
|
9966
9966
|
return await fn(dir);
|
|
9967
9967
|
} finally {
|
|
9968
|
-
await fs.rm(dir, {
|
|
9968
|
+
await fs$1.rm(dir, {
|
|
9969
9969
|
recursive: true,
|
|
9970
9970
|
force: true
|
|
9971
9971
|
}).catch(() => {});
|
|
@@ -9974,7 +9974,7 @@ async function withTempDir(fn) {
|
|
|
9974
9974
|
async function sipsMetadataFromBuffer(buffer) {
|
|
9975
9975
|
return await withTempDir(async (dir) => {
|
|
9976
9976
|
const input = path.join(dir, "in.img");
|
|
9977
|
-
await fs.writeFile(input, buffer);
|
|
9977
|
+
await fs$1.writeFile(input, buffer);
|
|
9978
9978
|
const { stdout } = await runExec("/usr/bin/sips", [
|
|
9979
9979
|
"-g",
|
|
9980
9980
|
"pixelWidth",
|
|
@@ -10002,7 +10002,7 @@ async function sipsResizeToJpeg(params) {
|
|
|
10002
10002
|
return await withTempDir(async (dir) => {
|
|
10003
10003
|
const input = path.join(dir, "in.img");
|
|
10004
10004
|
const output = path.join(dir, "out.jpg");
|
|
10005
|
-
await fs.writeFile(input, params.buffer);
|
|
10005
|
+
await fs$1.writeFile(input, params.buffer);
|
|
10006
10006
|
await runExec("/usr/bin/sips", [
|
|
10007
10007
|
"-Z",
|
|
10008
10008
|
String(Math.max(1, Math.round(params.maxSide))),
|
|
@@ -10019,14 +10019,14 @@ async function sipsResizeToJpeg(params) {
|
|
|
10019
10019
|
timeoutMs: 2e4,
|
|
10020
10020
|
maxBuffer: 1024 * 1024
|
|
10021
10021
|
});
|
|
10022
|
-
return await fs.readFile(output);
|
|
10022
|
+
return await fs$1.readFile(output);
|
|
10023
10023
|
});
|
|
10024
10024
|
}
|
|
10025
10025
|
async function sipsConvertToJpeg(buffer) {
|
|
10026
10026
|
return await withTempDir(async (dir) => {
|
|
10027
10027
|
const input = path.join(dir, "in.heic");
|
|
10028
10028
|
const output = path.join(dir, "out.jpg");
|
|
10029
|
-
await fs.writeFile(input, buffer);
|
|
10029
|
+
await fs$1.writeFile(input, buffer);
|
|
10030
10030
|
await runExec("/usr/bin/sips", [
|
|
10031
10031
|
"-s",
|
|
10032
10032
|
"format",
|
|
@@ -10038,7 +10038,7 @@ async function sipsConvertToJpeg(buffer) {
|
|
|
10038
10038
|
timeoutMs: 2e4,
|
|
10039
10039
|
maxBuffer: 1024 * 1024
|
|
10040
10040
|
});
|
|
10041
|
-
return await fs.readFile(output);
|
|
10041
|
+
return await fs$1.readFile(output);
|
|
10042
10042
|
});
|
|
10043
10043
|
}
|
|
10044
10044
|
async function getImageMetadata(buffer) {
|
|
@@ -10089,7 +10089,7 @@ async function sipsApplyOrientation(buffer, orientation) {
|
|
|
10089
10089
|
return await withTempDir(async (dir) => {
|
|
10090
10090
|
const input = path.join(dir, "in.jpg");
|
|
10091
10091
|
const output = path.join(dir, "out.jpg");
|
|
10092
|
-
await fs.writeFile(input, buffer);
|
|
10092
|
+
await fs$1.writeFile(input, buffer);
|
|
10093
10093
|
await runExec("/usr/bin/sips", [
|
|
10094
10094
|
...ops,
|
|
10095
10095
|
input,
|
|
@@ -10099,7 +10099,7 @@ async function sipsApplyOrientation(buffer, orientation) {
|
|
|
10099
10099
|
timeoutMs: 2e4,
|
|
10100
10100
|
maxBuffer: 1024 * 1024
|
|
10101
10101
|
});
|
|
10102
|
-
return await fs.readFile(output);
|
|
10102
|
+
return await fs$1.readFile(output);
|
|
10103
10103
|
});
|
|
10104
10104
|
}
|
|
10105
10105
|
async function resizeToJpeg(params) {
|
|
@@ -10252,7 +10252,7 @@ async function assertLocalMediaAllowed(mediaPath, localRoots) {
|
|
|
10252
10252
|
const roots = localRoots ?? getDefaultLocalRoots();
|
|
10253
10253
|
let resolved;
|
|
10254
10254
|
try {
|
|
10255
|
-
resolved = await fs.realpath(mediaPath);
|
|
10255
|
+
resolved = await fs$1.realpath(mediaPath);
|
|
10256
10256
|
} catch {
|
|
10257
10257
|
resolved = path.resolve(mediaPath);
|
|
10258
10258
|
}
|
|
@@ -10269,7 +10269,7 @@ async function assertLocalMediaAllowed(mediaPath, localRoots) {
|
|
|
10269
10269
|
for (const root of roots) {
|
|
10270
10270
|
let resolvedRoot;
|
|
10271
10271
|
try {
|
|
10272
|
-
resolvedRoot = await fs.realpath(root);
|
|
10272
|
+
resolvedRoot = await fs$1.realpath(root);
|
|
10273
10273
|
} catch {
|
|
10274
10274
|
resolvedRoot = path.resolve(root);
|
|
10275
10275
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as loadWebMedia } from "./media-
|
|
2
|
-
import { t as saveMediaBuffer } from "./store-
|
|
1
|
+
import { t as loadWebMedia } from "./media-DHIjuVaq.js";
|
|
2
|
+
import { t as saveMediaBuffer } from "./store-C6xUjjK-.js";
|
|
3
3
|
|
|
4
4
|
//#region src/media/outbound-attachment.ts
|
|
5
5
|
async function resolveOutboundAttachmentFromUrl(mediaUrl, maxBytes, options) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as createAccountListHelpers, V as resolveAccountEntry, ft as normalizeAccountId } from "./media-
|
|
1
|
+
import { B as createAccountListHelpers, V as resolveAccountEntry, ft as normalizeAccountId } from "./media-DHIjuVaq.js";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
|
|
4
4
|
//#region src/signal/accounts.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { F as resolveSlackAccount, L as resolveSlackBotToken, _ as resolveTextChunkLimit, c as chunkMarkdownIR, g as resolveChunkMode, h as chunkMarkdownTextWithMode, l as markdownToIR, p as resolveMarkdownTableMode, t as loadWebMedia, x as loadConfig } from "./media-
|
|
2
|
-
import { y as logVerbose } from "./subsystem-
|
|
1
|
+
import { F as resolveSlackAccount, L as resolveSlackBotToken, _ as resolveTextChunkLimit, c as chunkMarkdownIR, g as resolveChunkMode, h as chunkMarkdownTextWithMode, l as markdownToIR, p as resolveMarkdownTableMode, t as loadWebMedia, x as loadConfig } from "./media-DHIjuVaq.js";
|
|
2
|
+
import { y as logVerbose } from "./subsystem-CDhxwtDd.js";
|
|
3
3
|
import { t as parseSlackTarget } from "./targets-CcTME3bp.js";
|
|
4
|
-
import { t as createSlackWebClient } from "./send-
|
|
4
|
+
import { t as createSlackWebClient } from "./send-BdYZ_7sw.js";
|
|
5
5
|
import { t as renderMarkdownWithMarkers } from "./render-6ahYfPwj.js";
|
|
6
6
|
|
|
7
7
|
//#region src/slack/blocks-fallback.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { p as resolveMarkdownTableMode, s as mediaKindFromMime, x as loadConfig } from "./media-
|
|
2
|
-
import { m as resolveUserPath } from "./subsystem-
|
|
3
|
-
import { t as resolveIMessageAccount } from "./accounts-
|
|
4
|
-
import "./store-
|
|
5
|
-
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-
|
|
1
|
+
import { p as resolveMarkdownTableMode, s as mediaKindFromMime, x as loadConfig } from "./media-DHIjuVaq.js";
|
|
2
|
+
import { m as resolveUserPath } from "./subsystem-CDhxwtDd.js";
|
|
3
|
+
import { t as resolveIMessageAccount } from "./accounts-DesSv1wD.js";
|
|
4
|
+
import "./store-C6xUjjK-.js";
|
|
5
|
+
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-D0PBuR8U.js";
|
|
6
6
|
import "./render-6ahYfPwj.js";
|
|
7
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
7
|
+
import { t as convertMarkdownTables } from "./tables-DoSY1jjh.js";
|
|
8
8
|
import { spawn } from "node:child_process";
|
|
9
9
|
import { createInterface } from "node:readline";
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./media-
|
|
2
|
-
import "./subsystem-
|
|
3
|
-
import "./secure-random-
|
|
4
|
-
import "./fetch-
|
|
5
|
-
import { t as sendMessageSignal } from "./send-
|
|
6
|
-
import "./store-
|
|
7
|
-
import "./outbound-attachment-
|
|
1
|
+
import "./media-DHIjuVaq.js";
|
|
2
|
+
import "./subsystem-CDhxwtDd.js";
|
|
3
|
+
import "./secure-random-C8Siev1-.js";
|
|
4
|
+
import "./fetch-DMmdxAp3.js";
|
|
5
|
+
import { t as sendMessageSignal } from "./send-DAJqND45.js";
|
|
6
|
+
import "./store-C6xUjjK-.js";
|
|
7
|
+
import "./outbound-attachment-D0PBuR8U.js";
|
|
8
8
|
import { WebClient } from "@slack/web-api";
|
|
9
9
|
|
|
10
10
|
//#region src/slack/client.ts
|