@bitseek/claw 1.1.0-beta.2 → 1.2.0

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.
Files changed (84) hide show
  1. package/dist/{accounts-CX1yOBOk.js → accounts-BTexwKe8.js} +1 -1
  2. package/dist/{accounts-DZqwa5NK.js → accounts-CFz9Jc5d.js} +1 -1
  3. package/dist/{accounts-CaiECgq3.js → accounts-ubG6irXZ.js} +16 -16
  4. package/dist/{active-listener-neKWQsOO.js → active-listener-Hd9sOu9T.js} +1 -1
  5. package/dist/{agent-scope-CTbRzU1C.js → agent-scope-C6hps0r3.js} +4 -4
  6. package/dist/{api-key-rotation-BTSy5kZN.js → api-key-rotation-WzOC5dTW.js} +2 -2
  7. package/dist/{audio-preflight-DZWb0ozj.js → audio-preflight-BWOdDA2n.js} +39 -39
  8. package/dist/{audio-transcription-runner-2dp0SxL3.js → audio-transcription-runner-DaoqvWoi.js} +11 -11
  9. package/dist/{bindings-Daa-Etag.js → bindings-CsIiIjqN.js} +2 -2
  10. package/dist/build-info.json +3 -3
  11. package/dist/bundled/boot-md/handler.js +65 -65
  12. package/dist/bundled/bootstrap-extra-files/handler.js +7 -7
  13. package/dist/bundled/command-logger/handler.js +2 -2
  14. package/dist/bundled/session-memory/handler.js +65 -65
  15. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  16. package/dist/{channel-activity-Btz1t5_1.js → channel-activity-D81g48kD.js} +3 -3
  17. package/dist/{chrome-DX1blHAJ.js → chrome-CjTE-vWv.js} +18 -18
  18. package/dist/{chunk-DEkdXze6.js → chunk-DtYb6TYl.js} +1 -1
  19. package/dist/{commands-registry-BQkQRhEo.js → commands-registry-NIsv9Z4R.js} +5 -5
  20. package/dist/{deliver-C82Egs0W.js → deliver-xY3h9X6N.js} +22 -22
  21. package/dist/{diagnostic-DpOlXoSr.js → diagnostic-BO1GQJJf.js} +2 -2
  22. package/dist/{dock-DWqb4ufG.js → dock-Cr9V9V1V.js} +6 -6
  23. package/dist/{env-Bn6pmvjK.js → env-DNMZEG57.js} +2 -2
  24. package/dist/{errors-azBrKJmF.js → errors-DEkWxItM.js} +1 -1
  25. package/dist/{fetch-B82CeaHJ.js → fetch--iXu7oa7.js} +5 -5
  26. package/dist/{fetch-guard-CCLWHwu7.js → fetch-guard-CNvY0vzQ.js} +2 -2
  27. package/dist/{frontmatter-5U1LYLH9.js → frontmatter-DIRc-IR1.js} +2 -2
  28. package/dist/{fs-safe-BDR6eQAw.js → fs-safe-D8x_nIIA.js} +4 -4
  29. package/dist/{github-copilot-token-CPjAmbfr.js → github-copilot-token-DLGN-8YS.js} +7 -7
  30. package/dist/{image-BQ1JgwZu.js → image-DCyaYY2d.js} +6 -6
  31. package/dist/{image-ops-jvmQoiyw.js → image-ops-DCpyia_K.js} +1 -1
  32. package/dist/{internal-hooks-oLQ2m8YT.js → internal-hooks-yQe6H47q.js} +1 -1
  33. package/dist/{ir-BODD8g-I.js → ir-BZUjdf-6.js} +6 -6
  34. package/dist/llm-slug-generator.js +65 -65
  35. package/dist/{logger-DelEB7MK.js → logger-BlH5MJiV.js} +1 -1
  36. package/dist/{login-Cm2zDfEU.js → login-CgEHUE7h.js} +6 -6
  37. package/dist/{login-qr-iS1jPDpP.js → login-qr-DUJfhbUe.js} +13 -13
  38. package/dist/{manager-DdzkWOvc.js → manager-BNuB9clC.js} +15 -15
  39. package/dist/{markdown-tables-pfs_NCNh.js → markdown-tables-BHONoo6S.js} +1 -1
  40. package/dist/{message-channel-POuk6EOq.js → message-channel-Dl8dSs0T.js} +1 -1
  41. package/dist/{model-selection-DfZMxaX3.js → model-selection-D_Si2Ict.js} +44 -44
  42. package/dist/{outbound-4q4mbU-Z.js → outbound-DOVV_R6m.js} +7 -7
  43. package/dist/{outbound-attachment-CBCp1oVQ.js → outbound-attachment-C7sJLSnv.js} +2 -2
  44. package/dist/{path-alias-guards-DfQIjfhB.js → path-alias-guards-CKjKIhQ3.js} +1 -1
  45. package/dist/{paths-BZO1jkK2.js → paths-Cpu0XgUj.js} +3 -3
  46. package/dist/{paths-DKuX7-1L.js → paths-aGRLvQx9.js} +5 -5
  47. package/dist/{pi-embedded-DiUmkZyz.js → pi-embedded-DE3hb87F.js} +178 -178
  48. package/dist/{pi-embedded-helpers-CuwhW4u9.js → pi-embedded-helpers-CMTVhLjq.js} +29 -29
  49. package/dist/{pi-model-discovery-COjkql-U.js → pi-model-discovery-DCIw1y1c.js} +7 -7
  50. package/dist/{plugins-D63QYxW6.js → plugins-CJoaoIHc.js} +11 -11
  51. package/dist/{proxy-jINniQBi.js → proxy-DfJJLvch.js} +1 -1
  52. package/dist/{proxy-env-vYAjKL5q.js → proxy-env-BnDt8j9F.js} +1 -1
  53. package/dist/{proxy-fetch-AvkSvetA.js → proxy-fetch-xlbVQYN_.js} +1 -1
  54. package/dist/{pw-ai-BLNiRUPI.js → pw-ai-DGwA7iCM.js} +17 -17
  55. package/dist/{qmd-manager-BBKfRzj-.js → qmd-manager-CeN3N992.js} +11 -11
  56. package/dist/{query-expansion-2BrixCA2.js → query-expansion-CGnW4Mk_.js} +5 -5
  57. package/dist/{redact-uUggP88O.js → redact-ScShueoF.js} +1 -1
  58. package/dist/{registry-C2GEGa2t.js → registry-CJCkqTms.js} +3 -3
  59. package/dist/{replies-yAf6dFeT.js → replies-BFYGUEKu.js} +3 -3
  60. package/dist/{reply-prefix-9mzt89Cf.js → reply-prefix-DK1i6bCJ.js} +1 -1
  61. package/dist/{resolve-route-BNElrVxR.js → resolve-route-C5hVstLo.js} +4 -4
  62. package/dist/{retry-Ayb7e4XG.js → retry-DTeP7C3h.js} +1 -1
  63. package/dist/{send-Bclgg0Ur.js → send-B4pSMBHk.js} +8 -8
  64. package/dist/{send-Bjaa69Cy.js → send-BqKSZyIb.js} +27 -27
  65. package/dist/{send-DYY51FOR.js → send-CN0f1Yst.js} +6 -6
  66. package/dist/{send-Cp0yQi_p.js → send-V3fEVmLq.js} +10 -10
  67. package/dist/{send-DQ7hIAIK.js → send-XAO1mk64.js} +7 -7
  68. package/dist/{session-meta-CyQWVUk4.js → session-meta-Cqv55kSk.js} +2 -2
  69. package/dist/{session-TVb8hgJP.js → session-xKPVUYQP.js} +9 -9
  70. package/dist/{sessions-3jroJwu7.js → sessions-CA_BydGA.js} +31 -31
  71. package/dist/{skill-commands-CSr9_48V.js → skill-commands-CZFmIM-s.js} +9 -9
  72. package/dist/{skills-B82IjVxn.js → skills-DMmr25nW.js} +22 -22
  73. package/dist/{store-DhC72KqW.js → store-C8KgeMt2.js} +2 -2
  74. package/dist/{subsystem-CAatx5oo.js → subsystem-BRjuJbbM.js} +14 -14
  75. package/dist/{tables-Bfh_TnCf.js → tables-BKnPZssn.js} +1 -1
  76. package/dist/{target-errors-CGYXYvSZ.js → target-errors-B9Jzop3d.js} +2 -2
  77. package/dist/{tokens-BvzZdrVJ.js → tokens-B9EDT4jv.js} +1 -1
  78. package/dist/{tool-images-CqsWnc1k.js → tool-images-ffdfBx0b.js} +2 -2
  79. package/dist/{tool-loop-detection-C4V990MS.js → tool-loop-detection-CLoYKYIq.js} +3 -3
  80. package/dist/{utils-Bo1RFF0l.js → utils-BFZnl-5N.js} +6 -6
  81. package/dist/{web-DsAoa63g.js → web-B2_c07KN.js} +69 -69
  82. package/dist/{whatsapp-actions-DXjy9m41.js → whatsapp-actions-CHt12z-f.js} +28 -28
  83. package/dist/{workspace-CswOYN9T.js → workspace-D6mrCnXi.js} +21 -21
  84. package/package.json +1 -1
