denchclaw 2.3.3 → 2.3.5

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 (100) hide show
  1. package/README.md +22 -0
  2. package/apps/web/.next/standalone/apps/web/.next/BUILD_ID +1 -1
  3. package/apps/web/.next/standalone/apps/web/.next/app-build-manifest.json +107 -107
  4. package/apps/web/.next/standalone/apps/web/.next/app-path-routes-manifest.json +32 -32
  5. package/apps/web/.next/standalone/apps/web/.next/build-manifest.json +2 -2
  6. package/apps/web/.next/standalone/apps/web/.next/required-server-files.json +1 -1
  7. package/apps/web/.next/standalone/apps/web/.next/server/app/_not-found/page.js +1 -1
  8. package/apps/web/.next/standalone/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  9. package/apps/web/.next/standalone/apps/web/.next/server/app/api/apps/route_client-reference-manifest.js +1 -1
  10. package/apps/web/.next/standalone/apps/web/.next/server/app/api/apps/serve/[...path]/route_client-reference-manifest.js +1 -1
  11. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/active/route_client-reference-manifest.js +1 -1
  12. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/route.js +1 -1
  13. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/route_client-reference-manifest.js +1 -1
  14. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/runs/route_client-reference-manifest.js +1 -1
  15. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/stop/route.js +1 -1
  16. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/stop/route_client-reference-manifest.js +1 -1
  17. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/stream/route_client-reference-manifest.js +1 -1
  18. package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/subagents/route_client-reference-manifest.js +1 -1
  19. package/apps/web/.next/standalone/apps/web/.next/server/app/api/cron/jobs/[jobId]/runs/route_client-reference-manifest.js +1 -1
  20. package/apps/web/.next/standalone/apps/web/.next/server/app/api/cron/jobs/route_client-reference-manifest.js +1 -1
  21. package/apps/web/.next/standalone/apps/web/.next/server/app/api/cron/runs/[sessionId]/route_client-reference-manifest.js +1 -1
  22. package/apps/web/.next/standalone/apps/web/.next/server/app/api/cron/runs/search-transcript/route_client-reference-manifest.js +1 -1
  23. package/apps/web/.next/standalone/apps/web/.next/server/app/api/feedback/route.js +1 -1
  24. package/apps/web/.next/standalone/apps/web/.next/server/app/api/feedback/route_client-reference-manifest.js +1 -1
  25. package/apps/web/.next/standalone/apps/web/.next/server/app/api/memories/route_client-reference-manifest.js +1 -1
  26. package/apps/web/.next/standalone/apps/web/.next/server/app/api/profiles/route_client-reference-manifest.js +1 -1
  27. package/apps/web/.next/standalone/apps/web/.next/server/app/api/profiles/switch/route_client-reference-manifest.js +1 -1
  28. package/apps/web/.next/standalone/apps/web/.next/server/app/api/sessions/[sessionId]/route_client-reference-manifest.js +1 -1
  29. package/apps/web/.next/standalone/apps/web/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
  30. package/apps/web/.next/standalone/apps/web/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  31. package/apps/web/.next/standalone/apps/web/.next/server/app/api/terminal/port/route_client-reference-manifest.js +1 -1
  32. package/apps/web/.next/standalone/apps/web/.next/server/app/api/web-sessions/[id]/messages/route_client-reference-manifest.js +1 -1
  33. package/apps/web/.next/standalone/apps/web/.next/server/app/api/web-sessions/[id]/route_client-reference-manifest.js +1 -1
  34. package/apps/web/.next/standalone/apps/web/.next/server/app/api/web-sessions/route.js +1 -1
  35. package/apps/web/.next/standalone/apps/web/.next/server/app/api/web-sessions/route_client-reference-manifest.js +1 -1
  36. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/assets/[...path]/route_client-reference-manifest.js +1 -1
  37. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/browse/route_client-reference-manifest.js +1 -1
  38. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/browse-file/route_client-reference-manifest.js +1 -1
  39. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/context/route_client-reference-manifest.js +1 -1
  40. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/copy/route_client-reference-manifest.js +1 -1
  41. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/db/introspect/route_client-reference-manifest.js +1 -1
  42. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/db/query/route_client-reference-manifest.js +1 -1
  43. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/delete/route.js +1 -1
  44. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/delete/route_client-reference-manifest.js +1 -1
  45. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/file/route_client-reference-manifest.js +1 -1
  46. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/init/route.js +1 -1
  47. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/init/route_client-reference-manifest.js +1 -1
  48. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/list/route_client-reference-manifest.js +1 -1
  49. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/mkdir/route_client-reference-manifest.js +1 -1
  50. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/move/route_client-reference-manifest.js +1 -1
  51. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/display-field/route_client-reference-manifest.js +1 -1
  52. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/[id]/route_client-reference-manifest.js +1 -1
  53. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/bulk-delete/route_client-reference-manifest.js +1 -1
  54. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/options/route_client-reference-manifest.js +1 -1
  55. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/route.js +1 -1
  56. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/route_client-reference-manifest.js +1 -1
  57. 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
  58. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/fields/[fieldId]/route_client-reference-manifest.js +1 -1
  59. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/fields/reorder/route_client-reference-manifest.js +1 -1
  60. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/route_client-reference-manifest.js +1 -1
  61. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/views/route_client-reference-manifest.js +1 -1
  62. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/open-file/route_client-reference-manifest.js +1 -1
  63. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/path-info/route_client-reference-manifest.js +1 -1
  64. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/query/route_client-reference-manifest.js +1 -1
  65. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/raw-file/route_client-reference-manifest.js +1 -1
  66. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/rename/route_client-reference-manifest.js +1 -1
  67. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/reports/execute/route.js +1 -1
  68. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/reports/execute/route_client-reference-manifest.js +1 -1
  69. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/search-index/route_client-reference-manifest.js +1 -1
  70. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/suggest-files/route_client-reference-manifest.js +1 -1
  71. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/switch/route.js +1 -1
  72. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/switch/route_client-reference-manifest.js +1 -1
  73. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/thumbnail/route_client-reference-manifest.js +1 -1
  74. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/tree/route_client-reference-manifest.js +1 -1
  75. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/upload/route.js +1 -1
  76. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/upload/route_client-reference-manifest.js +1 -1
  77. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/virtual-file/route_client-reference-manifest.js +1 -1
  78. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/watch/route_client-reference-manifest.js +1 -1
  79. package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/write-binary/route_client-reference-manifest.js +1 -1
  80. package/apps/web/.next/standalone/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
  81. package/apps/web/.next/standalone/apps/web/.next/server/app/workspace/page_client-reference-manifest.js +1 -1
  82. package/apps/web/.next/standalone/apps/web/.next/server/app-paths-manifest.json +32 -32
  83. package/apps/web/.next/standalone/apps/web/.next/server/chunks/7173.js +1 -1
  84. package/apps/web/.next/standalone/apps/web/.next/server/functions-config-manifest.json +17 -17
  85. package/apps/web/.next/standalone/apps/web/.next/server/pages/500.html +1 -1
  86. package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/{layout-b1203be3496fd9d6.js → layout-6e90e504e2adba63.js} +1 -1
  87. package/apps/web/.next/standalone/apps/web/server.js +1 -1
  88. package/apps/web/.next/standalone/package.json +1 -1
  89. package/apps/web/.next/static/chunks/app/{layout-b1203be3496fd9d6.js → layout-6e90e504e2adba63.js} +1 -1
  90. package/dist/{cli-name-DHxeNaoC.js → cli-name-CoW7mNz-.js} +1 -1
  91. package/dist/entry.js +5 -2
  92. package/dist/{program-DSRyK_2o.js → program-CLbWyFKO.js} +102 -85
  93. package/dist/{run-main-BscjRnkq.js → run-main-DYUPMl0Z.js} +3 -3
  94. package/dist/{telemetry-DH3DIAck.js → telemetry-CG1mrfh6.js} +1 -1
  95. package/extensions/posthog-analytics/lib/build-env.js +1 -1
  96. package/package.json +1 -1
  97. /package/apps/web/.next/standalone/apps/web/.next/static/{pf1Pw8WRwZmk_9AiabPbk → Teq2gB3xG7TsKJ3zBj2MC}/_buildManifest.js +0 -0
  98. /package/apps/web/.next/standalone/apps/web/.next/static/{pf1Pw8WRwZmk_9AiabPbk → Teq2gB3xG7TsKJ3zBj2MC}/_ssgManifest.js +0 -0
  99. /package/apps/web/.next/static/{pf1Pw8WRwZmk_9AiabPbk → Teq2gB3xG7TsKJ3zBj2MC}/_buildManifest.js +0 -0
  100. /package/apps/web/.next/static/{pf1Pw8WRwZmk_9AiabPbk → Teq2gB3xG7TsKJ3zBj2MC}/_ssgManifest.js +0 -0
