@stanco323/oh-my-claude-code 4.10.3 → 4.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (387) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/README.md +65 -18
  4. package/bridge/cli.cjs +3030 -1784
  5. package/bridge/mcp-server.cjs +128 -98
  6. package/bridge/runtime-cli.cjs +174 -136
  7. package/bridge/team-bridge.cjs +102 -96
  8. package/bridge/team-mcp.cjs +40 -29
  9. package/bridge/team.js +102 -88
  10. package/dist/__tests__/auto-update.test.js +8 -9
  11. package/dist/__tests__/auto-update.test.js.map +1 -1
  12. package/dist/__tests__/cli-config-stop-callback.test.js +26 -0
  13. package/dist/__tests__/cli-config-stop-callback.test.js.map +1 -1
  14. package/dist/__tests__/config-dir.test.d.ts +2 -0
  15. package/dist/__tests__/config-dir.test.d.ts.map +1 -0
  16. package/dist/__tests__/config-dir.test.js +184 -0
  17. package/dist/__tests__/config-dir.test.js.map +1 -0
  18. package/dist/__tests__/delegation-enforcement-levels.test.js +45 -1
  19. package/dist/__tests__/delegation-enforcement-levels.test.js.map +1 -1
  20. package/dist/__tests__/doctor-conflicts.test.js +9 -7
  21. package/dist/__tests__/doctor-conflicts.test.js.map +1 -1
  22. package/dist/__tests__/hooks-command-escaping.test.js +17 -10
  23. package/dist/__tests__/hooks-command-escaping.test.js.map +1 -1
  24. package/dist/__tests__/hud/cli-diagnostic.test.js +1 -1
  25. package/dist/__tests__/hud/cli-diagnostic.test.js.map +1 -1
  26. package/dist/__tests__/hud/usage-api-lock.test.js +5 -5
  27. package/dist/__tests__/hud/usage-api-lock.test.js.map +1 -1
  28. package/dist/__tests__/hud/usage-api-stale.test.js +2 -2
  29. package/dist/__tests__/hud/usage-api-stale.test.js.map +1 -1
  30. package/dist/__tests__/hud/usage-api.test.js +98 -0
  31. package/dist/__tests__/hud/usage-api.test.js.map +1 -1
  32. package/dist/__tests__/hud-api-key-source.test.js +2 -2
  33. package/dist/__tests__/hud-api-key-source.test.js.map +1 -1
  34. package/dist/__tests__/hud-marketplace-resolution.test.js +3 -1
  35. package/dist/__tests__/hud-marketplace-resolution.test.js.map +1 -1
  36. package/dist/__tests__/hud-windows.test.js +7 -6
  37. package/dist/__tests__/hud-windows.test.js.map +1 -1
  38. package/dist/__tests__/installer-omc-reference.test.js +122 -6
  39. package/dist/__tests__/installer-omc-reference.test.js.map +1 -1
  40. package/dist/__tests__/installer.test.js +33 -9
  41. package/dist/__tests__/installer.test.js.map +1 -1
  42. package/dist/__tests__/omc-tools-server.test.js +5 -5
  43. package/dist/__tests__/pre-tool-enforcer.test.js +34 -14
  44. package/dist/__tests__/pre-tool-enforcer.test.js.map +1 -1
  45. package/dist/__tests__/preemptive-compaction-hook.test.d.ts +2 -0
  46. package/dist/__tests__/preemptive-compaction-hook.test.d.ts.map +1 -0
  47. package/dist/__tests__/preemptive-compaction-hook.test.js +163 -0
  48. package/dist/__tests__/preemptive-compaction-hook.test.js.map +1 -0
  49. package/dist/__tests__/purge-stale-cache.test.js +1 -1
  50. package/dist/__tests__/purge-stale-cache.test.js.map +1 -1
  51. package/dist/__tests__/release-generation.test.d.ts +2 -0
  52. package/dist/__tests__/release-generation.test.d.ts.map +1 -0
  53. package/dist/__tests__/release-generation.test.js +79 -0
  54. package/dist/__tests__/release-generation.test.js.map +1 -0
  55. package/dist/__tests__/runtime-guidance-plan-ralph.test.d.ts +2 -0
  56. package/dist/__tests__/runtime-guidance-plan-ralph.test.d.ts.map +1 -0
  57. package/dist/__tests__/runtime-guidance-plan-ralph.test.js +87 -0
  58. package/dist/__tests__/runtime-guidance-plan-ralph.test.js.map +1 -0
  59. package/dist/__tests__/session-history-search.test.js +31 -3
  60. package/dist/__tests__/session-history-search.test.js.map +1 -1
  61. package/dist/__tests__/setup-claude-md-script.test.js +9 -1
  62. package/dist/__tests__/setup-claude-md-script.test.js.map +1 -1
  63. package/dist/__tests__/setup-no-plugin-flag.test.d.ts +2 -0
  64. package/dist/__tests__/setup-no-plugin-flag.test.d.ts.map +1 -0
  65. package/dist/__tests__/setup-no-plugin-flag.test.js +15 -0
  66. package/dist/__tests__/setup-no-plugin-flag.test.js.map +1 -0
  67. package/dist/__tests__/shared-memory.test.js +40 -2
  68. package/dist/__tests__/shared-memory.test.js.map +1 -1
  69. package/dist/__tests__/skills.test.js +45 -1
  70. package/dist/__tests__/skills.test.js.map +1 -1
  71. package/dist/cli/__tests__/launch.test.js +48 -14
  72. package/dist/cli/__tests__/launch.test.js.map +1 -1
  73. package/dist/cli/commands/__tests__/team-role-shorthand.test.d.ts +2 -0
  74. package/dist/cli/commands/__tests__/team-role-shorthand.test.d.ts.map +1 -0
  75. package/dist/cli/commands/__tests__/team-role-shorthand.test.js +63 -0
  76. package/dist/cli/commands/__tests__/team-role-shorthand.test.js.map +1 -0
  77. package/dist/cli/commands/__tests__/team.test.js +21 -0
  78. package/dist/cli/commands/__tests__/team.test.js.map +1 -1
  79. package/dist/cli/commands/adapt.d.ts.map +1 -1
  80. package/dist/cli/commands/adapt.js.map +1 -1
  81. package/dist/cli/commands/doctor-conflicts.js +1 -1
  82. package/dist/cli/commands/doctor-conflicts.js.map +1 -1
  83. package/dist/cli/commands/team.d.ts.map +1 -1
  84. package/dist/cli/commands/team.js +30 -17
  85. package/dist/cli/commands/team.js.map +1 -1
  86. package/dist/cli/index.js +16 -7
  87. package/dist/cli/index.js.map +1 -1
  88. package/dist/cli/launch.d.ts.map +1 -1
  89. package/dist/cli/launch.js +22 -14
  90. package/dist/cli/launch.js.map +1 -1
  91. package/dist/commands/index.js +1 -1
  92. package/dist/commands/index.js.map +1 -1
  93. package/dist/constants/names.d.ts +1 -0
  94. package/dist/constants/names.d.ts.map +1 -1
  95. package/dist/constants/names.js +1 -0
  96. package/dist/constants/names.js.map +1 -1
  97. package/dist/features/auto-update.d.ts.map +1 -1
  98. package/dist/features/auto-update.js +4 -4
  99. package/dist/features/auto-update.js.map +1 -1
  100. package/dist/features/background-agent/manager.js +1 -1
  101. package/dist/features/background-agent/manager.js.map +1 -1
  102. package/dist/features/builtin-skills/runtime-guidance.d.ts.map +1 -1
  103. package/dist/features/builtin-skills/runtime-guidance.js +35 -3
  104. package/dist/features/builtin-skills/runtime-guidance.js.map +1 -1
  105. package/dist/features/builtin-skills/skills.d.ts.map +1 -1
  106. package/dist/features/builtin-skills/skills.js +53 -1
  107. package/dist/features/builtin-skills/skills.js.map +1 -1
  108. package/dist/features/session-history-search/index.d.ts.map +1 -1
  109. package/dist/features/session-history-search/index.js +1 -4
  110. package/dist/features/session-history-search/index.js.map +1 -1
  111. package/dist/hooks/__tests__/bridge-routing.test.js +4 -0
  112. package/dist/hooks/__tests__/bridge-routing.test.js.map +1 -1
  113. package/dist/hooks/__tests__/bridge.test.js +42 -1
  114. package/dist/hooks/__tests__/bridge.test.js.map +1 -1
  115. package/dist/hooks/auto-slash-command/executor.js +2 -2
  116. package/dist/hooks/auto-slash-command/executor.js.map +1 -1
  117. package/dist/hooks/autopilot/enforcement.d.ts.map +1 -1
  118. package/dist/hooks/autopilot/enforcement.js +20 -4
  119. package/dist/hooks/autopilot/enforcement.js.map +1 -1
  120. package/dist/hooks/bridge.d.ts +15 -0
  121. package/dist/hooks/bridge.d.ts.map +1 -1
  122. package/dist/hooks/bridge.js +38 -1
  123. package/dist/hooks/bridge.js.map +1 -1
  124. package/dist/hooks/factcheck/__tests__/factcheck.test.js +6 -5
  125. package/dist/hooks/factcheck/__tests__/factcheck.test.js.map +1 -1
  126. package/dist/hooks/factcheck/config.d.ts +2 -2
  127. package/dist/hooks/factcheck/config.d.ts.map +1 -1
  128. package/dist/hooks/factcheck/config.js +6 -4
  129. package/dist/hooks/factcheck/config.js.map +1 -1
  130. package/dist/hooks/index.d.ts +1 -1
  131. package/dist/hooks/index.d.ts.map +1 -1
  132. package/dist/hooks/index.js +1 -1
  133. package/dist/hooks/index.js.map +1 -1
  134. package/dist/hooks/learner/auto-invoke.js +1 -1
  135. package/dist/hooks/learner/auto-invoke.js.map +1 -1
  136. package/dist/hooks/learner/config.js +1 -1
  137. package/dist/hooks/learner/config.js.map +1 -1
  138. package/dist/hooks/learner/constants.js +1 -1
  139. package/dist/hooks/learner/constants.js.map +1 -1
  140. package/dist/hooks/omc-orchestrator/constants.d.ts +1 -1
  141. package/dist/hooks/omc-orchestrator/constants.d.ts.map +1 -1
  142. package/dist/hooks/omc-orchestrator/constants.js +2 -2
  143. package/dist/hooks/omc-orchestrator/constants.js.map +1 -1
  144. package/dist/hooks/omc-orchestrator/index.d.ts.map +1 -1
  145. package/dist/hooks/omc-orchestrator/index.js +10 -7
  146. package/dist/hooks/omc-orchestrator/index.js.map +1 -1
  147. package/dist/hooks/permission-handler/index.js +1 -1
  148. package/dist/hooks/permission-handler/index.js.map +1 -1
  149. package/dist/hooks/persistent-mode/index.d.ts.map +1 -1
  150. package/dist/hooks/persistent-mode/index.js +21 -4
  151. package/dist/hooks/persistent-mode/index.js.map +1 -1
  152. package/dist/hooks/persistent-mode/stop-hook-blocking.test.js +91 -0
  153. package/dist/hooks/persistent-mode/stop-hook-blocking.test.js.map +1 -1
  154. package/dist/hooks/rules-injector/constants.d.ts +0 -2
  155. package/dist/hooks/rules-injector/constants.d.ts.map +1 -1
  156. package/dist/hooks/rules-injector/constants.js +0 -2
  157. package/dist/hooks/rules-injector/constants.js.map +1 -1
  158. package/dist/hooks/rules-injector/finder.d.ts +3 -3
  159. package/dist/hooks/rules-injector/finder.d.ts.map +1 -1
  160. package/dist/hooks/rules-injector/finder.js +7 -6
  161. package/dist/hooks/rules-injector/finder.js.map +1 -1
  162. package/dist/hooks/rules-injector/index.d.ts +1 -1
  163. package/dist/hooks/rules-injector/index.d.ts.map +1 -1
  164. package/dist/hooks/rules-injector/index.js +3 -6
  165. package/dist/hooks/rules-injector/index.js.map +1 -1
  166. package/dist/hooks/setup/__tests__/stdin-symlink.test.d.ts +2 -0
  167. package/dist/hooks/setup/__tests__/stdin-symlink.test.d.ts.map +1 -0
  168. package/dist/hooks/setup/__tests__/stdin-symlink.test.js +184 -0
  169. package/dist/hooks/setup/__tests__/stdin-symlink.test.js.map +1 -0
  170. package/dist/hooks/setup/index.d.ts +13 -0
  171. package/dist/hooks/setup/index.d.ts.map +1 -1
  172. package/dist/hooks/setup/index.js +100 -2
  173. package/dist/hooks/setup/index.js.map +1 -1
  174. package/dist/hooks/skill-bridge.cjs +19 -13
  175. package/dist/hooks/subagent-tracker/index.d.ts.map +1 -1
  176. package/dist/hooks/subagent-tracker/index.js +7 -3
  177. package/dist/hooks/subagent-tracker/index.js.map +1 -1
  178. package/dist/hooks/todo-continuation/index.js +1 -1
  179. package/dist/hooks/todo-continuation/index.js.map +1 -1
  180. package/dist/hooks/wiki/__tests__/ingest.test.d.ts +5 -0
  181. package/dist/hooks/wiki/__tests__/ingest.test.d.ts.map +1 -0
  182. package/dist/hooks/wiki/__tests__/ingest.test.js +180 -0
  183. package/dist/hooks/wiki/__tests__/ingest.test.js.map +1 -0
  184. package/dist/hooks/wiki/__tests__/lint.test.d.ts +5 -0
  185. package/dist/hooks/wiki/__tests__/lint.test.d.ts.map +1 -0
  186. package/dist/hooks/wiki/__tests__/lint.test.js +162 -0
  187. package/dist/hooks/wiki/__tests__/lint.test.js.map +1 -0
  188. package/dist/hooks/wiki/__tests__/query.test.d.ts +5 -0
  189. package/dist/hooks/wiki/__tests__/query.test.d.ts.map +1 -0
  190. package/dist/hooks/wiki/__tests__/query.test.js +119 -0
  191. package/dist/hooks/wiki/__tests__/query.test.js.map +1 -0
  192. package/dist/hooks/wiki/__tests__/session-hooks.test.d.ts +5 -0
  193. package/dist/hooks/wiki/__tests__/session-hooks.test.d.ts.map +1 -0
  194. package/dist/hooks/wiki/__tests__/session-hooks.test.js +40 -0
  195. package/dist/hooks/wiki/__tests__/session-hooks.test.js.map +1 -0
  196. package/dist/hooks/wiki/__tests__/storage.test.d.ts +5 -0
  197. package/dist/hooks/wiki/__tests__/storage.test.d.ts.map +1 -0
  198. package/dist/hooks/wiki/__tests__/storage.test.js +277 -0
  199. package/dist/hooks/wiki/__tests__/storage.test.js.map +1 -0
  200. package/dist/hooks/wiki/index.d.ts +13 -0
  201. package/dist/hooks/wiki/index.d.ts.map +1 -0
  202. package/dist/hooks/wiki/index.js +16 -0
  203. package/dist/hooks/wiki/index.js.map +1 -0
  204. package/dist/hooks/wiki/ingest.d.ts +20 -0
  205. package/dist/hooks/wiki/ingest.d.ts.map +1 -0
  206. package/dist/hooks/wiki/ingest.js +115 -0
  207. package/dist/hooks/wiki/ingest.js.map +1 -0
  208. package/dist/hooks/wiki/lint.d.ts +25 -0
  209. package/dist/hooks/wiki/lint.d.ts.map +1 -0
  210. package/dist/hooks/wiki/lint.js +166 -0
  211. package/dist/hooks/wiki/lint.js.map +1 -0
  212. package/dist/hooks/wiki/query.d.ts +27 -0
  213. package/dist/hooks/wiki/query.d.ts.map +1 -0
  214. package/dist/hooks/wiki/query.js +97 -0
  215. package/dist/hooks/wiki/query.js.map +1 -0
  216. package/dist/hooks/wiki/session-hooks.d.ts +42 -0
  217. package/dist/hooks/wiki/session-hooks.d.ts.map +1 -0
  218. package/dist/hooks/wiki/session-hooks.js +228 -0
  219. package/dist/hooks/wiki/session-hooks.js.map +1 -0
  220. package/dist/hooks/wiki/storage.d.ts +73 -0
  221. package/dist/hooks/wiki/storage.d.ts.map +1 -0
  222. package/dist/hooks/wiki/storage.js +343 -0
  223. package/dist/hooks/wiki/storage.js.map +1 -0
  224. package/dist/hooks/wiki/types.d.ts +136 -0
  225. package/dist/hooks/wiki/types.d.ts.map +1 -0
  226. package/dist/hooks/wiki/types.js +19 -0
  227. package/dist/hooks/wiki/types.js.map +1 -0
  228. package/dist/hud/custom-rate-provider.js +1 -1
  229. package/dist/hud/custom-rate-provider.js.map +1 -1
  230. package/dist/hud/elements/api-key-source.js +1 -1
  231. package/dist/hud/elements/api-key-source.js.map +1 -1
  232. package/dist/hud/index.js +1 -1
  233. package/dist/hud/index.js.map +1 -1
  234. package/dist/hud/state.js +1 -1
  235. package/dist/hud/state.js.map +1 -1
  236. package/dist/hud/usage-api.d.ts.map +1 -1
  237. package/dist/hud/usage-api.js +6 -2
  238. package/dist/hud/usage-api.js.map +1 -1
  239. package/dist/installer/__tests__/standalone-hook-reconcile.test.js +3 -0
  240. package/dist/installer/__tests__/standalone-hook-reconcile.test.js.map +1 -1
  241. package/dist/installer/hooks.d.ts +0 -2
  242. package/dist/installer/hooks.d.ts.map +1 -1
  243. package/dist/installer/hooks.js +1 -5
  244. package/dist/installer/hooks.js.map +1 -1
  245. package/dist/installer/index.d.ts +3 -0
  246. package/dist/installer/index.d.ts.map +1 -1
  247. package/dist/installer/index.js +176 -32
  248. package/dist/installer/index.js.map +1 -1
  249. package/dist/installer/mcp-registry.js +2 -2
  250. package/dist/installer/mcp-registry.js.map +1 -1
  251. package/dist/lib/release-generation.d.ts +20 -0
  252. package/dist/lib/release-generation.d.ts.map +1 -0
  253. package/dist/lib/release-generation.js +198 -0
  254. package/dist/lib/release-generation.js.map +1 -0
  255. package/dist/lib/shared-memory.d.ts +2 -1
  256. package/dist/lib/shared-memory.d.ts.map +1 -1
  257. package/dist/lib/shared-memory.js +4 -2
  258. package/dist/lib/shared-memory.js.map +1 -1
  259. package/dist/lib/worktree-paths.d.ts.map +1 -1
  260. package/dist/lib/worktree-paths.js +36 -10
  261. package/dist/lib/worktree-paths.js.map +1 -1
  262. package/dist/mcp/omc-tools-server.d.ts +2 -0
  263. package/dist/mcp/omc-tools-server.d.ts.map +1 -1
  264. package/dist/mcp/omc-tools-server.js +9 -2
  265. package/dist/mcp/omc-tools-server.js.map +1 -1
  266. package/dist/notifications/__tests__/config-merge.test.js +1 -1
  267. package/dist/notifications/__tests__/config-merge.test.js.map +1 -1
  268. package/dist/notifications/__tests__/profiles.test.js +1 -1
  269. package/dist/notifications/__tests__/profiles.test.js.map +1 -1
  270. package/dist/notifications/config.js +1 -1
  271. package/dist/notifications/config.js.map +1 -1
  272. package/dist/notifications/hook-config.js +1 -1
  273. package/dist/notifications/hook-config.js.map +1 -1
  274. package/dist/openclaw/__tests__/config.test.js +1 -1
  275. package/dist/openclaw/__tests__/config.test.js.map +1 -1
  276. package/dist/openclaw/config.js +1 -1
  277. package/dist/openclaw/config.js.map +1 -1
  278. package/dist/skills/__tests__/mingw-escape.test.js +1 -1
  279. package/dist/skills/__tests__/mingw-escape.test.js.map +1 -1
  280. package/dist/team/__tests__/api-interop.dispatch.test.js +2 -1
  281. package/dist/team/__tests__/api-interop.dispatch.test.js.map +1 -1
  282. package/dist/team/__tests__/bridge-integration.test.js +5 -3
  283. package/dist/team/__tests__/bridge-integration.test.js.map +1 -1
  284. package/dist/team/__tests__/edge-cases.test.js +6 -7
  285. package/dist/team/__tests__/edge-cases.test.js.map +1 -1
  286. package/dist/team/__tests__/inbox-outbox.test.js +2 -2
  287. package/dist/team/__tests__/inbox-outbox.test.js.map +1 -1
  288. package/dist/team/__tests__/message-router.test.js +6 -5
  289. package/dist/team/__tests__/message-router.test.js.map +1 -1
  290. package/dist/team/__tests__/outbox-reader.test.js +2 -2
  291. package/dist/team/__tests__/outbox-reader.test.js.map +1 -1
  292. package/dist/team/__tests__/runtime-v2.dispatch.test.js +4 -4
  293. package/dist/team/__tests__/runtime-v2.dispatch.test.js.map +1 -1
  294. package/dist/team/__tests__/shell-affinity.test.js +16 -0
  295. package/dist/team/__tests__/shell-affinity.test.js.map +1 -1
  296. package/dist/team/__tests__/team-registration.test.js +3 -2
  297. package/dist/team/__tests__/team-registration.test.js.map +1 -1
  298. package/dist/team/__tests__/team-status.test.js +3 -3
  299. package/dist/team/__tests__/team-status.test.js.map +1 -1
  300. package/dist/team/__tests__/tmux-session.test.js +6 -1
  301. package/dist/team/__tests__/tmux-session.test.js.map +1 -1
  302. package/dist/team/bridge-entry.js +1 -1
  303. package/dist/team/bridge-entry.js.map +1 -1
  304. package/dist/team/inbox-outbox.js +1 -1
  305. package/dist/team/inbox-outbox.js.map +1 -1
  306. package/dist/team/message-router.js +1 -1
  307. package/dist/team/message-router.js.map +1 -1
  308. package/dist/team/outbox-reader.js +1 -1
  309. package/dist/team/outbox-reader.js.map +1 -1
  310. package/dist/team/runtime-v2.d.ts.map +1 -1
  311. package/dist/team/runtime-v2.js +6 -17
  312. package/dist/team/runtime-v2.js.map +1 -1
  313. package/dist/team/task-file-ops.js +1 -1
  314. package/dist/team/task-file-ops.js.map +1 -1
  315. package/dist/team/team-registration.js +1 -1
  316. package/dist/team/team-registration.js.map +1 -1
  317. package/dist/team/team-status.js +1 -1
  318. package/dist/team/team-status.js.map +1 -1
  319. package/dist/team/tmux-session.d.ts +1 -1
  320. package/dist/team/tmux-session.d.ts.map +1 -1
  321. package/dist/team/tmux-session.js +39 -4
  322. package/dist/team/tmux-session.js.map +1 -1
  323. package/dist/team/unified-team.js +1 -1
  324. package/dist/team/unified-team.js.map +1 -1
  325. package/dist/tools/shared-memory-tools.d.ts.map +1 -1
  326. package/dist/tools/shared-memory-tools.js +2 -1
  327. package/dist/tools/shared-memory-tools.js.map +1 -1
  328. package/dist/tools/skills-tools.d.ts.map +1 -1
  329. package/dist/tools/skills-tools.js +3 -2
  330. package/dist/tools/skills-tools.js.map +1 -1
  331. package/dist/tools/wiki-tools.d.ts +74 -0
  332. package/dist/tools/wiki-tools.d.ts.map +1 -0
  333. package/dist/tools/wiki-tools.js +370 -0
  334. package/dist/tools/wiki-tools.js.map +1 -0
  335. package/dist/utils/config-dir.d.ts +21 -1
  336. package/dist/utils/config-dir.d.ts.map +1 -1
  337. package/dist/utils/config-dir.js +45 -4
  338. package/dist/utils/config-dir.js.map +1 -1
  339. package/dist/utils/paths.d.ts +0 -5
  340. package/dist/utils/paths.d.ts.map +1 -1
  341. package/dist/utils/paths.js +1 -8
  342. package/dist/utils/paths.js.map +1 -1
  343. package/docs/CLAUDE.md +1 -1
  344. package/hooks/hooks.json +15 -0
  345. package/package.json +1 -1
  346. package/scripts/cleanup-orphans.mjs +2 -2
  347. package/scripts/context-guard-stop.mjs +10 -4
  348. package/scripts/find-node.sh +13 -1
  349. package/scripts/keyword-detector.mjs +9 -2
  350. package/scripts/lib/config-dir.cjs +31 -0
  351. package/scripts/lib/config-dir.mjs +29 -0
  352. package/scripts/lib/config-dir.sh +18 -0
  353. package/scripts/lib/pre-tool-enforcer-preflight.mjs +63 -0
  354. package/scripts/persistent-mode.cjs +29 -6
  355. package/scripts/persistent-mode.mjs +24 -4
  356. package/scripts/plugin-setup.mjs +18 -7
  357. package/scripts/post-tool-verifier.mjs +200 -7
  358. package/scripts/pre-tool-enforcer.mjs +15 -56
  359. package/scripts/release.ts +158 -224
  360. package/scripts/session-start.mjs +6 -4
  361. package/scripts/session-summary.mjs +6 -1
  362. package/scripts/setup-claude-md.sh +4 -2
  363. package/scripts/setup-progress.sh +4 -1
  364. package/scripts/skill-injector.mjs +2 -1
  365. package/scripts/sync-version.sh +3 -3
  366. package/scripts/test-pr25.sh +9 -5
  367. package/scripts/uninstall.sh +5 -2
  368. package/scripts/wiki-pre-compact.mjs +17 -0
  369. package/scripts/wiki-session-end.mjs +17 -0
  370. package/scripts/wiki-session-start.mjs +17 -0
  371. package/skills/cancel/SKILL.md +4 -4
  372. package/skills/configure-notifications/SKILL.md +12 -12
  373. package/skills/hud/SKILL.md +4 -4
  374. package/skills/learner/SKILL.md +1 -1
  375. package/skills/omc-doctor/SKILL.md +25 -25
  376. package/skills/omc-setup/SKILL.md +1 -1
  377. package/skills/omc-setup/phases/02-configure.md +2 -2
  378. package/skills/omc-setup/phases/03-integrations.md +7 -7
  379. package/skills/omc-setup/phases/04-welcome.md +3 -3
  380. package/skills/ralph/SKILL.md +6 -2
  381. package/skills/skill/SKILL.md +9 -9
  382. package/skills/team/SKILL.md +1 -1
  383. package/skills/wiki/SKILL.md +67 -0
  384. package/templates/hooks/keyword-detector.mjs +4 -2
  385. package/templates/hooks/lib/config-dir.mjs +29 -0
  386. package/templates/hooks/persistent-mode.mjs +24 -4
  387. package/templates/hooks/session-start.mjs +7 -4
