dev3000 0.0.114 → 0.0.116

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 (146) hide show
  1. package/dist/cdp-monitor.d.ts.map +1 -1
  2. package/dist/cdp-monitor.js +20 -28
  3. package/dist/cdp-monitor.js.map +1 -1
  4. package/dist/cli.js +74 -22
  5. package/dist/cli.js.map +1 -1
  6. package/dist/dev-environment.d.ts.map +1 -1
  7. package/dist/dev-environment.js +43 -11
  8. package/dist/dev-environment.js.map +1 -1
  9. package/dist/src/tui-interface-impl.tsx +175 -127
  10. package/dist/tui-interface-impl.d.ts.map +1 -1
  11. package/dist/tui-interface-impl.js +113 -74
  12. package/dist/tui-interface-impl.js.map +1 -1
  13. package/mcp-server/.next/BUILD_ID +1 -1
  14. package/mcp-server/.next/build-manifest.json +2 -2
  15. package/mcp-server/.next/fallback-build-manifest.json +2 -2
  16. package/mcp-server/.next/prerender-manifest.json +3 -3
  17. package/mcp-server/.next/server/app/_global-error.html +2 -2
  18. package/mcp-server/.next/server/app/_global-error.rsc +1 -1
  19. package/mcp-server/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  20. package/mcp-server/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  21. package/mcp-server/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  22. package/mcp-server/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  23. package/mcp-server/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  24. package/mcp-server/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  25. package/mcp-server/.next/server/app/_not-found.html +1 -1
  26. package/mcp-server/.next/server/app/_not-found.rsc +2 -2
  27. package/mcp-server/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  28. package/mcp-server/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  29. package/mcp-server/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  30. package/mcp-server/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  31. package/mcp-server/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  32. package/mcp-server/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  33. package/mcp-server/.next/server/app/api/cloud/start-fix/route.js +2 -2
  34. package/mcp-server/.next/server/app/api/cloud/start-fix/route.js.nft.json +1 -1
  35. package/mcp-server/.next/server/app/auth/error/page_client-reference-manifest.js +1 -1
  36. package/mcp-server/.next/server/app/auth/error.html +1 -1
  37. package/mcp-server/.next/server/app/auth/error.rsc +2 -2
  38. package/mcp-server/.next/server/app/auth/error.segments/_full.segment.rsc +2 -2
  39. package/mcp-server/.next/server/app/auth/error.segments/_head.segment.rsc +1 -1
  40. package/mcp-server/.next/server/app/auth/error.segments/_index.segment.rsc +2 -2
  41. package/mcp-server/.next/server/app/auth/error.segments/_tree.segment.rsc +2 -2
  42. package/mcp-server/.next/server/app/auth/error.segments/auth/error/__PAGE__.segment.rsc +1 -1
  43. package/mcp-server/.next/server/app/auth/error.segments/auth/error.segment.rsc +1 -1
  44. package/mcp-server/.next/server/app/auth/error.segments/auth.segment.rsc +1 -1
  45. package/mcp-server/.next/server/app/index.html +1 -1
  46. package/mcp-server/.next/server/app/index.rsc +3 -3
  47. package/mcp-server/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  48. package/mcp-server/.next/server/app/index.segments/_full.segment.rsc +3 -3
  49. package/mcp-server/.next/server/app/index.segments/_head.segment.rsc +1 -1
  50. package/mcp-server/.next/server/app/index.segments/_index.segment.rsc +2 -2
  51. package/mcp-server/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  52. package/mcp-server/.next/server/app/logs/page.js.nft.json +1 -1
  53. package/mcp-server/.next/server/app/logs/page_client-reference-manifest.js +1 -1
  54. package/mcp-server/.next/server/app/mcp/route.js +2 -2
  55. package/mcp-server/.next/server/app/page.js.nft.json +1 -1
  56. package/mcp-server/.next/server/app/page_client-reference-manifest.js +1 -1
  57. package/mcp-server/.next/server/app/signin/page_client-reference-manifest.js +1 -1
  58. package/mcp-server/.next/server/app/video/[session]/page_client-reference-manifest.js +1 -1
  59. package/mcp-server/.next/server/app/workflows/[id]/report/page_client-reference-manifest.js +1 -1
  60. package/mcp-server/.next/server/app/workflows/new/page.js.nft.json +1 -1
  61. package/mcp-server/.next/server/app/workflows/new/page_client-reference-manifest.js +1 -1
  62. package/mcp-server/.next/server/app/workflows/page.js.nft.json +1 -1
  63. package/mcp-server/.next/server/app/workflows/page_client-reference-manifest.js +1 -1
  64. package/mcp-server/.next/server/chunks/[root-of-the-server]__157de66b._.js +284 -37
  65. package/mcp-server/.next/server/chunks/[root-of-the-server]__157de66b._.js.map +1 -1
  66. package/mcp-server/.next/server/chunks/[root-of-the-server]__730a8fd0._.js +1 -1
  67. package/mcp-server/.next/server/chunks/[root-of-the-server]__730a8fd0._.js.map +1 -1
  68. package/mcp-server/.next/server/chunks/[root-of-the-server]__748f411f._.js +1 -1
  69. package/mcp-server/.next/server/chunks/[root-of-the-server]__748f411f._.js.map +1 -1
  70. package/mcp-server/.next/server/chunks/[root-of-the-server]__8a84f9f4._.js +20 -20
  71. package/mcp-server/.next/server/chunks/[root-of-the-server]__8a84f9f4._.js.map +1 -1
  72. package/mcp-server/.next/server/chunks/[root-of-the-server]__c1681338._.js +3 -0
  73. package/mcp-server/.next/server/chunks/[root-of-the-server]__c1681338._.js.map +1 -0
  74. package/mcp-server/.next/server/chunks/[root-of-the-server]__ec6a1335._.js.map +1 -1
  75. package/mcp-server/.next/server/chunks/bee4f_next_dist_esm_build_templates_app-route_1ece9366.js +5 -5
  76. package/mcp-server/.next/server/chunks/bee4f_next_dist_esm_build_templates_app-route_1ece9366.js.map +1 -1
  77. package/mcp-server/.next/server/chunks/mcp-server_app_api_cloud_fix-workflow_steps_ts_b65f3271._.js +121 -27
  78. package/mcp-server/.next/server/chunks/mcp-server_app_api_cloud_fix-workflow_steps_ts_b65f3271._.js.map +1 -1
  79. package/mcp-server/.next/server/chunks/node_modules__pnpm_85ddbe9c._.js +1 -1
  80. package/mcp-server/.next/server/chunks/node_modules__pnpm_85ddbe9c._.js.map +1 -1
  81. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__2e44f0db._.js +3 -0
  82. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__2e44f0db._.js.map +1 -0
  83. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__3585c949._.js +3 -0
  84. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__3585c949._.js.map +1 -0
  85. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__477c3bbb._.js +3 -0
  86. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__477c3bbb._.js.map +1 -0
  87. package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__570677dc._.js → [root-of-the-server]__880839a0._.js} +2 -2
  88. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__880839a0._.js.map +1 -0
  89. package/mcp-server/.next/server/chunks/ssr/_41b8f993._.js +3 -0
  90. package/mcp-server/.next/server/chunks/ssr/_41b8f993._.js.map +1 -0
  91. package/mcp-server/.next/server/chunks/ssr/_9ba0ef29._.js +3 -0
  92. package/mcp-server/.next/server/chunks/ssr/_9ba0ef29._.js.map +1 -0
  93. package/mcp-server/.next/server/chunks/ssr/_cd4dc25e._.js.map +1 -1
  94. package/mcp-server/.next/server/chunks/ssr/mcp-server_app_workflows_new_new-workflow-client_tsx_1312c046._.js +2 -2
  95. package/mcp-server/.next/server/chunks/ssr/mcp-server_app_workflows_new_new-workflow-client_tsx_1312c046._.js.map +1 -1
  96. package/mcp-server/.next/server/chunks/ssr/mcp-server_app_workflows_workflows-client_tsx_268cfd4a._.js +7 -0
  97. package/mcp-server/.next/server/chunks/ssr/mcp-server_app_workflows_workflows-client_tsx_268cfd4a._.js.map +1 -0
  98. package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_961f21c4._.js +3 -0
  99. package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_961f21c4._.js.map +1 -0
  100. package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_a82244bf._.js +3 -0
  101. package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_a82244bf._.js.map +1 -0
  102. package/mcp-server/.next/server/chunks/ssr/{node_modules__pnpm_07527699._.js → node_modules__pnpm_eb98e511._.js} +2 -2
  103. package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_eb98e511._.js.map +1 -0
  104. package/mcp-server/.next/server/server-reference-manifest.js +1 -1
  105. package/mcp-server/.next/server/server-reference-manifest.json +1 -1
  106. package/mcp-server/.next/static/chunks/000849a6a897f531.css +1 -0
  107. package/mcp-server/.next/static/chunks/048cee2510ddb1a0.js +1 -0
  108. package/mcp-server/.next/static/chunks/0622bd0e093adee7.js +3 -0
  109. package/mcp-server/.next/static/chunks/{46f60efee5f19794.js → 16359f64918a93f3.js} +1 -1
  110. package/mcp-server/.next/static/chunks/1851a3e70d7efc10.js +1 -0
  111. package/mcp-server/.next/static/chunks/{cc6addc4bb10fa11.js → 2ad16eeb719786f1.js} +1 -1
  112. package/mcp-server/.next/static/chunks/57feca7a4e06545e.js +7 -0
  113. package/mcp-server/.next/static/chunks/93db5737a327ab0c.js +6 -0
  114. package/mcp-server/.next/static/chunks/9fd3c715ecfb4d05.js +1 -0
  115. package/mcp-server/.next/static/chunks/b4b1ec6435790587.js +1 -0
  116. package/mcp-server/.next/static/chunks/cfe150cb2048b7e8.js +1 -0
  117. package/mcp-server/app/api/cloud/fix-workflow/steps.ts +359 -28
  118. package/mcp-server/app/api/cloud/fix-workflow/workflow.ts +16 -8
  119. package/mcp-server/app/api/cloud/start-fix/route.ts +2 -2
  120. package/mcp-server/app/api/tools/route.ts +11 -12
  121. package/mcp-server/app/api/workflows/route.ts +45 -1
  122. package/mcp-server/app/mcp/tools.ts +58 -98
  123. package/mcp-server/app/workflows/workflows-client.tsx +259 -100
  124. package/package.json +1 -1
  125. package/src/tui-interface-impl.tsx +175 -127
  126. package/mcp-server/.next/server/chunks/[root-of-the-server]__75d68567._.js +0 -3
  127. package/mcp-server/.next/server/chunks/[root-of-the-server]__75d68567._.js.map +0 -1
  128. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__0ff05d72._.js +0 -3
  129. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__0ff05d72._.js.map +0 -1
  130. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__27cc5956._.js +0 -3
  131. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__27cc5956._.js.map +0 -1
  132. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__570677dc._.js.map +0 -1
  133. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__ef510343._.js +0 -3
  134. package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__ef510343._.js.map +0 -1
  135. package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_07527699._.js.map +0 -1
  136. package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_7cc36047._.js +0 -3
  137. package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_7cc36047._.js.map +0 -1
  138. package/mcp-server/.next/static/chunks/07848f6bd2a7e5f6.js +0 -3
  139. package/mcp-server/.next/static/chunks/637a66565f27572f.js +0 -6
  140. package/mcp-server/.next/static/chunks/aed4fb5252a4bc95.js +0 -3
  141. package/mcp-server/.next/static/chunks/e8d521464b0c96ca.css +0 -1
  142. package/mcp-server/.next/static/chunks/ff53279afa939907.js +0 -1
  143. package/mcp-server/.next/static/chunks/ffa2ecb6845be49c.js +0 -1
  144. /package/mcp-server/.next/static/{ZvLsxTWoDyQzaSsr_VeX6 → G5taiQ-Jp0B_MdvkQuoIT}/_buildManifest.js +0 -0
  145. /package/mcp-server/.next/static/{ZvLsxTWoDyQzaSsr_VeX6 → G5taiQ-Jp0B_MdvkQuoIT}/_clientMiddlewareManifest.json +0 -0
  146. /package/mcp-server/.next/static/{ZvLsxTWoDyQzaSsr_VeX6 → G5taiQ-Jp0B_MdvkQuoIT}/_ssgManifest.js +0 -0
