@hoknie/aip 0.1.0 → 0.2.1

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 (587) hide show
  1. package/dist/app/agents.js +2 -0
  2. package/dist/app/agents.js.map +1 -1
  3. package/dist/app/application.js +41 -3
  4. package/dist/app/application.js.map +1 -1
  5. package/dist/app/lifecycle.js +5 -1
  6. package/dist/app/lifecycle.js.map +1 -1
  7. package/dist/app/timings.js +1 -0
  8. package/dist/app/timings.js.map +1 -1
  9. package/dist/app/wiring.js +1 -0
  10. package/dist/app/wiring.js.map +1 -1
  11. package/dist/cli/main.js +0 -0
  12. package/dist/feature/agents/clients/agy/guard.js +26 -8
  13. package/dist/feature/agents/clients/agy/guard.js.map +1 -1
  14. package/dist/feature/agents/clients/agy/permissions.js +9 -1
  15. package/dist/feature/agents/clients/agy/permissions.js.map +1 -1
  16. package/dist/feature/agents/clients/agy/runtime.js +8 -1
  17. package/dist/feature/agents/clients/agy/runtime.js.map +1 -1
  18. package/dist/feature/agents/clients/claude/index.js +1 -0
  19. package/dist/feature/agents/clients/claude/index.js.map +1 -1
  20. package/dist/feature/agents/clients/claude/models.js +8 -0
  21. package/dist/feature/agents/clients/claude/models.js.map +1 -0
  22. package/dist/feature/agents/clients/claude/parser.js +8 -0
  23. package/dist/feature/agents/clients/claude/parser.js.map +1 -1
  24. package/dist/feature/agents/clients/claude/runtime.js +2 -0
  25. package/dist/feature/agents/clients/claude/runtime.js.map +1 -1
  26. package/dist/feature/agents/clients/opencode/index.js +1 -0
  27. package/dist/feature/agents/clients/opencode/index.js.map +1 -1
  28. package/dist/feature/agents/clients/opencode/models.js +38 -0
  29. package/dist/feature/agents/clients/opencode/models.js.map +1 -0
  30. package/dist/feature/agents/clients/opencode/runtime.js +14 -1
  31. package/dist/feature/agents/clients/opencode/runtime.js.map +1 -1
  32. package/dist/feature/agents/ports/command.js +2 -0
  33. package/dist/feature/agents/ports/command.js.map +1 -0
  34. package/dist/feature/agents/services/agents.js +42 -1
  35. package/dist/feature/agents/services/agents.js.map +1 -1
  36. package/dist/feature/agents/services/catalog.js +1 -1
  37. package/dist/feature/agents/services/catalog.js.map +1 -1
  38. package/dist/feature/agents/types/index.js +2 -0
  39. package/dist/feature/agents/types/index.js.map +1 -1
  40. package/dist/feature/agents/types/mcp/env.js +54 -0
  41. package/dist/feature/agents/types/mcp/env.js.map +1 -0
  42. package/dist/feature/agents/types/message.js +1 -0
  43. package/dist/feature/agents/types/message.js.map +1 -1
  44. package/dist/feature/agents/types/models.js +2 -0
  45. package/dist/feature/agents/types/models.js.map +1 -0
  46. package/dist/feature/agents/types/runtime.js.map +1 -1
  47. package/dist/feature/agents/types/worker-tools.js +2 -0
  48. package/dist/feature/agents/types/worker-tools.js.map +1 -1
  49. package/dist/feature/network/ports/changed.js +2 -0
  50. package/dist/feature/network/ports/changed.js.map +1 -0
  51. package/dist/feature/network/ports/index.js +2 -0
  52. package/dist/feature/network/ports/index.js.map +1 -0
  53. package/dist/feature/network/services/create.js +5 -0
  54. package/dist/feature/network/services/create.js.map +1 -0
  55. package/dist/feature/network/services/index.js +3 -0
  56. package/dist/feature/network/services/index.js.map +1 -0
  57. package/dist/feature/network/services/monitor.js +140 -0
  58. package/dist/feature/network/services/monitor.js.map +1 -0
  59. package/dist/feature/network/types/index.js +4 -0
  60. package/dist/feature/network/types/index.js.map +1 -0
  61. package/dist/feature/network/types/network.js +8 -0
  62. package/dist/feature/network/types/network.js.map +1 -0
  63. package/dist/feature/network/types/proxy.js +95 -0
  64. package/dist/feature/network/types/proxy.js.map +1 -0
  65. package/dist/feature/network/types/state.js +36 -0
  66. package/dist/feature/network/types/state.js.map +1 -0
  67. package/dist/feature/observers/repositories/observers.js +7 -1
  68. package/dist/feature/observers/repositories/observers.js.map +1 -1
  69. package/dist/feature/observers/services/observers.js +33 -5
  70. package/dist/feature/observers/services/observers.js.map +1 -1
  71. package/dist/feature/observers/services/settings-check.js +1 -7
  72. package/dist/feature/observers/services/settings-check.js.map +1 -1
  73. package/dist/feature/observers/types/plan-repairs.js +48 -16
  74. package/dist/feature/observers/types/plan-repairs.js.map +1 -1
  75. package/dist/feature/observers/types/settings.js +0 -1
  76. package/dist/feature/observers/types/settings.js.map +1 -1
  77. package/dist/feature/queue/repositories/queues.js +28 -4
  78. package/dist/feature/queue/repositories/queues.js.map +1 -1
  79. package/dist/feature/queue/services/control.js +46 -8
  80. package/dist/feature/queue/services/control.js.map +1 -1
  81. package/dist/feature/queue/services/store.js +4 -0
  82. package/dist/feature/queue/services/store.js.map +1 -1
  83. package/dist/feature/queue/services/task-tags.js +4 -1
  84. package/dist/feature/queue/services/task-tags.js.map +1 -1
  85. package/dist/feature/queue/types/advance.js +29 -12
  86. package/dist/feature/queue/types/advance.js.map +1 -1
  87. package/dist/feature/queue/types/filter.js +36 -0
  88. package/dist/feature/queue/types/filter.js.map +1 -0
  89. package/dist/feature/queue/types/index.js +1 -0
  90. package/dist/feature/queue/types/index.js.map +1 -1
  91. package/dist/feature/queue/types/items.js +1 -0
  92. package/dist/feature/queue/types/items.js.map +1 -1
  93. package/dist/feature/queue/types/returns.js +18 -3
  94. package/dist/feature/queue/types/returns.js.map +1 -1
  95. package/dist/feature/queue/types/settings.js +14 -3
  96. package/dist/feature/queue/types/settings.js.map +1 -1
  97. package/dist/feature/runs/machine/exits.js +23 -1
  98. package/dist/feature/runs/machine/exits.js.map +1 -1
  99. package/dist/feature/runs/machine/plan.js +38 -16
  100. package/dist/feature/runs/machine/plan.js.map +1 -1
  101. package/dist/feature/runs/machine/repair.js +10 -3
  102. package/dist/feature/runs/machine/repair.js.map +1 -1
  103. package/dist/feature/runs/machine/scheduler.js +10 -3
  104. package/dist/feature/runs/machine/scheduler.js.map +1 -1
  105. package/dist/feature/runs/machine/steps.js +11 -11
  106. package/dist/feature/runs/machine/steps.js.map +1 -1
  107. package/dist/feature/runs/machine/transition.js +16 -2
  108. package/dist/feature/runs/machine/transition.js.map +1 -1
  109. package/dist/feature/runs/repositories/finished-runs.js +14 -10
  110. package/dist/feature/runs/repositories/finished-runs.js.map +1 -1
  111. package/dist/feature/runs/repositories/write.js +1 -1
  112. package/dist/feature/runs/repositories/write.js.map +1 -1
  113. package/dist/feature/runs/services/create.js +1 -0
  114. package/dist/feature/runs/services/create.js.map +1 -1
  115. package/dist/feature/runs/services/effects/actions.js +3 -2
  116. package/dist/feature/runs/services/effects/actions.js.map +1 -1
  117. package/dist/feature/runs/services/effects/attempts.js +61 -13
  118. package/dist/feature/runs/services/effects/attempts.js.map +1 -1
  119. package/dist/feature/runs/services/effects/context.js.map +1 -1
  120. package/dist/feature/runs/services/effects/effects.js +5 -0
  121. package/dist/feature/runs/services/effects/effects.js.map +1 -1
  122. package/dist/feature/runs/services/effects/naming.js +4 -1
  123. package/dist/feature/runs/services/effects/naming.js.map +1 -1
  124. package/dist/feature/runs/services/effects/proxy.js +5 -0
  125. package/dist/feature/runs/services/effects/proxy.js.map +1 -0
  126. package/dist/feature/runs/services/effects/runtime-check.js +20 -0
  127. package/dist/feature/runs/services/effects/runtime-check.js.map +1 -0
  128. package/dist/feature/runs/services/engine.js +14 -5
  129. package/dist/feature/runs/services/engine.js.map +1 -1
  130. package/dist/feature/runs/services/index.js.map +1 -1
  131. package/dist/feature/runs/services/reads.js +40 -1
  132. package/dist/feature/runs/services/reads.js.map +1 -1
  133. package/dist/feature/runs/services/requests.js +7 -1
  134. package/dist/feature/runs/services/requests.js.map +1 -1
  135. package/dist/feature/runs/services/states.js +2 -2
  136. package/dist/feature/runs/services/states.js.map +1 -1
  137. package/dist/feature/runs/types/attempt.js +8 -0
  138. package/dist/feature/runs/types/attempt.js.map +1 -1
  139. package/dist/feature/runs/types/group.js.map +1 -1
  140. package/dist/feature/runs/types/input.js +33 -0
  141. package/dist/feature/runs/types/input.js.map +1 -1
  142. package/dist/feature/runs/types/limits.js +13 -1
  143. package/dist/feature/runs/types/limits.js.map +1 -1
  144. package/dist/feature/stats/repositories/index.js +4 -0
  145. package/dist/feature/stats/repositories/index.js.map +1 -0
  146. package/dist/feature/stats/repositories/meta.js +19 -0
  147. package/dist/feature/stats/repositories/meta.js.map +1 -0
  148. package/dist/feature/stats/repositories/records.js +46 -0
  149. package/dist/feature/stats/repositories/records.js.map +1 -0
  150. package/dist/feature/stats/repositories/report.js +105 -0
  151. package/dist/feature/stats/repositories/report.js.map +1 -0
  152. package/dist/feature/stats/services/create.js +44 -0
  153. package/dist/feature/stats/services/create.js.map +1 -0
  154. package/dist/feature/stats/services/index.js +4 -0
  155. package/dist/feature/stats/services/index.js.map +1 -0
  156. package/dist/feature/stats/services/ledger.js +137 -0
  157. package/dist/feature/stats/services/ledger.js.map +1 -0
  158. package/dist/feature/stats/services/report.js +56 -0
  159. package/dist/feature/stats/services/report.js.map +1 -0
  160. package/dist/feature/stats/types/aggregate.js +179 -0
  161. package/dist/feature/stats/types/aggregate.js.map +1 -0
  162. package/dist/feature/stats/types/capture.js +79 -0
  163. package/dist/feature/stats/types/capture.js.map +1 -0
  164. package/dist/feature/stats/types/index.js +6 -0
  165. package/dist/feature/stats/types/index.js.map +1 -0
  166. package/dist/feature/stats/types/records.js +5 -0
  167. package/dist/feature/stats/types/records.js.map +1 -0
  168. package/dist/feature/stats/types/report.js +25 -0
  169. package/dist/feature/stats/types/report.js.map +1 -0
  170. package/dist/feature/stats/types/settings.js +2 -0
  171. package/dist/feature/stats/types/settings.js.map +1 -0
  172. package/dist/feature/swarm-config/services/assemble.js +1 -1
  173. package/dist/feature/swarm-config/services/assemble.js.map +1 -1
  174. package/dist/feature/swarm-config/services/index.js +4 -2
  175. package/dist/feature/swarm-config/services/index.js.map +1 -1
  176. package/dist/feature/swarm-config/services/load.js +17 -2
  177. package/dist/feature/swarm-config/services/load.js.map +1 -1
  178. package/dist/feature/swarm-config/services/sections/mcp-servers.js +128 -0
  179. package/dist/feature/swarm-config/services/sections/mcp-servers.js.map +1 -0
  180. package/dist/feature/swarm-config/services/sections/stats.js +28 -0
  181. package/dist/feature/swarm-config/services/sections/stats.js.map +1 -0
  182. package/dist/feature/swarm-config/services/settings.js +23 -1
  183. package/dist/feature/swarm-config/services/settings.js.map +1 -1
  184. package/dist/feature/swarm-config/services/validate-actions.js +9 -1
  185. package/dist/feature/swarm-config/services/validate-actions.js.map +1 -1
  186. package/dist/feature/swarm-config/services/validate-runtimes.js +3 -51
  187. package/dist/feature/swarm-config/services/validate-runtimes.js.map +1 -1
  188. package/dist/feature/swarm-config/services/validate-settings.js +65 -0
  189. package/dist/feature/swarm-config/services/validate-settings.js.map +1 -1
  190. package/dist/feature/swarm-config/services/validate-specialists.js +5 -4
  191. package/dist/feature/swarm-config/services/validate-specialists.js.map +1 -1
  192. package/dist/feature/swarm-config/services/validate.js +24 -8
  193. package/dist/feature/swarm-config/services/validate.js.map +1 -1
  194. package/dist/feature/swarm-config/types/action.js +9 -0
  195. package/dist/feature/swarm-config/types/action.js.map +1 -1
  196. package/dist/feature/swarm-config/types/index.js +1 -0
  197. package/dist/feature/swarm-config/types/index.js.map +1 -1
  198. package/dist/feature/swarm-config/types/mcp/reference.js +40 -0
  199. package/dist/feature/swarm-config/types/mcp/reference.js.map +1 -0
  200. package/dist/feature/swarm-config/types/merge.js +1 -0
  201. package/dist/feature/swarm-config/types/merge.js.map +1 -1
  202. package/dist/feature/swarm-config/types/settings.js +37 -5
  203. package/dist/feature/swarm-config/types/settings.js.map +1 -1
  204. package/dist/feature/swarm-config/types/specialist.js.map +1 -1
  205. package/dist/feature/swarm-edit/services/config-edits.js +26 -1
  206. package/dist/feature/swarm-edit/services/config-edits.js.map +1 -1
  207. package/dist/feature/swarm-edit/services/editor-settings.js +36 -7
  208. package/dist/feature/swarm-edit/services/editor-settings.js.map +1 -1
  209. package/dist/feature/swarm-edit/services/editor-view.js +2 -0
  210. package/dist/feature/swarm-edit/services/editor-view.js.map +1 -1
  211. package/dist/feature/swarm-edit/services/index.js +1 -0
  212. package/dist/feature/swarm-edit/services/index.js.map +1 -1
  213. package/dist/feature/swarm-edit/services/mcp/editor-mcp.js +51 -0
  214. package/dist/feature/swarm-edit/services/mcp/editor-mcp.js.map +1 -0
  215. package/dist/feature/swarm-edit/services/mcp/plan-mcp-server.js +93 -0
  216. package/dist/feature/swarm-edit/services/mcp/plan-mcp-server.js.map +1 -0
  217. package/dist/feature/swarm-edit/services/plan-settings.js +3 -1
  218. package/dist/feature/swarm-edit/services/plan-settings.js.map +1 -1
  219. package/dist/feature/swarm-edit/types/editor.js.map +1 -1
  220. package/dist/feature/swarm-edit/types/setting-fields.js +12 -0
  221. package/dist/feature/swarm-edit/types/setting-fields.js.map +1 -1
  222. package/dist/platform/git/delivery.js +1 -1
  223. package/dist/platform/git/delivery.js.map +1 -1
  224. package/dist/platform/network/index.js +4 -0
  225. package/dist/platform/network/index.js.map +1 -0
  226. package/dist/platform/network/interfaces.js +7 -0
  227. package/dist/platform/network/interfaces.js.map +1 -0
  228. package/dist/platform/network/probe.js +128 -0
  229. package/dist/platform/network/probe.js.map +1 -0
  230. package/dist/platform/network/tunnel.js +87 -0
  231. package/dist/platform/network/tunnel.js.map +1 -0
  232. package/dist/platform/process/command.js +23 -0
  233. package/dist/platform/process/command.js.map +1 -0
  234. package/dist/platform/process/index.js +1 -0
  235. package/dist/platform/process/index.js.map +1 -1
  236. package/dist/platform/sqlite/migrations.js +3 -0
  237. package/dist/platform/sqlite/migrations.js.map +1 -1
  238. package/dist/platform/sqlite/stats-migration.js +42 -0
  239. package/dist/platform/sqlite/stats-migration.js.map +1 -0
  240. package/dist/presentation/cli/commands/queue-edit.js +23 -1
  241. package/dist/presentation/cli/commands/queue-edit.js.map +1 -1
  242. package/dist/presentation/cli/commands/stats.js +41 -0
  243. package/dist/presentation/cli/commands/stats.js.map +1 -0
  244. package/dist/presentation/cli/help.js +1 -1
  245. package/dist/presentation/cli/help.js.map +1 -1
  246. package/dist/presentation/cli/local/config-check.js +23 -5
  247. package/dist/presentation/cli/local/config-check.js.map +1 -1
  248. package/dist/presentation/cli/program.js +2 -0
  249. package/dist/presentation/cli/program.js.map +1 -1
  250. package/dist/presentation/format/index.js +1 -0
  251. package/dist/presentation/format/index.js.map +1 -1
  252. package/dist/presentation/format/queue.js +15 -2
  253. package/dist/presentation/format/queue.js.map +1 -1
  254. package/dist/presentation/format/runs.js +8 -1
  255. package/dist/presentation/format/runs.js.map +1 -1
  256. package/dist/presentation/format/stats.js +79 -0
  257. package/dist/presentation/format/stats.js.map +1 -0
  258. package/dist/presentation/ipc/contract/agents.js +18 -0
  259. package/dist/presentation/ipc/contract/agents.js.map +1 -1
  260. package/dist/presentation/ipc/contract/config.js +26 -0
  261. package/dist/presentation/ipc/contract/config.js.map +1 -1
  262. package/dist/presentation/ipc/contract/envelope.js +4 -1
  263. package/dist/presentation/ipc/contract/envelope.js.map +1 -1
  264. package/dist/presentation/ipc/contract/groups.js +9 -0
  265. package/dist/presentation/ipc/contract/groups.js.map +1 -1
  266. package/dist/presentation/ipc/contract/index.js +1 -0
  267. package/dist/presentation/ipc/contract/index.js.map +1 -1
  268. package/dist/presentation/ipc/contract/panel.js +11 -0
  269. package/dist/presentation/ipc/contract/panel.js.map +1 -1
  270. package/dist/presentation/ipc/contract/queue.js +11 -1
  271. package/dist/presentation/ipc/contract/queue.js.map +1 -1
  272. package/dist/presentation/ipc/contract/responses/index.js +1 -0
  273. package/dist/presentation/ipc/contract/responses/index.js.map +1 -1
  274. package/dist/presentation/ipc/contract/responses/stats.js +67 -0
  275. package/dist/presentation/ipc/contract/responses/stats.js.map +1 -0
  276. package/dist/presentation/ipc/contract/runs.js +10 -0
  277. package/dist/presentation/ipc/contract/runs.js.map +1 -1
  278. package/dist/presentation/ipc/contract/stats/stats.js +20 -0
  279. package/dist/presentation/ipc/contract/stats/stats.js.map +1 -0
  280. package/dist/presentation/ipc/handlers/config.js +7 -0
  281. package/dist/presentation/ipc/handlers/config.js.map +1 -1
  282. package/dist/presentation/ipc/handlers/groups.js +8 -0
  283. package/dist/presentation/ipc/handlers/groups.js.map +1 -1
  284. package/dist/presentation/ipc/handlers/runs.js +2 -1
  285. package/dist/presentation/ipc/handlers/runs.js.map +1 -1
  286. package/dist/presentation/ipc/handlers/stats.js +17 -0
  287. package/dist/presentation/ipc/handlers/stats.js.map +1 -0
  288. package/dist/presentation/ipc/handlers/system.js +2 -0
  289. package/dist/presentation/ipc/handlers/system.js.map +1 -1
  290. package/dist/presentation/ipc/handlers/table.js +2 -0
  291. package/dist/presentation/ipc/handlers/table.js.map +1 -1
  292. package/dist/presentation/ipc/publisher.js +1 -0
  293. package/dist/presentation/ipc/publisher.js.map +1 -1
  294. package/dist/presentation/ipc/snapshots.js +2 -2
  295. package/dist/presentation/ipc/snapshots.js.map +1 -1
  296. package/dist/presentation/ipc/views/catalog.js +3 -3
  297. package/dist/presentation/ipc/views/catalog.js.map +1 -1
  298. package/dist/presentation/ipc/views/index.js +1 -0
  299. package/dist/presentation/ipc/views/index.js.map +1 -1
  300. package/dist/presentation/ipc/views/observers.js +2 -2
  301. package/dist/presentation/ipc/views/observers.js.map +1 -1
  302. package/dist/presentation/ipc/views/queue.js +9 -2
  303. package/dist/presentation/ipc/views/queue.js.map +1 -1
  304. package/dist/presentation/ipc/views/runs.js +3 -4
  305. package/dist/presentation/ipc/views/runs.js.map +1 -1
  306. package/dist/presentation/ipc/views/stats.js +5 -0
  307. package/dist/presentation/ipc/views/stats.js.map +1 -0
  308. package/dist/presentation/mcp/host-queue-control.js +11 -2
  309. package/dist/presentation/mcp/host-queue-control.js.map +1 -1
  310. package/dist/presentation/mcp/worker-extra.js +2 -2
  311. package/dist/presentation/mcp/worker-extra.js.map +1 -1
  312. package/dist/presentation/mcp/worker-read.js +45 -0
  313. package/dist/presentation/mcp/worker-read.js.map +1 -0
  314. package/dist/presentation/mcp/worker.js +2 -0
  315. package/dist/presentation/mcp/worker.js.map +1 -1
  316. package/dist/presentation/web/hub.js +4 -0
  317. package/dist/presentation/web/hub.js.map +1 -1
  318. package/dist/presentation/web/panel/directories.js +1 -1
  319. package/dist/presentation/web/panel/directories.js.map +1 -1
  320. package/dist/presentation/web/panel/system.js +1 -0
  321. package/dist/presentation/web/panel/system.js.map +1 -1
  322. package/dist/presentation/web/request.js +28 -1
  323. package/dist/presentation/web/request.js.map +1 -1
  324. package/dist/presentation/web/routes/catalog/mcp-servers.js +50 -0
  325. package/dist/presentation/web/routes/catalog/mcp-servers.js.map +1 -0
  326. package/dist/presentation/web/routes/config.js +5 -0
  327. package/dist/presentation/web/routes/config.js.map +1 -1
  328. package/dist/presentation/web/routes/runs.js +5 -0
  329. package/dist/presentation/web/routes/runs.js.map +1 -1
  330. package/dist/presentation/web/routes/stats/stats.js +22 -0
  331. package/dist/presentation/web/routes/stats/stats.js.map +1 -0
  332. package/dist/presentation/web/server.js +5 -1
  333. package/dist/presentation/web/server.js.map +1 -1
  334. package/dist/web/assets/FilterColumn-BrQWIM5F.js +1 -0
  335. package/dist/web/assets/SharedPipelinesGroup-WFngQrqI.js +1 -0
  336. package/dist/web/assets/badge-B_khFsd6.js +1 -0
  337. package/dist/web/assets/{card-DkikoTxR.js → card-COXjnc-y.js} +1 -1
  338. package/dist/web/assets/empty-Eb-EZDPX.js +41 -0
  339. package/dist/web/assets/index-DEXoIe2a.js +21 -0
  340. package/dist/web/assets/index-DMlIe0VD.css +2 -0
  341. package/dist/web/assets/locales-BlBJo1PR.js +1 -0
  342. package/dist/web/assets/pipelines-B3cdeex_.js +10 -0
  343. package/dist/web/assets/queue-HMUImu0E.js +16 -0
  344. package/dist/web/assets/select-MHus_Unr.js +1 -0
  345. package/dist/web/assets/settingFields-DVg9TQK2.js +1 -0
  346. package/dist/web/assets/settings-CpeEsUXX.js +6 -0
  347. package/dist/web/assets/skeleton-CWY1nRvW.js +1 -0
  348. package/dist/web/assets/specialists-BkLXuqUd.js +1 -0
  349. package/dist/web/assets/stats-DRg_5vll.js +1 -0
  350. package/dist/web/assets/topology-DGTNdDHf.js +1 -0
  351. package/dist/web/assets/trash-CFJeuRuc.js +1 -0
  352. package/dist/web/assets/useListDrag-B7Wlt2u9.js +1 -0
  353. package/dist/web/index.html +7 -6
  354. package/integrations/claude-code/.claude-plugin/plugin.json +1 -1
  355. package/package.json +1 -1
  356. package/dist/cli/clean.js +0 -71
  357. package/dist/cli/clean.js.map +0 -1
  358. package/dist/cli/commands.js +0 -963
  359. package/dist/cli/commands.js.map +0 -1
  360. package/dist/cli/config-check.js +0 -173
  361. package/dist/cli/config-check.js.map +0 -1
  362. package/dist/cli/daemon.js +0 -199
  363. package/dist/cli/daemon.js.map +0 -1
  364. package/dist/cli/help.js +0 -50
  365. package/dist/cli/help.js.map +0 -1
  366. package/dist/cli/init.js +0 -43
  367. package/dist/cli/init.js.map +0 -1
  368. package/dist/cli/io.js +0 -13
  369. package/dist/cli/io.js.map +0 -1
  370. package/dist/cli/probe.js +0 -12
  371. package/dist/cli/probe.js.map +0 -1
  372. package/dist/cli/program.js +0 -48
  373. package/dist/cli/program.js.map +0 -1
  374. package/dist/cli/setup.js +0 -406
  375. package/dist/cli/setup.js.map +0 -1
  376. package/dist/cli/version.js +0 -6
  377. package/dist/cli/version.js.map +0 -1
  378. package/dist/cli/watch.js +0 -24
  379. package/dist/cli/watch.js.map +0 -1
  380. package/dist/cli/web/daemon-panel.js +0 -185
  381. package/dist/cli/web/daemon-panel.js.map +0 -1
  382. package/dist/cli/web/default-repository.js +0 -12
  383. package/dist/cli/web/default-repository.js.map +0 -1
  384. package/dist/cli/web/errors.js +0 -60
  385. package/dist/cli/web/errors.js.map +0 -1
  386. package/dist/cli/web/open.js +0 -12
  387. package/dist/cli/web/open.js.map +0 -1
  388. package/dist/cli/web/page.js +0 -465
  389. package/dist/cli/web/page.js.map +0 -1
  390. package/dist/cli/web/server.js +0 -1191
  391. package/dist/cli/web/server.js.map +0 -1
  392. package/dist/cli/web/standby.js +0 -119
  393. package/dist/cli/web/standby.js.map +0 -1
  394. package/dist/cli/web/state.js +0 -69
  395. package/dist/cli/web/state.js.map +0 -1
  396. package/dist/cli/web/system.js +0 -66
  397. package/dist/cli/web/system.js.map +0 -1
  398. package/dist/cli/web-control.js +0 -173
  399. package/dist/cli/web-control.js.map +0 -1
  400. package/dist/config/discover.js +0 -25
  401. package/dist/config/discover.js.map +0 -1
  402. package/dist/config/duration.js +0 -17
  403. package/dist/config/duration.js.map +0 -1
  404. package/dist/config/edit.js +0 -966
  405. package/dist/config/edit.js.map +0 -1
  406. package/dist/config/errors.js +0 -29
  407. package/dist/config/errors.js.map +0 -1
  408. package/dist/config/index.js +0 -14
  409. package/dist/config/index.js.map +0 -1
  410. package/dist/config/load.js +0 -412
  411. package/dist/config/load.js.map +0 -1
  412. package/dist/config/merge.js +0 -45
  413. package/dist/config/merge.js.map +0 -1
  414. package/dist/config/model.js +0 -171
  415. package/dist/config/model.js.map +0 -1
  416. package/dist/config/paths.js +0 -31
  417. package/dist/config/paths.js.map +0 -1
  418. package/dist/config/prompt.js +0 -33
  419. package/dist/config/prompt.js.map +0 -1
  420. package/dist/config/shared-pipelines.js +0 -71
  421. package/dist/config/shared-pipelines.js.map +0 -1
  422. package/dist/config/shared-specialists.js +0 -68
  423. package/dist/config/shared-specialists.js.map +0 -1
  424. package/dist/config/shared-workflows.js +0 -71
  425. package/dist/config/shared-workflows.js.map +0 -1
  426. package/dist/config/specialist-tags.js +0 -214
  427. package/dist/config/specialist-tags.js.map +0 -1
  428. package/dist/config/tag-names.js +0 -43
  429. package/dist/config/tag-names.js.map +0 -1
  430. package/dist/config/validate.js +0 -872
  431. package/dist/config/validate.js.map +0 -1
  432. package/dist/core/artifacts.js +0 -37
  433. package/dist/core/artifacts.js.map +0 -1
  434. package/dist/core/create.js +0 -75
  435. package/dist/core/create.js.map +0 -1
  436. package/dist/core/delivery.js +0 -366
  437. package/dist/core/delivery.js.map +0 -1
  438. package/dist/core/errors.js +0 -7
  439. package/dist/core/errors.js.map +0 -1
  440. package/dist/core/ids.js +0 -99
  441. package/dist/core/ids.js.map +0 -1
  442. package/dist/core/index.js +0 -21
  443. package/dist/core/index.js.map +0 -1
  444. package/dist/core/input.js +0 -45
  445. package/dist/core/input.js.map +0 -1
  446. package/dist/core/machine.js +0 -1021
  447. package/dist/core/machine.js.map +0 -1
  448. package/dist/core/model.js +0 -460
  449. package/dist/core/model.js.map +0 -1
  450. package/dist/core/observer.js +0 -193
  451. package/dist/core/observer.js.map +0 -1
  452. package/dist/core/occupancy.js +0 -63
  453. package/dist/core/occupancy.js.map +0 -1
  454. package/dist/core/permissions.js +0 -222
  455. package/dist/core/permissions.js.map +0 -1
  456. package/dist/core/plan.js +0 -99
  457. package/dist/core/plan.js.map +0 -1
  458. package/dist/core/progress.js +0 -43
  459. package/dist/core/progress.js.map +0 -1
  460. package/dist/core/questions.js +0 -19
  461. package/dist/core/questions.js.map +0 -1
  462. package/dist/core/queue.js +0 -859
  463. package/dist/core/queue.js.map +0 -1
  464. package/dist/core/retryable.js +0 -8
  465. package/dist/core/retryable.js.map +0 -1
  466. package/dist/core/scheduler.js +0 -160
  467. package/dist/core/scheduler.js.map +0 -1
  468. package/dist/core/skip.js +0 -109
  469. package/dist/core/skip.js.map +0 -1
  470. package/dist/core/stages.js +0 -304
  471. package/dist/core/stages.js.map +0 -1
  472. package/dist/core/summary.js +0 -35
  473. package/dist/core/summary.js.map +0 -1
  474. package/dist/core/tags.js +0 -184
  475. package/dist/core/tags.js.map +0 -1
  476. package/dist/core/topology.js +0 -162
  477. package/dist/core/topology.js.map +0 -1
  478. package/dist/daemon/artifacts.js +0 -84
  479. package/dist/daemon/artifacts.js.map +0 -1
  480. package/dist/daemon/daemon.js +0 -1442
  481. package/dist/daemon/daemon.js.map +0 -1
  482. package/dist/daemon/executor.js +0 -749
  483. package/dist/daemon/executor.js.map +0 -1
  484. package/dist/daemon/helpers.js +0 -38
  485. package/dist/daemon/helpers.js.map +0 -1
  486. package/dist/daemon/index.js +0 -4
  487. package/dist/daemon/index.js.map +0 -1
  488. package/dist/daemon/logs.js +0 -69
  489. package/dist/daemon/logs.js.map +0 -1
  490. package/dist/daemon/observers.js +0 -93
  491. package/dist/daemon/observers.js.map +0 -1
  492. package/dist/daemon/patches.js +0 -76
  493. package/dist/daemon/patches.js.map +0 -1
  494. package/dist/daemon/ports.js +0 -2
  495. package/dist/daemon/ports.js.map +0 -1
  496. package/dist/daemon/processes.js +0 -98
  497. package/dist/daemon/processes.js.map +0 -1
  498. package/dist/daemon/repositories.js +0 -2
  499. package/dist/daemon/repositories.js.map +0 -1
  500. package/dist/daemon/server.js +0 -164
  501. package/dist/daemon/server.js.map +0 -1
  502. package/dist/daemon/supervisor.js +0 -140
  503. package/dist/daemon/supervisor.js.map +0 -1
  504. package/dist/daemon/timings.js +0 -23
  505. package/dist/daemon/timings.js.map +0 -1
  506. package/dist/git/delivery.js +0 -284
  507. package/dist/git/delivery.js.map +0 -1
  508. package/dist/git/index.js +0 -4
  509. package/dist/git/index.js.map +0 -1
  510. package/dist/git/runner.js +0 -60
  511. package/dist/git/runner.js.map +0 -1
  512. package/dist/git/workspace.js +0 -366
  513. package/dist/git/workspace.js.map +0 -1
  514. package/dist/mcp/host.js +0 -401
  515. package/dist/mcp/host.js.map +0 -1
  516. package/dist/mcp/index.js +0 -3
  517. package/dist/mcp/index.js.map +0 -1
  518. package/dist/mcp/tools.js +0 -19
  519. package/dist/mcp/tools.js.map +0 -1
  520. package/dist/mcp/version.js +0 -5
  521. package/dist/mcp/version.js.map +0 -1
  522. package/dist/mcp/worker.js +0 -230
  523. package/dist/mcp/worker.js.map +0 -1
  524. package/dist/presentation/web/routes/directories.js +0 -60
  525. package/dist/presentation/web/routes/directories.js.map +0 -1
  526. package/dist/protocol/autostart.js +0 -171
  527. package/dist/protocol/autostart.js.map +0 -1
  528. package/dist/protocol/build.js +0 -38
  529. package/dist/protocol/build.js.map +0 -1
  530. package/dist/protocol/catalog.js +0 -18
  531. package/dist/protocol/catalog.js.map +0 -1
  532. package/dist/protocol/client.js +0 -83
  533. package/dist/protocol/client.js.map +0 -1
  534. package/dist/protocol/format.js +0 -477
  535. package/dist/protocol/format.js.map +0 -1
  536. package/dist/protocol/index.js +0 -11
  537. package/dist/protocol/index.js.map +0 -1
  538. package/dist/protocol/messages.js +0 -598
  539. package/dist/protocol/messages.js.map +0 -1
  540. package/dist/protocol/style.js +0 -81
  541. package/dist/protocol/style.js.map +0 -1
  542. package/dist/protocol/transcript.js +0 -49
  543. package/dist/protocol/transcript.js.map +0 -1
  544. package/dist/protocol/views.js +0 -696
  545. package/dist/protocol/views.js.map +0 -1
  546. package/dist/runtime/catalog.js +0 -117
  547. package/dist/runtime/catalog.js.map +0 -1
  548. package/dist/runtime/claude.js +0 -399
  549. package/dist/runtime/claude.js.map +0 -1
  550. package/dist/runtime/index.js +0 -34
  551. package/dist/runtime/index.js.map +0 -1
  552. package/dist/runtime/message.js +0 -48
  553. package/dist/runtime/message.js.map +0 -1
  554. package/dist/runtime/naming.js +0 -69
  555. package/dist/runtime/naming.js.map +0 -1
  556. package/dist/runtime/opencode.js +0 -189
  557. package/dist/runtime/opencode.js.map +0 -1
  558. package/dist/runtime/skills.js +0 -17
  559. package/dist/runtime/skills.js.map +0 -1
  560. package/dist/runtime/transcript.js +0 -227
  561. package/dist/runtime/transcript.js.map +0 -1
  562. package/dist/runtime/types.js +0 -12
  563. package/dist/runtime/types.js.map +0 -1
  564. package/dist/runtime/which.js +0 -21
  565. package/dist/runtime/which.js.map +0 -1
  566. package/dist/store/index.js +0 -3
  567. package/dist/store/index.js.map +0 -1
  568. package/dist/store/schema.js +0 -286
  569. package/dist/store/schema.js.map +0 -1
  570. package/dist/store/store.js +0 -491
  571. package/dist/store/store.js.map +0 -1
  572. package/dist/web/assets/EntryList-CnfGgjEY.js +0 -1
  573. package/dist/web/assets/FilePath-C0X8-keS.js +0 -1
  574. package/dist/web/assets/SettingsForm-BcyBWJbn.js +0 -1
  575. package/dist/web/assets/SharedPipelinesGroup-a368-IQ0.js +0 -1
  576. package/dist/web/assets/index-B-oJ93zH.js +0 -22
  577. package/dist/web/assets/index-BZE36gYR.css +0 -2
  578. package/dist/web/assets/locales-DtRrxYzg.js +0 -1
  579. package/dist/web/assets/pipelines-D48ggDNe.js +0 -1
  580. package/dist/web/assets/queue-D8_RY4IY.js +0 -16
  581. package/dist/web/assets/select-J4oIrmYh.js +0 -1
  582. package/dist/web/assets/settings-B0-0Vaia.js +0 -2
  583. package/dist/web/assets/skeleton-CCKCQF5n.js +0 -1
  584. package/dist/web/assets/specialists-DH8tyluO.js +0 -1
  585. package/dist/web/assets/switch-CWFAgxG1.js +0 -41
  586. package/dist/web/assets/topology-CNQ28AB2.js +0 -7
  587. /package/dist/web/assets/{topology-DLioOiRN.css → pipelines-DLioOiRN.css} +0 -0