@@ -1,6 +1,6 @@
1
- import { a as markNoticeShown, i as getOrCreateAnonymousId, o as readTelemetryConfig, r as track, s as writeTelemetryConfig, t as isTelemetryEnabled } from "./telemetry-DH3DIAck.js";
2
- import { f as hasRootVersionAlias, h as resolveRequiredHomeDir, l as getPrimaryCommand, m as expandHomePrefix, o as defaultRuntime, p as applyCliProfileEnv, r as DENCHCLAW_DEFAULT_GATEWAY_PORT, t as isTruthyEnvValue, u as hasFlag } from "./entry.js";
3
- import { a as hasEmittedCliBanner, i as formatCliBannerLine, n as resolveCliName, o as isRich, s as theme, t as replaceCliName } from "./cli-name-DHxeNaoC.js";
1
+ import { a as markNoticeShown, i as getOrCreateAnonymousId, o as readTelemetryConfig, r as track, s as writeTelemetryConfig, t as isTelemetryEnabled } from "./telemetry-CG1mrfh6.js";
2
+ import { d as hasFlag, g as resolveRequiredHomeDir, h as expandHomePrefix, i as isDaemonlessMode, m as applyCliProfileEnv, p as hasRootVersionAlias, r as DENCHCLAW_DEFAULT_GATEWAY_PORT, s as defaultRuntime, t as isTruthyEnvValue, u as getPrimaryCommand } from "./entry.js";
3
+ import { a as hasEmittedCliBanner, i as formatCliBannerLine, n as resolveCliName, o as isRich, s as theme, t as replaceCliName } from "./cli-name-CoW7mNz-.js";
4
4
  import { t as VERSION } from "./version-DfFmvCFM.js";
5
5
  import { execFileSync, spawn } from "node:child_process";
