@visorcraft/idlehands 4.0.19 → 4.0.21
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-BDVs8LTu.js → accounts-B8cGzkjD.js} +1 -1
- package/dist/{accounts-Dk8mJIrQ.js → accounts-BQC_GRUB.js} +6 -6
- package/dist/{accounts-CIvVRRHb.js → accounts-D5tB_lO0.js} +1 -1
- package/dist/{agent-scope-DyP_tr7s.js → agent-scope-Bxq1eWbA.js} +4 -4
- package/dist/{agent-via-gateway-B2Z_k_od.js → agent-via-gateway-DHn8V6v4.js} +60 -60
- package/dist/{anton-DsmttQbC.js → anton-Dyz3neEN.js} +5 -5
- package/dist/{audio-preflight-BSlR2jEq.js → audio-preflight-B8qbJcB1.js} +35 -35
- package/dist/{auth-store-DXT-l7fO.js → auth-store-Bb4aajHu.js} +12 -12
- package/dist/{bindings-D3b5Fmc9.js → bindings-CLZIJ0Eo.js} +2 -2
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +60 -60
- package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
- package/dist/bundled/command-logger/handler.js +3 -3
- package/dist/bundled/session-memory/handler.js +60 -60
- package/dist/{channel-activity-D_TMOGQ0.js → channel-activity-DdL3RAv_.js} +3 -3
- package/dist/{chrome-_2tzVjVl.js → chrome-xahUzIaT.js} +17 -17
- package/dist/{chunk-CMpX7Jaz.js → chunk-Djk-9JeT.js} +1 -1
- package/dist/{commands-registry-j4vAzcF2.js → commands-registry-_TBHHpvt.js} +5 -5
- package/dist/{deliver-CVTXl0Cv.js → deliver-CIFO6sel.js} +20 -20
- package/dist/{deps-BAMUVAdU.js → deps-DwTILPLD.js} +6 -6
- package/dist/{diagnostic-4owMk4vH.js → diagnostic-BvlZ0Sot.js} +1 -1
- package/dist/{dock-BgOmHcbh.js → dock-ejUetwTC.js} +6 -6
- package/dist/emergency-stop-C2sJ4lsk.js +113 -0
- package/dist/{env-B5G1qwGc.js → env-q-PhWbb_.js} +1 -1
- package/dist/{errors-C_0nm4TJ.js → errors-C4SHjIZK.js} +1 -1
- package/dist/{fetch-guard-iuQsIjqN.js → fetch-guard-CcfDZXe9.js} +1 -1
- package/dist/{frontmatter-BOudmHMS.js → frontmatter-pTUG4Sx_.js} +2 -2
- package/dist/{fs-safe-CYUaAFO9.js → fs-safe-2l05hI1Y.js} +2 -2
- package/dist/{gemini-auth-CIyaa44H.js → gemini-auth-DLSGffQK.js} +2 -2
- package/dist/{github-copilot-token-Dgt6cnsM.js → github-copilot-token-BjmEQcmi.js} +7 -7
- package/dist/{image-COw__ACq.js → image-D9D-lzCw.js} +6 -6
- package/dist/{image-ops-D1KtygWz.js → image-ops-J8P5zOFm.js} +1 -1
- package/dist/{ir-B7IBoKLy.js → ir-BT5aAdU9.js} +5 -5
- package/dist/llm-slug-generator.js +60 -60
- package/dist/{local-roots-KN4Hp1yZ.js → local-roots-d4y0lvs2.js} +5 -5
- package/dist/{login-CFr5vJmR.js → login-C2X0In6m.js} +6 -6
- package/dist/{login-qr-CFFFOjOl.js → login-qr-C17PY0rr.js} +11 -11
- package/dist/{manager-BE_76jWB.js → manager-CgzA1hKo.js} +15 -15
- package/dist/{markdown-tables-CzsockiZ.js → markdown-tables-R8VTpfE9.js} +1 -1
- package/dist/{message-channel-C8QtrwEU.js → message-channel-ZdI1-uUh.js} +1 -1
- package/dist/{model-selection-1MMYqY6M.js → model-selection-C5hI1dum.js} +41 -41
- package/dist/{outbound-BNh6PpQb.js → outbound-CdY_AskB.js} +6 -6
- package/dist/{outbound-attachment-3I6GzwDe.js → outbound-attachment-IfeZJAKk.js} +2 -2
- package/dist/{path-alias-guards-Cu1nXNMM.js → path-alias-guards-BZmt6hFb.js} +1 -1
- package/dist/{paths-D_qUel1T.js → paths-D3p7ZvM6.js} +3 -3
- package/dist/{paths-BYNVLNi_.js → paths-DQpv9a3Q.js} +5 -5
- package/dist/{pi-embedded-helpers-CyTpDKo5.js → pi-embedded-helpers-CUoUoEEN.js} +24 -24
- package/dist/{pi-embedded-BeyOxL6U.js → pi-embedded-k2mZJOsr.js} +179 -179
- package/dist/{pi-model-discovery-Bb__OY-j.js → pi-model-discovery-Dlx4RLWo.js} +7 -7
- package/dist/{plugins-CRB60mCJ.js → plugins-DYr-HHj0.js} +10 -10
- package/dist/{pw-ai-CowTfhOG.js → pw-ai-CnvVtt_s.js} +13 -13
- package/dist/{qmd-manager-B_GgyQQ0.js → qmd-manager-BRvg3Rx2.js} +8 -8
- package/dist/{query-expansion-DEq020GG.js → query-expansion-DHuNyU-_.js} +5 -5
- package/dist/{redact-Bvpf-ATQ.js → redact-1Y0KPNtr.js} +1 -1
- package/dist/{replies-6_GxvQYe.js → replies-2C16fnBP.js} +3 -3
- package/dist/{reply-prefix-BUgeSN2R.js → reply-prefix-DCljZiIB.js} +1 -1
- package/dist/{resolve-route-DuttYY7A.js → resolve-route-ClcifpKn.js} +4 -4
- package/dist/{retry-BeB9WenR.js → retry-CG6cMRDQ.js} +1 -1
- package/dist/{runner-BzNdfqDz.js → runner-DjDddZhb.js} +11 -11
- package/dist/{send-D4bMycQu.js → send-BOxJ4QXF.js} +7 -7
- package/dist/{send-BeIZJuy4.js → send-DZa8fWSm.js} +7 -7
- package/dist/{send-Dfa3sn6r.js → send-FLdrx-oF.js} +24 -24
- package/dist/{send-DmLC7aEF.js → send-IlPMLAH-.js} +10 -10
- package/dist/{send-C1hvd3bt.js → send-Y1hD4tQ1.js} +6 -6
- package/dist/{session-F_YDS_1V.js → session-nUPBXeEa.js} +7 -7
- package/dist/{sessions-3ioSeOA1.js → sessions-DRA4oaxz.js} +41 -41
- package/dist/{skill-commands-Ck3flWX7.js → skill-commands-BHTBXXVn.js} +9 -9
- package/dist/{skills-CnAPWfca.js → skills-umlGvChF.js} +22 -22
- package/dist/{store-CvMgrKWx.js → store-D-ZicQeo.js} +2 -2
- package/dist/{subsystem-tzu-rIAJ.js → subsystem-D7ZepYT1.js} +1 -1
- package/dist/{tables-5k-zOZ-s.js → tables-Co_R_WKs.js} +1 -1
- package/dist/{target-errors-BPfQrPim.js → target-errors-B1mcM4WR.js} +2 -2
- package/dist/{tokens-BRLyURxW.js → tokens-DGajj8M9.js} +1 -1
- package/dist/{tool-images-CcGZpzmq.js → tool-images-Duuqr4bN.js} +2 -2
- package/dist/{tool-loop-detection-BNGetx3Z.js → tool-loop-detection-CjWRg_4q.js} +3 -3
- package/dist/{utils-CTFLl_ji.js → utils-D9wGoiU9.js} +18 -18
- package/dist/{web-Csmkqx1W.js → web-t3fXJTeB.js} +66 -66
- package/dist/{whatsapp-actions-DbPcN6JQ.js → whatsapp-actions-BJ6kVDXi.js} +25 -25
- package/dist/{workspace-DBFSzT6O.js → workspace-tAtkoD_r.js} +18 -18
- package/extensions/acpx/package.json +1 -1
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/discord/package.json +1 -1
- package/extensions/feishu/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/googlechat/package.json +1 -1
- package/extensions/hand/package.json +1 -1
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +12 -0
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/package.json +1 -1
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +12 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +12 -0
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/slack/package.json +1 -1
- package/extensions/synology-chat/package.json +1 -1
- package/extensions/telegram/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +12 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +12 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/whatsapp/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +12 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +12 -0
- package/extensions/zalouser/package.json +1 -1
- package/package.json +1 -1
- package/dist/emergency-stop-BldYLJq7.js +0 -113
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { c as normalizeProviderId, ln as ensureAuthProfileStore } from "./model-selection-
|
|
2
|
+
import { c as normalizeProviderId, ln as ensureAuthProfileStore } from "./model-selection-C5hI1dum.js";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import
|
|
4
|
+
import fs from "node:fs";
|
|
5
5
|
import * as PiCodingAgent from "@mariozechner/pi-coding-agent";
|
|
6
6
|
|
|
7
7
|
//#region src/agents/pi-auth-credentials.ts
|
|
@@ -70,10 +70,10 @@ function isRecord(value) {
|
|
|
70
70
|
}
|
|
71
71
|
function scrubLegacyStaticAuthJsonEntries(pathname) {
|
|
72
72
|
if (process.env.IDLEHANDS_AUTH_STORE_READONLY === "1") return;
|
|
73
|
-
if (!
|
|
73
|
+
if (!fs.existsSync(pathname)) return;
|
|
74
74
|
let parsed;
|
|
75
75
|
try {
|
|
76
|
-
parsed = JSON.parse(
|
|
76
|
+
parsed = JSON.parse(fs.readFileSync(pathname, "utf8"));
|
|
77
77
|
} catch {
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
@@ -87,11 +87,11 @@ function scrubLegacyStaticAuthJsonEntries(pathname) {
|
|
|
87
87
|
}
|
|
88
88
|
if (!changed) return;
|
|
89
89
|
if (Object.keys(parsed).length === 0) {
|
|
90
|
-
|
|
90
|
+
fs.rmSync(pathname, { force: true });
|
|
91
91
|
return;
|
|
92
92
|
}
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
fs.writeFileSync(pathname, `${JSON.stringify(parsed, null, 2)}\n`, "utf8");
|
|
94
|
+
fs.chmodSync(pathname, 384);
|
|
95
95
|
}
|
|
96
96
|
function createAuthStorage(AuthStorageLike, path, creds) {
|
|
97
97
|
const withInMemory = AuthStorageLike;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { d as requireActivePluginRegistry, o as normalizeAnyChannelId, r as CHAT_CHANNEL_ORDER, t as createSubsystemLogger } from "./subsystem-
|
|
2
|
-
import { d as normalizeE164 } from "./utils-
|
|
1
|
+
import { d as requireActivePluginRegistry, o as normalizeAnyChannelId, r as CHAT_CHANNEL_ORDER, t as createSubsystemLogger } from "./subsystem-D7ZepYT1.js";
|
|
2
|
+
import { d as normalizeE164 } from "./utils-D9wGoiU9.js";
|
|
3
3
|
import { f as DEFAULT_ACCOUNT_ID, p as normalizeAccountId } from "./session-key-CuLPSMu_.js";
|
|
4
|
-
import { t as isTruthyEnvValue } from "./env-
|
|
5
|
-
import { r as createAccountListHelpers } from "./accounts-
|
|
4
|
+
import { t as isTruthyEnvValue } from "./env-q-PhWbb_.js";
|
|
5
|
+
import { r as createAccountListHelpers } from "./accounts-BQC_GRUB.js";
|
|
6
6
|
import { t as resolveAccountEntry } from "./account-lookup-DlMshWZ_.js";
|
|
7
7
|
import { t as normalizeChatType } from "./chat-type-BPBtOjer.js";
|
|
8
|
-
import { i as resolveDefaultAgentBoundAccountId, r as listBoundAccountIds } from "./bindings-
|
|
9
|
-
import
|
|
8
|
+
import { i as resolveDefaultAgentBoundAccountId, r as listBoundAccountIds } from "./bindings-CLZIJ0Eo.js";
|
|
9
|
+
import fs from "node:fs";
|
|
10
10
|
import util from "node:util";
|
|
11
11
|
|
|
12
12
|
//#region src/channels/plugins/account-action-gate.ts
|
|
@@ -185,7 +185,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
185
185
|
const accountCfg = resolveAccountCfg(accountId !== DEFAULT_ACCOUNT_ID ? accountId : DEFAULT_ACCOUNT_ID);
|
|
186
186
|
const accountTokenFile = accountCfg?.tokenFile?.trim();
|
|
187
187
|
if (accountTokenFile) {
|
|
188
|
-
if (!
|
|
188
|
+
if (!fs.existsSync(accountTokenFile)) {
|
|
189
189
|
opts.logMissingFile?.(`channels.telegram.accounts.${accountId}.tokenFile not found: ${accountTokenFile}`);
|
|
190
190
|
return {
|
|
191
191
|
token: "",
|
|
@@ -193,7 +193,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
195
|
try {
|
|
196
|
-
const token =
|
|
196
|
+
const token = fs.readFileSync(accountTokenFile, "utf-8").trim();
|
|
197
197
|
if (token) return {
|
|
198
198
|
token,
|
|
199
199
|
source: "tokenFile"
|
|
@@ -218,7 +218,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
218
218
|
const allowEnv = accountId === DEFAULT_ACCOUNT_ID;
|
|
219
219
|
const tokenFile = telegramCfg?.tokenFile?.trim();
|
|
220
220
|
if (tokenFile && allowEnv) {
|
|
221
|
-
if (!
|
|
221
|
+
if (!fs.existsSync(tokenFile)) {
|
|
222
222
|
opts.logMissingFile?.(`channels.telegram.tokenFile not found: ${tokenFile}`);
|
|
223
223
|
return {
|
|
224
224
|
token: "",
|
|
@@ -226,7 +226,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
226
226
|
};
|
|
227
227
|
}
|
|
228
228
|
try {
|
|
229
|
-
const token =
|
|
229
|
+
const token = fs.readFileSync(tokenFile, "utf-8").trim();
|
|
230
230
|
if (token) return {
|
|
231
231
|
token,
|
|
232
232
|
source: "tokenFile"
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import "./agent-scope-
|
|
2
|
-
import "./paths-
|
|
3
|
-
import "./subsystem-
|
|
4
|
-
import { K as resolvePreferredIdleHandsTmpDir } from "./utils-
|
|
1
|
+
import "./agent-scope-Bxq1eWbA.js";
|
|
2
|
+
import "./paths-DQpv9a3Q.js";
|
|
3
|
+
import "./subsystem-D7ZepYT1.js";
|
|
4
|
+
import { K as resolvePreferredIdleHandsTmpDir } from "./utils-D9wGoiU9.js";
|
|
5
5
|
import "./runtime-8mi3mpYB.js";
|
|
6
|
-
import "./workspace-
|
|
7
|
-
import "./model-selection-
|
|
8
|
-
import "./github-copilot-token-
|
|
6
|
+
import "./workspace-tAtkoD_r.js";
|
|
7
|
+
import "./model-selection-C5hI1dum.js";
|
|
8
|
+
import "./github-copilot-token-BjmEQcmi.js";
|
|
9
9
|
import { t as formatCliCommand } from "./command-format-BAxx4PW5.js";
|
|
10
10
|
import "./boolean-CE7i9tBR.js";
|
|
11
|
-
import "./env-
|
|
12
|
-
import { A as resolveStrictExistingPathsWithinRoot, M as DEFAULT_FILL_FIELD_TYPE, O as DEFAULT_UPLOAD_DIR, S as withCdpSocket, _ as withBrowserNavigationPolicy, d as formatAriaSnapshot, f as normalizeCdpWsUrl, g as assertBrowserNavigationResultAllowed, h as assertBrowserNavigationAllowed, t as getChromeWebSocketUrl, v as appendCdpPath, x as getHeadersWithAuth, y as fetchJson } from "./chrome-
|
|
11
|
+
import "./env-q-PhWbb_.js";
|
|
12
|
+
import { A as resolveStrictExistingPathsWithinRoot, M as DEFAULT_FILL_FIELD_TYPE, O as DEFAULT_UPLOAD_DIR, S as withCdpSocket, _ as withBrowserNavigationPolicy, d as formatAriaSnapshot, f as normalizeCdpWsUrl, g as assertBrowserNavigationResultAllowed, h as assertBrowserNavigationAllowed, t as getChromeWebSocketUrl, v as appendCdpPath, x as getHeadersWithAuth, y as fetchJson } from "./chrome-xahUzIaT.js";
|
|
13
13
|
import "./ssrf-CZeHDwVZ.js";
|
|
14
|
-
import "./path-alias-guards-
|
|
15
|
-
import "./redact-
|
|
16
|
-
import { n as formatErrorMessage } from "./errors-
|
|
17
|
-
import "./fs-safe-
|
|
14
|
+
import "./path-alias-guards-BZmt6hFb.js";
|
|
15
|
+
import "./redact-1Y0KPNtr.js";
|
|
16
|
+
import { n as formatErrorMessage } from "./errors-C4SHjIZK.js";
|
|
17
|
+
import "./fs-safe-2l05hI1Y.js";
|
|
18
18
|
import fs from "node:fs/promises";
|
|
19
19
|
import path from "node:path";
|
|
20
20
|
import crypto from "node:crypto";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { s as resolveAgentWorkspaceDir } from "./agent-scope-
|
|
2
|
-
import { d as resolveStateDir } from "./paths-
|
|
3
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
4
|
-
import "./utils-
|
|
1
|
+
import { s as resolveAgentWorkspaceDir } from "./agent-scope-Bxq1eWbA.js";
|
|
2
|
+
import { d as resolveStateDir } from "./paths-DQpv9a3Q.js";
|
|
3
|
+
import { t as createSubsystemLogger } from "./subsystem-D7ZepYT1.js";
|
|
4
|
+
import "./utils-D9wGoiU9.js";
|
|
5
5
|
import "./runtime-8mi3mpYB.js";
|
|
6
6
|
import { x as parseAgentSessionKey } from "./session-key-CuLPSMu_.js";
|
|
7
|
-
import "./workspace-
|
|
8
|
-
import "./redact-
|
|
9
|
-
import "./paths-
|
|
10
|
-
import { _ as isFileMissingError, i as listSessionFilesForAgent, n as requireNodeSqlite, r as buildSessionEntry, t as extractKeywords, v as statRegularFile } from "./query-expansion-
|
|
7
|
+
import "./workspace-tAtkoD_r.js";
|
|
8
|
+
import "./redact-1Y0KPNtr.js";
|
|
9
|
+
import "./paths-D3p7ZvM6.js";
|
|
10
|
+
import { _ as isFileMissingError, i as listSessionFilesForAgent, n as requireNodeSqlite, r as buildSessionEntry, t as extractKeywords, v as statRegularFile } from "./query-expansion-DHuNyU-_.js";
|
|
11
11
|
import fs from "node:fs/promises";
|
|
12
12
|
import os from "node:os";
|
|
13
13
|
import path from "node:path";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
1
|
+
import { t as createSubsystemLogger } from "./subsystem-D7ZepYT1.js";
|
|
2
2
|
import { t as runTasksWithConcurrency } from "./run-with-concurrency-CEV6qf-x.js";
|
|
3
|
-
import { t as redactSensitiveText } from "./redact-
|
|
4
|
-
import { l as resolveSessionTranscriptsDirForAgent } from "./paths-
|
|
3
|
+
import { t as redactSensitiveText } from "./redact-1Y0KPNtr.js";
|
|
4
|
+
import { l as resolveSessionTranscriptsDirForAgent } from "./paths-D3p7ZvM6.js";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import fs from "node:fs/promises";
|
|
7
7
|
import path from "node:path";
|
|
8
|
-
import
|
|
8
|
+
import fs$1 from "node:fs";
|
|
9
9
|
import crypto from "node:crypto";
|
|
10
10
|
|
|
11
11
|
//#region src/memory/fs-utils.ts
|
|
@@ -31,7 +31,7 @@ async function statRegularFile(absPath) {
|
|
|
31
31
|
//#region src/memory/internal.ts
|
|
32
32
|
function ensureDir(dir) {
|
|
33
33
|
try {
|
|
34
|
-
|
|
34
|
+
fs$1.mkdirSync(dir, { recursive: true });
|
|
35
35
|
} catch {}
|
|
36
36
|
return dir;
|
|
37
37
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { i as isSilentReplyText, n as SILENT_REPLY_TOKEN } from "./tokens-
|
|
3
|
-
import { r as markdownToSlackMrkdwnChunks, t as sendMessageSlack } from "./send-
|
|
4
|
-
import { i as chunkMarkdownTextWithMode } from "./chunk-
|
|
2
|
+
import { i as isSilentReplyText, n as SILENT_REPLY_TOKEN } from "./tokens-DGajj8M9.js";
|
|
3
|
+
import { r as markdownToSlackMrkdwnChunks, t as sendMessageSlack } from "./send-DZa8fWSm.js";
|
|
4
|
+
import { i as chunkMarkdownTextWithMode } from "./chunk-Djk-9JeT.js";
|
|
5
5
|
|
|
6
6
|
//#region src/auto-reply/reply/reply-reference.ts
|
|
7
7
|
function createReplyReferencePlanner(options) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { r as resolveAgentConfig } from "./agent-scope-
|
|
2
|
+
import { r as resolveAgentConfig } from "./agent-scope-Bxq1eWbA.js";
|
|
3
3
|
|
|
4
4
|
//#region src/agents/identity.ts
|
|
5
5
|
const DEFAULT_ACK_REACTION = "👀";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { c as resolveDefaultAgentId } from "./agent-scope-
|
|
3
|
-
import { A as shouldLogVerbose } from "./utils-
|
|
2
|
+
import { c as resolveDefaultAgentId } from "./agent-scope-Bxq1eWbA.js";
|
|
3
|
+
import { A as shouldLogVerbose } from "./utils-D9wGoiU9.js";
|
|
4
4
|
import { d as sanitizeAgentId, f as DEFAULT_ACCOUNT_ID, i as buildAgentPeerSessionKey, n as DEFAULT_MAIN_KEY, p as normalizeAccountId, r as buildAgentMainSessionKey, s as normalizeAgentId, t as DEFAULT_AGENT_ID } from "./session-key-CuLPSMu_.js";
|
|
5
|
-
import { y as logDebug } from "./workspace-
|
|
5
|
+
import { y as logDebug } from "./workspace-tAtkoD_r.js";
|
|
6
6
|
import { t as normalizeChatType } from "./chat-type-BPBtOjer.js";
|
|
7
|
-
import { n as listBindings } from "./bindings-
|
|
7
|
+
import { n as listBindings } from "./bindings-CLZIJ0Eo.js";
|
|
8
8
|
|
|
9
9
|
//#region src/routing/resolve-route.ts
|
|
10
10
|
var resolve_route_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { h as resolveAgentModelPrimaryValue, m as resolveAgentModelFallbackValues } from "./agent-scope-
|
|
2
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
3
|
-
import { A as shouldLogVerbose, D as logVerbose, K as resolvePreferredIdleHandsTmpDir } from "./utils-
|
|
4
|
-
import { _ as runExec } from "./workspace-
|
|
5
|
-
import { J as isInboundPathAllowed, R as loadConfig, T as resolveApiKeyForProvider, X as resolveIMessageAttachmentRoots, Y as mergeInboundPathRoots, c as normalizeProviderId, dn as resolveIdleHandsAgentDir, g as normalizeGoogleModelId, q as DEFAULT_IMESSAGE_ATTACHMENT_ROOTS, w as requireApiKey } from "./model-selection-
|
|
1
|
+
import { h as resolveAgentModelPrimaryValue, m as resolveAgentModelFallbackValues } from "./agent-scope-Bxq1eWbA.js";
|
|
2
|
+
import { t as createSubsystemLogger } from "./subsystem-D7ZepYT1.js";
|
|
3
|
+
import { A as shouldLogVerbose, D as logVerbose, K as resolvePreferredIdleHandsTmpDir } from "./utils-D9wGoiU9.js";
|
|
4
|
+
import { _ as runExec } from "./workspace-tAtkoD_r.js";
|
|
5
|
+
import { J as isInboundPathAllowed, R as loadConfig, T as resolveApiKeyForProvider, X as resolveIMessageAttachmentRoots, Y as mergeInboundPathRoots, c as normalizeProviderId, dn as resolveIdleHandsAgentDir, g as normalizeGoogleModelId, q as DEFAULT_IMESSAGE_ATTACHMENT_ROOTS, w as requireApiKey } from "./model-selection-C5hI1dum.js";
|
|
6
6
|
import { t as normalizeChatType } from "./chat-type-BPBtOjer.js";
|
|
7
|
-
import { c as detectMime, f as isAudioFileName, m as kindFromMime, u as getFileExtension } from "./image-ops-
|
|
8
|
-
import { t as describeImageWithModel, w as ensureIdleHandsModelsJson } from "./image-
|
|
9
|
-
import { n as collectProviderApiKeysForExecution, r as executeWithApiKeyRotation, t as parseGeminiAuth } from "./gemini-auth-
|
|
7
|
+
import { c as detectMime, f as isAudioFileName, m as kindFromMime, u as getFileExtension } from "./image-ops-J8P5zOFm.js";
|
|
8
|
+
import { t as describeImageWithModel, w as ensureIdleHandsModelsJson } from "./image-D9D-lzCw.js";
|
|
9
|
+
import { n as collectProviderApiKeysForExecution, r as executeWithApiKeyRotation, t as parseGeminiAuth } from "./gemini-auth-DLSGffQK.js";
|
|
10
10
|
import { n as fetchWithTimeout } from "./fetch-timeout-3YYM8QuM.js";
|
|
11
|
-
import { t as fetchWithSsrFGuard } from "./fetch-guard-
|
|
12
|
-
import { i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, r as MediaFetchError } from "./local-roots-
|
|
11
|
+
import { t as fetchWithSsrFGuard } from "./fetch-guard-CcfDZXe9.js";
|
|
12
|
+
import { i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, r as MediaFetchError } from "./local-roots-d4y0lvs2.js";
|
|
13
13
|
import fs from "node:fs/promises";
|
|
14
14
|
import os from "node:os";
|
|
15
15
|
import path from "node:path";
|
|
@@ -958,7 +958,7 @@ var MediaAttachmentCache = class {
|
|
|
958
958
|
const log = createSubsystemLogger("model-catalog");
|
|
959
959
|
let modelCatalogPromise = null;
|
|
960
960
|
let hasLoggedModelCatalogError = false;
|
|
961
|
-
const defaultImportPiSdk = () => import("./pi-model-discovery-
|
|
961
|
+
const defaultImportPiSdk = () => import("./pi-model-discovery-Dlx4RLWo.js").then((n) => n.r);
|
|
962
962
|
let importPiSdk = defaultImportPiSdk;
|
|
963
963
|
const CODEX_PROVIDER = "openai-codex";
|
|
964
964
|
const OPENAI_CODEX_GPT53_MODEL_ID = "gpt-5.3-codex";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { d as normalizeE164, h as resolveUserPath } from "./utils-
|
|
3
|
-
import { R as loadConfig } from "./model-selection-
|
|
4
|
-
import { v as mediaKindFromMime } from "./image-ops-
|
|
5
|
-
import { t as resolveIMessageAccount } from "./accounts-
|
|
6
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
7
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
8
|
-
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-
|
|
2
|
+
import { d as normalizeE164, h as resolveUserPath } from "./utils-D9wGoiU9.js";
|
|
3
|
+
import { R as loadConfig } from "./model-selection-C5hI1dum.js";
|
|
4
|
+
import { v as mediaKindFromMime } from "./image-ops-J8P5zOFm.js";
|
|
5
|
+
import { t as resolveIMessageAccount } from "./accounts-D5tB_lO0.js";
|
|
6
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-R8VTpfE9.js";
|
|
7
|
+
import { t as convertMarkdownTables } from "./tables-Co_R_WKs.js";
|
|
8
|
+
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-IfeZJAKk.js";
|
|
9
9
|
import { spawn } from "node:child_process";
|
|
10
10
|
import { createInterface } from "node:readline";
|
|
11
11
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { D as logVerbose } from "./utils-
|
|
3
|
-
import { R as loadConfig } from "./model-selection-
|
|
4
|
-
import { i as isSilentReplyText } from "./tokens-
|
|
5
|
-
import { d as resolveSlackAccount, m as resolveSlackBotToken } from "./plugins-
|
|
2
|
+
import { D as logVerbose } from "./utils-D9wGoiU9.js";
|
|
3
|
+
import { R as loadConfig } from "./model-selection-C5hI1dum.js";
|
|
4
|
+
import { i as isSilentReplyText } from "./tokens-DGajj8M9.js";
|
|
5
|
+
import { d as resolveSlackAccount, m as resolveSlackBotToken } from "./plugins-DYr-HHj0.js";
|
|
6
6
|
import { a as requireTargetKind, i as parseTargetPrefixes, n as ensureTargetId, r as parseTargetMention, t as buildMessagingTarget } from "./targets-D7PT_rdO.js";
|
|
7
|
-
import { c as resolveChunkMode, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit } from "./chunk-
|
|
8
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
9
|
-
import { a as loadWebMedia, n as markdownToIR, t as chunkMarkdownIR } from "./ir-
|
|
7
|
+
import { c as resolveChunkMode, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit } from "./chunk-Djk-9JeT.js";
|
|
8
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-R8VTpfE9.js";
|
|
9
|
+
import { a as loadWebMedia, n as markdownToIR, t as chunkMarkdownIR } from "./ir-BT5aAdU9.js";
|
|
10
10
|
import { t as renderMarkdownWithMarkers } from "./render-MTSxc7LK.js";
|
|
11
11
|
import { WebClient } from "@slack/web-api";
|
|
12
12
|
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { d as resolveStateDir, f as expandHomePrefix, l as resolveOAuthDir, m as resolveRequiredHomeDir } from "./paths-
|
|
3
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
4
|
-
import { D as logVerbose, g as safeParseJson, t as CONFIG_DIR, w as danger } from "./utils-
|
|
2
|
+
import { d as resolveStateDir, f as expandHomePrefix, l as resolveOAuthDir, m as resolveRequiredHomeDir } from "./paths-DQpv9a3Q.js";
|
|
3
|
+
import { t as createSubsystemLogger } from "./subsystem-D7ZepYT1.js";
|
|
4
|
+
import { D as logVerbose, g as safeParseJson, t as CONFIG_DIR, w as danger } from "./utils-D9wGoiU9.js";
|
|
5
5
|
import { f as DEFAULT_ACCOUNT_ID, p as normalizeAccountId } from "./session-key-CuLPSMu_.js";
|
|
6
|
-
import { B as readConfigFileSnapshotForWrite, H as writeConfigFile, Qt as resolveTelegramPreviewStreamMode, R as loadConfig, fn as withFileLock$1 } from "./model-selection-
|
|
7
|
-
import { t as isTruthyEnvValue } from "./env-
|
|
8
|
-
import { l as resolveTelegramAccount, n as listChannelPlugins, t as getChannelPlugin } from "./plugins-
|
|
9
|
-
import { h as normalizeMimeType, p as isGifMedia, u as getFileExtension, v as mediaKindFromMime } from "./image-ops-
|
|
10
|
-
import { t as redactSensitiveText } from "./redact-
|
|
11
|
-
import { n as formatErrorMessage, r as formatUncaughtError, t as extractErrorCode } from "./errors-
|
|
12
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
13
|
-
import { a as loadWebMedia, n as markdownToIR, t as chunkMarkdownIR } from "./ir-
|
|
6
|
+
import { B as readConfigFileSnapshotForWrite, H as writeConfigFile, Qt as resolveTelegramPreviewStreamMode, R as loadConfig, fn as withFileLock$1 } from "./model-selection-C5hI1dum.js";
|
|
7
|
+
import { t as isTruthyEnvValue } from "./env-q-PhWbb_.js";
|
|
8
|
+
import { l as resolveTelegramAccount, n as listChannelPlugins, t as getChannelPlugin } from "./plugins-DYr-HHj0.js";
|
|
9
|
+
import { h as normalizeMimeType, p as isGifMedia, u as getFileExtension, v as mediaKindFromMime } from "./image-ops-J8P5zOFm.js";
|
|
10
|
+
import { t as redactSensitiveText } from "./redact-1Y0KPNtr.js";
|
|
11
|
+
import { n as formatErrorMessage, r as formatUncaughtError, t as extractErrorCode } from "./errors-C4SHjIZK.js";
|
|
12
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-R8VTpfE9.js";
|
|
13
|
+
import { a as loadWebMedia, n as markdownToIR, t as chunkMarkdownIR } from "./ir-BT5aAdU9.js";
|
|
14
14
|
import { t as renderMarkdownWithMarkers } from "./render-MTSxc7LK.js";
|
|
15
15
|
import { t as resolveFetch } from "./fetch-CsfR_943.js";
|
|
16
|
-
import { i as createTelegramRetryRunner, n as recordChannelActivity } from "./channel-activity-
|
|
16
|
+
import { i as createTelegramRetryRunner, n as recordChannelActivity } from "./channel-activity-DdL3RAv_.js";
|
|
17
17
|
import { n as normalizePollInput } from "./polls-DhMjjIGW.js";
|
|
18
18
|
import { t as makeProxyFetch } from "./proxy-CRB9oCP5.js";
|
|
19
19
|
import fs from "node:fs/promises";
|
|
20
20
|
import os from "node:os";
|
|
21
21
|
import path from "node:path";
|
|
22
|
-
import
|
|
22
|
+
import fs$1, { readFileSync } from "node:fs";
|
|
23
23
|
import JSON5 from "json5";
|
|
24
24
|
import crypto from "node:crypto";
|
|
25
25
|
import process$1 from "node:process";
|
|
@@ -158,7 +158,7 @@ function getPairingAdapter(channelId) {
|
|
|
158
158
|
//#region src/plugin-sdk/json-store.ts
|
|
159
159
|
async function readJsonFileWithFallback(filePath, fallback) {
|
|
160
160
|
try {
|
|
161
|
-
const parsed = safeParseJson(await
|
|
161
|
+
const parsed = safeParseJson(await fs$1.promises.readFile(filePath, "utf-8"));
|
|
162
162
|
if (parsed == null) return {
|
|
163
163
|
value: fallback,
|
|
164
164
|
exists: true
|
|
@@ -180,14 +180,14 @@ async function readJsonFileWithFallback(filePath, fallback) {
|
|
|
180
180
|
}
|
|
181
181
|
async function writeJsonFileAtomically(filePath, value) {
|
|
182
182
|
const dir = path.dirname(filePath);
|
|
183
|
-
await
|
|
183
|
+
await fs$1.promises.mkdir(dir, {
|
|
184
184
|
recursive: true,
|
|
185
185
|
mode: 448
|
|
186
186
|
});
|
|
187
187
|
const tmp = path.join(dir, `${path.basename(filePath)}.${crypto.randomUUID()}.tmp`);
|
|
188
|
-
await
|
|
189
|
-
await
|
|
190
|
-
await
|
|
188
|
+
await fs$1.promises.writeFile(tmp, `${JSON.stringify(value, null, 2)}\n`, { encoding: "utf-8" });
|
|
189
|
+
await fs$1.promises.chmod(tmp, 384);
|
|
190
|
+
await fs$1.promises.rename(tmp, filePath);
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
//#endregion
|
|
@@ -248,7 +248,7 @@ async function readPairingRequests(filePath) {
|
|
|
248
248
|
}
|
|
249
249
|
async function ensureJsonFile(filePath, fallback) {
|
|
250
250
|
try {
|
|
251
|
-
await
|
|
251
|
+
await fs$1.promises.access(filePath);
|
|
252
252
|
} catch {
|
|
253
253
|
await writeJsonFile(filePath, fallback);
|
|
254
254
|
}
|
|
@@ -1515,7 +1515,7 @@ function resolveCronStorePath(storePath) {
|
|
|
1515
1515
|
}
|
|
1516
1516
|
async function loadCronStore(storePath) {
|
|
1517
1517
|
try {
|
|
1518
|
-
const raw = await
|
|
1518
|
+
const raw = await fs$1.promises.readFile(storePath, "utf-8");
|
|
1519
1519
|
let parsed;
|
|
1520
1520
|
try {
|
|
1521
1521
|
parsed = JSON5.parse(raw);
|
|
@@ -1536,14 +1536,14 @@ async function loadCronStore(storePath) {
|
|
|
1536
1536
|
}
|
|
1537
1537
|
}
|
|
1538
1538
|
async function saveCronStore(storePath, store) {
|
|
1539
|
-
await
|
|
1539
|
+
await fs$1.promises.mkdir(path.dirname(storePath), { recursive: true });
|
|
1540
1540
|
const { randomBytes } = await import("node:crypto");
|
|
1541
1541
|
const tmp = `${storePath}.${process.pid}.${randomBytes(8).toString("hex")}.tmp`;
|
|
1542
1542
|
const json = JSON.stringify(store, null, 2);
|
|
1543
|
-
await
|
|
1544
|
-
await
|
|
1543
|
+
await fs$1.promises.writeFile(tmp, json, "utf-8");
|
|
1544
|
+
await fs$1.promises.rename(tmp, storePath);
|
|
1545
1545
|
try {
|
|
1546
|
-
await
|
|
1546
|
+
await fs$1.promises.copyFile(storePath, `${storePath}.bak`);
|
|
1547
1547
|
} catch {}
|
|
1548
1548
|
}
|
|
1549
1549
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { K as resolvePreferredIdleHandsTmpDir } from "./utils-
|
|
3
|
-
import { R as loadConfig } from "./model-selection-
|
|
4
|
-
import { _ as resolveDiscordAccount, v as normalizeDiscordToken } from "./plugins-
|
|
2
|
+
import { K as resolvePreferredIdleHandsTmpDir } from "./utils-D9wGoiU9.js";
|
|
3
|
+
import { R as loadConfig } from "./model-selection-C5hI1dum.js";
|
|
4
|
+
import { _ as resolveDiscordAccount, v as normalizeDiscordToken } from "./plugins-DYr-HHj0.js";
|
|
5
5
|
import { a as requireTargetKind, i as parseTargetPrefixes, n as ensureTargetId, r as parseTargetMention, t as buildMessagingTarget } from "./targets-D7PT_rdO.js";
|
|
6
|
-
import { _ as maxBytesForKind, l as extensionForMime } from "./image-ops-
|
|
7
|
-
import { n as retryAsync, t as resolveRetryConfig } from "./retry-
|
|
8
|
-
import { c as resolveChunkMode, i as chunkMarkdownTextWithMode } from "./chunk-
|
|
9
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
10
|
-
import { a as loadWebMedia, o as loadWebMediaRaw } from "./ir-
|
|
6
|
+
import { _ as maxBytesForKind, l as extensionForMime } from "./image-ops-J8P5zOFm.js";
|
|
7
|
+
import { n as retryAsync, t as resolveRetryConfig } from "./retry-CG6cMRDQ.js";
|
|
8
|
+
import { c as resolveChunkMode, i as chunkMarkdownTextWithMode } from "./chunk-Djk-9JeT.js";
|
|
9
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-R8VTpfE9.js";
|
|
10
|
+
import { a as loadWebMedia, o as loadWebMediaRaw } from "./ir-BT5aAdU9.js";
|
|
11
11
|
import { t as resolveFetch } from "./fetch-CsfR_943.js";
|
|
12
|
-
import { n as recordChannelActivity, r as createDiscordRetryRunner } from "./channel-activity-
|
|
12
|
+
import { n as recordChannelActivity, r as createDiscordRetryRunner } from "./channel-activity-DdL3RAv_.js";
|
|
13
13
|
import { n as normalizePollInput, t as normalizePollDurationHours } from "./polls-DhMjjIGW.js";
|
|
14
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
14
|
+
import { t as convertMarkdownTables } from "./tables-Co_R_WKs.js";
|
|
15
15
|
import fs from "node:fs/promises";
|
|
16
16
|
import path from "node:path";
|
|
17
17
|
import { promisify } from "node:util";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { R as loadConfig } from "./model-selection-
|
|
2
|
+
import { R as loadConfig } from "./model-selection-C5hI1dum.js";
|
|
3
3
|
import { n as generateSecureUuid } from "./secure-random-B1N_MXT_.js";
|
|
4
|
-
import { n as resolveSignalAccount } from "./accounts-
|
|
5
|
-
import { v as mediaKindFromMime } from "./image-ops-
|
|
4
|
+
import { n as resolveSignalAccount } from "./accounts-B8cGzkjD.js";
|
|
5
|
+
import { v as mediaKindFromMime } from "./image-ops-J8P5zOFm.js";
|
|
6
6
|
import { n as fetchWithTimeout } from "./fetch-timeout-3YYM8QuM.js";
|
|
7
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
8
|
-
import { n as markdownToIR, t as chunkMarkdownIR } from "./ir-
|
|
7
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-R8VTpfE9.js";
|
|
8
|
+
import { n as markdownToIR, t as chunkMarkdownIR } from "./ir-BT5aAdU9.js";
|
|
9
9
|
import { t as resolveFetch } from "./fetch-CsfR_943.js";
|
|
10
|
-
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-
|
|
10
|
+
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-IfeZJAKk.js";
|
|
11
11
|
|
|
12
12
|
//#region src/signal/format.ts
|
|
13
13
|
function normalizeUrlForComparison(url) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { I as getChildLogger, a as ensureDir, h as resolveUserPath, j as success, w as danger, z as toPinoLikeLogger } from "./utils-
|
|
2
|
-
import { tn as VERSION } from "./model-selection-
|
|
1
|
+
import { I as getChildLogger, a as ensureDir, h as resolveUserPath, j as success, w as danger, z as toPinoLikeLogger } from "./utils-D9wGoiU9.js";
|
|
2
|
+
import { tn as VERSION } from "./model-selection-C5hI1dum.js";
|
|
3
3
|
import { t as formatCliCommand } from "./command-format-BAxx4PW5.js";
|
|
4
|
-
import { c as readCredsJsonRaw, d as resolveWebCredsBackupPath, f as resolveWebCredsPath, o as maybeRestoreCredsFromBackup, u as resolveDefaultWebAuthDir } from "./auth-store-
|
|
5
|
-
import
|
|
4
|
+
import { c as readCredsJsonRaw, d as resolveWebCredsBackupPath, f as resolveWebCredsPath, o as maybeRestoreCredsFromBackup, u as resolveDefaultWebAuthDir } from "./auth-store-Bb4aajHu.js";
|
|
5
|
+
import fs from "node:fs";
|
|
6
6
|
import { randomUUID } from "node:crypto";
|
|
7
7
|
import { DisconnectReason, fetchLatestBaileysVersion, makeCacheableSignalKeyStore, makeWASocket, useMultiFileAuthState } from "@whiskeysockets/baileys";
|
|
8
8
|
import qrcode from "qrcode-terminal";
|
|
@@ -21,16 +21,16 @@ async function safeSaveCreds(authDir, saveCreds, logger) {
|
|
|
21
21
|
const raw = readCredsJsonRaw(credsPath);
|
|
22
22
|
if (raw) try {
|
|
23
23
|
JSON.parse(raw);
|
|
24
|
-
|
|
24
|
+
fs.copyFileSync(credsPath, backupPath);
|
|
25
25
|
try {
|
|
26
|
-
|
|
26
|
+
fs.chmodSync(backupPath, 384);
|
|
27
27
|
} catch {}
|
|
28
28
|
} catch {}
|
|
29
29
|
} catch {}
|
|
30
30
|
try {
|
|
31
31
|
await Promise.resolve(saveCreds());
|
|
32
32
|
try {
|
|
33
|
-
|
|
33
|
+
fs.chmodSync(resolveWebCredsPath(authDir), 384);
|
|
34
34
|
} catch {}
|
|
35
35
|
} catch (err) {
|
|
36
36
|
logger.warn({ error: String(err) }, "failed saving WhatsApp creds");
|