vibeman 0.0.3 → 0.0.5

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 (184) hide show
  1. package/dist/index.js +3 -3
  2. package/dist/runtime/api/.tsbuildinfo +1 -1
  3. package/dist/runtime/api/agent/agent-service.d.ts +4 -0
  4. package/dist/runtime/api/agent/agent-service.js +62 -3
  5. package/dist/runtime/api/agent/ai-providers/amp-cli-provider.d.ts +38 -0
  6. package/dist/runtime/api/agent/ai-providers/amp-cli-provider.js +268 -0
  7. package/dist/runtime/api/agent/ai-providers/codex-cli-provider.js +40 -12
  8. package/dist/runtime/api/agent/ai-providers/gemini-cli-provider.d.ts +24 -0
  9. package/dist/runtime/api/agent/ai-providers/gemini-cli-provider.js +291 -0
  10. package/dist/runtime/api/agent/ai-providers/index.d.ts +3 -3
  11. package/dist/runtime/api/agent/ai-providers/index.js +3 -1
  12. package/dist/runtime/api/agent/ai-providers/types.d.ts +5 -2
  13. package/dist/runtime/api/agent/amp-cli-provider.test.d.ts +1 -0
  14. package/dist/runtime/api/agent/amp-cli-provider.test.js +99 -0
  15. package/dist/runtime/api/agent/codex-cli-provider.test.js +10 -8
  16. package/dist/runtime/api/agent/prompt-service.js +108 -105
  17. package/dist/runtime/api/agent/prompt-service.test.js +35 -0
  18. package/dist/runtime/api/agent/routing-policy.d.ts +2 -2
  19. package/dist/runtime/api/agent/routing-policy.test.js +4 -4
  20. package/dist/runtime/api/api/routers/ai.d.ts +3 -3
  21. package/dist/runtime/api/api/routers/executions.d.ts +2 -7
  22. package/dist/runtime/api/api/routers/executions.js +2 -2
  23. package/dist/runtime/api/api/routers/provider-config.d.ts +34 -0
  24. package/dist/runtime/api/api/routers/settings.d.ts +19 -0
  25. package/dist/runtime/api/api/routers/settings.js +16 -0
  26. package/dist/runtime/api/api/routers/tasks.d.ts +9 -9
  27. package/dist/runtime/api/api/routers/workflows.d.ts +12 -12
  28. package/dist/runtime/api/api/routers/worktrees.d.ts +2 -2
  29. package/dist/runtime/api/api/trpc.d.ts +16 -16
  30. package/dist/runtime/api/lib/local-config.d.ts +94 -4
  31. package/dist/runtime/api/lib/local-config.js +16 -0
  32. package/dist/runtime/api/lib/provider-detection.d.ts +2 -0
  33. package/dist/runtime/api/lib/provider-detection.js +83 -1
  34. package/dist/runtime/api/lib/server/vibeman-info.d.ts +5 -0
  35. package/dist/runtime/api/lib/server/vibeman-info.js +85 -0
  36. package/dist/runtime/api/lib/trpc/server.d.ts +63 -33
  37. package/dist/runtime/api/persistence/execution-log-persistence.d.ts +1 -1
  38. package/dist/runtime/api/persistence/execution-log-persistence.js +19 -3
  39. package/dist/runtime/api/router.d.ts +63 -33
  40. package/dist/runtime/api/settings-service.js +31 -14
  41. package/dist/runtime/api/tasks/task-file-parser.d.ts +1 -0
  42. package/dist/runtime/api/tasks/task-file-parser.js +20 -1
  43. package/dist/runtime/api/tasks/task-updater.d.ts +62 -0
  44. package/dist/runtime/api/tasks/task-updater.js +260 -0
  45. package/dist/runtime/api/tasks/task-updater.test.d.ts +1 -0
  46. package/dist/runtime/api/tasks/task-updater.test.js +303 -0
  47. package/dist/runtime/api/types/index.d.ts +1 -1
  48. package/dist/runtime/api/types/settings.d.ts +17 -6
  49. package/dist/runtime/api/vcs/git-service.d.ts +9 -0
  50. package/dist/runtime/api/vcs/git-service.js +23 -0
  51. package/dist/runtime/api/vcs/worktree-service.d.ts +1 -1
  52. package/dist/runtime/api/vcs/worktree-service.js +22 -10
  53. package/dist/runtime/api/workflows/quality-pipeline.js +2 -1
  54. package/dist/runtime/api/workflows/vibing-orchestrator.d.ts +93 -5
  55. package/dist/runtime/api/workflows/vibing-orchestrator.js +774 -203
  56. package/dist/runtime/api/workflows/workflow-effects.d.ts +45 -0
  57. package/dist/runtime/api/workflows/workflow-effects.js +49 -0
  58. package/dist/runtime/api/workflows/workflow-reconciler.d.ts +65 -0
  59. package/dist/runtime/api/workflows/workflow-reconciler.js +226 -0
  60. package/dist/runtime/api/workflows/workflow-reducer.d.ts +26 -0
  61. package/dist/runtime/api/workflows/workflow-reducer.js +288 -0
  62. package/dist/runtime/api/workflows/workflow-reducer.test.d.ts +1 -0
  63. package/dist/runtime/api/workflows/workflow-reducer.test.js +247 -0
  64. package/dist/runtime/api/workflows/workflow-schema.d.ts +546 -0
  65. package/dist/runtime/api/workflows/workflow-schema.js +256 -0
  66. package/dist/runtime/web/.next/BUILD_ID +1 -1
  67. package/dist/runtime/web/.next/app-build-manifest.json +50 -50
  68. package/dist/runtime/web/.next/app-path-routes-manifest.json +1 -1
  69. package/dist/runtime/web/.next/build-manifest.json +14 -14
  70. package/dist/runtime/web/.next/prerender-manifest.json +3 -3
  71. package/dist/runtime/web/.next/react-loadable-manifest.json +2 -33
  72. package/dist/runtime/web/.next/required-server-files.json +5 -5
  73. package/dist/runtime/web/.next/server/app/.vibeman/assets/images/[...path]/route.js +1 -1
  74. package/dist/runtime/web/.next/server/app/.vibeman/assets/images/[...path]/route.js.nft.json +1 -1
  75. package/dist/runtime/web/.next/server/app/.vibeman/assets/images/[...path]/route_client-reference-manifest.js +1 -1
  76. package/dist/runtime/web/.next/server/app/_not-found/page.js +2 -2
  77. package/dist/runtime/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  78. package/dist/runtime/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  79. package/dist/runtime/web/.next/server/app/_not-found.html +2 -2
  80. package/dist/runtime/web/.next/server/app/_not-found.rsc +12 -12
  81. package/dist/runtime/web/.next/server/app/api/health/route.js +1 -1
  82. package/dist/runtime/web/.next/server/app/api/health/route.js.nft.json +1 -1
  83. package/dist/runtime/web/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
  84. package/dist/runtime/web/.next/server/app/api/images/[...path]/route.js +1 -1
  85. package/dist/runtime/web/.next/server/app/api/images/[...path]/route.js.nft.json +1 -1
  86. package/dist/runtime/web/.next/server/app/api/images/[...path]/route_client-reference-manifest.js +1 -1
  87. package/dist/runtime/web/.next/server/app/api/upload/route.js +1 -1
  88. package/dist/runtime/web/.next/server/app/api/upload/route.js.nft.json +1 -1
  89. package/dist/runtime/web/.next/server/app/api/upload/route_client-reference-manifest.js +1 -1
  90. package/dist/runtime/web/.next/server/app/index.html +2 -2
  91. package/dist/runtime/web/.next/server/app/index.rsc +15 -15
  92. package/dist/runtime/web/.next/server/app/page.js +27 -62
  93. package/dist/runtime/web/.next/server/app/page.js.nft.json +1 -1
  94. package/dist/runtime/web/.next/server/app/page_client-reference-manifest.js +1 -1
  95. package/dist/runtime/web/.next/server/app-paths-manifest.json +1 -1
  96. package/dist/runtime/web/.next/server/chunks/210.js +1 -0
  97. package/dist/runtime/web/.next/server/chunks/291.js +18 -0
  98. package/dist/runtime/web/.next/server/chunks/552.js +22 -0
  99. package/dist/runtime/web/.next/server/chunks/780.js +1 -0
  100. package/dist/runtime/web/.next/server/chunks/905.js +6 -0
  101. package/dist/runtime/web/.next/server/chunks/98.js +1 -0
  102. package/dist/runtime/web/.next/server/middleware-build-manifest.js +1 -1
  103. package/dist/runtime/web/.next/server/middleware-react-loadable-manifest.js +1 -1
  104. package/dist/runtime/web/.next/server/pages/404.html +2 -2
  105. package/dist/runtime/web/.next/server/pages/500.html +1 -1
  106. package/dist/runtime/web/.next/server/pages/_app.js +1 -1
  107. package/dist/runtime/web/.next/server/pages/_app.js.nft.json +1 -1
  108. package/dist/runtime/web/.next/server/pages/_document.js +1 -1
  109. package/dist/runtime/web/.next/server/pages/_document.js.nft.json +1 -1
  110. package/dist/runtime/web/.next/server/pages/_error.js +9 -9
  111. package/dist/runtime/web/.next/server/pages/_error.js.nft.json +1 -1
  112. package/dist/runtime/web/.next/server/pages-manifest.json +1 -1
  113. package/dist/runtime/web/.next/server/server-reference-manifest.json +1 -1
  114. package/dist/runtime/web/.next/server/webpack-runtime.js +1 -1
  115. package/dist/runtime/web/.next/static/{5_15u1WQCxN1_eHZpldCv → LJFZk_8tvKFN_Ee4HqUuM}/_buildManifest.js +1 -1
  116. package/dist/runtime/web/.next/static/chunks/05c91ade-7d09b2b280adffd1.js +1 -0
  117. package/dist/runtime/web/.next/static/chunks/201-51bef3fa8c832e2e.js +1 -0
  118. package/dist/runtime/web/.next/static/chunks/524-89747ed9b0294f8a.js +1 -0
  119. package/dist/runtime/web/.next/static/chunks/554-8bec6e9cca6acc67.js +1 -0
  120. package/dist/runtime/web/.next/static/chunks/764.86e9503a69d45a85.js +1 -0
  121. package/dist/runtime/web/.next/static/chunks/{87c73c54-09e1ba5c70e60a51.js → 7ab4dc20-239138e0ae7af24a.js} +1 -1
  122. package/dist/runtime/web/.next/static/chunks/905-342391e3d3a3678f.js +20 -0
  123. package/dist/runtime/web/.next/static/chunks/a8a5ce16-4edea7df2d9b544a.js +79 -0
  124. package/dist/runtime/web/.next/static/chunks/{8bb4d8db-3e2aa02b0a2384b9.js → ad74d572-4c1b162e2c15acaa.js} +1 -1
  125. package/dist/runtime/web/.next/static/chunks/app/.vibeman/assets/images/[...path]/route-7b752a8641f96c1f.js +1 -0
  126. package/dist/runtime/web/.next/static/chunks/app/_not-found/page-34e66b251c2b5044.js +1 -0
  127. package/dist/runtime/web/.next/static/chunks/app/api/health/route-7b752a8641f96c1f.js +1 -0
  128. package/dist/runtime/web/.next/static/chunks/app/api/images/[...path]/route-7b752a8641f96c1f.js +1 -0
  129. package/dist/runtime/web/.next/static/chunks/app/api/upload/route-7b752a8641f96c1f.js +1 -0
  130. package/dist/runtime/web/.next/static/chunks/app/layout-df9ac93cb02b2385.js +1 -0
  131. package/dist/runtime/web/.next/static/chunks/app/page-6610743f7de5f92a.js +1 -0
  132. package/dist/runtime/web/.next/static/chunks/c25e0690-e9b798b8de667da1.js +1 -0
  133. package/dist/runtime/web/.next/static/chunks/framework-57157ec4d37f64aa.js +1 -0
  134. package/dist/runtime/web/.next/static/chunks/main-app-156cc0c60371bd78.js +1 -0
  135. package/dist/runtime/web/.next/static/chunks/main-df25d367c47b1fec.js +1 -0
  136. package/dist/runtime/web/.next/static/chunks/pages/_app-9f629a5e1131d19f.js +1 -0
  137. package/dist/runtime/web/.next/static/chunks/pages/_error-9238238274c7efcd.js +1 -0
  138. package/dist/runtime/web/.next/static/chunks/webpack-cd50e39b423d1808.js +1 -0
  139. package/dist/runtime/web/.next/static/css/4fbf378a264bd4ea.css +1 -0
  140. package/dist/runtime/web/package.json +8 -8
  141. package/dist/runtime/web/server.js +1 -1
  142. package/dist/tsconfig.tsbuildinfo +1 -1
  143. package/package.json +3 -37
  144. package/dist/runtime/api/lib/trpc/client.d.ts +0 -1
  145. package/dist/runtime/api/lib/trpc/client.js +0 -5
  146. package/dist/runtime/web/.next/server/chunks/217.js +0 -1
  147. package/dist/runtime/web/.next/server/chunks/383.js +0 -6
  148. package/dist/runtime/web/.next/server/chunks/458.js +0 -1
  149. package/dist/runtime/web/.next/server/chunks/576.js +0 -18
  150. package/dist/runtime/web/.next/server/chunks/635.js +0 -22
  151. package/dist/runtime/web/.next/server/chunks/761.js +0 -1
  152. package/dist/runtime/web/.next/server/chunks/777.js +0 -3
  153. package/dist/runtime/web/.next/server/chunks/825.js +0 -1
  154. package/dist/runtime/web/.next/server/chunks/838.js +0 -1
  155. package/dist/runtime/web/.next/server/chunks/973.js +0 -15
  156. package/dist/runtime/web/.next/static/chunks/18-15c10d3288afef2e.js +0 -1
  157. package/dist/runtime/web/.next/static/chunks/1c0ca389.537bbe362e3ffbd9.js +0 -3
  158. package/dist/runtime/web/.next/static/chunks/22747d63-ad5da0c19f4cfe41.js +0 -71
  159. package/dist/runtime/web/.next/static/chunks/355.056c2645878a799a.js +0 -1
  160. package/dist/runtime/web/.next/static/chunks/420.a5ccf151c9e2b2f1.js +0 -1
  161. package/dist/runtime/web/.next/static/chunks/439.1be0c6242fd248d5.js +0 -15
  162. package/dist/runtime/web/.next/static/chunks/440.c52e7c0f797e22b2.js +0 -1
  163. package/dist/runtime/web/.next/static/chunks/575-e2478287c27da87b.js +0 -1
  164. package/dist/runtime/web/.next/static/chunks/691.920d88c115087314.js +0 -1
  165. package/dist/runtime/web/.next/static/chunks/765-e838910065b50c3d.js +0 -1
  166. package/dist/runtime/web/.next/static/chunks/823-6f371a6e829adbba.js +0 -63
  167. package/dist/runtime/web/.next/static/chunks/891cff7f.0f71fc028f87e683.js +0 -1
  168. package/dist/runtime/web/.next/static/chunks/9af238c7-271a911d4e99ab18.js +0 -1
  169. package/dist/runtime/web/.next/static/chunks/app/.vibeman/assets/images/[...path]/route-751c9265a65409e5.js +0 -1
  170. package/dist/runtime/web/.next/static/chunks/app/_not-found/page-1cb74d1cba27d0ab.js +0 -1
  171. package/dist/runtime/web/.next/static/chunks/app/api/health/route-751c9265a65409e5.js +0 -1
  172. package/dist/runtime/web/.next/static/chunks/app/api/images/[...path]/route-751c9265a65409e5.js +0 -1
  173. package/dist/runtime/web/.next/static/chunks/app/api/upload/route-751c9265a65409e5.js +0 -1
  174. package/dist/runtime/web/.next/static/chunks/app/layout-8435322f09fd0975.js +0 -1
  175. package/dist/runtime/web/.next/static/chunks/app/page-9fe7d75095b4ccec.js +0 -1
  176. package/dist/runtime/web/.next/static/chunks/cac567b0-5b77dd12911823cd.js +0 -1
  177. package/dist/runtime/web/.next/static/chunks/framework-2518f1345b5b2806.js +0 -1
  178. package/dist/runtime/web/.next/static/chunks/main-17665e5e39de9a8a.js +0 -1
  179. package/dist/runtime/web/.next/static/chunks/main-app-c0b0f5ba4f7f9d75.js +0 -1
  180. package/dist/runtime/web/.next/static/chunks/pages/_app-d6f6b3bbc3d81ee1.js +0 -1
  181. package/dist/runtime/web/.next/static/chunks/pages/_error-75a96cf1997cc3b9.js +0 -1
  182. package/dist/runtime/web/.next/static/chunks/webpack-c8de37305b4635cf.js +0 -1
  183. package/dist/runtime/web/.next/static/css/08c950681f1a9a92.css +0 -1
  184. /package/dist/runtime/web/.next/static/{5_15u1WQCxN1_eHZpldCv → LJFZk_8tvKFN_Ee4HqUuM}/_ssgManifest.js +0 -0
