@hoknie/aip 0.0.0-stage → 0.1.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 (1081) hide show
  1. package/.claude-plugin/marketplace.json +13 -0
  2. package/README.md +74 -2
  3. package/dist/app/agents.js +18 -0
  4. package/dist/app/agents.js.map +1 -0
  5. package/dist/app/application.js +173 -0
  6. package/dist/app/application.js.map +1 -0
  7. package/dist/app/daemon.js +71 -0
  8. package/dist/app/daemon.js.map +1 -0
  9. package/dist/app/index.js +5 -0
  10. package/dist/app/index.js.map +1 -0
  11. package/dist/app/lifecycle.js +30 -0
  12. package/dist/app/lifecycle.js.map +1 -0
  13. package/dist/app/maintenance.js +27 -0
  14. package/dist/app/maintenance.js.map +1 -0
  15. package/dist/app/timings.js +23 -0
  16. package/dist/app/timings.js.map +1 -0
  17. package/dist/app/wiring.js +57 -0
  18. package/dist/app/wiring.js.map +1 -0
  19. package/dist/cli/clean.js +71 -0
  20. package/dist/cli/clean.js.map +1 -0
  21. package/dist/cli/commands.js +963 -0
  22. package/dist/cli/commands.js.map +1 -0
  23. package/dist/cli/config-check.js +173 -0
  24. package/dist/cli/config-check.js.map +1 -0
  25. package/dist/cli/daemon.js +199 -0
  26. package/dist/cli/daemon.js.map +1 -0
  27. package/dist/cli/help.js +50 -0
  28. package/dist/cli/help.js.map +1 -0
  29. package/dist/cli/init.js +43 -0
  30. package/dist/cli/init.js.map +1 -0
  31. package/dist/cli/io.js +13 -0
  32. package/dist/cli/io.js.map +1 -0
  33. package/dist/cli/main.js +31 -0
  34. package/dist/cli/main.js.map +1 -0
  35. package/dist/cli/probe.js +12 -0
  36. package/dist/cli/probe.js.map +1 -0
  37. package/dist/cli/program.js +48 -0
  38. package/dist/cli/program.js.map +1 -0
  39. package/dist/cli/setup.js +406 -0
  40. package/dist/cli/setup.js.map +1 -0
  41. package/dist/cli/version.js +6 -0
  42. package/dist/cli/version.js.map +1 -0
  43. package/dist/cli/watch.js +24 -0
  44. package/dist/cli/watch.js.map +1 -0
  45. package/dist/cli/web/daemon-panel.js +185 -0
  46. package/dist/cli/web/daemon-panel.js.map +1 -0
  47. package/dist/cli/web/default-repository.js +12 -0
  48. package/dist/cli/web/default-repository.js.map +1 -0
  49. package/dist/cli/web/errors.js +60 -0
  50. package/dist/cli/web/errors.js.map +1 -0
  51. package/dist/cli/web/open.js +12 -0
  52. package/dist/cli/web/open.js.map +1 -0
  53. package/dist/cli/web/page.js +465 -0
  54. package/dist/cli/web/page.js.map +1 -0
  55. package/dist/cli/web/server.js +1191 -0
  56. package/dist/cli/web/server.js.map +1 -0
  57. package/dist/cli/web/standby.js +119 -0
  58. package/dist/cli/web/standby.js.map +1 -0
  59. package/dist/cli/web/state.js +69 -0
  60. package/dist/cli/web/state.js.map +1 -0
  61. package/dist/cli/web/system.js +66 -0
  62. package/dist/cli/web/system.js.map +1 -0
  63. package/dist/cli/web-control.js +173 -0
  64. package/dist/cli/web-control.js.map +1 -0
  65. package/dist/config/discover.js +25 -0
  66. package/dist/config/discover.js.map +1 -0
  67. package/dist/config/duration.js +17 -0
  68. package/dist/config/duration.js.map +1 -0
  69. package/dist/config/edit.js +966 -0
  70. package/dist/config/edit.js.map +1 -0
  71. package/dist/config/errors.js +29 -0
  72. package/dist/config/errors.js.map +1 -0
  73. package/dist/config/index.js +14 -0
  74. package/dist/config/index.js.map +1 -0
  75. package/dist/config/load.js +412 -0
  76. package/dist/config/load.js.map +1 -0
  77. package/dist/config/merge.js +45 -0
  78. package/dist/config/merge.js.map +1 -0
  79. package/dist/config/model.js +171 -0
  80. package/dist/config/model.js.map +1 -0
  81. package/dist/config/paths.js +31 -0
  82. package/dist/config/paths.js.map +1 -0
  83. package/dist/config/prompt.js +33 -0
  84. package/dist/config/prompt.js.map +1 -0
  85. package/dist/config/shared-pipelines.js +71 -0
  86. package/dist/config/shared-pipelines.js.map +1 -0
  87. package/dist/config/shared-specialists.js +68 -0
  88. package/dist/config/shared-specialists.js.map +1 -0
  89. package/dist/config/shared-workflows.js +71 -0
  90. package/dist/config/shared-workflows.js.map +1 -0
  91. package/dist/config/specialist-tags.js +214 -0
  92. package/dist/config/specialist-tags.js.map +1 -0
  93. package/dist/config/tag-names.js +43 -0
  94. package/dist/config/tag-names.js.map +1 -0
  95. package/dist/config/validate.js +872 -0
  96. package/dist/config/validate.js.map +1 -0
  97. package/dist/core/artifacts.js +37 -0
  98. package/dist/core/artifacts.js.map +1 -0
  99. package/dist/core/create.js +75 -0
  100. package/dist/core/create.js.map +1 -0
  101. package/dist/core/delivery.js +366 -0
  102. package/dist/core/delivery.js.map +1 -0
  103. package/dist/core/errors.js +7 -0
  104. package/dist/core/errors.js.map +1 -0
  105. package/dist/core/ids.js +99 -0
  106. package/dist/core/ids.js.map +1 -0
  107. package/dist/core/index.js +21 -0
  108. package/dist/core/index.js.map +1 -0
  109. package/dist/core/input.js +45 -0
  110. package/dist/core/input.js.map +1 -0
  111. package/dist/core/machine.js +1021 -0
  112. package/dist/core/machine.js.map +1 -0
  113. package/dist/core/model.js +460 -0
  114. package/dist/core/model.js.map +1 -0
  115. package/dist/core/observer.js +193 -0
  116. package/dist/core/observer.js.map +1 -0
  117. package/dist/core/occupancy.js +63 -0
  118. package/dist/core/occupancy.js.map +1 -0
  119. package/dist/core/permissions.js +222 -0
  120. package/dist/core/permissions.js.map +1 -0
  121. package/dist/core/plan.js +99 -0
  122. package/dist/core/plan.js.map +1 -0
  123. package/dist/core/progress.js +43 -0
  124. package/dist/core/progress.js.map +1 -0
  125. package/dist/core/questions.js +19 -0
  126. package/dist/core/questions.js.map +1 -0
  127. package/dist/core/queue.js +859 -0
  128. package/dist/core/queue.js.map +1 -0
  129. package/dist/core/retryable.js +8 -0
  130. package/dist/core/retryable.js.map +1 -0
  131. package/dist/core/scheduler.js +160 -0
  132. package/dist/core/scheduler.js.map +1 -0
  133. package/dist/core/skip.js +109 -0
  134. package/dist/core/skip.js.map +1 -0
  135. package/dist/core/stages.js +304 -0
  136. package/dist/core/stages.js.map +1 -0
  137. package/dist/core/summary.js +35 -0
  138. package/dist/core/summary.js.map +1 -0
  139. package/dist/core/tags.js +184 -0
  140. package/dist/core/tags.js.map +1 -0
  141. package/dist/core/topology.js +162 -0
  142. package/dist/core/topology.js.map +1 -0
  143. package/dist/daemon/artifacts.js +84 -0
  144. package/dist/daemon/artifacts.js.map +1 -0
  145. package/dist/daemon/daemon.js +1442 -0
  146. package/dist/daemon/daemon.js.map +1 -0
  147. package/dist/daemon/executor.js +749 -0
  148. package/dist/daemon/executor.js.map +1 -0
  149. package/dist/daemon/helpers.js +38 -0
  150. package/dist/daemon/helpers.js.map +1 -0
  151. package/dist/daemon/index.js +4 -0
  152. package/dist/daemon/index.js.map +1 -0
  153. package/dist/daemon/logs.js +69 -0
  154. package/dist/daemon/logs.js.map +1 -0
  155. package/dist/daemon/observers.js +93 -0
  156. package/dist/daemon/observers.js.map +1 -0
  157. package/dist/daemon/patches.js +76 -0
  158. package/dist/daemon/patches.js.map +1 -0
  159. package/dist/daemon/ports.js +2 -0
  160. package/dist/daemon/ports.js.map +1 -0
  161. package/dist/daemon/processes.js +98 -0
  162. package/dist/daemon/processes.js.map +1 -0
  163. package/dist/daemon/repositories.js +2 -0
  164. package/dist/daemon/repositories.js.map +1 -0
  165. package/dist/daemon/server.js +164 -0
  166. package/dist/daemon/server.js.map +1 -0
  167. package/dist/daemon/supervisor.js +140 -0
  168. package/dist/daemon/supervisor.js.map +1 -0
  169. package/dist/daemon/timings.js +23 -0
  170. package/dist/daemon/timings.js.map +1 -0
  171. package/dist/feature/agents/clients/agy/events.js +36 -0
  172. package/dist/feature/agents/clients/agy/events.js.map +1 -0
  173. package/dist/feature/agents/clients/agy/guard-commands.js +29 -0
  174. package/dist/feature/agents/clients/agy/guard-commands.js.map +1 -0
  175. package/dist/feature/agents/clients/agy/guard-paths.js +36 -0
  176. package/dist/feature/agents/clients/agy/guard-paths.js.map +1 -0
  177. package/dist/feature/agents/clients/agy/guard.js +77 -0
  178. package/dist/feature/agents/clients/agy/guard.js.map +1 -0
  179. package/dist/feature/agents/clients/agy/hooks.js +46 -0
  180. package/dist/feature/agents/clients/agy/hooks.js.map +1 -0
  181. package/dist/feature/agents/clients/agy/index.js +5 -0
  182. package/dist/feature/agents/clients/agy/index.js.map +1 -0
  183. package/dist/feature/agents/clients/agy/parser.js +63 -0
  184. package/dist/feature/agents/clients/agy/parser.js.map +1 -0
  185. package/dist/feature/agents/clients/agy/permissions.js +40 -0
  186. package/dist/feature/agents/clients/agy/permissions.js.map +1 -0
  187. package/dist/feature/agents/clients/agy/runtime.js +114 -0
  188. package/dist/feature/agents/clients/agy/runtime.js.map +1 -0
  189. package/dist/feature/agents/clients/agy/transcript.js +65 -0
  190. package/dist/feature/agents/clients/agy/transcript.js.map +1 -0
  191. package/dist/feature/agents/clients/claude/index.js +5 -0
  192. package/dist/feature/agents/clients/claude/index.js.map +1 -0
  193. package/dist/feature/agents/clients/claude/parser.js +221 -0
  194. package/dist/feature/agents/clients/claude/parser.js.map +1 -0
  195. package/dist/feature/agents/clients/claude/permissions.js +70 -0
  196. package/dist/feature/agents/clients/claude/permissions.js.map +1 -0
  197. package/dist/feature/agents/clients/claude/runtime.js +116 -0
  198. package/dist/feature/agents/clients/claude/runtime.js.map +1 -0
  199. package/dist/feature/agents/clients/claude/transcript.js +105 -0
  200. package/dist/feature/agents/clients/claude/transcript.js.map +1 -0
  201. package/dist/feature/agents/clients/naming/index.js +2 -0
  202. package/dist/feature/agents/clients/naming/index.js.map +1 -0
  203. package/dist/feature/agents/clients/naming/naming.js +15 -0
  204. package/dist/feature/agents/clients/naming/naming.js.map +1 -0
  205. package/dist/feature/agents/clients/opencode/index.js +4 -0
  206. package/dist/feature/agents/clients/opencode/index.js.map +1 -0
  207. package/dist/feature/agents/clients/opencode/parser.js +84 -0
  208. package/dist/feature/agents/clients/opencode/parser.js.map +1 -0
  209. package/dist/feature/agents/clients/opencode/runtime.js +129 -0
  210. package/dist/feature/agents/clients/opencode/runtime.js.map +1 -0
  211. package/dist/feature/agents/clients/opencode/transcript.js +77 -0
  212. package/dist/feature/agents/clients/opencode/transcript.js.map +1 -0
  213. package/dist/feature/agents/ports/index.js +2 -0
  214. package/dist/feature/agents/ports/index.js.map +1 -0
  215. package/dist/feature/agents/ports/naming.js +2 -0
  216. package/dist/feature/agents/ports/naming.js.map +1 -0
  217. package/dist/feature/agents/ports/runtime-factory.js +2 -0
  218. package/dist/feature/agents/ports/runtime-factory.js.map +1 -0
  219. package/dist/feature/agents/services/agents.js +38 -0
  220. package/dist/feature/agents/services/agents.js.map +1 -0
  221. package/dist/feature/agents/services/catalog.js +117 -0
  222. package/dist/feature/agents/services/catalog.js.map +1 -0
  223. package/dist/feature/agents/services/create.js +5 -0
  224. package/dist/feature/agents/services/create.js.map +1 -0
  225. package/dist/feature/agents/services/index.js +7 -0
  226. package/dist/feature/agents/services/index.js.map +1 -0
  227. package/dist/feature/agents/services/logs.js +69 -0
  228. package/dist/feature/agents/services/logs.js.map +1 -0
  229. package/dist/feature/agents/services/skills.js +17 -0
  230. package/dist/feature/agents/services/skills.js.map +1 -0
  231. package/dist/feature/agents/services/supervisor.js +160 -0
  232. package/dist/feature/agents/services/supervisor.js.map +1 -0
  233. package/dist/feature/agents/types/catalog.js +2 -0
  234. package/dist/feature/agents/types/catalog.js.map +1 -0
  235. package/dist/feature/agents/types/index.js +12 -0
  236. package/dist/feature/agents/types/index.js.map +1 -0
  237. package/dist/feature/agents/types/message.js +48 -0
  238. package/dist/feature/agents/types/message.js.map +1 -0
  239. package/dist/feature/agents/types/naming.js +4 -0
  240. package/dist/feature/agents/types/naming.js.map +1 -0
  241. package/dist/feature/agents/types/permissions.js +235 -0
  242. package/dist/feature/agents/types/permissions.js.map +1 -0
  243. package/dist/feature/agents/types/run-naming.js +66 -0
  244. package/dist/feature/agents/types/run-naming.js.map +1 -0
  245. package/dist/feature/agents/types/runtime.js +18 -0
  246. package/dist/feature/agents/types/runtime.js.map +1 -0
  247. package/dist/feature/agents/types/step-input.js +2 -0
  248. package/dist/feature/agents/types/step-input.js.map +1 -0
  249. package/dist/feature/agents/types/transcript-parts.js +62 -0
  250. package/dist/feature/agents/types/transcript-parts.js.map +1 -0
  251. package/dist/feature/agents/types/transcript.js +8 -0
  252. package/dist/feature/agents/types/transcript.js.map +1 -0
  253. package/dist/feature/agents/types/usage.js +14 -0
  254. package/dist/feature/agents/types/usage.js.map +1 -0
  255. package/dist/feature/agents/types/worker-tools.js +20 -0
  256. package/dist/feature/agents/types/worker-tools.js.map +1 -0
  257. package/dist/feature/artifacts/ports/index.js +2 -0
  258. package/dist/feature/artifacts/ports/index.js.map +1 -0
  259. package/dist/feature/artifacts/ports/publish.js +2 -0
  260. package/dist/feature/artifacts/ports/publish.js.map +1 -0
  261. package/dist/feature/artifacts/repositories/artifact-storage.js +84 -0
  262. package/dist/feature/artifacts/repositories/artifact-storage.js.map +1 -0
  263. package/dist/feature/artifacts/repositories/artifacts.js +85 -0
  264. package/dist/feature/artifacts/repositories/artifacts.js.map +1 -0
  265. package/dist/feature/artifacts/repositories/index.js +3 -0
  266. package/dist/feature/artifacts/repositories/index.js.map +1 -0
  267. package/dist/feature/artifacts/services/artifacts.js +105 -0
  268. package/dist/feature/artifacts/services/artifacts.js.map +1 -0
  269. package/dist/feature/artifacts/services/create.js +14 -0
  270. package/dist/feature/artifacts/services/create.js.map +1 -0
  271. package/dist/feature/artifacts/services/files.js +42 -0
  272. package/dist/feature/artifacts/services/files.js.map +1 -0
  273. package/dist/feature/artifacts/services/index.js +3 -0
  274. package/dist/feature/artifacts/services/index.js.map +1 -0
  275. package/dist/feature/artifacts/types/artifacts.js +36 -0
  276. package/dist/feature/artifacts/types/artifacts.js.map +1 -0
  277. package/dist/feature/artifacts/types/index.js +2 -0
  278. package/dist/feature/artifacts/types/index.js.map +1 -0
  279. package/dist/feature/artifacts/types/views.js +2 -0
  280. package/dist/feature/artifacts/types/views.js.map +1 -0
  281. package/dist/feature/compose/services/create.js +11 -0
  282. package/dist/feature/compose/services/create.js.map +1 -0
  283. package/dist/feature/compose/services/index.js +5 -0
  284. package/dist/feature/compose/services/index.js.map +1 -0
  285. package/dist/feature/compose/services/repository-edit.js +20 -0
  286. package/dist/feature/compose/services/repository-edit.js.map +1 -0
  287. package/dist/feature/compose/services/repository-move.js +35 -0
  288. package/dist/feature/compose/services/repository-move.js.map +1 -0
  289. package/dist/feature/compose/services/repository-removal.js +38 -0
  290. package/dist/feature/compose/services/repository-removal.js.map +1 -0
  291. package/dist/feature/delivery/ports/index.js +2 -0
  292. package/dist/feature/delivery/ports/index.js.map +1 -0
  293. package/dist/feature/delivery/ports/publish.js +2 -0
  294. package/dist/feature/delivery/ports/publish.js.map +1 -0
  295. package/dist/feature/delivery/repositories/index.js +3 -0
  296. package/dist/feature/delivery/repositories/index.js.map +1 -0
  297. package/dist/feature/delivery/repositories/patch-storage.js +76 -0
  298. package/dist/feature/delivery/repositories/patch-storage.js.map +1 -0
  299. package/dist/feature/delivery/repositories/patches.js +28 -0
  300. package/dist/feature/delivery/repositories/patches.js.map +1 -0
  301. package/dist/feature/delivery/services/create.js +21 -0
  302. package/dist/feature/delivery/services/create.js.map +1 -0
  303. package/dist/feature/delivery/services/deliver.js +67 -0
  304. package/dist/feature/delivery/services/deliver.js.map +1 -0
  305. package/dist/feature/delivery/services/diffs.js +153 -0
  306. package/dist/feature/delivery/services/diffs.js.map +1 -0
  307. package/dist/feature/delivery/services/index.js +5 -0
  308. package/dist/feature/delivery/services/index.js.map +1 -0
  309. package/dist/feature/delivery/services/patches.js +96 -0
  310. package/dist/feature/delivery/services/patches.js.map +1 -0
  311. package/dist/feature/delivery/types/index.js +3 -0
  312. package/dist/feature/delivery/types/index.js.map +1 -0
  313. package/dist/feature/delivery/types/outcomes.js +2 -0
  314. package/dist/feature/delivery/types/outcomes.js.map +1 -0
  315. package/dist/feature/delivery/types/spec-change.js +18 -0
  316. package/dist/feature/delivery/types/spec-change.js.map +1 -0
  317. package/dist/feature/observers/ports/index.js +2 -0
  318. package/dist/feature/observers/ports/index.js.map +1 -0
  319. package/dist/feature/observers/ports/publish.js +2 -0
  320. package/dist/feature/observers/ports/publish.js.map +1 -0
  321. package/dist/feature/observers/repositories/index.js +2 -0
  322. package/dist/feature/observers/repositories/index.js.map +1 -0
  323. package/dist/feature/observers/repositories/observers.js +28 -0
  324. package/dist/feature/observers/repositories/observers.js.map +1 -0
  325. package/dist/feature/observers/services/create.js +11 -0
  326. package/dist/feature/observers/services/create.js.map +1 -0
  327. package/dist/feature/observers/services/history.js +76 -0
  328. package/dist/feature/observers/services/history.js.map +1 -0
  329. package/dist/feature/observers/services/index.js +5 -0
  330. package/dist/feature/observers/services/index.js.map +1 -0
  331. package/dist/feature/observers/services/observers.js +178 -0
  332. package/dist/feature/observers/services/observers.js.map +1 -0
  333. package/dist/feature/observers/services/settings-check.js +93 -0
  334. package/dist/feature/observers/services/settings-check.js.map +1 -0
  335. package/dist/feature/observers/types/actions.js +2 -0
  336. package/dist/feature/observers/types/actions.js.map +1 -0
  337. package/dist/feature/observers/types/index.js +4 -0
  338. package/dist/feature/observers/types/index.js.map +1 -0
  339. package/dist/feature/observers/types/plan-repairs.js +109 -0
  340. package/dist/feature/observers/types/plan-repairs.js.map +1 -0
  341. package/dist/feature/observers/types/settings.js +13 -0
  342. package/dist/feature/observers/types/settings.js.map +1 -0
  343. package/dist/feature/processes/ports/index.js +2 -0
  344. package/dist/feature/processes/ports/index.js.map +1 -0
  345. package/dist/feature/processes/ports/publish.js +2 -0
  346. package/dist/feature/processes/ports/publish.js.map +1 -0
  347. package/dist/feature/processes/services/create.js +5 -0
  348. package/dist/feature/processes/services/create.js.map +1 -0
  349. package/dist/feature/processes/services/index.js +4 -0
  350. package/dist/feature/processes/services/index.js.map +1 -0
  351. package/dist/feature/processes/services/processes.js +131 -0
  352. package/dist/feature/processes/services/processes.js.map +1 -0
  353. package/dist/feature/processes/services/tree.js +98 -0
  354. package/dist/feature/processes/services/tree.js.map +1 -0
  355. package/dist/feature/processes/types/background.js +2 -0
  356. package/dist/feature/processes/types/background.js.map +1 -0
  357. package/dist/feature/processes/types/index.js +2 -0
  358. package/dist/feature/processes/types/index.js.map +1 -0
  359. package/dist/feature/queue/ports/index.js +2 -0
  360. package/dist/feature/queue/ports/index.js.map +1 -0
  361. package/dist/feature/queue/ports/observe.js +2 -0
  362. package/dist/feature/queue/ports/observe.js.map +1 -0
  363. package/dist/feature/queue/ports/publish.js +2 -0
  364. package/dist/feature/queue/ports/publish.js.map +1 -0
  365. package/dist/feature/queue/ports/repair-policy.js +2 -0
  366. package/dist/feature/queue/ports/repair-policy.js.map +1 -0
  367. package/dist/feature/queue/repositories/index.js +2 -0
  368. package/dist/feature/queue/repositories/index.js.map +1 -0
  369. package/dist/feature/queue/repositories/queues.js +100 -0
  370. package/dist/feature/queue/repositories/queues.js.map +1 -0
  371. package/dist/feature/queue/services/advance.js +214 -0
  372. package/dist/feature/queue/services/advance.js.map +1 -0
  373. package/dist/feature/queue/services/control.js +153 -0
  374. package/dist/feature/queue/services/control.js.map +1 -0
  375. package/dist/feature/queue/services/create.js +26 -0
  376. package/dist/feature/queue/services/create.js.map +1 -0
  377. package/dist/feature/queue/services/edit.js +126 -0
  378. package/dist/feature/queue/services/edit.js.map +1 -0
  379. package/dist/feature/queue/services/index.js +8 -0
  380. package/dist/feature/queue/services/index.js.map +1 -0
  381. package/dist/feature/queue/services/items.js +173 -0
  382. package/dist/feature/queue/services/items.js.map +1 -0
  383. package/dist/feature/queue/services/store.js +61 -0
  384. package/dist/feature/queue/services/store.js.map +1 -0
  385. package/dist/feature/queue/services/task-tags.js +103 -0
  386. package/dist/feature/queue/services/task-tags.js.map +1 -0
  387. package/dist/feature/queue/types/advance.js +183 -0
  388. package/dist/feature/queue/types/advance.js.map +1 -0
  389. package/dist/feature/queue/types/dependencies.js +98 -0
  390. package/dist/feature/queue/types/dependencies.js.map +1 -0
  391. package/dist/feature/queue/types/edit.js +180 -0
  392. package/dist/feature/queue/types/edit.js.map +1 -0
  393. package/dist/feature/queue/types/ids.js +7 -0
  394. package/dist/feature/queue/types/ids.js.map +1 -0
  395. package/dist/feature/queue/types/index.js +10 -0
  396. package/dist/feature/queue/types/index.js.map +1 -0
  397. package/dist/feature/queue/types/items.js +46 -0
  398. package/dist/feature/queue/types/items.js.map +1 -0
  399. package/dist/feature/queue/types/limit-hits.js +50 -0
  400. package/dist/feature/queue/types/limit-hits.js.map +1 -0
  401. package/dist/feature/queue/types/requests.js +2 -0
  402. package/dist/feature/queue/types/requests.js.map +1 -0
  403. package/dist/feature/queue/types/returns.js +182 -0
  404. package/dist/feature/queue/types/returns.js.map +1 -0
  405. package/dist/feature/queue/types/settings.js +117 -0
  406. package/dist/feature/queue/types/settings.js.map +1 -0
  407. package/dist/feature/repos/ports/index.js +2 -0
  408. package/dist/feature/repos/ports/index.js.map +1 -0
  409. package/dist/feature/repos/ports/publish.js +2 -0
  410. package/dist/feature/repos/ports/publish.js.map +1 -0
  411. package/dist/feature/repos/repositories/index.js +2 -0
  412. package/dist/feature/repos/repositories/index.js.map +1 -0
  413. package/dist/feature/repos/repositories/known.js +41 -0
  414. package/dist/feature/repos/repositories/known.js.map +1 -0
  415. package/dist/feature/repos/services/create.js +13 -0
  416. package/dist/feature/repos/services/create.js.map +1 -0
  417. package/dist/feature/repos/services/index.js +4 -0
  418. package/dist/feature/repos/services/index.js.map +1 -0
  419. package/dist/feature/repos/services/projects.js +50 -0
  420. package/dist/feature/repos/services/projects.js.map +1 -0
  421. package/dist/feature/repos/services/registry.js +138 -0
  422. package/dist/feature/repos/services/registry.js.map +1 -0
  423. package/dist/feature/repos/types/index.js +2 -0
  424. package/dist/feature/repos/types/index.js.map +1 -0
  425. package/dist/feature/repos/types/project.js +80 -0
  426. package/dist/feature/repos/types/project.js.map +1 -0
  427. package/dist/feature/repos/types/registry.js +2 -0
  428. package/dist/feature/repos/types/registry.js.map +1 -0
  429. package/dist/feature/runs/machine/answers.js +112 -0
  430. package/dist/feature/runs/machine/answers.js.map +1 -0
  431. package/dist/feature/runs/machine/delivery-checks.js +91 -0
  432. package/dist/feature/runs/machine/delivery-checks.js.map +1 -0
  433. package/dist/feature/runs/machine/delivery-flow.js +211 -0
  434. package/dist/feature/runs/machine/delivery-flow.js.map +1 -0
  435. package/dist/feature/runs/machine/events.js +2 -0
  436. package/dist/feature/runs/machine/events.js.map +1 -0
  437. package/dist/feature/runs/machine/exits.js +207 -0
  438. package/dist/feature/runs/machine/exits.js.map +1 -0
  439. package/dist/feature/runs/machine/index.js +7 -0
  440. package/dist/feature/runs/machine/index.js.map +1 -0
  441. package/dist/feature/runs/machine/plan.js +111 -0
  442. package/dist/feature/runs/machine/plan.js.map +1 -0
  443. package/dist/feature/runs/machine/repair.js +155 -0
  444. package/dist/feature/runs/machine/repair.js.map +1 -0
  445. package/dist/feature/runs/machine/run-control.js +276 -0
  446. package/dist/feature/runs/machine/run-control.js.map +1 -0
  447. package/dist/feature/runs/machine/scheduler.js +119 -0
  448. package/dist/feature/runs/machine/scheduler.js.map +1 -0
  449. package/dist/feature/runs/machine/steps.js +275 -0
  450. package/dist/feature/runs/machine/steps.js.map +1 -0
  451. package/dist/feature/runs/machine/texts.js +69 -0
  452. package/dist/feature/runs/machine/texts.js.map +1 -0
  453. package/dist/feature/runs/machine/transition.js +113 -0
  454. package/dist/feature/runs/machine/transition.js.map +1 -0
  455. package/dist/feature/runs/ports/agent-exit.js +2 -0
  456. package/dist/feature/runs/ports/agent-exit.js.map +1 -0
  457. package/dist/feature/runs/ports/diff.js +2 -0
  458. package/dist/feature/runs/ports/diff.js.map +1 -0
  459. package/dist/feature/runs/ports/index.js +2 -0
  460. package/dist/feature/runs/ports/index.js.map +1 -0
  461. package/dist/feature/runs/ports/observe.js +2 -0
  462. package/dist/feature/runs/ports/observe.js.map +1 -0
  463. package/dist/feature/runs/ports/publish.js +2 -0
  464. package/dist/feature/runs/ports/publish.js.map +1 -0
  465. package/dist/feature/runs/ports/queue-advance.js +2 -0
  466. package/dist/feature/runs/ports/queue-advance.js.map +1 -0
  467. package/dist/feature/runs/repositories/attempt-history.js +116 -0
  468. package/dist/feature/runs/repositories/attempt-history.js.map +1 -0
  469. package/dist/feature/runs/repositories/finished-runs.js +42 -0
  470. package/dist/feature/runs/repositories/finished-runs.js.map +1 -0
  471. package/dist/feature/runs/repositories/index.js +4 -0
  472. package/dist/feature/runs/repositories/index.js.map +1 -0
  473. package/dist/feature/runs/repositories/rows.js +110 -0
  474. package/dist/feature/runs/repositories/rows.js.map +1 -0
  475. package/dist/feature/runs/repositories/runs.js +76 -0
  476. package/dist/feature/runs/repositories/runs.js.map +1 -0
  477. package/dist/feature/runs/repositories/write.js +31 -0
  478. package/dist/feature/runs/repositories/write.js.map +1 -0
  479. package/dist/feature/runs/services/archive.js +17 -0
  480. package/dist/feature/runs/services/archive.js.map +1 -0
  481. package/dist/feature/runs/services/attempt-history.js +11 -0
  482. package/dist/feature/runs/services/attempt-history.js.map +1 -0
  483. package/dist/feature/runs/services/create.js +43 -0
  484. package/dist/feature/runs/services/create.js.map +1 -0
  485. package/dist/feature/runs/services/effects/actions.js +150 -0
  486. package/dist/feature/runs/services/effects/actions.js.map +1 -0
  487. package/dist/feature/runs/services/effects/attempts.js +179 -0
  488. package/dist/feature/runs/services/effects/attempts.js.map +1 -0
  489. package/dist/feature/runs/services/effects/context.js +7 -0
  490. package/dist/feature/runs/services/effects/context.js.map +1 -0
  491. package/dist/feature/runs/services/effects/effects.js +82 -0
  492. package/dist/feature/runs/services/effects/effects.js.map +1 -0
  493. package/dist/feature/runs/services/effects/git.js +168 -0
  494. package/dist/feature/runs/services/effects/git.js.map +1 -0
  495. package/dist/feature/runs/services/effects/naming.js +62 -0
  496. package/dist/feature/runs/services/effects/naming.js.map +1 -0
  497. package/dist/feature/runs/services/effects/outside.js +83 -0
  498. package/dist/feature/runs/services/effects/outside.js.map +1 -0
  499. package/dist/feature/runs/services/effects/running.js +76 -0
  500. package/dist/feature/runs/services/effects/running.js.map +1 -0
  501. package/dist/feature/runs/services/effects/usage.js +61 -0
  502. package/dist/feature/runs/services/effects/usage.js.map +1 -0
  503. package/dist/feature/runs/services/effects/worktrees.js +49 -0
  504. package/dist/feature/runs/services/effects/worktrees.js.map +1 -0
  505. package/dist/feature/runs/services/engine.js +163 -0
  506. package/dist/feature/runs/services/engine.js.map +1 -0
  507. package/dist/feature/runs/services/index.js +15 -0
  508. package/dist/feature/runs/services/index.js.map +1 -0
  509. package/dist/feature/runs/services/occupancy.js +62 -0
  510. package/dist/feature/runs/services/occupancy.js.map +1 -0
  511. package/dist/feature/runs/services/progress.js +42 -0
  512. package/dist/feature/runs/services/progress.js.map +1 -0
  513. package/dist/feature/runs/services/reads.js +54 -0
  514. package/dist/feature/runs/services/reads.js.map +1 -0
  515. package/dist/feature/runs/services/recovery.js +17 -0
  516. package/dist/feature/runs/services/recovery.js.map +1 -0
  517. package/dist/feature/runs/services/refresh.js +29 -0
  518. package/dist/feature/runs/services/refresh.js.map +1 -0
  519. package/dist/feature/runs/services/requests.js +88 -0
  520. package/dist/feature/runs/services/requests.js.map +1 -0
  521. package/dist/feature/runs/services/states.js +112 -0
  522. package/dist/feature/runs/services/states.js.map +1 -0
  523. package/dist/feature/runs/services/summary.js +38 -0
  524. package/dist/feature/runs/services/summary.js.map +1 -0
  525. package/dist/feature/runs/types/attempt.js +102 -0
  526. package/dist/feature/runs/types/attempt.js.map +1 -0
  527. package/dist/feature/runs/types/constants.js +45 -0
  528. package/dist/feature/runs/types/constants.js.map +1 -0
  529. package/dist/feature/runs/types/create.js +177 -0
  530. package/dist/feature/runs/types/create.js.map +1 -0
  531. package/dist/feature/runs/types/group.js +152 -0
  532. package/dist/feature/runs/types/group.js.map +1 -0
  533. package/dist/feature/runs/types/history/attempt-history.js +16 -0
  534. package/dist/feature/runs/types/history/attempt-history.js.map +1 -0
  535. package/dist/feature/runs/types/index.js +15 -0
  536. package/dist/feature/runs/types/index.js.map +1 -0
  537. package/dist/feature/runs/types/input.js +57 -0
  538. package/dist/feature/runs/types/input.js.map +1 -0
  539. package/dist/feature/runs/types/limits.js +151 -0
  540. package/dist/feature/runs/types/limits.js.map +1 -0
  541. package/dist/feature/runs/types/problems.js +74 -0
  542. package/dist/feature/runs/types/problems.js.map +1 -0
  543. package/dist/feature/runs/types/run.js +162 -0
  544. package/dist/feature/runs/types/run.js.map +1 -0
  545. package/dist/feature/runs/types/skip.js +110 -0
  546. package/dist/feature/runs/types/skip.js.map +1 -0
  547. package/dist/feature/runs/types/stage-status.js +156 -0
  548. package/dist/feature/runs/types/stage-status.js.map +1 -0
  549. package/dist/feature/runs/types/stages.js +158 -0
  550. package/dist/feature/runs/types/stages.js.map +1 -0
  551. package/dist/feature/runs/types/topology.js +165 -0
  552. package/dist/feature/runs/types/topology.js.map +1 -0
  553. package/dist/feature/swarm-config/repositories/config-files.js +141 -0
  554. package/dist/feature/swarm-config/repositories/config-files.js.map +1 -0
  555. package/dist/feature/swarm-config/services/assemble.js +212 -0
  556. package/dist/feature/swarm-config/services/assemble.js.map +1 -0
  557. package/dist/feature/swarm-config/services/create.js +5 -0
  558. package/dist/feature/swarm-config/services/create.js.map +1 -0
  559. package/dist/feature/swarm-config/services/discover.js +19 -0
  560. package/dist/feature/swarm-config/services/discover.js.map +1 -0
  561. package/dist/feature/swarm-config/services/index.js +9 -0
  562. package/dist/feature/swarm-config/services/index.js.map +1 -0
  563. package/dist/feature/swarm-config/services/load.js +86 -0
  564. package/dist/feature/swarm-config/services/load.js.map +1 -0
  565. package/dist/feature/swarm-config/services/settings.js +50 -0
  566. package/dist/feature/swarm-config/services/settings.js.map +1 -0
  567. package/dist/feature/swarm-config/services/validate-actions.js +117 -0
  568. package/dist/feature/swarm-config/services/validate-actions.js.map +1 -0
  569. package/dist/feature/swarm-config/services/validate-context.js +91 -0
  570. package/dist/feature/swarm-config/services/validate-context.js.map +1 -0
  571. package/dist/feature/swarm-config/services/validate-pipelines.js +170 -0
  572. package/dist/feature/swarm-config/services/validate-pipelines.js.map +1 -0
  573. package/dist/feature/swarm-config/services/validate-runtimes.js +212 -0
  574. package/dist/feature/swarm-config/services/validate-runtimes.js.map +1 -0
  575. package/dist/feature/swarm-config/services/validate-settings.js +177 -0
  576. package/dist/feature/swarm-config/services/validate-settings.js.map +1 -0
  577. package/dist/feature/swarm-config/services/validate-specialists.js +152 -0
  578. package/dist/feature/swarm-config/services/validate-specialists.js.map +1 -0
  579. package/dist/feature/swarm-config/services/validate.js +174 -0
  580. package/dist/feature/swarm-config/services/validate.js.map +1 -0
  581. package/dist/feature/swarm-config/types/action.js +11 -0
  582. package/dist/feature/swarm-config/types/action.js.map +1 -0
  583. package/dist/feature/swarm-config/types/chain.js +2 -0
  584. package/dist/feature/swarm-config/types/chain.js.map +1 -0
  585. package/dist/feature/swarm-config/types/duration.js +17 -0
  586. package/dist/feature/swarm-config/types/duration.js.map +1 -0
  587. package/dist/feature/swarm-config/types/errors.js +57 -0
  588. package/dist/feature/swarm-config/types/errors.js.map +1 -0
  589. package/dist/feature/swarm-config/types/index.js +13 -0
  590. package/dist/feature/swarm-config/types/index.js.map +1 -0
  591. package/dist/feature/swarm-config/types/levels.js +16 -0
  592. package/dist/feature/swarm-config/types/levels.js.map +1 -0
  593. package/dist/feature/swarm-config/types/lookups.js +53 -0
  594. package/dist/feature/swarm-config/types/lookups.js.map +1 -0
  595. package/dist/feature/swarm-config/types/merge.js +46 -0
  596. package/dist/feature/swarm-config/types/merge.js.map +1 -0
  597. package/dist/feature/swarm-config/types/pipeline.js +5 -0
  598. package/dist/feature/swarm-config/types/pipeline.js.map +1 -0
  599. package/dist/feature/swarm-config/types/prompt.js +33 -0
  600. package/dist/feature/swarm-config/types/prompt.js.map +1 -0
  601. package/dist/feature/swarm-config/types/settings.js +116 -0
  602. package/dist/feature/swarm-config/types/settings.js.map +1 -0
  603. package/dist/feature/swarm-config/types/specialist.js +38 -0
  604. package/dist/feature/swarm-config/types/specialist.js.map +1 -0
  605. package/dist/feature/swarm-config/types/tag-names.js +43 -0
  606. package/dist/feature/swarm-config/types/tag-names.js.map +1 -0
  607. package/dist/feature/swarm-edit/ports/config-changed.js +2 -0
  608. package/dist/feature/swarm-edit/ports/config-changed.js.map +1 -0
  609. package/dist/feature/swarm-edit/ports/index.js +2 -0
  610. package/dist/feature/swarm-edit/ports/index.js.map +1 -0
  611. package/dist/feature/swarm-edit/repositories/documents.js +144 -0
  612. package/dist/feature/swarm-edit/repositories/documents.js.map +1 -0
  613. package/dist/feature/swarm-edit/services/config-edits.js +116 -0
  614. package/dist/feature/swarm-edit/services/config-edits.js.map +1 -0
  615. package/dist/feature/swarm-edit/services/create.js +7 -0
  616. package/dist/feature/swarm-edit/services/create.js.map +1 -0
  617. package/dist/feature/swarm-edit/services/editor-settings.js +143 -0
  618. package/dist/feature/swarm-edit/services/editor-settings.js.map +1 -0
  619. package/dist/feature/swarm-edit/services/editor-view.js +144 -0
  620. package/dist/feature/swarm-edit/services/editor-view.js.map +1 -0
  621. package/dist/feature/swarm-edit/services/index.js +12 -0
  622. package/dist/feature/swarm-edit/services/index.js.map +1 -0
  623. package/dist/feature/swarm-edit/services/levels.js +30 -0
  624. package/dist/feature/swarm-edit/services/levels.js.map +1 -0
  625. package/dist/feature/swarm-edit/services/plan-edit.js +217 -0
  626. package/dist/feature/swarm-edit/services/plan-edit.js.map +1 -0
  627. package/dist/feature/swarm-edit/services/plan-settings.js +198 -0
  628. package/dist/feature/swarm-edit/services/plan-settings.js.map +1 -0
  629. package/dist/feature/swarm-edit/services/references.js +85 -0
  630. package/dist/feature/swarm-edit/services/references.js.map +1 -0
  631. package/dist/feature/swarm-edit/services/shared-config.js +128 -0
  632. package/dist/feature/swarm-edit/services/shared-config.js.map +1 -0
  633. package/dist/feature/swarm-edit/services/shared-pipelines.js +72 -0
  634. package/dist/feature/swarm-edit/services/shared-pipelines.js.map +1 -0
  635. package/dist/feature/swarm-edit/services/shared-specialists.js +70 -0
  636. package/dist/feature/swarm-edit/services/shared-specialists.js.map +1 -0
  637. package/dist/feature/swarm-edit/services/specialist-tags.js +215 -0
  638. package/dist/feature/swarm-edit/services/specialist-tags.js.map +1 -0
  639. package/dist/feature/swarm-edit/types/editor.js +27 -0
  640. package/dist/feature/swarm-edit/types/editor.js.map +1 -0
  641. package/dist/feature/swarm-edit/types/index.js +7 -0
  642. package/dist/feature/swarm-edit/types/index.js.map +1 -0
  643. package/dist/feature/swarm-edit/types/setting-fields.js +64 -0
  644. package/dist/feature/swarm-edit/types/setting-fields.js.map +1 -0
  645. package/dist/feature/swarm-edit/types/shared.js +2 -0
  646. package/dist/feature/swarm-edit/types/shared.js.map +1 -0
  647. package/dist/feature/swarm-edit/types/stages.js +69 -0
  648. package/dist/feature/swarm-edit/types/stages.js.map +1 -0
  649. package/dist/feature/swarm-edit/types/tag-folders.js +2 -0
  650. package/dist/feature/swarm-edit/types/tag-folders.js.map +1 -0
  651. package/dist/feature/swarm-edit/types/views.js +2 -0
  652. package/dist/feature/swarm-edit/types/views.js.map +1 -0
  653. package/dist/feature/tags/ports/index.js +2 -0
  654. package/dist/feature/tags/ports/index.js.map +1 -0
  655. package/dist/feature/tags/ports/publish.js +2 -0
  656. package/dist/feature/tags/ports/publish.js.map +1 -0
  657. package/dist/feature/tags/repositories/index.js +2 -0
  658. package/dist/feature/tags/repositories/index.js.map +1 -0
  659. package/dist/feature/tags/repositories/tags.js +36 -0
  660. package/dist/feature/tags/repositories/tags.js.map +1 -0
  661. package/dist/feature/tags/services/catalog.js +73 -0
  662. package/dist/feature/tags/services/catalog.js.map +1 -0
  663. package/dist/feature/tags/services/create.js +7 -0
  664. package/dist/feature/tags/services/create.js.map +1 -0
  665. package/dist/feature/tags/services/index.js +3 -0
  666. package/dist/feature/tags/services/index.js.map +1 -0
  667. package/dist/feature/tags/types/ids.js +7 -0
  668. package/dist/feature/tags/types/ids.js.map +1 -0
  669. package/dist/feature/tags/types/index.js +3 -0
  670. package/dist/feature/tags/types/index.js.map +1 -0
  671. package/dist/feature/tags/types/tags.js +184 -0
  672. package/dist/feature/tags/types/tags.js.map +1 -0
  673. package/dist/git/delivery.js +284 -0
  674. package/dist/git/delivery.js.map +1 -0
  675. package/dist/git/index.js +4 -0
  676. package/dist/git/index.js.map +1 -0
  677. package/dist/git/runner.js +60 -0
  678. package/dist/git/runner.js.map +1 -0
  679. package/dist/git/workspace.js +366 -0
  680. package/dist/git/workspace.js.map +1 -0
  681. package/dist/mcp/host.js +401 -0
  682. package/dist/mcp/host.js.map +1 -0
  683. package/dist/mcp/index.js +3 -0
  684. package/dist/mcp/index.js.map +1 -0
  685. package/dist/mcp/tools.js +19 -0
  686. package/dist/mcp/tools.js.map +1 -0
  687. package/dist/mcp/version.js +5 -0
  688. package/dist/mcp/version.js.map +1 -0
  689. package/dist/mcp/worker.js +230 -0
  690. package/dist/mcp/worker.js.map +1 -0
  691. package/dist/platform/build/fingerprint.js +36 -0
  692. package/dist/platform/build/fingerprint.js.map +1 -0
  693. package/dist/platform/build/index.js +3 -0
  694. package/dist/platform/build/index.js.map +1 -0
  695. package/dist/platform/build/locations.js +16 -0
  696. package/dist/platform/build/locations.js.map +1 -0
  697. package/dist/platform/errors/app-error.js +39 -0
  698. package/dist/platform/errors/app-error.js.map +1 -0
  699. package/dist/platform/errors/index.js +2 -0
  700. package/dist/platform/errors/index.js.map +1 -0
  701. package/dist/platform/git/delivery.js +284 -0
  702. package/dist/platform/git/delivery.js.map +1 -0
  703. package/dist/platform/git/index.js +4 -0
  704. package/dist/platform/git/index.js.map +1 -0
  705. package/dist/platform/git/runner.js +65 -0
  706. package/dist/platform/git/runner.js.map +1 -0
  707. package/dist/platform/git/workspace.js +366 -0
  708. package/dist/platform/git/workspace.js.map +1 -0
  709. package/dist/platform/paths/index.js +2 -0
  710. package/dist/platform/paths/index.js.map +1 -0
  711. package/dist/platform/paths/paths.js +39 -0
  712. package/dist/platform/paths/paths.js.map +1 -0
  713. package/dist/platform/process/index.js +3 -0
  714. package/dist/platform/process/index.js.map +1 -0
  715. package/dist/platform/process/ps.js +42 -0
  716. package/dist/platform/process/ps.js.map +1 -0
  717. package/dist/platform/process/which.js +21 -0
  718. package/dist/platform/process/which.js.map +1 -0
  719. package/dist/platform/sqlite/database.js +36 -0
  720. package/dist/platform/sqlite/database.js.map +1 -0
  721. package/dist/platform/sqlite/index.js +4 -0
  722. package/dist/platform/sqlite/index.js.map +1 -0
  723. package/dist/platform/sqlite/migrations.js +297 -0
  724. package/dist/platform/sqlite/migrations.js.map +1 -0
  725. package/dist/platform/sqlite/rows.js +13 -0
  726. package/dist/platform/sqlite/rows.js.map +1 -0
  727. package/dist/presentation/cli/commands/daemon.js +216 -0
  728. package/dist/presentation/cli/commands/daemon.js.map +1 -0
  729. package/dist/presentation/cli/commands/group.js +88 -0
  730. package/dist/presentation/cli/commands/group.js.map +1 -0
  731. package/dist/presentation/cli/commands/mcp.js +44 -0
  732. package/dist/presentation/cli/commands/mcp.js.map +1 -0
  733. package/dist/presentation/cli/commands/queue-edit.js +155 -0
  734. package/dist/presentation/cli/commands/queue-edit.js.map +1 -0
  735. package/dist/presentation/cli/commands/queue.js +222 -0
  736. package/dist/presentation/cli/commands/queue.js.map +1 -0
  737. package/dist/presentation/cli/commands/repositories.js +129 -0
  738. package/dist/presentation/cli/commands/repositories.js.map +1 -0
  739. package/dist/presentation/cli/commands/run-delivery.js +116 -0
  740. package/dist/presentation/cli/commands/run-delivery.js.map +1 -0
  741. package/dist/presentation/cli/commands/run.js +156 -0
  742. package/dist/presentation/cli/commands/run.js.map +1 -0
  743. package/dist/presentation/cli/commands/setup.js +97 -0
  744. package/dist/presentation/cli/commands/setup.js.map +1 -0
  745. package/dist/presentation/cli/commands/tag.js +92 -0
  746. package/dist/presentation/cli/commands/tag.js.map +1 -0
  747. package/dist/presentation/cli/commands/web.js +100 -0
  748. package/dist/presentation/cli/commands/web.js.map +1 -0
  749. package/dist/presentation/cli/context.js +49 -0
  750. package/dist/presentation/cli/context.js.map +1 -0
  751. package/dist/presentation/cli/help.js +49 -0
  752. package/dist/presentation/cli/help.js.map +1 -0
  753. package/dist/presentation/cli/io.js +13 -0
  754. package/dist/presentation/cli/io.js.map +1 -0
  755. package/dist/presentation/cli/local/clean.js +72 -0
  756. package/dist/presentation/cli/local/clean.js.map +1 -0
  757. package/dist/presentation/cli/local/config-check.js +207 -0
  758. package/dist/presentation/cli/local/config-check.js.map +1 -0
  759. package/dist/presentation/cli/local/init.js +44 -0
  760. package/dist/presentation/cli/local/init.js.map +1 -0
  761. package/dist/presentation/cli/options.js +34 -0
  762. package/dist/presentation/cli/options.js.map +1 -0
  763. package/dist/presentation/cli/probe.js +12 -0
  764. package/dist/presentation/cli/probe.js.map +1 -0
  765. package/dist/presentation/cli/program.js +76 -0
  766. package/dist/presentation/cli/program.js.map +1 -0
  767. package/dist/presentation/cli/setup/actions.js +206 -0
  768. package/dist/presentation/cli/setup/actions.js.map +1 -0
  769. package/dist/presentation/cli/setup/command.js +80 -0
  770. package/dist/presentation/cli/setup/command.js.map +1 -0
  771. package/dist/presentation/cli/setup/host.js +20 -0
  772. package/dist/presentation/cli/setup/host.js.map +1 -0
  773. package/dist/presentation/cli/setup/index.js +5 -0
  774. package/dist/presentation/cli/setup/index.js.map +1 -0
  775. package/dist/presentation/cli/setup/run.js +63 -0
  776. package/dist/presentation/cli/setup/run.js.map +1 -0
  777. package/dist/presentation/cli/setup/system.js +53 -0
  778. package/dist/presentation/cli/setup/system.js.map +1 -0
  779. package/dist/presentation/cli/setup/types.js +3 -0
  780. package/dist/presentation/cli/setup/types.js.map +1 -0
  781. package/dist/presentation/cli/watch.js +24 -0
  782. package/dist/presentation/cli/watch.js.map +1 -0
  783. package/dist/presentation/cli/web-control.js +172 -0
  784. package/dist/presentation/cli/web-control.js.map +1 -0
  785. package/dist/presentation/format/groups.js +99 -0
  786. package/dist/presentation/format/groups.js.map +1 -0
  787. package/dist/presentation/format/index.js +7 -0
  788. package/dist/presentation/format/index.js.map +1 -0
  789. package/dist/presentation/format/queue.js +109 -0
  790. package/dist/presentation/format/queue.js.map +1 -0
  791. package/dist/presentation/format/runs.js +202 -0
  792. package/dist/presentation/format/runs.js.map +1 -0
  793. package/dist/presentation/format/style.js +81 -0
  794. package/dist/presentation/format/style.js.map +1 -0
  795. package/dist/presentation/format/table.js +62 -0
  796. package/dist/presentation/format/table.js.map +1 -0
  797. package/dist/presentation/format/tags.js +26 -0
  798. package/dist/presentation/format/tags.js.map +1 -0
  799. package/dist/presentation/ipc/client/autostart.js +171 -0
  800. package/dist/presentation/ipc/client/autostart.js.map +1 -0
  801. package/dist/presentation/ipc/client/client.js +83 -0
  802. package/dist/presentation/ipc/client/client.js.map +1 -0
  803. package/dist/presentation/ipc/client/index.js +4 -0
  804. package/dist/presentation/ipc/client/index.js.map +1 -0
  805. package/dist/presentation/ipc/client/repository-argument.js +13 -0
  806. package/dist/presentation/ipc/client/repository-argument.js.map +1 -0
  807. package/dist/presentation/ipc/contract/agents.js +79 -0
  808. package/dist/presentation/ipc/contract/agents.js.map +1 -0
  809. package/dist/presentation/ipc/contract/artifacts.js +27 -0
  810. package/dist/presentation/ipc/contract/artifacts.js.map +1 -0
  811. package/dist/presentation/ipc/contract/config.js +141 -0
  812. package/dist/presentation/ipc/contract/config.js.map +1 -0
  813. package/dist/presentation/ipc/contract/envelope.js +97 -0
  814. package/dist/presentation/ipc/contract/envelope.js.map +1 -0
  815. package/dist/presentation/ipc/contract/groups.js +48 -0
  816. package/dist/presentation/ipc/contract/groups.js.map +1 -0
  817. package/dist/presentation/ipc/contract/index.js +14 -0
  818. package/dist/presentation/ipc/contract/index.js.map +1 -0
  819. package/dist/presentation/ipc/contract/observers/history.js +26 -0
  820. package/dist/presentation/ipc/contract/observers/history.js.map +1 -0
  821. package/dist/presentation/ipc/contract/observers.js +16 -0
  822. package/dist/presentation/ipc/contract/observers.js.map +1 -0
  823. package/dist/presentation/ipc/contract/panel.js +53 -0
  824. package/dist/presentation/ipc/contract/panel.js.map +1 -0
  825. package/dist/presentation/ipc/contract/processes.js +9 -0
  826. package/dist/presentation/ipc/contract/processes.js.map +1 -0
  827. package/dist/presentation/ipc/contract/queue.js +115 -0
  828. package/dist/presentation/ipc/contract/queue.js.map +1 -0
  829. package/dist/presentation/ipc/contract/repositories.js +33 -0
  830. package/dist/presentation/ipc/contract/repositories.js.map +1 -0
  831. package/dist/presentation/ipc/contract/responses/artifacts.js +2 -0
  832. package/dist/presentation/ipc/contract/responses/artifacts.js.map +1 -0
  833. package/dist/presentation/ipc/contract/responses/config.js +2 -0
  834. package/dist/presentation/ipc/contract/responses/config.js.map +1 -0
  835. package/dist/presentation/ipc/contract/responses/groups.js +2 -0
  836. package/dist/presentation/ipc/contract/responses/groups.js.map +1 -0
  837. package/dist/presentation/ipc/contract/responses/index.js +11 -0
  838. package/dist/presentation/ipc/contract/responses/index.js.map +1 -0
  839. package/dist/presentation/ipc/contract/responses/observer-history.js +2 -0
  840. package/dist/presentation/ipc/contract/responses/observer-history.js.map +1 -0
  841. package/dist/presentation/ipc/contract/responses/observers.js +2 -0
  842. package/dist/presentation/ipc/contract/responses/observers.js.map +1 -0
  843. package/dist/presentation/ipc/contract/responses/processes.js +2 -0
  844. package/dist/presentation/ipc/contract/responses/processes.js.map +1 -0
  845. package/dist/presentation/ipc/contract/responses/queue.js +2 -0
  846. package/dist/presentation/ipc/contract/responses/queue.js.map +1 -0
  847. package/dist/presentation/ipc/contract/responses/repositories.js +2 -0
  848. package/dist/presentation/ipc/contract/responses/repositories.js.map +1 -0
  849. package/dist/presentation/ipc/contract/responses/runs.js +2 -0
  850. package/dist/presentation/ipc/contract/responses/runs.js.map +1 -0
  851. package/dist/presentation/ipc/contract/responses/tags.js +2 -0
  852. package/dist/presentation/ipc/contract/responses/tags.js.map +1 -0
  853. package/dist/presentation/ipc/contract/runs.js +112 -0
  854. package/dist/presentation/ipc/contract/runs.js.map +1 -0
  855. package/dist/presentation/ipc/contract/tags.js +40 -0
  856. package/dist/presentation/ipc/contract/tags.js.map +1 -0
  857. package/dist/presentation/ipc/handlers/config.js +38 -0
  858. package/dist/presentation/ipc/handlers/config.js.map +1 -0
  859. package/dist/presentation/ipc/handlers/groups.js +14 -0
  860. package/dist/presentation/ipc/handlers/groups.js.map +1 -0
  861. package/dist/presentation/ipc/handlers/index.js +2 -0
  862. package/dist/presentation/ipc/handlers/index.js.map +1 -0
  863. package/dist/presentation/ipc/handlers/observers.js +14 -0
  864. package/dist/presentation/ipc/handlers/observers.js.map +1 -0
  865. package/dist/presentation/ipc/handlers/queue.js +36 -0
  866. package/dist/presentation/ipc/handlers/queue.js.map +1 -0
  867. package/dist/presentation/ipc/handlers/repositories.js +26 -0
  868. package/dist/presentation/ipc/handlers/repositories.js.map +1 -0
  869. package/dist/presentation/ipc/handlers/runs.js +55 -0
  870. package/dist/presentation/ipc/handlers/runs.js.map +1 -0
  871. package/dist/presentation/ipc/handlers/system.js +38 -0
  872. package/dist/presentation/ipc/handlers/system.js.map +1 -0
  873. package/dist/presentation/ipc/handlers/table.js +23 -0
  874. package/dist/presentation/ipc/handlers/table.js.map +1 -0
  875. package/dist/presentation/ipc/handlers/types.js +2 -0
  876. package/dist/presentation/ipc/handlers/types.js.map +1 -0
  877. package/dist/presentation/ipc/publisher.js +175 -0
  878. package/dist/presentation/ipc/publisher.js.map +1 -0
  879. package/dist/presentation/ipc/server.js +164 -0
  880. package/dist/presentation/ipc/server.js.map +1 -0
  881. package/dist/presentation/ipc/services.js +2 -0
  882. package/dist/presentation/ipc/services.js.map +1 -0
  883. package/dist/presentation/ipc/snapshots.js +60 -0
  884. package/dist/presentation/ipc/snapshots.js.map +1 -0
  885. package/dist/presentation/ipc/views/catalog.js +9 -0
  886. package/dist/presentation/ipc/views/catalog.js.map +1 -0
  887. package/dist/presentation/ipc/views/groups.js +112 -0
  888. package/dist/presentation/ipc/views/groups.js.map +1 -0
  889. package/dist/presentation/ipc/views/index.js +10 -0
  890. package/dist/presentation/ipc/views/index.js.map +1 -0
  891. package/dist/presentation/ipc/views/observer-history.js +26 -0
  892. package/dist/presentation/ipc/views/observer-history.js.map +1 -0
  893. package/dist/presentation/ipc/views/observers.js +16 -0
  894. package/dist/presentation/ipc/views/observers.js.map +1 -0
  895. package/dist/presentation/ipc/views/queue.js +151 -0
  896. package/dist/presentation/ipc/views/queue.js.map +1 -0
  897. package/dist/presentation/ipc/views/repositories.js +34 -0
  898. package/dist/presentation/ipc/views/repositories.js.map +1 -0
  899. package/dist/presentation/ipc/views/rows.js +117 -0
  900. package/dist/presentation/ipc/views/rows.js.map +1 -0
  901. package/dist/presentation/ipc/views/run-stages.js +66 -0
  902. package/dist/presentation/ipc/views/run-stages.js.map +1 -0
  903. package/dist/presentation/ipc/views/runs.js +201 -0
  904. package/dist/presentation/ipc/views/runs.js.map +1 -0
  905. package/dist/presentation/ipc/views/tags.js +19 -0
  906. package/dist/presentation/ipc/views/tags.js.map +1 -0
  907. package/dist/presentation/mcp/host-kit.js +67 -0
  908. package/dist/presentation/mcp/host-kit.js.map +1 -0
  909. package/dist/presentation/mcp/host-queue-control.js +135 -0
  910. package/dist/presentation/mcp/host-queue-control.js.map +1 -0
  911. package/dist/presentation/mcp/host-queue.js +124 -0
  912. package/dist/presentation/mcp/host-queue.js.map +1 -0
  913. package/dist/presentation/mcp/host-runs.js +173 -0
  914. package/dist/presentation/mcp/host-runs.js.map +1 -0
  915. package/dist/presentation/mcp/host.js +34 -0
  916. package/dist/presentation/mcp/host.js.map +1 -0
  917. package/dist/presentation/mcp/index.js +3 -0
  918. package/dist/presentation/mcp/index.js.map +1 -0
  919. package/dist/presentation/mcp/tools.js +19 -0
  920. package/dist/presentation/mcp/tools.js.map +1 -0
  921. package/dist/presentation/mcp/worker-extra.js +144 -0
  922. package/dist/presentation/mcp/worker-extra.js.map +1 -0
  923. package/dist/presentation/mcp/worker-tools.js +107 -0
  924. package/dist/presentation/mcp/worker-tools.js.map +1 -0
  925. package/dist/presentation/mcp/worker.js +12 -0
  926. package/dist/presentation/mcp/worker.js.map +1 -0
  927. package/dist/presentation/web/errors.js +60 -0
  928. package/dist/presentation/web/errors.js.map +1 -0
  929. package/dist/presentation/web/http.js +130 -0
  930. package/dist/presentation/web/http.js.map +1 -0
  931. package/dist/presentation/web/hub.js +164 -0
  932. package/dist/presentation/web/hub.js.map +1 -0
  933. package/dist/presentation/web/index.js +7 -0
  934. package/dist/presentation/web/index.js.map +1 -0
  935. package/dist/presentation/web/options.js +7 -0
  936. package/dist/presentation/web/options.js.map +1 -0
  937. package/dist/presentation/web/pages.js +44 -0
  938. package/dist/presentation/web/pages.js.map +1 -0
  939. package/dist/presentation/web/panel/daemon-panel.js +207 -0
  940. package/dist/presentation/web/panel/daemon-panel.js.map +1 -0
  941. package/dist/presentation/web/panel/default-repository.js +14 -0
  942. package/dist/presentation/web/panel/default-repository.js.map +1 -0
  943. package/dist/presentation/web/panel/directories.js +48 -0
  944. package/dist/presentation/web/panel/directories.js.map +1 -0
  945. package/dist/presentation/web/panel/open.js +12 -0
  946. package/dist/presentation/web/panel/open.js.map +1 -0
  947. package/dist/presentation/web/panel/standby.js +119 -0
  948. package/dist/presentation/web/panel/standby.js.map +1 -0
  949. package/dist/presentation/web/panel/state.js +69 -0
  950. package/dist/presentation/web/panel/state.js.map +1 -0
  951. package/dist/presentation/web/panel/system.js +66 -0
  952. package/dist/presentation/web/panel/system.js.map +1 -0
  953. package/dist/presentation/web/request.js +123 -0
  954. package/dist/presentation/web/request.js.map +1 -0
  955. package/dist/presentation/web/routes/config.js +166 -0
  956. package/dist/presentation/web/routes/config.js.map +1 -0
  957. package/dist/presentation/web/routes/directories.js +60 -0
  958. package/dist/presentation/web/routes/directories.js.map +1 -0
  959. package/dist/presentation/web/routes/downloads.js +65 -0
  960. package/dist/presentation/web/routes/downloads.js.map +1 -0
  961. package/dist/presentation/web/routes/groups.js +85 -0
  962. package/dist/presentation/web/routes/groups.js.map +1 -0
  963. package/dist/presentation/web/routes/observers/history.js +19 -0
  964. package/dist/presentation/web/routes/observers/history.js.map +1 -0
  965. package/dist/presentation/web/routes/processes.js +21 -0
  966. package/dist/presentation/web/routes/processes.js.map +1 -0
  967. package/dist/presentation/web/routes/queue.js +80 -0
  968. package/dist/presentation/web/routes/queue.js.map +1 -0
  969. package/dist/presentation/web/routes/repositories.js +66 -0
  970. package/dist/presentation/web/routes/repositories.js.map +1 -0
  971. package/dist/presentation/web/routes/runs.js +76 -0
  972. package/dist/presentation/web/routes/runs.js.map +1 -0
  973. package/dist/presentation/web/routes/settings.js +74 -0
  974. package/dist/presentation/web/routes/settings.js.map +1 -0
  975. package/dist/presentation/web/routes/specialists.js +74 -0
  976. package/dist/presentation/web/routes/specialists.js.map +1 -0
  977. package/dist/presentation/web/routes/system.js +96 -0
  978. package/dist/presentation/web/routes/system.js.map +1 -0
  979. package/dist/presentation/web/routes/tags.js +46 -0
  980. package/dist/presentation/web/routes/tags.js.map +1 -0
  981. package/dist/presentation/web/routes/types.js +2 -0
  982. package/dist/presentation/web/routes/types.js.map +1 -0
  983. package/dist/presentation/web/server.js +185 -0
  984. package/dist/presentation/web/server.js.map +1 -0
  985. package/dist/protocol/autostart.js +171 -0
  986. package/dist/protocol/autostart.js.map +1 -0
  987. package/dist/protocol/build.js +38 -0
  988. package/dist/protocol/build.js.map +1 -0
  989. package/dist/protocol/catalog.js +18 -0
  990. package/dist/protocol/catalog.js.map +1 -0
  991. package/dist/protocol/client.js +83 -0
  992. package/dist/protocol/client.js.map +1 -0
  993. package/dist/protocol/format.js +477 -0
  994. package/dist/protocol/format.js.map +1 -0
  995. package/dist/protocol/index.js +11 -0
  996. package/dist/protocol/index.js.map +1 -0
  997. package/dist/protocol/messages.js +598 -0
  998. package/dist/protocol/messages.js.map +1 -0
  999. package/dist/protocol/style.js +81 -0
  1000. package/dist/protocol/style.js.map +1 -0
  1001. package/dist/protocol/transcript.js +49 -0
  1002. package/dist/protocol/transcript.js.map +1 -0
  1003. package/dist/protocol/views.js +696 -0
  1004. package/dist/protocol/views.js.map +1 -0
  1005. package/dist/runtime/catalog.js +117 -0
  1006. package/dist/runtime/catalog.js.map +1 -0
  1007. package/dist/runtime/claude.js +399 -0
  1008. package/dist/runtime/claude.js.map +1 -0
  1009. package/dist/runtime/index.js +34 -0
  1010. package/dist/runtime/index.js.map +1 -0
  1011. package/dist/runtime/message.js +48 -0
  1012. package/dist/runtime/message.js.map +1 -0
  1013. package/dist/runtime/naming.js +69 -0
  1014. package/dist/runtime/naming.js.map +1 -0
  1015. package/dist/runtime/opencode.js +189 -0
  1016. package/dist/runtime/opencode.js.map +1 -0
  1017. package/dist/runtime/skills.js +17 -0
  1018. package/dist/runtime/skills.js.map +1 -0
  1019. package/dist/runtime/transcript.js +227 -0
  1020. package/dist/runtime/transcript.js.map +1 -0
  1021. package/dist/runtime/types.js +12 -0
  1022. package/dist/runtime/types.js.map +1 -0
  1023. package/dist/runtime/which.js +21 -0
  1024. package/dist/runtime/which.js.map +1 -0
  1025. package/dist/store/index.js +3 -0
  1026. package/dist/store/index.js.map +1 -0
  1027. package/dist/store/schema.js +286 -0
  1028. package/dist/store/schema.js.map +1 -0
  1029. package/dist/store/store.js +491 -0
  1030. package/dist/store/store.js.map +1 -0
  1031. package/dist/web/assets/EntryList-CnfGgjEY.js +1 -0
  1032. package/dist/web/assets/FilePath-C0X8-keS.js +1 -0
  1033. package/dist/web/assets/SettingsForm-BcyBWJbn.js +1 -0
  1034. package/dist/web/assets/SharedPipelinesGroup-a368-IQ0.js +1 -0
  1035. package/dist/web/assets/card-DkikoTxR.js +1 -0
  1036. package/dist/web/assets/deliveryModes-funlvXVC.js +1 -0
  1037. package/dist/web/assets/index-B-oJ93zH.js +22 -0
  1038. package/dist/web/assets/index-BZE36gYR.css +2 -0
  1039. package/dist/web/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
  1040. package/dist/web/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
  1041. package/dist/web/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
  1042. package/dist/web/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
  1043. package/dist/web/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
  1044. package/dist/web/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
  1045. package/dist/web/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
  1046. package/dist/web/assets/locales-DtRrxYzg.js +1 -0
  1047. package/dist/web/assets/pipelines-D48ggDNe.js +1 -0
  1048. package/dist/web/assets/queue-D8_RY4IY.js +16 -0
  1049. package/dist/web/assets/rolldown-runtime-XKyaHtl9.js +1 -0
  1050. package/dist/web/assets/select-J4oIrmYh.js +1 -0
  1051. package/dist/web/assets/settings-B0-0Vaia.js +2 -0
  1052. package/dist/web/assets/skeleton-CCKCQF5n.js +1 -0
  1053. package/dist/web/assets/specialists-DH8tyluO.js +1 -0
  1054. package/dist/web/assets/switch-CWFAgxG1.js +41 -0
  1055. package/dist/web/assets/topology-CNQ28AB2.js +7 -0
  1056. package/dist/web/assets/topology-DLioOiRN.css +1 -0
  1057. package/dist/web/assets/vendor-markdown-DwXfjc7L.js +32 -0
  1058. package/dist/web/assets/vendor-react-C1iE8mnY.js +9 -0
  1059. package/dist/web/index.html +21 -0
  1060. package/integrations/claude-code/.claude-plugin/plugin.json +19 -0
  1061. package/integrations/claude-code/commands/apply.md +6 -0
  1062. package/integrations/claude-code/commands/panel.md +6 -0
  1063. package/integrations/claude-code/commands/run.md +6 -0
  1064. package/integrations/claude-code/commands/status.md +6 -0
  1065. package/integrations/claude-code/commands/web.md +6 -0
  1066. package/integrations/claude-code/hooks/aip.ts +365 -0
  1067. package/integrations/claude-code/hooks/feed.ts +923 -0
  1068. package/integrations/claude-code/hooks/hooks.json +1 -0
  1069. package/integrations/claude-code/hooks/pane.ts +396 -0
  1070. package/integrations/claude-code/hooks/register.tsx +156 -0
  1071. package/integrations/claude-code/hooks/theme.ts +59 -0
  1072. package/integrations/claude-code/hooks/transcript.tsx +44 -0
  1073. package/integrations/claude-code/hooks/view.tsx +378 -0
  1074. package/integrations/claude-code/hooks/web.ts +162 -0
  1075. package/integrations/claude-code/tsconfig.json +18 -0
  1076. package/integrations/claude-code/types/index.d.ts +89 -0
  1077. package/package.json +70 -4
  1078. package/templates/aip/pipelines/feature.yaml +4 -0
  1079. package/templates/aip/settings.yaml +10 -0
  1080. package/templates/aip/specialists/coder.yaml +4 -0
  1081. package/templates/aip/specialists/reviewer.yaml +5 -0
