vibeman 0.0.3 → 0.0.6

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 (231) hide show
  1. package/dist/api.js +49 -0
  2. package/dist/cli.js +135 -0
  3. package/dist/ui/index-gnk6rhxs.js +9 -0
  4. package/dist/ui/index.html +10 -0
  5. package/dist/ui/index.js +2 -0
  6. package/package.json +10 -80
  7. package/README.md +0 -12
  8. package/dist/index.js +0 -114
  9. package/dist/runtime/api/.tsbuildinfo +0 -1
  10. package/dist/runtime/api/agent/agent-service.d.ts +0 -225
  11. package/dist/runtime/api/agent/agent-service.js +0 -904
  12. package/dist/runtime/api/agent/ai-providers/claude-code-adapter.d.ts +0 -61
  13. package/dist/runtime/api/agent/ai-providers/claude-code-adapter.js +0 -362
  14. package/dist/runtime/api/agent/ai-providers/codex-cli-provider.d.ts +0 -36
  15. package/dist/runtime/api/agent/ai-providers/codex-cli-provider.js +0 -347
  16. package/dist/runtime/api/agent/ai-providers/index.d.ts +0 -9
  17. package/dist/runtime/api/agent/ai-providers/index.js +0 -7
  18. package/dist/runtime/api/agent/ai-providers/types.d.ts +0 -182
  19. package/dist/runtime/api/agent/ai-providers/types.js +0 -5
  20. package/dist/runtime/api/agent/codex-cli-provider.test.d.ts +0 -1
  21. package/dist/runtime/api/agent/codex-cli-provider.test.js +0 -170
  22. package/dist/runtime/api/agent/core-agent-service.d.ts +0 -119
  23. package/dist/runtime/api/agent/core-agent-service.js +0 -267
  24. package/dist/runtime/api/agent/parsers.d.ts +0 -16
  25. package/dist/runtime/api/agent/parsers.js +0 -308
  26. package/dist/runtime/api/agent/prompt-service.d.ts +0 -30
  27. package/dist/runtime/api/agent/prompt-service.js +0 -449
  28. package/dist/runtime/api/agent/prompt-service.test.d.ts +0 -1
  29. package/dist/runtime/api/agent/prompt-service.test.js +0 -230
  30. package/dist/runtime/api/agent/routing-policy.d.ts +0 -171
  31. package/dist/runtime/api/agent/routing-policy.js +0 -196
  32. package/dist/runtime/api/agent/routing-policy.test.d.ts +0 -1
  33. package/dist/runtime/api/agent/routing-policy.test.js +0 -63
  34. package/dist/runtime/api/api/router-helpers.d.ts +0 -32
  35. package/dist/runtime/api/api/router-helpers.js +0 -31
  36. package/dist/runtime/api/api/routers/ai.d.ts +0 -200
  37. package/dist/runtime/api/api/routers/ai.js +0 -396
  38. package/dist/runtime/api/api/routers/executions.d.ts +0 -98
  39. package/dist/runtime/api/api/routers/executions.js +0 -94
  40. package/dist/runtime/api/api/routers/git.d.ts +0 -45
  41. package/dist/runtime/api/api/routers/git.js +0 -35
  42. package/dist/runtime/api/api/routers/provider-config.d.ts +0 -165
  43. package/dist/runtime/api/api/routers/provider-config.js +0 -252
  44. package/dist/runtime/api/api/routers/settings.d.ts +0 -139
  45. package/dist/runtime/api/api/routers/settings.js +0 -113
  46. package/dist/runtime/api/api/routers/tasks.d.ts +0 -141
  47. package/dist/runtime/api/api/routers/tasks.js +0 -238
  48. package/dist/runtime/api/api/routers/workflows.d.ts +0 -275
  49. package/dist/runtime/api/api/routers/workflows.js +0 -311
  50. package/dist/runtime/api/api/routers/worktrees.d.ts +0 -101
  51. package/dist/runtime/api/api/routers/worktrees.js +0 -80
  52. package/dist/runtime/api/api/trpc.d.ts +0 -118
  53. package/dist/runtime/api/api/trpc.js +0 -34
  54. package/dist/runtime/api/index.d.ts +0 -9
  55. package/dist/runtime/api/index.js +0 -117
  56. package/dist/runtime/api/lib/id-generator.d.ts +0 -70
  57. package/dist/runtime/api/lib/id-generator.js +0 -123
  58. package/dist/runtime/api/lib/local-config.d.ts +0 -245
  59. package/dist/runtime/api/lib/local-config.js +0 -288
  60. package/dist/runtime/api/lib/logger.d.ts +0 -11
  61. package/dist/runtime/api/lib/logger.js +0 -188
  62. package/dist/runtime/api/lib/provider-detection.d.ts +0 -59
  63. package/dist/runtime/api/lib/provider-detection.js +0 -244
  64. package/dist/runtime/api/lib/server/agent-service-singleton.d.ts +0 -6
  65. package/dist/runtime/api/lib/server/agent-service-singleton.js +0 -27
  66. package/dist/runtime/api/lib/server/bootstrap.d.ts +0 -38
  67. package/dist/runtime/api/lib/server/bootstrap.js +0 -197
  68. package/dist/runtime/api/lib/server/git-service-singleton.d.ts +0 -6
  69. package/dist/runtime/api/lib/server/git-service-singleton.js +0 -47
  70. package/dist/runtime/api/lib/server/project-root.d.ts +0 -2
  71. package/dist/runtime/api/lib/server/project-root.js +0 -61
  72. package/dist/runtime/api/lib/server/task-service-singleton.d.ts +0 -7
  73. package/dist/runtime/api/lib/server/task-service-singleton.js +0 -58
  74. package/dist/runtime/api/lib/server/vibing-orchestrator-singleton.d.ts +0 -7
  75. package/dist/runtime/api/lib/server/vibing-orchestrator-singleton.js +0 -57
  76. package/dist/runtime/api/lib/trpc/client.d.ts +0 -1
  77. package/dist/runtime/api/lib/trpc/client.js +0 -5
  78. package/dist/runtime/api/lib/trpc/server.d.ts +0 -935
  79. package/dist/runtime/api/lib/trpc/server.js +0 -11
  80. package/dist/runtime/api/lib/trpc/ws-server.d.ts +0 -8
  81. package/dist/runtime/api/lib/trpc/ws-server.js +0 -33
  82. package/dist/runtime/api/persistence/database-service.d.ts +0 -14
  83. package/dist/runtime/api/persistence/database-service.js +0 -74
  84. package/dist/runtime/api/persistence/execution-log-persistence.d.ts +0 -90
  85. package/dist/runtime/api/persistence/execution-log-persistence.js +0 -410
  86. package/dist/runtime/api/persistence/execution-log-persistence.test.d.ts +0 -1
  87. package/dist/runtime/api/persistence/execution-log-persistence.test.js +0 -170
  88. package/dist/runtime/api/router.d.ts +0 -938
  89. package/dist/runtime/api/router.js +0 -34
  90. package/dist/runtime/api/settings-service.d.ts +0 -110
  91. package/dist/runtime/api/settings-service.js +0 -661
  92. package/dist/runtime/api/tasks/file-watcher.d.ts +0 -23
  93. package/dist/runtime/api/tasks/file-watcher.js +0 -88
  94. package/dist/runtime/api/tasks/task-file-parser.d.ts +0 -13
  95. package/dist/runtime/api/tasks/task-file-parser.js +0 -161
  96. package/dist/runtime/api/tasks/task-service.d.ts +0 -36
  97. package/dist/runtime/api/tasks/task-service.js +0 -173
  98. package/dist/runtime/api/types/index.d.ts +0 -186
  99. package/dist/runtime/api/types/index.js +0 -1
  100. package/dist/runtime/api/types/settings.d.ts +0 -94
  101. package/dist/runtime/api/types/settings.js +0 -2
  102. package/dist/runtime/api/types.d.ts +0 -2
  103. package/dist/runtime/api/types.js +0 -1
  104. package/dist/runtime/api/utils/env.d.ts +0 -6
  105. package/dist/runtime/api/utils/env.js +0 -12
  106. package/dist/runtime/api/utils/stripNextEnv.d.ts +0 -7
  107. package/dist/runtime/api/utils/stripNextEnv.js +0 -22
  108. package/dist/runtime/api/utils/title-slug.d.ts +0 -6
  109. package/dist/runtime/api/utils/title-slug.js +0 -77
  110. package/dist/runtime/api/utils/url.d.ts +0 -2
  111. package/dist/runtime/api/utils/url.js +0 -19
  112. package/dist/runtime/api/vcs/git-history-service.d.ts +0 -57
  113. package/dist/runtime/api/vcs/git-history-service.js +0 -228
  114. package/dist/runtime/api/vcs/git-service.d.ts +0 -127
  115. package/dist/runtime/api/vcs/git-service.js +0 -284
  116. package/dist/runtime/api/vcs/worktree-service.d.ts +0 -93
  117. package/dist/runtime/api/vcs/worktree-service.js +0 -506
  118. package/dist/runtime/api/vcs/worktree-service.test.d.ts +0 -1
  119. package/dist/runtime/api/vcs/worktree-service.test.js +0 -20
  120. package/dist/runtime/api/workflows/quality-pipeline.d.ts +0 -58
  121. package/dist/runtime/api/workflows/quality-pipeline.js +0 -400
  122. package/dist/runtime/api/workflows/vibing-orchestrator.d.ts +0 -318
  123. package/dist/runtime/api/workflows/vibing-orchestrator.js +0 -1891
  124. package/dist/runtime/web/.next/BUILD_ID +0 -1
  125. package/dist/runtime/web/.next/app-build-manifest.json +0 -66
  126. package/dist/runtime/web/.next/app-path-routes-manifest.json +0 -8
  127. package/dist/runtime/web/.next/build-manifest.json +0 -33
  128. package/dist/runtime/web/.next/package.json +0 -1
  129. package/dist/runtime/web/.next/prerender-manifest.json +0 -61
  130. package/dist/runtime/web/.next/react-loadable-manifest.json +0 -39
  131. package/dist/runtime/web/.next/required-server-files.json +0 -334
  132. package/dist/runtime/web/.next/routes-manifest.json +0 -70
  133. package/dist/runtime/web/.next/server/app/.vibeman/assets/images/[...path]/route.js +0 -1
  134. package/dist/runtime/web/.next/server/app/.vibeman/assets/images/[...path]/route.js.nft.json +0 -1
  135. package/dist/runtime/web/.next/server/app/.vibeman/assets/images/[...path]/route_client-reference-manifest.js +0 -1
  136. package/dist/runtime/web/.next/server/app/_not-found/page.js +0 -2
  137. package/dist/runtime/web/.next/server/app/_not-found/page.js.nft.json +0 -1
  138. package/dist/runtime/web/.next/server/app/_not-found/page_client-reference-manifest.js +0 -1
  139. package/dist/runtime/web/.next/server/app/_not-found.html +0 -7
  140. package/dist/runtime/web/.next/server/app/_not-found.meta +0 -8
  141. package/dist/runtime/web/.next/server/app/_not-found.rsc +0 -22
  142. package/dist/runtime/web/.next/server/app/api/health/route.js +0 -1
  143. package/dist/runtime/web/.next/server/app/api/health/route.js.nft.json +0 -1
  144. package/dist/runtime/web/.next/server/app/api/health/route_client-reference-manifest.js +0 -1
  145. package/dist/runtime/web/.next/server/app/api/images/[...path]/route.js +0 -1
  146. package/dist/runtime/web/.next/server/app/api/images/[...path]/route.js.nft.json +0 -1
  147. package/dist/runtime/web/.next/server/app/api/images/[...path]/route_client-reference-manifest.js +0 -1
  148. package/dist/runtime/web/.next/server/app/api/upload/route.js +0 -1
  149. package/dist/runtime/web/.next/server/app/api/upload/route.js.nft.json +0 -1
  150. package/dist/runtime/web/.next/server/app/api/upload/route_client-reference-manifest.js +0 -1
  151. package/dist/runtime/web/.next/server/app/index.html +0 -7
  152. package/dist/runtime/web/.next/server/app/index.meta +0 -7
  153. package/dist/runtime/web/.next/server/app/index.rsc +0 -27
  154. package/dist/runtime/web/.next/server/app/page.js +0 -147
  155. package/dist/runtime/web/.next/server/app/page.js.nft.json +0 -1
  156. package/dist/runtime/web/.next/server/app/page_client-reference-manifest.js +0 -1
  157. package/dist/runtime/web/.next/server/app-paths-manifest.json +0 -8
  158. package/dist/runtime/web/.next/server/chunks/217.js +0 -1
  159. package/dist/runtime/web/.next/server/chunks/383.js +0 -6
  160. package/dist/runtime/web/.next/server/chunks/458.js +0 -1
  161. package/dist/runtime/web/.next/server/chunks/576.js +0 -18
  162. package/dist/runtime/web/.next/server/chunks/635.js +0 -22
  163. package/dist/runtime/web/.next/server/chunks/761.js +0 -1
  164. package/dist/runtime/web/.next/server/chunks/777.js +0 -3
  165. package/dist/runtime/web/.next/server/chunks/825.js +0 -1
  166. package/dist/runtime/web/.next/server/chunks/838.js +0 -1
  167. package/dist/runtime/web/.next/server/chunks/973.js +0 -15
  168. package/dist/runtime/web/.next/server/functions-config-manifest.json +0 -4
  169. package/dist/runtime/web/.next/server/middleware-build-manifest.js +0 -1
  170. package/dist/runtime/web/.next/server/middleware-manifest.json +0 -6
  171. package/dist/runtime/web/.next/server/middleware-react-loadable-manifest.js +0 -1
  172. package/dist/runtime/web/.next/server/next-font-manifest.js +0 -1
  173. package/dist/runtime/web/.next/server/next-font-manifest.json +0 -1
  174. package/dist/runtime/web/.next/server/pages/404.html +0 -7
  175. package/dist/runtime/web/.next/server/pages/500.html +0 -1
  176. package/dist/runtime/web/.next/server/pages/_app.js +0 -1
  177. package/dist/runtime/web/.next/server/pages/_app.js.nft.json +0 -1
  178. package/dist/runtime/web/.next/server/pages/_document.js +0 -1
  179. package/dist/runtime/web/.next/server/pages/_document.js.nft.json +0 -1
  180. package/dist/runtime/web/.next/server/pages/_error.js +0 -19
  181. package/dist/runtime/web/.next/server/pages/_error.js.nft.json +0 -1
  182. package/dist/runtime/web/.next/server/pages-manifest.json +0 -6
  183. package/dist/runtime/web/.next/server/server-reference-manifest.js +0 -1
  184. package/dist/runtime/web/.next/server/server-reference-manifest.json +0 -1
  185. package/dist/runtime/web/.next/server/webpack-runtime.js +0 -1
  186. package/dist/runtime/web/.next/static/5_15u1WQCxN1_eHZpldCv/_buildManifest.js +0 -1
  187. package/dist/runtime/web/.next/static/5_15u1WQCxN1_eHZpldCv/_ssgManifest.js +0 -1
  188. package/dist/runtime/web/.next/static/chunks/18-15c10d3288afef2e.js +0 -1
  189. package/dist/runtime/web/.next/static/chunks/1c0ca389.537bbe362e3ffbd9.js +0 -3
  190. package/dist/runtime/web/.next/static/chunks/22747d63-ad5da0c19f4cfe41.js +0 -71
  191. package/dist/runtime/web/.next/static/chunks/355.056c2645878a799a.js +0 -1
  192. package/dist/runtime/web/.next/static/chunks/420.a5ccf151c9e2b2f1.js +0 -1
  193. package/dist/runtime/web/.next/static/chunks/439.1be0c6242fd248d5.js +0 -15
  194. package/dist/runtime/web/.next/static/chunks/440.c52e7c0f797e22b2.js +0 -1
  195. package/dist/runtime/web/.next/static/chunks/575-e2478287c27da87b.js +0 -1
  196. package/dist/runtime/web/.next/static/chunks/691.920d88c115087314.js +0 -1
  197. package/dist/runtime/web/.next/static/chunks/765-e838910065b50c3d.js +0 -1
  198. package/dist/runtime/web/.next/static/chunks/823-6f371a6e829adbba.js +0 -63
  199. package/dist/runtime/web/.next/static/chunks/87c73c54-09e1ba5c70e60a51.js +0 -1
  200. package/dist/runtime/web/.next/static/chunks/891cff7f.0f71fc028f87e683.js +0 -1
  201. package/dist/runtime/web/.next/static/chunks/8bb4d8db-3e2aa02b0a2384b9.js +0 -1
  202. package/dist/runtime/web/.next/static/chunks/9af238c7-271a911d4e99ab18.js +0 -1
  203. package/dist/runtime/web/.next/static/chunks/app/.vibeman/assets/images/[...path]/route-751c9265a65409e5.js +0 -1
  204. package/dist/runtime/web/.next/static/chunks/app/_not-found/page-1cb74d1cba27d0ab.js +0 -1
  205. package/dist/runtime/web/.next/static/chunks/app/api/health/route-751c9265a65409e5.js +0 -1
  206. package/dist/runtime/web/.next/static/chunks/app/api/images/[...path]/route-751c9265a65409e5.js +0 -1
  207. package/dist/runtime/web/.next/static/chunks/app/api/upload/route-751c9265a65409e5.js +0 -1
  208. package/dist/runtime/web/.next/static/chunks/app/layout-8435322f09fd0975.js +0 -1
  209. package/dist/runtime/web/.next/static/chunks/app/page-9fe7d75095b4ccec.js +0 -1
  210. package/dist/runtime/web/.next/static/chunks/cac567b0-5b77dd12911823cd.js +0 -1
  211. package/dist/runtime/web/.next/static/chunks/framework-2518f1345b5b2806.js +0 -1
  212. package/dist/runtime/web/.next/static/chunks/main-17665e5e39de9a8a.js +0 -1
  213. package/dist/runtime/web/.next/static/chunks/main-app-c0b0f5ba4f7f9d75.js +0 -1
  214. package/dist/runtime/web/.next/static/chunks/pages/_app-d6f6b3bbc3d81ee1.js +0 -1
  215. package/dist/runtime/web/.next/static/chunks/pages/_error-75a96cf1997cc3b9.js +0 -1
  216. package/dist/runtime/web/.next/static/chunks/polyfills-42372ed130431b0a.js +0 -1
  217. package/dist/runtime/web/.next/static/chunks/webpack-c8de37305b4635cf.js +0 -1
  218. package/dist/runtime/web/.next/static/css/08c950681f1a9a92.css +0 -1
  219. package/dist/runtime/web/.next/static/css/2728291c68f99cb1.css +0 -3
  220. package/dist/runtime/web/.next/static/css/521bd69cc298cd1a.css +0 -1
  221. package/dist/runtime/web/.next/static/css/537e22821e101b87.css +0 -1
  222. package/dist/runtime/web/.next/static/media/19cfc7226ec3afaa-s.woff2 +0 -0
  223. package/dist/runtime/web/.next/static/media/21350d82a1f187e9-s.woff2 +0 -0
  224. package/dist/runtime/web/.next/static/media/8e9860b6e62d6359-s.woff2 +0 -0
  225. package/dist/runtime/web/.next/static/media/ba9851c3c22cd980-s.woff2 +0 -0
  226. package/dist/runtime/web/.next/static/media/c5fe6dc8356a8c31-s.woff2 +0 -0
  227. package/dist/runtime/web/.next/static/media/df0a9ae256c0569c-s.woff2 +0 -0
  228. package/dist/runtime/web/.next/static/media/e4af272ccee01ff0-s.p.woff2 +0 -0
  229. package/dist/runtime/web/package.json +0 -65
  230. package/dist/runtime/web/server.js +0 -44
  231. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -1,275 +0,0 @@
