vibeman 0.0.1 → 0.0.2
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/index.js +5 -7
- package/dist/runtime/api/.tsbuildinfo +1 -1
- package/dist/runtime/api/agent/agent-service.d.ts +11 -13
- package/dist/runtime/api/agent/agent-service.js +25 -31
- package/dist/runtime/api/agent/ai-providers/claude-code-adapter.d.ts +2 -2
- package/dist/runtime/api/agent/ai-providers/claude-code-adapter.js +25 -36
- package/dist/runtime/api/agent/ai-providers/codex-cli-provider.js +48 -14
- package/dist/runtime/api/agent/ai-providers/types.d.ts +2 -0
- package/dist/runtime/api/agent/codex-cli-provider.test.js +37 -0
- package/dist/runtime/api/agent/parsers.d.ts +1 -0
- package/dist/runtime/api/agent/parsers.js +75 -8
- package/dist/runtime/api/agent/prompt-service.d.ts +14 -1
- package/dist/runtime/api/agent/prompt-service.js +123 -14
- package/dist/runtime/api/agent/prompt-service.test.d.ts +1 -0
- package/dist/runtime/api/agent/prompt-service.test.js +230 -0
- package/dist/runtime/api/agent/routing-policy.d.ts +14 -14
- package/dist/runtime/api/api/routers/ai.d.ts +6 -6
- package/dist/runtime/api/api/routers/ai.js +2 -17
- package/dist/runtime/api/api/routers/executions.d.ts +5 -5
- package/dist/runtime/api/api/routers/executions.js +12 -21
- package/dist/runtime/api/api/routers/provider-config.d.ts +165 -0
- package/dist/runtime/api/api/routers/provider-config.js +252 -0
- package/dist/runtime/api/api/routers/tasks.d.ts +10 -10
- package/dist/runtime/api/api/routers/workflows.d.ts +15 -16
- package/dist/runtime/api/api/routers/workflows.js +28 -26
- package/dist/runtime/api/api/routers/worktrees.d.ts +4 -5
- package/dist/runtime/api/api/routers/worktrees.js +11 -11
- package/dist/runtime/api/api/trpc.d.ts +18 -18
- package/dist/runtime/api/index.js +2 -10
- package/dist/runtime/api/lib/local-config.d.ts +245 -0
- package/dist/runtime/api/lib/local-config.js +288 -0
- package/dist/runtime/api/lib/provider-detection.d.ts +59 -0
- package/dist/runtime/api/lib/provider-detection.js +244 -0
- package/dist/runtime/api/lib/server/bootstrap.d.ts +38 -0
- package/dist/runtime/api/lib/server/bootstrap.js +197 -0
- package/dist/runtime/api/lib/server/project-root.js +24 -1
- package/dist/runtime/api/lib/trpc/server.d.ts +124 -31
- package/dist/runtime/api/lib/trpc/server.js +8 -8
- package/dist/runtime/api/lib/trpc/ws-server.js +2 -2
- package/dist/runtime/api/router.d.ts +125 -32
- package/dist/runtime/api/router.js +9 -31
- package/dist/runtime/api/settings-service.js +2 -0
- package/dist/runtime/api/workflows/vibing-orchestrator.d.ts +8 -3
- package/dist/runtime/api/workflows/vibing-orchestrator.js +182 -183
- package/dist/runtime/web/.next/BUILD_ID +1 -1
- package/dist/runtime/web/.next/app-build-manifest.json +2 -2
- package/dist/runtime/web/.next/build-manifest.json +2 -2
- package/dist/runtime/web/.next/prerender-manifest.json +3 -3
- package/dist/runtime/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/runtime/web/.next/server/app/_not-found.html +2 -2
- package/dist/runtime/web/.next/server/app/_not-found.rsc +5 -5
- package/dist/runtime/web/.next/server/app/api/health/route.js +1 -1
- package/dist/runtime/web/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
- package/dist/runtime/web/.next/server/app/api/images/[...path]/route_client-reference-manifest.js +1 -1
- package/dist/runtime/web/.next/server/app/api/upload/route_client-reference-manifest.js +1 -1
- package/dist/runtime/web/.next/server/app/index.html +2 -2
- package/dist/runtime/web/.next/server/app/index.rsc +6 -6
- package/dist/runtime/web/.next/server/app/page.js +3 -3
- package/dist/runtime/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/runtime/web/.next/server/chunks/458.js +1 -1
- package/dist/runtime/web/.next/server/pages/404.html +2 -2
- package/dist/runtime/web/.next/server/pages/500.html +1 -1
- package/dist/runtime/web/.next/server/pages-manifest.json +1 -1
- package/dist/runtime/web/.next/server/server-reference-manifest.json +1 -1
- package/dist/runtime/web/.next/static/chunks/app/{layout-dc0cfd29075b2160.js → layout-8435322f09fd0975.js} +1 -1
- package/dist/runtime/web/.next/static/chunks/app/page-8c3ba579efc6f918.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -1
- package/dist/runtime/web/.next/static/chunks/app/page-f34a8b196b18850b.js +0 -1
- /package/dist/runtime/web/.next/static/{1HR8N0rJkCvFRtbTPJMyH → mRpNgPfbYR_0wrODzlg_4}/_buildManifest.js +0 -0
- /package/dist/runtime/web/.next/static/{1HR8N0rJkCvFRtbTPJMyH → mRpNgPfbYR_0wrODzlg_4}/_ssgManifest.js +0 -0
|
@@ -3,11 +3,11 @@ import type { GitService } from '../../vcs/git-service.js';
|
|
|
3
3
|
export declare function buildTaskRoutes(taskService: TaskService, gitService?: GitService): {
|
|
4
4
|
readonly listTasks: import("@trpc/server").TRPCQueryProcedure<{
|
|
5
5
|
input: {
|
|
6
|
+
status?: "review" | "in-progress" | "backlog" | "done" | undefined;
|
|
6
7
|
type?: "feature" | "bug" | "chore" | "refactor" | "test" | "doc" | undefined;
|
|
7
|
-
status?: "backlog" | "in-progress" | "review" | "done" | undefined;
|
|
8
|
-
priority?: "low" | "medium" | "high" | undefined;
|
|
9
|
-
search?: string | undefined;
|
|
10
8
|
tags?: string[] | undefined;
|
|
9
|
+
priority?: "high" | "medium" | "low" | undefined;
|
|
10
|
+
search?: string | undefined;
|
|
11
11
|
includeDeleted?: boolean | undefined;
|
|
12
12
|
onlyDeleted?: boolean | undefined;
|
|
13
13
|
} | undefined;
|
|
@@ -23,15 +23,15 @@ export declare function buildTaskRoutes(taskService: TaskService, gitService?: G
|
|
|
23
23
|
}>;
|
|
24
24
|
readonly createTask: import("@trpc/server").TRPCMutationProcedure<{
|
|
25
25
|
input: {
|
|
26
|
-
type: "feature" | "bug" | "chore" | "refactor" | "test" | "doc";
|
|
27
26
|
title: string;
|
|
27
|
+
type: "feature" | "bug" | "chore" | "refactor" | "test" | "doc";
|
|
28
28
|
content: string;
|
|
29
|
-
status?: "
|
|
30
|
-
priority?: "low" | "medium" | "high" | undefined;
|
|
29
|
+
status?: "review" | "in-progress" | "backlog" | "done" | undefined;
|
|
31
30
|
id?: string | undefined;
|
|
32
31
|
tags?: string[] | undefined;
|
|
33
32
|
due_date?: string | undefined;
|
|
34
33
|
assignee?: string[] | undefined;
|
|
34
|
+
priority?: "high" | "medium" | "low" | undefined;
|
|
35
35
|
comments?: string[] | undefined;
|
|
36
36
|
};
|
|
37
37
|
output: import("../../types/index.js").Task;
|
|
@@ -40,13 +40,13 @@ export declare function buildTaskRoutes(taskService: TaskService, gitService?: G
|
|
|
40
40
|
readonly updateTask: import("@trpc/server").TRPCMutationProcedure<{
|
|
41
41
|
input: {
|
|
42
42
|
id: string;
|
|
43
|
-
|
|
44
|
-
status?: "backlog" | "in-progress" | "review" | "done" | undefined;
|
|
45
|
-
priority?: "low" | "medium" | "high" | undefined;
|
|
43
|
+
status?: "review" | "in-progress" | "backlog" | "done" | undefined;
|
|
46
44
|
title?: string | undefined;
|
|
45
|
+
type?: "feature" | "bug" | "chore" | "refactor" | "test" | "doc" | undefined;
|
|
47
46
|
tags?: string[] | undefined;
|
|
48
47
|
due_date?: string | undefined;
|
|
49
48
|
assignee?: string[] | undefined;
|
|
49
|
+
priority?: "high" | "medium" | "low" | undefined;
|
|
50
50
|
comments?: string[] | undefined;
|
|
51
51
|
content?: string | undefined;
|
|
52
52
|
deleted_at?: string | undefined;
|
|
@@ -65,7 +65,7 @@ export declare function buildTaskRoutes(taskService: TaskService, gitService?: G
|
|
|
65
65
|
}>;
|
|
66
66
|
readonly moveTask: import("@trpc/server").TRPCMutationProcedure<{
|
|
67
67
|
input: {
|
|
68
|
-
status: "
|
|
68
|
+
status: "review" | "in-progress" | "backlog" | "done";
|
|
69
69
|
id: string;
|
|
70
70
|
};
|
|
71
71
|
output: import("../../types/index.js").Task;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import type { VibingOrchestrator } from '../../workflows/vibing-orchestrator.js';
|
|
2
2
|
type Deps = {
|
|
3
|
-
|
|
4
|
-
requireOrchestratorSync: () => VibingOrchestrator;
|
|
3
|
+
vibingOrchestrator: VibingOrchestrator;
|
|
5
4
|
};
|
|
6
|
-
export declare function buildWorkflowRoutes({
|
|
5
|
+
export declare function buildWorkflowRoutes({ vibingOrchestrator }: Deps): {
|
|
7
6
|
readonly updateWorkflowOptions: import("@trpc/server").TRPCMutationProcedure<{
|
|
8
7
|
input: {
|
|
8
|
+
workflowId: string;
|
|
9
9
|
config: {
|
|
10
|
+
autoCommit?: boolean | undefined;
|
|
11
|
+
createPR?: boolean | undefined;
|
|
10
12
|
autoQualityChecks?: boolean | undefined;
|
|
11
13
|
requireHumanApproval?: boolean | undefined;
|
|
12
|
-
aiCodeReview?: boolean | undefined;
|
|
13
|
-
autoCommit?: boolean | undefined;
|
|
14
14
|
stepByStepMode?: boolean | undefined;
|
|
15
|
-
createPR?: boolean | undefined;
|
|
16
15
|
autoMerge?: boolean | undefined;
|
|
16
|
+
aiCodeReview?: boolean | undefined;
|
|
17
17
|
aiRoutingOverrides?: {
|
|
18
18
|
execute_task?: {
|
|
19
19
|
provider?: string | undefined;
|
|
@@ -23,17 +23,16 @@ export declare function buildWorkflowRoutes({ requireOrchestrator, requireOrches
|
|
|
23
23
|
provider?: string | undefined;
|
|
24
24
|
model?: string | undefined;
|
|
25
25
|
} | undefined;
|
|
26
|
-
|
|
26
|
+
ai_merge?: {
|
|
27
27
|
provider?: string | undefined;
|
|
28
28
|
model?: string | undefined;
|
|
29
29
|
} | undefined;
|
|
30
|
-
|
|
30
|
+
ai_codereview?: {
|
|
31
31
|
provider?: string | undefined;
|
|
32
32
|
model?: string | undefined;
|
|
33
33
|
} | undefined;
|
|
34
34
|
} | undefined;
|
|
35
35
|
};
|
|
36
|
-
workflowId: string;
|
|
37
36
|
};
|
|
38
37
|
output: {
|
|
39
38
|
readonly success: true;
|
|
@@ -44,13 +43,13 @@ export declare function buildWorkflowRoutes({ requireOrchestrator, requireOrches
|
|
|
44
43
|
input: {
|
|
45
44
|
taskId: string;
|
|
46
45
|
config?: {
|
|
46
|
+
autoCommit?: boolean | undefined;
|
|
47
|
+
createPR?: boolean | undefined;
|
|
47
48
|
autoQualityChecks?: boolean | undefined;
|
|
48
49
|
requireHumanApproval?: boolean | undefined;
|
|
49
|
-
aiCodeReview?: boolean | undefined;
|
|
50
|
-
autoCommit?: boolean | undefined;
|
|
51
50
|
stepByStepMode?: boolean | undefined;
|
|
52
|
-
createPR?: boolean | undefined;
|
|
53
51
|
autoMerge?: boolean | undefined;
|
|
52
|
+
aiCodeReview?: boolean | undefined;
|
|
54
53
|
aiRoutingOverrides?: {
|
|
55
54
|
execute_task?: {
|
|
56
55
|
provider?: string | undefined;
|
|
@@ -60,11 +59,11 @@ export declare function buildWorkflowRoutes({ requireOrchestrator, requireOrches
|
|
|
60
59
|
provider?: string | undefined;
|
|
61
60
|
model?: string | undefined;
|
|
62
61
|
} | undefined;
|
|
63
|
-
|
|
62
|
+
ai_merge?: {
|
|
64
63
|
provider?: string | undefined;
|
|
65
64
|
model?: string | undefined;
|
|
66
65
|
} | undefined;
|
|
67
|
-
|
|
66
|
+
ai_codereview?: {
|
|
68
67
|
provider?: string | undefined;
|
|
69
68
|
model?: string | undefined;
|
|
70
69
|
} | undefined;
|
|
@@ -188,12 +187,12 @@ export declare function buildWorkflowRoutes({ requireOrchestrator, requireOrches
|
|
|
188
187
|
output: import("../../types/index.js").VibingExecution | null;
|
|
189
188
|
meta: object;
|
|
190
189
|
}>;
|
|
191
|
-
readonly
|
|
190
|
+
readonly aiReviewCode: import("@trpc/server").TRPCMutationProcedure<{
|
|
192
191
|
input: {
|
|
193
192
|
taskId: string;
|
|
194
193
|
provider?: string | undefined;
|
|
195
|
-
model?: string | undefined;
|
|
196
194
|
workflowId?: string | undefined;
|
|
195
|
+
model?: string | undefined;
|
|
197
196
|
reviewContext?: string | undefined;
|
|
198
197
|
};
|
|
199
198
|
output: {
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { on, EventEmitter } from 'events';
|
|
3
3
|
import { publicProcedure } from '../trpc.js';
|
|
4
4
|
import { TRPCError } from '@trpc/server';
|
|
5
|
-
export function buildWorkflowRoutes({
|
|
5
|
+
export function buildWorkflowRoutes({ vibingOrchestrator }) {
|
|
6
6
|
const OperationOverrideSchema = z.object({
|
|
7
7
|
provider: z.string().optional(),
|
|
8
8
|
model: z.string().optional(),
|
|
@@ -30,14 +30,14 @@ export function buildWorkflowRoutes({ requireOrchestrator, requireOrchestratorSy
|
|
|
30
30
|
updateWorkflowOptions: publicProcedure
|
|
31
31
|
.input(z.object({ workflowId: z.string(), config: WorkflowConfig }))
|
|
32
32
|
.mutation(async ({ input }) => {
|
|
33
|
-
const orchestrator =
|
|
33
|
+
const orchestrator = vibingOrchestrator;
|
|
34
34
|
await orchestrator.updateWorkflowOptions(input.workflowId, input.config);
|
|
35
35
|
return { success: true };
|
|
36
36
|
}),
|
|
37
37
|
startWorkflow: publicProcedure
|
|
38
38
|
.input(z.object({ taskId: z.string(), config: WorkflowConfigOpt }))
|
|
39
39
|
.mutation(async ({ input }) => {
|
|
40
|
-
const orchestrator =
|
|
40
|
+
const orchestrator = vibingOrchestrator;
|
|
41
41
|
const workflowId = await orchestrator.startWorkflow(input.taskId, input.config || {});
|
|
42
42
|
return { workflowId };
|
|
43
43
|
}),
|
|
@@ -45,7 +45,7 @@ export function buildWorkflowRoutes({ requireOrchestrator, requireOrchestratorSy
|
|
|
45
45
|
.input(z.object({ workflowId: z.string() }))
|
|
46
46
|
.mutation(async ({ input }) => {
|
|
47
47
|
try {
|
|
48
|
-
const orchestrator =
|
|
48
|
+
const orchestrator = vibingOrchestrator;
|
|
49
49
|
await orchestrator.continueWorkflow(input.workflowId);
|
|
50
50
|
return { success: true };
|
|
51
51
|
}
|
|
@@ -58,7 +58,7 @@ export function buildWorkflowRoutes({ requireOrchestrator, requireOrchestratorSy
|
|
|
58
58
|
runValidation: publicProcedure
|
|
59
59
|
.input(z.object({ workflowId: z.string() }))
|
|
60
60
|
.mutation(async ({ input }) => {
|
|
61
|
-
const orchestrator =
|
|
61
|
+
const orchestrator = vibingOrchestrator;
|
|
62
62
|
await orchestrator.runValidation(input.workflowId);
|
|
63
63
|
return { success: true };
|
|
64
64
|
}),
|
|
@@ -69,7 +69,7 @@ export function buildWorkflowRoutes({ requireOrchestrator, requireOrchestratorSy
|
|
|
69
69
|
model: z.string().optional(),
|
|
70
70
|
}))
|
|
71
71
|
.mutation(async ({ input }) => {
|
|
72
|
-
const orchestrator =
|
|
72
|
+
const orchestrator = vibingOrchestrator;
|
|
73
73
|
await orchestrator.runMerge(input.workflowId, {
|
|
74
74
|
provider: input.provider,
|
|
75
75
|
model: input.model,
|
|
@@ -79,14 +79,14 @@ export function buildWorkflowRoutes({ requireOrchestrator, requireOrchestratorSy
|
|
|
79
79
|
runCleanup: publicProcedure
|
|
80
80
|
.input(z.object({ workflowId: z.string() }))
|
|
81
81
|
.mutation(async ({ input }) => {
|
|
82
|
-
const orchestrator =
|
|
82
|
+
const orchestrator = vibingOrchestrator;
|
|
83
83
|
await orchestrator.runCleanup(input.workflowId);
|
|
84
84
|
return { success: true };
|
|
85
85
|
}),
|
|
86
86
|
pauseWorkflow: publicProcedure
|
|
87
87
|
.input(z.object({ workflowId: z.string() }))
|
|
88
88
|
.mutation(async ({ input }) => {
|
|
89
|
-
const orchestrator =
|
|
89
|
+
const orchestrator = vibingOrchestrator;
|
|
90
90
|
await orchestrator.pauseWorkflow(input.workflowId);
|
|
91
91
|
return { success: true };
|
|
92
92
|
}),
|
|
@@ -97,7 +97,7 @@ export function buildWorkflowRoutes({ requireOrchestrator, requireOrchestratorSy
|
|
|
97
97
|
force: z.boolean().optional(),
|
|
98
98
|
}))
|
|
99
99
|
.mutation(async ({ input }) => {
|
|
100
|
-
const orchestrator =
|
|
100
|
+
const orchestrator = vibingOrchestrator;
|
|
101
101
|
await orchestrator.resetWorkflow(input.workflowId, {
|
|
102
102
|
deleteWorktree: input.deleteWorktree,
|
|
103
103
|
force: input.force,
|
|
@@ -107,14 +107,14 @@ export function buildWorkflowRoutes({ requireOrchestrator, requireOrchestratorSy
|
|
|
107
107
|
approveWorkflow: publicProcedure
|
|
108
108
|
.input(z.object({ workflowId: z.string(), comments: z.string().optional() }))
|
|
109
109
|
.mutation(async ({ input }) => {
|
|
110
|
-
const orchestrator =
|
|
110
|
+
const orchestrator = vibingOrchestrator;
|
|
111
111
|
await orchestrator.approveWorkflow(input.workflowId);
|
|
112
112
|
return { success: true };
|
|
113
113
|
}),
|
|
114
114
|
rejectWorkflow: publicProcedure
|
|
115
115
|
.input(z.object({ workflowId: z.string(), feedback: z.string() }))
|
|
116
116
|
.mutation(async ({ input }) => {
|
|
117
|
-
const orchestrator =
|
|
117
|
+
const orchestrator = vibingOrchestrator;
|
|
118
118
|
await orchestrator.rejectWorkflow(input.workflowId, input.feedback);
|
|
119
119
|
return { success: true };
|
|
120
120
|
}),
|
|
@@ -122,7 +122,7 @@ export function buildWorkflowRoutes({ requireOrchestrator, requireOrchestratorSy
|
|
|
122
122
|
.input(z.object({ taskId: z.string().optional() }).optional())
|
|
123
123
|
.subscription(async function* (opts) {
|
|
124
124
|
const input = opts.input;
|
|
125
|
-
const orchestrator =
|
|
125
|
+
const orchestrator = vibingOrchestrator;
|
|
126
126
|
const proxy = new EventEmitter();
|
|
127
127
|
const handleStarted = (workflow) => {
|
|
128
128
|
if (!input?.taskId || workflow.taskId === input.taskId)
|
|
@@ -208,22 +208,22 @@ export function buildWorkflowRoutes({ requireOrchestrator, requireOrchestratorSy
|
|
|
208
208
|
getWorkflow: publicProcedure
|
|
209
209
|
.input(z.object({ workflowId: z.string() }))
|
|
210
210
|
.query(async ({ input }) => {
|
|
211
|
-
const orchestrator =
|
|
211
|
+
const orchestrator = vibingOrchestrator;
|
|
212
212
|
return orchestrator.getWorkflow(input.workflowId);
|
|
213
213
|
}),
|
|
214
214
|
getWorkflowsByTaskId: publicProcedure
|
|
215
215
|
.input(z.object({ taskId: z.string() }))
|
|
216
216
|
.query(async ({ input }) => {
|
|
217
|
-
const orchestrator =
|
|
217
|
+
const orchestrator = vibingOrchestrator;
|
|
218
218
|
return orchestrator.getTaskWorkflows(input.taskId);
|
|
219
219
|
}),
|
|
220
220
|
getLatestWorkflowByTaskId: publicProcedure
|
|
221
221
|
.input(z.object({ taskId: z.string() }))
|
|
222
222
|
.query(async ({ input }) => {
|
|
223
|
-
const orchestrator =
|
|
223
|
+
const orchestrator = vibingOrchestrator;
|
|
224
224
|
return orchestrator.getLatestWorkflowByTask(input.taskId);
|
|
225
225
|
}),
|
|
226
|
-
|
|
226
|
+
aiReviewCode: publicProcedure
|
|
227
227
|
.input(z.object({
|
|
228
228
|
taskId: z.string(),
|
|
229
229
|
workflowId: z.string().optional(),
|
|
@@ -232,31 +232,33 @@ export function buildWorkflowRoutes({ requireOrchestrator, requireOrchestratorSy
|
|
|
232
232
|
model: z.string().optional(),
|
|
233
233
|
}))
|
|
234
234
|
.mutation(async ({ input }) => {
|
|
235
|
-
const orchestrator =
|
|
236
|
-
|
|
235
|
+
const orchestrator = vibingOrchestrator;
|
|
236
|
+
const overrides = input.provider || input.model
|
|
237
|
+
? { provider: input.provider, model: input.model }
|
|
238
|
+
: undefined;
|
|
239
|
+
return await orchestrator.aiReviewCode(input.taskId, input.reviewContext, {
|
|
237
240
|
workflowId: input.workflowId,
|
|
238
|
-
|
|
239
|
-
model: input.model,
|
|
241
|
+
overrides,
|
|
240
242
|
});
|
|
241
243
|
}),
|
|
242
244
|
approveAndContinueReview: publicProcedure
|
|
243
245
|
.input(z.object({ workflowId: z.string() }))
|
|
244
246
|
.mutation(async ({ input }) => {
|
|
245
|
-
const orchestrator =
|
|
247
|
+
const orchestrator = vibingOrchestrator;
|
|
246
248
|
await orchestrator.approveAndContinueReview(input.workflowId);
|
|
247
249
|
return { success: true };
|
|
248
250
|
}),
|
|
249
251
|
markCompleted: publicProcedure
|
|
250
252
|
.input(z.object({ workflowId: z.string() }))
|
|
251
253
|
.mutation(async ({ input }) => {
|
|
252
|
-
const orchestrator =
|
|
254
|
+
const orchestrator = vibingOrchestrator;
|
|
253
255
|
await orchestrator.markWorkflowCompleted(input.workflowId);
|
|
254
256
|
return { success: true };
|
|
255
257
|
}),
|
|
256
258
|
checkWorktreeStatus: publicProcedure
|
|
257
259
|
.input(z.object({ workflowId: z.string() }))
|
|
258
260
|
.mutation(async ({ input }) => {
|
|
259
|
-
const orchestrator =
|
|
261
|
+
const orchestrator = vibingOrchestrator;
|
|
260
262
|
return await orchestrator.checkWorktreeStatus(input.workflowId);
|
|
261
263
|
}),
|
|
262
264
|
rerunImplementation: publicProcedure
|
|
@@ -267,7 +269,7 @@ export function buildWorkflowRoutes({ requireOrchestrator, requireOrchestratorSy
|
|
|
267
269
|
model: z.string().optional(),
|
|
268
270
|
}))
|
|
269
271
|
.mutation(async ({ input }) => {
|
|
270
|
-
const orchestrator =
|
|
272
|
+
const orchestrator = vibingOrchestrator;
|
|
271
273
|
await orchestrator.rerunImplementation(input.workflowId, input.feedback, {
|
|
272
274
|
provider: input.provider,
|
|
273
275
|
model: input.model,
|
|
@@ -277,7 +279,7 @@ export function buildWorkflowRoutes({ requireOrchestrator, requireOrchestratorSy
|
|
|
277
279
|
skipToNextPhase: publicProcedure
|
|
278
280
|
.input(z.object({ workflowId: z.string() }))
|
|
279
281
|
.mutation(async ({ input }) => {
|
|
280
|
-
const orchestrator =
|
|
282
|
+
const orchestrator = vibingOrchestrator;
|
|
281
283
|
await orchestrator.skipToNextPhase(input.workflowId);
|
|
282
284
|
return { success: true };
|
|
283
285
|
}),
|
|
@@ -300,7 +302,7 @@ export function buildWorkflowRoutes({ requireOrchestrator, requireOrchestratorSy
|
|
|
300
302
|
]),
|
|
301
303
|
}))
|
|
302
304
|
.mutation(async ({ input }) => {
|
|
303
|
-
const orchestrator =
|
|
305
|
+
const orchestrator = vibingOrchestrator;
|
|
304
306
|
await orchestrator.rerunPhase(input.workflowId, input.phase);
|
|
305
307
|
return { success: true };
|
|
306
308
|
}),
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { VibingOrchestrator } from '../../workflows/vibing-orchestrator.js';
|
|
2
2
|
type Deps = {
|
|
3
|
-
|
|
4
|
-
requireOrchestratorSync: () => VibingOrchestrator;
|
|
3
|
+
vibingOrchestrator: VibingOrchestrator;
|
|
5
4
|
};
|
|
6
|
-
export declare function buildWorktreeRoutes({
|
|
5
|
+
export declare function buildWorktreeRoutes({ vibingOrchestrator }: Deps): {
|
|
7
6
|
readonly listWorktrees: import("@trpc/server").TRPCQueryProcedure<{
|
|
8
7
|
input: void;
|
|
9
8
|
output: (import("../../types/index.js").WorktreeInfo & {
|
|
@@ -88,9 +87,9 @@ export declare function buildWorktreeRoutes({ requireOrchestrator, requireOrches
|
|
|
88
87
|
readonly cleanupWorktree: import("@trpc/server").TRPCMutationProcedure<{
|
|
89
88
|
input: {
|
|
90
89
|
isConnectedToTask: boolean;
|
|
91
|
-
worktreePath?: string | undefined;
|
|
92
|
-
force?: boolean | undefined;
|
|
93
90
|
taskId?: string | undefined;
|
|
91
|
+
force?: boolean | undefined;
|
|
92
|
+
worktreePath?: string | undefined;
|
|
94
93
|
branchName?: string | undefined;
|
|
95
94
|
};
|
|
96
95
|
output: {
|
|
@@ -2,19 +2,19 @@ import { z } from 'zod';
|
|
|
2
2
|
import { publicProcedure } from '../trpc.js';
|
|
3
3
|
import { TaskIdSchema, WorktreePathSchema, withErrors } from '../router-helpers.js';
|
|
4
4
|
import { log } from '../../lib/logger.js';
|
|
5
|
-
export function buildWorktreeRoutes({
|
|
5
|
+
export function buildWorktreeRoutes({ vibingOrchestrator }) {
|
|
6
6
|
return {
|
|
7
7
|
listWorktrees: publicProcedure.query(withErrors('list worktrees', 'router:listWorktrees', async () => {
|
|
8
|
-
const orchestrator =
|
|
8
|
+
const orchestrator = vibingOrchestrator;
|
|
9
9
|
return await orchestrator.listWorktrees();
|
|
10
10
|
})),
|
|
11
11
|
syncWorktreeState: publicProcedure.mutation(withErrors('sync worktree state', 'router:syncWorktreeState', async () => {
|
|
12
|
-
const orchestrator =
|
|
12
|
+
const orchestrator = vibingOrchestrator;
|
|
13
13
|
await orchestrator.syncWorktreeState();
|
|
14
14
|
return { success: true, message: 'Worktree state synchronized' };
|
|
15
15
|
})),
|
|
16
16
|
getWorktreeInfo: publicProcedure.input(TaskIdSchema).query(async ({ input }) => {
|
|
17
|
-
const orchestrator =
|
|
17
|
+
const orchestrator = vibingOrchestrator;
|
|
18
18
|
const worktree = orchestrator.getWorktreeInfo(input.taskId);
|
|
19
19
|
if (!worktree)
|
|
20
20
|
return null;
|
|
@@ -22,7 +22,7 @@ export function buildWorktreeRoutes({ requireOrchestrator, requireOrchestratorSy
|
|
|
22
22
|
return serializableWorktree;
|
|
23
23
|
}),
|
|
24
24
|
createWorktree: publicProcedure.input(TaskIdSchema).mutation(async ({ input }) => {
|
|
25
|
-
const orchestrator =
|
|
25
|
+
const orchestrator = vibingOrchestrator;
|
|
26
26
|
const worktree = await orchestrator.createWorktree(input.taskId);
|
|
27
27
|
const { git, ...serializableWorktree } = worktree;
|
|
28
28
|
return serializableWorktree;
|
|
@@ -30,7 +30,7 @@ export function buildWorktreeRoutes({ requireOrchestrator, requireOrchestratorSy
|
|
|
30
30
|
deleteWorktree: publicProcedure
|
|
31
31
|
.input(z.object({ taskId: z.string(), force: z.coerce.boolean().optional() }))
|
|
32
32
|
.mutation(async ({ input }) => {
|
|
33
|
-
const orchestrator =
|
|
33
|
+
const orchestrator = vibingOrchestrator;
|
|
34
34
|
await orchestrator.deleteWorktree(input.taskId, input.force || false);
|
|
35
35
|
if (orchestrator) {
|
|
36
36
|
await orchestrator.removeWorkflowsByTask(input.taskId);
|
|
@@ -38,13 +38,13 @@ export function buildWorktreeRoutes({ requireOrchestrator, requireOrchestratorSy
|
|
|
38
38
|
return { success: true };
|
|
39
39
|
}),
|
|
40
40
|
openInEditor: publicProcedure.input(WorktreePathSchema).mutation(withErrors('open in editor', 'router:openInEditor', async ({ input }) => {
|
|
41
|
-
const orchestrator =
|
|
41
|
+
const orchestrator = vibingOrchestrator;
|
|
42
42
|
await orchestrator.openInEditor(input.worktreePath);
|
|
43
43
|
// Ensure we return a clean, serializable object
|
|
44
44
|
return { success: true };
|
|
45
45
|
})),
|
|
46
46
|
openInTerminal: publicProcedure.input(WorktreePathSchema).mutation(withErrors('open in terminal', 'router:openInTerminal', async ({ input }) => {
|
|
47
|
-
const orchestrator =
|
|
47
|
+
const orchestrator = vibingOrchestrator;
|
|
48
48
|
await orchestrator.openInTerminal(input.worktreePath);
|
|
49
49
|
// Ensure we return a clean, serializable object
|
|
50
50
|
return { success: true };
|
|
@@ -53,14 +53,14 @@ export function buildWorktreeRoutes({ requireOrchestrator, requireOrchestratorSy
|
|
|
53
53
|
createWorktreePR: publicProcedure
|
|
54
54
|
.input(z.object({ taskId: z.string(), baseBranch: z.string().optional().default('main') }))
|
|
55
55
|
.mutation(async ({ input }) => {
|
|
56
|
-
const orchestrator =
|
|
56
|
+
const orchestrator = vibingOrchestrator;
|
|
57
57
|
log.warn('Deprecated route used: createWorktreePR; prefer createPullRequest', { taskId: input.taskId }, 'router:createWorktreePR');
|
|
58
58
|
return await orchestrator.createPullRequest(input.taskId, input.baseBranch);
|
|
59
59
|
}),
|
|
60
60
|
createPullRequest: publicProcedure
|
|
61
61
|
.input(z.object({ taskId: z.string(), baseBranch: z.string().optional().default('main') }))
|
|
62
62
|
.mutation(withErrors('create pull request', 'router:createPullRequest', async ({ input }) => {
|
|
63
|
-
const orchestrator =
|
|
63
|
+
const orchestrator = vibingOrchestrator;
|
|
64
64
|
return await orchestrator.createPullRequest(input.taskId, input.baseBranch);
|
|
65
65
|
})),
|
|
66
66
|
cleanupWorktree: publicProcedure
|
|
@@ -72,7 +72,7 @@ export function buildWorktreeRoutes({ requireOrchestrator, requireOrchestratorSy
|
|
|
72
72
|
force: z.coerce.boolean().optional().default(false),
|
|
73
73
|
}))
|
|
74
74
|
.mutation(async ({ input }) => {
|
|
75
|
-
const orchestrator =
|
|
75
|
+
const orchestrator = vibingOrchestrator;
|
|
76
76
|
await orchestrator.cleanupWorktree(input);
|
|
77
77
|
return { success: true };
|
|
78
78
|
}),
|
|
@@ -31,26 +31,26 @@ export declare const TaskCreateSchema: z.ZodObject<{
|
|
|
31
31
|
comments: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
32
32
|
content: z.ZodString;
|
|
33
33
|
}, "strip", z.ZodTypeAny, {
|
|
34
|
-
|
|
35
|
-
status: "backlog" | "in-progress" | "review" | "done";
|
|
36
|
-
priority: "low" | "medium" | "high";
|
|
34
|
+
status: "review" | "in-progress" | "backlog" | "done";
|
|
37
35
|
title: string;
|
|
36
|
+
type: "feature" | "bug" | "chore" | "refactor" | "test" | "doc";
|
|
38
37
|
tags: string[];
|
|
39
38
|
assignee: string[];
|
|
39
|
+
priority: "high" | "medium" | "low";
|
|
40
40
|
comments: string[];
|
|
41
41
|
content: string;
|
|
42
42
|
id?: string | undefined;
|
|
43
43
|
due_date?: string | undefined;
|
|
44
44
|
}, {
|
|
45
|
-
type: "feature" | "bug" | "chore" | "refactor" | "test" | "doc";
|
|
46
45
|
title: string;
|
|
46
|
+
type: "feature" | "bug" | "chore" | "refactor" | "test" | "doc";
|
|
47
47
|
content: string;
|
|
48
|
-
status?: "
|
|
49
|
-
priority?: "low" | "medium" | "high" | undefined;
|
|
48
|
+
status?: "review" | "in-progress" | "backlog" | "done" | undefined;
|
|
50
49
|
id?: string | undefined;
|
|
51
50
|
tags?: string[] | undefined;
|
|
52
51
|
due_date?: string | undefined;
|
|
53
52
|
assignee?: string[] | undefined;
|
|
53
|
+
priority?: "high" | "medium" | "low" | undefined;
|
|
54
54
|
comments?: string[] | undefined;
|
|
55
55
|
}>;
|
|
56
56
|
export declare const TaskUpdateSchema: z.ZodObject<{
|
|
@@ -68,25 +68,25 @@ export declare const TaskUpdateSchema: z.ZodObject<{
|
|
|
68
68
|
deleted_at: z.ZodOptional<z.ZodString>;
|
|
69
69
|
}, "strip", z.ZodTypeAny, {
|
|
70
70
|
id: string;
|
|
71
|
-
|
|
72
|
-
status?: "backlog" | "in-progress" | "review" | "done" | undefined;
|
|
73
|
-
priority?: "low" | "medium" | "high" | undefined;
|
|
71
|
+
status?: "review" | "in-progress" | "backlog" | "done" | undefined;
|
|
74
72
|
title?: string | undefined;
|
|
73
|
+
type?: "feature" | "bug" | "chore" | "refactor" | "test" | "doc" | undefined;
|
|
75
74
|
tags?: string[] | undefined;
|
|
76
75
|
due_date?: string | undefined;
|
|
77
76
|
assignee?: string[] | undefined;
|
|
77
|
+
priority?: "high" | "medium" | "low" | undefined;
|
|
78
78
|
comments?: string[] | undefined;
|
|
79
79
|
content?: string | undefined;
|
|
80
80
|
deleted_at?: string | undefined;
|
|
81
81
|
}, {
|
|
82
82
|
id: string;
|
|
83
|
-
|
|
84
|
-
status?: "backlog" | "in-progress" | "review" | "done" | undefined;
|
|
85
|
-
priority?: "low" | "medium" | "high" | undefined;
|
|
83
|
+
status?: "review" | "in-progress" | "backlog" | "done" | undefined;
|
|
86
84
|
title?: string | undefined;
|
|
85
|
+
type?: "feature" | "bug" | "chore" | "refactor" | "test" | "doc" | undefined;
|
|
87
86
|
tags?: string[] | undefined;
|
|
88
87
|
due_date?: string | undefined;
|
|
89
88
|
assignee?: string[] | undefined;
|
|
89
|
+
priority?: "high" | "medium" | "low" | undefined;
|
|
90
90
|
comments?: string[] | undefined;
|
|
91
91
|
content?: string | undefined;
|
|
92
92
|
deleted_at?: string | undefined;
|
|
@@ -100,19 +100,19 @@ export declare const TaskFilterSchema: z.ZodObject<{
|
|
|
100
100
|
includeDeleted: z.ZodOptional<z.ZodBoolean>;
|
|
101
101
|
onlyDeleted: z.ZodOptional<z.ZodBoolean>;
|
|
102
102
|
}, "strip", z.ZodTypeAny, {
|
|
103
|
+
status?: "review" | "in-progress" | "backlog" | "done" | undefined;
|
|
103
104
|
type?: "feature" | "bug" | "chore" | "refactor" | "test" | "doc" | undefined;
|
|
104
|
-
status?: "backlog" | "in-progress" | "review" | "done" | undefined;
|
|
105
|
-
priority?: "low" | "medium" | "high" | undefined;
|
|
106
|
-
search?: string | undefined;
|
|
107
105
|
tags?: string[] | undefined;
|
|
106
|
+
priority?: "high" | "medium" | "low" | undefined;
|
|
107
|
+
search?: string | undefined;
|
|
108
108
|
includeDeleted?: boolean | undefined;
|
|
109
109
|
onlyDeleted?: boolean | undefined;
|
|
110
110
|
}, {
|
|
111
|
+
status?: "review" | "in-progress" | "backlog" | "done" | undefined;
|
|
111
112
|
type?: "feature" | "bug" | "chore" | "refactor" | "test" | "doc" | undefined;
|
|
112
|
-
status?: "backlog" | "in-progress" | "review" | "done" | undefined;
|
|
113
|
-
priority?: "low" | "medium" | "high" | undefined;
|
|
114
|
-
search?: string | undefined;
|
|
115
113
|
tags?: string[] | undefined;
|
|
114
|
+
priority?: "high" | "medium" | "low" | undefined;
|
|
115
|
+
search?: string | undefined;
|
|
116
116
|
includeDeleted?: boolean | undefined;
|
|
117
117
|
onlyDeleted?: boolean | undefined;
|
|
118
118
|
}>;
|
|
@@ -100,16 +100,8 @@ try {
|
|
|
100
100
|
if (isMain) {
|
|
101
101
|
const host = process.env.HOST || 'localhost';
|
|
102
102
|
const resolveApiPort = async () => {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
if (Number.isFinite(explicit) && explicit > 0)
|
|
106
|
-
return explicit;
|
|
107
|
-
// If PORT (web) is set, use web+1
|
|
108
|
-
const webPort = getNumberEnv('PORT', 0);
|
|
109
|
-
if (webPort > 0)
|
|
110
|
-
return webPort + 1;
|
|
111
|
-
// Default dev behavior: assume web on 3000, so API on 3001
|
|
112
|
-
return 3001;
|
|
103
|
+
const port = getNumberEnv('PORT', 3000);
|
|
104
|
+
return port + 1;
|
|
113
105
|
};
|
|
114
106
|
(async () => {
|
|
115
107
|
const port = await resolveApiPort();
|