@devflow-tools/devflow 0.17.8 → 0.18.0

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 (203) hide show
  1. package/LICENSE +21 -0
  2. package/acceptance-manifest.json +3 -3
  3. package/dist/cli.js +75 -75
  4. package/dist/dashboard/404.html +1 -1
  5. package/dist/dashboard/__next.__PAGE__.txt +22 -0
  6. package/dist/dashboard/__next._full.txt +17 -0
  7. package/dist/dashboard/__next._tree.txt +2 -0
  8. package/dist/dashboard/_next/static/chunks/136-c55134e877048a37.js +1 -0
  9. package/dist/dashboard/_next/static/chunks/240-8f45a6db4f75278b.js +1 -0
  10. package/dist/dashboard/_next/static/chunks/426-5d356f119312b4e9.js +1 -0
  11. package/dist/dashboard/_next/static/chunks/567-65014d15b90b623c.js +1 -0
  12. package/dist/dashboard/_next/static/chunks/6b3bb038-e03941413841e57b.js +2 -0
  13. package/dist/dashboard/_next/static/chunks/722-001c96b6723e043d.js +1 -0
  14. package/dist/dashboard/_next/static/chunks/73-0fe34a8ce87c82ea.js +1 -0
  15. package/dist/dashboard/_next/static/chunks/820-9606b69ff6f7f9b9.js +1 -0
  16. package/dist/dashboard/_next/static/chunks/87c73c54-5c63d5698583b654.js +1 -0
  17. package/dist/dashboard/_next/static/chunks/90-63c7687fddbb45ce.js +1 -0
  18. package/dist/dashboard/_next/static/chunks/914-7e538089692b7d1b.js +1 -0
  19. package/dist/dashboard/_next/static/chunks/968-13e9b4b491d5e8de.js +52 -0
  20. package/dist/dashboard/_next/static/chunks/993-01834e67bc353d44.js +1 -0
  21. package/dist/dashboard/_next/static/chunks/app/_global-error/page-d786ba6306178164.js +1 -0
  22. package/dist/dashboard/_next/static/chunks/app/_not-found/page-d0b590a9f2ad206d.js +1 -0
  23. package/dist/dashboard/_next/static/chunks/app/accuracy/page-72ef9620a52e345e.js +1 -0
  24. package/dist/dashboard/_next/static/chunks/app/benchmark/page-a6005345a1d9a286.js +1 -0
  25. package/dist/dashboard/_next/static/chunks/app/context/page-070c5ebfffb71f1b.js +1 -0
  26. package/dist/dashboard/_next/static/chunks/app/doctor/page-973e0f84ace610ac.js +1 -0
  27. package/dist/dashboard/_next/static/chunks/app/executions/page-52f9a045f91548cc.js +1 -0
  28. package/dist/dashboard/_next/static/chunks/app/graph/page-c3487fe2482e734e.js +1 -0
  29. package/dist/dashboard/_next/static/chunks/app/knowledge/page-e184866ed2e92ef1.js +1 -0
  30. package/dist/dashboard/_next/static/chunks/app/layout-a28c30513212e363.js +1 -0
  31. package/dist/dashboard/_next/static/chunks/app/memory/page-36e047153bedfce2.js +1 -0
  32. package/dist/dashboard/_next/static/chunks/app/page-1daa0024f1e5dd18.js +1 -0
  33. package/dist/dashboard/_next/static/chunks/app/replay/page-7a6293c77eafe8b4.js +1 -0
  34. package/dist/dashboard/_next/static/chunks/app/runs/[id]/page-7a92db57d7fb2265.js +1 -0
  35. package/dist/dashboard/_next/static/chunks/app/runs/page-36baf64267e36b28.js +1 -0
  36. package/dist/dashboard/_next/static/chunks/app/settings/page-90b4b80e939f76e3.js +1 -0
  37. package/dist/dashboard/_next/static/chunks/app/timeline/page-c1f1b6c081532456.js +1 -0
  38. package/dist/dashboard/_next/static/chunks/app/tool-metrics/page-1c5ddf6239cf1734.js +1 -0
  39. package/dist/dashboard/_next/static/chunks/app/workflows/page-e2ed74df546c3568.js +1 -0
  40. package/dist/dashboard/_next/static/chunks/framework-3b2aca1ee87fa7ee.js +1 -0
  41. package/dist/dashboard/_next/static/chunks/main-9bbdbe1dbba0ab29.js +5 -0
  42. package/dist/dashboard/_next/static/chunks/main-app-44f3d55a6e6befbb.js +1 -0
  43. package/dist/dashboard/_next/static/chunks/next/dist/client/components/builtin/app-error-d786ba6306178164.js +1 -0
  44. package/dist/dashboard/_next/static/chunks/next/dist/client/components/builtin/forbidden-d786ba6306178164.js +1 -0
  45. package/dist/dashboard/_next/static/chunks/next/dist/client/components/builtin/global-error-39f976c070691d89.js +1 -0
  46. package/dist/dashboard/_next/static/chunks/next/dist/client/components/builtin/not-found-d786ba6306178164.js +1 -0
  47. package/dist/dashboard/_next/static/chunks/next/dist/client/components/builtin/unauthorized-d786ba6306178164.js +1 -0
  48. package/dist/dashboard/_next/static/chunks/webpack-5f4649c40b052b9f.js +1 -0
  49. package/dist/dashboard/_next/static/css/6912a202a7d0c151.css +3 -0
  50. package/dist/dashboard/_next/static/css/e07f2bf4fa519943.css +31 -0
  51. package/dist/dashboard/_next/static/vYfa_ZByuhX4CBoOEYkDT/_buildManifest.js +1 -0
  52. package/dist/dashboard/_not-found/__next._full.txt +18 -0
  53. package/dist/dashboard/_not-found/__next._not-found.__PAGE__.txt +24 -0
  54. package/dist/dashboard/_not-found/__next._tree.txt +2 -0
  55. package/dist/dashboard/_not-found.html +1 -0
  56. package/dist/dashboard/_not-found.txt +18 -0
  57. package/dist/dashboard/accuracy/__next._full.txt +19 -0
  58. package/dist/dashboard/accuracy/__next._tree.txt +2 -0
  59. package/dist/dashboard/accuracy/__next.accuracy.__PAGE__.txt +25 -0
  60. package/dist/dashboard/accuracy.html +1 -1
  61. package/dist/dashboard/accuracy.txt +19 -7
  62. package/dist/dashboard/benchmark/__next._full.txt +19 -0
  63. package/dist/dashboard/benchmark/__next._tree.txt +2 -0
  64. package/dist/dashboard/benchmark/__next.benchmark.__PAGE__.txt +25 -0
  65. package/dist/dashboard/benchmark.html +1 -1
  66. package/dist/dashboard/benchmark.txt +19 -7
  67. package/dist/dashboard/context/__next._full.txt +19 -0
  68. package/dist/dashboard/context/__next._tree.txt +2 -0
  69. package/dist/dashboard/context/__next.context.__PAGE__.txt +25 -0
  70. package/dist/dashboard/context.html +1 -1
  71. package/dist/dashboard/context.txt +19 -7
  72. package/dist/dashboard/doctor/__next._full.txt +19 -0
  73. package/dist/dashboard/doctor/__next._tree.txt +2 -0
  74. package/dist/dashboard/doctor/__next.doctor.__PAGE__.txt +25 -0
  75. package/dist/dashboard/doctor.html +1 -1
  76. package/dist/dashboard/doctor.txt +19 -7
  77. package/dist/dashboard/executions/__next._full.txt +19 -0
  78. package/dist/dashboard/executions/__next._tree.txt +2 -0
  79. package/dist/dashboard/executions/__next.executions.__PAGE__.txt +25 -0
  80. package/dist/dashboard/executions.html +1 -1
  81. package/dist/dashboard/executions.txt +19 -7
  82. package/dist/dashboard/graph/__next._full.txt +20 -0
  83. package/dist/dashboard/graph/__next._tree.txt +3 -0
  84. package/dist/dashboard/graph/__next.graph.__PAGE__.txt +26 -0
  85. package/dist/dashboard/graph.html +1 -1
  86. package/dist/dashboard/graph.txt +20 -7
  87. package/dist/dashboard/index.html +1 -1
  88. package/dist/dashboard/index.txt +17 -7
  89. package/dist/dashboard/knowledge/__next._full.txt +19 -0
  90. package/dist/dashboard/knowledge/__next._tree.txt +2 -0
  91. package/dist/dashboard/knowledge/__next.knowledge.__PAGE__.txt +25 -0
  92. package/dist/dashboard/knowledge.html +1 -1
  93. package/dist/dashboard/knowledge.txt +19 -7
  94. package/dist/dashboard/memory/__next._full.txt +19 -0
  95. package/dist/dashboard/memory/__next._tree.txt +2 -0
  96. package/dist/dashboard/memory/__next.memory.__PAGE__.txt +25 -0
  97. package/dist/dashboard/memory.html +1 -1
  98. package/dist/dashboard/memory.txt +19 -7
  99. package/dist/dashboard/replay/__next._full.txt +19 -0
  100. package/dist/dashboard/replay/__next._tree.txt +2 -0
  101. package/dist/dashboard/replay/__next.replay.__PAGE__.txt +25 -0
  102. package/dist/dashboard/replay.html +1 -1
  103. package/dist/dashboard/replay.txt +19 -7
  104. package/dist/dashboard/runs/_/__next._full.txt +19 -0
  105. package/dist/dashboard/runs/_/__next._tree.txt +2 -0
  106. package/dist/dashboard/runs/_/__next.runs.$d$id.__PAGE__.txt +26 -0
  107. package/dist/dashboard/runs/_.html +1 -1
  108. package/dist/dashboard/runs/_.txt +19 -8
  109. package/dist/dashboard/runs/__next._full.txt +19 -0
  110. package/dist/dashboard/runs/__next._tree.txt +2 -0
  111. package/dist/dashboard/runs/__next.runs.__PAGE__.txt +25 -0
  112. package/dist/dashboard/runs.html +1 -1
  113. package/dist/dashboard/runs.txt +19 -7
  114. package/dist/dashboard/settings/__next._full.txt +19 -0
  115. package/dist/dashboard/settings/__next._tree.txt +2 -0
  116. package/dist/dashboard/settings/__next.settings.__PAGE__.txt +25 -0
  117. package/dist/dashboard/settings.html +1 -1
  118. package/dist/dashboard/settings.txt +19 -7
  119. package/dist/dashboard/timeline/__next._full.txt +19 -0
  120. package/dist/dashboard/timeline/__next._tree.txt +2 -0
  121. package/dist/dashboard/timeline/__next.timeline.__PAGE__.txt +25 -0
  122. package/dist/dashboard/timeline.html +1 -1
  123. package/dist/dashboard/timeline.txt +19 -7
  124. package/dist/dashboard/tool-metrics/__next._full.txt +19 -0
  125. package/dist/dashboard/tool-metrics/__next._tree.txt +2 -0
  126. package/dist/dashboard/tool-metrics/__next.tool-metrics.__PAGE__.txt +25 -0
  127. package/dist/dashboard/tool-metrics.html +1 -1
  128. package/dist/dashboard/tool-metrics.txt +19 -7
  129. package/dist/dashboard/workflows/__next._full.txt +19 -0
  130. package/dist/dashboard/workflows/__next._tree.txt +2 -0
  131. package/dist/dashboard/workflows/__next.workflows.__PAGE__.txt +25 -0
  132. package/dist/dashboard/workflows.html +1 -1
  133. package/dist/dashboard/workflows.txt +19 -7
  134. package/dist/hooks/enforcer-summary.js +3 -3
  135. package/dist/hooks/hook-client.js +3 -3
  136. package/dist/hooks/hook-daemon.js +27 -25
  137. package/dist/hooks/post-tool-use-failure.js +2 -2
  138. package/dist/hooks/post-tool-use.js +6 -6
  139. package/dist/hooks/pre-compact.js +2 -2
  140. package/dist/hooks/pre-tool-use.js +4 -4
  141. package/dist/hooks/server-bootstrap.js +22 -22
  142. package/dist/hooks/session-end.js +6 -6
  143. package/dist/hooks/stop.js +10 -10
  144. package/dist/hooks/user-prompt-submit.js +11 -9
  145. package/dist/plugin/.claude-plugin/plugin.json +1 -1
  146. package/dist/plugin/dist/command-registry.json +5 -5
  147. package/dist/plugin/dist/hooks/enforcer-summary.js +3 -3
  148. package/dist/plugin/dist/hooks/hook-client.js +3 -3
  149. package/dist/plugin/dist/hooks/hook-daemon.js +27 -25
  150. package/dist/plugin/dist/hooks/post-tool-use-failure.js +2 -2
  151. package/dist/plugin/dist/hooks/post-tool-use.js +6 -6
  152. package/dist/plugin/dist/hooks/pre-compact.js +2 -2
  153. package/dist/plugin/dist/hooks/pre-tool-use.js +4 -4
  154. package/dist/plugin/dist/hooks/server-bootstrap.js +22 -22
  155. package/dist/plugin/dist/hooks/session-end.js +6 -6
  156. package/dist/plugin/dist/hooks/stop.js +10 -10
  157. package/dist/plugin/dist/hooks/user-prompt-submit.js +11 -9
  158. package/dist/plugin/package.json +28 -19
  159. package/dist/scripts/audit-session-data.js +5 -5
  160. package/dist/scripts/semantic-reliability-maintenance.js +3 -3
  161. package/package.json +31 -22
  162. package/plugin-registry.json +57 -57
  163. package/dist/dashboard/_next/static/TCuEOFM92HCewQsicwfte/_buildManifest.js +0 -1
  164. package/dist/dashboard/_next/static/chunks/1dd3208c-f3e84932bdc53383.js +0 -1
  165. package/dist/dashboard/_next/static/chunks/221-893fab1a7d7d9317.js +0 -1
  166. package/dist/dashboard/_next/static/chunks/249-e04c1de6240fd78a.js +0 -1
  167. package/dist/dashboard/_next/static/chunks/343-09a7e255220705c5.js +0 -1
  168. package/dist/dashboard/_next/static/chunks/402-a2e4eb98bb6a524c.js +0 -1
  169. package/dist/dashboard/_next/static/chunks/429-39f42ebb1ac959d6.js +0 -1
  170. package/dist/dashboard/_next/static/chunks/458-75822399a849befa.js +0 -1
  171. package/dist/dashboard/_next/static/chunks/528-7d4fc14903647f1e.js +0 -2
  172. package/dist/dashboard/_next/static/chunks/568-50487ea5e93fe11f.js +0 -1
  173. package/dist/dashboard/_next/static/chunks/697-05cf55b6c667773f.js +0 -1
  174. package/dist/dashboard/_next/static/chunks/6b3bb038-34d5cf36bd0210d6.js +0 -1
  175. package/dist/dashboard/_next/static/chunks/736-db1a009357c222d2.js +0 -1
  176. package/dist/dashboard/_next/static/chunks/806-195d4d5cc6c28f6c.js +0 -1
  177. package/dist/dashboard/_next/static/chunks/app/_not-found/page-5252c260804ee1ce.js +0 -1
  178. package/dist/dashboard/_next/static/chunks/app/accuracy/page-7b4f3c728a0e880f.js +0 -1
  179. package/dist/dashboard/_next/static/chunks/app/benchmark/page-6c6d0acbcde4eb85.js +0 -1
  180. package/dist/dashboard/_next/static/chunks/app/context/page-1874ae1050524cb6.js +0 -1
  181. package/dist/dashboard/_next/static/chunks/app/doctor/page-d542f2ab8d6a1c59.js +0 -1
  182. package/dist/dashboard/_next/static/chunks/app/executions/page-9c836597c951abbb.js +0 -1
  183. package/dist/dashboard/_next/static/chunks/app/graph/page-f0e7e15288791e9c.js +0 -1
  184. package/dist/dashboard/_next/static/chunks/app/knowledge/page-86808abd0d47c026.js +0 -1
  185. package/dist/dashboard/_next/static/chunks/app/layout-4b78776412bd4fee.js +0 -1
  186. package/dist/dashboard/_next/static/chunks/app/memory/page-e05a76b696041097.js +0 -1
  187. package/dist/dashboard/_next/static/chunks/app/page-c3e980fb2621470c.js +0 -1
  188. package/dist/dashboard/_next/static/chunks/app/replay/page-a8a465ed885df0cf.js +0 -1
  189. package/dist/dashboard/_next/static/chunks/app/runs/[id]/page-cc1d5182707fca5b.js +0 -1
  190. package/dist/dashboard/_next/static/chunks/app/runs/page-bbf0a58abd70430c.js +0 -1
  191. package/dist/dashboard/_next/static/chunks/app/settings/page-9602ff45892e7910.js +0 -1
  192. package/dist/dashboard/_next/static/chunks/app/timeline/page-44541ee3e74cee0e.js +0 -1
  193. package/dist/dashboard/_next/static/chunks/app/tool-metrics/page-ece550f2f4328dfe.js +0 -1
  194. package/dist/dashboard/_next/static/chunks/app/workflows/page-228bcb475c39c1ec.js +0 -1
  195. package/dist/dashboard/_next/static/chunks/framework-58c3457e28c4602f.js +0 -1
  196. package/dist/dashboard/_next/static/chunks/main-3175faffdbfc3051.js +0 -1
  197. package/dist/dashboard/_next/static/chunks/main-app-202a5f91ead17fa7.js +0 -1
  198. package/dist/dashboard/_next/static/chunks/pages/_app-58c3f1a8a070bd35.js +0 -1
  199. package/dist/dashboard/_next/static/chunks/pages/_error-312a564ec7e2663f.js +0 -1
  200. package/dist/dashboard/_next/static/chunks/webpack-d6388c5dcd85b0c5.js +0 -1
  201. package/dist/dashboard/_next/static/css/322e14d06135256b.css +0 -31
  202. package/dist/dashboard/_next/static/css/7d4d1db5aa137b5a.css +0 -3
  203. /package/dist/dashboard/_next/static/{TCuEOFM92HCewQsicwfte → vYfa_ZByuhX4CBoOEYkDT}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[395],{98307:function(e,s,t){Promise.resolve().then(t.bind(t,24388))},38941:function(e,s,t){"use strict";t.d(s,{C:function(){return l}});var r=t(27573);t(7653);var a=t(29147);let n=(0,t(49289).j)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function l(e){let{className:s,variant:t,...l}=e;return(0,r.jsx)("div",{className:(0,a.cn)(n({variant:t}),s),...l})}},50466:function(e,s,t){"use strict";t.d(s,{z:function(){return i}});var r=t(27573),a=t(7653),n=t(29147);let l=(0,t(49289).j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),i=a.forwardRef((e,s)=>{let{className:t,variant:a,size:i,...c}=e;return(0,r.jsx)("button",{className:(0,n.cn)(l({variant:a,size:i,className:t})),ref:s,...c})});i.displayName="Button"},72196:function(e,s,t){"use strict";t.d(s,{Ol:function(){return i},Zb:function(){return l},aY:function(){return d},ll:function(){return c}});var r=t(27573),a=t(7653),n=t(29147);let l=a.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)("div",{ref:s,className:(0,n.cn)("rounded-lg border border-border bg-card text-card-foreground",t),...a})});l.displayName="Card";let i=a.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)("div",{ref:s,className:(0,n.cn)("flex flex-col space-y-1.5 p-4",t),...a})});i.displayName="CardHeader";let c=a.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)("h3",{ref:s,className:(0,n.cn)("text-sm font-semibold leading-none tracking-tight",t),...a})});c.displayName="CardTitle";let d=a.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)("div",{ref:s,className:(0,n.cn)("p-4 pt-0",t),...a})});d.displayName="CardContent"},12862:function(e,s,t){"use strict";t.d(s,{SP:function(){return d},dr:function(){return c},mQ:function(){return i},nU:function(){return o}});var r=t(27573),a=t(7653),n=t(4343),l=t(29147);let i=n.fC,c=a.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)(n.aV,{ref:s,className:(0,l.cn)("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",t),...a})});c.displayName=n.aV.displayName;let d=a.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)(n.xz,{ref:s,className:(0,l.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",t),...a})});d.displayName=n.xz.displayName;let o=a.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)(n.VY,{ref:s,className:(0,l.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...a})});o.displayName=n.VY.displayName},24388:function(e,s,t){"use strict";t.d(s,{BenchmarkView:function(){return N}});var r=t(27573),a=t(7653),n=t(2389);let l=(0,n.Z)("Beaker",[["path",{d:"M4.5 3h15",key:"c7n0jr"}],["path",{d:"M6 3v16a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V3",key:"m1uhx7"}],["path",{d:"M6 14h12",key:"4cwo0f"}]]);var i=t(12198),c=t(39790),d=t(84142);let o=(0,n.Z)("Files",[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]]);var u=t(79901),m=t(25555),x=t(20054),h=t(3806),f=t(57429),v=t(72196);function b(){var e,s,t;let{t:a}=(0,h.$G)(),{data:n,isLoading:l,error:i}=(0,f.Tu)(7);if(l)return(0,r.jsx)("div",{children:a("benchmark.loading")});if(i||!(null==n?void 0:n.overview))return(0,r.jsxs)(v.Zb,{children:[(0,r.jsx)(v.Ol,{children:(0,r.jsx)(v.ll,{children:a("benchmark.opsSummary")})}),(0,r.jsx)(v.aY,{children:(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:i?a("benchmark.loadFailed",{error:String(i)}):a("benchmark.noOpsData")})})]});let c=n.overview;return(0,r.jsxs)(v.Zb,{children:[(0,r.jsx)(v.Ol,{children:(0,r.jsx)(v.ll,{children:a("benchmark.opsSummary")})}),(0,r.jsx)(v.aY,{className:"space-y-4",children:(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:a("benchmark.totalRunsCount")}),(0,r.jsx)("p",{className:"text-2xl font-bold",children:null!==(e=null==c?void 0:c.totalRuns)&&void 0!==e?e:0})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:a("benchmark.successRatePercent")}),(0,r.jsxs)("p",{className:"text-2xl font-bold",children:[(null!==(s=null==c?void 0:c.firstPassSuccessRate)&&void 0!==s?s:0).toFixed(1),"%"]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:a("benchmark.avgDurationTime")}),(0,r.jsxs)("p",{className:"text-2xl font-bold",children:[((null!==(t=null==c?void 0:c.avgDuration)&&void 0!==t?t:0)/1e3).toFixed(1),"s"]})]})]})})]})}var g=t(4509),j=t(12862),p=t(50466);let k=[7,14,30];function N(){var e;let{t:s}=(0,h.$G)(),[t,n]=(0,a.useState)(7),d=(0,f.g6)(),o=(0,f.Tu)(t);return(0,r.jsx)("div",{className:"h-full overflow-y-auto p-4 md:p-6",children:(0,r.jsxs)("div",{className:"mx-auto max-w-6xl space-y-5",children:[(0,r.jsx)("div",{className:"flex flex-wrap items-end justify-between gap-3",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-2xl font-bold",children:s("benchmark.title")}),d.data&&(0,r.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:[d.data.suiteName," \xb7 v",d.data.suiteVersion," \xb7 ",new Date(d.data.createdAt).toLocaleString()]})]})}),(0,r.jsxs)(j.mQ,{defaultValue:"experiment",className:"space-y-5",children:[(0,r.jsxs)(j.dr,{children:[(0,r.jsxs)(j.SP,{value:"experiment",children:[(0,r.jsx)(l,{className:"mr-2 h-4 w-4"}),s("benchmark.experimentTab","A/B Benchmark")]}),(0,r.jsxs)(j.SP,{value:"operations",children:[(0,r.jsx)(i.Z,{className:"mr-2 h-4 w-4"}),s("benchmark.operationsTab","Operations")]})]}),(0,r.jsx)(j.nU,{value:"experiment",className:"space-y-4",children:(0,r.jsx)(y,{report:null!==(e=d.data)&&void 0!==e?e:null,loading:d.isLoading,error:d.error})}),(0,r.jsxs)(j.nU,{value:"operations",className:"space-y-4",children:[(0,r.jsx)("div",{className:"flex justify-end gap-1",children:k.map(e=>(0,r.jsxs)(p.z,{size:"sm",variant:e===t?"default":"outline",onClick:()=>n(e),children:[e,"d"]},e))}),o.isLoading?(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:s("benchmark.loading")}):o.data?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(v.Zb,{children:[(0,r.jsx)(v.Ol,{children:(0,r.jsxs)(v.ll,{className:"flex items-center gap-2 text-base",children:[(0,r.jsx)(c.Z,{className:"h-4 w-4"}),s("benchmark.overview")]})}),(0,r.jsxs)(v.aY,{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:[(0,r.jsx)(Z,{label:s("benchmark.totalRuns"),value:o.data.overview.totalRuns}),(0,r.jsx)(Z,{label:s("benchmark.completed"),value:o.data.overview.completedRuns}),(0,r.jsx)(Z,{label:s("benchmark.failed"),value:o.data.overview.failedRuns}),(0,r.jsx)(Z,{label:s("benchmark.avgDuration"),value:"".concat((o.data.overview.avgDuration/1e3).toFixed(1),"s")})]})]}),(0,r.jsx)(b,{}),(0,r.jsx)(g.q,{})]}):(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:s("benchmark.noOpsData")})]})]})]})})}function y(e){let{report:s,loading:t,error:a}=e,{t:n}=(0,h.$G)();if(t)return(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:n("benchmark.loading")});if(a)return(0,r.jsx)("p",{className:"text-sm text-destructive",children:n("benchmark.loadFailed",{error:a.message})});if(!s)return(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:n("benchmark.noReports")});let l=s.summary.baseline,i=s.summary.devflow;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[(0,r.jsx)(w,{icon:d.Z,label:n("benchmark.avgTokens"),baseline:l.avgTokensUsed.toFixed(0),devflow:i.avgTokensUsed.toFixed(0)}),(0,r.jsx)(w,{icon:o,label:n("benchmark.filesTouched"),baseline:l.avgFilesTouched.toFixed(1),devflow:i.avgFilesTouched.toFixed(1)}),(0,r.jsx)(w,{icon:u.Z,label:n("benchmark.correctness"),baseline:R(l.avgCorrectnessScore),devflow:R(i.avgCorrectnessScore)}),(0,r.jsx)(w,{icon:m.Z,label:n("benchmark.avgDuration"),baseline:"".concat(l.avgDurationMs.toFixed(1),"ms"),devflow:"".concat(i.avgDurationMs.toFixed(1),"ms")})]}),s.regressions.length>0&&(0,r.jsxs)("div",{className:"flex gap-3 border border-amber-500/40 bg-amber-500/10 p-3 text-sm text-amber-800 dark:text-amber-200",children:[(0,r.jsx)(x.Z,{className:"mt-0.5 h-4 w-4 shrink-0"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-medium",children:n("benchmark.regressions")}),s.regressions.map(e=>(0,r.jsx)("p",{children:e.message},e.metric))]})]}),(0,r.jsxs)(v.Zb,{children:[(0,r.jsx)(v.Ol,{children:(0,r.jsx)(v.ll,{className:"text-base",children:n("benchmark.detailedResults")})}),(0,r.jsx)(v.aY,{className:"overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full min-w-[680px] text-sm",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"border-b text-left text-muted-foreground",children:[(0,r.jsx)("th",{className:"pb-2",children:n("benchmark.task")}),(0,r.jsx)("th",{className:"pb-2 text-right",children:n("benchmark.baselineCorrectness")}),(0,r.jsx)("th",{className:"pb-2 text-right",children:n("benchmark.devflowCorrectness")}),(0,r.jsx)("th",{className:"pb-2 text-right",children:n("benchmark.baselineTokens")}),(0,r.jsx)("th",{className:"pb-2 text-right",children:n("benchmark.devflowTokens")})]})}),(0,r.jsx)("tbody",{children:s.tasks.map(e=>(0,r.jsxs)("tr",{className:"border-b last:border-0",children:[(0,r.jsx)("td",{className:"py-2 font-mono text-xs",children:e.taskId}),(0,r.jsx)("td",{className:"py-2 text-right",children:R(e.baseline.correctnessScore)}),(0,r.jsx)("td",{className:"py-2 text-right",children:R(e.devflow.correctnessScore)}),(0,r.jsx)("td",{className:"py-2 text-right",children:e.baseline.tokensUsed.toFixed(0)}),(0,r.jsx)("td",{className:"py-2 text-right",children:e.devflow.tokensUsed.toFixed(0)})]},e.taskId))})]})})]})]})}function w(e){let{icon:s,label:t,baseline:a,devflow:n}=e,{t:l}=(0,h.$G)();return(0,r.jsx)(v.Zb,{children:(0,r.jsxs)(v.aY,{className:"p-4",children:[(0,r.jsxs)("div",{className:"mb-3 flex items-center gap-2 text-sm text-muted-foreground",children:[(0,r.jsx)(s,{className:"h-4 w-4"})," ",t]}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,r.jsx)(Z,{label:l("benchmark.baseline"),value:a}),(0,r.jsx)(Z,{label:l("benchmark.devflow"),value:n})]})]})})}function Z(e){let{label:s,value:t}=e;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-xs text-muted-foreground",children:s}),(0,r.jsx)("div",{className:"text-lg font-semibold",children:t})]})}function R(e){return"".concat((100*e).toFixed(1),"%")}},4509:function(e,s,t){"use strict";t.d(s,{q:function(){return c}});var r=t(27573),a=t(72196),n=t(38941),l=t(3806),i=t(57429);function c(){let{t:e}=(0,l.$G)(),s=localStorage.getItem("devflow-active-project-root")||void 0,{data:t=[],isLoading:c,error:d}=(0,i.Vw)(s);if(c)return(0,r.jsx)("div",{children:e("benchmark.loading")});if(d)return(0,r.jsxs)(a.Zb,{children:[(0,r.jsx)(a.Ol,{children:(0,r.jsx)(a.ll,{children:e("benchmark.pluginAnalysis")})}),(0,r.jsx)(a.aY,{children:(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:e("benchmark.loadFailed",{error:String(d)})})})]});let o=t.filter(e=>"install"===e.recommendation),u=t.filter(e=>"remove"===e.recommendation);return(0,r.jsxs)(a.Zb,{children:[(0,r.jsx)(a.Ol,{children:(0,r.jsx)(a.ll,{children:e("benchmark.pluginAnalysis")})}),(0,r.jsxs)(a.aY,{className:"space-y-6",children:[o.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-semibold mb-2 text-green-600",children:e("benchmark.recommendedInstall")}),(0,r.jsx)("div",{className:"space-y-2",children:o.map(s=>{var t,a,l;return(0,r.jsxs)("div",{className:"border rounded p-3 space-y-2",children:[(0,r.jsxs)("div",{className:"flex justify-between items-center",children:[(0,r.jsx)("span",{className:"font-medium",children:s.name}),(0,r.jsx)(n.C,{variant:"default",children:e("benchmark.recommended")})]}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[(0,r.jsxs)("div",{children:[e("benchmark.installCount"),": ",s.installCount]}),(0,r.jsxs)("div",{children:[e("benchmark.usageRate"),": ",((null!==(t=null==s?void 0:s.activeRate)&&void 0!==t?t:0)*100).toFixed(0),"%"]}),(0,r.jsxs)("div",{children:[e("benchmark.successRateShort"),": ",((null!==(a=null==s?void 0:s.successRate)&&void 0!==a?a:0)*100).toFixed(0),"%"]}),(0,r.jsxs)("div",{children:[e("benchmark.tokenImpact"),": ",(null!==(l=null==s?void 0:s.avgTokenImpact)&&void 0!==l?l:0).toFixed(0)]})]}),s.lastUsedAt&&(0,r.jsxs)("p",{className:"text-xs text-muted-foreground",children:[e("benchmark.lastUsed"),": ",new Date(s.lastUsedAt).toLocaleDateString()]})]},s.name)})})]}),u.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-semibold mb-2 text-red-600",children:e("benchmark.suggestedRemove")}),(0,r.jsx)("div",{className:"space-y-2",children:u.map(s=>{var t,a;return(0,r.jsxs)("div",{className:"border rounded p-3 space-y-2",children:[(0,r.jsxs)("div",{className:"flex justify-between items-center",children:[(0,r.jsx)("span",{className:"font-medium",children:s.name}),(0,r.jsx)(n.C,{variant:"destructive",children:e("benchmark.lowEfficiency")})]}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[(0,r.jsxs)("div",{children:[e("benchmark.installCount"),": ",s.installCount]}),(0,r.jsxs)("div",{children:[e("benchmark.usageRate"),": ",((null!==(t=null==s?void 0:s.activeRate)&&void 0!==t?t:0)*100).toFixed(0),"%"]}),(0,r.jsxs)("div",{children:[e("benchmark.successRateShort"),": ",((null!==(a=null==s?void 0:s.successRate)&&void 0!==a?a:0)*100).toFixed(0),"%"]})]})]},s.name)})})]}),0===t.length&&(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:e("benchmark.noPluginData")})]})]})}},29147:function(e,s,t){"use strict";t.d(s,{cn:function(){return n}});var r=t(10607),a=t(25579);function n(){for(var e=arguments.length,s=Array(e),t=0;t<e;t++)s[t]=arguments[t];return(0,a.m6)((0,r.W)(s))}},39790:function(e,s,t){"use strict";t.d(s,{Z:function(){return r}});let r=(0,t(2389).Z)("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]])},79901:function(e,s,t){"use strict";t.d(s,{Z:function(){return r}});let r=(0,t(2389).Z)("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},25555:function(e,s,t){"use strict";t.d(s,{Z:function(){return r}});let r=(0,t(2389).Z)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},84142:function(e,s,t){"use strict";t.d(s,{Z:function(){return r}});let r=(0,t(2389).Z)("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]])},12198:function(e,s,t){"use strict";t.d(s,{Z:function(){return r}});let r=(0,t(2389).Z)("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},20054:function(e,s,t){"use strict";t.d(s,{Z:function(){return r}});let r=(0,t(2389).Z)("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])}},function(e){e.O(0,[736,806,697,402,343,429,293,528,744],function(){return e(e.s=98307)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[810],{10807:function(e,t,n){Promise.resolve().then(n.bind(n,31725))},50466:function(e,t,n){"use strict";n.d(t,{z:function(){return i}});var s=n(27573),r=n(7653),l=n(29147);let a=(0,n(49289).j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),i=r.forwardRef((e,t)=>{let{className:n,variant:r,size:i,...c}=e;return(0,s.jsx)("button",{className:(0,l.cn)(a({variant:r,size:i,className:n})),ref:t,...c})});i.displayName="Button"},72196:function(e,t,n){"use strict";n.d(t,{Ol:function(){return i},Zb:function(){return a},aY:function(){return o},ll:function(){return c}});var s=n(27573),r=n(7653),l=n(29147);let a=r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,l.cn)("rounded-lg border border-border bg-card text-card-foreground",n),...r})});a.displayName="Card";let i=r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,l.cn)("flex flex-col space-y-1.5 p-4",n),...r})});i.displayName="CardHeader";let c=r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,s.jsx)("h3",{ref:t,className:(0,l.cn)("text-sm font-semibold leading-none tracking-tight",n),...r})});c.displayName="CardTitle";let o=r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,s.jsx)("div",{ref:t,className:(0,l.cn)("p-4 pt-0",n),...r})});o.displayName="CardContent"},39134:function(e,t,n){"use strict";n.d(t,{I:function(){return a}});var s=n(27573),r=n(7653),l=n(29147);let a=r.forwardRef((e,t)=>{let{className:n,type:r,...a}=e;return(0,s.jsx)("input",{type:r,className:(0,l.cn)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",n),ref:t,...a})});a.displayName="Input"},31725:function(e,t,n){"use strict";n.d(t,{ContextViewer:function(){return j}});var s=n(27573),r=n(7653),l=n(57429),a=n(10535),i=n(50466),c=n(72196),o=n(39134),d=n(95731),u=n(2389);let x=(0,u.Z)("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);var f=n(20054),m=n(77329);let h=(0,u.Z)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),p=(0,u.Z)("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);var v=n(10269),g=n(3806);function j(){let{t:e}=(0,g.$G)(),[t,n]=(0,r.useState)(""),[u,j]=(0,r.useState)(!1),[b,y]=(0,r.useState)({}),N=(0,a.q)(e=>e.activeProjectRoot),k=(0,l.ow)(),w=(0,l.qt)(),{data:S}=(0,l.dP)(),{data:Z}=(0,l.VU)(),C=(0,l.rO)(),E=u?Z:S,R=u?w.isPending:k.isPending,M=()=>{t.trim()&&(y({}),u?w.mutate({query:t,mode:"fast"}):k.mutate({query:t,mode:"fast"}))},O=e=>{t.trim()&&(y({[t]:e}),C.mutate({query:t,feedback:e,projectRoot:null!=N?N:void 0,taskType:u&&Z?Z.taskType:void 0,contextMode:u?"task":"general",tokenCount:null==E?void 0:E.tokenCount}))};return(0,s.jsxs)("div",{className:"p-6 space-y-4 h-full overflow-y-auto",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("h2",{className:"text-2xl font-bold",children:e("context.title")}),(0,s.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,s.jsx)("input",{type:"checkbox",checked:u,onChange:e=>j(e.target.checked),className:"rounded"}),e("context.taskMode")]})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(o.I,{placeholder:e("context.placeholder"),value:t,onChange:e=>n(e.target.value),onKeyDown:e=>"Enter"===e.key&&M()}),(0,s.jsxs)(i.z,{onClick:M,disabled:R,children:[(0,s.jsx)(d.Z,{className:"h-4 w-4 mr-1"})," ",e("context.build")]})]}),R&&(0,s.jsx)("p",{className:"text-muted-foreground text-sm",children:e("context.building")}),E&&(0,s.jsxs)(s.Fragment,{children:[!u&&S&&(0,s.jsxs)(c.Zb,{children:[(0,s.jsx)(c.Ol,{children:(0,s.jsx)(c.ll,{children:e("context.results",{files:S.files.length,tokens:S.tokenCount})})}),(0,s.jsx)(c.aY,{children:(0,s.jsx)("div",{className:"space-y-3",children:S.files.map((e,t)=>(0,s.jsxs)("div",{className:"p-3 rounded-md bg-secondary/50",children:[(0,s.jsx)("p",{className:"text-xs text-muted-foreground font-mono",children:e.path}),(0,s.jsx)("pre",{className:"text-xs mt-1 overflow-x-auto whitespace-pre-wrap",children:e.snippet})]},t))})})]}),u&&Z&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.Zb,{children:(0,s.jsx)(c.Ol,{children:(0,s.jsxs)(c.ll,{className:"flex items-center justify-between",children:[(0,s.jsxs)("span",{children:[e("context.taskContext"),": ",Z.taskType]}),(0,s.jsx)("span",{className:"text-sm font-normal text-muted-foreground",children:e("context.confidenceTokens",{confidence:(100*Z.confidence).toFixed(0),tokens:Z.tokenCount})})]})})}),(0,s.jsxs)(c.Zb,{children:[(0,s.jsx)(c.Ol,{children:(0,s.jsxs)(c.ll,{className:"flex items-center gap-2",children:[(0,s.jsx)(x,{className:"h-4 w-4"}),e("context.requiredFiles")," (",Z.requiredFiles.files.length,")"]})}),(0,s.jsx)(c.aY,{children:(0,s.jsx)("div",{className:"space-y-1",children:Z.requiredFiles.files.map(e=>(0,s.jsxs)("div",{className:"text-sm font-mono text-green-700 dark:text-green-400",children:["● ",e]},e))})})]}),Z.optionalFiles.files.length>0&&(0,s.jsxs)(c.Zb,{children:[(0,s.jsx)(c.Ol,{children:(0,s.jsxs)(c.ll,{className:"flex items-center gap-2",children:[(0,s.jsx)(x,{className:"h-4 w-4"}),e("context.optionalFiles")," (",Z.optionalFiles.files.length,")"]})}),(0,s.jsx)(c.aY,{children:(0,s.jsx)("div",{className:"space-y-1",children:Z.optionalFiles.files.map(e=>(0,s.jsxs)("div",{className:"text-sm font-mono text-muted-foreground",children:["○ ",e]},e))})})]}),(0,s.jsxs)(c.Zb,{children:[(0,s.jsx)(c.Ol,{children:(0,s.jsxs)(c.ll,{children:[e("context.keySymbols")," (",Z.keySymbols.length,")"]})}),(0,s.jsx)(c.aY,{children:(0,s.jsx)("div",{className:"space-y-2",children:Z.keySymbols.slice(0,10).map(t=>(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs px-1.5 py-0.5 rounded ".concat("direct"===t.relevance?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500"),children:"direct"===t.relevance?e("context.relevanceDirect"):e("context.relevanceIndirect")}),(0,s.jsx)("span",{className:"text-sm font-medium",children:t.name}),(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",t.kind,")"]}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground font-mono ml-auto",children:t.file})]},"".concat(t.file,":").concat(t.name)))})})]}),Z.riskHints.length>0&&(0,s.jsxs)(c.Zb,{children:[(0,s.jsx)(c.Ol,{children:(0,s.jsxs)(c.ll,{className:"flex items-center gap-2",children:[(0,s.jsx)(f.Z,{className:"h-4 w-4"}),e("context.riskHints")," (",Z.riskHints.length,")"]})}),(0,s.jsx)(c.aY,{children:(0,s.jsx)("div",{className:"space-y-2",children:Z.riskHints.map((t,n)=>(0,s.jsxs)("div",{className:"flex items-start gap-2",children:[(0,s.jsx)("span",{className:"mt-0.5 px-1.5 py-0.5 rounded text-xs font-medium ".concat("high"===t.level?"bg-red-100 text-red-700":"medium"===t.level?"bg-yellow-100 text-yellow-700":"bg-gray-100 text-gray-600"),children:"high"===t.level?e("context.levelHigh"):"medium"===t.level?e("context.levelMedium"):e("context.levelLow")}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-medium",children:t.category}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:t.description})]})]},n))})})]}),(0,s.jsxs)(c.Zb,{children:[(0,s.jsx)(c.Ol,{children:(0,s.jsxs)(c.ll,{className:"flex items-center gap-2",children:[(0,s.jsx)(m.Z,{className:"h-4 w-4"}),e("context.nextActions")]})}),(0,s.jsx)(c.aY,{children:(0,s.jsx)("div",{className:"space-y-2",children:Z.nextActions.map((e,t)=>(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,s.jsx)("span",{className:"px-1.5 py-0.5 rounded bg-blue-100 text-blue-700 text-xs",children:e.kind}),(0,s.jsx)("span",{children:e.label}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground font-mono",children:e.payload})]},t))})})]})]}),E&&(0,s.jsx)(c.Zb,{children:(0,s.jsx)(c.aY,{className:"p-4",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-sm text-muted-foreground mr-2",children:e("context.wasHelpful")}),(0,s.jsxs)(i.z,{size:"sm",variant:"hit"===b[t]?"default":"outline",onClick:()=>O("hit"),disabled:C.isPending,children:[(0,s.jsx)(h,{className:"h-3 w-3 mr-1"})," ",e("context.hit")]}),(0,s.jsxs)(i.z,{size:"sm",variant:"partial"===b[t]?"default":"outline",onClick:()=>O("partial"),disabled:C.isPending,children:[(0,s.jsx)(p,{className:"h-3 w-3 mr-1"})," ",e("context.partial")]}),(0,s.jsxs)(i.z,{size:"sm",variant:"miss"===b[t]?"default":"outline",onClick:()=>O("miss"),disabled:C.isPending,children:[(0,s.jsx)(v.Z,{className:"h-3 w-3 mr-1"})," ",e("context.miss")]}),C.isSuccess&&(0,s.jsx)("span",{className:"text-xs text-green-600 ml-2",children:e("context.thanks")})]})})})]})]})}},10535:function(e,t,n){"use strict";n.d(t,{q:function(){return c}});var s=n(62052);let r="devflow-project-root",l="devflow-active-project-root";function a(e){try{return localStorage.getItem(e)}catch(e){return null}}function i(e,t){try{null===t?localStorage.removeItem(e):localStorage.setItem(e,t)}catch(e){}}let c=(0,s.Ue)(e=>({selectedNodeId:null,detailTab:"properties",searchQuery:"",projectRoot:a(r),activeProjectRoot:a(l),selectedRunId:null,selectNode:t=>e({selectedNodeId:t}),setDetailTab:t=>e({detailTab:t}),setSearchQuery:t=>e({searchQuery:t}),setProjectRoot:t=>{i(r,t),e({projectRoot:t})},setActiveProjectRoot:t=>{i(l,t),e({activeProjectRoot:t})},setSelectedRunId:t=>e({selectedRunId:t})}))},29147:function(e,t,n){"use strict";n.d(t,{cn:function(){return l}});var s=n(10607),r=n(25579);function l(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.m6)((0,s.W)(t))}},2389:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var s=n(7653);let r=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),l=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((e,t,n)=>!!e&&n.indexOf(e)===t).join(" ")};var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,s.forwardRef)((e,t)=>{let{color:n="currentColor",size:r=24,strokeWidth:i=2,absoluteStrokeWidth:c,className:o="",children:d,iconNode:u,...x}=e;return(0,s.createElement)("svg",{ref:t,...a,width:r,height:r,stroke:n,strokeWidth:c?24*Number(i)/Number(r):i,className:l("lucide",o),...x},[...u.map(e=>{let[t,n]=e;return(0,s.createElement)(t,n)}),...Array.isArray(d)?d:[d]])}),c=(e,t)=>{let n=(0,s.forwardRef)((n,a)=>{let{className:c,...o}=n;return(0,s.createElement)(i,{ref:a,iconNode:t,className:l("lucide-".concat(r(e)),c),...o})});return n.displayName="".concat(e),n}},77329:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});let s=(0,n(2389).Z)("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]])},95731:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});let s=(0,n(2389).Z)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},20054:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});let s=(0,n(2389).Z)("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},10269:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});let s=(0,n(2389).Z)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},38475:function(e,t,n){"use strict";var s=n(7653),r=n(96250),l="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=r.useSyncExternalStore,i=s.useRef,c=s.useEffect,o=s.useMemo,d=s.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,s,r){var u=i(null);if(null===u.current){var x={hasValue:!1,value:null};u.current=x}else x=u.current;var f=a(e,(u=o(function(){function e(e){if(!c){if(c=!0,a=e,e=s(e),void 0!==r&&x.hasValue){var t=x.value;if(r(t,e))return i=t}return i=e}if(t=i,l(a,e))return t;var n=s(e);return void 0!==r&&r(t,n)?(a=e,t):(a=e,i=n)}var a,i,c=!1,o=void 0===n?null:n;return[function(){return e(t())},null===o?void 0:function(){return e(o())}]},[t,n,s,r]))[0],u[1]);return c(function(){x.hasValue=!0,x.value=f},[f]),d(f),f}},18678:function(e,t,n){"use strict";e.exports=n(38475)},49289:function(e,t,n){"use strict";n.d(t,{j:function(){return a}});var s=n(10607);let r=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,l=s.W,a=(e,t)=>n=>{var s;if((null==t?void 0:t.variants)==null)return l(e,null==n?void 0:n.class,null==n?void 0:n.className);let{variants:a,defaultVariants:i}=t,c=Object.keys(a).map(e=>{let t=null==n?void 0:n[e],s=null==i?void 0:i[e];if(null===t)return null;let l=r(t)||r(s);return a[e][l]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,s]=t;return void 0===s||(e[n]=s),e},{});return l(e,c,null==t?void 0:null===(s=t.compoundVariants)||void 0===s?void 0:s.reduce((e,t)=>{let{class:n,className:s,...r}=t;return Object.entries(r).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):({...i,...o})[t]===n})?[...e,n,s]:e},[]),null==n?void 0:n.class,null==n?void 0:n.className)}},62052:function(e,t,n){"use strict";n.d(t,{Ue:function(){return u}});var s=n(19730),r=n(7653),l=n(18678);let{useDebugValue:a}=r,{useSyncExternalStoreWithSelector:i}=l,c=!1,o=e=>e,d=e=>{"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");let t="function"==typeof e?(0,s.M)(e):e,n=(e,n)=>(function(e,t=o,n){n&&!c&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),c=!0);let s=i(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return a(s),s})(t,e,n);return Object.assign(n,t),n},u=e=>e?d(e):d},19730:function(e,t,n){"use strict";n.d(t,{M:function(){return r}});let s=e=>{let t;let n=new Set,s=(e,s)=>{let r="function"==typeof e?e(t):e;if(!Object.is(r,t)){let e=t;t=(null!=s?s:"object"!=typeof r||null===r)?r:Object.assign({},t,r),n.forEach(n=>n(t,e))}},r=()=>t,l={setState:s,getState:r,getInitialState:()=>a,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},a=t=e(s,r,l);return l},r=e=>e?s(e):s}},function(e){e.O(0,[736,806,697,429,293,528,744],function(){return e(e.s=10807)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[479],{40755:function(t,e,s){Promise.resolve().then(s.bind(s,16455))},16455:function(t,e,s){"use strict";s.d(e,{DoctorView:function(){return l}});var i=s(27573),r=s(79901),n=s(20054),a=s(53512),o=s(88623),u=s(57429);let c={ok:r.Z,warning:n.Z,error:a.Z},h={ok:"text-emerald-500",warning:"text-amber-500",error:"text-red-500"};function l(){var t;let e=(0,u.YG)(),s=(0,u.hI)(),r=null!==(t=e.data)&&void 0!==t?t:[];return(0,i.jsxs)("div",{className:"h-full overflow-y-auto p-6",children:[(0,i.jsxs)("div",{className:"mb-6 flex items-center justify-between",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("h2",{className:"text-2xl font-bold",children:"Doctor"}),(0,i.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:s.data?"".concat(s.data.totalFiles," files \xb7 ").concat(s.data.totalSymbols," symbols"):"Server unavailable"})]}),(0,i.jsx)("button",{onClick:()=>Promise.all([e.refetch(),s.refetch()]),className:"icon-button",title:"Refresh checks","aria-label":"Refresh checks",children:(0,i.jsx)(o.Z,{className:"h-4 w-4 ".concat(e.isFetching?"animate-spin":"")})})]}),(0,i.jsxs)("div",{className:"divide-y divide-border border-y border-border",children:[r.map(t=>{let e=c[t.severity];return(0,i.jsxs)("div",{className:"grid grid-cols-[24px_minmax(120px,220px)_1fr] items-start gap-3 py-3 text-sm",children:[(0,i.jsx)(e,{className:"mt-0.5 h-4 w-4 ".concat(h[t.severity])}),(0,i.jsx)("span",{className:"font-medium",children:t.name}),(0,i.jsx)("span",{className:"text-muted-foreground",children:t.detail})]},t.name)}),e.isLoading||0!==r.length?null:(0,i.jsx)("p",{className:"py-8 text-center text-sm text-muted-foreground",children:"No checks reported"})]})]})}},2389:function(t,e,s){"use strict";s.d(e,{Z:function(){return u}});var i=s(7653);let r=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),n=function(){for(var t=arguments.length,e=Array(t),s=0;s<t;s++)e[s]=arguments[s];return e.filter((t,e,s)=>!!t&&s.indexOf(t)===e).join(" ")};var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let o=(0,i.forwardRef)((t,e)=>{let{color:s="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:u,className:c="",children:h,iconNode:l,...d}=t;return(0,i.createElement)("svg",{ref:e,...a,width:r,height:r,stroke:s,strokeWidth:u?24*Number(o)/Number(r):o,className:n("lucide",c),...d},[...l.map(t=>{let[e,s]=t;return(0,i.createElement)(e,s)}),...Array.isArray(h)?h:[h]])}),u=(t,e)=>{let s=(0,i.forwardRef)((s,a)=>{let{className:u,...c}=s;return(0,i.createElement)(o,{ref:a,iconNode:e,className:n("lucide-".concat(r(t)),u),...c})});return s.displayName="".concat(t),s}},79901:function(t,e,s){"use strict";s.d(e,{Z:function(){return i}});let i=(0,s(2389).Z)("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},53512:function(t,e,s){"use strict";s.d(e,{Z:function(){return i}});let i=(0,s(2389).Z)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},88623:function(t,e,s){"use strict";s.d(e,{Z:function(){return i}});let i=(0,s(2389).Z)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},20054:function(t,e,s){"use strict";s.d(e,{Z:function(){return i}});let i=(0,s(2389).Z)("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},64855:function(t,e,s){"use strict";s.d(e,{R:function(){return o},m:function(){return a}});var i=s(2906),r=s(5531),n=s(11135),a=class extends r.F{#t;#e;#s;#i;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||o(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#r({type:"continue"})},s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=(0,n.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#r({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#r({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});let i="pending"===this.state.status,r=!this.#i.canStart();try{if(i)e();else{this.#r({type:"pending",variables:t,isPaused:r}),this.#s.config.onMutate&&await this.#s.config.onMutate(t,this,s);let e=await this.options.onMutate?.(t,s);e!==this.state.context&&this.#r({type:"pending",context:e,variables:t,isPaused:r})}let n=await this.#i.start();return await this.#s.config.onSuccess?.(n,t,this.state.context,this,s),await this.options.onSuccess?.(n,t,this.state.context,s),await this.#s.config.onSettled?.(n,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(n,null,t,this.state.context,s),this.#r({type:"success",data:n}),n}catch(e){try{await this.#s.config.onError?.(e,t,this.state.context,this,s)}catch(t){Promise.reject(t)}try{await this.options.onError?.(e,t,this.state.context,s)}catch(t){Promise.reject(t)}try{await this.#s.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,s)}catch(t){Promise.reject(t)}try{await this.options.onSettled?.(void 0,e,t,this.state.context,s)}catch(t){Promise.reject(t)}throw this.#r({type:"error",error:e}),e}finally{this.#s.runNext(this)}}#r(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),i.Vr.batch(()=>{this.#e.forEach(e=>{e.onMutationUpdate(t)}),this.#s.notify({mutation:this,type:"updated",action:t})})}};function o(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},15969:function(t,e,s){"use strict";s.d(e,{D:function(){return h}});var i=s(7653),r=s(64855),n=s(2906),a=s(24559),o=s(50803),u=class extends a.l{#t;#n=void 0;#a;#o;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#u()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#t.defaultMutationOptions(t),(0,o.VS)(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#a,observer:this}),e?.mutationKey&&this.options.mutationKey&&(0,o.Ym)(e.mutationKey)!==(0,o.Ym)(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(t){this.#u(),this.#c(t)}getCurrentResult(){return this.#n}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#u(),this.#c()}mutate(t,e){return this.#o=e,this.#a?.removeObserver(this),this.#a=this.#t.getMutationCache().build(this.#t,this.options),this.#a.addObserver(this),this.#a.execute(t)}#u(){let t=this.#a?.state??(0,r.R)();this.#n={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#c(t){n.Vr.batch(()=>{if(this.#o&&this.hasListeners()){let e=this.#n.variables,s=this.#n.context,i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#o.onSuccess?.(t.data,e,s,i)}catch(t){Promise.reject(t)}try{this.#o.onSettled?.(t.data,null,e,s,i)}catch(t){Promise.reject(t)}}else if(t?.type==="error"){try{this.#o.onError?.(t.error,e,s,i)}catch(t){Promise.reject(t)}try{this.#o.onSettled?.(void 0,t.error,e,s,i)}catch(t){Promise.reject(t)}}}this.listeners.forEach(t=>{t(this.#n)})})}},c=s(77930);function h(t,e){let s=(0,c.NL)(e),[r]=i.useState(()=>new u(s,t));i.useEffect(()=>{r.setOptions(t)},[r,t]);let a=i.useSyncExternalStore(i.useCallback(t=>r.subscribe(n.Vr.batchCalls(t)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),h=i.useCallback((t,e)=>{r.mutate(t,e).catch(o.ZT)},[r]);if(a.error&&(0,o.L3)(r.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:h,mutateAsync:a.mutate}}}},function(t){t.O(0,[736,429,293,528,744],function(){return t(t.s=40755)}),_N_E=t.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[916],{90239:function(e,t,n){Promise.resolve().then(n.bind(n,53906))},53906:function(e,t,n){"use strict";n.d(t,{ExecutionsView:function(){return h}});var o=n(27573),r=n(31988),c=n(41493),s=n(3806),a=n(7653),l=n(39790);let i=(0,n(2389).Z)("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);var d=n(53512),u=n(25555),m=n(90743);function g(e){let{rate:t}=e;return(0,o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,o.jsx)("div",{className:"w-20 h-2 bg-muted rounded-full overflow-hidden",children:(0,o.jsx)("div",{className:"h-full ".concat(t>=80?"bg-green-500":t>=50?"bg-yellow-500":"bg-red-500"," rounded-full"),style:{width:"".concat(t,"%")}})}),(0,o.jsxs)("span",{className:"text-xs text-muted-foreground",children:[t.toFixed(1),"%"]})]})}function h(){let{t:e}=(0,s.$G)(),[t,n]=(0,a.useState)(null),{data:h,isLoading:x}=(0,r.a)({queryKey:["telemetry","executions"],queryFn:()=>c.h.getExecutions(50),refetchInterval:1e4}),{data:y}=(0,r.a)({queryKey:["telemetry","mcp-compliance"],queryFn:()=>c.h.getMcpCompliance()}),{data:p}=(0,r.a)({queryKey:["telemetry","executions",t,"events"],queryFn:()=>c.h.getExecutionEvents(t),enabled:!!t}),f=null!=h?h:[];return x?(0,o.jsxs)("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:[(0,o.jsx)(l.Z,{className:"h-5 w-5 animate-spin mr-2"}),e("executions.loading")]}):(0,o.jsxs)("div",{className:"h-full overflow-auto p-6",children:[(0,o.jsx)("h2",{className:"text-xl font-bold mb-4",children:e("executions.title")}),y&&(0,o.jsxs)("div",{className:"grid grid-cols-3 gap-4 mb-6",children:[(0,o.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4",children:[(0,o.jsx)("div",{className:"text-sm text-muted-foreground",children:e("executions.overallCompliance")}),(0,o.jsxs)("div",{className:"text-2xl font-bold mt-1",children:[y.overall.toFixed(1),"%"]})]}),(0,o.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4",children:[(0,o.jsx)("div",{className:"text-sm text-muted-foreground",children:e("executions.totalExecutions")}),(0,o.jsx)("div",{className:"text-2xl font-bold mt-1",children:f.length})]}),(0,o.jsxs)("div",{className:"bg-card border border-border rounded-lg p-4",children:[(0,o.jsx)("div",{className:"text-sm text-muted-foreground",children:e("executions.skillsTracked")}),(0,o.jsx)("div",{className:"text-2xl font-bold mt-1",children:Object.keys(y.bySkill).length})]})]}),(0,o.jsx)("div",{className:"bg-card border border-border rounded-lg overflow-hidden",children:(0,o.jsxs)("table",{className:"w-full text-sm",children:[(0,o.jsx)("thead",{className:"bg-muted/50",children:(0,o.jsxs)("tr",{children:[(0,o.jsx)("th",{className:"text-left px-4 py-2 font-medium",children:e("executions.skill")}),(0,o.jsx)("th",{className:"text-left px-4 py-2 font-medium",children:e("executions.status")}),(0,o.jsx)("th",{className:"text-left px-4 py-2 font-medium",children:e("executions.tools")}),(0,o.jsx)("th",{className:"text-left px-4 py-2 font-medium",children:e("executions.mcpRate")}),(0,o.jsx)("th",{className:"text-left px-4 py-2 font-medium",children:e("executions.duration")})]})}),(0,o.jsxs)("tbody",{children:[f.map(e=>{var r,c,s;return(0,o.jsxs)("tr",{className:"border-t border-border cursor-pointer hover:bg-muted/30 ".concat(t===e.executionId?"bg-muted/50":""),onClick:()=>n(e.executionId),children:[(0,o.jsx)("td",{className:"px-4 py-2 font-mono text-xs",children:e.skillName}),(0,o.jsx)("td",{className:"px-4 py-2",children:"completed"===e.status?(0,o.jsx)(i,{className:"h-4 w-4 text-green-500 inline"}):"failed"===e.status?(0,o.jsx)(d.Z,{className:"h-4 w-4 text-red-500 inline"}):(0,o.jsx)(u.Z,{className:"h-4 w-4 text-yellow-500 inline animate-spin"})}),(0,o.jsx)("td",{className:"px-4 py-2",children:e.totalToolCalls}),(0,o.jsx)("td",{className:"px-4 py-2",children:(0,o.jsx)(g,{rate:null!==(r=e.mcpComplianceRate)&&void 0!==r?r:0})}),(0,o.jsx)("td",{className:"px-4 py-2",children:(s=null!==(c=e.totalDuration)&&void 0!==c?c:0)<1e3?"".concat(s,"ms"):"".concat((s/1e3).toFixed(1),"s")})]},e.executionId)}),0===f.length&&(0,o.jsx)("tr",{children:(0,o.jsx)("td",{colSpan:5,className:"px-4 py-8 text-center text-muted-foreground",children:e("executions.empty")})})]})]})}),t&&p&&(0,o.jsxs)("div",{className:"mt-6 bg-card border border-border rounded-lg p-4",children:[(0,o.jsxs)("h3",{className:"font-bold mb-3 flex items-center gap-2",children:[(0,o.jsx)(m.Z,{className:"h-4 w-4"}),e("executions.traceTimeline")]}),(0,o.jsx)("div",{className:"space-y-2",children:(null!=p?p:[]).map(t=>(0,o.jsxs)("div",{className:"flex items-start gap-3 p-2 rounded-md bg-muted/30 text-sm",children:[(0,o.jsx)("span",{className:"text-xs text-muted-foreground w-16 shrink-0",children:new Date(t.timestamp).toLocaleTimeString()}),(0,o.jsx)("span",{className:"px-1.5 py-0.5 rounded text-xs font-mono ".concat(t.isMcpTool?"bg-green-500/20 text-green-400":"subagent"===t.toolType?"bg-blue-500/20 text-blue-400":"bg-muted text-muted-foreground"),children:t.toolType}),(0,o.jsx)("span",{className:"font-mono text-xs flex-1",children:t.toolName}),t.blocked&&(0,o.jsx)("span",{className:"px-1.5 py-0.5 rounded text-xs bg-red-500/20 text-red-400",children:e("executions.blocked")}),t.mcpEnforced&&(0,o.jsx)("span",{className:"px-1.5 py-0.5 rounded text-xs bg-green-500/20 text-green-400",children:"MCP"}),t.mcpFallback&&(0,o.jsx)("span",{className:"px-1.5 py-0.5 rounded text-xs bg-yellow-500/20 text-yellow-400",children:e("executions.fallback")})]},t.eventId))})]})]})}},41493:function(e,t,n){"use strict";n.d(t,{h:function(){return c}});var o=n(50794);async function r(e,t){let n=function(){try{return localStorage.getItem("devflow-active-project-root")}catch(e){return null}}(),r={"Content-Type":"application/json",...(0,o.OM)()};n&&(r["x-devflow-project"]=n);let c=await fetch("".concat((0,o.aH)(),"/api").concat(e),{...t,headers:{...r,...null==t?void 0:t.headers},credentials:"same-origin"});if(!c.ok){let e=await c.text();if(401===c.status)throw Error("API 401: reload the local dashboard or configure a dashboard API key");throw Error("API ".concat(c.status,": ").concat(e))}let s=await c.json();return s&&"object"==typeof s&&"ok"in s&&"data"in s?s.data:s}let c={listProjects:()=>r("/projects"),getProject:e=>r("/projects/".concat(e)),createProject:e=>r("/projects",{method:"POST",body:JSON.stringify(e)}),deleteProject:e=>r("/projects/".concat(e),{method:"DELETE"}),connectProject:e=>r("/projects/connect",{method:"POST",body:JSON.stringify({rootPath:e})}),disconnectProject:()=>r("/projects/active",{method:"DELETE"}),getActiveProject:()=>r("/projects/active"),getOnboardingPackByRoot:e=>r("/projects/onboarding-pack?rootPath=".concat(encodeURIComponent(e))),refreshOnboardingPack:e=>r("/projects/onboarding-pack/refresh",{method:"POST",body:JSON.stringify({rootPath:e})}),getContextStatus:()=>r("/context/status"),buildContext:e=>r("/context/build",{method:"POST",body:JSON.stringify(e)}),buildTaskContext:e=>r("/context/build-task",{method:"POST",body:JSON.stringify(e)}),submitFeedback:e=>r("/context/feedback",{method:"POST",body:JSON.stringify(e)}),getFeedbackSummary:()=>r("/context/feedback-summary"),getGraph:()=>r("/graph"),getLayeredGraph:()=>r("/graph?view=layered"),getNode:e=>r("/graph/".concat(e)),expandNode:(e,t,n)=>r("/graph/".concat(e,"/expand?depth=").concat(null!=t?t:2,"&direction=").concat(null!=n?n:"both")),listWorkflows:()=>r("/workflows"),runWorkflow:(e,t)=>r("/workflows/".concat(e,"/run"),{method:"POST",body:JSON.stringify({input:t})}),listRuns:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return r("/workflows/runs?limit=".concat(e,"&offset=").concat(t))},getRun:e=>r("/workflows/runs/".concat(e)),approveRun:e=>r("/workflows/runs/".concat(e,"/approve"),{method:"POST"}),rejectRun:(e,t)=>r("/workflows/runs/".concat(e,"/reject"),{method:"POST",body:JSON.stringify({reason:t})}),getMemory:()=>r("/memory"),addMemory:e=>r("/memory",{method:"POST",body:JSON.stringify(e)}),updateMemoryEntry:(e,t)=>r("/memory/".concat(e),{method:"PUT",body:JSON.stringify(t)}),deleteMemoryEntry:e=>r("/memory/".concat(e),{method:"DELETE"}),getCandidates:()=>r("/memory/candidates"),approveCandidate:e=>r("/memory/candidates/".concat(e,"/approve"),{method:"POST"}),rejectCandidate:e=>r("/memory/candidates/".concat(e,"/reject"),{method:"POST"}),searchMemory:(e,t,n)=>r("/memory/search",{method:"POST",body:JSON.stringify({query:e,limit:t,categories:n})}),updateMemory:(e,t,n)=>r("/memory/".concat(e,"/").concat(t),{method:"PUT",body:JSON.stringify({value:n})}),searchKnowledge:(e,t)=>r("/knowledge/search?q=".concat(encodeURIComponent(e)).concat(t?"&scope=".concat(t):"")),syncKnowledge:e=>r("/knowledge/sync",{method:"POST",body:JSON.stringify({pluginName:e})}),getKnowledgeSources:()=>r("/knowledge/sources"),listTelemetryRuns:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return r("/telemetry/runs?limit=".concat(e,"&offset=").concat(t).concat(n?"&source=".concat(n):""))},getTelemetryRun:e=>r("/telemetry/runs/".concat(e)),getTimeline:(e,t)=>r("/telemetry/timeline".concat(e?"?from=".concat(e).concat(t?"&to=".concat(t):""):"")),listSessions:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,o=new URLSearchParams({limit:String(e),offset:String(t)});return n&&o.set("projectRoot",n),r("/telemetry/sessions?".concat(o))},getSession:e=>r("/telemetry/sessions/".concat(e)),getSessionEvents:e=>r("/telemetry/sessions/".concat(e,"/events")),getRunEvents:e=>r("/telemetry/runs/".concat(e,"/events")),getRunStats:e=>r("/telemetry/runs/".concat(e,"/stats")),completeRun:e=>r("/telemetry/runs/".concat(e,"/complete"),{method:"POST"}),getTelemetryStats:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:7;return r("/telemetry/stats?days=".concat(e))},getRoiSummary:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:7;return r("/telemetry/roi-summary?days=".concat(e))},listBenchmarkReports:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50;return r("/benchmark/reports?limit=".concat(e))},getLatestBenchmarkReport:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return r("/benchmark/reports/latest?suite=".concat(encodeURIComponent(e)))},getBenchmarkReport:e=>r("/benchmark/reports/".concat(encodeURIComponent(e))),cleanupTelemetry:e=>r("/telemetry/cleanup",{method:"POST",body:JSON.stringify({olderThanDays:e})}),getToolMetricsSummary:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:7;return r("/telemetry/tool-metrics/summary?days=".concat(e))},getAccuracyStats:(e,t)=>{let n=new URLSearchParams;e&&n.set("engine",e),t&&n.set("since",String(t));let o=n.toString();return r("/telemetry/accuracy/stats".concat(o?"?".concat(o):""))},getAccuracyQueries:e=>{let t=new URLSearchParams;(null==e?void 0:e.engine)&&t.set("engine",e.engine),(null==e?void 0:e.status)&&t.set("status",e.status),(null==e?void 0:e.limit)&&t.set("limit",String(e.limit)),(null==e?void 0:e.offset)&&t.set("offset",String(e.offset));let n=t.toString();return r("/telemetry/accuracy/queries".concat(n?"?".concat(n):""))},postAccuracyFeedback:e=>r("/telemetry/accuracy/feedback",{method:"POST",body:JSON.stringify(e)}),getAutoCheck:()=>r("/telemetry/auto-check"),getExecutions:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1?arguments[1]:void 0,n=new URLSearchParams({limit:String(e)});return t&&n.set("skillName",t),r("/telemetry/executions?".concat(n))},getExecutionEvents:e=>r("/telemetry/executions/".concat(e,"/events")),getMcpCompliance:()=>r("/telemetry/mcp-compliance"),getGovernanceRules:()=>r("/governance/rules"),createGovernanceRule:e=>r("/governance/rules",{method:"POST",body:JSON.stringify(e)}),updateGovernanceRule:e=>r("/governance/rules/".concat(encodeURIComponent(e.id)),{method:"PUT",body:JSON.stringify(e)}),deleteGovernanceRule:e=>r("/governance/rules/".concat(encodeURIComponent(e)),{method:"DELETE"}),getGovernanceAudit:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return r("/governance/audit-chain?limit=".concat(e,"&offset=").concat(t))},listPlugins:(e,t)=>r("/registry/plugins".concat(e?"?search=".concat(encodeURIComponent(e)).concat(t?"&tag=".concat(t):""):t?"?tag=".concat(t):"")),getPlugin:e=>r("/registry/plugins/".concat(e)),publishPlugin:e=>r("/registry/plugins",{method:"POST",body:JSON.stringify(e)}),getPluginEffectiveness:e=>r("/registry/plugins/effectiveness".concat(e?"?rootPath=".concat(encodeURIComponent(e)):""))}},50794:function(e,t,n){"use strict";n.d(t,{OM:function(){return u},aH:function(){return d}});var o,r,c,s,a=n(49767);let l=null!==(c=null===(o=a.env.NEXT_PUBLIC_DEVFLOW_API_KEY)||void 0===o?void 0:o.trim())&&void 0!==c?c:"",i=null!==(s=null===(r=a.env.NEXT_PUBLIC_DEVFLOW_API_URL)||void 0===r?void 0:r.trim())&&void 0!==s?s:"";function d(){return i?i.replace(/\/$/,""):window.location.origin}function u(){let e=function(){if(l)return l;try{var e;return(null===(e=localStorage.getItem("devflow-api-key"))||void 0===e?void 0:e.trim())||null}catch(e){return null}}();return e?{"x-api-key":e}:{}}},2389:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var o=n(7653);let r=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),c=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((e,t,n)=>!!e&&n.indexOf(e)===t).join(" ")};var s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let a=(0,o.forwardRef)((e,t)=>{let{color:n="currentColor",size:r=24,strokeWidth:a=2,absoluteStrokeWidth:l,className:i="",children:d,iconNode:u,...m}=e;return(0,o.createElement)("svg",{ref:t,...s,width:r,height:r,stroke:n,strokeWidth:l?24*Number(a)/Number(r):a,className:c("lucide",i),...m},[...u.map(e=>{let[t,n]=e;return(0,o.createElement)(t,n)}),...Array.isArray(d)?d:[d]])}),l=(e,t)=>{let n=(0,o.forwardRef)((n,s)=>{let{className:l,...i}=n;return(0,o.createElement)(a,{ref:s,iconNode:t,className:c("lucide-".concat(r(e)),l),...i})});return n.displayName="".concat(e),n}},39790:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});let o=(0,n(2389).Z)("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]])},53512:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});let o=(0,n(2389).Z)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},25555:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});let o=(0,n(2389).Z)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},90743:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});let o=(0,n(2389).Z)("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])}},function(e){e.O(0,[736,806,293,528,744],function(){return e(e.s=90239)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[815],{27279:function(e,t,r){Promise.resolve().then(r.bind(r,58756))},50466:function(e,t,r){"use strict";r.d(t,{z:function(){return s}});var o=r(27573),n=r(7653),l=r(29147);let i=(0,r(49289).j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),s=n.forwardRef((e,t)=>{let{className:r,variant:n,size:s,...a}=e;return(0,o.jsx)("button",{className:(0,l.cn)(i({variant:n,size:s,className:r})),ref:t,...a})});s.displayName="Button"},39134:function(e,t,r){"use strict";r.d(t,{I:function(){return i}});var o=r(27573),n=r(7653),l=r(29147);let i=n.forwardRef((e,t)=>{let{className:r,type:n,...i}=e;return(0,o.jsx)("input",{type:n,className:(0,l.cn)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",r),ref:t,...i})});i.displayName="Input"},58756:function(e,t,r){"use strict";r.d(t,{GraphView:function(){return j}});var o=r(27573),n=r(7653),l=r(39134),i=r(50466),s=r(10535),a=r(15134);r(23867);var d=r(86332),c=r.n(d),u=r(26598);let h={component:"C",hook:"H",api:"A",store:"S",function:"F",class:"CL",interface:"I",enum:"E",type:"T",variable:"V",unknown:"?"};var f=r(57429);let g={graphNode:function(e){var t,r,n,l,i;let{data:s}=e,d=null!==(l=null!==(n=h[s.nodeType])&&void 0!==n?n:null===(r=s.nodeType)||void 0===r?void 0:null===(t=r.charAt(0))||void 0===t?void 0:t.toUpperCase())&&void 0!==l?l:"?",c=null!==(i=s.layerColor)&&void 0!==i?i:"#6b7280",f=void 0!==s.highlighted,g=!0===s.highlighted;return(0,o.jsxs)("div",{className:"px-3 py-2 rounded-lg border-2 text-xs font-medium transition-opacity duration-200",style:{borderColor:c,backgroundColor:"color-mix(in srgb, ".concat(c," 8%, var(--background, #fff))"),boxShadow:g?"0 0 12px ".concat(c,", 0 0 4px ").concat(c):"0 1px 3px rgba(0,0,0,0.12)",opacity:f&&!g?.15:1},children:[(0,o.jsx)(a.HH,{type:"target",position:u.Ly.Top,style:{background:c}}),(0,o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,o.jsx)("span",{className:"inline-flex items-center justify-center w-5 h-5 rounded text-[10px] font-bold text-white flex-shrink-0",style:{backgroundColor:c},children:d}),(0,o.jsx)("span",{className:"truncate max-w-[140px]",children:s.label})]}),(0,o.jsx)(a.HH,{type:"source",position:u.Ly.Bottom,style:{background:c}})]})}};function p(e){let{filterMode:t="highlight",searchQuery:r=""}=e;return(0,o.jsx)(a.tV,{children:(0,o.jsx)(m,{filterMode:t,searchQuery:r})})}function m(e){let{filterMode:t,searchQuery:r}=e,{data:l}=(0,f.nO)(),i=(0,s.q)(e=>e.selectNode),{fitView:d}=(0,a._K)(),u=(0,n.useMemo)(()=>{if(!l)return{nodes:[],edges:[]};let e=(null!=r?r:"").toLowerCase().trim(),o="filter"===t&&e?l.nodes.filter(t=>t.name.toLowerCase().includes(e)):l.nodes.slice(0,300),n=e.length>0,i=o.map(t=>{var r,o;return{id:t.id,type:"graphNode",position:{x:0,y:0},data:{label:t.name,nodeType:t.type,layer:null!==(r=t.layer)&&void 0!==r?r:"Other",layerColor:null!==(o=t.layerColor)&&void 0!==o?o:"#6b7280",highlighted:n?t.name.toLowerCase().includes(e):void 0}}}),s=new Set(i.map(e=>e.id));return function(e,t){let r=new(c()).graphlib.Graph;for(let t of(r.setDefaultEdgeLabel(()=>({})),r.setGraph({rankdir:"TB",ranksep:80,nodesep:60}),e))r.setNode(t.id,{width:180,height:50});for(let e of t)r.setEdge(e.source,e.target);return c().layout(r),{nodes:e.map(e=>{let t=r.node(e.id);return{...e,position:{x:t.x-90,y:t.y-25}}}),edges:t}}(i,l.edges.filter(e=>s.has(e.from)&&s.has(e.to)).slice(0,500).map((e,t)=>({id:"".concat(e.from,"->").concat(e.to,"-").concat(t),source:e.from,target:e.to,animated:!1,style:{stroke:"#4b5563"}})))},[l,r,t]),[h,p,m]=(0,a.Rr)(u.nodes),[x,v,b]=(0,a.ll)(u.edges);(0,n.useEffect)(()=>{p(u.nodes),v(u.edges)},[u,p,v]),(0,n.useEffect)(()=>{if(r){let e=u.nodes.find(e=>!0===e.data.highlighted);e&&setTimeout(()=>{d({nodes:[e],duration:500,maxZoom:1.5})},100)}},[r,u.nodes,d]);let y=(0,n.useCallback)((e,t)=>{i(t.id)},[i]);return(0,o.jsxs)(a.x$,{nodes:h,edges:x,onNodesChange:m,onEdgesChange:b,onNodeClick:y,nodeTypes:g,fitView:!0,children:[(0,o.jsx)(a.Aq,{}),(0,o.jsx)(a.ZX,{}),(0,o.jsx)(a.a9,{nodeColor:e=>{var t;let r=null===(t=e.data)||void 0===t?void 0:t.layerColor;return null!=r?r:"#6b7280"}})]})}var x=r(3806),v=r(95731),b=r(38333),y=r(57124);function j(){let{t:e}=(0,x.$G)(),t=(0,s.q)(e=>e.searchQuery),r=(0,s.q)(e=>e.setSearchQuery),[a,d]=(0,n.useState)("highlight");return(0,o.jsxs)("div",{className:"flex flex-col h-full",children:[(0,o.jsxs)("div",{className:"p-3 border-b border-border flex items-center gap-2",children:[(0,o.jsxs)("div",{className:"relative flex-1 max-w-sm",children:[(0,o.jsx)(v.Z,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),(0,o.jsx)(l.I,{placeholder:e("graph.searchPlaceholder"),value:t,onChange:e=>r(e.target.value),className:"pl-8"})]}),t&&(0,o.jsx)(i.z,{variant:"ghost",size:"sm",onClick:()=>d(e=>"highlight"===e?"filter":"highlight"),title:e("highlight"===a?"graph.filterOnly":"graph.highlightAll"),className:"flex-shrink-0",children:"highlight"===a?(0,o.jsx)(b.Z,{className:"h-4 w-4"}):(0,o.jsx)(y.Z,{className:"h-4 w-4"})})]}),(0,o.jsx)("div",{className:"flex-1",children:(0,o.jsx)(p,{filterMode:a,searchQuery:t})})]})}},10535:function(e,t,r){"use strict";r.d(t,{q:function(){return a}});var o=r(62052);let n="devflow-project-root",l="devflow-active-project-root";function i(e){try{return localStorage.getItem(e)}catch(e){return null}}function s(e,t){try{null===t?localStorage.removeItem(e):localStorage.setItem(e,t)}catch(e){}}let a=(0,o.Ue)(e=>({selectedNodeId:null,detailTab:"properties",searchQuery:"",projectRoot:i(n),activeProjectRoot:i(l),selectedRunId:null,selectNode:t=>e({selectedNodeId:t}),setDetailTab:t=>e({detailTab:t}),setSearchQuery:t=>e({searchQuery:t}),setProjectRoot:t=>{s(n,t),e({projectRoot:t})},setActiveProjectRoot:t=>{s(l,t),e({activeProjectRoot:t})},setSelectedRunId:t=>e({selectedRunId:t})}))},29147:function(e,t,r){"use strict";r.d(t,{cn:function(){return l}});var o=r(10607),n=r(25579);function l(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.m6)((0,o.W)(t))}}},function(e){e.O(0,[650,856,736,806,697,221,429,293,528,744],function(){return e(e.s=27279)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[219],{15198:function(e,n,t){Promise.resolve().then(t.bind(t,29504))},50466:function(e,n,t){"use strict";t.d(n,{z:function(){return d}});var r=t(27573),l=t(7653),s=t(29147);let o=(0,t(49289).j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),d=l.forwardRef((e,n)=>{let{className:t,variant:l,size:d,...i}=e;return(0,r.jsx)("button",{className:(0,s.cn)(o({variant:l,size:d,className:t})),ref:n,...i})});d.displayName="Button"},72196:function(e,n,t){"use strict";t.d(n,{Ol:function(){return d},Zb:function(){return o},aY:function(){return a},ll:function(){return i}});var r=t(27573),l=t(7653),s=t(29147);let o=l.forwardRef((e,n)=>{let{className:t,...l}=e;return(0,r.jsx)("div",{ref:n,className:(0,s.cn)("rounded-lg border border-border bg-card text-card-foreground",t),...l})});o.displayName="Card";let d=l.forwardRef((e,n)=>{let{className:t,...l}=e;return(0,r.jsx)("div",{ref:n,className:(0,s.cn)("flex flex-col space-y-1.5 p-4",t),...l})});d.displayName="CardHeader";let i=l.forwardRef((e,n)=>{let{className:t,...l}=e;return(0,r.jsx)("h3",{ref:n,className:(0,s.cn)("text-sm font-semibold leading-none tracking-tight",t),...l})});i.displayName="CardTitle";let a=l.forwardRef((e,n)=>{let{className:t,...l}=e;return(0,r.jsx)("div",{ref:n,className:(0,s.cn)("p-4 pt-0",t),...l})});a.displayName="CardContent"},39134:function(e,n,t){"use strict";t.d(n,{I:function(){return o}});var r=t(27573),l=t(7653),s=t(29147);let o=l.forwardRef((e,n)=>{let{className:t,type:l,...o}=e;return(0,r.jsx)("input",{type:l,className:(0,s.cn)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t),ref:n,...o})});o.displayName="Input"},29504:function(e,n,t){"use strict";t.d(n,{KnowledgeView:function(){return c}});var r=t(27573),l=t(7653),s=t(57429),o=t(72196),d=t(39134),i=t(50466),a=t(3806);function c(){let{t:e}=(0,a.$G)(),{data:n,isLoading:t}=(0,s.ff)(),c=(0,s.mE)(),[u,f]=(0,l.useState)(""),{data:m}=(0,s.mU)(u);return(0,r.jsxs)("div",{className:"p-6 space-y-4 h-full overflow-y-auto",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("h2",{className:"text-2xl font-bold",children:e("knowledge.title","Knowledge Base")}),(0,r.jsx)(i.z,{onClick:()=>c.mutate(void 0),disabled:c.isPending,children:c.isPending?e("knowledge.syncing","Syncing..."):e("knowledge.syncAll","Sync All")})]}),t?(0,r.jsx)("div",{className:"text-muted-foreground",children:e("knowledge.loading","Loading...")}):n&&n.length>0?(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold text-muted-foreground",children:e("knowledge.sources","Sources")}),n.map(n=>{var t,l,s,d,a,u,f,m;return(0,r.jsx)(o.Zb,{children:(0,r.jsxs)(o.aY,{className:"p-4 flex justify-between items-center",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"font-semibold",children:null!==(a=null===(t=n.source)||void 0===t?void 0:t.name)&&void 0!==a?a:n.name}),(0,r.jsxs)("div",{className:"text-sm text-muted-foreground",children:[null!==(u=n.entryCount)&&void 0!==u?u:0," chunks \xb7 ",null!==(f=null===(s=n.source)||void 0===s?void 0:null===(l=s.urls)||void 0===l?void 0:l.length)&&void 0!==f?f:0," URLs \xb7 ","ready"===n.status?e("knowledge.synced"):e("knowledge.notSynced"),n.lastSyncTime?" \xb7 ".concat(e("knowledge.last"),": ").concat(new Date(n.lastSyncTime).toLocaleDateString()):""]})]}),(0,r.jsx)(i.z,{variant:"outline",size:"sm",onClick:()=>{var e,t;return c.mutate(null!==(t=null===(e=n.source)||void 0===e?void 0:e.name)&&void 0!==t?t:n.name)},disabled:c.isPending,children:e("knowledge.sync")})]})},null!==(m=null===(d=n.source)||void 0===d?void 0:d.name)&&void 0!==m?m:n.name)})]}):(0,r.jsx)(o.Zb,{children:(0,r.jsx)(o.aY,{className:"p-6 text-center text-muted-foreground",children:e("knowledge.noSources","No knowledge sources. Install a plugin and sync docs.")})}),(0,r.jsxs)("div",{className:"space-y-2 pt-4",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold text-muted-foreground",children:e("knowledge.search","Search")}),(0,r.jsx)("div",{className:"flex gap-2",children:(0,r.jsx)(d.I,{placeholder:e("knowledge.searchPlaceholder","Search knowledge..."),value:u,onChange:e=>f(e.target.value)})}),m&&m.length>0&&(0,r.jsx)("div",{className:"space-y-2",children:m.map((n,t)=>{var l;return(0,r.jsx)(o.Zb,{children:(0,r.jsxs)(o.aY,{className:"p-4",children:[(0,r.jsx)("div",{className:"font-semibold",children:n.title}),(0,r.jsx)("div",{className:"text-sm text-muted-foreground mt-1",children:null===(l=n.content)||void 0===l?void 0:l.slice(0,200)}),void 0!==n.score&&(0,r.jsxs)("div",{className:"text-xs text-muted-foreground mt-1",children:[e("knowledge.score"),": ",n.score.toFixed(2)]})]})},t)})})]})]})}},29147:function(e,n,t){"use strict";t.d(n,{cn:function(){return s}});var r=t(10607),l=t(25579);function s(){for(var e=arguments.length,n=Array(e),t=0;t<e;t++)n[t]=arguments[t];return(0,l.m6)((0,r.W)(n))}},49289:function(e,n,t){"use strict";t.d(n,{j:function(){return o}});var r=t(10607);let l=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,s=r.W,o=(e,n)=>t=>{var r;if((null==n?void 0:n.variants)==null)return s(e,null==t?void 0:t.class,null==t?void 0:t.className);let{variants:o,defaultVariants:d}=n,i=Object.keys(o).map(e=>{let n=null==t?void 0:t[e],r=null==d?void 0:d[e];if(null===n)return null;let s=l(n)||l(r);return o[e][s]}),a=t&&Object.entries(t).reduce((e,n)=>{let[t,r]=n;return void 0===r||(e[t]=r),e},{});return s(e,i,null==n?void 0:null===(r=n.compoundVariants)||void 0===r?void 0:r.reduce((e,n)=>{let{class:t,className:r,...l}=n;return Object.entries(l).every(e=>{let[n,t]=e;return Array.isArray(t)?t.includes({...d,...a}[n]):({...d,...a})[n]===t})?[...e,t,r]:e},[]),null==t?void 0:t.class,null==t?void 0:t.className)}}},function(e){e.O(0,[736,806,697,429,293,528,744],function(){return e(e.s=15198)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{70135:function(e,t,o){Promise.resolve().then(o.bind(o,68762))},68762:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return K}});var n=o(27573);o(72625);var r=o(71628),s=o(77930),l=o(7653);function a(e){let{children:t}=e,[o]=(0,l.useState)(()=>new r.S({defaultOptions:{queries:{staleTime:3e4,retry:1}}}));return(0,n.jsx)(s.aH,{client:o,children:t})}var i=o(81695),c=o(10535),d=o(57429),u=o(29147),m=o(3806);let p={properties:"detail.properties",imports:"detail.imports",history:"detail.history"};function g(){let{t:e}=(0,m.$G)(),t=(0,c.q)(e=>e.selectedNodeId),o=(0,c.q)(e=>e.detailTab),r=(0,c.q)(e=>e.setDetailTab),{data:s}=(0,d.n4)(),l=null==s?void 0:s.nodes.find(e=>e.id===t);return t?(0,n.jsxs)("div",{className:"flex flex-col h-full",children:[(0,n.jsx)("div",{className:"flex border-b border-border",children:Object.keys(p).map(t=>(0,n.jsx)("button",{onClick:()=>r(t),className:(0,u.cn)("flex-1 py-2 text-xs font-medium capitalize",o===t?"border-b-2 border-primary text-primary":"text-muted-foreground"),children:e(p[t])},t))}),(0,n.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:l?(0,n.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("span",{className:"text-muted-foreground",children:[e("detail.name"),":"]})," ",l.name]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("span",{className:"text-muted-foreground",children:[e("detail.type"),":"]})," ",(0,n.jsx)("span",{className:"capitalize",children:l.type})]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("span",{className:"text-muted-foreground",children:[e("detail.file"),":"]})," ",(0,n.jsx)("span",{className:"font-mono text-xs",children:l.file})]})]}):(0,n.jsx)("p",{className:"text-muted-foreground text-sm",children:e("detail.notFound")})})]}):(0,n.jsx)("div",{className:"p-4 text-sm text-muted-foreground",children:e("detail.selectNode")})}var f=o(88146),h=o(83071),v=o(50646),k=o(88497),y=o(61990),x=o(31815),w=o(70548),b=o(41755),R=o(25555),T=o(39790),S=o(84142),j=o(31095),C=o(88623),P=o(46693),N=o(71523),I=o(12198);let D=[{href:"/",labelKey:"nav.overview",icon:h.Z},{href:"/graph",labelKey:"nav.graph",icon:v.Z},{href:"/context",labelKey:"nav.context",icon:k.Z},{href:"/workflows",labelKey:"nav.workflows",icon:y.Z},{href:"/memory",labelKey:"nav.memory",icon:x.Z},{href:"/knowledge",labelKey:"nav.knowledge",icon:w.Z},{href:"/runs",labelKey:"nav.runs",icon:b.Z},{href:"/timeline",labelKey:"nav.timeline",icon:R.Z},{href:"/executions",labelKey:"nav.executions",icon:T.Z},{href:"/tool-metrics",labelKey:"nav.toolMetrics",icon:S.Z},{href:"/accuracy",labelKey:"nav.accuracy",icon:j.Z},{href:"/replay",labelKey:"nav.replay",icon:C.Z},{href:"/benchmark",labelKey:"nav.benchmark",icon:P.Z},{href:"/doctor",labelKey:"nav.doctor",icon:N.Z},{href:"/settings",labelKey:"nav.settings",icon:I.Z}];function M(){let{t:e,i18n:t}=(0,m.$G)(),o=(0,i.usePathname)();return(0,n.jsxs)("nav",{className:"flex h-full min-w-max flex-row gap-1 p-2 md:min-w-0 md:flex-col md:p-3",children:[(0,n.jsx)(f.default,{href:"/",className:"flex h-9 shrink-0 items-center px-2 text-base font-bold text-primary md:mb-2 md:px-3",children:e("nav.title")}),(0,n.jsx)("div",{className:"flex flex-1 gap-1 md:flex-col",children:D.map(t=>{let r="/"===t.href?"/"===o:o===t.href||o.startsWith("".concat(t.href,"/"));return(0,n.jsxs)(f.default,{href:t.href,title:e(t.labelKey),className:(0,u.cn)("flex h-9 shrink-0 items-center gap-3 rounded-md px-2 text-sm transition-colors md:px-3",r?"bg-primary/10 text-primary":"text-muted-foreground hover:bg-accent hover:text-foreground"),children:[(0,n.jsx)(t.icon,{className:"h-4 w-4"}),(0,n.jsx)("span",{className:"hidden md:inline",children:e(t.labelKey)})]},t.href)})}),(0,n.jsx)("div",{className:"shrink-0 border-l border-border pl-2 md:mt-auto md:border-l-0 md:border-t md:pl-0 md:pt-3",children:(0,n.jsx)("button",{onClick:()=>{t.changeLanguage("zh"===t.language?"en":"zh")},className:"h-9 w-full rounded-md px-3 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:e("nav.language")})})]})}function A(e){let{nav:t,main:o,detail:r}=e;return(0,n.jsxs)("div",{className:"flex h-dvh w-full flex-col md:flex-row",children:[(0,n.jsx)("aside",{className:"h-14 shrink-0 overflow-x-auto border-b border-border bg-card md:h-auto md:w-[220px] md:overflow-y-auto md:border-b-0 md:border-r",children:t}),(0,n.jsx)("main",{className:"min-h-0 min-w-0 flex-1 overflow-hidden",children:o}),r?(0,n.jsx)("aside",{className:"hidden w-[340px] shrink-0 overflow-y-auto border-l border-border bg-card xl:block",children:r}):null]})}function F(e){let{children:t}=e,o=(0,i.usePathname)(),[r,s]=(0,l.useState)(!1);return((0,l.useEffect)(()=>s(!0),[]),r)?(0,n.jsx)(A,{nav:(0,n.jsx)(M,{}),main:t,detail:"/graph"===o?(0,n.jsx)(g,{}):void 0}):(0,n.jsx)("div",{className:"flex h-dvh items-center justify-center text-sm text-muted-foreground",children:"Loading..."})}var E=o(98533),_=o(53495),O=JSON.parse('{"nav":{"title":"DevFlow","overview":"Overview","graph":"Graph","context":"Context","workflows":"Workflows","memory":"Memory","benchmark":"Benchmark","knowledge":"Knowledge","runs":"Runs","timeline":"Timeline","executions":"Executions","toolMetrics":"Tool Metrics","accuracy":"Accuracy","replay":"Replay","doctor":"Doctor","settings":"Settings","language":"中文"},"overview":{"title":"Project Overview","project":"Project","noProject":"No project connected","filesIndexed":"Files Indexed","workflows":"Workflows","agentRuns":"Agent Runs","techStack":"Tech Stack","recentRuns":"Recent Agent Runs","noRuns":"No agent runs recorded yet.","agent":"Agent","mode":"Mode","source":"Source","status":"Status","tokens":"Tokens","connectTitle":"Connect Project","connectDescription":"Enter the root path of your project to connect. The server will index and analyze the codebase.","connectPlaceholder":"/path/to/your/project","connecting":"Connecting...","connect":"Connect","connectError":"Failed to connect. Make sure the path exists and is accessible.","architectureLayers":"Architecture Layers","filesCount":"{{count}} files","keyModules":"Key Modules","keyFiles":"Key Files","recommended":"Recommended Next Steps","plugins":"Plugins","queries":"Queries","switchProject":"Switch Project","switchProjectPlaceholder":"Enter project path...","switchProjectConfirm":"Switch","disconnectProject":"Disconnect"},"onboarding":{"title":"Onboarding Pack","empty":"No onboarding pack generated yet","noActiveProject":"No active project","generate":"Generate Onboarding Pack","refresh":"Refresh onboarding pack"},"context":{"title":"Context Builder","placeholder":"Search symbols or ask a question...","build":"Build","building":"Building context...","results":"Results ({{files}} files, ~{{tokens}} tokens)","taskMode":"Task Mode","taskContext":"Task Context","confidenceTokens":"{{confidence}}% confidence \xb7 {{tokens}} tokens","requiredFiles":"Required Files","optionalFiles":"Optional Files","keySymbols":"Key Symbols","riskHints":"Risk Hints","nextActions":"Next Actions","relevanceDirect":"direct","relevanceIndirect":"indirect","levelHigh":"high","levelMedium":"medium","levelLow":"low","wasHelpful":"Was this helpful?","hit":"Hit","partial":"Partial","miss":"Miss","thanks":"Thanks for your feedback!"},"memory":{"title":"Memory","loading":"Loading...","pendingApproval":"Pending Approval","approvedMemories":"Approved Memories","approve":"Approve","reject":"Reject","noMemories":"No memories yet","noMemoriesHint":"Memories help avoid repeating mistakes","confidence":"confidence","original":"Original","yes":"Yes","no":"No","category":{"mcp_correction":"MCP Correction","project_knowledge":"Project Knowledge","failure_lesson":"Failure Lesson"},"searchPlaceholder":"Search memories...","addMemory":"Add Memory","editMemory":"Edit Memory","deleteMemory":"Delete","deleteConfirm":"Delete this memory?","categoryLabel":"Category","content":"Content","scope":"Scope (optional)","cancel":"Cancel","save":"Save"},"workflows":{"title":"Workflow Runs","available":"Available Workflows","steps":"steps","stream":"Stream","closeStream":"Close stream","runHistory":"Run History","runId":"Run ID","started":"Started","noRuns":"No runs yet. Trigger a workflow above."},"benchmark":{"title":"Benchmark","running":"Running...","run":"Run Benchmark","tasks":"tasks","task":"Task","experimentTab":"A/B Benchmark","operationsTab":"Operations","filesTouched":"Files Touched","correctness":"Correctness","regressions":"Regressions Over 10%","baselineCorrectness":"Baseline Correctness","devflowCorrectness":"DevFlow Correctness","baselineTokens":"Baseline Tokens","devflowTokens":"DevFlow Tokens","noReports":"No benchmark reports yet. Run one to get started.","roiTitle":"ROI Dashboard","loading":"Loading...","noData":"No data available. Start using DevFlow to collect telemetry.","overview":"Overview","totalRuns":"Total Runs","completed":"Completed","failed":"Failed","avgDuration":"Avg Duration","avgTokens":"Avg Tokens","firstPassRate":"First Pass Rate","feedbackHitRate":"Feedback Hit Rate","efficiency":"Efficiency","avgTimePerTask":"Avg Time Per Task","avgRetryCount":"Avg Retry Count","tokensSaved":"Tokens Saved","failureBreakdown":"Failure Breakdown","workflowHealth":"Workflow Health","workflow":"Workflow","runs":"Runs","successRate":"Success Rate","pluginEffectiveness":"Plugin Effectiveness","plugin":"Plugin","dailyTrends":"Daily Trends","date":"Date","tokens":"Tokens","failures":"Failures","empty":"No telemetry data yet. Start using DevFlow with an AI agent to collect ROI metrics.","failureCategories":{"context_insufficient":"Context Insufficient","knowledge_missing":"Knowledge Missing","workflow_design_issue":"Workflow Design Issue","tool_error":"Tool Error","agent_override":"Agent Override","unknown":"Unknown"},"seconds":"{{value}}s","period":"{{from}} → {{to}}","experimentSummary":"Experiment Summary","timeSavedRate":"Time Saved","tokenSavedRate":"Token Saved","detailedResults":"Detailed Results","faster":"{{percent}}% faster","baseline":"Baseline","devflow":"DevFlow","noExperimentData":"No experiment data","opsSummary":"Operations Summary","totalRunsCount":"Total Runs","successRatePercent":"Success Rate","avgTokenUsage":"Avg Token Usage","avgDurationTime":"Avg Duration","feedbackHitRatePercent":"Feedback Hit Rate","noOpsData":"No operations data","loadFailed":"Load failed: {{error}}","pluginAnalysis":"Plugin Value Analysis","recommendedInstall":"Recommended to Install","suggestedRemove":"Suggested to Remove","installCount":"Installs","usageRate":"Usage","successRateShort":"Success","tokenImpact":"Token Impact","lastUsed":"Last Used","noPluginData":"No plugin data","recommended":"Recommended","lowEfficiency":"Low Efficiency"},"graph":{"searchPlaceholder":"Search nodes...","filterOnly":"Filter only","highlightAll":"Highlight all"},"detail":{"selectNode":"Select a node to view details","properties":"Properties","imports":"Imports","history":"History","name":"Name","type":"Type","file":"File","notFound":"Node not found"},"knowledge":{"title":"Knowledge Base","sources":"Sources","syncing":"Syncing...","syncAll":"Sync All","loading":"Loading...","noSources":"No knowledge sources. Install a plugin and sync docs.","search":"Search","searchPlaceholder":"Search knowledge...","synced":"Synced","notSynced":"Not synced","last":"Last","sync":"Sync","score":"Score"},"runs":{"title":"Runs","empty":"No runs recorded yet."},"timeline":{"title":"Timeline","runs":"Runs","tokens":"Tokens","llmCalls":"LLM Calls","toolUses":"Tool Uses","completed":"completed","failed":"failed"},"events":{"llmCall":"LLM Call","toolUse":"Tool Use","memoryRead":"Memory Read","memoryWrite":"Memory Write","fileRead":"File Read","fileWrite":"File Write","bashCommand":"Bash","mcpToolCall":"MCP Tool","error":"Error","userInput":"User Input","stepStart":"Step Start","stepEnd":"Step End","empty":"No events recorded for this run.","steps":"Steps","eventCount":"events","selectEvent":"Select an event to view details","eventDetail":"Event Detail","kind":"Kind","step":"Step","duration":"Duration","model":"Model","tokens":"Tokens","tokensInOut":"{{input}} in / {{output}} out","prompt":"Prompt","response":"Response","stdout":"Stdout","stderr":"Stderr","truncated":"Content was truncated"},"runDetail":{"title":"Run Detail","events":"events","llm":"LLM","tokens":"tokens","failureCategory":"Failure Category","failureReason":"Failure Reason","suggestedActions":"Suggested Actions","category":{"context_insufficient":"Context Insufficient","knowledge_missing":"Knowledge Missing","workflow_design_issue":"Workflow Design Issue","tool_error":"Tool Error","agent_override":"Agent Override"}},"plugin":{"title":"Plugin Effectiveness","installCount":"Install Count","activeRate":"Active Rate","successRate":"Success Rate","avgTokenImpact":"Avg Token Impact","recommendInstall":"Recommend Install","recommendOptimize":"Recommend Optimize","recommendRemove":"Recommend Remove"},"executions":{"title":"Skill Executions","loading":"Loading executions...","overallCompliance":"Overall MCP Compliance","totalExecutions":"Total Executions","skillsTracked":"Skills Tracked","skill":"Skill","status":"Status","tools":"Tools","mcpRate":"MCP Rate","duration":"Duration","tokens":"Tokens","empty":"No executions recorded yet","traceTimeline":"Execution Trace","blocked":"Blocked","fallback":"Fallback"},"settings":{"title":"Project Settings","projectInfo":"Project Info","name":"Name","mode":"Mode","plugins":"Plugins","noPlugins":"No plugins installed","telemetry":"Telemetry","totalRuns":"Runs stored","totalTokens":"Total tokens","clearOldRuns":"Clear old runs (30d+)"}}'),L=JSON.parse('{"nav":{"title":"DevFlow","overview":"概览","graph":"图谱","context":"上下文","workflows":"工作流","memory":"记忆","benchmark":"基准测试","knowledge":"知识库","runs":"运行记录","timeline":"时间线","executions":"执行轨迹","toolMetrics":"工具指标","accuracy":"准确率","replay":"回放","doctor":"自检","settings":"设置","language":"EN"},"overview":{"title":"项目概览","project":"项目","noProject":"未连接项目","filesIndexed":"已索引文件","workflows":"工作流","agentRuns":"智能体运行","techStack":"技术栈","recentRuns":"最近运行","noRuns":"暂无运行记录","agent":"智能体","mode":"模式","source":"来源","status":"状态","tokens":"令牌数","connectTitle":"连接项目","connectDescription":"输入项目根路径进行连接。服务端将索引并分析代码库。","connectPlaceholder":"/path/to/your/project","connecting":"连接中...","connect":"连接","connectError":"连接失败,请确认路径存在且可访问。","architectureLayers":"架构分层","filesCount":"{{count}} 个文件","keyModules":"关键模块","keyFiles":"关键文件","recommended":"推荐下一步","plugins":"插件","queries":"推荐查询","switchProject":"切换项目","switchProjectPlaceholder":"输入项目路径...","switchProjectConfirm":"切换","disconnectProject":"断开连接"},"onboarding":{"title":"启动包","empty":"尚未生成启动包","noActiveProject":"未激活项目","generate":"生成启动包","refresh":"刷新启动包"},"context":{"title":"上下文构建器","placeholder":"搜索符号或输入查询...","build":"构建","building":"正在构建上下文...","results":"结果({{files}} 个文件,约 {{tokens}} 个令牌)","taskMode":"任务模式","taskContext":"任务上下文","confidenceTokens":"{{confidence}}% 置信度 \xb7 {{tokens}} 令牌","requiredFiles":"必需文件","optionalFiles":"可选文件","keySymbols":"关键符号","riskHints":"风险提示","nextActions":"下一步操作","relevanceDirect":"直接","relevanceIndirect":"间接","levelHigh":"高","levelMedium":"中","levelLow":"低","wasHelpful":"有帮助吗?","hit":"有用","partial":"部分有用","miss":"无用","thanks":"感谢反馈!"},"memory":{"title":"记忆","loading":"加载中...","pendingApproval":"待审批","approvedMemories":"已批准的记忆","approve":"批准","reject":"拒绝","noMemories":"暂无记忆","noMemoriesHint":"记忆有助于避免重复犯错","confidence":"置信度","original":"原始","yes":"是","no":"否","category":{"mcp_correction":"MCP 纠正","project_knowledge":"项目知识","failure_lesson":"失败教训"},"searchPlaceholder":"搜索记忆...","addMemory":"添加记忆","editMemory":"编辑记忆","deleteMemory":"删除","deleteConfirm":"确定删除这条记忆?","categoryLabel":"分类","content":"内容","scope":"作用域(可选)","cancel":"取消","save":"保存"},"workflows":{"title":"工作流运行","available":"可用工作流","steps":"步骤","stream":"流","closeStream":"关闭流","runHistory":"运行历史","runId":"运行 ID","started":"开始时间","noRuns":"暂无运行,请触发上方工作流"},"benchmark":{"title":"基准测试","running":"运行中...","run":"运行测试","tasks":"任务","task":"任务","experimentTab":"A/B 基准","operationsTab":"运行治理","filesTouched":"涉及文件","correctness":"正确率","regressions":"超过 10% 的回退","baselineCorrectness":"基线正确率","devflowCorrectness":"DevFlow 正确率","baselineTokens":"基线 Token","devflowTokens":"DevFlow Token","noReports":"暂无测试报告,点击运行开始","roiTitle":"ROI 仪表盘","loading":"加载中...","noData":"暂无数据。使用 DevFlow 与 AI Agent 协作以收集 ROI 数据。","overview":"概览","totalRuns":"总运行数","completed":"已完成","failed":"已失败","avgDuration":"平均耗时","avgTokens":"平均令牌","firstPassRate":"首次通过率","feedbackHitRate":"反馈命中率","efficiency":"效率","avgTimePerTask":"平均每任务耗时","avgRetryCount":"平均重试次数","tokensSaved":"节省令牌数","failureBreakdown":"失败分类","workflowHealth":"工作流健康度","workflow":"工作流","runs":"运行数","successRate":"成功率","pluginEffectiveness":"插件有效性","plugin":"插件","dailyTrends":"每日趋势","date":"日期","tokens":"令牌数","failures":"失败数","empty":"暂无遥测数据。使用 DevFlow 与 AI Agent 协作以收集 ROI 指标。","failureCategories":{"context_insufficient":"上下文不足","knowledge_missing":"知识缺失","workflow_design_issue":"工作流设计问题","tool_error":"工具错误","agent_override":"智能体覆盖","unknown":"未知"},"seconds":"{{value}}s","period":"{{from}} → {{to}}","experimentSummary":"实验收益总结","timeSavedRate":"时间节省率","tokenSavedRate":"Token 节省率","detailedResults":"详细结果","faster":"{{percent}}% 更快","baseline":"基线","devflow":"DevFlow","noExperimentData":"暂无实验数据","opsSummary":"运营统计","totalRunsCount":"总运行次数","successRatePercent":"成功率","avgTokenUsage":"平均 Token 使用","avgDurationTime":"平均耗时","feedbackHitRatePercent":"反馈命中率","noOpsData":"暂无运营数据","loadFailed":"加载失败: {{error}}","pluginAnalysis":"插件价值分析","recommendedInstall":"推荐安装","suggestedRemove":"建议移除","installCount":"安装量","usageRate":"使用率","successRateShort":"成功率","tokenImpact":"Token 影响","lastUsed":"最近使用","noPluginData":"暂无插件数据","recommended":"推荐","lowEfficiency":"低效"},"graph":{"searchPlaceholder":"搜索节点...","filterOnly":"仅显示匹配","highlightAll":"高亮全部"},"detail":{"selectNode":"选择一个节点查看详情","properties":"属性","imports":"导入","history":"历史","name":"名称","type":"类型","file":"文件","notFound":"节点未找到"},"knowledge":{"title":"知识库","sources":"数据源","syncing":"同步中...","syncAll":"全部同步","loading":"加载中...","noSources":"暂无知识源,安装插件并同步文档。","search":"搜索","searchPlaceholder":"搜索知识...","synced":"已同步","notSynced":"未同步","last":"最近","sync":"同步","score":"相关性"},"runs":{"title":"运行记录","empty":"暂无运行记录。"},"timeline":{"title":"时间线","runs":"运行数","tokens":"令牌数","llmCalls":"LLM 调用","toolUses":"工具调用","completed":"已完成","failed":"已失败"},"events":{"llmCall":"LLM 调用","toolUse":"工具使用","memoryRead":"读取记忆","memoryWrite":"写入记忆","fileRead":"读取文件","fileWrite":"写入文件","bashCommand":"Bash","mcpToolCall":"MCP 工具","error":"错误","userInput":"用户输入","stepStart":"步骤开始","stepEnd":"步骤结束","empty":"此运行未记录任何事件。","steps":"步骤","eventCount":"个事件","selectEvent":"选择一个事件查看详情","eventDetail":"事件详情","kind":"类型","step":"步骤","duration":"耗时","model":"模型","tokens":"令牌数","tokensInOut":"{{input}} 输入 / {{output}} 输出","prompt":"提示词","response":"响应","stdout":"标准输出","stderr":"标准错误","truncated":"内容已截断"},"runDetail":{"title":"运行详情","events":"个事件","llm":"次 LLM","tokens":"tokens","failureCategory":"失败类别","failureReason":"失败原因","suggestedActions":"建议动作","category":{"context_insufficient":"上下文不足","knowledge_missing":"知识缺失","workflow_design_issue":"工作流设计问题","tool_error":"工具错误","agent_override":"Agent 覆盖"}},"plugin":{"title":"插件效果","installCount":"安装量","activeRate":"活跃率","successRate":"成功率","avgTokenImpact":"平均 Token 影响","recommendInstall":"推荐安装","recommendOptimize":"建议优化","recommendRemove":"建议淘汰"},"executions":{"title":"技能执行记录","loading":"加载执行记录中...","overallCompliance":"总体 MCP 合规率","totalExecutions":"总执行次数","skillsTracked":"追踪技能数","skill":"技能","status":"状态","tools":"工具数","mcpRate":"MCP 比率","duration":"耗时","tokens":"Token","empty":"暂无执行记录","traceTimeline":"执行时间线","blocked":"已拦截","fallback":"降级"},"settings":{"title":"项目设置","projectInfo":"项目信息","name":"名称","mode":"模式","plugins":"插件","noPlugins":"未安装插件","telemetry":"遥测","totalRuns":"运行数","totalTokens":"总令牌数","clearOldRuns":"清理旧记录(30天前)"}}');function K(e){let{children:t}=e;return(0,n.jsx)("html",{lang:"zh",className:"dark",children:(0,n.jsx)("body",{className:"h-dvh overflow-hidden",children:(0,n.jsx)(a,{children:(0,n.jsx)(F,{children:t})})})})}E.ZP.use(_.Z).use(m.Db).init({resources:{en:{translation:O},zh:{translation:L}},fallbackLng:"zh",detection:{order:["localStorage","navigator"],caches:["localStorage"]},interpolation:{escapeValue:!1}})},10535:function(e,t,o){"use strict";o.d(t,{q:function(){return i}});var n=o(62052);let r="devflow-project-root",s="devflow-active-project-root";function l(e){try{return localStorage.getItem(e)}catch(e){return null}}function a(e,t){try{null===t?localStorage.removeItem(e):localStorage.setItem(e,t)}catch(e){}}let i=(0,n.Ue)(e=>({selectedNodeId:null,detailTab:"properties",searchQuery:"",projectRoot:l(r),activeProjectRoot:l(s),selectedRunId:null,selectNode:t=>e({selectedNodeId:t}),setDetailTab:t=>e({detailTab:t}),setSearchQuery:t=>e({searchQuery:t}),setProjectRoot:t=>{a(r,t),e({projectRoot:t})},setActiveProjectRoot:t=>{a(s,t),e({activeProjectRoot:t})},setSelectedRunId:t=>e({selectedRunId:t})}))},29147:function(e,t,o){"use strict";o.d(t,{cn:function(){return s}});var n=o(10607),r=o(25579);function s(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];return(0,r.m6)((0,n.W)(t))}},72625:function(){}},function(e){e.O(0,[387,736,806,697,458,249,429,293,528,744],function(){return e(e.s=70135)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[872],{84367:function(e,t,n){Promise.resolve().then(n.bind(n,42302))},50466:function(e,t,n){"use strict";n.d(t,{z:function(){return o}});var r=n(27573),a=n(7653),s=n(29147);let l=(0,n(49289).j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),o=a.forwardRef((e,t)=>{let{className:n,variant:a,size:o,...i}=e;return(0,r.jsx)("button",{className:(0,s.cn)(l({variant:a,size:o,className:n})),ref:t,...i})});o.displayName="Button"},72196:function(e,t,n){"use strict";n.d(t,{Ol:function(){return o},Zb:function(){return l},aY:function(){return d},ll:function(){return i}});var r=n(27573),a=n(7653),s=n(29147);let l=a.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,r.jsx)("div",{ref:t,className:(0,s.cn)("rounded-lg border border-border bg-card text-card-foreground",n),...a})});l.displayName="Card";let o=a.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,r.jsx)("div",{ref:t,className:(0,s.cn)("flex flex-col space-y-1.5 p-4",n),...a})});o.displayName="CardHeader";let i=a.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,r.jsx)("h3",{ref:t,className:(0,s.cn)("text-sm font-semibold leading-none tracking-tight",n),...a})});i.displayName="CardTitle";let d=a.forwardRef((e,t)=>{let{className:n,...a}=e;return(0,r.jsx)("div",{ref:t,className:(0,s.cn)("p-4 pt-0",n),...a})});d.displayName="CardContent"},29324:function(e,t,n){"use strict";n.d(t,{$N:function(){return c},Vq:function(){return s},cZ:function(){return i},fK:function(){return d}});var r=n(27573);n(7653);var a=n(57431);let s=a.fC;a.xz;let l=a.h_;function o(e){let{className:t,...n}=e;return(0,r.jsx)(a.aV,{className:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 ".concat(null!=t?t:""),...n})}function i(e){let{className:t,children:n,...s}=e;return(0,r.jsxs)(l,{children:[(0,r.jsx)(o,{}),(0,r.jsx)(a.VY,{className:"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg ".concat(null!=t?t:""),...s,children:n})]})}function d(e){let{className:t,...n}=e;return(0,r.jsx)("div",{className:"flex flex-col space-y-1.5 text-center sm:text-left ".concat(null!=t?t:""),...n})}function c(e){let{className:t,...n}=e;return(0,r.jsx)(a.Dx,{className:"text-lg font-semibold leading-none tracking-tight ".concat(null!=t?t:""),...n})}a.x8},39134:function(e,t,n){"use strict";n.d(t,{I:function(){return l}});var r=n(27573),a=n(7653),s=n(29147);let l=a.forwardRef((e,t)=>{let{className:n,type:a,...l}=e;return(0,r.jsx)("input",{type:a,className:(0,s.cn)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",n),ref:t,...l})});l.displayName="Input"},42302:function(e,t,n){"use strict";n.d(t,{MemoryPanel:function(){return v}});var r=n(27573),a=n(7653),s=n(6315),l=n(10997),o=n(57429),i=n(72196),d=n(50466),c=n(39134),u=n(3806),m=n(33127),f=n(29324);let x=["semantic","procedural","episodic","failure_lesson"];function p(e){var t,n,s;let{open:l,onOpenChange:i,mode:c,defaultValues:m}=e,{t:p}=(0,u.$G)(),h=(0,o.KA)(),v=(0,o.Af)(),[g,y]=(0,a.useState)(null!==(t=null==m?void 0:m.category)&&void 0!==t?t:"semantic"),[j,b]=(0,a.useState)(null!==(n=null==m?void 0:m.content)&&void 0!==n?n:""),[N,w]=(0,a.useState)(null!==(s=null==m?void 0:m.scope)&&void 0!==s?s:"");(0,a.useEffect)(()=>{if(l){var e,t,n;y(null!==(e=null==m?void 0:m.category)&&void 0!==e?e:"semantic"),b(null!==(t=null==m?void 0:m.content)&&void 0!==t?t:""),w(null!==(n=null==m?void 0:m.scope)&&void 0!==n?n:"")}},[l,m]);let C=e=>{let t="memory.category.".concat(e),n=p(t);return n===t?e:n};return(0,r.jsx)(f.Vq,{open:l,onOpenChange:i,children:(0,r.jsxs)(f.cZ,{children:[(0,r.jsx)(f.fK,{children:(0,r.jsx)(f.$N,{children:"add"===c?p("memory.addMemory"):p("memory.editMemory")})}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-sm font-medium",children:p("memory.categoryLabel")}),(0,r.jsx)("select",{className:"w-full mt-1 rounded-md border bg-background px-3 py-2 text-sm",value:g,onChange:e=>y(e.target.value),children:x.map(e=>(0,r.jsx)("option",{value:e,children:C(e)},e))})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-sm font-medium",children:p("memory.content")}),(0,r.jsx)("textarea",{className:"w-full mt-1 rounded-md border bg-background px-3 py-2 text-sm min-h-[100px]",value:j,onChange:e=>b(e.target.value)})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-sm font-medium",children:p("memory.scope")}),(0,r.jsx)("input",{className:"w-full mt-1 rounded-md border bg-background px-3 py-2 text-sm",value:N,onChange:e=>w(e.target.value)})]}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)(d.z,{variant:"outline",onClick:()=>i(!1),children:p("memory.cancel")}),(0,r.jsx)(d.z,{onClick:()=>{j.trim()&&("add"===c?h.mutate({category:g,content:j.trim(),scope:N.trim()||void 0}):(null==m?void 0:m.id)&&v.mutate({id:m.id,updates:{category:g,content:j.trim(),scope:N.trim()||void 0}}),i(!1))},disabled:!j.trim(),children:p("memory.save")})]})]})]})})}let h=["all","failure_lesson","semantic","procedural","episodic"];function v(){var e,t,n,f,x;(0,m.z)("memory",[["memory"],["memory-candidates"]]);let{t:v}=(0,u.$G)(),{data:g}=(0,o.nq)(),y=(0,o.C)(),j=(0,o.mp)(),b=(0,o.S0)(),N=function(){let{t:e}=(0,u.$G)();return t=>{let n="memory.category.".concat(t),r=e(n);return r===n?t:r}}(),[w,C]=(0,a.useState)(""),{data:k}=(0,o.on)(w),[z,S]=(0,a.useState)(!1),[M,O]=(0,a.useState)(),[_,R]=(0,a.useState)("all"),E=null!==(n=null==g?void 0:null===(e=g.memories)||void 0===e?void 0:e.filter(e=>"approved"===e.status))&&void 0!==n?n:[],A=null!==(f=null==g?void 0:null===(t=g.memories)||void 0===t?void 0:t.filter(e=>"pending"===e.status))&&void 0!==f?f:[],Z="all"===_?E:E.filter(e=>e.category===_),V="all"===_?A:A.filter(e=>e.category===_),I=(0,a.useMemo)(()=>{let e=new Map;for(let n of V){var t;let r=null!==(t=e.get(n.category))&&void 0!==t?t:[];r.push(n),e.set(n.category,r)}return[...e.entries()].sort((e,t)=>{let[n]=e,[r]=t;return"failure_lesson"===n?-1:"failure_lesson"===r?1:n.localeCompare(r)})},[V]),$=w&&k?k:Z,T=e=>{var t;O({id:e.id,category:e.category,content:e.content,scope:null!==(t=e.scope)&&void 0!==t?t:""}),S(!0)},Y=e=>{window.confirm(v("memory.deleteConfirm"))&&b.mutate(e.id)};return g?(0,r.jsxs)("div",{className:"p-6 space-y-4 h-full overflow-y-auto",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("h2",{className:"text-2xl font-bold",children:v("memory.title")}),(0,r.jsxs)(d.z,{size:"sm",onClick:()=>{O(void 0),S(!0)},children:["+ ",v("memory.addMemory")]})]}),(0,r.jsx)("div",{className:"relative",children:(0,r.jsx)(c.I,{placeholder:v("memory.searchPlaceholder"),value:w,onChange:e=>C(e.target.value)})}),!w&&(0,r.jsx)("div",{className:"flex gap-2 flex-wrap",children:h.map(e=>(0,r.jsx)(d.z,{variant:_===e?"default":"outline",size:"sm",onClick:()=>R(e),children:"all"===e?v("memory.allCategories","All"):N(e)},e))}),!w&&V.length>0&&(0,r.jsxs)(i.Zb,{children:[(0,r.jsx)(i.Ol,{children:(0,r.jsxs)(i.ll,{children:[v("memory.pendingApproval")," (",V.length,")"]})}),(0,r.jsx)(i.aY,{children:(0,r.jsx)("div",{className:"space-y-4",children:I.map(e=>{let[t,n]=e;return(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"text-xs font-semibold text-muted-foreground uppercase mb-2",children:N(t)}),(0,r.jsx)("div",{className:"space-y-2",children:n.map(e=>(0,r.jsxs)("div",{className:"flex items-start justify-between p-2 rounded bg-secondary/50",children:[(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("p",{className:"text-sm font-medium truncate",children:e.content}),(0,r.jsxs)("p",{className:"text-xs text-muted-foreground",children:[v("memory.confidence"),": ",e.confidence]})]}),(0,r.jsxs)("div",{className:"flex gap-1 ml-2",children:[(0,r.jsx)(d.z,{size:"sm",variant:"outline",onClick:()=>y.mutate(e.id),children:v("memory.approve")}),(0,r.jsx)(d.z,{size:"sm",variant:"ghost",onClick:()=>j.mutate(e.id),children:v("memory.reject")})]})]},e.id))})]},t)})})})]}),(0,r.jsxs)(i.Zb,{children:[(0,r.jsx)(i.Ol,{children:(0,r.jsx)(i.ll,{children:w?"".concat(null!==(x=null==k?void 0:k.length)&&void 0!==x?x:0," results"):"".concat(v("memory.approvedMemories")," (").concat(Z.length,")")})}),(0,r.jsx)(i.aY,{children:0===$.length?(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 border border-dashed border-border rounded-lg text-center",children:[(0,r.jsx)("p",{className:"text-muted-foreground text-sm font-medium",children:v("memory.noMemories")}),(0,r.jsx)("p",{className:"text-muted-foreground text-xs mt-1",children:v("memory.noMemoriesHint")})]}):(0,r.jsx)("div",{className:"space-y-2",children:$.map(e=>(0,r.jsxs)("div",{className:"p-2 rounded bg-secondary/50 text-sm",children:[(0,r.jsxs)("div",{className:"flex justify-between items-start",children:[(0,r.jsx)("span",{className:"flex-1",children:e.content}),(0,r.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,r.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:N(e.category)}),(0,r.jsx)(d.z,{size:"sm",variant:"ghost",className:"h-6 w-6 p-0",onClick:()=>T(e),title:v("memory.editMemory"),children:(0,r.jsx)(s.Z,{className:"h-3.5 w-3.5"})}),(0,r.jsx)(d.z,{size:"sm",variant:"ghost",className:"h-6 w-6 p-0 text-destructive",onClick:()=>Y(e),title:v("memory.deleteMemory"),children:(0,r.jsx)(l.Z,{className:"h-3.5 w-3.5"})})]})]}),e.originalText&&(0,r.jsxs)("p",{className:"text-xs text-muted-foreground mt-1",children:[v("memory.original"),": ",e.originalText]})]},e.id))})})]}),(0,r.jsx)(p,{open:z,onOpenChange:S,mode:M?"edit":"add",defaultValues:M})]}):(0,r.jsx)("div",{className:"p-6 text-muted-foreground",children:v("memory.loading")})}},33127:function(e,t,n){"use strict";n.d(t,{D:function(){return o},z:function(){return i}});var r=n(7653),a=n(77930),s=n(50794);async function l(e,t,n){let r=await fetch("".concat((0,s.aH)(),"/api").concat(e),{headers:(0,s.OM)(),credentials:"same-origin",signal:t});if(!r.ok||!r.body)throw Error("SSE ".concat(r.status));let a=r.body.getReader(),l=new TextDecoder,o="";for(;!t.aborted;){var i;let{value:e,done:t}=await a.read();if(t)break;let r=(o+=l.decode(e,{stream:!0})).split("\n\n");for(let e of(o=null!==(i=r.pop())&&void 0!==i?i:"",r)){let t="message",r=[];for(let n of e.split("\n"))n.startsWith("event:")&&(t=n.slice(6).trim()),n.startsWith("data:")&&r.push(n.slice(5).trim());if(0!==r.length)try{n({type:t,data:JSON.parse(r.join("\n"))})}catch(e){}}}}function o(e){let[t,n]=(0,r.useState)([]);return(0,r.useEffect)(()=>{if(!e)return;let t=new AbortController;return l("/workflows/runs/".concat(encodeURIComponent(e),"/stream"),t.signal,e=>n(t=>[...t,e])).catch(()=>void 0),()=>t.abort()},[e]),{events:t,clear:(0,r.useCallback)(()=>n([]),[])}}function i(e,t){let n=(0,a.NL)(),s=JSON.stringify(t);(0,r.useEffect)(()=>{let t=new AbortController,r=JSON.parse(s);return l("/live/stream?channels=".concat(encodeURIComponent(e)),t.signal,t=>{if("refresh"===t.type&&t.data.channel===e)for(let e of r)n.invalidateQueries({queryKey:e})}).catch(()=>void 0),()=>t.abort()},[e,n,s])}},29147:function(e,t,n){"use strict";n.d(t,{cn:function(){return s}});var r=n(10607),a=n(25579);function s(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,a.m6)((0,r.W)(t))}}},function(e){e.O(0,[736,806,697,402,568,429,293,528,744],function(){return e(e.s=84367)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{82668:function(e,t,r){Promise.resolve().then(r.bind(r,63730))},72196:function(e,t,r){"use strict";r.d(t,{Ol:function(){return c},Zb:function(){return l},aY:function(){return o},ll:function(){return i}});var s=r(27573),n=r(7653),a=r(29147);let l=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,s.jsx)("div",{ref:t,className:(0,a.cn)("rounded-lg border border-border bg-card text-card-foreground",r),...n})});l.displayName="Card";let c=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,s.jsx)("div",{ref:t,className:(0,a.cn)("flex flex-col space-y-1.5 p-4",r),...n})});c.displayName="CardHeader";let i=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,s.jsx)("h3",{ref:t,className:(0,a.cn)("text-sm font-semibold leading-none tracking-tight",r),...n})});i.displayName="CardTitle";let o=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,s.jsx)("div",{ref:t,className:(0,a.cn)("p-4 pt-0",r),...n})});o.displayName="CardContent"},63730:function(e,t,r){"use strict";r.d(t,{ProjectOverview:function(){return N}});var s=r(27573),n=r(7653),a=r(57429),l=r(10535),c=r(72196),i=r(29147);function o(e){let{className:t,...r}=e;return(0,s.jsx)("div",{className:(0,i.cn)("animate-pulse rounded-md bg-muted",t),...r})}var d=r(2389);let u=(0,d.Z)("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);var h=r(88623);let x=(0,d.Z)("FolderSync",[["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v.5",key:"1dkoa9"}],["path",{d:"M12 10v4h4",key:"1czhmt"}],["path",{d:"m12 14 1.535-1.605a5 5 0 0 1 8 1.5",key:"lvuxfi"}],["path",{d:"M22 22v-4h-4",key:"1ewp4q"}],["path",{d:"m22 18-1.535 1.605a5 5 0 0 1-8-1.5",key:"14ync0"}]]);var m=r(10269);let v=(0,d.Z)("FolderGit2",[["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["path",{d:"M18 19c-2.8 0-5-2.2-5-5v8",key:"pkpw2h"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]),f=(0,d.Z)("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]),p=(0,d.Z)("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);var j=r(90743);let g=(0,d.Z)("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]),b=(0,d.Z)("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);var y=r(77329),w=r(3806);function N(){var e;let{t}=(0,w.$G)(),{data:r}=(0,a.fC)(),i=(0,l.q)(e=>e.projectRoot),d=(0,l.q)(e=>e.setProjectRoot),N=(0,l.q)(e=>e.activeProjectRoot),P=(0,l.q)(e=>e.setActiveProjectRoot),[Z,S]=(0,n.useState)(""),[C,E]=(0,n.useState)(""),[M,R]=(0,n.useState)(!1),O=(0,a.FU)(),A=(0,a.X0)(),T=(0,a.Tr)();(0,n.useEffect)(()=>{(null==r?void 0:r.rootPath)&&r.rootPath!==N&&(d(r.rootPath),P(r.rootPath))},[r,d,P,N]);let[q,I]=(0,n.useState)(!1);(0,n.useEffect)(()=>{q||(null==r?void 0:r.rootPath)||!N||O.isPending||(I(!0),O.mutate(N))},[null==r?void 0:r.rootPath,N,O.isPending,q]);let{data:L}=(0,a.Z0)(),{data:D}=(0,a.hI)(),{data:Y}=(0,a.D)(),{data:F}=(0,a.dL)(10,0),{data:V,isLoading:z}=(0,a.G2)(N),W=null==L?void 0:L.find(e=>e.rootPath===N),H=()=>{if((null==W?void 0:W.stack)&&W.stack.length>0)return W.stack;if(null==V?void 0:V.stack){let e=[...V.stack.languages,...V.stack.frameworks,...V.stack.buildTools,...V.stack.testTools];if(e.length>0)return e}return[]},_=()=>{Z.trim()&&O.mutate(Z.trim(),{onSuccess:e=>{d(e.rootPath),P(e.rootPath)}})},U=()=>{C.trim()&&O.mutate(C.trim(),{onSuccess:e=>{d(e.rootPath),P(e.rootPath),R(!1),E("")}})};return i?(0,s.jsxs)("div",{className:"p-6 space-y-6 overflow-y-auto h-full",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("h2",{className:"text-2xl font-bold",children:t("overview.title")}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"hidden max-w-[40vw] truncate rounded bg-secondary px-2 py-1 font-mono text-xs text-muted-foreground sm:block",children:i}),(0,s.jsx)("button",{onClick:()=>N&&T.mutate(N),disabled:!N||T.isPending,className:"icon-button",title:t("onboarding.refresh"),"aria-label":t("onboarding.refresh"),children:(0,s.jsx)(h.Z,{className:"h-4 w-4 ".concat(T.isPending?"animate-spin":"")})}),(0,s.jsx)("button",{onClick:()=>R(!M),className:"icon-button",title:t("overview.switchProject"),"aria-label":t("overview.switchProject"),children:(0,s.jsx)(x,{className:"h-4 w-4"})}),(0,s.jsx)("button",{onClick:()=>{A.mutate(void 0,{onSuccess:()=>{d(null),P(null)}})},className:"icon-button",title:t("overview.disconnectProject"),"aria-label":t("overview.disconnectProject"),children:(0,s.jsx)(m.Z,{className:"h-4 w-4"})})]})]}),M&&(0,s.jsxs)("div",{className:"flex items-center gap-2 p-3 rounded-lg border bg-card",children:[(0,s.jsx)("input",{type:"text",value:C,onChange:e=>E(e.target.value),onKeyDown:e=>{"Enter"===e.key&&U(),"Escape"===e.key&&(R(!1),E(""))},placeholder:t("overview.switchProjectPlaceholder"),className:"flex-1 px-3 py-1.5 rounded-md border border-border bg-background text-sm"}),(0,s.jsx)("button",{onClick:U,disabled:O.isPending||!C.trim(),className:"px-3 py-1.5 rounded-md bg-primary text-primary-foreground text-sm disabled:opacity-50",children:O.isPending?t("overview.connecting"):t("overview.switchProjectConfirm")})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,s.jsx)(k,{icon:(0,s.jsx)(v,{className:"h-5 w-5"}),label:t("overview.project"),value:(null==W?void 0:W.name)?W.name:(null==V?void 0:V.projectName)?V.projectName:N&&null!==(e=N.split("/").pop())&&void 0!==e?e:"Unknown Project"}),(0,s.jsx)(k,{icon:(0,s.jsx)(f,{className:"h-5 w-5"}),label:t("overview.filesIndexed"),value:D?String(D.totalFiles):"--"}),(0,s.jsx)(k,{icon:(0,s.jsx)(p,{className:"h-5 w-5"}),label:t("overview.workflows"),value:Y?String(Y.length):"--"}),(0,s.jsx)(k,{icon:(0,s.jsx)(j.Z,{className:"h-5 w-5"}),label:t("overview.agentRuns"),value:F?String(F.length):"--"})]}),H().length>0&&(0,s.jsxs)(c.Zb,{children:[(0,s.jsx)(c.Ol,{children:(0,s.jsx)(c.ll,{children:t("overview.techStack")})}),(0,s.jsx)(c.aY,{children:(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:H().map(e=>(0,s.jsx)("span",{className:"px-2 py-1 rounded-md bg-secondary text-secondary-foreground text-xs",children:e},e))})})]}),z?(0,s.jsxs)(c.Zb,{children:[(0,s.jsx)(c.Ol,{children:(0,s.jsxs)(c.ll,{className:"flex items-center gap-2",children:[(0,s.jsx)(g,{className:"h-4 w-4"}),t("onboarding.title")]})}),(0,s.jsx)(c.aY,{children:(0,s.jsx)(o,{className:"h-32 w-full"})})]}):V?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c.Zb,{children:[(0,s.jsx)(c.Ol,{children:(0,s.jsxs)(c.ll,{className:"flex items-center gap-2",children:[(0,s.jsx)(g,{className:"h-4 w-4"}),t("overview.architectureLayers")]})}),(0,s.jsx)(c.aY,{children:(0,s.jsx)("div",{className:"space-y-2",children:V.architectureLayers.map(e=>(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-sm font-medium",children:e.name}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground bg-secondary px-2 py-0.5 rounded",children:t("overview.filesCount",{count:e.files})})]},e.name))})})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[(0,s.jsxs)(c.Zb,{children:[(0,s.jsx)(c.Ol,{children:(0,s.jsxs)(c.ll,{className:"flex items-center gap-2",children:[(0,s.jsx)(b,{className:"h-4 w-4"}),t("overview.keyModules")]})}),(0,s.jsx)(c.aY,{children:(0,s.jsx)("div",{className:"space-y-2",children:V.keyModules.slice(0,6).map(e=>(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-mono text-primary",children:e.name}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:e.reason})]},e.name))})})]}),(0,s.jsxs)(c.Zb,{children:[(0,s.jsx)(c.Ol,{children:(0,s.jsxs)(c.ll,{className:"flex items-center gap-2",children:[(0,s.jsx)(f,{className:"h-4 w-4"}),t("overview.keyFiles")]})}),(0,s.jsx)(c.aY,{children:(0,s.jsx)("div",{className:"space-y-2",children:V.keyFiles.slice(0,6).map(e=>(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-mono truncate",children:e.path}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:e.reason})]},e.path))})})]})]}),(0,s.jsxs)(c.Zb,{children:[(0,s.jsx)(c.Ol,{children:(0,s.jsxs)(c.ll,{className:"flex items-center gap-2",children:[(0,s.jsx)(y.Z,{className:"h-4 w-4"}),t("overview.recommended")]})}),(0,s.jsx)(c.aY,{children:(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h4",{className:"text-xs font-semibold text-muted-foreground mb-2 uppercase",children:t("overview.plugins")}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:V.recommendedPlugins.map(e=>(0,s.jsx)("span",{className:"px-2 py-0.5 rounded bg-green-100 text-green-800 text-xs",children:e},e))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h4",{className:"text-xs font-semibold text-muted-foreground mb-2 uppercase",children:t("overview.workflows")}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:V.recommendedWorkflows.map(e=>(0,s.jsx)("span",{className:"px-2 py-0.5 rounded bg-blue-100 text-blue-800 text-xs",children:e},e))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h4",{className:"text-xs font-semibold text-muted-foreground mb-2 uppercase",children:t("overview.queries")}),(0,s.jsx)("div",{className:"space-y-1",children:V.recommendedQueries.slice(0,3).map(e=>(0,s.jsxs)("div",{className:"text-xs text-muted-foreground",children:['"',e,'"']},e))})]})]})})]})]}):(0,s.jsx)(c.Zb,{children:(0,s.jsx)(c.aY,{className:"py-8 text-center text-muted-foreground",children:t("onboarding.empty")})}),(0,s.jsxs)(c.Zb,{children:[(0,s.jsx)(c.Ol,{children:(0,s.jsx)(c.ll,{children:t("overview.recentRuns")})}),(0,s.jsx)(c.aY,{children:F&&F.length>0?(0,s.jsxs)("table",{className:"w-full text-sm",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"text-left text-muted-foreground",children:[(0,s.jsx)("th",{children:t("overview.label")}),(0,s.jsx)("th",{children:t("overview.status")}),(0,s.jsx)("th",{children:t("overview.toolCalls")}),(0,s.jsx)("th",{children:t("overview.duration")})]})}),(0,s.jsx)("tbody",{children:F.slice(0,5).map(e=>(0,s.jsxs)("tr",{className:"border-t border-border",children:[(0,s.jsx)("td",{className:"py-1",children:e.label||e.projectRoot}),(0,s.jsx)("td",{children:(0,s.jsx)("span",{className:"px-1.5 py-0.5 rounded text-xs ".concat("closed"===e.status?"bg-green-100 text-green-700":"bg-yellow-100 text-yellow-700"),children:e.status})}),(0,s.jsxs)("td",{children:[e.totalToolCalls," (",e.mcpToolCalls," MCP)"]}),(0,s.jsx)("td",{children:e.durationMs>0?"".concat((e.durationMs/1e3).toFixed(1),"s"):"--"})]},e.id))})]}):(0,s.jsx)("p",{className:"text-muted-foreground text-sm",children:t("overview.noRuns")})})]})]}):(0,s.jsx)("div",{className:"p-6 flex items-center justify-center h-full",children:(0,s.jsxs)(c.Zb,{className:"w-full max-w-md",children:[(0,s.jsx)(c.Ol,{children:(0,s.jsxs)(c.ll,{className:"flex items-center gap-2",children:[(0,s.jsx)(u,{className:"h-5 w-5"}),t("overview.connectTitle")]})}),(0,s.jsxs)(c.aY,{className:"space-y-4",children:[(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:t("overview.connectDescription")}),(0,s.jsx)("input",{type:"text",value:Z,onChange:e=>S(e.target.value),onKeyDown:e=>"Enter"===e.key&&_(),placeholder:t("overview.connectPlaceholder"),className:"w-full px-3 py-2 rounded-md border border-border bg-background text-sm"}),(0,s.jsx)("button",{onClick:_,disabled:O.isPending||!Z.trim(),className:"w-full px-4 py-2 rounded-md bg-primary text-primary-foreground text-sm font-medium disabled:opacity-50",children:O.isPending?t("overview.connecting"):t("overview.connect")}),O.isError&&(0,s.jsx)("p",{className:"text-sm text-red-500",children:t("overview.connectError")})]})]})})}function k(e){let{icon:t,label:r,value:n}=e;return(0,s.jsx)(c.Zb,{children:(0,s.jsxs)(c.aY,{className:"p-4 flex items-center gap-3",children:[(0,s.jsx)("div",{className:"text-primary",children:t}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:r}),(0,s.jsx)("div",{className:"font-bold text-lg",children:n})]})]})})}},10535:function(e,t,r){"use strict";r.d(t,{q:function(){return i}});var s=r(62052);let n="devflow-project-root",a="devflow-active-project-root";function l(e){try{return localStorage.getItem(e)}catch(e){return null}}function c(e,t){try{null===t?localStorage.removeItem(e):localStorage.setItem(e,t)}catch(e){}}let i=(0,s.Ue)(e=>({selectedNodeId:null,detailTab:"properties",searchQuery:"",projectRoot:l(n),activeProjectRoot:l(a),selectedRunId:null,selectNode:t=>e({selectedNodeId:t}),setDetailTab:t=>e({detailTab:t}),setSearchQuery:t=>e({searchQuery:t}),setProjectRoot:t=>{c(n,t),e({projectRoot:t})},setActiveProjectRoot:t=>{c(a,t),e({activeProjectRoot:t})},setSelectedRunId:t=>e({selectedRunId:t})}))},29147:function(e,t,r){"use strict";r.d(t,{cn:function(){return a}});var s=r(10607),n=r(25579);function a(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.m6)((0,s.W)(t))}},2389:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var s=r(7653);let n=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),a=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((e,t,r)=>!!e&&r.indexOf(e)===t).join(" ")};var l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let c=(0,s.forwardRef)((e,t)=>{let{color:r="currentColor",size:n=24,strokeWidth:c=2,absoluteStrokeWidth:i,className:o="",children:d,iconNode:u,...h}=e;return(0,s.createElement)("svg",{ref:t,...l,width:n,height:n,stroke:r,strokeWidth:i?24*Number(c)/Number(n):c,className:a("lucide",o),...h},[...u.map(e=>{let[t,r]=e;return(0,s.createElement)(t,r)}),...Array.isArray(d)?d:[d]])}),i=(e,t)=>{let r=(0,s.forwardRef)((r,l)=>{let{className:i,...o}=r;return(0,s.createElement)(c,{ref:l,iconNode:t,className:a("lucide-".concat(n(e)),i),...o})});return r.displayName="".concat(e),r}},77329:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});let s=(0,r(2389).Z)("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]])},88623:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});let s=(0,r(2389).Z)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},10269:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});let s=(0,r(2389).Z)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},90743:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});let s=(0,r(2389).Z)("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])},38475:function(e,t,r){"use strict";var s=r(7653),n=r(96250),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},l=n.useSyncExternalStore,c=s.useRef,i=s.useEffect,o=s.useMemo,d=s.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,s,n){var u=c(null);if(null===u.current){var h={hasValue:!1,value:null};u.current=h}else h=u.current;var x=l(e,(u=o(function(){function e(e){if(!i){if(i=!0,l=e,e=s(e),void 0!==n&&h.hasValue){var t=h.value;if(n(t,e))return c=t}return c=e}if(t=c,a(l,e))return t;var r=s(e);return void 0!==n&&n(t,r)?(l=e,t):(l=e,c=r)}var l,c,i=!1,o=void 0===r?null:r;return[function(){return e(t())},null===o?void 0:function(){return e(o())}]},[t,r,s,n]))[0],u[1]);return i(function(){h.hasValue=!0,h.value=x},[x]),d(x),x}},18678:function(e,t,r){"use strict";e.exports=r(38475)},62052:function(e,t,r){"use strict";r.d(t,{Ue:function(){return u}});var s=r(19730),n=r(7653),a=r(18678);let{useDebugValue:l}=n,{useSyncExternalStoreWithSelector:c}=a,i=!1,o=e=>e,d=e=>{"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");let t="function"==typeof e?(0,s.M)(e):e,r=(e,r)=>(function(e,t=o,r){r&&!i&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),i=!0);let s=c(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return l(s),s})(t,e,r);return Object.assign(r,t),r},u=e=>e?d(e):d},19730:function(e,t,r){"use strict";r.d(t,{M:function(){return n}});let s=e=>{let t;let r=new Set,s=(e,s)=>{let n="function"==typeof e?e(t):e;if(!Object.is(n,t)){let e=t;t=(null!=s?s:"object"!=typeof n||null===n)?n:Object.assign({},t,n),r.forEach(r=>r(t,e))}},n=()=>t,a={setState:s,getState:n,getInitialState:()=>l,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},l=t=e(s,n,a);return a},n=e=>e?s(e):s}},function(e){e.O(0,[736,806,697,429,293,528,744],function(){return e(e.s=82668)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[46],{13002:function(t,e,s){Promise.resolve().then(s.bind(s,51098))},51098:function(t,e,s){"use strict";s.d(e,{ReplayView:function(){return g}});var i=s(27573),r=s(88146),n=s(81695),a=s(7653),o=s(2389);let u=(0,o.Z)("SkipBack",[["polygon",{points:"19 20 9 12 19 4 19 20",key:"o2sva"}],["line",{x1:"5",x2:"5",y1:"19",y2:"5",key:"1ocqjk"}]]);var c=s(58410);let l=(0,o.Z)("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);var d=s(61990),h=s(2966);let m=(0,o.Z)("SkipForward",[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]]);function p(t){let{isPlaying:e,speed:s,onPlayPause:r,onStepForward:n,onStepBack:a,onJumpToStart:o,onJumpToEnd:p,onSpeedChange:x}=t;return(0,i.jsxs)("div",{className:"flex items-center justify-center gap-2 p-3 border-b border-border bg-secondary/30",children:[(0,i.jsx)("button",{onClick:o,className:"p-1 rounded hover:bg-accent",children:(0,i.jsx)(u,{className:"h-4 w-4"})}),(0,i.jsx)("button",{onClick:a,className:"p-1 rounded hover:bg-accent",children:(0,i.jsx)(c.Z,{className:"h-4 w-4"})}),(0,i.jsx)("button",{onClick:r,className:"p-2 rounded-full bg-primary text-primary-foreground hover:opacity-90",children:e?(0,i.jsx)(l,{className:"h-4 w-4"}):(0,i.jsx)(d.Z,{className:"h-4 w-4"})}),(0,i.jsx)("button",{onClick:n,className:"p-1 rounded hover:bg-accent",children:(0,i.jsx)(h.Z,{className:"h-4 w-4"})}),(0,i.jsx)("button",{onClick:p,className:"p-1 rounded hover:bg-accent",children:(0,i.jsx)(m,{className:"h-4 w-4"})}),(0,i.jsx)("div",{className:"border-l border-border h-5 mx-2"}),[.5,1,2,4,8].map(t=>(0,i.jsxs)("button",{onClick:()=>x(t),className:"px-1.5 py-0.5 text-xs rounded ".concat(s===t?"bg-primary text-primary-foreground":"hover:bg-accent text-muted-foreground"),children:[t,"x"]},t))]})}function x(t){let{events:e,currentIndex:s,onSeek:r}=t;if(0===e.length)return null;let n=e[0].timestamp,a=e[e.length-1].timestamp-n||1;return(0,i.jsx)("div",{className:"px-4 py-2 border-b border-border",children:(0,i.jsxs)("div",{className:"relative h-8 bg-secondary rounded cursor-pointer",onClick:t=>{let s=t.currentTarget.getBoundingClientRect();r(Math.round((t.clientX-s.left)/s.width*(e.length-1)))},children:[e.map((t,e)=>{let r=(t.timestamp-n)/a*100;return(0,i.jsx)("div",{className:"absolute top-1 w-2 h-6 rounded-sm ".concat(e<=s?"bg-primary":"bg-border"),style:{left:"".concat(r,"%")},title:t.stepId},t.id)}),(0,i.jsx)("div",{className:"absolute top-0 h-full w-0.5 bg-foreground",style:{left:"".concat(s/(e.length-1||1)*100,"%")}})]})})}function f(t){var e,s;let{events:r,currentIndex:n}=t,a=null!==(s=null===(e=r[0])||void 0===e?void 0:e.timestamp)&&void 0!==s?s:0;return(0,i.jsx)("div",{className:"space-y-0.5 font-mono text-xs",children:r.map((t,e)=>{var s,r,o,u;let c=((t.timestamp-a)/1e3).toFixed(1),l=e===n;return(0,i.jsxs)("div",{className:"flex gap-2 py-1 px-2 rounded ".concat(l?"bg-primary/10 text-primary font-medium":e<n?"text-muted-foreground":"text-muted-foreground/50"),children:[(0,i.jsxs)("span",{className:"w-16 text-right tabular-nums",children:["[",c,"s]"]}),(0,i.jsx)("span",{children:t.kind}),(0,i.jsx)("span",{className:"text-muted-foreground/50",children:(null===(s=t.data)||void 0===s?void 0:s.toolName)||(null===(r=t.data)||void 0===r?void 0:r.filePath)||(null===(o=t.data)||void 0===o?void 0:o.model)||(null===(u=t.data)||void 0===u?void 0:u.command)||""}),l&&(0,i.jsx)("span",{className:"ml-auto text-primary",children:"YOU ARE HERE"})]},t.id)})})}var v=s(61883);function y(t){var e;let{events:s,runId:r,onBack:n}=t,o=[...s].sort((t,e)=>t.timestamp-e.timestamp),[u,c]=(0,a.useState)(0),[l,d]=(0,a.useState)(!1),[h,m]=(0,a.useState)(1),y=(0,a.useRef)(null),b=null!==(e=o[u])&&void 0!==e?e:null,g=(0,a.useCallback)(()=>{c(t=>{let e=t+1;if(e>=o.length)return d(!1),t;let s=Math.min((o[e].timestamp-o[t].timestamp)/h,2e3);return y.current=setTimeout(()=>g(),s),e})},[o,h]);return(0,a.useEffect)(()=>(l?g():y.current&&clearTimeout(y.current),()=>{y.current&&clearTimeout(y.current)}),[l,g]),(0,i.jsxs)("div",{className:"flex flex-col h-full",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2 p-4 border-b border-border",children:[(0,i.jsx)("button",{onClick:n,className:"p-1 rounded hover:bg-accent",children:(0,i.jsx)(v.Z,{className:"h-4 w-4"})}),(0,i.jsx)("h2",{className:"text-lg font-bold",children:"Replay"}),(0,i.jsx)("span",{className:"text-xs text-muted-foreground font-mono",children:r}),(0,i.jsxs)("span",{className:"ml-auto text-xs text-muted-foreground",children:["Event ",u+1,"/",o.length]})]}),(0,i.jsx)(p,{isPlaying:l,speed:h,onPlayPause:()=>d(t=>!t),onStepForward:()=>c(t=>Math.min(t+1,o.length-1)),onStepBack:()=>c(t=>Math.max(t-1,0)),onJumpToStart:()=>{d(!1),c(0)},onJumpToEnd:()=>{d(!1),c(o.length-1)},onSpeedChange:m}),(0,i.jsx)(x,{events:o,currentIndex:u,onSeek:t=>{d(!1),c(t)}}),(0,i.jsxs)("div",{className:"flex-1 overflow-hidden flex",children:[(0,i.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:(0,i.jsx)(f,{events:o,currentIndex:u})}),b&&(0,i.jsxs)("div",{className:"w-80 border-l border-border overflow-y-auto p-4",children:[(0,i.jsx)("h3",{className:"text-sm font-semibold mb-3",children:"Current Event"}),(0,i.jsxs)("div",{className:"space-y-2",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:"text-xs text-muted-foreground",children:"Kind"}),(0,i.jsx)("div",{className:"text-sm font-medium",children:b.kind})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:"text-xs text-muted-foreground",children:"Step"}),(0,i.jsx)("div",{className:"text-sm font-mono text-xs",children:b.stepId})]}),null!=b.data.model&&(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:"text-xs text-muted-foreground",children:"Model"}),(0,i.jsx)("div",{className:"text-sm",children:b.data.model})]}),null!=b.data.prompt&&(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:"text-xs text-muted-foreground",children:"Prompt"}),(0,i.jsx)("pre",{className:"text-xs bg-secondary p-2 rounded mt-1 max-h-32 overflow-y-auto whitespace-pre-wrap",children:b.data.prompt})]}),null!=b.data.response&&(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:"text-xs text-muted-foreground",children:"Response"}),(0,i.jsx)("pre",{className:"text-xs bg-secondary p-2 rounded mt-1 max-h-32 overflow-y-auto whitespace-pre-wrap",children:b.data.response})]})]})]})]})]})}var b=s(57429);function g(){let t=(0,n.useRouter)(),e=(0,n.useSearchParams)().get("runId"),{data:s,isLoading:a}=(0,b.JM)(e),{data:o}=(0,b.Vc)(30,0);if(!e){let t=null!=o?o:[];return(0,i.jsxs)("div",{className:"h-full overflow-y-auto p-6",children:[(0,i.jsx)("h2",{className:"mb-4 text-2xl font-bold",children:"Replay"}),(0,i.jsxs)("div",{className:"divide-y divide-border border-y border-border",children:[t.map(t=>(0,i.jsxs)(r.default,{href:"/replay?runId=".concat(encodeURIComponent(t.id)),className:"flex items-center gap-4 px-2 py-3 text-sm hover:bg-accent",children:[(0,i.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs",children:t.id}),(0,i.jsx)("span",{className:"text-muted-foreground",children:t.status}),(0,i.jsx)("span",{className:"text-muted-foreground",children:new Date(t.startedAt).toLocaleString()})]},t.id)),0===t.length?(0,i.jsx)("p",{className:"py-8 text-center text-sm text-muted-foreground",children:"No runs available"}):null]})]})}if(a)return(0,i.jsx)("div",{className:"p-6 text-sm text-muted-foreground",children:"Loading replay..."});let u=(null!=s?s:[]).map(t=>{var e,s,i,r;return{id:String(null!==(e=t.id)&&void 0!==e?e:""),kind:String(null!==(s=t.kind)&&void 0!==s?s:"tool_use"),stepId:String(null!==(i=t.stepId)&&void 0!==i?i:"unknown"),timestamp:Number(null!==(r=t.timestamp)&&void 0!==r?r:0),duration:"number"==typeof t.duration?t.duration:void 0,data:t.data&&"object"==typeof t.data?t.data:{}}});return(0,i.jsx)(y,{events:u,runId:e,onBack:()=>t.push("/replay")})}},61883:function(t,e,s){"use strict";s.d(e,{Z:function(){return i}});let i=(0,s(2389).Z)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},58410:function(t,e,s){"use strict";s.d(e,{Z:function(){return i}});let i=(0,s(2389).Z)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},2966:function(t,e,s){"use strict";s.d(e,{Z:function(){return i}});let i=(0,s(2389).Z)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},64855:function(t,e,s){"use strict";s.d(e,{R:function(){return o},m:function(){return a}});var i=s(2906),r=s(5531),n=s(11135),a=class extends r.F{#t;#e;#s;#i;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||o(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#r({type:"continue"})},s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=(0,n.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#r({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#r({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});let i="pending"===this.state.status,r=!this.#i.canStart();try{if(i)e();else{this.#r({type:"pending",variables:t,isPaused:r}),this.#s.config.onMutate&&await this.#s.config.onMutate(t,this,s);let e=await this.options.onMutate?.(t,s);e!==this.state.context&&this.#r({type:"pending",context:e,variables:t,isPaused:r})}let n=await this.#i.start();return await this.#s.config.onSuccess?.(n,t,this.state.context,this,s),await this.options.onSuccess?.(n,t,this.state.context,s),await this.#s.config.onSettled?.(n,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(n,null,t,this.state.context,s),this.#r({type:"success",data:n}),n}catch(e){try{await this.#s.config.onError?.(e,t,this.state.context,this,s)}catch(t){Promise.reject(t)}try{await this.options.onError?.(e,t,this.state.context,s)}catch(t){Promise.reject(t)}try{await this.#s.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,s)}catch(t){Promise.reject(t)}try{await this.options.onSettled?.(void 0,e,t,this.state.context,s)}catch(t){Promise.reject(t)}throw this.#r({type:"error",error:e}),e}finally{this.#s.runNext(this)}}#r(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),i.Vr.batch(()=>{this.#e.forEach(e=>{e.onMutationUpdate(t)}),this.#s.notify({mutation:this,type:"updated",action:t})})}};function o(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},15969:function(t,e,s){"use strict";s.d(e,{D:function(){return l}});var i=s(7653),r=s(64855),n=s(2906),a=s(24559),o=s(50803),u=class extends a.l{#t;#n=void 0;#a;#o;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#u()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#t.defaultMutationOptions(t),(0,o.VS)(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#a,observer:this}),e?.mutationKey&&this.options.mutationKey&&(0,o.Ym)(e.mutationKey)!==(0,o.Ym)(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(t){this.#u(),this.#c(t)}getCurrentResult(){return this.#n}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#u(),this.#c()}mutate(t,e){return this.#o=e,this.#a?.removeObserver(this),this.#a=this.#t.getMutationCache().build(this.#t,this.options),this.#a.addObserver(this),this.#a.execute(t)}#u(){let t=this.#a?.state??(0,r.R)();this.#n={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#c(t){n.Vr.batch(()=>{if(this.#o&&this.hasListeners()){let e=this.#n.variables,s=this.#n.context,i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#o.onSuccess?.(t.data,e,s,i)}catch(t){Promise.reject(t)}try{this.#o.onSettled?.(t.data,null,e,s,i)}catch(t){Promise.reject(t)}}else if(t?.type==="error"){try{this.#o.onError?.(t.error,e,s,i)}catch(t){Promise.reject(t)}try{this.#o.onSettled?.(void 0,t.error,e,s,i)}catch(t){Promise.reject(t)}}}this.listeners.forEach(t=>{t(this.#n)})})}},c=s(77930);function l(t,e){let s=(0,c.NL)(e),[r]=i.useState(()=>new u(s,t));i.useEffect(()=>{r.setOptions(t)},[r,t]);let a=i.useSyncExternalStore(i.useCallback(t=>r.subscribe(n.Vr.batchCalls(t)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),l=i.useCallback((t,e)=>{r.mutate(t,e).catch(o.ZT)},[r]);if(a.error&&(0,o.L3)(r.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:l,mutateAsync:a.mutate}}}},function(t){t.O(0,[736,458,429,293,528,744],function(){return t(t.s=13002)}),_N_E=t.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[348],{64184:function(e,t,r){Promise.resolve().then(r.bind(r,50687))},38941:function(e,t,r){"use strict";r.d(t,{C:function(){return o}});var n=r(27573);r(7653);var s=r(29147);let l=(0,r(49289).j)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function o(e){let{className:t,variant:r,...o}=e;return(0,n.jsx)("div",{className:(0,s.cn)(l({variant:r}),t),...o})}},72196:function(e,t,r){"use strict";r.d(t,{Ol:function(){return a},Zb:function(){return o},aY:function(){return i},ll:function(){return d}});var n=r(27573),s=r(7653),l=r(29147);let o=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("div",{ref:t,className:(0,l.cn)("rounded-lg border border-border bg-card text-card-foreground",r),...s})});o.displayName="Card";let a=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("div",{ref:t,className:(0,l.cn)("flex flex-col space-y-1.5 p-4",r),...s})});a.displayName="CardHeader";let d=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("h3",{ref:t,className:(0,l.cn)("text-sm font-semibold leading-none tracking-tight",r),...s})});d.displayName="CardTitle";let i=s.forwardRef((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("div",{ref:t,className:(0,l.cn)("p-4 pt-0",r),...s})});i.displayName="CardContent"},50687:function(e,t,r){"use strict";r.d(t,{RunDetailRoute:function(){return y}});var n=r(27573),s=r(81695),l=r(7653),o=r(57429),a=r(3806);function d(e){let{steps:t,events:r}=e,{t:s}=(0,a.$G)();return(0,n.jsxs)("div",{className:"space-y-1",children:[(0,n.jsx)("h3",{className:"text-xs font-semibold text-muted-foreground mb-2",children:s("events.steps")}),t.map(e=>{let t=r.filter(t=>t.stepId===e),l=t.reduce((e,t)=>{var r;return e+(null!==(r=t.duration)&&void 0!==r?r:0)},0);return(0,n.jsxs)("div",{className:"text-xs py-1 px-2 rounded hover:bg-accent cursor-pointer",children:[(0,n.jsx)("div",{className:"font-medium truncate",children:e}),(0,n.jsxs)("div",{className:"text-muted-foreground",children:[t.length," ",s("events.eventCount")," \xb7 ",l,"ms"]})]},e)})]})}let i={llm_call:"text-blue-500",tool_use:"text-green-500",memory_read:"text-pink-500",memory_write:"text-pink-500",file_read:"text-gray-500",file_write:"text-yellow-500",bash_command:"text-purple-500",subagent:"text-orange-500",skill_invoke:"text-cyan-500",mcp_tool_call:"text-indigo-500",error:"text-red-500",user_input:"text-orange-500",step_start:"text-cyan-500",step_end:"text-cyan-500"},c={llm_call:"events.llmCall",tool_use:"events.toolUse",memory_read:"events.memoryRead",memory_write:"events.memoryWrite",file_read:"events.fileRead",file_write:"events.fileWrite",bash_command:"events.bashCommand",subagent:"events.subagent",skill_invoke:"events.skillInvoke",mcp_tool_call:"events.mcpToolCall",error:"events.error",user_input:"events.userInput",step_start:"events.stepStart",step_end:"events.stepEnd"};function u(e){let{events:t,onSelect:r,selectedId:s}=e,{t:l}=(0,a.$G)(),o=[...t].sort((e,t)=>e.timestamp-t.timestamp);if(0===o.length)return(0,n.jsx)("p",{className:"text-muted-foreground text-sm",children:l("events.empty")});let d="";return(0,n.jsx)("div",{className:"space-y-0",children:o.map(e=>{var t,o,a,u,m,x,p,v;let f=e.stepId!==d;d=e.stepId;let h=null!==(v=i[e.kind])&&void 0!==v?v:"text-muted-foreground",g=c[e.kind],j=g?l(g):e.kind,N=(null===(t=e.data)||void 0===t?void 0:t.toolName)||(null===(o=e.data)||void 0===o?void 0:o.filePath)||(null===(a=e.data)||void 0===a?void 0:a.model)||(null===(u=e.data)||void 0===u?void 0:u.command)||(null===(m=e.data)||void 0===m?void 0:m.memoryKey)||"";return(0,n.jsxs)("div",{children:[f&&(0,n.jsx)("div",{className:"text-xs font-semibold text-muted-foreground pt-2 pb-1 border-t border-border mt-1",children:e.stepId}),(0,n.jsxs)("div",{onClick:()=>r(e),className:"flex items-center gap-2 py-1.5 px-2 rounded cursor-pointer text-xs hover:bg-accent ".concat(s===e.id?"bg-accent":""," ").concat((null===(x=e.metadata)||void 0===x?void 0:x.blocked)?"border-l-2 border-red-500 bg-red-50 dark:bg-red-950":""),children:[(null===(p=e.metadata)||void 0===p?void 0:p.blocked)&&(0,n.jsx)("span",{className:"text-red-500 font-bold text-[10px] uppercase tracking-wider",children:"BLOCKED"}),(0,n.jsx)("span",{className:"w-16 ".concat(h," font-medium"),children:j}),(0,n.jsx)("span",{className:"text-muted-foreground truncate flex-1",children:N}),e.duration?(0,n.jsxs)("span",{className:"text-muted-foreground",children:[e.duration,"ms"]}):null]})]},e.id)})})}var m=r(72196);function x(e){let{event:t}=e,[r,s]=(0,l.useState)(!1),o=t.input?JSON.stringify(t.input,null,2):"null",a=t.output?JSON.stringify(t.output,null,2):"null";return(0,n.jsxs)("div",{className:"space-y-4 p-4",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"font-semibold text-lg",children:t.mcpToolName||t.toolName}),(0,n.jsxs)("p",{className:"text-xs text-muted-foreground",children:[t.toolType," \xb7 ",t.kind," \xb7 ",t.duration,"ms",t.blocked&&(0,n.jsx)("span",{className:"text-red-500 ml-2 font-bold",children:"BLOCKED"})]})]}),(0,n.jsx)("button",{onClick:()=>s(!r),className:"text-xs border rounded px-2 py-1 hover:bg-accent",children:r?"Formatted":"Raw JSON"})]}),t.error&&(0,n.jsx)("div",{className:"p-3 bg-red-50 dark:bg-red-950 border border-red-300 rounded text-sm text-red-700",children:t.error}),(0,n.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[(0,n.jsxs)(m.Zb,{className:"p-3",children:[(0,n.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-2 uppercase",children:"Input"}),(0,n.jsx)("pre",{className:"text-xs overflow-auto max-h-96 ".concat(r?"":"max-h-40 overflow-hidden"),children:(0,n.jsx)("code",{children:r?o:o.slice(0,500)+(o.length>500?"\n... (truncated)":"")})})]}),(0,n.jsxs)(m.Zb,{className:"p-3",children:[(0,n.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-2 uppercase",children:"Output"}),null==t.output?(0,n.jsx)("p",{className:"text-xs text-yellow-600",children:"No output captured for this event"}):(0,n.jsx)("pre",{className:"text-xs overflow-auto max-h-96 ".concat(r?"":"max-h-40 overflow-hidden"),children:(0,n.jsx)("code",{children:r?a:a.slice(0,500)+(a.length>500?"\n... (truncated)":"")})})]})]})]})}function p(e){var t,r;let{event:s}=e,{t:l}=(0,a.$G)();if(!s)return(0,n.jsx)("p",{className:"text-muted-foreground text-sm",children:l("events.selectEvent")});if("tool_use"===s.kind&&(s.toolName||s.mcpToolName))return(0,n.jsx)(x,{event:s});let o=null!==(r=s.data)&&void 0!==r?r:{};return(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsx)("h3",{className:"text-sm font-semibold",children:l("events.eventDetail")}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-muted-foreground",children:l("events.kind")}),(0,n.jsx)("div",{className:"text-sm font-medium",children:s.kind})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-muted-foreground",children:l("events.step")}),(0,n.jsx)("div",{className:"text-sm font-mono",children:s.stepId})]}),null!=s.duration&&(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-muted-foreground",children:l("events.duration")}),(0,n.jsxs)("div",{className:"text-sm",children:[s.duration,"ms"]})]}),null!=o.inputTokens&&(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-muted-foreground",children:l("events.tokens")}),(0,n.jsx)("div",{className:"text-sm",children:l("events.tokensInOut",{input:o.inputTokens,output:o.outputTokens})})]}),null!=o.prompt&&(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-muted-foreground",children:l("events.prompt")}),(0,n.jsx)("pre",{className:"text-xs bg-secondary p-2 rounded mt-1 max-h-40 overflow-y-auto whitespace-pre-wrap",children:o.prompt})]}),null!=o.response&&(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-muted-foreground",children:l("events.response")}),(0,n.jsx)("pre",{className:"text-xs bg-secondary p-2 rounded mt-1 max-h-40 overflow-y-auto whitespace-pre-wrap",children:o.response})]}),null!=o.stdout&&(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-muted-foreground",children:l("events.stdout")}),(0,n.jsx)("pre",{className:"text-xs bg-secondary p-2 rounded mt-1 max-h-40 overflow-y-auto whitespace-pre-wrap",children:o.stdout})]}),null!=o.stderr&&(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-muted-foreground",children:l("events.stderr")}),(0,n.jsx)("pre",{className:"text-xs bg-red-50 dark:bg-red-950 p-2 rounded mt-1 max-h-40 overflow-y-auto whitespace-pre-wrap",children:o.stderr})]}),null!=o.errorMessage&&(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-muted-foreground",children:l("events.error")}),(0,n.jsx)("pre",{className:"text-xs bg-red-50 dark:bg-red-950 p-2 rounded mt-1 max-h-40 overflow-y-auto whitespace-pre-wrap",children:o.errorMessage})]}),(null===(t=s.metadata)||void 0===t?void 0:t.truncated)!=null&&(0,n.jsx)("div",{className:"text-xs text-yellow-500",children:l("events.truncated")})]})]})}var v=r(38941),f=r(77329);let h=(0,r(2389).Z)("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),g={context_insufficient:[{action:"Supplement task context",priority:"high"},{action:"Inspect graph roots and related files",priority:"medium"}],knowledge_missing:[{action:"Sync the required knowledge source",priority:"high"},{action:"Add or broaden documentation scopes",priority:"medium"}],workflow_design_issue:[{action:"Correct the failing step contract",priority:"high"},{action:"Review workflow dependencies",priority:"medium"}],tool_error:[{action:"Inspect the tool error and connectivity",priority:"high"},{action:"Retry with a validated input",priority:"medium"}],agent_override:[{action:"Review the rejected change and user feedback",priority:"high"}],unknown:[{action:"Inspect the failed step evidence",priority:"high"}]};function j(e){var t;let{failureCategory:r,failureReason:s,suggestedActions:l}=e,{t:o}=(0,a.$G)();return r?(0,n.jsxs)(m.Zb,{children:[(0,n.jsxs)(m.Ol,{children:[(0,n.jsx)("div",{className:"flex items-center gap-2",children:(0,n.jsx)(v.C,{className:null!==(t=({context_insufficient:"bg-yellow-500",knowledge_missing:"bg-orange-500",workflow_design_issue:"bg-purple-500",tool_error:"bg-red-500",agent_override:"bg-gray-500",unknown:"bg-gray-500"})[r])&&void 0!==t?t:"bg-gray-500",children:o("runDetail.category.".concat(r))})}),(0,n.jsx)(m.ll,{className:"text-sm",children:o("runDetail.failureReason")})]}),(0,n.jsxs)(m.aY,{className:"space-y-4",children:[(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:s}),l&&l.length>0&&(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,n.jsx)(f.Z,{className:"h-4 w-4"}),o("runDetail.suggestedActions")]}),(0,n.jsx)("ul",{className:"space-y-1",children:l.map((e,t)=>(0,n.jsxs)("li",{className:"flex items-center gap-2 text-sm",children:[(0,n.jsx)(h,{className:"h-3 w-3 text-muted-foreground"}),(0,n.jsx)("span",{children:e.action}),(0,n.jsx)(v.C,{variant:"outline",className:"text-xs",children:e.priority})]},t))})]})]})]}):null}var N=r(61883);function b(e){var t,r;let{runId:i,onBack:c}=e,m=(0,s.useRouter)(),{t:x}=(0,a.$G)(),{data:v}=(0,o.rC)(i),{data:f}=(0,o.kP)(i),[h,b]=(0,l.useState)(null),y=(null!=v?v:[]).map(e=>{var t,r,n,s,l,o,a;let d=null!==(r=null!==(t=e.eventId)&&void 0!==t?t:e.id)&&void 0!==r?r:"",i=(null!==(n=e.kind)&&void 0!==n?n:e.toolType)||"tool_use",c={toolName:null!==(s=e.toolName)&&void 0!==s?s:e.mcpToolName,...null!==(l=e.input)&&void 0!==l?l:{}};return{id:d,stepId:null!==(o=e.executionId)&&void 0!==o?o:d,kind:i,timestamp:null!==(a=e.timestamp)&&void 0!==a?a:0,duration:e.duration,data:c,metadata:{isMcpTool:e.isMcpTool,mcpEnforced:e.mcpEnforced,mcpFallback:e.mcpFallback,blocked:e.blocked,blockReason:e.blockReason}}}),w=[...new Set(y.map(e=>e.stepId))],k=null!=f?f:{},_=[...null!=v?v:[]].reverse().find(e=>"string"==typeof e.failureCategory),C=null==_?void 0:_.failureCategory;return(0,n.jsxs)("div",{className:"flex flex-col h-full",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 p-4 border-b border-border",children:[(0,n.jsx)("button",{onClick:null!=c?c:()=>m.push("/runs"),className:"p-1 rounded hover:bg-accent",title:x("runs.title"),children:(0,n.jsx)(N.Z,{className:"h-4 w-4"})}),(0,n.jsx)("h2",{className:"text-lg font-bold",children:x("runDetail.title","Session Detail")}),(0,n.jsx)("span",{className:"text-xs text-muted-foreground font-mono",children:i}),null!=k.totalToolCalls&&(0,n.jsxs)("span",{className:"text-xs text-muted-foreground",children:[String(k.totalToolCalls)," tools \xb7 ",String(k.mcpToolCalls)," MCP"]})]}),(0,n.jsxs)("div",{className:"flex flex-1 overflow-hidden",children:[(0,n.jsx)("div",{className:"w-48 border-r border-border overflow-y-auto p-3",children:(0,n.jsx)(d,{steps:w,events:y})}),(0,n.jsx)("div",{className:"flex-1 overflow-y-auto p-3",children:(0,n.jsx)(u,{events:y,onSelect:e=>b(e),selectedId:null==h?void 0:h.id})}),(0,n.jsxs)("div",{className:"w-80 border-l border-border overflow-y-auto p-3",children:[C&&(0,n.jsx)("div",{className:"mb-3",children:(0,n.jsx)(j,{failureCategory:C,failureReason:String(null!==(t=null==_?void 0:_.error)&&void 0!==t?t:"Workflow step failed"),suggestedActions:null!==(r=g[C])&&void 0!==r?r:g.unknown})}),(0,n.jsx)(p,{event:h})]})]})]})}function y(){var e;let t=null!==(e=(0,s.usePathname)().split("/").filter(Boolean).at(-1))&&void 0!==e?e:"";return(0,n.jsx)(b,{runId:decodeURIComponent(t)})}},29147:function(e,t,r){"use strict";r.d(t,{cn:function(){return l}});var n=r(10607),s=r(25579);function l(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,s.m6)((0,n.W)(t))}},2389:function(e,t,r){"use strict";r.d(t,{Z:function(){return d}});var n=r(7653);let s=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),l=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((e,t,r)=>!!e&&r.indexOf(e)===t).join(" ")};var o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let a=(0,n.forwardRef)((e,t)=>{let{color:r="currentColor",size:s=24,strokeWidth:a=2,absoluteStrokeWidth:d,className:i="",children:c,iconNode:u,...m}=e;return(0,n.createElement)("svg",{ref:t,...o,width:s,height:s,stroke:r,strokeWidth:d?24*Number(a)/Number(s):a,className:l("lucide",i),...m},[...u.map(e=>{let[t,r]=e;return(0,n.createElement)(t,r)}),...Array.isArray(c)?c:[c]])}),d=(e,t)=>{let r=(0,n.forwardRef)((r,o)=>{let{className:d,...i}=r;return(0,n.createElement)(a,{ref:o,iconNode:t,className:l("lucide-".concat(s(e)),d),...i})});return r.displayName="".concat(e),r}},61883:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(2389).Z)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},77329:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(2389).Z)("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]])},81695:function(e,t,r){"use strict";var n=r(21219);r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},49289:function(e,t,r){"use strict";r.d(t,{j:function(){return o}});var n=r(10607);let s=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,l=n.W,o=(e,t)=>r=>{var n;if((null==t?void 0:t.variants)==null)return l(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:o,defaultVariants:a}=t,d=Object.keys(o).map(e=>{let t=null==r?void 0:r[e],n=null==a?void 0:a[e];if(null===t)return null;let l=s(t)||s(n);return o[e][l]}),i=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{});return l(e,d,null==t?void 0:null===(n=t.compoundVariants)||void 0===n?void 0:n.reduce((e,t)=>{let{class:r,className:n,...s}=t;return Object.entries(s).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...a,...i}[t]):({...a,...i})[t]===r})?[...e,r,n]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}}},function(e){e.O(0,[736,806,697,429,293,528,744],function(){return e(e.s=64184)}),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[611],{73993:function(t,e,s){Promise.resolve().then(s.bind(s,10821))},10821:function(t,e,s){"use strict";s.d(e,{RunsView:function(){return o}});var i=s(27573),n=s(57429),r=s(3806);let a={active:"text-yellow-500",closed:"text-green-500"};function o(){let{t}=(0,r.$G)(),{data:e}=(0,n.dL)(50,0),s=null!=e?e:[];return(0,i.jsxs)("div",{className:"p-6 space-y-4",children:[(0,i.jsx)("h2",{className:"text-2xl font-bold",children:t("runs.title")}),0===s.length?(0,i.jsx)("p",{className:"text-muted-foreground",children:t("runs.empty")}):(0,i.jsx)("div",{className:"space-y-2",children:s.map(t=>{var e;return(0,i.jsxs)("a",{href:"/runs/".concat(encodeURIComponent(t.id)),className:"flex items-center gap-4 p-3 rounded bg-secondary hover:bg-accent cursor-pointer",children:[(0,i.jsx)("span",{className:"font-mono text-xs truncate max-w-[200px]",children:t.label||t.id}),(0,i.jsx)("span",{className:"px-1.5 py-0.5 rounded text-xs ".concat(null!==(e=a[t.status])&&void 0!==e?e:"text-muted-foreground"),children:t.status}),(0,i.jsxs)("span",{className:"text-xs text-muted-foreground",children:[t.totalToolCalls," tools (",t.mcpToolCalls," MCP)"]}),(0,i.jsx)("span",{className:"text-xs text-muted-foreground",children:t.durationMs>0?"".concat((t.durationMs/1e3).toFixed(1),"s"):"--"}),(0,i.jsx)("span",{className:"ml-auto text-xs text-muted-foreground",children:new Date(t.startedAt).toLocaleString()})]},t.id)})})]})}},64855:function(t,e,s){"use strict";s.d(e,{R:function(){return o},m:function(){return a}});var i=s(2906),n=s(5531),r=s(11135),a=class extends n.F{#t;#e;#s;#i;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||o(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#n({type:"continue"})},s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=(0,r.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#n({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#n({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});let i="pending"===this.state.status,n=!this.#i.canStart();try{if(i)e();else{this.#n({type:"pending",variables:t,isPaused:n}),this.#s.config.onMutate&&await this.#s.config.onMutate(t,this,s);let e=await this.options.onMutate?.(t,s);e!==this.state.context&&this.#n({type:"pending",context:e,variables:t,isPaused:n})}let r=await this.#i.start();return await this.#s.config.onSuccess?.(r,t,this.state.context,this,s),await this.options.onSuccess?.(r,t,this.state.context,s),await this.#s.config.onSettled?.(r,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(r,null,t,this.state.context,s),this.#n({type:"success",data:r}),r}catch(e){try{await this.#s.config.onError?.(e,t,this.state.context,this,s)}catch(t){Promise.reject(t)}try{await this.options.onError?.(e,t,this.state.context,s)}catch(t){Promise.reject(t)}try{await this.#s.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,s)}catch(t){Promise.reject(t)}try{await this.options.onSettled?.(void 0,e,t,this.state.context,s)}catch(t){Promise.reject(t)}throw this.#n({type:"error",error:e}),e}finally{this.#s.runNext(this)}}#n(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),i.Vr.batch(()=>{this.#e.forEach(e=>{e.onMutationUpdate(t)}),this.#s.notify({mutation:this,type:"updated",action:t})})}};function o(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},15969:function(t,e,s){"use strict";s.d(e,{D:function(){return h}});var i=s(7653),n=s(64855),r=s(2906),a=s(24559),o=s(50803),u=class extends a.l{#t;#r=void 0;#a;#o;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#u()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#t.defaultMutationOptions(t),(0,o.VS)(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#a,observer:this}),e?.mutationKey&&this.options.mutationKey&&(0,o.Ym)(e.mutationKey)!==(0,o.Ym)(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(t){this.#u(),this.#c(t)}getCurrentResult(){return this.#r}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#u(),this.#c()}mutate(t,e){return this.#o=e,this.#a?.removeObserver(this),this.#a=this.#t.getMutationCache().build(this.#t,this.options),this.#a.addObserver(this),this.#a.execute(t)}#u(){let t=this.#a?.state??(0,n.R)();this.#r={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#c(t){r.Vr.batch(()=>{if(this.#o&&this.hasListeners()){let e=this.#r.variables,s=this.#r.context,i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#o.onSuccess?.(t.data,e,s,i)}catch(t){Promise.reject(t)}try{this.#o.onSettled?.(t.data,null,e,s,i)}catch(t){Promise.reject(t)}}else if(t?.type==="error"){try{this.#o.onError?.(t.error,e,s,i)}catch(t){Promise.reject(t)}try{this.#o.onSettled?.(void 0,t.error,e,s,i)}catch(t){Promise.reject(t)}}}this.listeners.forEach(t=>{t(this.#r)})})}},c=s(77930);function h(t,e){let s=(0,c.NL)(e),[n]=i.useState(()=>new u(s,t));i.useEffect(()=>{n.setOptions(t)},[n,t]);let a=i.useSyncExternalStore(i.useCallback(t=>n.subscribe(r.Vr.batchCalls(t)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),h=i.useCallback((t,e)=>{n.mutate(t,e).catch(o.ZT)},[n]);if(a.error&&(0,o.L3)(n.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:h,mutateAsync:a.mutate}}}},function(t){t.O(0,[736,806,429,293,528,744],function(){return t(t.s=73993)}),_N_E=t.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[938],{73449:function(e,t,s){Promise.resolve().then(s.bind(s,19830))},38941:function(e,t,s){"use strict";s.d(t,{C:function(){return r}});var n=s(27573);s(7653);var a=s(29147);let l=(0,s(49289).j)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function r(e){let{className:t,variant:s,...r}=e;return(0,n.jsx)("div",{className:(0,a.cn)(l({variant:s}),t),...r})}},50466:function(e,t,s){"use strict";s.d(t,{z:function(){return i}});var n=s(27573),a=s(7653),l=s(29147);let r=(0,s(49289).j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),i=a.forwardRef((e,t)=>{let{className:s,variant:a,size:i,...d}=e;return(0,n.jsx)("button",{className:(0,l.cn)(r({variant:a,size:i,className:s})),ref:t,...d})});i.displayName="Button"},72196:function(e,t,s){"use strict";s.d(t,{Ol:function(){return i},Zb:function(){return r},aY:function(){return c},ll:function(){return d}});var n=s(27573),a=s(7653),l=s(29147);let r=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)("div",{ref:t,className:(0,l.cn)("rounded-lg border border-border bg-card text-card-foreground",s),...a})});r.displayName="Card";let i=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)("div",{ref:t,className:(0,l.cn)("flex flex-col space-y-1.5 p-4",s),...a})});i.displayName="CardHeader";let d=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)("h3",{ref:t,className:(0,l.cn)("text-sm font-semibold leading-none tracking-tight",s),...a})});d.displayName="CardTitle";let c=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)("div",{ref:t,className:(0,l.cn)("p-4 pt-0",s),...a})});c.displayName="CardContent"},29324:function(e,t,s){"use strict";s.d(t,{$N:function(){return o},Vq:function(){return l},cZ:function(){return d},fK:function(){return c}});var n=s(27573);s(7653);var a=s(57431);let l=a.fC;a.xz;let r=a.h_;function i(e){let{className:t,...s}=e;return(0,n.jsx)(a.aV,{className:"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 ".concat(null!=t?t:""),...s})}function d(e){let{className:t,children:s,...l}=e;return(0,n.jsxs)(r,{children:[(0,n.jsx)(i,{}),(0,n.jsx)(a.VY,{className:"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg ".concat(null!=t?t:""),...l,children:s})]})}function c(e){let{className:t,...s}=e;return(0,n.jsx)("div",{className:"flex flex-col space-y-1.5 text-center sm:text-left ".concat(null!=t?t:""),...s})}function o(e){let{className:t,...s}=e;return(0,n.jsx)(a.Dx,{className:"text-lg font-semibold leading-none tracking-tight ".concat(null!=t?t:""),...s})}a.x8},39134:function(e,t,s){"use strict";s.d(t,{I:function(){return r}});var n=s(27573),a=s(7653),l=s(29147);let r=a.forwardRef((e,t)=>{let{className:s,type:a,...r}=e;return(0,n.jsx)("input",{type:a,className:(0,l.cn)("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:t,...r})});r.displayName="Input"},12862:function(e,t,s){"use strict";s.d(t,{SP:function(){return c},dr:function(){return d},mQ:function(){return i},nU:function(){return o}});var n=s(27573),a=s(7653),l=s(4343),r=s(29147);let i=l.fC,d=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(l.aV,{ref:t,className:(0,r.cn)("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",s),...a})});d.displayName=l.aV.displayName;let c=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(l.xz,{ref:t,className:(0,r.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",s),...a})});c.displayName=l.xz.displayName;let o=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(l.VY,{ref:t,className:(0,r.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s),...a})});o.displayName=l.VY.displayName},4509:function(e,t,s){"use strict";s.d(t,{q:function(){return d}});var n=s(27573),a=s(72196),l=s(38941),r=s(3806),i=s(57429);function d(){let{t:e}=(0,r.$G)(),t=localStorage.getItem("devflow-active-project-root")||void 0,{data:s=[],isLoading:d,error:c}=(0,i.Vw)(t);if(d)return(0,n.jsx)("div",{children:e("benchmark.loading")});if(c)return(0,n.jsxs)(a.Zb,{children:[(0,n.jsx)(a.Ol,{children:(0,n.jsx)(a.ll,{children:e("benchmark.pluginAnalysis")})}),(0,n.jsx)(a.aY,{children:(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:e("benchmark.loadFailed",{error:String(c)})})})]});let o=s.filter(e=>"install"===e.recommendation),u=s.filter(e=>"remove"===e.recommendation);return(0,n.jsxs)(a.Zb,{children:[(0,n.jsx)(a.Ol,{children:(0,n.jsx)(a.ll,{children:e("benchmark.pluginAnalysis")})}),(0,n.jsxs)(a.aY,{className:"space-y-6",children:[o.length>0&&(0,n.jsxs)("div",{children:[(0,n.jsx)("h4",{className:"font-semibold mb-2 text-green-600",children:e("benchmark.recommendedInstall")}),(0,n.jsx)("div",{className:"space-y-2",children:o.map(t=>{var s,a,r;return(0,n.jsxs)("div",{className:"border rounded p-3 space-y-2",children:[(0,n.jsxs)("div",{className:"flex justify-between items-center",children:[(0,n.jsx)("span",{className:"font-medium",children:t.name}),(0,n.jsx)(l.C,{variant:"default",children:e("benchmark.recommended")})]}),(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[(0,n.jsxs)("div",{children:[e("benchmark.installCount"),": ",t.installCount]}),(0,n.jsxs)("div",{children:[e("benchmark.usageRate"),": ",((null!==(s=null==t?void 0:t.activeRate)&&void 0!==s?s:0)*100).toFixed(0),"%"]}),(0,n.jsxs)("div",{children:[e("benchmark.successRateShort"),": ",((null!==(a=null==t?void 0:t.successRate)&&void 0!==a?a:0)*100).toFixed(0),"%"]}),(0,n.jsxs)("div",{children:[e("benchmark.tokenImpact"),": ",(null!==(r=null==t?void 0:t.avgTokenImpact)&&void 0!==r?r:0).toFixed(0)]})]}),t.lastUsedAt&&(0,n.jsxs)("p",{className:"text-xs text-muted-foreground",children:[e("benchmark.lastUsed"),": ",new Date(t.lastUsedAt).toLocaleDateString()]})]},t.name)})})]}),u.length>0&&(0,n.jsxs)("div",{children:[(0,n.jsx)("h4",{className:"font-semibold mb-2 text-red-600",children:e("benchmark.suggestedRemove")}),(0,n.jsx)("div",{className:"space-y-2",children:u.map(t=>{var s,a;return(0,n.jsxs)("div",{className:"border rounded p-3 space-y-2",children:[(0,n.jsxs)("div",{className:"flex justify-between items-center",children:[(0,n.jsx)("span",{className:"font-medium",children:t.name}),(0,n.jsx)(l.C,{variant:"destructive",children:e("benchmark.lowEfficiency")})]}),(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[(0,n.jsxs)("div",{children:[e("benchmark.installCount"),": ",t.installCount]}),(0,n.jsxs)("div",{children:[e("benchmark.usageRate"),": ",((null!==(s=null==t?void 0:t.activeRate)&&void 0!==s?s:0)*100).toFixed(0),"%"]}),(0,n.jsxs)("div",{children:[e("benchmark.successRateShort"),": ",((null!==(a=null==t?void 0:t.successRate)&&void 0!==a?a:0)*100).toFixed(0),"%"]})]})]},t.name)})})]}),0===s.length&&(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:e("benchmark.noPluginData")})]})]})}},19830:function(e,t,s){"use strict";s.d(t,{SettingsView:function(){return z}});var n=s(27573),a=s(57429),l=s(72196),r=s(50466),i=s(4509),d=s(3806),c=s(7653),o=s(2389);let u=(0,o.Z)("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),m=(0,o.Z)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);var x=s(6315),f=s(10997);let h=(0,o.Z)("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]),g=(0,o.Z)("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);var p=s(38941),v=s(29324),j=s(39134),b=s(12862);let N=["Constitutional","Skill Routing","Context Intercept","Correct"],y=/^(?:C\d{3}|S\d{3}|I\d{3}|R\d{3})$/,w={id:"CUSTOM001",name:"Custom rule",gate:1,level:"project",condition:{tools:["*"]},action:"warn",message:"Review this operation before continuing.",enabled:!0};function k(){var e;let{data:t=[],isLoading:s}=(0,a.rw)(),{data:l}=(0,a.xT)(),i=(0,a.iP)(),d=(0,a.OV)(),[o,g]=(0,c.useState)(null),v=(0,c.useMemo)(()=>[1,2,3,4].map(e=>({gate:e,rules:t.filter(t=>t.gate===e)})),[t]),j=t.filter(e=>e.enabled).length;return(0,n.jsxs)("section",{className:"border-y border-border py-5",children:[(0,n.jsxs)("div",{className:"mb-4 flex flex-wrap items-start justify-between gap-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(u,{className:"h-4 w-4 text-emerald-600"}),(0,n.jsx)("h3",{className:"text-sm font-semibold",children:"Enforcer governance"})]}),(0,n.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:[j," of ",t.length," rules active across 4 gates"]})]}),(0,n.jsxs)(r.z,{size:"sm",onClick:()=>g({rule:{...w},create:!0}),children:[(0,n.jsx)(m,{className:"mr-1.5 h-3.5 w-3.5"}),"Add rule"]})]}),(0,n.jsxs)(b.mQ,{defaultValue:"rules",children:[(0,n.jsxs)(b.dr,{children:[(0,n.jsx)(b.SP,{value:"rules",children:"Rules"}),(0,n.jsxs)(b.SP,{value:"audit",children:["Audit chain",(0,n.jsx)("span",{className:"ml-1.5 text-[10px] text-muted-foreground",children:null!==(e=null==l?void 0:l.total)&&void 0!==e?e:0})]})]}),(0,n.jsxs)(b.nU,{value:"rules",className:"mt-3 space-y-5",children:[s?(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading rules..."}):null,v.map(e=>(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"mb-1.5 flex items-center gap-2 text-xs font-medium uppercase text-muted-foreground",children:[(0,n.jsx)("span",{className:"flex h-5 w-5 items-center justify-center rounded bg-muted text-[10px] text-foreground",children:e.gate}),N[e.gate-1],(0,n.jsxs)("span",{className:"font-normal normal-case",children:[e.rules.length," rules"]})]}),(0,n.jsxs)("div",{className:"divide-y rounded-md border bg-background",children:[e.rules.map(e=>(0,n.jsxs)("div",{className:"grid min-h-14 grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-3 px-3 py-2",children:[(0,n.jsx)("input",{type:"checkbox",checked:e.enabled,"aria-label":"".concat(e.enabled?"Disable":"Enable"," ").concat(e.name),className:"h-4 w-4 accent-emerald-600",disabled:i.isPending,onChange:()=>i.mutate({rule:{...e,enabled:!e.enabled},create:!1})}),(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:e.id}),(0,n.jsx)("span",{className:"truncate text-sm font-medium",children:e.name}),(0,n.jsx)(p.C,{variant:"deny"===e.action?"destructive":"outline",className:"px-1.5 py-0 text-[10px]",children:e.action})]}),(0,n.jsx)("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:e.message})]}),(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)(r.z,{variant:"ghost",size:"icon",className:"h-8 w-8",title:"Edit rule",onClick:()=>g({rule:e,create:!1}),children:(0,n.jsx)(x.Z,{className:"h-3.5 w-3.5"})}),(0,n.jsx)(r.z,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive",title:y.test(e.id)?"Canonical rules cannot be deleted":"Delete rule",disabled:d.isPending||y.test(e.id),"aria-label":y.test(e.id)?"Canonical rules cannot be deleted":"Delete ".concat(e.name),onClick:()=>d.mutate(e.id),children:(0,n.jsx)(f.Z,{className:"h-3.5 w-3.5"})})]})]},e.id)),0===e.rules.length?(0,n.jsx)("p",{className:"px-3 py-4 text-xs text-muted-foreground",children:"No rules configured for this gate."}):null]})]},e.gate))]}),(0,n.jsx)(b.nU,{value:"audit",className:"mt-3",children:(0,n.jsxs)("div",{className:"max-h-[420px] overflow-auto rounded-md border",children:[(0,n.jsxs)("table",{className:"w-full min-w-[760px] text-left text-xs",children:[(0,n.jsx)("thead",{className:"sticky top-0 bg-muted/95 text-muted-foreground backdrop-blur",children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{className:"px-3 py-2 font-medium",children:"Seq"}),(0,n.jsx)("th",{className:"px-3 py-2 font-medium",children:"Time"}),(0,n.jsx)("th",{className:"px-3 py-2 font-medium",children:"Tool"}),(0,n.jsx)("th",{className:"px-3 py-2 font-medium",children:"Decision"}),(0,n.jsx)("th",{className:"px-3 py-2 font-medium",children:"Rule"}),(0,n.jsx)("th",{className:"px-3 py-2 font-medium",children:"Session"})]})}),(0,n.jsx)("tbody",{className:"divide-y",children:null==l?void 0:l.items.map(e=>{var t;return(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{className:"px-3 py-2 font-mono text-muted-foreground",children:e.seq}),(0,n.jsx)("td",{className:"whitespace-nowrap px-3 py-2",children:new Date(e.ts).toLocaleString()}),(0,n.jsx)("td",{className:"max-w-56 truncate px-3 py-2 font-mono",children:e.tool}),(0,n.jsx)("td",{className:"px-3 py-2",children:(0,n.jsx)(C,{decision:e.decision})}),(0,n.jsx)("td",{className:"px-3 py-2 font-mono",children:null!==(t=e.ruleId)&&void 0!==t?t:"-"}),(0,n.jsx)("td",{className:"max-w-44 truncate px-3 py-2 font-mono text-muted-foreground",children:e.sessionId})]},e.seq)})})]}),(null==l?void 0:l.items.length)?null:(0,n.jsxs)("div",{className:"flex items-center justify-center gap-2 py-10 text-sm text-muted-foreground",children:[(0,n.jsx)(h,{className:"h-4 w-4"}),"No enforcement decisions recorded yet."]})]})})]}),o?(0,n.jsx)(S,{editing:o,pending:i.isPending,onClose:()=>g(null),onSave:(e,t)=>i.mutate({rule:e,create:t},{onSuccess:()=>g(null)})},"".concat(o.create?"new":"edit",":").concat(o.rule.id)):null]})}function C(e){let{decision:t}=e,s="allow"===t?"text-emerald-600":"deny"===t?"text-destructive":"text-amber-600";return(0,n.jsx)("span",{className:"font-medium ".concat(s),children:t})}function S(e){let{editing:t,pending:s,onClose:a,onSave:l}=e,[i,d]=(0,c.useState)(()=>({...t.rule})),[o,u]=(0,c.useState)(()=>JSON.stringify(t.rule.condition,null,2)),[m,x]=(0,c.useState)("");return(0,n.jsx)(v.Vq,{open:!0,onOpenChange:e=>{e||a()},children:(0,n.jsxs)(v.cZ,{className:"max-w-xl",children:[(0,n.jsx)(v.fK,{children:(0,n.jsx)(v.$N,{children:t.create?"Add governance rule":"Edit ".concat(i.id)})}),(0,n.jsxs)("div",{className:"grid gap-3",children:[(0,n.jsxs)("div",{className:"grid grid-cols-[140px_minmax(0,1fr)] gap-3",children:[(0,n.jsxs)("label",{className:"text-xs font-medium",children:["Rule ID",(0,n.jsx)(j.I,{className:"mt-1 font-mono",value:i.id,disabled:!t.create,onChange:e=>d({...i,id:e.target.value})})]}),(0,n.jsxs)("label",{className:"text-xs font-medium",children:["Name",(0,n.jsx)(j.I,{className:"mt-1",value:i.name,onChange:e=>d({...i,name:e.target.value})})]})]}),(0,n.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[(0,n.jsx)(R,{label:"Gate",value:String(i.gate),options:["1","2","3","4"],onChange:e=>d({...i,gate:Number(e)})}),(0,n.jsx)(R,{label:"Level",value:i.level,options:["constitutional","project","session"],onChange:e=>d({...i,level:e})}),(0,n.jsx)(R,{label:"Action",value:i.action,options:["warn","deny","allow"],onChange:e=>d({...i,action:e})})]}),(0,n.jsxs)("label",{className:"text-xs font-medium",children:["Message",(0,n.jsx)(j.I,{className:"mt-1",value:i.message,onChange:e=>d({...i,message:e.target.value})})]}),(0,n.jsxs)("label",{className:"text-xs font-medium",children:["Condition JSON",(0,n.jsx)("textarea",{className:"mt-1 min-h-36 w-full resize-y rounded-md border border-input bg-background px-3 py-2 font-mono text-xs focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",value:o,onChange:e=>u(e.target.value)})]}),m?(0,n.jsx)("p",{className:"text-xs text-destructive",children:m}):null,(0,n.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,n.jsx)(r.z,{variant:"outline",onClick:a,children:"Cancel"}),(0,n.jsxs)(r.z,{onClick:()=>{try{let e=JSON.parse(o);x(""),l({...i,condition:e},t.create)}catch(e){x("Condition must be valid JSON.")}},disabled:s,children:[(0,n.jsx)(g,{className:"mr-1.5 h-3.5 w-3.5"}),"Save"]})]})]})]})})}function R(e){let{label:t,value:s,options:a,onChange:l}=e;return(0,n.jsxs)("label",{className:"text-xs font-medium",children:[t,(0,n.jsx)("select",{className:"mt-1 h-9 w-full rounded-md border border-input bg-background px-2 text-sm",value:s,onChange:e=>l(e.target.value),children:a.map(e=>(0,n.jsx)("option",{children:e},e))})]})}function z(){var e,t,s,c,o;let{t:u}=(0,d.$G)(),{data:m}=(0,a._m)(),{data:x}=(0,a.bz)(),f=(0,a.Hx)();return(0,n.jsxs)("div",{className:"p-6 space-y-4 h-full overflow-y-auto",children:[(0,n.jsx)("h2",{className:"text-2xl font-bold",children:u("settings.title","Project Settings")}),(0,n.jsxs)(l.Zb,{children:[(0,n.jsx)(l.Ol,{children:(0,n.jsx)(l.ll,{className:"text-sm",children:u("settings.projectInfo","Project Info")})}),(0,n.jsxs)(l.aY,{className:"space-y-2 text-sm",children:[(0,n.jsxs)("div",{className:"flex justify-between",children:[(0,n.jsxs)("span",{className:"text-muted-foreground",children:[u("settings.name","Name"),":"]}),(0,n.jsx)("span",{children:"devflow"})]}),(0,n.jsxs)("div",{className:"flex justify-between",children:[(0,n.jsxs)("span",{className:"text-muted-foreground",children:[u("settings.mode","Mode"),":"]}),(0,n.jsx)("span",{children:"monorepo"})]})]})]}),(0,n.jsxs)(l.Zb,{children:[(0,n.jsx)(l.Ol,{children:(0,n.jsxs)(l.ll,{className:"text-sm",children:[u("settings.plugins","Plugins")," (",null!==(s=null==m?void 0:m.length)&&void 0!==s?s:0," installed)"]})}),(0,n.jsx)(l.aY,{className:"space-y-2",children:m&&m.length>0?m.map(e=>(0,n.jsxs)("div",{className:"flex justify-between items-center text-sm p-2 border rounded",children:[(0,n.jsx)("span",{className:"font-medium",children:e.name}),(0,n.jsxs)("span",{className:"text-muted-foreground",children:["@",e.version]})]},e.name)):(0,n.jsx)("div",{className:"text-sm text-muted-foreground",children:u("settings.noPlugins","No plugins installed")})})]}),(0,n.jsx)(i.q,{}),(0,n.jsx)(k,{}),(0,n.jsxs)(l.Zb,{children:[(0,n.jsx)(l.Ol,{children:(0,n.jsx)(l.ll,{className:"text-sm",children:u("settings.telemetry","Telemetry")})}),(0,n.jsxs)(l.aY,{className:"space-y-2 text-sm",children:[(0,n.jsxs)("div",{className:"flex justify-between",children:[(0,n.jsxs)("span",{className:"text-muted-foreground",children:[u("settings.totalRuns","Runs stored"),":"]}),(0,n.jsx)("span",{children:null!==(c=null==x?void 0:null===(e=x.summary)||void 0===e?void 0:e.totalRuns)&&void 0!==c?c:0})]}),(0,n.jsxs)("div",{className:"flex justify-between",children:[(0,n.jsxs)("span",{className:"text-muted-foreground",children:[u("settings.totalTokens","Total tokens"),":"]}),(0,n.jsx)("span",{children:(null!==(o=null==x?void 0:null===(t=x.summary)||void 0===t?void 0:t.totalTokens)&&void 0!==o?o:0).toLocaleString()})]}),(0,n.jsx)(r.z,{variant:"outline",size:"sm",onClick:()=>f.mutate(30),disabled:f.isPending,children:u("settings.clearOldRuns","Clear old runs (30d+)")})]})]})]})}},29147:function(e,t,s){"use strict";s.d(t,{cn:function(){return l}});var n=s(10607),a=s(25579);function l(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return(0,a.m6)((0,n.W)(t))}}},function(e){e.O(0,[736,806,697,402,568,343,429,293,528,744],function(){return e(e.s=73449)}),_N_E=e.O()}]);