@bitseek/claw 1.2.2 → 1.2.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 (119) hide show
  1. package/dist/{agents-BMaMDR6h.js → agents-BCJbDk2P.js} +4 -4
  2. package/dist/{agents.config-BSY7Z6IC.js → agents.config-DQBEXhzA.js} +1 -1
  3. package/dist/{agents.config-Bjwf3eo1.js → agents.config-DoxV5m9v.js} +1 -1
  4. package/dist/{auth-choice-BYuegxlw.js → auth-choice-CP6K5htW.js} +1 -1
  5. package/dist/{auth-choice-BpOvsd_n.js → auth-choice-CdsMUqKA.js} +1 -1
  6. package/dist/{banner-EymX6IpH.js → banner-V_1v329B.js} +1 -1
  7. package/dist/build-info.json +3 -3
  8. package/dist/bundled/boot-md/handler.js +1 -1
  9. package/dist/bundled/session-memory/handler.js +1 -1
  10. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  11. package/dist/canvas-host/a2ui/a2ui.bundle.js +6027 -1405
  12. package/dist/{channel-options-bD8Nb_XT.js → channel-options-Bnnem_wD.js} +1 -1
  13. package/dist/{channel-options-BbugzQSv.js → channel-options-Dsjb-V1F.js} +1 -1
  14. package/dist/{channel-web-BzKDism5.js → channel-web-KY6EP9HT.js} +1 -1
  15. package/dist/{channel-web-C8R11QOm.js → channel-web-wuxrfEJh.js} +1 -1
  16. package/dist/{channels-cli-DLh8uOwf.js → channels-cli-OZeQkPMG.js} +6 -6
  17. package/dist/{channels-cli-B6ICcQiX.js → channels-cli-tJkvzsqO.js} +6 -6
  18. package/dist/{cli-BT1aLbEG.js → cli-DOS1lPNs.js} +1 -1
  19. package/dist/{cli-dy2BdjPZ.js → cli-YeYpjq2c.js} +1 -1
  20. package/dist/{command-registry-oV1633Vs.js → command-registry-KxdBw74g.js} +9 -9
  21. package/dist/{completion-cli-C9i-Dicb.js → completion-cli-Cfp2m1Sy.js} +2 -2
  22. package/dist/{completion-cli-5z7Fk2X-.js → completion-cli-DU3T8Tur.js} +1 -1
  23. package/dist/{config-cli-CENkfh8B.js → config-cli-DZpbwWvz.js} +1 -1
  24. package/dist/{config-cli-CpsK8BqN.js → config-cli-hwawfBlS.js} +1 -1
  25. package/dist/{configure-boTkhg01.js → configure-CLMtWGiL.js} +3 -3
  26. package/dist/{configure-DcXrqefi.js → configure-l-lM74c1.js} +3 -3
  27. package/dist/control-ui/assets/{index-DmJK8e2M.js → index-CKSSOzJL.js} +116 -116
  28. package/dist/control-ui/assets/{index-DmJK8e2M.js.map → index-CKSSOzJL.js.map} +1 -1
  29. package/dist/control-ui/assets/index-Ck63PFX9.css +1 -0
  30. package/dist/control-ui/index.html +2 -2
  31. package/dist/{doctor-completion-BwIgzkLP.js → doctor-completion-AraQfpv2.js} +1 -1
  32. package/dist/{doctor-completion-BySkhMZY.js → doctor-completion-B6_JtN22.js} +1 -1
  33. package/dist/entry.js +2 -2
  34. package/dist/extensionAPI.js +1 -1
  35. package/dist/{gateway-cli-BVn-fVbw.js → gateway-cli-C6G3qMkR.js} +8 -8
  36. package/dist/{gateway-cli-Dn-Yq6Tf.js → gateway-cli-CX2HA_sy.js} +8 -8
  37. package/dist/{health-Du4IbXAP.js → health-CDEXWvnu.js} +1 -1
  38. package/dist/{health-DmJq2Wph.js → health-Du8dO3vn.js} +1 -1
  39. package/dist/{hooks-cli-BhSZV-cM.js → hooks-cli-DUIQuGjr.js} +2 -2
  40. package/dist/{hooks-cli-BrT4aprv.js → hooks-cli-Deo01lF6.js} +2 -2
  41. package/dist/index.js +6 -6
  42. package/dist/llm-slug-generator.js +1 -1
  43. package/dist/{models-BEMBo-jJ.js → models-CgguB_MH.js} +2 -2
  44. package/dist/{models-cli-Bj5d7qpe.js → models-cli-BEb0DHSP.js} +3 -3
  45. package/dist/{models-cli-CJCNoVhQ.js → models-cli-CHUbcM_y.js} +2 -2
  46. package/dist/{npm-resolution-BHQDGwrV.js → npm-resolution-Dv7nYiaP.js} +1 -1
  47. package/dist/{npm-resolution-DyqMvaHn.js → npm-resolution-T8SphiP5.js} +1 -1
  48. package/dist/{onboard-CUFDJWvM.js → onboard-D66uwNCb.js} +2 -2
  49. package/dist/{onboard-DpLm6YX6.js → onboard-DcI-IxL0.js} +2 -2
  50. package/dist/{onboard-channels-i1FFoaW7.js → onboard-channels-BLZ8FdVP.js} +1 -1
  51. package/dist/{onboard-channels-CrxnmwMd.js → onboard-channels-CRpmgX82.js} +1 -1
  52. package/dist/{onboarding-ORzDCBo6.js → onboarding-CZCgESNI.js} +3 -3
  53. package/dist/{onboarding-Wve1--YA.js → onboarding-Dae6N665.js} +3 -3
  54. package/dist/{onboarding.finalize-BoXDIiNp.js → onboarding.finalize-ANKeWCQe.js} +5 -5
  55. package/dist/{onboarding.finalize-DH8INVdN.js → onboarding.finalize-B8nYvA0i.js} +6 -6
  56. package/dist/{pi-embedded-DDt-4VY9.js → pi-embedded-Claxav22.js} +30 -2
  57. package/dist/{pi-embedded-DnavjoU4.js → pi-embedded-DKX65Hec.js} +30 -2
  58. package/dist/{plugin-registry-eOikaO9b.js → plugin-registry-CxFikiLF.js} +1 -1
  59. package/dist/{plugin-registry-CFL5j9cN.js → plugin-registry-TOEmbMc4.js} +1 -1
  60. package/dist/plugin-sdk/{channel-web-MpDUG9SU.js → channel-web-O79O_ah6.js} +1 -1
  61. package/dist/plugin-sdk/index.js +2 -2
  62. package/dist/plugin-sdk/{reply-wHFXod4j.js → reply-YZQvouuF.js} +30 -2
  63. package/dist/plugin-sdk/{web-DbkpdVSZ.js → web-jmxdxo0H.js} +2 -2
  64. package/dist/{plugins-cli-DrlRj_8V.js → plugins-cli-Clo_uyvq.js} +2 -2
  65. package/dist/{plugins-cli-Bg6sFJYH.js → plugins-cli-bHHZzKd-.js} +2 -2
  66. package/dist/{program-BQ8WwHMi.js → program-DSOHn27G.js} +7 -7
  67. package/dist/{program-context-BWsBkMJn.js → program-context-DfYJPL5N.js} +17 -17
  68. package/dist/{prompt-select-styled-CLCyaJAG.js → prompt-select-styled-B2izefsj.js} +4 -4
  69. package/dist/{prompt-select-styled-DbUQHcBh.js → prompt-select-styled-DG7woZ0E.js} +4 -4
  70. package/dist/{provider-auth-helpers-CKpEFImN.js → provider-auth-helpers-BFsLtU8g.js} +1 -1
  71. package/dist/{provider-auth-helpers-CdTLpxG1.js → provider-auth-helpers-D_akOb8A.js} +1 -1
  72. package/dist/{push-apns-CVnc3jrx.js → push-apns-BSlKJa83.js} +1 -1
  73. package/dist/{push-apns-B_GGZO2Z.js → push-apns-DvNRo3EQ.js} +1 -1
  74. package/dist/{register.agent-BxMqGoLQ.js → register.agent-C-OmdJMe.js} +7 -7
  75. package/dist/{register.agent-BwCayvbD.js → register.agent-DowGjvNc.js} +6 -6
  76. package/dist/{register.configure-Bv4KP_MD.js → register.configure-BZLa_c3k.js} +7 -7
  77. package/dist/{register.configure-PCuADy_e.js → register.configure-CaSRlI6h.js} +7 -7
  78. package/dist/{register.maintenance-CW5_urTq.js → register.maintenance-CQivhR8Y.js} +8 -8
  79. package/dist/{register.maintenance-jHaU-XSR.js → register.maintenance-DyTduYA4.js} +7 -7
  80. package/dist/{register.message-ByUxZi3s.js → register.message-5hKmcWaB.js} +2 -2
  81. package/dist/{register.message-DPlqIVvv.js → register.message-DE-eKss6.js} +2 -2
  82. package/dist/{register.onboard-B-8WoYZr.js → register.onboard-BRBPNENF.js} +2 -2
  83. package/dist/{register.onboard-BC4wpDdz.js → register.onboard-CWX2zarB.js} +2 -2
  84. package/dist/{register.setup-BQQX0yB6.js → register.setup-DwZL0RXc.js} +2 -2
  85. package/dist/{register.setup-CZ9a3M_O.js → register.setup-YcxKWN94.js} +2 -2
  86. package/dist/{register.status-health-sessions-BRJgE7jh.js → register.status-health-sessions-Cbva8fTK.js} +3 -3
  87. package/dist/{register.status-health-sessions-BKLWh2aq.js → register.status-health-sessions-lOM_lb6H.js} +3 -3
  88. package/dist/{register.subclis-DKG1KoTd.js → register.subclis-CEq4Db2Q.js} +9 -9
  89. package/dist/{reply-ezOUjaUp.js → reply-D8Yu6-Ie.js} +31 -2
  90. package/dist/{run-main-CGAXqlRX.js → run-main-BoenTqTz.js} +14 -14
  91. package/dist/{server-node-events-BHkXD38g.js → server-node-events-nakjzVDn.js} +2 -2
  92. package/dist/{server-node-events-D_9Quh-1.js → server-node-events-yFZiE04b.js} +2 -2
  93. package/dist/{status-DjnNnvyr.js → status-CQYA6EJN.js} +2 -2
  94. package/dist/{status-CwKeOASs.js → status-mS4bWnIW.js} +2 -2
  95. package/dist/{subagent-registry-CfKMgII6.js → subagent-registry-CXBreqUP.js} +31 -2
  96. package/dist/{update-cli-BCH7o0oB.js → update-cli-CuKW0N9W.js} +11 -7
  97. package/dist/{update-cli-Dcvb1LZT.js → update-cli-D1B0Vytl.js} +12 -8
  98. package/dist/{update-runner-l9K_q6Kz.js → update-runner-C9noXbfV.js} +10 -3
  99. package/dist/{update-runner-rrlmopJw.js → update-runner-DO6RodZW.js} +10 -3
  100. package/dist/{web-CsfqGSAa.js → web-BKrNiKsU.js} +2 -2
  101. package/dist/{web-C9QAX9EH.js → web-DJKitOpu.js} +1 -1
  102. package/dist/{web-CtrUXk94.js → web-DbdjX4Hg.js} +2 -2
  103. package/dist/{web-BJ_nNwKp.js → web-V1uGLepo.js} +1 -1
  104. package/extensions/diagnostics-otel/node_modules/.bin/acorn +21 -0
  105. package/extensions/googlechat/node_modules/.bin/nlc +21 -0
  106. package/extensions/googlechat/node_modules/.bin/node-llama-cpp +21 -0
  107. package/extensions/googlechat/node_modules/.bin/openclaw +2 -2
  108. package/extensions/googlechat/node_modules/.bin/tsc +21 -0
  109. package/extensions/googlechat/node_modules/.bin/tsserver +21 -0
  110. package/extensions/memory-core/node_modules/.bin/nlc +21 -0
  111. package/extensions/memory-core/node_modules/.bin/node-llama-cpp +21 -0
  112. package/extensions/memory-core/node_modules/.bin/openclaw +2 -2
  113. package/extensions/memory-core/node_modules/.bin/tsc +21 -0
  114. package/extensions/memory-core/node_modules/.bin/tsserver +21 -0
  115. package/extensions/memory-lancedb/node_modules/.bin/arrow2csv +21 -0
  116. package/extensions/nostr/node_modules/.bin/tsc +21 -0
  117. package/extensions/nostr/node_modules/.bin/tsserver +21 -0
  118. package/package.json +2 -5
  119. package/dist/control-ui/assets/index-B5WC_0Be.css +0 -1