6
6
  import process$1 from "node:process";
@@ -1816,19 +1816,6 @@ async function syncBundledPlugins(params) {
1816
1816
  recursive: true,
1817
1817
  force: true
1818
1818
  });
1819
- if (params.restartGateway) try {
1820
- await runOpenClawOrThrow({
1821
- openclawCommand: params.openclawCommand,
1822
- args: [
1823
- "--profile",
1824
- params.profile,
1825
- "gateway",
1826
- "restart"
1827
- ],
1828
- timeoutMs: 6e4,
1829
- errorMessage: "Failed to restart gateway after plugin install."
1830
- });
1831
- } catch {}
1832
1819
  return {
1833
1820
  installedPluginIds,
1834
1821
  migratedLegacyDenchPlugin
@@ -1893,19 +1880,25 @@ async function ensureDefaultWorkspacePath(openclawCommand, profile, workspaceDir
1893
1880
  });
1894
1881
  }
1895
1882
  /**
1896
- * Write `agents.defaults.workspace` directly into `stateDir/openclaw.json`
1883
+ * Stage all required pre-onboard config directly into `stateDir/openclaw.json`
1897
1884
  * without going through the OpenClaw CLI. On a fresh install the "dench"
1898
- * profile doesn't exist yet (it's created by `openclaw onboard`), so the
1899
- * CLI-based `config set` fails. Writing the file directly sidesteps this
1900
- * while still ensuring the workspace is pinned before onboard runs.
1885
+ * profile doesn't exist yet (it's created by `openclaw onboard`), so any
1886
+ * `openclaw config set` call fails. Writing the file directly sidesteps
1887
+ * this while still ensuring the config is in place before onboard starts
1888
+ * the daemon. The CLI-based re-application happens post-onboard once the
1889
+ * profile is live.
1901
1890
  */
1902
- function pinWorkspaceInConfigFile(stateDir, workspaceDir) {
1891
+ function stagePreOnboardConfig(stateDir, params) {
1903
1892
  const raw = readBootstrapConfig(stateDir) ?? {};
1904
1893
  const agents = { ...asRecord(raw.agents) ?? {} };
1905
1894
  const defaults = { ...asRecord(agents.defaults) ?? {} };
1906
- defaults.workspace = workspaceDir;
1895
+ defaults.workspace = params.workspaceDir;
1907
1896
  agents.defaults = defaults;
1908
1897
  raw.agents = agents;
1898
+ const gateway = { ...asRecord(raw.gateway) ?? {} };
1899
+ gateway.mode = params.gatewayMode;
1900
+ gateway.port = params.gatewayPort;
1901
+ raw.gateway = gateway;
1909
1902
  mkdirSync(stateDir, { recursive: true });
1910
1903
  writeFileSync(path.join(stateDir, "openclaw.json"), `${JSON.stringify(raw, null, 2)}\n`);
1911
1904
  }
@@ -2438,8 +2431,8 @@ async function attemptGatewayAutoFix(params) {
2438
2431
  });
2439
2432
  }
2440
2433
  let finalProbe = await probeGateway(params.openclawCommand, params.profile, params.gatewayPort);
