@hanzo/bot 2026.3.11 → 2026.3.13
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-cApXM7Ij.js → accounts-BfUDrXkg.js} +17 -17
- package/dist/{accounts-7zwrtsCi.js → accounts-CU6IpCdO.js} +2 -2
- package/dist/{accounts-BEs2omoE.js → accounts-CvwEUGLi.js} +2 -2
- package/dist/{active-listener-DR8OFowd.js → active-listener-BrRv4Xwc.js} +2 -2
- package/dist/{api-key-rotation-RknBrUrn.js → api-key-rotation-GaH2pQmb.js} +2 -2
- package/dist/{audio-preflight-Chfaq_QP.js → audio-preflight-ClPkYtiy.js} +32 -32
- package/dist/{audio-preflight-D2ryNxLv.js → audio-preflight-hEJ-K1Ib.js} +4 -4
- package/dist/{audio-transcription-runner-BI-TLd1r.js → audio-transcription-runner-CqUAFMxM.js} +1 -1
- package/dist/{audio-transcription-runner-BvSPpIzU.js → audio-transcription-runner-DcmYYRTV.js} +12 -12
- package/dist/{audit-membership-runtime-CVVxrZ7j.js → audit-membership-runtime-BJ149bTU.js} +4 -4
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +51 -51
- package/dist/bundled/bootstrap-extra-files/handler.js +6 -6
- package/dist/bundled/command-logger/handler.js +2 -2
- package/dist/bundled/session-memory/handler.js +51 -51
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-CALqzTg5.js → channel-activity-BtB_KYWB.js} +3 -3
- package/dist/{chrome-CFVzlBUF.js → chrome-CiH9yYg6.js} +18 -18
- package/dist/{chrome-DWoTm_BG.js → chrome-jdOx2dAl.js} +8 -8
- package/dist/{cloud-connect-bZKXaJWj.js → cloud-connect-yv8A2P84.js} +1 -1
- package/dist/{commands-registry-DD9ywdfc.js → commands-registry-CYzULUtG.js} +4 -4
- package/dist/{deliver-B2IvdEAO.js → deliver-CQ6QaVna.js} +21 -21
- package/dist/{deliver-BrVS3qD4.js → deliver-DpRQLcxS.js} +1 -1
- package/dist/{deliver-runtime-y426rL_k.js → deliver-runtime-9qy2zTFN.js} +3 -3
- package/dist/deliver-runtime-AIl3Ydhb.js +36 -0
- package/dist/deps-send-discord.runtime-BCKKTBVj.js +26 -0
- package/dist/deps-send-imessage.runtime-CrYNg1e_.js +25 -0
- package/dist/deps-send-signal.runtime-rttQOioa.js +24 -0
- package/dist/deps-send-slack.runtime-BsCUhMAR.js +22 -0
- package/dist/deps-send-telegram.runtime-sOFkXXMD.js +27 -0
- package/dist/deps-send-whatsapp.runtime-B4PrMybd.js +60 -0
- package/dist/{deps-send-whatsapp.runtime-CUDRJQI6.js → deps-send-whatsapp.runtime-CZEk5mx7.js} +7 -7
- package/dist/{diagnostic-pXxnbxER.js → diagnostic-Dt3OGXoB.js} +2 -2
- package/dist/entry.js +1 -1
- package/dist/{errors-CHd6Q-vF.js → errors-DDrhcWHi.js} +1 -1
- package/dist/extensionAPI.js +6 -6
- package/dist/{fetch-DZVswJ-3.js → fetch-C7bGdK_0.js} +5 -5
- package/dist/{fetch-guard-EqKIhwBB.js → fetch-guard-Danf_0St.js} +2 -2
- package/dist/{frontmatter-B6XNqDx2.js → frontmatter-BFHzrAY7.js} +3 -3
- package/dist/{fs-safe-ClYE3-y0.js → fs-safe-Cou1ijNV.js} +4 -4
- package/dist/{github-copilot-token-BDioPmd6.js → github-copilot-token-D13V9YBz.js} +7 -7
- package/dist/{image-BgWMM5C3.js → image-Cw0N8PLF.js} +6 -6
- package/dist/{image-D99xLnGA.js → image-YeyG7rr8.js} +1 -1
- package/dist/{image-ops-DGh7juCd.js → image-ops-C23SGeMe.js} +2 -2
- package/dist/image-runtime-BTWt5pDL.js +29 -0
- package/dist/{image-runtime-BHiX93k-.js → image-runtime-DZ9BSPkK.js} +3 -3
- package/dist/{ir-BUxTWPJl.js → ir-CeK8iZwE.js} +8 -8
- package/dist/{legacy-names-DZdACm3t.js → legacy-names-Bkl4tjN-.js} +1 -1
- package/dist/llm-slug-generator.js +51 -51
- package/dist/{local-launch-DO77bp0N.js → local-launch-CUwfR4xk.js} +29 -9
- package/dist/{logger-LCC1m_20.js → logger-D4RcXHR-.js} +7 -7
- package/dist/{login-BPpT7LmW.js → login-CHghmysG.js} +5 -5
- package/dist/{login-qr-ROsDrMTV.js → login-qr-CNFNhTf4.js} +10 -10
- package/dist/{manager-DcZ7mOtr.js → manager-DD6mzJNU.js} +13 -13
- package/dist/manager-runtime-Daqs8hiB.js +18 -0
- package/dist/{model-selection-DX7XfNlF.js → model-selection-CLGE3YIs.js} +43 -43
- package/dist/{outbound-attachment-CC04mCS8.js → outbound-attachment-gUN8NzLf.js} +2 -2
- package/dist/{outbound-CQ5XVDFO.js → outbound-qbvc4GA6.js} +6 -6
- package/dist/{path-alias-guards-IQC4IpGS.js → path-alias-guards-BzNEeFKJ.js} +1 -1
- package/dist/{paths-GZsDv0mI.js → paths-0WxUzzEz.js} +4 -4
- package/dist/{paths-Cvc9EM8Y.js → paths-C6TxBCvO.js} +5 -5
- package/dist/{pi-embedded-bHDdzvEW.js → pi-embedded-DF0t5HJD.js} +159 -159
- package/dist/{pi-embedded-DoF5GLjn.js → pi-embedded-bklbT-yp.js} +24 -24
- package/dist/{pi-embedded-helpers-CVj2Bw45.js → pi-embedded-helpers-BT9OkmaI.js} +52 -52
- package/dist/{pi-embedded-helpers-DkZKaPa4.js → pi-embedded-helpers-CSHUPpwW.js} +3 -3
- package/dist/pi-model-discovery-runtime-C9astVbX.js +11 -0
- package/dist/{pi-model-discovery-BYBYqQ0u.js → pi-model-discovery-vsJpfYA9.js} +7 -7
- package/dist/{pi-tools.before-tool-call.runtime-BiTed3Jt.js → pi-tools.before-tool-call.runtime-D-Vj4eZ7.js} +9 -9
- package/dist/plugin-sdk/discord.js +6 -6
- package/dist/plugin-sdk/mattermost.js +3 -3
- package/dist/{plugins-DB-tbkgl.js → plugins-BZY4UQdP.js} +13 -13
- package/dist/{proxy-env-CiOhiqru.js → proxy-env-BgSzvACM.js} +1 -1
- package/dist/{proxy-fetch-lxJGuoUa.js → proxy-fetch-ChfJDZwG.js} +1 -1
- package/dist/{pw-ai-Mq6HuD9y.js → pw-ai-C99W41P5.js} +1 -1
- package/dist/{pw-ai-WtE5uJRQ.js → pw-ai-CaeuHJYc.js} +14 -14
- package/dist/{qmd-manager-Bcw2cb8D.js → qmd-manager-IaHGjYlf.js} +10 -10
- package/dist/{query-expansion-D9bYNybh.js → query-expansion-CzkZbxDS.js} +6 -6
- package/dist/{redact-DqlKR0-n.js → redact-DGz6yigq.js} +1 -1
- package/dist/{run-main-BDJMRMI4.js → run-main-BmfZLBd9.js} +2 -2
- package/dist/{run-with-concurrency-B8f7bYi3.js → run-with-concurrency-Ccm0w34R.js} +4 -4
- package/dist/runtime-whatsapp-login.runtime-BQjNpkbA.js +13 -0
- package/dist/runtime-whatsapp-outbound.runtime-GVjcQLWE.js +22 -0
- package/dist/{send-CkPIBk6V.js → send-BRWGalFX.js} +8 -8
- package/dist/{send-BftnuVa7.js → send-CYoz4Xjy.js} +7 -7
- package/dist/{send-D9k6sRe5.js → send-Cpd5Q5mD.js} +6 -6
- package/dist/{send-yLSU7X_F.js → send-Dsz28eiu.js} +28 -28
- package/dist/{send-pIawmzTN.js → send-tBfK5Za7.js} +5 -5
- package/dist/{session-CgL23zvS.js → session-Dn8bzB0l.js} +8 -8
- package/dist/{skill-commands-Cnz3QjWm.js → skill-commands-LO2hG7Hm.js} +9 -9
- package/dist/{skills-BhLAW7lA.js → skills-mpCKgKof.js} +22 -22
- package/dist/slash-commands.runtime-Qho-6_Lc.js +16 -0
- package/dist/{slash-dispatch.runtime-BI4kyhSk.js → slash-dispatch.runtime-CLPlz-lX.js} +6 -6
- package/dist/slash-dispatch.runtime-CkR-TldC.js +56 -0
- package/dist/slash-skill-commands.runtime-DmrTozXn.js +20 -0
- package/dist/{store-EDjci9yP.js → store-DbpT7v8D.js} +2 -2
- package/dist/subagent-registry-runtime-DWAZpHqO.js +56 -0
- package/dist/{subagent-registry-runtime-nzkRCNeS.js → subagent-registry-runtime-TuyVULIb.js} +6 -6
- package/dist/{subsystem-CdFYjh2k.js → subsystem-W834z9Wa.js} +14 -14
- package/dist/{tables-tp9Zl0hI.js → tables-BpeU6RzS.js} +1 -1
- package/dist/{target-errors-3YX3buv4.js → target-errors-Dcsvl3HX.js} +2 -2
- package/dist/{thinking-BaTRgLOg.js → thinking-DzbkyD99.js} +7 -7
- package/dist/{tokens-mtgzW7UN.js → tokens-Cyi-NbsV.js} +1 -1
- package/dist/{tool-images-C3-c00jy.js → tool-images-DktJ_8C5.js} +2 -2
- package/dist/{web-BOPbMZux.js → web-BByXTa4p.js} +55 -55
- package/dist/{web-72kt7sM1.js → web-Ci3EFOGu.js} +6 -6
- package/dist/{whatsapp-actions-BQWT_h74.js → whatsapp-actions-BK9m2IVX.js} +21 -21
- package/dist/{workspace-DKhOowSl.js → workspace-BhNk7PBH.js} +20 -20
- package/extensions/acpx/package.json +1 -1
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/ci-fix-loop/package.json +1 -1
- package/extensions/continuous-learning/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/diffs/package.json +1 -1
- package/extensions/discord/package.json +1 -1
- package/extensions/feishu/package.json +1 -1
- package/extensions/flow/package.json +1 -1
- package/extensions/google-antigravity-auth/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/googlechat/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/lobster/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +10 -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 +10 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +10 -0
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/self-improvement/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 +10 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +10 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/whatsapp/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +10 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +10 -0
- package/extensions/zalouser/package.json +1 -1
- package/package.json +1 -1
- package/dist/deliver-runtime-DY7UPWdO.js +0 -36
- package/dist/deps-send-discord.runtime-B_MPWdLu.js +0 -26
- package/dist/deps-send-imessage.runtime-BqgAHmfA.js +0 -25
- package/dist/deps-send-signal.runtime-B4CYnceH.js +0 -24
- package/dist/deps-send-slack.runtime-dtkYbGcS.js +0 -22
- package/dist/deps-send-telegram.runtime-C5f1UIXW.js +0 -27
- package/dist/deps-send-whatsapp.runtime-D6XwcPPI.js +0 -60
- package/dist/image-runtime-v_h0aTZD.js +0 -29
- package/dist/manager-runtime-D_u9rPEs.js +0 -18
- package/dist/pi-model-discovery-runtime-ZDLroaI6.js +0 -11
- package/dist/runtime-whatsapp-login.runtime-A_4Z63o5.js +0 -13
- package/dist/runtime-whatsapp-outbound.runtime-QGzX864p.js +0 -22
- package/dist/slash-commands.runtime-BD-KtYmG.js +0 -16
- package/dist/slash-dispatch.runtime-Dzq3WGxH.js +0 -56
- package/dist/slash-skill-commands.runtime-EpYM7zik.js +0 -20
- package/dist/subagent-registry-runtime-DwTeW5f1.js +0 -56
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { _ as toAgentModelListLike, c as resolveAgentWorkspaceDir, g as resolveAgentModelPrimaryValue, i as resolveAgentConfig, l as resolveDefaultAgentId, o as resolveAgentEffectiveModelPrimary, t as runTasksWithConcurrency } from "./run-with-concurrency-
|
|
3
|
-
import { c as resolveStateDir, d as resolveRequiredHomeDir, i as resolveDefaultConfigCandidates, l as expandHomePrefix, r as resolveConfigPath, s as resolveOAuthPath, t as DEFAULT_GATEWAY_PORT } from "./paths-
|
|
4
|
-
import { n as stripAnsi, t as createSubsystemLogger, u as logVerbose } from "./subsystem-
|
|
5
|
-
import { O as isPathInside$2, R as normalizeAgentId, _ as runExec, j as DEFAULT_AGENT_ID, q as isBlockedObjectKey, x as openBoundaryFileSync, y as canUseBoundaryFileOpen } from "./workspace-
|
|
6
|
-
import { C as sleep, D as isPlainObject$2, _ as resolveConfigDir, f as isRecord$3, y as resolveUserPath } from "./logger-
|
|
7
|
-
import { a as saveJsonFile, i as loadJsonFile, r as resolveCopilotApiToken, t as DEFAULT_COPILOT_API_BASE_URL } from "./github-copilot-token-
|
|
8
|
-
import { c as parseBooleanValue, n as MANIFEST_KEY, o as registerInternalHook } from "./legacy-names-
|
|
2
|
+
import { _ as toAgentModelListLike, c as resolveAgentWorkspaceDir, g as resolveAgentModelPrimaryValue, i as resolveAgentConfig, l as resolveDefaultAgentId, o as resolveAgentEffectiveModelPrimary, t as runTasksWithConcurrency } from "./run-with-concurrency-Ccm0w34R.js";
|
|
3
|
+
import { c as resolveStateDir, d as resolveRequiredHomeDir, i as resolveDefaultConfigCandidates, l as expandHomePrefix, r as resolveConfigPath, s as resolveOAuthPath, t as DEFAULT_GATEWAY_PORT } from "./paths-C6TxBCvO.js";
|
|
4
|
+
import { n as stripAnsi, t as createSubsystemLogger, u as logVerbose } from "./subsystem-W834z9Wa.js";
|
|
5
|
+
import { O as isPathInside$2, R as normalizeAgentId, _ as runExec, j as DEFAULT_AGENT_ID, q as isBlockedObjectKey, x as openBoundaryFileSync, y as canUseBoundaryFileOpen } from "./workspace-BhNk7PBH.js";
|
|
6
|
+
import { C as sleep, D as isPlainObject$2, _ as resolveConfigDir, f as isRecord$3, y as resolveUserPath } from "./logger-D4RcXHR-.js";
|
|
7
|
+
import { a as saveJsonFile, i as loadJsonFile, r as resolveCopilotApiToken, t as DEFAULT_COPILOT_API_BASE_URL } from "./github-copilot-token-D13V9YBz.js";
|
|
8
|
+
import { c as parseBooleanValue, n as MANIFEST_KEY, o as registerInternalHook } from "./legacy-names-Bkl4tjN-.js";
|
|
9
9
|
import { createRequire } from "node:module";
|
|
10
10
|
import fs from "node:fs/promises";
|
|
11
11
|
import os from "node:os";
|
|
12
12
|
import path from "node:path";
|
|
13
|
-
import
|
|
13
|
+
import syncFs from "node:fs";
|
|
14
14
|
import JSON5 from "json5";
|
|
15
15
|
import { isDeepStrictEqual } from "node:util";
|
|
16
16
|
import { execFileSync, spawn } from "node:child_process";
|
|
@@ -333,7 +333,7 @@ function isValidPid(pid) {
|
|
|
333
333
|
function isZombieProcess(pid) {
|
|
334
334
|
if (process.platform !== "linux") return false;
|
|
335
335
|
try {
|
|
336
|
-
return
|
|
336
|
+
return syncFs.readFileSync(`/proc/${pid}/status`, "utf8").match(/^State:\s+(\S)/m)?.[1] === "Z";
|
|
337
337
|
} catch {
|
|
338
338
|
return false;
|
|
339
339
|
}
|
|
@@ -360,7 +360,7 @@ function getProcessStartTime(pid) {
|
|
|
360
360
|
if (process.platform !== "linux") return null;
|
|
361
361
|
if (!isValidPid(pid)) return null;
|
|
362
362
|
try {
|
|
363
|
-
const stat =
|
|
363
|
+
const stat = syncFs.readFileSync(`/proc/${pid}/stat`, "utf8");
|
|
364
364
|
const commEndIndex = stat.lastIndexOf(")");
|
|
365
365
|
if (commEndIndex < 0) return null;
|
|
366
366
|
const fields = stat.slice(commEndIndex + 1).trimStart().split(/\s+/);
|
|
@@ -629,7 +629,7 @@ function resolveAuthStorePathForDisplay(agentDir) {
|
|
|
629
629
|
return pathname.startsWith("~") ? pathname : resolveUserPath(pathname);
|
|
630
630
|
}
|
|
631
631
|
function ensureAuthStoreFile(pathname) {
|
|
632
|
-
if (
|
|
632
|
+
if (syncFs.existsSync(pathname)) return;
|
|
633
633
|
saveJsonFile(pathname, {
|
|
634
634
|
version: AUTH_STORE_VERSION,
|
|
635
635
|
profiles: {}
|
|
@@ -891,7 +891,7 @@ function loadAuthProfileStoreForAgent(agentDir, options) {
|
|
|
891
891
|
if (shouldWrite && legacy !== null) {
|
|
892
892
|
const legacyPath = resolveLegacyAuthStorePath(agentDir);
|
|
893
893
|
try {
|
|
894
|
-
|
|
894
|
+
syncFs.unlinkSync(legacyPath);
|
|
895
895
|
} catch (err) {
|
|
896
896
|
if (err?.code !== "ENOENT") log$8.warn("failed to delete legacy auth.json after migration", {
|
|
897
897
|
err,
|
|
@@ -1079,7 +1079,7 @@ function loadDotEnv(opts) {
|
|
|
1079
1079
|
const quiet = opts?.quiet ?? true;
|
|
1080
1080
|
dotenv.config({ quiet });
|
|
1081
1081
|
const globalEnvPath = path.join(resolveConfigDir(process.env), ".env");
|
|
1082
|
-
if (!
|
|
1082
|
+
if (!syncFs.existsSync(globalEnvPath)) return;
|
|
1083
1083
|
dotenv.config({
|
|
1084
1084
|
quiet,
|
|
1085
1085
|
path: globalEnvPath,
|
|
@@ -1209,7 +1209,7 @@ function resolveTimeoutMs(timeoutMs) {
|
|
|
1209
1209
|
function readEtcShells() {
|
|
1210
1210
|
if (cachedEtcShells !== void 0) return cachedEtcShells;
|
|
1211
1211
|
try {
|
|
1212
|
-
const entries =
|
|
1212
|
+
const entries = syncFs.readFileSync("/etc/shells", "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#") && path.isAbsolute(line));
|
|
1213
1213
|
cachedEtcShells = new Set(entries);
|
|
1214
1214
|
} catch {
|
|
1215
1215
|
cachedEtcShells = null;
|
|
@@ -1686,7 +1686,7 @@ function resolveActiveTalkProviderConfig(talk) {
|
|
|
1686
1686
|
};
|
|
1687
1687
|
}
|
|
1688
1688
|
function readTalkApiKeyFromProfile(deps = {}) {
|
|
1689
|
-
const fsImpl = deps.fs ??
|
|
1689
|
+
const fsImpl = deps.fs ?? syncFs;
|
|
1690
1690
|
const osImpl = deps.os ?? os;
|
|
1691
1691
|
const pathImpl = deps.path ?? path;
|
|
1692
1692
|
const home = osImpl.homedir();
|
|
@@ -2322,7 +2322,7 @@ function isPathInside$1(basePath, candidatePath) {
|
|
|
2322
2322
|
}
|
|
2323
2323
|
function safeRealpathSync$1(filePath) {
|
|
2324
2324
|
try {
|
|
2325
|
-
return
|
|
2325
|
+
return syncFs.realpathSync(filePath);
|
|
2326
2326
|
} catch {
|
|
2327
2327
|
return null;
|
|
2328
2328
|
}
|
|
@@ -2432,7 +2432,7 @@ var IncludeProcessor = class IncludeProcessor {
|
|
|
2432
2432
|
const normalized = path.normalize(resolved);
|
|
2433
2433
|
if (!isPathInside$1(this.rootDir, normalized)) throw new ConfigIncludeError(`Include path escapes config directory: ${includePath} (root: ${this.rootDir})`, includePath);
|
|
2434
2434
|
try {
|
|
2435
|
-
const real =
|
|
2435
|
+
const real = syncFs.realpathSync(normalized);
|
|
2436
2436
|
if (!isPathInside$1(this.rootRealDir, real)) throw new ConfigIncludeError(`Include path resolves outside config directory (symlink): ${includePath} (root: ${this.rootDir})`, includePath);
|
|
2437
2437
|
} catch (err) {
|
|
2438
2438
|
if (err instanceof ConfigIncludeError) throw err;
|
|
@@ -2474,13 +2474,13 @@ var IncludeProcessor = class IncludeProcessor {
|
|
|
2474
2474
|
};
|
|
2475
2475
|
function safeRealpath(target) {
|
|
2476
2476
|
try {
|
|
2477
|
-
return
|
|
2477
|
+
return syncFs.realpathSync(target);
|
|
2478
2478
|
} catch {
|
|
2479
2479
|
return target;
|
|
2480
2480
|
}
|
|
2481
2481
|
}
|
|
2482
2482
|
function readConfigIncludeFileWithGuards(params) {
|
|
2483
|
-
const ioFs = params.ioFs ??
|
|
2483
|
+
const ioFs = params.ioFs ?? syncFs;
|
|
2484
2484
|
const maxBytes = params.maxBytes ?? MAX_INCLUDE_FILE_BYTES;
|
|
2485
2485
|
if (!canUseBoundaryFileOpen(ioFs)) return ioFs.readFileSync(params.resolvedPath, "utf-8");
|
|
2486
2486
|
const opened = openBoundaryFileSync({
|
|
@@ -2503,7 +2503,7 @@ function readConfigIncludeFileWithGuards(params) {
|
|
|
2503
2503
|
}
|
|
2504
2504
|
}
|
|
2505
2505
|
const defaultResolver = {
|
|
2506
|
-
readFile: (p) =>
|
|
2506
|
+
readFile: (p) => syncFs.readFileSync(p, "utf-8"),
|
|
2507
2507
|
readFileWithGuards: ({ includePath, resolvedPath, rootRealDir }) => readConfigIncludeFileWithGuards({
|
|
2508
2508
|
includePath,
|
|
2509
2509
|
resolvedPath,
|
|
@@ -4156,7 +4156,7 @@ function normalizeMatchTarget(value) {
|
|
|
4156
4156
|
}
|
|
4157
4157
|
function tryRealpath(value) {
|
|
4158
4158
|
try {
|
|
4159
|
-
return
|
|
4159
|
+
return syncFs.realpathSync(value);
|
|
4160
4160
|
} catch {
|
|
4161
4161
|
return null;
|
|
4162
4162
|
}
|
|
@@ -4709,8 +4709,8 @@ function resolveWindowsExecutableExtensions(executable, env) {
|
|
|
4709
4709
|
}
|
|
4710
4710
|
function isExecutableFile(filePath) {
|
|
4711
4711
|
try {
|
|
4712
|
-
if (!
|
|
4713
|
-
if (process.platform !== "win32")
|
|
4712
|
+
if (!syncFs.statSync(filePath).isFile()) return false;
|
|
4713
|
+
if (process.platform !== "win32") syncFs.accessSync(filePath, syncFs.constants.X_OK);
|
|
4714
4714
|
return true;
|
|
4715
4715
|
} catch {
|
|
4716
4716
|
return false;
|
|
@@ -4749,7 +4749,7 @@ const DEFAULT_SAFE_BINS = [
|
|
|
4749
4749
|
function tryResolveRealpath(filePath) {
|
|
4750
4750
|
if (!filePath) return;
|
|
4751
4751
|
try {
|
|
4752
|
-
return
|
|
4752
|
+
return syncFs.realpathSync(filePath);
|
|
4753
4753
|
} catch {
|
|
4754
4754
|
return;
|
|
4755
4755
|
}
|
|
@@ -5624,7 +5624,7 @@ function listWritableExplicitTrustedSafeBinDirs(entries) {
|
|
|
5624
5624
|
for (const dir of resolved) {
|
|
5625
5625
|
let stat;
|
|
5626
5626
|
try {
|
|
5627
|
-
stat =
|
|
5627
|
+
stat = syncFs.statSync(dir);
|
|
5628
5628
|
} catch {
|
|
5629
5629
|
continue;
|
|
5630
5630
|
}
|
|
@@ -6816,13 +6816,13 @@ function resolveBundledPluginsDir() {
|
|
|
6816
6816
|
try {
|
|
6817
6817
|
const execDir = path.dirname(process.execPath);
|
|
6818
6818
|
const sibling = path.join(execDir, "extensions");
|
|
6819
|
-
if (
|
|
6819
|
+
if (syncFs.existsSync(sibling)) return sibling;
|
|
6820
6820
|
} catch {}
|
|
6821
6821
|
try {
|
|
6822
6822
|
let cursor = path.dirname(fileURLToPath(import.meta.url));
|
|
6823
6823
|
for (let i = 0; i < 6; i += 1) {
|
|
6824
6824
|
const candidate = path.join(cursor, "extensions");
|
|
6825
|
-
if (
|
|
6825
|
+
if (syncFs.existsSync(candidate)) return candidate;
|
|
6826
6826
|
const parent = path.dirname(cursor);
|
|
6827
6827
|
if (parent === cursor) break;
|
|
6828
6828
|
cursor = parent;
|
|
@@ -6841,7 +6841,7 @@ function normalizeStringList(value) {
|
|
|
6841
6841
|
function resolvePluginManifestPath(rootDir) {
|
|
6842
6842
|
for (const filename of PLUGIN_MANIFEST_FILENAMES) {
|
|
6843
6843
|
const candidate = path.join(rootDir, filename);
|
|
6844
|
-
if (
|
|
6844
|
+
if (syncFs.existsSync(candidate)) return candidate;
|
|
6845
6845
|
}
|
|
6846
6846
|
return path.join(rootDir, PLUGIN_MANIFEST_FILENAME);
|
|
6847
6847
|
}
|
|
@@ -6867,7 +6867,7 @@ function loadPluginManifest(rootDir, rejectHardlinks = true) {
|
|
|
6867
6867
|
}
|
|
6868
6868
|
let raw;
|
|
6869
6869
|
try {
|
|
6870
|
-
raw = JSON.parse(
|
|
6870
|
+
raw = JSON.parse(syncFs.readFileSync(opened.fd, "utf-8"));
|
|
6871
6871
|
} catch (err) {
|
|
6872
6872
|
return {
|
|
6873
6873
|
ok: false,
|
|
@@ -6875,7 +6875,7 @@ function loadPluginManifest(rootDir, rejectHardlinks = true) {
|
|
|
6875
6875
|
manifestPath
|
|
6876
6876
|
};
|
|
6877
6877
|
} finally {
|
|
6878
|
-
|
|
6878
|
+
syncFs.closeSync(opened.fd);
|
|
6879
6879
|
}
|
|
6880
6880
|
if (!isRecord$3(raw)) return {
|
|
6881
6881
|
ok: false,
|
|
@@ -6956,7 +6956,7 @@ function safeRealpathSync(targetPath, cache) {
|
|
|
6956
6956
|
const cached = cache?.get(targetPath);
|
|
6957
6957
|
if (cached) return cached;
|
|
6958
6958
|
try {
|
|
6959
|
-
const resolved =
|
|
6959
|
+
const resolved = syncFs.realpathSync(targetPath);
|
|
6960
6960
|
cache?.set(targetPath, resolved);
|
|
6961
6961
|
return resolved;
|
|
6962
6962
|
} catch {
|
|
@@ -6965,7 +6965,7 @@ function safeRealpathSync(targetPath, cache) {
|
|
|
6965
6965
|
}
|
|
6966
6966
|
function safeStatSync(targetPath) {
|
|
6967
6967
|
try {
|
|
6968
|
-
return
|
|
6968
|
+
return syncFs.statSync(targetPath);
|
|
6969
6969
|
} catch {
|
|
6970
6970
|
return null;
|
|
6971
6971
|
}
|
|
@@ -7115,12 +7115,12 @@ function readPackageManifest(dir, rejectHardlinks = true) {
|
|
|
7115
7115
|
});
|
|
7116
7116
|
if (!opened.ok) return null;
|
|
7117
7117
|
try {
|
|
7118
|
-
const raw =
|
|
7118
|
+
const raw = syncFs.readFileSync(opened.fd, "utf-8");
|
|
7119
7119
|
return JSON.parse(raw);
|
|
7120
7120
|
} catch {
|
|
7121
7121
|
return null;
|
|
7122
7122
|
} finally {
|
|
7123
|
-
|
|
7123
|
+
syncFs.closeSync(opened.fd);
|
|
7124
7124
|
}
|
|
7125
7125
|
}
|
|
7126
7126
|
function deriveIdHint(params) {
|
|
@@ -7173,14 +7173,14 @@ function resolvePackageEntrySource(params) {
|
|
|
7173
7173
|
return null;
|
|
7174
7174
|
}
|
|
7175
7175
|
const safeSource = opened.path;
|
|
7176
|
-
|
|
7176
|
+
syncFs.closeSync(opened.fd);
|
|
7177
7177
|
return safeSource;
|
|
7178
7178
|
}
|
|
7179
7179
|
function discoverInDirectory(params) {
|
|
7180
|
-
if (!
|
|
7180
|
+
if (!syncFs.existsSync(params.dir)) return;
|
|
7181
7181
|
let entries = [];
|
|
7182
7182
|
try {
|
|
7183
|
-
entries =
|
|
7183
|
+
entries = syncFs.readdirSync(params.dir, { withFileTypes: true });
|
|
7184
7184
|
} catch (err) {
|
|
7185
7185
|
params.diagnostics.push({
|
|
7186
7186
|
level: "warn",
|
|
@@ -7241,7 +7241,7 @@ function discoverInDirectory(params) {
|
|
|
7241
7241
|
}
|
|
7242
7242
|
continue;
|
|
7243
7243
|
}
|
|
7244
|
-
const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(fullPath, candidate)).find((candidate) =>
|
|
7244
|
+
const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(fullPath, candidate)).find((candidate) => syncFs.existsSync(candidate));
|
|
7245
7245
|
if (indexFile && isExtensionFile(indexFile)) addCandidate({
|
|
7246
7246
|
candidates: params.candidates,
|
|
7247
7247
|
diagnostics: params.diagnostics,
|
|
@@ -7259,7 +7259,7 @@ function discoverInDirectory(params) {
|
|
|
7259
7259
|
}
|
|
7260
7260
|
function discoverFromPath(params) {
|
|
7261
7261
|
const resolved = resolveUserPath(params.rawPath);
|
|
7262
|
-
if (!
|
|
7262
|
+
if (!syncFs.existsSync(resolved)) {
|
|
7263
7263
|
params.diagnostics.push({
|
|
7264
7264
|
level: "error",
|
|
7265
7265
|
message: `plugin path not found: ${resolved}`,
|
|
@@ -7267,7 +7267,7 @@ function discoverFromPath(params) {
|
|
|
7267
7267
|
});
|
|
7268
7268
|
return;
|
|
7269
7269
|
}
|
|
7270
|
-
const stat =
|
|
7270
|
+
const stat = syncFs.statSync(resolved);
|
|
7271
7271
|
if (stat.isFile()) {
|
|
7272
7272
|
if (!isExtensionFile(resolved)) {
|
|
7273
7273
|
params.diagnostics.push({
|
|
@@ -7325,7 +7325,7 @@ function discoverFromPath(params) {
|
|
|
7325
7325
|
}
|
|
7326
7326
|
return;
|
|
7327
7327
|
}
|
|
7328
|
-
const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(resolved, candidate)).find((candidate) =>
|
|
7328
|
+
const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(resolved, candidate)).find((candidate) => syncFs.existsSync(candidate));
|
|
7329
7329
|
if (indexFile && isExtensionFile(indexFile)) {
|
|
7330
7330
|
addCandidate({
|
|
7331
7331
|
candidates: params.candidates,
|
|
@@ -7458,7 +7458,7 @@ function buildCacheKey$1(params) {
|
|
|
7458
7458
|
}
|
|
7459
7459
|
function safeStatMtimeMs(filePath) {
|
|
7460
7460
|
try {
|
|
7461
|
-
return
|
|
7461
|
+
return syncFs.statSync(filePath).mtimeMs;
|
|
7462
7462
|
} catch {
|
|
7463
7463
|
return null;
|
|
7464
7464
|
}
|
|
@@ -12669,7 +12669,7 @@ function resolveConfigPathForDeps(deps) {
|
|
|
12669
12669
|
}
|
|
12670
12670
|
function normalizeDeps(overrides = {}) {
|
|
12671
12671
|
return {
|
|
12672
|
-
fs: overrides.fs ??
|
|
12672
|
+
fs: overrides.fs ?? syncFs,
|
|
12673
12673
|
json5: overrides.json5 ?? JSON5,
|
|
12674
12674
|
env: overrides.env ?? process.env,
|
|
12675
12675
|
homedir: overrides.homedir ?? (() => resolveRequiredHomeDir(overrides.env ?? process.env, os.homedir)),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as saveMediaBuffer } from "./store-
|
|
2
|
-
import { a as loadWebMedia } from "./ir-
|
|
1
|
+
import { i as saveMediaBuffer } from "./store-DbpT7v8D.js";
|
|
2
|
+
import { a as loadWebMedia } from "./ir-CeK8iZwE.js";
|
|
3
3
|
import { t as buildOutboundMediaLoadOptions } from "./load-options-BFUunM8u.js";
|
|
4
4
|
|
|
5
5
|
//#region src/media/outbound-attachment.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as createSubsystemLogger, y as getChildLogger } from "./subsystem-
|
|
2
|
-
import { T as toWhatsappJid, u as escapeRegExp } from "./logger-
|
|
3
|
-
import { Z as loadConfig } from "./model-selection-
|
|
1
|
+
import { t as createSubsystemLogger, y as getChildLogger } from "./subsystem-W834z9Wa.js";
|
|
2
|
+
import { T as toWhatsappJid, u as escapeRegExp } from "./logger-D4RcXHR-.js";
|
|
3
|
+
import { Z as loadConfig } from "./model-selection-CLGE3YIs.js";
|
|
4
4
|
import { n as generateSecureUuid } from "./secure-random-CXrBi7Jq.js";
|
|
5
|
-
import { a as loadWebMedia, s as resolveMarkdownTableMode } from "./ir-
|
|
5
|
+
import { a as loadWebMedia, s as resolveMarkdownTableMode } from "./ir-CeK8iZwE.js";
|
|
6
6
|
import { n as normalizePollInput } from "./polls-C_BruSkP.js";
|
|
7
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
8
|
-
import { i as redactIdentifier, n as requireActiveWebListener } from "./active-listener-
|
|
7
|
+
import { t as convertMarkdownTables } from "./tables-BpeU6RzS.js";
|
|
8
|
+
import { i as redactIdentifier, n as requireActiveWebListener } from "./active-listener-BrRv4Xwc.js";
|
|
9
9
|
|
|
10
10
|
//#region src/markdown/whatsapp.ts
|
|
11
11
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as BOUNDARY_PATH_ALIAS_POLICIES, D as isNotFoundPathError, w as resolveBoundaryPath } from "./workspace-
|
|
1
|
+
import { C as BOUNDARY_PATH_ALIAS_POLICIES, D as isNotFoundPathError, w as resolveBoundaryPath } from "./workspace-BhNk7PBH.js";
|
|
2
2
|
import fs from "node:fs/promises";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as resolveStateDir, d as resolveRequiredHomeDir, l as expandHomePrefix } from "./paths-
|
|
2
|
-
import { R as normalizeAgentId, j as DEFAULT_AGENT_ID } from "./workspace-
|
|
1
|
+
import { c as resolveStateDir, d as resolveRequiredHomeDir, l as expandHomePrefix } from "./paths-C6TxBCvO.js";
|
|
2
|
+
import { R as normalizeAgentId, j as DEFAULT_AGENT_ID } from "./workspace-BhNk7PBH.js";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
5
|
-
import
|
|
5
|
+
import syncFs from "node:fs";
|
|
6
6
|
|
|
7
7
|
//#region src/config/sessions/paths.ts
|
|
8
8
|
function resolveAgentSessionsDir(agentId, env = process.env, homedir = () => resolveRequiredHomeDir(env, os.homedir)) {
|
|
@@ -88,7 +88,7 @@ function resolveStructuralSessionFallbackPath(candidateAbsPath, expectedAgentId)
|
|
|
88
88
|
}
|
|
89
89
|
function safeRealpathSync(filePath) {
|
|
90
90
|
try {
|
|
91
|
-
return
|
|
91
|
+
return syncFs.realpathSync(filePath);
|
|
92
92
|
} catch {
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import os from "node:os";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import
|
|
3
|
+
import syncFs from "node:fs";
|
|
4
4
|
|
|
5
5
|
//#region src/infra/home-dir.ts
|
|
6
6
|
function normalize(value) {
|
|
@@ -94,10 +94,10 @@ function resolveStateDir(env = process.env, homedir = envHomedir(env)) {
|
|
|
94
94
|
const newDir = newStateDir(effectiveHomedir);
|
|
95
95
|
if (env.OPENCLAW_TEST_FAST === "1") return newDir;
|
|
96
96
|
const legacyDirs = legacyStateDirs(effectiveHomedir);
|
|
97
|
-
if (
|
|
97
|
+
if (syncFs.existsSync(newDir)) return newDir;
|
|
98
98
|
const existingLegacy = legacyDirs.find((dir) => {
|
|
99
99
|
try {
|
|
100
|
-
return
|
|
100
|
+
return syncFs.existsSync(dir);
|
|
101
101
|
} catch {
|
|
102
102
|
return false;
|
|
103
103
|
}
|
|
@@ -137,7 +137,7 @@ function resolveConfigPathCandidate(env = process.env, homedir = envHomedir(env)
|
|
|
137
137
|
if (env.OPENCLAW_TEST_FAST === "1") return resolveCanonicalConfigPath(env, resolveStateDir(env, homedir));
|
|
138
138
|
const existing = resolveDefaultConfigCandidates(env, homedir).find((candidate) => {
|
|
139
139
|
try {
|
|
140
|
-
return
|
|
140
|
+
return syncFs.existsSync(candidate);
|
|
141
141
|
} catch {
|
|
142
142
|
return false;
|
|
143
143
|
}
|
|
@@ -155,7 +155,7 @@ function resolveConfigPath(env = process.env, stateDir = resolveStateDir(env, en
|
|
|
155
155
|
const stateOverride = env.OPENCLAW_STATE_DIR?.trim();
|
|
156
156
|
const existing = [path.join(stateDir, CONFIG_FILENAME), ...LEGACY_CONFIG_FILENAMES.map((name) => path.join(stateDir, name))].find((candidate) => {
|
|
157
157
|
try {
|
|
158
|
-
return
|
|
158
|
+
return syncFs.existsSync(candidate);
|
|
159
159
|
} catch {
|
|
160
160
|
return false;
|
|
161
161
|
}
|