@@ -0,0 +1,366 @@
1
+ import { appendFileSync, existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, statSync, } from 'node:fs';
2
+ import { tmpdir } from 'node:os';
3
+ import { dirname, isAbsolute, join, relative, sep } from 'node:path';
4
+ import { GitError, git, runGit } from './runner.js';
5
+ export const MINIMUM_GIT_VERSION = [2, 20];
6
+ export async function gitVersion() {
7
+ const output = await git(process.cwd(), '--version');
8
+ const match = /(\d+)\.(\d+)(?:\.(\d+))?/.exec(output);
9
+ if (!match)
10
+ throw new Error(`cannot parse git version from "${output}"`);
11
+ const [major, minor] = [Number(match[1]), Number(match[2])];
12
+ const [needMajor, needMinor] = MINIMUM_GIT_VERSION;
13
+ if (major < needMajor || (major === needMajor && minor < needMinor)) {
14
+ throw new Error(`git ${match[0]} is too old; aip needs ${needMajor}.${needMinor} or newer`);
15
+ }
16
+ return match[0];
17
+ }
18
+ export async function repositoryRoot(directory) {
19
+ try {
20
+ return await git(directory, 'rev-parse', '--show-toplevel');
21
+ }
22
+ catch (error) {
23
+ if (error instanceof GitError)
24
+ throw new Error(`${directory} is not inside a git repository`);
25
+ throw error;
26
+ }
27
+ }
28
+ const HEAD_BASE = { workingTree: false, include: [], snapshotRef: null };
29
+ export async function prepareRunBranch(repository, branch, base = HEAD_BASE) {
30
+ const head = await git(repository, 'rev-parse', '--verify', 'HEAD^{commit}');
31
+ const dirty = (await git(repository, 'status', '--porcelain')) !== '';
32
+ const baseCommit = base.workingTree || base.include.length > 0
33
+ ? await snapshotCommit(repository, base.workingTree, base.include)
34
+ : head;
35
+ if (baseCommit !== head && base.snapshotRef !== null) {
36
+ await git(repository, 'update-ref', base.snapshotRef, baseCommit);
37
+ }
38
+ if (isRef(branch))
39
+ await git(repository, 'update-ref', branch, baseCommit);
40
+ else
41
+ await git(repository, 'branch', branch, baseCommit);
42
+ return { baseCommit, dirty: dirty && !base.workingTree };
43
+ }
44
+ /** Paths of `include` that exist in the directory, relative to it. */
45
+ export function existingPaths(directory, include) {
46
+ return include
47
+ .map((path) => path.replace(/\/+$/, ''))
48
+ .filter((path) => path !== '' && existsSync(join(directory, path)));
49
+ }
50
+ /**
51
+ * Commits the working tree of `repository` on top of `HEAD` without touching the user's index,
52
+ * branch or files: every change, deletion and untracked file that git does not ignore, plus the
53
+ * `include` paths even when git ignores them. With `workingTree` false only `include` is added.
54
+ * Returns `HEAD` itself when the result is the same tree.
55
+ */
56
+ export async function snapshotCommit(repository, workingTree, include) {
57
+ const directory = mkdtempSync(join(tmpdir(), 'aip-snapshot-'));
58
+ const env = { GIT_INDEX_FILE: join(directory, 'index') };
59
+ try {
60
+ await runGit(repository, ['read-tree', 'HEAD'], { env });
61
+ if (workingTree)
62
+ await runGit(repository, ['add', '-A'], { env });
63
+ const extra = existingPaths(repository, include);
64
+ if (extra.length > 0)
65
+ await runGit(repository, ['add', '-A', '-f', '--', ...extra], { env });
66
+ const tree = (await runGit(repository, ['write-tree'], { env })).stdout.trim();
67
+ const head = await git(repository, 'rev-parse', 'HEAD');
68
+ if (tree === (await git(repository, 'rev-parse', 'HEAD^{tree}')))
69
+ return head;
70
+ return await git(repository, 'commit-tree', tree, '-p', head, '-m', 'aip: snapshot of the working tree');
71
+ }
72
+ finally {
73
+ rmSync(directory, { recursive: true, force: true });
74
+ }
75
+ }
76
+ export function isRef(name) {
77
+ return name.startsWith('refs/');
78
+ }
79
+ export async function refExists(repository, ref) {
80
+ const result = await runGit(repository, ['rev-parse', '--verify', '--quiet', `${ref}^{commit}`], {
81
+ allowFailure: true,
82
+ });
83
+ return result.code === 0;
84
+ }
85
+ export function workspaceRoot(repository, workspaceDir) {
86
+ return isAbsolute(workspaceDir) ? workspaceDir : join(repository, workspaceDir);
87
+ }
88
+ export function runWorktreeRoot(workspace, runId) {
89
+ return join(workspace, 'worktrees', runId);
90
+ }
91
+ export function attemptDirectory(workspace, runId, group, seq) {
92
+ return join(workspace, 'logs', runId, group, String(seq));
93
+ }
94
+ export async function excludeWorkspace(repository, workspace) {
95
+ const path = relative(repository, workspace);
96
+ if (path === '' || path.startsWith('..') || isAbsolute(path))
97
+ return false;
98
+ const pattern = `/${path.split(sep).join('/')}/`;
99
+ const excludeFile = await git(repository, 'rev-parse', '--path-format=absolute', '--git-path', 'info/exclude');
100
+ const current = existsSync(excludeFile) ? readFileSync(excludeFile, 'utf8') : '';
101
+ if (current.split('\n').some((line) => line.trim() === pattern))
102
+ return false;
103
+ mkdirSync(dirname(excludeFile), { recursive: true });
104
+ appendFileSync(excludeFile, `${current === '' || current.endsWith('\n') ? '' : '\n'}${pattern}\n`);
105
+ return true;
106
+ }
107
+ export const RUN_WORKTREE = '_run';
108
+ export async function ensureWorktree(repository, path, branch, from) {
109
+ if (existsSync(join(path, '.git')))
110
+ return path;
111
+ if (isRef(branch)) {
112
+ if (from !== null && !(await refExists(repository, branch))) {
113
+ await git(repository, 'update-ref', branch, `${from}^{commit}`);
114
+ }
115
+ await git(repository, 'worktree', 'add', '--detach', path, branch);
116
+ return path;
117
+ }
118
+ const args = from === null
119
+ ? ['worktree', 'add', path, branch]
120
+ : ['worktree', 'add', '-b', branch, path, from];
121
+ await git(repository, ...args);
122
+ return path;
123
+ }
124
+ export function commitMessage(group, step, summary) {
125
+ const firstLine = summary
126
+ .split('\n')
127
+ .find((line) => line.trim() !== '')
128
+ ?.trim() ?? step;
129
+ const subject = `aip(${group}/${step}): ${firstLine}`;
130
+ return subject.length > 100 ? `${subject.slice(0, 99)}…` : subject;
131
+ }
132
+ export async function commitAll(worktree, message, ref = null, include = []) {
133
+ await git(worktree, 'add', '-A');
134
+ const extra = existingPaths(worktree, include);
135
+ if (extra.length > 0)
136
+ await git(worktree, 'add', '-A', '-f', '--', ...extra);
137
+ const staged = await runGit(worktree, ['diff', '--cached', '--quiet'], { allowFailure: true });
138
+ const merging = existsSync(await gitPath(worktree, 'MERGE_HEAD'));
139
+ if (staged.code === 0 && !merging)
140
+ return null;
141
+ await git(worktree, 'commit', '--no-verify', '--no-edit', '-m', message);
142
+ const commit = await git(worktree, 'rev-parse', 'HEAD');
143
+ if (ref !== null && isRef(ref))
144
+ await git(worktree, 'update-ref', ref, commit);
145
+ return commit;
146
+ }
147
+ async function gitPath(worktree, name) {
148
+ return git(worktree, 'rev-parse', '--path-format=absolute', '--git-path', name);
149
+ }
150
+ async function conflictedFiles(worktree) {
151
+ const output = await git(worktree, 'diff', '--name-only', '--diff-filter=U');
152
+ return output === '' ? [] : output.split('\n');
153
+ }
154
+ export async function mergeBranch(runWorktree, branch, message, target = null) {
155
+ const before = await git(runWorktree, 'rev-parse', 'HEAD');
156
+ const result = await runGit(runWorktree, ['merge', '--no-ff', '--no-edit', '-m', message, branch], {
157
+ allowFailure: true,
158
+ });
159
+ if (result.code === 0) {
160
+ const after = await git(runWorktree, 'rev-parse', 'HEAD');
161
+ if (target !== null && isRef(target))
162
+ await git(runWorktree, 'update-ref', target, after);
163
+ return { kind: 'merged', commit: after === before ? null : after };
164
+ }
165
+ const files = await conflictedFiles(runWorktree);
166
+ await runGit(runWorktree, ['merge', '--abort'], { allowFailure: true });
167
+ if (files.length === 0)
168
+ throw new GitError(['merge', branch], result.code, result.stderr || result.stdout);
169
+ return { kind: 'conflict', files };
170
+ }
171
+ export async function updateFromBranch(worktree, branch, target = null) {
172
+ const result = await runGit(worktree, ['merge', '--no-edit', branch], { allowFailure: true });
173
+ if (result.code === 0) {
174
+ const commit = await git(worktree, 'rev-parse', 'HEAD');
175
+ if (target !== null && isRef(target))
176
+ await git(worktree, 'update-ref', target, commit);
177
+ return { kind: 'merged', commit };
178
+ }
179
+ const files = await conflictedFiles(worktree);
180
+ if (files.length === 0)
181
+ throw new GitError(['merge', branch], result.code, result.stderr || result.stdout);
182
+ return { kind: 'conflict', files };
183
+ }
184
+ const HASH_BATCH = 100;
185
+ export function under(path, prefixes) {
186
+ return prefixes.some((prefix) => {
187
+ const clean = prefix.replace(/\/+$/, '');
188
+ return clean !== '' && (path === clean || path.startsWith(`${clean}/`));
189
+ });
190
+ }
191
+ /** Git blob hashes of the files' current content; 'missing' for what is not a file. */
192
+ export async function hashFiles(repository, paths) {
193
+ const result = new Map();
194
+ const present = [];
195
+ for (const path of paths) {
196
+ try {
197
+ if (statSync(join(repository, path)).isFile())
198
+ present.push(path);
199
+ else
200
+ result.set(path, 'missing');
201
+ }
202
+ catch {
203
+ result.set(path, 'missing');
204
+ }
205
+ }
206
+ for (let index = 0; index < present.length; index += HASH_BATCH) {
207
+ const batch = present.slice(index, index + HASH_BATCH);
208
+ const output = (await runGit(repository, ['hash-object', '--', ...batch])).stdout;
209
+ const hashes = output.split('\n');
210
+ batch.forEach((path, position) => result.set(path, hashes[position] ?? 'missing'));
211
+ }
212
+ return result;
213
+ }
214
+ export async function snapshotWorkingCopy(repository, options = {}) {
215
+ const exclude = options.exclude ?? [];
216
+ const head = await git(repository, 'rev-parse', '--verify', 'HEAD^{commit}');
217
+ const output = (await runGit(repository, ['status', '--porcelain=v1', '-z', '--untracked-files=all'])).stdout;
218
+ const paths = [];
219
+ const entries = output.split('\0');
220
+ for (let index = 0; index < entries.length; index += 1) {
221
+ const entry = entries[index] ?? '';
222
+ if (entry.length < 4)
223
+ continue;
224
+ const status = entry.slice(0, 2);
225
+ paths.push(entry.slice(3));
226
+ if (status.startsWith('R') || status.startsWith('C')) {
227
+ index += 1;
228
+ const source = entries[index];
229
+ if (source)
230
+ paths.push(source);
231
+ }
232
+ }
233
+ const kept = [...new Set(paths)].filter((path) => !under(path, exclude));
234
+ return { head, files: await hashFiles(repository, kept) };
235
+ }
236
+ /** Blob hashes of `paths` as the snapshot saw them: dirty files from it, the rest from its HEAD. */
237
+ export async function contentsAt(repository, snapshot, paths) {
238
+ const result = new Map();
239
+ const committed = [];
240
+ for (const path of paths) {
241
+ const dirty = snapshot.files.get(path);
242
+ if (dirty === undefined)
243
+ committed.push(path);
244
+ else
245
+ result.set(path, dirty);
246
+ }
247
+ for (let index = 0; index < committed.length; index += HASH_BATCH) {
248
+ const batch = committed.slice(index, index + HASH_BATCH);
249
+ const output = (await runGit(repository, ['ls-tree', '-r', '-z', snapshot.head, '--', ...batch])).stdout;
250
+ const found = new Map();
251
+ for (const line of output.split('\0')) {
252
+ const tab = line.indexOf('\t');
253
+ if (tab < 0)
254
+ continue;
255
+ const hash = line.slice(0, tab).split(' ')[2];
256
+ if (hash)
257
+ found.set(line.slice(tab + 1), hash);
258
+ }
259
+ for (const path of batch)
260
+ result.set(path, found.get(path) ?? 'missing');
261
+ }
262
+ return result;
263
+ }
264
+ /**
265
+ * Paths whose content differs between two snapshots. `overrides` replace the content of the
266
+ * `before` side for the paths they name (used to accept changes aip itself made).
267
+ */
268
+ export async function changedPaths(repository, before, after, overrides = new Map()) {
269
+ const candidates = new Set([...before.files.keys(), ...after.files.keys(), ...overrides.keys()]);
270
+ if (before.head !== after.head) {
271
+ const names = (await runGit(repository, ['diff', '--name-only', '-z', before.head, after.head]))
272
+ .stdout;
273
+ for (const name of names.split('\0'))
274
+ if (name !== '')
275
+ candidates.add(name);
276
+ }
277
+ const paths = [...candidates];
278
+ const [was, now] = await Promise.all([
279
+ contentsAt(repository, before, paths),
280
+ contentsAt(repository, after, paths),
281
+ ]);
282
+ return paths.filter((path) => (overrides.get(path) ?? was.get(path)) !== now.get(path)).sort();
283
+ }
284
+ /** Whether a run still has a worktree, hidden refs or group branches that `cleanRun` removes. */
285
+ export async function hasRunLeftovers(plan) {
286
+ try {
287
+ if (existsSync(plan.root))
288
+ return true;
289
+ if (plan.refPrefix !== null) {
290
+ const refs = await git(plan.repository, 'for-each-ref', '--count=1', '--format=%(refname)', plan.refPrefix);
291
+ if (refs !== '')
292
+ return true;
293
+ }
294
+ for (const branch of plan.groupBranches) {
295
+ const exists = await runGit(plan.repository, ['rev-parse', '--verify', '--quiet', `refs/heads/${branch}`], { allowFailure: true });
296
+ if (exists.code === 0)
297
+ return true;
298
+ }
299
+ return false;
300
+ }
301
+ catch {
302
+ return false;
303
+ }
304
+ }
305
+ export async function cleanRun(plan) {
306
+ if (plan.active)
307
+ throw new Error('the run is still active; cancel it or wait for it to finish');
308
+ const removed = [];
309
+ if (existsSync(plan.root)) {
310
+ const list = await git(plan.repository, 'worktree', 'list', '--porcelain');
311
+ const worktrees = list
312
+ .split('\n')
313
+ .filter((line) => line.startsWith('worktree '))
314
+ .map((line) => line.slice('worktree '.length))
315
+ .filter((path) => path.startsWith(plan.root));
316
+ for (const path of worktrees) {
317
+ await git(plan.repository, 'worktree', 'remove', '--force', path);
318
+ removed.push(path);
319
+ }
320
+ rmSync(plan.root, { recursive: true, force: true });
321
+ }
322
+ await git(plan.repository, 'worktree', 'prune');
323
+ if (plan.refPrefix !== null) {
324
+ const refs = await git(plan.repository, 'for-each-ref', '--format=%(refname)', plan.refPrefix);
325
+ for (const ref of refs === '' ? [] : refs.split('\n')) {
326
+ await git(plan.repository, 'update-ref', '-d', ref);
327
+ removed.push(ref);
328
+ }
329
+ }
330
+ const branches = plan.all ? [...plan.groupBranches, plan.runBranch] : plan.groupBranches;
331
+ for (const branch of branches) {
332
+ const exists = await runGit(plan.repository, ['rev-parse', '--verify', '--quiet', `refs/heads/${branch}`], {
333
+ allowFailure: true,
334
+ });
335
+ if (exists.code !== 0)
336
+ continue;
337
+ await git(plan.repository, 'branch', '-D', branch);
338
+ removed.push(branch);
339
+ }
340
+ return removed;
341
+ }
342
+ function lines(output) {
343
+ return output === '' ? [] : output.split('\n');
344
+ }
345
+ /** Paths under `pathspec` that differ from `base` in the working tree, including untracked files. */
346
+ export async function changedPathsSince(worktree, base, pathspec) {
347
+ const tracked = lines(await git(worktree, 'diff', '--name-only', base, '--', pathspec));
348
+ const untracked = lines(await git(worktree, 'ls-files', '--others', '--exclude-standard', '--', pathspec));
349
+ return [...new Set([...tracked, ...untracked])];
350
+ }
351
+ /** Paths under `pathspec` that exist in `to` and differ from `from`. */
352
+ export async function changedPathsBetween(repository, from, to, pathspec) {
353
+ return lines(await git(repository, 'diff', '--name-only', '--diff-filter=d', from, to, '--', pathspec));
354
+ }
355
+ /** The content of a file in a commit, or `null` when the commit has no such file. */
356
+ export async function readFileAt(repository, commit, path) {
357
+ try {
358
+ return (await runGit(repository, ['show', `${commit}:${path}`])).stdout;
359
+ }
360
+ catch (error) {
361
+ if (error instanceof GitError)
362
+ return null;
363
+ throw error;
364
+ }
365
+ }
366
+ //# sourceMappingURL=workspace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../src/git/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,UAAU,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,MAAM,EACN,QAAQ,GACT,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAErE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAEpD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,EAAE,EAAE,CAAU,CAAC;AAEpD,MAAM,CAAC,KAAK,UAAU,UAAU;IAC9B,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,WAAW,CAAC,CAAC;IACrD,MAAM,KAAK,GAAG,0BAA0B,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACtD,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,kCAAkC,MAAM,GAAG,CAA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