2441
- for (let attempt = 0; attempt < 2 && !finalProbe.ok; attempt += 1) {
2442
- await sleep(1200);
2434
+ for (let attempt = 0; attempt < 4 && !finalProbe.ok; attempt += 1) {
2435
+ await sleep(1e3);
2443
2436
  finalProbe = await probeGateway(params.openclawCommand, params.profile, params.gatewayPort);
2444
2437
  }
2445
2438
  const logExcerpts = finalProbe.ok ? [] : collectGatewayLogExcerpts(params.stateDir);
@@ -2822,6 +2815,7 @@ async function bootstrapCommand(opts, runtime = defaultRuntime) {
2822
2815
  const stateDir = resolveProfileStateDir(profile);
2823
2816
  const workspaceDir = resolveBootstrapWorkspaceDir(stateDir);
2824
2817
  if (appliedProfile.warning && !opts.json) runtime.log(theme.warn(appliedProfile.warning));
2818
+ const daemonless = isDaemonlessMode(opts);
2825
2819
  const bootstrapStartTime = Date.now();
2826
2820
  if (!opts.json) {
2827
2821
  if (!readTelemetryConfig().noticeShown) {
@@ -2875,8 +2869,12 @@ async function bootstrapCommand(opts, runtime = defaultRuntime) {
2875
2869
  }
2876
2870
  if (portAutoAssigned && !opts.json) runtime.log(theme.muted(`Default gateway port ${DENCHCLAW_GATEWAY_PORT_START} is in use. Using auto-assigned port ${gatewayPort}.`));
2877
2871
  mkdirSync(workspaceDir, { recursive: true });
2878
- preCloudSpinner?.message("Configuring default workspace…");
2879
- pinWorkspaceInConfigFile(stateDir, workspaceDir);
2872
+ preCloudSpinner?.message("Staging pre-onboard config…");
2873
+ stagePreOnboardConfig(stateDir, {
2874
+ workspaceDir,
2875
+ gatewayMode: "local",
2876
+ gatewayPort
2877
+ });
2880
2878
  preCloudSpinner?.stop("Gateway ready.");
2881
2879
  const denchCloudSelection = await resolveDenchCloudBootstrapSelection({
2882
2880
  opts,
@@ -2900,40 +2898,18 @@ async function bootstrapCommand(opts, runtime = defaultRuntime) {
2900
2898
  }];
2901
2899
  const preOnboardSpinner = !opts.json ? spinner() : null;
2902
2900
  preOnboardSpinner?.start("Syncing bundled plugins…");
2903
- const preOnboardPlugins = await syncBundledPlugins({
2901
+ const posthogPluginInstalled = (await syncBundledPlugins({
2904
2902
  openclawCommand,
2905
2903
  profile,
2906
2904
  stateDir,
2907
- plugins: managedBundledPlugins,
2908
- restartGateway: true
2909
- });
2910
- const posthogPluginInstalled = preOnboardPlugins.installedPluginIds.includes("posthog-analytics");
2911
- preOnboardSpinner?.message("Configuring gateway…");
2912
- await ensureGatewayModeLocal(openclawCommand, profile);
2913
- await ensureGatewayPort(openclawCommand, profile, gatewayPort);
2914
- if (preOnboardPlugins.installedPluginIds.length > 0) {
2915
- preOnboardSpinner?.message("Trusting managed plugins…");
2916
- await setOpenClawConfigJson({
2917
- openclawCommand,
2918
- profile,
2919
- key: "plugins.allow",
2920
- value: preOnboardPlugins.installedPluginIds,
2921
- errorMessage: "Failed to set plugins.allow for managed plugins."
2922
- });
2923
- await setOpenClawConfigJson({
2924
- openclawCommand,
2925
- profile,
2926
- key: "plugins.load.paths",
2927
- value: managedBundledPlugins.map((plugin) => normalizeFilesystemPath(path.join(stateDir, "extensions", plugin.sourceDirName))),
2928
- errorMessage: "Failed to set plugins.load.paths for managed plugins."
2929
- });
2930
- }
2905
+ plugins: managedBundledPlugins
2906
+ })).installedPluginIds.includes("posthog-analytics");
2931
2907
  preOnboardSpinner?.stop("Ready to onboard.");
2932
2908
  const onboardArgv = [
2933
2909
  "--profile",
2934
2910
  profile,
2935
2911
  "onboard",
2936
- "--install-daemon",
2912
+ ...daemonless ? [] : ["--install-daemon"],
2937
2913
  "--gateway-bind",
2938
2914
  "loopback",
2939
2915
  "--gateway-port",
@@ -2943,6 +2919,7 @@ async function bootstrapCommand(opts, runtime = defaultRuntime) {
2943
2919
  if (nonInteractive) onboardArgv.push("--non-interactive");
2944
2920
  if (denchCloudSelection.enabled) onboardArgv.push("--auth-choice", "skip");
2945
2921
  onboardArgv.push("--accept-risk", "--skip-ui");
2922
+ if (daemonless) onboardArgv.push("--skip-health");
2946
2923
  if (nonInteractive) await runOpenClawOrThrow({
2947
2924
  openclawCommand,
2948
2925
  args: onboardArgv,
@@ -2985,27 +2962,52 @@ async function bootstrapCommand(opts, runtime = defaultRuntime) {
2985
2962
  openclawCommand,
2986
2963
  profile,
2987
2964
  stateDir,
2988
- plugins: managedBundledPlugins,
2989
- restartGateway: true
2965
+ plugins: managedBundledPlugins
2990
2966
  });
2991
2967
  postOnboardSpinner?.message("Configuring subagent defaults…");
2992
2968
  await ensureSubagentDefaults(openclawCommand, profile);
2993
- postOnboardSpinner?.message("Probing gateway health…");
2994
- let gatewayProbe = await probeGateway(openclawCommand, profile, gatewayPort);
2969
+ let gatewayProbe;
2995
2970
  let gatewayAutoFix;
2996
- if (!gatewayProbe.ok) {
2997
- postOnboardSpinner?.message("Gateway unreachable, attempting auto-fix…");
2998
- gatewayAutoFix = await attemptGatewayAutoFix({
2999
- openclawCommand,
3000
- profile,
3001
- stateDir,
3002
- gatewayPort
3003
- });
3004
- gatewayProbe = gatewayAutoFix.finalProbe;
3005
- if (!gatewayProbe.ok && gatewayAutoFix.failureSummary) gatewayProbe = {
3006
- ...gatewayProbe,
3007
- detail: [gatewayProbe.detail, gatewayAutoFix.failureSummary].filter((value, index, self) => value && self.indexOf(value) === index).join(" | ")
3008
- };
2971
+ if (daemonless) gatewayProbe = {
2972
+ ok: true,
2973
+ detail: "skipped (daemonless)"
2974
+ };
2975
+ else {
2976
+ postOnboardSpinner?.message("Restarting gateway…");
2977
+ try {
2978
+ await runOpenClawOrThrow({
2979
+ openclawCommand,
2980
+ args: [
2981
+ "--profile",
2982
+ profile,
2983
+ "gateway",
2984
+ "restart"
2985
+ ],
2986
+ timeoutMs: 6e4,
2987
+ errorMessage: "Failed to restart gateway after config update."
2988
+ });
2989
+ } catch {}
2990
+ postOnboardSpinner?.message("Waiting for gateway…");
2991
+ gatewayProbe = await probeGateway(openclawCommand, profile, gatewayPort);
2992
+ for (let attempt = 0; attempt < 4 && !gatewayProbe.ok; attempt += 1) {
2993
+ await sleep(750);
2994
+ postOnboardSpinner?.message(`Probing gateway health (attempt ${attempt + 2}/5)…`);
2995
+ gatewayProbe = await probeGateway(openclawCommand, profile, gatewayPort);
2996
+ }
2997
+ if (!gatewayProbe.ok) {
2998
+ postOnboardSpinner?.message("Gateway unreachable, attempting auto-fix…");
2999
+ gatewayAutoFix = await attemptGatewayAutoFix({
3000
+ openclawCommand,
3001
+ profile,
3002
+ stateDir,
3003
+ gatewayPort
3004
+ });
3005
+ gatewayProbe = gatewayAutoFix.finalProbe;
3006
+ if (!gatewayProbe.ok && gatewayAutoFix.failureSummary) gatewayProbe = {
3007
+ ...gatewayProbe,
3008
+ detail: [gatewayProbe.detail, gatewayAutoFix.failureSummary].filter((value, index, self) => value && self.indexOf(value) === index).join(" | ")
3009
+ };
3010
+ }
3009
3011
  }
3010
3012
  const gatewayUrl = `ws://127.0.0.1:${gatewayPort}`;
3011
3013
  const preferredWebPort = parseOptionalPort$1(opts.webPort) ?? DEFAULT_WEB_APP_PORT;
@@ -3166,7 +3168,7 @@ async function runCommandWithRuntime(runtime, action, onError) {
3166
3168
  //#endregion
3167
3169
  //#region src/cli/program/register.bootstrap.ts
3168
3170
  function registerBootstrapCommand(program) {
3169
- program.command("bootstrap").description("Bootstrap DenchClaw on top of OpenClaw and open the web UI").option("--profile <name>", "Compatibility flag; non-dench values are ignored with a warning").option("--force-onboard", "Run onboarding even if config already exists", false).option("--non-interactive", "Skip prompts where possible", false).option("--yes", "Auto-approve install prompts", false).option("--skip-update", "Skip update prompt/check", false).option("--update-now", "Run OpenClaw update before onboarding", false).option("--gateway-port <port>", "Gateway port override for first-run onboarding").option("--web-port <port>", "Preferred web UI port (default: 3100)").option("--dench-cloud", "Configure Dench Cloud and skip OpenClaw provider onboarding", false).option("--dench-cloud-api-key <key>", "Dench Cloud API key for bootstrap-driven setup").option("--dench-cloud-model <id>", "Stable or public Dench Cloud model id to use as default").option("--dench-gateway-url <url>", "Override the Dench Cloud gateway base URL").option("--no-open", "Do not open the browser automatically").option("--json", "Output summary as JSON", false).addHelpText("after", () => `\n${theme.muted("Docs:")} ${formatDocsLink("/cli/onboard", "docs.openclaw.ai/cli/onboard")}\n`).action(async (opts) => {
3171
+ program.command("bootstrap").description("Bootstrap DenchClaw on top of OpenClaw and open the web UI").option("--profile <name>", "Compatibility flag; non-dench values are ignored with a warning").option("--force-onboard", "Run onboarding even if config already exists", false).option("--non-interactive", "Skip prompts where possible", false).option("--yes", "Auto-approve install prompts", false).option("--skip-update", "Skip update prompt/check", false).option("--update-now", "Run OpenClaw update before onboarding", false).option("--gateway-port <port>", "Gateway port override for first-run onboarding").option("--web-port <port>", "Preferred web UI port (default: 3100)").option("--dench-cloud", "Configure Dench Cloud and skip OpenClaw provider onboarding", false).option("--dench-cloud-api-key <key>", "Dench Cloud API key for bootstrap-driven setup").option("--dench-cloud-model <id>", "Stable or public Dench Cloud model id to use as default").option("--dench-gateway-url <url>", "Override the Dench Cloud gateway base URL").option("--skip-daemon-install", "Skip gateway daemon/service installation (for containers or environments without systemd/launchd)", false).option("--no-open", "Do not open the browser automatically").option("--json", "Output summary as JSON", false).addHelpText("after", () => `\n${theme.muted("Docs:")} ${formatDocsLink("/cli/onboard", "docs.openclaw.ai/cli/onboard")}\n`).action(async (opts) => {
3170
3172
  await runCommandWithRuntime(defaultRuntime, async () => {
3171
3173
  await bootstrapCommand({
3172
3174
  profile: opts.profile,
@@ -3181,6 +3183,7 @@ function registerBootstrapCommand(program) {
3181
3183
  denchCloudApiKey: opts.denchCloudApiKey,
3182
3184
  denchCloudModel: opts.denchCloudModel,
3183
3185
  denchGatewayUrl: opts.denchGatewayUrl,
3186
+ skipDaemonInstall: Boolean(opts.skipDaemonInstall),
3184
3187
  noOpen: Boolean(opts.open === false),
3185
3188
  json: Boolean(opts.json)
3186
3189
  });
@@ -3591,15 +3594,19 @@ async function updateWebRuntimeCommand(opts, runtime = defaultRuntime) {
3591
3594
  runtime
3592
3595
  });
3593
3596
  if (transition.isMajorTransition) await runOpenClawUpdateWithProgress(resolveOpenClawCommandOrThrow());
3597
+ const daemonless = isDaemonlessMode(opts);
3594
3598
  const selectedPort = parseOptionalPort(opts.webPort) ?? parseOptionalPort(previousManifest?.lastPort) ?? readLastKnownWebPort(stateDir) ?? DEFAULT_WEB_APP_PORT;
3595
3599
  const gatewayPort = resolveGatewayPort(stateDir);
3596
- if (process$1.platform === "darwin") uninstallWebRuntimeLaunchAgent();
3600
+ if (!daemonless && process$1.platform === "darwin") uninstallWebRuntimeLaunchAgent();
3597
3601
  const stopResult = await stopManagedWebRuntime({
3598
3602
  stateDir,
3599
3603
  port: selectedPort,
3600
3604
  includeLegacyStandalone: true
3601
3605
  });
3602
- const gatewayResult = await restartGatewayDaemon({
3606
+ const gatewayResult = daemonless ? {
3607
+ restarted: false,
3608
+ error: "skipped (daemonless)"
3609
+ } : await restartGatewayDaemon({
3603
3610
  profile,
3604
3611
  gatewayPort,
3605
3612
  json: Boolean(opts.json)
@@ -3614,7 +3621,7 @@ async function updateWebRuntimeCommand(opts, runtime = defaultRuntime) {
3614
3621
  denchVersion: VERSION,
3615
3622
  port: selectedPort,
3616
3623
  gatewayPort,
3617
- startFn: process$1.platform === "darwin" ? (p) => installWebRuntimeLaunchAgent(p) : void 0
3624
+ startFn: !daemonless && process$1.platform === "darwin" ? (p) => installWebRuntimeLaunchAgent(p) : void 0
3618
3625
  });
3619
3626
  const summary = {
3620
3627
  profile,
@@ -3630,7 +3637,7 @@ async function updateWebRuntimeCommand(opts, runtime = defaultRuntime) {
3630
3637
  ready: ensureResult.ready,
3631
3638
  reason: ensureResult.reason,
3632
3639
  gatewayRestarted: gatewayResult.restarted,
3633
- gatewayError: gatewayResult.error,
3640
+ gatewayError: daemonless ? void 0 : gatewayResult.error,
3634
3641
  skillSync: skillSyncResult
3635
3642
  };
3636
3643
  if (!opts.json) {
@@ -3639,7 +3646,8 @@ async function updateWebRuntimeCommand(opts, runtime = defaultRuntime) {
3639
3646
  runtime.log(`Profile: ${profile}`);
3640
3647
  runtime.log(`Version: ${VERSION}`);
3641
3648
  runtime.log(`Web port: ${selectedPort}`);
3642
- runtime.log(`Gateway: ${summary.gatewayRestarted ? "restarted" : "restart failed"}`);
3649
+ if (daemonless) runtime.log(`Gateway: skipped (daemonless mode)`);
3650
+ else runtime.log(`Gateway: ${summary.gatewayRestarted ? "restarted" : "restart failed"}`);
3643
3651
  if (summary.gatewayError) runtime.log(theme.warn(`Gateway error: ${summary.gatewayError}`));
3644
3652
  runtime.log(`Stopped web processes: ${summary.stoppedPids.length}`);
3645
3653
  if (summary.skippedForeignPids.length > 0) runtime.log(theme.warn(`Skipped non-Dench listeners on ${selectedPort}: ${summary.skippedForeignPids.join(", ")}`));
@@ -3663,7 +3671,7 @@ async function stopWebRuntimeCommand(opts, runtime = defaultRuntime) {
3663
3671
  if (appliedProfile.warning && !opts.json) runtime.log(theme.warn(appliedProfile.warning));
3664
3672
  const stateDir = resolveProfileStateDir(profile);
3665
3673
  const selectedPort = parseOptionalPort(opts.webPort) ?? readLastKnownWebPort(stateDir);
3666
- if (process$1.platform === "darwin") uninstallWebRuntimeLaunchAgent();
3674
+ if (!isDaemonlessMode(opts) && process$1.platform === "darwin") uninstallWebRuntimeLaunchAgent();
3667
3675
  const stopResult = await stopManagedWebRuntime({
3668
3676
  stateDir,
3669
3677
  port: selectedPort,
@@ -3694,23 +3702,27 @@ async function startWebRuntimeCommand(opts, runtime = defaultRuntime, label = "s
3694
3702
  const appliedProfile = applyCliProfileEnv({ profile: opts.profile });
3695
3703
  const profile = appliedProfile.effectiveProfile;
3696
3704
  if (appliedProfile.warning && !opts.json) runtime.log(theme.warn(appliedProfile.warning));
3705
+ const daemonless = isDaemonlessMode(opts);
3697
3706
  const stateDir = resolveProfileStateDir(profile);
3698
3707
  const selectedPort = parseOptionalPort(opts.webPort) ?? readLastKnownWebPort(stateDir);
3699
3708
  const gatewayPort = resolveGatewayPort(stateDir);
3700
- if (process$1.platform === "darwin") uninstallWebRuntimeLaunchAgent();
3709
+ if (!daemonless && process$1.platform === "darwin") uninstallWebRuntimeLaunchAgent();
3701
3710
  const stopResult = await stopManagedWebRuntime({
3702
3711
  stateDir,
3703
3712
  port: selectedPort,
3704
3713
  includeLegacyStandalone: true
3705
3714
  });
3706
3715
  if (stopResult.skippedForeignPids.length > 0) throw new Error(`Cannot start on ${selectedPort}; non-Dench listener(s) still own the port: ${stopResult.skippedForeignPids.join(", ")}`);
3707
- const gatewayResult = await restartGatewayDaemon({
3716
+ const gatewayResult = daemonless ? {
3717
+ restarted: false,
3718
+ error: "skipped (daemonless)"
3719
+ } : await restartGatewayDaemon({
3708
3720
  profile,
3709
3721
  gatewayPort,
3710
3722
  json: Boolean(opts.json)
3711
3723
  });
3712
3724
  let startResult;
3713
- if (process$1.platform === "darwin") {
3725
+ if (!daemonless && process$1.platform === "darwin") {
3714
3726
  startResult = installWebRuntimeLaunchAgent({
3715
3727
  stateDir,
3716
3728
  port: selectedPort,
@@ -3739,7 +3751,7 @@ async function startWebRuntimeCommand(opts, runtime = defaultRuntime, label = "s
3739
3751
  started: probe.ok,
3740
3752
  reason: probe.reason,
3741
3753
  gatewayRestarted: gatewayResult.restarted,
3742
- gatewayError: gatewayResult.error
3754
+ gatewayError: daemonless ? void 0 : gatewayResult.error
3743
3755
  };
3744
3756
  if (opts.json) {
3745
3757
  runtime.log(JSON.stringify(summary, null, 2));
@@ -3749,7 +3761,8 @@ async function startWebRuntimeCommand(opts, runtime = defaultRuntime, label = "s
3749
3761
  runtime.log(theme.heading(`Dench web ${label}`));
3750
3762
  runtime.log(`Profile: ${profile}`);
3751
3763
  runtime.log(`Web port: ${selectedPort}`);
3752
- runtime.log(`Gateway: ${summary.gatewayRestarted ? "restarted" : "restart failed"}`);
3764
+ if (daemonless) runtime.log(`Gateway: skipped (daemonless mode)`);
3765
+ else runtime.log(`Gateway: ${summary.gatewayRestarted ? "restarted" : "restart failed"}`);
3753
3766
  if (summary.gatewayError) runtime.log(theme.warn(`Gateway error: ${summary.gatewayError}`));
3754
3767
  runtime.log(`Restarted managed web runtime: ${summary.started ? "yes" : "no"}`);
3755
3768
  if (!summary.started) runtime.log(theme.warn(summary.reason));
@@ -3766,12 +3779,13 @@ async function startWebRuntimeCommand(opts, runtime = defaultRuntime, label = "s
3766
3779
  //#endregion
3767
3780
  //#region src/cli/program/register.restart.ts
3768
3781
  function registerRestartCommand(program) {
3769
- program.command("restart").description("Restart Dench managed web runtime (stop then start)").option("--profile <name>", "Compatibility flag; non-dench values are ignored with a warning").option("--web-port <port>", "Web runtime port override").option("--no-open", "Do not open the browser automatically").option("--json", "Output summary as JSON", false).action(async (opts) => {
3782
+ program.command("restart").description("Restart Dench managed web runtime (stop then start)").option("--profile <name>", "Compatibility flag; non-dench values are ignored with a warning").option("--web-port <port>", "Web runtime port override").option("--no-open", "Do not open the browser automatically").option("--skip-daemon-install", "Skip gateway daemon/service management (for containers or environments without systemd/launchd)", false).option("--json", "Output summary as JSON", false).action(async (opts) => {
3770
3783
  await runCommandWithRuntime(defaultRuntime, async () => {
3771
3784
  await restartWebRuntimeCommand({
3772
3785
  profile: opts.profile,
3773
3786
  webPort: opts.webPort,
3774
3787
  noOpen: Boolean(opts.open === false),
3788
+ skipDaemonInstall: Boolean(opts.skipDaemonInstall),
3775
3789
  json: Boolean(opts.json)
3776
3790
  });
3777
3791
  });
@@ -3781,12 +3795,13 @@ function registerRestartCommand(program) {
3781
3795
  //#endregion
3782
3796
  //#region src/cli/program/register.start.ts
3783
3797
  function registerStartCommand(program) {
3784
- program.command("start").description("Start Dench managed web runtime without updating assets").option("--profile <name>", "Compatibility flag; non-dench values are ignored with a warning").option("--web-port <port>", "Web runtime port override").option("--no-open", "Do not open the browser automatically").option("--json", "Output summary as JSON", false).action(async (opts) => {
3798
+ program.command("start").description("Start Dench managed web runtime without updating assets").option("--profile <name>", "Compatibility flag; non-dench values are ignored with a warning").option("--web-port <port>", "Web runtime port override").option("--no-open", "Do not open the browser automatically").option("--skip-daemon-install", "Skip gateway daemon/service management (for containers or environments without systemd/launchd)", false).option("--json", "Output summary as JSON", false).action(async (opts) => {
3785
3799
  await runCommandWithRuntime(defaultRuntime, async () => {
3786
3800
  await startWebRuntimeCommand({
3787
3801
  profile: opts.profile,
3788
3802
  webPort: opts.webPort,
3789
3803
  noOpen: Boolean(opts.open === false),
3804
+ skipDaemonInstall: Boolean(opts.skipDaemonInstall),
3790
3805
  json: Boolean(opts.json)
3791
3806
  });
3792
3807
  });
@@ -3796,11 +3811,12 @@ function registerStartCommand(program) {
3796
3811
  //#endregion
3797
3812
  //#region src/cli/program/register.stop.ts
3798
3813
  function registerStopCommand(program) {
3799
- program.command("stop").description("Stop Dench managed web runtime on the configured port").option("--profile <name>", "Compatibility flag; non-dench values are ignored with a warning").option("--web-port <port>", "Web runtime port override").option("--json", "Output summary as JSON", false).action(async (opts) => {
3814
+ program.command("stop").description("Stop Dench managed web runtime on the configured port").option("--profile <name>", "Compatibility flag; non-dench values are ignored with a warning").option("--web-port <port>", "Web runtime port override").option("--skip-daemon-install", "Skip gateway daemon/service management (for containers or environments without systemd/launchd)", false).option("--json", "Output summary as JSON", false).action(async (opts) => {
3800
3815
  await runCommandWithRuntime(defaultRuntime, async () => {
3801
3816
  await stopWebRuntimeCommand({
3802
3817
  profile: opts.profile,
3803
3818
  webPort: opts.webPort,
3819
+ skipDaemonInstall: Boolean(opts.skipDaemonInstall),
3804
3820
  json: Boolean(opts.json)
3805
3821
  });
3806
3822
  });
@@ -3855,7 +3871,7 @@ function registerTelemetryCommand(program) {
3855
3871
  //#endregion
3856
3872
  //#region src/cli/program/register.update.ts
3857
3873
  function registerUpdateCommand(program) {
3858
- program.command("update").description("Update Dench managed web runtime without onboarding").option("--profile <name>", "Compatibility flag; non-dench values are ignored with a warning").option("--web-port <port>", "Web runtime port override").option("--non-interactive", "Fail instead of prompting for major-gate approval", false).option("--yes", "Approve mandatory major-gate OpenClaw update", false).option("--no-open", "Do not open the browser automatically").option("--json", "Output summary as JSON", false).action(async (opts) => {
3874
+ program.command("update").description("Update Dench managed web runtime without onboarding").option("--profile <name>", "Compatibility flag; non-dench values are ignored with a warning").option("--web-port <port>", "Web runtime port override").option("--non-interactive", "Fail instead of prompting for major-gate approval", false).option("--yes", "Approve mandatory major-gate OpenClaw update", false).option("--no-open", "Do not open the browser automatically").option("--skip-daemon-install", "Skip gateway daemon/service management (for containers or environments without systemd/launchd)", false).option("--json", "Output summary as JSON", false).action(async (opts) => {
3859
3875
  await runCommandWithRuntime(defaultRuntime, async () => {
3860
3876
  await updateWebRuntimeCommand({
3861
3877
  profile: opts.profile,
@@ -3863,6 +3879,7 @@ function registerUpdateCommand(program) {
3863
3879
  nonInteractive: Boolean(opts.nonInteractive),
3864
3880
  yes: Boolean(opts.yes),
3865
3881
  noOpen: Boolean(opts.open === false),
3882
+ skipDaemonInstall: Boolean(opts.skipDaemonInstall),
3866
3883
  json: Boolean(opts.json)
3867
3884
  });
3868
3885
  });
@@ -1,5 +1,5 @@
1
- import { c as getCommandPath, d as hasHelpOrVersion, l as getPrimaryCommand, n as normalizeEnv, s as normalizeWindowsArgv, t as isTruthyEnvValue } from "./entry.js";
2
- import { n as resolveCliName, r as emitCliBanner } from "./cli-name-DHxeNaoC.js";
1
+ import { c as normalizeWindowsArgv, f as hasHelpOrVersion, l as getCommandPath, n as normalizeEnv, t as isTruthyEnvValue, u as getPrimaryCommand } from "./entry.js";
2
+ import { n as resolveCliName, r as emitCliBanner } from "./cli-name-CoW7mNz-.js";
3
3
  import { t as VERSION } from "./version-DfFmvCFM.js";
4
4
  import { spawn } from "node:child_process";
5
5
  import process$1 from "node:process";
@@ -220,7 +220,7 @@ async function runCli(argv = process$1.argv) {
220
220
  process$1.exitCode = await delegateToGlobalOpenClaw(parseArgv);
221
221
  return;
222
222
  }
223
- const { buildProgram } = await import("./program-DSRyK_2o.js");
223
+ const { buildProgram } = await import("./program-CLbWyFKO.js");
224
224
  await buildProgram().parseAsync(parseArgv);
225
225
  }
226
226
 
@@ -1,4 +1,4 @@
1
- import { i as resolveStateDir } from "./entry.js";
1
+ import { a as resolveStateDir } from "./entry.js";
2
2
  import { n as resolveOpenClawVersion, t as VERSION } from "./version-DfFmvCFM.js";
3
3
  import { createRequire } from "node:module";
4
4
  import { dirname, join } from "node:path";
@@ -1,3 +1,3 @@
1
1
  export const POSTHOG_KEY = "phc_Nt8s1Ny8062TY9aKT8LWiB4nBuoHNYQXRU9MypWfQCW";
2
- export const DENCHCLAW_VERSION = "2.3.3";
2
+ export const DENCHCLAW_VERSION = "2.3.5";
3
3
  export const OPENCLAW_VERSION = "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "denchclaw",
3
- "version": "2.3.3",
3
+ "version": "2.3.5",
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",