denchclaw 2.5.7 → 2.5.8

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 (138) hide show
  1. package/apps/web/.next/standalone/apps/web/.next/BUILD_ID +1 -1
  2. package/apps/web/.next/standalone/apps/web/.next/app-build-manifest.json +136 -136
  3. package/apps/web/.next/standalone/apps/web/.next/app-path-routes-manifest.json +40 -40
  4. package/apps/web/.next/standalone/apps/web/.next/build-manifest.json +2 -2
  5. package/apps/web/.next/standalone/apps/web/.next/cache/config.json +3 -3
  6. package/apps/web/.next/standalone/apps/web/.next/prerender-manifest.json +3 -3
  7. package/apps/web/.next/standalone/apps/web/.next/required-server-files.json +1 -1
  8. package/apps/web/.next/standalone/apps/web/.next/routes-manifest.json +1 -1
  9. package/apps/web/.next/standalone/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  10. package/apps/web/.next/standalone/apps/web/.next/server/app/api/apps/cron/route_client-reference-manifest.js +1 -1
  11. package/apps/web/.next/standalone/apps/web/.next/server/app/api/apps/proxy/route_client-reference-manifest.js +1 -1
  12. package/apps/web/.next/standalone/apps/web/.next/server/app/api/apps/route_client-reference-manifest.js +1 -1
  13. package/apps/web/.next/standalone/apps/web/.next/server/app/api/apps/serve/[...path]/route_client-reference-manifest.js +1 -1
  14. package/apps/web/.next/standalone/apps/web/.next/server/app/api/apps/store/route_client-reference-manifest.js +1 -1
  15. package/apps/web/.next/standalone/apps/web/.next/server/app/api/apps/webhooks/[...path]/route_client-reference-manifest.js +1 -1
  16. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/active/route_client-reference-manifest.js +1 -1
  17. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/route.js +1 -1
  18. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/route_client-reference-manifest.js +1 -1
  19. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/runs/route_client-reference-manifest.js +1 -1
  20. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/stop/route.js +1 -1
  21. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/stop/route_client-reference-manifest.js +1 -1
  22. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/stream/route_client-reference-manifest.js +1 -1
  23. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/subagents/route_client-reference-manifest.js +1 -1
  24. package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/callback/route_client-reference-manifest.js +1 -1
  25. package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/connect/route_client-reference-manifest.js +1 -1
  26. package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/connections/route_client-reference-manifest.js +1 -1
  27. package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/disconnect/route_client-reference-manifest.js +1 -1
  28. package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/status/route_client-reference-manifest.js +1 -1
  29. package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/toolkits/route_client-reference-manifest.js +1 -1
  30. package/apps/web/.next/standalone/apps/web/.next/server/app/api/cron/jobs/[jobId]/runs/route_client-reference-manifest.js +1 -1
  31. package/apps/web/.next/standalone/apps/web/.next/server/app/api/cron/jobs/route_client-reference-manifest.js +1 -1
  32. package/apps/web/.next/standalone/apps/web/.next/server/app/api/cron/runs/[sessionId]/route_client-reference-manifest.js +1 -1
  33. package/apps/web/.next/standalone/apps/web/.next/server/app/api/cron/runs/search-transcript/route_client-reference-manifest.js +1 -1
  34. package/apps/web/.next/standalone/apps/web/.next/server/app/api/feedback/route.js +1 -1
  35. package/apps/web/.next/standalone/apps/web/.next/server/app/api/feedback/route_client-reference-manifest.js +1 -1
  36. package/apps/web/.next/standalone/apps/web/.next/server/app/api/gateway/channels/route_client-reference-manifest.js +1 -1
  37. package/apps/web/.next/standalone/apps/web/.next/server/app/api/gateway/chat/route_client-reference-manifest.js +1 -1
  38. package/apps/web/.next/standalone/apps/web/.next/server/app/api/gateway/chat/stream/route_client-reference-manifest.js +1 -1
  39. package/apps/web/.next/standalone/apps/web/.next/server/app/api/gateway/sessions/[id]/route_client-reference-manifest.js +1 -1
  40. package/apps/web/.next/standalone/apps/web/.next/server/app/api/gateway/sessions/route_client-reference-manifest.js +1 -1
  41. package/apps/web/.next/standalone/apps/web/.next/server/app/api/integrations/[id]/toggle/route_client-reference-manifest.js +1 -1
  42. package/apps/web/.next/standalone/apps/web/.next/server/app/api/integrations/repair/route_client-reference-manifest.js +1 -1
  43. package/apps/web/.next/standalone/apps/web/.next/server/app/api/integrations/route_client-reference-manifest.js +1 -1
  44. package/apps/web/.next/standalone/apps/web/.next/server/app/api/memories/route_client-reference-manifest.js +1 -1
  45. package/apps/web/.next/standalone/apps/web/.next/server/app/api/profiles/route_client-reference-manifest.js +1 -1
  46. package/apps/web/.next/standalone/apps/web/.next/server/app/api/profiles/switch/route_client-reference-manifest.js +1 -1
  47. package/apps/web/.next/standalone/apps/web/.next/server/app/api/sessions/[sessionId]/route_client-reference-manifest.js +1 -1
  48. package/apps/web/.next/standalone/apps/web/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
  49. package/apps/web/.next/standalone/apps/web/.next/server/app/api/settings/cloud/route_client-reference-manifest.js +1 -1
  50. package/apps/web/.next/standalone/apps/web/.next/server/app/api/skills/[slug]/content/route_client-reference-manifest.js +1 -1
  51. package/apps/web/.next/standalone/apps/web/.next/server/app/api/skills/[slug]/route_client-reference-manifest.js +1 -1
  52. package/apps/web/.next/standalone/apps/web/.next/server/app/api/skills/browse/route_client-reference-manifest.js +1 -1
  53. package/apps/web/.next/standalone/apps/web/.next/server/app/api/skills/install/route_client-reference-manifest.js +1 -1
  54. package/apps/web/.next/standalone/apps/web/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  55. package/apps/web/.next/standalone/apps/web/.next/server/app/api/terminal/port/route_client-reference-manifest.js +1 -1
  56. package/apps/web/.next/standalone/apps/web/.next/server/app/api/voice/speech/route_client-reference-manifest.js +1 -1
  57. package/apps/web/.next/standalone/apps/web/.next/server/app/api/voice/transcribe/route_client-reference-manifest.js +1 -1
  58. package/apps/web/.next/standalone/apps/web/.next/server/app/api/voice/voices/route_client-reference-manifest.js +1 -1
  59. package/apps/web/.next/standalone/apps/web/.next/server/app/api/web-sessions/[id]/messages/route_client-reference-manifest.js +1 -1
  60. package/apps/web/.next/standalone/apps/web/.next/server/app/api/web-sessions/[id]/route_client-reference-manifest.js +1 -1
  61. package/apps/web/.next/standalone/apps/web/.next/server/app/api/web-sessions/route.js +1 -1
  62. package/apps/web/.next/standalone/apps/web/.next/server/app/api/web-sessions/route_client-reference-manifest.js +1 -1
  63. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/assets/[...path]/route_client-reference-manifest.js +1 -1
  64. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/browse/route_client-reference-manifest.js +1 -1
  65. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/browse-file/route_client-reference-manifest.js +1 -1
  66. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/context/route_client-reference-manifest.js +1 -1
  67. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/copy/route_client-reference-manifest.js +1 -1
  68. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/db/introspect/route_client-reference-manifest.js +1 -1
  69. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/db/query/route_client-reference-manifest.js +1 -1
  70. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/delete/route.js +1 -1
  71. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/delete/route_client-reference-manifest.js +1 -1
  72. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/execute/route_client-reference-manifest.js +1 -1
  73. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/file/route_client-reference-manifest.js +1 -1
  74. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/init/route.js +1 -1
  75. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/init/route_client-reference-manifest.js +1 -1
  76. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/link-preview/route_client-reference-manifest.js +1 -1
  77. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/list/route_client-reference-manifest.js +1 -1
  78. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/mkdir/route_client-reference-manifest.js +1 -1
  79. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/move/route_client-reference-manifest.js +1 -1
  80. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/actions/route_client-reference-manifest.js +1 -1
  81. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/actions/runs/route_client-reference-manifest.js +1 -1
  82. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/display-field/route_client-reference-manifest.js +1 -1
  83. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/[id]/content/route_client-reference-manifest.js +1 -1
  84. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/[id]/route_client-reference-manifest.js +1 -1
  85. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/bulk-delete/route_client-reference-manifest.js +1 -1
  86. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/options/route_client-reference-manifest.js +1 -1
  87. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/route.js +1 -1
  88. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/route_client-reference-manifest.js +1 -1
  89. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/fields/[fieldId]/enum-rename/route_client-reference-manifest.js +1 -1
  90. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/fields/[fieldId]/route_client-reference-manifest.js +1 -1
  91. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/fields/reorder/route_client-reference-manifest.js +1 -1
  92. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/fields/route_client-reference-manifest.js +1 -1
  93. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/route_client-reference-manifest.js +1 -1
  94. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/views/route_client-reference-manifest.js +1 -1
  95. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/open-file/route_client-reference-manifest.js +1 -1
  96. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/path-info/route_client-reference-manifest.js +1 -1
  97. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/query/route_client-reference-manifest.js +1 -1
  98. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/raw-file/route_client-reference-manifest.js +1 -1
  99. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/rename/route_client-reference-manifest.js +1 -1
  100. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/reports/execute/route.js +1 -1
  101. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/reports/execute/route_client-reference-manifest.js +1 -1
  102. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/search-index/route_client-reference-manifest.js +1 -1
  103. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/suggest-files/route_client-reference-manifest.js +1 -1
  104. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/switch/route.js +1 -1
  105. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/switch/route_client-reference-manifest.js +1 -1
  106. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/thumbnail/route_client-reference-manifest.js +1 -1
  107. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/tree/route_client-reference-manifest.js +1 -1
  108. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/upload/route.js +1 -1
  109. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/upload/route_client-reference-manifest.js +1 -1
  110. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/virtual-file/route_client-reference-manifest.js +1 -1
  111. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/watch/route_client-reference-manifest.js +1 -1
  112. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/write-binary/route_client-reference-manifest.js +1 -1
  113. package/apps/web/.next/standalone/apps/web/.next/server/app/page.js +1 -1
  114. package/apps/web/.next/standalone/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
  115. package/apps/web/.next/standalone/apps/web/.next/server/app/workspace/page_client-reference-manifest.js +1 -1
  116. package/apps/web/.next/standalone/apps/web/.next/server/app-paths-manifest.json +40 -40
  117. package/apps/web/.next/standalone/apps/web/.next/server/chunks/6787.js +1 -1
  118. package/apps/web/.next/standalone/apps/web/.next/server/functions-config-manifest.json +20 -20
  119. package/apps/web/.next/standalone/apps/web/.next/server/pages/500.html +1 -1
  120. package/apps/web/.next/standalone/apps/web/.next/server/server-reference-manifest.json +1 -1
  121. package/apps/web/.next/{static/chunks/app/layout-8c717ce658a59595.js → standalone/apps/web/.next/static/chunks/app/layout-f178882f0e137350.js} +1 -1
  122. package/apps/web/.next/{static/chunks/app/page-77c39f63c6098560.js → standalone/apps/web/.next/static/chunks/app/page-85db60f07f76e848.js} +1 -1
  123. package/apps/web/.next/standalone/apps/web/.next/static/css/{5d22cd4102b8cb8f.css → ba9b100717ee32d9.css} +1 -1
  124. package/apps/web/.next/standalone/apps/web/server.js +1 -1
  125. package/apps/web/.next/standalone/extensions/posthog-analytics/lib/build-env.js +1 -1
  126. package/apps/web/.next/standalone/package.json +1 -1
  127. package/apps/web/.next/{standalone/apps/web/.next/static/chunks/app/layout-8c717ce658a59595.js → static/chunks/app/layout-f178882f0e137350.js} +1 -1
  128. package/apps/web/.next/{standalone/apps/web/.next/static/chunks/app/page-77c39f63c6098560.js → static/chunks/app/page-85db60f07f76e848.js} +1 -1
  129. package/apps/web/.next/static/css/{5d22cd4102b8cb8f.css → ba9b100717ee32d9.css} +1 -1
  130. package/dist/entry.js +1 -1
  131. package/dist/{program-CtW4fcfa.js → program-Cv3zi02z.js} +164 -46
  132. package/dist/{run-main-CPnN1zoG.js → run-main-Dtg21-XR.js} +6 -2
  133. package/extensions/posthog-analytics/lib/build-env.js +1 -1
  134. package/package.json +1 -1
  135. /package/apps/web/.next/standalone/apps/web/.next/static/{c5HBfir-oaMQ0MgQr4X7I → nvU6LVl8akW-X-67Ehk_S}/_buildManifest.js +0 -0
  136. /package/apps/web/.next/standalone/apps/web/.next/static/{c5HBfir-oaMQ0MgQr4X7I → nvU6LVl8akW-X-67Ehk_S}/_ssgManifest.js +0 -0
  137. /package/apps/web/.next/static/{c5HBfir-oaMQ0MgQr4X7I → nvU6LVl8akW-X-67Ehk_S}/_buildManifest.js +0 -0
  138. /package/apps/web/.next/static/{c5HBfir-oaMQ0MgQr4X7I → nvU6LVl8akW-X-67Ehk_S}/_ssgManifest.js +0 -0
