openmausbot 0.1.97 → 0.1.98

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 (144) hide show
  1. package/dist/assets/ActivityPanel-H6D3SD39.js +1 -0
  2. package/dist/assets/BotSettingsDialog-Dqz_AiBZ.js +7 -0
  3. package/dist/assets/CloudBackendPicker-iezpJFpF.js +1 -0
  4. package/dist/assets/ComputerPanel-DZPj-IWu.js +1 -0
  5. package/dist/assets/DesktopViewer-utONms1p.js +5 -0
  6. package/dist/assets/InspectorPanel-OVaBVrzC.js +5 -0
  7. package/dist/assets/KeyboardShortcutsModal-gk9mvHj_.js +1 -0
  8. package/dist/assets/LocalVmWorkspace-DLIvd2kC.js +1 -0
  9. package/dist/assets/MacLocalControl-bJv8yiPB.js +1 -0
  10. package/dist/assets/NewBotDialog-1qGOAdUM.js +2 -0
  11. package/dist/assets/RemoteAgentSettingsPanel-DqKr0HkO.js +1 -0
  12. package/dist/assets/RoutinesPage-BM2D4qGi.js +1 -0
  13. package/dist/assets/RoutinesSection-Dny9ra-c.js +1 -0
  14. package/dist/assets/SettingsModal-gC6XJJmt.js +11 -0
  15. package/dist/assets/TeamMapPage-B6fuu4r_.js +8 -0
  16. package/dist/assets/TriggersPanel-j0qTP2CO.js +1 -0
  17. package/dist/assets/VisibilitySection-DT0FqPvu.js +12 -0
  18. package/dist/assets/WebhooksPanel--YQyCjKO.js +3 -0
  19. package/dist/assets/{abnfDiagram-O67JEVCF-k1UCNXb7.js → abnfDiagram-O67JEVCF-BsjcFX0-.js} +1 -1
  20. package/dist/assets/activity-BxOkayvD.js +1 -0
  21. package/dist/assets/{arc-BUWGa9UU.js → arc-CJNA94c6.js} +1 -1
  22. package/dist/assets/architectureDiagram-NJMV4G6O-dz2ud7lP.js +36 -0
  23. package/dist/assets/{blockDiagram-BEXU5L5S-Ag9nLW4H.js → blockDiagram-BEXU5L5S-ChBEALoR.js} +1 -1
  24. package/dist/assets/brain-CFZ7PEXc.js +1 -0
  25. package/dist/assets/{c4Diagram-YGBWAQC7-Bh0sjgUa.js → c4Diagram-YGBWAQC7-KZNRKDQe.js} +1 -1
  26. package/dist/assets/channel-WhFyujhZ.js +1 -0
  27. package/dist/assets/{chunk-2Q5K7J3B-BFBcIIqu.js → chunk-2Q5K7J3B-BLLwmCET.js} +1 -1
  28. package/dist/assets/{chunk-3FUC2YCW-Dvfpex-f.js → chunk-3FUC2YCW-CQxyreBZ.js} +2 -2
  29. package/dist/assets/{chunk-5VM5RSS4-CMjP2YZW.js → chunk-5VM5RSS4-D6sFMW0u.js} +1 -1
  30. package/dist/assets/{chunk-GTNCS2PH-BryoeTc7.js → chunk-GTNCS2PH-BaZ1YgLF.js} +1 -1
  31. package/dist/assets/{chunk-GWA4HPMP-BhfvcchO.js → chunk-GWA4HPMP-CcalphmC.js} +1 -1
  32. package/dist/assets/{chunk-JWPE2WC7-bcCVp8rp.js → chunk-JWPE2WC7-CSk8R3ve.js} +1 -1
  33. package/dist/assets/{chunk-NETBCI7D-yKIjIlkQ.js → chunk-NETBCI7D-CTmLjA57.js} +1 -1
  34. package/dist/assets/{chunk-WEXAMYUT-D3Zqbmup.js → chunk-WEXAMYUT-CM9Z77Ne.js} +1 -1
  35. package/dist/assets/{chunk-XXDRQBXY-CjVoIMG6.js → chunk-XXDRQBXY-B1fxpMS2.js} +1 -1
  36. package/dist/assets/{classDiagram-v2-NBCMYWYE-mUCWdVyH.js → classDiagram-v2-NBCMYWYE-DCCyoLpj.js} +1 -1
  37. package/dist/assets/computer-control-NLov352p.js +1 -0
  38. package/dist/assets/cose-bilkent-JH36ORCC-KyImBKvE.js +1 -0
  39. package/dist/assets/{cynefin-OW5HDTMX-BpRrxoO4.js → cynefin-OW5HDTMX-fsZc6MGa.js} +1 -1
  40. package/dist/assets/{cynefinDiagram-VND7K2PF-D3VBWCPK.js → cynefinDiagram-VND7K2PF-CGmHsShB.js} +1 -1
  41. package/dist/assets/{dagre-6A5THRUB-DxEIACOO.js → dagre-6A5THRUB-Dah1h-CH.js} +1 -1
  42. package/dist/assets/{diagram-22UHCM2B-BANgZEOS.js → diagram-22UHCM2B-BIu71OyV.js} +1 -1
  43. package/dist/assets/{diagram-3UASUU5V-Cnq7nJir.js → diagram-3UASUU5V-gxhUB_Mu.js} +1 -1
  44. package/dist/assets/{diagram-ATOU4E4O-4TBDIWnz.js → diagram-ATOU4E4O-CBhusUBn.js} +1 -1
  45. package/dist/assets/{diagram-CDSNMT55-CD_B39D4.js → diagram-CDSNMT55-BdPrc86x.js} +1 -1
  46. package/dist/assets/{diagram-MLGK6HIB-CzvnFhEC.js → diagram-MLGK6HIB-Clp110R_.js} +1 -1
  47. package/dist/assets/{diagram-MPIPVDR6-C4w2SNml.js → diagram-MPIPVDR6-DJKfbugw.js} +1 -1
  48. package/dist/assets/{ebnfDiagram-ZINNZB2B-gkUEBm2s.js → ebnfDiagram-ZINNZB2B-DnsltoBu.js} +1 -1
  49. package/dist/assets/{elk-276RUBZZ-B_56X6mw.js → elk-276RUBZZ-jWdq6gqH.js} +1 -1
  50. package/dist/assets/{erDiagram-OPXOYQCR-C_oByoDS.js → erDiagram-OPXOYQCR-DArPVf8u.js} +1 -1
  51. package/dist/assets/{flowDiagram-KWPJA3E3-CR9xXJkC.js → flowDiagram-KWPJA3E3-D2HZ-2f7.js} +1 -1
  52. package/dist/assets/ganttDiagram-FUAMR5RP--o0KIxEo.js +292 -0
  53. package/dist/assets/{gitGraphDiagram-X574FWY7-VJ6-Tp_p.js → gitGraphDiagram-X574FWY7-CsoXr2D7.js} +1 -1
  54. package/dist/assets/image-plus-BbVjGHin.js +1 -0
  55. package/dist/assets/index-BrPW5HDO.css +1 -0
  56. package/dist/assets/index-C3NqfdVU.js +585 -0
  57. package/dist/assets/{index-Cp4S4NOL.js → index-CJTp9JEp.js} +1 -1
  58. package/dist/assets/{infoDiagram-VRGFBTTK-2Lu9te4D.js → infoDiagram-VRGFBTTK-g-6lNp7r.js} +1 -1
  59. package/dist/assets/{ishikawaDiagram-OU5B5YK6-DR49XY-e.js → ishikawaDiagram-OU5B5YK6-B1d6qVTV.js} +1 -1
  60. package/dist/assets/{journeyDiagram-ZHPQQLJL-ZoR0M305.js → journeyDiagram-ZHPQQLJL-BTPuiU6T.js} +1 -1
  61. package/dist/assets/{kanban-definition-PNTS6WVX-DLKHxrO-.js → kanban-definition-PNTS6WVX-bDDuRJvP.js} +1 -1
  62. package/dist/assets/{linear-BASsfWly.js → linear-BVVKbEMy.js} +1 -1
  63. package/dist/assets/{mermaid.core-BVidiPkk.js → mermaid.core-JJdoKyKB.js} +5 -5
  64. package/dist/assets/{mindmap-definition-NLK3R4M7-g_Qx0U5C.js → mindmap-definition-NLK3R4M7-B4aE3T0q.js} +1 -1
  65. package/dist/assets/module-DCUsy2BQ.js +3 -0
  66. package/dist/assets/page-visible-BBo_Zm8g.js +1 -0
  67. package/dist/assets/{pegDiagram-GJSIUBJH-DI9Cjs8w.js → pegDiagram-GJSIUBJH-DFKQWpR7.js} +1 -1
  68. package/dist/assets/{pieDiagram-5QR66LMP-sRI0Uhr5.js → pieDiagram-5QR66LMP-Iv7OKVJi.js} +1 -1
  69. package/dist/assets/{quadrantDiagram-O4NWA36T-CamKTby3.js → quadrantDiagram-O4NWA36T-U2YnfwBk.js} +1 -1
  70. package/dist/assets/{railroadDiagram-XR7U4H2S-DOLlkbf3.js → railroadDiagram-XR7U4H2S-CuPy6RqM.js} +1 -1
  71. package/dist/assets/remote-desktop-panel-BNEj7tUx.js +1 -0
  72. package/dist/assets/{requirementDiagram-PLB6GJNP-DrRQ5r97.js → requirementDiagram-PLB6GJNP-bMI5AK7T.js} +1 -1
  73. package/dist/assets/{sankeyDiagram-IPEJSGJF-DGS_lXcX.js → sankeyDiagram-IPEJSGJF-BKcFE2WQ.js} +1 -1
  74. package/dist/assets/{sequenceDiagram-PO4LG4MO-CkjWqwtf.js → sequenceDiagram-PO4LG4MO-Bn9q88kl.js} +1 -1
  75. package/dist/assets/{sizeCapture-INFHLROL-CepRgful.js → sizeCapture-INFHLROL-Cvmdq9HD.js} +1 -1
  76. package/dist/assets/{stateDiagram-v2-GCMORJYK-hykr-9RS.js → stateDiagram-v2-GCMORJYK-JJQYw3eQ.js} +1 -1
  77. package/dist/assets/{swimlanes-2SLR337P-CKOHEZbI.js → swimlanes-2SLR337P-BkSCBEwp.js} +1 -1
  78. package/dist/assets/swimlanesDiagram-TC7HE7FX-CmTirbVT.js +8 -0
  79. package/dist/assets/table-file.worker-KkMx-SNx.js +10 -0
  80. package/dist/assets/{timeline-definition-EJHVYXUP-CB8pJ6AC.js → timeline-definition-EJHVYXUP-DsaM4GHr.js} +1 -1
  81. package/dist/assets/{usecaseDiagram-POWQR4AR-DrclJHdl.js → usecaseDiagram-POWQR4AR-3FOwLq7B.js} +1 -1
  82. package/dist/assets/user-DcZBnAuv.js +1 -0
  83. package/dist/assets/{vennDiagram-UO4OBE2U-zS23qjv8.js → vennDiagram-UO4OBE2U-DyNjJsKt.js} +1 -1
  84. package/dist/assets/{wardleyDiagram-VNRHLVJA-52jgeKxz.js → wardleyDiagram-VNRHLVJA-Y4ZMcnBC.js} +1 -1
  85. package/dist/assets/{xychartDiagram-PMCCYNJV-DSdl9rQ8.js → xychartDiagram-PMCCYNJV-BXZpg955.js} +1 -1
  86. package/dist/index.html +2 -2
  87. package/dist-server/cloud-home-start.js +19 -8
  88. package/dist-server/container-mcp.js +8 -0
  89. package/dist-server/desktop-entry.mjs +54 -0
  90. package/dist-server/drivers/agents-proxy.js +21 -4
  91. package/dist-server/index.js +1412 -821
  92. package/dist-server/openmausbot.js +837 -571
  93. package/dist-server/pair-cli.js +837 -571
  94. package/dist-server/permission-proxy.js +2 -0
  95. package/dist-server/server/atomic.js +70 -2
  96. package/dist-server/server/cloud-home-start.js +3 -3
  97. package/dist-server/server/config.js +22 -1
  98. package/dist-server/server/connector-card-text.js +15 -0
  99. package/dist-server/server/default-model-selection.js +7 -4
  100. package/dist-server/server/drivers/acp/core.js +10 -0
  101. package/dist-server/server/drivers/acp/grok.js +47 -5
  102. package/dist-server/server/drivers/agents-catalog.js +24 -4
  103. package/dist-server/server/drivers/agents-proxy.js +1 -0
  104. package/dist-server/server/drivers/chat-mcp-tools.js +5 -3
  105. package/dist-server/server/drivers/claude-login-auth.js +1 -1
  106. package/dist-server/server/drivers/claude.js +35 -11
  107. package/dist-server/server/drivers/codex-device-auth.js +27 -319
  108. package/dist-server/server/drivers/device-auth.js +342 -0
  109. package/dist-server/server/drivers/openai-chat.js +12 -4
  110. package/dist-server/server/fleet-agent.js +18 -5
  111. package/dist-server/server/harness/http.js +5 -2
  112. package/dist-server/server/harness/registry.js +19 -0
  113. package/dist-server/server/harness-capabilities.js +7 -4
  114. package/dist-server/server/hosted-models.js +3 -1
  115. package/dist-server/server/index.js +268 -54
  116. package/dist-server/server/key-rejections.js +57 -0
  117. package/dist-server/server/message-file.js +7 -4
  118. package/dist-server/server/permission-proxy.js +4 -0
  119. package/dist-server/server/provider-key-check.js +5 -1
  120. package/dist-server/server/request-auth.js +1 -1
  121. package/dist-server/server/room-turn-timeout.js +28 -0
  122. package/dist-server/server/routes/thread-models.js +36 -0
  123. package/dist-server/server/routines.js +2 -2
  124. package/dist-server/server/skills.js +3 -2
  125. package/dist-server/server/store.js +148 -60
  126. package/dist-server/server/team-backup.js +19 -4
  127. package/dist-server/server/thread-model.js +25 -0
  128. package/dist-server/server/turn-continuation.js +8 -2
  129. package/dist-server/server/webhook-ingress.js +8 -3
  130. package/dist-server/server/webhooks.js +40 -5
  131. package/dist-server/shared/device-sign-in.js +57 -0
  132. package/dist-server/shared/team-backup.js +2 -0
  133. package/dist-server/shared/thread-model.js +13 -0
  134. package/dist-server/vps-container-mcp.js +8 -0
  135. package/dist-server/workspace-backup.worker.js +41 -22
  136. package/package.json +1 -1
  137. package/dist/assets/DesktopViewer-CPidMCtt.js +0 -5
  138. package/dist/assets/architectureDiagram-NJMV4G6O-DiPor3UT.js +0 -36
  139. package/dist/assets/channel-DR8eD6QW.js +0 -1
  140. package/dist/assets/cose-bilkent-JH36ORCC-BBmR1bbX.js +0 -1
  141. package/dist/assets/ganttDiagram-FUAMR5RP-gtYBTu0B.js +0 -292
  142. package/dist/assets/index-CpaIXRLp.js +0 -614
  143. package/dist/assets/index-Z81SMsgR.css +0 -1
  144. package/dist/assets/swimlanesDiagram-TC7HE7FX-D-8vqZ4-.js +0 -8