@@ -46,13 +46,13 @@ __export(bridge_entry_exports, {
46
46
  validateConfigPath: () => validateConfigPath
47
47
  });
48
48
  module.exports = __toCommonJS(bridge_entry_exports);
49
- var import_fs13 = require("fs");
49
+ var import_fs12 = require("fs");
50
50
  var import_path12 = require("path");
51
51
  var import_os3 = require("os");
52
52
 
53
53
  // src/team/mcp-team-bridge.ts
54
54
  var import_child_process3 = require("child_process");
55
- var import_fs11 = require("fs");
55
+ var import_fs10 = require("fs");
56
56
  var import_path10 = require("path");
57
57
 
58
58
  // src/team/fs-utils.ts
@@ -102,30 +102,36 @@ function validateResolvedPath(resolvedPath, expectedBase) {
102
102
  }
103
103
 
104
104
  // src/team/task-file-ops.ts
105
- var import_fs5 = require("fs");
105
+ var import_fs4 = require("fs");
106
106
  var import_path5 = require("path");
107
107
 
108
- // src/utils/paths.ts
108
+ // src/utils/config-dir.ts
109
109
  var import_path2 = require("path");
110
- var import_fs2 = require("fs");
111
110
  var import_os = require("os");
112
-
113
- // src/utils/config-dir.ts
114
- var import_node_os = require("node:os");
115
- var import_node_path = require("node:path");
116
- function getConfigDir() {
117
- return process.env.CLAUDE_CONFIG_DIR || (0, import_node_path.join)((0, import_node_os.homedir)(), ".claude");
111
+ function stripTrailingSep(p) {
112
+ if (!p.endsWith(import_path2.sep)) {
113
+ return p;
114
+ }
115
+ return p === (0, import_path2.parse)(p).root ? p : p.slice(0, -1);
118
116
  }
119
-
120
- // src/utils/paths.ts
121
117
  function getClaudeConfigDir() {
122
- return getConfigDir();
118
+ const home = (0, import_os.homedir)();
119
+ const configured = process.env.CLAUDE_CONFIG_DIR?.trim();
120
+ if (!configured) {
121
+ return stripTrailingSep((0, import_path2.normalize)((0, import_path2.join)(home, ".claude")));
122
+ }
123
+ if (configured === "~") {
124
+ return stripTrailingSep((0, import_path2.normalize)(home));
125
+ }
126
+ if (configured.startsWith("~/") || configured.startsWith("~\\")) {
127
+ return stripTrailingSep((0, import_path2.normalize)((0, import_path2.join)(home, configured.slice(2))));
128
+ }
129
+ return stripTrailingSep((0, import_path2.normalize)(configured));
123
130
  }
124
- var STALE_THRESHOLD_MS = 24 * 60 * 60 * 1e3;
125
131
 
126
132
  // src/team/tmux-session.ts
127
133
  var import_child_process = require("child_process");
128
- var import_fs3 = require("fs");
134
+ var import_fs2 = require("fs");
129
135
  var import_path3 = require("path");
130
136
  var import_util = require("util");
131
137
  var import_promises = __toESM(require("fs/promises"), 1);
@@ -155,7 +161,7 @@ function killSession(teamName, workerName) {
155
161
 
156
162
  // src/platform/index.ts
157
163
  var path = __toESM(require("path"), 1);
158
- var import_fs4 = require("fs");
164
+ var import_fs3 = require("fs");
159
165
 
160
166
  // src/platform/process-utils.ts
161
167
  var import_child_process2 = require("child_process");
@@ -240,19 +246,19 @@ function acquireTaskLock(teamName, taskId, opts) {
240
246
  const lockPath = (0, import_path5.join)(dir, `${sanitizeTaskId(taskId)}.lock`);
241
247
  for (let attempt = 0; attempt < 2; attempt++) {
242
248
  try {
243
- const fd = (0, import_fs5.openSync)(lockPath, import_fs5.constants.O_CREAT | import_fs5.constants.O_EXCL | import_fs5.constants.O_WRONLY, 384);
249
+ const fd = (0, import_fs4.openSync)(lockPath, import_fs4.constants.O_CREAT | import_fs4.constants.O_EXCL | import_fs4.constants.O_WRONLY, 384);
244
250
  const payload = JSON.stringify({
245
251
  pid: process.pid,
246
252
  workerName: opts?.workerName ?? "",
247
253
  timestamp: Date.now()
248
254
  });
249
- (0, import_fs5.writeSync)(fd, payload, null, "utf-8");
255
+ (0, import_fs4.writeSync)(fd, payload, null, "utf-8");
250
256
  return { fd, path: lockPath };
251
257
  } catch (err) {
252
258
  if (err && typeof err === "object" && "code" in err && err.code === "EEXIST") {
253
259
  if (attempt === 0 && isLockStale(lockPath, staleLockMs)) {
254
260
  try {
255
- (0, import_fs5.unlinkSync)(lockPath);
261
+ (0, import_fs4.unlinkSync)(lockPath);
256
262
  } catch {
257
263
  }
258
264
  continue;
@@ -266,21 +272,21 @@ function acquireTaskLock(teamName, taskId, opts) {
266
272
  }
267
273
  function releaseTaskLock(handle) {
268
274
  try {
269
- (0, import_fs5.closeSync)(handle.fd);
275
+ (0, import_fs4.closeSync)(handle.fd);
270
276
  } catch {
271
277
  }
272
278
  try {
273
- (0, import_fs5.unlinkSync)(handle.path);
279
+ (0, import_fs4.unlinkSync)(handle.path);
274
280
  } catch {
275
281
  }
276
282
  }
277
283
  function isLockStale(lockPath, staleLockMs) {
278
284
  try {
279
- const stat = (0, import_fs5.statSync)(lockPath);
285
+ const stat = (0, import_fs4.statSync)(lockPath);
280
286
  const ageMs = Date.now() - stat.mtimeMs;
281
287
  if (ageMs < staleLockMs) return false;
282
288
  try {
283
- const raw = (0, import_fs5.readFileSync)(lockPath, "utf-8");
289
+ const raw = (0, import_fs4.readFileSync)(lockPath, "utf-8");
284
290
  const payload = JSON.parse(raw);
285
291
  if (payload.pid && isProcessAlive(payload.pid)) return false;
286
292
  } catch {
@@ -310,9 +316,9 @@ function legacyTasksDir(teamName) {
310
316
  }
311
317
  function resolveTaskPathForRead(teamName, taskId, cwd) {
312
318
  const canonical = (0, import_path5.join)(canonicalTasksDir(teamName, cwd), `${sanitizeTaskId(taskId)}.json`);
313
- if ((0, import_fs5.existsSync)(canonical)) return canonical;
319
+ if ((0, import_fs4.existsSync)(canonical)) return canonical;
314
320
  const legacy = (0, import_path5.join)(legacyTasksDir(teamName), `${sanitizeTaskId(taskId)}.json`);
315
- if ((0, import_fs5.existsSync)(legacy)) return legacy;
321
+ if ((0, import_fs4.existsSync)(legacy)) return legacy;
316
322
  return canonical;
317
323
  }
318
324
  function resolveTaskPathForWrite(teamName, taskId, cwd) {
@@ -323,9 +329,9 @@ function failureSidecarPath(teamName, taskId, cwd) {
323
329
  }
324
330
  function readTask(teamName, taskId, opts) {
325
331
  const filePath = resolveTaskPathForRead(teamName, taskId, opts?.cwd);
326
- if (!(0, import_fs5.existsSync)(filePath)) return null;
332
+ if (!(0, import_fs4.existsSync)(filePath)) return null;
327
333
  try {
328
- const raw = (0, import_fs5.readFileSync)(filePath, "utf-8");
334
+ const raw = (0, import_fs4.readFileSync)(filePath, "utf-8");
329
335
  return JSON.parse(raw);
330
336
  } catch {
331
337
  return null;
@@ -337,7 +343,7 @@ function updateTask(teamName, taskId, updates, opts) {
337
343
  const readPath = resolveTaskPathForRead(teamName, taskId, opts?.cwd);
338
344
  let task;
339
345
  try {
340
- const raw = (0, import_fs5.readFileSync)(readPath, "utf-8");
346
+ const raw = (0, import_fs4.readFileSync)(readPath, "utf-8");
341
347
  task = JSON.parse(raw);
342
348
  } catch {
343
349
  throw new Error(`Task file not found or malformed: ${taskId}`);
@@ -366,7 +372,7 @@ function updateTask(teamName, taskId, updates, opts) {
366
372
  }
367
373
  async function findNextTask(teamName, workerName, opts) {
368
374
  const dir = canonicalTasksDir(teamName, opts?.cwd);
369
- if (!(0, import_fs5.existsSync)(dir)) return null;
375
+ if (!(0, import_fs4.existsSync)(dir)) return null;
370
376
  const taskIds = listTaskIds(teamName, opts);
371
377
  for (const id of taskIds) {
372
378
  const task = readTask(teamName, id, opts);
@@ -385,7 +391,7 @@ async function findNextTask(teamName, workerName, opts) {
385
391
  let taskData;
386
392
  try {
387
393
  const readPath = resolveTaskPathForRead(teamName, id, opts?.cwd);
388
- const raw = (0, import_fs5.readFileSync)(readPath, "utf-8");
394
+ const raw = (0, import_fs4.readFileSync)(readPath, "utf-8");
389
395
  taskData = JSON.parse(raw);
390
396
  } catch {
391
397
  continue;
@@ -424,9 +430,9 @@ function writeTaskFailure(teamName, taskId, error, opts) {
424
430
  }
425
431
  function readTaskFailure(teamName, taskId, opts) {
426
432
  const filePath = failureSidecarPath(teamName, taskId, opts?.cwd);
427
- if (!(0, import_fs5.existsSync)(filePath)) return null;
433
+ if (!(0, import_fs4.existsSync)(filePath)) return null;
428
434
  try {
429
- const raw = (0, import_fs5.readFileSync)(filePath, "utf-8");
435
+ const raw = (0, import_fs4.readFileSync)(filePath, "utf-8");
430
436
  return JSON.parse(raw);
431
437
  } catch {
432
438
  return null;
@@ -434,9 +440,9 @@ function readTaskFailure(teamName, taskId, opts) {
434
440
  }
435
441
  function listTaskIds(teamName, opts) {
436
442
  const scanDir = (dir) => {
437
- if (!(0, import_fs5.existsSync)(dir)) return [];
443
+ if (!(0, import_fs4.existsSync)(dir)) return [];
438
444
  try {
439
- return (0, import_fs5.readdirSync)(dir).filter((f) => f.endsWith(".json") && !f.includes(".tmp.") && !f.includes(".failure.") && !f.endsWith(".lock")).map((f) => f.replace(".json", ""));
445
+ return (0, import_fs4.readdirSync)(dir).filter((f) => f.endsWith(".json") && !f.includes(".tmp.") && !f.includes(".failure.") && !f.endsWith(".lock")).map((f) => f.replace(".json", ""));
440
446
  } catch {
441
447
  return [];
442
448
  }
@@ -454,7 +460,7 @@ function listTaskIds(teamName, opts) {
454
460
  }
455
461
 
456
462
  // src/team/inbox-outbox.ts
457
- var import_fs6 = require("fs");
463
+ var import_fs5 = require("fs");
458
464
  var import_path6 = require("path");
459
465
  var MAX_INBOX_READ_SIZE = 10 * 1024 * 1024;
460
466
  function teamsDir(teamName) {
@@ -488,32 +494,32 @@ function appendOutbox(teamName, workerName, message) {
488
494
  }
489
495
  function rotateOutboxIfNeeded(teamName, workerName, maxLines) {
490
496
  const filePath = outboxPath(teamName, workerName);
491
- if (!(0, import_fs6.existsSync)(filePath)) return;
497
+ if (!(0, import_fs5.existsSync)(filePath)) return;
492
498
  try {
493
- const content = (0, import_fs6.readFileSync)(filePath, "utf-8");
499
+ const content = (0, import_fs5.readFileSync)(filePath, "utf-8");
494
500
  const lines = content.split("\n").filter((l) => l.trim());
495
501
  if (lines.length <= maxLines) return;
496
502
  const keepCount = Math.floor(maxLines / 2);
497
503
  const kept = keepCount === 0 ? [] : lines.slice(-keepCount);
498
504
  const tmpPath = `${filePath}.tmp.${process.pid}.${Date.now()}`;
499
505
  writeFileWithMode(tmpPath, kept.join("\n") + "\n");
500
- (0, import_fs6.renameSync)(tmpPath, filePath);
506
+ (0, import_fs5.renameSync)(tmpPath, filePath);
501
507
  } catch {
502
508
  }
503
509
  }
504
510
  function rotateInboxIfNeeded(teamName, workerName, maxSizeBytes) {
505
511
  const filePath = inboxPath(teamName, workerName);
506
- if (!(0, import_fs6.existsSync)(filePath)) return;
512
+ if (!(0, import_fs5.existsSync)(filePath)) return;
507
513
  try {
508
- const stat = (0, import_fs6.statSync)(filePath);
514
+ const stat = (0, import_fs5.statSync)(filePath);
509
515
  if (stat.size <= maxSizeBytes) return;
510
- const content = (0, import_fs6.readFileSync)(filePath, "utf-8");
516
+ const content = (0, import_fs5.readFileSync)(filePath, "utf-8");
511
517
  const lines = content.split("\n").filter((l) => l.trim());
512
518
  const keepCount = Math.max(1, Math.floor(lines.length / 2));
513
519
  const kept = lines.slice(-keepCount);
514
520
  const tmpPath = `${filePath}.tmp.${process.pid}.${Date.now()}`;
515
521
  writeFileWithMode(tmpPath, kept.join("\n") + "\n");
516
- (0, import_fs6.renameSync)(tmpPath, filePath);
522
+ (0, import_fs5.renameSync)(tmpPath, filePath);
517
523
  const cursorFile = inboxCursorPath(teamName, workerName);
518
524
  atomicWriteJson(cursorFile, { bytesRead: 0 });
519
525
  } catch {
@@ -522,16 +528,16 @@ function rotateInboxIfNeeded(teamName, workerName, maxSizeBytes) {
522
528
  function readNewInboxMessages(teamName, workerName) {
523
529
  const inbox = inboxPath(teamName, workerName);
524
530
  const cursorFile = inboxCursorPath(teamName, workerName);
525
- if (!(0, import_fs6.existsSync)(inbox)) return [];
531
+ if (!(0, import_fs5.existsSync)(inbox)) return [];
526
532
  let offset = 0;
527
- if ((0, import_fs6.existsSync)(cursorFile)) {
533
+ if ((0, import_fs5.existsSync)(cursorFile)) {
528
534
  try {
529
- const cursor = JSON.parse((0, import_fs6.readFileSync)(cursorFile, "utf-8"));
535
+ const cursor = JSON.parse((0, import_fs5.readFileSync)(cursorFile, "utf-8"));
530
536
  offset = cursor.bytesRead;
531
537
  } catch {
532
538
  }
533
539
  }
534
- const stat = (0, import_fs6.statSync)(inbox);
540
+ const stat = (0, import_fs5.statSync)(inbox);
535
541
  if (stat.size < offset) {
536
542
  offset = 0;
537
543
  }
@@ -541,12 +547,12 @@ function readNewInboxMessages(teamName, workerName) {
541
547
  if (cappedSize < readSize) {
542
548
  console.warn(`[inbox-outbox] Inbox for ${workerName} exceeds ${MAX_INBOX_READ_SIZE} bytes, reading truncated`);
543
549
  }
544
- const fd = (0, import_fs6.openSync)(inbox, "r");
550
+ const fd = (0, import_fs5.openSync)(inbox, "r");
545
551
  const buffer = Buffer.alloc(cappedSize);
546
552
  try {
547
- (0, import_fs6.readSync)(fd, buffer, 0, buffer.length, offset);
553
+ (0, import_fs5.readSync)(fd, buffer, 0, buffer.length, offset);
548
554
  } finally {
549
- (0, import_fs6.closeSync)(fd);
555
+ (0, import_fs5.closeSync)(fd);
550
556
  }
551
557
  const newData = buffer.toString("utf-8");
552
558
  const lastNewlineIdx = newData.lastIndexOf("\n");
@@ -583,9 +589,9 @@ function readNewInboxMessages(teamName, workerName) {
583
589
  }
584
590
  function checkShutdownSignal(teamName, workerName) {
585
591
  const filePath = signalPath(teamName, workerName);
586
- if (!(0, import_fs6.existsSync)(filePath)) return null;
592
+ if (!(0, import_fs5.existsSync)(filePath)) return null;
587
593
  try {
588
- const raw = (0, import_fs6.readFileSync)(filePath, "utf-8");
594
+ const raw = (0, import_fs5.readFileSync)(filePath, "utf-8");
589
595
  return JSON.parse(raw);
590
596
  } catch {
591
597
  return null;
@@ -593,18 +599,18 @@ function checkShutdownSignal(teamName, workerName) {
593
599
  }
594
600
  function deleteShutdownSignal(teamName, workerName) {
595
601
  const filePath = signalPath(teamName, workerName);
596
- if ((0, import_fs6.existsSync)(filePath)) {
602
+ if ((0, import_fs5.existsSync)(filePath)) {
597
603
  try {
598
- (0, import_fs6.unlinkSync)(filePath);
604
+ (0, import_fs5.unlinkSync)(filePath);
599
605
  } catch {
600
606
  }
601
607
  }
602
608
  }
603
609
  function checkDrainSignal(teamName, workerName) {
604
610
  const filePath = drainSignalPath(teamName, workerName);
605
- if (!(0, import_fs6.existsSync)(filePath)) return null;
611
+ if (!(0, import_fs5.existsSync)(filePath)) return null;
606
612
  try {
607
- const raw = (0, import_fs6.readFileSync)(filePath, "utf-8");
613
+ const raw = (0, import_fs5.readFileSync)(filePath, "utf-8");
608
614
  return JSON.parse(raw);
609
615
  } catch {
610
616
  return null;
@@ -612,20 +618,20 @@ function checkDrainSignal(teamName, workerName) {
612
618
  }
613
619
  function deleteDrainSignal(teamName, workerName) {
614
620
  const filePath = drainSignalPath(teamName, workerName);
615
- if ((0, import_fs6.existsSync)(filePath)) {
621
+ if ((0, import_fs5.existsSync)(filePath)) {
616
622
  try {
617
- (0, import_fs6.unlinkSync)(filePath);
623
+ (0, import_fs5.unlinkSync)(filePath);
618
624
  } catch {
619
625
  }
620
626
  }
621
627
  }
622
628
 
623
629
  // src/team/team-registration.ts
624
- var import_fs8 = require("fs");
630
+ var import_fs7 = require("fs");
625
631
  var import_path7 = require("path");
626
632
 
627
633
  // src/lib/file-lock.ts
628
- var import_fs7 = require("fs");
634
+ var import_fs6 = require("fs");
629
635
  var path3 = __toESM(require("path"), 1);
630
636
 
631
637
  // src/lib/atomic-write.ts
@@ -647,9 +653,9 @@ function shadowRegistryPath(workingDirectory) {
647
653
  }
648
654
  function unregisterMcpWorker(teamName, workerName, workingDirectory) {
649
655
  const configFile = configPath(teamName);
650
- if ((0, import_fs8.existsSync)(configFile)) {
656
+ if ((0, import_fs7.existsSync)(configFile)) {
651
657
  try {
652
- const raw = (0, import_fs8.readFileSync)(configFile, "utf-8");
658
+ const raw = (0, import_fs7.readFileSync)(configFile, "utf-8");
653
659
  const config = JSON.parse(raw);
654
660
  const members = Array.isArray(config.members) ? config.members : [];
655
661
  config.members = members.filter((m) => m.name !== workerName);
@@ -658,9 +664,9 @@ function unregisterMcpWorker(teamName, workerName, workingDirectory) {
658
664
  }
659
665
  }
660
666
  const shadowFile = shadowRegistryPath(workingDirectory);
661
- if ((0, import_fs8.existsSync)(shadowFile)) {
667
+ if ((0, import_fs7.existsSync)(shadowFile)) {
662
668
  try {
663
- const registry = JSON.parse((0, import_fs8.readFileSync)(shadowFile, "utf-8"));
669
+ const registry = JSON.parse((0, import_fs7.readFileSync)(shadowFile, "utf-8"));
664
670
  registry.workers = (registry.workers || []).filter((w) => w.name !== workerName);
665
671
  atomicWriteJson(shadowFile, registry);
666
672
  } catch {
@@ -673,9 +679,9 @@ function isMcpWorker(member) {
673
679
  function listMcpWorkers(teamName, workingDirectory) {
674
680
  const workers = /* @__PURE__ */ new Map();
675
681
  const configFile = configPath(teamName);
676
- if ((0, import_fs8.existsSync)(configFile)) {
682
+ if ((0, import_fs7.existsSync)(configFile)) {
677
683
  try {
678
- const raw = (0, import_fs8.readFileSync)(configFile, "utf-8");
684
+ const raw = (0, import_fs7.readFileSync)(configFile, "utf-8");
679
685
  const config = JSON.parse(raw);
680
686
  const members = Array.isArray(config.members) ? config.members : [];
681
687
  for (const m of members) {
@@ -687,9 +693,9 @@ function listMcpWorkers(teamName, workingDirectory) {
687
693
  }
688
694
  }
689
695
  const shadowFile = shadowRegistryPath(workingDirectory);
690
- if ((0, import_fs8.existsSync)(shadowFile)) {
696
+ if ((0, import_fs7.existsSync)(shadowFile)) {
691
697
  try {
692
- const registry = JSON.parse((0, import_fs8.readFileSync)(shadowFile, "utf-8"));
698
+ const registry = JSON.parse((0, import_fs7.readFileSync)(shadowFile, "utf-8"));
693
699
  for (const w of registry.workers || []) {
694
700
  workers.set(w.name, w);
695
701
  }
@@ -700,7 +706,7 @@ function listMcpWorkers(teamName, workingDirectory) {
700
706
  }
701
707
 
702
708
  // src/team/heartbeat.ts
703
- var import_fs9 = require("fs");
709
+ var import_fs8 = require("fs");
704
710
  var import_path8 = require("path");
705
711
  function heartbeatPath(workingDirectory, teamName, workerName) {
706
712
  return (0, import_path8.join)(workingDirectory, ".omc", "state", "team-bridge", sanitizeName(teamName), `${sanitizeName(workerName)}.heartbeat.json`);
@@ -711,9 +717,9 @@ function writeHeartbeat(workingDirectory, data) {
711
717
  }
712
718
  function readHeartbeat(workingDirectory, teamName, workerName) {
713
719
  const filePath = heartbeatPath(workingDirectory, teamName, workerName);
714
- if (!(0, import_fs9.existsSync)(filePath)) return null;
720
+ if (!(0, import_fs8.existsSync)(filePath)) return null;
715
721
  try {
716
- const raw = (0, import_fs9.readFileSync)(filePath, "utf-8");
722
+ const raw = (0, import_fs8.readFileSync)(filePath, "utf-8");
717
723
  return JSON.parse(raw);
718
724
  } catch {
719
725
  return null;
@@ -732,23 +738,23 @@ function isWorkerAlive(workingDirectory, teamName, workerName, maxAgeMs) {
732
738
  }
733
739
  function deleteHeartbeat(workingDirectory, teamName, workerName) {
734
740
  const filePath = heartbeatPath(workingDirectory, teamName, workerName);
735
- if ((0, import_fs9.existsSync)(filePath)) {
741
+ if ((0, import_fs8.existsSync)(filePath)) {
736
742
  try {
737
- (0, import_fs9.unlinkSync)(filePath);
743
+ (0, import_fs8.unlinkSync)(filePath);
738
744
  } catch {
739
745
  }
740
746
  }
741
747
  }
742
748
 
743
749
  // src/team/audit-log.ts
744
- var import_node_path2 = require("node:path");
750
+ var import_node_path = require("node:path");
745
751
  var DEFAULT_MAX_LOG_SIZE = 5 * 1024 * 1024;
746
752
  function getLogPath(workingDirectory, teamName) {
747
- return (0, import_node_path2.join)(workingDirectory, ".omc", "logs", `team-bridge-${teamName}.jsonl`);
753
+ return (0, import_node_path.join)(workingDirectory, ".omc", "logs", `team-bridge-${teamName}.jsonl`);
748
754
  }
749
755
  function logAuditEvent(workingDirectory, event) {
750
756
  const logPath = getLogPath(workingDirectory, event.teamName);
751
- const dir = (0, import_node_path2.join)(workingDirectory, ".omc", "logs");
757
+ const dir = (0, import_node_path.join)(workingDirectory, ".omc", "logs");
752
758
  validateResolvedPath(logPath, workingDirectory);
753
759
  ensureDirWithMode(dir);
754
760
  const line = JSON.stringify(event) + "\n";
@@ -756,7 +762,7 @@ function logAuditEvent(workingDirectory, event) {
756
762
  }
757
763
 
758
764
  // src/team/permissions.ts
759
- var import_node_path3 = require("node:path");
765
+ var import_node_path2 = require("node:path");
760
766
  function matchGlob(pattern, path4) {
761
767
  let pi = 0;
762
768
  let si = 0;
@@ -810,8 +816,8 @@ function matchGlob(pattern, path4) {
810
816
  return pi === pattern.length;
811
817
  }
812
818
  function isPathAllowed(permissions, filePath, workingDirectory) {
813
- const absPath = (0, import_node_path3.resolve)(workingDirectory, filePath);
814
- const relPath = (0, import_node_path3.relative)(workingDirectory, absPath);
819
+ const absPath = (0, import_node_path2.resolve)(workingDirectory, filePath);
820
+ const relPath = (0, import_node_path2.relative)(workingDirectory, absPath);
815
821
  if (relPath.startsWith("..")) return false;
816
822
  for (const pattern of permissions.deniedPaths) {
817
823
  if (matchGlob(pattern, relPath)) return false;
@@ -855,8 +861,8 @@ function findPermissionViolations(changedPaths, permissions, cwd) {
855
861
  const violations = [];
856
862
  for (const filePath of changedPaths) {
857
863
  if (!isPathAllowed(permissions, filePath, cwd)) {
858
- const absPath = (0, import_node_path3.resolve)(cwd, filePath);
859
- const relPath = (0, import_node_path3.relative)(cwd, absPath);
864
+ const absPath = (0, import_node_path2.resolve)(cwd, filePath);
865
+ const relPath = (0, import_node_path2.relative)(cwd, absPath);
860
866
  let reason;
861
867
  if (relPath.startsWith("..")) {
862
868
  reason = `Path escapes working directory: ${relPath}`;
@@ -899,18 +905,18 @@ function getBuiltinExternalDefaultModel(provider) {
899
905
  }
900
906
 
901
907
  // src/team/team-status.ts
902
- var import_fs10 = require("fs");
908
+ var import_fs9 = require("fs");
903
909
  var import_path9 = require("path");
904
910
 
905
911
  // src/team/usage-tracker.ts
906
912
  var import_node_fs = require("node:fs");
907
- var import_node_path4 = require("node:path");
913
+ var import_node_path3 = require("node:path");
908
914
  function getUsageLogPath(workingDirectory, teamName) {
909
- return (0, import_node_path4.join)(workingDirectory, ".omc", "logs", `team-usage-${teamName}.jsonl`);
915
+ return (0, import_node_path3.join)(workingDirectory, ".omc", "logs", `team-usage-${teamName}.jsonl`);
910
916
  }
911
917
  function recordTaskUsage(workingDirectory, teamName, record) {
912
918
  const logPath = getUsageLogPath(workingDirectory, teamName);
913
- const dir = (0, import_node_path4.join)(workingDirectory, ".omc", "logs");
919
+ const dir = (0, import_node_path3.join)(workingDirectory, ".omc", "logs");
914
920
  validateResolvedPath(logPath, workingDirectory);
915
921
  ensureDirWithMode(dir);
916
922
  appendFileWithMode(logPath, JSON.stringify(record) + "\n");
@@ -990,9 +996,9 @@ function peekRecentOutboxMessages(teamName, workerName, maxMessages = 10) {
990
996
  const safeName = sanitizeName(teamName);
991
997
  const safeWorker = sanitizeName(workerName);
992
998
  const outboxPath2 = (0, import_path9.join)(getClaudeConfigDir(), "teams", safeName, "outbox", `${safeWorker}.jsonl`);
993
- if (!(0, import_fs10.existsSync)(outboxPath2)) return [];
999
+ if (!(0, import_fs9.existsSync)(outboxPath2)) return [];
994
1000
  try {
995
- const content = (0, import_fs10.readFileSync)(outboxPath2, "utf-8");
1001
+ const content = (0, import_fs9.readFileSync)(outboxPath2, "utf-8");
996
1002
  const lines = content.split("\n").filter((l) => l.trim());
997
1003
  const recentLines = lines.slice(-maxMessages);
998
1004
  const messages = [];
@@ -1292,11 +1298,11 @@ function getOutputPath(config, taskId) {
1292
1298
  }
1293
1299
  function readOutputSummary(outputFile) {
1294
1300
  try {
1295
- if (!(0, import_fs11.existsSync)(outputFile)) return "(no output file)";
1301
+ if (!(0, import_fs10.existsSync)(outputFile)) return "(no output file)";
1296
1302
  const buf = Buffer.alloc(1024);
1297
- const fd = (0, import_fs11.openSync)(outputFile, "r");
1303
+ const fd = (0, import_fs10.openSync)(outputFile, "r");
1298
1304
  try {
1299
- const bytesRead = (0, import_fs11.readSync)(fd, buf, 0, 1024, 0);
1305
+ const bytesRead = (0, import_fs10.readSync)(fd, buf, 0, 1024, 0);
1300
1306
  if (bytesRead === 0) return "(empty output)";
1301
1307
  const content = buf.toString("utf-8", 0, bytesRead);
1302
1308
  if (content.length > 500) {
@@ -1304,7 +1310,7 @@ function readOutputSummary(outputFile) {
1304
1310
  }
1305
1311
  return content;
1306
1312
  } finally {
1307
- (0, import_fs11.closeSync)(fd);
1313
+ (0, import_fs10.closeSync)(fd);
1308
1314
  }
1309
1315
  } catch {
1310
1316
  return "(error reading output)";
@@ -1863,7 +1869,7 @@ ${violationSummary}`
1863
1869
  // src/lib/worktree-paths.ts
1864
1870
  var import_crypto = require("crypto");
1865
1871
  var import_child_process4 = require("child_process");
1866
- var import_fs12 = require("fs");
1872
+ var import_fs11 = require("fs");
1867
1873
  var import_os2 = require("os");
1868
1874
  var import_path11 = require("path");
1869
1875
  var MAX_WORKTREE_CACHE_SIZE = 8;
@@ -1907,7 +1913,7 @@ function validateConfigPath(configPath2, homeDir, claudeConfigDir) {
1907
1913
  if (!isUnderHome || !isTrustedSubpath) return false;
1908
1914
  try {
1909
1915
  const parentDir = (0, import_path12.resolve)(resolved, "..");
1910
- const realParent = (0, import_fs13.realpathSync)(parentDir);
1916
+ const realParent = (0, import_fs12.realpathSync)(parentDir);
1911
1917
  if (!realParent.startsWith(homeDir + "/") && realParent !== homeDir) {
1912
1918
  return false;
1913
1919
  }
@@ -1918,14 +1924,14 @@ function validateConfigPath(configPath2, homeDir, claudeConfigDir) {
1918
1924
  function validateBridgeWorkingDirectory(workingDirectory) {
1919
1925
  let stat;
1920
1926
  try {
1921
- stat = (0, import_fs13.statSync)(workingDirectory);
1927
+ stat = (0, import_fs12.statSync)(workingDirectory);
1922
1928
  } catch {
1923
1929
  throw new Error(`workingDirectory does not exist: ${workingDirectory}`);
1924
1930
  }
1925
1931
  if (!stat.isDirectory()) {
1926
1932
  throw new Error(`workingDirectory is not a directory: ${workingDirectory}`);
1927
1933
  }
1928
- const resolved = (0, import_fs13.realpathSync)(workingDirectory);
1934
+ const resolved = (0, import_fs12.realpathSync)(workingDirectory);
1929
1935
  const home = (0, import_os3.homedir)();
1930
1936
  if (!resolved.startsWith(home + "/") && resolved !== home) {
1931
1937
  throw new Error(`workingDirectory is outside home directory: ${resolved}`);
@@ -1950,7 +1956,7 @@ function main() {
1950
1956
  }
1951
1957
  let config;
1952
1958
  try {
1953
- const raw = (0, import_fs13.readFileSync)(configPath2, "utf-8");
1959
+ const raw = (0, import_fs12.readFileSync)(configPath2, "utf-8");
1954
1960
  config = JSON.parse(raw);
1955
1961
  } catch (err) {
1956
1962
  console.error(`Failed to read config from ${configPath2}: ${err.message}`);