@@ -1,465 +0,0 @@
1
- const STYLE = String.raw `
2
- :root {
3
- color-scheme: light dark;
4
- --bg: #f5f6f8; --panel: #ffffff; --panel-2: #eef0f4; --text: #1b1f27; --muted: #667085;
5
- --line: #dfe3ea; --accent: #4f46e5; --accent-text: #ffffff;
6
- --ok: #15803d; --ok-bg: #dcfce7; --warn: #b45309; --warn-bg: #fef3c7;
7
- --err: #b91c1c; --err-bg: #fee2e2; --run: #1d4ed8; --run-bg: #dbeafe;
8
- --mute-bg: #e5e7eb; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
9
- }
10
- @media (prefers-color-scheme: dark) {
11
- :root {
12
- --bg: #0f1218; --panel: #171b23; --panel-2: #1f2430; --text: #e6e9ef; --muted: #98a2b3;
13
- --line: #2a303c; --accent: #818cf8; --accent-text: #0f1218;
14
- --ok: #4ade80; --ok-bg: #12301f; --warn: #fbbf24; --warn-bg: #36290c;
15
- --err: #f87171; --err-bg: #3a1618; --run: #60a5fa; --run-bg: #14263f;
16
- --mute-bg: #262b36; --shadow: none;
17
- }
18
- }
19
- * { box-sizing: border-box; }
20
- body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
21
- code, .mono, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
22
- header { display: flex; align-items: center; gap: 12px; padding: 10px 20px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
23
- header h1 { font-size: 16px; margin: 0; letter-spacing: .2px; }
24
- header h1 span { color: var(--accent); }
25
- .spacer { flex: 1; }
26
- .conn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
27
- .conn i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
28
- .conn.live i { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
29
- .conn.reconnecting i, .conn.polling i { background: var(--warn); }
30
- .layout { display: grid; grid-template-columns: 300px 1fr; min-height: calc(100vh - 53px); }
31
- aside { border-right: 1px solid var(--line); padding: 14px; background: var(--panel); overflow-y: auto; }
32
- main { padding: 20px; min-width: 0; }
33
- .section-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 14px 4px 6px; }
34
- .run-item { display: block; padding: 10px 12px; border-radius: 10px; border: 1px solid transparent; color: inherit; text-decoration: none; cursor: pointer; margin-bottom: 4px; }
35
- .run-item:hover { background: var(--panel-2); }
36
- .run-item.active { background: var(--panel-2); border-color: var(--accent); }
37
- .run-item .top { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
38
- .run-item .sub { color: var(--muted); font-size: 12px; margin-top: 2px; display: flex; justify-content: space-between; gap: 8px; }
39
- .badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; background: var(--mute-bg); color: var(--muted); }
40
- .badge.running, .badge.merging, .badge.queued { background: var(--run-bg); color: var(--run); }
41
- .badge.needs_human, .badge.conflict, .badge.apply_failed { background: var(--warn-bg); color: var(--warn); }
42
- .badge.failed { background: var(--err-bg); color: var(--err); }
43
- .badge.merged, .badge.applied, .badge.done, .badge.delivered { background: var(--ok-bg); color: var(--ok); }
44
- .badge.running::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 5px; animation: pulse 1.2s infinite; }
45
- @keyframes pulse { 50% { opacity: .25; } }
46
- .card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
47
- .run-head h2 { margin: 0 0 4px; font-size: 20px; }
48
- .meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 13px; }
49
- .meta b { color: var(--text); font-weight: 600; }
50
- .toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0; }
51
- .chip { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 999px; padding: 3px 12px; font-size: 12px; cursor: pointer; }
52
- .chip.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
53
- button.btn { font: inherit; font-size: 13px; padding: 5px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
54
- button.btn:hover { background: var(--panel-2); }
55
- button.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
56
- button.btn.danger { color: var(--err); }
57
- button.btn:disabled { opacity: .5; cursor: default; }
58
- .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
59
- .group { cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
60
- .group:hover, .group.active { border-color: var(--accent); }
61
- .group.attention { border-left: 4px solid var(--warn); }
62
- .group.bad { border-left: 4px solid var(--err); }
63
- .group .title { font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
64
- .group .line { color: var(--muted); font-size: 12px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
65
- .question { background: var(--warn-bg); color: var(--text); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; }
66
- .reason { background: var(--err-bg); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; }
67
- .answer { display: flex; gap: 6px; }
68
- .answer textarea { flex: 1; font: inherit; border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 8px; padding: 6px 8px; resize: vertical; min-height: 36px; }
69
- .panel { margin-top: 18px; }
70
- .panel h3 { margin: 0 0 8px; }
71
- .timeline { list-style: none; margin: 10px 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
72
- .timeline li { position: relative; margin-bottom: 12px; padding-left: 12px; }
73
- .timeline li::before { content: ""; position: absolute; left: -21px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
74
- .timeline .head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
75
- .timeline .body { color: var(--muted); white-space: pre-wrap; margin-top: 3px; }
76
- pre.log { background: #0b0e13; color: #d6dbe4; padding: 12px; border-radius: 10px; max-height: 420px; overflow: auto; font-size: 12px; margin: 8px 0 0; white-space: pre-wrap; word-break: break-word; }
77
- .empty { text-align: center; padding: 60px 20px; color: var(--muted); }
78
- .empty code { background: var(--panel-2); padding: 3px 8px; border-radius: 6px; color: var(--text); }
79
- .warn { color: var(--warn); }
80
- .toast { position: fixed; right: 16px; bottom: 16px; background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 10px; max-width: 420px; box-shadow: 0 6px 20px rgba(0,0,0,.25); z-index: 10; }
81
- .toast.error { background: var(--err); color: #fff; }
82
- dialog { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); max-width: 460px; }
83
- dialog::backdrop { background: rgba(0,0,0,.45); }
84
- dialog ul { padding-left: 18px; margin: 8px 0; }
85
- .dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
86
- @media (max-width: 800px) { .layout { grid-template-columns: 1fr; } aside { border-right: 0; border-bottom: 1px solid var(--line); max-height: 40vh; } }
87
- `;
88
- const SCRIPT = String.raw `
89
- (function () {
90
- 'use strict';
91
- var state = { runs: {}, runId: null, slug: null, filter: 'all', conn: 'reconnecting', detail: null, drafts: {} };
92
- var $ = function (id) { return document.getElementById(id); };
93
- var ATTENTION = { needs_human: 1, conflict: 1 };
94
-
95
- function h(tag, attrs, children) {
96
- var el = document.createElement(tag);
97
- if (attrs) for (var k in attrs) {
98
- var v = attrs[k];
99
- if (v === null || v === undefined || v === false) continue;
100
- if (k === 'class') el.className = v;
101
- else if (k.slice(0, 2) === 'on') el.addEventListener(k.slice(2), v);
102
- else el.setAttribute(k, v === true ? '' : v);
103
- }
104
- [].concat(children === undefined ? [] : children).forEach(function (c) {
105
- if (c === null || c === undefined || c === false) return;
106
- el.appendChild(typeof c === 'object' ? c : document.createTextNode(String(c)));
107
- });
108
- return el;
109
- }
110
- function badge(text) { return h('span', { class: 'badge ' + text }, String(text).replace('_', ' ')); }
111
- function secs(ms) {
112
- var s = Math.max(0, Math.round(ms / 1000));
113
- if (s < 60) return s + 's';
114
- var m = Math.floor(s / 60);
115
- if (m < 60) return m + 'm ' + (s % 60) + 's';
116
- return Math.floor(m / 60) + 'h ' + (m % 60) + 'm';
117
- }
118
- function usage(u) {
119
- if (!u) return '—';
120
- var t = u.inputTokens + u.outputTokens;
121
- var tokens = t >= 1000 ? (t / 1000).toFixed(1) + 'k tok' : t + ' tok';
122
- return u.costUsd === null ? tokens : tokens + ' · $' + u.costUsd.toFixed(2);
123
- }
124
- function runDuration(run) { return secs((run.finishedAt || Date.now()) - run.createdAt); }
125
-
126
- function toast(text, error) {
127
- var el = h('div', { class: 'toast' + (error ? ' error' : ''), role: 'status' }, text);
128
- document.body.appendChild(el);
129
- setTimeout(function () { el.remove(); }, error ? 7000 : 3000);
130
- }
131
- function api(method, path, body) {
132
- var options = { method: method, headers: {} };
133
- if (body !== undefined) { options.headers['content-type'] = 'application/json'; options.body = JSON.stringify(body); }
134
- return fetch(path, options).then(function (r) {
135
- return r.json().then(function (data) {
136
- if (!r.ok) throw new Error(data.error || ('HTTP ' + r.status));
137
- return data;
138
- });
139
- });
140
- }
141
- function act(label, path, body) {
142
- return api('POST', path, body).then(function (data) { toast(label + ': ok'); refreshDetail(); return data; })
143
- .catch(function (e) { toast(label + ': ' + e.message, true); });
144
- }
145
-
146
- function sortedRuns() {
147
- return Object.keys(state.runs).map(function (k) { return state.runs[k]; })
148
- .sort(function (a, b) { return b.createdAt - a.createdAt; });
149
- }
150
-
151
- function renderConn() {
152
- var el = $('conn');
153
- el.className = 'conn ' + state.conn;
154
- $('conn-text').textContent = { live: 'live', reconnecting: 'reconnecting…', polling: 'polling' }[state.conn];
155
- }
156
-
157
- function renderSidebar() {
158
- var box = $('runs');
159
- box.textContent = '';
160
- var runs = sortedRuns();
161
- var groups = [['Active', runs.filter(function (r) { return !r.finished; })], ['Finished', runs.filter(function (r) { return r.finished; })]];
162
- groups.forEach(function (g) {
163
- if (!g[1].length) return;
164
- box.appendChild(h('div', { class: 'section-title' }, g[0]));
165
- g[1].forEach(function (run) {
166
- var needs = run.groups.some(function (x) { return x.status === 'needs_human'; });
167
- box.appendChild(h('a', {
168
- class: 'run-item' + (run.id === state.runId ? ' active' : ''),
169
- href: '#' + run.id,
170
- }, [
171
- h('div', { class: 'top' }, [h('span', null, run.workflow), needs ? badge('needs_human') : null]),
172
- h('div', { class: 'sub' }, [h('span', { class: 'mono' }, run.id), h('span', null, usage(run.usage))]),
173
- h('div', { class: 'sub' }, [h('span', null, run.counts || '—'), h('span', null, runDuration(run))]),
174
- ]));
175
- });
176
- });
177
- }
178
-
179
- function groupCard(run, g) {
180
- var cls = 'card group' + (ATTENTION[g.status] ? ' attention' : '') + (g.status === 'failed' ? ' bad' : '') + (g.slug === state.slug ? ' active' : '');
181
- var children = [
182
- h('div', { class: 'title' }, [h('span', null, g.title), badge(g.status)]),
183
- h('div', { class: 'line' }, [
184
- h('span', { class: 'mono' }, g.slug),
185
- g.step ? h('span', null, g.step + (g.round !== null ? ' · round ' + g.round : '')) : null,
186
- h('span', null, secs(g.durationMs)),
187
- g.status === 'merged' ? h('span', null, 'delivery: ' + g.delivery) : null,
188
- g.warnings ? h('span', { class: 'warn' }, '⚠ ' + g.warnings) : null,
189
- ]),
190
- ];
191
- if (g.question) children.push(h('div', { class: 'question' }, g.question));
192
- if (g.reason) children.push(h('div', { class: 'reason' }, g.reason));
193
- if (g.status === 'needs_human' && g.question) {
194
- var draftKey = run.id + '/' + g.slug;
195
- var area = h('textarea', { id: 'draft-' + draftKey, placeholder: 'Your answer…', rows: '2' });
196
- area.value = state.drafts[draftKey] || '';
197
- area.addEventListener('input', function () { state.drafts[draftKey] = area.value; });
198
- area.addEventListener('click', function (e) { e.stopPropagation(); });
199
- children.push(h('div', { class: 'answer' }, [area, h('button', { class: 'btn primary', onclick: function (e) {
200
- e.stopPropagation();
201
- if (!area.value.trim()) return;
202
- var sent = area.value;
203
- act('answer', base(run.id, g.slug) + '/answer', { answer: sent }).then(function (ok) { if (ok) delete state.drafts[draftKey]; });
204
- } }, 'Send')]));
205
- }
206
- var actions = [];
207
- if (g.status === 'failed' || g.status === 'conflict')
208
- actions.push(h('button', { class: 'btn', onclick: function (e) { e.stopPropagation(); act('retry', base(run.id, g.slug) + '/retry', {}); } }, 'Retry'));
209
- if (!{ merged: 1, failed: 1, cancelled: 1 }[g.status])
210
- actions.push(h('button', { class: 'btn danger', onclick: function (e) { e.stopPropagation(); act('cancel', base(run.id, g.slug) + '/cancel', {}); } }, 'Cancel'));
211
- if (actions.length) children.push(h('div', { class: 'answer' }, actions));
212
- return h('div', { class: cls, onclick: function () { location.hash = run.id + '/' + g.slug; } }, children);
213
- }
214
- function base(runId, slug) { return '/api/runs/' + encodeURIComponent(runId) + '/groups/' + encodeURIComponent(slug); }
215
-
216
- function renderRun() {
217
- var main = $('main');
218
- var run = state.runs[state.runId];
219
- main.textContent = '';
220
- if (!sortedRuns().length) {
221
- main.appendChild(h('div', { class: 'empty' }, [h('h2', null, 'No runs yet'), h('p', null, ['Start one from a repository: ', h('code', null, 'aip run <workflow> --task "…"')])]));
222
- return;
223
- }
224
- if (!run) { main.appendChild(h('div', { class: 'empty' }, 'Select a run on the left.')); return; }
225
- var finished = run.finished;
226
- main.appendChild(h('div', { class: 'card run-head' }, [
227
- h('h2', null, [run.workflow + ' ', badge(finished ? 'done' : 'running')]),
228
- h('div', { class: 'meta' }, [
229
- h('span', null, ['id ', h('b', { class: 'mono' }, run.id)]),
230
- h('span', null, ['branch ', h('b', { class: 'mono' }, run.branch)]),
231
- h('span', null, ['repo ', h('b', { class: 'mono' }, run.repository)]),
232
- h('span', null, ['time ', h('b', { id: 'timer' }, runDuration(run))]),
233
- h('span', null, ['usage ', h('b', null, usage(run.usage))]),
234
- h('span', null, ['groups ', h('b', null, run.counts || '—')]),
235
- h('span', null, ['delivery ', h('b', null, run.delivery.applied + ' applied · ' + run.delivery.merged + ' ready' + (run.delivery.failed ? ' · ' + run.delivery.failed + ' failed' : '') + (run.delivery.inProgress ? ' · in progress' : ''))]),
236
- ]),
237
- run.dirtyWarning ? h('p', { class: 'warn' }, '⚠ The working tree had uncommitted changes when the run started.') : null,
238
- run.split ? h('p', null, ['Split step: ', badge(run.split.status), run.split.question ? ' ' + run.split.question : '', run.split.reason ? ' ' + run.split.reason : '']) : null,
239
- ]));
240
-
241
- var bar = h('div', { class: 'toolbar' });
242
- ['all', 'running', 'needs_human', 'conflict', 'failed', 'merged', 'cancelled'].forEach(function (f) {
243
- bar.appendChild(h('button', { class: 'chip' + (state.filter === f ? ' on' : ''), onclick: function () { state.filter = f; renderRun(); } }, f.replace('_', ' ')));
244
- });
245
- bar.appendChild(h('span', { class: 'spacer' }));
246
- var ready = run.delivery.merged > run.delivery.applied || run.delivery.failed > 0;
247
- bar.appendChild(h('button', { class: 'btn primary', disabled: !ready, onclick: function () { doApply(run, false); } }, 'Apply merged'));
248
- bar.appendChild(h('button', { class: 'btn', disabled: !ready, onclick: function () { doApply(run, true); } }, 'Apply --force…'));
249
- if (!finished) bar.appendChild(h('button', { class: 'btn danger', onclick: function () { if (confirm('Cancel the whole run?')) act('cancel run', '/api/runs/' + encodeURIComponent(run.id) + '/cancel', {}); } }, 'Cancel run'));
250
- main.appendChild(bar);
251
-
252
- var rank = function (g) { return g.status === 'needs_human' ? 0 : g.status === 'conflict' || g.status === 'failed' ? 1 : 2; };
253
- var list = run.groups.filter(function (g) { return state.filter === 'all' || g.status === state.filter; })
254
- .sort(function (a, b) { return rank(a) - rank(b); });
255
- var grid = h('div', { class: 'grid' });
256
- list.forEach(function (g) { grid.appendChild(groupCard(run, g)); });
257
- if (!list.length) grid.appendChild(h('div', { class: 'empty' }, 'No groups with this status.'));
258
- main.appendChild(grid);
259
- main.appendChild(h('div', { id: 'detail', class: 'panel' }));
260
- renderDetail();
261
- }
262
-
263
- function doApply(run, force) {
264
- var path = '/api/runs/' + encodeURIComponent(run.id) + '/apply';
265
- if (!force) { act('apply', path, {}); return; }
266
- var files = [], reasons = [];
267
- Promise.all(run.groups.filter(function (g) { return g.status === 'merged' && g.delivery === 'apply_failed'; }).map(function (g) {
268
- return api('GET', base(run.id, g.slug) + '?tail=1').then(function (v) {
269
- if (v.delivery.reason) reasons.push(g.slug + ': ' + v.delivery.reason);
270
- files = files.concat(v.delivery.files || []);
271
- });
272
- })).catch(function () {}).then(function () {
273
- var dlg = h('dialog', null, [
274
- h('h3', null, 'Apply with --force?'),
275
- h('p', null, 'Conflict markers will be left in your working tree.'),
276
- reasons.length ? h('p', { class: 'reason' }, reasons.join('\n')) : null,
277
- files.length ? h('ul', { class: 'mono' }, files.filter(function (f, i) { return files.indexOf(f) === i; }).map(function (f) { return h('li', null, f); })) : null,
278
- h('div', { class: 'dialog-actions' }, [
279
- h('button', { class: 'btn', onclick: function () { dlg.close(); dlg.remove(); } }, 'Cancel'),
280
- h('button', { class: 'btn danger', onclick: function () { dlg.close(); dlg.remove(); act('apply --force', path, { force: true }); } }, 'Apply anyway'),
281
- ]),
282
- ]);
283
- document.body.appendChild(dlg);
284
- dlg.showModal();
285
- });
286
- }
287
-
288
- function renderDetail() {
289
- var box = $('detail');
290
- if (!box) return;
291
- captureLog();
292
- box.textContent = '';
293
- var d = state.detail;
294
- if (!state.slug || !d || d.slug !== state.slug || d.runId !== state.runId) return;
295
- var card = h('div', { class: 'card' }, [
296
- h('h3', null, [d.title + ' ', badge(d.status)]),
297
- h('div', { class: 'meta' }, [
298
- h('span', null, ['task ', h('b', null, d.task)]),
299
- h('span', null, ['branch ', h('b', { class: 'mono' }, d.branch)]),
300
- h('span', null, ['usage ', h('b', null, usage(d.usage))]),
301
- h('span', null, ['delivery ', h('b', null, d.delivery.state)]),
302
- ]),
303
- d.warnings.length ? h('ul', { class: 'warn' }, d.warnings.map(function (w) { return h('li', null, w); })) : null,
304
- d.conflictFiles.length ? h('div', { class: 'reason' }, 'Conflicts: ' + d.conflictFiles.join(', ')) : null,
305
- h('ol', { class: 'timeline' }, d.attempts.map(function (a) {
306
- return h('li', null, [
307
- h('div', { class: 'head' }, [
308
- h('b', null, '#' + a.seq + ' ' + a.stepId + ' · round ' + a.round),
309
- h('span', null, a.specialist),
310
- h('span', { class: 'mono' }, a.runtime + (a.model ? ' ' + a.model : '')),
311
- badge(a.verdict || a.status),
312
- h('span', null, secs(a.durationMs) + ' · ' + usage(a.usage)),
313
- ]),
314
- a.summary ? h('div', { class: 'body' }, a.summary) : null,
315
- a.feedback ? h('div', { class: 'body' }, 'Feedback: ' + a.feedback) : null,
316
- a.reason ? h('div', { class: 'reason' }, a.reason) : null,
317
- ]);
318
- })),
319
- h('b', null, 'Log' + (d.log ? ' (tail)' : '')),
320
- h('pre', { class: 'log', id: 'log', 'data-key': state.runId + '/' + state.slug }, d.log ? d.log.lines.join('\n') : 'No log yet.'),
321
- ]);
322
- box.appendChild(card);
323
- var log = $('log');
324
- var view = state.logView;
325
- if (view && view.key === state.runId + '/' + state.slug && !view.bottom) log.scrollTop = view.top;
326
- else log.scrollTop = log.scrollHeight;
327
- }
328
-
329
- function captureLog() {
330
- var el = $('log');
331
- if (!el) return;
332
- state.logView = {
333
- key: el.getAttribute('data-key'),
334
- top: el.scrollTop,
335
- bottom: el.scrollTop + el.clientHeight >= el.scrollHeight - 4,
336
- };
337
- }
338
-
339
- var detailTimer = null;
340
- function refreshDetail() {
341
- clearTimeout(detailTimer);
342
- if (!state.runId || !state.slug) return;
343
- var runId = state.runId, slug = state.slug;
344
- detailTimer = setTimeout(function () {
345
- api('GET', base(runId, slug) + '?tail=200').then(function (d) {
346
- if (runId !== state.runId || slug !== state.slug) return;
347
- state.detail = d;
348
- renderDetail();
349
- }).catch(function () {});
350
- }, 150);
351
- }
352
-
353
- var known = {};
354
- function notify(run) {
355
- run.groups.forEach(function (g) {
356
- var key = run.id + '/' + g.slug;
357
- var before = known[key];
358
- known[key] = g.status;
359
- if (before === undefined || before === g.status) return;
360
- if (g.status !== 'needs_human' && g.status !== 'failed') return;
361
- toast(g.title + ': ' + g.status.replace('_', ' '), g.status === 'failed');
362
- if (window.Notification && Notification.permission === 'granted' && document.hidden)
363
- new Notification('aip: ' + g.title, { body: g.status.replace('_', ' ') });
364
- });
365
- }
366
-
367
- function applyRoute() {
368
- var parts = location.hash.slice(1).split('/');
369
- state.runId = parts[0] ? decodeURIComponent(parts[0]) : null;
370
- state.slug = parts[1] ? decodeURIComponent(parts[1]) : null;
371
- if (!state.runId) { var first = sortedRuns()[0]; if (first) { state.runId = first.id; } }
372
- state.detail = null;
373
- state.logView = null;
374
- render();
375
- refreshDetail();
376
- }
377
- function render() {
378
- renderConn(); renderSidebar();
379
- var active = document.activeElement;
380
- var focusId = active && active.tagName === 'TEXTAREA' ? active.id : null;
381
- var start = focusId ? active.selectionStart : 0, end = focusId ? active.selectionEnd : 0;
382
- captureLog();
383
- renderRun();
384
- if (focusId) {
385
- var again = document.getElementById(focusId);
386
- if (again) { again.focus(); again.setSelectionRange(start, end); }
387
- }
388
- }
389
-
390
- function onEvent(event) {
391
- if (event.event === 'snapshot') {
392
- state.runs = {};
393
- event.runs.forEach(function (r) { state.runs[r.id] = r; notify(r); });
394
- if (!state.runId) { var first = sortedRuns()[0]; if (first) state.runId = first.id; }
395
- } else {
396
- state.runs[event.run.id] = event.run;
397
- notify(event.run);
398
- }
399
- render();
400
- if (event.event === 'snapshot' || (event.run && event.run.id === state.runId)) refreshDetail();
401
- }
402
-
403
- var source = null, pollTimer = null;
404
- function poll() {
405
- api('GET', '/api/runs').then(function (runs) {
406
- state.runs = {};
407
- runs.forEach(function (r) { state.runs[r.id] = r; notify(r); });
408
- render();
409
- }).catch(function () {});
410
- }
411
- function connect() {
412
- source = new EventSource('/api/events');
413
- source.onopen = function () { state.conn = 'live'; clearInterval(pollTimer); pollTimer = null; renderConn(); };
414
- source.onmessage = function (m) { try { onEvent(JSON.parse(m.data)); } catch (e) {} };
415
- source.onerror = function () {
416
- state.conn = 'reconnecting'; renderConn();
417
- if (!pollTimer) pollTimer = setInterval(function () { state.conn = 'polling'; renderConn(); poll(); }, 2000);
418
- };
419
- }
420
-
421
- $('notify').addEventListener('click', function () {
422
- if (window.Notification) Notification.requestPermission().then(function (p) { toast('Notifications: ' + p); });
423
- });
424
- window.addEventListener('hashchange', applyRoute);
425
- var ticks = 0;
426
- setInterval(function () {
427
- var run = state.runs[state.runId];
428
- var timer = $('timer');
429
- if (run && timer && !run.finished) timer.textContent = runDuration(run);
430
- if (++ticks % 3 === 0) {
431
- var g = state.detail;
432
- if (g && (g.status === 'running' || g.status === 'merging')) refreshDetail();
433
- }
434
- }, 1000);
435
- render();
436
- connect();
437
- applyRoute();
438
- })();
439
- `;
440
- export function renderPage() {
441
- return `<!doctype html>
442
- <html lang="en">
443
- <head>
444
- <meta charset="utf-8">
445
- <meta name="viewport" content="width=device-width, initial-scale=1">
446
- <title>aip · runs</title>
447
- <style>${STYLE}</style>
448
- </head>
449
- <body>
450
- <header>
451
- <h1>aip <span>web</span></h1>
452
- <span class="spacer"></span>
453
- <span id="conn" class="conn reconnecting"><i></i><span id="conn-text">reconnecting…</span></span>
454
- <button id="notify" class="btn" type="button">Notify me</button>
455
- </header>
456
- <div class="layout">
457
- <aside id="runs" aria-label="Runs"></aside>
458
- <main id="main"></main>
459
- </div>
460
- <script>${SCRIPT}</script>
461
- </body>
462
- </html>
463
- `;
464
- }
465
- //# sourceMappingURL=page.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"page.js","sourceRoot":"","sources":["../../../src/cli/web/page.ts"],"names":[],"mappings":"AAAA,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsFvB,CAAC;AAEF,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+VxB,CAAC;AAEF,MAAM,UAAU,UAAU;IACxB,OAAO;;;;;;SAMA,KAAK;;;;;;;;;;;;;UAaJ,MAAM;;;CAGf,CAAC;AACF,CAAC"}