@intrect/openswarm 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (437) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +544 -0
  3. package/config.example.yaml +107 -0
  4. package/dist/adapters/base.d.ts +8 -0
  5. package/dist/adapters/base.d.ts.map +1 -0
  6. package/dist/adapters/base.js +104 -0
  7. package/dist/adapters/base.js.map +1 -0
  8. package/dist/adapters/claude.d.ts +13 -0
  9. package/dist/adapters/claude.d.ts.map +1 -0
  10. package/dist/adapters/claude.js +318 -0
  11. package/dist/adapters/claude.js.map +1 -0
  12. package/dist/adapters/codex.d.ts +14 -0
  13. package/dist/adapters/codex.d.ts.map +1 -0
  14. package/dist/adapters/codex.js +366 -0
  15. package/dist/adapters/codex.js.map +1 -0
  16. package/dist/adapters/cryptoQuantAdapter.d.ts +85 -0
  17. package/dist/adapters/cryptoQuantAdapter.d.ts.map +1 -0
  18. package/dist/adapters/cryptoQuantAdapter.js +238 -0
  19. package/dist/adapters/cryptoQuantAdapter.js.map +1 -0
  20. package/dist/adapters/index.d.ts +17 -0
  21. package/dist/adapters/index.d.ts.map +1 -0
  22. package/dist/adapters/index.js +47 -0
  23. package/dist/adapters/index.js.map +1 -0
  24. package/dist/adapters/processRegistry.d.ts +38 -0
  25. package/dist/adapters/processRegistry.d.ts.map +1 -0
  26. package/dist/adapters/processRegistry.js +147 -0
  27. package/dist/adapters/processRegistry.js.map +1 -0
  28. package/dist/adapters/streamBuffer.d.ts +59 -0
  29. package/dist/adapters/streamBuffer.d.ts.map +1 -0
  30. package/dist/adapters/streamBuffer.js +123 -0
  31. package/dist/adapters/streamBuffer.js.map +1 -0
  32. package/dist/adapters/types.d.ts +65 -0
  33. package/dist/adapters/types.d.ts.map +1 -0
  34. package/dist/adapters/types.js +6 -0
  35. package/dist/adapters/types.js.map +1 -0
  36. package/dist/agents/agentBus.d.ts +160 -0
  37. package/dist/agents/agentBus.d.ts.map +1 -0
  38. package/dist/agents/agentBus.js +350 -0
  39. package/dist/agents/agentBus.js.map +1 -0
  40. package/dist/agents/agentPair.d.ts +210 -0
  41. package/dist/agents/agentPair.d.ts.map +1 -0
  42. package/dist/agents/agentPair.js +420 -0
  43. package/dist/agents/agentPair.js.map +1 -0
  44. package/dist/agents/auditor.d.ts +27 -0
  45. package/dist/agents/auditor.d.ts.map +1 -0
  46. package/dist/agents/auditor.js +237 -0
  47. package/dist/agents/auditor.js.map +1 -0
  48. package/dist/agents/cliStreamParser.d.ts +18 -0
  49. package/dist/agents/cliStreamParser.d.ts.map +1 -0
  50. package/dist/agents/cliStreamParser.js +156 -0
  51. package/dist/agents/cliStreamParser.js.map +1 -0
  52. package/dist/agents/documenter.d.ts +31 -0
  53. package/dist/agents/documenter.d.ts.map +1 -0
  54. package/dist/agents/documenter.js +285 -0
  55. package/dist/agents/documenter.js.map +1 -0
  56. package/dist/agents/index.d.ts +10 -0
  57. package/dist/agents/index.d.ts.map +1 -0
  58. package/dist/agents/index.js +10 -0
  59. package/dist/agents/index.js.map +1 -0
  60. package/dist/agents/pairMetrics.d.ts +63 -0
  61. package/dist/agents/pairMetrics.d.ts.map +1 -0
  62. package/dist/agents/pairMetrics.js +231 -0
  63. package/dist/agents/pairMetrics.js.map +1 -0
  64. package/dist/agents/pairPipeline.d.ts +155 -0
  65. package/dist/agents/pairPipeline.d.ts.map +1 -0
  66. package/dist/agents/pairPipeline.js +793 -0
  67. package/dist/agents/pairPipeline.js.map +1 -0
  68. package/dist/agents/pairWebhook.d.ts +59 -0
  69. package/dist/agents/pairWebhook.d.ts.map +1 -0
  70. package/dist/agents/pairWebhook.js +242 -0
  71. package/dist/agents/pairWebhook.js.map +1 -0
  72. package/dist/agents/pipelineFormat.d.ts +11 -0
  73. package/dist/agents/pipelineFormat.d.ts.map +1 -0
  74. package/dist/agents/pipelineFormat.js +164 -0
  75. package/dist/agents/pipelineFormat.js.map +1 -0
  76. package/dist/agents/pipelineGuards.d.ts +23 -0
  77. package/dist/agents/pipelineGuards.d.ts.map +1 -0
  78. package/dist/agents/pipelineGuards.js +175 -0
  79. package/dist/agents/pipelineGuards.js.map +1 -0
  80. package/dist/agents/reviewer.d.ts +37 -0
  81. package/dist/agents/reviewer.d.ts.map +1 -0
  82. package/dist/agents/reviewer.js +213 -0
  83. package/dist/agents/reviewer.js.map +1 -0
  84. package/dist/agents/skillDocumenter.d.ts +23 -0
  85. package/dist/agents/skillDocumenter.d.ts.map +1 -0
  86. package/dist/agents/skillDocumenter.js +218 -0
  87. package/dist/agents/skillDocumenter.js.map +1 -0
  88. package/dist/agents/tester.d.ts +37 -0
  89. package/dist/agents/tester.d.ts.map +1 -0
  90. package/dist/agents/tester.js +308 -0
  91. package/dist/agents/tester.js.map +1 -0
  92. package/dist/agents/worker.d.ts +30 -0
  93. package/dist/agents/worker.d.ts.map +1 -0
  94. package/dist/agents/worker.js +128 -0
  95. package/dist/agents/worker.js.map +1 -0
  96. package/dist/automation/autonomousRunner.d.ts +123 -0
  97. package/dist/automation/autonomousRunner.d.ts.map +1 -0
  98. package/dist/automation/autonomousRunner.js +1082 -0
  99. package/dist/automation/autonomousRunner.js.map +1 -0
  100. package/dist/automation/ciWorker.d.ts +51 -0
  101. package/dist/automation/ciWorker.d.ts.map +1 -0
  102. package/dist/automation/ciWorker.js +282 -0
  103. package/dist/automation/ciWorker.js.map +1 -0
  104. package/dist/automation/conflictResolver.d.ts +29 -0
  105. package/dist/automation/conflictResolver.d.ts.map +1 -0
  106. package/dist/automation/conflictResolver.js +261 -0
  107. package/dist/automation/conflictResolver.js.map +1 -0
  108. package/dist/automation/dailyReporter.d.ts +26 -0
  109. package/dist/automation/dailyReporter.d.ts.map +1 -0
  110. package/dist/automation/dailyReporter.js +132 -0
  111. package/dist/automation/dailyReporter.js.map +1 -0
  112. package/dist/automation/index.d.ts +7 -0
  113. package/dist/automation/index.d.ts.map +1 -0
  114. package/dist/automation/index.js +7 -0
  115. package/dist/automation/index.js.map +1 -0
  116. package/dist/automation/longRunningMonitor.d.ts +26 -0
  117. package/dist/automation/longRunningMonitor.d.ts.map +1 -0
  118. package/dist/automation/longRunningMonitor.js +231 -0
  119. package/dist/automation/longRunningMonitor.js.map +1 -0
  120. package/dist/automation/prOwnership.d.ts +18 -0
  121. package/dist/automation/prOwnership.d.ts.map +1 -0
  122. package/dist/automation/prOwnership.js +61 -0
  123. package/dist/automation/prOwnership.js.map +1 -0
  124. package/dist/automation/prProcessor.d.ts +62 -0
  125. package/dist/automation/prProcessor.d.ts.map +1 -0
  126. package/dist/automation/prProcessor.js +700 -0
  127. package/dist/automation/prProcessor.js.map +1 -0
  128. package/dist/automation/runnerExecution.d.ts +49 -0
  129. package/dist/automation/runnerExecution.d.ts.map +1 -0
  130. package/dist/automation/runnerExecution.js +663 -0
  131. package/dist/automation/runnerExecution.js.map +1 -0
  132. package/dist/automation/runnerState.d.ts +170 -0
  133. package/dist/automation/runnerState.d.ts.map +1 -0
  134. package/dist/automation/runnerState.js +495 -0
  135. package/dist/automation/runnerState.js.map +1 -0
  136. package/dist/automation/runnerTypes.d.ts +46 -0
  137. package/dist/automation/runnerTypes.d.ts.map +1 -0
  138. package/dist/automation/runnerTypes.js +5 -0
  139. package/dist/automation/runnerTypes.js.map +1 -0
  140. package/dist/automation/scheduler.d.ts +75 -0
  141. package/dist/automation/scheduler.d.ts.map +1 -0
  142. package/dist/automation/scheduler.js +394 -0
  143. package/dist/automation/scheduler.js.map +1 -0
  144. package/dist/cli/promptHandler.d.ts +13 -0
  145. package/dist/cli/promptHandler.d.ts.map +1 -0
  146. package/dist/cli/promptHandler.js +189 -0
  147. package/dist/cli/promptHandler.js.map +1 -0
  148. package/dist/cli.d.ts +3 -0
  149. package/dist/cli.d.ts.map +1 -0
  150. package/dist/cli.js +138 -0
  151. package/dist/cli.js.map +1 -0
  152. package/dist/core/config.d.ts +308 -0
  153. package/dist/core/config.d.ts.map +1 -0
  154. package/dist/core/config.js +529 -0
  155. package/dist/core/config.js.map +1 -0
  156. package/dist/core/eventHub.d.ts +194 -0
  157. package/dist/core/eventHub.d.ts.map +1 -0
  158. package/dist/core/eventHub.js +136 -0
  159. package/dist/core/eventHub.js.map +1 -0
  160. package/dist/core/index.d.ts +6 -0
  161. package/dist/core/index.d.ts.map +1 -0
  162. package/dist/core/index.js +6 -0
  163. package/dist/core/index.js.map +1 -0
  164. package/dist/core/service.d.ts +27 -0
  165. package/dist/core/service.d.ts.map +1 -0
  166. package/dist/core/service.js +438 -0
  167. package/dist/core/service.js.map +1 -0
  168. package/dist/core/traceCollector.d.ts +105 -0
  169. package/dist/core/traceCollector.d.ts.map +1 -0
  170. package/dist/core/traceCollector.js +141 -0
  171. package/dist/core/traceCollector.js.map +1 -0
  172. package/dist/core/types.d.ts +413 -0
  173. package/dist/core/types.d.ts.map +1 -0
  174. package/dist/core/types.js +5 -0
  175. package/dist/core/types.js.map +1 -0
  176. package/dist/discord/discordCore.d.ts +104 -0
  177. package/dist/discord/discordCore.d.ts.map +1 -0
  178. package/dist/discord/discordCore.js +698 -0
  179. package/dist/discord/discordCore.js.map +1 -0
  180. package/dist/discord/discordHandlers.d.ts +86 -0
  181. package/dist/discord/discordHandlers.d.ts.map +1 -0
  182. package/dist/discord/discordHandlers.js +849 -0
  183. package/dist/discord/discordHandlers.js.map +1 -0
  184. package/dist/discord/discordPair.d.ts +6 -0
  185. package/dist/discord/discordPair.d.ts.map +1 -0
  186. package/dist/discord/discordPair.js +567 -0
  187. package/dist/discord/discordPair.js.map +1 -0
  188. package/dist/discord/index.d.ts +4 -0
  189. package/dist/discord/index.d.ts.map +1 -0
  190. package/dist/discord/index.js +11 -0
  191. package/dist/discord/index.js.map +1 -0
  192. package/dist/github/github.d.ts +236 -0
  193. package/dist/github/github.d.ts.map +1 -0
  194. package/dist/github/github.js +535 -0
  195. package/dist/github/github.js.map +1 -0
  196. package/dist/github/index.d.ts +2 -0
  197. package/dist/github/index.d.ts.map +1 -0
  198. package/dist/github/index.js +2 -0
  199. package/dist/github/index.js.map +1 -0
  200. package/dist/index.d.ts +3 -0
  201. package/dist/index.d.ts.map +1 -0
  202. package/dist/index.js +60 -0
  203. package/dist/index.js.map +1 -0
  204. package/dist/knowledge/analyzer.d.ts +36 -0
  205. package/dist/knowledge/analyzer.d.ts.map +1 -0
  206. package/dist/knowledge/analyzer.js +170 -0
  207. package/dist/knowledge/analyzer.js.map +1 -0
  208. package/dist/knowledge/gitInfo.d.ts +10 -0
  209. package/dist/knowledge/gitInfo.d.ts.map +1 -0
  210. package/dist/knowledge/gitInfo.js +134 -0
  211. package/dist/knowledge/gitInfo.js.map +1 -0
  212. package/dist/knowledge/graph.d.ts +45 -0
  213. package/dist/knowledge/graph.d.ts.map +1 -0
  214. package/dist/knowledge/graph.js +262 -0
  215. package/dist/knowledge/graph.js.map +1 -0
  216. package/dist/knowledge/graphqlExporter.d.ts +64 -0
  217. package/dist/knowledge/graphqlExporter.d.ts.map +1 -0
  218. package/dist/knowledge/graphqlExporter.js +333 -0
  219. package/dist/knowledge/graphqlExporter.js.map +1 -0
  220. package/dist/knowledge/index.d.ts +58 -0
  221. package/dist/knowledge/index.d.ts.map +1 -0
  222. package/dist/knowledge/index.js +212 -0
  223. package/dist/knowledge/index.js.map +1 -0
  224. package/dist/knowledge/repository.d.ts +64 -0
  225. package/dist/knowledge/repository.d.ts.map +1 -0
  226. package/dist/knowledge/repository.js +250 -0
  227. package/dist/knowledge/repository.js.map +1 -0
  228. package/dist/knowledge/riskOnAnalyzer.d.ts +79 -0
  229. package/dist/knowledge/riskOnAnalyzer.d.ts.map +1 -0
  230. package/dist/knowledge/riskOnAnalyzer.js +243 -0
  231. package/dist/knowledge/riskOnAnalyzer.js.map +1 -0
  232. package/dist/knowledge/scanner.d.ts +14 -0
  233. package/dist/knowledge/scanner.d.ts.map +1 -0
  234. package/dist/knowledge/scanner.js +350 -0
  235. package/dist/knowledge/scanner.js.map +1 -0
  236. package/dist/knowledge/store.d.ts +23 -0
  237. package/dist/knowledge/store.d.ts.map +1 -0
  238. package/dist/knowledge/store.js +86 -0
  239. package/dist/knowledge/store.js.map +1 -0
  240. package/dist/knowledge/types.d.ts +288 -0
  241. package/dist/knowledge/types.d.ts.map +1 -0
  242. package/dist/knowledge/types.js +111 -0
  243. package/dist/knowledge/types.js.map +1 -0
  244. package/dist/linear/index.d.ts +3 -0
  245. package/dist/linear/index.d.ts.map +1 -0
  246. package/dist/linear/index.js +3 -0
  247. package/dist/linear/index.js.map +1 -0
  248. package/dist/linear/linear.d.ts +160 -0
  249. package/dist/linear/linear.d.ts.map +1 -0
  250. package/dist/linear/linear.js +983 -0
  251. package/dist/linear/linear.js.map +1 -0
  252. package/dist/linear/projectUpdater.d.ts +23 -0
  253. package/dist/linear/projectUpdater.d.ts.map +1 -0
  254. package/dist/linear/projectUpdater.js +347 -0
  255. package/dist/linear/projectUpdater.js.map +1 -0
  256. package/dist/locale/en.d.ts +3 -0
  257. package/dist/locale/en.d.ts.map +1 -0
  258. package/dist/locale/en.js +436 -0
  259. package/dist/locale/en.js.map +1 -0
  260. package/dist/locale/index.d.ts +28 -0
  261. package/dist/locale/index.d.ts.map +1 -0
  262. package/dist/locale/index.js +89 -0
  263. package/dist/locale/index.js.map +1 -0
  264. package/dist/locale/ko.d.ts +3 -0
  265. package/dist/locale/ko.d.ts.map +1 -0
  266. package/dist/locale/ko.js +436 -0
  267. package/dist/locale/ko.js.map +1 -0
  268. package/dist/locale/prompts/en.d.ts +3 -0
  269. package/dist/locale/prompts/en.d.ts.map +1 -0
  270. package/dist/locale/prompts/en.js +278 -0
  271. package/dist/locale/prompts/en.js.map +1 -0
  272. package/dist/locale/prompts/ko.d.ts +3 -0
  273. package/dist/locale/prompts/ko.d.ts.map +1 -0
  274. package/dist/locale/prompts/ko.js +279 -0
  275. package/dist/locale/prompts/ko.js.map +1 -0
  276. package/dist/locale/types.d.ts +407 -0
  277. package/dist/locale/types.d.ts.map +1 -0
  278. package/dist/locale/types.js +5 -0
  279. package/dist/locale/types.js.map +1 -0
  280. package/dist/memory/codex.d.ts +93 -0
  281. package/dist/memory/codex.d.ts.map +1 -0
  282. package/dist/memory/codex.js +366 -0
  283. package/dist/memory/codex.js.map +1 -0
  284. package/dist/memory/compaction.d.ts +21 -0
  285. package/dist/memory/compaction.d.ts.map +1 -0
  286. package/dist/memory/compaction.js +205 -0
  287. package/dist/memory/compaction.js.map +1 -0
  288. package/dist/memory/index.d.ts +13 -0
  289. package/dist/memory/index.d.ts.map +1 -0
  290. package/dist/memory/index.js +13 -0
  291. package/dist/memory/index.js.map +1 -0
  292. package/dist/memory/memoryCore.d.ts +178 -0
  293. package/dist/memory/memoryCore.d.ts.map +1 -0
  294. package/dist/memory/memoryCore.js +623 -0
  295. package/dist/memory/memoryCore.js.map +1 -0
  296. package/dist/memory/memoryOps.d.ts +90 -0
  297. package/dist/memory/memoryOps.d.ts.map +1 -0
  298. package/dist/memory/memoryOps.js +606 -0
  299. package/dist/memory/memoryOps.js.map +1 -0
  300. package/dist/orchestration/conflictDetector.d.ts +15 -0
  301. package/dist/orchestration/conflictDetector.d.ts.map +1 -0
  302. package/dist/orchestration/conflictDetector.js +130 -0
  303. package/dist/orchestration/conflictDetector.js.map +1 -0
  304. package/dist/orchestration/decisionEngine.d.ts +177 -0
  305. package/dist/orchestration/decisionEngine.d.ts.map +1 -0
  306. package/dist/orchestration/decisionEngine.js +496 -0
  307. package/dist/orchestration/decisionEngine.js.map +1 -0
  308. package/dist/orchestration/index.d.ts +5 -0
  309. package/dist/orchestration/index.d.ts.map +1 -0
  310. package/dist/orchestration/index.js +5 -0
  311. package/dist/orchestration/index.js.map +1 -0
  312. package/dist/orchestration/taskParser.d.ts +67 -0
  313. package/dist/orchestration/taskParser.d.ts.map +1 -0
  314. package/dist/orchestration/taskParser.js +542 -0
  315. package/dist/orchestration/taskParser.js.map +1 -0
  316. package/dist/orchestration/taskScheduler.d.ts +141 -0
  317. package/dist/orchestration/taskScheduler.d.ts.map +1 -0
  318. package/dist/orchestration/taskScheduler.js +317 -0
  319. package/dist/orchestration/taskScheduler.js.map +1 -0
  320. package/dist/orchestration/workflow.d.ts +145 -0
  321. package/dist/orchestration/workflow.d.ts.map +1 -0
  322. package/dist/orchestration/workflow.js +301 -0
  323. package/dist/orchestration/workflow.js.map +1 -0
  324. package/dist/runners/cliRunner.d.ts +11 -0
  325. package/dist/runners/cliRunner.d.ts.map +1 -0
  326. package/dist/runners/cliRunner.js +194 -0
  327. package/dist/runners/cliRunner.js.map +1 -0
  328. package/dist/support/apiCache.d.ts +85 -0
  329. package/dist/support/apiCache.d.ts.map +1 -0
  330. package/dist/support/apiCache.js +163 -0
  331. package/dist/support/apiCache.js.map +1 -0
  332. package/dist/support/chat.d.ts +3 -0
  333. package/dist/support/chat.d.ts.map +1 -0
  334. package/dist/support/chat.js +304 -0
  335. package/dist/support/chat.js.map +1 -0
  336. package/dist/support/chatBackend.d.ts +25 -0
  337. package/dist/support/chatBackend.d.ts.map +1 -0
  338. package/dist/support/chatBackend.js +235 -0
  339. package/dist/support/chatBackend.js.map +1 -0
  340. package/dist/support/chatMemory.d.ts +71 -0
  341. package/dist/support/chatMemory.d.ts.map +1 -0
  342. package/dist/support/chatMemory.js +119 -0
  343. package/dist/support/chatMemory.js.map +1 -0
  344. package/dist/support/chatTui.d.ts +3 -0
  345. package/dist/support/chatTui.d.ts.map +1 -0
  346. package/dist/support/chatTui.js +998 -0
  347. package/dist/support/chatTui.js.map +1 -0
  348. package/dist/support/costTracker.d.ts +29 -0
  349. package/dist/support/costTracker.d.ts.map +1 -0
  350. package/dist/support/costTracker.js +113 -0
  351. package/dist/support/costTracker.js.map +1 -0
  352. package/dist/support/dashboardHtml.d.ts +3 -0
  353. package/dist/support/dashboardHtml.d.ts.map +1 -0
  354. package/dist/support/dashboardHtml.js +2070 -0
  355. package/dist/support/dashboardHtml.js.map +1 -0
  356. package/dist/support/delete-beliefs.d.ts +2 -0
  357. package/dist/support/delete-beliefs.d.ts.map +1 -0
  358. package/dist/support/delete-beliefs.js +34 -0
  359. package/dist/support/delete-beliefs.js.map +1 -0
  360. package/dist/support/dev.d.ts +55 -0
  361. package/dist/support/dev.d.ts.map +1 -0
  362. package/dist/support/dev.js +298 -0
  363. package/dist/support/dev.js.map +1 -0
  364. package/dist/support/editParser.d.ts +37 -0
  365. package/dist/support/editParser.d.ts.map +1 -0
  366. package/dist/support/editParser.js +365 -0
  367. package/dist/support/editParser.js.map +1 -0
  368. package/dist/support/gitStatus.d.ts +21 -0
  369. package/dist/support/gitStatus.d.ts.map +1 -0
  370. package/dist/support/gitStatus.js +108 -0
  371. package/dist/support/gitStatus.js.map +1 -0
  372. package/dist/support/gitTracker.d.ts +30 -0
  373. package/dist/support/gitTracker.d.ts.map +1 -0
  374. package/dist/support/gitTracker.js +143 -0
  375. package/dist/support/gitTracker.js.map +1 -0
  376. package/dist/support/index.d.ts +13 -0
  377. package/dist/support/index.d.ts.map +1 -0
  378. package/dist/support/index.js +13 -0
  379. package/dist/support/index.js.map +1 -0
  380. package/dist/support/planner.d.ts +58 -0
  381. package/dist/support/planner.d.ts.map +1 -0
  382. package/dist/support/planner.js +395 -0
  383. package/dist/support/planner.js.map +1 -0
  384. package/dist/support/projectMapper.d.ts +46 -0
  385. package/dist/support/projectMapper.d.ts.map +1 -0
  386. package/dist/support/projectMapper.js +259 -0
  387. package/dist/support/projectMapper.js.map +1 -0
  388. package/dist/support/quotaTracker.d.ts +29 -0
  389. package/dist/support/quotaTracker.d.ts.map +1 -0
  390. package/dist/support/quotaTracker.js +89 -0
  391. package/dist/support/quotaTracker.js.map +1 -0
  392. package/dist/support/rateLimiter.d.ts +101 -0
  393. package/dist/support/rateLimiter.d.ts.map +1 -0
  394. package/dist/support/rateLimiter.js +219 -0
  395. package/dist/support/rateLimiter.js.map +1 -0
  396. package/dist/support/rollback.d.ts +61 -0
  397. package/dist/support/rollback.d.ts.map +1 -0
  398. package/dist/support/rollback.js +328 -0
  399. package/dist/support/rollback.js.map +1 -0
  400. package/dist/support/stuckDetector.d.ts +68 -0
  401. package/dist/support/stuckDetector.d.ts.map +1 -0
  402. package/dist/support/stuckDetector.js +174 -0
  403. package/dist/support/stuckDetector.js.map +1 -0
  404. package/dist/support/timeWindow.d.ts +60 -0
  405. package/dist/support/timeWindow.d.ts.map +1 -0
  406. package/dist/support/timeWindow.js +236 -0
  407. package/dist/support/timeWindow.js.map +1 -0
  408. package/dist/support/web.d.ts +11 -0
  409. package/dist/support/web.d.ts.map +1 -0
  410. package/dist/support/web.js +938 -0
  411. package/dist/support/web.js.map +1 -0
  412. package/dist/support/workflowLinear.d.ts +99 -0
  413. package/dist/support/workflowLinear.d.ts.map +1 -0
  414. package/dist/support/workflowLinear.js +257 -0
  415. package/dist/support/workflowLinear.js.map +1 -0
  416. package/dist/support/worktreeManager.d.ts +20 -0
  417. package/dist/support/worktreeManager.d.ts.map +1 -0
  418. package/dist/support/worktreeManager.js +144 -0
  419. package/dist/support/worktreeManager.js.map +1 -0
  420. package/dist/taskState/store.d.ts +101 -0
  421. package/dist/taskState/store.d.ts.map +1 -0
  422. package/dist/taskState/store.js +346 -0
  423. package/dist/taskState/store.js.map +1 -0
  424. package/package.json +70 -0
  425. package/templates/AGENTS.md +432 -0
  426. package/templates/BOOT.md +25 -0
  427. package/templates/BOOTSTRAP.md +50 -0
  428. package/templates/CHANGELOG_AUDIT.md +74 -0
  429. package/templates/HEARTBEAT.md +86 -0
  430. package/templates/IDENTITY.md +27 -0
  431. package/templates/ISSUE_ANALYSIS.md +31 -0
  432. package/templates/PR_LAND.md +75 -0
  433. package/templates/PR_REVIEW.md +97 -0
  434. package/templates/SOUL.dev.md +52 -0
  435. package/templates/SOUL.md +81 -0
  436. package/templates/TOOLS.md +52 -0
  437. package/templates/USER.md +22 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Intrect
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,544 @@
1
+ # OpenSwarm
2
+
3
+ > Autonomous AI agent orchestrator powered by Claude Code CLI
4
+
5
+ OpenSwarm orchestrates multiple Claude Code instances as autonomous agents. It picks up Linear issues, runs Worker/Reviewer pair pipelines to produce code changes, reports progress to Discord, and retains long-term memory via LanceDB vector embeddings.
6
+
7
+ ## 📸 Demo
8
+
9
+ ### Web Dashboard (Port 3847)
10
+
11
+ ![OpenSwarm Dashboard](screenshots/dashboard-main.png)
12
+
13
+ Real-time supervisor dashboard with repository status, pipeline events, live logs, PR processor, and agent chat.
14
+
15
+ ### CLI Chat Interface
16
+
17
+ **Rich TUI Mode** (Claude Code inspired):
18
+
19
+ ```bash
20
+ $ openswarm chat --tui
21
+ ```
22
+
23
+ ![TUI Chat Interface](screenshots/tui.png)
24
+
25
+ - Dark theme with Claude Code inspired color palette
26
+ - 5 interactive tabs: Chat, Projects, Tasks, Stuck, Logs
27
+ - Real-time streaming responses with themed loading messages
28
+ - Keyboard shortcuts: Tab (switch tabs), Enter (send), Shift+Enter (newline), Esc (exit input)
29
+ - Session management: auto-save, resume, model switching
30
+ - Status bar: model, message count, cumulative cost
31
+
32
+ **Simple Mode** (readline based):
33
+
34
+ ```bash
35
+ $ openswarm chat [session-name]
36
+
37
+ ╔════════════════════════════════════╗
38
+ ║ Swarm Chat sonnet-4-5 ║
39
+ ╚════════════════════════════════════╝
40
+ demo | /help | Ctrl+D exit
41
+
42
+ you What are the main components of OpenSwarm?
43
+ assistant OpenSwarm has 9 main architectural layers... ($0.0023)
44
+
45
+ you /model haiku
46
+ Model: claude-haiku-4-5-20251001
47
+
48
+ you /save openswarm-overview
49
+ Saved: openswarm-overview
50
+ ```
51
+
52
+ **Commands**: `/clear`, `/model <name>`, `/save [name]`, `/help`
53
+
54
+ ## Architecture
55
+
56
+ ```
57
+ ┌──────────────────────────┐
58
+ │ Linear API │
59
+ │ (issues, state, memory) │
60
+ └─────────────┬────────────┘
61
+
62
+ ┌─────────────────────┼─────────────────────┐
63
+ │ │ │
64
+ v v v
65
+ ┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
66
+ │ AutonomousRunner │ │ DecisionEngine │ │ TaskScheduler │
67
+ │ (heartbeat loop) │─>│ (scope guard) │─>│ (queue + slots) │
68
+ └────────┬─────────┘ └──────────────────┘ └────────┬─────────┘
69
+ │ │
70
+ v v
71
+ ┌──────────────────────────────────────────────────────────────┐
72
+ │ PairPipeline │
73
+ │ ┌────────┐ ┌──────────┐ ┌────────┐ ┌─────────────┐ │
74
+ │ │ Worker │──>│ Reviewer │──>│ Tester │──>│ Documenter │ │
75
+ │ │(Adapter│<──│(Adapter) │ │(Adapter│ │ (Adapter) │ │
76
+ │ └───┬────┘ └──────────┘ └────────┘ └─────────────┘ │
77
+ │ │ ↕ StuckDetector │
78
+ │ ┌───┴────────────────────────────────────────────────────┐ │
79
+ │ │ CLI Adapters: Claude (`claude -p`) | Codex (`codex`) │ │
80
+ │ └────────────────────────────────────────────────────────┘ │
81
+ └──────────────────────────────────────────────────────────────┘
82
+ │ │ │
83
+ v v v
84
+ ┌──────────────┐ ┌──────────────────┐ ┌──────────────────┐
85
+ │ Discord Bot │ │ Memory (LanceDB │ │ Knowledge Graph │
86
+ │ (commands) │ │ + Xenova E5) │ │ (code analysis) │
87
+ └──────────────┘ └──────────────────┘ └──────────────────┘
88
+ ```
89
+
90
+ ## Features
91
+
92
+ - **Multi-Provider Adapters** - Pluggable CLI adapter system supporting **Claude Code** (`claude -p`) and **OpenAI Codex** (`codex exec`), with runtime provider switching via Discord command
93
+ - **Autonomous Pipeline** - Cron-driven heartbeat fetches Linear issues, runs Worker/Reviewer pair loops, and updates issue state automatically
94
+ - **Worker/Reviewer Pairs** - Multi-iteration code generation with automated review, testing, and documentation stages
95
+ - **Decision Engine** - Scope validation, rate limiting, priority-based task selection, and workflow mapping
96
+ - **Cognitive Memory** - LanceDB vector store with Xenova/multilingual-e5-base embeddings for long-term recall across sessions
97
+ - **Knowledge Graph** - Static code analysis, dependency mapping, impact analysis, and file-level conflict detection across concurrent tasks
98
+ - **Discord Control** - Full command interface for monitoring, task dispatch, scheduling, provider switching, and pair session management
99
+ - **Rich TUI Chat** - Claude Code inspired terminal interface with tabs, streaming responses, and geek-themed loading messages
100
+ - **Dynamic Scheduling** - Cron-based job scheduler with Discord management commands
101
+ - **PR Auto-Improvement** - Monitors open PRs, auto-fixes CI failures, auto-resolves merge conflicts, and retries until all checks pass
102
+ - **Long-Running Monitors** - Track external processes (training jobs, batch tasks) and report completion
103
+ - **Web Dashboard** - Real-time pipeline stages, cost tracking, worktree status, and live logs on port 3847
104
+ - **Pace Control** - 5-hour rolling window task caps, per-project limits, turbo mode, exponential backoff on failures
105
+ - **i18n** - English and Korean locale support
106
+
107
+ ## Prerequisites
108
+
109
+ - **Node.js** >= 22
110
+ - **CLI Provider** (at least one):
111
+ - **Claude Code CLI** installed and authenticated (`claude -p`) — default provider
112
+ - **OpenAI Codex CLI** installed (`codex exec`) — alternative provider
113
+ - **Discord Bot** token with message content intent
114
+ - **Linear** API key and team ID
115
+ - **GitHub CLI** (`gh`) for CI monitoring (optional)
116
+
117
+ ## Installation
118
+
119
+ ```bash
120
+ git clone https://github.com/unohee/OpenSwarm.git
121
+ cd OpenSwarm
122
+ npm install
123
+ ```
124
+
125
+ ## Configuration
126
+
127
+ ```bash
128
+ cp config.example.yaml config.yaml
129
+ ```
130
+
131
+ Create a `.env` file with required secrets:
132
+
133
+ ```bash
134
+ DISCORD_TOKEN=your-discord-bot-token
135
+ DISCORD_CHANNEL_ID=your-channel-id
136
+ LINEAR_API_KEY=your-linear-api-key
137
+ LINEAR_TEAM_ID=your-linear-team-id
138
+ ```
139
+
140
+ `config.yaml` supports environment variable substitution (`${VAR}` or `${VAR:-default}`) and is validated with Zod schemas.
141
+
142
+ ### Key Configuration Sections
143
+
144
+ | Section | Description |
145
+ |---------|-------------|
146
+ | `discord` | Bot token, channel ID, webhook URL |
147
+ | `linear` | API key, team ID |
148
+ | `github` | Repos list for CI monitoring |
149
+ | `agents` | Agent definitions (name, projectPath, heartbeat interval) |
150
+ | `autonomous` | Schedule, pair mode, role models, decomposition settings |
151
+ | `prProcessor` | PR auto-improvement schedule, retry limits, conflict resolver config |
152
+
153
+ ### CLI Adapter (Provider)
154
+
155
+ OpenSwarm supports multiple CLI backends. Set the default in `config.yaml`:
156
+
157
+ ```yaml
158
+ adapter: claude # "claude" (default) or "codex"
159
+ ```
160
+
161
+ Switch at runtime via Discord: `!provider codex` / `!provider claude`
162
+
163
+ | Adapter | CLI Command | Models | Git Management |
164
+ |---------|-------------|--------|----------------|
165
+ | `claude` | `claude -p` | claude-sonnet-4, claude-haiku-4.5, claude-opus-4 | Manual (worker commits) |
166
+ | `codex` | `codex exec` | o3, o4-mini | Auto (`--full-auto`) |
167
+
168
+ Per-role adapter overrides are supported — e.g., use Codex for workers and Claude for reviewers:
169
+
170
+ ```yaml
171
+ autonomous:
172
+ defaultRoles:
173
+ worker:
174
+ adapter: codex
175
+ model: o4-mini
176
+ reviewer:
177
+ adapter: claude
178
+ model: claude-sonnet-4-20250514
179
+ ```
180
+
181
+ ### Agent Roles
182
+
183
+ Each pipeline stage can be configured independently:
184
+
185
+ ```yaml
186
+ autonomous:
187
+ defaultRoles:
188
+ worker:
189
+ model: claude-haiku-4-5-20251001
190
+ escalateModel: claude-sonnet-4-20250514
191
+ escalateAfterIteration: 3
192
+ timeoutMs: 1800000
193
+ reviewer:
194
+ model: claude-haiku-4-5-20251001
195
+ timeoutMs: 600000
196
+ tester:
197
+ enabled: false
198
+ documenter:
199
+ enabled: false
200
+ auditor:
201
+ enabled: false
202
+ ```
203
+
204
+ ## Usage
205
+
206
+ ### CLI Commands
207
+
208
+ ```bash
209
+ # Interactive chat with Claude (TUI mode)
210
+ openswarm chat --tui
211
+
212
+ # Interactive chat (simple readline mode)
213
+ openswarm chat [session-name]
214
+
215
+ # Run a single task (no config needed)
216
+ openswarm run "Fix the login bug" --path ~/my-project
217
+
218
+ # Execute via daemon (auto-starts service if needed)
219
+ openswarm exec "Run tests and fix failures" --worker-only
220
+ openswarm exec "Review all pending PRs" --timeout 300
221
+ openswarm exec "Fix CI" --local --pipeline
222
+
223
+ # Initialize configuration
224
+ openswarm init
225
+
226
+ # Validate configuration
227
+ openswarm validate
228
+
229
+ # Start the full daemon
230
+ openswarm start
231
+ ```
232
+
233
+ #### `openswarm exec` Options
234
+
235
+ | Option | Description |
236
+ |--------|-------------|
237
+ | `--path <path>` | Project path (default: cwd) |
238
+ | `--timeout <seconds>` | Timeout in seconds (default: 600) |
239
+ | `--no-auto-start` | Do not auto-start the service |
240
+ | `--local` | Execute locally without daemon |
241
+ | `--pipeline` | Full pipeline: worker + reviewer + tester + documenter |
242
+ | `--worker-only` | Worker only, no review |
243
+ | `-m, --model <model>` | Model override for worker |
244
+
245
+ Exit codes: `0` (success), `1` (failure), `2` (timeout).
246
+
247
+ ### Running the Service
248
+
249
+ #### macOS launchd Service (Recommended)
250
+
251
+ **Installation:**
252
+ ```bash
253
+ # Build and install as a system service
254
+ npm run service:install
255
+ ```
256
+
257
+ **Service Management:**
258
+ ```bash
259
+ npm run service:start # Start service
260
+ npm run service:stop # Stop service
261
+ npm run service:restart # Restart service
262
+ npm run service:status # View status and recent logs
263
+ npm run service:logs # View stdout logs (follow mode)
264
+ npm run service:errors # View stderr logs (follow mode)
265
+ npm run service:uninstall # Uninstall service
266
+ ```
267
+
268
+ **Browser Auto-Launch (Optional):**
269
+ ```bash
270
+ npm run browser:install # Auto-open dashboard on boot
271
+ npm run browser:uninstall # Disable auto-open
272
+ ```
273
+
274
+ The service will:
275
+ - Auto-start on system boot
276
+ - Auto-restart on crash
277
+ - Log to `~/.openswarm/logs/`
278
+ - Run with your user permissions (access to Claude CLI, gh, local files)
279
+ - (Optional) Open web dashboard at http://localhost:3847 on boot
280
+
281
+ #### Manual Execution
282
+
283
+ ```bash
284
+ # Development
285
+ npm run dev
286
+
287
+ # Production
288
+ npm run build
289
+ npm start
290
+
291
+ # Background (legacy)
292
+ nohup npm start > openswarm.log 2>&1 &
293
+ ```
294
+
295
+ #### Docker
296
+
297
+ ```bash
298
+ docker compose up -d
299
+ ```
300
+
301
+ ### Shell Helper (optional)
302
+
303
+ Add to `~/.zshrc` or `~/.bashrc`:
304
+
305
+ ```bash
306
+ openswarm() {
307
+ case "$1" in
308
+ start)
309
+ cd /path/to/OpenSwarm && nohup npm start > ~/.openswarm/log 2>&1 &
310
+ echo "✅ Started (PID: $!)"
311
+ ;;
312
+ stop)
313
+ pkill -f "openswarm" && echo "✅ Stopped"
314
+ ;;
315
+ status)
316
+ pgrep -f "openswarm" && echo "✅ Running" || echo "❌ Stopped"
317
+ ;;
318
+ chat)
319
+ cd /path/to/OpenSwarm && node --import=tsx src/cli.ts chat "${@:2}"
320
+ ;;
321
+ esac
322
+ }
323
+ ```
324
+
325
+ ## Project Structure
326
+
327
+ ```
328
+ src/
329
+ ├── index.ts # Entry point
330
+ ├── cli.ts # CLI entry point (run, exec, chat, init, validate, start)
331
+ ├── cli/ # CLI subcommand handlers
332
+ │ └── promptHandler.ts # `exec` command: daemon submit, auto-start, polling
333
+ ├── core/ # Config, service lifecycle, types, event hub
334
+ ├── adapters/ # CLI provider adapters (claude, codex), process registry
335
+ ├── agents/ # Worker, reviewer, tester, documenter, auditor
336
+ │ ├── pairPipeline.ts # Worker → Reviewer → Tester → Documenter pipeline
337
+ │ ├── agentBus.ts # Inter-agent message bus
338
+ │ └── cliStreamParser.ts # Claude CLI output parser
339
+ ├── orchestration/ # Decision engine, task parser, scheduler, workflow
340
+ ├── automation/ # Autonomous runner, cron scheduler, PR processor
341
+ │ ├── autonomousRunner.ts # Cron-driven heartbeat and task dispatch
342
+ │ ├── prProcessor.ts # PR auto-improvement (CI fixes, conflict resolution)
343
+ │ ├── conflictResolver.ts # AI-powered merge conflict resolution
344
+ │ ├── prOwnership.ts # Bot PR tracking for conflict resolution
345
+ │ ├── longRunningMonitor.ts# External process monitoring
346
+ │ └── runnerState.ts # Persistent pipeline state
347
+ ├── memory/ # LanceDB + Xenova embeddings cognitive memory
348
+ ├── knowledge/ # Code knowledge graph (scanner, analyzer, graph)
349
+ ├── discord/ # Bot core, command handlers, pair session UI
350
+ ├── linear/ # Linear SDK wrapper, project updater
351
+ ├── github/ # GitHub CLI wrapper for CI monitoring
352
+ ├── support/ # Web dashboard, planner, rollback, git tools
353
+ ├── locale/ # i18n (en/ko) with prompt templates
354
+ └── __tests__/ # Vitest test suite
355
+ ```
356
+
357
+ ## Discord Commands
358
+
359
+ ### Task Dispatch
360
+ | Command | Description |
361
+ |---------|-------------|
362
+ | `!dev <repo> "<task>"` | Run a dev task on a repository |
363
+ | `!dev list` | List known repositories |
364
+ | `!tasks` | List running tasks |
365
+ | `!cancel <taskId>` | Cancel a running task |
366
+
367
+ ### Agent Management
368
+ | Command | Description |
369
+ |---------|-------------|
370
+ | `!status` | Agent and system status |
371
+ | `!pause <session>` | Pause autonomous work |
372
+ | `!resume <session>` | Resume autonomous work |
373
+ | `!log <session> [lines]` | View recent output |
374
+
375
+ ### Linear Integration
376
+ | Command | Description |
377
+ |---------|-------------|
378
+ | `!issues` | List Linear issues |
379
+ | `!issue <id>` | View issue details |
380
+ | `!limits` | Agent daily execution limits |
381
+
382
+ ### Autonomous Execution
383
+ | Command | Description |
384
+ |---------|-------------|
385
+ | `!auto` | Execution status |
386
+ | `!auto start [cron] [--pair]` | Start autonomous mode |
387
+ | `!auto stop` | Stop autonomous mode |
388
+ | `!auto run` | Trigger immediate heartbeat |
389
+ | `!approve` / `!reject` | Approve or reject pending task |
390
+
391
+ ### Worker/Reviewer Pair
392
+ | Command | Description |
393
+ |---------|-------------|
394
+ | `!pair` | Pair session status |
395
+ | `!pair start [taskId]` | Start a pair session |
396
+ | `!pair run <taskId> [project]` | Direct pair run |
397
+ | `!pair stop [sessionId]` | Stop a pair session |
398
+ | `!pair history [n]` | View session history |
399
+ | `!pair stats` | View pair statistics |
400
+
401
+ ### Scheduling
402
+ | Command | Description |
403
+ |---------|-------------|
404
+ | `!schedule` | List all schedules |
405
+ | `!schedule run <name>` | Run a schedule immediately |
406
+ | `!schedule toggle <name>` | Enable/disable a schedule |
407
+ | `!schedule add <name> <path> <interval> "<prompt>"` | Add a schedule |
408
+ | `!schedule remove <name>` | Remove a schedule |
409
+
410
+ ### Other
411
+ | Command | Description |
412
+ |---------|-------------|
413
+ | `!ci` | GitHub CI failure status |
414
+ | `!provider <claude\|codex>` | Switch CLI provider at runtime |
415
+ | `!codex` | Recent session records |
416
+ | `!memory search "<query>"` | Search cognitive memory |
417
+ | `!help` | Full command reference |
418
+
419
+ ## How It Works
420
+
421
+ ### Issue Processing Flow
422
+
423
+ ```
424
+ Linear (Todo/In Progress)
425
+ → Fetch assigned issues
426
+ → DecisionEngine filters & prioritizes
427
+ → Resolve project path via projectMapper
428
+ → PairPipeline.run()
429
+ → Worker generates code (Claude CLI)
430
+ → Reviewer evaluates (APPROVE/REVISE/REJECT)
431
+ → Loop up to N iterations
432
+ → Optional: Tester → Documenter stages
433
+ → Update Linear issue state (Done/Blocked)
434
+ → Report to Discord
435
+ → Save to cognitive memory
436
+ ```
437
+
438
+ ### Memory System
439
+
440
+ Hybrid retrieval scoring: `0.55 * similarity + 0.20 * importance + 0.15 * recency + 0.10 * frequency`
441
+
442
+ Memory types: `belief`, `strategy`, `user_model`, `system_pattern`, `constraint`
443
+
444
+ Background cognition: decay, consolidation, contradiction detection, and distillation (noise filtering).
445
+
446
+ ## `@intrect/claude-driver` (npm 패키지)
447
+
448
+ OpenSwarm의 Claude CLI 스폰 + 스트리밍 파싱 로직을 독립 패키지로 추출했습니다. 다른 프로젝트에서 OpenSwarm 없이 바로 사용할 수 있습니다.
449
+
450
+ ```bash
451
+ npm install @intrect/claude-driver
452
+ ```
453
+
454
+ ### 기본 사용법
455
+
456
+ ```ts
457
+ import { run } from '@intrect/claude-driver';
458
+
459
+ const result = await run({
460
+ prompt: 'Fix the bug in src/app.ts',
461
+ cwd: '/my/project',
462
+ });
463
+ console.log(result.response); // 어시스턴트 응답
464
+ console.log(result.cost); // "$0.03 | 1.2k in / 800 out | 12.3s"
465
+ ```
466
+
467
+ ### 어댑터 직접 사용 (mid-level)
468
+
469
+ ```ts
470
+ import { spawnCli, ClaudeCliAdapter } from '@intrect/claude-driver';
471
+
472
+ const adapter = new ClaudeCliAdapter();
473
+ const raw = await spawnCli(adapter, {
474
+ prompt: 'Explain this code',
475
+ cwd: '/my/project',
476
+ onLog: (line) => process.stdout.write(line),
477
+ });
478
+ ```
479
+
480
+ ### 파서만 사용 (low-level)
481
+
482
+ ```ts
483
+ import {
484
+ parseCliStreamChunk,
485
+ extractResultFromStreamJson,
486
+ extractCostFromStreamJson,
487
+ } from '@intrect/claude-driver';
488
+ ```
489
+
490
+ ### 공개 API
491
+
492
+ | 모듈 | 내보내는 것 |
493
+ |------|------------|
494
+ | 고수준 | `run()`, `inferProviderFromModel()` |
495
+ | 중간 수준 | `spawnCli()` |
496
+ | 어댑터 | `ClaudeCliAdapter`, `CodexCliAdapter`, `getAdapter()`, `setDefaultAdapter()` |
497
+ | 스트림 파서 | `parseCliStreamChunk()`, `extractResultFromStreamJson()` |
498
+ | 비용 파서 | `extractCostFromStreamJson()`, `aggregateCosts()`, `formatCost()` |
499
+ | 버퍼 | `SmartStreamBuffer` |
500
+
501
+ - **런타임 의존성 0개** — ESM 전용, Node.js 20+
502
+ - **타입 완전 지원** — TypeScript 타입 포함
503
+ - **멀티 프로바이더** — Claude CLI와 Codex CLI 모두 지원
504
+ - 소스: [`packages/claude-driver/`](packages/claude-driver/)
505
+
506
+ ---
507
+
508
+ ## Tech Stack
509
+
510
+ | Category | Technology |
511
+ |----------|-----------|
512
+ | Runtime | Node.js 22+ (ESM) |
513
+ | Language | TypeScript (strict mode) |
514
+ | Build | tsc |
515
+ | Agent Execution | Claude Code CLI (`claude -p`) or OpenAI Codex CLI (`codex exec`) via pluggable adapters |
516
+ | Task Management | Linear SDK (`@linear/sdk`) |
517
+ | Communication | Discord.js 14 |
518
+ | Vector DB | LanceDB + Apache Arrow |
519
+ | Embeddings | Xenova/transformers (multilingual-e5-base, 768D) |
520
+ | Scheduling | Croner |
521
+ | Config | YAML + Zod validation |
522
+ | Linting | oxlint |
523
+ | Testing | Vitest |
524
+
525
+ ## State & Data
526
+
527
+ | Path | Description |
528
+ |------|-------------|
529
+ | `~/.openswarm/` | State directory (memory, codex, metrics, workflows, etc.) |
530
+ | `~/.claude/openswarm-*.json` | Pipeline history and task state |
531
+ | `config.yaml` | Main configuration |
532
+ | `dist/` | Compiled output |
533
+
534
+ ## Docker
535
+
536
+ ```bash
537
+ docker compose up -d
538
+ ```
539
+
540
+ The Docker setup includes volume mounts for `~/.openswarm/` state persistence and `.env` for secrets.
541
+
542
+ ## License
543
+
544
+ MIT
@@ -0,0 +1,107 @@
1
+ # OpenSwarm Configuration
2
+ # Environment variables can be used in ${VAR_NAME} or ${VAR_NAME:-default} format
3
+ # Copy this file to config.yaml to use
4
+
5
+ # Default CLI adapter for worker/reviewer stages
6
+ adapter: claude
7
+
8
+ discord:
9
+ token: ${DISCORD_TOKEN}
10
+ channelId: ${DISCORD_CHANNEL_ID}
11
+ webhookUrl: ${DISCORD_WEBHOOK_URL:-} # Optional
12
+
13
+ linear:
14
+ apiKey: ${LINEAR_API_KEY}
15
+ teamId: ${LINEAR_TEAM_ID}
16
+
17
+ github:
18
+ repos:
19
+ - unohee/OpenSwarm # owner/repo format
20
+ checkInterval: 300000 # 5 minutes (ms)
21
+
22
+ # Agent list
23
+ agents:
24
+ - name: main
25
+ projectPath: ~/dev/OpenSwarm
26
+ heartbeatInterval: 1800000 # 30 minutes (ms)
27
+ linearLabel: main # Label for Linear issue filtering
28
+ enabled: true
29
+ paused: false
30
+
31
+ # Default heartbeat interval (ms)
32
+ defaultHeartbeatInterval: 1800000 # 30 minutes
33
+
34
+ # Autonomous execution mode settings
35
+ autonomous:
36
+ enabled: true
37
+ pairMode: true
38
+ schedule: "*/15 * * * *" # Every 15 minutes
39
+ maxAttempts: 3
40
+ maxConcurrentTasks: 4 # Number of concurrent tasks
41
+
42
+ allowedProjects:
43
+ - ~/dev/OpenSwarm
44
+
45
+ # Task decomposition settings (Planner Agent)
46
+ decomposition:
47
+ enabled: true # Enable decomposition
48
+ thresholdMinutes: 30 # Decompose if estimated time exceeds this
49
+ plannerModel: claude-sonnet-4-20250514 # Planner model
50
+
51
+ # Per-role settings
52
+ defaultRoles:
53
+ worker:
54
+ enabled: true
55
+ model: claude-haiku-4-5-20251001 # Default: Haiku (low cost)
56
+ escalateModel: claude-sonnet-4-20250514 # On failure: Sonnet
57
+ escalateAfterIteration: 3 # Escalate from 3rd iteration
58
+ timeoutMs: 1800000 # 30 minutes
59
+ reviewer:
60
+ enabled: true
61
+ model: claude-haiku-4-5-20251001
62
+ timeoutMs: 600000 # 10 minutes
63
+ tester:
64
+ enabled: false
65
+ documenter:
66
+ enabled: false
67
+ auditor:
68
+ enabled: false
69
+ model: claude-haiku-4-5-20251001
70
+ timeoutMs: 300000 # 5 minutes
71
+ skill-documenter:
72
+ enabled: false
73
+ model: claude-haiku-4-5-20251001
74
+ timeoutMs: 120000 # 2 minutes
75
+
76
+ # Job profiles for lightweight vs heavy work
77
+ jobProfiles:
78
+ - name: quick-analysis
79
+ maxMinutes: 15
80
+ roles:
81
+ worker: claude-haiku-4-5-20251001
82
+ - name: deep-engineering
83
+ minMinutes: 16
84
+ roles:
85
+ worker: claude-sonnet-4-20250514
86
+ reviewer: claude-sonnet-4-20250514
87
+
88
+ # Long-running task monitoring (RunPod training, batch processing, etc.)
89
+ # monitors:
90
+ # - id: runpod-training
91
+ # name: "LSTM model training"
92
+ # issueId: INT-456
93
+ # checkCommand: 'ssh runpod "tail -1 /workspace/train.log"'
94
+ # completionCheck:
95
+ # type: output-regex
96
+ # successPattern: "Training finished"
97
+ # failurePattern: "Error|FAILED"
98
+ # checkInterval: 2 # Every 2 heartbeats
99
+ # maxDurationHours: 24
100
+ # notify: true
101
+
102
+ # PR Auto-Improvement
103
+ prProcessor:
104
+ enabled: true
105
+ schedule: "*/15 * * * *" # Check every 15 minutes
106
+ cooldownHours: 6 # Wait 6 hours after processing
107
+ maxIterations: 3 # Max 3 Worker-Reviewer iterations
@@ -0,0 +1,8 @@
1
+ import type { CliAdapter, CliRunOptions, CliRunResult } from './types.js';
2
+ /**
3
+ * Spawn a CLI process using the given adapter and options.
4
+ * Handles: temp file write, spawn with shell, timeout/SIGKILL,
5
+ * stdout/stderr buffering, stream parsing via onLog, cleanup.
6
+ */
7
+ export declare function spawnCli(adapter: CliAdapter, options: CliRunOptions): Promise<CliRunResult>;
8
+ //# sourceMappingURL=base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/adapters/base.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI1E;;;;GAIG;AACH,wBAAsB,QAAQ,CAC5B,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,YAAY,CAAC,CAkGvB"}