@@ -0,0 +1,546 @@
1
+ import { z } from 'zod';
2
+ export declare const WorkflowPhaseSchema: z.ZodEnum<["draft", "implementing", "validating", "approved", "merging", "done"]>;
3
+ export type WorkflowPhase = z.infer<typeof WorkflowPhaseSchema>;
4
+ export declare const TerminalStatusSchema: z.ZodEnum<["failed", "paused"]>;
5
+ export type TerminalStatus = z.infer<typeof TerminalStatusSchema>;
6
+ export declare const WorkflowStatusSchema: z.ZodUnion<[z.ZodEnum<["draft", "implementing", "validating", "approved", "merging", "done"]>, z.ZodEnum<["failed", "paused"]>]>;
7
+ export type WorkflowStatus = z.infer<typeof WorkflowStatusSchema>;
8
+ export declare const QualityResultsSchema: z.ZodObject<{
9
+ overall: z.ZodBoolean;
10
+ timestamp: z.ZodString;
11
+ details: z.ZodRecord<z.ZodString, z.ZodBoolean>;
12
+ outputs: z.ZodRecord<z.ZodString, z.ZodString>;
13
+ }, "strip", z.ZodTypeAny, {
14
+ outputs: Record<string, string>;
15
+ overall: boolean;
16
+ timestamp: string;
17
+ details: Record<string, boolean>;
18
+ }, {
19
+ outputs: Record<string, string>;
20
+ overall: boolean;
21
+ timestamp: string;
22
+ details: Record<string, boolean>;
23
+ }>;
24
+ export type QualityResults = z.infer<typeof QualityResultsSchema>;
25
+ export declare const AIReviewResultSchema: z.ZodObject<{
26
+ executionId: z.ZodString;
27
+ reviewSummary: z.ZodString;
28
+ recommendations: z.ZodArray<z.ZodString, "many">;
29
+ qualityScore: z.ZodNumber;
30
+ timestamp: z.ZodOptional<z.ZodString>;
31
+ }, "strip", z.ZodTypeAny, {
32
+ executionId: string;
33
+ reviewSummary: string;
34
+ recommendations: string[];
35
+ qualityScore: number;
36
+ timestamp?: string | undefined;
37
+ }, {
38
+ executionId: string;
39
+ reviewSummary: string;
40
+ recommendations: string[];
41
+ qualityScore: number;
42
+ timestamp?: string | undefined;
43
+ }>;
44
+ export type AIReviewResult = z.infer<typeof AIReviewResultSchema>;
45
+ export declare const WorkflowEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
46
+ type: z.ZodLiteral<"START">;
47
+ }, "strip", z.ZodTypeAny, {
48
+ type: "START";
49
+ }, {
50
+ type: "START";
51
+ }>, z.ZodObject<{
52
+ type: z.ZodLiteral<"PAUSE">;
53
+ }, "strip", z.ZodTypeAny, {
54
+ type: "PAUSE";
55
+ }, {
56
+ type: "PAUSE";
57
+ }>, z.ZodObject<{
58
+ type: z.ZodLiteral<"RESUME">;
59
+ }, "strip", z.ZodTypeAny, {
60
+ type: "RESUME";
61
+ }, {
62
+ type: "RESUME";
63
+ }>, z.ZodObject<{
64
+ type: z.ZodLiteral<"RETRY">;
65
+ }, "strip", z.ZodTypeAny, {
66
+ type: "RETRY";
67
+ }, {
68
+ type: "RETRY";
69
+ }>, z.ZodObject<{
70
+ type: z.ZodLiteral<"IMPL_SUCCESS">;
71
+ executionId: z.ZodOptional<z.ZodString>;
72
+ }, "strip", z.ZodTypeAny, {
73
+ type: "IMPL_SUCCESS";
74
+ executionId?: string | undefined;
75
+ }, {
76
+ type: "IMPL_SUCCESS";
77
+ executionId?: string | undefined;
78
+ }>, z.ZodObject<{
79
+ type: z.ZodLiteral<"IMPL_FAIL">;
80
+ error: z.ZodString;
81
+ canRetry: z.ZodBoolean;
82
+ }, "strip", z.ZodTypeAny, {
83
+ type: "IMPL_FAIL";
84
+ error: string;
85
+ canRetry: boolean;
86
+ }, {
87
+ type: "IMPL_FAIL";
88
+ error: string;
89
+ canRetry: boolean;
90
+ }>, z.ZodObject<{
91
+ type: z.ZodLiteral<"VALID_SUCCESS">;
92
+ results: z.ZodObject<{
93
+ overall: z.ZodBoolean;
94
+ timestamp: z.ZodString;
95
+ details: z.ZodRecord<z.ZodString, z.ZodBoolean>;
96
+ outputs: z.ZodRecord<z.ZodString, z.ZodString>;
97
+ }, "strip", z.ZodTypeAny, {
98
+ outputs: Record<string, string>;
99
+ overall: boolean;
100
+ timestamp: string;
101
+ details: Record<string, boolean>;
102
+ }, {
103
+ outputs: Record<string, string>;
104
+ overall: boolean;
105
+ timestamp: string;
106
+ details: Record<string, boolean>;
107
+ }>;
108
+ }, "strip", z.ZodTypeAny, {
109
+ type: "VALID_SUCCESS";
110
+ results: {
111
+ outputs: Record<string, string>;
112
+ overall: boolean;
113
+ timestamp: string;
114
+ details: Record<string, boolean>;
115
+ };
116
+ }, {
117
+ type: "VALID_SUCCESS";
118
+ results: {
119
+ outputs: Record<string, string>;
120
+ overall: boolean;
121
+ timestamp: string;
122
+ details: Record<string, boolean>;
123
+ };
124
+ }>, z.ZodObject<{
125
+ type: z.ZodLiteral<"VALID_FAIL">;
126
+ error: z.ZodString;
127
+ results: z.ZodOptional<z.ZodObject<{
128
+ overall: z.ZodBoolean;
129
+ timestamp: z.ZodString;
130
+ details: z.ZodRecord<z.ZodString, z.ZodBoolean>;
131
+ outputs: z.ZodRecord<z.ZodString, z.ZodString>;
132
+ }, "strip", z.ZodTypeAny, {
133
+ outputs: Record<string, string>;
134
+ overall: boolean;
135
+ timestamp: string;
136
+ details: Record<string, boolean>;
137
+ }, {
138
+ outputs: Record<string, string>;
139
+ overall: boolean;
140
+ timestamp: string;
141
+ details: Record<string, boolean>;
142
+ }>>;
143
+ }, "strip", z.ZodTypeAny, {
144
+ type: "VALID_FAIL";
145
+ error: string;
146
+ results?: {
147
+ outputs: Record<string, string>;
148
+ overall: boolean;
149
+ timestamp: string;
150
+ details: Record<string, boolean>;
151
+ } | undefined;
152
+ }, {
153
+ type: "VALID_FAIL";
154
+ error: string;
155
+ results?: {
156
+ outputs: Record<string, string>;
157
+ overall: boolean;
158
+ timestamp: string;
159
+ details: Record<string, boolean>;
160
+ } | undefined;
161
+ }>, z.ZodObject<{
162
+ type: z.ZodLiteral<"REVIEW_DONE">;
163
+ result: z.ZodObject<{
164
+ executionId: z.ZodString;
165
+ reviewSummary: z.ZodString;
166
+ recommendations: z.ZodArray<z.ZodString, "many">;
167
+ qualityScore: z.ZodNumber;
168
+ timestamp: z.ZodOptional<z.ZodString>;
169
+ }, "strip", z.ZodTypeAny, {
170
+ executionId: string;
171
+ reviewSummary: string;
172
+ recommendations: string[];
173
+ qualityScore: number;
174
+ timestamp?: string | undefined;
175
+ }, {
176
+ executionId: string;
177
+ reviewSummary: string;
178
+ recommendations: string[];
179
+ qualityScore: number;
180
+ timestamp?: string | undefined;
181
+ }>;
182
+ }, "strip", z.ZodTypeAny, {
183
+ type: "REVIEW_DONE";
184
+ result: {
185
+ executionId: string;
186
+ reviewSummary: string;
187
+ recommendations: string[];
188
+ qualityScore: number;
189
+ timestamp?: string | undefined;
190
+ };
191
+ }, {
192
+ type: "REVIEW_DONE";
193
+ result: {
194
+ executionId: string;
195
+ reviewSummary: string;
196
+ recommendations: string[];
197
+ qualityScore: number;
198
+ timestamp?: string | undefined;
199
+ };
200
+ }>, z.ZodObject<{
201
+ type: z.ZodLiteral<"REVIEW_SKIP">;
202
+ }, "strip", z.ZodTypeAny, {
203
+ type: "REVIEW_SKIP";
204
+ }, {
205
+ type: "REVIEW_SKIP";
206
+ }>, z.ZodObject<{
207
+ type: z.ZodLiteral<"APPROVE">;
208
+ }, "strip", z.ZodTypeAny, {
209
+ type: "APPROVE";
210
+ }, {
211
+ type: "APPROVE";
212
+ }>, z.ZodObject<{
213
+ type: z.ZodLiteral<"REJECT">;
214
+ feedback: z.ZodString;
215
+ }, "strip", z.ZodTypeAny, {
216
+ type: "REJECT";
217
+ feedback: string;
218
+ }, {
219
+ type: "REJECT";
220
+ feedback: string;
221
+ }>, z.ZodObject<{
222
+ type: z.ZodLiteral<"MERGE_SUCCESS">;
223
+ prUrl: z.ZodOptional<z.ZodString>;
224
+ prNumber: z.ZodOptional<z.ZodNumber>;
225
+ }, "strip", z.ZodTypeAny, {
226
+ type: "MERGE_SUCCESS";
227
+ prUrl?: string | undefined;
228
+ prNumber?: number | undefined;
229
+ }, {
230
+ type: "MERGE_SUCCESS";
231
+ prUrl?: string | undefined;
232
+ prNumber?: number | undefined;
233
+ }>, z.ZodObject<{
234
+ type: z.ZodLiteral<"MERGE_FAIL">;
235
+ error: z.ZodString;
236
+ }, "strip", z.ZodTypeAny, {
237
+ type: "MERGE_FAIL";
238
+ error: string;
239
+ }, {
240
+ type: "MERGE_FAIL";
241
+ error: string;
242
+ }>, z.ZodObject<{
243
+ type: z.ZodLiteral<"CLEAN_SUCCESS">;
244
+ }, "strip", z.ZodTypeAny, {
245
+ type: "CLEAN_SUCCESS";
246
+ }, {
247
+ type: "CLEAN_SUCCESS";
248
+ }>, z.ZodObject<{
249
+ type: z.ZodLiteral<"CLEAN_FAIL">;
250
+ error: z.ZodString;
251
+ }, "strip", z.ZodTypeAny, {
252
+ type: "CLEAN_FAIL";
253
+ error: string;
254
+ }, {
255
+ type: "CLEAN_FAIL";
256
+ error: string;
257
+ }>, z.ZodObject<{
258
+ type: z.ZodLiteral<"COMPLETE_MANUAL">;
259
+ }, "strip", z.ZodTypeAny, {
260
+ type: "COMPLETE_MANUAL";
261
+ }, {
262
+ type: "COMPLETE_MANUAL";
263
+ }>]>;
264
+ export type WorkflowEvent = z.infer<typeof WorkflowEventSchema>;
265
+ export declare const WorkflowConfigSchema: z.ZodObject<{
266
+ autoQualityChecks: z.ZodDefault<z.ZodBoolean>;
267
+ requireHumanApproval: z.ZodDefault<z.ZodBoolean>;
268
+ aiCodeReview: z.ZodDefault<z.ZodBoolean>;
269
+ stepByStepMode: z.ZodDefault<z.ZodBoolean>;
270
+ autoCommit: z.ZodDefault<z.ZodBoolean>;
271
+ createPR: z.ZodOptional<z.ZodBoolean>;
272
+ autoMerge: z.ZodOptional<z.ZodBoolean>;
273
+ retryPolicy: z.ZodDefault<z.ZodObject<{
274
+ maxImplementationAttempts: z.ZodDefault<z.ZodNumber>;
275
+ }, "strip", z.ZodTypeAny, {
276
+ maxImplementationAttempts: number;
277
+ }, {
278
+ maxImplementationAttempts?: number | undefined;
279
+ }>>;
280
+ }, "strip", z.ZodTypeAny, {
281
+ autoQualityChecks: boolean;
282
+ requireHumanApproval: boolean;
283
+ aiCodeReview: boolean;
284
+ autoCommit: boolean;
285
+ stepByStepMode: boolean;
286
+ retryPolicy: {
287
+ maxImplementationAttempts: number;
288
+ };
289
+ createPR?: boolean | undefined;
290
+ autoMerge?: boolean | undefined;
291
+ }, {
292
+ autoQualityChecks?: boolean | undefined;
293
+ requireHumanApproval?: boolean | undefined;
294
+ aiCodeReview?: boolean | undefined;
295
+ autoCommit?: boolean | undefined;
296
+ createPR?: boolean | undefined;
297
+ stepByStepMode?: boolean | undefined;
298
+ autoMerge?: boolean | undefined;
299
+ retryPolicy?: {
300
+ maxImplementationAttempts?: number | undefined;
301
+ } | undefined;
302
+ }>;
303
+ export type WorkflowConfig = z.infer<typeof WorkflowConfigSchema>;
304
+ export declare const WorkflowStateSchema: z.ZodObject<{
305
+ id: z.ZodString;
306
+ taskId: z.ZodString;
307
+ phase: z.ZodEnum<["draft", "implementing", "validating", "approved", "merging", "done"]>;
308
+ terminalStatus: z.ZodDefault<z.ZodNullable<z.ZodEnum<["failed", "paused"]>>>;
309
+ startTime: z.ZodString;
310
+ endTime: z.ZodOptional<z.ZodString>;
311
+ lastUpdatedAt: z.ZodString;
312
+ attempts: z.ZodDefault<z.ZodRecord<z.ZodEnum<["draft", "implementing", "validating", "approved", "merging", "done"]>, z.ZodNumber>>;
313
+ executionIds: z.ZodDefault<z.ZodRecord<z.ZodEnum<["draft", "implementing", "validating", "approved", "merging", "done"]>, z.ZodArray<z.ZodString, "many">>>;
314
+ qualityResults: z.ZodOptional<z.ZodObject<{
315
+ overall: z.ZodBoolean;
316
+ timestamp: z.ZodString;
317
+ details: z.ZodRecord<z.ZodString, z.ZodBoolean>;
318
+ outputs: z.ZodRecord<z.ZodString, z.ZodString>;
319
+ }, "strip", z.ZodTypeAny, {
320
+ outputs: Record<string, string>;
321
+ overall: boolean;
322
+ timestamp: string;
323
+ details: Record<string, boolean>;
324
+ }, {
325
+ outputs: Record<string, string>;
326
+ overall: boolean;
327
+ timestamp: string;
328
+ details: Record<string, boolean>;
329
+ }>>;
330
+ aiReviewResult: z.ZodOptional<z.ZodObject<{
331
+ executionId: z.ZodString;
332
+ reviewSummary: z.ZodString;
333
+ recommendations: z.ZodArray<z.ZodString, "many">;
334
+ qualityScore: z.ZodNumber;
335
+ timestamp: z.ZodOptional<z.ZodString>;
336
+ }, "strip", z.ZodTypeAny, {
337
+ executionId: string;
338
+ reviewSummary: string;
339
+ recommendations: string[];
340
+ qualityScore: number;
341
+ timestamp?: string | undefined;
342
+ }, {
343
+ executionId: string;
344
+ reviewSummary: string;
345
+ recommendations: string[];
346
+ qualityScore: number;
347
+ timestamp?: string | undefined;
348
+ }>>;
349
+ links: z.ZodDefault<z.ZodObject<{
350
+ prUrl: z.ZodOptional<z.ZodString>;
351
+ prNumber: z.ZodOptional<z.ZodNumber>;
352
+ branchName: z.ZodOptional<z.ZodString>;
353
+ baseBranch: z.ZodOptional<z.ZodString>;
354
+ }, "strip", z.ZodTypeAny, {
355
+ branchName?: string | undefined;
356
+ baseBranch?: string | undefined;
357
+ prUrl?: string | undefined;
358
+ prNumber?: number | undefined;
359
+ }, {
360
+ branchName?: string | undefined;
361
+ baseBranch?: string | undefined;
362
+ prUrl?: string | undefined;
363
+ prNumber?: number | undefined;
364
+ }>>;
365
+ error: z.ZodOptional<z.ZodString>;
366
+ failureContext: z.ZodOptional<z.ZodObject<{
367
+ atPhase: z.ZodEnum<["draft", "implementing", "validating", "approved", "merging", "done"]>;
368
+ error: z.ZodOptional<z.ZodString>;
369
+ timestamp: z.ZodString;
370
+ }, "strip", z.ZodTypeAny, {
371
+ timestamp: string;
372
+ atPhase: "done" | "draft" | "approved" | "implementing" | "validating" | "merging";
373
+ error?: string | undefined;
374
+ }, {
375
+ timestamp: string;
376
+ atPhase: "done" | "draft" | "approved" | "implementing" | "validating" | "merging";
377
+ error?: string | undefined;
378
+ }>>;
379
+ config: z.ZodObject<{
380
+ autoQualityChecks: z.ZodDefault<z.ZodBoolean>;
381
+ requireHumanApproval: z.ZodDefault<z.ZodBoolean>;
382
+ aiCodeReview: z.ZodDefault<z.ZodBoolean>;
383
+ stepByStepMode: z.ZodDefault<z.ZodBoolean>;
384
+ autoCommit: z.ZodDefault<z.ZodBoolean>;
385
+ createPR: z.ZodOptional<z.ZodBoolean>;
386
+ autoMerge: z.ZodOptional<z.ZodBoolean>;
387
+ retryPolicy: z.ZodDefault<z.ZodObject<{
388
+ maxImplementationAttempts: z.ZodDefault<z.ZodNumber>;
389
+ }, "strip", z.ZodTypeAny, {
390
+ maxImplementationAttempts: number;
391
+ }, {
392
+ maxImplementationAttempts?: number | undefined;
393
+ }>>;
394
+ }, "strip", z.ZodTypeAny, {
395
+ autoQualityChecks: boolean;
396
+ requireHumanApproval: boolean;
397
+ aiCodeReview: boolean;
398
+ autoCommit: boolean;
399
+ stepByStepMode: boolean;
400
+ retryPolicy: {
401
+ maxImplementationAttempts: number;
402
+ };
403
+ createPR?: boolean | undefined;
404
+ autoMerge?: boolean | undefined;
405
+ }, {
406
+ autoQualityChecks?: boolean | undefined;
407
+ requireHumanApproval?: boolean | undefined;
408
+ aiCodeReview?: boolean | undefined;
409
+ autoCommit?: boolean | undefined;
410
+ createPR?: boolean | undefined;
411
+ stepByStepMode?: boolean | undefined;
412
+ autoMerge?: boolean | undefined;
413
+ retryPolicy?: {
414
+ maxImplementationAttempts?: number | undefined;
415
+ } | undefined;
416
+ }>;
417
+ rerunContext: z.ZodOptional<z.ZodObject<{
418
+ reason: z.ZodString;
419
+ previousExecutionId: z.ZodOptional<z.ZodString>;
420
+ feedback: z.ZodOptional<z.ZodString>;
421
+ }, "strip", z.ZodTypeAny, {
422
+ reason: string;
423
+ feedback?: string | undefined;
424
+ previousExecutionId?: string | undefined;
425
+ }, {
426
+ reason: string;
427
+ feedback?: string | undefined;
428
+ previousExecutionId?: string | undefined;
429
+ }>>;
430
+ }, "strip", z.ZodTypeAny, {
431
+ id: string;
432
+ config: {
433
+ autoQualityChecks: boolean;
434
+ requireHumanApproval: boolean;
435
+ aiCodeReview: boolean;
436
+ autoCommit: boolean;
437
+ stepByStepMode: boolean;
438
+ retryPolicy: {
439
+ maxImplementationAttempts: number;
440
+ };
441
+ createPR?: boolean | undefined;
442
+ autoMerge?: boolean | undefined;
443
+ };
444
+ taskId: string;
445
+ startTime: string;
446
+ phase: "done" | "draft" | "approved" | "implementing" | "validating" | "merging";
447
+ terminalStatus: "failed" | "paused" | null;
448
+ lastUpdatedAt: string;
449
+ attempts: Partial<Record<"done" | "draft" | "approved" | "implementing" | "validating" | "merging", number>>;
450
+ executionIds: Partial<Record<"done" | "draft" | "approved" | "implementing" | "validating" | "merging", string[]>>;
451
+ links: {
452
+ branchName?: string | undefined;
453
+ baseBranch?: string | undefined;
454
+ prUrl?: string | undefined;
455
+ prNumber?: number | undefined;
456
+ };
457
+ error?: string | undefined;
458
+ endTime?: string | undefined;
459
+ rerunContext?: {
460
+ reason: string;
461
+ feedback?: string | undefined;
462
+ previousExecutionId?: string | undefined;
463
+ } | undefined;
464
+ qualityResults?: {
465
+ outputs: Record<string, string>;
466
+ overall: boolean;
467
+ timestamp: string;
468
+ details: Record<string, boolean>;
469
+ } | undefined;
470
+ aiReviewResult?: {
471
+ executionId: string;
472
+ reviewSummary: string;
473
+ recommendations: string[];
474
+ qualityScore: number;
475
+ timestamp?: string | undefined;
476
+ } | undefined;
477
+ failureContext?: {
478
+ timestamp: string;
479
+ atPhase: "done" | "draft" | "approved" | "implementing" | "validating" | "merging";
480
+ error?: string | undefined;
481
+ } | undefined;
482
+ }, {
483
+ id: string;
484
+ config: {
485
+ autoQualityChecks?: boolean | undefined;
486
+ requireHumanApproval?: boolean | undefined;
487
+ aiCodeReview?: boolean | undefined;
488
+ autoCommit?: boolean | undefined;
489
+ createPR?: boolean | undefined;
490
+ stepByStepMode?: boolean | undefined;
491
+ autoMerge?: boolean | undefined;
492
+ retryPolicy?: {
493
+ maxImplementationAttempts?: number | undefined;
494
+ } | undefined;
495
+ };
496
+ taskId: string;
497
+ startTime: string;
498
+ phase: "done" | "draft" | "approved" | "implementing" | "validating" | "merging";
499
+ lastUpdatedAt: string;
500
+ error?: string | undefined;
501
+ endTime?: string | undefined;
502
+ rerunContext?: {
503
+ reason: string;
504
+ feedback?: string | undefined;
505
+ previousExecutionId?: string | undefined;
506
+ } | undefined;
507
+ terminalStatus?: "failed" | "paused" | null | undefined;
508
+ attempts?: Partial<Record<"done" | "draft" | "approved" | "implementing" | "validating" | "merging", number>> | undefined;
509
+ executionIds?: Partial<Record<"done" | "draft" | "approved" | "implementing" | "validating" | "merging", string[]>> | undefined;
510
+ qualityResults?: {
511
+ outputs: Record<string, string>;
512
+ overall: boolean;
513
+ timestamp: string;
514
+ details: Record<string, boolean>;
515
+ } | undefined;
516
+ aiReviewResult?: {
517
+ executionId: string;
518
+ reviewSummary: string;
519
+ recommendations: string[];
520
+ qualityScore: number;
521
+ timestamp?: string | undefined;
522
+ } | undefined;
523
+ links?: {
524
+ branchName?: string | undefined;
525
+ baseBranch?: string | undefined;
526
+ prUrl?: string | undefined;
527
+ prNumber?: number | undefined;
528
+ } | undefined;
529
+ failureContext?: {
530
+ timestamp: string;
531
+ atPhase: "done" | "draft" | "approved" | "implementing" | "validating" | "merging";
532
+ error?: string | undefined;
533
+ } | undefined;
534
+ }>;
535
+ export type WorkflowState = z.infer<typeof WorkflowStateSchema>;
536
+ type TransitionFn = (state: WorkflowState, event: WorkflowEvent) => WorkflowPhase | null;
537
+ type TransitionTarget = WorkflowPhase | TransitionFn | null;
538
+ type PhaseTransitions = Partial<Record<WorkflowEvent['type'], TransitionTarget>>;
539
+ export declare const TRANSITIONS: Record<WorkflowPhase, PhaseTransitions>;
540
+ export declare function isValidTransition(fromPhase: WorkflowPhase, eventType: WorkflowEvent['type']): boolean;
541
+ export declare function getNextPhase(state: WorkflowState, event: WorkflowEvent): WorkflowPhase | 'failed' | 'paused' | null;
542
+ export declare const PHASE_LABELS: Record<WorkflowPhase | TerminalStatus, string>;
543
+ export declare const EXTENDED_PHASE_LABELS: Record<string, string>;
544
+ export declare const PHASE_ORDER: WorkflowPhase[];
545
+ export declare const EXTENDED_PHASE_FLOW: string[];
546
+ export {};