@@ -2,7 +2,7 @@ import { a as markNoticeShown, i as getOrCreateAnonymousId, o as readTelemetryCo
2
2
  import { d as hasFlag, g as resolveRequiredHomeDir, h as expandHomePrefix, i as isDaemonlessMode, m as applyCliProfileEnv, o as visibleWidth, p as hasRootVersionAlias, r as DENCHCLAW_DEFAULT_GATEWAY_PORT, s as defaultRuntime, t as isTruthyEnvValue, u as getPrimaryCommand } from "./entry.js";
3
3
  import { a as hasEmittedCliBanner, i as formatCliBannerLine, n as resolveCliName, o as isRich, s as theme, t as replaceCliName } from "./cli-name-Sz-5E3q2.js";
4
4
  import { t as VERSION } from "./version-DfFmvCFM.js";
5
- import { execFileSync, spawn } from "node:child_process";
5
+ import { execFileSync, execSync, spawn } from "node:child_process";
6
6
  import process$1 from "node:process";
7
7
  import fs, { copyFileSync, cpSync, existsSync, lstatSync, mkdirSync, openSync, readFileSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, writeFileSync } from "node:fs";
8
8
  import os from "node:os";
@@ -17,6 +17,7 @@ import { createConnection } from "node:net";
17
17
  //#region src/infra/ports-lsof.ts
18
18
  const LSOF_CANDIDATES = process.platform === "darwin" ? ["/usr/sbin/lsof", "/usr/bin/lsof"] : ["/usr/bin/lsof", "/usr/sbin/lsof"];
19
19
  function resolveLsofCommandSync() {
20
+ if (process.platform === "win32") throw new Error("lsof is not available on Windows; use netstat-based port listing instead");
20
21
  for (const candidate of LSOF_CANDIDATES) try {
21
22
  fs.accessSync(candidate, fs.constants.X_OK);
22
23
  return candidate;
@@ -68,6 +69,7 @@ const CONFIG_DIR = resolveConfigDir();
68
69
 
69
70
  //#endregion
70
71
  //#region src/cli/ports.ts
72
+ const IS_WINDOWS$2 = process.platform === "win32";
71
73
  function parseLsofOutput(output) {
72
74
  const lines = output.split(/\r?\n/).filter(Boolean);
73
75
  const results = [];
@@ -79,7 +81,34 @@ function parseLsofOutput(output) {
79
81
  if (current.pid) results.push(current);
80
82
  return results;
81
83
  }
82
- function listPortListeners(port) {
84
+ function parseNetstatOutput(output, port) {
85
+ const seen = /* @__PURE__ */ new Set();
86
+ const results = [];
87
+ for (const line of output.split(/\r?\n/)) {
88
+ const trimmed = line.trim();
89
+ if (!trimmed.includes("LISTENING")) continue;
90
+ const columns = trimmed.split(/\s+/);
91
+ const localAddr = columns[1];
92
+ if (!localAddr) continue;
93
+ if (Number.parseInt(localAddr.slice(localAddr.lastIndexOf(":") + 1), 10) !== port) continue;
94
+ const pid = Number.parseInt(columns[columns.length - 1], 10);
95
+ if (!Number.isFinite(pid) || pid <= 0 || seen.has(pid)) continue;
96
+ seen.add(pid);
97
+ results.push({ pid });
98
+ }
99
+ return results;
100
+ }
101
+ function listPortListenersWindows(port) {
102
+ try {
103
+ return parseNetstatOutput(execSync(`netstat -ano -p TCP`, {
104
+ encoding: "utf-8",
105
+ windowsHide: true
106
+ }), port);
107
+ } catch {
108
+ return [];
109
+ }
110
+ }
111
+ function listPortListenersUnix(port) {
83
112
  try {
84
113
  return parseLsofOutput(execFileSync(resolveLsofCommandSync(), [
85
114
  "-nP",
@@ -94,6 +123,9 @@ function listPortListeners(port) {
94
123
  throw err instanceof Error ? err : new Error(String(err));
95
124
  }
96
125
  }
126
+ function listPortListeners(port) {
127
+ return IS_WINDOWS$2 ? listPortListenersWindows(port) : listPortListenersUnix(port);
128
+ }
97
129
 
98
130
  //#endregion
99
131
  //#region src/terminal/links.ts
@@ -535,12 +567,12 @@ function writeJsonFile(filePath, value) {
535
567
  ensureParentDir(filePath);
536
568
  writeFileSync(filePath, `${JSON.stringify(value, null, 2)}\n`, "utf-8");
537
569
  }
538
- function resolveCommandForPlatform$1(command) {
539
- if (process$1.platform !== "win32") return command;
540
- if (path.extname(command)) return command;
541
- const normalized = path.basename(command).toLowerCase();
542
- if (normalized === "npm" || normalized === "pnpm" || normalized === "npx" || normalized === "yarn") return `${command}.cmd`;
543
- return command;
570
+ const IS_WINDOWS$1 = process$1.platform === "win32";
571
+ function platformSpawnOptions$1() {
572
+ return {
573
+ shell: IS_WINDOWS$1,
574
+ windowsHide: IS_WINDOWS$1
575
+ };
544
576
  }
545
577
  function isProcessAlive(pid) {
546
578
  try {
@@ -551,6 +583,24 @@ function isProcessAlive(pid) {
551
583
  }
552
584
  }
553
585
  async function terminatePidWithEscalation(pid) {
586
+ if (IS_WINDOWS$1) {
587
+ try {
588
+ execSync(`taskkill /pid ${pid} /f /t`, {
589
+ stdio: "ignore",
590
+ windowsHide: true
591
+ });
592
+ } catch (error) {
593
+ if (error.code === "ESRCH") return;
594
+ try {
595
+ process$1.kill(pid);
596
+ } catch {}
597
+ }
598
+ for (let i = 0; i < 8; i += 1) {
599
+ if (!isProcessAlive(pid)) return;
600
+ await sleep$1(100);
601
+ }
602
+ return;
603
+ }
554
604
  try {
555
605
  process$1.kill(pid, "SIGTERM");
556
606
  } catch (error) {
@@ -723,6 +773,7 @@ function evaluateMajorVersionTransition(params) {
723
773
  };
724
774
  }
725
775
  function resolveProcessCwd(pid) {
776
+ if (IS_WINDOWS$1) return;
726
777
  try {
727
778
  const output = execFileSync(resolveLsofCommandSync(), [
728
779
  "-nP",
@@ -1080,6 +1131,7 @@ function startManagedWebRuntime(params) {
1080
1131
  const child = spawn(process$1.execPath, [runtimeServerPath], {
1081
1132
  cwd: path.dirname(runtimeServerPath),
1082
1133
  detached: true,
1134
+ windowsHide: true,
1083
1135
  stdio: [
1084
1136
  "ignore",
1085
1137
  outFd,
@@ -1189,7 +1241,7 @@ function resolveOpenClawCommandOrThrow() {
1189
1241
  }
1190
1242
  async function runOpenClawCommand(params) {
1191
1243
  return await new Promise((resolve, reject) => {
1192
- const child = spawn(resolveCommandForPlatform$1(params.openclawCommand), params.args, {
1244
+ const child = spawn(params.openclawCommand, params.args, {
1193
1245
  stdio: [
1194
1246
  "ignore",
1195
1247
  "pipe",
@@ -1198,7 +1250,8 @@ async function runOpenClawCommand(params) {
1198
1250
  env: params.env ? {
1199
1251
  ...process$1.env,
1200
1252
  ...params.env
1201
- } : process$1.env
1253
+ } : process$1.env,
1254
+ ...platformSpawnOptions$1()
1202
1255
  });
1203
1256
  let stdout = "";
1204
1257
  let stderr = "";
@@ -1570,12 +1623,12 @@ const BOOTSTRAP_DEVICE_PAIRING_REQUIRED_SCOPES = [
1570
1623
  "operator.write",
1571
1624
  "operator.pairing"
1572
1625
  ];
1573
- function resolveCommandForPlatform(command) {
1574
- if (process$1.platform !== "win32") return command;
1575
- if (path.extname(command)) return command;
1576
- const normalized = path.basename(command).toLowerCase();
1577
- if (normalized === "npm" || normalized === "pnpm" || normalized === "npx" || normalized === "yarn") return `${command}.cmd`;
1578
- return command;
1626
+ const IS_WINDOWS = process$1.platform === "win32";
1627
+ function platformSpawnOptions() {
1628
+ return {
1629
+ shell: IS_WINDOWS,
1630
+ windowsHide: IS_WINDOWS
1631
+ };
1579
1632
  }
1580
1633
  async function runCommandWithTimeout(argv, options) {
1581
1634
  const [command, ...args] = argv;
@@ -1590,10 +1643,11 @@ async function runCommandWithTimeout(argv, options) {
1590
1643
  "pipe"
1591
1644
  ];
1592
1645
  return await new Promise((resolve, reject) => {
1593
- const child = spawn(resolveCommandForPlatform(command), args, {
1646
+ const child = spawn(command, args, {
1594
1647
  cwd: options.cwd,
1595
1648
  env: options.env ?? process$1.env,
1596
- stdio
1649
+ stdio,
1650
+ ...platformSpawnOptions()
1597
1651
  });
1598
1652
  let stdout = "";
1599
1653
  let stderr = "";
@@ -2161,11 +2215,14 @@ async function runOpenClawWithProgress(params) {
2161
2215
  const s = spinner();
2162
2216
  s.start(params.startMessage);
2163
2217
  const result = await new Promise((resolve, reject) => {
2164
- const child = spawn(resolveCommandForPlatform(params.openclawCommand), params.args, { stdio: [
2165
- "ignore",
2166
- "pipe",
2167
- "pipe"
2168
- ] });
2218
+ const child = spawn(params.openclawCommand, params.args, {
2219
+ stdio: [
2220
+ "ignore",
2221
+ "pipe",
2222
+ "pipe"
2223
+ ],
2224
+ ...platformSpawnOptions()
2225
+ });
2169
2226
  let stdout = "";
2170
2227
  let stderr = "";
2171
2228
  let settled = false;
@@ -2534,6 +2591,17 @@ function isProjectLocalOpenClawPath(commandPath) {
2534
2591
  if (!commandPath) return false;
2535
2592
  return commandPath.replaceAll("\\", "/").includes("/node_modules/.bin/openclaw");
2536
2593
  }
2594
+ function resolveUserPrefixBinDir(prefixDir) {
2595
+ return IS_WINDOWS ? prefixDir : path.join(prefixDir, "bin");
2596
+ }
2597
+ function resolveOpenClawCommandInDir(binDir) {
2598
+ return (IS_WINDOWS ? [path.join(binDir, "openclaw.cmd"), path.join(binDir, "openclaw.exe")] : [path.join(binDir, "openclaw")]).find((c) => existsSync(c));
2599
+ }
2600
+ function extractNpmErrorHint(stderr) {
2601
+ const lower = stderr.toLowerCase();
2602
+ if (lower.includes("eacces") || lower.includes("eperm") || lower.includes("permission denied")) return IS_WINDOWS ? "Permission denied. Try running your terminal as Administrator." : "Permission denied. Try: sudo npm install -g openclaw";
2603
+ if (lower.includes("enotfound") || lower.includes("enetunreach") || lower.includes("etimedout")) return "Network error. Check your internet connection and retry.";
2604
+ }
2537
2605
  async function ensureOpenClawCliAvailable(params) {
2538
2606
  const cached = readOpenClawCliCheckCache(params.stateDir);
2539
2607
  if (cached) {
@@ -2565,6 +2633,7 @@ async function ensureOpenClawCliAvailable(params) {
2565
2633
  progress.completeStage(globalBefore.installed ? `found ${globalBefore.version ?? "installed"}` : "missing");
2566
2634
  let installed = false;
2567
2635
  let installedAt;
2636
+ let fallbackBinDir;
2568
2637
  progress.startStage("Ensuring openclaw@latest is installed globally");
2569
2638
  if (!globalBefore.installed) {
2570
2639
  const install = await runCommandWithTimeout([
@@ -2580,44 +2649,81 @@ async function ensureOpenClawCliAvailable(params) {
2580
2649
  }
2581
2650
  }).catch(() => null);
2582
2651
  if (!install || install.code !== 0) {
2583
- progress.fail("OpenClaw global install failed.");
2584
- return {
2585
- available: false,
2586
- installed: false,
2587
- version: void 0,
2588
- command: "openclaw"
2589
- };
2652
+ const globalError = install?.stderr ?? "";
2653
+ progress.output("Global install failed; trying user-prefix fallback...");
2654
+ const userPrefix = path.join(params.stateDir, "npm-global");
2655
+ mkdirSync(userPrefix, { recursive: true });
2656
+ const fallbackInstall = await runCommandWithTimeout([
2657
+ "npm",
2658
+ "install",
2659
+ "--global",
2660
+ "--prefix",
2661
+ userPrefix,
2662
+ "openclaw@latest"
2663
+ ], {
2664
+ timeoutMs: 10 * 6e4,
2665
+ env: cleanNpmGlobalEnv(),
2666
+ onOutputLine: (line) => {
2667
+ progress.output(`npm install (prefix): ${line}`);
2668
+ }
2669
+ }).catch(() => null);
2670
+ if (!fallbackInstall || fallbackInstall.code !== 0) {
2671
+ const fallbackError = fallbackInstall?.stderr ?? "";
2672
+ const combinedStderr = globalError || fallbackError;
2673
+ const errorLines = [
2674
+ "npm install -g openclaw@latest failed.",
2675
+ extractNpmErrorHint(combinedStderr),
2676
+ combinedStderr ? `npm output: ${firstNonEmptyLine$1(combinedStderr) ?? combinedStderr.slice(0, 200).trim()}` : void 0
2677
+ ].filter(Boolean).join("\n");
2678
+ progress.fail("OpenClaw install failed (global and user-prefix).");
2679
+ return {
2680
+ available: false,
2681
+ installed: false,
2682
+ version: void 0,
2683
+ command: "openclaw",
2684
+ error: errorLines
2685
+ };
2686
+ }
2687
+ fallbackBinDir = resolveUserPrefixBinDir(userPrefix);
2688
+ const currentPath = process$1.env.PATH ?? "";
2689
+ if (!currentPath.split(path.delimiter).includes(fallbackBinDir)) process$1.env.PATH = `${fallbackBinDir}${path.delimiter}${currentPath}`;
2690
+ installed = true;
2691
+ installedAt = Date.now();
2692
+ progress.completeStage("installed openclaw@latest (user-prefix fallback)");
2693
+ } else {
2694
+ installed = true;
2695
+ installedAt = Date.now();
2696
+ progress.completeStage("installed openclaw@latest");
2590
2697
  }
2591
- installed = true;
2592
- installedAt = Date.now();
2593
- progress.completeStage("installed openclaw@latest");
2594
2698
  } else progress.completeStage("already installed; skipping install");
2595
2699
  progress.startStage("Resolving global and shell OpenClaw paths");
2596
2700
  const [globalBinDir, shellCommandPath] = await Promise.all([resolveNpmGlobalBinDir((line) => {
2597
2701
  progress.output(`npm prefix: ${line}`);
2598
2702
  }), resolveShellOpenClawPath((line) => {
2599
- progress.output(`${process$1.platform === "win32" ? "where" : "which"}: ${line}`);
2703
+ progress.output(`${IS_WINDOWS ? "where" : "which"}: ${line}`);
2600
2704
  })]);
2601
2705
  progress.completeStage("path discovery complete");
2602
2706
  const globalAfter = installed ? {
2603
2707
  installed: true,
2604
2708
  version: globalBefore.version
2605
2709
  } : globalBefore;
2606
- const command = resolveGlobalOpenClawCommand(globalBinDir) ?? "openclaw";
2710
+ const fallbackCommand = fallbackBinDir ? resolveOpenClawCommandInDir(fallbackBinDir) : void 0;
2711
+ const command = resolveGlobalOpenClawCommand(globalBinDir) ?? fallbackCommand ?? "openclaw";
2607
2712
  progress.startStage("Verifying OpenClaw CLI responsiveness");
2608
2713
  const check = await runOpenClaw(command, ["--version"], 4e3, "capture", void 0, (line) => {
2609
2714
  progress.output(`openclaw --version: ${line}`);
2610
2715
  }).catch(() => null);
2611
2716
  progress.completeStage(check?.code === 0 ? "OpenClaw responded" : "OpenClaw version probe failed");
2612
2717
  const version = normalizeVersionOutput(check?.stdout || check?.stderr || globalAfter.version);
2613
- const available = Boolean(globalAfter.installed && check && check.code === 0);
2718
+ const available = Boolean((globalAfter.installed || fallbackCommand) && check && check.code === 0);
2719
+ const effectiveBinDir = globalBinDir ?? fallbackBinDir;
2614
2720
  progress.startStage("Caching OpenClaw check result");
2615
2721
  if (available) {
2616
2722
  writeOpenClawCliCheckCache(params.stateDir, {
2617
2723
  available,
2618
2724
  command,
2619
2725
  version,
2620
- globalBinDir,
2726
+ globalBinDir: effectiveBinDir,
2621
2727
  shellCommandPath,
2622
2728
  installedAt
2623
2729
  });
@@ -2629,7 +2735,7 @@ async function ensureOpenClawCliAvailable(params) {
2629
2735
  installedAt,
2630
2736
  version,
2631
2737
  command,
2632
- globalBinDir,
2738
+ globalBinDir: effectiveBinDir,
2633
2739
  shellCommandPath
2634
2740
  };
2635
2741
  }
@@ -2667,7 +2773,7 @@ function readLogTail(logPath, maxLines = 16) {
2667
2773
  }
2668
2774
  }
2669
2775
  function resolveLatestRuntimeLogPath() {
2670
- const runtimeLogDir = "/tmp/openclaw";
2776
+ const runtimeLogDir = path.join(os.tmpdir(), "openclaw");
2671
2777
  if (!existsSync(runtimeLogDir)) return;
2672
2778
  try {
2673
2779
  const files = readdirSync(runtimeLogDir).filter((name) => /^openclaw-.*\.log$/u.test(name)).toSorted((a, b) => b.localeCompare(a));
@@ -3397,9 +3503,10 @@ async function bootstrapCommand(opts, runtime = defaultRuntime) {
3397
3503
  });
3398
3504
  if (!installResult.available) throw new Error([
3399
3505
  "OpenClaw CLI is required but unavailable.",
3400
- "Install it with: npm install -g openclaw",
3401
- installResult.globalBinDir ? `Expected global binary directory: ${installResult.globalBinDir}` : ""
3402
- ].filter((line) => line.length > 0).join("\n"));
3506
+ installResult.error,
3507
+ !installResult.error ? IS_WINDOWS ? "Try running your terminal as Administrator and run: npm install -g openclaw" : "Try: sudo npm install -g openclaw" : void 0,
3508
+ installResult.globalBinDir ? `Expected global binary directory: ${installResult.globalBinDir}` : void 0
3509
+ ].filter((line) => typeof line === "string" && line.length > 0).join("\n"));
3403
3510
  const openclawCommand = installResult.command;
3404
3511
  if (await shouldRunUpdate({
3405
3512
  opts,
@@ -3516,7 +3623,7 @@ async function bootstrapCommand(opts, runtime = defaultRuntime) {
3516
3623
  onboardArgv.push("--skip-search");
3517
3624
  onboardArgv.push("--skip-skills");
3518
3625
  }
3519
- onboardArgv.push("--accept-risk", "--skip-ui");
3626
+ onboardArgv.push("--accept-risk", "--skip-ui", "--skip-channels");
3520
3627
  if (daemonless) onboardArgv.push("--skip-health");
3521
3628
  if (nonInteractive) await runOpenClawOrThrow({
3522
3629
  openclawCommand,
@@ -3692,7 +3799,8 @@ async function bootstrapCommand(opts, runtime = defaultRuntime) {
3692
3799
  runtime.log(theme.muted(`Bootstrap now uses the global binary (${openclawCommand}) to avoid repo-local drift.`));
3693
3800
  } else if (!installResult.shellCommandPath && installResult.globalBinDir) {
3694
3801
  runtime.log(theme.warn("Global OpenClaw was installed, but `openclaw` is not on shell PATH."));
3695
- runtime.log(theme.muted(`Add this to your shell profile, then open a new terminal: export PATH="${installResult.globalBinDir}:$PATH"`));
3802
+ const pathHint = IS_WINDOWS ? `To add to PATH, run in PowerShell: $env:Path = "${installResult.globalBinDir};$env:Path"` : `Add this to your shell profile, then open a new terminal: export PATH="${installResult.globalBinDir}:$PATH"`;
3803
+ runtime.log(theme.muted(pathHint));
3696
3804
  }
3697
3805
  runtime.log(theme.muted(`Workspace seed: ${describeWorkspaceSeedResult(workspaceSeed)}`));
3698
3806
  if (gatewayAutoFix?.attempted) {
@@ -4017,7 +4125,13 @@ async function openUrl(url) {
4017
4125
  ] : ["xdg-open", url];
4018
4126
  if (!cmd) return false;
4019
4127
  return new Promise((resolve) => {
4020
- const child = spawn(cmd, args, { stdio: "ignore" });
4128
+ const child = spawn(cmd, args, {
4129
+ stdio: "ignore",
4130
+ ...process$1.platform === "win32" ? {
4131
+ shell: true,
4132
+ windowsHide: true
4133
+ } : {}
4134
+ });
4021
4135
  const timer = setTimeout(() => {
4022
4136
  child.kill();
4023
4137
  resolve(false);
@@ -4052,7 +4166,11 @@ async function runOpenClawUpdateWithProgress(openclawCommand) {
4052
4166
  "pipe",
4053
4167
  "pipe"
4054
4168
  ],
4055
- env: process$1.env
4169
+ env: process$1.env,
4170
+ ...process$1.platform === "win32" ? {
4171
+ shell: true,
4172
+ windowsHide: true
4173
+ } : {}
4056
4174
  });
4057
4175
  let stdout = "";
4058
4176
  let stderr = "";
@@ -191,7 +191,11 @@ async function delegateToGlobalOpenClaw(argv) {
191
191
  ...process$1.env,
192
192
  DENCHCLAW_DELEGATED: "1",
193
193
  OPENCLAW_DELEGATED: "1"
194
- }
194
+ },
195
+ ...process$1.platform === "win32" ? {
196
+ shell: true,
197
+ windowsHide: true
198
+ } : {}
195
199
  });
196
200
  child.once("error", (error) => {
197
201
  if (error?.code === "ENOENT") {
@@ -220,7 +224,7 @@ async function runCli(argv = process$1.argv) {
220
224
  process$1.exitCode = await delegateToGlobalOpenClaw(parseArgv);
221
225
  return;
222
226
  }
223
- const { buildProgram } = await import("./program-CtW4fcfa.js");
227
+ const { buildProgram } = await import("./program-Cv3zi02z.js");
224
228
  await buildProgram().parseAsync(parseArgv);
225
229
  }
226
230
 
@@ -1,3 +1,3 @@
1
1
  export const POSTHOG_KEY = "phc_Nt8s1Ny8062TY9aKT8LWiB4nBuoHNYQXRU9MypWfQCW";
2
- export const DENCHCLAW_VERSION = "2.5.7";
2
+ export const DENCHCLAW_VERSION = "2.5.8";
3
3
  export const OPENCLAW_VERSION = "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "denchclaw",
3
- "version": "2.5.7",
3
+ "version": "2.5.8",
4
4
  "description": "Fully Managed OpenClaw Framework for managing your CRM, Sales Automation and Outreach agents. The only local productivity tool you need.",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/DenchHQ/DenchClaw#readme",