sudocode 1.1.20 → 1.1.22

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 (857) hide show
  1. package/package.json +9 -9
  2. package/node_modules/@sudocode-ai/cli/README.md +0 -1629
  3. package/node_modules/@sudocode-ai/cli/dist/auth/claude.d.ts +0 -19
  4. package/node_modules/@sudocode-ai/cli/dist/auth/claude.d.ts.map +0 -1
  5. package/node_modules/@sudocode-ai/cli/dist/auth/claude.js +0 -179
  6. package/node_modules/@sudocode-ai/cli/dist/auth/claude.js.map +0 -1
  7. package/node_modules/@sudocode-ai/cli/dist/auth/clear.d.ts +0 -17
  8. package/node_modules/@sudocode-ai/cli/dist/auth/clear.d.ts.map +0 -1
  9. package/node_modules/@sudocode-ai/cli/dist/auth/clear.js +0 -68
  10. package/node_modules/@sudocode-ai/cli/dist/auth/clear.js.map +0 -1
  11. package/node_modules/@sudocode-ai/cli/dist/auth/credentials.d.ts +0 -93
  12. package/node_modules/@sudocode-ai/cli/dist/auth/credentials.d.ts.map +0 -1
  13. package/node_modules/@sudocode-ai/cli/dist/auth/credentials.js +0 -255
  14. package/node_modules/@sudocode-ai/cli/dist/auth/credentials.js.map +0 -1
  15. package/node_modules/@sudocode-ai/cli/dist/auth/index.d.ts +0 -13
  16. package/node_modules/@sudocode-ai/cli/dist/auth/index.d.ts.map +0 -1
  17. package/node_modules/@sudocode-ai/cli/dist/auth/index.js +0 -19
  18. package/node_modules/@sudocode-ai/cli/dist/auth/index.js.map +0 -1
  19. package/node_modules/@sudocode-ai/cli/dist/auth/status.d.ts +0 -17
  20. package/node_modules/@sudocode-ai/cli/dist/auth/status.d.ts.map +0 -1
  21. package/node_modules/@sudocode-ai/cli/dist/auth/status.js +0 -132
  22. package/node_modules/@sudocode-ai/cli/dist/auth/status.js.map +0 -1
  23. package/node_modules/@sudocode-ai/cli/dist/cli/auth-commands.d.ts +0 -34
  24. package/node_modules/@sudocode-ai/cli/dist/cli/auth-commands.d.ts.map +0 -1
  25. package/node_modules/@sudocode-ai/cli/dist/cli/auth-commands.js +0 -28
  26. package/node_modules/@sudocode-ai/cli/dist/cli/auth-commands.js.map +0 -1
  27. package/node_modules/@sudocode-ai/cli/dist/cli/feedback-commands.d.ts +0 -53
  28. package/node_modules/@sudocode-ai/cli/dist/cli/feedback-commands.d.ts.map +0 -1
  29. package/node_modules/@sudocode-ai/cli/dist/cli/feedback-commands.js +0 -339
  30. package/node_modules/@sudocode-ai/cli/dist/cli/feedback-commands.js.map +0 -1
  31. package/node_modules/@sudocode-ai/cli/dist/cli/init-commands.d.ts +0 -20
  32. package/node_modules/@sudocode-ai/cli/dist/cli/init-commands.d.ts.map +0 -1
  33. package/node_modules/@sudocode-ai/cli/dist/cli/init-commands.js +0 -145
  34. package/node_modules/@sudocode-ai/cli/dist/cli/init-commands.js.map +0 -1
  35. package/node_modules/@sudocode-ai/cli/dist/cli/issue-commands.d.ts +0 -46
  36. package/node_modules/@sudocode-ai/cli/dist/cli/issue-commands.d.ts.map +0 -1
  37. package/node_modules/@sudocode-ai/cli/dist/cli/issue-commands.js +0 -353
  38. package/node_modules/@sudocode-ai/cli/dist/cli/issue-commands.js.map +0 -1
  39. package/node_modules/@sudocode-ai/cli/dist/cli/merge-commands.d.ts +0 -42
  40. package/node_modules/@sudocode-ai/cli/dist/cli/merge-commands.d.ts.map +0 -1
  41. package/node_modules/@sudocode-ai/cli/dist/cli/merge-commands.js +0 -680
  42. package/node_modules/@sudocode-ai/cli/dist/cli/merge-commands.js.map +0 -1
  43. package/node_modules/@sudocode-ai/cli/dist/cli/plugin-commands.d.ts +0 -62
  44. package/node_modules/@sudocode-ai/cli/dist/cli/plugin-commands.d.ts.map +0 -1
  45. package/node_modules/@sudocode-ai/cli/dist/cli/plugin-commands.js +0 -595
  46. package/node_modules/@sudocode-ai/cli/dist/cli/plugin-commands.js.map +0 -1
  47. package/node_modules/@sudocode-ai/cli/dist/cli/query-commands.d.ts +0 -18
  48. package/node_modules/@sudocode-ai/cli/dist/cli/query-commands.d.ts.map +0 -1
  49. package/node_modules/@sudocode-ai/cli/dist/cli/query-commands.js +0 -61
  50. package/node_modules/@sudocode-ai/cli/dist/cli/query-commands.js.map +0 -1
  51. package/node_modules/@sudocode-ai/cli/dist/cli/reference-commands.d.ts +0 -22
  52. package/node_modules/@sudocode-ai/cli/dist/cli/reference-commands.d.ts.map +0 -1
  53. package/node_modules/@sudocode-ai/cli/dist/cli/reference-commands.js +0 -136
  54. package/node_modules/@sudocode-ai/cli/dist/cli/reference-commands.js.map +0 -1
  55. package/node_modules/@sudocode-ai/cli/dist/cli/relationship-commands.d.ts +0 -14
  56. package/node_modules/@sudocode-ai/cli/dist/cli/relationship-commands.d.ts.map +0 -1
  57. package/node_modules/@sudocode-ai/cli/dist/cli/relationship-commands.js +0 -83
  58. package/node_modules/@sudocode-ai/cli/dist/cli/relationship-commands.js.map +0 -1
  59. package/node_modules/@sudocode-ai/cli/dist/cli/remote-commands.d.ts +0 -59
  60. package/node_modules/@sudocode-ai/cli/dist/cli/remote-commands.d.ts.map +0 -1
  61. package/node_modules/@sudocode-ai/cli/dist/cli/remote-commands.js +0 -391
  62. package/node_modules/@sudocode-ai/cli/dist/cli/remote-commands.js.map +0 -1
  63. package/node_modules/@sudocode-ai/cli/dist/cli/server-commands.d.ts +0 -17
  64. package/node_modules/@sudocode-ai/cli/dist/cli/server-commands.d.ts.map +0 -1
  65. package/node_modules/@sudocode-ai/cli/dist/cli/server-commands.js +0 -123
  66. package/node_modules/@sudocode-ai/cli/dist/cli/server-commands.js.map +0 -1
  67. package/node_modules/@sudocode-ai/cli/dist/cli/spec-commands.d.ts +0 -38
  68. package/node_modules/@sudocode-ai/cli/dist/cli/spec-commands.d.ts.map +0 -1
  69. package/node_modules/@sudocode-ai/cli/dist/cli/spec-commands.js +0 -326
  70. package/node_modules/@sudocode-ai/cli/dist/cli/spec-commands.js.map +0 -1
  71. package/node_modules/@sudocode-ai/cli/dist/cli/status-commands.d.ts +0 -17
  72. package/node_modules/@sudocode-ai/cli/dist/cli/status-commands.d.ts.map +0 -1
  73. package/node_modules/@sudocode-ai/cli/dist/cli/status-commands.js +0 -131
  74. package/node_modules/@sudocode-ai/cli/dist/cli/status-commands.js.map +0 -1
  75. package/node_modules/@sudocode-ai/cli/dist/cli/sync-commands.d.ts +0 -24
  76. package/node_modules/@sudocode-ai/cli/dist/cli/sync-commands.d.ts.map +0 -1
  77. package/node_modules/@sudocode-ai/cli/dist/cli/sync-commands.js +0 -429
  78. package/node_modules/@sudocode-ai/cli/dist/cli/sync-commands.js.map +0 -1
  79. package/node_modules/@sudocode-ai/cli/dist/cli/update-commands.d.ts +0 -16
  80. package/node_modules/@sudocode-ai/cli/dist/cli/update-commands.d.ts.map +0 -1
  81. package/node_modules/@sudocode-ai/cli/dist/cli/update-commands.js +0 -216
  82. package/node_modules/@sudocode-ai/cli/dist/cli/update-commands.js.map +0 -1
  83. package/node_modules/@sudocode-ai/cli/dist/cli.d.ts +0 -6
  84. package/node_modules/@sudocode-ai/cli/dist/cli.d.ts.map +0 -1
  85. package/node_modules/@sudocode-ai/cli/dist/cli.js +0 -673
  86. package/node_modules/@sudocode-ai/cli/dist/cli.js.map +0 -1
  87. package/node_modules/@sudocode-ai/cli/dist/config.d.ts +0 -50
  88. package/node_modules/@sudocode-ai/cli/dist/config.d.ts.map +0 -1
  89. package/node_modules/@sudocode-ai/cli/dist/config.js +0 -76
  90. package/node_modules/@sudocode-ai/cli/dist/config.js.map +0 -1
  91. package/node_modules/@sudocode-ai/cli/dist/db.d.ts +0 -21
  92. package/node_modules/@sudocode-ai/cli/dist/db.d.ts.map +0 -1
  93. package/node_modules/@sudocode-ai/cli/dist/db.js +0 -55
  94. package/node_modules/@sudocode-ai/cli/dist/db.js.map +0 -1
  95. package/node_modules/@sudocode-ai/cli/dist/export.d.ts +0 -84
  96. package/node_modules/@sudocode-ai/cli/dist/export.d.ts.map +0 -1
  97. package/node_modules/@sudocode-ai/cli/dist/export.js +0 -265
  98. package/node_modules/@sudocode-ai/cli/dist/export.js.map +0 -1
  99. package/node_modules/@sudocode-ai/cli/dist/filename-generator.d.ts +0 -31
  100. package/node_modules/@sudocode-ai/cli/dist/filename-generator.d.ts.map +0 -1
  101. package/node_modules/@sudocode-ai/cli/dist/filename-generator.js +0 -103
  102. package/node_modules/@sudocode-ai/cli/dist/filename-generator.js.map +0 -1
  103. package/node_modules/@sudocode-ai/cli/dist/git-merge.d.ts +0 -88
  104. package/node_modules/@sudocode-ai/cli/dist/git-merge.d.ts.map +0 -1
  105. package/node_modules/@sudocode-ai/cli/dist/git-merge.js +0 -214
  106. package/node_modules/@sudocode-ai/cli/dist/git-merge.js.map +0 -1
  107. package/node_modules/@sudocode-ai/cli/dist/id-generator.d.ts +0 -63
  108. package/node_modules/@sudocode-ai/cli/dist/id-generator.d.ts.map +0 -1
  109. package/node_modules/@sudocode-ai/cli/dist/id-generator.js +0 -196
  110. package/node_modules/@sudocode-ai/cli/dist/id-generator.js.map +0 -1
  111. package/node_modules/@sudocode-ai/cli/dist/import.d.ts +0 -134
  112. package/node_modules/@sudocode-ai/cli/dist/import.d.ts.map +0 -1
  113. package/node_modules/@sudocode-ai/cli/dist/import.js +0 -751
  114. package/node_modules/@sudocode-ai/cli/dist/import.js.map +0 -1
  115. package/node_modules/@sudocode-ai/cli/dist/index.d.ts +0 -17
  116. package/node_modules/@sudocode-ai/cli/dist/index.d.ts.map +0 -1
  117. package/node_modules/@sudocode-ai/cli/dist/index.js +0 -17
  118. package/node_modules/@sudocode-ai/cli/dist/index.js.map +0 -1
  119. package/node_modules/@sudocode-ai/cli/dist/integrations/base-provider.d.ts +0 -108
  120. package/node_modules/@sudocode-ai/cli/dist/integrations/base-provider.d.ts.map +0 -1
  121. package/node_modules/@sudocode-ai/cli/dist/integrations/base-provider.js +0 -80
  122. package/node_modules/@sudocode-ai/cli/dist/integrations/base-provider.js.map +0 -1
  123. package/node_modules/@sudocode-ai/cli/dist/integrations/config-resolver.d.ts +0 -62
  124. package/node_modules/@sudocode-ai/cli/dist/integrations/config-resolver.d.ts.map +0 -1
  125. package/node_modules/@sudocode-ai/cli/dist/integrations/config-resolver.js +0 -69
  126. package/node_modules/@sudocode-ai/cli/dist/integrations/config-resolver.js.map +0 -1
  127. package/node_modules/@sudocode-ai/cli/dist/integrations/config-validator.d.ts +0 -75
  128. package/node_modules/@sudocode-ai/cli/dist/integrations/config-validator.d.ts.map +0 -1
  129. package/node_modules/@sudocode-ai/cli/dist/integrations/config-validator.js +0 -129
  130. package/node_modules/@sudocode-ai/cli/dist/integrations/config-validator.js.map +0 -1
  131. package/node_modules/@sudocode-ai/cli/dist/integrations/index.d.ts +0 -14
  132. package/node_modules/@sudocode-ai/cli/dist/integrations/index.d.ts.map +0 -1
  133. package/node_modules/@sudocode-ai/cli/dist/integrations/index.js +0 -20
  134. package/node_modules/@sudocode-ai/cli/dist/integrations/index.js.map +0 -1
  135. package/node_modules/@sudocode-ai/cli/dist/integrations/plugin-loader.d.ts +0 -77
  136. package/node_modules/@sudocode-ai/cli/dist/integrations/plugin-loader.d.ts.map +0 -1
  137. package/node_modules/@sudocode-ai/cli/dist/integrations/plugin-loader.js +0 -265
  138. package/node_modules/@sudocode-ai/cli/dist/integrations/plugin-loader.js.map +0 -1
  139. package/node_modules/@sudocode-ai/cli/dist/integrations/registry.d.ts +0 -67
  140. package/node_modules/@sudocode-ai/cli/dist/integrations/registry.d.ts.map +0 -1
  141. package/node_modules/@sudocode-ai/cli/dist/integrations/registry.js +0 -77
  142. package/node_modules/@sudocode-ai/cli/dist/integrations/registry.js.map +0 -1
  143. package/node_modules/@sudocode-ai/cli/dist/integrations/sync-coordinator.d.ts +0 -191
  144. package/node_modules/@sudocode-ai/cli/dist/integrations/sync-coordinator.d.ts.map +0 -1
  145. package/node_modules/@sudocode-ai/cli/dist/integrations/sync-coordinator.js +0 -798
  146. package/node_modules/@sudocode-ai/cli/dist/integrations/sync-coordinator.js.map +0 -1
  147. package/node_modules/@sudocode-ai/cli/dist/integrations/types.d.ts +0 -142
  148. package/node_modules/@sudocode-ai/cli/dist/integrations/types.d.ts.map +0 -1
  149. package/node_modules/@sudocode-ai/cli/dist/integrations/types.js +0 -6
  150. package/node_modules/@sudocode-ai/cli/dist/integrations/types.js.map +0 -1
  151. package/node_modules/@sudocode-ai/cli/dist/integrations/utils/conflict-resolver.d.ts +0 -79
  152. package/node_modules/@sudocode-ai/cli/dist/integrations/utils/conflict-resolver.d.ts.map +0 -1
  153. package/node_modules/@sudocode-ai/cli/dist/integrations/utils/conflict-resolver.js +0 -106
  154. package/node_modules/@sudocode-ai/cli/dist/integrations/utils/conflict-resolver.js.map +0 -1
  155. package/node_modules/@sudocode-ai/cli/dist/jsonl.d.ts +0 -69
  156. package/node_modules/@sudocode-ai/cli/dist/jsonl.d.ts.map +0 -1
  157. package/node_modules/@sudocode-ai/cli/dist/jsonl.js +0 -333
  158. package/node_modules/@sudocode-ai/cli/dist/jsonl.js.map +0 -1
  159. package/node_modules/@sudocode-ai/cli/dist/markdown.d.ts +0 -146
  160. package/node_modules/@sudocode-ai/cli/dist/markdown.d.ts.map +0 -1
  161. package/node_modules/@sudocode-ai/cli/dist/markdown.js +0 -329
  162. package/node_modules/@sudocode-ai/cli/dist/markdown.js.map +0 -1
  163. package/node_modules/@sudocode-ai/cli/dist/merge-resolver.d.ts +0 -157
  164. package/node_modules/@sudocode-ai/cli/dist/merge-resolver.d.ts.map +0 -1
  165. package/node_modules/@sudocode-ai/cli/dist/merge-resolver.js +0 -716
  166. package/node_modules/@sudocode-ai/cli/dist/merge-resolver.js.map +0 -1
  167. package/node_modules/@sudocode-ai/cli/dist/operations/events.d.ts +0 -53
  168. package/node_modules/@sudocode-ai/cli/dist/operations/events.d.ts.map +0 -1
  169. package/node_modules/@sudocode-ai/cli/dist/operations/events.js +0 -108
  170. package/node_modules/@sudocode-ai/cli/dist/operations/events.js.map +0 -1
  171. package/node_modules/@sudocode-ai/cli/dist/operations/external-links.d.ts +0 -147
  172. package/node_modules/@sudocode-ai/cli/dist/operations/external-links.d.ts.map +0 -1
  173. package/node_modules/@sudocode-ai/cli/dist/operations/external-links.js +0 -411
  174. package/node_modules/@sudocode-ai/cli/dist/operations/external-links.js.map +0 -1
  175. package/node_modules/@sudocode-ai/cli/dist/operations/feedback-anchors.d.ts +0 -92
  176. package/node_modules/@sudocode-ai/cli/dist/operations/feedback-anchors.d.ts.map +0 -1
  177. package/node_modules/@sudocode-ai/cli/dist/operations/feedback-anchors.js +0 -444
  178. package/node_modules/@sudocode-ai/cli/dist/operations/feedback-anchors.js.map +0 -1
  179. package/node_modules/@sudocode-ai/cli/dist/operations/feedback.d.ts +0 -94
  180. package/node_modules/@sudocode-ai/cli/dist/operations/feedback.d.ts.map +0 -1
  181. package/node_modules/@sudocode-ai/cli/dist/operations/feedback.js +0 -278
  182. package/node_modules/@sudocode-ai/cli/dist/operations/feedback.js.map +0 -1
  183. package/node_modules/@sudocode-ai/cli/dist/operations/index.d.ts +0 -11
  184. package/node_modules/@sudocode-ai/cli/dist/operations/index.d.ts.map +0 -1
  185. package/node_modules/@sudocode-ai/cli/dist/operations/index.js +0 -11
  186. package/node_modules/@sudocode-ai/cli/dist/operations/index.js.map +0 -1
  187. package/node_modules/@sudocode-ai/cli/dist/operations/issues.d.ts +0 -88
  188. package/node_modules/@sudocode-ai/cli/dist/operations/issues.d.ts.map +0 -1
  189. package/node_modules/@sudocode-ai/cli/dist/operations/issues.js +0 -474
  190. package/node_modules/@sudocode-ai/cli/dist/operations/issues.js.map +0 -1
  191. package/node_modules/@sudocode-ai/cli/dist/operations/references.d.ts +0 -34
  192. package/node_modules/@sudocode-ai/cli/dist/operations/references.d.ts.map +0 -1
  193. package/node_modules/@sudocode-ai/cli/dist/operations/references.js +0 -117
  194. package/node_modules/@sudocode-ai/cli/dist/operations/references.js.map +0 -1
  195. package/node_modules/@sudocode-ai/cli/dist/operations/relationships.d.ts +0 -64
  196. package/node_modules/@sudocode-ai/cli/dist/operations/relationships.d.ts.map +0 -1
  197. package/node_modules/@sudocode-ai/cli/dist/operations/relationships.js +0 -281
  198. package/node_modules/@sudocode-ai/cli/dist/operations/relationships.js.map +0 -1
  199. package/node_modules/@sudocode-ai/cli/dist/operations/specs.d.ts +0 -69
  200. package/node_modules/@sudocode-ai/cli/dist/operations/specs.d.ts.map +0 -1
  201. package/node_modules/@sudocode-ai/cli/dist/operations/specs.js +0 -330
  202. package/node_modules/@sudocode-ai/cli/dist/operations/specs.js.map +0 -1
  203. package/node_modules/@sudocode-ai/cli/dist/operations/tags.d.ts +0 -42
  204. package/node_modules/@sudocode-ai/cli/dist/operations/tags.d.ts.map +0 -1
  205. package/node_modules/@sudocode-ai/cli/dist/operations/tags.js +0 -127
  206. package/node_modules/@sudocode-ai/cli/dist/operations/tags.js.map +0 -1
  207. package/node_modules/@sudocode-ai/cli/dist/operations/transactions.d.ts +0 -41
  208. package/node_modules/@sudocode-ai/cli/dist/operations/transactions.d.ts.map +0 -1
  209. package/node_modules/@sudocode-ai/cli/dist/operations/transactions.js +0 -111
  210. package/node_modules/@sudocode-ai/cli/dist/operations/transactions.js.map +0 -1
  211. package/node_modules/@sudocode-ai/cli/dist/remote/claude-auth.d.ts +0 -65
  212. package/node_modules/@sudocode-ai/cli/dist/remote/claude-auth.d.ts.map +0 -1
  213. package/node_modules/@sudocode-ai/cli/dist/remote/claude-auth.js +0 -100
  214. package/node_modules/@sudocode-ai/cli/dist/remote/claude-auth.js.map +0 -1
  215. package/node_modules/@sudocode-ai/cli/dist/remote/config.d.ts +0 -83
  216. package/node_modules/@sudocode-ai/cli/dist/remote/config.d.ts.map +0 -1
  217. package/node_modules/@sudocode-ai/cli/dist/remote/config.js +0 -266
  218. package/node_modules/@sudocode-ai/cli/dist/remote/config.js.map +0 -1
  219. package/node_modules/@sudocode-ai/cli/dist/remote/errors.d.ts +0 -18
  220. package/node_modules/@sudocode-ai/cli/dist/remote/errors.d.ts.map +0 -1
  221. package/node_modules/@sudocode-ai/cli/dist/remote/errors.js +0 -27
  222. package/node_modules/@sudocode-ai/cli/dist/remote/errors.js.map +0 -1
  223. package/node_modules/@sudocode-ai/cli/dist/remote/git-context.d.ts +0 -51
  224. package/node_modules/@sudocode-ai/cli/dist/remote/git-context.d.ts.map +0 -1
  225. package/node_modules/@sudocode-ai/cli/dist/remote/git-context.js +0 -107
  226. package/node_modules/@sudocode-ai/cli/dist/remote/git-context.js.map +0 -1
  227. package/node_modules/@sudocode-ai/cli/dist/remote/spawn-service.d.ts +0 -86
  228. package/node_modules/@sudocode-ai/cli/dist/remote/spawn-service.d.ts.map +0 -1
  229. package/node_modules/@sudocode-ai/cli/dist/remote/spawn-service.js +0 -248
  230. package/node_modules/@sudocode-ai/cli/dist/remote/spawn-service.js.map +0 -1
  231. package/node_modules/@sudocode-ai/cli/dist/remote/types.d.ts +0 -82
  232. package/node_modules/@sudocode-ai/cli/dist/remote/types.d.ts.map +0 -1
  233. package/node_modules/@sudocode-ai/cli/dist/remote/types.js +0 -5
  234. package/node_modules/@sudocode-ai/cli/dist/remote/types.js.map +0 -1
  235. package/node_modules/@sudocode-ai/cli/dist/sync.d.ts +0 -47
  236. package/node_modules/@sudocode-ai/cli/dist/sync.d.ts.map +0 -1
  237. package/node_modules/@sudocode-ai/cli/dist/sync.js +0 -464
  238. package/node_modules/@sudocode-ai/cli/dist/sync.js.map +0 -1
  239. package/node_modules/@sudocode-ai/cli/dist/test-schema.d.ts +0 -5
  240. package/node_modules/@sudocode-ai/cli/dist/test-schema.d.ts.map +0 -1
  241. package/node_modules/@sudocode-ai/cli/dist/test-schema.js +0 -46
  242. package/node_modules/@sudocode-ai/cli/dist/test-schema.js.map +0 -1
  243. package/node_modules/@sudocode-ai/cli/dist/types.d.ts +0 -7
  244. package/node_modules/@sudocode-ai/cli/dist/types.d.ts.map +0 -1
  245. package/node_modules/@sudocode-ai/cli/dist/types.js +0 -7
  246. package/node_modules/@sudocode-ai/cli/dist/types.js.map +0 -1
  247. package/node_modules/@sudocode-ai/cli/dist/update-checker.d.ts +0 -33
  248. package/node_modules/@sudocode-ai/cli/dist/update-checker.d.ts.map +0 -1
  249. package/node_modules/@sudocode-ai/cli/dist/update-checker.js +0 -193
  250. package/node_modules/@sudocode-ai/cli/dist/update-checker.js.map +0 -1
  251. package/node_modules/@sudocode-ai/cli/dist/validation.d.ts +0 -11
  252. package/node_modules/@sudocode-ai/cli/dist/validation.d.ts.map +0 -1
  253. package/node_modules/@sudocode-ai/cli/dist/validation.js +0 -58
  254. package/node_modules/@sudocode-ai/cli/dist/validation.js.map +0 -1
  255. package/node_modules/@sudocode-ai/cli/dist/version.d.ts +0 -12
  256. package/node_modules/@sudocode-ai/cli/dist/version.d.ts.map +0 -1
  257. package/node_modules/@sudocode-ai/cli/dist/version.js +0 -23
  258. package/node_modules/@sudocode-ai/cli/dist/version.js.map +0 -1
  259. package/node_modules/@sudocode-ai/cli/dist/watcher.d.ts +0 -75
  260. package/node_modules/@sudocode-ai/cli/dist/watcher.d.ts.map +0 -1
  261. package/node_modules/@sudocode-ai/cli/dist/watcher.js +0 -797
  262. package/node_modules/@sudocode-ai/cli/dist/watcher.js.map +0 -1
  263. package/node_modules/@sudocode-ai/cli/dist/yaml-conflict-resolver.d.ts +0 -91
  264. package/node_modules/@sudocode-ai/cli/dist/yaml-conflict-resolver.d.ts.map +0 -1
  265. package/node_modules/@sudocode-ai/cli/dist/yaml-conflict-resolver.js +0 -197
  266. package/node_modules/@sudocode-ai/cli/dist/yaml-conflict-resolver.js.map +0 -1
  267. package/node_modules/@sudocode-ai/cli/dist/yaml-converter.d.ts +0 -68
  268. package/node_modules/@sudocode-ai/cli/dist/yaml-converter.d.ts.map +0 -1
  269. package/node_modules/@sudocode-ai/cli/dist/yaml-converter.js +0 -109
  270. package/node_modules/@sudocode-ai/cli/dist/yaml-converter.js.map +0 -1
  271. package/node_modules/@sudocode-ai/cli/package.json +0 -76
  272. package/node_modules/@sudocode-ai/integration-beads/package.json +0 -44
  273. package/node_modules/@sudocode-ai/integration-github/package.json +0 -41
  274. package/node_modules/@sudocode-ai/integration-openspec/package.json +0 -43
  275. package/node_modules/@sudocode-ai/integration-speckit/package.json +0 -42
  276. package/node_modules/@sudocode-ai/local-server/README.md +0 -25
  277. package/node_modules/@sudocode-ai/local-server/dist/cli.d.ts +0 -7
  278. package/node_modules/@sudocode-ai/local-server/dist/cli.d.ts.map +0 -1
  279. package/node_modules/@sudocode-ai/local-server/dist/cli.js +0 -7
  280. package/node_modules/@sudocode-ai/local-server/dist/cli.js.map +0 -1
  281. package/node_modules/@sudocode-ai/local-server/dist/errors/agent-errors.d.ts +0 -43
  282. package/node_modules/@sudocode-ai/local-server/dist/errors/agent-errors.d.ts.map +0 -1
  283. package/node_modules/@sudocode-ai/local-server/dist/errors/agent-errors.js +0 -69
  284. package/node_modules/@sudocode-ai/local-server/dist/errors/agent-errors.js.map +0 -1
  285. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/claude-adapter.d.ts +0 -63
  286. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/claude-adapter.d.ts.map +0 -1
  287. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/claude-adapter.js +0 -83
  288. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/claude-adapter.js.map +0 -1
  289. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/codex-adapter.d.ts +0 -67
  290. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/codex-adapter.d.ts.map +0 -1
  291. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/codex-adapter.js +0 -183
  292. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/codex-adapter.js.map +0 -1
  293. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/codex-config-builder.d.ts +0 -30
  294. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/codex-config-builder.d.ts.map +0 -1
  295. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/codex-config-builder.js +0 -110
  296. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/codex-config-builder.js.map +0 -1
  297. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/copilot-adapter.d.ts +0 -94
  298. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/copilot-adapter.d.ts.map +0 -1
  299. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/copilot-adapter.js +0 -163
  300. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/copilot-adapter.js.map +0 -1
  301. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/copilot-config-builder.d.ts +0 -48
  302. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/copilot-config-builder.d.ts.map +0 -1
  303. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/copilot-config-builder.js +0 -125
  304. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/copilot-config-builder.js.map +0 -1
  305. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/cursor-adapter.d.ts +0 -66
  306. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/cursor-adapter.d.ts.map +0 -1
  307. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/cursor-adapter.js +0 -121
  308. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/cursor-adapter.js.map +0 -1
  309. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/cursor-config-builder.d.ts +0 -29
  310. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/cursor-config-builder.d.ts.map +0 -1
  311. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/cursor-config-builder.js +0 -49
  312. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/cursor-config-builder.js.map +0 -1
  313. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/shared/config-presets.d.ts +0 -102
  314. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/shared/config-presets.d.ts.map +0 -1
  315. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/shared/config-presets.js +0 -205
  316. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/shared/config-presets.js.map +0 -1
  317. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/shared/config-utils.d.ts +0 -95
  318. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/shared/config-utils.d.ts.map +0 -1
  319. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/shared/config-utils.js +0 -163
  320. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/shared/config-utils.js.map +0 -1
  321. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/shared/index.d.ts +0 -8
  322. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/shared/index.d.ts.map +0 -1
  323. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/shared/index.js +0 -8
  324. package/node_modules/@sudocode-ai/local-server/dist/execution/adapters/shared/index.js.map +0 -1
  325. package/node_modules/@sudocode-ai/local-server/dist/execution/executors/acp-executor-wrapper.d.ts +0 -331
  326. package/node_modules/@sudocode-ai/local-server/dist/execution/executors/acp-executor-wrapper.d.ts.map +0 -1
  327. package/node_modules/@sudocode-ai/local-server/dist/execution/executors/acp-executor-wrapper.js +0 -1126
  328. package/node_modules/@sudocode-ai/local-server/dist/execution/executors/acp-executor-wrapper.js.map +0 -1
  329. package/node_modules/@sudocode-ai/local-server/dist/execution/executors/agent-config-handlers.d.ts +0 -158
  330. package/node_modules/@sudocode-ai/local-server/dist/execution/executors/agent-config-handlers.d.ts.map +0 -1
  331. package/node_modules/@sudocode-ai/local-server/dist/execution/executors/agent-config-handlers.js +0 -352
  332. package/node_modules/@sudocode-ai/local-server/dist/execution/executors/agent-config-handlers.js.map +0 -1
  333. package/node_modules/@sudocode-ai/local-server/dist/execution/executors/executor-factory.d.ts +0 -170
  334. package/node_modules/@sudocode-ai/local-server/dist/execution/executors/executor-factory.d.ts.map +0 -1
  335. package/node_modules/@sudocode-ai/local-server/dist/execution/executors/executor-factory.js +0 -216
  336. package/node_modules/@sudocode-ai/local-server/dist/execution/executors/executor-factory.js.map +0 -1
  337. package/node_modules/@sudocode-ai/local-server/dist/execution/executors/legacy-shim-executor-wrapper.d.ts +0 -216
  338. package/node_modules/@sudocode-ai/local-server/dist/execution/executors/legacy-shim-executor-wrapper.d.ts.map +0 -1
  339. package/node_modules/@sudocode-ai/local-server/dist/execution/executors/legacy-shim-executor-wrapper.js +0 -679
  340. package/node_modules/@sudocode-ai/local-server/dist/execution/executors/legacy-shim-executor-wrapper.js.map +0 -1
  341. package/node_modules/@sudocode-ai/local-server/dist/execution/executors/permission-manager.d.ts +0 -118
  342. package/node_modules/@sudocode-ai/local-server/dist/execution/executors/permission-manager.d.ts.map +0 -1
  343. package/node_modules/@sudocode-ai/local-server/dist/execution/executors/permission-manager.js +0 -143
  344. package/node_modules/@sudocode-ai/local-server/dist/execution/executors/permission-manager.js.map +0 -1
  345. package/node_modules/@sudocode-ai/local-server/dist/execution/handlers/file-handler.d.ts +0 -60
  346. package/node_modules/@sudocode-ai/local-server/dist/execution/handlers/file-handler.d.ts.map +0 -1
  347. package/node_modules/@sudocode-ai/local-server/dist/execution/handlers/file-handler.js +0 -115
  348. package/node_modules/@sudocode-ai/local-server/dist/execution/handlers/file-handler.js.map +0 -1
  349. package/node_modules/@sudocode-ai/local-server/dist/execution/output/coalesced-types.d.ts +0 -131
  350. package/node_modules/@sudocode-ai/local-server/dist/execution/output/coalesced-types.d.ts.map +0 -1
  351. package/node_modules/@sudocode-ai/local-server/dist/execution/output/coalesced-types.js +0 -47
  352. package/node_modules/@sudocode-ai/local-server/dist/execution/output/coalesced-types.js.map +0 -1
  353. package/node_modules/@sudocode-ai/local-server/dist/execution/output/index.d.ts +0 -16
  354. package/node_modules/@sudocode-ai/local-server/dist/execution/output/index.d.ts.map +0 -1
  355. package/node_modules/@sudocode-ai/local-server/dist/execution/output/index.js +0 -15
  356. package/node_modules/@sudocode-ai/local-server/dist/execution/output/index.js.map +0 -1
  357. package/node_modules/@sudocode-ai/local-server/dist/execution/output/normalized-to-coalesced.d.ts +0 -40
  358. package/node_modules/@sudocode-ai/local-server/dist/execution/output/normalized-to-coalesced.d.ts.map +0 -1
  359. package/node_modules/@sudocode-ai/local-server/dist/execution/output/normalized-to-coalesced.js +0 -165
  360. package/node_modules/@sudocode-ai/local-server/dist/execution/output/normalized-to-coalesced.js.map +0 -1
  361. package/node_modules/@sudocode-ai/local-server/dist/execution/output/session-update-coalescer.d.ts +0 -99
  362. package/node_modules/@sudocode-ai/local-server/dist/execution/output/session-update-coalescer.d.ts.map +0 -1
  363. package/node_modules/@sudocode-ai/local-server/dist/execution/output/session-update-coalescer.js +0 -329
  364. package/node_modules/@sudocode-ai/local-server/dist/execution/output/session-update-coalescer.js.map +0 -1
  365. package/node_modules/@sudocode-ai/local-server/dist/execution/output/types.d.ts +0 -421
  366. package/node_modules/@sudocode-ai/local-server/dist/execution/output/types.d.ts.map +0 -1
  367. package/node_modules/@sudocode-ai/local-server/dist/execution/output/types.js +0 -22
  368. package/node_modules/@sudocode-ai/local-server/dist/execution/output/types.js.map +0 -1
  369. package/node_modules/@sudocode-ai/local-server/dist/execution/process/builders/claude.d.ts +0 -53
  370. package/node_modules/@sudocode-ai/local-server/dist/execution/process/builders/claude.d.ts.map +0 -1
  371. package/node_modules/@sudocode-ai/local-server/dist/execution/process/builders/claude.js +0 -225
  372. package/node_modules/@sudocode-ai/local-server/dist/execution/process/builders/claude.js.map +0 -1
  373. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/config.d.ts +0 -74
  374. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/config.d.ts.map +0 -1
  375. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/config.js +0 -280
  376. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/config.js.map +0 -1
  377. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/conflict-detector.d.ts +0 -85
  378. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/conflict-detector.d.ts.map +0 -1
  379. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/conflict-detector.js +0 -129
  380. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/conflict-detector.js.map +0 -1
  381. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/git-cli.d.ts +0 -208
  382. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/git-cli.d.ts.map +0 -1
  383. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/git-cli.js +0 -280
  384. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/git-cli.js.map +0 -1
  385. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/git-sync-cli.d.ts +0 -225
  386. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/git-sync-cli.d.ts.map +0 -1
  387. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/git-sync-cli.js +0 -464
  388. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/git-sync-cli.js.map +0 -1
  389. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/index.d.ts +0 -16
  390. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/index.d.ts.map +0 -1
  391. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/index.js +0 -15
  392. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/index.js.map +0 -1
  393. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/manager.d.ts +0 -221
  394. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/manager.d.ts.map +0 -1
  395. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/manager.js +0 -508
  396. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/manager.js.map +0 -1
  397. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/types.d.ts +0 -90
  398. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/types.d.ts.map +0 -1
  399. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/types.js +0 -42
  400. package/node_modules/@sudocode-ai/local-server/dist/execution/worktree/types.js.map +0 -1
  401. package/node_modules/@sudocode-ai/local-server/dist/index.d.ts +0 -3
  402. package/node_modules/@sudocode-ai/local-server/dist/index.d.ts.map +0 -1
  403. package/node_modules/@sudocode-ai/local-server/dist/index.js +0 -413
  404. package/node_modules/@sudocode-ai/local-server/dist/index.js.map +0 -1
  405. package/node_modules/@sudocode-ai/local-server/dist/middleware/project-context.d.ts +0 -37
  406. package/node_modules/@sudocode-ai/local-server/dist/middleware/project-context.d.ts.map +0 -1
  407. package/node_modules/@sudocode-ai/local-server/dist/middleware/project-context.js +0 -91
  408. package/node_modules/@sudocode-ai/local-server/dist/middleware/project-context.js.map +0 -1
  409. package/node_modules/@sudocode-ai/local-server/dist/public/assets/index-6xIC1sAG.js +0 -3837
  410. package/node_modules/@sudocode-ai/local-server/dist/public/assets/index-6xIC1sAG.js.map +0 -1
  411. package/node_modules/@sudocode-ai/local-server/dist/public/assets/index-QH6t9Xqh.css +0 -1
  412. package/node_modules/@sudocode-ai/local-server/dist/public/assets/ort-wasm-simd-threaded.jsep-B0T3yYHD.wasm +0 -0
  413. package/node_modules/@sudocode-ai/local-server/dist/public/assets/react-vendor-DoNwlLhy.js +0 -60
  414. package/node_modules/@sudocode-ai/local-server/dist/public/assets/react-vendor-DoNwlLhy.js.map +0 -1
  415. package/node_modules/@sudocode-ai/local-server/dist/public/assets/ui-vendor-DlxvBun1.js +0 -54
  416. package/node_modules/@sudocode-ai/local-server/dist/public/assets/ui-vendor-DlxvBun1.js.map +0 -1
  417. package/node_modules/@sudocode-ai/local-server/dist/public/favicon.ico +0 -0
  418. package/node_modules/@sudocode-ai/local-server/dist/public/index.html +0 -16
  419. package/node_modules/@sudocode-ai/local-server/dist/public/kokoro-test.html +0 -197
  420. package/node_modules/@sudocode-ai/local-server/dist/public/logo.png +0 -0
  421. package/node_modules/@sudocode-ai/local-server/dist/routes/agents.d.ts +0 -3
  422. package/node_modules/@sudocode-ai/local-server/dist/routes/agents.d.ts.map +0 -1
  423. package/node_modules/@sudocode-ai/local-server/dist/routes/agents.js +0 -188
  424. package/node_modules/@sudocode-ai/local-server/dist/routes/agents.js.map +0 -1
  425. package/node_modules/@sudocode-ai/local-server/dist/routes/config.d.ts +0 -3
  426. package/node_modules/@sudocode-ai/local-server/dist/routes/config.d.ts.map +0 -1
  427. package/node_modules/@sudocode-ai/local-server/dist/routes/config.js +0 -155
  428. package/node_modules/@sudocode-ai/local-server/dist/routes/config.js.map +0 -1
  429. package/node_modules/@sudocode-ai/local-server/dist/routes/editors.d.ts +0 -15
  430. package/node_modules/@sudocode-ai/local-server/dist/routes/editors.d.ts.map +0 -1
  431. package/node_modules/@sudocode-ai/local-server/dist/routes/editors.js +0 -98
  432. package/node_modules/@sudocode-ai/local-server/dist/routes/editors.js.map +0 -1
  433. package/node_modules/@sudocode-ai/local-server/dist/routes/executions.d.ts +0 -18
  434. package/node_modules/@sudocode-ai/local-server/dist/routes/executions.d.ts.map +0 -1
  435. package/node_modules/@sudocode-ai/local-server/dist/routes/executions.js +0 -1570
  436. package/node_modules/@sudocode-ai/local-server/dist/routes/executions.js.map +0 -1
  437. package/node_modules/@sudocode-ai/local-server/dist/routes/feedback.d.ts +0 -8
  438. package/node_modules/@sudocode-ai/local-server/dist/routes/feedback.d.ts.map +0 -1
  439. package/node_modules/@sudocode-ai/local-server/dist/routes/feedback.js +0 -340
  440. package/node_modules/@sudocode-ai/local-server/dist/routes/feedback.js.map +0 -1
  441. package/node_modules/@sudocode-ai/local-server/dist/routes/files.d.ts +0 -18
  442. package/node_modules/@sudocode-ai/local-server/dist/routes/files.d.ts.map +0 -1
  443. package/node_modules/@sudocode-ai/local-server/dist/routes/files.js +0 -89
  444. package/node_modules/@sudocode-ai/local-server/dist/routes/files.js.map +0 -1
  445. package/node_modules/@sudocode-ai/local-server/dist/routes/import.d.ts +0 -142
  446. package/node_modules/@sudocode-ai/local-server/dist/routes/import.d.ts.map +0 -1
  447. package/node_modules/@sudocode-ai/local-server/dist/routes/import.js +0 -896
  448. package/node_modules/@sudocode-ai/local-server/dist/routes/import.js.map +0 -1
  449. package/node_modules/@sudocode-ai/local-server/dist/routes/issues.d.ts +0 -8
  450. package/node_modules/@sudocode-ai/local-server/dist/routes/issues.d.ts.map +0 -1
  451. package/node_modules/@sudocode-ai/local-server/dist/routes/issues.js +0 -419
  452. package/node_modules/@sudocode-ai/local-server/dist/routes/issues.js.map +0 -1
  453. package/node_modules/@sudocode-ai/local-server/dist/routes/plugins.d.ts +0 -34
  454. package/node_modules/@sudocode-ai/local-server/dist/routes/plugins.d.ts.map +0 -1
  455. package/node_modules/@sudocode-ai/local-server/dist/routes/plugins.js +0 -602
  456. package/node_modules/@sudocode-ai/local-server/dist/routes/plugins.js.map +0 -1
  457. package/node_modules/@sudocode-ai/local-server/dist/routes/projects.d.ts +0 -11
  458. package/node_modules/@sudocode-ai/local-server/dist/routes/projects.d.ts.map +0 -1
  459. package/node_modules/@sudocode-ai/local-server/dist/routes/projects.js +0 -536
  460. package/node_modules/@sudocode-ai/local-server/dist/routes/projects.js.map +0 -1
  461. package/node_modules/@sudocode-ai/local-server/dist/routes/relationships.d.ts +0 -8
  462. package/node_modules/@sudocode-ai/local-server/dist/routes/relationships.d.ts.map +0 -1
  463. package/node_modules/@sudocode-ai/local-server/dist/routes/relationships.js +0 -310
  464. package/node_modules/@sudocode-ai/local-server/dist/routes/relationships.js.map +0 -1
  465. package/node_modules/@sudocode-ai/local-server/dist/routes/repo-info.d.ts +0 -3
  466. package/node_modules/@sudocode-ai/local-server/dist/routes/repo-info.d.ts.map +0 -1
  467. package/node_modules/@sudocode-ai/local-server/dist/routes/repo-info.js +0 -203
  468. package/node_modules/@sudocode-ai/local-server/dist/routes/repo-info.js.map +0 -1
  469. package/node_modules/@sudocode-ai/local-server/dist/routes/specs.d.ts +0 -8
  470. package/node_modules/@sudocode-ai/local-server/dist/routes/specs.d.ts.map +0 -1
  471. package/node_modules/@sudocode-ai/local-server/dist/routes/specs.js +0 -414
  472. package/node_modules/@sudocode-ai/local-server/dist/routes/specs.js.map +0 -1
  473. package/node_modules/@sudocode-ai/local-server/dist/routes/update.d.ts +0 -7
  474. package/node_modules/@sudocode-ai/local-server/dist/routes/update.d.ts.map +0 -1
  475. package/node_modules/@sudocode-ai/local-server/dist/routes/update.js +0 -194
  476. package/node_modules/@sudocode-ai/local-server/dist/routes/update.js.map +0 -1
  477. package/node_modules/@sudocode-ai/local-server/dist/routes/version.d.ts +0 -3
  478. package/node_modules/@sudocode-ai/local-server/dist/routes/version.d.ts.map +0 -1
  479. package/node_modules/@sudocode-ai/local-server/dist/routes/version.js +0 -25
  480. package/node_modules/@sudocode-ai/local-server/dist/routes/version.js.map +0 -1
  481. package/node_modules/@sudocode-ai/local-server/dist/routes/voice.d.ts +0 -12
  482. package/node_modules/@sudocode-ai/local-server/dist/routes/voice.d.ts.map +0 -1
  483. package/node_modules/@sudocode-ai/local-server/dist/routes/voice.js +0 -387
  484. package/node_modules/@sudocode-ai/local-server/dist/routes/voice.js.map +0 -1
  485. package/node_modules/@sudocode-ai/local-server/dist/routes/workflows.d.ts +0 -8
  486. package/node_modules/@sudocode-ai/local-server/dist/routes/workflows.d.ts.map +0 -1
  487. package/node_modules/@sudocode-ai/local-server/dist/routes/workflows.js +0 -1730
  488. package/node_modules/@sudocode-ai/local-server/dist/routes/workflows.js.map +0 -1
  489. package/node_modules/@sudocode-ai/local-server/dist/services/agent-registry.d.ts +0 -150
  490. package/node_modules/@sudocode-ai/local-server/dist/services/agent-registry.d.ts.map +0 -1
  491. package/node_modules/@sudocode-ai/local-server/dist/services/agent-registry.js +0 -312
  492. package/node_modules/@sudocode-ai/local-server/dist/services/agent-registry.js.map +0 -1
  493. package/node_modules/@sudocode-ai/local-server/dist/services/command-discovery-service.d.ts +0 -43
  494. package/node_modules/@sudocode-ai/local-server/dist/services/command-discovery-service.d.ts.map +0 -1
  495. package/node_modules/@sudocode-ai/local-server/dist/services/command-discovery-service.js +0 -114
  496. package/node_modules/@sudocode-ai/local-server/dist/services/command-discovery-service.js.map +0 -1
  497. package/node_modules/@sudocode-ai/local-server/dist/services/db.d.ts +0 -33
  498. package/node_modules/@sudocode-ai/local-server/dist/services/db.d.ts.map +0 -1
  499. package/node_modules/@sudocode-ai/local-server/dist/services/db.js +0 -90
  500. package/node_modules/@sudocode-ai/local-server/dist/services/db.js.map +0 -1
  501. package/node_modules/@sudocode-ai/local-server/dist/services/editor-service.d.ts +0 -57
  502. package/node_modules/@sudocode-ai/local-server/dist/services/editor-service.d.ts.map +0 -1
  503. package/node_modules/@sudocode-ai/local-server/dist/services/editor-service.js +0 -204
  504. package/node_modules/@sudocode-ai/local-server/dist/services/editor-service.js.map +0 -1
  505. package/node_modules/@sudocode-ai/local-server/dist/services/execution-changes-service.d.ts +0 -110
  506. package/node_modules/@sudocode-ai/local-server/dist/services/execution-changes-service.d.ts.map +0 -1
  507. package/node_modules/@sudocode-ai/local-server/dist/services/execution-changes-service.js +0 -710
  508. package/node_modules/@sudocode-ai/local-server/dist/services/execution-changes-service.js.map +0 -1
  509. package/node_modules/@sudocode-ai/local-server/dist/services/execution-event-callbacks.d.ts +0 -73
  510. package/node_modules/@sudocode-ai/local-server/dist/services/execution-event-callbacks.d.ts.map +0 -1
  511. package/node_modules/@sudocode-ai/local-server/dist/services/execution-event-callbacks.js +0 -82
  512. package/node_modules/@sudocode-ai/local-server/dist/services/execution-event-callbacks.js.map +0 -1
  513. package/node_modules/@sudocode-ai/local-server/dist/services/execution-lifecycle.d.ts +0 -145
  514. package/node_modules/@sudocode-ai/local-server/dist/services/execution-lifecycle.d.ts.map +0 -1
  515. package/node_modules/@sudocode-ai/local-server/dist/services/execution-lifecycle.js +0 -392
  516. package/node_modules/@sudocode-ai/local-server/dist/services/execution-lifecycle.js.map +0 -1
  517. package/node_modules/@sudocode-ai/local-server/dist/services/execution-logs-cleanup.d.ts +0 -88
  518. package/node_modules/@sudocode-ai/local-server/dist/services/execution-logs-cleanup.d.ts.map +0 -1
  519. package/node_modules/@sudocode-ai/local-server/dist/services/execution-logs-cleanup.js +0 -137
  520. package/node_modules/@sudocode-ai/local-server/dist/services/execution-logs-cleanup.js.map +0 -1
  521. package/node_modules/@sudocode-ai/local-server/dist/services/execution-logs-store.d.ts +0 -312
  522. package/node_modules/@sudocode-ai/local-server/dist/services/execution-logs-store.d.ts.map +0 -1
  523. package/node_modules/@sudocode-ai/local-server/dist/services/execution-logs-store.js +0 -518
  524. package/node_modules/@sudocode-ai/local-server/dist/services/execution-logs-store.js.map +0 -1
  525. package/node_modules/@sudocode-ai/local-server/dist/services/execution-service.d.ts +0 -409
  526. package/node_modules/@sudocode-ai/local-server/dist/services/execution-service.d.ts.map +0 -1
  527. package/node_modules/@sudocode-ai/local-server/dist/services/execution-service.js +0 -1694
  528. package/node_modules/@sudocode-ai/local-server/dist/services/execution-service.js.map +0 -1
  529. package/node_modules/@sudocode-ai/local-server/dist/services/execution-worker-pool.d.ts +0 -116
  530. package/node_modules/@sudocode-ai/local-server/dist/services/execution-worker-pool.d.ts.map +0 -1
  531. package/node_modules/@sudocode-ai/local-server/dist/services/execution-worker-pool.js +0 -326
  532. package/node_modules/@sudocode-ai/local-server/dist/services/execution-worker-pool.js.map +0 -1
  533. package/node_modules/@sudocode-ai/local-server/dist/services/executions.d.ts +0 -63
  534. package/node_modules/@sudocode-ai/local-server/dist/services/executions.d.ts.map +0 -1
  535. package/node_modules/@sudocode-ai/local-server/dist/services/executions.js +0 -177
  536. package/node_modules/@sudocode-ai/local-server/dist/services/executions.js.map +0 -1
  537. package/node_modules/@sudocode-ai/local-server/dist/services/export.d.ts +0 -32
  538. package/node_modules/@sudocode-ai/local-server/dist/services/export.d.ts.map +0 -1
  539. package/node_modules/@sudocode-ai/local-server/dist/services/export.js +0 -114
  540. package/node_modules/@sudocode-ai/local-server/dist/services/export.js.map +0 -1
  541. package/node_modules/@sudocode-ai/local-server/dist/services/external-refresh-service.d.ts +0 -104
  542. package/node_modules/@sudocode-ai/local-server/dist/services/external-refresh-service.d.ts.map +0 -1
  543. package/node_modules/@sudocode-ai/local-server/dist/services/external-refresh-service.js +0 -520
  544. package/node_modules/@sudocode-ai/local-server/dist/services/external-refresh-service.js.map +0 -1
  545. package/node_modules/@sudocode-ai/local-server/dist/services/feedback.d.ts +0 -56
  546. package/node_modules/@sudocode-ai/local-server/dist/services/feedback.d.ts.map +0 -1
  547. package/node_modules/@sudocode-ai/local-server/dist/services/feedback.js +0 -78
  548. package/node_modules/@sudocode-ai/local-server/dist/services/feedback.js.map +0 -1
  549. package/node_modules/@sudocode-ai/local-server/dist/services/file-search/git-ls-files-strategy.d.ts +0 -72
  550. package/node_modules/@sudocode-ai/local-server/dist/services/file-search/git-ls-files-strategy.d.ts.map +0 -1
  551. package/node_modules/@sudocode-ai/local-server/dist/services/file-search/git-ls-files-strategy.js +0 -176
  552. package/node_modules/@sudocode-ai/local-server/dist/services/file-search/git-ls-files-strategy.js.map +0 -1
  553. package/node_modules/@sudocode-ai/local-server/dist/services/file-search/index.d.ts +0 -9
  554. package/node_modules/@sudocode-ai/local-server/dist/services/file-search/index.d.ts.map +0 -1
  555. package/node_modules/@sudocode-ai/local-server/dist/services/file-search/index.js +0 -10
  556. package/node_modules/@sudocode-ai/local-server/dist/services/file-search/index.js.map +0 -1
  557. package/node_modules/@sudocode-ai/local-server/dist/services/file-search/registry.d.ts +0 -97
  558. package/node_modules/@sudocode-ai/local-server/dist/services/file-search/registry.d.ts.map +0 -1
  559. package/node_modules/@sudocode-ai/local-server/dist/services/file-search/registry.js +0 -140
  560. package/node_modules/@sudocode-ai/local-server/dist/services/file-search/registry.js.map +0 -1
  561. package/node_modules/@sudocode-ai/local-server/dist/services/file-search/strategy.d.ts +0 -58
  562. package/node_modules/@sudocode-ai/local-server/dist/services/file-search/strategy.d.ts.map +0 -1
  563. package/node_modules/@sudocode-ai/local-server/dist/services/file-search/strategy.js +0 -8
  564. package/node_modules/@sudocode-ai/local-server/dist/services/file-search/strategy.js.map +0 -1
  565. package/node_modules/@sudocode-ai/local-server/dist/services/integration-sync-service.d.ts +0 -185
  566. package/node_modules/@sudocode-ai/local-server/dist/services/integration-sync-service.d.ts.map +0 -1
  567. package/node_modules/@sudocode-ai/local-server/dist/services/integration-sync-service.js +0 -428
  568. package/node_modules/@sudocode-ai/local-server/dist/services/integration-sync-service.js.map +0 -1
  569. package/node_modules/@sudocode-ai/local-server/dist/services/issues.d.ts +0 -27
  570. package/node_modules/@sudocode-ai/local-server/dist/services/issues.d.ts.map +0 -1
  571. package/node_modules/@sudocode-ai/local-server/dist/services/issues.js +0 -35
  572. package/node_modules/@sudocode-ai/local-server/dist/services/issues.js.map +0 -1
  573. package/node_modules/@sudocode-ai/local-server/dist/services/narration-service.d.ts +0 -312
  574. package/node_modules/@sudocode-ai/local-server/dist/services/narration-service.d.ts.map +0 -1
  575. package/node_modules/@sudocode-ai/local-server/dist/services/narration-service.js +0 -749
  576. package/node_modules/@sudocode-ai/local-server/dist/services/narration-service.js.map +0 -1
  577. package/node_modules/@sudocode-ai/local-server/dist/services/project-context.d.ts +0 -93
  578. package/node_modules/@sudocode-ai/local-server/dist/services/project-context.d.ts.map +0 -1
  579. package/node_modules/@sudocode-ai/local-server/dist/services/project-context.js +0 -166
  580. package/node_modules/@sudocode-ai/local-server/dist/services/project-context.js.map +0 -1
  581. package/node_modules/@sudocode-ai/local-server/dist/services/project-manager.d.ts +0 -102
  582. package/node_modules/@sudocode-ai/local-server/dist/services/project-manager.d.ts.map +0 -1
  583. package/node_modules/@sudocode-ai/local-server/dist/services/project-manager.js +0 -500
  584. package/node_modules/@sudocode-ai/local-server/dist/services/project-manager.js.map +0 -1
  585. package/node_modules/@sudocode-ai/local-server/dist/services/project-registry.d.ts +0 -98
  586. package/node_modules/@sudocode-ai/local-server/dist/services/project-registry.d.ts.map +0 -1
  587. package/node_modules/@sudocode-ai/local-server/dist/services/project-registry.js +0 -289
  588. package/node_modules/@sudocode-ai/local-server/dist/services/project-registry.js.map +0 -1
  589. package/node_modules/@sudocode-ai/local-server/dist/services/prompt-resolver.d.ts +0 -97
  590. package/node_modules/@sudocode-ai/local-server/dist/services/prompt-resolver.d.ts.map +0 -1
  591. package/node_modules/@sudocode-ai/local-server/dist/services/prompt-resolver.js +0 -377
  592. package/node_modules/@sudocode-ai/local-server/dist/services/prompt-resolver.js.map +0 -1
  593. package/node_modules/@sudocode-ai/local-server/dist/services/prompt-template-engine.d.ts +0 -108
  594. package/node_modules/@sudocode-ai/local-server/dist/services/prompt-template-engine.d.ts.map +0 -1
  595. package/node_modules/@sudocode-ai/local-server/dist/services/prompt-template-engine.js +0 -212
  596. package/node_modules/@sudocode-ai/local-server/dist/services/prompt-template-engine.js.map +0 -1
  597. package/node_modules/@sudocode-ai/local-server/dist/services/prompt-templates.d.ts +0 -97
  598. package/node_modules/@sudocode-ai/local-server/dist/services/prompt-templates.d.ts.map +0 -1
  599. package/node_modules/@sudocode-ai/local-server/dist/services/prompt-templates.js +0 -236
  600. package/node_modules/@sudocode-ai/local-server/dist/services/prompt-templates.js.map +0 -1
  601. package/node_modules/@sudocode-ai/local-server/dist/services/relationships.d.ts +0 -35
  602. package/node_modules/@sudocode-ai/local-server/dist/services/relationships.d.ts.map +0 -1
  603. package/node_modules/@sudocode-ai/local-server/dist/services/relationships.js +0 -42
  604. package/node_modules/@sudocode-ai/local-server/dist/services/relationships.js.map +0 -1
  605. package/node_modules/@sudocode-ai/local-server/dist/services/repo-info.d.ts +0 -33
  606. package/node_modules/@sudocode-ai/local-server/dist/services/repo-info.d.ts.map +0 -1
  607. package/node_modules/@sudocode-ai/local-server/dist/services/repo-info.js +0 -136
  608. package/node_modules/@sudocode-ai/local-server/dist/services/repo-info.js.map +0 -1
  609. package/node_modules/@sudocode-ai/local-server/dist/services/specs.d.ts +0 -27
  610. package/node_modules/@sudocode-ai/local-server/dist/services/specs.d.ts.map +0 -1
  611. package/node_modules/@sudocode-ai/local-server/dist/services/specs.js +0 -35
  612. package/node_modules/@sudocode-ai/local-server/dist/services/specs.js.map +0 -1
  613. package/node_modules/@sudocode-ai/local-server/dist/services/stt-providers/index.d.ts +0 -21
  614. package/node_modules/@sudocode-ai/local-server/dist/services/stt-providers/index.d.ts.map +0 -1
  615. package/node_modules/@sudocode-ai/local-server/dist/services/stt-providers/index.js +0 -32
  616. package/node_modules/@sudocode-ai/local-server/dist/services/stt-providers/index.js.map +0 -1
  617. package/node_modules/@sudocode-ai/local-server/dist/services/stt-providers/openai-whisper.d.ts +0 -66
  618. package/node_modules/@sudocode-ai/local-server/dist/services/stt-providers/openai-whisper.d.ts.map +0 -1
  619. package/node_modules/@sudocode-ai/local-server/dist/services/stt-providers/openai-whisper.js +0 -137
  620. package/node_modules/@sudocode-ai/local-server/dist/services/stt-providers/openai-whisper.js.map +0 -1
  621. package/node_modules/@sudocode-ai/local-server/dist/services/stt-providers/whisper-local.d.ts +0 -64
  622. package/node_modules/@sudocode-ai/local-server/dist/services/stt-providers/whisper-local.d.ts.map +0 -1
  623. package/node_modules/@sudocode-ai/local-server/dist/services/stt-providers/whisper-local.js +0 -166
  624. package/node_modules/@sudocode-ai/local-server/dist/services/stt-providers/whisper-local.js.map +0 -1
  625. package/node_modules/@sudocode-ai/local-server/dist/services/stt-service.d.ts +0 -160
  626. package/node_modules/@sudocode-ai/local-server/dist/services/stt-service.d.ts.map +0 -1
  627. package/node_modules/@sudocode-ai/local-server/dist/services/stt-service.js +0 -246
  628. package/node_modules/@sudocode-ai/local-server/dist/services/stt-service.js.map +0 -1
  629. package/node_modules/@sudocode-ai/local-server/dist/services/tts-providers/browser-tts.d.ts +0 -64
  630. package/node_modules/@sudocode-ai/local-server/dist/services/tts-providers/browser-tts.d.ts.map +0 -1
  631. package/node_modules/@sudocode-ai/local-server/dist/services/tts-providers/browser-tts.js +0 -89
  632. package/node_modules/@sudocode-ai/local-server/dist/services/tts-providers/browser-tts.js.map +0 -1
  633. package/node_modules/@sudocode-ai/local-server/dist/services/tts-providers/index.d.ts +0 -20
  634. package/node_modules/@sudocode-ai/local-server/dist/services/tts-providers/index.d.ts.map +0 -1
  635. package/node_modules/@sudocode-ai/local-server/dist/services/tts-providers/index.js +0 -31
  636. package/node_modules/@sudocode-ai/local-server/dist/services/tts-providers/index.js.map +0 -1
  637. package/node_modules/@sudocode-ai/local-server/dist/services/tts-service.d.ts +0 -190
  638. package/node_modules/@sudocode-ai/local-server/dist/services/tts-service.d.ts.map +0 -1
  639. package/node_modules/@sudocode-ai/local-server/dist/services/tts-service.js +0 -296
  640. package/node_modules/@sudocode-ai/local-server/dist/services/tts-service.js.map +0 -1
  641. package/node_modules/@sudocode-ai/local-server/dist/services/tts-sidecar-manager.d.ts +0 -276
  642. package/node_modules/@sudocode-ai/local-server/dist/services/tts-sidecar-manager.d.ts.map +0 -1
  643. package/node_modules/@sudocode-ai/local-server/dist/services/tts-sidecar-manager.js +0 -665
  644. package/node_modules/@sudocode-ai/local-server/dist/services/tts-sidecar-manager.js.map +0 -1
  645. package/node_modules/@sudocode-ai/local-server/dist/services/version-service.d.ts +0 -14
  646. package/node_modules/@sudocode-ai/local-server/dist/services/version-service.d.ts.map +0 -1
  647. package/node_modules/@sudocode-ai/local-server/dist/services/version-service.js +0 -57
  648. package/node_modules/@sudocode-ai/local-server/dist/services/version-service.js.map +0 -1
  649. package/node_modules/@sudocode-ai/local-server/dist/services/watcher.d.ts +0 -49
  650. package/node_modules/@sudocode-ai/local-server/dist/services/watcher.d.ts.map +0 -1
  651. package/node_modules/@sudocode-ai/local-server/dist/services/watcher.js +0 -52
  652. package/node_modules/@sudocode-ai/local-server/dist/services/watcher.js.map +0 -1
  653. package/node_modules/@sudocode-ai/local-server/dist/services/websocket.d.ts +0 -246
  654. package/node_modules/@sudocode-ai/local-server/dist/services/websocket.d.ts.map +0 -1
  655. package/node_modules/@sudocode-ai/local-server/dist/services/websocket.js +0 -758
  656. package/node_modules/@sudocode-ai/local-server/dist/services/websocket.js.map +0 -1
  657. package/node_modules/@sudocode-ai/local-server/dist/services/workflow-broadcast-service.d.ts +0 -43
  658. package/node_modules/@sudocode-ai/local-server/dist/services/workflow-broadcast-service.d.ts.map +0 -1
  659. package/node_modules/@sudocode-ai/local-server/dist/services/workflow-broadcast-service.js +0 -155
  660. package/node_modules/@sudocode-ai/local-server/dist/services/workflow-broadcast-service.js.map +0 -1
  661. package/node_modules/@sudocode-ai/local-server/dist/services/worktree-sync-service.d.ts +0 -452
  662. package/node_modules/@sudocode-ai/local-server/dist/services/worktree-sync-service.d.ts.map +0 -1
  663. package/node_modules/@sudocode-ai/local-server/dist/services/worktree-sync-service.js +0 -1602
  664. package/node_modules/@sudocode-ai/local-server/dist/services/worktree-sync-service.js.map +0 -1
  665. package/node_modules/@sudocode-ai/local-server/dist/types/editor.d.ts +0 -49
  666. package/node_modules/@sudocode-ai/local-server/dist/types/editor.d.ts.map +0 -1
  667. package/node_modules/@sudocode-ai/local-server/dist/types/editor.js +0 -50
  668. package/node_modules/@sudocode-ai/local-server/dist/types/editor.js.map +0 -1
  669. package/node_modules/@sudocode-ai/local-server/dist/types/project.d.ts +0 -58
  670. package/node_modules/@sudocode-ai/local-server/dist/types/project.d.ts.map +0 -1
  671. package/node_modules/@sudocode-ai/local-server/dist/types/project.js +0 -10
  672. package/node_modules/@sudocode-ai/local-server/dist/types/project.js.map +0 -1
  673. package/node_modules/@sudocode-ai/local-server/dist/utils/execFileNoThrow.d.ts +0 -43
  674. package/node_modules/@sudocode-ai/local-server/dist/utils/execFileNoThrow.d.ts.map +0 -1
  675. package/node_modules/@sudocode-ai/local-server/dist/utils/execFileNoThrow.js +0 -53
  676. package/node_modules/@sudocode-ai/local-server/dist/utils/execFileNoThrow.js.map +0 -1
  677. package/node_modules/@sudocode-ai/local-server/dist/utils/executable-check.d.ts +0 -36
  678. package/node_modules/@sudocode-ai/local-server/dist/utils/executable-check.d.ts.map +0 -1
  679. package/node_modules/@sudocode-ai/local-server/dist/utils/executable-check.js +0 -79
  680. package/node_modules/@sudocode-ai/local-server/dist/utils/executable-check.js.map +0 -1
  681. package/node_modules/@sudocode-ai/local-server/dist/utils/sudocode-dir.d.ts +0 -6
  682. package/node_modules/@sudocode-ai/local-server/dist/utils/sudocode-dir.d.ts.map +0 -1
  683. package/node_modules/@sudocode-ai/local-server/dist/utils/sudocode-dir.js +0 -9
  684. package/node_modules/@sudocode-ai/local-server/dist/utils/sudocode-dir.js.map +0 -1
  685. package/node_modules/@sudocode-ai/local-server/dist/utils/voice-config.d.ts +0 -26
  686. package/node_modules/@sudocode-ai/local-server/dist/utils/voice-config.d.ts.map +0 -1
  687. package/node_modules/@sudocode-ai/local-server/dist/utils/voice-config.js +0 -48
  688. package/node_modules/@sudocode-ai/local-server/dist/utils/voice-config.js.map +0 -1
  689. package/node_modules/@sudocode-ai/local-server/dist/workers/execution-worker.d.ts +0 -18
  690. package/node_modules/@sudocode-ai/local-server/dist/workers/execution-worker.d.ts.map +0 -1
  691. package/node_modules/@sudocode-ai/local-server/dist/workers/execution-worker.js +0 -344
  692. package/node_modules/@sudocode-ai/local-server/dist/workers/execution-worker.js.map +0 -1
  693. package/node_modules/@sudocode-ai/local-server/dist/workers/worker-ipc.d.ts +0 -84
  694. package/node_modules/@sudocode-ai/local-server/dist/workers/worker-ipc.d.ts.map +0 -1
  695. package/node_modules/@sudocode-ai/local-server/dist/workers/worker-ipc.js +0 -29
  696. package/node_modules/@sudocode-ai/local-server/dist/workers/worker-ipc.js.map +0 -1
  697. package/node_modules/@sudocode-ai/local-server/dist/workflow/base-workflow-engine.d.ts +0 -188
  698. package/node_modules/@sudocode-ai/local-server/dist/workflow/base-workflow-engine.d.ts.map +0 -1
  699. package/node_modules/@sudocode-ai/local-server/dist/workflow/base-workflow-engine.js +0 -557
  700. package/node_modules/@sudocode-ai/local-server/dist/workflow/base-workflow-engine.js.map +0 -1
  701. package/node_modules/@sudocode-ai/local-server/dist/workflow/dependency-analyzer.d.ts +0 -78
  702. package/node_modules/@sudocode-ai/local-server/dist/workflow/dependency-analyzer.d.ts.map +0 -1
  703. package/node_modules/@sudocode-ai/local-server/dist/workflow/dependency-analyzer.js +0 -264
  704. package/node_modules/@sudocode-ai/local-server/dist/workflow/dependency-analyzer.js.map +0 -1
  705. package/node_modules/@sudocode-ai/local-server/dist/workflow/engines/orchestrator-engine.d.ts +0 -241
  706. package/node_modules/@sudocode-ai/local-server/dist/workflow/engines/orchestrator-engine.d.ts.map +0 -1
  707. package/node_modules/@sudocode-ai/local-server/dist/workflow/engines/orchestrator-engine.js +0 -752
  708. package/node_modules/@sudocode-ai/local-server/dist/workflow/engines/orchestrator-engine.js.map +0 -1
  709. package/node_modules/@sudocode-ai/local-server/dist/workflow/engines/sequential-engine.d.ts +0 -283
  710. package/node_modules/@sudocode-ai/local-server/dist/workflow/engines/sequential-engine.d.ts.map +0 -1
  711. package/node_modules/@sudocode-ai/local-server/dist/workflow/engines/sequential-engine.js +0 -1190
  712. package/node_modules/@sudocode-ai/local-server/dist/workflow/engines/sequential-engine.js.map +0 -1
  713. package/node_modules/@sudocode-ai/local-server/dist/workflow/index.d.ts +0 -15
  714. package/node_modules/@sudocode-ai/local-server/dist/workflow/index.d.ts.map +0 -1
  715. package/node_modules/@sudocode-ai/local-server/dist/workflow/index.js +0 -22
  716. package/node_modules/@sudocode-ai/local-server/dist/workflow/index.js.map +0 -1
  717. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/api-client.d.ts +0 -103
  718. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/api-client.d.ts.map +0 -1
  719. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/api-client.js +0 -193
  720. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/api-client.js.map +0 -1
  721. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/index.d.ts +0 -16
  722. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/index.d.ts.map +0 -1
  723. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/index.js +0 -114
  724. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/index.js.map +0 -1
  725. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/server.d.ts +0 -85
  726. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/server.d.ts.map +0 -1
  727. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/server.js +0 -520
  728. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/server.js.map +0 -1
  729. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/escalation.d.ts +0 -36
  730. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/escalation.d.ts.map +0 -1
  731. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/escalation.js +0 -47
  732. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/escalation.js.map +0 -1
  733. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/execution.d.ts +0 -59
  734. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/execution.d.ts.map +0 -1
  735. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/execution.js +0 -67
  736. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/execution.js.map +0 -1
  737. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/inspection.d.ts +0 -82
  738. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/inspection.d.ts.map +0 -1
  739. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/inspection.js +0 -57
  740. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/inspection.js.map +0 -1
  741. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/workflow.d.ts +0 -59
  742. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/workflow.d.ts.map +0 -1
  743. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/workflow.js +0 -40
  744. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/tools/workflow.js.map +0 -1
  745. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/types.d.ts +0 -345
  746. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/types.d.ts.map +0 -1
  747. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/types.js +0 -7
  748. package/node_modules/@sudocode-ai/local-server/dist/workflow/mcp/types.js.map +0 -1
  749. package/node_modules/@sudocode-ai/local-server/dist/workflow/services/prompt-builder.d.ts +0 -36
  750. package/node_modules/@sudocode-ai/local-server/dist/workflow/services/prompt-builder.d.ts.map +0 -1
  751. package/node_modules/@sudocode-ai/local-server/dist/workflow/services/prompt-builder.js +0 -329
  752. package/node_modules/@sudocode-ai/local-server/dist/workflow/services/prompt-builder.js.map +0 -1
  753. package/node_modules/@sudocode-ai/local-server/dist/workflow/services/wakeup-service.d.ts +0 -262
  754. package/node_modules/@sudocode-ai/local-server/dist/workflow/services/wakeup-service.d.ts.map +0 -1
  755. package/node_modules/@sudocode-ai/local-server/dist/workflow/services/wakeup-service.js +0 -809
  756. package/node_modules/@sudocode-ai/local-server/dist/workflow/services/wakeup-service.js.map +0 -1
  757. package/node_modules/@sudocode-ai/local-server/dist/workflow/workflow-engine.d.ts +0 -228
  758. package/node_modules/@sudocode-ai/local-server/dist/workflow/workflow-engine.d.ts.map +0 -1
  759. package/node_modules/@sudocode-ai/local-server/dist/workflow/workflow-engine.js +0 -94
  760. package/node_modules/@sudocode-ai/local-server/dist/workflow/workflow-engine.js.map +0 -1
  761. package/node_modules/@sudocode-ai/local-server/dist/workflow/workflow-event-emitter.d.ts +0 -278
  762. package/node_modules/@sudocode-ai/local-server/dist/workflow/workflow-event-emitter.d.ts.map +0 -1
  763. package/node_modules/@sudocode-ai/local-server/dist/workflow/workflow-event-emitter.js +0 -259
  764. package/node_modules/@sudocode-ai/local-server/dist/workflow/workflow-event-emitter.js.map +0 -1
  765. package/node_modules/@sudocode-ai/local-server/package.json +0 -83
  766. package/node_modules/@sudocode-ai/mcp/README.md +0 -226
  767. package/node_modules/@sudocode-ai/mcp/dist/api-client.d.ts +0 -296
  768. package/node_modules/@sudocode-ai/mcp/dist/api-client.d.ts.map +0 -1
  769. package/node_modules/@sudocode-ai/mcp/dist/api-client.js +0 -304
  770. package/node_modules/@sudocode-ai/mcp/dist/api-client.js.map +0 -1
  771. package/node_modules/@sudocode-ai/mcp/dist/client.d.ts +0 -33
  772. package/node_modules/@sudocode-ai/mcp/dist/client.d.ts.map +0 -1
  773. package/node_modules/@sudocode-ai/mcp/dist/client.js +0 -166
  774. package/node_modules/@sudocode-ai/mcp/dist/client.js.map +0 -1
  775. package/node_modules/@sudocode-ai/mcp/dist/index.d.ts +0 -6
  776. package/node_modules/@sudocode-ai/mcp/dist/index.d.ts.map +0 -1
  777. package/node_modules/@sudocode-ai/mcp/dist/index.js +0 -167
  778. package/node_modules/@sudocode-ai/mcp/dist/index.js.map +0 -1
  779. package/node_modules/@sudocode-ai/mcp/dist/scopes.d.ts +0 -126
  780. package/node_modules/@sudocode-ai/mcp/dist/scopes.d.ts.map +0 -1
  781. package/node_modules/@sudocode-ai/mcp/dist/scopes.js +0 -282
  782. package/node_modules/@sudocode-ai/mcp/dist/scopes.js.map +0 -1
  783. package/node_modules/@sudocode-ai/mcp/dist/server.d.ts +0 -37
  784. package/node_modules/@sudocode-ai/mcp/dist/server.d.ts.map +0 -1
  785. package/node_modules/@sudocode-ai/mcp/dist/server.js +0 -442
  786. package/node_modules/@sudocode-ai/mcp/dist/server.js.map +0 -1
  787. package/node_modules/@sudocode-ai/mcp/dist/tool-registry.d.ts +0 -49
  788. package/node_modules/@sudocode-ai/mcp/dist/tool-registry.d.ts.map +0 -1
  789. package/node_modules/@sudocode-ai/mcp/dist/tool-registry.js +0 -720
  790. package/node_modules/@sudocode-ai/mcp/dist/tool-registry.js.map +0 -1
  791. package/node_modules/@sudocode-ai/mcp/dist/tools/analytics.d.ts +0 -41
  792. package/node_modules/@sudocode-ai/mcp/dist/tools/analytics.d.ts.map +0 -1
  793. package/node_modules/@sudocode-ai/mcp/dist/tools/analytics.js +0 -21
  794. package/node_modules/@sudocode-ai/mcp/dist/tools/analytics.js.map +0 -1
  795. package/node_modules/@sudocode-ai/mcp/dist/tools/feedback.d.ts +0 -21
  796. package/node_modules/@sudocode-ai/mcp/dist/tools/feedback.d.ts.map +0 -1
  797. package/node_modules/@sudocode-ai/mcp/dist/tools/feedback.js +0 -30
  798. package/node_modules/@sudocode-ai/mcp/dist/tools/feedback.js.map +0 -1
  799. package/node_modules/@sudocode-ai/mcp/dist/tools/init.d.ts +0 -17
  800. package/node_modules/@sudocode-ai/mcp/dist/tools/init.d.ts.map +0 -1
  801. package/node_modules/@sudocode-ai/mcp/dist/tools/init.js +0 -15
  802. package/node_modules/@sudocode-ai/mcp/dist/tools/init.js.map +0 -1
  803. package/node_modules/@sudocode-ai/mcp/dist/tools/issues.d.ts +0 -44
  804. package/node_modules/@sudocode-ai/mcp/dist/tools/issues.d.ts.map +0 -1
  805. package/node_modules/@sudocode-ai/mcp/dist/tools/issues.js +0 -109
  806. package/node_modules/@sudocode-ai/mcp/dist/tools/issues.js.map +0 -1
  807. package/node_modules/@sudocode-ai/mcp/dist/tools/references.d.ts +0 -21
  808. package/node_modules/@sudocode-ai/mcp/dist/tools/references.d.ts.map +0 -1
  809. package/node_modules/@sudocode-ai/mcp/dist/tools/references.js +0 -49
  810. package/node_modules/@sudocode-ai/mcp/dist/tools/references.js.map +0 -1
  811. package/node_modules/@sudocode-ai/mcp/dist/tools/relationships.d.ts +0 -15
  812. package/node_modules/@sudocode-ai/mcp/dist/tools/relationships.d.ts.map +0 -1
  813. package/node_modules/@sudocode-ai/mcp/dist/tools/relationships.js +0 -18
  814. package/node_modules/@sudocode-ai/mcp/dist/tools/relationships.js.map +0 -1
  815. package/node_modules/@sudocode-ai/mcp/dist/tools/specs.d.ts +0 -35
  816. package/node_modules/@sudocode-ai/mcp/dist/tools/specs.d.ts.map +0 -1
  817. package/node_modules/@sudocode-ai/mcp/dist/tools/specs.js +0 -85
  818. package/node_modules/@sudocode-ai/mcp/dist/tools/specs.js.map +0 -1
  819. package/node_modules/@sudocode-ai/mcp/dist/types.d.ts +0 -46
  820. package/node_modules/@sudocode-ai/mcp/dist/types.d.ts.map +0 -1
  821. package/node_modules/@sudocode-ai/mcp/dist/types.js +0 -21
  822. package/node_modules/@sudocode-ai/mcp/dist/types.js.map +0 -1
  823. package/node_modules/@sudocode-ai/mcp/package.json +0 -67
  824. package/node_modules/@sudocode-ai/types/README.md +0 -7
  825. package/node_modules/@sudocode-ai/types/package.json +0 -81
  826. package/node_modules/@sudocode-ai/types/src/agents.d.ts +0 -348
  827. package/node_modules/@sudocode-ai/types/src/artifacts.d.ts +0 -66
  828. package/node_modules/@sudocode-ai/types/src/events.d.ts +0 -70
  829. package/node_modules/@sudocode-ai/types/src/index.d.ts +0 -587
  830. package/node_modules/@sudocode-ai/types/src/integrations.d.ts +0 -454
  831. package/node_modules/@sudocode-ai/types/src/voice.d.ts +0 -465
  832. package/node_modules/@sudocode-ai/types/src/workflows.d.ts +0 -501
  833. package/node_modules/commander/LICENSE +0 -22
  834. package/node_modules/commander/Readme.md +0 -1149
  835. package/node_modules/commander/esm.mjs +0 -16
  836. package/node_modules/commander/index.js +0 -24
  837. package/node_modules/commander/lib/argument.js +0 -149
  838. package/node_modules/commander/lib/command.js +0 -2662
  839. package/node_modules/commander/lib/error.js +0 -39
  840. package/node_modules/commander/lib/help.js +0 -709
  841. package/node_modules/commander/lib/option.js +0 -367
  842. package/node_modules/commander/lib/suggestSimilar.js +0 -101
  843. package/node_modules/commander/package-support.json +0 -16
  844. package/node_modules/commander/package.json +0 -82
  845. package/node_modules/commander/typings/esm.d.mts +0 -3
  846. package/node_modules/commander/typings/index.d.ts +0 -1045
  847. package/node_modules/glob/LICENSE +0 -15
  848. package/node_modules/glob/README.md +0 -1265
  849. package/node_modules/glob/package.json +0 -99
  850. package/node_modules/isexe/LICENSE +0 -15
  851. package/node_modules/isexe/README.md +0 -74
  852. package/node_modules/isexe/package.json +0 -96
  853. package/node_modules/which/LICENSE +0 -15
  854. package/node_modules/which/README.md +0 -51
  855. package/node_modules/which/bin/which.js +0 -52
  856. package/node_modules/which/lib/index.js +0 -111
  857. package/node_modules/which/package.json +0 -52