1
- import type { VibingOrchestrator } from '../../workflows/vibing-orchestrator.js';
2
- type Deps = {
3
- vibingOrchestrator: VibingOrchestrator;
4
- };
5
- export declare function buildWorkflowRoutes({ vibingOrchestrator }: Deps): {
6
- readonly updateWorkflowOptions: import("@trpc/server").TRPCMutationProcedure<{
7
- input: {
8
- workflowId: string;
9
- config: {
10
- autoCommit?: boolean | undefined;
11
- createPR?: boolean | undefined;
12
- autoQualityChecks?: boolean | undefined;
13
- requireHumanApproval?: boolean | undefined;
14
- stepByStepMode?: boolean | undefined;
15
- autoMerge?: boolean | undefined;
16
- aiCodeReview?: boolean | undefined;
17
- aiRoutingOverrides?: {
18
- execute_task?: {
19
- provider?: string | undefined;
20
- model?: string | undefined;
21
- } | undefined;
22
- quality_checks?: {
23
- provider?: string | undefined;
24
- model?: string | undefined;
25
- } | undefined;
26
- improve_task?: {
27
- provider?: string | undefined;
28
- model?: string | undefined;
29
- } | undefined;
30
- ai_merge?: {
31
- provider?: string | undefined;
32
- model?: string | undefined;
33
- } | undefined;
34
- ai_codereview?: {
35
- provider?: string | undefined;
36
- model?: string | undefined;
37
- } | undefined;
38
- } | undefined;
39
- };
40
- };
41
- output: {
42
- readonly success: true;
43
- };
44
- meta: object;
45
- }>;
46
- readonly startWorkflow: import("@trpc/server").TRPCMutationProcedure<{
47
- input: {
48
- taskId: string;
49
- config?: {
50
- autoCommit?: boolean | undefined;
51
- createPR?: boolean | undefined;
52
- autoQualityChecks?: boolean | undefined;
53
- requireHumanApproval?: boolean | undefined;
54
- stepByStepMode?: boolean | undefined;
55
- autoMerge?: boolean | undefined;
56
- aiCodeReview?: boolean | undefined;
57
- aiRoutingOverrides?: {
58
- execute_task?: {
59
- provider?: string | undefined;
60
- model?: string | undefined;
61
- } | undefined;
62
- quality_checks?: {
63
- provider?: string | undefined;
64
- model?: string | undefined;
65
- } | undefined;
66
- improve_task?: {
67
- provider?: string | undefined;
68
- model?: string | undefined;
69
- } | undefined;
70
- ai_merge?: {
71
- provider?: string | undefined;
72
- model?: string | undefined;
73
- } | undefined;
74
- ai_codereview?: {
75
- provider?: string | undefined;
76
- model?: string | undefined;
77
- } | undefined;
78
- } | undefined;
79
- } | undefined;
80
- };
81
- output: {
82
- workflowId: string;
83
- };
84
- meta: object;
85
- }>;
86
- readonly continueWorkflow: import("@trpc/server").TRPCMutationProcedure<{
87
- input: {
88
- workflowId: string;
89
- };
90
- output: {
91
- readonly success: true;
92
- };
93
- meta: object;
94
- }>;
95
- readonly runValidation: import("@trpc/server").TRPCMutationProcedure<{
96
- input: {
97
- workflowId: string;
98
- };
99
- output: {
100
- readonly success: true;
101
- };
102
- meta: object;
103
- }>;
104
- readonly runMerge: import("@trpc/server").TRPCMutationProcedure<{
105
- input: {
106
- workflowId: string;
107
- provider?: string | undefined;
108
- model?: string | undefined;
109
- };
110
- output: {
111
- readonly success: true;
112
- };
113
- meta: object;
114
- }>;
115
- readonly runCleanup: import("@trpc/server").TRPCMutationProcedure<{
116
- input: {
117
- workflowId: string;
118
- };
119
- output: {
120
- readonly success: true;
121
- };
122
- meta: object;
123
- }>;
124
- readonly pauseWorkflow: import("@trpc/server").TRPCMutationProcedure<{
125
- input: {
126
- workflowId: string;
127
- };
128
- output: {
129
- readonly success: true;
130
- };
131
- meta: object;
132
- }>;
133
- readonly resetWorkflow: import("@trpc/server").TRPCMutationProcedure<{
134
- input: {
135
- workflowId: string;
136
- force?: boolean | undefined;
137
- deleteWorktree?: boolean | undefined;
138
- };
139
- output: {
140
- success: true;
141
- };
142
- meta: object;
143
- }>;
144
- readonly approveWorkflow: import("@trpc/server").TRPCMutationProcedure<{
145
- input: {
146
- workflowId: string;
147
- comments?: string | undefined;
148
- };
149
- output: {
150
- readonly success: true;
151
- };
152
- meta: object;
153
- }>;
154
- readonly rejectWorkflow: import("@trpc/server").TRPCMutationProcedure<{
155
- input: {
156
- workflowId: string;
157
- feedback: string;
158
- };
159
- output: {
160
- readonly success: true;
161
- };
162
- meta: object;
163
- }>;
164
- readonly onTaskWorkflowEvents: import("@trpc/server").TRPCSubscriptionProcedure<{
165
- input: {
166
- taskId?: string | undefined;
167
- } | undefined;
168
- output: AsyncIterable<{
169
- type: "started" | "phase" | "completed" | "failed" | "updated" | "deleted";
170
- workflowId: string;
171
- phase?: string;
172
- workflow?: any;
173
- executionId?: string;
174
- }, void, any>;
175
- meta: object;
176
- }>;
177
- readonly getWorkflow: import("@trpc/server").TRPCQueryProcedure<{
178
- input: {
179
- workflowId: string;
180
- };
181
- output: import("../../types/index.js").VibingExecution | null;
182
- meta: object;
183
- }>;
184
- readonly getWorkflowsByTaskId: import("@trpc/server").TRPCQueryProcedure<{
185
- input: {
186
- taskId: string;
187
- };
188
- output: import("../../types/index.js").VibingExecution[];
189
- meta: object;
190
- }>;
191
- readonly getLatestWorkflowByTaskId: import("@trpc/server").TRPCQueryProcedure<{
192
- input: {
193
- taskId: string;
194
- };
195
- output: import("../../types/index.js").VibingExecution | null;
196
- meta: object;
197
- }>;
198
- readonly aiReviewCode: import("@trpc/server").TRPCMutationProcedure<{
199
- input: {
200
- taskId: string;
201
- provider?: string | undefined;
202
- workflowId?: string | undefined;
203
- model?: string | undefined;
204
- reviewContext?: string | undefined;
205
- };
206
- output: {
207
- executionId: string;
208
- reviewSummary: string;
209
- recommendations: string[];
210
- qualityScore: number;
211
- };
212
- meta: object;
213
- }>;
214
- readonly approveAndContinueReview: import("@trpc/server").TRPCMutationProcedure<{
215
- input: {
216
- workflowId: string;
217
- };
218
- output: {
219
- success: true;
220
- };
221
- meta: object;
222
- }>;
223
- readonly markCompleted: import("@trpc/server").TRPCMutationProcedure<{
224
- input: {
225
- workflowId: string;
226
- };
227
- output: {
228
- success: true;
229
- };
230
- meta: object;
231
- }>;
232
- readonly checkWorktreeStatus: import("@trpc/server").TRPCMutationProcedure<{
233
- input: {
234
- workflowId: string;
235
- };
236
- output: {
237
- clean: boolean;
238
- uncommittedFiles: string[];
239
- worktreePath?: string;
240
- };
241
- meta: object;
242
- }>;
243
- readonly rerunImplementation: import("@trpc/server").TRPCMutationProcedure<{
244
- input: {
245
- workflowId: string;
246
- provider?: string | undefined;
247
- model?: string | undefined;
248
- feedback?: string | undefined;
249
- };
250
- output: {
251
- success: true;
252
- };
253
- meta: object;
254
- }>;
255
- readonly skipToNextPhase: import("@trpc/server").TRPCMutationProcedure<{
256
- input: {
257
- workflowId: string;
258
- };
259
- output: {
260
- success: true;
261
- };
262
- meta: object;
263
- }>;
264
- readonly rerunFromPhase: import("@trpc/server").TRPCMutationProcedure<{
265
- input: {
266
- workflowId: string;
267
- phase: "completed" | "failed" | "draft" | "awaiting-review" | "approved" | "merged" | "paused" | "implementing" | "validating" | "ai-reviewing" | "merging" | "cleaning";
268
- };
269
- output: {
270
- success: true;
271
- };
272
- meta: object;
273
- }>;
274
- };
275
- export {};
@@ -1,311 +0,0 @@
1
- import { z } from 'zod';
2
- import { on, EventEmitter } from 'events';
3
- import { publicProcedure } from '../trpc.js';
4
- import { TRPCError } from '@trpc/server';
5
- export function buildWorkflowRoutes({ vibingOrchestrator }) {
6
- const OperationOverrideSchema = z.object({
7
- provider: z.string().optional(),
8
- model: z.string().optional(),
9
- });
10
- const WorkflowAIRoutingOverrides = z
11
- .object({
12
- execute_task: OperationOverrideSchema.optional(),
13
- quality_checks: OperationOverrideSchema.optional(),
14
- ai_codereview: OperationOverrideSchema.optional(),
15
- ai_merge: OperationOverrideSchema.optional(),
16
- improve_task: OperationOverrideSchema.optional(),
17
- })
18
- .partial();
19
- const WorkflowConfig = z.object({
20
- autoQualityChecks: z.boolean().optional(),
21
- requireHumanApproval: z.boolean().optional(),
22
- stepByStepMode: z.boolean().optional(),
23
- autoCommit: z.boolean().optional(),
24
- createPR: z.boolean().optional(),
25
- autoMerge: z.boolean().optional(),
26
- aiCodeReview: z.boolean().optional(),
27
- aiRoutingOverrides: WorkflowAIRoutingOverrides.optional(),
28
- });
29
- const WorkflowConfigOpt = WorkflowConfig.optional();
30
- return {
31
- updateWorkflowOptions: publicProcedure
32
- .input(z.object({ workflowId: z.string(), config: WorkflowConfig }))
33
- .mutation(async ({ input }) => {
34
- const orchestrator = vibingOrchestrator;
35
- await orchestrator.updateWorkflowOptions(input.workflowId, input.config);
36
- return { success: true };
37
- }),
38
- startWorkflow: publicProcedure
39
- .input(z.object({ taskId: z.string(), config: WorkflowConfigOpt }))
40
- .mutation(async ({ input }) => {
41
- const orchestrator = vibingOrchestrator;
42
- const workflowId = await orchestrator.startWorkflow(input.taskId, input.config || {});
43
- return { workflowId };
44
- }),
45
- continueWorkflow: publicProcedure
46
- .input(z.object({ workflowId: z.string() }))
47
- .mutation(async ({ input }) => {
48
- try {
49
- const orchestrator = vibingOrchestrator;
50
- await orchestrator.continueWorkflow(input.workflowId);
51
- return { success: true };
52
- }
53
- catch (err) {
54
- const msg = err instanceof Error ? err.message : String(err);
55
- console.error('continueWorkflow failed:', msg);
56
- throw new TRPCError({ code: 'BAD_REQUEST', message: msg });
57
- }
58
- }),
59
- runValidation: publicProcedure
60
- .input(z.object({ workflowId: z.string() }))
61
- .mutation(async ({ input }) => {
62
- const orchestrator = vibingOrchestrator;
63
- await orchestrator.runValidation(input.workflowId);
64
- return { success: true };
65
- }),
66
- runMerge: publicProcedure
67
- .input(z.object({
68
- workflowId: z.string(),
69
- provider: z.string().optional(),
70
- model: z.string().optional(),
71
- }))
72
- .mutation(async ({ input }) => {
73
- const orchestrator = vibingOrchestrator;
74
- await orchestrator.runMerge(input.workflowId, {
75
- provider: input.provider,
76
- model: input.model,
77
- });
78
- return { success: true };
79
- }),
80
- runCleanup: publicProcedure
81
- .input(z.object({ workflowId: z.string() }))
82
- .mutation(async ({ input }) => {
83
- const orchestrator = vibingOrchestrator;
84
- await orchestrator.runCleanup(input.workflowId);
85
- return { success: true };
86
- }),
87
- pauseWorkflow: publicProcedure
88
- .input(z.object({ workflowId: z.string() }))
89
- .mutation(async ({ input }) => {
90
- const orchestrator = vibingOrchestrator;
91
- await orchestrator.pauseWorkflow(input.workflowId);
92
- return { success: true };
93
- }),
94
- resetWorkflow: publicProcedure
95
- .input(z.object({
96
- workflowId: z.string(),
97
- deleteWorktree: z.boolean().optional(),
98
- force: z.boolean().optional(),
99
- }))
100
- .mutation(async ({ input }) => {
101
- const orchestrator = vibingOrchestrator;
102
- await orchestrator.resetWorkflow(input.workflowId, {
103
- deleteWorktree: input.deleteWorktree,
104
- force: input.force,
105
- });
106
- return { success: true };
107
- }),
108
- approveWorkflow: publicProcedure
109
- .input(z.object({ workflowId: z.string(), comments: z.string().optional() }))
110
- .mutation(async ({ input }) => {
111
- const orchestrator = vibingOrchestrator;
112
- await orchestrator.approveWorkflow(input.workflowId);
113
- return { success: true };
114
- }),
115
- rejectWorkflow: publicProcedure
116
- .input(z.object({ workflowId: z.string(), feedback: z.string() }))
117
- .mutation(async ({ input }) => {
118
- const orchestrator = vibingOrchestrator;
119
- await orchestrator.rejectWorkflow(input.workflowId, input.feedback);
120
- return { success: true };
121
- }),
122
- onTaskWorkflowEvents: publicProcedure
123
- .input(z.object({ taskId: z.string().optional() }).optional())
124
- .subscription(async function* (opts) {
125
- const input = opts.input;
126
- const orchestrator = vibingOrchestrator;
127
- const proxy = new EventEmitter();
128
- const handleStarted = (workflow) => {
129
- if (!input?.taskId || workflow.taskId === input.taskId)
130
- proxy.emit('data', { type: 'started', workflowId: workflow.id, workflow });
131
- };
132
- const handlePhaseChanged = (data) => {
133
- if (!input?.taskId || data.workflow?.taskId === input.taskId) {
134
- // Dedupe terminal phases: completed/failed are emitted via dedicated events
135
- if (data.newPhase !== 'completed' && data.newPhase !== 'failed') {
136
- proxy.emit('data', {
137
- type: 'phase',
138
- workflowId: data.workflowId,
139
- phase: data.newPhase,
140
- workflow: data.workflow,
141
- });
142
- }
143
- }
144
- };
145
- const handleCompleted = (workflow) => {
146
- if (!input?.taskId || workflow.taskId === input.taskId)
147
- proxy.emit('data', { type: 'completed', workflowId: workflow.id, workflow });
148
- };
149
- const handleFailed = (workflow) => {
150
- if (!input?.taskId || workflow.taskId === input.taskId)
151
- proxy.emit('data', { type: 'failed', workflowId: workflow.id, workflow });
152
- };
153
- // New: forward execution start events at the task level
154
- const handleExecStarted = (data) => {
155
- if (!input?.taskId || data?.workflow?.taskId === input.taskId) {
156
- proxy.emit('data', {
157
- type: 'phase',
158
- workflowId: data.workflowId,
159
- phase: data.phase || data.workflow?.phase,
160
- workflow: data.workflow,
161
- executionId: data.executionId,
162
- });
163
- }
164
- };
165
- // Forward additional workflow lifecycle/snapshot events
166
- const handleUpdated = (workflow) => {
167
- if (!input?.taskId || workflow.taskId === input.taskId)
168
- proxy.emit('data', { type: 'updated', workflowId: workflow.id, workflow });
169
- };
170
- const handleDeleted = (info) => {
171
- if (!input?.taskId || info?.taskId === input.taskId)
172
- proxy.emit('data', { type: 'deleted', workflowId: info.workflowId });
173
- };
174
- const handlePaused = (workflow) => {
175
- if (!input?.taskId || workflow.taskId === input.taskId)
176
- proxy.emit('data', { type: 'updated', workflowId: workflow.id, workflow });
177
- };
178
- const handleOptionsUpdated = (workflow) => {
179
- if (!input?.taskId || workflow.taskId === input.taskId)
180
- proxy.emit('data', { type: 'updated', workflowId: workflow.id, workflow });
181
- };
182
- orchestrator.on('workflowStarted', handleStarted);
183
- orchestrator.on('workflowPhaseChanged', handlePhaseChanged);
184
- orchestrator.on('workflowCompleted', handleCompleted);
185
- orchestrator.on('workflowFailed', handleFailed);
186
- orchestrator.on('workflowExecutionStarted', handleExecStarted);
187
- orchestrator.on('workflowUpdated', handleUpdated);
188
- orchestrator.on('workflowDeleted', handleDeleted);
189
- orchestrator.on('workflowPaused', handlePaused);
190
- orchestrator.on('workflowOptionsUpdated', handleOptionsUpdated);
191
- try {
192
- for await (const [payload] of on(proxy, 'data', { signal: opts.signal })) {
193
- yield payload;
194
- }
195
- }
196
- finally {
197
- orchestrator.off('workflowStarted', handleStarted);
198
- orchestrator.off('workflowPhaseChanged', handlePhaseChanged);
199
- orchestrator.off('workflowCompleted', handleCompleted);
200
- orchestrator.off('workflowFailed', handleFailed);
201
- orchestrator.off('workflowExecutionStarted', handleExecStarted);
202
- orchestrator.off('workflowUpdated', handleUpdated);
203
- orchestrator.off('workflowDeleted', handleDeleted);
204
- orchestrator.off('workflowPaused', handlePaused);
205
- orchestrator.off('workflowOptionsUpdated', handleOptionsUpdated);
206
- }
207
- }),
208
- // Additional workflow helpers used by UI
209
- getWorkflow: publicProcedure
210
- .input(z.object({ workflowId: z.string() }))
211
- .query(async ({ input }) => {
212
- const orchestrator = vibingOrchestrator;
213
- return orchestrator.getWorkflow(input.workflowId);
214
- }),
215
- getWorkflowsByTaskId: publicProcedure
216
- .input(z.object({ taskId: z.string() }))
217
- .query(async ({ input }) => {
218
- const orchestrator = vibingOrchestrator;
219
- return orchestrator.getTaskWorkflows(input.taskId);
220
- }),
221
- getLatestWorkflowByTaskId: publicProcedure
222
- .input(z.object({ taskId: z.string() }))
223
- .query(async ({ input }) => {
224
- const orchestrator = vibingOrchestrator;
225
- return orchestrator.getLatestWorkflowByTask(input.taskId);
226
- }),
227
- aiReviewCode: publicProcedure
228
- .input(z.object({
229
- taskId: z.string(),
230
- workflowId: z.string().optional(),
231
- reviewContext: z.string().optional(),
232
- provider: z.string().optional(),
233
- model: z.string().optional(),
234
- }))
235
- .mutation(async ({ input }) => {
236
- const orchestrator = vibingOrchestrator;
237
- const overrides = input.provider || input.model
238
- ? { provider: input.provider, model: input.model }
239
- : undefined;
240
- return await orchestrator.aiReviewCode(input.taskId, input.reviewContext, {
241
- workflowId: input.workflowId,
242
- overrides,
243
- });
244
- }),
245
- approveAndContinueReview: publicProcedure
246
- .input(z.object({ workflowId: z.string() }))
247
- .mutation(async ({ input }) => {
248
- const orchestrator = vibingOrchestrator;
249
- await orchestrator.approveAndContinueReview(input.workflowId);
250
- return { success: true };
251
- }),
252
- markCompleted: publicProcedure
253
- .input(z.object({ workflowId: z.string() }))
254
- .mutation(async ({ input }) => {
255
- const orchestrator = vibingOrchestrator;
256
- await orchestrator.markWorkflowCompleted(input.workflowId);
257
- return { success: true };
258
- }),
259
- checkWorktreeStatus: publicProcedure
260
- .input(z.object({ workflowId: z.string() }))
261
- .mutation(async ({ input }) => {
262
- const orchestrator = vibingOrchestrator;
263
- return await orchestrator.checkWorktreeStatus(input.workflowId);
264
- }),
265
- rerunImplementation: publicProcedure
266
- .input(z.object({
267
- workflowId: z.string(),
268
- feedback: z.string().optional(),
269
- provider: z.string().optional(),
270
- model: z.string().optional(),
271
- }))
272
- .mutation(async ({ input }) => {
273
- const orchestrator = vibingOrchestrator;
274
- await orchestrator.rerunImplementation(input.workflowId, input.feedback, {
275
- provider: input.provider,
276
- model: input.model,
277
- });
278
- return { success: true };
279
- }),
280
- skipToNextPhase: publicProcedure
281
- .input(z.object({ workflowId: z.string() }))
282
- .mutation(async ({ input }) => {
283
- const orchestrator = vibingOrchestrator;
284
- await orchestrator.skipToNextPhase(input.workflowId);
285
- return { success: true };
286
- }),
287
- rerunFromPhase: publicProcedure
288
- .input(z.object({
289
- workflowId: z.string(),
290
- phase: z.enum([
291
- 'draft',
292
- 'implementing',
293
- 'validating',
294
- 'ai-reviewing',
295
- 'awaiting-review',
296
- 'paused',
297
- 'approved',
298
- 'merging',
299
- 'merged',
300
- 'cleaning',
301
- 'completed',
302
- 'failed',
303
- ]),
304
- }))
305
- .mutation(async ({ input }) => {
306
- const orchestrator = vibingOrchestrator;
307
- await orchestrator.rerunPhase(input.workflowId, input.phase);
308
- return { success: true };
309
- }),
310
- };
311
- }
@@ -1,101 +0,0 @@
1
- import type { VibingOrchestrator } from '../../workflows/vibing-orchestrator.js';
2
- type Deps = {
3
- vibingOrchestrator: VibingOrchestrator;
4
- };
5
- export declare function buildWorktreeRoutes({ vibingOrchestrator }: Deps): {
6
- readonly listWorktrees: import("@trpc/server").TRPCQueryProcedure<{
7
- input: void;
8
- output: (import("../../types/index.js").WorktreeInfo & {
9
- isConnectedToTask: boolean;
10
- })[];
11
- meta: object;
12
- }>;
13
- readonly syncWorktreeState: import("@trpc/server").TRPCMutationProcedure<{
14
- input: void;
15
- output: {
16
- readonly success: true;
17
- readonly message: "Worktree state synchronized";
18
- };
19
- meta: object;
20
- }>;
21
- readonly getWorktreeInfo: import("@trpc/server").TRPCQueryProcedure<{
22
- input: {
23
- taskId: string;
24
- };
25
- output: any;
26
- meta: object;
27
- }>;
28
- readonly createWorktree: import("@trpc/server").TRPCMutationProcedure<{
29
- input: {
30
- taskId: string;
31
- };
32
- output: any;
33
- meta: object;
34
- }>;
35
- readonly deleteWorktree: import("@trpc/server").TRPCMutationProcedure<{
36
- input: {
37
- taskId: string;
38
- force?: boolean | undefined;
39
- };
40
- output: {
41
- readonly success: true;
42
- };
43
- meta: object;
44
- }>;
45
- readonly openInEditor: import("@trpc/server").TRPCMutationProcedure<{
46
- input: {
47
- worktreePath: string;
48
- };
49
- output: {
50
- readonly success: true;
51
- };
52
- meta: object;
53
- }>;
54
- readonly openInTerminal: import("@trpc/server").TRPCMutationProcedure<{
55
- input: {
56
- worktreePath: string;
57
- };
58
- output: {
59
- readonly success: true;
60
- };
61
- meta: object;
62
- }>;
63
- readonly createWorktreePR: import("@trpc/server").TRPCMutationProcedure<{
64
- input: {
65
- taskId: string;
66
- baseBranch?: string | undefined;
67
- };
68
- output: {
69
- success: boolean;
70
- pullRequest?: any;
71
- error?: string;
72
- };
73
- meta: object;
74
- }>;
75
- readonly createPullRequest: import("@trpc/server").TRPCMutationProcedure<{
76
- input: {
77
- taskId: string;
78
- baseBranch?: string | undefined;
79
- };
80
- output: {
81
- success: boolean;
82
- pullRequest?: any;
83
- error?: string;
84
- };
85
- meta: object;
86
- }>;
87
- readonly cleanupWorktree: import("@trpc/server").TRPCMutationProcedure<{
88
- input: {
89
- isConnectedToTask: boolean;
90
- taskId?: string | undefined;
91
- force?: boolean | undefined;
92
- worktreePath?: string | undefined;
93
- branchName?: string | undefined;
94
- };
95
- output: {
96
- readonly success: true;
97
- };
98
- meta: object;
99
- }>;
100
- };
101
- export {};