dev3000 0.0.121 → 0.0.124
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/cli.js +19 -0
- package/dist/cli.js.map +1 -1
- package/dist/dev-environment.d.ts.map +1 -1
- package/dist/dev-environment.js +11 -0
- package/dist/dev-environment.js.map +1 -1
- package/dist/utils/log-filename.d.ts.map +1 -1
- package/dist/utils/log-filename.js +8 -3
- package/dist/utils/log-filename.js.map +1 -1
- package/mcp-server/app/mcp/route.ts +81 -7
- package/mcp-server/app/mcp/tools.ts +33 -3
- package/mcp-server/next-env.d.ts +1 -1
- package/mcp-server/package.json +0 -12
- package/package.json +6 -7
- package/mcp-server/.next/build/chunks/[root-of-the-server]__25374c4f._.js +0 -500
- package/mcp-server/.next/build/chunks/[root-of-the-server]__25374c4f._.js.map +0 -11
- package/mcp-server/.next/build/chunks/[root-of-the-server]__6e020478._.js +0 -441
- package/mcp-server/.next/build/chunks/[root-of-the-server]__6e020478._.js.map +0 -7
- package/mcp-server/.next/build/chunks/[root-of-the-server]__c438ef56._.js +0 -205
- package/mcp-server/.next/build/chunks/[root-of-the-server]__c438ef56._.js.map +0 -8
- package/mcp-server/.next/build/chunks/[root-of-the-server]__c7ae8543._.js +0 -500
- package/mcp-server/.next/build/chunks/[root-of-the-server]__c7ae8543._.js.map +0 -11
- package/mcp-server/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_80bff36f._.js +0 -13
- package/mcp-server/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_80bff36f._.js.map +0 -5
- package/mcp-server/.next/build/chunks/[turbopack-node]_transforms_webpack-loaders_ts_c84aa21a._.js +0 -12
- package/mcp-server/.next/build/chunks/[turbopack-node]_transforms_webpack-loaders_ts_c84aa21a._.js.map +0 -5
- package/mcp-server/.next/build/chunks/[turbopack]_runtime.js +0 -770
- package/mcp-server/.next/build/chunks/[turbopack]_runtime.js.map +0 -10
- package/mcp-server/.next/build/chunks/node_modules__pnpm_806d01c0._.js +0 -6758
- package/mcp-server/.next/build/chunks/node_modules__pnpm_806d01c0._.js.map +0 -47
- package/mcp-server/.next/build/package.json +0 -1
- package/mcp-server/.next/build/postcss.js +0 -6
- package/mcp-server/.next/build/postcss.js.map +0 -5
- package/mcp-server/.next/build/webpack-loaders.js +0 -6
- package/mcp-server/.next/build/webpack-loaders.js.map +0 -5
- package/mcp-server/.next/package.json +0 -1
- package/mcp-server/app/api/auth/authorize/route.ts +0 -52
- package/mcp-server/app/api/auth/callback/route.ts +0 -128
- package/mcp-server/app/api/auth/signout/route.ts +0 -34
- package/mcp-server/app/api/auth/token/route.ts +0 -16
- package/mcp-server/app/api/cloud/check-pr/route.ts +0 -53
- package/mcp-server/app/api/cloud/check-pr/steps.ts +0 -458
- package/mcp-server/app/api/cloud/check-pr/workflow.ts +0 -109
- package/mcp-server/app/api/cloud/fix-workflow/health/route.ts +0 -10
- package/mcp-server/app/api/cloud/fix-workflow/route.ts +0 -50
- package/mcp-server/app/api/cloud/fix-workflow/steps.ts +0 -2091
- package/mcp-server/app/api/cloud/fix-workflow/workflow.ts +0 -296
- package/mcp-server/app/api/cloud/start-fix/route.ts +0 -192
- package/mcp-server/app/api/integration/webhook/route.ts +0 -290
- package/mcp-server/app/api/projects/[projectId]/bypass-token/route.ts +0 -48
- package/mcp-server/app/api/projects/branches/route.ts +0 -115
- package/mcp-server/app/api/projects/check-protection/route.ts +0 -33
- package/mcp-server/app/api/projects/route.ts +0 -97
- package/mcp-server/app/api/workflows/route.ts +0 -105
- package/mcp-server/app/auth/error/page.tsx +0 -47
- package/mcp-server/app/signin/page.tsx +0 -37
- package/mcp-server/app/workflows/[id]/report/agent-analysis.tsx +0 -7
- package/mcp-server/app/workflows/[id]/report/page.tsx +0 -199
- package/mcp-server/app/workflows/new/new-workflow-client.tsx +0 -32
- package/mcp-server/app/workflows/new/page.tsx +0 -13
- package/mcp-server/app/workflows/new-workflow-modal.tsx +0 -973
- package/mcp-server/app/workflows/page.tsx +0 -16
- package/mcp-server/app/workflows/workflows-client.tsx +0 -290
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { redirect } from "next/navigation"
|
|
2
|
-
import { getCurrentUser } from "@/lib/auth"
|
|
3
|
-
import { listWorkflowRuns } from "@/lib/workflow-storage"
|
|
4
|
-
import WorkflowsClient from "./workflows-client"
|
|
5
|
-
|
|
6
|
-
export default async function WorkflowsPage() {
|
|
7
|
-
const user = await getCurrentUser()
|
|
8
|
-
|
|
9
|
-
if (!user) {
|
|
10
|
-
redirect("/signin")
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const runs = await listWorkflowRuns(user.id)
|
|
14
|
-
|
|
15
|
-
return <WorkflowsClient user={user} initialRuns={runs} />
|
|
16
|
-
}
|
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import Link from "next/link"
|
|
4
|
-
import { useCallback, useRef, useState } from "react"
|
|
5
|
-
import { Badge } from "@/components/ui/badge"
|
|
6
|
-
import { Button } from "@/components/ui/button"
|
|
7
|
-
import { Card, CardContent } from "@/components/ui/card"
|
|
8
|
-
import { Checkbox } from "@/components/ui/checkbox"
|
|
9
|
-
import {
|
|
10
|
-
Dialog,
|
|
11
|
-
DialogClose,
|
|
12
|
-
DialogContent,
|
|
13
|
-
DialogDescription,
|
|
14
|
-
DialogFooter,
|
|
15
|
-
DialogHeader,
|
|
16
|
-
DialogTitle
|
|
17
|
-
} from "@/components/ui/dialog"
|
|
18
|
-
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"
|
|
19
|
-
import type { WorkflowRun } from "@/lib/workflow-storage"
|
|
20
|
-
|
|
21
|
-
interface UserInfo {
|
|
22
|
-
id: string
|
|
23
|
-
email: string
|
|
24
|
-
name: string
|
|
25
|
-
username: string
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
interface WorkflowsClientProps {
|
|
29
|
-
user: UserInfo
|
|
30
|
-
initialRuns: WorkflowRun[]
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export default function WorkflowsClient({ user, initialRuns }: WorkflowsClientProps) {
|
|
34
|
-
const [isSigningOut, setIsSigningOut] = useState(false)
|
|
35
|
-
const [runs, setRuns] = useState<WorkflowRun[]>(initialRuns)
|
|
36
|
-
const [selectedIds, setSelectedIds] = useState<Set<string>>(new Set())
|
|
37
|
-
const [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState(false)
|
|
38
|
-
const [isDeleting, setIsDeleting] = useState(false)
|
|
39
|
-
const lastSelectedIndex = useRef<number | null>(null)
|
|
40
|
-
|
|
41
|
-
async function handleSignOut() {
|
|
42
|
-
setIsSigningOut(true)
|
|
43
|
-
try {
|
|
44
|
-
await fetch("/api/auth/signout", { method: "POST" })
|
|
45
|
-
window.location.href = "/"
|
|
46
|
-
} catch (error) {
|
|
47
|
-
console.error("Failed to sign out:", error)
|
|
48
|
-
setIsSigningOut(false)
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const handleSelectAll = useCallback(
|
|
53
|
-
(checked: boolean) => {
|
|
54
|
-
if (checked) {
|
|
55
|
-
setSelectedIds(new Set(runs.map((run) => run.id)))
|
|
56
|
-
} else {
|
|
57
|
-
setSelectedIds(new Set())
|
|
58
|
-
}
|
|
59
|
-
lastSelectedIndex.current = null
|
|
60
|
-
},
|
|
61
|
-
[runs]
|
|
62
|
-
)
|
|
63
|
-
|
|
64
|
-
const handleSelectRow = useCallback(
|
|
65
|
-
(runId: string, index: number, event: React.MouseEvent) => {
|
|
66
|
-
setSelectedIds((prev) => {
|
|
67
|
-
const newSelected = new Set(prev)
|
|
68
|
-
|
|
69
|
-
// Handle shift-click for range selection
|
|
70
|
-
if (event.shiftKey && lastSelectedIndex.current !== null) {
|
|
71
|
-
const start = Math.min(lastSelectedIndex.current, index)
|
|
72
|
-
const end = Math.max(lastSelectedIndex.current, index)
|
|
73
|
-
|
|
74
|
-
// Select all items in the range
|
|
75
|
-
for (let i = start; i <= end; i++) {
|
|
76
|
-
newSelected.add(runs[i].id)
|
|
77
|
-
}
|
|
78
|
-
} else {
|
|
79
|
-
// Regular click - toggle selection
|
|
80
|
-
if (newSelected.has(runId)) {
|
|
81
|
-
newSelected.delete(runId)
|
|
82
|
-
} else {
|
|
83
|
-
newSelected.add(runId)
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
return newSelected
|
|
88
|
-
})
|
|
89
|
-
|
|
90
|
-
lastSelectedIndex.current = index
|
|
91
|
-
},
|
|
92
|
-
[runs]
|
|
93
|
-
)
|
|
94
|
-
|
|
95
|
-
const handleDelete = async () => {
|
|
96
|
-
setIsDeleting(true)
|
|
97
|
-
try {
|
|
98
|
-
const response = await fetch("/api/workflows", {
|
|
99
|
-
method: "DELETE",
|
|
100
|
-
headers: {
|
|
101
|
-
"Content-Type": "application/json"
|
|
102
|
-
},
|
|
103
|
-
body: JSON.stringify({
|
|
104
|
-
userId: user.id,
|
|
105
|
-
runIds: Array.from(selectedIds)
|
|
106
|
-
})
|
|
107
|
-
})
|
|
108
|
-
|
|
109
|
-
const result = await response.json()
|
|
110
|
-
|
|
111
|
-
if (result.success) {
|
|
112
|
-
// Remove deleted runs from state
|
|
113
|
-
setRuns((prev) => prev.filter((run) => !selectedIds.has(run.id)))
|
|
114
|
-
setSelectedIds(new Set())
|
|
115
|
-
setIsDeleteDialogOpen(false)
|
|
116
|
-
} else {
|
|
117
|
-
console.error("Failed to delete workflows:", result.error)
|
|
118
|
-
alert(`Failed to delete workflows: ${result.error}`)
|
|
119
|
-
}
|
|
120
|
-
} catch (error) {
|
|
121
|
-
console.error("Failed to delete workflows:", error)
|
|
122
|
-
alert("Failed to delete workflows. Please try again.")
|
|
123
|
-
} finally {
|
|
124
|
-
setIsDeleting(false)
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
const allSelected = runs.length > 0 && selectedIds.size === runs.length
|
|
129
|
-
const someSelected = selectedIds.size > 0 && selectedIds.size < runs.length
|
|
130
|
-
|
|
131
|
-
return (
|
|
132
|
-
<div className="h-screen flex flex-col bg-gray-50">
|
|
133
|
-
<div className="flex-shrink-0 px-4 sm:px-6 lg:px-8 pt-8 pb-4 max-w-7xl mx-auto w-full">
|
|
134
|
-
<div className="flex justify-between items-start">
|
|
135
|
-
<div>
|
|
136
|
-
<h1 className="text-3xl font-bold text-gray-900">d3k Workflow Runs</h1>
|
|
137
|
-
<p className="mt-2 text-gray-600">View all your d3k workflow fix proposals and PRs</p>
|
|
138
|
-
<p className="mt-1 text-sm text-gray-500">Signed in as {user.email}</p>
|
|
139
|
-
</div>
|
|
140
|
-
<div className="flex gap-3">
|
|
141
|
-
{selectedIds.size > 0 && (
|
|
142
|
-
<Button variant="destructive" onClick={() => setIsDeleteDialogOpen(true)}>
|
|
143
|
-
Delete {selectedIds.size} selected
|
|
144
|
-
</Button>
|
|
145
|
-
)}
|
|
146
|
-
<Button asChild>
|
|
147
|
-
<Link href="/workflows/new">New Workflow</Link>
|
|
148
|
-
</Button>
|
|
149
|
-
<Button variant="outline" onClick={handleSignOut} disabled={isSigningOut}>
|
|
150
|
-
{isSigningOut ? "Signing out..." : "Sign out"}
|
|
151
|
-
</Button>
|
|
152
|
-
</div>
|
|
153
|
-
</div>
|
|
154
|
-
</div>
|
|
155
|
-
|
|
156
|
-
<div className="flex-1 min-h-0 px-4 sm:px-6 lg:px-8 pb-8 max-w-7xl mx-auto w-full">
|
|
157
|
-
{runs.length === 0 ? (
|
|
158
|
-
<Card className="p-12 text-center">
|
|
159
|
-
<CardContent>
|
|
160
|
-
<p className="text-muted-foreground">No workflow runs yet</p>
|
|
161
|
-
<p className="text-sm text-muted-foreground/70 mt-2">Run a workflow from the CLI to see it appear here</p>
|
|
162
|
-
</CardContent>
|
|
163
|
-
</Card>
|
|
164
|
-
) : (
|
|
165
|
-
<Card className="h-full flex flex-col overflow-hidden">
|
|
166
|
-
<div className="overflow-auto flex-1 [&_[data-slot=table-container]]:overflow-visible">
|
|
167
|
-
<Table>
|
|
168
|
-
<TableHeader className="sticky top-0 bg-card z-10 shadow-[0_1px_3px_-1px_rgba(0,0,0,0.1)]">
|
|
169
|
-
<TableRow>
|
|
170
|
-
<TableHead className="w-8 pr-0">
|
|
171
|
-
<Checkbox
|
|
172
|
-
checked={allSelected}
|
|
173
|
-
ref={(el) => {
|
|
174
|
-
if (el) {
|
|
175
|
-
// Set indeterminate state for "some selected"
|
|
176
|
-
const input = el.querySelector("button") as HTMLButtonElement
|
|
177
|
-
if (input) {
|
|
178
|
-
input.dataset.state = someSelected
|
|
179
|
-
? "indeterminate"
|
|
180
|
-
: allSelected
|
|
181
|
-
? "checked"
|
|
182
|
-
: "unchecked"
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}}
|
|
186
|
-
onCheckedChange={handleSelectAll}
|
|
187
|
-
aria-label="Select all"
|
|
188
|
-
/>
|
|
189
|
-
</TableHead>
|
|
190
|
-
<TableHead>Project ({runs.length})</TableHead>
|
|
191
|
-
<TableHead>Status</TableHead>
|
|
192
|
-
<TableHead>Timestamp</TableHead>
|
|
193
|
-
<TableHead>Report</TableHead>
|
|
194
|
-
<TableHead>PR</TableHead>
|
|
195
|
-
</TableRow>
|
|
196
|
-
</TableHeader>
|
|
197
|
-
<TableBody>
|
|
198
|
-
{runs.map((run, index) => (
|
|
199
|
-
<TableRow
|
|
200
|
-
key={`${run.id}-${run.timestamp}`}
|
|
201
|
-
className={selectedIds.has(run.id) ? "bg-muted/50" : undefined}
|
|
202
|
-
>
|
|
203
|
-
<TableCell className="pr-0">
|
|
204
|
-
<Checkbox
|
|
205
|
-
checked={selectedIds.has(run.id)}
|
|
206
|
-
onClick={(e) => handleSelectRow(run.id, index, e)}
|
|
207
|
-
onCheckedChange={() => {}}
|
|
208
|
-
aria-label={`Select ${run.projectName}`}
|
|
209
|
-
/>
|
|
210
|
-
</TableCell>
|
|
211
|
-
<TableCell>
|
|
212
|
-
<div className="font-medium">{run.projectName}</div>
|
|
213
|
-
<div className="text-xs text-muted-foreground">{run.id}</div>
|
|
214
|
-
</TableCell>
|
|
215
|
-
<TableCell>
|
|
216
|
-
<Badge
|
|
217
|
-
variant={
|
|
218
|
-
run.status === "done" ? "secondary" : run.status === "running" ? "default" : "destructive"
|
|
219
|
-
}
|
|
220
|
-
className={
|
|
221
|
-
run.status === "done"
|
|
222
|
-
? "bg-green-100 text-green-800 hover:bg-green-100"
|
|
223
|
-
: run.status === "running"
|
|
224
|
-
? "bg-blue-100 text-blue-800 hover:bg-blue-100"
|
|
225
|
-
: ""
|
|
226
|
-
}
|
|
227
|
-
>
|
|
228
|
-
{run.status}
|
|
229
|
-
</Badge>
|
|
230
|
-
</TableCell>
|
|
231
|
-
<TableCell className="text-muted-foreground">
|
|
232
|
-
{new Date(run.timestamp).toLocaleString()}
|
|
233
|
-
</TableCell>
|
|
234
|
-
<TableCell>
|
|
235
|
-
{run.reportBlobUrl ? (
|
|
236
|
-
<Link href={`/workflows/${run.id}/report`} className="text-primary hover:underline">
|
|
237
|
-
View Report
|
|
238
|
-
</Link>
|
|
239
|
-
) : (
|
|
240
|
-
<span className="text-muted-foreground">No report</span>
|
|
241
|
-
)}
|
|
242
|
-
</TableCell>
|
|
243
|
-
<TableCell>
|
|
244
|
-
{run.prUrl ? (
|
|
245
|
-
<a
|
|
246
|
-
href={run.prUrl}
|
|
247
|
-
target="_blank"
|
|
248
|
-
rel="noopener noreferrer"
|
|
249
|
-
className="text-primary hover:underline"
|
|
250
|
-
>
|
|
251
|
-
View PR
|
|
252
|
-
</a>
|
|
253
|
-
) : (
|
|
254
|
-
<span className="text-muted-foreground">No PR</span>
|
|
255
|
-
)}
|
|
256
|
-
</TableCell>
|
|
257
|
-
</TableRow>
|
|
258
|
-
))}
|
|
259
|
-
</TableBody>
|
|
260
|
-
</Table>
|
|
261
|
-
</div>
|
|
262
|
-
</Card>
|
|
263
|
-
)}
|
|
264
|
-
</div>
|
|
265
|
-
|
|
266
|
-
<Dialog open={isDeleteDialogOpen} onOpenChange={setIsDeleteDialogOpen}>
|
|
267
|
-
<DialogContent>
|
|
268
|
-
<DialogHeader>
|
|
269
|
-
<DialogTitle>Delete Workflow Runs</DialogTitle>
|
|
270
|
-
<DialogDescription>
|
|
271
|
-
Are you sure you want to delete {selectedIds.size} workflow run{selectedIds.size === 1 ? "" : "s"}? This
|
|
272
|
-
will permanently delete all associated data including screenshots and reports. This action cannot be
|
|
273
|
-
undone.
|
|
274
|
-
</DialogDescription>
|
|
275
|
-
</DialogHeader>
|
|
276
|
-
<DialogFooter>
|
|
277
|
-
<DialogClose asChild>
|
|
278
|
-
<Button variant="outline" disabled={isDeleting}>
|
|
279
|
-
Cancel
|
|
280
|
-
</Button>
|
|
281
|
-
</DialogClose>
|
|
282
|
-
<Button variant="destructive" onClick={handleDelete} disabled={isDeleting}>
|
|
283
|
-
{isDeleting ? "Deleting..." : `Delete ${selectedIds.size} run${selectedIds.size === 1 ? "" : "s"}`}
|
|
284
|
-
</Button>
|
|
285
|
-
</DialogFooter>
|
|
286
|
-
</DialogContent>
|
|
287
|
-
</Dialog>
|
|
288
|
-
</div>
|
|
289
|
-
)
|
|
290
|
-
}
|