opencode-orchestrator 1.2.69 โ†’ 1.2.71

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 (521) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +355 -355
  3. package/bin/orchestrator-linux-arm64 +0 -0
  4. package/bin/orchestrator-linux-x64 +0 -0
  5. package/dist/agents/commander.d.ts +0 -0
  6. package/dist/agents/definitions.d.ts +0 -0
  7. package/dist/agents/prompts/01_philosophy/anti_hallucination.d.ts +0 -0
  8. package/dist/agents/prompts/01_philosophy/core.d.ts +0 -0
  9. package/dist/agents/prompts/01_philosophy/execution_assurance.d.ts +0 -0
  10. package/dist/agents/prompts/01_philosophy/index.d.ts +0 -0
  11. package/dist/agents/prompts/01_philosophy/metadata.d.ts +0 -0
  12. package/dist/agents/prompts/01_philosophy/modularity.d.ts +0 -0
  13. package/dist/agents/prompts/02_discovery/agents/discovery_commander.d.ts +0 -0
  14. package/dist/agents/prompts/02_discovery/agents/discovery_planner.d.ts +0 -0
  15. package/dist/agents/prompts/02_discovery/agents/index.d.ts +0 -0
  16. package/dist/agents/prompts/02_discovery/discovery_core.d.ts +0 -0
  17. package/dist/agents/prompts/02_discovery/discovery_environment.d.ts +0 -0
  18. package/dist/agents/prompts/02_discovery/discovery_skills.d.ts +0 -0
  19. package/dist/agents/prompts/02_discovery/discovery_workspace.d.ts +0 -0
  20. package/dist/agents/prompts/02_discovery/index.d.ts +0 -0
  21. package/dist/agents/prompts/03_planning/agents/index.d.ts +0 -0
  22. package/dist/agents/prompts/03_planning/agents/planning_commander.d.ts +0 -0
  23. package/dist/agents/prompts/03_planning/agents/planning_planner.d.ts +0 -0
  24. package/dist/agents/prompts/03_planning/agents/planning_reviewer.d.ts +0 -0
  25. package/dist/agents/prompts/03_planning/index.d.ts +0 -0
  26. package/dist/agents/prompts/03_planning/planning_core.d.ts +0 -0
  27. package/dist/agents/prompts/03_planning/planning_decomposition.d.ts +0 -0
  28. package/dist/agents/prompts/03_planning/planning_file_planning.d.ts +0 -0
  29. package/dist/agents/prompts/03_planning/planning_parallel.d.ts +0 -0
  30. package/dist/agents/prompts/03_planning/planning_research.d.ts +0 -0
  31. package/dist/agents/prompts/03_planning/planning_todo_format.d.ts +0 -0
  32. package/dist/agents/prompts/03_planning/planning_todo_rules.d.ts +0 -0
  33. package/dist/agents/prompts/03_planning/planning_todo_sync.d.ts +0 -0
  34. package/dist/agents/prompts/04_execution/agents/execution_commander.d.ts +0 -0
  35. package/dist/agents/prompts/04_execution/agents/execution_worker.d.ts +0 -0
  36. package/dist/agents/prompts/04_execution/agents/index.d.ts +0 -0
  37. package/dist/agents/prompts/04_execution/execution_core.d.ts +0 -0
  38. package/dist/agents/prompts/04_execution/execution_delegation.d.ts +0 -0
  39. package/dist/agents/prompts/04_execution/execution_error_handling.d.ts +0 -0
  40. package/dist/agents/prompts/04_execution/execution_file_assignment.d.ts +0 -0
  41. package/dist/agents/prompts/04_execution/execution_hyper_parallel.d.ts +0 -0
  42. package/dist/agents/prompts/04_execution/execution_isolation.d.ts +0 -0
  43. package/dist/agents/prompts/04_execution/execution_quality.d.ts +0 -0
  44. package/dist/agents/prompts/04_execution/execution_strategy.d.ts +0 -0
  45. package/dist/agents/prompts/04_execution/execution_tdd.d.ts +0 -0
  46. package/dist/agents/prompts/04_execution/execution_workflow.d.ts +0 -0
  47. package/dist/agents/prompts/04_execution/index.d.ts +0 -0
  48. package/dist/agents/prompts/05_verification/agents/index.d.ts +0 -0
  49. package/dist/agents/prompts/05_verification/agents/verification_commander.d.ts +0 -0
  50. package/dist/agents/prompts/05_verification/agents/verification_reviewer.d.ts +0 -0
  51. package/dist/agents/prompts/05_verification/index.d.ts +0 -0
  52. package/dist/agents/prompts/05_verification/verification_async_monitoring.d.ts +0 -0
  53. package/dist/agents/prompts/05_verification/verification_build.d.ts +0 -0
  54. package/dist/agents/prompts/05_verification/verification_core.d.ts +0 -0
  55. package/dist/agents/prompts/05_verification/verification_evidence.d.ts +0 -0
  56. package/dist/agents/prompts/05_verification/verification_integration.d.ts +0 -0
  57. package/dist/agents/prompts/05_verification/verification_strategy.d.ts +0 -0
  58. package/dist/agents/prompts/05_verification/verification_sync_check.d.ts +0 -0
  59. package/dist/agents/prompts/05_verification/verification_sync_handling.d.ts +0 -0
  60. package/dist/agents/prompts/05_verification/verification_test.d.ts +0 -0
  61. package/dist/agents/prompts/06_mission/agents/index.d.ts +0 -0
  62. package/dist/agents/prompts/06_mission/agents/mission_commander.d.ts +0 -0
  63. package/dist/agents/prompts/06_mission/index.d.ts +0 -0
  64. package/dist/agents/prompts/06_mission/mission_completion_conditions.d.ts +0 -0
  65. package/dist/agents/prompts/06_mission/mission_core.d.ts +0 -0
  66. package/dist/agents/prompts/06_mission/mission_lifecycle.d.ts +0 -0
  67. package/dist/agents/prompts/06_mission/mission_loop_continuation.d.ts +0 -0
  68. package/dist/agents/prompts/06_mission/mission_recovery.d.ts +0 -0
  69. package/dist/agents/prompts/06_mission/mission_status_tracking.d.ts +0 -0
  70. package/dist/agents/prompts/07_agents/commander/commander_forbidden.d.ts +0 -0
  71. package/dist/agents/prompts/07_agents/commander/commander_identity.d.ts +0 -0
  72. package/dist/agents/prompts/07_agents/commander/commander_mandate.d.ts +0 -0
  73. package/dist/agents/prompts/07_agents/commander/commander_required.d.ts +0 -0
  74. package/dist/agents/prompts/07_agents/commander/commander_role.d.ts +0 -0
  75. package/dist/agents/prompts/07_agents/commander/index.d.ts +0 -0
  76. package/dist/agents/prompts/07_agents/planner/index.d.ts +0 -0
  77. package/dist/agents/prompts/07_agents/planner/planner_forbidden.d.ts +0 -0
  78. package/dist/agents/prompts/07_agents/planner/planner_identity.d.ts +0 -0
  79. package/dist/agents/prompts/07_agents/planner/planner_mandate.d.ts +0 -0
  80. package/dist/agents/prompts/07_agents/planner/planner_required.d.ts +0 -0
  81. package/dist/agents/prompts/07_agents/reviewer/index.d.ts +0 -0
  82. package/dist/agents/prompts/07_agents/reviewer/reviewer_forbidden.d.ts +0 -0
  83. package/dist/agents/prompts/07_agents/reviewer/reviewer_identity.d.ts +0 -0
  84. package/dist/agents/prompts/07_agents/reviewer/reviewer_mandate.d.ts +0 -0
  85. package/dist/agents/prompts/07_agents/reviewer/reviewer_required.d.ts +0 -0
  86. package/dist/agents/prompts/07_agents/worker/index.d.ts +0 -0
  87. package/dist/agents/prompts/07_agents/worker/worker_forbidden.d.ts +0 -0
  88. package/dist/agents/prompts/07_agents/worker/worker_identity.d.ts +0 -0
  89. package/dist/agents/prompts/07_agents/worker/worker_mandate.d.ts +0 -0
  90. package/dist/agents/prompts/07_agents/worker/worker_required.d.ts +0 -0
  91. package/dist/agents/prompts/08_tools/agents/index.d.ts +0 -0
  92. package/dist/agents/prompts/08_tools/agents/tools_reviewer.d.ts +0 -0
  93. package/dist/agents/prompts/08_tools/agents/tools_worker.d.ts +0 -0
  94. package/dist/agents/prompts/08_tools/index.d.ts +0 -0
  95. package/dist/agents/prompts/08_tools/tools_ast.d.ts +0 -0
  96. package/dist/agents/prompts/08_tools/tools_code_editing.d.ts +0 -0
  97. package/dist/agents/prompts/08_tools/tools_core.d.ts +0 -0
  98. package/dist/agents/prompts/08_tools/tools_lsp.d.ts +0 -0
  99. package/dist/agents/prompts/08_tools/tools_search.d.ts +0 -0
  100. package/dist/agents/prompts/08_tools/tools_testing.d.ts +0 -0
  101. package/dist/agents/prompts/index.d.ts +0 -0
  102. package/dist/agents/subagents/planner.d.ts +0 -0
  103. package/dist/agents/subagents/reviewer.d.ts +0 -0
  104. package/dist/agents/subagents/worker.d.ts +0 -0
  105. package/dist/core/agents/agent-registry.d.ts +0 -0
  106. package/dist/core/agents/concurrency-token.d.ts +0 -0
  107. package/dist/core/agents/concurrency.d.ts +0 -0
  108. package/dist/core/agents/config.d.ts +0 -0
  109. package/dist/core/agents/consts/index.d.ts +0 -0
  110. package/dist/core/agents/consts/task-status.const.d.ts +0 -0
  111. package/dist/core/agents/format.d.ts +0 -0
  112. package/dist/core/agents/index.d.ts +0 -0
  113. package/dist/core/agents/interfaces/index.d.ts +0 -0
  114. package/dist/core/agents/interfaces/launch-input.interface.d.ts +0 -0
  115. package/dist/core/agents/interfaces/resume-input.interface.d.ts +0 -0
  116. package/dist/core/agents/interfaces/session-pool.interface.d.ts +0 -0
  117. package/dist/core/agents/logger.d.ts +0 -0
  118. package/dist/core/agents/manager/event-handler.d.ts +0 -0
  119. package/dist/core/agents/manager/index.d.ts +0 -0
  120. package/dist/core/agents/manager/task-cleaner.d.ts +0 -0
  121. package/dist/core/agents/manager/task-launcher.d.ts +0 -0
  122. package/dist/core/agents/manager/task-poller.d.ts +0 -0
  123. package/dist/core/agents/manager/task-resumer.d.ts +0 -0
  124. package/dist/core/agents/manager.d.ts +0 -0
  125. package/dist/core/agents/persistence/task-wal.d.ts +0 -0
  126. package/dist/core/agents/session-pool.d.ts +0 -0
  127. package/dist/core/agents/task-store.d.ts +0 -0
  128. package/dist/core/agents/types/index.d.ts +0 -0
  129. package/dist/core/agents/types/parallel-task-status.type.d.ts +0 -0
  130. package/dist/core/cache/constants.d.ts +0 -0
  131. package/dist/core/cache/document-cache.d.ts +0 -0
  132. package/dist/core/cache/index.d.ts +0 -0
  133. package/dist/core/cache/interfaces/cache-document-entry.d.ts +0 -0
  134. package/dist/core/cache/interfaces/cache-list-entry.d.ts +0 -0
  135. package/dist/core/cache/interfaces/cache-metadata.d.ts +0 -0
  136. package/dist/core/cache/interfaces/cache-stats.d.ts +0 -0
  137. package/dist/core/cache/interfaces/cached-document.d.ts +0 -0
  138. package/dist/core/cache/interfaces/index.d.ts +0 -0
  139. package/dist/core/cache/interfaces.d.ts +0 -0
  140. package/dist/core/cache/operations.d.ts +0 -0
  141. package/dist/core/cache/utils.d.ts +0 -0
  142. package/dist/core/cleanup/cleanup-scheduler.d.ts +0 -0
  143. package/dist/core/commands/index.d.ts +0 -0
  144. package/dist/core/commands/interfaces/background-task.d.ts +0 -0
  145. package/dist/core/commands/interfaces/index.d.ts +0 -0
  146. package/dist/core/commands/interfaces/run-background-options.d.ts +0 -0
  147. package/dist/core/commands/manager.d.ts +0 -0
  148. package/dist/core/commands/types/background-task-status.d.ts +0 -0
  149. package/dist/core/commands/types/index.d.ts +0 -0
  150. package/dist/core/context/context-window-monitor.d.ts +0 -0
  151. package/dist/core/context/index.d.ts +0 -0
  152. package/dist/core/loop/circuit-breaker.d.ts +0 -0
  153. package/dist/core/loop/compaction-guard.d.ts +0 -0
  154. package/dist/core/loop/formatters.d.ts +0 -0
  155. package/dist/core/loop/interfaces/index.d.ts +0 -0
  156. package/dist/core/loop/interfaces/todo-stats.d.ts +0 -0
  157. package/dist/core/loop/interfaces/todo.d.ts +0 -0
  158. package/dist/core/loop/interfaces.d.ts +0 -0
  159. package/dist/core/loop/mission-loop-handler.d.ts +0 -0
  160. package/dist/core/loop/mission-loop.d.ts +0 -0
  161. package/dist/core/loop/parser.d.ts +0 -0
  162. package/dist/core/loop/progress-tracker.d.ts +0 -0
  163. package/dist/core/loop/session-state-store.d.ts +0 -0
  164. package/dist/core/loop/stats.d.ts +0 -0
  165. package/dist/core/loop/todo-continuation.d.ts +0 -0
  166. package/dist/core/loop/todo-enforcer.d.ts +0 -0
  167. package/dist/core/loop/todo-manager.d.ts +0 -0
  168. package/dist/core/loop/types/index.d.ts +0 -0
  169. package/dist/core/loop/types/todo-priority.d.ts +0 -0
  170. package/dist/core/loop/types/todo-status.d.ts +0 -0
  171. package/dist/core/loop/verification.d.ts +0 -0
  172. package/dist/core/memory/interfaces.d.ts +0 -0
  173. package/dist/core/memory/memory-manager.d.ts +0 -0
  174. package/dist/core/metrics/collector.d.ts +0 -0
  175. package/dist/core/notification/os-notify/index.d.ts +0 -0
  176. package/dist/core/notification/os-notify/notifier.d.ts +0 -0
  177. package/dist/core/notification/os-notify/platform-resolver.d.ts +0 -0
  178. package/dist/core/notification/os-notify/platform.d.ts +0 -0
  179. package/dist/core/notification/os-notify/sound-player.d.ts +0 -0
  180. package/dist/core/notification/os-notify/todo-checker.d.ts +0 -0
  181. package/dist/core/notification/task-toast-manager.d.ts +0 -0
  182. package/dist/core/notification/toast-core.d.ts +0 -0
  183. package/dist/core/notification/toast-sanitizer.d.ts +0 -0
  184. package/dist/core/notification/toast.d.ts +0 -0
  185. package/dist/core/orchestrator/index.d.ts +0 -0
  186. package/dist/core/orchestrator/interfaces/index.d.ts +0 -0
  187. package/dist/core/orchestrator/interfaces/session-state.d.ts +0 -0
  188. package/dist/core/orchestrator/session-manager.d.ts +0 -0
  189. package/dist/core/orchestrator/state.d.ts +0 -0
  190. package/dist/core/orchestrator/types/index.d.ts +0 -0
  191. package/dist/core/orchestrator/types/task-status.d.ts +0 -0
  192. package/dist/core/plugins/interfaces.d.ts +0 -0
  193. package/dist/core/plugins/plugin-manager.d.ts +0 -0
  194. package/dist/core/pool/buffer-pool.d.ts +0 -0
  195. package/dist/core/pool/object-pool.d.ts +0 -0
  196. package/dist/core/pool/string-pool.d.ts +0 -0
  197. package/dist/core/pool/task-pool.d.ts +0 -0
  198. package/dist/core/progress/calculator.d.ts +0 -0
  199. package/dist/core/progress/formatters.d.ts +0 -0
  200. package/dist/core/progress/interfaces/index.d.ts +0 -0
  201. package/dist/core/progress/interfaces/progress-snapshot.d.ts +0 -0
  202. package/dist/core/progress/interfaces/snapshot-input.d.ts +0 -0
  203. package/dist/core/progress/interfaces/step-progress.d.ts +0 -0
  204. package/dist/core/progress/interfaces/task-progress.d.ts +0 -0
  205. package/dist/core/progress/interfaces/todo-progress.d.ts +0 -0
  206. package/dist/core/progress/interfaces.d.ts +0 -0
  207. package/dist/core/progress/progress-notifier.d.ts +0 -0
  208. package/dist/core/progress/state-broadcaster.d.ts +0 -0
  209. package/dist/core/progress/store.d.ts +0 -0
  210. package/dist/core/progress/tracker.d.ts +0 -0
  211. package/dist/core/queue/async-queue.d.ts +0 -0
  212. package/dist/core/queue/async-utils.d.ts +0 -0
  213. package/dist/core/queue/index.d.ts +0 -0
  214. package/dist/core/queue/work-pool.d.ts +0 -0
  215. package/dist/core/queue/work-stealing-deque.d.ts +0 -0
  216. package/dist/core/queue/worker-pool.d.ts +0 -0
  217. package/dist/core/recovery/auto-recovery.d.ts +0 -0
  218. package/dist/core/recovery/constants.d.ts +0 -0
  219. package/dist/core/recovery/handler.d.ts +0 -0
  220. package/dist/core/recovery/interfaces/error-context.d.ts +0 -0
  221. package/dist/core/recovery/interfaces/error-pattern.d.ts +0 -0
  222. package/dist/core/recovery/interfaces/index.d.ts +0 -0
  223. package/dist/core/recovery/interfaces/recovery-action.d.ts +0 -0
  224. package/dist/core/recovery/interfaces/recovery-record.d.ts +0 -0
  225. package/dist/core/recovery/interfaces/recovery-stats.d.ts +0 -0
  226. package/dist/core/recovery/interfaces.d.ts +0 -0
  227. package/dist/core/recovery/patterns.d.ts +0 -0
  228. package/dist/core/recovery/retry.d.ts +0 -0
  229. package/dist/core/recovery/session-recovery.d.ts +0 -0
  230. package/dist/core/session/interfaces/context-stats.d.ts +0 -0
  231. package/dist/core/session/interfaces/index.d.ts +0 -0
  232. package/dist/core/session/interfaces/shared-context.d.ts +0 -0
  233. package/dist/core/session/interfaces/shared-decision.d.ts +0 -0
  234. package/dist/core/session/interfaces/shared-document.d.ts +0 -0
  235. package/dist/core/session/interfaces/shared-finding.d.ts +0 -0
  236. package/dist/core/session/interfaces.d.ts +0 -0
  237. package/dist/core/session/shared-context.d.ts +0 -0
  238. package/dist/core/session/store.d.ts +0 -0
  239. package/dist/core/session/summary.d.ts +0 -0
  240. package/dist/core/sync/todo-parser.d.ts +0 -0
  241. package/dist/core/sync/todo-sync-service.d.ts +0 -0
  242. package/dist/core/task/interfaces/index.d.ts +0 -0
  243. package/dist/core/task/interfaces/task-hierarchy.d.ts +0 -0
  244. package/dist/core/task/interfaces/task-input.d.ts +0 -0
  245. package/dist/core/task/interfaces/task-node.d.ts +0 -0
  246. package/dist/core/task/interfaces/task-progress.d.ts +0 -0
  247. package/dist/core/task/interfaces.d.ts +0 -0
  248. package/dist/core/task/parser.d.ts +0 -0
  249. package/dist/core/task/scheduler.d.ts +0 -0
  250. package/dist/core/task/store.d.ts +0 -0
  251. package/dist/core/task/summary.d.ts +0 -0
  252. package/dist/core/task/task-decomposer.d.ts +0 -0
  253. package/dist/core/todo/todo-manager.d.ts +0 -0
  254. package/dist/hooks/compatibility/external-plugin.d.ts +0 -0
  255. package/dist/hooks/constants.d.ts +0 -0
  256. package/dist/hooks/custom/agent-ui.d.ts +0 -0
  257. package/dist/hooks/custom/memory-gate.d.ts +0 -0
  258. package/dist/hooks/custom/metrics.d.ts +0 -0
  259. package/dist/hooks/custom/resource-control.d.ts +0 -0
  260. package/dist/hooks/custom/secret-scanner.d.ts +0 -0
  261. package/dist/hooks/custom/strict-role-guard.d.ts +0 -0
  262. package/dist/hooks/custom/user-activity.d.ts +0 -0
  263. package/dist/hooks/features/mission-loop.d.ts +0 -0
  264. package/dist/hooks/features/sanity-check.d.ts +0 -0
  265. package/dist/hooks/index.d.ts +0 -0
  266. package/dist/hooks/registry.d.ts +0 -0
  267. package/dist/hooks/types.d.ts +0 -0
  268. package/dist/index.d.ts +0 -0
  269. package/dist/index.js +1438 -671
  270. package/dist/plugin-handlers/assistant-done-handler.d.ts +0 -0
  271. package/dist/plugin-handlers/chat-message-handler.d.ts +0 -0
  272. package/dist/plugin-handlers/config-handler.d.ts +0 -0
  273. package/dist/plugin-handlers/event-handler.d.ts +0 -0
  274. package/dist/plugin-handlers/index.d.ts +0 -0
  275. package/dist/plugin-handlers/interfaces/assistant-done-context.d.ts +0 -0
  276. package/dist/plugin-handlers/interfaces/chat-message-context.d.ts +0 -0
  277. package/dist/plugin-handlers/interfaces/event-handler-context.d.ts +0 -0
  278. package/dist/plugin-handlers/interfaces/index.d.ts +0 -0
  279. package/dist/plugin-handlers/interfaces/orchestrator-state.d.ts +0 -0
  280. package/dist/plugin-handlers/interfaces/session-compacting.d.ts +0 -0
  281. package/dist/plugin-handlers/interfaces/session-state.d.ts +0 -0
  282. package/dist/plugin-handlers/interfaces/system-transform.d.ts +0 -0
  283. package/dist/plugin-handlers/interfaces/tool-execute-context.d.ts +0 -0
  284. package/dist/plugin-handlers/interfaces/tool-hook.d.ts +0 -0
  285. package/dist/plugin-handlers/session-compacting-handler.d.ts +0 -0
  286. package/dist/plugin-handlers/system-transform-handler.d.ts +0 -0
  287. package/dist/plugin-handlers/tool-execute-handler.d.ts +0 -0
  288. package/dist/plugin-handlers/tool-execute-pre-handler.d.ts +0 -0
  289. package/dist/shared/agent/constants/agent-tokens.d.ts +0 -0
  290. package/dist/shared/agent/constants/index.d.ts +0 -0
  291. package/dist/shared/agent/constants/names.d.ts +0 -0
  292. package/dist/shared/agent/index.d.ts +0 -0
  293. package/dist/shared/agent/interfaces/agent-definition.d.ts +0 -0
  294. package/dist/shared/agent/interfaces/concurrency-config.d.ts +0 -0
  295. package/dist/shared/agent/interfaces/index.d.ts +0 -0
  296. package/dist/shared/agent/types/agent-name.d.ts +0 -0
  297. package/dist/shared/agent/types/index.d.ts +0 -0
  298. package/dist/shared/agent/utils/index.d.ts +0 -0
  299. package/dist/shared/cache/constants/cache-actions.d.ts +0 -0
  300. package/dist/shared/cache/constants/cache.d.ts +0 -0
  301. package/dist/shared/cache/constants/filter-status.d.ts +0 -0
  302. package/dist/shared/cache/constants/index.d.ts +0 -0
  303. package/dist/shared/cache/index.d.ts +0 -0
  304. package/dist/shared/command/index.d.ts +0 -0
  305. package/dist/shared/command/interfaces/background-task.d.ts +0 -0
  306. package/dist/shared/command/interfaces/index.d.ts +0 -0
  307. package/dist/shared/command/interfaces/run-background-options.d.ts +0 -0
  308. package/dist/shared/command/types/background-task-status.d.ts +0 -0
  309. package/dist/shared/command/types/index.d.ts +0 -0
  310. package/dist/shared/constants/security-patterns.d.ts +0 -0
  311. package/dist/shared/constants/system-messages.d.ts +0 -0
  312. package/dist/shared/core/constants/cli.d.ts +0 -0
  313. package/dist/shared/core/constants/id-prefix.d.ts +0 -0
  314. package/dist/shared/core/constants/index.d.ts +0 -0
  315. package/dist/shared/core/constants/lifecycle.d.ts +0 -0
  316. package/dist/shared/core/constants/limits.d.ts +0 -0
  317. package/dist/shared/core/constants/logging.d.ts +0 -0
  318. package/dist/shared/core/constants/memory-hooks.d.ts +0 -0
  319. package/dist/shared/core/constants/memory-limits.d.ts +0 -0
  320. package/dist/shared/core/constants/paths.d.ts +0 -0
  321. package/dist/shared/core/constants/phases.d.ts +0 -0
  322. package/dist/shared/core/constants/status-labels.d.ts +0 -0
  323. package/dist/shared/core/constants/time.d.ts +0 -0
  324. package/dist/shared/core/constants/wal-actions.d.ts +0 -0
  325. package/dist/shared/core/index.d.ts +0 -0
  326. package/dist/shared/core/poolable.d.ts +0 -0
  327. package/dist/shared/errors/constants/error-patterns.d.ts +0 -0
  328. package/dist/shared/errors/constants/error-type.d.ts +0 -0
  329. package/dist/shared/errors/constants/index.d.ts +0 -0
  330. package/dist/shared/errors/detection.d.ts +0 -0
  331. package/dist/shared/errors/index.d.ts +0 -0
  332. package/dist/shared/errors/retry.d.ts +0 -0
  333. package/dist/shared/errors/types/error-pattern-type.d.ts +0 -0
  334. package/dist/shared/errors/types/index.d.ts +0 -0
  335. package/dist/shared/index.d.ts +0 -0
  336. package/dist/shared/lifecycle/index.d.ts +0 -0
  337. package/dist/shared/lifecycle/registration.d.ts +0 -0
  338. package/dist/shared/lifecycle/shutdown-manager.d.ts +0 -0
  339. package/dist/shared/loop/constants/index.d.ts +0 -0
  340. package/dist/shared/loop/constants/labels.d.ts +0 -0
  341. package/dist/shared/loop/constants/loop.d.ts +0 -0
  342. package/dist/shared/loop/constants/mission-control.d.ts +0 -0
  343. package/dist/shared/loop/constants/task-status.d.ts +0 -0
  344. package/dist/shared/loop/constants/todo-status.d.ts +0 -0
  345. package/dist/shared/loop/index.d.ts +0 -0
  346. package/dist/shared/loop/interfaces/index.d.ts +0 -0
  347. package/dist/shared/loop/interfaces/mission-loop.d.ts +0 -0
  348. package/dist/shared/loop/interfaces/todo-stats.d.ts +0 -0
  349. package/dist/shared/loop/interfaces/todo.d.ts +0 -0
  350. package/dist/shared/loop/types/index.d.ts +0 -0
  351. package/dist/shared/loop/types/todo-priority.d.ts +0 -0
  352. package/dist/shared/loop/types/todo-status.d.ts +0 -0
  353. package/dist/shared/message/constants/index.d.ts +0 -0
  354. package/dist/shared/message/constants/message-roles.d.ts +0 -0
  355. package/dist/shared/message/constants/part-types.d.ts +0 -0
  356. package/dist/shared/message/constants/plugin-hooks.d.ts +0 -0
  357. package/dist/shared/message/constants/prompts.d.ts +0 -0
  358. package/dist/shared/message/constants/slash-commands.d.ts +0 -0
  359. package/dist/shared/message/index.d.ts +0 -0
  360. package/dist/shared/notification/constants/index.d.ts +0 -0
  361. package/dist/shared/notification/constants/toast-duration.d.ts +0 -0
  362. package/dist/shared/notification/constants/toast-variants.d.ts +0 -0
  363. package/dist/shared/notification/constants/tui.const.d.ts +0 -0
  364. package/dist/shared/notification/index.d.ts +0 -0
  365. package/dist/shared/notification/interfaces/index.d.ts +0 -0
  366. package/dist/shared/notification/interfaces/task-toast.interface.d.ts +0 -0
  367. package/dist/shared/notification/interfaces/toast-message.d.ts +0 -0
  368. package/dist/shared/notification/interfaces/toast-options.d.ts +0 -0
  369. package/dist/shared/notification/os-notify/constants/index.d.ts +0 -0
  370. package/dist/shared/notification/os-notify/constants/notification-command-keys.d.ts +0 -0
  371. package/dist/shared/notification/os-notify/constants/notification-commands.d.ts +0 -0
  372. package/dist/shared/notification/os-notify/constants/notification-defaults.d.ts +0 -0
  373. package/dist/shared/notification/os-notify/index.d.ts +0 -0
  374. package/dist/shared/notification/os-notify/interfaces/index.d.ts +0 -0
  375. package/dist/shared/notification/os-notify/interfaces/notification-config.d.ts +0 -0
  376. package/dist/shared/notification/os-notify/interfaces/notification-state.d.ts +0 -0
  377. package/dist/shared/notification/os-notify/types/index.d.ts +0 -0
  378. package/dist/shared/notification/os-notify/types/notification-commands.d.ts +0 -0
  379. package/dist/shared/notification/presets/index.d.ts +0 -0
  380. package/dist/shared/notification/presets/mission.d.ts +0 -0
  381. package/dist/shared/notification/presets/parallel.d.ts +0 -0
  382. package/dist/shared/notification/presets/session.d.ts +0 -0
  383. package/dist/shared/notification/presets/task-lifecycle.d.ts +0 -0
  384. package/dist/shared/notification/presets/tools.d.ts +0 -0
  385. package/dist/shared/notification/presets/warnings.d.ts +0 -0
  386. package/dist/shared/notification/types/index.d.ts +0 -0
  387. package/dist/shared/notification/types/toast-variant.d.ts +0 -0
  388. package/dist/shared/os/constants/index.d.ts +0 -0
  389. package/dist/shared/os/constants/platform.d.ts +0 -0
  390. package/dist/shared/os/index.d.ts +0 -0
  391. package/dist/shared/os/types/index.d.ts +0 -0
  392. package/dist/shared/os/types/platform.d.ts +0 -0
  393. package/dist/shared/prompt/constants/architecture.d.ts +0 -0
  394. package/dist/shared/prompt/constants/index.d.ts +0 -0
  395. package/dist/shared/prompt/constants/mandates.d.ts +0 -0
  396. package/dist/shared/prompt/constants/philosophy.d.ts +0 -0
  397. package/dist/shared/prompt/constants/scouts.d.ts +0 -0
  398. package/dist/shared/prompt/constants/status.d.ts +0 -0
  399. package/dist/shared/prompt/constants/tags.d.ts +0 -0
  400. package/dist/shared/prompt/index.d.ts +0 -0
  401. package/dist/shared/recovery/constants/history.d.ts +0 -0
  402. package/dist/shared/recovery/constants/index.d.ts +0 -0
  403. package/dist/shared/recovery/constants/recovery-level.d.ts +0 -0
  404. package/dist/shared/recovery/constants/recovery.d.ts +0 -0
  405. package/dist/shared/recovery/index.d.ts +0 -0
  406. package/dist/shared/recovery/interfaces/error-context.d.ts +0 -0
  407. package/dist/shared/recovery/interfaces/index.d.ts +0 -0
  408. package/dist/shared/recovery/interfaces/recovery-record.d.ts +0 -0
  409. package/dist/shared/recovery/types/index.d.ts +0 -0
  410. package/dist/shared/recovery/types/recovery-action.d.ts +0 -0
  411. package/dist/shared/session/constants/events/document-events.d.ts +0 -0
  412. package/dist/shared/session/constants/events/index.d.ts +0 -0
  413. package/dist/shared/session/constants/events/message-events.d.ts +0 -0
  414. package/dist/shared/session/constants/events/mission-events.d.ts +0 -0
  415. package/dist/shared/session/constants/events/session-events.d.ts +0 -0
  416. package/dist/shared/session/constants/events/special-events.d.ts +0 -0
  417. package/dist/shared/session/constants/events/task-events.d.ts +0 -0
  418. package/dist/shared/session/constants/events/todo-events.d.ts +0 -0
  419. package/dist/shared/session/constants/index.d.ts +0 -0
  420. package/dist/shared/session/index.d.ts +0 -0
  421. package/dist/shared/task/base-task.d.ts +0 -0
  422. package/dist/shared/task/constants/background-status.d.ts +0 -0
  423. package/dist/shared/task/constants/background-task.d.ts +0 -0
  424. package/dist/shared/task/constants/index.d.ts +0 -0
  425. package/dist/shared/task/constants/metadata-keys.d.ts +0 -0
  426. package/dist/shared/task/constants/parallel-task.d.ts +0 -0
  427. package/dist/shared/task/index.d.ts +0 -0
  428. package/dist/shared/task/interfaces/index.d.ts +0 -0
  429. package/dist/shared/task/interfaces/launch-input.d.ts +0 -0
  430. package/dist/shared/task/interfaces/parallel-task.d.ts +0 -0
  431. package/dist/shared/task/interfaces/resume-input.d.ts +0 -0
  432. package/dist/shared/task/interfaces/task-progress.d.ts +0 -0
  433. package/dist/shared/task/types/index.d.ts +0 -0
  434. package/dist/shared/task/types/parallel-task-status.d.ts +0 -0
  435. package/dist/shared/tool/constants/common/index.d.ts +0 -0
  436. package/dist/shared/tool/constants/common/labels.d.ts +0 -0
  437. package/dist/shared/tool/constants/common/languages.d.ts +0 -0
  438. package/dist/shared/tool/constants/common/output-labels.d.ts +0 -0
  439. package/dist/shared/tool/constants/common/sources.d.ts +0 -0
  440. package/dist/shared/tool/constants/index.d.ts +0 -0
  441. package/dist/shared/tool/constants/lsp/index.d.ts +0 -0
  442. package/dist/shared/tool/constants/lsp/lsp-severity-labels.d.ts +0 -0
  443. package/dist/shared/tool/constants/lsp/lsp-severity.d.ts +0 -0
  444. package/dist/shared/tool/constants/parallel/index.d.ts +0 -0
  445. package/dist/shared/tool/constants/parallel/logging.d.ts +0 -0
  446. package/dist/shared/tool/constants/parallel/parameters.d.ts +0 -0
  447. package/dist/shared/tool/constants/tool-names.d.ts +0 -0
  448. package/dist/shared/tool/constants/tool-output.d.ts +0 -0
  449. package/dist/shared/tool/index.d.ts +0 -0
  450. package/dist/shared/tool/interfaces/ast/ast-replace-result.d.ts +0 -0
  451. package/dist/shared/tool/interfaces/ast/ast-search-result.d.ts +0 -0
  452. package/dist/shared/tool/interfaces/ast/index.d.ts +0 -0
  453. package/dist/shared/tool/interfaces/index.d.ts +0 -0
  454. package/dist/shared/tool/interfaces/lsp/index.d.ts +0 -0
  455. package/dist/shared/tool/interfaces/lsp/lsp-command-result.d.ts +0 -0
  456. package/dist/shared/tool/interfaces/lsp/lsp-diagnostic.d.ts +0 -0
  457. package/dist/shared/tool/interfaces/lsp/lsp-rename-location.d.ts +0 -0
  458. package/dist/shared/tool/interfaces/lsp/lsp-rename-result.d.ts +0 -0
  459. package/dist/shared/tool/interfaces/parallel/index.d.ts +0 -0
  460. package/dist/shared/tool/interfaces/parallel/poll-result.d.ts +0 -0
  461. package/dist/shared/tool/interfaces/parallel/session-client.d.ts +0 -0
  462. package/dist/shared/verification/constants/categories.d.ts +0 -0
  463. package/dist/shared/verification/constants/checklist.d.ts +0 -0
  464. package/dist/shared/verification/constants/index.d.ts +0 -0
  465. package/dist/shared/verification/constants/patterns.d.ts +0 -0
  466. package/dist/shared/verification/constants/signals.d.ts +0 -0
  467. package/dist/shared/verification/index.d.ts +0 -0
  468. package/dist/shared/verification/interfaces/checklist-item.d.ts +0 -0
  469. package/dist/shared/verification/interfaces/checklist-verification-result.d.ts +0 -0
  470. package/dist/shared/verification/interfaces/index.d.ts +0 -0
  471. package/dist/shared/verification/interfaces/verification-checklist.d.ts +0 -0
  472. package/dist/shared/verification/interfaces/verification-result.d.ts +0 -0
  473. package/dist/shared/verification/types/checklist-category.d.ts +0 -0
  474. package/dist/shared/verification/types/index.d.ts +0 -0
  475. package/dist/tools/ast/index.d.ts +0 -0
  476. package/dist/tools/background-cmd/check.d.ts +0 -0
  477. package/dist/tools/background-cmd/index.d.ts +0 -0
  478. package/dist/tools/background-cmd/kill.d.ts +0 -0
  479. package/dist/tools/background-cmd/list.d.ts +0 -0
  480. package/dist/tools/background-cmd/run.d.ts +0 -0
  481. package/dist/tools/callAgent.d.ts +0 -0
  482. package/dist/tools/lsp/diagnostics-cache.d.ts +0 -0
  483. package/dist/tools/lsp/index.d.ts +0 -0
  484. package/dist/tools/parallel/cancel-task.d.ts +0 -0
  485. package/dist/tools/parallel/delegate-task.d.ts +0 -0
  486. package/dist/tools/parallel/get-task-result.d.ts +0 -0
  487. package/dist/tools/parallel/index.d.ts +0 -0
  488. package/dist/tools/parallel/list-agents.d.ts +1 -1
  489. package/dist/tools/parallel/list-tasks.d.ts +0 -0
  490. package/dist/tools/parallel/show-metrics.d.ts +1 -1
  491. package/dist/tools/parallel/update-todo.d.ts +0 -0
  492. package/dist/tools/registry.d.ts +0 -0
  493. package/dist/tools/rust-pool.d.ts +0 -0
  494. package/dist/tools/rust.d.ts +0 -0
  495. package/dist/tools/search.d.ts +0 -0
  496. package/dist/tools/slashCommand.d.ts +0 -0
  497. package/dist/tools/web/cache-docs.d.ts +0 -0
  498. package/dist/tools/web/codesearch.d.ts +0 -0
  499. package/dist/tools/web/index.d.ts +0 -0
  500. package/dist/tools/web/webfetch.d.ts +0 -0
  501. package/dist/tools/web/websearch.d.ts +0 -0
  502. package/dist/utils/binary.d.ts +10 -0
  503. package/dist/utils/common.d.ts +0 -0
  504. package/dist/utils/compatibility/claude.d.ts +0 -0
  505. package/dist/utils/formatting/elapsed-time.d.ts +0 -0
  506. package/dist/utils/formatting/index.d.ts +0 -0
  507. package/dist/utils/formatting/timestamp.d.ts +0 -0
  508. package/dist/utils/parsing/index.d.ts +0 -0
  509. package/dist/utils/parsing/slash-command.d.ts +0 -0
  510. package/dist/utils/sanity/checker.d.ts +0 -0
  511. package/dist/utils/sanity/constants/escalation-prompt.d.ts +0 -0
  512. package/dist/utils/sanity/constants/index.d.ts +0 -0
  513. package/dist/utils/sanity/constants/recovery-prompt.d.ts +0 -0
  514. package/dist/utils/sanity/constants/severity.d.ts +0 -0
  515. package/dist/utils/sanity/index.d.ts +0 -0
  516. package/dist/utils/sanity/interfaces/index.d.ts +0 -0
  517. package/dist/utils/sanity/interfaces/sanity-result.d.ts +0 -0
  518. package/dist/utils/sanity/types/index.d.ts +0 -0
  519. package/dist/utils/sanity/types/severity.d.ts +0 -0
  520. package/package.json +88 -86
  521. package/scripts/run-install-hook.mjs +66 -66