@@ -2,7 +2,7 @@ import chalk from "chalk"
2
2
  import { createReadStream, unwatchFile, watchFile } from "fs"
3
3
  import { Box, render, Text, useInput, useStdout } from "ink"
4
4
  import Spinner from "ink-spinner"
5
- import { useEffect, useRef, useState } from "react"
5
+ import { memo, useEffect, useRef, useState } from "react"
6
6
  import type { Readable } from "stream"
7
7
  import { LOG_COLORS } from "./constants/log-colors.js"
8
8
 
@@ -29,6 +29,117 @@ const COMPACT_LOGO = "d3k"
29
29
  // Full ASCII logo lines as array for easier rendering
30
30
  const FULL_LOGO = [" ▐▌▄▄▄▄ █ ▄ ", " ▐▌ █ █▄▀ ", "▗▞▀▜▌▀▀▀█ █ ▀▄ ", "▝▚▄▟▌▄▄▄█ █ █ "]
31
31
 
32
+ // Type colors map - defined outside component to avoid recreation
33
+ const TYPE_COLORS: Record<string, string> = {
34
+ NETWORK: LOG_COLORS.NETWORK,
35
+ ERROR: LOG_COLORS.ERROR,
36
+ WARNING: LOG_COLORS.WARNING,
37
+ INFO: LOG_COLORS.INFO,
38
+ LOG: LOG_COLORS.LOG,
39
+ DEBUG: LOG_COLORS.DEBUG,
40
+ SCREENSHOT: LOG_COLORS.SCREENSHOT,
41
+ DOM: LOG_COLORS.DOM,
42
+ CDP: LOG_COLORS.CDP,
43
+ CHROME: LOG_COLORS.CHROME,
44
+ CRASH: LOG_COLORS.CRASH,
45
+ REPLAY: LOG_COLORS.REPLAY,
46
+ NAVIGATION: LOG_COLORS.NAVIGATION,
47
+ INTERACTION: LOG_COLORS.INTERACTION,
48
+ GET: LOG_COLORS.SERVER,
49
+ POST: LOG_COLORS.SERVER,
50
+ PUT: LOG_COLORS.SERVER,
51
+ DELETE: LOG_COLORS.SERVER,
52
+ PATCH: LOG_COLORS.SERVER,
53
+ HEAD: LOG_COLORS.SERVER,
54
+ OPTIONS: LOG_COLORS.SERVER
55
+ }
56
+
57
+ // Memoized log line component to prevent re-parsing on every render
58
+ const LogLine = memo(
59
+ ({ log, isCompact, isVeryCompact }: { log: LogEntry; isCompact: boolean; isVeryCompact: boolean }) => {
60
+ // Parse log line to colorize different parts
61
+ const parts = log.content.match(/^\[(.*?)\] \[(.*?)\] (?:\[(.*?)\] )?(.*)$/)
62
+
63
+ if (parts) {
64
+ let [, timestamp, source, type, message] = parts
65
+
66
+ // Extract HTTP method from SERVER logs as a secondary tag
67
+ if (source === "SERVER" && !type && message) {
68
+ const methodMatch = message.match(/^(GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS)\s/)
69
+ if (methodMatch) {
70
+ type = methodMatch[1]
71
+ message = message.slice(type.length + 1) // Remove method from message
72
+ }
73
+ }
74
+
75
+ // Replace warning emoji in ERROR/WARNING messages for consistent terminal rendering
76
+ if (message && (type === "ERROR" || type === "WARNING")) {
77
+ message = message.replace(/⚠/g, "[!]")
78
+ }
79
+
80
+ // In very compact mode, simplify the output
81
+ if (isVeryCompact) {
82
+ const shortSource = source === "BROWSER" ? "B" : "S"
83
+ const shortType = type ? type.split(".")[0].charAt(0) : ""
84
+ return (
85
+ <Text wrap="truncate-end">
86
+ <Text dimColor>[{shortSource}]</Text>
87
+ {shortType && <Text dimColor>[{shortType}]</Text>}
88
+ <Text> {message}</Text>
89
+ </Text>
90
+ )
91
+ }
92
+
93
+ // Use shared color constants
94
+ const sourceColor = source === "BROWSER" ? LOG_COLORS.BROWSER : LOG_COLORS.SERVER
95
+
96
+ // In compact mode, skip padding
97
+ if (isCompact) {
98
+ return (
99
+ <Text wrap="truncate-end">
100
+ <Text dimColor>[{timestamp}]</Text>
101
+ <Text> </Text>
102
+ <Text color={sourceColor} bold>
103
+ [{source.charAt(0)}]
104
+ </Text>
105
+ {type && (
106
+ <>
107
+ <Text> </Text>
108
+ <Text color={TYPE_COLORS[type] || "#A0A0A0"}>[{type}]</Text>
109
+ </>
110
+ )}
111
+ <Text> {message}</Text>
112
+ </Text>
113
+ )
114
+ }
115
+
116
+ // Normal mode with minimal padding
117
+ return (
118
+ <Text wrap="truncate-end">
119
+ <Text dimColor>[{timestamp}]</Text>
120
+ <Text> </Text>
121
+ <Text color={sourceColor} bold>
122
+ [{source}]
123
+ </Text>
124
+ {type ? (
125
+ <>
126
+ <Text> </Text>
127
+ <Text color={TYPE_COLORS[type] || "#A0A0A0"}>[{type}]</Text>
128
+ <Text> </Text>
129
+ </>
130
+ ) : (
131
+ <Text> </Text>
132
+ )}
133
+ <Text>{message}</Text>
134
+ </Text>
135
+ )
136
+ }
137
+
138
+ // Fallback for unparsed lines
139
+ return <Text wrap="truncate-end">{log.content}</Text>
140
+ }
141
+ )
142
+
32
143
  const TUIApp = ({
33
144
  appPort: initialAppPort,
34
145
  mcpPort,
@@ -155,19 +266,19 @@ const TUIApp = ({
155
266
  useEffect(() => {
156
267
  let logStream: Readable | undefined
157
268
  let buffer = ""
269
+ let pendingLogs: LogEntry[] = []
270
+ let flushTimeout: NodeJS.Timeout | null = null
158
271
 
159
- const appendLog = (line: string) => {
160
- if (NEXTJS_MCP_404_REGEX.test(line)) {
161
- return
162
- }
272
+ // Batch log updates to prevent excessive renders
273
+ const flushPendingLogs = () => {
274
+ if (pendingLogs.length === 0) return
163
275
 
164
- const newLog: LogEntry = {
165
- id: logIdCounter.current++,
166
- content: line
167
- }
276
+ const logsToAdd = pendingLogs
277
+ pendingLogs = []
278
+ flushTimeout = null
168
279
 
169
280
  setLogs((prevLogs) => {
170
- const updated = [...prevLogs, newLog]
281
+ const updated = [...prevLogs, ...logsToAdd]
171
282
  // Keep only last N logs to prevent memory issues
172
283
  if (updated.length > maxLogs) {
173
284
  return updated.slice(-maxLogs)
@@ -176,12 +287,32 @@ const TUIApp = ({
176
287
  })
177
288
 
178
289
  // Auto-scroll to bottom only if user is already at the bottom
179
- // Otherwise, increment scroll offset by 1, accounting for the appended log and max scroll offset
290
+ // Otherwise, increment scroll offset by count of new logs
180
291
  setScrollOffset((currentOffset) => {
181
- return currentOffset === 0 ? 0 : Math.min(maxScrollOffsetRef.current, currentOffset + 1)
292
+ return currentOffset === 0 ? 0 : Math.min(maxScrollOffsetRef.current, currentOffset + logsToAdd.length)
182
293
  })
183
294
  }
184
295
 
296
+ const appendLog = (line: string) => {
297
+ if (NEXTJS_MCP_404_REGEX.test(line)) {
298
+ return
299
+ }
300
+
301
+ const newLog: LogEntry = {
302
+ id: logIdCounter.current++,
303
+ content: line
304
+ }
305
+
306
+ pendingLogs.push(newLog)
307
+
308
+ // Debounce: flush after 50ms of no new logs
309
+ // Terminal synchronized updates prevent flicker, so we can be more responsive
310
+ if (flushTimeout) {
311
+ clearTimeout(flushTimeout)
312
+ }
313
+ flushTimeout = setTimeout(flushPendingLogs, 50)
314
+ }
315
+
185
316
  // Create a read stream for the log file
186
317
  logStream = createReadStream(logFile, {
187
318
  encoding: "utf8",
@@ -236,6 +367,9 @@ const TUIApp = ({
236
367
  if (logStream) {
237
368
  logStream.destroy()
238
369
  }
370
+ if (flushTimeout) {
371
+ clearTimeout(flushTimeout)
372
+ }
239
373
  unwatchFile(logFile)
240
374
  }
241
375
  }, [logFile])
@@ -376,121 +510,9 @@ const TUIApp = ({
376
510
  {visibleLogs.length === 0 ? (
377
511
  <Text dimColor>Waiting for logs...</Text>
378
512
  ) : (
379
- visibleLogs.map((log) => {
380
- // Parse log line to colorize different parts
381
- const parts = log.content.match(/^\[(.*?)\] \[(.*?)\] (?:\[(.*?)\] )?(.*)$/)
382
-
383
- if (parts) {
384
- let [, timestamp, source, type, message] = parts
385
-
386
- // Extract HTTP method from SERVER logs as a secondary tag
387
- if (source === "SERVER" && !type && message) {
388
- const methodMatch = message.match(/^(GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS)\s/)
389
- if (methodMatch) {
390
- type = methodMatch[1]
391
- message = message.slice(type.length + 1) // Remove method from message
392
- }
393
- }
394
-
395
- // Replace warning emoji in ERROR/WARNING messages for consistent terminal rendering
396
- if (message && (type === "ERROR" || type === "WARNING")) {
397
- message = message.replace(/⚠/g, "[!]")
398
- }
399
-
400
- // In very compact mode, simplify the output
401
- if (isVeryCompact) {
402
- const shortSource = source === "BROWSER" ? "B" : "S"
403
- const shortType = type ? type.split(".")[0].charAt(0) : ""
404
- return (
405
- <Text key={log.id} wrap="truncate-end">
406
- <Text dimColor>[{shortSource}]</Text>
407
- {shortType && <Text dimColor>[{shortType}]</Text>}
408
- <Text> {message}</Text>
409
- </Text>
410
- )
411
- }
412
-
413
- // Use shared color constants
414
- const sourceColor = source === "BROWSER" ? LOG_COLORS.BROWSER : LOG_COLORS.SERVER
415
- const typeColors: Record<string, string> = {
416
- NETWORK: LOG_COLORS.NETWORK,
417
- ERROR: LOG_COLORS.ERROR,
418
- WARNING: LOG_COLORS.WARNING,
419
- INFO: LOG_COLORS.INFO,
420
- LOG: LOG_COLORS.LOG,
421
- DEBUG: LOG_COLORS.DEBUG,
422
- SCREENSHOT: LOG_COLORS.SCREENSHOT,
423
- DOM: LOG_COLORS.DOM,
424
- CDP: LOG_COLORS.CDP,
425
- CHROME: LOG_COLORS.CHROME,
426
- CRASH: LOG_COLORS.CRASH,
427
- REPLAY: LOG_COLORS.REPLAY,
428
- NAVIGATION: LOG_COLORS.NAVIGATION,
429
- INTERACTION: LOG_COLORS.INTERACTION,
430
- GET: LOG_COLORS.SERVER,
431
- POST: LOG_COLORS.SERVER,
432
- PUT: LOG_COLORS.SERVER,
433
- DELETE: LOG_COLORS.SERVER,
434
- PATCH: LOG_COLORS.SERVER,
435
- HEAD: LOG_COLORS.SERVER,
436
- OPTIONS: LOG_COLORS.SERVER
437
- }
438
-
439
- // In compact mode, skip padding
440
- if (isCompact) {
441
- return (
442
- <Text key={log.id} wrap="truncate-end">
443
- <Text dimColor>[{timestamp}]</Text>
444
- <Text> </Text>
445
- <Text color={sourceColor} bold>
446
- [{source.charAt(0)}]
447
- </Text>
448
- {type && (
449
- <>
450
- <Text> </Text>
451
- <Text color={typeColors[type] || "#A0A0A0"}>[{type}]</Text>
452
- </>
453
- )}
454
- <Text> {message}</Text>
455
- </Text>
456
- )
457
- }
458
-
459
- // Normal mode with minimal padding
460
- // Single space after source
461
- const sourceSpacing = ""
462
-
463
- // Single space after type
464
- const typeSpacing = ""
465
-
466
- return (
467
- <Text key={log.id} wrap="truncate-end">
468
- <Text dimColor>[{timestamp}]</Text>
469
- <Text> </Text>
470
- <Text color={sourceColor} bold>
471
- [{source}]
472
- </Text>
473
- {type ? (
474
- <>
475
- <Text>{sourceSpacing} </Text>
476
- <Text color={typeColors[type] || "#A0A0A0"}>[{type}]</Text>
477
- <Text>{typeSpacing} </Text>
478
- </>
479
- ) : (
480
- <Text> </Text>
481
- )}
482
- <Text>{message}</Text>
483
- </Text>
484
- )
485
- }
486
-
487
- // Fallback for unparsed lines
488
- return (
489
- <Text key={log.id} wrap="truncate-end">
490
- {log.content}
491
- </Text>
492
- )
493
- })
513
+ visibleLogs.map((log) => (
514
+ <LogLine key={log.id} log={log} isCompact={isCompact} isVeryCompact={isVeryCompact} />
515
+ ))
494
516
  )}
495
517
  </Box>
496
518
 
@@ -524,6 +546,32 @@ export async function runTUI(options: TUIOptions): Promise<{
524
546
  let statusUpdater: ((status: string | null) => void) | null = null
525
547
  let appPortUpdater: ((port: string) => void) | null = null
526
548
 
549
+ // Wrap stdout.write to add synchronized update escape sequences
550
+ // This tells the terminal to buffer all output until the end marker
551
+ // Supported by iTerm2, Kitty, WezTerm, and other modern terminals
552
+ const originalWrite = process.stdout.write.bind(process.stdout)
553
+ const syncStart = "\x1b[?2026h" // Begin synchronized update (DECSM 2026)
554
+ const syncEnd = "\x1b[?2026l" // End synchronized update (DECRM 2026)
555
+
556
+ process.stdout.write = ((
557
+ chunk: string | Uint8Array,
558
+ encodingOrCb?: BufferEncoding | ((err?: Error | null) => void),
559
+ cb?: (err?: Error | null) => void
560
+ ): boolean => {
561
+ if (typeof chunk === "string" && chunk.length > 0) {
562
+ // Wrap output in synchronized update markers to prevent partial renders
563
+ const wrapped = syncStart + chunk + syncEnd
564
+ if (typeof encodingOrCb === "function") {
565
+ return originalWrite(wrapped, encodingOrCb)
566
+ }
567
+ return originalWrite(wrapped, encodingOrCb, cb)
568
+ }
569
+ if (typeof encodingOrCb === "function") {
570
+ return originalWrite(chunk, encodingOrCb)
571
+ }
572
+ return originalWrite(chunk, encodingOrCb, cb)
573
+ }) as typeof process.stdout.write
574
+
527
575
  const app = render(
528
576
  <TUIApp
529
577
  {...options}
@@ -1,3 +0,0 @@
1
- module.exports=[93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},71822,(e,t,r)=>{"use strict";t.exports=e.r(18622)},78169,(e,t,r)=>{"use strict";t.exports=e.r(71822).vendored["react-rsc"].React},19956,(e,t,r)=>{"use strict";var o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,i={},l={RequestCookies:()=>x,ResponseCookies:()=>m,parseCookie:()=>c,parseSetCookie:()=>d,stringifyCookie:()=>p};for(var u in l)o(i,u,{get:l[u],enumerable:!0});function p(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),o=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?o:`${o}; ${r.join("; ")}`}function c(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[o,s]=[r.slice(0,e),r.slice(e+1)];try{t.set(o,decodeURIComponent(null!=s?s:"true"))}catch{}}return t}function d(e){if(!e)return;let[[t,r],...o]=c(e),{domain:s,expires:n,httponly:a,maxage:i,path:l,samesite:u,secure:p,partitioned:d,priority:x}=Object.fromEntries(o.map(([e,t])=>[e.toLowerCase().replace(/-/g,""),t]));{var m,g,w={name:t,value:decodeURIComponent(r),domain:s,...n&&{expires:new Date(n)},...a&&{httpOnly:!0},..."string"==typeof i&&{maxAge:Number(i)},path:l,...u&&{sameSite:f.includes(m=(m=u).toLowerCase())?m:void 0},...p&&{secure:!0},...x&&{priority:h.includes(g=(g=x).toLowerCase())?g:void 0},...d&&{partitioned:!0}};let e={};for(let t in w)w[t]&&(e[t]=w[t]);return e}}t.exports=((e,t,r,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let r of n(t))a.call(e,r)||void 0===r||o(e,r,{get:()=>t[r],enumerable:!(i=s(t,r))||i.enumerable});return e})(o({},"__esModule",{value:!0}),i);var f=["strict","lax","none"],h=["low","medium","high"],x=class{constructor(e){this._parsed=new Map,this._headers=e;const t=e.get("cookie");if(t)for(const[e,r]of c(t))this._parsed.set(e,{name:e,value:r})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let o="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===o).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,o=this._parsed;return o.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(o).map(([e,t])=>p(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>p(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},m=class{constructor(e){var t,r,o;this._parsed=new Map,this._headers=e;const s=null!=(o=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?o:[];for(const e of Array.isArray(s)?s:function(e){if(!e)return[];var t,r,o,s,n,a=[],i=0;function l(){for(;i<e.length&&/\s/.test(e.charAt(i));)i+=1;return i<e.length}for(;i<e.length;){for(t=i,n=!1;l();)if(","===(r=e.charAt(i))){for(o=i,i+=1,l(),s=i;i<e.length&&"="!==(r=e.charAt(i))&&";"!==r&&","!==r;)i+=1;i<e.length&&"="===e.charAt(i)?(n=!0,i=s,a.push(e.substring(t,o)),t=i):i=o+1}else i+=1;(!n||i>=e.length)&&a.push(e.substring(t,e.length))}return a}(s)){const t=d(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let o="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===o)}has(e){return this._parsed.has(e)}set(...e){let[t,r,o]=1===e.length?[e[0].name,e[0].value,e[0]]:e,s=this._parsed;return s.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...o})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=p(r);t.append("set-cookie",e)}}(s,this._headers),this}delete(...e){let[t,r]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0]];return this.set({...r,name:t,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(p).join("; ")}}},88947,(e,t,r)=>{t.exports=e.x("stream",()=>require("stream"))},49719,(e,t,r)=>{t.exports=e.x("assert",()=>require("assert"))},874,(e,t,r)=>{t.exports=e.x("buffer",()=>require("buffer"))},6461,(e,t,r)=>{t.exports=e.x("zlib",()=>require("zlib"))},21517,(e,t,r)=>{t.exports=e.x("http",()=>require("http"))},4446,(e,t,r)=>{t.exports=e.x("net",()=>require("net"))},55004,(e,t,r)=>{t.exports=e.x("tls",()=>require("tls"))},92509,(e,t,r)=>{t.exports=e.x("url",()=>require("url"))},10430,(e,t,r)=>{t.exports=e.x("async_hooks",()=>require("async_hooks"))},45706,(e,t,r)=>{t.exports=e.x("querystring",()=>require("querystring"))},63890,(e,t,r)=>{t.exports=e.x("stream/web",()=>require("stream/web"))},37702,(e,t,r)=>{t.exports=e.x("worker_threads",()=>require("worker_threads"))},60438,(e,t,r)=>{t.exports=e.x("perf_hooks",()=>require("perf_hooks"))},78249,(e,t,r)=>{t.exports=e.x("util/types",()=>require("util/types"))},54993,(e,t,r)=>{t.exports=e.x("diagnostics_channel",()=>require("diagnostics_channel"))},25328,(e,t,r)=>{t.exports=e.x("http2",()=>require("http2"))},11913,(e,t,r)=>{t.exports=e.x("console",()=>require("console"))},78500,(e,t,r)=>{t.exports=e.x("node:async_hooks",()=>require("node:async_hooks"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},74533,(e,t,r)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},46786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},73939,(e,t,r)=>{"use strict";var o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,i={},l={VercelOidcTokenError:()=>p};for(var u in l)o(i,u,{get:l[u],enumerable:!0});t.exports=((e,t,r,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let r of n(t))a.call(e,r)||void 0===r||o(e,r,{get:()=>t[r],enumerable:!(i=s(t,r))||i.enumerable});return e})(o({},"__esModule",{value:!0}),i);class p extends Error{constructor(e,t){super(e),this.name="VercelOidcTokenError",this.cause=t}toString(){return this.cause?`${this.name}: ${this.message}: ${this.cause}`:`${this.name}: ${this.message}`}}},66680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},99348,(e,t,r)=>{t.exports=e.x("string_decoder",()=>require("string_decoder"))},81111,(e,t,r)=>{t.exports=e.x("node:stream",()=>require("node:stream"))},24361,(e,t,r)=>{t.exports=e.x("util",()=>require("util"))},54799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},27699,(e,t,r)=>{t.exports=e.x("events",()=>require("events"))},12057,(e,t,r)=>{t.exports=e.x("node:util",()=>require("node:util"))},87769,(e,t,r)=>{t.exports=e.x("node:events",()=>require("node:events"))},57764,(e,t,r)=>{t.exports=e.x("node:url",()=>require("node:url"))},10576,e=>{"use strict";e.i(75525),e.s([])},75990,e=>{"use strict";var t=e.i(80717);async function r(e){let r=`workflows/${e.userId}/${e.timestamp}-${e.projectName}.json`,o=await (0,t.put)(r,JSON.stringify(e,null,2),{access:"public",addRandomSuffix:!1});return console.log(`[Workflow Storage] Saved run to: ${o.url}`),o.url}async function o(e){let r=`workflows/${e}/`,{blobs:o}=await (0,t.list)({prefix:r});return(await Promise.all(o.map(async e=>{try{let t=await fetch(e.url);return await t.json()}catch(t){return console.error(`[Workflow Storage] Failed to fetch ${e.url}:`,t),null}}))).filter(e=>null!==e).sort((e,t)=>new Date(t.timestamp).getTime()-new Date(e.timestamp).getTime())}e.s(["listWorkflowRuns",()=>o,"saveWorkflowRun",()=>r])},36216,e=>{"use strict";async function t(e){throw Error("You attempted to execute workflow cloudFixWorkflow function directly. To start a workflow, use start(cloudFixWorkflow) from workflow/api")}t.workflowId="workflow//app/api/cloud/fix-workflow/workflow.ts//cloudFixWorkflow",e.s(["cloudFixWorkflow",()=>t])},33443,e=>{"use strict";var t=e.i(63382),r=e.i(64639),o=e.i(9710),s=e.i(54585),n=e.i(55812),a=e.i(18725),i=e.i(94777),l=e.i(19465),u=e.i(59382),p=e.i(75932),c=e.i(22566),d=e.i(91442),f=e.i(77038),h=e.i(94658),x=e.i(16211),m=e.i(93484),g=e.i(93695);e.i(3056);var w=e.i(62863),v=e.i(54799);e.i(10576);var y=e.i(84570),_=e.i(75990),k=e.i(36216);let b={"Access-Control-Allow-Origin":"http://localhost:3000","Access-Control-Allow-Methods":"POST, OPTIONS","Access-Control-Allow-Headers":"Content-Type, Authorization","Access-Control-Allow-Credentials":"true"};async function R(){return new Response(null,{status:204,headers:b})}async function S(t){let r,o,s;try{let{cookies:n}=await e.A(33043),a=await n(),i=a.get("access_token")?.value;if(!i){let e=t.headers.get("Authorization");e?.startsWith("Bearer ")&&(i=e.substring(7))}if(!i)return Response.json({success:!1,error:"Not authenticated. Please sign in to use workflows."},{status:401,headers:b});let l=t.headers.get("x-vercel-oidc-token")||process.env.VERCEL_OIDC_TOKEN;console.log(`[Start Fix] VERCEL_OIDC_TOKEN available: ${!!l}`);let u=await t.json(),{devUrl:p,repoOwner:c,repoName:d,baseBranch:f,bypassToken:h,repoUrl:x,repoBranch:m}=u;r=u.userId,o=u.projectName,console.log("[Start Fix] Starting cloud fix workflow..."),console.log(`[Start Fix] Dev URL: ${p}`),console.log(`[Start Fix] Project: ${o}`),console.log(`[Start Fix] User ID: ${r}`),console.log(`[Start Fix] Bypass Token: ${h?"provided":"not provided"}`),x&&(console.log(`[Start Fix] Will create sandbox from: ${x}`),console.log(`[Start Fix] Branch: ${m||"main"}`)),c&&d&&console.log(`[Start Fix] GitHub: ${c}/${d} (base: ${f||"main"})`);let g={devUrl:p,projectName:o,vercelToken:i,vercelOidcToken:l,...c&&{repoOwner:c},...d&&{repoName:d},...f&&{baseBranch:f},...h&&{bypassToken:h},...x&&{repoUrl:x},...m&&{repoBranch:m}};r&&o&&(s=(0,v.randomUUID)(),await (0,_.saveWorkflowRun)({id:s,userId:r,projectName:o,timestamp:new Date().toISOString(),status:"running"}),console.log(`[Start Fix] Saved workflow run metadata (running): ${s}`));let w=await (0,y.start)(k.cloudFixWorkflow,[g]);console.log("[Start Fix] Workflow started, waiting for completion...");let R=await w.returnValue,S=await R.json();return console.log("[Start Fix] Workflow completed successfully"),S.blobUrl&&console.log(`[Start Fix] Fix proposal uploaded to: ${S.blobUrl}`),S.pr?.prUrl&&console.log(`[Start Fix] GitHub PR created: ${S.pr.prUrl}`),r&&o&&s&&(await (0,_.saveWorkflowRun)({id:s,userId:r,projectName:o,timestamp:new Date().toISOString(),status:"success",reportBlobUrl:S.blobUrl,prUrl:S.pr?.prUrl,beforeScreenshotUrl:S.beforeScreenshotUrl||void 0}),console.log(`[Start Fix] Updated workflow run metadata to success: ${s}`)),Response.json({success:!0,message:"Cloud fix workflow completed successfully",projectName:o,runId:s,blobUrl:S.blobUrl,fixProposal:S.fixProposal,pr:S.pr},{headers:b})}catch(e){return console.error("[Start Fix] Error running workflow:",e),r&&o&&s&&(await (0,_.saveWorkflowRun)({id:s,userId:r,projectName:o,timestamp:new Date().toISOString(),status:"failure",error:e instanceof Error?e.message:String(e)}).catch(e=>console.error("[Start Fix] Failed to save error metadata:",e)),console.log(`[Start Fix] Updated workflow run metadata to failure: ${s}`)),Response.json({success:!1,error:e instanceof Error?e.message:String(e)},{status:500,headers:b})}}e.s(["OPTIONS",()=>R,"POST",()=>S,"maxDuration",0,600],50884);var A=e.i(50884);let C=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/cloud/start-fix/route",pathname:"/api/cloud/start-fix",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/mcp-server/app/api/cloud/start-fix/route.ts",nextConfigOutput:"",userland:A}),{workAsyncStorage:O,workUnitAsyncStorage:E,serverHooks:q}=C;function j(){return(0,o.patchFetch)({workAsyncStorage:O,workUnitAsyncStorage:E})}async function P(e,t,o){C.isDev&&(0,s.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/cloud/start-fix/route";v=v.replace(/\/index$/,"")||"/";let y=await C.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==o.waitUntil||o.waitUntil.call(o,Promise.resolve()),null;let{buildId:_,params:k,nextConfig:b,parsedUrl:R,isDraftMode:S,prerenderManifest:A,routerServerContext:O,isOnDemandRevalidate:E,revalidateOnlyGenerated:q,resolvedPathname:j,clientReferenceManifest:P,serverActionsManifest:$}=y,T=(0,l.normalizeAppPath)(v),U=!!(A.dynamicRoutes[T]||A.routes[j]),N=async()=>((null==O?void 0:O.render404)?await O.render404(e,t,R,!1):t.end("This page could not be found"),null);if(U&&!S){let e=!!A.routes[j],t=A.dynamicRoutes[T];if(t&&!1===t.fallback&&!e){if(b.experimental.adapterPath)return await N();throw new g.NoFallbackError}}let F=null;!U||C.isDev||S||(F="/index"===(F=j)?"/":F);let D=!0===C.isDev||!U,I=U&&!D;$&&P&&(0,a.setReferenceManifestsSingleton)({page:v,clientReferenceManifest:P,serverActionsManifest:$,serverModuleMap:(0,i.createServerModuleMap)({serverActionsManifest:$})});let M=e.method||"GET",H=(0,n.getTracer)(),W=H.getActiveScopeSpan(),L={params:k,prerenderManifest:A,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts},cacheComponents:!!b.cacheComponents,supportsDynamicResponse:D,incrementalCache:(0,s.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:b.cacheLife,waitUntil:o.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,o,s)=>C.onRequestError(e,t,o,s,O)},sharedContext:{buildId:_}},B=new u.NodeNextRequest(e),K=new u.NodeNextResponse(t),V=p.NextRequestAdapter.fromNodeNextRequest(B,(0,p.signalFromNodeResponse)(t));try{let a=async e=>C.handle(V,L).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=H.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==c.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let o=r.get("next.route");if(o){let t=`${M} ${o}`;e.setAttributes({"next.route":o,"http.route":o,"next.span_name":t}),e.updateName(t)}else e.updateName(`${M} ${v}`)}),i=!!(0,s.getRequestMeta)(e,"minimalMode"),l=async s=>{var n,l;let u=async({previousCacheEntry:r})=>{try{if(!i&&E&&q&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await a(s);e.fetchMetrics=L.renderOpts.fetchMetrics;let l=L.renderOpts.pendingWaitUntil;l&&o.waitUntil&&(o.waitUntil(l),l=void 0);let u=L.renderOpts.collectedTags;if(!U)return await (0,f.sendResponse)(B,K,n,L.renderOpts.pendingWaitUntil),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);u&&(t[m.NEXT_CACHE_TAGS_HEADER]=u),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==L.renderOpts.collectedRevalidate&&!(L.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&L.renderOpts.collectedRevalidate,o=void 0===L.renderOpts.collectedExpire||L.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:L.renderOpts.collectedExpire;return{value:{kind:w.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:o}}}}catch(t){throw(null==r?void 0:r.isStale)&&await C.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:I,isOnDemandRevalidate:E})},!1,O),t}},p=await C.handleResponse({req:e,nextConfig:b,cacheKey:F,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:q,responseGenerator:u,waitUntil:o.waitUntil,isMinimalMode:i});if(!U)return null;if((null==p||null==(n=p.value)?void 0:n.kind)!==w.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==p||null==(l=p.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});i||t.setHeader("x-nextjs-cache",E?"REVALIDATED":p.isMiss?"MISS":p.isStale?"STALE":"HIT"),S&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let c=(0,h.fromNodeOutgoingHttpHeaders)(p.value.headers);return i&&U||c.delete(m.NEXT_CACHE_TAGS_HEADER),!p.cacheControl||t.getHeader("Cache-Control")||c.get("Cache-Control")||c.set("Cache-Control",(0,x.getCacheControlHeader)(p.cacheControl)),await (0,f.sendResponse)(B,K,new Response(p.value.body,{headers:c,status:p.value.status||200})),null};W?await l(W):await H.withPropagatedContext(e.headers,()=>H.trace(c.BaseServerSpan.handleRequest,{spanName:`${M} ${v}`,kind:n.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},l))}catch(t){if(t instanceof g.NoFallbackError||await C.onRequestError(e,t,{routerKind:"App Router",routePath:T,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:I,isOnDemandRevalidate:E})},!1,O),U)throw t;return await (0,f.sendResponse)(B,K,new Response(null,{status:500})),null}}e.s(["handler",()=>P,"patchFetch",()=>j,"routeModule",()=>C,"serverHooks",()=>q,"workAsyncStorage",()=>O,"workUnitAsyncStorage",()=>E],33443)},35726,e=>{e.v(e=>Promise.resolve().then(()=>e(67173)))},16653,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__d4c4df71._.js"].map(t=>e.l(t))).then(()=>t(39609)))},92892,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__88f7a1e3._.js"].map(t=>e.l(t))).then(()=>t(27791)))},90559,e=>{e.v(t=>Promise.all(["server/chunks/mcp-server_app_api_cloud_fix-workflow_steps_ts_b65f3271._.js"].map(t=>e.l(t))).then(()=>t(1177)))},33043,e=>{e.v(t=>Promise.all(["server/chunks/2e4a4_next_dist_server_app-render_after-task-async-storage_external_7bcc6304.js","server/chunks/bee4f_next_dist_3372cf42._.js","server/chunks/bee4f_next_dff2a203._.js"].map(t=>e.l(t))).then(()=>t(93408)))}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__75d68567._.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../node_modules/.pnpm/next%4016.1.0-canary.9_%40opentelemetry%2Bapi%401.9.0_babel-plugin-react-compiler%401.0.0_react-d_e89f05fa6262f945d2946e6441ada21f/node_modules/next/src/server/route-modules/app-page/module.compiled.js","../../../../node_modules/.pnpm/next%4016.1.0-canary.9_%40opentelemetry%2Bapi%401.9.0_babel-plugin-react-compiler%401.0.0_react-d_e89f05fa6262f945d2946e6441ada21f/node_modules/next/src/server/route-modules/app-page/vendored/rsc/react.ts","../../../../node_modules/.pnpm/next%4016.1.0-canary.9_%40opentelemetry%2Bapi%401.9.0_babel-plugin-react-compiler%401.0.0_react-d_e89f05fa6262f945d2946e6441ada21f/node_modules/next/dist/compiled/%40edge-runtime/cookies/index.js","../../../../node_modules/.pnpm/%40vercel%2Boidc%403.0.5/node_modules/%40vercel/oidc/dist/token-error.js","../../../../node_modules/.pnpm/workflow%404.0.1-beta.26_%40aws-sdk%2Bclient-sts%403.940.0_%40opentelemetry%2Bapi%401.9.0_babel-plugi_59e16b84a7e51de3ccd055db63660cbb/node_modules/workflow/src/api.ts","../../../../mcp-server/lib/workflow-storage.ts","../../../../mcp-server/app/api/cloud/fix-workflow/workflow.ts","../../../../mcp-server/app/api/cloud/start-fix/route.ts","../../../../node_modules/.pnpm/next%4016.1.0-canary.9_%40opentelemetry%2Bapi%401.9.0_babel-plugin-react-compiler%401.0.0_react-d_e89f05fa6262f945d2946e6441ada21f/node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["if (process.env.NEXT_RUNTIME === 'edge') {\n module.exports = require('next/dist/server/route-modules/app-page/module.js')\n} else {\n if (process.env.__NEXT_EXPERIMENTAL_REACT) {\n if (process.env.NODE_ENV === 'development') {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo-experimental.runtime.dev.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page-experimental.runtime.dev.js')\n }\n } else {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page-experimental.runtime.prod.js')\n }\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo.runtime.dev.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page.runtime.dev.js')\n }\n } else {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo.runtime.prod.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page.runtime.prod.js')\n }\n }\n }\n}\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-rsc']!.React\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n RequestCookies: () => RequestCookies,\n ResponseCookies: () => ResponseCookies,\n parseCookie: () => parseCookie,\n parseSetCookie: () => parseSetCookie,\n stringifyCookie: () => stringifyCookie\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/serialize.ts\nfunction stringifyCookie(c) {\n var _a;\n const attrs = [\n \"path\" in c && c.path && `Path=${c.path}`,\n \"expires\" in c && (c.expires || c.expires === 0) && `Expires=${(typeof c.expires === \"number\" ? new Date(c.expires) : c.expires).toUTCString()}`,\n \"maxAge\" in c && typeof c.maxAge === \"number\" && `Max-Age=${c.maxAge}`,\n \"domain\" in c && c.domain && `Domain=${c.domain}`,\n \"secure\" in c && c.secure && \"Secure\",\n \"httpOnly\" in c && c.httpOnly && \"HttpOnly\",\n \"sameSite\" in c && c.sameSite && `SameSite=${c.sameSite}`,\n \"partitioned\" in c && c.partitioned && \"Partitioned\",\n \"priority\" in c && c.priority && `Priority=${c.priority}`\n ].filter(Boolean);\n const stringified = `${c.name}=${encodeURIComponent((_a = c.value) != null ? _a : \"\")}`;\n return attrs.length === 0 ? stringified : `${stringified}; ${attrs.join(\"; \")}`;\n}\nfunction parseCookie(cookie) {\n const map = /* @__PURE__ */ new Map();\n for (const pair of cookie.split(/; */)) {\n if (!pair)\n continue;\n const splitAt = pair.indexOf(\"=\");\n if (splitAt === -1) {\n map.set(pair, \"true\");\n continue;\n }\n const [key, value] = [pair.slice(0, splitAt), pair.slice(splitAt + 1)];\n try {\n map.set(key, decodeURIComponent(value != null ? value : \"true\"));\n } catch {\n }\n }\n return map;\n}\nfunction parseSetCookie(setCookie) {\n if (!setCookie) {\n return void 0;\n }\n const [[name, value], ...attributes] = parseCookie(setCookie);\n const {\n domain,\n expires,\n httponly,\n maxage,\n path,\n samesite,\n secure,\n partitioned,\n priority\n } = Object.fromEntries(\n attributes.map(([key, value2]) => [\n key.toLowerCase().replace(/-/g, \"\"),\n value2\n ])\n );\n const cookie = {\n name,\n value: decodeURIComponent(value),\n domain,\n ...expires && { expires: new Date(expires) },\n ...httponly && { httpOnly: true },\n ...typeof maxage === \"string\" && { maxAge: Number(maxage) },\n path,\n ...samesite && { sameSite: parseSameSite(samesite) },\n ...secure && { secure: true },\n ...priority && { priority: parsePriority(priority) },\n ...partitioned && { partitioned: true }\n };\n return compact(cookie);\n}\nfunction compact(t) {\n const newT = {};\n for (const key in t) {\n if (t[key]) {\n newT[key] = t[key];\n }\n }\n return newT;\n}\nvar SAME_SITE = [\"strict\", \"lax\", \"none\"];\nfunction parseSameSite(string) {\n string = string.toLowerCase();\n return SAME_SITE.includes(string) ? string : void 0;\n}\nvar PRIORITY = [\"low\", \"medium\", \"high\"];\nfunction parsePriority(string) {\n string = string.toLowerCase();\n return PRIORITY.includes(string) ? string : void 0;\n}\nfunction splitCookiesString(cookiesString) {\n if (!cookiesString)\n return [];\n var cookiesStrings = [];\n var pos = 0;\n var start;\n var ch;\n var lastComma;\n var nextStart;\n var cookiesSeparatorFound;\n function skipWhitespace() {\n while (pos < cookiesString.length && /\\s/.test(cookiesString.charAt(pos))) {\n pos += 1;\n }\n return pos < cookiesString.length;\n }\n function notSpecialChar() {\n ch = cookiesString.charAt(pos);\n return ch !== \"=\" && ch !== \";\" && ch !== \",\";\n }\n while (pos < cookiesString.length) {\n start = pos;\n cookiesSeparatorFound = false;\n while (skipWhitespace()) {\n ch = cookiesString.charAt(pos);\n if (ch === \",\") {\n lastComma = pos;\n pos += 1;\n skipWhitespace();\n nextStart = pos;\n while (pos < cookiesString.length && notSpecialChar()) {\n pos += 1;\n }\n if (pos < cookiesString.length && cookiesString.charAt(pos) === \"=\") {\n cookiesSeparatorFound = true;\n pos = nextStart;\n cookiesStrings.push(cookiesString.substring(start, lastComma));\n start = pos;\n } else {\n pos = lastComma + 1;\n }\n } else {\n pos += 1;\n }\n }\n if (!cookiesSeparatorFound || pos >= cookiesString.length) {\n cookiesStrings.push(cookiesString.substring(start, cookiesString.length));\n }\n }\n return cookiesStrings;\n}\n\n// src/request-cookies.ts\nvar RequestCookies = class {\n constructor(requestHeaders) {\n /** @internal */\n this._parsed = /* @__PURE__ */ new Map();\n this._headers = requestHeaders;\n const header = requestHeaders.get(\"cookie\");\n if (header) {\n const parsed = parseCookie(header);\n for (const [name, value] of parsed) {\n this._parsed.set(name, { name, value });\n }\n }\n }\n [Symbol.iterator]() {\n return this._parsed[Symbol.iterator]();\n }\n /**\n * The amount of cookies received from the client\n */\n get size() {\n return this._parsed.size;\n }\n get(...args) {\n const name = typeof args[0] === \"string\" ? args[0] : args[0].name;\n return this._parsed.get(name);\n }\n getAll(...args) {\n var _a;\n const all = Array.from(this._parsed);\n if (!args.length) {\n return all.map(([_, value]) => value);\n }\n const name = typeof args[0] === \"string\" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name;\n return all.filter(([n]) => n === name).map(([_, value]) => value);\n }\n has(name) {\n return this._parsed.has(name);\n }\n set(...args) {\n const [name, value] = args.length === 1 ? [args[0].name, args[0].value] : args;\n const map = this._parsed;\n map.set(name, { name, value });\n this._headers.set(\n \"cookie\",\n Array.from(map).map(([_, value2]) => stringifyCookie(value2)).join(\"; \")\n );\n return this;\n }\n /**\n * Delete the cookies matching the passed name or names in the request.\n */\n delete(names) {\n const map = this._parsed;\n const result = !Array.isArray(names) ? map.delete(names) : names.map((name) => map.delete(name));\n this._headers.set(\n \"cookie\",\n Array.from(map).map(([_, value]) => stringifyCookie(value)).join(\"; \")\n );\n return result;\n }\n /**\n * Delete all the cookies in the cookies in the request.\n */\n clear() {\n this.delete(Array.from(this._parsed.keys()));\n return this;\n }\n /**\n * Format the cookies in the request as a string for logging\n */\n [Symbol.for(\"edge-runtime.inspect.custom\")]() {\n return `RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;\n }\n toString() {\n return [...this._parsed.values()].map((v) => `${v.name}=${encodeURIComponent(v.value)}`).join(\"; \");\n }\n};\n\n// src/response-cookies.ts\nvar ResponseCookies = class {\n constructor(responseHeaders) {\n /** @internal */\n this._parsed = /* @__PURE__ */ new Map();\n var _a, _b, _c;\n this._headers = responseHeaders;\n const setCookie = (_c = (_b = (_a = responseHeaders.getSetCookie) == null ? void 0 : _a.call(responseHeaders)) != null ? _b : responseHeaders.get(\"set-cookie\")) != null ? _c : [];\n const cookieStrings = Array.isArray(setCookie) ? setCookie : splitCookiesString(setCookie);\n for (const cookieString of cookieStrings) {\n const parsed = parseSetCookie(cookieString);\n if (parsed)\n this._parsed.set(parsed.name, parsed);\n }\n }\n /**\n * {@link https://wicg.github.io/cookie-store/#CookieStore-get CookieStore#get} without the Promise.\n */\n get(...args) {\n const key = typeof args[0] === \"string\" ? args[0] : args[0].name;\n return this._parsed.get(key);\n }\n /**\n * {@link https://wicg.github.io/cookie-store/#CookieStore-getAll CookieStore#getAll} without the Promise.\n */\n getAll(...args) {\n var _a;\n const all = Array.from(this._parsed.values());\n if (!args.length) {\n return all;\n }\n const key = typeof args[0] === \"string\" ? args[0] : (_a = args[0]) == null ? void 0 : _a.name;\n return all.filter((c) => c.name === key);\n }\n has(name) {\n return this._parsed.has(name);\n }\n /**\n * {@link https://wicg.github.io/cookie-store/#CookieStore-set CookieStore#set} without the Promise.\n */\n set(...args) {\n const [name, value, cookie] = args.length === 1 ? [args[0].name, args[0].value, args[0]] : args;\n const map = this._parsed;\n map.set(name, normalizeCookie({ name, value, ...cookie }));\n replace(map, this._headers);\n return this;\n }\n /**\n * {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise.\n */\n delete(...args) {\n const [name, options] = typeof args[0] === \"string\" ? [args[0]] : [args[0].name, args[0]];\n return this.set({ ...options, name, value: \"\", expires: /* @__PURE__ */ new Date(0) });\n }\n [Symbol.for(\"edge-runtime.inspect.custom\")]() {\n return `ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;\n }\n toString() {\n return [...this._parsed.values()].map(stringifyCookie).join(\"; \");\n }\n};\nfunction replace(bag, headers) {\n headers.delete(\"set-cookie\");\n for (const [, value] of bag) {\n const serialized = stringifyCookie(value);\n headers.append(\"set-cookie\", serialized);\n }\n}\nfunction normalizeCookie(cookie = { name: \"\", value: \"\" }) {\n if (typeof cookie.expires === \"number\") {\n cookie.expires = new Date(cookie.expires);\n }\n if (cookie.maxAge) {\n cookie.expires = new Date(Date.now() + cookie.maxAge * 1e3);\n }\n if (cookie.path === null || cookie.path === void 0) {\n cookie.path = \"/\";\n }\n return cookie;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n RequestCookies,\n ResponseCookies,\n parseCookie,\n parseSetCookie,\n stringifyCookie\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_error_exports = {};\n__export(token_error_exports, {\n VercelOidcTokenError: () => VercelOidcTokenError\n});\nmodule.exports = __toCommonJS(token_error_exports);\nclass VercelOidcTokenError extends Error {\n constructor(message, cause) {\n super(message);\n this.name = \"VercelOidcTokenError\";\n this.cause = cause;\n }\n toString() {\n if (this.cause) {\n return `${this.name}: ${this.message}: ${this.cause}`;\n }\n return `${this.name}: ${this.message}`;\n }\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n VercelOidcTokenError\n});\n","unable to read source [project]/node_modules/.pnpm/workflow@4.0.1-beta.26_@aws-sdk+client-sts@3.940.0_@opentelemetry+api@1.9.0_babel-plugi_59e16b84a7e51de3ccd055db63660cbb/node_modules/workflow/src/api.ts","import { list, put } from \"@vercel/blob\"\n\nexport interface WorkflowRun {\n id: string\n userId: string\n projectName: string\n timestamp: string\n status: \"running\" | \"success\" | \"failure\"\n reportBlobUrl?: string\n prUrl?: string\n error?: string\n beforeScreenshotUrl?: string\n afterScreenshotUrl?: string\n}\n\n/**\n * Save a workflow run to blob storage\n * Path format: workflows/{userId}/{timestamp}-{projectName}.json\n */\nexport async function saveWorkflowRun(run: WorkflowRun): Promise<string> {\n const path = `workflows/${run.userId}/${run.timestamp}-${run.projectName}.json`\n\n const blob = await put(path, JSON.stringify(run, null, 2), {\n access: \"public\",\n addRandomSuffix: false\n })\n\n console.log(`[Workflow Storage] Saved run to: ${blob.url}`)\n return blob.url\n}\n\n/**\n * List all workflow runs for a user\n * Returns runs sorted by timestamp (newest first)\n */\nexport async function listWorkflowRuns(userId: string): Promise<WorkflowRun[]> {\n const prefix = `workflows/${userId}/`\n\n const { blobs } = await list({ prefix })\n\n // Fetch and parse each blob\n const runs = await Promise.all(\n blobs.map(async (blob) => {\n try {\n const response = await fetch(blob.url)\n const run: WorkflowRun = await response.json()\n return run\n } catch (error) {\n console.error(`[Workflow Storage] Failed to fetch ${blob.url}:`, error)\n return null\n }\n })\n )\n\n // Filter out failed fetches and sort by timestamp\n return runs\n .filter((run): run is WorkflowRun => run !== null)\n .sort((a, b) => new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime())\n}\n\n/**\n * Get a single workflow run by ID\n */\nexport async function getWorkflowRun(userId: string, runId: string): Promise<WorkflowRun | null> {\n const runs = await listWorkflowRuns(userId)\n return runs.find((run) => run.id === runId) || null\n}\n","/**__internal_workflows{\"workflows\":{\"app/api/cloud/fix-workflow/workflow.ts\":{\"cloudFixWorkflow\":{\"workflowId\":\"workflow//app/api/cloud/fix-workflow/workflow.ts//cloudFixWorkflow\"}}},\"steps\":{\"app/api/cloud/fix-workflow/workflow.ts\":{\"analyzeLogsWithAgent\":{\"stepId\":\"step//app/api/cloud/fix-workflow/workflow.ts//analyzeLogsWithAgent\"},\"createD3kSandbox\":{\"stepId\":\"step//app/api/cloud/fix-workflow/workflow.ts//createD3kSandbox\"},\"createGitHubPR\":{\"stepId\":\"step//app/api/cloud/fix-workflow/workflow.ts//createGitHubPR\"},\"fetchRealLogs\":{\"stepId\":\"step//app/api/cloud/fix-workflow/workflow.ts//fetchRealLogs\"},\"uploadToBlob\":{\"stepId\":\"step//app/api/cloud/fix-workflow/workflow.ts//uploadToBlob\"}}}}*/;\n/**\n * Cloud Fix Workflow Function - Core workflow logic\n *\n * This file contains ONLY the workflow function and step wrappers.\n * It does NOT import workflow/api to avoid bundler issues.\n */ /**\n * Main workflow function that orchestrates the fix process\n */ export async function cloudFixWorkflow(params) {\n throw new Error(\"You attempted to execute workflow cloudFixWorkflow function directly. To start a workflow, use start(cloudFixWorkflow) from workflow/api\");\n}\ncloudFixWorkflow.workflowId = \"workflow//app/api/cloud/fix-workflow/workflow.ts//cloudFixWorkflow\";\n// Step function wrappers that dynamically import the actual implementations\nasync function createD3kSandbox(repoUrl, branch, projectName, vercelToken, vercelOidcToken) {\n const { createD3kSandbox } = await import(\"./steps\");\n return createD3kSandbox(repoUrl, branch, projectName, vercelToken, vercelOidcToken);\n}\nasync function fetchRealLogs(mcpUrlOrDevUrl, bypassToken, sandboxDevUrl, clsData, mcpError) {\n const { fetchRealLogs } = await import(\"./steps\");\n return fetchRealLogs(mcpUrlOrDevUrl, bypassToken, sandboxDevUrl, clsData, mcpError);\n}\nasync function analyzeLogsWithAgent(logAnalysis, devUrl) {\n const { analyzeLogsWithAgent } = await import(\"./steps\");\n return analyzeLogsWithAgent(logAnalysis, devUrl);\n}\nasync function uploadToBlob(fixProposal, projectName, logAnalysis, devUrl, beforeScreenshotUrl) {\n const { uploadToBlob } = await import(\"./steps\");\n return uploadToBlob(fixProposal, projectName, logAnalysis, devUrl, beforeScreenshotUrl);\n}\nasync function createGitHubPR(fixProposal, blobUrl, repoOwner, repoName, baseBranch, projectName) {\n const { createGitHubPR } = await import(\"./steps\");\n return createGitHubPR(fixProposal, blobUrl, repoOwner, repoName, baseBranch, projectName);\n}\n","import { randomUUID } from \"crypto\";\nimport { start } from \"workflow/api\";\nimport { saveWorkflowRun } from \"@/lib/workflow-storage\";\nimport { cloudFixWorkflow } from \"../fix-workflow/workflow\";\n/**\n * API Route to Start Cloud Fix Workflow\n *\n * This endpoint uses the Workflow SDK's start() API to invoke the workflow\n * and waits for the result using run.returnValue, which includes the blob URL\n * where the fix proposal was uploaded.\n */ // Configure longer timeout for workflow execution (10 minutes)\nexport const maxDuration = 600;\n// CORS headers - allowing credentials from localhost\nconst corsHeaders = {\n \"Access-Control-Allow-Origin\": \"http://localhost:3000\",\n \"Access-Control-Allow-Methods\": \"POST, OPTIONS\",\n \"Access-Control-Allow-Headers\": \"Content-Type, Authorization\",\n \"Access-Control-Allow-Credentials\": \"true\"\n};\n// Handle OPTIONS preflight request\nexport async function OPTIONS() {\n return new Response(null, {\n status: 204,\n headers: corsHeaders\n });\n}\nexport async function POST(request) {\n let userId;\n let projectName;\n let runId;\n try {\n // Get user's access token from cookies or Authorization header\n const { cookies: getCookies } = await import(\"next/headers\");\n const cookieStore = await getCookies();\n let accessToken = cookieStore.get(\"access_token\")?.value;\n // Fallback to Authorization header for cross-origin requests\n if (!accessToken) {\n const authHeader = request.headers.get(\"Authorization\");\n if (authHeader?.startsWith(\"Bearer \")) {\n accessToken = authHeader.substring(7);\n }\n }\n if (!accessToken) {\n return Response.json({\n success: false,\n error: \"Not authenticated. Please sign in to use workflows.\"\n }, {\n status: 401,\n headers: corsHeaders\n });\n }\n // Get VERCEL_OIDC_TOKEN from request header (runtime token)\n const vercelOidcToken = request.headers.get(\"x-vercel-oidc-token\") || process.env.VERCEL_OIDC_TOKEN;\n console.log(`[Start Fix] VERCEL_OIDC_TOKEN available: ${!!vercelOidcToken}`);\n const body = await request.json();\n const { devUrl, repoOwner, repoName, baseBranch, bypassToken, repoUrl, repoBranch } = body;\n userId = body.userId;\n projectName = body.projectName;\n console.log(\"[Start Fix] Starting cloud fix workflow...\");\n console.log(`[Start Fix] Dev URL: ${devUrl}`);\n console.log(`[Start Fix] Project: ${projectName}`);\n console.log(`[Start Fix] User ID: ${userId}`);\n console.log(`[Start Fix] Bypass Token: ${bypassToken ? \"provided\" : \"not provided\"}`);\n if (repoUrl) {\n console.log(`[Start Fix] Will create sandbox from: ${repoUrl}`);\n console.log(`[Start Fix] Branch: ${repoBranch || \"main\"}`);\n }\n if (repoOwner && repoName) {\n console.log(`[Start Fix] GitHub: ${repoOwner}/${repoName} (base: ${baseBranch || \"main\"})`);\n }\n // Start the workflow and get a Run object\n // Pass serializable data instead of Request object\n // The workflow will fetch real logs from the devUrl and optionally create a PR\n const workflowParams = {\n devUrl,\n projectName,\n vercelToken: accessToken,\n vercelOidcToken,\n ...repoOwner && {\n repoOwner\n },\n ...repoName && {\n repoName\n },\n ...baseBranch && {\n baseBranch\n },\n ...bypassToken && {\n bypassToken\n },\n ...repoUrl && {\n repoUrl\n },\n ...repoBranch && {\n repoBranch\n }\n };\n // Save workflow run metadata at start if userId and projectName provided\n if (userId && projectName) {\n runId = randomUUID();\n await saveWorkflowRun({\n id: runId,\n userId,\n projectName,\n timestamp: new Date().toISOString(),\n status: \"running\"\n });\n console.log(`[Start Fix] Saved workflow run metadata (running): ${runId}`);\n }\n const run = await start(cloudFixWorkflow, [\n workflowParams\n ]);\n console.log(`[Start Fix] Workflow started, waiting for completion...`);\n // Wait for workflow to complete and get the Response\n const workflowResponse = await run.returnValue;\n // Parse the JSON result from the Response\n const result = await workflowResponse.json();\n console.log(`[Start Fix] Workflow completed successfully`);\n if (result.blobUrl) {\n console.log(`[Start Fix] Fix proposal uploaded to: ${result.blobUrl}`);\n }\n if (result.pr?.prUrl) {\n console.log(`[Start Fix] GitHub PR created: ${result.pr.prUrl}`);\n }\n // Update workflow run metadata with success status\n if (userId && projectName && runId) {\n await saveWorkflowRun({\n id: runId,\n userId,\n projectName,\n timestamp: new Date().toISOString(),\n status: \"success\",\n reportBlobUrl: result.blobUrl,\n prUrl: result.pr?.prUrl,\n beforeScreenshotUrl: result.beforeScreenshotUrl || undefined\n });\n console.log(`[Start Fix] Updated workflow run metadata to success: ${runId}`);\n }\n return Response.json({\n success: true,\n message: \"Cloud fix workflow completed successfully\",\n projectName,\n runId,\n blobUrl: result.blobUrl,\n fixProposal: result.fixProposal,\n pr: result.pr\n }, {\n headers: corsHeaders\n });\n } catch (error) {\n console.error(\"[Start Fix] Error running workflow:\", error);\n // Update workflow run metadata with failure status\n if (userId && projectName && runId) {\n await saveWorkflowRun({\n id: runId,\n userId,\n projectName,\n timestamp: new Date().toISOString(),\n status: \"failure\",\n error: error instanceof Error ? error.message : String(error)\n }).catch((err)=>console.error(\"[Start Fix] Failed to save error metadata:\", err));\n console.log(`[Start Fix] Updated workflow run metadata to failure: ${runId}`);\n }\n return Response.json({\n success: false,\n error: error instanceof Error ? error.message : String(error)\n }, {\n status: 500,\n headers: corsHeaders\n });\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setReferenceManifestsSingleton } from \"next/dist/esm/server/app-render/encryption-utils\";\nimport { createServerModuleMap } from \"next/dist/esm/server/app-render/action-utils\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/cloud/start-fix/route\",\n pathname: \"/api/cloud/start-fix\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/mcp-server/app/api/cloud/start-fix/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/cloud/start-fix/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setReferenceManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest,\n serverModuleMap: createServerModuleMap({\n serverActionsManifest\n })\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":["process","env","NEXT_RUNTIME","module","exports","require","__NEXT_EXPERIMENTAL_REACT","NODE_ENV","TURBOPACK","vendored","React"],"mappings":"ysBA0BQG,EAAOC,OAAO,CAAGC,EAAQ,CAAA,CAAA,IAAA,iCC1BjCF,EAAOC,OAAO,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,AAAS,GAAG,CAAC,kBAAkB,AAC7F,EAAQ,GAAG,CAAC,gBAAiB,CAAA,EAAA,EAAA,qBAAA,AAAqB,EAAC,EAAW,YAAY,GAE9E,MAAM,CAAA,EAAA,EAAA,YAAY,AAAZ,EAAa,EAAa,EAChC,IAAI,SAAS,EAAW,KAAK,CAAC,IAAI,CAAE,SAChC,EACA,OAAQ,EAAW,KAAK,CAAC,MAAM,EAAI,GACvC,IACO,IACX,EAGI,EACA,MAAM,EAAe,EADT,CAGZ,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,GAEf,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,CAClC,0CACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[0,1,2,3,8]}
@@ -1,3 +0,0 @@
1
- module.exports=[18622,(a,b,c)=>{b.exports=a.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},48293,(a,b,c)=>{"use strict";b.exports=a.r(65071).vendored["react-ssr"].ReactDOM},65071,(a,b,c)=>{"use strict";b.exports=a.r(18622)},55205,(a,b,c)=>{"use strict";b.exports=a.r(65071).vendored["react-ssr"].ReactJsxRuntime},33857,(a,b,c)=>{"use strict";b.exports=a.r(65071).vendored["react-ssr"].React},27125,(a,b,c)=>{"use strict";b.exports=a.r(65071).vendored.contexts.AppRouterContext},77279,(a,b,c)=>{"use strict";b.exports=a.r(65071).vendored["react-ssr"].ReactServerDOMTurbopackClient},32570,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"warnOnce",{enumerable:!0,get:function(){return d}});let d=a=>{}},3988,(a,b,c)=>{"use strict";function d(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(d=function(a){return a?c:b})(a)}c._=function(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=d(b);if(c&&c.has(a))return c.get(a);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in a)if("default"!==g&&Object.prototype.hasOwnProperty.call(a,g)){var h=f?Object.getOwnPropertyDescriptor(a,g):null;h&&(h.get||h.set)?Object.defineProperty(e,g,h):e[g]=a[g]}return e.default=a,c&&c.set(a,e),e}},71075,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"useMergedRef",{enumerable:!0,get:function(){return e}});let d=a.r(33857);function e(a,b){let c=(0,d.useRef)(null),e=(0,d.useRef)(null);return(0,d.useCallback)(d=>{if(null===d){let a=c.current;a&&(c.current=null,a());let b=e.current;b&&(e.current=null,b())}else a&&(c.current=f(a,d)),b&&(e.current=f(b,d))},[a,b])}function f(a,b){if("function"!=typeof a)return a.current=b,()=>{a.current=null};{let c=a(b);return"function"==typeof c?c:()=>a(null)}}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},16274,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={DEFAULT_SEGMENT_KEY:function(){return l},PAGE_SEGMENT_KEY:function(){return k},addSearchParamsIfPageSegment:function(){return i},computeSelectedLayoutSegment:function(){return j},getSegmentValue:function(){return f},getSelectedLayoutSegmentPath:function(){return function a(b,c,d=!0,e=[]){let g;if(d)g=b[1][c];else{let a=b[1];g=a.children??Object.values(a)[0]}if(!g)return e;let h=f(g[0]);return!h||h.startsWith(k)?e:(e.push(h),a(g,c,!1,e))}},isGroupSegment:function(){return g},isParallelRouteSegment:function(){return h}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});function f(a){return Array.isArray(a)?a[1]:a}function g(a){return"("===a[0]&&a.endsWith(")")}function h(a){return a.startsWith("@")&&"@children"!==a}function i(a,b){if(a.includes(k)){let a=JSON.stringify(b);return"{}"!==a?k+"?"+a:k}return a}function j(a,b){if(!a||0===a.length)return null;let c="children"===b?a[0]:a[a.length-1];return c===l?null:c}let k="__PAGE__",l="__DEFAULT__"},60019,a=>{"use strict";var b=a.i(55205),c=a.i(77696),d=a.i(42261),e=a.i(18749);let f=(0,d.cva)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function g({className:a,variant:d,size:g,asChild:h=!1,...i}){let j=h?c.Slot:"button";return(0,b.jsx)(j,{"data-slot":"button",className:(0,e.cn)(f({variant:d,size:g,className:a})),...i})}a.s(["Button",()=>g])},25988,a=>{"use strict";var b=a.i(55205),c=a.i(18749);function d({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card",className:(0,c.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",a),...d})}function e({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-header",className:(0,c.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",a),...d})}function f({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-title",className:(0,c.cn)("leading-none font-semibold",a),...d})}function g({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-content",className:(0,c.cn)("px-6",a),...d})}a.s(["Card",()=>d,"CardContent",()=>g,"CardHeader",()=>e,"CardTitle",()=>f])},24501,a=>{"use strict";var b=a.i(55205),c=a.i(14957),d=a.i(7287),e=a.i(33857),f=a.i(77696),g=a.i(42261),h=a.i(18749);let i=(0,g.cva)("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function j({className:a,variant:c,asChild:d=!1,...e}){let g=d?f.Slot:"span";return(0,b.jsx)(g,{"data-slot":"badge",className:(0,h.cn)(i({variant:c}),a),...e})}var k=a.i(60019),l=a.i(25988);function m({className:a,...c}){return(0,b.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,b.jsx)("table",{"data-slot":"table",className:(0,h.cn)("w-full caption-bottom text-sm",a),...c})})}function n({className:a,...c}){return(0,b.jsx)("thead",{"data-slot":"table-header",className:(0,h.cn)("[&_tr]:border-b",a),...c})}function o({className:a,...c}){return(0,b.jsx)("tbody",{"data-slot":"table-body",className:(0,h.cn)("[&_tr:last-child]:border-0",a),...c})}function p({className:a,...c}){return(0,b.jsx)("tr",{"data-slot":"table-row",className:(0,h.cn)("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",a),...c})}function q({className:a,...c}){return(0,b.jsx)("th",{"data-slot":"table-head",className:(0,h.cn)("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",a),...c})}function r({className:a,...c}){return(0,b.jsx)("td",{"data-slot":"table-cell",className:(0,h.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",a),...c})}function s({user:a,initialRuns:f}){let[g,h]=(0,e.useState)(!1);async function i(){h(!0);try{await fetch("/api/auth/signout",{method:"POST"}),window.location.href="/"}catch(a){console.error("Failed to sign out:",a),h(!1)}}return(0,b.jsx)("div",{className:"min-h-screen bg-gray-50 py-8",children:(0,b.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[(0,b.jsxs)("div",{className:"mb-8 flex justify-between items-start",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-3xl font-bold text-gray-900",children:"d3k Workflow Runs"}),(0,b.jsx)("p",{className:"mt-2 text-gray-600",children:"View all your d3k workflow fix proposals and PRs"}),(0,b.jsxs)("p",{className:"mt-1 text-sm text-gray-500",children:["Signed in as ",a.email]})]}),(0,b.jsxs)("div",{className:"flex gap-3",children:[(0,b.jsx)(k.Button,{asChild:!0,children:(0,b.jsx)(d.default,{href:"/workflows/new",children:"New Workflow"})}),(0,b.jsx)(k.Button,{variant:"outline",onClick:i,disabled:g,children:g?"Signing out...":"Sign out"})]})]}),0===f.length?(0,b.jsx)(l.Card,{className:"p-12 text-center",children:(0,b.jsxs)(l.CardContent,{children:[(0,b.jsx)("p",{className:"text-muted-foreground",children:"No workflow runs yet"}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground/70 mt-2",children:"Run a workflow from the CLI to see it appear here"})]})}):(0,b.jsx)(l.Card,{children:(0,b.jsxs)(m,{children:[(0,b.jsx)(n,{children:(0,b.jsxs)(p,{children:[(0,b.jsx)(q,{children:"Project"}),(0,b.jsx)(q,{children:"Status"}),(0,b.jsx)(q,{children:"Timestamp"}),(0,b.jsx)(q,{children:"Before"}),(0,b.jsx)(q,{children:"After"}),(0,b.jsx)(q,{children:"Report"}),(0,b.jsx)(q,{children:"PR"})]})}),(0,b.jsx)(o,{children:f.map(a=>(0,b.jsxs)(p,{children:[(0,b.jsxs)(r,{children:[(0,b.jsx)("div",{className:"font-medium",children:a.projectName}),(0,b.jsx)("div",{className:"text-xs text-muted-foreground",children:a.id})]}),(0,b.jsx)(r,{children:(0,b.jsx)(j,{variant:"success"===a.status?"secondary":"running"===a.status?"default":"destructive",className:"success"===a.status?"bg-green-100 text-green-800 hover:bg-green-100":"running"===a.status?"bg-blue-100 text-blue-800 hover:bg-blue-100":"",children:a.status})}),(0,b.jsx)(r,{className:"text-muted-foreground",children:new Date(a.timestamp).toLocaleString()}),(0,b.jsx)(r,{children:a.beforeScreenshotUrl?(0,b.jsx)("a",{href:a.beforeScreenshotUrl,target:"_blank",rel:"noopener noreferrer",children:(0,b.jsx)(c.default,{src:a.beforeScreenshotUrl,alt:"Before",width:64,height:40,className:"object-cover rounded border hover:opacity-80 transition-opacity",unoptimized:!0})}):(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:"-"})}),(0,b.jsx)(r,{children:a.afterScreenshotUrl?(0,b.jsx)("a",{href:a.afterScreenshotUrl,target:"_blank",rel:"noopener noreferrer",children:(0,b.jsx)(c.default,{src:a.afterScreenshotUrl,alt:"After",width:64,height:40,className:"object-cover rounded border hover:opacity-80 transition-opacity",unoptimized:!0})}):(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:"-"})}),(0,b.jsx)(r,{children:a.reportBlobUrl?(0,b.jsx)(d.default,{href:`/workflows/${a.id}/report`,className:"text-primary hover:underline",children:"View Report"}):(0,b.jsx)("span",{className:"text-muted-foreground",children:"No report"})}),(0,b.jsx)(r,{children:a.prUrl?(0,b.jsx)("a",{href:a.prUrl,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"View PR"}):(0,b.jsx)("span",{className:"text-muted-foreground",children:"No PR"})})]},`${a.id}-${a.timestamp}`))})]})})]})})}a.s(["default",()=>s],24501)}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0ff05d72._.js.map