@@ -1,21 +1,21 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { i as resolveAgentDir, r as resolveAgentConfig, s as resolveAgentWorkspaceDir } from "./agent-scope-CTbRzU1C.js";
3
- import { c as resolveStateDir } from "./paths-DKuX7-1L.js";
4
- import { t as createSubsystemLogger } from "./subsystem-CAatx5oo.js";
5
- import { S as truncateUtf16Safe, h as resolveUserPath, i as clampNumber, r as clampInt } from "./utils-Bo1RFF0l.js";
6
- import { A as resolveApiKeyForProvider, Fn as normalizeOptionalSecretInput, j as resolveEnvApiKey, k as requireApiKey } from "./model-selection-DfZMxaX3.js";
7
- import { t as isTruthyEnvValue } from "./env-Bn6pmvjK.js";
8
- import { r as formatErrorMessage } from "./errors-azBrKJmF.js";
9
- import { o as resolveSessionTranscriptsDirForAgent } from "./paths-BZO1jkK2.js";
2
+ import { i as resolveAgentDir, r as resolveAgentConfig, s as resolveAgentWorkspaceDir } from "./agent-scope-C6hps0r3.js";
3
+ import { c as resolveStateDir } from "./paths-aGRLvQx9.js";
4
+ import { t as createSubsystemLogger } from "./subsystem-BRjuJbbM.js";
5
+ import { S as truncateUtf16Safe, h as resolveUserPath, i as clampNumber, r as clampInt } from "./utils-BFZnl-5N.js";
6
+ import { A as resolveApiKeyForProvider, Fn as normalizeOptionalSecretInput, j as resolveEnvApiKey, k as requireApiKey } from "./model-selection-D_Si2Ict.js";
7
+ import { t as isTruthyEnvValue } from "./env-DNMZEG57.js";
8
+ import { r as formatErrorMessage } from "./errors-DEkWxItM.js";
9
+ import { o as resolveSessionTranscriptsDirForAgent } from "./paths-Cpu0XgUj.js";
10
10
  import { n as onSessionTranscriptUpdate } from "./transcript-events-Cso7-m1w.js";
