opencode-orchestrator 1.5.1 → 1.5.4

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 (554) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +1 -1
  3. package/dist/agents/commander.d.ts +1 -1
  4. package/dist/agents/definitions.d.ts +1 -1
  5. package/dist/agents/prompts/01_philosophy/anti_hallucination.d.ts +0 -0
  6. package/dist/agents/prompts/01_philosophy/core.d.ts +0 -0
  7. package/dist/agents/prompts/01_philosophy/execution_assurance.d.ts +0 -0
  8. package/dist/agents/prompts/01_philosophy/index.d.ts +0 -0
  9. package/dist/agents/prompts/01_philosophy/metadata.d.ts +0 -0
  10. package/dist/agents/prompts/01_philosophy/modularity.d.ts +0 -0
  11. package/dist/agents/prompts/02_discovery/agents/discovery_commander.d.ts +0 -0
  12. package/dist/agents/prompts/02_discovery/agents/discovery_planner.d.ts +0 -0
  13. package/dist/agents/prompts/02_discovery/agents/index.d.ts +0 -0
  14. package/dist/agents/prompts/02_discovery/discovery_core.d.ts +0 -0
  15. package/dist/agents/prompts/02_discovery/discovery_environment.d.ts +0 -0
  16. package/dist/agents/prompts/02_discovery/discovery_skills.d.ts +0 -0
  17. package/dist/agents/prompts/02_discovery/discovery_workspace.d.ts +0 -0
  18. package/dist/agents/prompts/02_discovery/index.d.ts +0 -0
  19. package/dist/agents/prompts/03_planning/agents/index.d.ts +0 -0
  20. package/dist/agents/prompts/03_planning/agents/planning_commander.d.ts +0 -0
  21. package/dist/agents/prompts/03_planning/agents/planning_planner.d.ts +0 -0
  22. package/dist/agents/prompts/03_planning/agents/planning_reviewer.d.ts +0 -0
  23. package/dist/agents/prompts/03_planning/index.d.ts +0 -0
  24. package/dist/agents/prompts/03_planning/planning_core.d.ts +0 -0
  25. package/dist/agents/prompts/03_planning/planning_decomposition.d.ts +0 -0
  26. package/dist/agents/prompts/03_planning/planning_file_planning.d.ts +0 -0
  27. package/dist/agents/prompts/03_planning/planning_parallel.d.ts +0 -0
  28. package/dist/agents/prompts/03_planning/planning_research.d.ts +0 -0
  29. package/dist/agents/prompts/03_planning/planning_todo_format.d.ts +0 -0
  30. package/dist/agents/prompts/03_planning/planning_todo_rules.d.ts +0 -0
  31. package/dist/agents/prompts/03_planning/planning_todo_sync.d.ts +0 -0
  32. package/dist/agents/prompts/04_execution/agents/execution_commander.d.ts +0 -0
  33. package/dist/agents/prompts/04_execution/agents/execution_worker.d.ts +0 -0
  34. package/dist/agents/prompts/04_execution/agents/index.d.ts +0 -0
  35. package/dist/agents/prompts/04_execution/execution_core.d.ts +0 -0
  36. package/dist/agents/prompts/04_execution/execution_delegation.d.ts +0 -0
  37. package/dist/agents/prompts/04_execution/execution_error_handling.d.ts +0 -0
  38. package/dist/agents/prompts/04_execution/execution_file_assignment.d.ts +0 -0
  39. package/dist/agents/prompts/04_execution/execution_hyper_parallel.d.ts +0 -0
  40. package/dist/agents/prompts/04_execution/execution_isolation.d.ts +0 -0
  41. package/dist/agents/prompts/04_execution/execution_quality.d.ts +0 -0
  42. package/dist/agents/prompts/04_execution/execution_strategy.d.ts +0 -0
  43. package/dist/agents/prompts/04_execution/execution_tdd.d.ts +0 -0
  44. package/dist/agents/prompts/04_execution/execution_workflow.d.ts +0 -0
  45. package/dist/agents/prompts/04_execution/index.d.ts +0 -0
  46. package/dist/agents/prompts/05_verification/agents/index.d.ts +0 -0
  47. package/dist/agents/prompts/05_verification/agents/verification_commander.d.ts +0 -0
  48. package/dist/agents/prompts/05_verification/agents/verification_reviewer.d.ts +0 -0
  49. package/dist/agents/prompts/05_verification/index.d.ts +0 -0
  50. package/dist/agents/prompts/05_verification/verification_async_monitoring.d.ts +0 -0
  51. package/dist/agents/prompts/05_verification/verification_build.d.ts +0 -0
  52. package/dist/agents/prompts/05_verification/verification_core.d.ts +0 -0
  53. package/dist/agents/prompts/05_verification/verification_evidence.d.ts +0 -0
  54. package/dist/agents/prompts/05_verification/verification_integration.d.ts +0 -0
  55. package/dist/agents/prompts/05_verification/verification_strategy.d.ts +0 -0
  56. package/dist/agents/prompts/05_verification/verification_sync_check.d.ts +0 -0
  57. package/dist/agents/prompts/05_verification/verification_sync_handling.d.ts +0 -0
  58. package/dist/agents/prompts/05_verification/verification_test.d.ts +0 -0
  59. package/dist/agents/prompts/06_mission/agents/index.d.ts +0 -0
  60. package/dist/agents/prompts/06_mission/agents/mission_commander.d.ts +0 -0
  61. package/dist/agents/prompts/06_mission/index.d.ts +0 -0
  62. package/dist/agents/prompts/06_mission/mission_completion_conditions.d.ts +0 -0
  63. package/dist/agents/prompts/06_mission/mission_core.d.ts +0 -0
  64. package/dist/agents/prompts/06_mission/mission_lifecycle.d.ts +0 -0
  65. package/dist/agents/prompts/06_mission/mission_loop_continuation.d.ts +0 -0
  66. package/dist/agents/prompts/06_mission/mission_recovery.d.ts +0 -0
  67. package/dist/agents/prompts/06_mission/mission_status_tracking.d.ts +0 -0
  68. package/dist/agents/prompts/07_agents/commander/commander_forbidden.d.ts +0 -0
  69. package/dist/agents/prompts/07_agents/commander/commander_identity.d.ts +0 -0
  70. package/dist/agents/prompts/07_agents/commander/commander_mandate.d.ts +0 -0
  71. package/dist/agents/prompts/07_agents/commander/commander_required.d.ts +0 -0
  72. package/dist/agents/prompts/07_agents/commander/commander_role.d.ts +0 -0
  73. package/dist/agents/prompts/07_agents/commander/index.d.ts +0 -0
  74. package/dist/agents/prompts/07_agents/planner/index.d.ts +0 -0
  75. package/dist/agents/prompts/07_agents/planner/planner_forbidden.d.ts +0 -0
  76. package/dist/agents/prompts/07_agents/planner/planner_identity.d.ts +0 -0
  77. package/dist/agents/prompts/07_agents/planner/planner_mandate.d.ts +0 -0
  78. package/dist/agents/prompts/07_agents/planner/planner_required.d.ts +0 -0
  79. package/dist/agents/prompts/07_agents/reviewer/index.d.ts +0 -0
  80. package/dist/agents/prompts/07_agents/reviewer/reviewer_forbidden.d.ts +0 -0
  81. package/dist/agents/prompts/07_agents/reviewer/reviewer_identity.d.ts +0 -0
  82. package/dist/agents/prompts/07_agents/reviewer/reviewer_mandate.d.ts +0 -0
  83. package/dist/agents/prompts/07_agents/reviewer/reviewer_required.d.ts +0 -0
  84. package/dist/agents/prompts/07_agents/worker/index.d.ts +0 -0
  85. package/dist/agents/prompts/07_agents/worker/worker_forbidden.d.ts +0 -0
  86. package/dist/agents/prompts/07_agents/worker/worker_identity.d.ts +0 -0
  87. package/dist/agents/prompts/07_agents/worker/worker_mandate.d.ts +0 -0
  88. package/dist/agents/prompts/07_agents/worker/worker_required.d.ts +0 -0
  89. package/dist/agents/prompts/08_tools/agents/index.d.ts +0 -0
  90. package/dist/agents/prompts/08_tools/agents/tools_reviewer.d.ts +0 -0
  91. package/dist/agents/prompts/08_tools/agents/tools_worker.d.ts +0 -0
  92. package/dist/agents/prompts/08_tools/index.d.ts +0 -0
  93. package/dist/agents/prompts/08_tools/tools_ast.d.ts +0 -0
  94. package/dist/agents/prompts/08_tools/tools_code_editing.d.ts +0 -0
  95. package/dist/agents/prompts/08_tools/tools_core.d.ts +0 -0
  96. package/dist/agents/prompts/08_tools/tools_lsp.d.ts +0 -0
  97. package/dist/agents/prompts/08_tools/tools_search.d.ts +0 -0
  98. package/dist/agents/prompts/08_tools/tools_testing.d.ts +0 -0
  99. package/dist/agents/prompts/index.d.ts +0 -0
  100. package/dist/agents/subagents/planner.d.ts +1 -1
  101. package/dist/agents/subagents/reviewer.d.ts +1 -1
  102. package/dist/agents/subagents/worker.d.ts +1 -1
  103. package/dist/core/agents/agent-registry.d.ts +1 -1
  104. package/dist/core/agents/concurrency-config.d.ts +0 -0
  105. package/dist/core/agents/concurrency-token.d.ts +0 -0
  106. package/dist/core/agents/concurrency.d.ts +2 -2
  107. package/dist/core/agents/config.d.ts +0 -0
  108. package/dist/core/agents/consts/index.d.ts +0 -0
  109. package/dist/core/agents/consts/task-status.const.d.ts +2 -2
  110. package/dist/core/agents/format.d.ts +0 -0
  111. package/dist/core/agents/index.d.ts +0 -0
  112. package/dist/core/agents/interfaces/index.d.ts +3 -3
  113. package/dist/core/agents/interfaces/launch-input.interface.d.ts +0 -0
  114. package/dist/core/agents/interfaces/resume-input.interface.d.ts +0 -0
  115. package/dist/core/agents/interfaces/session-pool.interface.d.ts +0 -0
  116. package/dist/core/agents/logger.d.ts +0 -0
  117. package/dist/core/agents/manager/event-handler.d.ts +0 -0
  118. package/dist/core/agents/manager/index.d.ts +0 -0
  119. package/dist/core/agents/manager/task-cleaner.d.ts +0 -0
  120. package/dist/core/agents/manager/task-launcher.d.ts +0 -0
  121. package/dist/core/agents/manager/task-poller.d.ts +0 -0
  122. package/dist/core/agents/manager/task-resumer.d.ts +0 -0
  123. package/dist/core/agents/manager.d.ts +0 -0
  124. package/dist/core/agents/session-pool.d.ts +0 -0
  125. package/dist/core/agents/task-store.d.ts +0 -0
  126. package/dist/core/agents/types/index.d.ts +0 -0
  127. package/dist/core/agents/types/parallel-task-status.type.d.ts +0 -0
  128. package/dist/core/cache/constants.d.ts +0 -0
  129. package/dist/core/cache/document-cache.d.ts +0 -0
  130. package/dist/core/cache/index.d.ts +0 -0
  131. package/dist/core/cache/interfaces/cache-document-entry.d.ts +0 -0
  132. package/dist/core/cache/interfaces/cache-list-entry.d.ts +0 -0
  133. package/dist/core/cache/interfaces/cache-metadata.d.ts +0 -0
  134. package/dist/core/cache/interfaces/cache-stats.d.ts +0 -0
  135. package/dist/core/cache/interfaces/cached-document.d.ts +0 -0
  136. package/dist/core/cache/interfaces/index.d.ts +0 -0
  137. package/dist/core/cache/interfaces.d.ts +0 -0
  138. package/dist/core/cache/operations.d.ts +0 -0
  139. package/dist/core/cache/utils.d.ts +0 -0
  140. package/dist/core/cleanup/cleanup-scheduler.d.ts +0 -0
  141. package/dist/core/commands/index.d.ts +0 -0
  142. package/dist/core/commands/interfaces/background-task.d.ts +0 -0
  143. package/dist/core/commands/interfaces/index.d.ts +0 -0
  144. package/dist/core/commands/interfaces/run-background-options.d.ts +0 -0
  145. package/dist/core/commands/manager.d.ts +0 -0
  146. package/dist/core/commands/types/background-task-status.d.ts +0 -0
  147. package/dist/core/commands/types/index.d.ts +0 -0
  148. package/dist/core/config/plugin-options.d.ts +0 -0
  149. package/dist/core/context/context-window-monitor.d.ts +0 -0
  150. package/dist/core/context/index.d.ts +0 -0
  151. package/dist/core/knowledge/context-provider.d.ts +0 -0
  152. package/dist/core/knowledge/graph-parser.d.ts +0 -0
  153. package/dist/core/knowledge/hybrid-search.d.ts +0 -0
  154. package/dist/core/knowledge/index.d.ts +0 -0
  155. package/dist/core/knowledge/memory-consolidation.d.ts +0 -0
  156. package/dist/core/knowledge/mission-memory.d.ts +1 -1
  157. package/dist/core/knowledge/safety-guards.d.ts +0 -0
  158. package/dist/core/knowledge/scratchpad.d.ts +0 -0
  159. package/dist/core/knowledge/tag-indexer.d.ts +0 -0
  160. package/dist/core/loop/circuit-breaker.d.ts +0 -0
  161. package/dist/core/loop/compaction-guard.d.ts +0 -0
  162. package/dist/core/loop/formatters.d.ts +0 -0
  163. package/dist/core/loop/interfaces/index.d.ts +0 -0
  164. package/dist/core/loop/interfaces/todo-stats.d.ts +0 -0
  165. package/dist/core/loop/interfaces/todo.d.ts +0 -0
  166. package/dist/core/loop/interfaces.d.ts +0 -0
  167. package/dist/core/loop/mission-ledger.d.ts +0 -0
  168. package/dist/core/loop/mission-loop-handler.d.ts +0 -0
  169. package/dist/core/loop/mission-loop.d.ts +1 -1
  170. package/dist/core/loop/mission-runtime-options.d.ts +0 -0
  171. package/dist/core/loop/parser.d.ts +0 -0
  172. package/dist/core/loop/progress-tracker.d.ts +0 -0
  173. package/dist/core/loop/session-state-store.d.ts +0 -0
  174. package/dist/core/loop/stats.d.ts +0 -0
  175. package/dist/core/loop/todo-continuation.d.ts +0 -0
  176. package/dist/core/loop/todo-enforcer.d.ts +0 -0
  177. package/dist/core/loop/todo-manager.d.ts +0 -0
  178. package/dist/core/loop/types/index.d.ts +0 -0
  179. package/dist/core/loop/types/todo-priority.d.ts +0 -0
  180. package/dist/core/loop/types/todo-status.d.ts +0 -0
  181. package/dist/core/loop/verification.d.ts +0 -0
  182. package/dist/core/memory/interfaces.d.ts +0 -0
  183. package/dist/core/memory/memory-manager.d.ts +0 -0
  184. package/dist/core/metrics/collector.d.ts +0 -0
  185. package/dist/core/notification/os-notify/index.d.ts +0 -0
  186. package/dist/core/notification/os-notify/notifier.d.ts +0 -0
  187. package/dist/core/notification/os-notify/platform-resolver.d.ts +0 -0
  188. package/dist/core/notification/os-notify/platform.d.ts +0 -0
  189. package/dist/core/notification/os-notify/sound-player.d.ts +0 -0
  190. package/dist/core/notification/os-notify/todo-checker.d.ts +0 -0
  191. package/dist/core/notification/task-toast-manager.d.ts +0 -0
  192. package/dist/core/notification/toast-core.d.ts +0 -0
  193. package/dist/core/notification/toast-sanitizer.d.ts +0 -0
  194. package/dist/core/notification/toast.d.ts +0 -0
  195. package/dist/core/orchestrator/index.d.ts +0 -0
  196. package/dist/core/orchestrator/interfaces/index.d.ts +0 -0
  197. package/dist/core/orchestrator/interfaces/session-state.d.ts +0 -0
  198. package/dist/core/orchestrator/session-manager.d.ts +0 -0
  199. package/dist/core/orchestrator/state.d.ts +0 -0
  200. package/dist/core/orchestrator/types/index.d.ts +0 -0
  201. package/dist/core/orchestrator/types/task-status.d.ts +1 -1
  202. package/dist/core/plugins/interfaces.d.ts +0 -0
  203. package/dist/core/plugins/plugin-manager.d.ts +0 -0
  204. package/dist/core/pool/buffer-pool.d.ts +0 -0
  205. package/dist/core/pool/object-pool.d.ts +0 -0
  206. package/dist/core/pool/string-pool.d.ts +0 -0
  207. package/dist/core/pool/task-pool.d.ts +1 -1
  208. package/dist/core/progress/calculator.d.ts +0 -0
  209. package/dist/core/progress/formatters.d.ts +0 -0
  210. package/dist/core/progress/interfaces/index.d.ts +0 -0
  211. package/dist/core/progress/interfaces/progress-snapshot.d.ts +0 -0
  212. package/dist/core/progress/interfaces/snapshot-input.d.ts +0 -0
  213. package/dist/core/progress/interfaces/step-progress.d.ts +0 -0
  214. package/dist/core/progress/interfaces/task-progress.d.ts +0 -0
  215. package/dist/core/progress/interfaces/todo-progress.d.ts +0 -0
  216. package/dist/core/progress/interfaces.d.ts +0 -0
  217. package/dist/core/progress/progress-notifier.d.ts +0 -0
  218. package/dist/core/progress/state-broadcaster.d.ts +0 -0
  219. package/dist/core/progress/store.d.ts +0 -0
  220. package/dist/core/progress/tracker.d.ts +0 -0
  221. package/dist/core/queue/async-queue.d.ts +0 -0
  222. package/dist/core/queue/async-utils.d.ts +0 -0
  223. package/dist/core/queue/index.d.ts +0 -0
  224. package/dist/core/queue/work-pool.d.ts +0 -0
  225. package/dist/core/queue/work-stealing-deque.d.ts +0 -0
  226. package/dist/core/queue/worker-pool.d.ts +0 -0
  227. package/dist/core/recovery/auto-recovery.d.ts +0 -0
  228. package/dist/core/recovery/constants.d.ts +0 -0
  229. package/dist/core/recovery/handler.d.ts +0 -0
  230. package/dist/core/recovery/interfaces/error-context.d.ts +0 -0
  231. package/dist/core/recovery/interfaces/error-pattern.d.ts +0 -0
  232. package/dist/core/recovery/interfaces/index.d.ts +0 -0
  233. package/dist/core/recovery/interfaces/recovery-action.d.ts +0 -0
  234. package/dist/core/recovery/interfaces/recovery-record.d.ts +0 -0
  235. package/dist/core/recovery/interfaces/recovery-stats.d.ts +0 -0
  236. package/dist/core/recovery/interfaces.d.ts +0 -0
  237. package/dist/core/recovery/patterns.d.ts +0 -0
  238. package/dist/core/recovery/retry.d.ts +0 -0
  239. package/dist/core/recovery/session-recovery.d.ts +0 -0
  240. package/dist/core/session/interfaces/context-stats.d.ts +0 -0
  241. package/dist/core/session/interfaces/index.d.ts +0 -0
  242. package/dist/core/session/interfaces/shared-context.d.ts +0 -0
  243. package/dist/core/session/interfaces/shared-decision.d.ts +0 -0
  244. package/dist/core/session/interfaces/shared-document.d.ts +0 -0
  245. package/dist/core/session/interfaces/shared-finding.d.ts +0 -0
  246. package/dist/core/session/interfaces.d.ts +0 -0
  247. package/dist/core/session/shared-context.d.ts +0 -0
  248. package/dist/core/session/store.d.ts +0 -0
  249. package/dist/core/session/summary.d.ts +0 -0
  250. package/dist/core/sync/todo-parser.d.ts +0 -0
  251. package/dist/core/sync/todo-sync-service.d.ts +0 -0
  252. package/dist/core/task/interfaces/index.d.ts +0 -0
  253. package/dist/core/task/interfaces/task-hierarchy.d.ts +0 -0
  254. package/dist/core/task/interfaces/task-input.d.ts +0 -0
  255. package/dist/core/task/interfaces/task-node.d.ts +1 -1
  256. package/dist/core/task/interfaces/task-progress.d.ts +0 -0
  257. package/dist/core/task/interfaces.d.ts +0 -0
  258. package/dist/core/task/parser.d.ts +0 -0
  259. package/dist/core/task/scheduler.d.ts +0 -0
  260. package/dist/core/task/store.d.ts +0 -0
  261. package/dist/core/task/summary.d.ts +0 -0
  262. package/dist/core/task/task-decomposer.d.ts +0 -0
  263. package/dist/core/todo/todo-manager.d.ts +0 -0
  264. package/dist/hooks/compatibility/external-plugin.d.ts +0 -0
  265. package/dist/hooks/constants.d.ts +0 -0
  266. package/dist/hooks/custom/agent-ui.d.ts +0 -0
  267. package/dist/hooks/custom/memory-gate.d.ts +0 -0
  268. package/dist/hooks/custom/metrics.d.ts +0 -0
  269. package/dist/hooks/custom/resource-control.d.ts +0 -0
  270. package/dist/hooks/custom/secret-scanner.d.ts +0 -0
  271. package/dist/hooks/custom/strict-role-guard.d.ts +0 -0
  272. package/dist/hooks/custom/user-activity.d.ts +0 -0
  273. package/dist/hooks/features/mission-loop.d.ts +0 -0
  274. package/dist/hooks/features/sanity-check.d.ts +0 -0
  275. package/dist/hooks/index.d.ts +0 -0
  276. package/dist/hooks/registry.d.ts +0 -0
  277. package/dist/hooks/types.d.ts +0 -0
  278. package/dist/index.d.ts +0 -0
  279. package/dist/index.js +624 -1454
  280. package/dist/index.js.map +7 -0
  281. package/dist/plugin-handlers/assistant-done-handler.d.ts +0 -0
  282. package/dist/plugin-handlers/chat-message-handler.d.ts +0 -0
  283. package/dist/plugin-handlers/config-handler.d.ts +0 -0
  284. package/dist/plugin-handlers/event-handler.d.ts +0 -0
  285. package/dist/plugin-handlers/index.d.ts +0 -0
  286. package/dist/plugin-handlers/interfaces/assistant-done-context.d.ts +0 -0
  287. package/dist/plugin-handlers/interfaces/chat-message-context.d.ts +0 -0
  288. package/dist/plugin-handlers/interfaces/event-handler-context.d.ts +0 -0
  289. package/dist/plugin-handlers/interfaces/index.d.ts +0 -0
  290. package/dist/plugin-handlers/interfaces/orchestrator-state.d.ts +0 -0
  291. package/dist/plugin-handlers/interfaces/session-compacting.d.ts +0 -0
  292. package/dist/plugin-handlers/interfaces/session-state.d.ts +0 -0
  293. package/dist/plugin-handlers/interfaces/system-transform.d.ts +0 -0
  294. package/dist/plugin-handlers/interfaces/tool-execute-context.d.ts +0 -0
  295. package/dist/plugin-handlers/interfaces/tool-hook.d.ts +0 -0
  296. package/dist/plugin-handlers/session-compacting-handler.d.ts +0 -0
  297. package/dist/plugin-handlers/system-transform-handler.d.ts +0 -0
  298. package/dist/plugin-handlers/tool-execute-handler.d.ts +0 -0
  299. package/dist/plugin-handlers/tool-execute-pre-handler.d.ts +0 -0
  300. package/dist/scripts/postinstall.js +1 -0
  301. package/dist/scripts/postinstall.js.map +7 -0
  302. package/dist/scripts/preuninstall.js +1 -0
  303. package/dist/scripts/preuninstall.js.map +7 -0
  304. package/dist/shared/agent/{constants/names.d.ts → constants.d.ts} +5 -2
  305. package/dist/shared/agent/index.d.ts +3 -4
  306. package/dist/shared/agent/types.d.ts +27 -0
  307. package/dist/shared/agent/{utils/index.d.ts → utils.d.ts} +1 -1
  308. package/dist/shared/cache/constants.d.ts +27 -0
  309. package/dist/shared/cache/index.d.ts +1 -1
  310. package/dist/shared/command/index.d.ts +1 -2
  311. package/dist/shared/command/{interfaces/background-task.d.ts → types.d.ts} +14 -2
  312. package/dist/shared/constants/security-patterns.d.ts +0 -0
  313. package/dist/shared/constants/system-messages.d.ts +0 -0
  314. package/dist/shared/core/constants.d.ts +322 -0
  315. package/dist/shared/core/index.d.ts +1 -1
  316. package/dist/shared/core/poolable.d.ts +0 -0
  317. package/dist/shared/errors/constants.d.ts +24 -0
  318. package/dist/shared/errors/detection.d.ts +1 -1
  319. package/dist/shared/errors/index.d.ts +1 -2
  320. package/dist/shared/errors/retry.d.ts +1 -1
  321. package/dist/shared/index.d.ts +0 -0
  322. package/dist/shared/lifecycle/index.d.ts +0 -0
  323. package/dist/shared/lifecycle/registration.d.ts +0 -0
  324. package/dist/shared/lifecycle/shutdown-manager.d.ts +0 -0
  325. package/dist/shared/loop/constants.d.ts +88 -0
  326. package/dist/shared/loop/index.d.ts +2 -3
  327. package/dist/shared/loop/{interfaces/mission-loop.d.ts → types.d.ts} +34 -0
  328. package/dist/shared/message/constants.d.ts +75 -0
  329. package/dist/shared/message/index.d.ts +1 -1
  330. package/dist/shared/notification/{constants/tui.const.d.ts → constants.d.ts} +28 -0
  331. package/dist/shared/notification/index.d.ts +3 -4
  332. package/dist/shared/notification/os-notify/constants.d.ts +30 -0
  333. package/dist/shared/notification/os-notify/index.d.ts +2 -3
  334. package/dist/shared/notification/os-notify/types.d.ts +36 -0
  335. package/dist/shared/notification/presets.d.ts +37 -0
  336. package/dist/shared/notification/types.d.ts +46 -0
  337. package/dist/shared/os/{constants/platform.d.ts → constants.d.ts} +1 -1
  338. package/dist/shared/os/index.d.ts +2 -2
  339. package/dist/shared/os/types.d.ts +5 -0
  340. package/dist/shared/prompt/constants.d.ts +449 -0
  341. package/dist/shared/prompt/index.d.ts +1 -1
  342. package/dist/shared/recovery/constants.d.ts +39 -0
  343. package/dist/shared/recovery/index.d.ts +2 -3
  344. package/dist/shared/recovery/types.d.ts +26 -0
  345. package/dist/shared/session/constants.d.ts +80 -0
  346. package/dist/shared/session/index.d.ts +1 -1
  347. package/dist/shared/task/{constants/parallel-task.d.ts → constants.d.ts} +28 -1
  348. package/dist/shared/task/index.d.ts +2 -3
  349. package/dist/shared/task/types.d.ts +69 -0
  350. package/dist/shared/tool/constants.d.ts +105 -0
  351. package/dist/shared/tool/index.d.ts +3 -2
  352. package/dist/shared/tool/{constants/tool-names.d.ts → tool-names.d.ts} +0 -0
  353. package/dist/shared/tool/types.d.ts +117 -0
  354. package/dist/shared/verification/{constants/categories.d.ts → constants.d.ts} +45 -0
  355. package/dist/shared/verification/index.d.ts +2 -5
  356. package/dist/shared/verification/types.d.ts +112 -0
  357. package/dist/tools/ast/index.d.ts +0 -0
  358. package/dist/tools/background-cmd/check.d.ts +0 -0
  359. package/dist/tools/background-cmd/index.d.ts +0 -0
  360. package/dist/tools/background-cmd/kill.d.ts +0 -0
  361. package/dist/tools/background-cmd/list.d.ts +0 -0
  362. package/dist/tools/background-cmd/run.d.ts +0 -0
  363. package/dist/tools/callAgent.d.ts +0 -0
  364. package/dist/tools/lsp/diagnostics-cache.d.ts +0 -0
  365. package/dist/tools/lsp/index.d.ts +0 -0
  366. package/dist/tools/parallel/cancel-task.d.ts +0 -0
  367. package/dist/tools/parallel/delegate-task.d.ts +0 -0
  368. package/dist/tools/parallel/get-task-result.d.ts +0 -0
  369. package/dist/tools/parallel/index.d.ts +0 -0
  370. package/dist/tools/parallel/list-agents.d.ts +0 -0
  371. package/dist/tools/parallel/list-tasks.d.ts +0 -0
  372. package/dist/tools/parallel/show-metrics.d.ts +0 -0
  373. package/dist/tools/parallel/update-todo.d.ts +0 -0
  374. package/dist/tools/registry.d.ts +0 -0
  375. package/dist/tools/rust-pool.d.ts +0 -0
  376. package/dist/tools/rust.d.ts +0 -0
  377. package/dist/tools/search.d.ts +0 -0
  378. package/dist/tools/slashCommand.d.ts +0 -0
  379. package/dist/tools/web/cache-docs.d.ts +0 -0
  380. package/dist/tools/web/codesearch.d.ts +0 -0
  381. package/dist/tools/web/index.d.ts +0 -0
  382. package/dist/tools/web/webfetch.d.ts +0 -0
  383. package/dist/tools/web/websearch.d.ts +0 -0
  384. package/dist/utils/binary.d.ts +0 -0
  385. package/dist/utils/common.d.ts +0 -0
  386. package/dist/utils/compatibility/claude.d.ts +0 -0
  387. package/dist/utils/formatting/elapsed-time.d.ts +0 -0
  388. package/dist/utils/formatting/index.d.ts +0 -0
  389. package/dist/utils/formatting/timestamp.d.ts +0 -0
  390. package/dist/utils/parsing/index.d.ts +0 -0
  391. package/dist/utils/parsing/slash-command.d.ts +0 -0
  392. package/dist/utils/sanity/checker.d.ts +0 -0
  393. package/dist/utils/sanity/constants/escalation-prompt.d.ts +0 -0
  394. package/dist/utils/sanity/constants/index.d.ts +0 -0
  395. package/dist/utils/sanity/constants/recovery-prompt.d.ts +0 -0
  396. package/dist/utils/sanity/constants/severity.d.ts +0 -0
  397. package/dist/utils/sanity/index.d.ts +0 -0
  398. package/dist/utils/sanity/interfaces/index.d.ts +0 -0
  399. package/dist/utils/sanity/interfaces/sanity-result.d.ts +0 -0
  400. package/dist/utils/sanity/types/index.d.ts +0 -0
  401. package/dist/utils/sanity/types/severity.d.ts +0 -0
  402. package/package.json +1 -1
  403. package/scripts/run-install-hook.mjs +66 -66
  404. package/dist/shared/agent/constants/index.d.ts +0 -4
  405. package/dist/shared/agent/interfaces/agent-definition.d.ts +0 -10
  406. package/dist/shared/agent/interfaces/concurrency-config.d.ts +0 -9
  407. package/dist/shared/agent/interfaces/index.d.ts +0 -5
  408. package/dist/shared/agent/types/agent-name.d.ts +0 -5
  409. package/dist/shared/agent/types/index.d.ts +0 -4
  410. package/dist/shared/cache/constants/cache-actions.d.ts +0 -10
  411. package/dist/shared/cache/constants/cache.d.ts +0 -11
  412. package/dist/shared/cache/constants/filter-status.d.ts +0 -12
  413. package/dist/shared/cache/constants/index.d.ts +0 -8
  414. package/dist/shared/command/interfaces/index.d.ts +0 -5
  415. package/dist/shared/command/interfaces/run-background-options.d.ts +0 -9
  416. package/dist/shared/command/types/background-task-status.d.ts +0 -4
  417. package/dist/shared/command/types/index.d.ts +0 -4
  418. package/dist/shared/core/constants/cli.d.ts +0 -26
  419. package/dist/shared/core/constants/id-prefix.d.ts +0 -14
  420. package/dist/shared/core/constants/index.d.ts +0 -15
  421. package/dist/shared/core/constants/lifecycle.d.ts +0 -22
  422. package/dist/shared/core/constants/limits.d.ts +0 -19
  423. package/dist/shared/core/constants/logging.d.ts +0 -39
  424. package/dist/shared/core/constants/memory-hooks.d.ts +0 -70
  425. package/dist/shared/core/constants/memory-limits.d.ts +0 -12
  426. package/dist/shared/core/constants/paths.d.ts +0 -21
  427. package/dist/shared/core/constants/phases.d.ts +0 -47
  428. package/dist/shared/core/constants/status-labels.d.ts +0 -34
  429. package/dist/shared/core/constants/time.d.ts +0 -8
  430. package/dist/shared/core/constants/wal-actions.d.ts +0 -10
  431. package/dist/shared/errors/constants/error-patterns.d.ts +0 -13
  432. package/dist/shared/errors/constants/error-type.d.ts +0 -13
  433. package/dist/shared/errors/constants/index.d.ts +0 -5
  434. package/dist/shared/errors/types/error-pattern-type.d.ts +0 -5
  435. package/dist/shared/errors/types/index.d.ts +0 -4
  436. package/dist/shared/loop/constants/index.d.ts +0 -8
  437. package/dist/shared/loop/constants/labels.d.ts +0 -33
  438. package/dist/shared/loop/constants/loop.d.ts +0 -17
  439. package/dist/shared/loop/constants/mission-control.d.ts +0 -20
  440. package/dist/shared/loop/constants/task-status.d.ts +0 -9
  441. package/dist/shared/loop/constants/todo-status.d.ts +0 -9
  442. package/dist/shared/loop/interfaces/index.d.ts +0 -6
  443. package/dist/shared/loop/interfaces/todo-stats.d.ts +0 -11
  444. package/dist/shared/loop/interfaces/todo.d.ts +0 -13
  445. package/dist/shared/loop/types/index.d.ts +0 -5
  446. package/dist/shared/loop/types/todo-priority.d.ts +0 -4
  447. package/dist/shared/loop/types/todo-status.d.ts +0 -4
  448. package/dist/shared/message/constants/index.d.ts +0 -8
  449. package/dist/shared/message/constants/message-roles.d.ts +0 -23
  450. package/dist/shared/message/constants/part-types.d.ts +0 -13
  451. package/dist/shared/message/constants/plugin-hooks.d.ts +0 -19
  452. package/dist/shared/message/constants/prompts.d.ts +0 -8
  453. package/dist/shared/message/constants/slash-commands.d.ts +0 -21
  454. package/dist/shared/notification/constants/index.d.ts +0 -3
  455. package/dist/shared/notification/constants/toast-duration.d.ts +0 -19
  456. package/dist/shared/notification/constants/toast-variants.d.ts +0 -10
  457. package/dist/shared/notification/interfaces/index.d.ts +0 -6
  458. package/dist/shared/notification/interfaces/task-toast.interface.d.ts +0 -18
  459. package/dist/shared/notification/interfaces/toast-message.d.ts +0 -13
  460. package/dist/shared/notification/interfaces/toast-options.d.ts +0 -10
  461. package/dist/shared/notification/os-notify/constants/index.d.ts +0 -6
  462. package/dist/shared/notification/os-notify/constants/notification-command-keys.d.ts +0 -11
  463. package/dist/shared/notification/os-notify/constants/notification-commands.d.ts +0 -11
  464. package/dist/shared/notification/os-notify/constants/notification-defaults.d.ts +0 -5
  465. package/dist/shared/notification/os-notify/interfaces/index.d.ts +0 -5
  466. package/dist/shared/notification/os-notify/interfaces/notification-config.d.ts +0 -15
  467. package/dist/shared/notification/os-notify/interfaces/notification-state.d.ts +0 -13
  468. package/dist/shared/notification/os-notify/types/index.d.ts +0 -4
  469. package/dist/shared/notification/os-notify/types/notification-commands.d.ts +0 -5
  470. package/dist/shared/notification/presets/index.d.ts +0 -9
  471. package/dist/shared/notification/presets/mission.d.ts +0 -5
  472. package/dist/shared/notification/presets/parallel.d.ts +0 -6
  473. package/dist/shared/notification/presets/session.d.ts +0 -6
  474. package/dist/shared/notification/presets/task-lifecycle.d.ts +0 -7
  475. package/dist/shared/notification/presets/tools.d.ts +0 -6
  476. package/dist/shared/notification/presets/warnings.d.ts +0 -7
  477. package/dist/shared/notification/types/index.d.ts +0 -4
  478. package/dist/shared/notification/types/toast-variant.d.ts +0 -4
  479. package/dist/shared/os/constants/index.d.ts +0 -4
  480. package/dist/shared/os/types/index.d.ts +0 -4
  481. package/dist/shared/os/types/platform.d.ts +0 -5
  482. package/dist/shared/prompt/constants/architecture.d.ts +0 -64
  483. package/dist/shared/prompt/constants/index.d.ts +0 -9
  484. package/dist/shared/prompt/constants/mandates.d.ts +0 -26
  485. package/dist/shared/prompt/constants/philosophy.d.ts +0 -29
  486. package/dist/shared/prompt/constants/scouts.d.ts +0 -32
  487. package/dist/shared/prompt/constants/status.d.ts +0 -83
  488. package/dist/shared/prompt/constants/tags.d.ts +0 -215
  489. package/dist/shared/recovery/constants/history.d.ts +0 -11
  490. package/dist/shared/recovery/constants/index.d.ts +0 -6
  491. package/dist/shared/recovery/constants/recovery-level.d.ts +0 -15
  492. package/dist/shared/recovery/constants/recovery.d.ts +0 -13
  493. package/dist/shared/recovery/interfaces/error-context.d.ts +0 -11
  494. package/dist/shared/recovery/interfaces/index.d.ts +0 -5
  495. package/dist/shared/recovery/interfaces/recovery-record.d.ts +0 -10
  496. package/dist/shared/recovery/types/index.d.ts +0 -4
  497. package/dist/shared/recovery/types/recovery-action.d.ts +0 -4
  498. package/dist/shared/session/constants/events/document-events.d.ts +0 -7
  499. package/dist/shared/session/constants/events/index.d.ts +0 -30
  500. package/dist/shared/session/constants/events/message-events.d.ts +0 -6
  501. package/dist/shared/session/constants/events/mission-events.d.ts +0 -8
  502. package/dist/shared/session/constants/events/session-events.d.ts +0 -13
  503. package/dist/shared/session/constants/events/special-events.d.ts +0 -6
  504. package/dist/shared/session/constants/events/task-events.d.ts +0 -9
  505. package/dist/shared/session/constants/events/todo-events.d.ts +0 -8
  506. package/dist/shared/session/constants/index.d.ts +0 -4
  507. package/dist/shared/task/base-task.d.ts +0 -31
  508. package/dist/shared/task/constants/background-status.d.ts +0 -10
  509. package/dist/shared/task/constants/background-task.d.ts +0 -10
  510. package/dist/shared/task/constants/index.d.ts +0 -8
  511. package/dist/shared/task/constants/metadata-keys.d.ts +0 -10
  512. package/dist/shared/task/interfaces/index.d.ts +0 -7
  513. package/dist/shared/task/interfaces/launch-input.d.ts +0 -11
  514. package/dist/shared/task/interfaces/parallel-task.d.ts +0 -28
  515. package/dist/shared/task/interfaces/resume-input.d.ts +0 -16
  516. package/dist/shared/task/interfaces/task-progress.d.ts +0 -9
  517. package/dist/shared/task/types/index.d.ts +0 -4
  518. package/dist/shared/task/types/parallel-task-status.d.ts +0 -4
  519. package/dist/shared/tool/constants/common/index.d.ts +0 -7
  520. package/dist/shared/tool/constants/common/labels.d.ts +0 -16
  521. package/dist/shared/tool/constants/common/languages.d.ts +0 -9
  522. package/dist/shared/tool/constants/common/output-labels.d.ts +0 -20
  523. package/dist/shared/tool/constants/common/sources.d.ts +0 -8
  524. package/dist/shared/tool/constants/index.d.ts +0 -8
  525. package/dist/shared/tool/constants/lsp/index.d.ts +0 -5
  526. package/dist/shared/tool/constants/lsp/lsp-severity-labels.d.ts +0 -9
  527. package/dist/shared/tool/constants/lsp/lsp-severity.d.ts +0 -9
  528. package/dist/shared/tool/constants/parallel/index.d.ts +0 -5
  529. package/dist/shared/tool/constants/parallel/logging.d.ts +0 -6
  530. package/dist/shared/tool/constants/parallel/parameters.d.ts +0 -19
  531. package/dist/shared/tool/constants/tool-output.d.ts +0 -9
  532. package/dist/shared/tool/interfaces/ast/ast-replace-result.d.ts +0 -8
  533. package/dist/shared/tool/interfaces/ast/ast-search-result.d.ts +0 -13
  534. package/dist/shared/tool/interfaces/ast/index.d.ts +0 -5
  535. package/dist/shared/tool/interfaces/index.d.ts +0 -6
  536. package/dist/shared/tool/interfaces/lsp/index.d.ts +0 -7
  537. package/dist/shared/tool/interfaces/lsp/lsp-command-result.d.ts +0 -8
  538. package/dist/shared/tool/interfaces/lsp/lsp-diagnostic.d.ts +0 -11
  539. package/dist/shared/tool/interfaces/lsp/lsp-rename-location.d.ts +0 -9
  540. package/dist/shared/tool/interfaces/lsp/lsp-rename-result.d.ts +0 -9
  541. package/dist/shared/tool/interfaces/parallel/index.d.ts +0 -5
  542. package/dist/shared/tool/interfaces/parallel/poll-result.d.ts +0 -10
  543. package/dist/shared/tool/interfaces/parallel/session-client.d.ts +0 -47
  544. package/dist/shared/verification/constants/checklist.d.ts +0 -16
  545. package/dist/shared/verification/constants/index.d.ts +0 -7
  546. package/dist/shared/verification/constants/patterns.d.ts +0 -19
  547. package/dist/shared/verification/constants/signals.d.ts +0 -10
  548. package/dist/shared/verification/interfaces/checklist-item.d.ts +0 -21
  549. package/dist/shared/verification/interfaces/checklist-verification-result.d.ts +0 -24
  550. package/dist/shared/verification/interfaces/index.d.ts +0 -7
  551. package/dist/shared/verification/interfaces/verification-checklist.d.ts +0 -19
  552. package/dist/shared/verification/interfaces/verification-result.d.ts +0 -29
  553. package/dist/shared/verification/types/checklist-category.d.ts +0 -18
  554. package/dist/shared/verification/types/index.d.ts +0 -4