@@ -6,17 +6,28 @@ var __export = (target, all) => {
6
6
 
7
7
  // server/cloud-home-start.ts
8
8
  import { spawn } from "node:child_process";
9
- import { chownSync, readFileSync as readFileSync2, statSync } from "node:fs";
9
+ import { chownSync, readFileSync as readFileSync3, statSync } from "node:fs";
10
10
  import { dirname as dirname2, join as join3, posix, resolve } from "node:path";
11
11
  import { fileURLToPath as fileURLToPath2, pathToFileURL } from "node:url";
12
12
 
13
13
  // server/cloud-home.ts
14
- import { existsSync as existsSync2, lstatSync, mkdirSync, readFileSync, readdirSync } from "node:fs";
14
+ import { existsSync as existsSync2, lstatSync as lstatSync2, mkdirSync, readFileSync as readFileSync2, readdirSync } from "node:fs";
15
15
  import { join as join2 } from "node:path";
16
16
 
17
17
  // server/atomic.ts
18
18
  import { randomUUID } from "node:crypto";
19
- import { closeSync, fsyncSync, openSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
19
+ import {
20
+ closeSync,
21
+ constants,
22
+ fstatSync,
23
+ fsyncSync,
24
+ lstatSync,
25
+ openSync,
26
+ readFileSync,
27
+ renameSync,
28
+ unlinkSync,
29
+ writeFileSync
30
+ } from "node:fs";
20
31
  var RENAME_RETRY_DELAYS_MS = [5, 10, 20, 40, 80];
21
32
  var RETRYABLE_RENAME_CODES = /* @__PURE__ */ new Set(["EPERM", "EACCES", "EBUSY"]);
22
33
  function sleepSync(ms) {
@@ -40,7 +51,7 @@ function writeFileAtomic(path, data, options = {}) {
40
51
  try {
41
52
  fd = openSync(tmp, "w", options.mode);
42
53
  writeFileSync(fd, data);
43
- fsyncSync(fd);
54
+ if (options.durable !== false) fsyncSync(fd);
44
55
  closeSync(fd);
45
56
  fd = null;
46
57
  renameWithRetry(tmp, path);
@@ -14707,11 +14718,11 @@ function prepareCloudHomeVolume(home, machineId) {
14707
14718
  mkdirSync(home, { recursive: true, mode: 448 });
14708
14719
  const marker = join2(home, CLOUD_HOME_MARKER);
14709
14720
  if (existsSync2(marker)) {
14710
- const stat = lstatSync(marker);
14721
+ const stat = lstatSync2(marker);
14711
14722
  let saved;
14712
14723
  try {
14713
14724
  if (!stat.isFile() || stat.size > 4096) throw new Error();
14714
- saved = JSON.parse(readFileSync(marker, "utf8"));
14725
+ saved = JSON.parse(readFileSync2(marker, "utf8"));
14715
14726
  } catch {
14716
14727
  throw new Error("This volume's Cloud marker is unreadable. No data was changed.");
14717
14728
  }
@@ -14843,7 +14854,7 @@ function startCloudHome(env = process.env) {
14843
14854
  const home = env.HOME || "/data";
14844
14855
  let ids = null;
14845
14856
  if (process.getuid?.() === 0) {
14846
- ids = passwdIds(readFileSync2("/etc/passwd", "utf8"), SERVICE_USER);
14857
+ ids = passwdIds(readFileSync3("/etc/passwd", "utf8"), SERVICE_USER);
14847
14858
  if (!ids) throw new Error(`The ${SERVICE_USER} user is missing from this image.`);
14848
14859
  const stat = statSync(home);
14849
14860
  if (stat.uid !== ids.uid || stat.gid !== ids.gid) chownSync(home, ids.uid, ids.gid);
@@ -14864,7 +14875,7 @@ function startCloudHome(env = process.env) {
14864
14875
  const edgeConfig = env.OMB_CLOUD_EDGE_CONFIG || "/app/cloud/Caddyfile";
14865
14876
  if (ids) {
14866
14877
  const problem = codeTrustProblem([process.execPath, fileURLToPath2(import.meta.url), join3(here, "index.js"), edgeBin, edgeConfig], home);
14867
- if (problem) throw new Error(`This image's code is not safe to run as root: ${problem}. Rebuild it from deploy/fly/Dockerfile.`);
14878
+ if (problem) throw new Error(`This image's code is not safe to run as root: ${problem}. Rebuild it with docker build --target cloud-home.`);
14868
14879
  }
14869
14880
  const { server, edge, secrets, dropped } = cloudHomeChildEnvironments(config2, env, home);
14870
14881
  if (dropped.length) console.log(`cloud home: not passed to the server: ${dropped.join(", ")}`);
@@ -15824,6 +15824,8 @@ var BROWSER_PROFILE_ID = /^[a-z0-9_-]{1,40}$/;
15824
15824
  var FISH_TTS_MODELS = ["s2.1-pro", "s2.1-pro-free"];
15825
15825
  var MIN_ROOM_TURN_TIMEOUT_MINUTES = 1;
15826
15826
  var MAX_ROOM_TURN_TIMEOUT_MINUTES = 1440;
15827
+ var MIN_MCP_CALL_TIMEOUT_MINUTES = 1;
15828
+ var MAX_MCP_CALL_TIMEOUT_MINUTES = 60;
15827
15829
  var DEFAULT_ROOM_HANDOFF_LIFETIME_MINUTES = 30;
15828
15830
  var DEFAULT_ROOM_HANDOFF_MIN_RUNWAY_MINUTES = 10;
15829
15831
  var DEFAULT_ROOM_HANDOFF_HARD_CAP_MINUTES = 240;
@@ -15869,6 +15871,11 @@ var roomConfigSchema = external_exports.object({
15869
15871
  (rooms) => (rooms.handoffMinRunwayMinutes ?? DEFAULT_ROOM_HANDOFF_MIN_RUNWAY_MINUTES) <= (rooms.handoffLifetimeMinutes ?? DEFAULT_ROOM_HANDOFF_LIFETIME_MINUTES) && (rooms.handoffLifetimeMinutes ?? DEFAULT_ROOM_HANDOFF_LIFETIME_MINUTES) <= (rooms.handoffHardCapMinutes ?? DEFAULT_ROOM_HANDOFF_HARD_CAP_MINUTES),
15870
15872
  { message: "rooms handoff bounds must satisfy handoffMinRunwayMinutes <= handoffLifetimeMinutes <= handoffHardCapMinutes" }
15871
15873
  );
15874
+ var mcpConfigSchema = external_exports.object({
15875
+ /** Ceiling (minutes) for one bot MCP tool call. Missing values resolve to
15876
+ * 10, preserving the historic chat-mcp-tools constant. */
15877
+ callTimeoutMinutes: external_exports.number().int().min(MIN_MCP_CALL_TIMEOUT_MINUTES).max(MAX_MCP_CALL_TIMEOUT_MINUTES).optional()
15878
+ }).strict();
15872
15879
  var localVmConfigSchema = external_exports.object({
15873
15880
  mode: external_exports.enum(["shared", "per-bot", "pool"]).optional(),
15874
15881
  maxInstances: external_exports.number().int().min(MIN_LOCAL_VM_MAX_INSTANCES).max(MAX_LOCAL_VM_MAX_INSTANCES).optional(),
@@ -16207,6 +16214,7 @@ var appConfigSchema = external_exports.object({
16207
16214
  * system language. Unknown tags degrade to English in the renderer. */
16208
16215
  language: optionalText,
16209
16216
  rooms: roomConfigSchema.optional(),
16217
+ mcp: mcpConfigSchema.optional(),
16210
16218
  context: external_exports.object({
16211
16219
  rebuildBytes: external_exports.number().int().min(1024).max(1e6).optional(),
16212
16220
  compactAt: external_exports.number().positive().max(1e7).optional(),
@@ -0,0 +1,54 @@
1
+ // The packaged desktop forks this file instead of the index.js beside it
2
+ // (electron/server-child-launch.mjs). It turns on Node's on-disk compile
3
+ // cache for this one process, so a relaunch reuses the compiled 5 MB bundle
4
+ // instead of parsing and compiling all of it again, then runs the server
5
+ // unchanged. Copied verbatim to dist-server/desktop-entry.mjs by
6
+ // scripts/bundle-server.mjs: bundling it would inline index.js and defeat
7
+ // the point.
8
+ import module from "node:module";
9
+ import { lstatSync, readdirSync, rmSync, utimesSync } from "node:fs";
10
+ import { basename, dirname, join, resolve } from "node:path";
11
+
12
+ const cacheRoot = process.env.OMB_SERVER_COMPILE_CACHE;
13
+ // Engine CLIs, MCP servers and terminals the server spawns must not inherit
14
+ // it. enableCompileCache does not set NODE_COMPILE_CACHE, so they inherit
15
+ // nothing from this.
16
+ delete process.env.OMB_SERVER_COMPILE_CACHE;
17
+
18
+ let enabled = false;
19
+ if (cacheRoot) {
20
+ try {
21
+ enabled = module.enableCompileCache(cacheRoot).status === module.constants.compileCacheStatus.ENABLED;
22
+ } catch {
23
+ // An unusable cache costs only the compile it would have saved.
24
+ }
25
+ }
26
+
27
+ await import("./index.js");
28
+
29
+ // Node writes new entries when the process exits normally; a crash or a
30
+ // Windows kill skips that, so write them once the server is up. Then drop
31
+ // caches of other Node versions (one is left behind by each Electron
32
+ // upgrade) that no launch has used for a day. Only `v<node version>-…`
33
+ // directories inside the cache root Node reports are ever removed.
34
+ if (enabled) {
35
+ setTimeout(() => {
36
+ try {
37
+ module.flushCompileCache();
38
+ const current = module.getCompileCacheDir();
39
+ if (dirname(current) !== resolve(cacheRoot)) return;
40
+ const now = new Date();
41
+ utimesSync(current, now, now);
42
+ for (const name of readdirSync(cacheRoot)) {
43
+ if (name === basename(current) || !/^v\d+\.\d+\.\d+-/.test(name)) continue;
44
+ const stale = join(cacheRoot, name);
45
+ const stat = lstatSync(stale);
46
+ if (stat.isDirectory() && now - stat.mtimeMs > 24 * 60 * 60 * 1000) {
47
+ rmSync(stale, { recursive: true, force: true });
48
+ }
49
+ }
50
+ } catch {
51
+ // Best effort: anything not written or removed now is retried next launch.
52
+ }
53
+ }, 10_000).unref();
54
+ }
@@ -131,6 +131,7 @@ function catalogProfileFromEnv(env) {
131
131
  voiceNotes: env.OMB_VOICE_NOTES === "1",
132
132
  cloudHome: env.OMB_CLOUD_HOME === "1",
133
133
  memoryEnabled: env.OMB_MEMORY_ENABLED !== "0",
134
+ chief: env.OMB_CHIEF_OF_STAFF === "1",
134
135
  botId: env.OMB_BOT_ID ?? ""
135
136
  };
136
137
  }
@@ -240,7 +241,7 @@ var ROUTINE_FIELDS_SCHEMA = {
240
241
  },
241
242
  continuity: {
242
243
  type: "boolean",
243
- description: "Opt in to using the latest completed run's bounded report as historical context. Defaults to false; set false in an update to start fresh again. Included in the applied result or pending confirmation."
244
+ description: "Opt in to using the latest completed run's bounded report as historical context. Use it for recurring work that builds on last time, such as QA passes, monitoring or follow-ups. Defaults to false; set false in an update to start fresh again. Included in the applied result or pending confirmation."
244
245
  },
245
246
  overlap: {
246
247
  type: "string",
@@ -248,6 +249,7 @@ var ROUTINE_FIELDS_SCHEMA = {
248
249
  description: "While this routine is still working, skip scheduled occurrences (default) or queue at most one run. Queue skips further occurrences until the pending run starts; it never builds an unlimited backlog. Manual and webhook requests are separate."
249
250
  }
250
251
  };
252
+ var CHIEF_PROFILE_TARGET = " A Chief of Staff may pass for_bot_id (from list_bots) for a requested change to another bot in its section.";
251
253
  var PROPOSAL_OUTCOME = " Read the result: granted Full Access may apply the change immediately. If applied, continue the requested work without another confirmation. Only a pending result requires ending the turn and waiting for the in-app decision. Never claim success from the permission mode alone; report failed or cancelled results honestly. This does not elevate another bot's execution permissions.";
252
254
  var toolDefinitions = (externalRuntime) => [
253
255
  {
@@ -755,7 +757,7 @@ var toolDefinitions = (externalRuntime) => [
755
757
  },
756
758
  {
757
759
  name: "propose_profile",
758
- description: "Submit user-requested changes to your own name, title, description, standing instructions (SOUL.md), working folder (cwd), or your alert and voice toggles (notifications, speakReplies). Keep SOUL.md short \u2014 who you are and the rules you never break; put step-by-step procedure into a skill instead. A Chief of Staff may pass for_bot_id (from list_bots) for a requested change to another bot in its section." + PROPOSAL_OUTCOME,
760
+ description: "Submit user-requested changes to your own name, title, description, standing instructions (SOUL.md), working folder (cwd), or your alert and voice toggles (notifications, speakReplies). Keep SOUL.md short \u2014 who you are and the rules you never break; put step-by-step procedure into a skill instead." + CHIEF_PROFILE_TARGET + PROPOSAL_OUTCOME,
759
761
  inputSchema: {
760
762
  type: "object",
761
763
  additionalProperties: false,
@@ -939,6 +941,16 @@ var toolDefinitions = (externalRuntime) => [
939
941
  var SKILL_TOOL_NAMES = /* @__PURE__ */ new Set(["skills_list", "skill_manage"]);
940
942
  var SHARED_COMPUTER_TOOL_NAMES = /* @__PURE__ */ new Set(["list_shared_computers", "shared_computer"]);
941
943
  var VOICE_TOOL_NAMES = /* @__PURE__ */ new Set(["send_voice_note"]);
944
+ var CHIEF_ONLY_TOOL_NAMES = /* @__PURE__ */ new Set([
945
+ "create_bot",
946
+ "list_team_setup",
947
+ "propose_team_setup",
948
+ "propose_bot_deletion",
949
+ "create_room",
950
+ "manage_room",
951
+ "retry_thread"
952
+ ]);
953
+ var CHIEF_TARGET_TOOL_NAMES = /* @__PURE__ */ new Set(["propose_profile", "propose_model"]);
942
954
  var ROOM_ONLY_TOOLS = /* @__PURE__ */ new Set(["list_room_targets", "coordinate_bots", "send_to_bot"]);
943
955
  var ROOM_REPLACED_TOOLS = /* @__PURE__ */ new Set(["ask_bot", "delegate_bot", "check_delegation", "wait_delegation", "start_thread"]);
944
956
  var EXTERNAL_TOOL_NAMES = /* @__PURE__ */ new Set(["list_bots", "ask_bot", "delegate_bot", "check_delegation", "wait_delegation"]);
@@ -959,14 +971,19 @@ function catalogTools(profile) {
959
971
  const AUTHORING_TOOLS = profile.skillAuthoring ? BOT_SCOPED_TOOLS : BOT_SCOPED_TOOLS.filter((tool) => !SKILL_TOOL_NAMES.has(tool.name));
960
972
  const SHAREABLE_TOOLS = profile.sharedComputers ? AUTHORING_TOOLS : AUTHORING_TOOLS.filter((tool) => !SHARED_COMPUTER_TOOL_NAMES.has(tool.name));
961
973
  const VOICE_READY_TOOLS = profile.voiceNotes ? SHAREABLE_TOOLS : SHAREABLE_TOOLS.filter((tool) => !VOICE_TOOL_NAMES.has(tool.name));
962
- return profile.externalRuntime ? BOT_SCOPED_TOOLS.filter((tool) => EXTERNAL_TOOL_NAMES.has(tool.name)) : profile.coordinating ? VOICE_READY_TOOLS.filter((tool) => !ROOM_REPLACED_TOOLS.has(tool.name) || tool.name === "start_thread" && profile.ownThreadCreation).map((tool) => tool.name === "start_thread" ? {
974
+ const ROLE_TOOLS = profile.chief ? VOICE_READY_TOOLS : VOICE_READY_TOOLS.filter((tool) => !CHIEF_ONLY_TOOL_NAMES.has(tool.name)).map((tool) => {
975
+ if (!CHIEF_TARGET_TOOL_NAMES.has(tool.name)) return tool;
976
+ const properties = Object.fromEntries(Object.entries(tool.inputSchema.properties).filter(([key]) => key !== "for_bot_id"));
977
+ return { ...tool, description: tool.description.replace(CHIEF_PROFILE_TARGET, ""), inputSchema: { ...tool.inputSchema, properties } };
978
+ });
979
+ return profile.externalRuntime ? BOT_SCOPED_TOOLS.filter((tool) => EXTERNAL_TOOL_NAMES.has(tool.name)) : profile.coordinating ? ROLE_TOOLS.filter((tool) => !ROOM_REPLACED_TOOLS.has(tool.name) || tool.name === "start_thread" && profile.ownThreadCreation).map((tool) => tool.name === "start_thread" ? {
963
980
  ...tool,
964
981
  description: "Open a separate job on yourself with its own history and run, without switching the person's selected conversation. Use only when the user requests independent jobs (for example one review per pull request). Give a short specific title and complete instructions; you can open at most five per turn. This is not a teammate handoff: use coordinate_bots for teammates and their automatic replies. Self-opened jobs cannot recursively open more jobs. If refused, do not retry; explain what remains.",
965
982
  inputSchema: { ...tool.inputSchema, properties: {
966
983
  ...tool.inputSchema.properties,
967
984
  bot_id: { type: "string", enum: [profile.botId], description: "Leave out, or use your own bot ID. For teammates use coordinate_bots." }
968
985
  } }
969
- } : tool) : VOICE_READY_TOOLS.filter((tool) => !ROOM_ONLY_TOOLS.has(tool.name));
986
+ } : tool) : ROLE_TOOLS.filter((tool) => !ROOM_ONLY_TOOLS.has(tool.name));
970
987
  }
971
988
 
972
989
  // node_modules/.pnpm/croner@10.0.1/node_modules/croner/dist/croner.js