11
- import { t as fetchWithSsrFGuard } from "./fetch-guard-CCLWHwu7.js";
12
- import { n as executeWithApiKeyRotation, r as parseGeminiAuth, t as collectProviderApiKeysForExecution } from "./api-key-rotation-BTSy5kZN.js";
13
- import { n as retryAsync } from "./retry-Ayb7e4XG.js";
14
- import { _ as isFileMissingError, a as sessionPathForFile, c as cosineSimilarity, d as isMemoryPath, f as listMemoryFiles, g as runWithConcurrency, h as remapChunkLines, i as listSessionFilesForAgent, l as ensureDir, m as parseEmbedding, n as requireNodeSqlite, o as buildFileEntry, p as normalizeExtraMemoryPaths, r as buildSessionEntry, s as chunkMarkdown, t as extractKeywords, u as hashText, v as statRegularFile } from "./query-expansion-2BrixCA2.js";
11
+ import { t as fetchWithSsrFGuard } from "./fetch-guard-CNvY0vzQ.js";
12
+ import { n as executeWithApiKeyRotation, r as parseGeminiAuth, t as collectProviderApiKeysForExecution } from "./api-key-rotation-WzOC5dTW.js";
13
+ import { n as retryAsync } from "./retry-DTeP7C3h.js";
14
+ import { _ as isFileMissingError, a as sessionPathForFile, c as cosineSimilarity, d as isMemoryPath, f as listMemoryFiles, g as runWithConcurrency, h as remapChunkLines, i as listSessionFilesForAgent, l as ensureDir, m as parseEmbedding, n as requireNodeSqlite, o as buildFileEntry, p as normalizeExtraMemoryPaths, r as buildSessionEntry, s as chunkMarkdown, t as extractKeywords, u as hashText, v as statRegularFile } from "./query-expansion-CGnW4Mk_.js";
15
15
  import fs from "node:fs/promises";
16
16
  import os from "node:os";
17
17
  import path from "node:path";
18
- import fs$1 from "node:fs";
18
+ import syncFs from "node:fs";
19
19
  import { randomUUID } from "node:crypto";
20
20
  import chokidar from "chokidar";
21
21
  import { createInterface } from "node:readline";
@@ -719,7 +719,7 @@ function canAutoSelectLocal(options) {
719
719
  if (/^(hf:|https?:)/i.test(modelPath)) return false;
720
720
  const resolved = resolveUserPath(modelPath);
721
721
  try {
722
- return fs$1.statSync(resolved).isFile();
722
+ return syncFs.statSync(resolved).isFile();
723
723
  } catch {
724
724
  return false;
725
725
  }
@@ -2241,7 +2241,7 @@ var MemoryManagerSyncOps = class {
2241
2241
  ]);
2242
2242
  const additionalPaths = normalizeExtraMemoryPaths(this.workspaceDir, this.settings.extraPaths);