package/README.md CHANGED
@@ -1,356 +1,356 @@
1
-
2
- ---
3
-
4
- <div align="center">
5
- <img src="assets/logo.png" alt="logo" width="200" />
6
- <h1>OpenCode Orchestrator</h1>
7
- <p>Production-Grade Multi-Agent Orchestration Engine for High-Integrity Software Engineering</p>
8
-
9
- [![MIT License](https://img.shields.io/badge/license-MIT-red.svg)](LICENSE)
10
- [![npm](https://img.shields.io/npm/v/opencode-orchestrator.svg)](https://www.npmjs.com/package/opencode-orchestrator)
1
+
2
+ ---
3
+
4
+ <div align="center">
5
+ <img src="assets/logo.png" alt="logo" width="200" />
6
+ <h1>OpenCode Orchestrator</h1>
7
+ <p>Production-Grade Multi-Agent Orchestration Engine for High-Integrity Software Engineering</p>
8
+
9
+ [![MIT License](https://img.shields.io/badge/license-MIT-red.svg)](LICENSE)
10
+ [![npm](https://img.shields.io/npm/v/opencode-orchestrator.svg)](https://www.npmjs.com/package/opencode-orchestrator)
11
11
  <!-- VERSION:START -->
12
- **Version:** `1.2.69`
13
- <!-- VERSION:END -->
14
- </div>
15
-
16
-
17
- ---
18
-
19
- ## โšก Quick Start
20
-
21
- ```bash
22
- npm install -g opencode-orchestrator
23
- ```
24
-
25
- Install hooks are source-checkout safe, prefer `opencode.jsonc` when present, preserve sibling plugin entries, and skip automatic config mutation in CI environments.
26
-
27
- To remove the plugin safely later, run:
28
-
29
- ```bash
30
- npm explore -g opencode-orchestrator -- npm run cleanup:plugin
31
- npm uninstall -g opencode-orchestrator
32
- ```
33
-
34
- `npm uninstall -g` does not run dependency uninstall hooks in the npm 11 flow verified for this repo, so config cleanup is explicit.
35
-
36
- Inside an OpenCode environment:
37
- ```bash
38
- /task "Implement a new authentication module with JWT and audit logs"
39
- ```
40
-
41
-
42
- ---
43
-
44
- ## ๐Ÿš€ Engine Workflow
45
-
46
- **Hub-and-Spoke Architecture** with Work-Stealing Queues for parallel, context-isolated task execution.
47
- ```
48
- โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
49
- โ•‘ USER INPUT /task "..." โ•‘
50
- โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
51
- โ”‚
52
- โ–ผ
53
- โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
54
- โ•‘ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ•‘
55
- โ•‘ โ”‚ C O M M A N D E R โ”‚ โ•‘
56
- โ•‘ โ”‚ [ Mission Analysis & Delegation ] โ”‚ โ•‘
57
- โ•‘ โ”‚ โ”‚ โ•‘
58
- โ•‘ โ”‚ โ€ข Interprets user intent โ€ข Coordinates multi-agent workflow โ”‚ โ•‘
59
- โ•‘ โ”‚ โ€ข Monitors progress โ€ข Manages work-stealing queues โ”‚ โ•‘
60
- โ•‘ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ•‘
61
- โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
62
- โ”‚
63
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
64
- โ–ผ โ–ผ โ–ผ
65
- โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
66
- โ•‘ P L A N N E R โ•‘ โ•‘ W O R K E R โ•‘ โ•‘ W O R K E R โ•‘
67
- โ•‘ [Architect] โ•‘ โ•‘ [Implementer] โ•‘ โ•‘ [Implementer] โ•‘
68
- โ•‘ โ•‘ โ•‘ โ•‘ โ•‘ โ•‘
69
- โ•‘ โ€ข Dependency โ•‘ โ•‘ โ€ข File coding โ•‘ โ•‘ โ€ข File coding โ•‘
70
- โ•‘ analysis โ•‘ โ•‘ โ€ข TDD workflow โ•‘ โ•‘ โ€ข TDD workflow โ•‘
71
- โ•‘ โ€ข Roadmap gen โ•‘ โ•‘ โ€ข Documentationโ•‘ โ•‘ โ€ข Documentationโ•‘
72
- โ•‘ โ€ข TODO.md โ•‘ โ•‘ โ•‘ โ•‘ โ•‘
73
- โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
74
- โ”‚ โ”‚ โ”‚
75
- โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
76
- โ”‚ โ”‚ โ”‚
77
- โ–ผ โ–ผ โ–ผ
78
- โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
79
- โ•‘ SESSION POOL (MVCC Sync) โ•‘
80
- โ•‘ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ•‘
81
- โ•‘ โ”‚ Object Pool โ”‚ Buffer Pool โ”‚ โ•‘
82
- โ•‘ โ”‚ String Pool โ”‚ Connection Pool โ”‚ โ•‘
83
- โ•‘ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ•‘
84
- โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
85
- โ”‚
86
- โ–ผ
87
- โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
88
- โ•‘ MSVP MONITOR / REVIEWER โ•‘
89
- โ•‘ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ•‘
90
- โ•‘ โ”‚ โ€ข Adaptive polling (500ms-5s) โ”‚ โ•‘
91
- โ•‘ โ”‚ โ€ข Stability detection โ”‚ โ•‘
92
- โ•‘ โ”‚ โ€ข Unit test verification โ”‚ โ•‘
93
- โ•‘ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ•‘
94
- โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
95
- โ”‚
96
- โ–ผ
97
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
98
- โ”‚ โœจ COMPLETED โ”‚
99
- โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
100
- ```
101
-
102
- ---
103
-
104
- ## ๐Ÿ—๏ธ Architecture Layers
105
-
106
- ```
107
- โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
108
- โ”‚ PRESENTATION LAYER โ”‚
109
- โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
110
- โ”‚ โ”‚ Task Toast โ”‚ โ”‚ Progress โ”‚ โ”‚ Notificationโ”‚ โ”‚ Mission Summary โ”‚ โ”‚
111
- โ”‚ โ”‚ Manager โ”‚ โ”‚ Notifier โ”‚ โ”‚ Manager โ”‚ โ”‚ Display โ”‚ โ”‚
112
- โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
113
- โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
114
- โ”‚ BUSINESS LOGIC LAYER โ”‚
115
- โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
116
- โ”‚ โ”‚ Parallel Agent Orchestration โ”‚ โ”‚
117
- โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚
118
- โ”‚ โ”‚ โ”‚ Commander โ”‚ โ”‚ Planner โ”‚ โ”‚ Worker โ”‚ โ”‚ Reviewer โ”‚ โ”‚ โ”‚
119
- โ”‚ โ”‚ โ”‚ Agent โ”‚ โ”‚ Agent โ”‚ โ”‚ Agent โ”‚ โ”‚ Agent โ”‚ โ”‚ โ”‚
120
- โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚
121
- โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
122
- โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”โ”‚
123
- โ”‚ โ”‚ Concurrency โ”‚ โ”‚ Task Store โ”‚ โ”‚ Hook System โ”‚โ”‚
124
- โ”‚ โ”‚ Controller โ”‚ โ”‚ (In-Memory) โ”‚ โ”‚ [Early/Normal/Late Phases] โ”‚โ”‚
125
- โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜โ”‚
126
- โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
127
- โ”‚ INFRASTRUCTURE LAYER โ”‚
128
- โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
129
- โ”‚ โ”‚ Session Pool โ”‚ โ”‚ Work-Stealing โ”‚ โ”‚ Memory Pools โ”‚ โ”‚
130
- โ”‚ โ”‚ [5 per agent] โ”‚ โ”‚ [Chase-Lev] โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”โ”‚ โ”‚
131
- โ”‚ โ”‚ [10 reuse max] โ”‚ โ”‚ [LIFO/FIFO] โ”‚ โ”‚ โ”‚Objectโ”‚ โ”‚Stringโ”‚ โ”‚Bufferโ”‚โ”‚ โ”‚
132
- โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ 200 โ”‚ โ”‚ internโ”‚ โ”‚ 4KB โ”‚โ”‚ โ”‚
133
- โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”˜โ”‚ โ”‚
134
- โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
135
- โ”‚ โ”‚ MVCC State โ”‚ โ”‚ Circuit Breaker โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
136
- โ”‚ โ”‚ [Atomic Sync] โ”‚ โ”‚ [5 failuresโ†’openโ”‚ โ”‚ Rust Connection Pool โ”‚ โ”‚
137
- โ”‚ โ”‚ โ”‚ โ”‚ [2 successโ†’closeโ”‚ โ”‚ [4 processes, 30s idle] โ”‚ โ”‚
138
- โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
139
- โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
140
- โ”‚ SAFETY LAYER โ”‚
141
- โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
142
- โ”‚ โ”‚ RAII Pattern โ”‚ โ”‚ Shutdown โ”‚ โ”‚ Auto-Recovery โ”‚ โ”‚
143
- โ”‚ โ”‚ [Zero Leaks] โ”‚ โ”‚ Manager โ”‚ โ”‚ [Exponential Backoff] โ”‚ โ”‚
144
- โ”‚ โ”‚ โ”‚ โ”‚ [5s timeout] โ”‚ โ”‚ [Rate limit handling] โ”‚ โ”‚
145
- โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
146
- โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
147
- ```
148
-
149
- ---
150
-
151
- ## ๐Ÿงช Test Utilities
152
-
153
- Reusable test helpers keep filesystem, task, and process-heavy flows deterministic:
154
-
155
- ```
156
- tests/harness/
157
- โ”œโ”€โ”€ fixture.ts Disposable tmpdir utilities
158
- โ”‚ โ”œโ”€โ”€ tmpdir() async disposable with cleanup
159
- โ”‚ โ”œโ”€โ”€ tmpdirSync() sync disposable with cleanup
160
- โ”‚ โ”œโ”€โ”€ createMockFs() In-memory fs mock
161
- โ”‚ โ””โ”€โ”€ waitFor() Async condition waiter
162
- โ”‚
163
- โ”œโ”€โ”€ builders.ts Factory functions for test objects
164
- โ”‚ โ”œโ”€โ”€ createParallelTask() Build ParallelTask instances
165
- โ”‚ โ”œโ”€โ”€ createBackgroundTask() Build BackgroundTask instances
166
- โ”‚ โ””โ”€โ”€ createTodo() Build Todo instances
167
- โ”‚
168
- โ”œโ”€โ”€ mocks.ts Mock utilities
169
- โ”‚ โ”œโ”€โ”€ mockConsole() Spy on console.log/error
170
- โ”‚ โ”œโ”€โ”€ mockProcessExit() Mock process.exit
171
- โ”‚ โ”œโ”€โ”€ useFakeTimers() Time manipulation
172
- โ”‚ โ””โ”€โ”€ createMockEmitter() EventEmitter spy
173
- โ”‚
174
- โ””โ”€โ”€ index.ts Unified exports
175
- ```
176
-
177
- ### Usage Example
178
-
179
- ```typescript
180
- import { tmpdir, createParallelTask, mockConsole } from "@/tests/harness";
181
-
182
- describe("My test", () => {
183
- let consoleMock;
184
-
185
- beforeEach(() => {
186
- consoleMock = mockConsole();
187
- consoleMock.setup();
188
- });
189
-
190
- afterEach(() => {
191
- consoleMock.restore();
192
- });
193
-
194
- it("should work", async () => {
195
- await using tmp = await tmpdir({ git: true });
196
- const task = createParallelTask({ description: "Test" });
197
- expect(task.status).toBe("pending");
198
- });
199
- });
200
- ```
201
-
202
- ---
203
-
204
- ## โšก Elite Multi-Agent Swarm
205
-
206
- | Agent | Role | Core Responsibilities |
207
- |:------|:-----|:------------------------|
208
- | **Commander** | Mission Hub | Task decomposition, agent coordination, work-stealing orchestration, final mission seal |
209
- | **Planner** | Architect | Dependency analysis, roadmap generation, TODO.md creation via MVCC, file-level planning |
210
- | **Worker** | Implementer | High-throughput coding, TDD workflow, documentation, isolated file execution |
211
- | **Reviewer** | Auditor | Unit test verification, LSP/Lint validation, integration testing, quality gate |
212
- ---
213
-
214
- ## ๐Ÿ› ๏ธ Core Capabilities
215
-
216
- ### ๐Ÿ”’ Atomic MVCC State Synchronization
217
- Solves the "Concurrent TODO Update" problem using **MVCC + Mutex**. Agents safely mark tasks complete in parallel without data loss or race conditions. Every state change is cryptographically hashed and logged.
218
-
219
- ### ๐Ÿงฉ Advanced Hook Orchestration
220
- Execution flows governed by a **Priority-Phase Hook Registry**. Hooks are grouped into phases (`early`, `normal`, `late`) and executed via **Topological Sort** for predictable, dependency-aware ordering.
221
-
222
- ### ๐Ÿ›ก๏ธ Autonomous Recovery
223
- - **Self-healing loops** with adaptive stagnation detection
224
- - **Proactive Agency**: Smart monitoring that audits logs and plans ahead during background tasks
225
- - **Auto-retry with backoff**: Exponential backoff for transient failures
226
-
227
- ### ๐ŸŽฏ State-Level Session Isolation
228
- Reused sessions in the **SessionPool** are explicitly reset via server-side compaction, ensuring previous task context never leaks into new tasks.
229
-
230
- ### ๐Ÿš€ Zero-Payload Turbo Mode
231
- Leverages `system.transform` to unshift agent instruction sets server-side, reducing initial message payloads by **90%+** and preventing context fragmentation.
232
-
233
- ### ๐Ÿง  Hierarchical Memory System
234
- Maintains focus across thousands of conversation turns using a 4-tier memory structure with **EMA-based Context Gating** to preserve architectural truth while pruning noise.
235
-
236
- ### ๐Ÿ”„ Adaptive Intelligence Loop
237
- - **Stagnation Detection**: Senses when no progress is made across iterations
238
- - **Diagnostic Intervention**: Forces "Diagnostic Mode" mandating log audits and strategy pivots
239
- - **Proactive Agency**: Mandates Speculative Planning during background task execution
240
-
241
- ---
242
-
243
- ## โš™๏ธ Performance Benchmarks
244
-
245
- | Metric | Improvement |
246
- |:-------|:------------|
247
- | CPU Utilization | 90%+ (up from 50-70%) |
248
- | Tool Call Speed | 10x faster (5-10ms vs 50-100ms) via Rust pool |
249
- | Session Creation | 90% faster (50ms vs 500ms) via session pooling |
250
- | Memory Usage | 60% reduction via object/string/buffer pooling |
251
- | GC Pressure | 80% reduction |
252
- | Token Efficiency | 40% reduction via Incremental State & System Transform |
253
- | Sync Accuracy | 99.95% via MVCC+Mutex |
254
- | Parallel Efficiency | 80% improvement (50% โ†’ 90%+) |
255
-
256
- ---
257
-
258
- ## ๐Ÿ—๏ธ Infrastructure & Reliability
259
-
260
- ### Resource Safety
261
- - **RAII Pattern**: Guaranteed resource cleanup with zero leaks
262
- - **ShutdownManager**: Priority-based graceful shutdown (5s timeout per handler)
263
- - **Atomic File Operations**: Temp file + rename for corruption-proof writes
264
- - **Automatic Backups**: Timestamped config backups with rollback support
265
-
266
- ### Safety Features
267
- - **Circuit Breaker**: Auto-recovery from API failures (5 failures โ†’ open)
268
- - **Resource Pressure Detection**: Rejects low-priority tasks when memory > 80%
269
- - **Terminal Node Guard**: Prevents infinite recursion via depth limit
270
- - **Auto-Scaling**: Concurrency slots adjust based on success/failure rate
271
-
272
- ### Technical Stack
273
- - **Runtime**: Node.js 18+ (TypeScript)
274
- - **Tools**: Rust-based CLI tools (grep, glob, ast) via connection pool
275
- - **Concurrency**: Chase-Lev work-stealing deque + priority queues
276
- - **Memory**: Object pooling + string interning + buffer pooling
277
- - **State Management**: MVCC + Mutex
278
- - **Safety**: RAII + circuit breaker + resource pressure detection
279
-
280
- ---
281
-
282
- ## ๐Ÿ”ง Installation & Configuration
283
-
284
- ### Safe Installation
285
- The installation process is **production-safe** with multiple protection layers:
286
-
287
- 1. โœ… **Never overwrites** โ€” always merges with existing config
288
- 2. โœ… **Automatic backups** โ€” timestamped, last 5 kept
289
- 3. โœ… **Atomic writes** โ€” temp file + rename (OS-level atomic)
290
- 4. โœ… **Automatic rollback** โ€” restores from backup on any failure
291
- 5. โœ… **Cross-platform** โ€” Windows (native, Git Bash, WSL2), macOS, Linux
292
- 6. โœ… **CI-aware** โ€” skips non-essential operations in CI environments
293
- 7. โœ… **Timeout protection** โ€” 30s timeout prevents hanging
294
- 8. โœ… **Graceful degradation** โ€” exits 0 on non-critical failures
295
-
296
- ### Safe Removal
297
- OpenCode config cleanup is provided as an explicit command because global package uninstall does not invoke dependency uninstall hooks in the npm flow validated for this package.
298
-
299
- ```bash
300
- npm explore -g opencode-orchestrator -- npm run cleanup:plugin
301
- npm uninstall -g opencode-orchestrator
302
- ```
303
-
304
- Manual fallback:
305
- - Open `~/.config/opencode/opencode.json` or `opencode.jsonc`
306
- - Remove `"opencode-orchestrator"` from the `plugin` array
307
-
308
- ### Configuration Logs
309
- - Unix: `/tmp/opencode-orchestrator.log`
310
- - Windows: `%TEMP%\opencode-orchestrator.log`
311
-
312
- ---
313
-
314
- ## ๐Ÿงช Testing & Stability
315
-
316
- ### Test Utilities
317
- Reusable helpers under `tests/harness/` provide:
318
- - **Disposable tmpdir**: Automatic cleanup with `Symbol.asyncDispose` / `Symbol.dispose`
319
- - **Test builders**: Factory functions for `ParallelTask`, `BackgroundTask`, `Todo`
320
- - **Mock utilities**: Console, process, timers, file system, event emitter mocks
321
-
322
- ```typescript
323
- import { tmpdir, createParallelTask, mockConsole } from "@/tests/harness";
324
-
325
- await using tmp = await tmpdir({ git: true });
326
- const task = createParallelTask({ description: "Test" });
327
- ```
328
-
329
- ### TUI Stability
330
- - **Cleanup guarantees**: `initToastClient()` returns a cleanup function
331
- - **Timeout protection**: AbortController-based 2-10s timeout for async toast operations
332
- - **Error isolation**: Try/catch around all toast operations prevents cascade failures
333
-
334
- ### Cross-Platform Reliability
335
- - **Windows guard**: Proper handling of WSL2, Git Bash, native Windows paths
336
- - **Signal handling**: Graceful shutdown on SIGINT/SIGTERM
337
- - **Process isolation**: Child process cleanup with timeout
338
-
339
- ---
340
-
341
- ## ๐Ÿ“š Documentation
342
-
343
- - [System Architecture Deep-Dive โ†’](docs/SYSTEM_ARCHITECTURE.md)
344
- - [Developer Notes โ†’](docs/DEVELOPERS_NOTE.md)
345
-
346
- ---
347
-
348
- ## ๐Ÿ“„ License
349
-
350
- MIT License โ€” see [LICENSE](LICENSE) for details.
351
-
352
- ---
353
-
354
- <div align="center">
355
- <sub>Built with โšก for production-grade autonomous software engineering</sub>
356
- </div>
12
+ **Version:** `1.2.71`
13
+ <!-- VERSION:END -->
14
+ </div>
15
+
16
+
17
+ ---
18
+
19
+ ## โšก Quick Start
20
+
21
+ ```bash
22
+ npm install -g opencode-orchestrator
23
+ ```
24
+
25
+ Install hooks are source-checkout safe, prefer `opencode.jsonc` when present, preserve sibling plugin entries, and skip automatic config mutation in CI environments.
26
+
27
+ To remove the plugin safely later, run:
28
+
29
+ ```bash
30
+ npm explore -g opencode-orchestrator -- npm run cleanup:plugin
31
+ npm uninstall -g opencode-orchestrator
32
+ ```
33
+
34
+ `npm uninstall -g` does not run dependency uninstall hooks in the npm 11 flow verified for this repo, so config cleanup is explicit.
35
+
36
+ Inside an OpenCode environment:
37
+ ```bash
38
+ /task "Implement a new authentication module with JWT and audit logs"
39
+ ```
40
+
41
+
42
+ ---
43
+
44
+ ## ๐Ÿš€ Engine Workflow
45
+
46
+ **Hub-and-Spoke Architecture** with Work-Stealing Queues for parallel, context-isolated task execution.
47
+ ```
48
+ โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
49
+ โ•‘ USER INPUT /task "..." โ•‘
50
+ โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
51
+ โ”‚
52
+ โ–ผ
53
+ โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
54
+ โ•‘ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ•‘
55
+ โ•‘ โ”‚ C O M M A N D E R โ”‚ โ•‘
56
+ โ•‘ โ”‚ [ Mission Analysis & Delegation ] โ”‚ โ•‘
57
+ โ•‘ โ”‚ โ”‚ โ•‘
58
+ โ•‘ โ”‚ โ€ข Interprets user intent โ€ข Coordinates multi-agent workflow โ”‚ โ•‘
59
+ โ•‘ โ”‚ โ€ข Monitors progress โ€ข Manages work-stealing queues โ”‚ โ•‘
60
+ โ•‘ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ•‘
61
+ โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
62
+ โ”‚
63
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
64
+ โ–ผ โ–ผ โ–ผ
65
+ โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•— โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
66
+ โ•‘ P L A N N E R โ•‘ โ•‘ W O R K E R โ•‘ โ•‘ W O R K E R โ•‘
67
+ โ•‘ [Architect] โ•‘ โ•‘ [Implementer] โ•‘ โ•‘ [Implementer] โ•‘
68
+ โ•‘ โ•‘ โ•‘ โ•‘ โ•‘ โ•‘
69
+ โ•‘ โ€ข Dependency โ•‘ โ•‘ โ€ข File coding โ•‘ โ•‘ โ€ข File coding โ•‘
70
+ โ•‘ analysis โ•‘ โ•‘ โ€ข TDD workflow โ•‘ โ•‘ โ€ข TDD workflow โ•‘
71
+ โ•‘ โ€ข Roadmap gen โ•‘ โ•‘ โ€ข Documentationโ•‘ โ•‘ โ€ข Documentationโ•‘
72
+ โ•‘ โ€ข TODO.md โ•‘ โ•‘ โ•‘ โ•‘ โ•‘
73
+ โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
74
+ โ”‚ โ”‚ โ”‚
75
+ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
76
+ โ”‚ โ”‚ โ”‚
77
+ โ–ผ โ–ผ โ–ผ
78
+ โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
79
+ โ•‘ SESSION POOL (MVCC Sync) โ•‘
80
+ โ•‘ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ•‘
81
+ โ•‘ โ”‚ Object Pool โ”‚ Buffer Pool โ”‚ โ•‘
82
+ โ•‘ โ”‚ String Pool โ”‚ Connection Pool โ”‚ โ•‘
83
+ โ•‘ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ•‘
84
+ โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
85
+ โ”‚
86
+ โ–ผ
87
+ โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
88
+ โ•‘ MSVP MONITOR / REVIEWER โ•‘
89
+ โ•‘ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ•‘
90
+ โ•‘ โ”‚ โ€ข Adaptive polling (500ms-5s) โ”‚ โ•‘
91
+ โ•‘ โ”‚ โ€ข Stability detection โ”‚ โ•‘
92
+ โ•‘ โ”‚ โ€ข Unit test verification โ”‚ โ•‘
93
+ โ•‘ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ•‘
94
+ โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
95
+ โ”‚
96
+ โ–ผ
97
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
98
+ โ”‚ โœจ COMPLETED โ”‚
99
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
100
+ ```
101
+
102
+ ---
103
+
104
+ ## ๐Ÿ—๏ธ Architecture Layers
105
+
106
+ ```
107
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
108
+ โ”‚ PRESENTATION LAYER โ”‚
109
+ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
110
+ โ”‚ โ”‚ Task Toast โ”‚ โ”‚ Progress โ”‚ โ”‚ Notificationโ”‚ โ”‚ Mission Summary โ”‚ โ”‚
111
+ โ”‚ โ”‚ Manager โ”‚ โ”‚ Notifier โ”‚ โ”‚ Manager โ”‚ โ”‚ Display โ”‚ โ”‚
112
+ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
113
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
114
+ โ”‚ BUSINESS LOGIC LAYER โ”‚
115
+ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
116
+ โ”‚ โ”‚ Parallel Agent Orchestration โ”‚ โ”‚
117
+ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚
118
+ โ”‚ โ”‚ โ”‚ Commander โ”‚ โ”‚ Planner โ”‚ โ”‚ Worker โ”‚ โ”‚ Reviewer โ”‚ โ”‚ โ”‚
119
+ โ”‚ โ”‚ โ”‚ Agent โ”‚ โ”‚ Agent โ”‚ โ”‚ Agent โ”‚ โ”‚ Agent โ”‚ โ”‚ โ”‚
120
+ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚
121
+ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
122
+ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”โ”‚
123
+ โ”‚ โ”‚ Concurrency โ”‚ โ”‚ Task Store โ”‚ โ”‚ Hook System โ”‚โ”‚
124
+ โ”‚ โ”‚ Controller โ”‚ โ”‚ (In-Memory) โ”‚ โ”‚ [Early/Normal/Late Phases] โ”‚โ”‚
125
+ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜โ”‚
126
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
127
+ โ”‚ INFRASTRUCTURE LAYER โ”‚
128
+ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
129
+ โ”‚ โ”‚ Session Pool โ”‚ โ”‚ Work-Stealing โ”‚ โ”‚ Memory Pools โ”‚ โ”‚
130
+ โ”‚ โ”‚ [5 per agent] โ”‚ โ”‚ [Chase-Lev] โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”โ”‚ โ”‚
131
+ โ”‚ โ”‚ [10 reuse max] โ”‚ โ”‚ [LIFO/FIFO] โ”‚ โ”‚ โ”‚Objectโ”‚ โ”‚Stringโ”‚ โ”‚Bufferโ”‚โ”‚ โ”‚
132
+ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ 200 โ”‚ โ”‚ internโ”‚ โ”‚ 4KB โ”‚โ”‚ โ”‚
133
+ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”˜โ”‚ โ”‚
134
+ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
135
+ โ”‚ โ”‚ MVCC State โ”‚ โ”‚ Circuit Breaker โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
136
+ โ”‚ โ”‚ [Atomic Sync] โ”‚ โ”‚ [5 failuresโ†’openโ”‚ โ”‚ Rust Connection Pool โ”‚ โ”‚
137
+ โ”‚ โ”‚ โ”‚ โ”‚ [2 successโ†’closeโ”‚ โ”‚ [4 processes, 30s idle] โ”‚ โ”‚
138
+ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
139
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
140
+ โ”‚ SAFETY LAYER โ”‚
141
+ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
142
+ โ”‚ โ”‚ RAII Pattern โ”‚ โ”‚ Shutdown โ”‚ โ”‚ Auto-Recovery โ”‚ โ”‚
143
+ โ”‚ โ”‚ [Zero Leaks] โ”‚ โ”‚ Manager โ”‚ โ”‚ [Exponential Backoff] โ”‚ โ”‚
144
+ โ”‚ โ”‚ โ”‚ โ”‚ [5s timeout] โ”‚ โ”‚ [Rate limit handling] โ”‚ โ”‚
145
+ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
146
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
147
+ ```
148
+
149
+ ---
150
+
151
+ ## ๐Ÿงช Test Utilities
152
+
153
+ Reusable test helpers keep filesystem, task, and process-heavy flows deterministic:
154
+
155
+ ```
156
+ tests/harness/
157
+ โ”œโ”€โ”€ fixture.ts Disposable tmpdir utilities
158
+ โ”‚ โ”œโ”€โ”€ tmpdir() async disposable with cleanup
159
+ โ”‚ โ”œโ”€โ”€ tmpdirSync() sync disposable with cleanup
160
+ โ”‚ โ”œโ”€โ”€ createMockFs() In-memory fs mock
161
+ โ”‚ โ””โ”€โ”€ waitFor() Async condition waiter
162
+ โ”‚
163
+ โ”œโ”€โ”€ builders.ts Factory functions for test objects
164
+ โ”‚ โ”œโ”€โ”€ createParallelTask() Build ParallelTask instances
165
+ โ”‚ โ”œโ”€โ”€ createBackgroundTask() Build BackgroundTask instances
166
+ โ”‚ โ””โ”€โ”€ createTodo() Build Todo instances
167
+ โ”‚
168
+ โ”œโ”€โ”€ mocks.ts Mock utilities
169
+ โ”‚ โ”œโ”€โ”€ mockConsole() Spy on console.log/error
170
+ โ”‚ โ”œโ”€โ”€ mockProcessExit() Mock process.exit
171
+ โ”‚ โ”œโ”€โ”€ useFakeTimers() Time manipulation
172
+ โ”‚ โ””โ”€โ”€ createMockEmitter() EventEmitter spy
173
+ โ”‚
174
+ โ””โ”€โ”€ index.ts Unified exports
175
+ ```
176
+
177
+ ### Usage Example
178
+
179
+ ```typescript
180
+ import { tmpdir, createParallelTask, mockConsole } from "@/tests/harness";
181
+
182
+ describe("My test", () => {
183
+ let consoleMock;
184
+
185
+ beforeEach(() => {
186
+ consoleMock = mockConsole();
187
+ consoleMock.setup();
188
+ });
189
+
190
+ afterEach(() => {
191
+ consoleMock.restore();
192
+ });
193
+
194
+ it("should work", async () => {
195
+ await using tmp = await tmpdir({ git: true });
196
+ const task = createParallelTask({ description: "Test" });
197
+ expect(task.status).toBe("pending");
198
+ });
199
+ });
200
+ ```
201
+
202
+ ---
203
+
204
+ ## โšก Elite Multi-Agent Swarm
205
+
206
+ | Agent | Role | Core Responsibilities |
207
+ |:------|:-----|:------------------------|
208
+ | **Commander** | Mission Hub | Task decomposition, agent coordination, work-stealing orchestration, final mission seal |
209
+ | **Planner** | Architect | Dependency analysis, roadmap generation, TODO.md creation via MVCC, file-level planning |
210
+ | **Worker** | Implementer | High-throughput coding, TDD workflow, documentation, isolated file execution |
211
+ | **Reviewer** | Auditor | Unit test verification, LSP/Lint validation, integration testing, quality gate |
212
+ ---
213
+
214
+ ## ๐Ÿ› ๏ธ Core Capabilities
215
+
216
+ ### ๐Ÿ”’ Atomic MVCC State Synchronization
217
+ Solves the "Concurrent TODO Update" problem using **MVCC + Mutex**. Agents safely mark tasks complete in parallel without data loss or race conditions. Every state change is cryptographically hashed and logged.
218
+
219
+ ### ๐Ÿงฉ Advanced Hook Orchestration
220
+ Execution flows governed by a **Priority-Phase Hook Registry**. Hooks are grouped into phases (`early`, `normal`, `late`) and executed via **Topological Sort** for predictable, dependency-aware ordering.
221
+
222
+ ### ๐Ÿ›ก๏ธ Autonomous Recovery
223
+ - **Self-healing loops** with adaptive stagnation detection
224
+ - **Proactive Agency**: Smart monitoring that audits logs and plans ahead during background tasks
225
+ - **Auto-retry with backoff**: Exponential backoff for transient failures
226
+
227
+ ### ๐ŸŽฏ State-Level Session Isolation
228
+ Reused sessions in the **SessionPool** are explicitly reset via server-side compaction, ensuring previous task context never leaks into new tasks.
229
+
230
+ ### ๐Ÿš€ Zero-Payload Turbo Mode
231
+ Leverages `system.transform` to unshift agent instruction sets server-side, reducing initial message payloads by **90%+** and preventing context fragmentation.
232
+
233
+ ### ๐Ÿง  Hierarchical Memory System
234
+ Maintains focus across thousands of conversation turns using a 4-tier memory structure with **EMA-based Context Gating** to preserve architectural truth while pruning noise.
235
+
236
+ ### ๐Ÿ”„ Adaptive Intelligence Loop
237
+ - **Stagnation Detection**: Senses when no progress is made across iterations
238
+ - **Diagnostic Intervention**: Forces "Diagnostic Mode" mandating log audits and strategy pivots
239
+ - **Proactive Agency**: Mandates Speculative Planning during background task execution
240
+
241
+ ---
242
+
243
+ ## โš™๏ธ Performance Benchmarks
244
+
245
+ | Metric | Improvement |
246
+ |:-------|:------------|
247
+ | CPU Utilization | 90%+ (up from 50-70%) |
248
+ | Tool Call Speed | 10x faster (5-10ms vs 50-100ms) via Rust pool |
249
+ | Session Creation | 90% faster (50ms vs 500ms) via session pooling |
250
+ | Memory Usage | 60% reduction via object/string/buffer pooling |
251
+ | GC Pressure | 80% reduction |
252
+ | Token Efficiency | 40% reduction via Incremental State & System Transform |
253
+ | Sync Accuracy | 99.95% via MVCC+Mutex |
254
+ | Parallel Efficiency | 80% improvement (50% โ†’ 90%+) |
255
+
256
+ ---
257
+
258
+ ## ๐Ÿ—๏ธ Infrastructure & Reliability
259
+
260
+ ### Resource Safety
261
+ - **RAII Pattern**: Guaranteed resource cleanup with zero leaks
262
+ - **ShutdownManager**: Priority-based graceful shutdown (5s timeout per handler)
263
+ - **Atomic File Operations**: Temp file + rename for corruption-proof writes
264
+ - **Automatic Backups**: Timestamped config backups with rollback support
265
+
266
+ ### Safety Features
267
+ - **Circuit Breaker**: Auto-recovery from API failures (5 failures โ†’ open)
268
+ - **Resource Pressure Detection**: Rejects low-priority tasks when memory > 80%
269
+ - **Terminal Node Guard**: Prevents infinite recursion via depth limit
270
+ - **Auto-Scaling**: Concurrency slots adjust based on success/failure rate
271
+
272
+ ### Technical Stack
273
+ - **Runtime**: Node.js 18+ (TypeScript)
274
+ - **Tools**: Rust-based CLI tools (grep, glob, ast) via connection pool
275
+ - **Concurrency**: Chase-Lev work-stealing deque + priority queues
276
+ - **Memory**: Object pooling + string interning + buffer pooling
277
+ - **State Management**: MVCC + Mutex
278
+ - **Safety**: RAII + circuit breaker + resource pressure detection
279
+
280
+ ---
281
+
282
+ ## ๐Ÿ”ง Installation & Configuration
283
+
284
+ ### Safe Installation
285
+ The installation process is **production-safe** with multiple protection layers:
286
+
287
+ 1. โœ… **Never overwrites** โ€” always merges with existing config
288
+ 2. โœ… **Automatic backups** โ€” timestamped, last 5 kept
289
+ 3. โœ… **Atomic writes** โ€” temp file + rename (OS-level atomic)
290
+ 4. โœ… **Automatic rollback** โ€” restores from backup on any failure
291
+ 5. โœ… **Cross-platform** โ€” Windows (native, Git Bash, WSL2), macOS, Linux
292
+ 6. โœ… **CI-aware** โ€” skips non-essential operations in CI environments
293
+ 7. โœ… **Timeout protection** โ€” 30s timeout prevents hanging
294
+ 8. โœ… **Graceful degradation** โ€” exits 0 on non-critical failures
295
+
296
+ ### Safe Removal
297
+ OpenCode config cleanup is provided as an explicit command because global package uninstall does not invoke dependency uninstall hooks in the npm flow validated for this package.
298
+
299
+ ```bash
300
+ npm explore -g opencode-orchestrator -- npm run cleanup:plugin
301
+ npm uninstall -g opencode-orchestrator
302
+ ```
303
+
304
+ Manual fallback:
305
+ - Open `~/.config/opencode/opencode.json` or `opencode.jsonc`
306
+ - Remove `"opencode-orchestrator"` from the `plugin` array
307
+
308
+ ### Configuration Logs
309
+ - Unix: `/tmp/opencode-orchestrator.log`
310
+ - Windows: `%TEMP%\opencode-orchestrator.log`
311
+
312
+ ---
313
+
314
+ ## ๐Ÿงช Testing & Stability
315
+
316
+ ### Test Utilities
317
+ Reusable helpers under `tests/harness/` provide:
318
+ - **Disposable tmpdir**: Automatic cleanup with `Symbol.asyncDispose` / `Symbol.dispose`
319
+ - **Test builders**: Factory functions for `ParallelTask`, `BackgroundTask`, `Todo`
320
+ - **Mock utilities**: Console, process, timers, file system, event emitter mocks
321
+
322
+ ```typescript
323
+ import { tmpdir, createParallelTask, mockConsole } from "@/tests/harness";
324
+
325
+ await using tmp = await tmpdir({ git: true });
326
+ const task = createParallelTask({ description: "Test" });
327
+ ```
328
+
329
+ ### TUI Stability
330
+ - **Cleanup guarantees**: `initToastClient()` returns a cleanup function
331
+ - **Timeout protection**: AbortController-based 2-10s timeout for async toast operations
332
+ - **Error isolation**: Try/catch around all toast operations prevents cascade failures
333
+
334
+ ### Cross-Platform Reliability
335
+ - **Windows guard**: Proper handling of WSL2, Git Bash, native Windows paths
336
+ - **Signal handling**: Graceful shutdown on SIGINT/SIGTERM
337
+ - **Process isolation**: Child process cleanup with timeout
338
+
339
+ ---
340
+
341
+ ## ๐Ÿ“š Documentation
342
+
343
+ - [System Architecture Deep-Dive โ†’](docs/SYSTEM_ARCHITECTURE.md)
344
+ - [Developer Notes โ†’](docs/DEVELOPERS_NOTE.md)
345
+
346
+ ---
347
+
348
+ ## ๐Ÿ“„ License
349
+
350
+ MIT License โ€” see [LICENSE](LICENSE) for details.
351
+
352
+ ---
353
+
354
+ <div align="center">
355
+ <sub>Built with โšก for production-grade autonomous software engineering</sub>
356
+ </div>