@@ -1,1190 +0,0 @@
1
- /**
2
- * Sequential Workflow Engine
3
- *
4
- * Executes workflow steps in topological order with worktree reuse.
5
- * Supports both sequential and parallel execution modes.
6
- */
7
- import { exec } from "child_process";
8
- import { promisify } from "util";
9
- import * as path from "path";
10
- import { getIssue, updateIssue, } from "@sudocode-ai/cli/dist/operations/issues.js";
11
- import { readJSONLSync, writeJSONL, } from "@sudocode-ai/cli/dist/jsonl.js";
12
- const execAsync = promisify(exec);
13
- import { BaseWorkflowEngine } from "../base-workflow-engine.js";
14
- import { WorkflowCycleError, WorkflowStateError, WorkflowStepNotFoundError, } from "../workflow-engine.js";
15
- import { getExecution } from "../../services/executions.js";
16
- // =============================================================================
17
- // Sequential Workflow Engine
18
- // =============================================================================
19
- /**
20
- * Sequential Workflow Engine implementation.
21
- *
22
- * Executes workflow steps in topological order (respecting dependencies).
23
- * Features:
24
- * - Single shared worktree for all steps
25
- * - Auto-commit after each step (configurable)
26
- * - Configurable failure handling (stop, pause, skip_dependents, continue)
27
- * - Support for parallel execution of independent steps
28
- *
29
- * @example
30
- * ```typescript
31
- * const engine = new SequentialWorkflowEngine(db, executionService, repoPath);
32
- *
33
- * // Create workflow from a spec
34
- * const workflow = await engine.createWorkflow({
35
- * type: "spec",
36
- * specId: "s-auth"
37
- * });
38
- *
39
- * // Start execution
40
- * await engine.startWorkflow(workflow.id);
41
- *
42
- * // Subscribe to events
43
- * engine.onWorkflowEvent((event) => {
44
- * console.log(event.type, event);
45
- * });
46
- * ```
47
- */
48
- export class SequentialWorkflowEngine extends BaseWorkflowEngine {
49
- executionService;
50
- lifecycleService;
51
- repoPath;
52
- activeWorkflows = new Map();
53
- constructor(db, executionService, lifecycleService, repoPath, eventEmitter) {
54
- super(db, eventEmitter);
55
- this.executionService = executionService;
56
- this.lifecycleService = lifecycleService;
57
- this.repoPath = repoPath;
58
- }
59
- // ===========================================================================
60
- // Workflow Creation
61
- // ===========================================================================
62
- /**
63
- * Create a new workflow from a source definition.
64
- *
65
- * @param source - How to determine workflow scope (spec, issues, root_issue, or goal)
66
- * @param config - Optional configuration overrides (includes baseBranch, title)
67
- * @returns The created workflow
68
- * @throws WorkflowCycleError if dependency cycles are detected
69
- */
70
- async createWorkflow(source, config) {
71
- // 1. Resolve source to issue IDs
72
- const issueIds = await this.resolveSource(source);
73
- // 2. Handle goal-based workflows (no initial issues)
74
- if (source.type === "goal" && issueIds.length === 0) {
75
- // Goal workflows start with no steps - orchestrator creates them
76
- const workflow = this.buildWorkflow({
77
- source,
78
- steps: [],
79
- config: config || {},
80
- repoPath: this.repoPath,
81
- });
82
- this.saveWorkflow(workflow);
83
- return workflow;
84
- }
85
- // 3. Build dependency graph
86
- const graph = this.analyzeDependencies(issueIds);
87
- // 4. Check for cycles
88
- if (graph.cycles && graph.cycles.length > 0) {
89
- throw new WorkflowCycleError(graph.cycles);
90
- }
91
- // 5. Create steps from graph
92
- const steps = this.createStepsFromGraph(graph);
93
- // 6. Build workflow object
94
- const workflow = this.buildWorkflow({
95
- source,
96
- steps,
97
- config: config || {},
98
- repoPath: this.repoPath,
99
- });
100
- // 7. Save to database
101
- this.saveWorkflow(workflow);
102
- return workflow;
103
- }
104
- // ===========================================================================
105
- // Workflow Recovery
106
- // ===========================================================================
107
- /**
108
- * Recover workflows that were running when the server crashed.
109
- *
110
- * This method:
111
- * 1. Finds all sequential workflows in 'running' or 'paused' status
112
- * 2. Reconstructs the activeWorkflows Map from database state
113
- * 3. Handles any steps that were 'running' when the server crashed
114
- * 4. Resumes execution loops for 'running' workflows
115
- *
116
- * Should be called during server startup after engine initialization.
117
- */
118
- async recoverWorkflows() {
119
- console.log("[SequentialWorkflowEngine] Starting workflow recovery...");
120
- // Find all sequential workflows that need recovery
121
- const rows = this.db
122
- .prepare(`
123
- SELECT * FROM workflows
124
- WHERE status IN ('running', 'paused')
125
- AND json_extract(config, '$.engineType') = 'sequential'
126
- `)
127
- .all();
128
- console.log(`[SequentialWorkflowEngine] Found ${rows.length} workflows to recover`);
129
- for (const row of rows) {
130
- try {
131
- await this.recoverSingleWorkflow(row);
132
- }
133
- catch (error) {
134
- console.error(`[SequentialWorkflowEngine] Failed to recover workflow ${row.id}:`, error);
135
- // Continue with other workflows even if one fails
136
- }
137
- }
138
- console.log("[SequentialWorkflowEngine] Workflow recovery complete");
139
- }
140
- /**
141
- * Recover a single workflow from its database row.
142
- */
143
- async recoverSingleWorkflow(row) {
144
- const workflowId = row.id;
145
- const isPaused = row.status === "paused";
146
- console.log(`[SequentialWorkflowEngine] Recovering workflow ${workflowId} (status: ${row.status})`);
147
- // Reconstruct activeWorkflows entry
148
- this.activeWorkflows.set(workflowId, {
149
- workflowId,
150
- isPaused,
151
- isCancelled: false,
152
- });
153
- // Parse steps to find any that were running
154
- const steps = JSON.parse(row.steps);
155
- const runningStep = steps.find((s) => s.status === "running");
156
- if (runningStep) {
157
- console.log(`[SequentialWorkflowEngine] Found running step ${runningStep.id} (execution: ${runningStep.executionId})`);
158
- await this.handleCrashedStep(workflowId, runningStep, row);
159
- }
160
- // Resume execution loop if workflow was running (not paused)
161
- if (!isPaused) {
162
- console.log(`[SequentialWorkflowEngine] Resuming execution loop for workflow ${workflowId}`);
163
- this.runExecutionLoop(workflowId).catch((error) => {
164
- console.error(`[SequentialWorkflowEngine] Recovered workflow ${workflowId} execution loop failed:`, error);
165
- this.failWorkflow(workflowId, error.message).catch(console.error);
166
- });
167
- }
168
- else {
169
- console.log(`[SequentialWorkflowEngine] Workflow ${workflowId} is paused, not resuming execution loop`);
170
- }
171
- }
172
- /**
173
- * Handle a step that was running when the server crashed.
174
- */
175
- async handleCrashedStep(workflowId, step, workflowRow) {
176
- if (!step.executionId) {
177
- // Step was marked running but no execution was created yet
178
- // Reset to pending so it can be retried
179
- console.log(`[SequentialWorkflowEngine] Step ${step.id} has no execution, resetting to pending`);
180
- this.updateStep(workflowId, step.id, {
181
- status: "pending",
182
- error: undefined,
183
- });
184
- return;
185
- }
186
- // Check the execution status
187
- const execution = getExecution(this.db, step.executionId);
188
- if (!execution) {
189
- // Execution record doesn't exist - this shouldn't happen but handle it
190
- console.warn(`[SequentialWorkflowEngine] Execution ${step.executionId} not found, marking step as failed`);
191
- this.updateStep(workflowId, step.id, {
192
- status: "failed",
193
- error: "Execution record not found after server restart",
194
- });
195
- await this.handleRecoveredStepFailure(workflowId, step, workflowRow);
196
- return;
197
- }
198
- // Handle based on execution status
199
- switch (execution.status) {
200
- case "completed":
201
- // Execution completed but we didn't record step success
202
- console.log(`[SequentialWorkflowEngine] Execution ${step.executionId} completed, handling success`);
203
- await this.handleRecoveredStepSuccess(workflowId, step, execution, workflowRow);
204
- break;
205
- case "failed":
206
- case "cancelled":
207
- case "stopped":
208
- // Execution failed/cancelled but we didn't record step failure
209
- console.log(`[SequentialWorkflowEngine] Execution ${step.executionId} ${execution.status}, handling failure`);
210
- this.updateStep(workflowId, step.id, {
211
- status: "failed",
212
- error: execution.error_message || `Execution ${execution.status}`,
213
- });
214
- await this.handleRecoveredStepFailure(workflowId, step, workflowRow);
215
- break;
216
- case "running":
217
- case "pending":
218
- case "preparing":
219
- case "paused":
220
- // Execution was still in progress - it's now orphaned
221
- // Mark as failed since the process is gone
222
- console.log(`[SequentialWorkflowEngine] Execution ${step.executionId} was ${execution.status}, marking as failed`);
223
- this.updateStep(workflowId, step.id, {
224
- status: "failed",
225
- error: "Server crashed during execution",
226
- });
227
- await this.handleRecoveredStepFailure(workflowId, step, workflowRow);
228
- break;
229
- default:
230
- console.warn(`[SequentialWorkflowEngine] Unknown execution status: ${execution.status}`);
231
- this.updateStep(workflowId, step.id, {
232
- status: "failed",
233
- error: `Unknown execution status: ${execution.status}`,
234
- });
235
- await this.handleRecoveredStepFailure(workflowId, step, workflowRow);
236
- }
237
- }
238
- /**
239
- * Handle step success during recovery.
240
- */
241
- async handleRecoveredStepSuccess(workflowId, step, execution, workflowRow) {
242
- // Update step status
243
- this.updateStep(workflowId, step.id, {
244
- status: "completed",
245
- commitSha: execution.after_commit ?? undefined,
246
- });
247
- // Update workflow progress
248
- this.updateWorkflow(workflowId, {
249
- currentStepIndex: workflowRow.current_step_index + 1,
250
- });
251
- // Close the issue in the worktree JSONL if available
252
- await this.closeIssue(step.issueId, workflowRow.worktree_path ?? undefined);
253
- }
254
- /**
255
- * Handle step failure during recovery.
256
- * Applies the workflow's onFailure strategy.
257
- */
258
- async handleRecoveredStepFailure(workflowId, step, workflowRow) {
259
- const config = JSON.parse(workflowRow.config);
260
- const steps = JSON.parse(workflowRow.steps);
261
- // Build a minimal workflow object for helper methods
262
- const workflow = {
263
- id: workflowId,
264
- title: workflowRow.title,
265
- source: JSON.parse(workflowRow.source),
266
- status: workflowRow.status,
267
- steps,
268
- worktreePath: workflowRow.worktree_path ?? undefined,
269
- branchName: workflowRow.branch_name ?? undefined,
270
- baseBranch: workflowRow.base_branch,
271
- currentStepIndex: workflowRow.current_step_index,
272
- config,
273
- createdAt: "",
274
- updatedAt: "",
275
- };
276
- // Apply failure strategy
277
- switch (config.onFailure) {
278
- case "stop":
279
- await this.failWorkflow(workflowId, `Step ${step.id} failed during recovery`);
280
- break;
281
- case "pause":
282
- this.updateWorkflow(workflowId, { status: "paused" });
283
- const state = this.activeWorkflows.get(workflowId);
284
- if (state) {
285
- state.isPaused = true;
286
- }
287
- break;
288
- case "skip_dependents":
289
- await this.skipDependentSteps(workflow, step, `Dependency ${step.issueId} failed during recovery`);
290
- break;
291
- case "continue":
292
- await this.blockDependentSteps(workflow, step);
293
- break;
294
- }
295
- }
296
- // ===========================================================================
297
- // Workflow Lifecycle
298
- // ===========================================================================
299
- /**
300
- * Start executing a pending workflow.
301
- *
302
- * Creates a worktree and begins the execution loop.
303
- *
304
- * @param workflowId - The workflow to start
305
- * @throws WorkflowNotFoundError if workflow doesn't exist
306
- * @throws WorkflowStateError if workflow is not in pending state
307
- */
308
- async startWorkflow(workflowId) {
309
- const workflow = await this.getWorkflowOrThrow(workflowId);
310
- // Validate state
311
- if (workflow.status !== "pending") {
312
- throw new WorkflowStateError(workflowId, workflow.status, "start");
313
- }
314
- // Create workflow-level worktree if not already present
315
- if (!workflow.worktreePath) {
316
- const { worktreePath, branchName } = await this.createWorkflowWorktreeHelper(workflow, this.repoPath, this.lifecycleService);
317
- // Update local workflow reference with worktree info
318
- workflow.worktreePath = worktreePath;
319
- workflow.branchName = branchName;
320
- }
321
- // Initialize workflow state
322
- this.activeWorkflows.set(workflowId, {
323
- workflowId,
324
- isPaused: false,
325
- isCancelled: false,
326
- });
327
- // Update status to running
328
- const updated = this.updateWorkflow(workflowId, {
329
- status: "running",
330
- startedAt: new Date().toISOString(),
331
- });
332
- // Emit workflow started event
333
- this.eventEmitter.emit({
334
- type: "workflow_started",
335
- workflowId,
336
- workflow: updated,
337
- timestamp: Date.now(),
338
- });
339
- // Start execution loop (non-blocking)
340
- this.runExecutionLoop(workflowId).catch((error) => {
341
- console.error(`Workflow ${workflowId} execution loop failed:`, error);
342
- this.failWorkflow(workflowId, error.message).catch(console.error);
343
- });
344
- }
345
- /**
346
- * Pause a running workflow, cancelling the current execution.
347
- *
348
- * The current step is reset to "pending" so it can be re-executed on resume.
349
- *
350
- * @param workflowId - The workflow to pause
351
- * @throws WorkflowNotFoundError if workflow doesn't exist
352
- * @throws WorkflowStateError if workflow is not running
353
- */
354
- async pauseWorkflow(workflowId) {
355
- const workflow = await this.getWorkflowOrThrow(workflowId);
356
- if (workflow.status !== "running") {
357
- throw new WorkflowStateError(workflowId, workflow.status, "pause");
358
- }
359
- // Set pause flag for execution loop
360
- const state = this.activeWorkflows.get(workflowId);
361
- if (state) {
362
- state.isPaused = true;
363
- // Cancel current execution if running and reset the step status
364
- // Keep the executionId so we can resume the session later
365
- if (state.currentExecutionId) {
366
- try {
367
- await this.executionService.cancelExecution(state.currentExecutionId);
368
- // Find the running step and reset status to pending (keep executionId for resume)
369
- const runningStep = workflow.steps.find((s) => s.status === "running");
370
- if (runningStep) {
371
- this.updateStep(workflowId, runningStep.id, {
372
- status: "pending",
373
- // Keep executionId so we can resume the session
374
- error: undefined,
375
- });
376
- console.log(`[SequentialWorkflowEngine] Reset step ${runningStep.id} to pending after pause (keeping executionId for resume)`);
377
- }
378
- }
379
- catch (error) {
380
- console.warn(`[SequentialWorkflowEngine] Failed to cancel execution ${state.currentExecutionId}:`, error);
381
- }
382
- state.currentExecutionId = undefined;
383
- }
384
- }
385
- // Update status
386
- this.updateWorkflow(workflowId, { status: "paused" });
387
- // Emit event
388
- this.eventEmitter.emit({
389
- type: "workflow_paused",
390
- workflowId,
391
- timestamp: Date.now(),
392
- });
393
- }
394
- /**
395
- * Resume a paused workflow.
396
- *
397
- * @param workflowId - The workflow to resume
398
- * @param _message - Optional message (not used in sequential engine, no orchestrator)
399
- * @throws WorkflowNotFoundError if workflow doesn't exist
400
- * @throws WorkflowStateError if workflow is not paused
401
- */
402
- async resumeWorkflow(workflowId, _message) {
403
- const workflow = await this.getWorkflowOrThrow(workflowId);
404
- if (workflow.status !== "paused") {
405
- throw new WorkflowStateError(workflowId, workflow.status, "resume");
406
- }
407
- // Clear pause flag
408
- let state = this.activeWorkflows.get(workflowId);
409
- if (!state) {
410
- state = {
411
- workflowId,
412
- isPaused: false,
413
- isCancelled: false,
414
- };
415
- this.activeWorkflows.set(workflowId, state);
416
- }
417
- state.isPaused = false;
418
- // Update status
419
- this.updateWorkflow(workflowId, { status: "running" });
420
- // Emit event
421
- this.eventEmitter.emit({
422
- type: "workflow_resumed",
423
- workflowId,
424
- timestamp: Date.now(),
425
- });
426
- // Restart execution loop
427
- this.runExecutionLoop(workflowId).catch((error) => {
428
- console.error(`Workflow ${workflowId} execution loop failed:`, error);
429
- this.failWorkflow(workflowId, error.message).catch(console.error);
430
- });
431
- }
432
- /**
433
- * Cancel a workflow, stopping any running executions.
434
- *
435
- * @param workflowId - The workflow to cancel
436
- * @throws WorkflowNotFoundError if workflow doesn't exist
437
- * @throws WorkflowStateError if workflow is already completed/failed/cancelled
438
- */
439
- async cancelWorkflow(workflowId) {
440
- const workflow = await this.getWorkflowOrThrow(workflowId);
441
- // Check if already in terminal state
442
- if (["completed", "failed", "cancelled"].includes(workflow.status)) {
443
- throw new WorkflowStateError(workflowId, workflow.status, "cancel");
444
- }
445
- // Set cancel flag
446
- const state = this.activeWorkflows.get(workflowId);
447
- if (state) {
448
- state.isCancelled = true;
449
- // Cancel current execution if running
450
- if (state.currentExecutionId) {
451
- try {
452
- await this.executionService.cancelExecution(state.currentExecutionId);
453
- }
454
- catch (error) {
455
- console.warn(`Failed to cancel execution ${state.currentExecutionId}:`, error);
456
- }
457
- }
458
- }
459
- // Update status
460
- this.updateWorkflow(workflowId, {
461
- status: "cancelled",
462
- completedAt: new Date().toISOString(),
463
- });
464
- // Emit event
465
- this.eventEmitter.emit({
466
- type: "workflow_cancelled",
467
- workflowId,
468
- timestamp: Date.now(),
469
- });
470
- // Cleanup
471
- this.activeWorkflows.delete(workflowId);
472
- }
473
- // ===========================================================================
474
- // Step Control
475
- // ===========================================================================
476
- /**
477
- * Retry a failed step.
478
- *
479
- * Resets the step status to pending and unblocks dependent steps.
480
- * By default, preserves the executionId so the previous session can be resumed.
481
- * Use freshStart=true to clear the executionId and start a new execution.
482
- *
483
- * If the workflow was paused or failed due to the failure, it will be resumed.
484
- *
485
- * @param workflowId - The workflow containing the step
486
- * @param stepId - The step to retry
487
- * @param options - Optional retry options
488
- * @param options.freshStart - If true, clears executionId to start fresh instead of resuming
489
- * @throws WorkflowNotFoundError if workflow doesn't exist
490
- * @throws WorkflowStepNotFoundError if step doesn't exist
491
- * @throws WorkflowStateError if step is not in failed state
492
- */
493
- async retryStep(workflowId, stepId, options) {
494
- const workflow = await this.getWorkflowOrThrow(workflowId);
495
- const step = workflow.steps.find((s) => s.id === stepId);
496
- if (!step) {
497
- throw new WorkflowStepNotFoundError(workflowId, stepId);
498
- }
499
- if (step.status !== "failed") {
500
- throw new WorkflowStateError(workflowId, `step ${stepId} is ${step.status}`, "retry");
501
- }
502
- // Reset step status
503
- // Preserve executionId by default so we can resume the session
504
- // Only clear it if freshStart is explicitly requested
505
- const stepUpdate = {
506
- status: "pending",
507
- error: undefined,
508
- };
509
- if (options?.freshStart) {
510
- stepUpdate.executionId = undefined;
511
- console.log(`[SequentialWorkflowEngine] Retrying step ${stepId} with fresh start (clearing executionId)`);
512
- }
513
- else {
514
- console.log(`[SequentialWorkflowEngine] Retrying step ${stepId} with session resume (preserving executionId: ${step.executionId})`);
515
- }
516
- this.updateStep(workflowId, stepId, stepUpdate);
517
- // Unblock dependent steps
518
- await this.unblockDependentSteps(workflow, step);
519
- // Resume workflow if paused or failed
520
- if (workflow.status === "paused") {
521
- await this.resumeWorkflow(workflowId);
522
- }
523
- else if (workflow.status === "failed") {
524
- // Recover a failed workflow by changing status to running and restarting execution loop
525
- console.log(`[SequentialWorkflowEngine] Recovering failed workflow ${workflowId}`);
526
- // Initialize workflow state
527
- let state = this.activeWorkflows.get(workflowId);
528
- if (!state) {
529
- state = {
530
- workflowId,
531
- isPaused: false,
532
- isCancelled: false,
533
- };
534
- this.activeWorkflows.set(workflowId, state);
535
- }
536
- state.isPaused = false;
537
- state.isCancelled = false;
538
- // Update status to running
539
- this.updateWorkflow(workflowId, { status: "running" });
540
- // Emit event
541
- this.eventEmitter.emit({
542
- type: "workflow_resumed",
543
- workflowId,
544
- timestamp: Date.now(),
545
- });
546
- // Restart execution loop
547
- this.runExecutionLoop(workflowId).catch((error) => {
548
- console.error(`Workflow ${workflowId} execution loop failed:`, error);
549
- this.failWorkflow(workflowId, error.message).catch(console.error);
550
- });
551
- }
552
- }
553
- /**
554
- * Skip a step and handle its dependents.
555
- *
556
- * @param workflowId - The workflow containing the step
557
- * @param stepId - The step to skip
558
- * @param reason - Optional reason for skipping
559
- * @throws WorkflowNotFoundError if workflow doesn't exist
560
- * @throws WorkflowStepNotFoundError if step doesn't exist
561
- */
562
- async skipStep(workflowId, stepId, reason) {
563
- const workflow = await this.getWorkflowOrThrow(workflowId);
564
- const step = workflow.steps.find((s) => s.id === stepId);
565
- if (!step) {
566
- throw new WorkflowStepNotFoundError(workflowId, stepId);
567
- }
568
- const skipReason = reason || "Manually skipped";
569
- // Mark as skipped
570
- this.updateStep(workflowId, stepId, {
571
- status: "skipped",
572
- error: skipReason,
573
- });
574
- // Emit event
575
- this.eventEmitter.emit({
576
- type: "step_skipped",
577
- workflowId,
578
- step: { ...step, status: "skipped", error: skipReason },
579
- reason: skipReason,
580
- timestamp: Date.now(),
581
- });
582
- // Handle dependents based on config
583
- if (workflow.config.onFailure === "skip_dependents") {
584
- await this.skipDependentSteps(workflow, step, "Dependency skipped");
585
- }
586
- else {
587
- await this.blockDependentSteps(workflow, step);
588
- }
589
- // Resume workflow if paused
590
- if (workflow.status === "paused") {
591
- await this.resumeWorkflow(workflowId);
592
- }
593
- }
594
- // ===========================================================================
595
- // Execution Loop
596
- // ===========================================================================
597
- /**
598
- * Main execution loop for the workflow.
599
- * Runs steps in topological order, respecting dependencies.
600
- *
601
- * @param workflowId - The workflow to execute
602
- */
603
- async runExecutionLoop(workflowId) {
604
- while (true) {
605
- // Check workflow state
606
- const state = this.activeWorkflows.get(workflowId);
607
- if (!state || state.isPaused || state.isCancelled) {
608
- break;
609
- }
610
- // Get current workflow state
611
- const workflow = await this.getWorkflowOrThrow(workflowId);
612
- // Check if workflow is complete
613
- if (this.isWorkflowComplete(workflow)) {
614
- await this.completeWorkflow(workflowId);
615
- break;
616
- }
617
- // Get ready steps (dependencies satisfied)
618
- const readySteps = await this.getReadySteps(workflowId);
619
- if (readySteps.length === 0) {
620
- // No ready steps but workflow not complete - likely all remaining steps are blocked
621
- // This can happen if a step fails and dependents are blocked
622
- const hasBlockedOrFailed = workflow.steps.some((s) => s.status === "blocked" || s.status === "failed");
623
- if (hasBlockedOrFailed) {
624
- // Workflow is stuck, wait for user intervention (retry/skip)
625
- break;
626
- }
627
- // Should not happen - safeguard against infinite loop
628
- console.warn(`Workflow ${workflowId}: No ready steps but workflow not complete`);
629
- break;
630
- }
631
- // Execute steps based on parallelism config
632
- if (workflow.config.parallelism === "sequential") {
633
- // Execute one step at a time
634
- await this.executeStep(workflow, readySteps[0]);
635
- }
636
- else {
637
- // Execute multiple ready steps in parallel mode
638
- // Note: For Phase 4, this uses shared worktree with sequential commits
639
- // True parallel execution with separate branches is a future enhancement
640
- await this.executeParallel(workflow, readySteps);
641
- }
642
- }
643
- }
644
- /**
645
- * Execute multiple steps in parallel mode.
646
- *
647
- * For Phase 4, this uses a shared worktree with sequential commits.
648
- * Steps are executed one after another but all ready steps in the batch
649
- * are processed before re-checking dependencies.
650
- *
651
- * Future enhancement: True parallel execution with separate branches
652
- * and merge handling.
653
- *
654
- * @param workflow - The workflow containing the steps
655
- * @param steps - The ready steps to execute
656
- */
657
- async executeParallel(workflow, steps) {
658
- // Respect maxConcurrency limit
659
- const maxConcurrency = workflow.config.maxConcurrency ?? steps.length;
660
- const toExecute = steps.slice(0, maxConcurrency);
661
- // Track failed steps for batch failure handling
662
- const failedSteps = [];
663
- // Execute steps sequentially within the batch
664
- // (shared worktree requires sequential commits)
665
- for (const step of toExecute) {
666
- // Check for pause/cancel between steps
667
- const state = this.activeWorkflows.get(workflow.id);
668
- if (!state || state.isPaused || state.isCancelled) {
669
- break;
670
- }
671
- try {
672
- await this.executeStep(workflow, step);
673
- // Refresh workflow state to check if step succeeded
674
- const updatedWorkflow = await this.getWorkflowOrThrow(workflow.id);
675
- const updatedStep = updatedWorkflow.steps.find((s) => s.id === step.id);
676
- if (updatedStep?.status === "failed") {
677
- failedSteps.push(updatedStep);
678
- // For "stop" strategy, break immediately
679
- if (workflow.config.onFailure === "stop") {
680
- break;
681
- }
682
- // For "pause" strategy, the workflow is already paused by handleStepFailure
683
- if (updatedWorkflow.status === "paused") {
684
- break;
685
- }
686
- }
687
- }
688
- catch (error) {
689
- // Unexpected error during step execution
690
- console.error(`Error executing step ${step.id}:`, error);
691
- failedSteps.push(step);
692
- if (workflow.config.onFailure === "stop") {
693
- throw error;
694
- }
695
- }
696
- }
697
- }
698
- /**
699
- * Execute a single workflow step.
700
- *
701
- * If the step has a previous execution (from a pause), attempts to resume
702
- * the session. Otherwise creates a new execution.
703
- *
704
- * @param workflow - The workflow containing the step
705
- * @param step - The step to execute
706
- */
707
- async executeStep(workflow, step) {
708
- const state = this.activeWorkflows.get(workflow.id);
709
- // 1. Get issue details for prompt
710
- const issue = getIssue(this.db, step.issueId);
711
- if (!issue) {
712
- throw new Error(`Issue ${step.issueId} not found`);
713
- }
714
- // 2. Check if we should resume a previous execution
715
- let sessionIdToResume;
716
- let parentExecutionId;
717
- if (step.executionId) {
718
- const previousExecution = getExecution(this.db, step.executionId);
719
- if (previousExecution?.session_id) {
720
- sessionIdToResume = previousExecution.session_id;
721
- parentExecutionId = step.executionId; // Link to previous execution
722
- console.log(`[SequentialWorkflowEngine] Resuming step ${step.id} with session ${sessionIdToResume} (parent: ${parentExecutionId})`);
723
- }
724
- }
725
- // 3. Build execution config - always use workflow's worktree
726
- // Workflow-spawned executions run autonomously without terminal interaction
727
- const config = {
728
- mode: "worktree",
729
- baseBranch: workflow.baseBranch,
730
- createBaseBranch: workflow.config.createBaseBranch,
731
- reuseWorktreePath: workflow.worktreePath,
732
- // Workflow step executions run autonomously - must skip permission prompts
733
- dangerouslySkipPermissions: true,
734
- // Use workflow's orchestrator model for consistency if available
735
- model: workflow.config.orchestratorModel,
736
- // Resume previous session if available
737
- resume: sessionIdToResume,
738
- // Link to parent execution for chain tracking
739
- parentExecutionId,
740
- };
741
- // 4. Build prompt - use resume message if resuming, otherwise full prompt
742
- const prompt = sessionIdToResume
743
- ? "Workflow resumed. Continue where you left off."
744
- : this.buildPrompt(issue, workflow);
745
- // 5. Update step status to running
746
- this.updateStep(workflow.id, step.id, {
747
- status: "running",
748
- });
749
- // 6. Emit step started event
750
- this.eventEmitter.emit({
751
- type: "step_started",
752
- workflowId: workflow.id,
753
- step: { ...step, status: "running" },
754
- timestamp: Date.now(),
755
- });
756
- // 7. Create execution (will resume session if config.resume is set)
757
- const execution = await this.executionService.createExecution(step.issueId, config, prompt, workflow.config.defaultAgentType);
758
- // Track current execution
759
- if (state) {
760
- state.currentExecutionId = execution.id;
761
- }
762
- // Update step with new execution ID
763
- this.updateStep(workflow.id, step.id, {
764
- executionId: execution.id,
765
- });
766
- // 8. Wait for execution to complete
767
- const completedExecution = await this.waitForExecution(execution.id);
768
- // Clear current execution tracking
769
- if (state) {
770
- state.currentExecutionId = undefined;
771
- }
772
- // 9. Check if workflow was paused/cancelled during execution
773
- // If so, don't treat the cancelled execution as a failure
774
- if (state?.isPaused || state?.isCancelled) {
775
- console.log(`[SequentialWorkflowEngine] Step ${step.id} execution ended due to workflow ${state.isPaused ? "pause" : "cancel"}, not treating as failure`);
776
- return;
777
- }
778
- // 10. Handle result
779
- if (completedExecution.status === "completed") {
780
- await this.handleStepSuccess(workflow, step, completedExecution);
781
- }
782
- else {
783
- await this.handleStepFailure(workflow, step, completedExecution);
784
- }
785
- }
786
- /**
787
- * Wait for an execution to complete by polling.
788
- *
789
- * @param executionId - The execution to wait for
790
- * @returns The completed execution
791
- */
792
- async waitForExecution(executionId) {
793
- const pollIntervalMs = 1000; // 1 second
794
- const maxWaitMs = 60 * 60 * 1000; // 1 hour max
795
- const startTime = Date.now();
796
- while (true) {
797
- const execution = getExecution(this.db, executionId);
798
- if (!execution) {
799
- throw new Error(`Execution ${executionId} not found`);
800
- }
801
- // Check if execution is in a terminal state
802
- if (execution.status === "completed" ||
803
- execution.status === "failed" ||
804
- execution.status === "stopped" ||
805
- execution.status === "cancelled") {
806
- return execution;
807
- }
808
- // Check timeout
809
- if (Date.now() - startTime > maxWaitMs) {
810
- throw new Error(`Execution ${executionId} timed out after ${maxWaitMs}ms`);
811
- }
812
- // Wait before next poll
813
- await this.sleep(pollIntervalMs);
814
- }
815
- }
816
- /**
817
- * Sleep for a specified duration.
818
- */
819
- sleep(ms) {
820
- return new Promise((resolve) => setTimeout(resolve, ms));
821
- }
822
- /**
823
- * Build the prompt for executing an issue.
824
- *
825
- * @param issue - The issue to execute
826
- * @param workflow - The workflow context
827
- * @returns The prompt string
828
- */
829
- buildPrompt(issue, workflow) {
830
- // Build a basic prompt from issue details
831
- const parts = [];
832
- parts.push(`# Task: ${issue.title}`);
833
- parts.push("");
834
- if (issue.content) {
835
- parts.push("## Description");
836
- parts.push(issue.content);
837
- parts.push("");
838
- }
839
- // Add workflow context
840
- parts.push("## Workflow Context");
841
- parts.push(`This is step ${workflow.currentStepIndex + 1} of ${workflow.steps.length} in workflow "${workflow.title}".`);
842
- return parts.join("\n");
843
- }
844
- /**
845
- * Handle successful step completion.
846
- *
847
- * @param workflow - The workflow containing the step
848
- * @param step - The completed step
849
- * @param execution - The execution result
850
- */
851
- async handleStepSuccess(workflow, step, execution) {
852
- // Convert null to undefined for type compatibility
853
- let commitSha = execution.after_commit ?? undefined;
854
- // Close the issue BEFORE auto-commit so the status change is included
855
- // Use worktree path to keep changes isolated until explicit sync
856
- await this.closeIssue(step.issueId, workflow.worktreePath);
857
- // Auto-commit if configured and we have a worktree
858
- // This now includes the issue status change from closeIssue above
859
- if (workflow.config.autoCommitAfterStep && workflow.worktreePath) {
860
- const newCommitSha = await this.commitStepChanges(workflow, step);
861
- if (newCommitSha) {
862
- commitSha = newCommitSha;
863
- }
864
- }
865
- // Update step status
866
- this.updateStep(workflow.id, step.id, {
867
- status: "completed",
868
- commitSha,
869
- });
870
- // Emit event
871
- this.eventEmitter.emit({
872
- type: "step_completed",
873
- workflowId: workflow.id,
874
- step: { ...step, status: "completed", commitSha },
875
- executionId: execution.id,
876
- timestamp: Date.now(),
877
- });
878
- // Update workflow progress
879
- this.updateWorkflow(workflow.id, {
880
- currentStepIndex: workflow.currentStepIndex + 1,
881
- });
882
- }
883
- /**
884
- * Commit step changes to git.
885
- *
886
- * @param workflow - The workflow containing the step
887
- * @param step - The completed step
888
- * @returns The commit SHA if successful, null otherwise
889
- */
890
- async commitStepChanges(workflow, step) {
891
- if (!workflow.worktreePath) {
892
- return null;
893
- }
894
- const issue = getIssue(this.db, step.issueId);
895
- const message = this.buildCommitMessage(workflow, step, issue);
896
- try {
897
- // Check if there are changes to commit
898
- const { stdout: status } = await execAsync("git status --porcelain", {
899
- cwd: workflow.worktreePath,
900
- maxBuffer: 10 * 1024 * 1024,
901
- });
902
- if (!status.trim()) {
903
- // No changes to commit
904
- return null;
905
- }
906
- // Stage all changes and commit
907
- // Escape double quotes in message for shell safety
908
- const escapedMessage = message.replace(/"/g, '\\"');
909
- await execAsync(`git add -A && git commit --no-verify -m "${escapedMessage}"`, {
910
- cwd: workflow.worktreePath,
911
- maxBuffer: 10 * 1024 * 1024,
912
- });
913
- // Get new commit SHA
914
- const { stdout: sha } = await execAsync("git rev-parse HEAD", {
915
- cwd: workflow.worktreePath,
916
- });
917
- return sha.trim();
918
- }
919
- catch (error) {
920
- console.error("Failed to commit step changes:", error);
921
- return null;
922
- }
923
- }
924
- /**
925
- * Build commit message for a step.
926
- *
927
- * @param workflow - The workflow
928
- * @param step - The completed step
929
- * @param issue - The issue (may be null)
930
- * @returns The commit message
931
- */
932
- buildCommitMessage(workflow, step, issue) {
933
- const issueTitle = issue?.title || "Unknown issue";
934
- const stepNum = step.index + 1;
935
- const totalSteps = workflow.steps.length;
936
- return `[Workflow ${stepNum}/${totalSteps}] ${step.issueId}: ${issueTitle}
937
-
938
- Workflow: ${workflow.title}
939
- Step: ${stepNum} of ${totalSteps}`;
940
- }
941
- /**
942
- * Update an issue directly in the worktree's JSONL file.
943
- * This keeps changes isolated to the worktree until explicitly synced.
944
- *
945
- * @param worktreePath - Path to the worktree
946
- * @param issueId - The issue ID to update
947
- * @param updates - Partial issue updates to apply
948
- */
949
- async updateIssueInWorktree(worktreePath, issueId, updates) {
950
- const issuesPath = path.join(worktreePath, ".sudocode", "issues.jsonl");
951
- // Read current issues from worktree JSONL
952
- const issues = readJSONLSync(issuesPath);
953
- // Find and update the issue
954
- const issueIndex = issues.findIndex((issue) => issue.id === issueId);
955
- if (issueIndex === -1) {
956
- console.warn(`[SequentialWorkflowEngine] Issue ${issueId} not found in worktree JSONL`);
957
- return;
958
- }
959
- // Apply updates
960
- const updatedIssue = {
961
- ...issues[issueIndex],
962
- ...updates,
963
- updated_at: new Date().toISOString(),
964
- };
965
- // Handle closed_at for status changes
966
- if (updates.status === "closed" && issues[issueIndex].status !== "closed") {
967
- updatedIssue.closed_at = new Date().toISOString();
968
- }
969
- else if (updates.status && updates.status !== "closed" && issues[issueIndex].status === "closed") {
970
- updatedIssue.closed_at = undefined;
971
- }
972
- issues[issueIndex] = updatedIssue;
973
- // Write back to JSONL
974
- await writeJSONL(issuesPath, issues);
975
- console.log(`[SequentialWorkflowEngine] Updated issue ${issueId} in worktree JSONL:`, updates);
976
- }
977
- /**
978
- * Close an issue after successful step completion.
979
- * If a worktree path is provided, updates the worktree's JSONL directly.
980
- * Otherwise, updates the main database.
981
- *
982
- * @param issueId - The issue ID to close
983
- * @param worktreePath - Optional path to the worktree for isolated updates
984
- */
985
- async closeIssue(issueId, worktreePath) {
986
- try {
987
- if (worktreePath) {
988
- // Update the worktree's JSONL file directly
989
- await this.updateIssueInWorktree(worktreePath, issueId, {
990
- status: "closed",
991
- });
992
- }
993
- else {
994
- // Fall back to main database
995
- updateIssue(this.db, issueId, { status: "closed" });
996
- }
997
- }
998
- catch (error) {
999
- // Non-fatal - log but don't fail
1000
- console.warn(`Failed to close issue ${issueId}:`, error);
1001
- }
1002
- }
1003
- /**
1004
- * Handle step failure.
1005
- *
1006
- * @param workflow - The workflow containing the step
1007
- * @param step - The failed step
1008
- * @param execution - The execution result
1009
- */
1010
- async handleStepFailure(workflow, step, execution) {
1011
- const errorMessage = execution.error_message || "Unknown error";
1012
- // Handle based on failure strategy
1013
- // For "pause" strategy, we keep the step in "pending" state so it can be resumed
1014
- // For other strategies, we mark it as "failed"
1015
- switch (workflow.config.onFailure) {
1016
- case "pause":
1017
- // Reset step to pending so it can be resumed when workflow resumes
1018
- // Keep executionId so we can resume the Claude session
1019
- this.updateStep(workflow.id, step.id, {
1020
- status: "pending",
1021
- // Keep executionId for session resume
1022
- error: undefined,
1023
- });
1024
- console.log(`[SequentialWorkflowEngine] Step ${step.id} failed but keeping pending for resume (executionId: ${step.executionId})`);
1025
- // Emit a workflow_paused event (not step_failed since it's resumable)
1026
- await this.pauseWorkflow(workflow.id);
1027
- break;
1028
- case "stop":
1029
- // Mark step as failed
1030
- this.updateStep(workflow.id, step.id, {
1031
- status: "failed",
1032
- error: errorMessage,
1033
- });
1034
- // Emit event
1035
- this.eventEmitter.emit({
1036
- type: "step_failed",
1037
- workflowId: workflow.id,
1038
- step: { ...step, status: "failed", error: errorMessage },
1039
- error: errorMessage,
1040
- timestamp: Date.now(),
1041
- });
1042
- await this.failWorkflow(workflow.id, `Step ${step.id} failed: ${errorMessage}`);
1043
- break;
1044
- case "skip_dependents":
1045
- // Mark step as failed
1046
- this.updateStep(workflow.id, step.id, {
1047
- status: "failed",
1048
- error: errorMessage,
1049
- });
1050
- // Emit event
1051
- this.eventEmitter.emit({
1052
- type: "step_failed",
1053
- workflowId: workflow.id,
1054
- step: { ...step, status: "failed", error: errorMessage },
1055
- error: errorMessage,
1056
- timestamp: Date.now(),
1057
- });
1058
- await this.skipDependentSteps(workflow, step, `Dependency ${step.issueId} failed`);
1059
- break;
1060
- case "continue":
1061
- // Mark step as failed
1062
- this.updateStep(workflow.id, step.id, {
1063
- status: "failed",
1064
- error: errorMessage,
1065
- });
1066
- // Emit event
1067
- this.eventEmitter.emit({
1068
- type: "step_failed",
1069
- workflowId: workflow.id,
1070
- step: { ...step, status: "failed", error: errorMessage },
1071
- error: errorMessage,
1072
- timestamp: Date.now(),
1073
- });
1074
- // Mark dependents as blocked, continue with other steps
1075
- await this.blockDependentSteps(workflow, step);
1076
- break;
1077
- }
1078
- }
1079
- // ===========================================================================
1080
- // Helper Methods
1081
- // ===========================================================================
1082
- /**
1083
- * Mark workflow as failed.
1084
- */
1085
- async failWorkflow(workflowId, error) {
1086
- this.updateWorkflow(workflowId, {
1087
- status: "failed",
1088
- completedAt: new Date().toISOString(),
1089
- });
1090
- this.eventEmitter.emit({
1091
- type: "workflow_failed",
1092
- workflowId,
1093
- error,
1094
- timestamp: Date.now(),
1095
- });
1096
- this.activeWorkflows.delete(workflowId);
1097
- }
1098
- /**
1099
- * Mark workflow as completed.
1100
- */
1101
- async completeWorkflow(workflowId) {
1102
- const workflow = await this.getWorkflowOrThrow(workflowId);
1103
- this.updateWorkflow(workflowId, {
1104
- status: "completed",
1105
- completedAt: new Date().toISOString(),
1106
- });
1107
- this.eventEmitter.emit({
1108
- type: "workflow_completed",
1109
- workflowId,
1110
- workflow: { ...workflow, status: "completed" },
1111
- timestamp: Date.now(),
1112
- });
1113
- this.activeWorkflows.delete(workflowId);
1114
- }
1115
- /**
1116
- * Check if workflow is complete (all steps done or skipped).
1117
- */
1118
- isWorkflowComplete(workflow) {
1119
- return workflow.steps.every((step) => step.status === "completed" ||
1120
- step.status === "skipped" ||
1121
- step.status === "blocked");
1122
- }
1123
- /**
1124
- * Find all steps that transitively depend on a given step.
1125
- */
1126
- findDependentSteps(workflow, stepId) {
1127
- const dependents = [];
1128
- const visited = new Set();
1129
- const queue = [stepId];
1130
- while (queue.length > 0) {
1131
- const current = queue.shift();
1132
- for (const step of workflow.steps) {
1133
- if (step.dependencies.includes(current) && !visited.has(step.id)) {
1134
- visited.add(step.id);
1135
- dependents.push(step);
1136
- queue.push(step.id);
1137
- }
1138
- }
1139
- }
1140
- return dependents;
1141
- }
1142
- /**
1143
- * Skip all steps that depend on a failed/skipped step.
1144
- */
1145
- async skipDependentSteps(workflow, failedStep, reason) {
1146
- const dependents = this.findDependentSteps(workflow, failedStep.id);
1147
- for (const step of dependents) {
1148
- if (step.status === "pending" || step.status === "ready") {
1149
- this.updateStep(workflow.id, step.id, {
1150
- status: "skipped",
1151
- error: reason,
1152
- });
1153
- this.eventEmitter.emit({
1154
- type: "step_skipped",
1155
- workflowId: workflow.id,
1156
- step: { ...step, status: "skipped", error: reason },
1157
- reason,
1158
- timestamp: Date.now(),
1159
- });
1160
- }
1161
- }
1162
- }
1163
- /**
1164
- * Block all steps that depend on a failed step.
1165
- */
1166
- async blockDependentSteps(workflow, failedStep) {
1167
- const dependents = this.findDependentSteps(workflow, failedStep.id);
1168
- for (const step of dependents) {
1169
- if (step.status === "pending" || step.status === "ready") {
1170
- this.updateStep(workflow.id, step.id, {
1171
- status: "blocked",
1172
- });
1173
- }
1174
- }
1175
- }
1176
- /**
1177
- * Unblock steps that were blocked due to a failed dependency.
1178
- */
1179
- async unblockDependentSteps(workflow, retriedStep) {
1180
- const dependents = this.findDependentSteps(workflow, retriedStep.id);
1181
- for (const step of dependents) {
1182
- if (step.status === "blocked") {
1183
- this.updateStep(workflow.id, step.id, {
1184
- status: "pending",
1185
- });
1186
- }
1187
- }
1188
- }
1189
- }
1190
- //# sourceMappingURL=sequential-engine.js.map