2243
2243
  for (const entry of additionalPaths) try {
2244
- const stat = fs$1.lstatSync(entry);
2244
+ const stat = syncFs.lstatSync(entry);
2245
2245
  if (stat.isSymbolicLink()) continue;
2246
2246
  if (stat.isDirectory()) {
2247
2247
  watchPaths.add(path.join(entry, "**", "*.md"));
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
2
  import { m as normalizeAccountId } from "./session-key-a6av96Fj.js";
3
- import { r as normalizeChannelId } from "./plugins-D63QYxW6.js";
3
+ import { r as normalizeChannelId } from "./plugins-CJoaoIHc.js";
4
4
  import { t as resolveAccountEntry } from "./account-lookup-JrULBwdR.js";
5
5
 
6
6
  //#region src/config/markdown-tables.ts
@@ -1,4 +1,4 @@
1
- import { c as getActivePluginRegistry, s as normalizeChatChannelId, t as CHANNEL_IDS } from "./registry-C2GEGa2t.js";
1
+ import { c as getActivePluginRegistry, s as normalizeChatChannelId, t as CHANNEL_IDS } from "./registry-CJCkqTms.js";
2
2
 
3
3
  //#region src/gateway/protocol/client-info.ts
4
4
  const GATEWAY_CLIENT_IDS = {
@@ -1,20 +1,20 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { a as resolveAgentEffectiveModelPrimary, c as resolveDefaultAgentId, g as toAgentModelListLike, h as resolveAgentModelPrimaryValue, r as resolveAgentConfig, s as resolveAgentWorkspaceDir } from "./agent-scope-CTbRzU1C.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-DKuX7-1L.js";
4
- import { n as stripAnsi, t as createSubsystemLogger } from "./subsystem-CAatx5oo.js";
2
+ import { a as resolveAgentEffectiveModelPrimary, c as resolveDefaultAgentId, g as toAgentModelListLike, h as resolveAgentModelPrimaryValue, r as resolveAgentConfig, s as resolveAgentWorkspaceDir } from "./agent-scope-C6hps0r3.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-aGRLvQx9.js";
4
+ import { n as stripAnsi, t as createSubsystemLogger } from "./subsystem-BRjuJbbM.js";
5
5
  import { c as normalizeAgentId, g as isBlockedObjectKey, t as DEFAULT_AGENT_ID } from "./session-key-a6av96Fj.js";
6
- import { C as isPlainObject$2, c as isRecord$3, h as resolveUserPath, p as resolveConfigDir } from "./utils-Bo1RFF0l.js";
7
- import { A as isPathInside$2, C as openBoundaryFileSync, h as resolveWorkspaceExtensionsDir, x as canUseBoundaryFileOpen, y as runExec } from "./workspace-CswOYN9T.js";
8
- import { a as saveJsonFile, i as loadJsonFile, r as resolveCopilotApiToken, t as DEFAULT_COPILOT_API_BASE_URL } from "./github-copilot-token-CPjAmbfr.js";
9
- import { n as formatCliCommand, t as isTruthyEnvValue } from "./env-Bn6pmvjK.js";
10
- import { s as normalizeChatChannelId, t as CHANNEL_IDS } from "./registry-C2GEGa2t.js";
6
+ import { C as isPlainObject$2, c as isRecord$3, h as resolveUserPath, p as resolveConfigDir } from "./utils-BFZnl-5N.js";
7
+ import { A as isPathInside$2, C as openBoundaryFileSync, h as resolveWorkspaceExtensionsDir, x as canUseBoundaryFileOpen, y as runExec } from "./workspace-D6mrCnXi.js";
8
+ import { a as saveJsonFile, i as loadJsonFile, r as resolveCopilotApiToken, t as DEFAULT_COPILOT_API_BASE_URL } from "./github-copilot-token-DLGN-8YS.js";
9
+ import { n as formatCliCommand, t as isTruthyEnvValue } from "./env-DNMZEG57.js";
10
+ import { s as normalizeChatChannelId, t as CHANNEL_IDS } from "./registry-CJCkqTms.js";
11
11
  import { n as MANIFEST_KEY } from "./legacy-names-CaxS8pq2.js";
12
12
  import { t as runTasksWithConcurrency } from "./run-with-concurrency-NY-gTuzr.js";
13
13
  import { createRequire } from "node:module";
14
14
  import fs from "node:fs/promises";
15
15
  import os from "node:os";
16
16
  import path from "node:path";
17
- import fs$1 from "node:fs";
17
+ import syncFs from "node:fs";
18
18
  import JSON5 from "json5";
19
19
  import { isDeepStrictEqual } from "node:util";
20
20
  import { execFileSync, spawn } from "node:child_process";
@@ -241,7 +241,7 @@ function isValidPid(pid) {
241
241
  function isZombieProcess(pid) {
242
242
  if (process.platform !== "linux") return false;
243
243
  try {
244
- return fs$1.readFileSync(`/proc/${pid}/status`, "utf8").match(/^State:\s+(\S)/m)?.[1] === "Z";
244
+ return syncFs.readFileSync(`/proc/${pid}/status`, "utf8").match(/^State:\s+(\S)/m)?.[1] === "Z";
245
245
  } catch {
246
246
  return false;
247
247
  }
@@ -268,7 +268,7 @@ function getProcessStartTime(pid) {
268
268
  if (process.platform !== "linux") return null;
269
269
  if (!isValidPid(pid)) return null;
270
270
  try {
271
- const stat = fs$1.readFileSync(`/proc/${pid}/stat`, "utf8");
271
+ const stat = syncFs.readFileSync(`/proc/${pid}/stat`, "utf8");
272
272
  const commEndIndex = stat.lastIndexOf(")");
273
273
  if (commEndIndex < 0) return null;
274
274
  const fields = stat.slice(commEndIndex + 1).trimStart().split(/\s+/);
@@ -537,7 +537,7 @@ function resolveAuthStorePathForDisplay(agentDir) {
537
537
  return pathname.startsWith("~") ? pathname : resolveUserPath(pathname);
538
538
  }
539
539
  function ensureAuthStoreFile(pathname) {
540
- if (fs$1.existsSync(pathname)) return;
540
+ if (syncFs.existsSync(pathname)) return;
541
541
  saveJsonFile(pathname, {
542
542
  version: AUTH_STORE_VERSION,
543
543
  profiles: {}
@@ -799,7 +799,7 @@ function loadAuthProfileStoreForAgent(agentDir, options) {
799
799
  if (shouldWrite && legacy !== null) {
800
800
  const legacyPath = resolveLegacyAuthStorePath(agentDir);
801
801
  try {
802
- fs$1.unlinkSync(legacyPath);
802
+ syncFs.unlinkSync(legacyPath);
803
803
  } catch (err) {
804
804
  if (err?.code !== "ENOENT") log$7.warn("failed to delete legacy auth.json after migration", {
805
805
  err,
@@ -987,7 +987,7 @@ function loadDotEnv(opts) {
987
987
  const quiet = opts?.quiet ?? true;
988
988
  dotenv.config({ quiet });
989
989
  const globalEnvPath = path.join(resolveConfigDir(process.env), ".env");
990
- if (!fs$1.existsSync(globalEnvPath)) return;
990
+ if (!syncFs.existsSync(globalEnvPath)) return;
991
991
  dotenv.config({
992
992
  quiet,
993
993
  path: globalEnvPath,
@@ -1110,7 +1110,7 @@ function resolveTimeoutMs(timeoutMs) {
1110
1110
  function readEtcShells() {
1111
1111
  if (cachedEtcShells !== void 0) return cachedEtcShells;
1112
1112
  try {
1113
- const entries = fs$1.readFileSync("/etc/shells", "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#") && path.isAbsolute(line));
1113
+ const entries = syncFs.readFileSync("/etc/shells", "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#") && path.isAbsolute(line));
1114
1114
  cachedEtcShells = new Set(entries);
1115
1115
  } catch {
1116
1116
  cachedEtcShells = null;
@@ -1579,7 +1579,7 @@ function resolveActiveTalkProviderConfig(talk) {
1579
1579
  };
1580
1580
  }
1581
1581
  function readTalkApiKeyFromProfile(deps = {}) {
1582
- const fsImpl = deps.fs ?? fs$1;
1582
+ const fsImpl = deps.fs ?? syncFs;
1583
1583
  const osImpl = deps.os ?? os;
1584
1584
  const pathImpl = deps.path ?? path;
1585
1585
  const home = osImpl.homedir();
@@ -2215,7 +2215,7 @@ function isPathInside$1(basePath, candidatePath) {
2215
2215
  }
2216
2216
  function safeRealpathSync$1(filePath) {
2217
2217
  try {
2218
- return fs$1.realpathSync(filePath);
2218
+ return syncFs.realpathSync(filePath);
2219
2219
  } catch {
2220
2220
  return null;
2221
2221
  }
@@ -2325,7 +2325,7 @@ var IncludeProcessor = class IncludeProcessor {
2325
2325
  const normalized = path.normalize(resolved);
2326
2326
  if (!isPathInside$1(this.rootDir, normalized)) throw new ConfigIncludeError(`Include path escapes config directory: ${includePath} (root: ${this.rootDir})`, includePath);
2327
2327
  try {
2328
- const real = fs$1.realpathSync(normalized);
2328
+ const real = syncFs.realpathSync(normalized);
2329
2329
  if (!isPathInside$1(this.rootRealDir, real)) throw new ConfigIncludeError(`Include path resolves outside config directory (symlink): ${includePath} (root: ${this.rootDir})`, includePath);
2330
2330
  } catch (err) {
2331
2331
  if (err instanceof ConfigIncludeError) throw err;
@@ -2367,13 +2367,13 @@ var IncludeProcessor = class IncludeProcessor {
2367
2367
  };
2368
2368
  function safeRealpath(target) {
2369
2369
  try {
2370
- return fs$1.realpathSync(target);
2370
+ return syncFs.realpathSync(target);
2371
2371
  } catch {
2372
2372
  return target;
2373
2373
  }
2374
2374
  }
2375
2375
  function readConfigIncludeFileWithGuards(params) {
2376
- const ioFs = params.ioFs ?? fs$1;
2376
+ const ioFs = params.ioFs ?? syncFs;
2377
2377
  const maxBytes = params.maxBytes ?? MAX_INCLUDE_FILE_BYTES;
2378
2378
  if (!canUseBoundaryFileOpen(ioFs)) return ioFs.readFileSync(params.resolvedPath, "utf-8");
2379
2379
  const opened = openBoundaryFileSync({
@@ -2396,7 +2396,7 @@ function readConfigIncludeFileWithGuards(params) {
2396
2396
  }
2397
2397
  }
2398
2398
  const defaultResolver = {
2399
- readFile: (p) => fs$1.readFileSync(p, "utf-8"),
2399
+ readFile: (p) => syncFs.readFileSync(p, "utf-8"),
2400
2400
  readFileWithGuards: ({ includePath, resolvedPath, rootRealDir }) => readConfigIncludeFileWithGuards({
2401
2401
  includePath,
2402
2402
  resolvedPath,
@@ -3965,7 +3965,7 @@ function normalizeMatchTarget(value) {
3965
3965
  }
3966
3966
  function tryRealpath(value) {
3967
3967
  try {
3968
- return fs$1.realpathSync(value);
3968
+ return syncFs.realpathSync(value);
3969
3969
  } catch {
3970
3970
  return null;
3971
3971
  }
@@ -4518,8 +4518,8 @@ function resolveWindowsExecutableExtensions(executable, env) {
4518
4518
  }
4519
4519
  function isExecutableFile(filePath) {
4520
4520
  try {
4521
- if (!fs$1.statSync(filePath).isFile()) return false;
4522
- if (process.platform !== "win32") fs$1.accessSync(filePath, fs$1.constants.X_OK);
4521
+ if (!syncFs.statSync(filePath).isFile()) return false;
4522
+ if (process.platform !== "win32") syncFs.accessSync(filePath, syncFs.constants.X_OK);
4523
4523
  return true;
4524
4524
  } catch {
4525
4525
  return false;
@@ -4558,7 +4558,7 @@ const DEFAULT_SAFE_BINS = [
4558
4558
  function tryResolveRealpath(filePath) {
4559
4559
  if (!filePath) return;
4560
4560
  try {
4561
- return fs$1.realpathSync(filePath);
4561
+ return syncFs.realpathSync(filePath);
4562
4562
  } catch {
4563
4563
  return;
4564
4564
  }
@@ -5433,7 +5433,7 @@ function listWritableExplicitTrustedSafeBinDirs(entries) {
5433
5433
  for (const dir of resolved) {
5434
5434
  let stat;
5435
5435
  try {
5436
- stat = fs$1.statSync(dir);
5436
+ stat = syncFs.statSync(dir);
5437
5437
  } catch {
5438
5438
  continue;
5439
5439
  }
@@ -5797,13 +5797,13 @@ function resolveBundledPluginsDir() {
5797
5797
  try {
5798
5798
  const execDir = path.dirname(process.execPath);
5799
5799
  const sibling = path.join(execDir, "extensions");
5800
- if (fs$1.existsSync(sibling)) return sibling;
5800
+ if (syncFs.existsSync(sibling)) return sibling;
5801
5801
  } catch {}
5802
5802
  try {
5803
5803
  let cursor = path.dirname(fileURLToPath(import.meta.url));
5804
5804
  for (let i = 0; i < 6; i += 1) {
5805
5805
  const candidate = path.join(cursor, "extensions");
5806
- if (fs$1.existsSync(candidate)) return candidate;
5806
+ if (syncFs.existsSync(candidate)) return candidate;
5807
5807
  const parent = path.dirname(cursor);
5808
5808
  if (parent === cursor) break;
5809
5809
  cursor = parent;
@@ -5822,7 +5822,7 @@ function normalizeStringList(value) {
5822
5822
  function resolvePluginManifestPath(rootDir) {
5823
5823
  for (const filename of PLUGIN_MANIFEST_FILENAMES) {
5824
5824
  const candidate = path.join(rootDir, filename);
5825
- if (fs$1.existsSync(candidate)) return candidate;
5825
+ if (syncFs.existsSync(candidate)) return candidate;
5826
5826
  }
5827
5827
  return path.join(rootDir, PLUGIN_MANIFEST_FILENAME);
5828
5828
  }
@@ -5848,7 +5848,7 @@ function loadPluginManifest(rootDir, rejectHardlinks = true) {
5848
5848
  }
5849
5849
  let raw;
5850
5850
  try {
5851
- raw = JSON.parse(fs$1.readFileSync(opened.fd, "utf-8"));
5851
+ raw = JSON.parse(syncFs.readFileSync(opened.fd, "utf-8"));
5852
5852
  } catch (err) {
5853
5853
  return {
5854
5854
  ok: false,
@@ -5856,7 +5856,7 @@ function loadPluginManifest(rootDir, rejectHardlinks = true) {
5856
5856
  manifestPath
5857
5857
  };
5858
5858
  } finally {
5859
- fs$1.closeSync(opened.fd);
5859
+ syncFs.closeSync(opened.fd);
5860
5860
  }
5861
5861
  if (!isRecord$3(raw)) return {
5862
5862
  ok: false,
@@ -5937,7 +5937,7 @@ function safeRealpathSync(targetPath, cache) {
5937
5937
  const cached = cache?.get(targetPath);
5938
5938
  if (cached) return cached;
5939
5939
  try {
5940
- const resolved = fs$1.realpathSync(targetPath);
5940
+ const resolved = syncFs.realpathSync(targetPath);
5941
5941
  cache?.set(targetPath, resolved);
5942
5942
  return resolved;
5943
5943
  } catch {
@@ -5946,7 +5946,7 @@ function safeRealpathSync(targetPath, cache) {
5946
5946
  }
5947
5947
  function safeStatSync(targetPath) {
5948
5948
  try {
5949
- return fs$1.statSync(targetPath);
5949
+ return syncFs.statSync(targetPath);
5950
5950
  } catch {
5951
5951
  return null;
5952
5952
  }
@@ -6075,12 +6075,12 @@ function readPackageManifest(dir, rejectHardlinks = true) {
6075
6075
  });
6076
6076
  if (!opened.ok) return null;
6077
6077
  try {
6078
- const raw = fs$1.readFileSync(opened.fd, "utf-8");
6078
+ const raw = syncFs.readFileSync(opened.fd, "utf-8");
6079
6079
  return JSON.parse(raw);
6080
6080
  } catch {
6081
6081
  return null;
6082
6082
  } finally {
6083
- fs$1.closeSync(opened.fd);
6083
+ syncFs.closeSync(opened.fd);
6084
6084
  }
6085
6085
  }
6086
6086
  function deriveIdHint(params) {
@@ -6133,14 +6133,14 @@ function resolvePackageEntrySource(params) {
6133
6133
  return null;
6134
6134
  }
6135
6135
  const safeSource = opened.path;
6136
- fs$1.closeSync(opened.fd);
6136
+ syncFs.closeSync(opened.fd);
6137
6137
  return safeSource;
6138
6138
  }
6139
6139
  function discoverInDirectory(params) {
6140
- if (!fs$1.existsSync(params.dir)) return;
6140
+ if (!syncFs.existsSync(params.dir)) return;
6141
6141
  let entries = [];
6142
6142
  try {
6143
- entries = fs$1.readdirSync(params.dir, { withFileTypes: true });
6143
+ entries = syncFs.readdirSync(params.dir, { withFileTypes: true });
6144
6144
  } catch (err) {
6145
6145
  params.diagnostics.push({
6146
6146
  level: "warn",
@@ -6201,7 +6201,7 @@ function discoverInDirectory(params) {
6201
6201
  }
6202
6202
  continue;
6203
6203
  }
6204
- const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(fullPath, candidate)).find((candidate) => fs$1.existsSync(candidate));
6204
+ const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(fullPath, candidate)).find((candidate) => syncFs.existsSync(candidate));
6205
6205
  if (indexFile && isExtensionFile(indexFile)) addCandidate({
6206
6206
  candidates: params.candidates,
6207
6207
  diagnostics: params.diagnostics,
@@ -6219,7 +6219,7 @@ function discoverInDirectory(params) {
6219
6219
  }
6220
6220
  function discoverFromPath(params) {
6221
6221
  const resolved = resolveUserPath(params.rawPath);
6222
- if (!fs$1.existsSync(resolved)) {
6222
+ if (!syncFs.existsSync(resolved)) {
6223
6223
  params.diagnostics.push({
6224
6224
  level: "error",
6225
6225
  message: `plugin path not found: ${resolved}`,
@@ -6227,7 +6227,7 @@ function discoverFromPath(params) {
6227
6227
  });
6228
6228
  return;
6229
6229
  }
6230
- const stat = fs$1.statSync(resolved);
6230
+ const stat = syncFs.statSync(resolved);
6231
6231
  if (stat.isFile()) {
6232
6232
  if (!isExtensionFile(resolved)) {
6233
6233
  params.diagnostics.push({
@@ -6285,7 +6285,7 @@ function discoverFromPath(params) {
6285
6285
  }
6286
6286
  return;
6287
6287
  }
6288
- const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(resolved, candidate)).find((candidate) => fs$1.existsSync(candidate));
6288
+ const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(resolved, candidate)).find((candidate) => syncFs.existsSync(candidate));
6289
6289
  if (indexFile && isExtensionFile(indexFile)) {
6290
6290
  addCandidate({
6291
6291
  candidates: params.candidates,
@@ -6399,7 +6399,7 @@ function buildCacheKey$1(params) {
6399
6399
  }
6400
6400
  function safeStatMtimeMs(filePath) {
6401
6401
  try {
6402
- return fs$1.statSync(filePath).mtimeMs;
6402
+ return syncFs.statSync(filePath).mtimeMs;
6403
6403
  } catch {
6404
6404
  return null;
6405
6405
  }
@@ -11465,7 +11465,7 @@ function resolveConfigPathForDeps(deps) {
11465
11465
  }
11466
11466
  function normalizeDeps(overrides = {}) {
11467
11467
  return {
11468
- fs: overrides.fs ?? fs$1,
11468
+ fs: overrides.fs ?? syncFs,
11469
11469
  json5: overrides.json5 ?? JSON5,
11470
11470
  env: overrides.env ?? process.env,
11471
11471
  homedir: overrides.homedir ?? (() => resolveRequiredHomeDir(overrides.env ?? process.env, os.homedir)),
@@ -1,13 +1,13 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { t as createSubsystemLogger, y as getChildLogger } from "./subsystem-CAatx5oo.js";
3
- import { o as escapeRegExp, x as toWhatsappJid } from "./utils-Bo1RFF0l.js";
4
- import { H as loadConfig } from "./model-selection-DfZMxaX3.js";
2
+ import { t as createSubsystemLogger, y as getChildLogger } from "./subsystem-BRjuJbbM.js";
3
+ import { o as escapeRegExp, x as toWhatsappJid } from "./utils-BFZnl-5N.js";
4
+ import { H as loadConfig } from "./model-selection-D_Si2Ict.js";
5
5
  import { n as generateSecureUuid } from "./secure-random-CY3Mg7Dp.js";
6
- import { n as resolveMarkdownTableMode } from "./markdown-tables-pfs_NCNh.js";
7
- import { a as loadWebMedia } from "./ir-BODD8g-I.js";
6
+ import { n as resolveMarkdownTableMode } from "./markdown-tables-BHONoo6S.js";
7
+ import { a as loadWebMedia } from "./ir-BZUjdf-6.js";
8
8
  import { n as normalizePollInput } from "./polls-an_kOejR.js";
9
- import { t as convertMarkdownTables } from "./tables-Bfh_TnCf.js";
10
- import { i as redactIdentifier, n as requireActiveWebListener } from "./active-listener-neKWQsOO.js";
9
+ import { t as convertMarkdownTables } from "./tables-BKnPZssn.js";
10
+ import { i as redactIdentifier, n as requireActiveWebListener } from "./active-listener-Hd9sOu9T.js";
11
11
 
12
12
  //#region src/markdown/whatsapp.ts
13
13
  /**
@@ -1,5 +1,5 @@
1
- import { i as saveMediaBuffer } from "./store-DhC72KqW.js";
2
- import { a as loadWebMedia } from "./ir-BODD8g-I.js";
1
+ import { i as saveMediaBuffer } from "./store-C8KgeMt2.js";
2
+ import { a as loadWebMedia } from "./ir-BZUjdf-6.js";
3
3
  import { t as buildOutboundMediaLoadOptions } from "./load-options-xFTRYZAO.js";
4
4
 
5
5
  //#region src/media/outbound-attachment.ts
@@ -1,4 +1,4 @@
1
- import { E as resolveBoundaryPath, T as BOUNDARY_PATH_ALIAS_POLICIES, k as isNotFoundPathError } from "./workspace-CswOYN9T.js";
1
+ import { E as resolveBoundaryPath, T as BOUNDARY_PATH_ALIAS_POLICIES, k as isNotFoundPathError } from "./workspace-D6mrCnXi.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-DKuX7-1L.js";
1
+ import { c as resolveStateDir, d as resolveRequiredHomeDir, l as expandHomePrefix } from "./paths-aGRLvQx9.js";
2
2
  import { c as normalizeAgentId, t as DEFAULT_AGENT_ID } from "./session-key-a6av96Fj.js";
3
3
  import os from "node:os";
4
4
  import path from "node:path";
5
- import fs from "node:fs";
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 fs.realpathSync(filePath);
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 fs from "node:fs";
3
+ import syncFs from "node:fs";
4
4
 
5
5
  //#region src/cli/cli-name.ts
6
6
  const DEFAULT_CLI_NAME = "openclaw";
@@ -124,10 +124,10 @@ function resolveStateDir(env = process.env, homedir = envHomedir(env)) {
124
124
  const newDir = defaultStateDirForEnv(env, effectiveHomedir);
125
125
  if (env.OPENCLAW_TEST_FAST === "1") return newDir;
126
126
  const legacyDirs = legacyStateDirs(effectiveHomedir);
127
- if (fs.existsSync(newDir)) return newDir;
127
+ if (syncFs.existsSync(newDir)) return newDir;
128
128
  const existingLegacy = legacyDirs.find((dir) => {
129
129
  try {
130
- return fs.existsSync(dir);
130
+ return syncFs.existsSync(dir);
131
131
  } catch {
132
132
  return false;
133
133
  }
@@ -167,7 +167,7 @@ function resolveConfigPathCandidate(env = process.env, homedir = envHomedir(env)
167
167
  if (env.OPENCLAW_TEST_FAST === "1") return resolveCanonicalConfigPath(env, resolveStateDir(env, homedir));
168
168
  const existing = resolveDefaultConfigCandidates(env, homedir).find((candidate) => {
169
169
  try {
170
- return fs.existsSync(candidate);
170
+ return syncFs.existsSync(candidate);
171
171
  } catch {
172
172
  return false;
173
173
  }
@@ -185,7 +185,7 @@ function resolveConfigPath(env = process.env, stateDir = resolveStateDir(env, en
185
185
  const stateOverride = env.OPENCLAW_STATE_DIR?.trim();
186
186
  const existing = [path.join(stateDir, CONFIG_FILENAME), ...LEGACY_CONFIG_FILENAMES.map((name) => path.join(stateDir, name))].find((candidate) => {
187
187
  try {
188
- return fs.existsSync(candidate);
188
+ return syncFs.existsSync(candidate);
189
189
  } catch {
190
190
  return false;
191
191
  }