@@ -2,7 +2,7 @@ import "./paths-BYr-iJJ9.js";
2
2
  import { f as isRich, n as info, p as theme, s as setVerbose } from "./globals-uLeGcRW1.js";
3
3
  import "./utils-CP51tiAi.js";
4
4
  import "./thinking-44rmAw5o.js";
5
- import { S as classifySessionKey, k as resolveSessionModelRef, qt as lookupContextTokens } from "./reply-ezOUjaUp.js";
5
+ import { S as classifySessionKey, k as resolveSessionModelRef, qt as lookupContextTokens } from "./reply-D8Yu6-Ie.js";
6
6
  import { d as resolveDefaultAgentId, r as listAgentIds } from "./agent-scope-CiBV1K6b.js";
7
7
  import { d as defaultRuntime } from "./subsystem-BT74-yyS.js";
8
8
  import { T as parseAgentSessionKey, c as normalizeAgentId } from "./session-key-C9z4VQtw.js";
@@ -131,8 +131,8 @@ import "./service-DqxfCr8y.js";
131
131
  import "./diagnostics-BHQgZbuI.js";
132
132
  import "./table-DZBPnHSy.js";
133
133
  import "./audit-1YVlVmk7.js";
134
- import { t as statusCommand } from "./status-DjnNnvyr.js";
135
- import { r as healthCommand } from "./health-DmJq2Wph.js";
134
+ import { t as statusCommand } from "./status-CQYA6EJN.js";
135
+ import { r as healthCommand } from "./health-Du8dO3vn.js";
136
136
  import "./status.update-HwSPC5ZX.js";
137
137
  import "./channel-account-context-C6rIxLzo.js";
138
138
  import "./node-command-policy-BKUs_pS2.js";
@@ -31,7 +31,7 @@ import "./accounts-DTfEeXyO.js";
31
31
  import "./bindings-Hx6KNJeg.js";
32
32
  import "./send-Cpaj_bKB.js";
33
33
  import "./send-BpXRh0BM.js";
34
- import "./subagent-registry-CfKMgII6.js";
34
+ import "./subagent-registry-CXBreqUP.js";
35
35
  import { n as resolveSessionFilePath, r as resolveSessionFilePathOptions } from "./paths-CTtLmER4.js";
36
36
  import "./chat-envelope-D3RSz140.js";
37
37
  import "./client-BvL3EdiZ.js";
@@ -130,8 +130,8 @@ import "./service-Bjqlh_fF.js";
130
130
  import "./diagnostics-ABz8E7c-.js";
