vibeman 0.0.5 → 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.
- package/dist/api.js +49 -0
- package/dist/cli.js +135 -0
- package/dist/ui/index-gnk6rhxs.js +9 -0
- package/dist/ui/index.html +10 -0
- package/dist/ui/index.js +2 -0
- package/package.json +10 -46
- package/README.md +0 -12
- package/dist/index.js +0 -114
- package/dist/runtime/api/.tsbuildinfo +0 -1
- package/dist/runtime/api/agent/agent-service.d.ts +0 -229
- package/dist/runtime/api/agent/agent-service.js +0 -963
- package/dist/runtime/api/agent/ai-providers/amp-cli-provider.d.ts +0 -38
- package/dist/runtime/api/agent/ai-providers/amp-cli-provider.js +0 -268
- package/dist/runtime/api/agent/ai-providers/claude-code-adapter.d.ts +0 -61
- package/dist/runtime/api/agent/ai-providers/claude-code-adapter.js +0 -362
- package/dist/runtime/api/agent/ai-providers/codex-cli-provider.d.ts +0 -36
- package/dist/runtime/api/agent/ai-providers/codex-cli-provider.js +0 -375
- package/dist/runtime/api/agent/ai-providers/gemini-cli-provider.d.ts +0 -24
- package/dist/runtime/api/agent/ai-providers/gemini-cli-provider.js +0 -291
- package/dist/runtime/api/agent/ai-providers/index.d.ts +0 -9
- package/dist/runtime/api/agent/ai-providers/index.js +0 -9
- package/dist/runtime/api/agent/ai-providers/types.d.ts +0 -185
- package/dist/runtime/api/agent/ai-providers/types.js +0 -5
- package/dist/runtime/api/agent/amp-cli-provider.test.d.ts +0 -1
- package/dist/runtime/api/agent/amp-cli-provider.test.js +0 -99
- package/dist/runtime/api/agent/codex-cli-provider.test.d.ts +0 -1
- package/dist/runtime/api/agent/codex-cli-provider.test.js +0 -172
- package/dist/runtime/api/agent/core-agent-service.d.ts +0 -119
- package/dist/runtime/api/agent/core-agent-service.js +0 -267
- package/dist/runtime/api/agent/parsers.d.ts +0 -16
- package/dist/runtime/api/agent/parsers.js +0 -308
- package/dist/runtime/api/agent/prompt-service.d.ts +0 -30
- package/dist/runtime/api/agent/prompt-service.js +0 -452
- package/dist/runtime/api/agent/prompt-service.test.d.ts +0 -1
- package/dist/runtime/api/agent/prompt-service.test.js +0 -265
- package/dist/runtime/api/agent/routing-policy.d.ts +0 -171
- package/dist/runtime/api/agent/routing-policy.js +0 -196
- package/dist/runtime/api/agent/routing-policy.test.d.ts +0 -1
- package/dist/runtime/api/agent/routing-policy.test.js +0 -63
- package/dist/runtime/api/api/router-helpers.d.ts +0 -32
- package/dist/runtime/api/api/router-helpers.js +0 -31
- package/dist/runtime/api/api/routers/ai.d.ts +0 -200
- package/dist/runtime/api/api/routers/ai.js +0 -396
- package/dist/runtime/api/api/routers/executions.d.ts +0 -93
- package/dist/runtime/api/api/routers/executions.js +0 -94
- package/dist/runtime/api/api/routers/git.d.ts +0 -45
- package/dist/runtime/api/api/routers/git.js +0 -35
- package/dist/runtime/api/api/routers/provider-config.d.ts +0 -199
- package/dist/runtime/api/api/routers/provider-config.js +0 -252
- package/dist/runtime/api/api/routers/settings.d.ts +0 -158
- package/dist/runtime/api/api/routers/settings.js +0 -129
- package/dist/runtime/api/api/routers/tasks.d.ts +0 -141
- package/dist/runtime/api/api/routers/tasks.js +0 -238
- package/dist/runtime/api/api/routers/workflows.d.ts +0 -275
- package/dist/runtime/api/api/routers/workflows.js +0 -311
- package/dist/runtime/api/api/routers/worktrees.d.ts +0 -101
- package/dist/runtime/api/api/routers/worktrees.js +0 -80
- package/dist/runtime/api/api/trpc.d.ts +0 -118
- package/dist/runtime/api/api/trpc.js +0 -34
- package/dist/runtime/api/index.d.ts +0 -9
- package/dist/runtime/api/index.js +0 -117
- package/dist/runtime/api/lib/id-generator.d.ts +0 -70
- package/dist/runtime/api/lib/id-generator.js +0 -123
- package/dist/runtime/api/lib/local-config.d.ts +0 -335
- package/dist/runtime/api/lib/local-config.js +0 -304
- package/dist/runtime/api/lib/logger.d.ts +0 -11
- package/dist/runtime/api/lib/logger.js +0 -188
- package/dist/runtime/api/lib/provider-detection.d.ts +0 -61
- package/dist/runtime/api/lib/provider-detection.js +0 -326
- package/dist/runtime/api/lib/server/agent-service-singleton.d.ts +0 -6
- package/dist/runtime/api/lib/server/agent-service-singleton.js +0 -27
- package/dist/runtime/api/lib/server/bootstrap.d.ts +0 -38
- package/dist/runtime/api/lib/server/bootstrap.js +0 -197
- package/dist/runtime/api/lib/server/git-service-singleton.d.ts +0 -6
- package/dist/runtime/api/lib/server/git-service-singleton.js +0 -47
- package/dist/runtime/api/lib/server/project-root.d.ts +0 -2
- package/dist/runtime/api/lib/server/project-root.js +0 -61
- package/dist/runtime/api/lib/server/task-service-singleton.d.ts +0 -7
- package/dist/runtime/api/lib/server/task-service-singleton.js +0 -58
- package/dist/runtime/api/lib/server/vibeman-info.d.ts +0 -5
- package/dist/runtime/api/lib/server/vibeman-info.js +0 -85
- package/dist/runtime/api/lib/server/vibing-orchestrator-singleton.d.ts +0 -7
- package/dist/runtime/api/lib/server/vibing-orchestrator-singleton.js +0 -57
- package/dist/runtime/api/lib/trpc/server.d.ts +0 -965
- package/dist/runtime/api/lib/trpc/server.js +0 -11
- package/dist/runtime/api/lib/trpc/ws-server.d.ts +0 -8
- package/dist/runtime/api/lib/trpc/ws-server.js +0 -33
- package/dist/runtime/api/persistence/database-service.d.ts +0 -14
- package/dist/runtime/api/persistence/database-service.js +0 -74
- package/dist/runtime/api/persistence/execution-log-persistence.d.ts +0 -90
- package/dist/runtime/api/persistence/execution-log-persistence.js +0 -426
- package/dist/runtime/api/persistence/execution-log-persistence.test.d.ts +0 -1
- package/dist/runtime/api/persistence/execution-log-persistence.test.js +0 -170
- package/dist/runtime/api/router.d.ts +0 -968
- package/dist/runtime/api/router.js +0 -34
- package/dist/runtime/api/settings-service.d.ts +0 -110
- package/dist/runtime/api/settings-service.js +0 -678
- package/dist/runtime/api/tasks/file-watcher.d.ts +0 -23
- package/dist/runtime/api/tasks/file-watcher.js +0 -88
- package/dist/runtime/api/tasks/task-file-parser.d.ts +0 -14
- package/dist/runtime/api/tasks/task-file-parser.js +0 -180
- package/dist/runtime/api/tasks/task-service.d.ts +0 -36
- package/dist/runtime/api/tasks/task-service.js +0 -173
- package/dist/runtime/api/tasks/task-updater.d.ts +0 -62
- package/dist/runtime/api/tasks/task-updater.js +0 -260
- package/dist/runtime/api/tasks/task-updater.test.d.ts +0 -1
- package/dist/runtime/api/tasks/task-updater.test.js +0 -303
- package/dist/runtime/api/types/index.d.ts +0 -186
- package/dist/runtime/api/types/index.js +0 -1
- package/dist/runtime/api/types/settings.d.ts +0 -105
- package/dist/runtime/api/types/settings.js +0 -2
- package/dist/runtime/api/types.d.ts +0 -2
- package/dist/runtime/api/types.js +0 -1
- package/dist/runtime/api/utils/env.d.ts +0 -6
- package/dist/runtime/api/utils/env.js +0 -12
- package/dist/runtime/api/utils/stripNextEnv.d.ts +0 -7
- package/dist/runtime/api/utils/stripNextEnv.js +0 -22
- package/dist/runtime/api/utils/title-slug.d.ts +0 -6
- package/dist/runtime/api/utils/title-slug.js +0 -77
- package/dist/runtime/api/utils/url.d.ts +0 -2
- package/dist/runtime/api/utils/url.js +0 -19
- package/dist/runtime/api/vcs/git-history-service.d.ts +0 -57
- package/dist/runtime/api/vcs/git-history-service.js +0 -228
- package/dist/runtime/api/vcs/git-service.d.ts +0 -136
- package/dist/runtime/api/vcs/git-service.js +0 -307
- package/dist/runtime/api/vcs/worktree-service.d.ts +0 -93
- package/dist/runtime/api/vcs/worktree-service.js +0 -518
- package/dist/runtime/api/vcs/worktree-service.test.d.ts +0 -1
- package/dist/runtime/api/vcs/worktree-service.test.js +0 -20
- package/dist/runtime/api/workflows/quality-pipeline.d.ts +0 -58
- package/dist/runtime/api/workflows/quality-pipeline.js +0 -401
- package/dist/runtime/api/workflows/vibing-orchestrator.d.ts +0 -406
- package/dist/runtime/api/workflows/vibing-orchestrator.js +0 -2462
- package/dist/runtime/api/workflows/workflow-effects.d.ts +0 -45
- package/dist/runtime/api/workflows/workflow-effects.js +0 -49
- package/dist/runtime/api/workflows/workflow-reconciler.d.ts +0 -65
- package/dist/runtime/api/workflows/workflow-reconciler.js +0 -226
- package/dist/runtime/api/workflows/workflow-reducer.d.ts +0 -26
- package/dist/runtime/api/workflows/workflow-reducer.js +0 -288
- package/dist/runtime/api/workflows/workflow-reducer.test.d.ts +0 -1
- package/dist/runtime/api/workflows/workflow-reducer.test.js +0 -247
- package/dist/runtime/api/workflows/workflow-schema.d.ts +0 -546
- package/dist/runtime/api/workflows/workflow-schema.js +0 -256
- package/dist/runtime/web/.next/BUILD_ID +0 -1
- package/dist/runtime/web/.next/app-build-manifest.json +0 -66
- package/dist/runtime/web/.next/app-path-routes-manifest.json +0 -8
- package/dist/runtime/web/.next/build-manifest.json +0 -33
- package/dist/runtime/web/.next/package.json +0 -1
- package/dist/runtime/web/.next/prerender-manifest.json +0 -61
- package/dist/runtime/web/.next/react-loadable-manifest.json +0 -8
- package/dist/runtime/web/.next/required-server-files.json +0 -334
- package/dist/runtime/web/.next/routes-manifest.json +0 -70
- package/dist/runtime/web/.next/server/app/.vibeman/assets/images/[...path]/route.js +0 -1
- package/dist/runtime/web/.next/server/app/.vibeman/assets/images/[...path]/route.js.nft.json +0 -1
- package/dist/runtime/web/.next/server/app/.vibeman/assets/images/[...path]/route_client-reference-manifest.js +0 -1
- package/dist/runtime/web/.next/server/app/_not-found/page.js +0 -2
- package/dist/runtime/web/.next/server/app/_not-found/page.js.nft.json +0 -1
- package/dist/runtime/web/.next/server/app/_not-found/page_client-reference-manifest.js +0 -1
- package/dist/runtime/web/.next/server/app/_not-found.html +0 -7
- package/dist/runtime/web/.next/server/app/_not-found.meta +0 -8
- package/dist/runtime/web/.next/server/app/_not-found.rsc +0 -22
- package/dist/runtime/web/.next/server/app/api/health/route.js +0 -1
- package/dist/runtime/web/.next/server/app/api/health/route.js.nft.json +0 -1
- package/dist/runtime/web/.next/server/app/api/health/route_client-reference-manifest.js +0 -1
- package/dist/runtime/web/.next/server/app/api/images/[...path]/route.js +0 -1
- package/dist/runtime/web/.next/server/app/api/images/[...path]/route.js.nft.json +0 -1
- package/dist/runtime/web/.next/server/app/api/images/[...path]/route_client-reference-manifest.js +0 -1
- package/dist/runtime/web/.next/server/app/api/upload/route.js +0 -1
- package/dist/runtime/web/.next/server/app/api/upload/route.js.nft.json +0 -1
- package/dist/runtime/web/.next/server/app/api/upload/route_client-reference-manifest.js +0 -1
- package/dist/runtime/web/.next/server/app/index.html +0 -7
- package/dist/runtime/web/.next/server/app/index.meta +0 -7
- package/dist/runtime/web/.next/server/app/index.rsc +0 -27
- package/dist/runtime/web/.next/server/app/page.js +0 -112
- package/dist/runtime/web/.next/server/app/page.js.nft.json +0 -1
- package/dist/runtime/web/.next/server/app/page_client-reference-manifest.js +0 -1
- package/dist/runtime/web/.next/server/app-paths-manifest.json +0 -8
- package/dist/runtime/web/.next/server/chunks/210.js +0 -1
- package/dist/runtime/web/.next/server/chunks/291.js +0 -18
- package/dist/runtime/web/.next/server/chunks/552.js +0 -22
- package/dist/runtime/web/.next/server/chunks/780.js +0 -1
- package/dist/runtime/web/.next/server/chunks/905.js +0 -6
- package/dist/runtime/web/.next/server/chunks/98.js +0 -1
- package/dist/runtime/web/.next/server/functions-config-manifest.json +0 -4
- package/dist/runtime/web/.next/server/middleware-build-manifest.js +0 -1
- package/dist/runtime/web/.next/server/middleware-manifest.json +0 -6
- package/dist/runtime/web/.next/server/middleware-react-loadable-manifest.js +0 -1
- package/dist/runtime/web/.next/server/next-font-manifest.js +0 -1
- package/dist/runtime/web/.next/server/next-font-manifest.json +0 -1
- package/dist/runtime/web/.next/server/pages/404.html +0 -7
- package/dist/runtime/web/.next/server/pages/500.html +0 -1
- package/dist/runtime/web/.next/server/pages/_app.js +0 -1
- package/dist/runtime/web/.next/server/pages/_app.js.nft.json +0 -1
- package/dist/runtime/web/.next/server/pages/_document.js +0 -1
- package/dist/runtime/web/.next/server/pages/_document.js.nft.json +0 -1
- package/dist/runtime/web/.next/server/pages/_error.js +0 -19
- package/dist/runtime/web/.next/server/pages/_error.js.nft.json +0 -1
- package/dist/runtime/web/.next/server/pages-manifest.json +0 -6
- package/dist/runtime/web/.next/server/server-reference-manifest.js +0 -1
- package/dist/runtime/web/.next/server/server-reference-manifest.json +0 -1
- package/dist/runtime/web/.next/server/webpack-runtime.js +0 -1
- package/dist/runtime/web/.next/static/LJFZk_8tvKFN_Ee4HqUuM/_buildManifest.js +0 -1
- package/dist/runtime/web/.next/static/LJFZk_8tvKFN_Ee4HqUuM/_ssgManifest.js +0 -1
- package/dist/runtime/web/.next/static/chunks/05c91ade-7d09b2b280adffd1.js +0 -1
- package/dist/runtime/web/.next/static/chunks/201-51bef3fa8c832e2e.js +0 -1
- package/dist/runtime/web/.next/static/chunks/524-89747ed9b0294f8a.js +0 -1
- package/dist/runtime/web/.next/static/chunks/554-8bec6e9cca6acc67.js +0 -1
- package/dist/runtime/web/.next/static/chunks/764.86e9503a69d45a85.js +0 -1
- package/dist/runtime/web/.next/static/chunks/7ab4dc20-239138e0ae7af24a.js +0 -1
- package/dist/runtime/web/.next/static/chunks/905-342391e3d3a3678f.js +0 -20
- package/dist/runtime/web/.next/static/chunks/a8a5ce16-4edea7df2d9b544a.js +0 -79
- package/dist/runtime/web/.next/static/chunks/ad74d572-4c1b162e2c15acaa.js +0 -1
- package/dist/runtime/web/.next/static/chunks/app/.vibeman/assets/images/[...path]/route-7b752a8641f96c1f.js +0 -1
- package/dist/runtime/web/.next/static/chunks/app/_not-found/page-34e66b251c2b5044.js +0 -1
- package/dist/runtime/web/.next/static/chunks/app/api/health/route-7b752a8641f96c1f.js +0 -1
- package/dist/runtime/web/.next/static/chunks/app/api/images/[...path]/route-7b752a8641f96c1f.js +0 -1
- package/dist/runtime/web/.next/static/chunks/app/api/upload/route-7b752a8641f96c1f.js +0 -1
- package/dist/runtime/web/.next/static/chunks/app/layout-df9ac93cb02b2385.js +0 -1
- package/dist/runtime/web/.next/static/chunks/app/page-6610743f7de5f92a.js +0 -1
- package/dist/runtime/web/.next/static/chunks/c25e0690-e9b798b8de667da1.js +0 -1
- package/dist/runtime/web/.next/static/chunks/framework-57157ec4d37f64aa.js +0 -1
- package/dist/runtime/web/.next/static/chunks/main-app-156cc0c60371bd78.js +0 -1
- package/dist/runtime/web/.next/static/chunks/main-df25d367c47b1fec.js +0 -1
- package/dist/runtime/web/.next/static/chunks/pages/_app-9f629a5e1131d19f.js +0 -1
- package/dist/runtime/web/.next/static/chunks/pages/_error-9238238274c7efcd.js +0 -1
- package/dist/runtime/web/.next/static/chunks/polyfills-42372ed130431b0a.js +0 -1
- package/dist/runtime/web/.next/static/chunks/webpack-cd50e39b423d1808.js +0 -1
- package/dist/runtime/web/.next/static/css/2728291c68f99cb1.css +0 -3
- package/dist/runtime/web/.next/static/css/4fbf378a264bd4ea.css +0 -1
- package/dist/runtime/web/.next/static/css/521bd69cc298cd1a.css +0 -1
- package/dist/runtime/web/.next/static/css/537e22821e101b87.css +0 -1
- package/dist/runtime/web/.next/static/media/19cfc7226ec3afaa-s.woff2 +0 -0
- package/dist/runtime/web/.next/static/media/21350d82a1f187e9-s.woff2 +0 -0
- package/dist/runtime/web/.next/static/media/8e9860b6e62d6359-s.woff2 +0 -0
- package/dist/runtime/web/.next/static/media/ba9851c3c22cd980-s.woff2 +0 -0
- package/dist/runtime/web/.next/static/media/c5fe6dc8356a8c31-s.woff2 +0 -0
- package/dist/runtime/web/.next/static/media/df0a9ae256c0569c-s.woff2 +0 -0
- package/dist/runtime/web/.next/static/media/e4af272ccee01ff0-s.p.woff2 +0 -0
- package/dist/runtime/web/package.json +0 -65
- package/dist/runtime/web/server.js +0 -44
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
// ============================================================================
|
|
3
|
-
// WORKFLOW STATE MACHINE SCHEMA
|
|
4
|
-
// Single source of truth for phases, events, and valid transitions
|
|
5
|
-
// ============================================================================
|
|
6
|
-
// 6 core phases (simplified from 12+)
|
|
7
|
-
export const WorkflowPhaseSchema = z.enum([
|
|
8
|
-
'draft',
|
|
9
|
-
'implementing',
|
|
10
|
-
'validating',
|
|
11
|
-
'approved',
|
|
12
|
-
'merging',
|
|
13
|
-
'done',
|
|
14
|
-
]);
|
|
15
|
-
// Terminal/interrupt states (orthogonal to phase)
|
|
16
|
-
export const TerminalStatusSchema = z.enum(['failed', 'paused']);
|
|
17
|
-
// Combined status for external APIs (backward compatibility)
|
|
18
|
-
export const WorkflowStatusSchema = z.union([WorkflowPhaseSchema, TerminalStatusSchema]);
|
|
19
|
-
// Quality results from validation phase
|
|
20
|
-
export const QualityResultsSchema = z.object({
|
|
21
|
-
overall: z.boolean(),
|
|
22
|
-
timestamp: z.string(),
|
|
23
|
-
details: z.record(z.string(), z.boolean()),
|
|
24
|
-
outputs: z.record(z.string(), z.string()),
|
|
25
|
-
});
|
|
26
|
-
// AI review result
|
|
27
|
-
export const AIReviewResultSchema = z.object({
|
|
28
|
-
executionId: z.string(),
|
|
29
|
-
reviewSummary: z.string(),
|
|
30
|
-
recommendations: z.array(z.string()),
|
|
31
|
-
qualityScore: z.number(),
|
|
32
|
-
timestamp: z.string().optional(),
|
|
33
|
-
});
|
|
34
|
-
// ============================================================================
|
|
35
|
-
// WORKFLOW EVENTS
|
|
36
|
-
// All state changes are triggered by explicit events
|
|
37
|
-
// ============================================================================
|
|
38
|
-
export const WorkflowEventSchema = z.discriminatedUnion('type', [
|
|
39
|
-
// Lifecycle events
|
|
40
|
-
z.object({ type: z.literal('START') }),
|
|
41
|
-
z.object({ type: z.literal('PAUSE') }),
|
|
42
|
-
z.object({ type: z.literal('RESUME') }),
|
|
43
|
-
z.object({ type: z.literal('RETRY') }),
|
|
44
|
-
// Implementation phase events
|
|
45
|
-
z.object({ type: z.literal('IMPL_SUCCESS'), executionId: z.string().optional() }),
|
|
46
|
-
z.object({ type: z.literal('IMPL_FAIL'), error: z.string(), canRetry: z.boolean() }),
|
|
47
|
-
// Validation phase events
|
|
48
|
-
z.object({ type: z.literal('VALID_SUCCESS'), results: QualityResultsSchema }),
|
|
49
|
-
z.object({
|
|
50
|
-
type: z.literal('VALID_FAIL'),
|
|
51
|
-
error: z.string(),
|
|
52
|
-
results: QualityResultsSchema.optional(),
|
|
53
|
-
}),
|
|
54
|
-
// AI review phase events
|
|
55
|
-
z.object({ type: z.literal('REVIEW_DONE'), result: AIReviewResultSchema }),
|
|
56
|
-
z.object({ type: z.literal('REVIEW_SKIP') }),
|
|
57
|
-
// Human approval events
|
|
58
|
-
z.object({ type: z.literal('APPROVE') }),
|
|
59
|
-
z.object({ type: z.literal('REJECT'), feedback: z.string() }),
|
|
60
|
-
// Merge phase events
|
|
61
|
-
z.object({
|
|
62
|
-
type: z.literal('MERGE_SUCCESS'),
|
|
63
|
-
prUrl: z.string().optional(),
|
|
64
|
-
prNumber: z.number().optional(),
|
|
65
|
-
}),
|
|
66
|
-
z.object({ type: z.literal('MERGE_FAIL'), error: z.string() }),
|
|
67
|
-
// Cleanup phase events
|
|
68
|
-
z.object({ type: z.literal('CLEAN_SUCCESS') }),
|
|
69
|
-
z.object({ type: z.literal('CLEAN_FAIL'), error: z.string() }),
|
|
70
|
-
// Manual completion
|
|
71
|
-
z.object({ type: z.literal('COMPLETE_MANUAL') }),
|
|
72
|
-
]);
|
|
73
|
-
// ============================================================================
|
|
74
|
-
// WORKFLOW CONFIGURATION
|
|
75
|
-
// Controls flow behavior (which steps to run, retry policy, etc.)
|
|
76
|
-
// ============================================================================
|
|
77
|
-
export const WorkflowConfigSchema = z.object({
|
|
78
|
-
autoQualityChecks: z.boolean().default(true),
|
|
79
|
-
requireHumanApproval: z.boolean().default(true),
|
|
80
|
-
aiCodeReview: z.boolean().default(true),
|
|
81
|
-
stepByStepMode: z.boolean().default(false),
|
|
82
|
-
autoCommit: z.boolean().default(false),
|
|
83
|
-
createPR: z.boolean().optional(),
|
|
84
|
-
autoMerge: z.boolean().optional(),
|
|
85
|
-
retryPolicy: z
|
|
86
|
-
.object({
|
|
87
|
-
maxImplementationAttempts: z.number().default(3),
|
|
88
|
-
})
|
|
89
|
-
.default({ maxImplementationAttempts: 3 }),
|
|
90
|
-
});
|
|
91
|
-
// ============================================================================
|
|
92
|
-
// WORKFLOW STATE
|
|
93
|
-
// The complete state of a workflow at any point in time
|
|
94
|
-
// ============================================================================
|
|
95
|
-
export const WorkflowStateSchema = z.object({
|
|
96
|
-
id: z.string(),
|
|
97
|
-
taskId: z.string(),
|
|
98
|
-
phase: WorkflowPhaseSchema,
|
|
99
|
-
terminalStatus: TerminalStatusSchema.nullable().default(null),
|
|
100
|
-
// Timestamps
|
|
101
|
-
startTime: z.string(),
|
|
102
|
-
endTime: z.string().optional(),
|
|
103
|
-
lastUpdatedAt: z.string(),
|
|
104
|
-
// Attempt tracking
|
|
105
|
-
attempts: z.record(WorkflowPhaseSchema, z.number()).default({}),
|
|
106
|
-
executionIds: z.record(WorkflowPhaseSchema, z.array(z.string())).default({}),
|
|
107
|
-
// Phase-specific results
|
|
108
|
-
qualityResults: QualityResultsSchema.optional(),
|
|
109
|
-
aiReviewResult: AIReviewResultSchema.optional(),
|
|
110
|
-
// Links (PR, branch, etc.)
|
|
111
|
-
links: z
|
|
112
|
-
.object({
|
|
113
|
-
prUrl: z.string().optional(),
|
|
114
|
-
prNumber: z.number().optional(),
|
|
115
|
-
branchName: z.string().optional(),
|
|
116
|
-
baseBranch: z.string().optional(),
|
|
117
|
-
})
|
|
118
|
-
.default({}),
|
|
119
|
-
// Error context for failed state
|
|
120
|
-
error: z.string().optional(),
|
|
121
|
-
failureContext: z
|
|
122
|
-
.object({
|
|
123
|
-
atPhase: WorkflowPhaseSchema,
|
|
124
|
-
error: z.string().optional(),
|
|
125
|
-
timestamp: z.string(),
|
|
126
|
-
})
|
|
127
|
-
.optional(),
|
|
128
|
-
// Configuration snapshot (frozen at workflow start)
|
|
129
|
-
config: WorkflowConfigSchema,
|
|
130
|
-
// Rerun context for retry scenarios
|
|
131
|
-
rerunContext: z
|
|
132
|
-
.object({
|
|
133
|
-
reason: z.string(),
|
|
134
|
-
previousExecutionId: z.string().optional(),
|
|
135
|
-
feedback: z.string().optional(),
|
|
136
|
-
})
|
|
137
|
-
.optional(),
|
|
138
|
-
});
|
|
139
|
-
export const TRANSITIONS = {
|
|
140
|
-
draft: {
|
|
141
|
-
START: 'implementing',
|
|
142
|
-
},
|
|
143
|
-
implementing: {
|
|
144
|
-
IMPL_SUCCESS: 'validating',
|
|
145
|
-
IMPL_FAIL: (state, event) => {
|
|
146
|
-
if (event.type !== 'IMPL_FAIL')
|
|
147
|
-
return null;
|
|
148
|
-
const attempts = (state.attempts.implementing ?? 0) + 1;
|
|
149
|
-
const maxAttempts = state.config.retryPolicy?.maxImplementationAttempts ?? 3;
|
|
150
|
-
return event.canRetry && attempts < maxAttempts ? 'implementing' : null; // null -> failed
|
|
151
|
-
},
|
|
152
|
-
PAUSE: null, // -> paused (handled in reducer)
|
|
153
|
-
},
|
|
154
|
-
validating: {
|
|
155
|
-
VALID_SUCCESS: (state) => {
|
|
156
|
-
if (state.config.aiCodeReview)
|
|
157
|
-
return 'approved'; // AI review is part of 'approved' waiting state
|
|
158
|
-
if (state.config.requireHumanApproval)
|
|
159
|
-
return 'approved';
|
|
160
|
-
return 'merging';
|
|
161
|
-
},
|
|
162
|
-
VALID_FAIL: 'implementing',
|
|
163
|
-
PAUSE: null,
|
|
164
|
-
},
|
|
165
|
-
approved: {
|
|
166
|
-
APPROVE: 'merging',
|
|
167
|
-
REJECT: 'implementing',
|
|
168
|
-
REVIEW_DONE: 'approved', // stays in approved, updates aiReviewResult
|
|
169
|
-
REVIEW_SKIP: 'approved',
|
|
170
|
-
PAUSE: null,
|
|
171
|
-
},
|
|
172
|
-
merging: {
|
|
173
|
-
MERGE_SUCCESS: 'done', // skip cleaning for now, can be added back
|
|
174
|
-
MERGE_FAIL: 'approved',
|
|
175
|
-
PAUSE: null,
|
|
176
|
-
},
|
|
177
|
-
done: {
|
|
178
|
-
// Terminal phase, no transitions out
|
|
179
|
-
},
|
|
180
|
-
};
|
|
181
|
-
// Helper to check if a transition is valid
|
|
182
|
-
export function isValidTransition(fromPhase, eventType) {
|
|
183
|
-
const phaseTransitions = TRANSITIONS[fromPhase];
|
|
184
|
-
return eventType in phaseTransitions;
|
|
185
|
-
}
|
|
186
|
-
// Helper to get next phase from transition
|
|
187
|
-
export function getNextPhase(state, event) {
|
|
188
|
-
// Handle terminal status events globally
|
|
189
|
-
if (event.type === 'PAUSE')
|
|
190
|
-
return 'paused';
|
|
191
|
-
if (event.type === 'RESUME')
|
|
192
|
-
return state.phase; // restore phase
|
|
193
|
-
if (event.type === 'RETRY')
|
|
194
|
-
return 'implementing';
|
|
195
|
-
const phaseTransitions = TRANSITIONS[state.phase];
|
|
196
|
-
const transition = phaseTransitions[event.type];
|
|
197
|
-
if (transition === undefined)
|
|
198
|
-
return null; // invalid transition
|
|
199
|
-
if (transition === null) {
|
|
200
|
-
// Explicit null means terminal (failed/paused)
|
|
201
|
-
if (event.type === 'IMPL_FAIL' ||
|
|
202
|
-
event.type === 'VALID_FAIL' ||
|
|
203
|
-
event.type === 'MERGE_FAIL' ||
|
|
204
|
-
event.type === 'CLEAN_FAIL') {
|
|
205
|
-
return 'failed';
|
|
206
|
-
}
|
|
207
|
-
return 'paused';
|
|
208
|
-
}
|
|
209
|
-
if (typeof transition === 'function') {
|
|
210
|
-
const result = transition(state, event);
|
|
211
|
-
return result === null ? 'failed' : result;
|
|
212
|
-
}
|
|
213
|
-
return transition;
|
|
214
|
-
}
|
|
215
|
-
// Phase labels for UI (core phases only)
|
|
216
|
-
export const PHASE_LABELS = {
|
|
217
|
-
draft: 'Draft',
|
|
218
|
-
implementing: 'Implementing',
|
|
219
|
-
validating: 'Validating',
|
|
220
|
-
approved: 'Awaiting Approval',
|
|
221
|
-
merging: 'Merging',
|
|
222
|
-
done: 'Completed',
|
|
223
|
-
failed: 'Failed',
|
|
224
|
-
paused: 'Paused',
|
|
225
|
-
};
|
|
226
|
-
// Extended phase labels for timeline display (includes legacy phases for UI compatibility)
|
|
227
|
-
export const EXTENDED_PHASE_LABELS = {
|
|
228
|
-
...PHASE_LABELS,
|
|
229
|
-
implemented: 'Implemented',
|
|
230
|
-
validated: 'Validated',
|
|
231
|
-
'ai-reviewing': 'AI Review',
|
|
232
|
-
'ai-reviewed': 'AI Reviewed',
|
|
233
|
-
'awaiting-review': 'Awaiting Review',
|
|
234
|
-
merged: 'Merged',
|
|
235
|
-
cleaning: 'Cleaning',
|
|
236
|
-
cleaned: 'Cleaned',
|
|
237
|
-
completed: 'Completed',
|
|
238
|
-
};
|
|
239
|
-
// Ordered phases for timeline display (core phases)
|
|
240
|
-
export const PHASE_ORDER = [
|
|
241
|
-
'draft',
|
|
242
|
-
'implementing',
|
|
243
|
-
'validating',
|
|
244
|
-
'approved',
|
|
245
|
-
'merging',
|
|
246
|
-
'done',
|
|
247
|
-
];
|
|
248
|
-
// Extended phase flow for timeline (includes action phases for UI compatibility)
|
|
249
|
-
export const EXTENDED_PHASE_FLOW = [
|
|
250
|
-
'implementing',
|
|
251
|
-
'validating',
|
|
252
|
-
'ai-reviewing',
|
|
253
|
-
'awaiting-review',
|
|
254
|
-
'merging',
|
|
255
|
-
'cleaning',
|
|
256
|
-
];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
LJFZk_8tvKFN_Ee4HqUuM
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"pages": {
|
|
3
|
-
"/_not-found/page": [
|
|
4
|
-
"static/chunks/webpack-cd50e39b423d1808.js",
|
|
5
|
-
"static/chunks/7ab4dc20-239138e0ae7af24a.js",
|
|
6
|
-
"static/chunks/201-51bef3fa8c832e2e.js",
|
|
7
|
-
"static/chunks/main-app-156cc0c60371bd78.js",
|
|
8
|
-
"static/chunks/app/_not-found/page-34e66b251c2b5044.js"
|
|
9
|
-
],
|
|
10
|
-
"/layout": [
|
|
11
|
-
"static/chunks/webpack-cd50e39b423d1808.js",
|
|
12
|
-
"static/chunks/7ab4dc20-239138e0ae7af24a.js",
|
|
13
|
-
"static/chunks/201-51bef3fa8c832e2e.js",
|
|
14
|
-
"static/chunks/main-app-156cc0c60371bd78.js",
|
|
15
|
-
"static/css/521bd69cc298cd1a.css",
|
|
16
|
-
"static/css/2728291c68f99cb1.css",
|
|
17
|
-
"static/css/537e22821e101b87.css",
|
|
18
|
-
"static/chunks/c25e0690-e9b798b8de667da1.js",
|
|
19
|
-
"static/chunks/554-8bec6e9cca6acc67.js",
|
|
20
|
-
"static/chunks/524-89747ed9b0294f8a.js",
|
|
21
|
-
"static/chunks/app/layout-df9ac93cb02b2385.js"
|
|
22
|
-
],
|
|
23
|
-
"/.vibeman/assets/images/[...path]/route": [
|
|
24
|
-
"static/chunks/webpack-cd50e39b423d1808.js",
|
|
25
|
-
"static/chunks/7ab4dc20-239138e0ae7af24a.js",
|
|
26
|
-
"static/chunks/201-51bef3fa8c832e2e.js",
|
|
27
|
-
"static/chunks/main-app-156cc0c60371bd78.js",
|
|
28
|
-
"static/chunks/app/.vibeman/assets/images/[...path]/route-7b752a8641f96c1f.js"
|
|
29
|
-
],
|
|
30
|
-
"/api/health/route": [
|
|
31
|
-
"static/chunks/webpack-cd50e39b423d1808.js",
|
|
32
|
-
"static/chunks/7ab4dc20-239138e0ae7af24a.js",
|
|
33
|
-
"static/chunks/201-51bef3fa8c832e2e.js",
|
|
34
|
-
"static/chunks/main-app-156cc0c60371bd78.js",
|
|
35
|
-
"static/chunks/app/api/health/route-7b752a8641f96c1f.js"
|
|
36
|
-
],
|
|
37
|
-
"/api/images/[...path]/route": [
|
|
38
|
-
"static/chunks/webpack-cd50e39b423d1808.js",
|
|
39
|
-
"static/chunks/7ab4dc20-239138e0ae7af24a.js",
|
|
40
|
-
"static/chunks/201-51bef3fa8c832e2e.js",
|
|
41
|
-
"static/chunks/main-app-156cc0c60371bd78.js",
|
|
42
|
-
"static/chunks/app/api/images/[...path]/route-7b752a8641f96c1f.js"
|
|
43
|
-
],
|
|
44
|
-
"/api/upload/route": [
|
|
45
|
-
"static/chunks/webpack-cd50e39b423d1808.js",
|
|
46
|
-
"static/chunks/7ab4dc20-239138e0ae7af24a.js",
|
|
47
|
-
"static/chunks/201-51bef3fa8c832e2e.js",
|
|
48
|
-
"static/chunks/main-app-156cc0c60371bd78.js",
|
|
49
|
-
"static/chunks/app/api/upload/route-7b752a8641f96c1f.js"
|
|
50
|
-
],
|
|
51
|
-
"/page": [
|
|
52
|
-
"static/chunks/webpack-cd50e39b423d1808.js",
|
|
53
|
-
"static/chunks/7ab4dc20-239138e0ae7af24a.js",
|
|
54
|
-
"static/chunks/201-51bef3fa8c832e2e.js",
|
|
55
|
-
"static/chunks/main-app-156cc0c60371bd78.js",
|
|
56
|
-
"static/css/4fbf378a264bd4ea.css",
|
|
57
|
-
"static/chunks/c25e0690-e9b798b8de667da1.js",
|
|
58
|
-
"static/chunks/05c91ade-7d09b2b280adffd1.js",
|
|
59
|
-
"static/chunks/a8a5ce16-4edea7df2d9b544a.js",
|
|
60
|
-
"static/chunks/ad74d572-4c1b162e2c15acaa.js",
|
|
61
|
-
"static/chunks/554-8bec6e9cca6acc67.js",
|
|
62
|
-
"static/chunks/905-342391e3d3a3678f.js",
|
|
63
|
-
"static/chunks/app/page-6610743f7de5f92a.js"
|
|
64
|
-
]
|
|
65
|
-
}
|
|
66
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"/_not-found/page": "/_not-found",
|
|
3
|
-
"/.vibeman/assets/images/[...path]/route": "/.vibeman/assets/images/[...path]",
|
|
4
|
-
"/api/health/route": "/api/health",
|
|
5
|
-
"/api/images/[...path]/route": "/api/images/[...path]",
|
|
6
|
-
"/api/upload/route": "/api/upload",
|
|
7
|
-
"/page": "/"
|
|
8
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"polyfillFiles": [
|
|
3
|
-
"static/chunks/polyfills-42372ed130431b0a.js"
|
|
4
|
-
],
|
|
5
|
-
"devFiles": [],
|
|
6
|
-
"ampDevFiles": [],
|
|
7
|
-
"lowPriorityFiles": [
|
|
8
|
-
"static/LJFZk_8tvKFN_Ee4HqUuM/_buildManifest.js",
|
|
9
|
-
"static/LJFZk_8tvKFN_Ee4HqUuM/_ssgManifest.js"
|
|
10
|
-
],
|
|
11
|
-
"rootMainFiles": [
|
|
12
|
-
"static/chunks/webpack-cd50e39b423d1808.js",
|
|
13
|
-
"static/chunks/7ab4dc20-239138e0ae7af24a.js",
|
|
14
|
-
"static/chunks/201-51bef3fa8c832e2e.js",
|
|
15
|
-
"static/chunks/main-app-156cc0c60371bd78.js"
|
|
16
|
-
],
|
|
17
|
-
"rootMainFilesTree": {},
|
|
18
|
-
"pages": {
|
|
19
|
-
"/_app": [
|
|
20
|
-
"static/chunks/webpack-cd50e39b423d1808.js",
|
|
21
|
-
"static/chunks/framework-57157ec4d37f64aa.js",
|
|
22
|
-
"static/chunks/main-df25d367c47b1fec.js",
|
|
23
|
-
"static/chunks/pages/_app-9f629a5e1131d19f.js"
|
|
24
|
-
],
|
|
25
|
-
"/_error": [
|
|
26
|
-
"static/chunks/webpack-cd50e39b423d1808.js",
|
|
27
|
-
"static/chunks/framework-57157ec4d37f64aa.js",
|
|
28
|
-
"static/chunks/main-df25d367c47b1fec.js",
|
|
29
|
-
"static/chunks/pages/_error-9238238274c7efcd.js"
|
|
30
|
-
]
|
|
31
|
-
},
|
|
32
|
-
"ampFirstPages": []
|
|
33
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"type": "commonjs"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 4,
|
|
3
|
-
"routes": {
|
|
4
|
-
"/": {
|
|
5
|
-
"experimentalBypassFor": [
|
|
6
|
-
{
|
|
7
|
-
"type": "header",
|
|
8
|
-
"key": "next-action"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"type": "header",
|
|
12
|
-
"key": "content-type",
|
|
13
|
-
"value": "multipart/form-data;.*"
|
|
14
|
-
}
|
|
15
|
-
],
|
|
16
|
-
"initialRevalidateSeconds": false,
|
|
17
|
-
"srcRoute": "/",
|
|
18
|
-
"dataRoute": "/index.rsc",
|
|
19
|
-
"allowHeader": [
|
|
20
|
-
"host",
|
|
21
|
-
"x-matched-path",
|
|
22
|
-
"x-prerender-revalidate",
|
|
23
|
-
"x-prerender-revalidate-if-generated",
|
|
24
|
-
"x-next-revalidated-tags",
|
|
25
|
-
"x-next-revalidate-tag-token"
|
|
26
|
-
]
|
|
27
|
-
},
|
|
28
|
-
"/_not-found": {
|
|
29
|
-
"initialStatus": 404,
|
|
30
|
-
"experimentalBypassFor": [
|
|
31
|
-
{
|
|
32
|
-
"type": "header",
|
|
33
|
-
"key": "next-action"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"type": "header",
|
|
37
|
-
"key": "content-type",
|
|
38
|
-
"value": "multipart/form-data;.*"
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
"initialRevalidateSeconds": false,
|
|
42
|
-
"srcRoute": "/_not-found",
|
|
43
|
-
"dataRoute": "/_not-found.rsc",
|
|
44
|
-
"allowHeader": [
|
|
45
|
-
"host",
|
|
46
|
-
"x-matched-path",
|
|
47
|
-
"x-prerender-revalidate",
|
|
48
|
-
"x-prerender-revalidate-if-generated",
|
|
49
|
-
"x-next-revalidated-tags",
|
|
50
|
-
"x-next-revalidate-tag-token"
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
"dynamicRoutes": {},
|
|
55
|
-
"notFoundRoutes": [],
|
|
56
|
-
"preview": {
|
|
57
|
-
"previewModeId": "b97036d702454105e0e0a0374f45f1f1",
|
|
58
|
-
"previewModeSigningKey": "c911a5963e97ad5a5566318cc48c4450206db55a9ebeeba238b4af42f73796d1",
|
|
59
|
-
"previewModeEncryptionKey": "7afd68b6fba6a2af6d05109f927edd362f7381aa2d6a69a0bcfdfc41b64ca06f"
|
|
60
|
-
}
|
|
61
|
-
}
|