package/dist/index.js CHANGED
@@ -13,24 +13,17 @@ var __export = (target, all) => {
13
13
  __defProp(target, name, { get: all[name], enumerable: true });
14
14
  };
15
15
 
16
- // src/shared/agent/interfaces/index.ts
17
- var init_interfaces = __esm({
18
- "src/shared/agent/interfaces/index.ts"() {
19
- "use strict";
20
- }
21
- });
22
-
23
- // src/shared/agent/types/index.ts
16
+ // src/shared/agent/types.ts
24
17
  var init_types = __esm({
25
- "src/shared/agent/types/index.ts"() {
18
+ "src/shared/agent/types.ts"() {
26
19
  "use strict";
27
20
  }
28
21
  });
29
22
 
30
- // src/shared/agent/constants/names.ts
23
+ // src/shared/agent/constants.ts
31
24
  var AGENT_NAMES;
32
- var init_names = __esm({
33
- "src/shared/agent/constants/names.ts"() {
25
+ var init_constants = __esm({
26
+ "src/shared/agent/constants.ts"() {
34
27
  "use strict";
35
28
  AGENT_NAMES = {
36
29
  COMMANDER: "Commander",
@@ -42,15 +35,7 @@ var init_names = __esm({
42
35
  }
43
36
  });
44
37
 
45
- // src/shared/agent/constants/index.ts
46
- var init_constants = __esm({
47
- "src/shared/agent/constants/index.ts"() {
48
- "use strict";
49
- init_names();
50
- }
51
- });
52
-
53
- // src/shared/agent/utils/index.ts
38
+ // src/shared/agent/utils.ts
54
39
  function getStatusIndicator(status) {
55
40
  const statusMap = {
56
41
  pending: "[P]",
@@ -65,7 +50,7 @@ function getStatusIndicator(status) {
65
50
  return statusMap[status.toLowerCase()] ?? "[?]";
66
51
  }
67
52
  var init_utils = __esm({
68
- "src/shared/agent/utils/index.ts"() {
53
+ "src/shared/agent/utils.ts"() {
69
54
  "use strict";
70
55
  }
71
56
  });
@@ -74,31 +59,99 @@ var init_utils = __esm({
74
59
  var init_agent = __esm({
75
60
  "src/shared/agent/index.ts"() {
76
61
  "use strict";
77
- init_interfaces();
78
62
  init_types();
79
63
  init_constants();
80
64
  init_utils();
81
65
  }
82
66
  });
83
67
 
84
- // src/shared/core/constants/time.ts
85
- var TIME;
86
- var init_time = __esm({
87
- "src/shared/core/constants/time.ts"() {
68
+ // src/shared/tool/tool-names.ts
69
+ var TOOL_NAMES;
70
+ var init_tool_names = __esm({
71
+ "src/shared/tool/tool-names.ts"() {
88
72
  "use strict";
89
- TIME = {
90
- SECOND: 1e3,
91
- MINUTE: 60 * 1e3,
92
- HOUR: 60 * 60 * 1e3
73
+ TOOL_NAMES = {
74
+ // Parallel task tools
75
+ DELEGATE_TASK: "delegate_task",
76
+ GET_TASK_RESULT: "get_task_result",
77
+ LIST_TASKS: "list_tasks",
78
+ CANCEL_TASK: "cancel_task",
79
+ LIST_AGENTS: "list_agents",
80
+ SHOW_METRICS: "show_metrics",
81
+ UPDATE_TODO: "update_todo",
82
+ // Background command tools
83
+ RUN_BACKGROUND: "run_background",
84
+ CHECK_BACKGROUND: "check_background",
85
+ LIST_BACKGROUND: "list_background",
86
+ KILL_BACKGROUND: "kill_background",
87
+ // Command tools
88
+ RUN_COMMAND: "run_command",
89
+ // Search tools
90
+ GREP_SEARCH: "grep_search",
91
+ GLOB_SEARCH: "glob_search",
92
+ MGREP: "mgrep",
93
+ SED_REPLACE: "sed_replace",
94
+ // Diff & Compare tools
95
+ DIFF: "diff",
96
+ // JSON tools
97
+ JQ: "jq",
98
+ // HTTP tools
99
+ HTTP: "http",
100
+ // File tools
101
+ FILE_STATS: "file_stats",
102
+ // Git tools
103
+ GIT_DIFF: "git_diff",
104
+ GIT_STATUS: "git_status",
105
+ // Web tools
106
+ WEBFETCH: "webfetch",
107
+ WEBSEARCH: "websearch",
108
+ CODESEARCH: "codesearch",
109
+ CACHE_DOCS: "cache_docs",
110
+ // LSP tools
111
+ LSP_DIAGNOSTICS: "lsp_diagnostics",
112
+ // AST tools
113
+ AST_SEARCH: "ast_search",
114
+ AST_REPLACE: "ast_replace",
115
+ // Other tools
116
+ CALL_AGENT: "call_agent",
117
+ SLASHCOMMAND: "slashcommand",
118
+ SKILL: "skill"
93
119
  };
94
120
  }
95
121
  });
96
122
 
97
- // src/shared/core/constants/id-prefix.ts
98
- var ID_PREFIX;
99
- var init_id_prefix = __esm({
100
- "src/shared/core/constants/id-prefix.ts"() {
123
+ // src/shared/core/constants.ts
124
+ var TIME, MEMORY_LIMITS, CLI_NAME, ID_PREFIX, PATHS, PHASES, LIMITS, STATUS_LABEL, LOG_PREFIX, SHUTDOWN_HANDLERS, MEMORY_CONSTANTS, HOOK_NAMES, TODO_CONSTANTS;
125
+ var init_constants2 = __esm({
126
+ "src/shared/core/constants.ts"() {
101
127
  "use strict";
128
+ init_tool_names();
129
+ TIME = {
130
+ SECOND: 1e3,
131
+ MINUTE: 60 * 1e3,
132
+ HOUR: 60 * 60 * 1e3
133
+ };
134
+ MEMORY_LIMITS = {
135
+ MAX_TASKS_IN_MEMORY: 1e3,
136
+ MAX_NOTIFICATIONS_PER_PARENT: 100,
137
+ MAX_EVENT_HISTORY: 100,
138
+ MAX_TOAST_HISTORY: 50,
139
+ MAX_PROGRESS_HISTORY_PER_SESSION: 100,
140
+ ARCHIVE_AGE_MS: 30 * TIME.MINUTE,
141
+ ERROR_CLEANUP_AGE_MS: 10 * TIME.MINUTE
142
+ };
143
+ CLI_NAME = {
144
+ NPX: "npx",
145
+ TSC: "tsc",
146
+ ESLINT: "eslint",
147
+ RG: "rg",
148
+ SED: "sed",
149
+ AST_GREP: "ast-grep",
150
+ GIT: "git",
151
+ JQ: "jq",
152
+ NODE: "node",
153
+ SH: "sh"
154
+ };
102
155
  ID_PREFIX = {
103
156
  TASK: "task_",
104
157
  JOB: "job_",
@@ -107,14 +160,6 @@ var init_id_prefix = __esm({
107
160
  UNIT_TEST: "UT-",
108
161
  WORKER: "wrk_"
109
162
  };
110
- }
111
- });
112
-
113
- // src/shared/core/constants/paths.ts
114
- var PATHS;
115
- var init_paths = __esm({
116
- "src/shared/core/constants/paths.ts"() {
117
- "use strict";
118
163
  PATHS = {
119
164
  OPENCODE: ".opencode",
120
165
  DOCS: ".opencode/docs",
@@ -136,103 +181,6 @@ var init_paths = __esm({
136
181
  AGENTS_CONFIG: ".opencode/agents.json",
137
182
  PLUGINS: ".opencode/plugins"
138
183
  };
139
- }
140
- });
141
-
142
- // src/shared/core/constants/memory-limits.ts
143
- var MEMORY_LIMITS;
144
- var init_memory_limits = __esm({
145
- "src/shared/core/constants/memory-limits.ts"() {
146
- "use strict";
147
- init_time();
148
- MEMORY_LIMITS = {
149
- MAX_TASKS_IN_MEMORY: 1e3,
150
- MAX_NOTIFICATIONS_PER_PARENT: 100,
151
- MAX_EVENT_HISTORY: 100,
152
- MAX_TOAST_HISTORY: 50,
153
- MAX_PROGRESS_HISTORY_PER_SESSION: 100,
154
- ARCHIVE_AGE_MS: 30 * TIME.MINUTE,
155
- ERROR_CLEANUP_AGE_MS: 10 * TIME.MINUTE
156
- };
157
- }
158
- });
159
-
160
- // src/shared/core/constants/status-labels.ts
161
- var STATUS_LABEL;
162
- var init_status_labels = __esm({
163
- "src/shared/core/constants/status-labels.ts"() {
164
- "use strict";
165
- STATUS_LABEL = {
166
- // Basic States
167
- PENDING: "pending",
168
- QUEUED: "queued",
169
- RUNNING: "running",
170
- IN_PROGRESS: "in_progress",
171
- COMPLETED: "completed",
172
- DONE: "done",
173
- SUCCESS: "success",
174
- // Failure States
175
- FAILED: "failed",
176
- ERROR: "error",
177
- TIMEOUT: "timeout",
178
- CANCELLED: "cancelled",
179
- BLOCKED: "blocked",
180
- // Test/Audit Results
181
- PASS: "pass",
182
- FAIL: "fail",
183
- SKIP: "skip",
184
- // Quality/Cleanliness
185
- CLEAN: "clean",
186
- OK: "ok",
187
- VERIFIED: "verified",
188
- // Analysis/Diagnostic
189
- WARNING: "warning",
190
- INFO: "info",
191
- HINT: "hint",
192
- ALL: "all",
193
- HIGH: "high",
194
- MEDIUM: "medium",
195
- LOW: "low"
196
- };
197
- }
198
- });
199
-
200
- // src/shared/core/constants/limits.ts
201
- var LIMITS;
202
- var init_limits = __esm({
203
- "src/shared/core/constants/limits.ts"() {
204
- "use strict";
205
- LIMITS = {
206
- /** Maximum mission loop iterations */
207
- MAX_ITERATIONS: 1e9,
208
- /** Default scan limit for file listing */
209
- DEFAULT_SCAN_LIMIT: 20,
210
- /** Max message history to check for conclusion */
211
- CONCLUDE_CHECK_HISTORY: 3,
212
- /** Max concurrent tasks per agent */
213
- MAX_TASKS_PER_AGENT: 10,
214
- /** Default history/list limit for UI */
215
- DEFAULT_LIST_LIMIT: 20,
216
- /** Default progress bar width */
217
- DEFAULT_PROGRESS_WIDTH: 20,
218
- /** Maximum time for atomic task (minutes) */
219
- TASK_TIME_LIMIT_MIN: 10
220
- };
221
- }
222
- });
223
-
224
- // src/shared/core/constants/wal-actions.ts
225
- var init_wal_actions = __esm({
226
- "src/shared/core/constants/wal-actions.ts"() {
227
- "use strict";
228
- }
229
- });
230
-
231
- // src/shared/core/constants/phases.ts
232
- var PHASES;
233
- var init_phases = __esm({
234
- "src/shared/core/constants/phases.ts"() {
235
- "use strict";
236
184
  PHASES = {
237
185
  PHASE_0: {
238
186
  ID: "PHASE_0",
@@ -277,70 +225,99 @@ var init_phases = __esm({
277
225
  MANDATORY: true
278
226
  }
279
227
  };
280
- }
281
- });
282
-
283
- // src/shared/tool/constants/tool-names.ts
284
- var TOOL_NAMES;
285
- var init_tool_names = __esm({
286
- "src/shared/tool/constants/tool-names.ts"() {
287
- "use strict";
288
- TOOL_NAMES = {
289
- // Parallel task tools
290
- DELEGATE_TASK: "delegate_task",
291
- GET_TASK_RESULT: "get_task_result",
292
- LIST_TASKS: "list_tasks",
293
- CANCEL_TASK: "cancel_task",
294
- LIST_AGENTS: "list_agents",
295
- SHOW_METRICS: "show_metrics",
296
- UPDATE_TODO: "update_todo",
297
- // Background command tools
298
- RUN_BACKGROUND: "run_background",
299
- CHECK_BACKGROUND: "check_background",
300
- LIST_BACKGROUND: "list_background",
301
- KILL_BACKGROUND: "kill_background",
302
- // Command tools
303
- RUN_COMMAND: "run_command",
304
- // Search tools
305
- GREP_SEARCH: "grep_search",
306
- GLOB_SEARCH: "glob_search",
307
- MGREP: "mgrep",
308
- SED_REPLACE: "sed_replace",
309
- // Diff & Compare tools
310
- DIFF: "diff",
311
- // JSON tools
312
- JQ: "jq",
313
- // HTTP tools
314
- HTTP: "http",
315
- // File tools
316
- FILE_STATS: "file_stats",
317
- // Git tools
318
- GIT_DIFF: "git_diff",
319
- GIT_STATUS: "git_status",
320
- // Web tools
321
- WEBFETCH: "webfetch",
322
- WEBSEARCH: "websearch",
323
- CODESEARCH: "codesearch",
324
- CACHE_DOCS: "cache_docs",
325
- // LSP tools
326
- LSP_DIAGNOSTICS: "lsp_diagnostics",
327
- // AST tools
328
- AST_SEARCH: "ast_search",
329
- AST_REPLACE: "ast_replace",
330
- // Other tools
331
- CALL_AGENT: "call_agent",
332
- SLASHCOMMAND: "slashcommand",
333
- SKILL: "skill"
228
+ LIMITS = {
229
+ /** Maximum mission loop iterations */
230
+ MAX_ITERATIONS: 1e9,
231
+ /** Default scan limit for file listing */
232
+ DEFAULT_SCAN_LIMIT: 20,
233
+ /** Max message history to check for conclusion */
234
+ CONCLUDE_CHECK_HISTORY: 3,
235
+ /** Max concurrent tasks per agent */
236
+ MAX_TASKS_PER_AGENT: 10,
237
+ /** Default history/list limit for UI */
238
+ DEFAULT_LIST_LIMIT: 20,
239
+ /** Default progress bar width */
240
+ DEFAULT_PROGRESS_WIDTH: 20,
241
+ /** Maximum time for atomic task (minutes) */
242
+ TASK_TIME_LIMIT_MIN: 10
243
+ };
244
+ STATUS_LABEL = {
245
+ // Basic States
246
+ PENDING: "pending",
247
+ QUEUED: "queued",
248
+ RUNNING: "running",
249
+ IN_PROGRESS: "in_progress",
250
+ COMPLETED: "completed",
251
+ DONE: "done",
252
+ SUCCESS: "success",
253
+ // Failure States
254
+ FAILED: "failed",
255
+ ERROR: "error",
256
+ TIMEOUT: "timeout",
257
+ CANCELLED: "cancelled",
258
+ BLOCKED: "blocked",
259
+ // Test/Audit Results
260
+ PASS: "pass",
261
+ FAIL: "fail",
262
+ SKIP: "skip",
263
+ // Quality/Cleanliness
264
+ CLEAN: "clean",
265
+ OK: "ok",
266
+ VERIFIED: "verified",
267
+ // Analysis/Diagnostic
268
+ WARNING: "warning",
269
+ INFO: "info",
270
+ HINT: "hint",
271
+ ALL: "all",
272
+ HIGH: "high",
273
+ MEDIUM: "medium",
274
+ LOW: "low"
275
+ };
276
+ LOG_PREFIX = {
277
+ /** Rust Tool pool operations */
278
+ RUST_TOOL: "RustTool",
279
+ RUST_POOL: "RustPool",
280
+ /** LSP diagnostics caching */
281
+ DIAGNOSTICS_CACHE: "DiagnosticsCache",
282
+ /** Context window monitoring */
283
+ CONTEXT_WINDOW_MONITOR: "context-window-monitor",
284
+ /** Memory management */
285
+ MEMORY_MANAGER: "MemoryManager",
286
+ /** Plugin system */
287
+ PLUGIN_MANAGER: "PluginManager",
288
+ /** OS notifications */
289
+ SESSION_NOTIFY: "session-notify",
290
+ /** Session recovery */
291
+ SESSION_RECOVERY: "session-recovery",
292
+ /** Lifecycle management */
293
+ SHUTDOWN_MANAGER: "ShutdownManager",
294
+ /** Agent registry */
295
+ AGENT_REGISTRY: "AgentRegistry",
296
+ /** Task synchronization */
297
+ TODO_SYNC: "TodoSync",
298
+ /** Cleanup scheduler */
299
+ CLEANUP_SCHEDULER: "CleanupScheduler",
300
+ /** Background task management */
301
+ BACKGROUND_TASK_MANAGER: "BackgroundTaskManager",
302
+ /** Parallel agent management */
303
+ PARALLEL_AGENT_MANAGER: "ParallelAgentManager",
304
+ /** File watching */
305
+ FILE_WATCHER: "FileWatcher"
306
+ };
307
+ SHUTDOWN_HANDLERS = {
308
+ /** TodoSyncService - Syncs TODO state via file watching */
309
+ TODO_SYNC_SERVICE: "TodoSyncService",
310
+ /** CleanupScheduler - Manages periodic cleanup tasks */
311
+ CLEANUP_SCHEDULER: "CleanupScheduler",
312
+ /** RustToolPool - Manages Rust tool instances */
313
+ RUST_TOOL_POOL: "RustToolPool",
314
+ /** BackgroundTaskManager - Manages background command execution */
315
+ BACKGROUND_TASK_MANAGER: "BackgroundTaskManager",
316
+ /** ParallelAgentManager - Manages parallel agent task execution */
317
+ PARALLEL_AGENT_MANAGER: "ParallelAgentManager",
318
+ /** PluginManager - Manages dynamic plugin lifecycle */
319
+ PLUGIN_MANAGER: "PluginManager"
334
320
  };
335
- }
336
- });
337
-
338
- // src/shared/core/constants/memory-hooks.ts
339
- var MEMORY_CONSTANTS, HOOK_NAMES, TODO_CONSTANTS;
340
- var init_memory_hooks = __esm({
341
- "src/shared/core/constants/memory-hooks.ts"() {
342
- "use strict";
343
- init_tool_names();
344
321
  MEMORY_CONSTANTS = {
345
322
  ID_PREFIX: "mem_",
346
323
  LEVELS: {
@@ -407,106 +384,6 @@ var init_memory_hooks = __esm({
407
384
  }
408
385
  });
409
386
 
410
- // src/shared/core/constants/lifecycle.ts
411
- var SHUTDOWN_HANDLERS;
412
- var init_lifecycle = __esm({
413
- "src/shared/core/constants/lifecycle.ts"() {
414
- "use strict";
415
- SHUTDOWN_HANDLERS = {
416
- /** TodoSyncService - Syncs TODO state via file watching */
417
- TODO_SYNC_SERVICE: "TodoSyncService",
418
- /** CleanupScheduler - Manages periodic cleanup tasks */
419
- CLEANUP_SCHEDULER: "CleanupScheduler",
420
- /** RustToolPool - Manages Rust tool instances */
421
- RUST_TOOL_POOL: "RustToolPool",
422
- /** BackgroundTaskManager - Manages background command execution */
423
- BACKGROUND_TASK_MANAGER: "BackgroundTaskManager",
424
- /** ParallelAgentManager - Manages parallel agent task execution */
425
- PARALLEL_AGENT_MANAGER: "ParallelAgentManager",
426
- /** PluginManager - Manages dynamic plugin lifecycle */
427
- PLUGIN_MANAGER: "PluginManager"
428
- };
429
- }
430
- });
431
-
432
- // src/shared/core/constants/logging.ts
433
- var LOG_PREFIX;
434
- var init_logging = __esm({
435
- "src/shared/core/constants/logging.ts"() {
436
- "use strict";
437
- LOG_PREFIX = {
438
- /** Rust Tool pool operations */
439
- RUST_TOOL: "RustTool",
440
- RUST_POOL: "RustPool",
441
- /** LSP diagnostics caching */
442
- DIAGNOSTICS_CACHE: "DiagnosticsCache",
443
- /** Context window monitoring */
444
- CONTEXT_WINDOW_MONITOR: "context-window-monitor",
445
- /** Memory management */
446
- MEMORY_MANAGER: "MemoryManager",
447
- /** Plugin system */
448
- PLUGIN_MANAGER: "PluginManager",
449
- /** OS notifications */
450
- SESSION_NOTIFY: "session-notify",
451
- /** Session recovery */
452
- SESSION_RECOVERY: "session-recovery",
453
- /** Lifecycle management */
454
- SHUTDOWN_MANAGER: "ShutdownManager",
455
- /** Agent registry */
456
- AGENT_REGISTRY: "AgentRegistry",
457
- /** Task synchronization */
458
- TODO_SYNC: "TodoSync",
459
- /** Cleanup scheduler */
460
- CLEANUP_SCHEDULER: "CleanupScheduler",
461
- /** Background task management */
462
- BACKGROUND_TASK_MANAGER: "BackgroundTaskManager",
463
- /** Parallel agent management */
464
- PARALLEL_AGENT_MANAGER: "ParallelAgentManager",
465
- /** File watching */
466
- FILE_WATCHER: "FileWatcher"
467
- };
468
- }
469
- });
470
-
471
- // src/shared/core/constants/cli.ts
472
- var CLI_NAME;
473
- var init_cli = __esm({
474
- "src/shared/core/constants/cli.ts"() {
475
- "use strict";
476
- CLI_NAME = {
477
- NPX: "npx",
478
- TSC: "tsc",
479
- ESLINT: "eslint",
480
- RG: "rg",
481
- SED: "sed",
482
- AST_GREP: "ast-grep",
483
- GIT: "git",
484
- JQ: "jq",
485
- NODE: "node",
486
- SH: "sh"
487
- };
488
- }
489
- });
490
-
491
- // src/shared/core/constants/index.ts
492
- var init_constants2 = __esm({
493
- "src/shared/core/constants/index.ts"() {
494
- "use strict";
495
- init_time();
496
- init_id_prefix();
497
- init_paths();
498
- init_memory_limits();
499
- init_status_labels();
500
- init_limits();
501
- init_wal_actions();
502
- init_phases();
503
- init_memory_hooks();
504
- init_lifecycle();
505
- init_logging();
506
- init_cli();
507
- }
508
- });
509
-
510
387
  // src/shared/core/index.ts
511
388
  var init_core = __esm({
512
389
  "src/shared/core/index.ts"() {
@@ -515,12 +392,32 @@ var init_core = __esm({
515
392
  }
516
393
  });
517
394
 
518
- // src/shared/task/constants/parallel-task.ts
519
- var PARALLEL_LABEL, PARALLEL_TASK;
520
- var init_parallel_task = __esm({
521
- "src/shared/task/constants/parallel-task.ts"() {
395
+ // src/shared/task/constants.ts
396
+ var BACKGROUND_STATUS, BACKGROUND_TASK, TASK_METADATA, PARALLEL_LABEL, PARALLEL_TASK;
397
+ var init_constants3 = __esm({
398
+ "src/shared/task/constants.ts"() {
522
399
  "use strict";
523
- init_time();
400
+ init_constants2();
401
+ BACKGROUND_STATUS = {
402
+ RUNNING: "running",
403
+ DONE: "done",
404
+ ERROR: "error",
405
+ TIMEOUT: "timeout"
406
+ };
407
+ BACKGROUND_TASK = {
408
+ DEFAULT_TIMEOUT_MS: 5 * TIME.MINUTE,
409
+ MAX_OUTPUT_LENGTH: 1e4,
410
+ MAX_CONCURRENT: 5,
411
+ POLL_INTERVAL_MS: 500,
412
+ RETRY_COOLDOWN_MS: 30 * TIME.SECOND
413
+ };
414
+ TASK_METADATA = {
415
+ PARALLEL: "parallel",
416
+ PARALLEL_GROUP: "parallel_group",
417
+ DEPENDS: "depends",
418
+ AGENT: "agent",
419
+ SIZE: "size"
420
+ };
524
421
  PARALLEL_LABEL = "parallel";
525
422
  PARALLEL_TASK = {
526
423
  // Task lifecycle (24 hours for long tasks)
@@ -569,72 +466,9 @@ var init_parallel_task = __esm({
569
466
  }
570
467
  });
571
468
 
572
- // src/shared/task/constants/background-task.ts
573
- var BACKGROUND_TASK;
574
- var init_background_task = __esm({
575
- "src/shared/task/constants/background-task.ts"() {
576
- "use strict";
577
- init_time();
578
- BACKGROUND_TASK = {
579
- DEFAULT_TIMEOUT_MS: 5 * TIME.MINUTE,
580
- MAX_OUTPUT_LENGTH: 1e4,
581
- MAX_CONCURRENT: 5,
582
- POLL_INTERVAL_MS: 500,
583
- RETRY_COOLDOWN_MS: 30 * TIME.SECOND
584
- };
585
- }
586
- });
587
-
588
- // src/shared/task/constants/background-status.ts
589
- var BACKGROUND_STATUS;
590
- var init_background_status = __esm({
591
- "src/shared/task/constants/background-status.ts"() {
592
- "use strict";
593
- BACKGROUND_STATUS = {
594
- RUNNING: "running",
595
- DONE: "done",
596
- ERROR: "error",
597
- TIMEOUT: "timeout"
598
- };
599
- }
600
- });
601
-
602
- // src/shared/task/constants/metadata-keys.ts
603
- var TASK_METADATA;
604
- var init_metadata_keys = __esm({
605
- "src/shared/task/constants/metadata-keys.ts"() {
606
- "use strict";
607
- TASK_METADATA = {
608
- PARALLEL: "parallel",
609
- PARALLEL_GROUP: "parallel_group",
610
- DEPENDS: "depends",
611
- AGENT: "agent",
612
- SIZE: "size"
613
- };
614
- }
615
- });
616
-
617
- // src/shared/task/constants/index.ts
618
- var init_constants3 = __esm({
619
- "src/shared/task/constants/index.ts"() {
620
- "use strict";
621
- init_parallel_task();
622
- init_background_task();
623
- init_background_status();
624
- init_metadata_keys();
625
- }
626
- });
627
-
628
- // src/shared/task/interfaces/index.ts
629
- var init_interfaces2 = __esm({
630
- "src/shared/task/interfaces/index.ts"() {
631
- "use strict";
632
- }
633
- });
634
-
635
- // src/shared/task/types/index.ts
469
+ // src/shared/task/types.ts
636
470
  var init_types2 = __esm({
637
- "src/shared/task/types/index.ts"() {
471
+ "src/shared/task/types.ts"() {
638
472
  "use strict";
639
473
  }
640
474
  });
@@ -644,18 +478,16 @@ var init_task = __esm({
644
478
  "src/shared/task/index.ts"() {
645
479
  "use strict";
646
480
  init_constants3();
647
- init_interfaces2();
648
481
  init_types2();
649
482
  }
650
483
  });
651
484
 
652
- // src/shared/loop/constants/loop.ts
653
- var LOOP;
654
- var init_loop = __esm({
655
- "src/shared/loop/constants/loop.ts"() {
485
+ // src/shared/loop/constants.ts
486
+ var LOOP, MISSION_CONTROL, TASK_STATUS, TODO_STATUS, LOOP_LABELS;
487
+ var init_constants4 = __esm({
488
+ "src/shared/loop/constants.ts"() {
656
489
  "use strict";
657
- init_time();
658
- init_limits();
490
+ init_constants2();
659
491
  LOOP = {
660
492
  /** Countdown seconds before auto-continuation */
661
493
  COUNTDOWN_SECONDS: 3,
@@ -670,15 +502,6 @@ var init_loop = __esm({
670
502
  /** Rust tool timeout */
671
503
  RUST_TOOL_TIMEOUT_MS: 60 * TIME.SECOND
672
504
  };
673
- }
674
- });
675
-
676
- // src/shared/loop/constants/mission-control.ts
677
- var MISSION_CONTROL;
678
- var init_mission_control = __esm({
679
- "src/shared/loop/constants/mission-control.ts"() {
680
- "use strict";
681
- init_limits();
682
505
  MISSION_CONTROL = {
683
506
  DEFAULT_MAX_ITERATIONS: LIMITS.MAX_ITERATIONS,
684
507
  DEFAULT_COUNTDOWN_SECONDS: 3,
@@ -687,15 +510,6 @@ var init_mission_control = __esm({
687
510
  CANCEL_COMMAND: "/cancel",
688
511
  LOG_SOURCE: "mission-loop"
689
512
  };
690
- }
691
- });
692
-
693
- // src/shared/loop/constants/task-status.ts
694
- var TASK_STATUS;
695
- var init_task_status = __esm({
696
- "src/shared/loop/constants/task-status.ts"() {
697
- "use strict";
698
- init_status_labels();
699
513
  TASK_STATUS = {
700
514
  PENDING: STATUS_LABEL.PENDING,
701
515
  RUNNING: STATUS_LABEL.RUNNING,
@@ -705,29 +519,12 @@ var init_task_status = __esm({
705
519
  TIMEOUT: STATUS_LABEL.TIMEOUT,
706
520
  CANCELLED: STATUS_LABEL.CANCELLED
707
521
  };
708
- }
709
- });
710
-
711
- // src/shared/loop/constants/todo-status.ts
712
- var TODO_STATUS;
713
- var init_todo_status = __esm({
714
- "src/shared/loop/constants/todo-status.ts"() {
715
- "use strict";
716
- init_status_labels();
717
522
  TODO_STATUS = {
718
523
  PENDING: STATUS_LABEL.PENDING,
719
524
  IN_PROGRESS: STATUS_LABEL.IN_PROGRESS,
720
525
  COMPLETED: STATUS_LABEL.COMPLETED,
721
526
  CANCELLED: STATUS_LABEL.CANCELLED
722
527
  };
723
- }
724
- });
725
-
726
- // src/shared/loop/constants/labels.ts
727
- var LOOP_LABELS;
728
- var init_labels = __esm({
729
- "src/shared/loop/constants/labels.ts"() {
730
- "use strict";
731
528
  LOOP_LABELS = {
732
529
  // Progress
733
530
  PROGRESS_PREFIX: "[TODO Progress]:",
@@ -767,72 +564,28 @@ var init_labels = __esm({
767
564
  }
768
565
  });
769
566
 
770
- // src/shared/loop/constants/index.ts
771
- var init_constants4 = __esm({
772
- "src/shared/loop/constants/index.ts"() {
773
- "use strict";
774
- init_loop();
775
- init_mission_control();
776
- init_task_status();
777
- init_todo_status();
778
- init_labels();
779
- }
780
- });
781
-
782
- // src/shared/loop/interfaces/todo.ts
783
- var init_todo = __esm({
784
- "src/shared/loop/interfaces/todo.ts"() {
785
- "use strict";
786
- }
787
- });
788
-
789
- // src/shared/loop/interfaces/todo-stats.ts
790
- var init_todo_stats = __esm({
791
- "src/shared/loop/interfaces/todo-stats.ts"() {
792
- "use strict";
793
- }
794
- });
795
-
796
- // src/shared/loop/interfaces/mission-loop.ts
797
- var init_mission_loop = __esm({
798
- "src/shared/loop/interfaces/mission-loop.ts"() {
799
- "use strict";
800
- }
801
- });
802
-
803
- // src/shared/loop/interfaces/index.ts
804
- var init_interfaces3 = __esm({
805
- "src/shared/loop/interfaces/index.ts"() {
806
- "use strict";
807
- init_todo();
808
- init_todo_stats();
809
- init_mission_loop();
810
- }
811
- });
812
-
813
- // src/shared/loop/types/index.ts
567
+ // src/shared/loop/types.ts
814
568
  var init_types3 = __esm({
815
- "src/shared/loop/types/index.ts"() {
569
+ "src/shared/loop/types.ts"() {
816
570
  "use strict";
817
571
  }
818
572
  });
819
573
 
820
574
  // src/shared/loop/index.ts
821
- var init_loop2 = __esm({
575
+ var init_loop = __esm({
822
576
  "src/shared/loop/index.ts"() {
823
577
  "use strict";
824
578
  init_constants4();
825
- init_interfaces3();
826
579
  init_types3();
827
580
  }
828
581
  });
829
582
 
830
- // src/shared/notification/constants/toast-duration.ts
831
- var TOAST_DURATION;
832
- var init_toast_duration = __esm({
833
- "src/shared/notification/constants/toast-duration.ts"() {
583
+ // src/shared/notification/constants.ts
584
+ var TOAST_DURATION, TOAST_VARIANTS, TUI_ICONS, TUI_BLOCKS, TUI_TAGS, TUI_MESSAGES;
585
+ var init_constants5 = __esm({
586
+ "src/shared/notification/constants.ts"() {
834
587
  "use strict";
835
- init_time();
588
+ init_constants2();
836
589
  TOAST_DURATION = {
837
590
  /** Extra short: 1.5 seconds */
838
591
  EXTRA_SHORT: 1500,
@@ -849,14 +602,12 @@ var init_toast_duration = __esm({
849
602
  /** Persistent: 0 (stays until dismissed) */
850
603
  PERSISTENT: 0
851
604
  };
852
- }
853
- });
854
-
855
- // src/shared/notification/constants/tui.const.ts
856
- var TUI_ICONS, TUI_BLOCKS, TUI_TAGS, TUI_MESSAGES;
857
- var init_tui_const = __esm({
858
- "src/shared/notification/constants/tui.const.ts"() {
859
- "use strict";
605
+ TOAST_VARIANTS = {
606
+ INFO: "info",
607
+ SUCCESS: "success",
608
+ WARNING: "warning",
609
+ ERROR: "error"
610
+ };
860
611
  TUI_ICONS = {
861
612
  RUNNING: "\u26A1",
862
613
  QUEUED: "\u23F3",
@@ -881,48 +632,9 @@ var init_tui_const = __esm({
881
632
  }
882
633
  });
883
634
 
884
- // src/shared/notification/constants/toast-variants.ts
885
- var TOAST_VARIANTS;
886
- var init_toast_variants = __esm({
887
- "src/shared/notification/constants/toast-variants.ts"() {
888
- "use strict";
889
- TOAST_VARIANTS = {
890
- INFO: "info",
891
- SUCCESS: "success",
892
- WARNING: "warning",
893
- ERROR: "error"
894
- };
895
- }
896
- });
897
-
898
- // src/shared/notification/constants/index.ts
899
- var init_constants5 = __esm({
900
- "src/shared/notification/constants/index.ts"() {
901
- "use strict";
902
- init_toast_duration();
903
- init_tui_const();
904
- init_toast_variants();
905
- }
906
- });
907
-
908
- // src/shared/notification/interfaces/task-toast.interface.ts
909
- var init_task_toast_interface = __esm({
910
- "src/shared/notification/interfaces/task-toast.interface.ts"() {
911
- "use strict";
912
- }
913
- });
914
-
915
- // src/shared/notification/interfaces/index.ts
916
- var init_interfaces4 = __esm({
917
- "src/shared/notification/interfaces/index.ts"() {
918
- "use strict";
919
- init_task_toast_interface();
920
- }
921
- });
922
-
923
- // src/shared/notification/types/index.ts
635
+ // src/shared/notification/types.ts
924
636
  var init_types4 = __esm({
925
- "src/shared/notification/types/index.ts"() {
637
+ "src/shared/notification/types.ts"() {
926
638
  "use strict";
927
639
  }
928
640
  });
@@ -1073,13 +785,36 @@ var init_toast_core = __esm({
1073
785
  }
1074
786
  });
1075
787
 
1076
- // src/shared/notification/presets/task-lifecycle.ts
1077
- var taskStarted, taskCompleted, taskFailed, allTasksComplete;
1078
- var init_task_lifecycle = __esm({
1079
- "src/shared/notification/presets/task-lifecycle.ts"() {
788
+ // src/shared/notification/presets.ts
789
+ var presets_exports = {};
790
+ __export(presets_exports, {
791
+ allTasksComplete: () => allTasksComplete,
792
+ concurrencyAcquired: () => concurrencyAcquired,
793
+ concurrencyReleased: () => concurrencyReleased,
794
+ documentCached: () => documentCached,
795
+ errorRecovery: () => errorRecovery,
796
+ missionComplete: () => missionComplete,
797
+ missionStarted: () => missionStarted,
798
+ parallelTasksLaunched: () => parallelTasksLaunched,
799
+ researchStarted: () => researchStarted,
800
+ sessionCompleted: () => sessionCompleted,
801
+ sessionCreated: () => sessionCreated,
802
+ sessionResumed: () => sessionResumed,
803
+ taskCompleted: () => taskCompleted,
804
+ taskFailed: () => taskFailed,
805
+ taskStarted: () => taskStarted,
806
+ toolExecuted: () => toolExecuted,
807
+ warningMaxDepth: () => warningMaxDepth,
808
+ warningMaxRetries: () => warningMaxRetries,
809
+ warningRateLimited: () => warningRateLimited
810
+ });
811
+ var taskStarted, taskCompleted, taskFailed, allTasksComplete, sessionCreated, sessionResumed, sessionCompleted, parallelTasksLaunched, concurrencyAcquired, concurrencyReleased, missionComplete, missionStarted, toolExecuted, documentCached, researchStarted, warningRateLimited, errorRecovery, warningMaxDepth, warningMaxRetries;
812
+ var init_presets = __esm({
813
+ "src/shared/notification/presets.ts"() {
1080
814
  "use strict";
1081
815
  init_toast_core();
1082
816
  init_constants5();
817
+ init_shared();
1083
818
  taskStarted = (taskId, agent) => show({
1084
819
  title: "Task Started",
1085
820
  message: `${agent}: ${taskId}`,
@@ -1104,16 +839,6 @@ var init_task_lifecycle = __esm({
1104
839
  variant: TOAST_VARIANTS.SUCCESS,
1105
840
  duration: 5e3
1106
841
  });
1107
- }
1108
- });
1109
-
1110
- // src/shared/notification/presets/session.ts
1111
- var sessionCreated, sessionResumed, sessionCompleted;
1112
- var init_session = __esm({
1113
- "src/shared/notification/presets/session.ts"() {
1114
- "use strict";
1115
- init_toast_core();
1116
- init_shared();
1117
842
  sessionCreated = (sessionId, agent) => show({
1118
843
  title: "Session Created",
1119
844
  message: `${agent} - ${sessionId.slice(0, 12)}...`,
@@ -1132,16 +857,6 @@ var init_session = __esm({
1132
857
  variant: STATUS_LABEL.SUCCESS,
1133
858
  duration: TOAST_DURATION.MEDIUM
1134
859
  });
1135
- }
1136
- });
1137
-
1138
- // src/shared/notification/presets/parallel.ts
1139
- var parallelTasksLaunched, concurrencyAcquired, concurrencyReleased;
1140
- var init_parallel = __esm({
1141
- "src/shared/notification/presets/parallel.ts"() {
1142
- "use strict";
1143
- init_toast_core();
1144
- init_shared();
1145
860
  parallelTasksLaunched = (count, agents) => show({
1146
861
  title: "Parallel Tasks Launched",
1147
862
  message: `${count} tasks: ${agents.join(", ")}`,
@@ -1160,16 +875,6 @@ var init_parallel = __esm({
1160
875
  variant: "info",
1161
876
  duration: TOAST_DURATION.EXTRA_SHORT
1162
877
  });
1163
- }
1164
- });
1165
-
1166
- // src/shared/notification/presets/mission.ts
1167
- var missionComplete, missionStarted;
1168
- var init_mission = __esm({
1169
- "src/shared/notification/presets/mission.ts"() {
1170
- "use strict";
1171
- init_toast_core();
1172
- init_constants5();
1173
878
  missionComplete = (summary) => show({
1174
879
  title: "Mission Complete",
1175
880
  message: summary,
@@ -1182,16 +887,6 @@ var init_mission = __esm({
1182
887
  variant: TOAST_VARIANTS.INFO,
1183
888
  duration: 4e3
1184
889
  });
1185
- }
1186
- });
1187
-
1188
- // src/shared/notification/presets/tools.ts
1189
- var toolExecuted, documentCached, researchStarted;
1190
- var init_tools = __esm({
1191
- "src/shared/notification/presets/tools.ts"() {
1192
- "use strict";
1193
- init_toast_core();
1194
- init_shared();
1195
890
  toolExecuted = (toolName, target) => show({
1196
891
  title: toolName,
1197
892
  message: target.slice(0, 80),
@@ -1210,16 +905,6 @@ var init_tools = __esm({
1210
905
  variant: "info",
1211
906
  duration: TOAST_DURATION.MEDIUM
1212
907
  });
1213
- }
1214
- });
1215
-
1216
- // src/shared/notification/presets/warnings.ts
1217
- var warningRateLimited, errorRecovery, warningMaxDepth, warningMaxRetries;
1218
- var init_warnings = __esm({
1219
- "src/shared/notification/presets/warnings.ts"() {
1220
- "use strict";
1221
- init_toast_core();
1222
- init_shared();
1223
908
  warningRateLimited = () => show({
1224
909
  title: "Rate Limited",
1225
910
  message: "Waiting before retry...",
@@ -1247,58 +932,22 @@ var init_warnings = __esm({
1247
932
  }
1248
933
  });
1249
934
 
1250
- // src/shared/notification/presets/index.ts
1251
- var presets_exports = {};
1252
- __export(presets_exports, {
1253
- allTasksComplete: () => allTasksComplete,
1254
- concurrencyAcquired: () => concurrencyAcquired,
1255
- concurrencyReleased: () => concurrencyReleased,
1256
- documentCached: () => documentCached,
1257
- errorRecovery: () => errorRecovery,
1258
- missionComplete: () => missionComplete,
1259
- missionStarted: () => missionStarted,
1260
- parallelTasksLaunched: () => parallelTasksLaunched,
1261
- researchStarted: () => researchStarted,
1262
- sessionCompleted: () => sessionCompleted,
1263
- sessionCreated: () => sessionCreated,
1264
- sessionResumed: () => sessionResumed,
1265
- taskCompleted: () => taskCompleted,
1266
- taskFailed: () => taskFailed,
1267
- taskStarted: () => taskStarted,
1268
- toolExecuted: () => toolExecuted,
1269
- warningMaxDepth: () => warningMaxDepth,
1270
- warningMaxRetries: () => warningMaxRetries,
1271
- warningRateLimited: () => warningRateLimited
1272
- });
1273
- var init_presets = __esm({
1274
- "src/shared/notification/presets/index.ts"() {
1275
- "use strict";
1276
- init_task_lifecycle();
1277
- init_session();
1278
- init_parallel();
1279
- init_mission();
1280
- init_tools();
1281
- init_warnings();
1282
- }
1283
- });
1284
-
1285
935
  // src/shared/notification/index.ts
1286
936
  var init_notification = __esm({
1287
937
  "src/shared/notification/index.ts"() {
1288
938
  "use strict";
1289
939
  init_constants5();
1290
- init_interfaces4();
1291
940
  init_types4();
1292
941
  init_presets();
1293
942
  }
1294
943
  });
1295
944
 
1296
- // src/shared/recovery/constants/recovery.ts
1297
- var RECOVERY;
1298
- var init_recovery = __esm({
1299
- "src/shared/recovery/constants/recovery.ts"() {
945
+ // src/shared/recovery/constants.ts
946
+ var RECOVERY, HISTORY, RECOVERY_LEVEL, RECOVERY_PRINCIPLE;
947
+ var init_constants6 = __esm({
948
+ "src/shared/recovery/constants.ts"() {
1300
949
  "use strict";
1301
- init_time();
950
+ init_constants2();
1302
951
  RECOVERY = {
1303
952
  /** Maximum recovery attempts per session */
1304
953
  MAX_ATTEMPTS: 3,
@@ -1309,14 +958,6 @@ var init_recovery = __esm({
1309
958
  /** Maximum retry multiplier */
1310
959
  MAX_RETRY_MULTIPLIER: 5
1311
960
  };
1312
- }
1313
- });
1314
-
1315
- // src/shared/recovery/constants/history.ts
1316
- var HISTORY;
1317
- var init_history = __esm({
1318
- "src/shared/recovery/constants/history.ts"() {
1319
- "use strict";
1320
961
  HISTORY = {
1321
962
  /** Recovery history max entries */
1322
963
  MAX_RECOVERY: 100,
@@ -1325,14 +966,6 @@ var init_history = __esm({
1325
966
  /** Progress store max entries */
1326
967
  MAX_PROGRESS: 100
1327
968
  };
1328
- }
1329
- });
1330
-
1331
- // src/shared/recovery/constants/recovery-level.ts
1332
- var RECOVERY_LEVEL, RECOVERY_PRINCIPLE;
1333
- var init_recovery_level = __esm({
1334
- "src/shared/recovery/constants/recovery-level.ts"() {
1335
- "use strict";
1336
969
  RECOVERY_LEVEL = {
1337
970
  /** Level 1: Split task into smaller units */
1338
971
  DECOMPOSE: "DECOMPOSE",
@@ -1345,46 +978,28 @@ var init_recovery_level = __esm({
1345
978
  }
1346
979
  });
1347
980
 
1348
- // src/shared/recovery/constants/index.ts
1349
- var init_constants6 = __esm({
1350
- "src/shared/recovery/constants/index.ts"() {
1351
- "use strict";
1352
- init_recovery();
1353
- init_history();
1354
- init_recovery_level();
1355
- }
1356
- });
1357
-
1358
- // src/shared/recovery/interfaces/index.ts
1359
- var init_interfaces5 = __esm({
1360
- "src/shared/recovery/interfaces/index.ts"() {
1361
- "use strict";
1362
- }
1363
- });
1364
-
1365
- // src/shared/recovery/types/index.ts
981
+ // src/shared/recovery/types.ts
1366
982
  var init_types5 = __esm({
1367
- "src/shared/recovery/types/index.ts"() {
983
+ "src/shared/recovery/types.ts"() {
1368
984
  "use strict";
1369
985
  }
1370
986
  });
1371
987
 
1372
988
  // src/shared/recovery/index.ts
1373
- var init_recovery2 = __esm({
989
+ var init_recovery = __esm({
1374
990
  "src/shared/recovery/index.ts"() {
1375
991
  "use strict";
1376
992
  init_constants6();
1377
- init_interfaces5();
1378
993
  init_types5();
1379
994
  }
1380
995
  });
1381
996
 
1382
- // src/shared/cache/constants/cache.ts
1383
- var CACHE;
1384
- var init_cache = __esm({
1385
- "src/shared/cache/constants/cache.ts"() {
997
+ // src/shared/cache/constants.ts
998
+ var CACHE, CACHE_ACTIONS, FILTER_STATUS;
999
+ var init_constants7 = __esm({
1000
+ "src/shared/cache/constants.ts"() {
1386
1001
  "use strict";
1387
- init_time();
1002
+ init_constants2();
1388
1003
  CACHE = {
1389
1004
  /** Default cache TTL (24 hours) */
1390
1005
  DEFAULT_TTL_MS: 24 * TIME.HOUR,
@@ -1393,28 +1008,12 @@ var init_cache = __esm({
1393
1008
  /** Session TTL (24 hours for long tasks) */
1394
1009
  SESSION_TTL_MS: 24 * TIME.HOUR
1395
1010
  };
1396
- }
1397
- });
1398
-
1399
- // src/shared/cache/constants/cache-actions.ts
1400
- var CACHE_ACTIONS;
1401
- var init_cache_actions = __esm({
1402
- "src/shared/cache/constants/cache-actions.ts"() {
1403
- "use strict";
1404
1011
  CACHE_ACTIONS = {
1405
1012
  LIST: "list",
1406
1013
  GET: "get",
1407
1014
  CLEAR: "clear",
1408
1015
  STATS: "stats"
1409
1016
  };
1410
- }
1411
- });
1412
-
1413
- // src/shared/cache/constants/filter-status.ts
1414
- var FILTER_STATUS;
1415
- var init_filter_status = __esm({
1416
- "src/shared/cache/constants/filter-status.ts"() {
1417
- "use strict";
1418
1017
  FILTER_STATUS = {
1419
1018
  ALL: "all",
1420
1019
  RUNNING: "running",
@@ -1426,28 +1025,18 @@ var init_filter_status = __esm({
1426
1025
  }
1427
1026
  });
1428
1027
 
1429
- // src/shared/cache/constants/index.ts
1430
- var init_constants7 = __esm({
1431
- "src/shared/cache/constants/index.ts"() {
1432
- "use strict";
1433
- init_cache();
1434
- init_cache_actions();
1435
- init_filter_status();
1436
- }
1437
- });
1438
-
1439
1028
  // src/shared/cache/index.ts
1440
- var init_cache2 = __esm({
1029
+ var init_cache = __esm({
1441
1030
  "src/shared/cache/index.ts"() {
1442
1031
  "use strict";
1443
1032
  init_constants7();
1444
1033
  }
1445
1034
  });
1446
1035
 
1447
- // src/shared/session/constants/events/task-events.ts
1448
- var TASK_EVENTS;
1449
- var init_task_events = __esm({
1450
- "src/shared/session/constants/events/task-events.ts"() {
1036
+ // src/shared/session/constants.ts
1037
+ var TASK_EVENTS, TODO_EVENTS, SESSION_EVENTS, DOCUMENT_EVENTS, MISSION_EVENTS, MESSAGE_EVENTS, SPECIAL_EVENTS, EVENT_TYPES;
1038
+ var init_constants8 = __esm({
1039
+ "src/shared/session/constants.ts"() {
1451
1040
  "use strict";
1452
1041
  TASK_EVENTS = {
1453
1042
  STARTED: "task.started",
@@ -1455,27 +1044,11 @@ var init_task_events = __esm({
1455
1044
  FAILED: "task.failed",
1456
1045
  CANCELLED: "task.cancelled"
1457
1046
  };
1458
- }
1459
- });
1460
-
1461
- // src/shared/session/constants/events/todo-events.ts
1462
- var TODO_EVENTS;
1463
- var init_todo_events = __esm({
1464
- "src/shared/session/constants/events/todo-events.ts"() {
1465
- "use strict";
1466
1047
  TODO_EVENTS = {
1467
1048
  CREATED: "todo.created",
1468
1049
  UPDATED: "todo.updated",
1469
1050
  COMPLETED: "todo.completed"
1470
1051
  };
1471
- }
1472
- });
1473
-
1474
- // src/shared/session/constants/events/session-events.ts
1475
- var SESSION_EVENTS;
1476
- var init_session_events = __esm({
1477
- "src/shared/session/constants/events/session-events.ts"() {
1478
- "use strict";
1479
1052
  SESSION_EVENTS = {
1480
1053
  IDLE: "session.idle",
1481
1054
  STATUS: "session.status",
@@ -1486,75 +1059,21 @@ var init_session_events = __esm({
1486
1059
  DELETED: "session.deleted",
1487
1060
  CREATED: "session.created"
1488
1061
  };
1489
- }
1490
- });
1491
-
1492
- // src/shared/session/constants/events/document-events.ts
1493
- var DOCUMENT_EVENTS;
1494
- var init_document_events = __esm({
1495
- "src/shared/session/constants/events/document-events.ts"() {
1496
- "use strict";
1497
1062
  DOCUMENT_EVENTS = {
1498
1063
  CACHED: "document.cached",
1499
1064
  EXPIRED: "document.expired"
1500
1065
  };
1501
- }
1502
- });
1503
-
1504
- // src/shared/session/constants/events/mission-events.ts
1505
- var MISSION_EVENTS;
1506
- var init_mission_events = __esm({
1507
- "src/shared/session/constants/events/mission-events.ts"() {
1508
- "use strict";
1509
1066
  MISSION_EVENTS = {
1510
1067
  COMPLETE: "mission.complete",
1511
- FAILED: "mission.failed",
1512
- ALL_TASKS_COMPLETE: "all_tasks.complete"
1513
- };
1514
- }
1515
- });
1516
-
1517
- // src/shared/session/constants/events/message-events.ts
1518
- var MESSAGE_EVENTS;
1519
- var init_message_events = __esm({
1520
- "src/shared/session/constants/events/message-events.ts"() {
1521
- "use strict";
1068
+ FAILED: "mission.failed",
1069
+ ALL_TASKS_COMPLETE: "all_tasks.complete"
1070
+ };
1522
1071
  MESSAGE_EVENTS = {
1523
1072
  UPDATED: "message.updated"
1524
1073
  };
1525
- }
1526
- });
1527
-
1528
- // src/shared/session/constants/events/special-events.ts
1529
- var SPECIAL_EVENTS;
1530
- var init_special_events = __esm({
1531
- "src/shared/session/constants/events/special-events.ts"() {
1532
- "use strict";
1533
1074
  SPECIAL_EVENTS = {
1534
1075
  WILDCARD: "*"
1535
1076
  };
1536
- }
1537
- });
1538
-
1539
- // src/shared/session/constants/events/index.ts
1540
- var EVENT_TYPES;
1541
- var init_events = __esm({
1542
- "src/shared/session/constants/events/index.ts"() {
1543
- "use strict";
1544
- init_task_events();
1545
- init_todo_events();
1546
- init_session_events();
1547
- init_document_events();
1548
- init_mission_events();
1549
- init_message_events();
1550
- init_special_events();
1551
- init_task_events();
1552
- init_todo_events();
1553
- init_session_events();
1554
- init_document_events();
1555
- init_mission_events();
1556
- init_message_events();
1557
- init_special_events();
1558
1077
  EVENT_TYPES = {
1559
1078
  ...TASK_EVENTS,
1560
1079
  ...TODO_EVENTS,
@@ -1567,32 +1086,17 @@ var init_events = __esm({
1567
1086
  }
1568
1087
  });
1569
1088
 
1570
- // src/shared/session/constants/index.ts
1571
- var init_constants8 = __esm({
1572
- "src/shared/session/constants/index.ts"() {
1573
- "use strict";
1574
- init_events();
1575
- }
1576
- });
1577
-
1578
1089
  // src/shared/session/index.ts
1579
- var init_session2 = __esm({
1090
+ var init_session = __esm({
1580
1091
  "src/shared/session/index.ts"() {
1581
1092
  "use strict";
1582
1093
  init_constants8();
1583
1094
  }
1584
1095
  });
1585
1096
 
1586
- // src/shared/command/interfaces/index.ts
1587
- var init_interfaces6 = __esm({
1588
- "src/shared/command/interfaces/index.ts"() {
1589
- "use strict";
1590
- }
1591
- });
1592
-
1593
- // src/shared/command/types/index.ts
1097
+ // src/shared/command/types.ts
1594
1098
  var init_types6 = __esm({
1595
- "src/shared/command/types/index.ts"() {
1099
+ "src/shared/command/types.ts"() {
1596
1100
  "use strict";
1597
1101
  }
1598
1102
  });
@@ -1601,38 +1105,33 @@ var init_types6 = __esm({
1601
1105
  var init_command = __esm({
1602
1106
  "src/shared/command/index.ts"() {
1603
1107
  "use strict";
1604
- init_interfaces6();
1605
1108
  init_types6();
1606
1109
  }
1607
1110
  });
1608
1111
 
1609
- // src/shared/tool/constants/tool-output.ts
1610
- var init_tool_output = __esm({
1611
- "src/shared/tool/constants/tool-output.ts"() {
1612
- "use strict";
1613
- }
1614
- });
1615
-
1616
- // src/shared/tool/constants/lsp/lsp-severity.ts
1617
- var LSP_SEVERITY;
1618
- var init_lsp_severity = __esm({
1619
- "src/shared/tool/constants/lsp/lsp-severity.ts"() {
1112
+ // src/shared/tool/constants.ts
1113
+ var OUTPUT_LABEL, TOOL_LABEL, LSP_SEVERITY, LSP_SEVERITY_LABELS, PARALLEL_LOG, PARALLEL_PARAMS;
1114
+ var init_constants9 = __esm({
1115
+ "src/shared/tool/constants.ts"() {
1620
1116
  "use strict";
1621
- LSP_SEVERITY = {
1622
- ERROR: 1,
1623
- WARNING: 2,
1624
- INFO: 3,
1625
- HINT: 4
1117
+ init_constants2();
1118
+ OUTPUT_LABEL = {
1119
+ ERROR: "[ERROR]",
1120
+ WARNING: "[WARNING]",
1121
+ INFO: "[INFO]",
1122
+ DONE: "[DONE]",
1123
+ OK: "[OK]",
1124
+ SPAWNED: "[SPAWNED]",
1125
+ RESUME: "[RESUME]",
1126
+ TIMEOUT: "[TIMEOUT]",
1127
+ RUNNING: "[RUNNING]",
1128
+ CANCELLED: "[CANCELLED]",
1129
+ RESUMED_DONE: "[RESUMED & DONE]",
1130
+ SYNC_START: "[SYNC START]",
1131
+ CACHED: "[CACHED]",
1132
+ JSON_FETCHED: "[JSON FETCHED]",
1133
+ TEXT_FETCHED: "[TEXT FETCHED]"
1626
1134
  };
1627
- }
1628
- });
1629
-
1630
- // src/shared/tool/constants/common/labels.ts
1631
- var TOOL_LABEL;
1632
- var init_labels2 = __esm({
1633
- "src/shared/tool/constants/common/labels.ts"() {
1634
- "use strict";
1635
- init_status_labels();
1636
1135
  TOOL_LABEL = {
1637
1136
  ERROR: STATUS_LABEL.ERROR,
1638
1137
  WARNING: STATUS_LABEL.WARNING,
@@ -1646,50 +1145,21 @@ var init_labels2 = __esm({
1646
1145
  PENDING: STATUS_LABEL.PENDING,
1647
1146
  RUNNING: STATUS_LABEL.RUNNING
1648
1147
  };
1649
- }
1650
- });
1651
-
1652
- // src/shared/tool/constants/lsp/lsp-severity-labels.ts
1653
- var LSP_SEVERITY_LABELS;
1654
- var init_lsp_severity_labels = __esm({
1655
- "src/shared/tool/constants/lsp/lsp-severity-labels.ts"() {
1656
- "use strict";
1657
- init_labels2();
1658
- init_lsp_severity();
1148
+ LSP_SEVERITY = {
1149
+ ERROR: 1,
1150
+ WARNING: 2,
1151
+ INFO: 3,
1152
+ HINT: 4
1153
+ };
1659
1154
  LSP_SEVERITY_LABELS = {
1660
1155
  [LSP_SEVERITY.ERROR]: TOOL_LABEL.ERROR,
1661
1156
  [LSP_SEVERITY.WARNING]: TOOL_LABEL.WARNING,
1662
1157
  [LSP_SEVERITY.INFO]: TOOL_LABEL.INFO,
1663
1158
  [LSP_SEVERITY.HINT]: TOOL_LABEL.HINT
1664
1159
  };
1665
- }
1666
- });
1667
-
1668
- // src/shared/tool/constants/lsp/index.ts
1669
- var init_lsp = __esm({
1670
- "src/shared/tool/constants/lsp/index.ts"() {
1671
- "use strict";
1672
- init_lsp_severity();
1673
- init_lsp_severity_labels();
1674
- }
1675
- });
1676
-
1677
- // src/shared/tool/constants/parallel/logging.ts
1678
- var PARALLEL_LOG;
1679
- var init_logging2 = __esm({
1680
- "src/shared/tool/constants/parallel/logging.ts"() {
1681
- "use strict";
1682
1160
  PARALLEL_LOG = {
1683
1161
  DELEGATE_TASK: "[delegate-task]"
1684
1162
  };
1685
- }
1686
- });
1687
-
1688
- // src/shared/tool/constants/parallel/parameters.ts
1689
- var PARALLEL_PARAMS;
1690
- var init_parameters = __esm({
1691
- "src/shared/tool/constants/parallel/parameters.ts"() {
1692
- "use strict";
1693
1163
  PARALLEL_PARAMS = {
1694
1164
  AGENT: "agent",
1695
1165
  TASK: "task",
@@ -1709,121 +1179,10 @@ var init_parameters = __esm({
1709
1179
  }
1710
1180
  });
1711
1181
 
1712
- // src/shared/tool/constants/parallel/index.ts
1713
- var init_parallel2 = __esm({
1714
- "src/shared/tool/constants/parallel/index.ts"() {
1715
- "use strict";
1716
- init_logging2();
1717
- init_parameters();
1718
- }
1719
- });
1720
-
1721
- // src/shared/tool/constants/common/output-labels.ts
1722
- var OUTPUT_LABEL;
1723
- var init_output_labels = __esm({
1724
- "src/shared/tool/constants/common/output-labels.ts"() {
1725
- "use strict";
1726
- OUTPUT_LABEL = {
1727
- ERROR: "[ERROR]",
1728
- WARNING: "[WARNING]",
1729
- INFO: "[INFO]",
1730
- DONE: "[DONE]",
1731
- OK: "[OK]",
1732
- SPAWNED: "[SPAWNED]",
1733
- RESUME: "[RESUME]",
1734
- TIMEOUT: "[TIMEOUT]",
1735
- RUNNING: "[RUNNING]",
1736
- CANCELLED: "[CANCELLED]",
1737
- RESUMED_DONE: "[RESUMED & DONE]",
1738
- SYNC_START: "[SYNC START]",
1739
- CACHED: "[CACHED]",
1740
- JSON_FETCHED: "[JSON FETCHED]",
1741
- TEXT_FETCHED: "[TEXT FETCHED]"
1742
- };
1743
- }
1744
- });
1745
-
1746
- // src/shared/tool/constants/common/languages.ts
1747
- var init_languages = __esm({
1748
- "src/shared/tool/constants/common/languages.ts"() {
1749
- "use strict";
1750
- }
1751
- });
1752
-
1753
- // src/shared/tool/constants/common/sources.ts
1754
- var init_sources = __esm({
1755
- "src/shared/tool/constants/common/sources.ts"() {
1756
- "use strict";
1757
- }
1758
- });
1759
-
1760
- // src/shared/tool/constants/common/index.ts
1761
- var init_common = __esm({
1762
- "src/shared/tool/constants/common/index.ts"() {
1763
- "use strict";
1764
- init_labels2();
1765
- init_output_labels();
1766
- init_languages();
1767
- init_sources();
1768
- }
1769
- });
1770
-
1771
- // src/shared/tool/constants/index.ts
1772
- var init_constants9 = __esm({
1773
- "src/shared/tool/constants/index.ts"() {
1774
- "use strict";
1775
- init_tool_names();
1776
- init_tool_output();
1777
- init_lsp();
1778
- init_parallel2();
1779
- init_common();
1780
- }
1781
- });
1782
-
1783
- // src/shared/tool/interfaces/lsp/index.ts
1784
- var init_lsp2 = __esm({
1785
- "src/shared/tool/interfaces/lsp/index.ts"() {
1786
- "use strict";
1787
- }
1788
- });
1789
-
1790
- // src/shared/tool/interfaces/parallel/session-client.ts
1791
- var init_session_client = __esm({
1792
- "src/shared/tool/interfaces/parallel/session-client.ts"() {
1793
- "use strict";
1794
- }
1795
- });
1796
-
1797
- // src/shared/tool/interfaces/parallel/poll-result.ts
1798
- var init_poll_result = __esm({
1799
- "src/shared/tool/interfaces/parallel/poll-result.ts"() {
1800
- "use strict";
1801
- }
1802
- });
1803
-
1804
- // src/shared/tool/interfaces/parallel/index.ts
1805
- var init_parallel3 = __esm({
1806
- "src/shared/tool/interfaces/parallel/index.ts"() {
1807
- "use strict";
1808
- init_session_client();
1809
- init_poll_result();
1810
- }
1811
- });
1812
-
1813
- // src/shared/tool/interfaces/ast/index.ts
1814
- var init_ast = __esm({
1815
- "src/shared/tool/interfaces/ast/index.ts"() {
1816
- "use strict";
1817
- }
1818
- });
1819
-
1820
- // src/shared/tool/interfaces/index.ts
1821
- var init_interfaces7 = __esm({
1822
- "src/shared/tool/interfaces/index.ts"() {
1182
+ // src/shared/tool/types.ts
1183
+ var init_types7 = __esm({
1184
+ "src/shared/tool/types.ts"() {
1823
1185
  "use strict";
1824
- init_lsp2();
1825
- init_parallel3();
1826
- init_ast();
1827
1186
  }
1828
1187
  });
1829
1188
 
@@ -1831,15 +1190,16 @@ var init_interfaces7 = __esm({
1831
1190
  var init_tool = __esm({
1832
1191
  "src/shared/tool/index.ts"() {
1833
1192
  "use strict";
1193
+ init_tool_names();
1834
1194
  init_constants9();
1835
- init_interfaces7();
1195
+ init_types7();
1836
1196
  }
1837
1197
  });
1838
1198
 
1839
- // src/shared/message/constants/part-types.ts
1840
- var PART_TYPES;
1841
- var init_part_types = __esm({
1842
- "src/shared/message/constants/part-types.ts"() {
1199
+ // src/shared/message/constants.ts
1200
+ var PART_TYPES, PROMPTS, COMMAND_NAMES, PLUGIN_HOOKS, MESSAGE_ROLES, SESSION_STATUS;
1201
+ var init_constants10 = __esm({
1202
+ "src/shared/message/constants.ts"() {
1843
1203
  "use strict";
1844
1204
  PART_TYPES = {
1845
1205
  TEXT: "text",
@@ -1851,27 +1211,11 @@ var init_part_types = __esm({
1851
1211
  /** Anthropic-style tool invocation */
1852
1212
  TOOL_USE: "tool_use"
1853
1213
  };
1854
- }
1855
- });
1856
-
1857
- // src/shared/message/constants/prompts.ts
1858
- var PROMPTS;
1859
- var init_prompts = __esm({
1860
- "src/shared/message/constants/prompts.ts"() {
1861
- "use strict";
1862
1214
  PROMPTS = {
1863
1215
  CONTINUE: "continue",
1864
1216
  CONTINUE_PREVIOUS: "continue previous work",
1865
1217
  CONTINUE_DEFAULT: "continue from where we left off"
1866
1218
  };
1867
- }
1868
- });
1869
-
1870
- // src/shared/message/constants/slash-commands.ts
1871
- var COMMAND_NAMES;
1872
- var init_slash_commands = __esm({
1873
- "src/shared/message/constants/slash-commands.ts"() {
1874
- "use strict";
1875
1219
  COMMAND_NAMES = {
1876
1220
  TASK: "task",
1877
1221
  PLAN: "plan",
@@ -1879,14 +1223,6 @@ var init_slash_commands = __esm({
1879
1223
  STOP: "stop",
1880
1224
  CANCEL: "cancel"
1881
1225
  };
1882
- }
1883
- });
1884
-
1885
- // src/shared/message/constants/plugin-hooks.ts
1886
- var PLUGIN_HOOKS;
1887
- var init_plugin_hooks = __esm({
1888
- "src/shared/message/constants/plugin-hooks.ts"() {
1889
- "use strict";
1890
1226
  PLUGIN_HOOKS = {
1891
1227
  /** Intercepts user messages before sending to LLM */
1892
1228
  CHAT_MESSAGE: "chat.message",
@@ -1899,14 +1235,6 @@ var init_plugin_hooks = __esm({
1899
1235
  /** Injects dynamic system prompt additions */
1900
1236
  EXPERIMENTAL_CHAT_SYSTEM_TRANSFORM: "experimental.chat.system.transform"
1901
1237
  };
1902
- }
1903
- });
1904
-
1905
- // src/shared/message/constants/message-roles.ts
1906
- var MESSAGE_ROLES, SESSION_STATUS;
1907
- var init_message_roles = __esm({
1908
- "src/shared/message/constants/message-roles.ts"() {
1909
- "use strict";
1910
1238
  MESSAGE_ROLES = {
1911
1239
  /** AI assistant message */
1912
1240
  ASSISTANT: "assistant",
@@ -1922,18 +1250,6 @@ var init_message_roles = __esm({
1922
1250
  }
1923
1251
  });
1924
1252
 
1925
- // src/shared/message/constants/index.ts
1926
- var init_constants10 = __esm({
1927
- "src/shared/message/constants/index.ts"() {
1928
- "use strict";
1929
- init_part_types();
1930
- init_prompts();
1931
- init_slash_commands();
1932
- init_plugin_hooks();
1933
- init_message_roles();
1934
- }
1935
- });
1936
-
1937
1253
  // src/shared/message/index.ts
1938
1254
  var init_message = __esm({
1939
1255
  "src/shared/message/index.ts"() {
@@ -1942,10 +1258,10 @@ var init_message = __esm({
1942
1258
  }
1943
1259
  });
1944
1260
 
1945
- // src/shared/os/constants/platform.ts
1261
+ // src/shared/os/constants.ts
1946
1262
  var PLATFORM;
1947
- var init_platform = __esm({
1948
- "src/shared/os/constants/platform.ts"() {
1263
+ var init_constants11 = __esm({
1264
+ "src/shared/os/constants.ts"() {
1949
1265
  "use strict";
1950
1266
  PLATFORM = {
1951
1267
  DARWIN: "darwin",
@@ -1956,26 +1272,10 @@ var init_platform = __esm({
1956
1272
  }
1957
1273
  });
1958
1274
 
1959
- // src/shared/os/constants/index.ts
1960
- var init_constants11 = __esm({
1961
- "src/shared/os/constants/index.ts"() {
1962
- "use strict";
1963
- init_platform();
1964
- }
1965
- });
1966
-
1967
- // src/shared/os/types/platform.ts
1968
- var init_platform2 = __esm({
1969
- "src/shared/os/types/platform.ts"() {
1970
- "use strict";
1971
- }
1972
- });
1973
-
1974
- // src/shared/os/types/index.ts
1975
- var init_types7 = __esm({
1976
- "src/shared/os/types/index.ts"() {
1275
+ // src/shared/os/types.ts
1276
+ var init_types8 = __esm({
1277
+ "src/shared/os/types.ts"() {
1977
1278
  "use strict";
1978
- init_platform2();
1979
1279
  }
1980
1280
  });
1981
1281
 
@@ -1984,32 +1284,20 @@ var init_os = __esm({
1984
1284
  "src/shared/os/index.ts"() {
1985
1285
  "use strict";
1986
1286
  init_constants11();
1987
- init_types7();
1287
+ init_types8();
1988
1288
  }
1989
1289
  });
1990
1290
 
1991
- // src/shared/verification/constants/checklist.ts
1992
- var CHECKLIST;
1993
- var init_checklist = __esm({
1994
- "src/shared/verification/constants/checklist.ts"() {
1291
+ // src/shared/verification/constants.ts
1292
+ var VERIFICATION_SIGNALS, CHECKLIST_PATTERNS, CHECKLIST, CATEGORY_ID, CATEGORY_LABEL, CATEGORY_DESCRIPTION, CATEGORY_ICON, CHECKLIST_CATEGORIES;
1293
+ var init_constants12 = __esm({
1294
+ "src/shared/verification/constants.ts"() {
1995
1295
  "use strict";
1996
- init_paths();
1997
- CHECKLIST = {
1998
- /** Path to the verification checklist file */
1999
- FILE: `${PATHS.OPENCODE}/verification-checklist.md`,
2000
- /** Minimum required items for valid checklist */
2001
- MIN_ITEMS: 1,
2002
- /** Maximum items to show in error messages */
2003
- MAX_ERROR_ITEMS: 5
1296
+ init_constants2();
1297
+ VERIFICATION_SIGNALS = {
1298
+ /** Trigger for all-encompassing system check at the end of a mission */
1299
+ FINAL_PASS: "Full System Verification"
2004
1300
  };
2005
- }
2006
- });
2007
-
2008
- // src/shared/verification/constants/patterns.ts
2009
- var CHECKLIST_PATTERNS;
2010
- var init_patterns = __esm({
2011
- "src/shared/verification/constants/patterns.ts"() {
2012
- "use strict";
2013
1301
  CHECKLIST_PATTERNS = {
2014
1302
  /** Incomplete item: - [ ] */
2015
1303
  INCOMPLETE: /^[-*]\s*\[\s*\]\s+(.+)$/gm,
@@ -2024,14 +1312,14 @@ var init_patterns = __esm({
2024
1312
  /** Mark as complete indicator (x or X) */
2025
1313
  COMPLETE_MARK: /^x$/i
2026
1314
  };
2027
- }
2028
- });
2029
-
2030
- // src/shared/verification/constants/categories.ts
2031
- var CATEGORY_ID, CATEGORY_LABEL, CATEGORY_DESCRIPTION, CATEGORY_ICON, CHECKLIST_CATEGORIES;
2032
- var init_categories = __esm({
2033
- "src/shared/verification/constants/categories.ts"() {
2034
- "use strict";
1315
+ CHECKLIST = {
1316
+ /** Path to the verification checklist file */
1317
+ FILE: `${PATHS.OPENCODE}/verification-checklist.md`,
1318
+ /** Minimum required items for valid checklist */
1319
+ MIN_ITEMS: 1,
1320
+ /** Maximum items to show in error messages */
1321
+ MAX_ERROR_ITEMS: 5
1322
+ };
2035
1323
  CATEGORY_ID = {
2036
1324
  CODE_QUALITY: "code-quality",
2037
1325
  UNIT_TESTS: "unit-tests",
@@ -2077,39 +1365,9 @@ var init_categories = __esm({
2077
1365
  }
2078
1366
  });
2079
1367
 
2080
- // src/shared/verification/constants/signals.ts
2081
- var VERIFICATION_SIGNALS;
2082
- var init_signals = __esm({
2083
- "src/shared/verification/constants/signals.ts"() {
2084
- "use strict";
2085
- VERIFICATION_SIGNALS = {
2086
- /** Trigger for all-encompassing system check at the end of a mission */
2087
- FINAL_PASS: "Full System Verification"
2088
- };
2089
- }
2090
- });
2091
-
2092
- // src/shared/verification/constants/index.ts
2093
- var init_constants12 = __esm({
2094
- "src/shared/verification/constants/index.ts"() {
2095
- "use strict";
2096
- init_checklist();
2097
- init_patterns();
2098
- init_categories();
2099
- init_signals();
2100
- }
2101
- });
2102
-
2103
- // src/shared/verification/interfaces/index.ts
2104
- var init_interfaces8 = __esm({
2105
- "src/shared/verification/interfaces/index.ts"() {
2106
- "use strict";
2107
- }
2108
- });
2109
-
2110
- // src/shared/verification/types/index.ts
2111
- var init_types8 = __esm({
2112
- "src/shared/verification/types/index.ts"() {
1368
+ // src/shared/verification/types.ts
1369
+ var init_types9 = __esm({
1370
+ "src/shared/verification/types.ts"() {
2113
1371
  "use strict";
2114
1372
  }
2115
1373
  });
@@ -2119,8 +1377,7 @@ var init_verification = __esm({
2119
1377
  "src/shared/verification/index.ts"() {
2120
1378
  "use strict";
2121
1379
  init_constants12();
2122
- init_interfaces8();
2123
- init_types8();
1380
+ init_types9();
2124
1381
  }
2125
1382
  });
2126
1383
 
@@ -2201,17 +1458,17 @@ var init_shutdown_manager = __esm({
2201
1458
  });
2202
1459
 
2203
1460
  // src/shared/lifecycle/index.ts
2204
- var init_lifecycle2 = __esm({
1461
+ var init_lifecycle = __esm({
2205
1462
  "src/shared/lifecycle/index.ts"() {
2206
1463
  "use strict";
2207
1464
  init_shutdown_manager();
2208
1465
  }
2209
1466
  });
2210
1467
 
2211
- // src/shared/errors/constants/error-patterns.ts
2212
- var ERROR_PATTERNS;
2213
- var init_error_patterns = __esm({
2214
- "src/shared/errors/constants/error-patterns.ts"() {
1468
+ // src/shared/errors/constants.ts
1469
+ var ERROR_PATTERNS, ERROR_TYPE;
1470
+ var init_constants13 = __esm({
1471
+ "src/shared/errors/constants.ts"() {
2215
1472
  "use strict";
2216
1473
  ERROR_PATTERNS = {
2217
1474
  TOOL_RESULT_MISSING: /tool_result_missing|tool result.*missing/i,
@@ -2223,14 +1480,6 @@ var init_error_patterns = __esm({
2223
1480
  NETWORK_ERROR: /network|ECONNREFUSED|ETIMEDOUT|fetch failed/i,
2224
1481
  AUTH_ERROR: /unauthorized|401|403|invalid.*token/i
2225
1482
  };
2226
- }
2227
- });
2228
-
2229
- // src/shared/errors/constants/error-type.ts
2230
- var ERROR_TYPE;
2231
- var init_error_type = __esm({
2232
- "src/shared/errors/constants/error-type.ts"() {
2233
- "use strict";
2234
1483
  ERROR_TYPE = {
2235
1484
  TOOL_RESULT_MISSING: "TOOL_RESULT_MISSING",
2236
1485
  THINKING_BLOCK_ORDER: "THINKING_BLOCK_ORDER",
@@ -2244,30 +1493,6 @@ var init_error_type = __esm({
2244
1493
  }
2245
1494
  });
2246
1495
 
2247
- // src/shared/errors/constants/index.ts
2248
- var init_constants13 = __esm({
2249
- "src/shared/errors/constants/index.ts"() {
2250
- "use strict";
2251
- init_error_patterns();
2252
- init_error_type();
2253
- }
2254
- });
2255
-
2256
- // src/shared/errors/types/error-pattern-type.ts
2257
- var init_error_pattern_type = __esm({
2258
- "src/shared/errors/types/error-pattern-type.ts"() {
2259
- "use strict";
2260
- }
2261
- });
2262
-
2263
- // src/shared/errors/types/index.ts
2264
- var init_types9 = __esm({
2265
- "src/shared/errors/types/index.ts"() {
2266
- "use strict";
2267
- init_error_pattern_type();
2268
- }
2269
- });
2270
-
2271
1496
  // src/shared/errors/detection.ts
2272
1497
  function detectErrorType(error95) {
2273
1498
  const errorStr = typeof error95 === "string" ? error95 : error95?.message || error95?.name || String(error95);
@@ -2281,7 +1506,7 @@ function detectErrorType(error95) {
2281
1506
  var init_detection = __esm({
2282
1507
  "src/shared/errors/detection.ts"() {
2283
1508
  "use strict";
2284
- init_error_patterns();
1509
+ init_constants13();
2285
1510
  }
2286
1511
  });
2287
1512
 
@@ -2289,7 +1514,7 @@ var init_detection = __esm({
2289
1514
  var init_retry = __esm({
2290
1515
  "src/shared/errors/retry.ts"() {
2291
1516
  "use strict";
2292
- init_error_type();
1517
+ init_constants13();
2293
1518
  init_recovery();
2294
1519
  }
2295
1520
  });
@@ -2299,297 +1524,19 @@ var init_errors = __esm({
2299
1524
  "src/shared/errors/index.ts"() {
2300
1525
  "use strict";
2301
1526
  init_constants13();
2302
- init_types9();
2303
1527
  init_detection();
2304
1528
  init_retry();
2305
1529
  }
2306
1530
  });
2307
1531
 
2308
- // src/shared/prompt/constants/tags.ts
2309
- var PROMPT_TAGS, wrapTag;
2310
- var init_tags = __esm({
2311
- "src/shared/prompt/constants/tags.ts"() {
2312
- "use strict";
2313
- PROMPT_TAGS = {
2314
- // === Common ===
2315
- ROLE: { open: "<role>", close: "</role>" },
2316
- IDENTITY: { open: "<identity>", close: "</identity>" },
2317
- FORBIDDEN_ACTIONS: { open: "<forbidden_actions>", close: "</forbidden_actions>" },
2318
- REQUIRED_ACTIONS: { open: "<required_actions>", close: "</required_actions>" },
2319
- VERIFICATION: { open: "<verification>", close: "</verification>" },
2320
- ENVIRONMENT_DISCOVERY: { open: "<environment_discovery>", close: "</environment_discovery>" },
2321
- ANTI_HALLUCINATION: { open: "<anti_hallucination>", close: "</anti_hallucination>" },
2322
- TODO_RULES: { open: "<todo_rules>", close: "</todo_rules>" },
2323
- COMPLETE_SIGNAL: { open: "<complete_signal>", close: "</complete_signal>" },
2324
- SHARED_WORKSPACE: { open: "<shared_workspace>", close: "</shared_workspace>" },
2325
- CORE_PHILOSOPHY: { open: "<core_philosophy>", close: "</core_philosophy>" },
2326
- SYSTEM: { open: "<system>", close: "</system>" },
2327
- TASK: { open: "<task>", close: "</task>" },
2328
- CONTEXT: { open: "<context>", close: "</context>" },
2329
- EXECUTION: { open: "<execution>", close: "</execution>" },
2330
- MODE: { open: "<mode>", close: "</mode>" },
2331
- RESUME: { open: "<resume>", close: "</resume>" },
2332
- SAFETY: { open: "<safety>", close: "</safety>" },
2333
- AST_TOOLS: { open: "<ast_tools>", close: "</ast_tools>" },
2334
- LSP_TOOLS: { open: "<lsp_tools>", close: "</lsp_tools>" },
2335
- SKILLS_CAPABILITIES: { open: "<skills_capabilities>", close: "</skills_capabilities>" },
2336
- DECOMPOSITION_RULES: { open: "<decomposition_rules>", close: "</decomposition_rules>" },
2337
- EXECUTION_ASSURANCE: { open: "<execution_assurance>", close: "</execution_assurance>" },
2338
- // === Commander ===
2339
- TOOLS: { open: "<tools>", close: "</tools>" },
2340
- AGENTS: { open: "<agents>", close: "</agents>" },
2341
- EXECUTION_RULES: { open: "<execution_rules>", close: "</execution_rules>" },
2342
- EXECUTION_STRATEGY: { open: "<execution_strategy>", close: "</execution_strategy>" },
2343
- PARALLEL_EXECUTION: { open: "<parallel_execution>", close: "</parallel_execution>" },
2344
- TODO_FORMAT: { open: "<todo_format>", close: "</todo_format>" },
2345
- SYNC_ISSUE_HANDLING: { open: "<sync_issue_handling>", close: "</sync_issue_handling>" },
2346
- LOOP_CONTINUATION: { open: "<loop_continuation>", close: "</loop_continuation>" },
2347
- RECOVERY: { open: "<recovery>", close: "</recovery>" },
2348
- // === Planner ===
2349
- FILE_LEVEL_PLANNING: { open: "<file_level_planning>", close: "</file_level_planning>" },
2350
- TODO_SYNC: { open: "<todo_sync>", close: "</todo_sync>" },
2351
- PLANNING_FORMAT: { open: "<planning_format>", close: "</planning_format>" },
2352
- RESEARCH_WORKFLOW: { open: "<research_workflow>", close: "</research_workflow>" },
2353
- // === Worker ===
2354
- FILE_ASSIGNMENT: { open: "<file_assignment>", close: "</file_assignment>" },
2355
- TDD_WORKFLOW: { open: "<tdd_workflow>", close: "</tdd_workflow>" },
2356
- ISOLATION_TESTING: { open: "<isolation_testing>", close: "</isolation_testing>" },
2357
- WORKFLOW: { open: "<workflow>", close: "</workflow>" },
2358
- QUALITY_CHECKLIST: { open: "<quality_checklist>", close: "</quality_checklist>" },
2359
- // === Reviewer ===
2360
- SYNC_VERIFICATION: { open: "<sync_verification>", close: "</sync_verification>" },
2361
- ASYNC_MONITORING: { open: "<async_monitoring>", close: "</async_monitoring>" },
2362
- INTEGRATION_TESTING: { open: "<integration_testing>", close: "</integration_testing>" },
2363
- VERIFICATION_PROCESS: { open: "<verification_process>", close: "</verification_process>" },
2364
- TODO_MANAGEMENT: { open: "<todo_management>", close: "</todo_management>" },
2365
- OUTPUT_FORMAT: { open: "<output_format>", close: "</output_format>" },
2366
- // === Mission Loop ===
2367
- MISSION_LOOP: { open: "<mission_loop>", close: "</mission_loop>" },
2368
- TODO_CONTINUATION: { open: "<todo_continuation>", close: "</todo_continuation>" },
2369
- AUTONOMOUS_MODE: { open: "<autonomous_mode>", close: "</autonomous_mode>" }
2370
- };
2371
- wrapTag = (tag, content) => {
2372
- return `${tag.open}
2373
- ${content}
2374
- ${tag.close}`;
2375
- };
2376
- }
2377
- });
2378
-
2379
- // src/shared/prompt/constants/status.ts
2380
- var WORK_STATUS;
2381
- var init_status = __esm({
2382
- "src/shared/prompt/constants/status.ts"() {
2383
- "use strict";
2384
- init_status_labels();
2385
- WORK_STATUS = {
2386
- // File action types
2387
- ACTION: {
2388
- CREATE: "CREATE",
2389
- MODIFY: "MODIFY",
2390
- DELETE: "DELETE",
2391
- FIX: "FIX"
2392
- },
2393
- // Task/file status (Internal state)
2394
- STATUS: {
2395
- PENDING: STATUS_LABEL.PENDING,
2396
- IN_PROGRESS: STATUS_LABEL.IN_PROGRESS,
2397
- DONE: STATUS_LABEL.DONE,
2398
- FAILED: STATUS_LABEL.FAILED
2399
- },
2400
- // Test result
2401
- TEST_RESULT: {
2402
- PASS: STATUS_LABEL.PASS,
2403
- FAIL: STATUS_LABEL.FAIL,
2404
- SKIP: STATUS_LABEL.SKIP
2405
- },
2406
- // E2E integration test status
2407
- E2E_STATUS: {
2408
- NOT_STARTED: "NOT_STARTED",
2409
- RUNNING: STATUS_LABEL.RUNNING,
2410
- PASS: STATUS_LABEL.PASS,
2411
- FAIL: STATUS_LABEL.FAIL
2412
- },
2413
- // Mission phase
2414
- PHASE: {
2415
- PLANNING: "PLANNING",
2416
- IMPLEMENTATION: "IMPLEMENTATION",
2417
- E2E: "E2E",
2418
- FIXING: "FIXING",
2419
- VERIFYING: "VERIFYING"
2420
- },
2421
- // Issue severity
2422
- SEVERITY: {
2423
- HIGH: "HIGH",
2424
- MEDIUM: "MEDIUM",
2425
- LOW: "LOW"
2426
- },
2427
- // Research/documentation confidence level
2428
- CONFIDENCE: {
2429
- HIGH: "HIGH",
2430
- // Official documentation
2431
- MEDIUM: "MEDIUM",
2432
- // GitHub, verified sources
2433
- LOW: "LOW"
2434
- // Blog posts, unverified
2435
- },
2436
- // Session state
2437
- SESSION: {
2438
- STARTED: STATUS_LABEL.PENDING,
2439
- // Standardized mapping
2440
- COMPLETED: STATUS_LABEL.DONE,
2441
- CANCELLED: STATUS_LABEL.CANCELLED
2442
- },
2443
- // Task triage - complexity classification
2444
- TRIAGE: {
2445
- TYPE: {
2446
- SIMPLE: "Simple",
2447
- MEDIUM: "Medium",
2448
- COMPLEX: "Complex"
2449
- },
2450
- SIGNAL: {
2451
- ONE_FILE: "One file",
2452
- MULTI_FILE: "Multi-file",
2453
- LARGE_SCOPE: "Large scope"
2454
- },
2455
- APPROACH: {
2456
- DIRECT: "Direct action",
2457
- PLAN_EXECUTE_VERIFY: "Plan - Execute - Verify",
2458
- RESEARCH_PLAN_PARALLEL: "Research - Plan - Parallel Execute"
2459
- }
2460
- },
2461
- // TODO.md status values (for Epic/Task display)
2462
- TODO_STATUS: {
2463
- PENDING: STATUS_LABEL.PENDING,
2464
- IN_PROGRESS: STATUS_LABEL.IN_PROGRESS,
2465
- COMPLETE: STATUS_LABEL.COMPLETED,
2466
- BLOCKED: STATUS_LABEL.BLOCKED,
2467
- DONE: STATUS_LABEL.DONE,
2468
- VERIFIED: STATUS_LABEL.VERIFIED
2469
- },
2470
- // Task size estimation
2471
- TASK_SIZE: {
2472
- XS: "XS",
2473
- // <10min
2474
- S: "S",
2475
- // 10-20min
2476
- M: "M",
2477
- // 20-40min
2478
- L: "L"
2479
- // 40-60min
2480
- }
2481
- };
2482
- }
2483
- });
2484
-
2485
- // src/shared/prompt/constants/philosophy.ts
2486
- var PHILOSOPHY_PHASES, EXECUTION_CYCLE, EXECUTION_CYCLE_STEPS, PHILOSOPHY_TAGLINE, PHILOSOPHY_QUOTE, PHILOSOPHY_LEARN_PRINCIPLE;
2487
- var init_philosophy = __esm({
2488
- "src/shared/prompt/constants/philosophy.ts"() {
2489
- "use strict";
2490
- PHILOSOPHY_PHASES = {
2491
- EXPLORE: "EXPLORE",
2492
- LEARN: "LEARN",
2493
- ADAPT: "ADAPT",
2494
- ACT: "ACT"
2495
- };
2496
- EXECUTION_CYCLE = {
2497
- THINK: "THINK",
2498
- ACT: "ACT",
2499
- OBSERVE: "OBSERVE",
2500
- ADJUST: "ADJUST"
2501
- };
2502
- EXECUTION_CYCLE_STEPS = `1. ${EXECUTION_CYCLE.THINK} - Reason about the task
2503
- 2. ${EXECUTION_CYCLE.ACT} - Execute the work
2504
- 3. ${EXECUTION_CYCLE.OBSERVE} - Check the result
2505
- 4. ${EXECUTION_CYCLE.ADJUST} - Fix if needed`;
2506
- PHILOSOPHY_TAGLINE = "Explore \u2192 Learn \u2192 Adapt \u2192 Act";
2507
- PHILOSOPHY_QUOTE = "Like an astronaut landing on unknown planets \u2014 never assume, always discover.";
2508
- PHILOSOPHY_LEARN_PRINCIPLE = "LEARN = DOCUMENT: What you discover, you record. Your learnings become the team's knowledge.";
2509
- }
2510
- });
2511
-
2512
- // src/shared/prompt/constants/mandates.ts
2513
- var PHASE_0_DIRECT_DISCOVERY, PHASE_1_THINK_ANALYSIS, PHASE_5_MSVP, HPFA_RULES, AUTONOMOUS_MANDATE;
2514
- var init_mandates = __esm({
2515
- "src/shared/prompt/constants/mandates.ts"() {
2516
- "use strict";
2517
- init_paths();
2518
- PHASE_0_DIRECT_DISCOVERY = `**Direct Project Discovery**:
2519
- 0. **FRESH START**: If ${PATHS.TODO} exists, read it to understand progress. If starting a new project, create it.
2520
- 1. **STRUCTURE**: Deeply map project layout (\`ls -la\`, \`find\`).
2521
- 2. **ENVIRONMENT**: Identify build/test/lint commands by reading config files (package.json, Cargo.toml, pyproject.toml, etc.).
2522
- 3. **FRONTIER**: Identify the "Verification Frontier" (CI/CD workflows, Makefile, docker-compose).
2523
- 4. **CONSOLIDATE**: Sync all environmental findings to ${PATHS.CONTEXT}.`;
2524
- PHASE_1_THINK_ANALYSIS = `### 1.1 ANALYZE & SCOPE
2525
- - **Define FULL scope** based on user request and discovered context.
2526
- - **Hierarchical Breakdown**: Milestones -> Tasks -> Sub-tasks.
2527
-
2528
- ### 1.2 STRATEGIC DECOMPOSITION
2529
- - **Independent Items**: Identify what can run in parallel.
2530
- - **Dependency Map**: Clearly define \`depends:\` links.
2531
-
2532
- ### 1.3 DELEGATION
2533
- - **Parallel Workers**: Assign workers for independent branches.
2534
- - **Granular Review**: Assign reviewers for verification.`;
2535
- PHASE_5_MSVP = `1. **UNIT VERIFICATION**: Every sub-task must be verified by tool output.
2536
- 2. **HIERARCHICAL ROLL-UP**: A task is complete only when all its sub-tasks pass.
2537
- 3. **AUTONOMOUS COMPLETION**: No stopping until every \`[ ]\` in ${PATHS.TODO} is converted to \`[x]\`.
2538
- 4. **LOOP PERSISTENCE**: The system will automatically restart this session if work remains.`;
2539
- HPFA_RULES = `1. **Commander-Only Spawning**: All agents are spawned by the Commander.
2540
- 2. **Parallel Branches**: Execute non-dependent milestones/tasks simultaneously.
2541
- 3. **Recursive Breakdown**: Continue subdividing until tasks are atomic.
2542
- 4. **Autonomous Termination**: You only finish when the verification checklist and TODOs are 100% complete.`;
2543
- AUTONOMOUS_MANDATE = `
2544
- ## AUTONOMOUS COMPLETION MANDATE (MANDATORY)
2545
- 1. **ZERO TOLERANCE**: Finishing with incomplete \`[ ]\` items is a FAILURE.
2546
- 2. **FORCED CONTINUATION**: If you stop prematurely, the system will inject a "CONTINUE" prompt and iteration count.
2547
- 3. **HIERARCHICAL PROOF**: You must provide evidence (tool output) for every \`[x]\` mark.
2548
- 4. **NO PERMISSION**: Do not ask "Should I continue?". The answer is always YES until \`.opencode/todo.md\` is 100% checked.
2549
- `;
2550
- }
2551
- });
2552
-
2553
- // src/shared/prompt/constants/scouts.ts
2554
- var SCOUT_LABEL, SCOUT_STRUCTURE, SCOUT_STACK, SCOUT_DOCS, SCOUT_INFRA, SCOUT_INTEGRATION;
2555
- var init_scouts = __esm({
2556
- "src/shared/prompt/constants/scouts.ts"() {
2557
- "use strict";
2558
- SCOUT_LABEL = "Scout";
2559
- SCOUT_STRUCTURE = {
2560
- ID: "STRUCTURE",
2561
- NAME: `${SCOUT_LABEL}: Structure`,
2562
- PROMPT: "Analyze the project folder structure. Locate source code (src, lib), tests, and documentation directories. Map out the tree at depth 2-3."
2563
- };
2564
- SCOUT_STACK = {
2565
- ID: "STACK",
2566
- NAME: `${SCOUT_LABEL}: Stack`,
2567
- PROMPT: "Identify the technology stack. Parse package.json, Cargo.toml, go.mod, or pyproject.toml. Determine build and test commands."
2568
- };
2569
- SCOUT_DOCS = {
2570
- ID: "DOCS",
2571
- NAME: `${SCOUT_LABEL}: Docs`,
2572
- PROMPT: "Digest the project documentation. Read README.md, CONTRIBUTING.md, and any files in docs/ to understand the core architecture and mission."
2573
- };
2574
- SCOUT_INFRA = {
2575
- ID: "INFRA",
2576
- NAME: `${SCOUT_LABEL}: Infra`,
2577
- PROMPT: "Detect infrastructure and environment configs. Search for Dockerfiles, CI/CD workflows (.github, .gitlab), and environment variable templates."
2578
- };
2579
- SCOUT_INTEGRATION = {
2580
- ID: "INTEGRATION",
2581
- NAME: `${SCOUT_LABEL}: Integration`,
2582
- PROMPT: "Read all modified files and their cross-module dependencies in parallel. Map the actual integration surface and identify potential consistency issues."
2583
- };
2584
- }
2585
- });
2586
-
2587
- // src/shared/prompt/constants/architecture.ts
2588
- var AGENT_ROLES, TERMINAL_NODE, SPAWNING_RULES;
2589
- var init_architecture = __esm({
2590
- "src/shared/prompt/constants/architecture.ts"() {
1532
+ // src/shared/prompt/constants.ts
1533
+ var AGENT_ROLES, TERMINAL_NODE, SPAWNING_RULES, PHASE_0_DIRECT_DISCOVERY, PHASE_1_THINK_ANALYSIS, PHASE_5_MSVP, HPFA_RULES, AUTONOMOUS_MANDATE, PHILOSOPHY_PHASES, EXECUTION_CYCLE, EXECUTION_CYCLE_STEPS, PHILOSOPHY_TAGLINE, PHILOSOPHY_QUOTE, PHILOSOPHY_LEARN_PRINCIPLE, SCOUT_LABEL, SCOUT_STRUCTURE, SCOUT_STACK, SCOUT_DOCS, SCOUT_INFRA, SCOUT_INTEGRATION, WORK_STATUS, PROMPT_TAGS, wrapTag;
1534
+ var init_constants14 = __esm({
1535
+ "src/shared/prompt/constants.ts"() {
2591
1536
  "use strict";
2592
- init_names();
1537
+ init_agent();
1538
+ init_constants2();
1539
+ init_constants2();
2593
1540
  AGENT_ROLES = {
2594
1541
  /** Only Commander can spawn other agents */
2595
1542
  SPAWNER: AGENT_NAMES.COMMANDER,
@@ -2612,19 +1559,243 @@ var init_architecture = __esm({
2612
1559
  /** Error message for blocked spawn attempts */
2613
1560
  BLOCKED_MESSAGE: `You are a ${TERMINAL_NODE.LABEL} - ${TERMINAL_NODE.REASON}`
2614
1561
  };
2615
- }
2616
- });
1562
+ PHASE_0_DIRECT_DISCOVERY = `**Direct Project Discovery**:
1563
+ 0. **FRESH START**: If ${PATHS.TODO} exists, read it to understand progress. If starting a new project, create it.
1564
+ 1. **STRUCTURE**: Deeply map project layout (\`ls -la\`, \`find\`).
1565
+ 2. **ENVIRONMENT**: Identify build/test/lint commands by reading config files (package.json, Cargo.toml, pyproject.toml, etc.).
1566
+ 3. **FRONTIER**: Identify the "Verification Frontier" (CI/CD workflows, Makefile, docker-compose).
1567
+ 4. **CONSOLIDATE**: Sync all environmental findings to ${PATHS.CONTEXT}.`;
1568
+ PHASE_1_THINK_ANALYSIS = `### 1.1 ANALYZE & SCOPE
1569
+ - **Define FULL scope** based on user request and discovered context.
1570
+ - **Hierarchical Breakdown**: Milestones -> Tasks -> Sub-tasks.
2617
1571
 
2618
- // src/shared/prompt/constants/index.ts
2619
- var init_constants14 = __esm({
2620
- "src/shared/prompt/constants/index.ts"() {
2621
- "use strict";
2622
- init_tags();
2623
- init_status();
2624
- init_philosophy();
2625
- init_mandates();
2626
- init_scouts();
2627
- init_architecture();
1572
+ ### 1.2 STRATEGIC DECOMPOSITION
1573
+ - **Independent Items**: Identify what can run in parallel.
1574
+ - **Dependency Map**: Clearly define \`depends:\` links.
1575
+
1576
+ ### 1.3 DELEGATION
1577
+ - **Parallel Workers**: Assign workers for independent branches.
1578
+ - **Granular Review**: Assign reviewers for verification.`;
1579
+ PHASE_5_MSVP = `1. **UNIT VERIFICATION**: Every sub-task must be verified by tool output.
1580
+ 2. **HIERARCHICAL ROLL-UP**: A task is complete only when all its sub-tasks pass.
1581
+ 3. **AUTONOMOUS COMPLETION**: No stopping until every \`[ ]\` in ${PATHS.TODO} is converted to \`[x]\`.
1582
+ 4. **LOOP PERSISTENCE**: The system will automatically restart this session if work remains.`;
1583
+ HPFA_RULES = `1. **Commander-Only Spawning**: All agents are spawned by the Commander.
1584
+ 2. **Parallel Branches**: Execute non-dependent milestones/tasks simultaneously.
1585
+ 3. **Recursive Breakdown**: Continue subdividing until tasks are atomic.
1586
+ 4. **Autonomous Termination**: You only finish when the verification checklist and TODOs are 100% complete.`;
1587
+ AUTONOMOUS_MANDATE = `
1588
+ ## AUTONOMOUS COMPLETION MANDATE (MANDATORY)
1589
+ 1. **ZERO TOLERANCE**: Finishing with incomplete \`[ ]\` items is a FAILURE.
1590
+ 2. **FORCED CONTINUATION**: If you stop prematurely, the system will inject a "CONTINUE" prompt and iteration count.
1591
+ 3. **HIERARCHICAL PROOF**: You must provide evidence (tool output) for every \`[x]\` mark.
1592
+ 4. **NO PERMISSION**: Do not ask "Should I continue?". The answer is always YES until \`.opencode/todo.md\` is 100% checked.
1593
+ `;
1594
+ PHILOSOPHY_PHASES = {
1595
+ EXPLORE: "EXPLORE",
1596
+ LEARN: "LEARN",
1597
+ ADAPT: "ADAPT",
1598
+ ACT: "ACT"
1599
+ };
1600
+ EXECUTION_CYCLE = {
1601
+ THINK: "THINK",
1602
+ ACT: "ACT",
1603
+ OBSERVE: "OBSERVE",
1604
+ ADJUST: "ADJUST"
1605
+ };
1606
+ EXECUTION_CYCLE_STEPS = `1. ${EXECUTION_CYCLE.THINK} - Reason about the task
1607
+ 2. ${EXECUTION_CYCLE.ACT} - Execute the work
1608
+ 3. ${EXECUTION_CYCLE.OBSERVE} - Check the result
1609
+ 4. ${EXECUTION_CYCLE.ADJUST} - Fix if needed`;
1610
+ PHILOSOPHY_TAGLINE = "Explore \u2192 Learn \u2192 Adapt \u2192 Act";
1611
+ PHILOSOPHY_QUOTE = "Like an astronaut landing on unknown planets \u2014 never assume, always discover.";
1612
+ PHILOSOPHY_LEARN_PRINCIPLE = "LEARN = DOCUMENT: What you discover, you record. Your learnings become the team's knowledge.";
1613
+ SCOUT_LABEL = "Scout";
1614
+ SCOUT_STRUCTURE = {
1615
+ ID: "STRUCTURE",
1616
+ NAME: `${SCOUT_LABEL}: Structure`,
1617
+ PROMPT: "Analyze the project folder structure. Locate source code (src, lib), tests, and documentation directories. Map out the tree at depth 2-3."
1618
+ };
1619
+ SCOUT_STACK = {
1620
+ ID: "STACK",
1621
+ NAME: `${SCOUT_LABEL}: Stack`,
1622
+ PROMPT: "Identify the technology stack. Parse package.json, Cargo.toml, go.mod, or pyproject.toml. Determine build and test commands."
1623
+ };
1624
+ SCOUT_DOCS = {
1625
+ ID: "DOCS",
1626
+ NAME: `${SCOUT_LABEL}: Docs`,
1627
+ PROMPT: "Digest the project documentation. Read README.md, CONTRIBUTING.md, and any files in docs/ to understand the core architecture and mission."
1628
+ };
1629
+ SCOUT_INFRA = {
1630
+ ID: "INFRA",
1631
+ NAME: `${SCOUT_LABEL}: Infra`,
1632
+ PROMPT: "Detect infrastructure and environment configs. Search for Dockerfiles, CI/CD workflows (.github, .gitlab), and environment variable templates."
1633
+ };
1634
+ SCOUT_INTEGRATION = {
1635
+ ID: "INTEGRATION",
1636
+ NAME: `${SCOUT_LABEL}: Integration`,
1637
+ PROMPT: "Read all modified files and their cross-module dependencies in parallel. Map the actual integration surface and identify potential consistency issues."
1638
+ };
1639
+ WORK_STATUS = {
1640
+ // File action types
1641
+ ACTION: {
1642
+ CREATE: "CREATE",
1643
+ MODIFY: "MODIFY",
1644
+ DELETE: "DELETE",
1645
+ FIX: "FIX"
1646
+ },
1647
+ // Task/file status (Internal state)
1648
+ STATUS: {
1649
+ PENDING: STATUS_LABEL.PENDING,
1650
+ IN_PROGRESS: STATUS_LABEL.IN_PROGRESS,
1651
+ DONE: STATUS_LABEL.DONE,
1652
+ FAILED: STATUS_LABEL.FAILED
1653
+ },
1654
+ // Test result
1655
+ TEST_RESULT: {
1656
+ PASS: STATUS_LABEL.PASS,
1657
+ FAIL: STATUS_LABEL.FAIL,
1658
+ SKIP: STATUS_LABEL.SKIP
1659
+ },
1660
+ // E2E integration test status
1661
+ E2E_STATUS: {
1662
+ NOT_STARTED: "NOT_STARTED",
1663
+ RUNNING: STATUS_LABEL.RUNNING,
1664
+ PASS: STATUS_LABEL.PASS,
1665
+ FAIL: STATUS_LABEL.FAIL
1666
+ },
1667
+ // Mission phase
1668
+ PHASE: {
1669
+ PLANNING: "PLANNING",
1670
+ IMPLEMENTATION: "IMPLEMENTATION",
1671
+ E2E: "E2E",
1672
+ FIXING: "FIXING",
1673
+ VERIFYING: "VERIFYING"
1674
+ },
1675
+ // Issue severity
1676
+ SEVERITY: {
1677
+ HIGH: "HIGH",
1678
+ MEDIUM: "MEDIUM",
1679
+ LOW: "LOW"
1680
+ },
1681
+ // Research/documentation confidence level
1682
+ CONFIDENCE: {
1683
+ HIGH: "HIGH",
1684
+ // Official documentation
1685
+ MEDIUM: "MEDIUM",
1686
+ // GitHub, verified sources
1687
+ LOW: "LOW"
1688
+ // Blog posts, unverified
1689
+ },
1690
+ // Session state
1691
+ SESSION: {
1692
+ STARTED: STATUS_LABEL.PENDING,
1693
+ // Standardized mapping
1694
+ COMPLETED: STATUS_LABEL.DONE,
1695
+ CANCELLED: STATUS_LABEL.CANCELLED
1696
+ },
1697
+ // Task triage - complexity classification
1698
+ TRIAGE: {
1699
+ TYPE: {
1700
+ SIMPLE: "Simple",
1701
+ MEDIUM: "Medium",
1702
+ COMPLEX: "Complex"
1703
+ },
1704
+ SIGNAL: {
1705
+ ONE_FILE: "One file",
1706
+ MULTI_FILE: "Multi-file",
1707
+ LARGE_SCOPE: "Large scope"
1708
+ },
1709
+ APPROACH: {
1710
+ DIRECT: "Direct action",
1711
+ PLAN_EXECUTE_VERIFY: "Plan - Execute - Verify",
1712
+ RESEARCH_PLAN_PARALLEL: "Research - Plan - Parallel Execute"
1713
+ }
1714
+ },
1715
+ // TODO.md status values (for Epic/Task display)
1716
+ TODO_STATUS: {
1717
+ PENDING: STATUS_LABEL.PENDING,
1718
+ IN_PROGRESS: STATUS_LABEL.IN_PROGRESS,
1719
+ COMPLETE: STATUS_LABEL.COMPLETED,
1720
+ BLOCKED: STATUS_LABEL.BLOCKED,
1721
+ DONE: STATUS_LABEL.DONE,
1722
+ VERIFIED: STATUS_LABEL.VERIFIED
1723
+ },
1724
+ // Task size estimation
1725
+ TASK_SIZE: {
1726
+ XS: "XS",
1727
+ // <10min
1728
+ S: "S",
1729
+ // 10-20min
1730
+ M: "M",
1731
+ // 20-40min
1732
+ L: "L"
1733
+ // 40-60min
1734
+ }
1735
+ };
1736
+ PROMPT_TAGS = {
1737
+ // === Common ===
1738
+ ROLE: { open: "<role>", close: "</role>" },
1739
+ IDENTITY: { open: "<identity>", close: "</identity>" },
1740
+ FORBIDDEN_ACTIONS: { open: "<forbidden_actions>", close: "</forbidden_actions>" },
1741
+ REQUIRED_ACTIONS: { open: "<required_actions>", close: "</required_actions>" },
1742
+ VERIFICATION: { open: "<verification>", close: "</verification>" },
1743
+ ENVIRONMENT_DISCOVERY: { open: "<environment_discovery>", close: "</environment_discovery>" },
1744
+ ANTI_HALLUCINATION: { open: "<anti_hallucination>", close: "</anti_hallucination>" },
1745
+ TODO_RULES: { open: "<todo_rules>", close: "</todo_rules>" },
1746
+ COMPLETE_SIGNAL: { open: "<complete_signal>", close: "</complete_signal>" },
1747
+ SHARED_WORKSPACE: { open: "<shared_workspace>", close: "</shared_workspace>" },
1748
+ CORE_PHILOSOPHY: { open: "<core_philosophy>", close: "</core_philosophy>" },
1749
+ SYSTEM: { open: "<system>", close: "</system>" },
1750
+ TASK: { open: "<task>", close: "</task>" },
1751
+ CONTEXT: { open: "<context>", close: "</context>" },
1752
+ EXECUTION: { open: "<execution>", close: "</execution>" },
1753
+ MODE: { open: "<mode>", close: "</mode>" },
1754
+ RESUME: { open: "<resume>", close: "</resume>" },
1755
+ SAFETY: { open: "<safety>", close: "</safety>" },
1756
+ AST_TOOLS: { open: "<ast_tools>", close: "</ast_tools>" },
1757
+ LSP_TOOLS: { open: "<lsp_tools>", close: "</lsp_tools>" },
1758
+ SKILLS_CAPABILITIES: { open: "<skills_capabilities>", close: "</skills_capabilities>" },
1759
+ DECOMPOSITION_RULES: { open: "<decomposition_rules>", close: "</decomposition_rules>" },
1760
+ EXECUTION_ASSURANCE: { open: "<execution_assurance>", close: "</execution_assurance>" },
1761
+ // === Commander ===
1762
+ TOOLS: { open: "<tools>", close: "</tools>" },
1763
+ AGENTS: { open: "<agents>", close: "</agents>" },
1764
+ EXECUTION_RULES: { open: "<execution_rules>", close: "</execution_rules>" },
1765
+ EXECUTION_STRATEGY: { open: "<execution_strategy>", close: "</execution_strategy>" },
1766
+ PARALLEL_EXECUTION: { open: "<parallel_execution>", close: "</parallel_execution>" },
1767
+ TODO_FORMAT: { open: "<todo_format>", close: "</todo_format>" },
1768
+ SYNC_ISSUE_HANDLING: { open: "<sync_issue_handling>", close: "</sync_issue_handling>" },
1769
+ LOOP_CONTINUATION: { open: "<loop_continuation>", close: "</loop_continuation>" },
1770
+ RECOVERY: { open: "<recovery>", close: "</recovery>" },
1771
+ // === Planner ===
1772
+ FILE_LEVEL_PLANNING: { open: "<file_level_planning>", close: "</file_level_planning>" },
1773
+ TODO_SYNC: { open: "<todo_sync>", close: "</todo_sync>" },
1774
+ PLANNING_FORMAT: { open: "<planning_format>", close: "</planning_format>" },
1775
+ RESEARCH_WORKFLOW: { open: "<research_workflow>", close: "</research_workflow>" },
1776
+ // === Worker ===
1777
+ FILE_ASSIGNMENT: { open: "<file_assignment>", close: "</file_assignment>" },
1778
+ TDD_WORKFLOW: { open: "<tdd_workflow>", close: "</tdd_workflow>" },
1779
+ ISOLATION_TESTING: { open: "<isolation_testing>", close: "</isolation_testing>" },
1780
+ WORKFLOW: { open: "<workflow>", close: "</workflow>" },
1781
+ QUALITY_CHECKLIST: { open: "<quality_checklist>", close: "</quality_checklist>" },
1782
+ // === Reviewer ===
1783
+ SYNC_VERIFICATION: { open: "<sync_verification>", close: "</sync_verification>" },
1784
+ ASYNC_MONITORING: { open: "<async_monitoring>", close: "</async_monitoring>" },
1785
+ INTEGRATION_TESTING: { open: "<integration_testing>", close: "</integration_testing>" },
1786
+ VERIFICATION_PROCESS: { open: "<verification_process>", close: "</verification_process>" },
1787
+ TODO_MANAGEMENT: { open: "<todo_management>", close: "</todo_management>" },
1788
+ OUTPUT_FORMAT: { open: "<output_format>", close: "</output_format>" },
1789
+ // === Mission Loop ===
1790
+ MISSION_LOOP: { open: "<mission_loop>", close: "</mission_loop>" },
1791
+ TODO_CONTINUATION: { open: "<todo_continuation>", close: "</todo_continuation>" },
1792
+ AUTONOMOUS_MODE: { open: "<autonomous_mode>", close: "</autonomous_mode>" }
1793
+ };
1794
+ wrapTag = (tag, content) => {
1795
+ return `${tag.open}
1796
+ ${content}
1797
+ ${tag.close}`;
1798
+ };
2628
1799
  }
2629
1800
  });
2630
1801
 
@@ -2643,17 +1814,17 @@ var init_shared = __esm({
2643
1814
  init_agent();
2644
1815
  init_core();
2645
1816
  init_task();
2646
- init_loop2();
1817
+ init_loop();
2647
1818
  init_notification();
2648
- init_recovery2();
2649
- init_cache2();
2650
- init_session2();
1819
+ init_recovery();
1820
+ init_cache();
1821
+ init_session();
2651
1822
  init_command();
2652
1823
  init_tool();
2653
1824
  init_message();
2654
1825
  init_os();
2655
1826
  init_verification();
2656
- init_lifecycle2();
1827
+ init_lifecycle();
2657
1828
  init_errors();
2658
1829
  init_prompt();
2659
1830
  }
@@ -2748,7 +1919,7 @@ var CORE_PHILOSOPHY;
2748
1919
  var init_core2 = __esm({
2749
1920
  "src/agents/prompts/01_philosophy/core.ts"() {
2750
1921
  "use strict";
2751
- init_constants();
1922
+ init_agent();
2752
1923
  init_shared();
2753
1924
  CORE_PHILOSOPHY = `${PROMPT_TAGS.CORE_PHILOSOPHY.open}
2754
1925
  ## Core Philosophy: ${PHILOSOPHY_TAGLINE}
@@ -2816,7 +1987,7 @@ var init_metadata = __esm({
2816
1987
  });
2817
1988
 
2818
1989
  // src/agents/prompts/01_philosophy/index.ts
2819
- var init_philosophy2 = __esm({
1990
+ var init_philosophy = __esm({
2820
1991
  "src/agents/prompts/01_philosophy/index.ts"() {
2821
1992
  "use strict";
2822
1993
  init_execution_assurance();
@@ -3034,7 +2205,7 @@ var SKILLS_CAPABILITIES;
3034
2205
  var init_discovery_skills = __esm({
3035
2206
  "src/agents/prompts/02_discovery/discovery_skills.ts"() {
3036
2207
  "use strict";
3037
- init_tags();
2208
+ init_prompt();
3038
2209
  SKILLS_CAPABILITIES = wrapTag(PROMPT_TAGS.SKILLS_CAPABILITIES, `
3039
2210
  ### AUTONOMOUS SKILL ACQUISITION
3040
2211
  You have the ability to extend your capabilities using the **Skills System**.
@@ -4692,7 +3863,7 @@ var init_mission_commander = __esm({
4692
3863
  });
4693
3864
 
4694
3865
  // src/agents/prompts/06_mission/index.ts
4695
- var init_mission2 = __esm({
3866
+ var init_mission = __esm({
4696
3867
  "src/agents/prompts/06_mission/index.ts"() {
4697
3868
  "use strict";
4698
3869
  init_mission_status_tracking();
@@ -5263,7 +4434,7 @@ var init_tools_worker = __esm({
5263
4434
  });
5264
4435
 
5265
4436
  // src/agents/prompts/08_tools/index.ts
5266
- var init_tools2 = __esm({
4437
+ var init_tools = __esm({
5267
4438
  "src/agents/prompts/08_tools/index.ts"() {
5268
4439
  "use strict";
5269
4440
  init_tools_core();
@@ -5278,16 +4449,16 @@ var init_tools2 = __esm({
5278
4449
  });
5279
4450
 
5280
4451
  // src/agents/prompts/index.ts
5281
- var init_prompts2 = __esm({
4452
+ var init_prompts = __esm({
5282
4453
  "src/agents/prompts/index.ts"() {
5283
4454
  "use strict";
5284
- init_philosophy2();
4455
+ init_philosophy();
5285
4456
  init_shared();
5286
4457
  init_discovery();
5287
4458
  init_planning();
5288
4459
  init_execution();
5289
4460
  init_verification2();
5290
- init_mission2();
4461
+ init_mission();
5291
4462
  init_commander_role();
5292
4463
  init_commander_identity();
5293
4464
  init_commander_forbidden();
@@ -5305,7 +4476,7 @@ var init_prompts2 = __esm({
5305
4476
  init_reviewer_forbidden();
5306
4477
  init_reviewer_required();
5307
4478
  init_reviewer_mandate();
5308
- init_tools2();
4479
+ init_tools();
5309
4480
  }
5310
4481
  });
5311
4482
 
@@ -5318,8 +4489,8 @@ var systemPrompt, commander;
5318
4489
  var init_commander = __esm({
5319
4490
  "src/agents/commander.ts"() {
5320
4491
  "use strict";
5321
- init_constants();
5322
- init_prompts2();
4492
+ init_agent();
4493
+ init_prompts();
5323
4494
  systemPrompt = [
5324
4495
  CORE_PHILOSOPHY,
5325
4496
  COMMANDER_ROLE,
@@ -7092,12 +6263,12 @@ var MemoryManager = class _MemoryManager {
7092
6263
  };
7093
6264
 
7094
6265
  // src/agents/definitions.ts
7095
- init_constants();
6266
+ init_agent();
7096
6267
  init_commander();
7097
6268
 
7098
6269
  // src/agents/subagents/planner.ts
7099
- init_constants();
7100
- init_prompts2();
6270
+ init_agent();
6271
+ init_prompts();
7101
6272
  var systemPrompt2 = [
7102
6273
  PLANNER_ROLE,
7103
6274
  MODULARITY_ENFORCEMENT,
@@ -7126,8 +6297,8 @@ var planner = {
7126
6297
  };
7127
6298
 
7128
6299
  // src/agents/subagents/worker.ts
7129
- init_constants();
7130
- init_prompts2();
6300
+ init_agent();
6301
+ init_prompts();
7131
6302
  var systemPrompt3 = [
7132
6303
  WORKER_ROLE,
7133
6304
  MODULARITY_ENFORCEMENT,
@@ -7158,8 +6329,8 @@ var worker = {
7158
6329
  };
7159
6330
 
7160
6331
  // src/agents/subagents/reviewer.ts
7161
- init_constants();
7162
- init_prompts2();
6332
+ init_agent();
6333
+ init_prompts();
7163
6334
  var systemPrompt4 = [
7164
6335
  REVIEWER_ROLE,
7165
6336
  MODULARITY_ENFORCEMENT,
@@ -36441,8 +35612,8 @@ import { existsSync as existsSync4, readFileSync as readFileSync3, writeFileSync
36441
35612
  import { join as join6 } from "node:path";
36442
35613
 
36443
35614
  // src/shared/constants/system-messages.ts
36444
- init_mission_control();
36445
- init_paths();
35615
+ init_constants4();
35616
+ init_constants2();
36446
35617
  var MISSION_MESSAGES = {
36447
35618
  START_LOG: `[${MISSION_CONTROL.LOG_SOURCE}] Detected /task command. Starting mission...`,
36448
35619
  CANCEL_LOG: `[${MISSION_CONTROL.LOG_SOURCE}] Detected user cancellation signal.`,
@@ -37641,20 +36812,18 @@ import { exec as exec2 } from "node:child_process";
37641
36812
  import { promisify as promisify2 } from "node:util";
37642
36813
  import { readFileSync as readFileSync5 } from "node:fs";
37643
36814
 
37644
- // src/shared/notification/os-notify/constants/notification-commands.ts
37645
- var NOTIFICATION_COMMANDS = {
36815
+ // src/shared/notification/os-notify/constants.ts
36816
+ var NOTIFICATION_COMMAND_KEYS = {
37646
36817
  OSASCRIPT: "osascript",
37647
- NOTIFY_SEND: "notify-send",
36818
+ NOTIFY_SEND: "notifySend",
37648
36819
  POWERSHELL: "powershell",
37649
36820
  AFPLAY: "afplay",
37650
36821
  PAPLAY: "paplay",
37651
36822
  APLAY: "aplay"
37652
36823
  };
37653
-
37654
- // src/shared/notification/os-notify/constants/notification-command-keys.ts
37655
- var NOTIFICATION_COMMAND_KEYS = {
36824
+ var NOTIFICATION_COMMANDS = {
37656
36825
  OSASCRIPT: "osascript",
37657
- NOTIFY_SEND: "notifySend",
36826
+ NOTIFY_SEND: "notify-send",
37658
36827
  POWERSHELL: "powershell",
37659
36828
  AFPLAY: "afplay",
37660
36829
  PAPLAY: "paplay",
@@ -39575,7 +38744,7 @@ var CleanupScheduler = class {
39575
38744
  };
39576
38745
 
39577
38746
  // src/index.ts
39578
- init_lifecycle2();
38747
+ init_lifecycle();
39579
38748
 
39580
38749
  // src/core/commands/manager.ts
39581
38750
  init_shared();
@@ -43366,3 +42535,4 @@ var index_default = OrchestratorPlugin;
43366
42535
  export {
43367
42536
  index_default as default
43368
42537
  };
42538
+ //# sourceMappingURL=index.js.map