131
131
  import "./table-CqULNDay.js";
132
132
  import "./audit-Bgu8Ommg.js";
133
- import { n as statusCommand } from "./status-CwKeOASs.js";
134
- import { r as healthCommand } from "./health-Du4IbXAP.js";
133
+ import { n as statusCommand } from "./status-mS4bWnIW.js";
134
+ import { r as healthCommand } from "./health-CDEXWvnu.js";
135
135
  import "./status.update-YC9VNJxl.js";
136
136
  import "./channel-account-context-BV3Q0XnD.js";
137
137
  import "./node-command-policy-pJ6IPNBA.js";
@@ -65,7 +65,7 @@ const entries = [
65
65
  description: "Run, inspect, and query the WebSocket Gateway",
66
66
  hasSubcommands: true,
67
67
  register: async (program) => {
68
- (await import("./gateway-cli-Dn-Yq6Tf.js")).registerGatewayCli(program);
68
+ (await import("./gateway-cli-CX2HA_sy.js")).registerGatewayCli(program);
69
69
  }
70
70
  },
71
71
  {
@@ -97,7 +97,7 @@ const entries = [
97
97
  description: "Discover, scan, and configure models",
98
98
  hasSubcommands: true,
99
99
  register: async (program) => {
100
- (await import("./models-cli-Bj5d7qpe.js")).registerModelsCli(program);
100
+ (await import("./models-cli-BEb0DHSP.js")).registerModelsCli(program);
101
101
  }
102
102
  },
103
103
  {
@@ -177,7 +177,7 @@ const entries = [
177
177
  description: "Manage internal agent hooks",
178
178
  hasSubcommands: true,
179
179
  register: async (program) => {
180
- (await import("./hooks-cli-BrT4aprv.js")).registerHooksCli(program);
180
+ (await import("./hooks-cli-Deo01lF6.js")).registerHooksCli(program);
181
181
  }
182
182
  },
183
183
  {
@@ -209,7 +209,7 @@ const entries = [
209
209
  description: "Secure DM pairing (approve inbound requests)",
210
210
  hasSubcommands: true,
211
211
  register: async (program) => {
212
- const { registerPluginCliCommands } = await import("./cli-dy2BdjPZ.js");
212
+ const { registerPluginCliCommands } = await import("./cli-YeYpjq2c.js");
213
213
  registerPluginCliCommands(program, await loadConfig());
214
214
  (await import("./pairing-cli-DiKgOlKC.js")).registerPairingCli(program);
215
215
  }
@@ -219,8 +219,8 @@ const entries = [
219
219
  description: "Manage OpenClaw plugins and extensions",
220
220
  hasSubcommands: true,
221
221
  register: async (program) => {
222
- (await import("./plugins-cli-Bg6sFJYH.js")).registerPluginsCli(program);
223
- const { registerPluginCliCommands } = await import("./cli-dy2BdjPZ.js");
222
+ (await import("./plugins-cli-bHHZzKd-.js")).registerPluginsCli(program);
223
+ const { registerPluginCliCommands } = await import("./cli-YeYpjq2c.js");
224
224
  registerPluginCliCommands(program, await loadConfig());
225
225
  }
226
226
  },
@@ -229,7 +229,7 @@ const entries = [
229
229
  description: "Manage connected chat channels (Telegram, Discord, etc.)",
230
230
  hasSubcommands: true,
231
231
  register: async (program) => {
232
- (await import("./channels-cli-DLh8uOwf.js")).registerChannelsCli(program);
232
+ (await import("./channels-cli-OZeQkPMG.js")).registerChannelsCli(program);
233
233
  }
234
234
  },
235
235
  {
@@ -269,7 +269,7 @@ const entries = [
269
269
  description: "Update OpenClaw and inspect update channel status",
270
270
  hasSubcommands: true,
271
271
  register: async (program) => {
272
- (await import("./update-cli-Dcvb1LZT.js")).registerUpdateCli(program);
272
+ (await import("./update-cli-D1B0Vytl.js")).registerUpdateCli(program);
273
273
  }
274
274
  },
275
275
  {
@@ -277,7 +277,7 @@ const entries = [
277
277
  description: "Generate shell completion script",
278
278
  hasSubcommands: false,
279
279
  register: async (program) => {
280
- (await import("./completion-cli-C9i-Dicb.js").then((n) => n.n)).registerCompletionCli(program);
280
+ (await import("./completion-cli-Cfp2m1Sy.js").then((n) => n.n)).registerCompletionCli(program);
281
281
  }
282
282
  }
283
283
  ];
@@ -119,6 +119,7 @@ import { r as resolveMemorySearchConfig } from "./manager-C9rftBaE.js";
119
119
  import { i as parseAbsoluteTimeMs, r as resolveDefaultCronStaggerMs, t as normalizeCronStaggerMs } from "./stagger-C-R8Eo-4.js";
120
120
  import { f as resolveGatewaySystemdServiceName, l as resolveGatewayLaunchAgentLabel } from "./constants-DywKPp3i.js";
121
121
  import { t as parseTimeoutMs } from "./parse-timeout-CUbpb4wv.js";
122
+ import { o as BITSEEK_PROVIDER_ID } from "./constants-BJiQF5Ae.js";
122
123
  import { a as resolveContextWindowInfo, i as resolveContextWindowHardMinTokens, n as CONTEXT_WINDOW_WARN_BELOW_TOKENS, r as evaluateContextWindowGuard } from "./context-window-guard-BNuaId5E.js";
123
124
  import { createRequire } from "node:module";
124
125
  import { fileURLToPath } from "node:url";
@@ -35983,7 +35984,7 @@ function createOutboundSendDepsFromCliSource(deps) {
35983
35984
  function createDefaultDeps() {
35984
35985
  return {
35985
35986
  sendMessageWhatsApp: async (...args) => {
35986
- const { sendMessageWhatsApp } = await import("./web-CtrUXk94.js");
35987
+ const { sendMessageWhatsApp } = await import("./web-DbdjX4Hg.js");
35987
35988
  return await sendMessageWhatsApp(...args);
35988
35989
  },
35989
35990
  sendMessageTelegram: async (...args) => {
@@ -56688,7 +56689,7 @@ function loadWebLoginQr() {
56688
56689
  return webLoginQrPromise;
56689
56690
  }
56690
56691
  function loadWebChannel() {
56691
- webChannelPromise ??= import("./web-CtrUXk94.js");
56692
+ webChannelPromise ??= import("./web-DbdjX4Hg.js");
56692
56693
  return webChannelPromise;
56693
56694
  }
56694
56695
  function loadWhatsAppActions() {
@@ -72748,6 +72749,30 @@ function createOpenAIDefaultTransportWrapper(baseStreamFn) {
72748
72749
  });
72749
72750
  };
72750
72751
  }
72752
+ function isManagedCustomOpenAiProvider(cfg, provider) {
72753
+ const providers = cfg?.models?.providers;
72754
+ if (!providers) return false;
72755
+ const normalizedProvider = normalizeProviderId(provider);
72756
+ for (const [providerId, providerConfig] of Object.entries(providers)) {
72757
+ if (normalizeProviderId(providerId) !== normalizedProvider) continue;
72758
+ if (normalizeProviderId(providerId) === BITSEEK_PROVIDER_ID) return false;
72759
+ if (providerConfig?.api !== "openai-completions") return false;
72760
+ if (typeof providerConfig.baseUrl !== "string" || !providerConfig.baseUrl.trim()) return false;
72761
+ if (!Array.isArray(providerConfig.models)) return false;
72762
+ return providerConfig.models.some((model) => typeof model?.id === "string" && model.id.trim());
72763
+ }
72764
+ return false;
72765
+ }
72766
+ function createUserAgentStripWrapper(baseStreamFn) {
72767
+ const underlying = baseStreamFn ?? streamSimple;
72768
+ return (model, context, options) => underlying(model, context, {
72769
+ ...options,
72770
+ headers: {
72771
+ ...options?.headers,
72772
+ "User-Agent": null
72773
+ }
72774
+ });
72775
+ }
72751
72776
  function isAnthropic1MModel(modelId) {
72752
72777
  const normalized = modelId.trim().toLowerCase();
72753
72778
  return ANTHROPIC_1M_MODEL_PREFIXES.some((prefix) => normalized.startsWith(prefix));
@@ -73094,6 +73119,10 @@ function applyExtraParamsToAgent(agent, cfg, provider, modelId, extraParamsOverr
73094
73119
  }
73095
73120
  agent.streamFn = createGoogleThinkingPayloadWrapper(agent.streamFn, thinkingLevel);
73096
73121
  agent.streamFn = createOpenAIResponsesContextManagementWrapper(agent.streamFn, merged);
73122
+ if (isManagedCustomOpenAiProvider(cfg, provider)) {
73123
+ log$6.debug(`stripping User-Agent for custom OpenAI-compatible provider ${provider}/${modelId}`);
73124
+ agent.streamFn = createUserAgentStripWrapper(agent.streamFn);
73125
+ }
73097
73126
  }
73098
73127
 
73099
73128
  //#endregion
@@ -31,7 +31,7 @@ import "./accounts-DTfEeXyO.js";
31
31
  import "./bindings-Hx6KNJeg.js";
32
32
  import "./send-Cpaj_bKB.js";
33
33
  import "./send-BpXRh0BM.js";
34
- import "./subagent-registry-CfKMgII6.js";
34
+ import "./subagent-registry-CXBreqUP.js";
35
35
  import "./paths-CTtLmER4.js";
36
36
  import "./chat-envelope-D3RSz140.js";
37
37
  import "./client-BvL3EdiZ.js";
@@ -123,9 +123,9 @@ import "./context-window-guard-ejUBbmnW.js";
123
123
  import { t as ensureOpenClawCliOnPath } from "./path-env-DDJ70PDB.js";
124
124
  import "./note-BuhsMSuP.js";
125
125
  import "./issue-format-DF2YB-kZ.js";
126
- import { t as ensurePluginRegistryLoaded } from "./plugin-registry-eOikaO9b.js";
126
+ import { t as ensurePluginRegistryLoaded } from "./plugin-registry-CxFikiLF.js";
127
127
  import { t as assertSupportedRuntime } from "./runtime-guard-lQH3Hjre.js";
128
- import { t as emitCliBanner } from "./banner-EymX6IpH.js";
128
+ import { t as emitCliBanner } from "./banner-V_1v329B.js";
129
129
  import "./doctor-config-flow-BrXA2e34.js";
130
130
  import { n as ensureConfigReady } from "./config-guard-CcE0LvHm.js";
131
131
  import process$1 from "node:process";
@@ -140,7 +140,7 @@ const routeHealth = {
140
140
  const verbose = getVerboseFlag(argv, { includeDebug: true });
141
141
  const timeoutMs = getPositiveIntFlagValue(argv, "--timeout");
142
142
  if (timeoutMs === null) return false;
143
- const { healthCommand } = await import("./health-Du4IbXAP.js").then((n) => n.i);
143
+ const { healthCommand } = await import("./health-CDEXWvnu.js").then((n) => n.i);
144
144
  await healthCommand({
145
145
  json,
146
146
  timeoutMs,
@@ -160,7 +160,7 @@ const routeStatus = {
160
160
  const verbose = getVerboseFlag(argv, { includeDebug: true });
161
161
  const timeoutMs = getPositiveIntFlagValue(argv, "--timeout");
162
162
  if (timeoutMs === null) return false;
163
- const { statusCommand } = await import("./status-CwKeOASs.js").then((n) => n.t);
163
+ const { statusCommand } = await import("./status-mS4bWnIW.js").then((n) => n.t);
164
164
  await statusCommand({
165
165
  json,
166
166
  deep,
@@ -199,7 +199,7 @@ const routeAgentsList = {
199
199
  run: async (argv) => {
200
200
  const json = hasFlag(argv, "--json");
201
201
  const bindings = hasFlag(argv, "--bindings");
202
- const { agentsListCommand } = await import("./agents-BMaMDR6h.js").then((n) => n.t);
202
+ const { agentsListCommand } = await import("./agents-BCJbDk2P.js").then((n) => n.t);
203
203
  await agentsListCommand({
204
204
  json,
205
205
  bindings
@@ -265,7 +265,7 @@ const routes = [
265
265
  const pathArg = positionals[0];
266
266
  if (!pathArg) return false;
267
267
  const json = hasFlag(argv, "--json");
268
- const { runConfigGet } = await import("./config-cli-CpsK8BqN.js");
268
+ const { runConfigGet } = await import("./config-cli-hwawfBlS.js");
269
269
  await runConfigGet({
270
270
  path: pathArg,
271
271
  json
@@ -280,7 +280,7 @@ const routes = [
280
280
  if (!positionals || positionals.length !== 1) return false;
281
281
  const pathArg = positionals[0];
282
282
  if (!pathArg) return false;
283
- const { runConfigUnset } = await import("./config-cli-CpsK8BqN.js");
283
+ const { runConfigUnset } = await import("./config-cli-hwawfBlS.js");
284
284
  await runConfigUnset({ path: pathArg });
285
285
  return true;
286
286
  }
@@ -294,7 +294,7 @@ const routes = [
294
294
  const local = hasFlag(argv, "--local");
295
295
  const json = hasFlag(argv, "--json");
296
296
  const plain = hasFlag(argv, "--plain");
297
- const { modelsListCommand } = await import("./models-BEMBo-jJ.js").then((n) => n.t);
297
+ const { modelsListCommand } = await import("./models-CgguB_MH.js").then((n) => n.t);
298
298
  await modelsListCommand({
299
299
  all,
300
300
  local,
@@ -325,7 +325,7 @@ const routes = [
325
325
  const plain = hasFlag(argv, "--plain");
326
326
  const check = hasFlag(argv, "--check");
327
327
  const probe = hasFlag(argv, "--probe");
328
- const { modelsStatusCommand } = await import("./models-BEMBo-jJ.js").then((n) => n.t);
328
+ const { modelsStatusCommand } = await import("./models-CgguB_MH.js").then((n) => n.t);
329
329
  await modelsStatusCommand({
330
330
  json,
331
331
  plain,
@@ -410,7 +410,7 @@ async function runCli(argv = process$1.argv) {
410
410
  assertSupportedRuntime();
411
411
  if (await tryRouteCli(normalizedArgv)) return;
412
412
  enableConsoleCapture();
413
- const { buildProgram } = await import("./program-BQ8WwHMi.js");
413
+ const { buildProgram } = await import("./program-DSOHn27G.js");
414
414
  const program = buildProgram();
415
415
  installUnhandledRejectionHandler();
416
416
  process$1.on("uncaughtException", (error) => {
@@ -423,10 +423,10 @@ async function runCli(argv = process$1.argv) {
423
423
  const { getProgramContext } = await import("./program-context-Cy6hM1zR.js").then((n) => n.n);
424
424
  const ctx = getProgramContext(program);
425
425
  if (ctx) {
426
- const { registerCoreCliByName } = await import("./command-registry-oV1633Vs.js").then((n) => n.t);
426
+ const { registerCoreCliByName } = await import("./command-registry-KxdBw74g.js").then((n) => n.t);
427
427
  await registerCoreCliByName(program, ctx, primary, parseArgv);
428
428
  }
429
- const { registerSubCliByName } = await import("./register.subclis-DKG1KoTd.js").then((n) => n.a);
429
+ const { registerSubCliByName } = await import("./register.subclis-CEq4Db2Q.js").then((n) => n.a);
430
430
  await registerSubCliByName(program, primary);
431
431
  }
432
432
  if (!shouldSkipPluginCommandRegistration({
@@ -434,7 +434,7 @@ async function runCli(argv = process$1.argv) {
434
434
  primary,
435
435
  hasBuiltinPrimary: primary !== null && program.commands.some((command) => command.name() === primary)
436
436
  })) {
437
- const { registerPluginCliCommands } = await import("./cli-dy2BdjPZ.js");
437
+ const { registerPluginCliCommands } = await import("./cli-YeYpjq2c.js");
438
438
  const { loadConfig } = await import("./auth-profiles-D_x1_5v_.js").then((n) => n.O);
439
439
  registerPluginCliCommands(program, loadConfig());
440
440
  }
@@ -2,7 +2,7 @@ import "./paths-BYr-iJJ9.js";
2
2
  import "./globals-uLeGcRW1.js";
3
3
  import "./utils-CP51tiAi.js";
4
4
  import "./thinking-44rmAw5o.js";
5
- import { Ar as enqueueSystemEvent, D as pruneLegacyStoreKeys, E as loadSessionEntry, Ft as createOutboundSendDeps, Jn as buildOutboundSessionContext, O as resolveGatewaySessionStoreTarget, Pr as requestHeartbeatNow, jt as agentCommandFromIngress, kn as resolveOutboundTarget } from "./reply-ezOUjaUp.js";
5
+ import { Ar as enqueueSystemEvent, D as pruneLegacyStoreKeys, E as loadSessionEntry, Ft as createOutboundSendDeps, Jn as buildOutboundSessionContext, O as resolveGatewaySessionStoreTarget, Pr as requestHeartbeatNow, jt as agentCommandFromIngress, kn as resolveOutboundTarget } from "./reply-D8Yu6-Ie.js";
6
6
  import "./agent-scope-CiBV1K6b.js";
7
7
  import { d as defaultRuntime } from "./subsystem-BT74-yyS.js";
8
8
  import { l as normalizeMainKey } from "./session-key-C9z4VQtw.js";
@@ -119,7 +119,7 @@ import "./server-lifecycle-B7aXKxY3.js";
119
119
  import "./stagger-C-R8Eo-4.js";
120
120
  import "./constants-BJiQF5Ae.js";
121
121
  import "./context-window-guard-BNuaId5E.js";
122
- import { c as parseMessageWithAttachments, l as formatForLog, r as registerApnsToken, s as normalizeRpcAttachmentsToChatAttachments } from "./push-apns-B_GGZO2Z.js";
122
+ import { c as parseMessageWithAttachments, l as formatForLog, r as registerApnsToken, s as normalizeRpcAttachmentsToChatAttachments } from "./push-apns-DvNRo3EQ.js";
123
123
  import { randomUUID } from "node:crypto";
124
124
 
125
125
  //#region src/gateway/server-node-events.ts
@@ -31,7 +31,7 @@ import "./accounts-DTfEeXyO.js";
31
31
  import "./bindings-Hx6KNJeg.js";
32
32
  import "./send-Cpaj_bKB.js";
33
33
  import "./send-BpXRh0BM.js";
34
- import { A as agentCommandFromIngress, P as createOutboundSendDeps, Pn as enqueueSystemEvent, Rn as requestHeartbeatNow, bt as resolveOutboundTarget, ln as buildOutboundSessionContext } from "./subagent-registry-CfKMgII6.js";
34
+ import { A as agentCommandFromIngress, P as createOutboundSendDeps, Pn as enqueueSystemEvent, Rn as requestHeartbeatNow, bt as resolveOutboundTarget, ln as buildOutboundSessionContext } from "./subagent-registry-CXBreqUP.js";
35
35
  import "./paths-CTtLmER4.js";
36
36
  import "./chat-envelope-D3RSz140.js";
37
37
  import "./client-BvL3EdiZ.js";
@@ -120,7 +120,7 @@ import "./help-format-B3bKmDqF.js";
120
120
  import "./progress-CwQKn0ae.js";
121
121
  import "./constants-SKxh9Cou.js";
122
122
  import "./context-window-guard-ejUBbmnW.js";
123
- import { c as parseMessageWithAttachments, l as formatForLog, r as registerApnsToken, s as normalizeRpcAttachmentsToChatAttachments } from "./push-apns-CVnc3jrx.js";
123
+ import { c as parseMessageWithAttachments, l as formatForLog, r as registerApnsToken, s as normalizeRpcAttachmentsToChatAttachments } from "./push-apns-BSlKJa83.js";
124
124
  import { randomUUID } from "node:crypto";
125
125
 
126
126
  //#region src/gateway/server-node-events.ts
@@ -1,6 +1,6 @@
1
1
  import { u as resolveGatewayPort } from "./paths-BYr-iJJ9.js";
2
2
  import { f as isRich, n as info, p as theme } from "./globals-uLeGcRW1.js";
3
- import { C as listAgentsForGateway, Jt as resolveContextTokensForModel, Nr as peekSystemEvents, S as classifySessionKey, U as readRestartSentinel, W as summarizeRestartSentinel, _t as formatUsageReportLines, c as buildChannelSummary, d as resolveChannelAccountConfigured, f as resolveChannelAccountEnabled, gt as loadProviderUsageSummary, k as resolveSessionModelRef, l as buildChannelAccountSnapshot, u as formatChannelAllowFrom } from "./reply-ezOUjaUp.js";
3
+ import { C as listAgentsForGateway, Jt as resolveContextTokensForModel, Nr as peekSystemEvents, S as classifySessionKey, U as readRestartSentinel, W as summarizeRestartSentinel, _t as formatUsageReportLines, c as buildChannelSummary, d as resolveChannelAccountConfigured, f as resolveChannelAccountEnabled, gt as loadProviderUsageSummary, k as resolveSessionModelRef, l as buildChannelAccountSnapshot, u as formatChannelAllowFrom } from "./reply-D8Yu6-Ie.js";
4
4
  import { u as resolveAgentWorkspaceDir } from "./agent-scope-CiBV1K6b.js";
5
5
  import { T as parseAgentSessionKey } from "./session-key-C9z4VQtw.js";
6
6
  import { y as resolveOpenClawPackageRoot } from "./workspace-CRdln__H.js";
@@ -30,7 +30,7 @@ import { t as formatRuntimeStatusWithDetails } from "./runtime-status-FmZCZXmg.j
30
30
  import { t as readLastGatewayErrorLine } from "./diagnostics-BHQgZbuI.js";
31
31
  import { t as renderTable } from "./table-DZBPnHSy.js";
32
32
  import { a as probeGateway, i as resolveGatewayProbeAuth$1, t as runSecurityAudit } from "./audit-1YVlVmk7.js";
33
- import { o as resolveHeartbeatSummaryForAgent, t as formatHealthChannelLines } from "./health-DmJq2Wph.js";
33
+ import { o as resolveHeartbeatSummaryForAgent, t as formatHealthChannelLines } from "./health-Du8dO3vn.js";
34
34
  import { a as shouldShowUpdateStatus, i as resolveUpdateAvailability, n as formatUpdateOneLiner, r as getUpdateCheckResult, t as formatUpdateAvailableHint } from "./status.update-HwSPC5ZX.js";
35
35
  import { _ as resolveUpdateChannelDisplay, a as formatGitInstallLabel, h as normalizeUpdateChannel, n as checkUpdateStatus, t as resolveDefaultChannelAccountContext } from "./channel-account-context-C6rIxLzo.js";
36
36
  import { t as resolveNodeService } from "./node-service-6W3vqgVv.js";
@@ -11,7 +11,7 @@ import { t as VERSION } from "./version-CGDNfh5C.js";
11
11
  import { t as buildWorkspaceSkillStatus } from "./skills-status-DG-bH5mO.js";
12
12
  import { X as resolveFreshSessionTotalTokens, o as loadSessionStore, tt as resolveMainSessionKey } from "./sessions-B2mnwD21.js";
13
13
  import { n as listChannelPlugins } from "./plugins-vsjS_m58.js";
14
- import { An as formatChannelAllowFrom, Cn as formatUsageReportLines, Ln as peekSystemEvents, Mn as resolveChannelAccountEnabled, Mt as summarizeRestartSentinel, On as buildChannelSummary, Sn as loadProviderUsageSummary, jn as resolveChannelAccountConfigured, jt as readRestartSentinel, kn as buildChannelAccountSnapshot } from "./subagent-registry-CfKMgII6.js";
14
+ import { An as formatChannelAllowFrom, Cn as formatUsageReportLines, Ln as peekSystemEvents, Mn as resolveChannelAccountEnabled, Mt as summarizeRestartSentinel, On as buildChannelSummary, Sn as loadProviderUsageSummary, jn as resolveChannelAccountConfigured, jt as readRestartSentinel, kn as buildChannelAccountSnapshot } from "./subagent-registry-CXBreqUP.js";
15
15
  import { c as resolveStorePath } from "./paths-CTtLmER4.js";
16
16
  import { n as callGateway, t as buildGatewayConnectionDetails } from "./call-CzoM7hPS.js";
17
17
  import { o as getTailnetHostname, s as readTailscaleStatusJson } from "./tailscale-D3xGoMdQ.js";
@@ -32,7 +32,7 @@ import { t as formatRuntimeStatusWithDetails } from "./runtime-status-t6wRP4gf.j
32
32
  import { t as readLastGatewayErrorLine } from "./diagnostics-ABz8E7c-.js";
33
33
  import { t as renderTable } from "./table-CqULNDay.js";
34
34
  import { a as probeGateway, i as resolveGatewayProbeAuth$1, t as runSecurityAudit } from "./audit-Bgu8Ommg.js";
35
- import { o as resolveHeartbeatSummaryForAgent, t as formatHealthChannelLines } from "./health-Du4IbXAP.js";
35
+ import { o as resolveHeartbeatSummaryForAgent, t as formatHealthChannelLines } from "./health-CDEXWvnu.js";
36
36
  import { a as shouldShowUpdateStatus, i as resolveUpdateAvailability, n as formatUpdateOneLiner, r as getUpdateCheckResult, t as formatUpdateAvailableHint } from "./status.update-YC9VNJxl.js";
37
37
  import { _ as resolveUpdateChannelDisplay, a as formatGitInstallLabel, h as normalizeUpdateChannel, n as checkUpdateStatus, t as resolveDefaultChannelAccountContext } from "./channel-account-context-BV3Q0XnD.js";
38
38
  import { t as resolveNodeService } from "./node-service-DUUObpwl.js";
@@ -120,6 +120,7 @@ import { t as resolvePairingIdLabel } from "./pairing-labels-CFSUHOmk.js";
120
120
  import { t as recordInboundSessionMetaSafe } from "./session-meta-DF1WT4cr.js";
121
121
  import { i as resolveMemoryBackendConfig, n as registerMemoryCli, r as getMemorySearchManager } from "./memory-cli-CuT-iG2F.js";
122
122
  import { r as resolveMemorySearchConfig } from "./manager-7hZXEYTj.js";
123
+ import { o as BITSEEK_PROVIDER_ID } from "./constants-SKxh9Cou.js";
123
124
  import { a as resolveContextWindowInfo, i as resolveContextWindowHardMinTokens, n as CONTEXT_WINDOW_WARN_BELOW_TOKENS, r as evaluateContextWindowGuard } from "./context-window-guard-ejUBbmnW.js";
124
125
  import { createRequire } from "node:module";
125
126
  import { execFileSync, spawn, spawnSync } from "node:child_process";
@@ -53794,7 +53795,7 @@ function createOutboundSendDepsFromCliSource(deps) {
53794
53795
  function createDefaultDeps() {
53795
53796
  return {
53796
53797
  sendMessageWhatsApp: async (...args) => {
53797
- const { sendMessageWhatsApp } = await import("./web-CsfqGSAa.js");
53798
+ const { sendMessageWhatsApp } = await import("./web-BKrNiKsU.js");
53798
53799
  return await sendMessageWhatsApp(...args);
53799
53800
  },
53800
53801
  sendMessageTelegram: async (...args) => {
@@ -72046,7 +72047,7 @@ function loadWebLoginQr() {
72046
72047
  return webLoginQrPromise;
72047
72048
  }
72048
72049
  function loadWebChannel() {
72049
- webChannelPromise ??= import("./web-CsfqGSAa.js");
72050
+ webChannelPromise ??= import("./web-BKrNiKsU.js");
72050
72051
  return webChannelPromise;
72051
72052
  }
72052
72053
  function loadWhatsAppActions() {
@@ -77820,6 +77821,30 @@ function createOpenAIDefaultTransportWrapper(baseStreamFn) {
77820
77821
  });
77821
77822
  };
77822
77823
  }
77824
+ function isManagedCustomOpenAiProvider(cfg, provider) {
77825
+ const providers = cfg?.models?.providers;
77826
+ if (!providers) return false;
77827
+ const normalizedProvider = normalizeProviderId(provider);
77828
+ for (const [providerId, providerConfig] of Object.entries(providers)) {
77829
+ if (normalizeProviderId(providerId) !== normalizedProvider) continue;
77830
+ if (normalizeProviderId(providerId) === BITSEEK_PROVIDER_ID) return false;
77831
+ if (providerConfig?.api !== "openai-completions") return false;
77832
+ if (typeof providerConfig.baseUrl !== "string" || !providerConfig.baseUrl.trim()) return false;
77833
+ if (!Array.isArray(providerConfig.models)) return false;
77834
+ return providerConfig.models.some((model) => typeof model?.id === "string" && model.id.trim());
77835
+ }
77836
+ return false;
77837
+ }
77838
+ function createUserAgentStripWrapper(baseStreamFn) {
77839
+ const underlying = baseStreamFn ?? streamSimple;
77840
+ return (model, context, options) => underlying(model, context, {
77841
+ ...options,
77842
+ headers: {
77843
+ ...options?.headers,
77844
+ "User-Agent": null
77845
+ }
77846
+ });
77847
+ }
77823
77848
  function isAnthropic1MModel(modelId) {
77824
77849
  const normalized = modelId.trim().toLowerCase();
77825
77850
  return ANTHROPIC_1M_MODEL_PREFIXES.some((prefix) => normalized.startsWith(prefix));
@@ -78166,6 +78191,10 @@ function applyExtraParamsToAgent(agent, cfg, provider, modelId, extraParamsOverr
78166
78191
  }
78167
78192
  agent.streamFn = createGoogleThinkingPayloadWrapper(agent.streamFn, thinkingLevel);
78168
78193
  agent.streamFn = createOpenAIResponsesContextManagementWrapper(agent.streamFn, merged);
78194
+ if (isManagedCustomOpenAiProvider(cfg, provider)) {
78195
+ log$3.debug(`stripping User-Agent for custom OpenAI-compatible provider ${provider}/${modelId}`);
78196
+ agent.streamFn = createUserAgentStripWrapper(agent.streamFn);
78197
+ }
78169
78198
  }
78170
78199
 
78171
78200
  //#endregion
@@ -2,7 +2,7 @@ import { S as resolveCliName, g as resolveStateDir, n as DEFAULT_GATEWAY_PORT, u
2
2
  import { p as theme } from "./globals-uLeGcRW1.js";
3
3
  import { h as pathExists } from "./utils-CP51tiAi.js";
4
4
  import "./thinking-44rmAw5o.js";
5
- import { G as trimLogTail } from "./reply-ezOUjaUp.js";
5
+ import { G as trimLogTail } from "./reply-D8Yu6-Ie.js";
6
6
  import "./agent-scope-CiBV1K6b.js";
7
7
  import { d as defaultRuntime } from "./subsystem-BT74-yyS.js";
8
8
  import { y as resolveOpenClawPackageRoot } from "./workspace-CRdln__H.js";
@@ -122,7 +122,7 @@ import { f as resolveGatewaySystemdServiceName, l as resolveGatewayLaunchAgentLa
122
122
  import "./constants-BJiQF5Ae.js";
123
123
  import "./context-window-guard-BNuaId5E.js";
124
124
  import { r as parseSemver } from "./runtime-guard-p6l4jDOj.js";
125
- import "./program-context-BWsBkMJn.js";
125
+ import "./program-context-DfYJPL5N.js";
126
126
  import "./skills-status-BEq0_fOn.js";
127
127
  import { n as inheritOptionFromParent } from "./command-options-D4YE45pL.js";
128
128
  import "./note-CLcV1fjx.js";
@@ -132,7 +132,7 @@ import "./skill-scanner-CsmM5F4F.js";
132
132
  import "./installs-BXOZ3DXs.js";
133
133
  import { n as formatConfigIssueLines } from "./issue-format-rk9Vpcxd.js";
134
134
  import "./channels-status-issues-DeT1Znlx.js";
135
- import { r as installCompletion } from "./completion-cli-5z7Fk2X-.js";
135
+ import { r as installCompletion } from "./completion-cli-DU3T8Tur.js";
136
136
  import "./daemon-install-helpers-CMWYg4_W.js";
137
137
  import "./systemd-DJ5Red-Q.js";
138
138
  import { t as resolveGatewayService } from "./service-DqxfCr8y.js";
@@ -141,19 +141,19 @@ import "./systemd-hints-D40Qx3hg.js";
141
141
  import { a as terminateStaleGatewayPids, i as renderRestartDiagnostics, o as waitForGatewayHealthyRestart, r as runDaemonRestart, s as runDaemonInstall } from "./daemon-cli-RKWFtF-K.js";
142
142
  import "./diagnostics-BHQgZbuI.js";
143
143
  import { t as renderTable } from "./table-DZBPnHSy.js";
144
- import "./health-DmJq2Wph.js";
144
+ import "./health-Du8dO3vn.js";
145
145
  import "./control-ui-assets-B_3g_YF0.js";
146
146
  import { a as shouldShowUpdateStatus, i as resolveUpdateAvailability, n as formatUpdateOneLiner, t as formatUpdateAvailableHint } from "./status.update-HwSPC5ZX.js";
147
147
  import { _ as resolveUpdateChannelDisplay, c as DEFAULT_GIT_CHANNEL, d as channelToNpmTag, f as formatUpdateChannelLabel, g as resolveEffectiveUpdateChannel, h as normalizeUpdateChannel, i as fetchNpmTagVersion, l as DEFAULT_PACKAGE_CHANNEL, n as checkUpdateStatus, o as resolveNpmChannelTag, r as compareSemverStrings } from "./channel-account-context-C6rIxLzo.js";
148
- import { a as globalInstallArgs, c as readPackageName, i as detectGlobalInstallManagerForRoot, l as readPackageVersion, n as cleanupGlobalRenameDirs, o as resolveGlobalPackageRoot, r as detectGlobalInstallManagerByPresence, s as normalizePackageTagInput, t as runGatewayUpdate } from "./update-runner-rrlmopJw.js";
148
+ import { a as globalInstallArgs, c as readPackageName, i as detectGlobalInstallManagerForRoot, l as readPackageVersion, n as cleanupGlobalRenameDirs, o as resolveGlobalPackageRoot, r as detectGlobalInstallManagerByPresence, s as normalizePackageTagInput, t as runGatewayUpdate } from "./update-runner-DO6RodZW.js";
149
149
  import "./logging-yFV4aFrN.js";
150
150
  import { n as updateNpmInstalledPlugins, t as syncPluginsForUpdateChannel } from "./update-B1Dhhu_3.js";
151
151
  import "./doctor-config-flow-18ijj3KB.js";
152
152
  import "./oauth-tls-preflight-i1WBNTG8.js";
153
153
  import "./systemd-linger-BK6kig-o.js";
154
154
  import "./health-format-CEAJLEPm.js";
155
- import { n as doctorCommand, t as selectStyled } from "./prompt-select-styled-CLCyaJAG.js";
156
- import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-BwIgzkLP.js";
155
+ import { n as doctorCommand, t as selectStyled } from "./prompt-select-styled-B2izefsj.js";
156
+ import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-AraQfpv2.js";
157
157
  import os from "node:os";
158
158
  import path from "node:path";
159
159
  import fs from "node:fs/promises";
@@ -473,6 +473,10 @@ function inferUpdateFailureHints(result) {
473
473
  hints.push("Detected permission failure (EACCES). Re-run with a writable global prefix or sudo (for system-managed Node installs).");
474
474
  hints.push("Example: npm config set prefix ~/.local && npm i -g @bitseek/claw@latest");
475
475
  }
476
+ if (failedStep.name.startsWith("global update") && (stderr.includes("ebusy") || stderr.includes("resource busy or locked"))) {
477
+ hints.push("Detected a busy global install directory (EBUSY). Close running bitseek-claw/OpenClaw processes and retry from a different working directory.");
478
+ hints.push("Example: cd %USERPROFILE% && npm i -g @bitseek/claw@latest");
479
+ }
476
480
  if (failedStep.name.startsWith("global update") && (stderr.includes("node-gyp") || stderr.includes("@discordjs/opus") || stderr.includes("prebuild"))) {
477
481
  hints.push("Detected native optional dependency build failure (e.g. opus). The updater retries with --omit=optional automatically.");
478
482
  hints.push("If it still fails: npm i -g @bitseek/claw@latest --omit=optional");
@@ -32,7 +32,7 @@ import "./accounts-DTfEeXyO.js";
32
32
  import "./bindings-Hx6KNJeg.js";
33
33
  import "./send-Cpaj_bKB.js";
34
34
  import "./send-BpXRh0BM.js";
35
- import { Nt as trimLogTail } from "./subagent-registry-CfKMgII6.js";
35
+ import { Nt as trimLogTail } from "./subagent-registry-CXBreqUP.js";
36
36
  import "./paths-CTtLmER4.js";
37
37
  import "./chat-envelope-D3RSz140.js";
38
38
  import "./client-BvL3EdiZ.js";
@@ -131,9 +131,9 @@ import "./skill-scanner-CSJqt034.js";
131
131
  import "./installs-BXcYytvn.js";
132
132
  import { n as formatConfigIssueLines } from "./issue-format-DF2YB-kZ.js";
133
133
  import "./channels-status-issues-CCNiQcg9.js";
134
- import { r as installCompletion } from "./completion-cli-C9i-Dicb.js";
135
- import "./register.subclis-DKG1KoTd.js";
136
- import "./command-registry-oV1633Vs.js";
134
+ import { r as installCompletion } from "./completion-cli-Cfp2m1Sy.js";
135
+ import "./register.subclis-CEq4Db2Q.js";
136
+ import "./command-registry-KxdBw74g.js";
137
137
  import "./program-context-Cy6hM1zR.js";
138
138
  import "./daemon-install-helpers-D28keNLu.js";
139
139
  import { r as parseSemver } from "./runtime-guard-lQH3Hjre.js";
@@ -144,19 +144,19 @@ import "./systemd-hints-BDIASQOF.js";
144
144
  import { a as terminateStaleGatewayPids, i as renderRestartDiagnostics, o as waitForGatewayHealthyRestart, r as runDaemonRestart, s as runDaemonInstall } from "./daemon-cli-BSy0rtO2.js";
145
145
  import "./diagnostics-ABz8E7c-.js";
146
146
  import { t as renderTable } from "./table-CqULNDay.js";
147
- import "./health-Du4IbXAP.js";
147
+ import "./health-CDEXWvnu.js";
148
148
  import "./control-ui-assets-Dx8wiZQ_.js";
149
149
  import { a as shouldShowUpdateStatus, i as resolveUpdateAvailability, n as formatUpdateOneLiner, t as formatUpdateAvailableHint } from "./status.update-YC9VNJxl.js";
150
150
  import { _ as resolveUpdateChannelDisplay, c as DEFAULT_GIT_CHANNEL, d as channelToNpmTag, f as formatUpdateChannelLabel, g as resolveEffectiveUpdateChannel, h as normalizeUpdateChannel, i as fetchNpmTagVersion, l as DEFAULT_PACKAGE_CHANNEL, n as checkUpdateStatus, o as resolveNpmChannelTag, r as compareSemverStrings } from "./channel-account-context-BV3Q0XnD.js";
151
- import { a as globalInstallArgs, c as readPackageName, i as detectGlobalInstallManagerForRoot, l as readPackageVersion, n as cleanupGlobalRenameDirs, o as resolveGlobalPackageRoot, r as detectGlobalInstallManagerByPresence, s as normalizePackageTagInput, t as runGatewayUpdate } from "./update-runner-l9K_q6Kz.js";
151
+ import { a as globalInstallArgs, c as readPackageName, i as detectGlobalInstallManagerForRoot, l as readPackageVersion, n as cleanupGlobalRenameDirs, o as resolveGlobalPackageRoot, r as detectGlobalInstallManagerByPresence, s as normalizePackageTagInput, t as runGatewayUpdate } from "./update-runner-C9noXbfV.js";
152
152
  import "./logging-DsLC1iR-.js";
153
153
  import { n as updateNpmInstalledPlugins, t as syncPluginsForUpdateChannel } from "./update-DLc3UsVC.js";
154
154
  import "./doctor-config-flow-BrXA2e34.js";
155
155
  import "./oauth-tls-preflight-B31t_Wn7.js";
156
156
  import "./systemd-linger-DfrE-63p.js";
157
157
  import "./health-format-NGoowTz5.js";
158
- import { n as doctorCommand, t as selectStyled } from "./prompt-select-styled-DbUQHcBh.js";
159
- import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-BySkhMZY.js";
158
+ import { n as doctorCommand, t as selectStyled } from "./prompt-select-styled-DG7woZ0E.js";
159
+ import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-B6_JtN22.js";
160
160
  import { spawn, spawnSync } from "node:child_process";
161
161
  import path from "node:path";
162
162
  import os from "node:os";
@@ -476,6 +476,10 @@ function inferUpdateFailureHints(result) {
476
476
  hints.push("Detected permission failure (EACCES). Re-run with a writable global prefix or sudo (for system-managed Node installs).");
477
477
  hints.push("Example: npm config set prefix ~/.local && npm i -g @bitseek/claw@latest");
478
478
  }
479
+ if (failedStep.name.startsWith("global update") && (stderr.includes("ebusy") || stderr.includes("resource busy or locked"))) {
480
+ hints.push("Detected a busy global install directory (EBUSY). Close running bitseek-claw/OpenClaw processes and retry from a different working directory.");
481
+ hints.push("Example: cd %USERPROFILE% && npm i -g @bitseek/claw@latest");
482
+ }
479
483
  if (failedStep.name.startsWith("global update") && (stderr.includes("node-gyp") || stderr.includes("@discordjs/opus") || stderr.includes("prebuild"))) {
480
484
  hints.push("Detected native optional dependency build failure (e.g. opus). The updater retries with --omit=optional automatically.");
481
485
  hints.push("If it still fails: npm i -g @bitseek/claw@latest --omit=optional");
@@ -1,6 +1,6 @@
1
1
  import { m as pathExists } from "./utils-DIzy5B5o.js";
2
2
  import { t as runCommandWithTimeout } from "./exec-CEAvKSx9.js";
3
- import { Nt as trimLogTail } from "./subagent-registry-CfKMgII6.js";
3
+ import { Nt as trimLogTail } from "./subagent-registry-CXBreqUP.js";
4
4
  import { p as resolveStableNodePath } from "./daemon-install-helpers-D28keNLu.js";
5
5
  import { n as resolveControlUiDistIndexHealth, r as resolveControlUiDistIndexPathForRoot } from "./control-ui-assets-Dx8wiZQ_.js";
6
6
  import { d as channelToNpmTag, l as DEFAULT_PACKAGE_CHANNEL, m as isStableTag, p as isBetaTag, r as compareSemverStrings, s as detectPackageManager$1, u as DEV_BRANCH } from "./channel-account-context-BV3Q0XnD.js";
@@ -209,6 +209,12 @@ function normalizeDir(value) {
209
209
  if (!trimmed) return null;
210
210
  return path.resolve(trimmed);
211
211
  }
212
+ function resolveGlobalUpdateWorkingDir(pkgRoot) {
213
+ const normalizedRoot = path.resolve(pkgRoot);
214
+ const parentDir = path.dirname(normalizedRoot);
215
+ if (parentDir && parentDir !== normalizedRoot) return parentDir;
216
+ return os.tmpdir();
217
+ }
212
218
  function resolveNodeModulesBinPackageRoot(argv1) {
213
219
  const normalized = path.resolve(argv1);
214
220
  const parts = normalized.split(path.sep);
@@ -927,6 +933,7 @@ async function runGatewayUpdate(opts = {}) {
927
933
  globalRoot: path.dirname(pkgRoot),
928
934
  packageName
929
935
  });
936
+ const globalUpdateCwd = resolveGlobalUpdateWorkingDir(pkgRoot);
930
937
  const channel = opts.channel ?? DEFAULT_PACKAGE_CHANNEL;
931
938
  const spec = `${packageName}@${normalizeTag(opts.tag ?? channelToNpmTag(channel))}`;
932
939
  const steps = [];
@@ -934,7 +941,7 @@ async function runGatewayUpdate(opts = {}) {
934
941
  runCommand,
935
942
  name: "global update",
936
943
  argv: globalInstallArgs(globalManager, spec),
937
- cwd: pkgRoot,
944
+ cwd: globalUpdateCwd,
938
945
  timeoutMs,
939
946
  progress,
940
947
  stepIndex: 0,
@@ -949,7 +956,7 @@ async function runGatewayUpdate(opts = {}) {
949
956
  runCommand,
950
957
  name: "global update (omit optional)",
951
958
  argv: fallbackArgv,
952
- cwd: pkgRoot,
959
+ cwd: globalUpdateCwd,
953
960
  timeoutMs,
954
961
  progress,
955
962
  stepIndex: 0,