@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,72 +1,72 @@
|
|
|
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 { l as resolveAgentIdFromSessionKey } from "../../session-key-CuLPSMu_.js";
|
|
7
|
-
import "../../workspace-
|
|
8
|
-
import "../../model-selection-
|
|
9
|
-
import "../../github-copilot-token-
|
|
7
|
+
import "../../workspace-tAtkoD_r.js";
|
|
8
|
+
import "../../model-selection-C5hI1dum.js";
|
|
9
|
+
import "../../github-copilot-token-BjmEQcmi.js";
|
|
10
10
|
import "../../boolean-CE7i9tBR.js";
|
|
11
|
-
import "../../env-
|
|
12
|
-
import "../../dock-
|
|
13
|
-
import "../../tokens-
|
|
14
|
-
import "../../pi-embedded-
|
|
15
|
-
import "../../plugins-
|
|
16
|
-
import "../../accounts-
|
|
17
|
-
import "../../bindings-
|
|
18
|
-
import "../../auth-store-
|
|
19
|
-
import "../../send-
|
|
20
|
-
import "../../send-
|
|
21
|
-
import "../../deliver-
|
|
22
|
-
import "../../diagnostic-
|
|
11
|
+
import "../../env-q-PhWbb_.js";
|
|
12
|
+
import "../../dock-ejUetwTC.js";
|
|
13
|
+
import "../../tokens-DGajj8M9.js";
|
|
14
|
+
import "../../pi-embedded-k2mZJOsr.js";
|
|
15
|
+
import "../../plugins-DYr-HHj0.js";
|
|
16
|
+
import "../../accounts-BQC_GRUB.js";
|
|
17
|
+
import "../../bindings-CLZIJ0Eo.js";
|
|
18
|
+
import "../../auth-store-Bb4aajHu.js";
|
|
19
|
+
import "../../send-DZa8fWSm.js";
|
|
20
|
+
import "../../send-IlPMLAH-.js";
|
|
21
|
+
import "../../deliver-CIFO6sel.js";
|
|
22
|
+
import "../../diagnostic-BvlZ0Sot.js";
|
|
23
23
|
import "../../diagnostic-session-state-BGF2r-kt.js";
|
|
24
|
-
import "../../accounts-
|
|
25
|
-
import "../../send-
|
|
26
|
-
import "../../image-ops-
|
|
27
|
-
import "../../pi-model-discovery-
|
|
28
|
-
import "../../message-channel-
|
|
29
|
-
import "../../pi-embedded-helpers-
|
|
30
|
-
import "../../chrome-
|
|
24
|
+
import "../../accounts-B8cGzkjD.js";
|
|
25
|
+
import "../../send-FLdrx-oF.js";
|
|
26
|
+
import "../../image-ops-J8P5zOFm.js";
|
|
27
|
+
import "../../pi-model-discovery-Dlx4RLWo.js";
|
|
28
|
+
import "../../message-channel-ZdI1-uUh.js";
|
|
29
|
+
import "../../pi-embedded-helpers-CUoUoEEN.js";
|
|
30
|
+
import "../../chrome-xahUzIaT.js";
|
|
31
31
|
import "../../ssrf-CZeHDwVZ.js";
|
|
32
|
-
import "../../frontmatter-
|
|
33
|
-
import "../../skills-
|
|
34
|
-
import "../../path-alias-guards-
|
|
35
|
-
import "../../redact-
|
|
36
|
-
import "../../errors-
|
|
37
|
-
import "../../fs-safe-
|
|
38
|
-
import "../../store-
|
|
39
|
-
import { k as hasInterSessionUserProvenance } from "../../sessions-
|
|
40
|
-
import "../../accounts-
|
|
41
|
-
import "../../paths-
|
|
42
|
-
import "../../tool-images-
|
|
32
|
+
import "../../frontmatter-pTUG4Sx_.js";
|
|
33
|
+
import "../../skills-umlGvChF.js";
|
|
34
|
+
import "../../path-alias-guards-BZmt6hFb.js";
|
|
35
|
+
import "../../redact-1Y0KPNtr.js";
|
|
36
|
+
import "../../errors-C4SHjIZK.js";
|
|
37
|
+
import "../../fs-safe-2l05hI1Y.js";
|
|
38
|
+
import "../../store-D-ZicQeo.js";
|
|
39
|
+
import { k as hasInterSessionUserProvenance } from "../../sessions-DRA4oaxz.js";
|
|
40
|
+
import "../../accounts-D5tB_lO0.js";
|
|
41
|
+
import "../../paths-D3p7ZvM6.js";
|
|
42
|
+
import "../../tool-images-Duuqr4bN.js";
|
|
43
43
|
import "../../thinking-z4_linel.js";
|
|
44
|
-
import "../../image-
|
|
45
|
-
import "../../reply-prefix-
|
|
46
|
-
import "../../manager-
|
|
47
|
-
import "../../gemini-auth-
|
|
48
|
-
import "../../fetch-guard-
|
|
49
|
-
import "../../query-expansion-
|
|
50
|
-
import "../../retry-
|
|
51
|
-
import "../../target-errors-
|
|
52
|
-
import "../../chunk-
|
|
53
|
-
import "../../markdown-tables-
|
|
54
|
-
import "../../local-roots-
|
|
55
|
-
import "../../ir-
|
|
44
|
+
import "../../image-D9D-lzCw.js";
|
|
45
|
+
import "../../reply-prefix-DCljZiIB.js";
|
|
46
|
+
import "../../manager-CgzA1hKo.js";
|
|
47
|
+
import "../../gemini-auth-DLSGffQK.js";
|
|
48
|
+
import "../../fetch-guard-CcfDZXe9.js";
|
|
49
|
+
import "../../query-expansion-DHuNyU-_.js";
|
|
50
|
+
import "../../retry-CG6cMRDQ.js";
|
|
51
|
+
import "../../target-errors-B1mcM4WR.js";
|
|
52
|
+
import "../../chunk-Djk-9JeT.js";
|
|
53
|
+
import "../../markdown-tables-R8VTpfE9.js";
|
|
54
|
+
import "../../local-roots-d4y0lvs2.js";
|
|
55
|
+
import "../../ir-BT5aAdU9.js";
|
|
56
56
|
import "../../render-MTSxc7LK.js";
|
|
57
|
-
import "../../commands-registry-
|
|
58
|
-
import "../../skill-commands-
|
|
59
|
-
import "../../runner-
|
|
57
|
+
import "../../commands-registry-_TBHHpvt.js";
|
|
58
|
+
import "../../skill-commands-BHTBXXVn.js";
|
|
59
|
+
import "../../runner-DjDddZhb.js";
|
|
60
60
|
import "../../fetch-CsfR_943.js";
|
|
61
|
-
import "../../channel-activity-
|
|
62
|
-
import "../../tables-
|
|
63
|
-
import "../../send-
|
|
64
|
-
import "../../outbound-attachment-
|
|
65
|
-
import "../../send-
|
|
66
|
-
import "../../resolve-route-
|
|
61
|
+
import "../../channel-activity-DdL3RAv_.js";
|
|
62
|
+
import "../../tables-Co_R_WKs.js";
|
|
63
|
+
import "../../send-Y1hD4tQ1.js";
|
|
64
|
+
import "../../outbound-attachment-IfeZJAKk.js";
|
|
65
|
+
import "../../send-BOxJ4QXF.js";
|
|
66
|
+
import "../../resolve-route-ClcifpKn.js";
|
|
67
67
|
import "../../proxy-CRB9oCP5.js";
|
|
68
|
-
import "../../replies-
|
|
69
|
-
import "../../deps-
|
|
68
|
+
import "../../replies-2C16fnBP.js";
|
|
69
|
+
import "../../deps-DwTILPLD.js";
|
|
70
70
|
import { generateSlugViaLLM } from "../../llm-slug-generator.js";
|
|
71
71
|
import { t as resolveHookConfig } from "../../config-BsP4lHEP.js";
|
|
72
72
|
import fs from "node:fs/promises";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
2
|
-
import { n as formatErrorMessage } from "./errors-
|
|
3
|
-
import { n as retryAsync, t as resolveRetryConfig } from "./retry-
|
|
1
|
+
import { t as createSubsystemLogger } from "./subsystem-D7ZepYT1.js";
|
|
2
|
+
import { n as formatErrorMessage } from "./errors-C4SHjIZK.js";
|
|
3
|
+
import { n as retryAsync, t as resolveRetryConfig } from "./retry-CG6cMRDQ.js";
|
|
4
4
|
import { RateLimitError } from "@buape/carbon";
|
|
5
5
|
|
|
6
6
|
//#region src/infra/retry-policy.ts
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
2
|
-
import { K as resolvePreferredIdleHandsTmpDir, t as CONFIG_DIR } from "./utils-
|
|
3
|
-
import { A as isNotFoundPathError, j as isPathInside } from "./workspace-
|
|
4
|
-
import { R as loadConfig } from "./model-selection-
|
|
1
|
+
import { t as createSubsystemLogger } from "./subsystem-D7ZepYT1.js";
|
|
2
|
+
import { K as resolvePreferredIdleHandsTmpDir, t as CONFIG_DIR } from "./utils-D9wGoiU9.js";
|
|
3
|
+
import { A as isNotFoundPathError, j as isPathInside } from "./workspace-tAtkoD_r.js";
|
|
4
|
+
import { R as loadConfig } from "./model-selection-C5hI1dum.js";
|
|
5
5
|
import { a as resolvePinnedHostnameWithPolicy, s as isLoopbackIpAddress } from "./ssrf-CZeHDwVZ.js";
|
|
6
|
-
import { i as isErrno } from "./errors-
|
|
7
|
-
import { n as openFileWithinRoot, t as SafeOpenError } from "./fs-safe-
|
|
6
|
+
import { i as isErrno } from "./errors-C4SHjIZK.js";
|
|
7
|
+
import { n as openFileWithinRoot, t as SafeOpenError } from "./fs-safe-2l05hI1Y.js";
|
|
8
8
|
import fs from "node:fs/promises";
|
|
9
9
|
import os from "node:os";
|
|
10
10
|
import path from "node:path";
|
|
11
|
-
import
|
|
11
|
+
import fs$1 from "node:fs";
|
|
12
12
|
import { execFileSync, spawn } from "node:child_process";
|
|
13
13
|
import { createHmac } from "node:crypto";
|
|
14
14
|
import net from "node:net";
|
|
@@ -1340,7 +1340,7 @@ const CHROMIUM_EXE_NAMES = new Set([
|
|
|
1340
1340
|
]);
|
|
1341
1341
|
function exists$1(filePath) {
|
|
1342
1342
|
try {
|
|
1343
|
-
return
|
|
1343
|
+
return fs$1.existsSync(filePath);
|
|
1344
1344
|
} catch {
|
|
1345
1345
|
return false;
|
|
1346
1346
|
}
|
|
@@ -1483,7 +1483,7 @@ function findDesktopFilePath(desktopId) {
|
|
|
1483
1483
|
}
|
|
1484
1484
|
function readDesktopExecLine(desktopPath) {
|
|
1485
1485
|
try {
|
|
1486
|
-
const lines =
|
|
1486
|
+
const lines = fs$1.readFileSync(desktopPath, "utf8").split(/\r?\n/);
|
|
1487
1487
|
for (const line of lines) if (line.startsWith("Exec=")) return line.slice(5).trim();
|
|
1488
1488
|
} catch {}
|
|
1489
1489
|
return null;
|
|
@@ -1741,7 +1741,7 @@ function resolveBrowserExecutableForPlatform(resolved, platform) {
|
|
|
1741
1741
|
const LSOF_CANDIDATES = process.platform === "darwin" ? ["/usr/sbin/lsof", "/usr/bin/lsof"] : ["/usr/bin/lsof", "/usr/sbin/lsof"];
|
|
1742
1742
|
function resolveLsofCommandSync() {
|
|
1743
1743
|
for (const candidate of LSOF_CANDIDATES) try {
|
|
1744
|
-
|
|
1744
|
+
fs$1.accessSync(candidate, fs$1.constants.X_OK);
|
|
1745
1745
|
return candidate;
|
|
1746
1746
|
} catch {}
|
|
1747
1747
|
return "lsof";
|
|
@@ -1786,8 +1786,8 @@ function decoratedMarkerPath(userDataDir) {
|
|
|
1786
1786
|
}
|
|
1787
1787
|
function safeReadJson(filePath) {
|
|
1788
1788
|
try {
|
|
1789
|
-
if (!
|
|
1790
|
-
const raw =
|
|
1789
|
+
if (!fs$1.existsSync(filePath)) return null;
|
|
1790
|
+
const raw = fs$1.readFileSync(filePath, "utf-8");
|
|
1791
1791
|
const parsed = JSON.parse(raw);
|
|
1792
1792
|
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) return null;
|
|
1793
1793
|
return parsed;
|
|
@@ -1796,8 +1796,8 @@ function safeReadJson(filePath) {
|
|
|
1796
1796
|
}
|
|
1797
1797
|
}
|
|
1798
1798
|
function safeWriteJson(filePath, data) {
|
|
1799
|
-
|
|
1800
|
-
|
|
1799
|
+
fs$1.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
1800
|
+
fs$1.writeFileSync(filePath, JSON.stringify(data, null, 2));
|
|
1801
1801
|
}
|
|
1802
1802
|
function setDeep(obj, keys, value) {
|
|
1803
1803
|
let node = obj;
|
|
@@ -1924,7 +1924,7 @@ function decorateIdleHandsProfile(userDataDir, opts) {
|
|
|
1924
1924
|
}
|
|
1925
1925
|
safeWriteJson(preferencesPath, prefs);
|
|
1926
1926
|
try {
|
|
1927
|
-
|
|
1927
|
+
fs$1.writeFileSync(decoratedMarkerPath(userDataDir), `${Date.now()}\n`, "utf-8");
|
|
1928
1928
|
} catch {}
|
|
1929
1929
|
}
|
|
1930
1930
|
function ensureProfileCleanExit(userDataDir) {
|
|
@@ -1940,7 +1940,7 @@ function ensureProfileCleanExit(userDataDir) {
|
|
|
1940
1940
|
const log = createSubsystemLogger("browser").child("chrome");
|
|
1941
1941
|
function exists(filePath) {
|
|
1942
1942
|
try {
|
|
1943
|
-
return
|
|
1943
|
+
return fs$1.existsSync(filePath);
|
|
1944
1944
|
} catch {
|
|
1945
1945
|
return false;
|
|
1946
1946
|
}
|
|
@@ -2020,7 +2020,7 @@ async function launchIdleHandsChrome(resolved, profile) {
|
|
|
2020
2020
|
const exe = resolveBrowserExecutable(resolved);
|
|
2021
2021
|
if (!exe) throw new Error("No supported browser found (Chrome/Brave/Edge/Chromium on macOS, Linux, or Windows).");
|
|
2022
2022
|
const userDataDir = resolveIdleHandsUserDataDir(profile.name);
|
|
2023
|
-
|
|
2023
|
+
fs$1.mkdirSync(userDataDir, { recursive: true });
|
|
2024
2024
|
const needsDecorate = !isProfileDecorated(userDataDir, profile.name, (profile.color ?? DEFAULT_IDLEHANDS_BROWSER_COLOR).toUpperCase());
|
|
2025
2025
|
const spawnOnce = () => {
|
|
2026
2026
|
const args = [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
2
|
import { p as normalizeAccountId } from "./session-key-CuLPSMu_.js";
|
|
3
3
|
import { t as resolveAccountEntry } from "./account-lookup-DlMshWZ_.js";
|
|
4
|
-
import { t as INTERNAL_MESSAGE_CHANNEL } from "./message-channel-
|
|
4
|
+
import { t as INTERNAL_MESSAGE_CHANNEL } from "./message-channel-ZdI1-uUh.js";
|
|
5
5
|
|
|
6
6
|
//#region src/markdown/fences.ts
|
|
7
7
|
function parseFenceSpans(buffer) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { l as getActivePluginRegistry } from "./subsystem-
|
|
3
|
-
import { C as isPlainObject, o as escapeRegExp } from "./utils-
|
|
4
|
-
import { bn as DEFAULT_PROVIDER, u as resolveConfiguredModelRef, yn as DEFAULT_MODEL } from "./model-selection-
|
|
5
|
-
import { n as listChannelDocks } from "./dock-
|
|
6
|
-
import { r as normalizeChannelId } from "./plugins-
|
|
2
|
+
import { l as getActivePluginRegistry } from "./subsystem-D7ZepYT1.js";
|
|
3
|
+
import { C as isPlainObject, o as escapeRegExp } from "./utils-D9wGoiU9.js";
|
|
4
|
+
import { bn as DEFAULT_PROVIDER, u as resolveConfiguredModelRef, yn as DEFAULT_MODEL } from "./model-selection-C5hI1dum.js";
|
|
5
|
+
import { n as listChannelDocks } from "./dock-ejUetwTC.js";
|
|
6
|
+
import { r as normalizeChannelId } from "./plugins-DYr-HHj0.js";
|
|
7
7
|
import { r as listThinkingLevels } from "./thinking-z4_linel.js";
|
|
8
8
|
|
|
9
9
|
//#region src/config/commands.ts
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { d as resolveStateDir } from "./paths-
|
|
3
|
-
import { C as triggerInternalHook, b as createInternalHookEvent, l as getActivePluginRegistry, t as createSubsystemLogger } from "./subsystem-
|
|
2
|
+
import { d as resolveStateDir } from "./paths-DQpv9a3Q.js";
|
|
3
|
+
import { C as triggerInternalHook, b as createInternalHookEvent, l as getActivePluginRegistry, t as createSubsystemLogger } from "./subsystem-D7ZepYT1.js";
|
|
4
4
|
import { m as normalizeOptionalAccountId, p as normalizeAccountId } from "./session-key-CuLPSMu_.js";
|
|
5
|
-
import { t as getChannelDock } from "./dock-
|
|
6
|
-
import { i as isSilentReplyText, n as SILENT_REPLY_TOKEN } from "./tokens-
|
|
7
|
-
import { r as normalizeChannelId, t as getChannelPlugin } from "./plugins-
|
|
5
|
+
import { t as getChannelDock } from "./dock-ejUetwTC.js";
|
|
6
|
+
import { i as isSilentReplyText, n as SILENT_REPLY_TOKEN } from "./tokens-DGajj8M9.js";
|
|
7
|
+
import { r as normalizeChannelId, t as getChannelPlugin } from "./plugins-DYr-HHj0.js";
|
|
8
8
|
import { n as generateSecureUuid } from "./secure-random-B1N_MXT_.js";
|
|
9
|
-
import { i as isMessagingToolDuplicate } from "./pi-embedded-helpers-
|
|
10
|
-
import { E as parseInlineDirectives, a as resolveMirroredTranscriptText, i as appendAssistantMessageToSessionTranscript } from "./sessions-
|
|
11
|
-
import { c as resolveChunkMode, f as parseFenceSpans, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit, n as chunkByParagraph } from "./chunk-
|
|
12
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
13
|
-
import { t as getAgentScopedMediaLocalRoots } from "./local-roots-
|
|
14
|
-
import { l as markdownToSignalTextChunks, t as sendMessageSignal } from "./send-
|
|
9
|
+
import { i as isMessagingToolDuplicate } from "./pi-embedded-helpers-CUoUoEEN.js";
|
|
10
|
+
import { E as parseInlineDirectives, a as resolveMirroredTranscriptText, i as appendAssistantMessageToSessionTranscript } from "./sessions-DRA4oaxz.js";
|
|
11
|
+
import { c as resolveChunkMode, f as parseFenceSpans, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit, n as chunkByParagraph } from "./chunk-Djk-9JeT.js";
|
|
12
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-R8VTpfE9.js";
|
|
13
|
+
import { t as getAgentScopedMediaLocalRoots } from "./local-roots-d4y0lvs2.js";
|
|
14
|
+
import { l as markdownToSignalTextChunks, t as sendMessageSignal } from "./send-Y1hD4tQ1.js";
|
|
15
15
|
import path from "node:path";
|
|
16
|
-
import
|
|
16
|
+
import fs from "node:fs";
|
|
17
17
|
|
|
18
18
|
//#region src/plugins/hooks.ts
|
|
19
19
|
/**
|
|
@@ -843,11 +843,11 @@ function resolveFailedDir(stateDir) {
|
|
|
843
843
|
/** Ensure the queue directory (and failed/ subdirectory) exist. */
|
|
844
844
|
async function ensureQueueDir(stateDir) {
|
|
845
845
|
const queueDir = resolveQueueDir(stateDir);
|
|
846
|
-
await
|
|
846
|
+
await fs.promises.mkdir(queueDir, {
|
|
847
847
|
recursive: true,
|
|
848
848
|
mode: 448
|
|
849
849
|
});
|
|
850
|
-
await
|
|
850
|
+
await fs.promises.mkdir(resolveFailedDir(stateDir), {
|
|
851
851
|
recursive: true,
|
|
852
852
|
mode: 448
|
|
853
853
|
});
|
|
@@ -874,18 +874,18 @@ async function enqueueDelivery(params, stateDir) {
|
|
|
874
874
|
const filePath = path.join(queueDir, `${id}.json`);
|
|
875
875
|
const tmp = `${filePath}.${process.pid}.tmp`;
|
|
876
876
|
const json = JSON.stringify(entry, null, 2);
|
|
877
|
-
await
|
|
877
|
+
await fs.promises.writeFile(tmp, json, {
|
|
878
878
|
encoding: "utf-8",
|
|
879
879
|
mode: 384
|
|
880
880
|
});
|
|
881
|
-
await
|
|
881
|
+
await fs.promises.rename(tmp, filePath);
|
|
882
882
|
return id;
|
|
883
883
|
}
|
|
884
884
|
/** Remove a successfully delivered entry from the queue. */
|
|
885
885
|
async function ackDelivery(id, stateDir) {
|
|
886
886
|
const filePath = path.join(resolveQueueDir(stateDir), `${id}.json`);
|
|
887
887
|
try {
|
|
888
|
-
await
|
|
888
|
+
await fs.promises.unlink(filePath);
|
|
889
889
|
} catch (err) {
|
|
890
890
|
if ((err && typeof err === "object" && "code" in err ? String(err.code) : null) !== "ENOENT") throw err;
|
|
891
891
|
}
|
|
@@ -893,17 +893,17 @@ async function ackDelivery(id, stateDir) {
|
|
|
893
893
|
/** Update a queue entry after a failed delivery attempt. */
|
|
894
894
|
async function failDelivery(id, error, stateDir) {
|
|
895
895
|
const filePath = path.join(resolveQueueDir(stateDir), `${id}.json`);
|
|
896
|
-
const raw = await
|
|
896
|
+
const raw = await fs.promises.readFile(filePath, "utf-8");
|
|
897
897
|
const entry = JSON.parse(raw);
|
|
898
898
|
entry.retryCount += 1;
|
|
899
899
|
entry.lastAttemptAt = Date.now();
|
|
900
900
|
entry.lastError = error;
|
|
901
901
|
const tmp = `${filePath}.${process.pid}.tmp`;
|
|
902
|
-
await
|
|
902
|
+
await fs.promises.writeFile(tmp, JSON.stringify(entry, null, 2), {
|
|
903
903
|
encoding: "utf-8",
|
|
904
904
|
mode: 384
|
|
905
905
|
});
|
|
906
|
-
await
|
|
906
|
+
await fs.promises.rename(tmp, filePath);
|
|
907
907
|
}
|
|
908
908
|
|
|
909
909
|
//#endregion
|
|
@@ -18,27 +18,27 @@ var deps_exports = /* @__PURE__ */ __exportAll({ createDefaultDeps: () => create
|
|
|
18
18
|
function createDefaultDeps() {
|
|
19
19
|
return {
|
|
20
20
|
sendMessageWhatsApp: async (...args) => {
|
|
21
|
-
const { sendMessageWhatsApp } = await import("./web-
|
|
21
|
+
const { sendMessageWhatsApp } = await import("./web-t3fXJTeB.js");
|
|
22
22
|
return await sendMessageWhatsApp(...args);
|
|
23
23
|
},
|
|
24
24
|
sendMessageTelegram: async (...args) => {
|
|
25
|
-
const { sendMessageTelegram } = await import("./send-
|
|
25
|
+
const { sendMessageTelegram } = await import("./send-FLdrx-oF.js").then((n) => n.l);
|
|
26
26
|
return await sendMessageTelegram(...args);
|
|
27
27
|
},
|
|
28
28
|
sendMessageDiscord: async (...args) => {
|
|
29
|
-
const { sendMessageDiscord } = await import("./send-
|
|
29
|
+
const { sendMessageDiscord } = await import("./send-IlPMLAH-.js").then((n) => n.t);
|
|
30
30
|
return await sendMessageDiscord(...args);
|
|
31
31
|
},
|
|
32
32
|
sendMessageSlack: async (...args) => {
|
|
33
|
-
const { sendMessageSlack } = await import("./send-
|
|
33
|
+
const { sendMessageSlack } = await import("./send-DZa8fWSm.js").then((n) => n.n);
|
|
34
34
|
return await sendMessageSlack(...args);
|
|
35
35
|
},
|
|
36
36
|
sendMessageSignal: async (...args) => {
|
|
37
|
-
const { sendMessageSignal } = await import("./send-
|
|
37
|
+
const { sendMessageSignal } = await import("./send-Y1hD4tQ1.js").then((n) => n.i);
|
|
38
38
|
return await sendMessageSignal(...args);
|
|
39
39
|
},
|
|
40
40
|
sendMessageIMessage: async (...args) => {
|
|
41
|
-
const { sendMessageIMessage } = await import("./send-
|
|
41
|
+
const { sendMessageIMessage } = await import("./send-BOxJ4QXF.js").then((n) => n.n);
|
|
42
42
|
return await sendMessageIMessage(...args);
|
|
43
43
|
}
|
|
44
44
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
2
|
+
import { t as createSubsystemLogger } from "./subsystem-D7ZepYT1.js";
|
|
3
3
|
import { i as pruneDiagnosticSessionStates, r as getDiagnosticSessionState, t as diagnosticSessionStates } from "./diagnostic-session-state-BGF2r-kt.js";
|
|
4
4
|
|
|
5
5
|
//#region src/infra/diagnostic-events.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { d as requireActivePluginRegistry, i as getChatChannelMeta, r as CHAT_CHANNEL_ORDER } from "./subsystem-
|
|
2
|
-
import { d as normalizeE164, o as escapeRegExp } from "./utils-
|
|
1
|
+
import { d as requireActivePluginRegistry, i as getChatChannelMeta, r as CHAT_CHANNEL_ORDER } from "./subsystem-D7ZepYT1.js";
|
|
2
|
+
import { d as normalizeE164, o as escapeRegExp } from "./utils-D9wGoiU9.js";
|
|
3
3
|
import { p as normalizeAccountId } from "./session-key-CuLPSMu_.js";
|
|
4
|
-
import { _ as resolveDiscordAccount, a as normalizeWhatsAppTarget, d as resolveSlackAccount, f as resolveSlackReplyToMode, l as resolveTelegramAccount } from "./plugins-
|
|
5
|
-
import { n as resolveWhatsAppAccount } from "./accounts-
|
|
4
|
+
import { _ as resolveDiscordAccount, a as normalizeWhatsAppTarget, d as resolveSlackAccount, f as resolveSlackReplyToMode, l as resolveTelegramAccount } from "./plugins-DYr-HHj0.js";
|
|
5
|
+
import { n as resolveWhatsAppAccount } from "./accounts-BQC_GRUB.js";
|
|
6
6
|
import { t as resolveAccountEntry } from "./account-lookup-DlMshWZ_.js";
|
|
7
|
-
import { n as resolveSignalAccount } from "./accounts-
|
|
8
|
-
import { t as resolveIMessageAccount } from "./accounts-
|
|
7
|
+
import { n as resolveSignalAccount } from "./accounts-B8cGzkjD.js";
|
|
8
|
+
import { t as resolveIMessageAccount } from "./accounts-D5tB_lO0.js";
|
|
9
9
|
|
|
10
10
|
//#region src/config/types.tools.ts
|
|
11
11
|
const TOOLS_BY_SENDER_KEY_TYPES = [
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import "./agent-scope-Bxq1eWbA.js";
|
|
2
|
+
import "./paths-DQpv9a3Q.js";
|
|
3
|
+
import "./subsystem-D7ZepYT1.js";
|
|
4
|
+
import { D as logVerbose } from "./utils-D9wGoiU9.js";
|
|
5
|
+
import "./runtime-8mi3mpYB.js";
|
|
6
|
+
import "./workspace-tAtkoD_r.js";
|
|
7
|
+
import "./model-selection-C5hI1dum.js";
|
|
8
|
+
import "./github-copilot-token-BjmEQcmi.js";
|
|
9
|
+
import "./boolean-CE7i9tBR.js";
|
|
10
|
+
import "./env-q-PhWbb_.js";
|
|
11
|
+
import "./dock-ejUetwTC.js";
|
|
12
|
+
import "./tokens-DGajj8M9.js";
|
|
13
|
+
import { B as clearSessionQueues, F as isAbortRequestText, I as stopSubagentsForRequester, P as formatAbortReplyText, n as abortEmbeddedPiRun } from "./pi-embedded-k2mZJOsr.js";
|
|
14
|
+
import "./plugins-DYr-HHj0.js";
|
|
15
|
+
import "./accounts-BQC_GRUB.js";
|
|
16
|
+
import "./bindings-CLZIJ0Eo.js";
|
|
17
|
+
import "./auth-store-Bb4aajHu.js";
|
|
18
|
+
import "./send-DZa8fWSm.js";
|
|
19
|
+
import "./send-IlPMLAH-.js";
|
|
20
|
+
import "./deliver-CIFO6sel.js";
|
|
21
|
+
import "./diagnostic-BvlZ0Sot.js";
|
|
22
|
+
import "./diagnostic-session-state-BGF2r-kt.js";
|
|
23
|
+
import "./accounts-B8cGzkjD.js";
|
|
24
|
+
import "./send-FLdrx-oF.js";
|
|
25
|
+
import "./image-ops-J8P5zOFm.js";
|
|
26
|
+
import "./pi-model-discovery-Dlx4RLWo.js";
|
|
27
|
+
import "./message-channel-ZdI1-uUh.js";
|
|
28
|
+
import "./pi-embedded-helpers-CUoUoEEN.js";
|
|
29
|
+
import "./chrome-xahUzIaT.js";
|
|
30
|
+
import "./ssrf-CZeHDwVZ.js";
|
|
31
|
+
import "./frontmatter-pTUG4Sx_.js";
|
|
32
|
+
import "./skills-umlGvChF.js";
|
|
33
|
+
import "./path-alias-guards-BZmt6hFb.js";
|
|
34
|
+
import "./redact-1Y0KPNtr.js";
|
|
35
|
+
import "./errors-C4SHjIZK.js";
|
|
36
|
+
import "./fs-safe-2l05hI1Y.js";
|
|
37
|
+
import "./store-D-ZicQeo.js";
|
|
38
|
+
import { s as loadSessionStore } from "./sessions-DRA4oaxz.js";
|
|
39
|
+
import "./accounts-D5tB_lO0.js";
|
|
40
|
+
import { r as resolveDefaultSessionStorePath } from "./paths-D3p7ZvM6.js";
|
|
41
|
+
import "./tool-images-Duuqr4bN.js";
|
|
42
|
+
import "./thinking-z4_linel.js";
|
|
43
|
+
import "./image-D9D-lzCw.js";
|
|
44
|
+
import "./reply-prefix-DCljZiIB.js";
|
|
45
|
+
import "./manager-CgzA1hKo.js";
|
|
46
|
+
import "./gemini-auth-DLSGffQK.js";
|
|
47
|
+
import "./fetch-guard-CcfDZXe9.js";
|
|
48
|
+
import "./query-expansion-DHuNyU-_.js";
|
|
49
|
+
import "./retry-CG6cMRDQ.js";
|
|
50
|
+
import "./target-errors-B1mcM4WR.js";
|
|
51
|
+
import "./chunk-Djk-9JeT.js";
|
|
52
|
+
import "./markdown-tables-R8VTpfE9.js";
|
|
53
|
+
import "./local-roots-d4y0lvs2.js";
|
|
54
|
+
import "./ir-BT5aAdU9.js";
|
|
55
|
+
import "./render-MTSxc7LK.js";
|
|
56
|
+
import "./commands-registry-_TBHHpvt.js";
|
|
57
|
+
import "./skill-commands-BHTBXXVn.js";
|
|
58
|
+
import "./runner-DjDddZhb.js";
|
|
59
|
+
import "./fetch-CsfR_943.js";
|
|
60
|
+
import "./channel-activity-DdL3RAv_.js";
|
|
61
|
+
import "./tables-Co_R_WKs.js";
|
|
62
|
+
import "./send-Y1hD4tQ1.js";
|
|
63
|
+
import "./outbound-attachment-IfeZJAKk.js";
|
|
64
|
+
import "./send-BOxJ4QXF.js";
|
|
65
|
+
import "./resolve-route-ClcifpKn.js";
|
|
66
|
+
import "./proxy-CRB9oCP5.js";
|
|
67
|
+
import "./replies-2C16fnBP.js";
|
|
68
|
+
import "./deps-DwTILPLD.js";
|
|
69
|
+
|
|
70
|
+
//#region src/auto-reply/reply/emergency-stop.ts
|
|
71
|
+
/**
|
|
72
|
+
* Emergency stop — bypass all queues and debouncing.
|
|
73
|
+
* Called at the earliest ingress point (before debouncer) to guarantee immediate execution.
|
|
74
|
+
*/
|
|
75
|
+
/**
|
|
76
|
+
* Execute an emergency stop for a session.
|
|
77
|
+
* Clears all queues, aborts embedded runs, and stops subagents.
|
|
78
|
+
* Returns the reply text to send to the user.
|
|
79
|
+
*/
|
|
80
|
+
function emergencyStop(params) {
|
|
81
|
+
const { cfg, sessionKey, sessionId } = params;
|
|
82
|
+
const cleared = clearSessionQueues([sessionKey, sessionId]);
|
|
83
|
+
if (cleared.followupCleared > 0 || cleared.laneCleared > 0) logVerbose(`emergency-stop: cleared followups=${cleared.followupCleared} lane=${cleared.laneCleared} keys=${cleared.keys.join(",")}`);
|
|
84
|
+
if (sessionId) abortEmbeddedPiRun(sessionId);
|
|
85
|
+
const { stopped } = stopSubagentsForRequester({
|
|
86
|
+
cfg,
|
|
87
|
+
requesterSessionKey: sessionKey
|
|
88
|
+
});
|
|
89
|
+
logVerbose(`emergency-stop: sessionKey=${sessionKey} sessionId=${sessionId} stoppedSubagents=${stopped}`);
|
|
90
|
+
return {
|
|
91
|
+
aborted: true,
|
|
92
|
+
replyText: formatAbortReplyText(stopped),
|
|
93
|
+
sessionKey
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Resolve session info from the session store for emergency stop.
|
|
98
|
+
* Lightweight — just reads the store, no locks.
|
|
99
|
+
*/
|
|
100
|
+
function resolveSessionForEmergencyStop(sessionKey) {
|
|
101
|
+
try {
|
|
102
|
+
const store = loadSessionStore(resolveDefaultSessionStorePath());
|
|
103
|
+
return {
|
|
104
|
+
sessionId: store[sessionKey]?.sessionId,
|
|
105
|
+
store
|
|
106
|
+
};
|
|
107
|
+
} catch {
|
|
108
|
+
return {};
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
//#endregion
|
|
113
|
+
export { emergencyStop, isAbortRequestText, resolveSessionForEmergencyStop };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as logWarn } from "./workspace-
|
|
1
|
+
import { S as logWarn } from "./workspace-tAtkoD_r.js";
|
|
2
2
|
import { a as resolvePinnedHostnameWithPolicy, n as closeDispatcher, r as createPinnedDispatcher, t as SsrFBlockedError } from "./ssrf-CZeHDwVZ.js";
|
|
3
3
|
import { t as bindAbortRelay } from "./fetch-timeout-3YYM8QuM.js";
|
|
4
4
|
import { EnvHttpProxyAgent } from "undici";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as parseBooleanValue } from "./boolean-CE7i9tBR.js";
|
|
2
2
|
import { n as MANIFEST_KEY, t as LEGACY_MANIFEST_KEYS } from "./legacy-names-B4ZvHEmO.js";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import
|
|
4
|
+
import fs from "node:fs";
|
|
5
5
|
import JSON5 from "json5";
|
|
6
6
|
import YAML from "yaml";
|
|
7
7
|
|
|
@@ -93,7 +93,7 @@ function hasBinary(bin) {
|
|
|
93
93
|
for (const part of parts) for (const ext of extensions) {
|
|
94
94
|
const candidate = path.join(part, bin + ext);
|
|
95
95
|
try {
|
|
96
|
-
|
|
96
|
+
fs.accessSync(candidate, fs.constants.X_OK);
|
|
97
97
|
hasBinaryCache.set(bin, true);
|
|
98
98
|
return true;
|
|
99
99
|
} catch {}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as isNotFoundPathError, E as sameFileIdentity, M as isSymlinkOpenError, j as isPathInside } from "./workspace-
|
|
2
|
-
import { n as assertNoPathAliasEscape } from "./path-alias-guards-
|
|
1
|
+
import { A as isNotFoundPathError, E as sameFileIdentity, M as isSymlinkOpenError, j as isPathInside } from "./workspace-tAtkoD_r.js";
|
|
2
|
+
import { n as assertNoPathAliasEscape } from "./path-alias-guards-BZmt6hFb.js";
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { constants } from "node:fs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as normalizeProviderId } from "./model-selection-
|
|
2
|
-
import { n as formatErrorMessage } from "./errors-
|
|
1
|
+
import { c as normalizeProviderId } from "./model-selection-C5hI1dum.js";
|
|
2
|
+
import { n as formatErrorMessage } from "./errors-C4SHjIZK.js";
|
|
3
3
|
|
|
4
4
|
//#region src/agents/live-auth-keys.ts
|
|
5
5
|
const KEY_SPLIT_RE = /[\s,;]+/g;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { d as resolveStateDir } from "./paths-
|
|
2
|
+
import { d as resolveStateDir } from "./paths-DQpv9a3Q.js";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import
|
|
4
|
+
import fs from "node:fs";
|
|
5
5
|
|
|
6
6
|
//#region src/infra/json-file.ts
|
|
7
7
|
function loadJsonFile(pathname) {
|
|
8
8
|
try {
|
|
9
|
-
if (!
|
|
10
|
-
const raw =
|
|
9
|
+
if (!fs.existsSync(pathname)) return;
|
|
10
|
+
const raw = fs.readFileSync(pathname, "utf8");
|
|
11
11
|
return JSON.parse(raw);
|
|
12
12
|
} catch {
|
|
13
13
|
return;
|
|
@@ -15,12 +15,12 @@ function loadJsonFile(pathname) {
|
|
|
15
15
|
}
|
|
16
16
|
function saveJsonFile(pathname, data) {
|
|
17
17
|
const dir = path.dirname(pathname);
|
|
18
|
-
if (!
|
|
18
|
+
if (!fs.existsSync(dir)) fs.mkdirSync(dir, {
|
|
19
19
|
recursive: true,
|
|
20
20
|
mode: 448
|
|
21
21
|
});
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
fs.writeFileSync(pathname, `${JSON.stringify(data, null, 2)}\n`, "utf8");
|
|
23
|
+
fs.chmodSync(pathname, 384);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
//#endregion
|