chorus-codes 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +2 -2
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/api/daemon/[...path]/route.js +1 -1
- package/.next/server/app/connect/page_client-reference-manifest.js +1 -1
- package/.next/server/app/demo/[scenario]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/new/page_client-reference-manifest.js +1 -1
- package/.next/server/app/new.html +1 -1
- package/.next/server/app/new.rsc +2 -2
- package/.next/server/app/new.segments/_full.segment.rsc +2 -2
- package/.next/server/app/new.segments/_head.segment.rsc +1 -1
- package/.next/server/app/new.segments/_index.segment.rsc +1 -1
- package/.next/server/app/new.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/new.segments/new/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/new.segments/new.segment.rsc +1 -1
- package/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/.next/server/app/onboarding.html +1 -1
- package/.next/server/app/onboarding.rsc +2 -2
- package/.next/server/app/onboarding.segments/_full.segment.rsc +2 -2
- package/.next/server/app/onboarding.segments/_head.segment.rsc +1 -1
- package/.next/server/app/onboarding.segments/_index.segment.rsc +1 -1
- package/.next/server/app/onboarding.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/onboarding.segments/onboarding.segment.rsc +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/personas/page_client-reference-manifest.js +1 -1
- package/.next/server/app/personas.html +1 -1
- package/.next/server/app/personas.rsc +2 -2
- package/.next/server/app/personas.segments/_full.segment.rsc +2 -2
- package/.next/server/app/personas.segments/_head.segment.rsc +1 -1
- package/.next/server/app/personas.segments/_index.segment.rsc +1 -1
- package/.next/server/app/personas.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/personas.segments/personas/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/personas.segments/personas.segment.rsc +1 -1
- package/.next/server/app/runs/[runId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/runs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/permissions/page.js +2 -2
- package/.next/server/app/settings/permissions/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings.html +1 -1
- package/.next/server/app/settings.rsc +2 -2
- package/.next/server/app/settings.segments/_full.segment.rsc +2 -2
- package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings.segments/_index.segment.rsc +1 -1
- package/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
- package/.next/server/app/templates/page_client-reference-manifest.js +1 -1
- package/.next/server/app/templates.html +1 -1
- package/.next/server/app/templates.rsc +2 -2
- package/.next/server/app/templates.segments/_full.segment.rsc +2 -2
- package/.next/server/app/templates.segments/_head.segment.rsc +1 -1
- package/.next/server/app/templates.segments/_index.segment.rsc +1 -1
- package/.next/server/app/templates.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/templates.segments/templates/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/templates.segments/templates.segment.rsc +1 -1
- package/.next/server/app-paths-manifest.json +2 -2
- package/.next/server/chunks/681.js +1 -1
- package/.next/server/chunks/946.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/344-57b337448af965da.js +1 -0
- package/.next/static/chunks/641-4abd5806359740da.js +1 -0
- package/.next/static/chunks/app/connect/{page-c09d9fb410c468b7.js → page-052be1ded639feb8.js} +1 -1
- package/.next/static/chunks/app/demo/[scenario]/{page-a84f68aa9f4b9ab8.js → page-1e694db85f44db1d.js} +1 -1
- package/.next/static/chunks/app/new/{page-e4923b87c7a7b6ae.js → page-e84d8e7864dd8059.js} +1 -1
- package/.next/static/chunks/app/onboarding/page-8794913af4e5d34c.js +1 -0
- package/.next/static/chunks/app/{page-3c0d23c063b036eb.js → page-f18ee044fb5c3f79.js} +1 -1
- package/.next/static/chunks/app/personas/{page-a130cd11d8cbd832.js → page-c1a7624aea8c6ae2.js} +1 -1
- package/.next/static/chunks/app/runs/[runId]/{page-642397282cb68c60.js → page-9ce1e87a5e513d8b.js} +1 -1
- package/.next/static/chunks/app/runs/{page-503439d57f433574.js → page-a91204fa64867e92.js} +1 -1
- package/.next/static/chunks/app/settings/{page-64d7d48d2413a18b.js → page-69e9f3ca7747b72c.js} +1 -1
- package/.next/static/chunks/app/settings/permissions/{page-18bf0e6d84be8fad.js → page-1004af2ee3990f03.js} +1 -1
- package/.next/static/chunks/app/templates/{page-db5165c6311bf6e1.js → page-9d588b21525591e0.js} +1 -1
- package/.next/trace +20 -20
- package/.next/trace-build +1 -1
- package/package.json +1 -1
- package/.next/static/chunks/344-1f06059a92faa936.js +0 -1
- package/.next/static/chunks/app/onboarding/page-4c87427335371aaa.js +0 -1
- /package/.next/static/{i0LC5zObFeek7b2zwUxsX → A3ZHccVNfkAxLKMnAnJ6g}/_buildManifest.js +0 -0
- /package/.next/static/{i0LC5zObFeek7b2zwUxsX → A3ZHccVNfkAxLKMnAnJ6g}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en" class="dark __variable_188709 __variable_9a8899 h-full antialiased"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/4cf2300e9c8272f7-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/93f479601ee12b01-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/a552ff3997000a18.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-87142ab87b87c8fb.js"/><script src="/_next/static/chunks/ed64ccb0-b7d2b5246d18ca7e.js" async=""></script><script src="/_next/static/chunks/128-a5d059bf5b2e5090.js" async=""></script><script src="/_next/static/chunks/main-app-e9f7985e32dc8a63.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>Chorus — many voices, one chorus</title><meta name="description" content="The polished orchestrator over your AI fleet. Paste a task. Pick a template. Watch multiple LLMs reach consensus."/><link rel="icon" href="/favicon.ico?b67a357858af4169" type="image/x-icon" sizes="16x16"/><link rel="icon" href="/icon.svg?79b94d624cb60ac1" type="image/svg+xml" sizes="any"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="min-h-full flex flex-col bg-background text-foreground"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-87142ab87b87c8fb.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[5484,[],\"\"]\n3:I[5482,[],\"\"]\n4:I[5017,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[5017,[],\"ViewportBoundary\"]\na:I[5017,[],\"MetadataBoundary\"]\nc:I[3720,[],\"default\",1]\n:HL[\"/_next/static/media/4cf2300e9c8272f7-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/93f479601ee12b01-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/a552ff3997000a18.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/a552ff3997000a18.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"dark __variable_188709 __variable_9a8899 h-full antialiased\",\"children\":[\"$\",\"body\",null,{\"className\":\"min-h-full flex flex-col bg-background text-foreground\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"
|
|
1
|
+
<!DOCTYPE html><html lang="en" class="dark __variable_188709 __variable_9a8899 h-full antialiased"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/4cf2300e9c8272f7-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/93f479601ee12b01-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/a552ff3997000a18.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-87142ab87b87c8fb.js"/><script src="/_next/static/chunks/ed64ccb0-b7d2b5246d18ca7e.js" async=""></script><script src="/_next/static/chunks/128-a5d059bf5b2e5090.js" async=""></script><script src="/_next/static/chunks/main-app-e9f7985e32dc8a63.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>Chorus — many voices, one chorus</title><meta name="description" content="The polished orchestrator over your AI fleet. Paste a task. Pick a template. Watch multiple LLMs reach consensus."/><link rel="icon" href="/favicon.ico?b67a357858af4169" type="image/x-icon" sizes="16x16"/><link rel="icon" href="/icon.svg?79b94d624cb60ac1" type="image/svg+xml" sizes="any"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="min-h-full flex flex-col bg-background text-foreground"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-87142ab87b87c8fb.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[5484,[],\"\"]\n3:I[5482,[],\"\"]\n4:I[5017,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[5017,[],\"ViewportBoundary\"]\na:I[5017,[],\"MetadataBoundary\"]\nc:I[3720,[],\"default\",1]\n:HL[\"/_next/static/media/4cf2300e9c8272f7-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/93f479601ee12b01-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/a552ff3997000a18.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/a552ff3997000a18.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"dark __variable_188709 __variable_9a8899 h-full antialiased\",\"children\":[\"$\",\"body\",null,{\"className\":\"min-h-full flex flex-col bg-background text-foreground\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"A3ZHccVNfkAxLKMnAnJ6g\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"e:I[3068,[],\"IconMark\"]\n6:null\nb:[[\"$\",\"title\",\"0\",{\"children\":\"Chorus — many voices, one chorus\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"The polished orchestrator over your AI fleet. Paste a task. Pick a template. Watch multiple LLMs reach consensus.\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?b67a357858af4169\",\"type\":\"image/x-icon\",\"sizes\":\"16x16\"}],[\"$\",\"link\",\"3\",{\"rel\":\"icon\",\"href\":\"/icon.svg?79b94d624cb60ac1\",\"type\":\"image/svg+xml\",\"sizes\":\"any\"}],[\"$\",\"$Le\",\"4\",{}]]\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-87142ab87b87c8fb.js"/><script src="/_next/static/chunks/ed64ccb0-b7d2b5246d18ca7e.js" async=""></script><script src="/_next/static/chunks/128-a5d059bf5b2e5090.js" async=""></script><script src="/_next/static/chunks/main-app-e9f7985e32dc8a63.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-87142ab87b87c8fb.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[5484,[],\"\"]\n3:I[5482,[],\"\"]\n4:I[5017,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[5017,[],\"ViewportBoundary\"]\na:I[5017,[],\"MetadataBoundary\"]\nc:I[3720,[],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_global-error\",{\"children\":[\"__PAGE__\",{}]}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"
|
|
1
|
+
<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-87142ab87b87c8fb.js"/><script src="/_next/static/chunks/ed64ccb0-b7d2b5246d18ca7e.js" async=""></script><script src="/_next/static/chunks/128-a5d059bf5b2e5090.js" async=""></script><script src="/_next/static/chunks/main-app-e9f7985e32dc8a63.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-87142ab87b87c8fb.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[5484,[],\"\"]\n3:I[5482,[],\"\"]\n4:I[5017,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[5017,[],\"ViewportBoundary\"]\na:I[5017,[],\"MetadataBoundary\"]\nc:I[3720,[],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_global-error\",{\"children\":[\"__PAGE__\",{}]}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"A3ZHccVNfkAxLKMnAnJ6g\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[]\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"node":{},"edge":{},"encryptionKey":"
|
|
1
|
+
{"node":{},"edge":{},"encryptionKey":"yjh0fK+OgPAlVbqVfY64f3I7u9+WtqEVyU5dSFnbTng="}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[344],{821:(e,t,r)=>{r.d(t,{AppSidebar:()=>E,P:()=>C});var n=r(9442),s=r(6074),a=r(2573),o=r.n(a),l=r(5902),i=r(4134),d=r(3838),c=r(8821),u=r(8659),h=r(6823),x=r(9036),m=r(3478),f=r(3896),p=r(9315),g=r(4284),b=r(6185),j=r(7296);let v="chorus.sidebar.collapsed";function N(e){if(!e)return!1;try{return"1"===e.getItem(v)}catch{return!1}}var y=r(7362);let w=[{href:"/",label:"Home",icon:i.A},{href:"/runs",label:"Runs",icon:d.A},{href:"/templates",label:"Templates",icon:c.A},{href:"/personas",label:"Personas",icon:u.A},{href:"/connect",label:"Connect",icon:h.A},{href:"/settings",label:"Settings",icon:x.A}],k={drafting:"bg-amber-400",reviewing:"bg-primary animate-pulse-soft",approved:"bg-emerald-400",no_review:"bg-amber-400",merged:"bg-emerald-500",blocked:"bg-amber-500 animate-pulse-soft",cancelled:"bg-muted-foreground",failed:"bg-destructive"};function C({onNavigate:e,collapsed:t=!1,onToggleCollapsed:r}){let a=(0,l.usePathname)(),[i,d]=(0,s.useState)([]),[c,u]=(0,s.useState)("loading"),[h,x]=(0,s.useState)(null);return(0,s.useEffect)(()=>{let e=!1;return fetch("/api/daemon/api/v1/health").then(e=>e.ok?e.json():null).then(t=>{if(e||!t)return;let r=t?.data?.version??t?.version;"string"==typeof r&&r.length>0&&x(r)}).catch(()=>{}),()=>{e=!0}},[]),(0,s.useEffect)(()=>{let e=!1,t=async()=>{try{let t=await (0,b.Ih)({limit:12});if(e)return;d(t),u("ready")}catch(t){if(e)return;u((t instanceof b.$v,"error"))}};t();let r=null,n=null,s=!1,a=()=>{n||(n=setInterval(t,2e3))},o=()=>{n&&(clearInterval(n),n=null)},l=()=>{if(!r)try{(r=new EventSource("/api/daemon/api/v1/chats/events")).onopen=()=>{s=!0,o()},r.onmessage=()=>{t()},r.onerror=()=>{s=!1,a()}}catch{a()}},i=()=>{r&&(r.close(),r=null,s=!1)},c=()=>{document.hidden?(i(),o()):(t(),l(),s||a())};return"u">typeof document&&!document.hidden&&(l(),a()),"u">typeof document&&document.addEventListener("visibilitychange",c),()=>{e=!0,i(),o(),"u">typeof document&&document.removeEventListener("visibilitychange",c)}},[a]),(0,n.jsxs)("div",{className:"flex h-full flex-col",children:[(0,n.jsxs)("div",{className:"flex h-14 items-center gap-2 border-b border-border px-3",children:[(0,n.jsx)("div",{className:"grid h-7 w-7 shrink-0 place-items-center rounded-md bg-primary/15 text-primary",children:(0,n.jsx)(g.U,{className:"h-[18px] w-[18px]"})}),!t&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"text-sm font-semibold tracking-tight",children:"Chorus"}),(0,n.jsx)("span",{className:"ml-auto rounded-md border border-border px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:h?`v${h.replace(/^v/,"").replace(/-dev\.\d+$/,"")}`:"—"})]}),r&&(0,n.jsx)("button",{type:"button",onClick:r,"aria-label":t?"Expand sidebar":"Collapse sidebar",className:(0,y.cn)("rounded p-1 text-muted-foreground transition hover:bg-accent hover:text-foreground",t&&"ml-auto"),children:t?(0,n.jsx)(m.A,{className:"h-3.5 w-3.5"}):(0,n.jsx)(f.A,{className:"h-3.5 w-3.5"})})]}),(0,n.jsx)("nav",{className:(0,y.cn)("py-3",t?"px-1.5":"px-2"),children:(0,n.jsx)("ul",{className:"flex flex-col gap-0.5",children:w.map(r=>{let s,l=r.icon;return(0,n.jsx)("li",{children:(0,n.jsxs)(o(),{href:r.href,onClick:e,title:t?r.label:void 0,className:(0,y.cn)("flex items-center rounded-md text-sm transition-colors",t?"justify-center px-2 py-2":"gap-2 px-2 py-1.5",("/"===(s=r.href)?"/"===a:a.startsWith(s))?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[(0,n.jsx)(l,{className:"h-4 w-4 shrink-0"}),!t&&(0,n.jsx)("span",{children:r.label})]})},r.href)})})}),t?(0,n.jsx)("div",{className:"min-h-0 flex-1"}):(0,n.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col border-t border-border",children:[(0,n.jsxs)("div",{className:"flex shrink-0 flex-col gap-2 bg-card/40 px-3 py-3",children:[(0,n.jsxs)(o(),{href:"/new",onClick:e,"aria-label":"New chat",className:"inline-flex h-8 w-full items-center justify-center gap-1.5 rounded-md bg-primary px-2.5 text-xs font-medium text-primary-foreground transition hover:bg-primary/90",children:[(0,n.jsx)(p.A,{className:"h-3.5 w-3.5"}),(0,n.jsx)("span",{children:"New chat"})]}),(0,n.jsx)("div",{className:"mt-1 px-1 text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:"Recent"})]}),(0,n.jsx)("nav",{className:"min-h-0 flex-1 overflow-y-auto px-2 py-2",children:"loading"===c?(0,n.jsx)("div",{className:"px-2 py-4 text-xs text-muted-foreground",children:"Loading…"}):"error"===c?(0,n.jsxs)("div",{className:"px-2 py-4 text-xs text-muted-foreground",children:["Can't reach Chorus. Try restarting it from your terminal:"," ",(0,n.jsx)("code",{className:"rounded bg-muted/40 px-1 font-mono text-[10px] text-foreground/80",children:"chorus start"})]}):0===i.length?(0,n.jsxs)("div",{className:"px-2 py-4 text-xs text-muted-foreground",children:["No chats yet."," ",(0,n.jsx)(o(),{href:"/new",onClick:e,className:"text-primary transition hover:underline",children:"Start one →"})]}):(0,n.jsx)("ul",{className:"flex flex-col gap-0.5",children:i.map(t=>{let r=`/runs/${t.slug||t.id}`,s=a===r,l=(0,j.t)(t.work),i=l.length>60?`${l.slice(0,60)}…`:l;return(0,n.jsx)("li",{children:(0,n.jsxs)(o(),{href:r,onClick:e,className:(0,y.cn)("group flex items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors",s?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[(0,n.jsx)("span",{className:(0,y.cn)("h-1.5 w-1.5 shrink-0 rounded-full",k[t.status])}),(0,n.jsx)("span",{className:"min-w-0 flex-1 truncate leading-snug",title:l,children:i})]})},t.id)})})})]})]})}let S=e=>(window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)),A=()=>!1;function E(){let[e,t]=(0,s.useState)(0),r=(0,s.useSyncExternalStore)(S,()=>N(window.localStorage),A),a=(0,s.useCallback)(()=>{let e=!N(window.localStorage);var r=window.localStorage;if(r)try{r.setItem(v,e?"1":"0")}catch{}t(e=>e+1)},[]);return(0,n.jsx)("aside",{className:(0,y.cn)("hidden h-screen shrink-0 flex-col border-r border-border bg-card/30 transition-[width] duration-200 ease-out md:flex",r?"w-14":"w-60"),children:(0,n.jsx)(C,{collapsed:r,onToggleCollapsed:a})})}},7296:(e,t,r)=>{r.d(t,{t:()=>s});let n=/^# Persona: (.+?)\n[\s\S]+?\n---\n\n# User request\n\n([\s\S]+)$/;function s(e){if(!e)return"";let t=e.length>8192?e.slice(0,8192):e;if(!t.startsWith("# Persona:")||!t.includes("\n---\n\n# User request\n\n"))return e;let r=n.exec(e);if(r){let e=r[1].trim(),t=r[2].trim();return`[${e}] ${t}`}return e}},8344:(e,t,r)=>{r.d(t,{MobileTopBar:()=>b});var n=r(9442),s=r(6074),a=r(3606),o=r(6891),l=r(3703),i=r(7362);function d({...e}){return(0,n.jsx)(l.bL,{"data-slot":"sheet",...e})}function c({...e}){return(0,n.jsx)(l.l9,{"data-slot":"sheet-trigger",...e})}function u({...e}){return(0,n.jsx)(l.ZL,{"data-slot":"sheet-portal",...e})}function h({className:e,...t}){return(0,n.jsx)(l.hJ,{"data-slot":"sheet-overlay",className:(0,i.cn)("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...t})}function x({className:e,children:t,side:r="right",showCloseButton:s=!0,...a}){return(0,n.jsxs)(u,{children:[(0,n.jsx)(h,{}),(0,n.jsxs)(l.UC,{"data-slot":"sheet-content",className:(0,i.cn)("fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500","right"===r&&"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm","left"===r&&"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm","top"===r&&"inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top","bottom"===r&&"inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",e),...a,children:[t,s&&(0,n.jsxs)(l.bm,{className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary",children:[(0,n.jsx)(o.A,{className:"size-4"}),(0,n.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function m({className:e,...t}){return(0,n.jsx)("div",{"data-slot":"sheet-header",className:(0,i.cn)("flex flex-col gap-1.5 p-4",e),...t})}function f({className:e,...t}){return(0,n.jsx)(l.hE,{"data-slot":"sheet-title",className:(0,i.cn)("font-semibold text-foreground",e),...t})}var p=r(821);function g(){let[e,t]=(0,s.useState)(!1);return(0,n.jsxs)(d,{open:e,onOpenChange:t,children:[(0,n.jsx)(c,{asChild:!0,children:(0,n.jsx)("button",{type:"button","aria-label":"Open navigation",className:"-ml-1 inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-md text-muted-foreground transition hover:bg-accent hover:text-foreground md:hidden",children:(0,n.jsx)(a.A,{className:"h-5 w-5"})})}),(0,n.jsxs)(x,{side:"left",className:"w-72 border-border bg-card p-0",children:[(0,n.jsx)(m,{className:"sr-only",children:(0,n.jsx)(f,{children:"Navigation"})}),(0,n.jsx)(p.P,{onNavigate:()=>t(!1)})]})]})}function b(){return(0,n.jsx)("header",{className:"flex h-12 items-center border-b border-border bg-background/60 px-3 backdrop-blur md:hidden",children:(0,n.jsx)(g,{})})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[641],{1993:(e,t,n)=>{n.d(t,{K7:()=>d,UT:()=>a,dW:()=>i,qI:()=>s});var r=n(4411);function o(e){return{id:e.id,label:e.label,one_liner:e.one_liner,system_prompt:e.system_prompt,recommended_lineage:e.recommended_lineage,builtin:!!e.builtin,forked_from:e.forked_from??null,created_at:e.created_at,updated_at:e.updated_at}}async function a(){return(await (0,r.T)("/personas")).items.map(o)}async function i(e){return o(await (0,r.T)(`/personas/${encodeURIComponent(e)}`))}async function s(e){return o(await (0,r.T)("/personas",{method:"POST",body:JSON.stringify(e)}))}async function d(e){await (0,r.T)(`/personas/${encodeURIComponent(e)}`,{method:"DELETE"})}},4284:(e,t,n)=>{n.d(t,{U:()=>o});var r=n(9442);function o({className:e}){return(0,r.jsxs)("svg",{viewBox:"0 0 32 32","aria-hidden":"true",className:e,fill:"currentColor",children:[(0,r.jsx)("circle",{cx:"11",cy:"20",r:"3.2",fillOpacity:"0.55"}),(0,r.jsx)("circle",{cx:"21",cy:"20",r:"3.2",fillOpacity:"0.55"}),(0,r.jsx)("circle",{cx:"16",cy:"11",r:"3.2"})]})}},4411:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{$:()=>DaemonError,T:()=>fetchFromDaemon});var process=__webpack_require__(9298);let CLIENT_BASE="/api/daemon",API_PREFIX="/api/v1",cachedServerBase=null;function readDaemonJsonSync(){try{let dynRequire="function"==typeof globalThis.require?globalThis.require:eval("require");if(!dynRequire)return null;let fs=dynRequire("node:fs"),path=dynRequire("node:path"),os=dynRequire("node:os"),target=path.join(os.homedir(),".chorus","daemon.json"),raw=fs.readFileSync(target,"utf-8"),parsed=JSON.parse(raw);if(1!==parsed.schemaVersion||"number"!=typeof parsed.daemonPort)return null;return{daemonPort:parsed.daemonPort}}catch{return null}}async function getServerBase(){if(cachedServerBase)return cachedServerBase;let e=readDaemonJsonSync();return cachedServerBase=e?`http://127.0.0.1:${e.daemonPort}`:process.env.CHORUS_DAEMON_URL?process.env.CHORUS_DAEMON_URL:"http://127.0.0.1:7707"}async function getBaseUrl(){return new URL(CLIENT_BASE,window.location.origin).toString()}class DaemonError extends Error{constructor(e,t,n,r){super(n),this.code=e,this.statusCode=t,this.details=r,this.name="DaemonError"}}async function fetchFromDaemon(e,t={}){let n=await getBaseUrl(),r=e.startsWith("/")?e:`/${e}`,o=r===API_PREFIX||r.startsWith(`${API_PREFIX}/`)?r:`${API_PREFIX}${r}`,a=`${n.replace(/\/$/,"")}${o}`;try{let e=await fetch(a,{...t,headers:{"Content-Type":"application/json",...t.headers}}),n=await e.json().catch(()=>({ok:!1,error:{code:"parse_error",message:"Failed to parse response"}})),r=n;if(!r.ok){let t=n;if("string"==typeof t.error&&"string"==typeof t.message)throw new DaemonError(t.error,e.status,t.message);throw new DaemonError(r.error?.code||"unknown",e.status,r.error?.message||`Daemon returned ${e.status}`,r.error?.details)}return r.data}catch(e){if(e instanceof DaemonError)throw e;if(e instanceof TypeError&&e.message.includes("fetch"))throw cachedServerBase=null,new DaemonError("connection_failed",0,"Failed to connect to Chorus daemon. Is it running?");throw new DaemonError("unknown",0,e instanceof Error?e.message:"Unknown error")}}},6185:(e,t,n)=>{n.d(t,{$v:()=>r.$,jb:()=>T.jb,RL:()=>i,K7:()=>v.K7,I7:()=>y,dW:()=>v.dW,Ih:()=>a,UT:()=>v.UT,eG:()=>m,qI:()=>v.qI,AI:()=>h,Xx:()=>g.Xx,WH:()=>g.WH});var r=n(4411);function o(e){let t;if(e.attached_files)try{let n=JSON.parse(e.attached_files);Array.isArray(n)&&(t=n)}catch{}return{id:e.id,slug:e.slug??void 0,work:e.work,templateId:e.template_id,status:e.status,currentPhaseIdx:e.current_phase_idx??0,yolo:!!e.yolo,attachedFiles:t,repoPath:e.repo_path??void 0,prUrl:e.pr_url??void 0,shipError:e.ship_error??void 0,artifact:e.artifact??void 0,verdict:e.verdict??void 0,createdAt:e.created_at,updatedAt:e.updated_at,finishedAt:e.finished_at??void 0}}async function a(e){let t=new URLSearchParams;e?.limit&&t.append("limit",e.limit.toString()),e?.offset&&t.append("offset",e.offset.toString()),e?.status&&t.append("status",e.status);let n=t.toString();return(await (0,r.T)(`/chats${n?`?${n}`:""}`)).items.map(o)}async function i(e){return o(await (0,r.T)("/chats",{method:"POST",body:JSON.stringify(e)}))}var s=n(599);let d=new Set(["anthropic","openai","google","opencode","moonshot","any","xai"]),c={anthropic:"claude",openai:"codex",google:"gemini",opencode:"opencode",moonshot:"kimi",any:"claude",xai:"opencode"};function u(e){return e?c[e]??"claude":"claude"}function l(e,t){if(e.category)return e.category;let n=t.toLowerCase();return n.includes("bug")||n.includes("debug")||n.includes("diagnose")?"debug":n.includes("plan")||n.includes("architect")?"plan":n.includes("decide")||n.includes("decision")?"decide":"review"}function f(e){let t=e.kind??"review";return{id:e.id??"phase",name:e.title??e.name??e.id??"Phase",description:e.description??"",kind:t,gate:"auto",doer:{lineage:u(e.doer?.lineage),models:e.doer?.models??[],...e.doer?.persona?{persona:e.doer.persona}:{}},reviewer:{require:e.reviewer?.require??1,crossLineage:e.reviewer?.crossLineage??!0,candidates:(e.reviewer?.candidates??[]).map(e=>u(e.lineage)).filter(e=>d.has(Object.keys(c).find(t=>c[t]===e)??"")),candidatesWithModels:(e.reviewer?.candidates??[]).map(e=>({lineage:u(e.lineage),models:e.models??[],...e.persona?{persona:e.persona}:{}}))},inputs:{include:e.inputs?.include??[],exclude:e.inputs?.exclude??[]},iterate:{max:e.iterate?.maxRounds??2,onMax:"ask-user"},blindSpots:[],execution:"parallel",builtin:!0,..."review_only"===t?{artifact:{label:e.artifact?.label??"Artifact to review",hint:e.artifact?.hint??"Paste a unified diff, a markdown draft, code, or any text blob.",maxBytes:e.artifact?.maxBytes??1048576}}:{}}}function p(e){let t={};try{t=s.Ay.parse(e.yaml)??{}}catch{}let n="majority";"number"==typeof t.agreementThreshold?n=t.agreementThreshold>=.99?"unanimous":t.agreementThreshold>=.5?"majority":"any":"string"==typeof t.agreementThreshold&&(n=t.agreementThreshold);let r=(t.phases??[]).map(f);return{id:e.id,name:t.name??e.id,description:t.description??"",category:l(t,e.id),phases:r,agreementThreshold:n,onThresholdMet:"auto-finalize"===t.onThresholdMet?"auto-finalize":"ask-user",maxRounds:t.maxRounds??3,driver:"external",driverHandoff:!1,verificationGate:"auto",costCapUsd:0,yoloDefault:t.yoloDefault??!1,estimatedBaselineTokens:t.estimatedBaselineTokens,onError:"ask-user",notify:"dashboard-only",yaml:e.yaml,authorHandle:t.author??"chorus",forks:0,popularity:0,source:e.source}}async function m(){return(await (0,r.T)("/templates")).items.map(p)}async function h(e){return p(await (0,r.T)("/templates",{method:"POST",body:JSON.stringify(e)}))}async function y(e){await (0,r.T)(`/templates/${encodeURIComponent(e)}`,{method:"DELETE"})}var g=n(6441),T=n(8141),v=n(1993);n(7847)},6441:(e,t,n)=>{n.d(t,{A1:()=>f,Ci:()=>p,Df:()=>i,Dl:()=>l,Ep:()=>s,WH:()=>h,WK:()=>m,Xx:()=>d,fk:()=>o,iW:()=>a,nr:()=>u,oD:()=>c});var r=n(4411);async function o(){return(await (0,r.T)("/onboard/detect-clis")).items}async function a(e,t){return(0,r.T)("/onboard/validate-cli-path",{method:"POST",body:JSON.stringify({id:e,path:t})})}async function i(e,t){return(0,r.T)("/onboard/save-cli-path",{method:"POST",body:JSON.stringify({id:e,path:t})})}async function s(e){return(0,r.T)("/settings/permissions",{method:"PUT",body:JSON.stringify(e)})}async function d(e){return(0,r.T)("/settings",{method:"PUT",body:JSON.stringify(e)})}async function c(){return(0,r.T)("/settings/transport")}async function u(e){return(0,r.T)("/settings/transport",{method:"PUT",body:JSON.stringify(e)})}async function l(){return(0,r.T)("/settings/billing")}async function f(e){return(0,r.T)("/settings/billing",{method:"PUT",body:JSON.stringify(e)})}async function p(){return(0,r.T)("/settings/telemetry")}async function m(e){return(0,r.T)("/settings/telemetry",{method:"PUT",body:JSON.stringify({enabled:e})})}async function h(e,t){return(0,r.T)(`/secrets/${e}`,{method:"PUT",body:JSON.stringify(t)})}},7362:(e,t,n)=>{n.d(t,{cn:()=>a});var r=n(142),o=n(9317);function a(...e){return(0,o.QP)((0,r.$)(e))}},7847:(e,t,n)=>{n.d(t,{createVoice:()=>s,listVoices:()=>a,updateVoice:()=>i});var r=n(4411);function o(e){if(!e)return"";let t=[];return e.lineage&&t.push(`lineage=${encodeURIComponent(e.lineage)}`),e.source&&t.push(`source=${encodeURIComponent(e.source)}`),e.provider&&t.push(`provider=${encodeURIComponent(e.provider)}`),void 0!==e.enabled&&t.push(`enabled=${e.enabled?"true":"false"}`),0===t.length?"":`?${t.join("&")}`}async function a(e){return(await (0,r.T)(`/voices${o(e)}`)).items}async function i(e,t){return(0,r.T)(`/voices/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify(t)})}async function s(e){return(0,r.T)("/voices",{method:"POST",body:JSON.stringify(e)})}},8141:(e,t,n)=>{n.d(t,{Ay:()=>a,jb:()=>o});var r=n(4411);async function o(e){return(0,r.T)(`/orchestrators/${e}/connect`,{method:"POST"})}async function a(){return(0,r.T)("/orchestrators/opencode/models")}}}]);
|
package/.next/static/chunks/app/connect/{page-c09d9fb410c468b7.js → page-052be1ded639feb8.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[951],{1727:(e,t,r)=>{"use strict";r.d(t,{OrchestratorCard:()=>g});var n=r(9442),a=r(6074),d=r(9707),s=r(3149),i=r(6823),o=r(4030),l=r(6185),c=r(7847),m=r(3734),u=r(7362);let p={claude:"claude-code",codex:"codex-cli",gemini:"gemini-cli",opencode:"opencode-cli",kimi:"kimi-cli"},x={dot:"bg-muted-foreground/40",gradient:"bg-gradient-to-br from-muted/30 via-card to-card"};function g({initial:e,voices:t}){var r;let[h,f]=(0,a.useState)(e),[y,j]=(0,a.useState)(!1),[N,v]=(0,a.useState)(null),[k,w]=(0,a.useState)(!1),A=p[e.name],[C,S]=(0,a.useState)(t),[M,_]=(0,a.useState)(null),[P,O]=(0,a.useState)(null),$=!!A&&C.length>0,E=C.filter(e=>e.enabled).length,R="opencode-cli"===A,T=h.connected,z=h.approvedTools>0&&!T,L=(r=e.name)in m.r2?m.r2[r]:x,V=async()=>{j(!0),v(null);try{let e=await (0,l.jb)(h.name);f(e.status),w(e.added.length>0)}catch(e){v(e instanceof l.$v?e.message:"Failed to connect — is the daemon running?")}finally{j(!1)}},F=async e=>{_(e.id),O(null);try{let t=await (0,c.updateVoice)(e.id,{enabled:!e.enabled});S(e=>e.map(e=>e.id===t.id?t:e))}catch(e){O(e instanceof l.$v?e.message:"Couldn't save. Is the daemon running?")}finally{_(null)}},I=new Map;if(R)for(let e of C){let t=e.model_id.indexOf("/"),r=t>0?e.model_id.slice(0,t):"other",n=I.get(r)??[];n.push(e),I.set(r,n)}let q=Array.from(I.keys()).sort();return(0,n.jsxs)("div",{className:(0,u.cn)("flex h-72 flex-col rounded-lg border border-border",L.gradient),children:[(0,n.jsx)("div",{className:"flex shrink-0 items-center gap-3 px-4 py-3",children:(0,n.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[(0,n.jsx)("span",{className:(0,u.cn)("h-2 w-2 shrink-0 rounded-full",L.dot)}),(0,n.jsx)("h3",{className:"whitespace-nowrap text-sm font-semibold",children:h.label}),T?(0,n.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium text-emerald-300",children:[(0,n.jsx)(d.A,{className:"h-3 w-3"})," Connected"]}):z?(0,n.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-amber-500/10 px-2 py-0.5 text-[10px] font-medium text-amber-300",children:[h.approvedTools,"/",h.totalTools," tools"]}):h.supported?(0,n.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-card px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:"Not connected"}):(0,n.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-card px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:"Coming soon"}),$&&(0,n.jsxs)("span",{className:"whitespace-nowrap text-[10px] text-muted-foreground",children:["\xb7 ",E," model",1===E?"":"s"]})]})}),(0,n.jsxs)("div",{className:"flex flex-1 flex-col gap-3 overflow-y-auto border-t border-border bg-card/30 p-4",children:[(0,n.jsx)("p",{className:"text-[11px] leading-relaxed text-muted-foreground",children:h.note}),!h.supported&&(0,n.jsx)("p",{className:"text-[11px] italic text-muted-foreground/70",children:"Wiring will land in a future release."}),h.supported&&(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsxs)("button",{type:"button",onClick:V,disabled:y||T&&!z,className:"inline-flex h-8 items-center gap-1.5 rounded-md bg-primary px-3 text-xs font-medium text-primary-foreground transition hover:bg-primary/90 disabled:cursor-not-allowed disabled:bg-muted disabled:text-muted-foreground",children:[y?(0,n.jsx)(s.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,n.jsx)(i.A,{className:"h-3.5 w-3.5"}),T?"Already connected":z?"Approve remaining tools":`Connect ${h.label}`]}),k&&!N&&(0,n.jsxs)("p",{className:"text-[11px] text-emerald-400",children:["✓ Done. Restart ",h.label," for the change to take effect."]}),N&&(0,n.jsxs)("p",{className:"flex items-start gap-1 text-[11px] text-destructive",children:[(0,n.jsx)(o.A,{className:"mt-0.5 h-3 w-3 shrink-0"})," ",N]})]}),T&&"prompts_once"===h.firstCallBehavior&&(0,n.jsx)("p",{className:"text-[11px] text-amber-300/90",children:'⚠ First chorus.* call will show a one-time prompt — click "Always allow".'}),$&&(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:"Models"}),P&&(0,n.jsx)("p",{className:"text-[11px] text-destructive",children:P}),R?(0,n.jsx)("div",{className:"space-y-2",children:q.map(e=>{let t=I.get(e)??[];return(0,n.jsxs)("div",{className:"space-y-1",children:[(0,n.jsxs)("p",{className:"text-[10px] font-mono text-muted-foreground/80",children:[e,"/"]}),(0,n.jsx)("div",{className:"grid grid-cols-1 gap-1 sm:grid-cols-2",children:t.map(t=>(0,n.jsx)(b,{label:t.model_id.slice(e.length+1),value:t.model_id,selected:t.enabled,disabled:M===t.id,onClick:()=>F(t)},t.id))})]},e)})}):(0,n.jsx)("div",{className:"grid grid-cols-1 gap-1 sm:grid-cols-2",children:C.map(e=>(0,n.jsx)(b,{label:e.model_id,value:e.model_id,selected:e.enabled,disabled:M===e.id,onClick:()=>F(e)},e.id))})]})]})]})}function b({label:e,value:t,selected:r,disabled:a,onClick:s}){return(0,n.jsxs)("button",{type:"button",disabled:a,onClick:s,title:t,className:(0,u.cn)("flex items-center gap-2 rounded border px-2 py-1.5 text-left text-[11px] transition disabled:opacity-60",r?"border-primary/50 bg-primary/10 text-foreground":"border-border bg-card hover:border-muted-foreground/30 text-muted-foreground"),children:[(0,n.jsx)("div",{className:(0,u.cn)("grid h-3 w-3 shrink-0 place-items-center rounded-sm border transition",r?"border-primary bg-primary text-primary-foreground":"border-border"),children:r&&(0,n.jsx)(d.A,{className:"h-2 w-2"})}),(0,n.jsx)("span",{className:"truncate font-mono",children:e})]})}},2545:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(3884).A)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},2881:(e,t,r)=>{"use strict";r.d(t,{Eu:()=>s,M5:()=>a,Y8:()=>d});var n=r(4411);async function a(e){return(0,n.T)("/openrouter/save-key",{method:"POST",body:JSON.stringify({apiKey:e})})}async function d(){return(0,n.T)("/openrouter/models")}async function s(e,t){return(0,n.T)("/openrouter/voices",{method:"POST",body:JSON.stringify(t?{modelIds:e,apiKey:t}:{modelIds:e})})}},3149:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(3884).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},3734:(e,t,r)=>{"use strict";r.d(t,{JR:()=>c,QJ:()=>d,VW:()=>s,YM:()=>u,m_:()=>i,r2:()=>p,u5:()=>l,x0:()=>m,ze:()=>n});let n={anthropic:"Claude",openai:"Codex",google:"Gemini",opencode:"OpenCode",moonshot:"Kimi"},a={anthropic:"bg-violet-400",openai:"bg-orange-400",google:"bg-blue-400",opencode:"bg-emerald-400",moonshot:"bg-pink-400"};function d(e){return e?n[e]??e:""}function s(e){return e?a[e]??"bg-muted":"bg-muted"}let i={claude:"Claude",codex:"Codex",gemini:"Gemini",opencode:"OpenCode",kimi:"Kimi",openrouter:"OpenRouter"},o={claude:"bg-violet-400",codex:"bg-orange-400",gemini:"bg-blue-400",opencode:"bg-emerald-400",kimi:"bg-pink-400",openrouter:"bg-cyan-400"};function l(e){return e?i[e]??e:""}function c(e){return e?o[e]??"bg-muted":"bg-muted"}let m={claude:"claude-opus-4-7",codex:"gpt-5.5",gemini:"gemini-3.1-pro-preview",opencode:"kimi-k2.6",kimi:"kimi-k2.6",openrouter:""};function u(e){if(e)return m[e]}let p={claude:{dot:"bg-violet-400",ring:"ring-violet-400/40",gradient:"bg-gradient-to-b from-violet-500/15 to-card"},codex:{dot:"bg-orange-400",ring:"ring-orange-400/40",gradient:"bg-gradient-to-b from-orange-500/15 to-card"},gemini:{dot:"bg-blue-400",ring:"ring-blue-400/40",gradient:"bg-gradient-to-b from-blue-500/15 to-card"},opencode:{dot:"bg-emerald-400",ring:"ring-emerald-400/40",gradient:"bg-gradient-to-b from-emerald-500/15 to-card"},kimi:{dot:"bg-pink-400",ring:"ring-pink-400/40",gradient:"bg-gradient-to-b from-pink-500/15 to-card"},openrouter:{dot:"bg-cyan-400",ring:"ring-cyan-400/40",gradient:"bg-gradient-to-b from-cyan-500/15 to-card"}}},4030:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(3884).A)("triangle-alert",[["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"}]])},7130:(e,t,r)=>{"use strict";r.d(t,{OpenRouterCard:()=>x});var n=r(9442),a=r(6074),d=r(9707),s=r(2545),i=r(3149),o=r(4030),l=r(9812),c=r(7362),m=r(2881),u=r(7847),p=r(3734);function x({voices:e}){let[t,r]=(0,a.useState)(e),[b,h]=(0,a.useState)(null),[f,y]=(0,a.useState)(!1),[j,N]=(0,a.useState)(!1),[v,k]=(0,a.useState)(""),[w,A]=(0,a.useState)(!1),[C,S]=(0,a.useState)(null),[M,_]=(0,a.useState)(!1),[P,O]=(0,a.useState)(""),[$,E]=(0,a.useState)(new Set),[R,T]=(0,a.useState)(!1),[z,L]=(0,a.useState)(null),[V,F]=(0,a.useState)(null),[I,q]=(0,a.useState)(null),[J,Y]=(0,a.useState)(null),G=t.filter(e=>e.enabled).length,K=t.length>0;async function W(){if(!f){y(!0),S(null),N(!0);try{let{models:e}=await (0,m.Y8)();e.sort((e,t)=>e.id.localeCompare(t.id)),h(e),_(!1)}catch(t){let e=t instanceof Error?t.message:String(t);_(!0),/no openrouter api key/i.test(e)||S(e)}finally{y(!1)}}}async function B(){if(0!==v.trim().length){A(!0),S(null);try{let e=await (0,m.M5)(v.trim());if(!e.valid)return void S(e.error??"Validation failed");k(""),_(!1);let{models:t}=await (0,m.Y8)();t.sort((e,t)=>e.id.localeCompare(t.id)),h(t),N(!0)}catch(e){S(e instanceof Error?e.message:String(e))}finally{A(!1)}}}async function D(){if(0!==$.size){T(!0),L(null),F(null);try{let e=await (0,m.Eu)(Array.from($)),t=e.added.length,n=e.skipped.length;F(`Added ${t} voice${1===t?"":"s"}`+(n>0?` \xb7 skipped ${n} (unknown id)`:"")),E(new Set);try{let e=await (0,u.listVoices)({source:"api",provider:"openrouter"});r(e)}catch{}}catch(e){L(e instanceof Error?e.message:String(e))}finally{T(!1)}}}async function H(e){q(e.id),Y(null);try{let t=await (0,u.updateVoice)(e.id,{enabled:!e.enabled});r(e=>e.map(e=>e.id===t.id?t:e))}catch(e){Y(e instanceof Error?e.message:String(e))}finally{q(null)}}let Q=P.trim()?(b??[]).filter(e=>e.id.toLowerCase().includes(P.toLowerCase().trim())||e.name.toLowerCase().includes(P.toLowerCase().trim())):b??[];return(0,n.jsxs)("div",{className:(0,c.cn)("flex h-72 flex-col rounded-lg border border-border",p.r2.openrouter.gradient),children:[(0,n.jsx)("div",{className:"flex shrink-0 items-center gap-3 px-4 py-3",children:(0,n.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[(0,n.jsx)("span",{className:(0,c.cn)("h-2 w-2 shrink-0 rounded-full",p.r2.openrouter.dot)}),(0,n.jsx)("h3",{className:"whitespace-nowrap text-sm font-semibold",children:"OpenRouter"}),K?(0,n.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium text-emerald-300",children:[(0,n.jsx)(d.A,{className:"h-3 w-3"})," ",G," enabled"]}):(0,n.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-card px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:"Not configured"})]})}),(0,n.jsxs)("div",{className:"flex flex-1 flex-col gap-3 overflow-y-auto border-t border-border bg-card/30 p-4",children:[!K&&(0,n.jsx)("p",{className:"text-[11px] leading-relaxed text-muted-foreground",children:"Voices added here run via OpenRouter's chat-completions API. Costs come back per-call from the API and surface on the run page."}),K&&(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:"Models"}),(0,n.jsx)("div",{className:"grid grid-cols-1 gap-1 sm:grid-cols-2",children:t.map(e=>(0,n.jsxs)("button",{type:"button",disabled:I===e.id,onClick:()=>H(e),title:e.model_id,className:(0,c.cn)("flex items-center gap-2 rounded border px-2 py-1.5 text-left text-[11px] transition disabled:opacity-60",e.enabled?"border-primary/50 bg-primary/10 text-foreground":"border-border bg-card text-muted-foreground hover:border-muted-foreground/30"),children:[(0,n.jsx)("div",{className:(0,c.cn)("grid h-3 w-3 shrink-0 place-items-center rounded-sm border transition",e.enabled?"border-primary bg-primary text-primary-foreground":"border-border"),children:e.enabled&&(0,n.jsx)(d.A,{className:"h-2 w-2"})}),(0,n.jsx)("span",{className:"truncate font-mono",children:e.model_id})]},e.id))}),J&&(0,n.jsx)("p",{className:"text-[11px] text-destructive",children:J})]}),(M||!K)&&(0,n.jsxs)("div",{className:"space-y-2 rounded-md border border-border bg-background/40 p-3",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:K?"Replace API key":"OpenRouter API key"}),(0,n.jsxs)("a",{href:"https://openrouter.ai/keys",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-[10px] text-muted-foreground hover:text-foreground",children:["Get a key ",(0,n.jsx)(s.A,{className:"h-2.5 w-2.5"})]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("input",{type:"password",value:v,onChange:e=>k(e.target.value),placeholder:"sk-or-v1-…",disabled:w,className:"h-8 flex-1 rounded-md border border-border bg-background px-2 font-mono text-xs focus:border-primary/60 focus:outline-none"}),(0,n.jsxs)("button",{type:"button",onClick:B,disabled:w||0===v.trim().length,className:"inline-flex h-8 items-center gap-1.5 rounded-md border border-primary/40 bg-primary/10 px-3 text-[11px] font-medium text-primary transition hover:bg-primary/20 disabled:cursor-not-allowed disabled:opacity-50",children:[w?(0,n.jsx)(i.A,{className:"h-3 w-3 animate-spin"}):(0,n.jsx)(d.A,{className:"h-3 w-3"}),w?"Saving…":"Save"]})]}),C&&(0,n.jsxs)("p",{className:"flex items-center gap-1 text-[11px] text-destructive",children:[(0,n.jsx)(o.A,{className:"h-3 w-3"}),C]})]}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[K&&!j&&(0,n.jsxs)("button",{type:"button",onClick:W,disabled:f,className:"inline-flex h-8 items-center gap-1.5 rounded-md border border-border bg-card px-3 text-[11px] font-medium text-foreground transition hover:border-muted-foreground/30 disabled:opacity-50",children:[f?(0,n.jsx)(i.A,{className:"h-3 w-3 animate-spin"}):null,"Add more models"]}),K&&!M&&(0,n.jsx)("button",{type:"button",onClick:()=>_(!0),className:"text-[11px] text-muted-foreground underline-offset-2 hover:underline",children:"Replace API key"})]}),j&&(0,n.jsxs)(n.Fragment,{children:[f&&(0,n.jsxs)("p",{className:"flex items-center gap-2 text-[11px] text-muted-foreground",children:[(0,n.jsx)(i.A,{className:"h-3 w-3 animate-spin"})," Loading catalog…"]}),b&&b.length>0&&(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:K?"Add more models":"Pick models"}),(0,n.jsxs)("button",{type:"button",onClick:D,disabled:0===$.size||R,className:"inline-flex h-7 items-center gap-1.5 rounded-md border border-primary/40 bg-primary/10 px-2.5 text-[11px] font-medium text-primary transition hover:bg-primary/20 disabled:cursor-not-allowed disabled:opacity-50",children:[R?(0,n.jsx)(i.A,{className:"h-3 w-3 animate-spin"}):null,"Add ",$.size>0?$.size:""]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border bg-background/40 px-2",children:[(0,n.jsx)(l.A,{className:"h-3 w-3 text-muted-foreground"}),(0,n.jsx)("input",{type:"text",value:P,onChange:e=>O(e.target.value),placeholder:"filter by id or name…",className:"h-7 flex-1 bg-transparent text-[11px] focus:outline-none"}),(0,n.jsxs)("span",{className:"text-[10px] text-muted-foreground",children:[Q.length,"/",b.length]})]}),V&&(0,n.jsx)("p",{className:"text-[11px] text-emerald-300",children:V}),z&&(0,n.jsxs)("p",{className:"flex items-center gap-1 text-[11px] text-destructive",children:[(0,n.jsx)(o.A,{className:"h-3 w-3"}),z]}),(0,n.jsx)("div",{className:"max-h-72 overflow-y-auto rounded-md border border-border",children:Q.map(e=>{let r=$.has(e.id),a=t.some(t=>t.model_id===e.id);return(0,n.jsxs)("label",{className:(0,c.cn)("flex cursor-pointer items-center gap-2 border-b border-border px-2 py-1.5 text-[11px] last:border-b-0 hover:bg-card/40",a&&"opacity-50"),children:[(0,n.jsx)("input",{type:"checkbox",checked:r,disabled:a,onChange:t=>{E(r=>{let n=new Set(r);return t.target.checked?n.add(e.id):n.delete(e.id),n})},className:"h-3 w-3 shrink-0"}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsxs)("div",{className:"truncate font-mono text-[11px]",children:[e.id,a&&(0,n.jsx)("span",{className:"ml-1 text-[10px] text-muted-foreground",children:"\xb7 added"})]}),(0,n.jsxs)("div",{className:"truncate text-[10px] text-muted-foreground",children:[e.name,e.contextLength?` \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`:"",void 0!==e.inputCostPerMtok||void 0!==e.outputCostPerMtok?` \xb7 ${g(e.inputCostPerMtok)}/${g(e.outputCostPerMtok)} per Mtok`:""]})]})]},e.id)})})]})]})]})]})}function g(e){return void 0===e?"?":e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(2)}`}},8799:(e,t,r)=>{Promise.resolve().then(r.bind(r,821)),Promise.resolve().then(r.bind(r,8344)),Promise.resolve().then(r.bind(r,7130)),Promise.resolve().then(r.bind(r,1727))},9707:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(3884).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},9812:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(3884).A)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])}},e=>{e.O(0,[116,720,344,506,128,358],()=>e(e.s=8799)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[951],{1727:(e,t,r)=>{"use strict";r.d(t,{OrchestratorCard:()=>g});var n=r(9442),a=r(6074),d=r(9707),s=r(3149),i=r(6823),o=r(4030),l=r(6185),c=r(7847),m=r(3734),u=r(7362);let p={claude:"claude-code",codex:"codex-cli",gemini:"gemini-cli",opencode:"opencode-cli",kimi:"kimi-cli"},x={dot:"bg-muted-foreground/40",gradient:"bg-gradient-to-br from-muted/30 via-card to-card"};function g({initial:e,voices:t}){var r;let[h,f]=(0,a.useState)(e),[y,j]=(0,a.useState)(!1),[N,v]=(0,a.useState)(null),[k,w]=(0,a.useState)(!1),A=p[e.name],[C,S]=(0,a.useState)(t),[M,_]=(0,a.useState)(null),[P,O]=(0,a.useState)(null),$=!!A&&C.length>0,E=C.filter(e=>e.enabled).length,R="opencode-cli"===A,T=h.connected,z=h.approvedTools>0&&!T,L=(r=e.name)in m.r2?m.r2[r]:x,V=async()=>{j(!0),v(null);try{let e=await (0,l.jb)(h.name);f(e.status),w(e.added.length>0)}catch(e){v(e instanceof l.$v?e.message:"Failed to connect — is the daemon running?")}finally{j(!1)}},F=async e=>{_(e.id),O(null);try{let t=await (0,c.updateVoice)(e.id,{enabled:!e.enabled});S(e=>e.map(e=>e.id===t.id?t:e))}catch(e){O(e instanceof l.$v?e.message:"Couldn't save. Is the daemon running?")}finally{_(null)}},I=new Map;if(R)for(let e of C){let t=e.model_id.indexOf("/"),r=t>0?e.model_id.slice(0,t):"other",n=I.get(r)??[];n.push(e),I.set(r,n)}let q=Array.from(I.keys()).sort();return(0,n.jsxs)("div",{className:(0,u.cn)("flex h-72 flex-col rounded-lg border border-border",L.gradient),children:[(0,n.jsx)("div",{className:"flex shrink-0 items-center gap-3 px-4 py-3",children:(0,n.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[(0,n.jsx)("span",{className:(0,u.cn)("h-2 w-2 shrink-0 rounded-full",L.dot)}),(0,n.jsx)("h3",{className:"whitespace-nowrap text-sm font-semibold",children:h.label}),T?(0,n.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium text-emerald-300",children:[(0,n.jsx)(d.A,{className:"h-3 w-3"})," Connected"]}):z?(0,n.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-amber-500/10 px-2 py-0.5 text-[10px] font-medium text-amber-300",children:[h.approvedTools,"/",h.totalTools," tools"]}):h.supported?(0,n.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-card px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:"Not connected"}):(0,n.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-card px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:"Coming soon"}),$&&(0,n.jsxs)("span",{className:"whitespace-nowrap text-[10px] text-muted-foreground",children:["\xb7 ",E," model",1===E?"":"s"]})]})}),(0,n.jsxs)("div",{className:"flex flex-1 flex-col gap-3 overflow-y-auto border-t border-border bg-card/30 p-4",children:[(0,n.jsx)("p",{className:"text-[11px] leading-relaxed text-muted-foreground",children:h.note}),!h.supported&&(0,n.jsx)("p",{className:"text-[11px] italic text-muted-foreground/70",children:"Wiring will land in a future release."}),h.supported&&(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsxs)("button",{type:"button",onClick:V,disabled:y||T&&!z,className:"inline-flex h-8 items-center gap-1.5 rounded-md bg-primary px-3 text-xs font-medium text-primary-foreground transition hover:bg-primary/90 disabled:cursor-not-allowed disabled:bg-muted disabled:text-muted-foreground",children:[y?(0,n.jsx)(s.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,n.jsx)(i.A,{className:"h-3.5 w-3.5"}),T?"Already connected":z?"Approve remaining tools":`Connect ${h.label}`]}),k&&!N&&(0,n.jsxs)("p",{className:"text-[11px] text-emerald-400",children:["✓ Done. Restart ",h.label," for the change to take effect."]}),N&&(0,n.jsxs)("p",{className:"flex items-start gap-1 text-[11px] text-destructive",children:[(0,n.jsx)(o.A,{className:"mt-0.5 h-3 w-3 shrink-0"})," ",N]})]}),T&&"prompts_once"===h.firstCallBehavior&&(0,n.jsx)("p",{className:"text-[11px] text-amber-300/90",children:'⚠ First chorus.* call will show a one-time prompt — click "Always allow".'}),$&&(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:"Models"}),P&&(0,n.jsx)("p",{className:"text-[11px] text-destructive",children:P}),R?(0,n.jsx)("div",{className:"space-y-2",children:q.map(e=>{let t=I.get(e)??[];return(0,n.jsxs)("div",{className:"space-y-1",children:[(0,n.jsxs)("p",{className:"text-[10px] font-mono text-muted-foreground/80",children:[e,"/"]}),(0,n.jsx)("div",{className:"grid grid-cols-1 gap-1 sm:grid-cols-2",children:t.map(t=>(0,n.jsx)(b,{label:t.model_id.slice(e.length+1),value:t.model_id,selected:t.enabled,disabled:M===t.id,onClick:()=>F(t)},t.id))})]},e)})}):(0,n.jsx)("div",{className:"grid grid-cols-1 gap-1 sm:grid-cols-2",children:C.map(e=>(0,n.jsx)(b,{label:e.model_id,value:e.model_id,selected:e.enabled,disabled:M===e.id,onClick:()=>F(e)},e.id))})]})]})]})}function b({label:e,value:t,selected:r,disabled:a,onClick:s}){return(0,n.jsxs)("button",{type:"button",disabled:a,onClick:s,title:t,className:(0,u.cn)("flex items-center gap-2 rounded border px-2 py-1.5 text-left text-[11px] transition disabled:opacity-60",r?"border-primary/50 bg-primary/10 text-foreground":"border-border bg-card hover:border-muted-foreground/30 text-muted-foreground"),children:[(0,n.jsx)("div",{className:(0,u.cn)("grid h-3 w-3 shrink-0 place-items-center rounded-sm border transition",r?"border-primary bg-primary text-primary-foreground":"border-border"),children:r&&(0,n.jsx)(d.A,{className:"h-2 w-2"})}),(0,n.jsx)("span",{className:"truncate font-mono",children:e})]})}},2545:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(3884).A)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},2881:(e,t,r)=>{"use strict";r.d(t,{Eu:()=>s,M5:()=>a,Y8:()=>d});var n=r(4411);async function a(e){return(0,n.T)("/openrouter/save-key",{method:"POST",body:JSON.stringify({apiKey:e})})}async function d(){return(0,n.T)("/openrouter/models")}async function s(e,t){return(0,n.T)("/openrouter/voices",{method:"POST",body:JSON.stringify(t?{modelIds:e,apiKey:t}:{modelIds:e})})}},3149:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(3884).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},3734:(e,t,r)=>{"use strict";r.d(t,{JR:()=>c,QJ:()=>d,VW:()=>s,YM:()=>u,m_:()=>i,r2:()=>p,u5:()=>l,x0:()=>m,ze:()=>n});let n={anthropic:"Claude",openai:"Codex",google:"Gemini",opencode:"OpenCode",moonshot:"Kimi"},a={anthropic:"bg-violet-400",openai:"bg-orange-400",google:"bg-blue-400",opencode:"bg-emerald-400",moonshot:"bg-pink-400"};function d(e){return e?n[e]??e:""}function s(e){return e?a[e]??"bg-muted":"bg-muted"}let i={claude:"Claude",codex:"Codex",gemini:"Gemini",opencode:"OpenCode",kimi:"Kimi",openrouter:"OpenRouter"},o={claude:"bg-violet-400",codex:"bg-orange-400",gemini:"bg-blue-400",opencode:"bg-emerald-400",kimi:"bg-pink-400",openrouter:"bg-cyan-400"};function l(e){return e?i[e]??e:""}function c(e){return e?o[e]??"bg-muted":"bg-muted"}let m={claude:"claude-opus-4-7",codex:"gpt-5.5",gemini:"gemini-3.1-pro-preview",opencode:"kimi-k2.6",kimi:"kimi-k2.6",openrouter:""};function u(e){if(e)return m[e]}let p={claude:{dot:"bg-violet-400",ring:"ring-violet-400/40",gradient:"bg-gradient-to-b from-violet-500/15 to-card"},codex:{dot:"bg-orange-400",ring:"ring-orange-400/40",gradient:"bg-gradient-to-b from-orange-500/15 to-card"},gemini:{dot:"bg-blue-400",ring:"ring-blue-400/40",gradient:"bg-gradient-to-b from-blue-500/15 to-card"},opencode:{dot:"bg-emerald-400",ring:"ring-emerald-400/40",gradient:"bg-gradient-to-b from-emerald-500/15 to-card"},kimi:{dot:"bg-pink-400",ring:"ring-pink-400/40",gradient:"bg-gradient-to-b from-pink-500/15 to-card"},openrouter:{dot:"bg-cyan-400",ring:"ring-cyan-400/40",gradient:"bg-gradient-to-b from-cyan-500/15 to-card"}}},4030:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(3884).A)("triangle-alert",[["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"}]])},7130:(e,t,r)=>{"use strict";r.d(t,{OpenRouterCard:()=>x});var n=r(9442),a=r(6074),d=r(9707),s=r(2545),i=r(3149),o=r(4030),l=r(9812),c=r(7362),m=r(2881),u=r(7847),p=r(3734);function x({voices:e}){let[t,r]=(0,a.useState)(e),[b,h]=(0,a.useState)(null),[f,y]=(0,a.useState)(!1),[j,N]=(0,a.useState)(!1),[v,k]=(0,a.useState)(""),[w,A]=(0,a.useState)(!1),[C,S]=(0,a.useState)(null),[M,_]=(0,a.useState)(!1),[P,O]=(0,a.useState)(""),[$,E]=(0,a.useState)(new Set),[R,T]=(0,a.useState)(!1),[z,L]=(0,a.useState)(null),[V,F]=(0,a.useState)(null),[I,q]=(0,a.useState)(null),[J,Y]=(0,a.useState)(null),G=t.filter(e=>e.enabled).length,K=t.length>0;async function W(){if(!f){y(!0),S(null),N(!0);try{let{models:e}=await (0,m.Y8)();e.sort((e,t)=>e.id.localeCompare(t.id)),h(e),_(!1)}catch(t){let e=t instanceof Error?t.message:String(t);_(!0),/no openrouter api key/i.test(e)||S(e)}finally{y(!1)}}}async function B(){if(0!==v.trim().length){A(!0),S(null);try{let e=await (0,m.M5)(v.trim());if(!e.valid)return void S(e.error??"Validation failed");k(""),_(!1);let{models:t}=await (0,m.Y8)();t.sort((e,t)=>e.id.localeCompare(t.id)),h(t),N(!0)}catch(e){S(e instanceof Error?e.message:String(e))}finally{A(!1)}}}async function D(){if(0!==$.size){T(!0),L(null),F(null);try{let e=await (0,m.Eu)(Array.from($)),t=e.added.length,n=e.skipped.length;F(`Added ${t} voice${1===t?"":"s"}`+(n>0?` \xb7 skipped ${n} (unknown id)`:"")),E(new Set);try{let e=await (0,u.listVoices)({source:"api",provider:"openrouter"});r(e)}catch{}}catch(e){L(e instanceof Error?e.message:String(e))}finally{T(!1)}}}async function H(e){q(e.id),Y(null);try{let t=await (0,u.updateVoice)(e.id,{enabled:!e.enabled});r(e=>e.map(e=>e.id===t.id?t:e))}catch(e){Y(e instanceof Error?e.message:String(e))}finally{q(null)}}let Q=P.trim()?(b??[]).filter(e=>e.id.toLowerCase().includes(P.toLowerCase().trim())||e.name.toLowerCase().includes(P.toLowerCase().trim())):b??[];return(0,n.jsxs)("div",{className:(0,c.cn)("flex h-72 flex-col rounded-lg border border-border",p.r2.openrouter.gradient),children:[(0,n.jsx)("div",{className:"flex shrink-0 items-center gap-3 px-4 py-3",children:(0,n.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[(0,n.jsx)("span",{className:(0,c.cn)("h-2 w-2 shrink-0 rounded-full",p.r2.openrouter.dot)}),(0,n.jsx)("h3",{className:"whitespace-nowrap text-sm font-semibold",children:"OpenRouter"}),K?(0,n.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium text-emerald-300",children:[(0,n.jsx)(d.A,{className:"h-3 w-3"})," ",G," enabled"]}):(0,n.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-card px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:"Not configured"})]})}),(0,n.jsxs)("div",{className:"flex flex-1 flex-col gap-3 overflow-y-auto border-t border-border bg-card/30 p-4",children:[!K&&(0,n.jsx)("p",{className:"text-[11px] leading-relaxed text-muted-foreground",children:"Voices added here run via OpenRouter's chat-completions API. Costs come back per-call from the API and surface on the run page."}),K&&(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:"Models"}),(0,n.jsx)("div",{className:"grid grid-cols-1 gap-1 sm:grid-cols-2",children:t.map(e=>(0,n.jsxs)("button",{type:"button",disabled:I===e.id,onClick:()=>H(e),title:e.model_id,className:(0,c.cn)("flex items-center gap-2 rounded border px-2 py-1.5 text-left text-[11px] transition disabled:opacity-60",e.enabled?"border-primary/50 bg-primary/10 text-foreground":"border-border bg-card text-muted-foreground hover:border-muted-foreground/30"),children:[(0,n.jsx)("div",{className:(0,c.cn)("grid h-3 w-3 shrink-0 place-items-center rounded-sm border transition",e.enabled?"border-primary bg-primary text-primary-foreground":"border-border"),children:e.enabled&&(0,n.jsx)(d.A,{className:"h-2 w-2"})}),(0,n.jsx)("span",{className:"truncate font-mono",children:e.model_id})]},e.id))}),J&&(0,n.jsx)("p",{className:"text-[11px] text-destructive",children:J})]}),(M||!K)&&(0,n.jsxs)("div",{className:"space-y-2 rounded-md border border-border bg-background/40 p-3",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("label",{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:K?"Replace API key":"OpenRouter API key"}),(0,n.jsxs)("a",{href:"https://openrouter.ai/keys",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-[10px] text-muted-foreground hover:text-foreground",children:["Get a key ",(0,n.jsx)(s.A,{className:"h-2.5 w-2.5"})]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("input",{type:"password",value:v,onChange:e=>k(e.target.value),placeholder:"sk-or-v1-…",disabled:w,className:"h-8 flex-1 rounded-md border border-border bg-background px-2 font-mono text-xs focus:border-primary/60 focus:outline-none"}),(0,n.jsxs)("button",{type:"button",onClick:B,disabled:w||0===v.trim().length,className:"inline-flex h-8 items-center gap-1.5 rounded-md border border-primary/40 bg-primary/10 px-3 text-[11px] font-medium text-primary transition hover:bg-primary/20 disabled:cursor-not-allowed disabled:opacity-50",children:[w?(0,n.jsx)(i.A,{className:"h-3 w-3 animate-spin"}):(0,n.jsx)(d.A,{className:"h-3 w-3"}),w?"Saving…":"Save"]})]}),C&&(0,n.jsxs)("p",{className:"flex items-center gap-1 text-[11px] text-destructive",children:[(0,n.jsx)(o.A,{className:"h-3 w-3"}),C]})]}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[K&&!j&&(0,n.jsxs)("button",{type:"button",onClick:W,disabled:f,className:"inline-flex h-8 items-center gap-1.5 rounded-md border border-border bg-card px-3 text-[11px] font-medium text-foreground transition hover:border-muted-foreground/30 disabled:opacity-50",children:[f?(0,n.jsx)(i.A,{className:"h-3 w-3 animate-spin"}):null,"Add more models"]}),K&&!M&&(0,n.jsx)("button",{type:"button",onClick:()=>_(!0),className:"text-[11px] text-muted-foreground underline-offset-2 hover:underline",children:"Replace API key"})]}),j&&(0,n.jsxs)(n.Fragment,{children:[f&&(0,n.jsxs)("p",{className:"flex items-center gap-2 text-[11px] text-muted-foreground",children:[(0,n.jsx)(i.A,{className:"h-3 w-3 animate-spin"})," Loading catalog…"]}),b&&b.length>0&&(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:K?"Add more models":"Pick models"}),(0,n.jsxs)("button",{type:"button",onClick:D,disabled:0===$.size||R,className:"inline-flex h-7 items-center gap-1.5 rounded-md border border-primary/40 bg-primary/10 px-2.5 text-[11px] font-medium text-primary transition hover:bg-primary/20 disabled:cursor-not-allowed disabled:opacity-50",children:[R?(0,n.jsx)(i.A,{className:"h-3 w-3 animate-spin"}):null,"Add ",$.size>0?$.size:""]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border bg-background/40 px-2",children:[(0,n.jsx)(l.A,{className:"h-3 w-3 text-muted-foreground"}),(0,n.jsx)("input",{type:"text",value:P,onChange:e=>O(e.target.value),placeholder:"filter by id or name…",className:"h-7 flex-1 bg-transparent text-[11px] focus:outline-none"}),(0,n.jsxs)("span",{className:"text-[10px] text-muted-foreground",children:[Q.length,"/",b.length]})]}),V&&(0,n.jsx)("p",{className:"text-[11px] text-emerald-300",children:V}),z&&(0,n.jsxs)("p",{className:"flex items-center gap-1 text-[11px] text-destructive",children:[(0,n.jsx)(o.A,{className:"h-3 w-3"}),z]}),(0,n.jsx)("div",{className:"max-h-72 overflow-y-auto rounded-md border border-border",children:Q.map(e=>{let r=$.has(e.id),a=t.some(t=>t.model_id===e.id);return(0,n.jsxs)("label",{className:(0,c.cn)("flex cursor-pointer items-center gap-2 border-b border-border px-2 py-1.5 text-[11px] last:border-b-0 hover:bg-card/40",a&&"opacity-50"),children:[(0,n.jsx)("input",{type:"checkbox",checked:r,disabled:a,onChange:t=>{E(r=>{let n=new Set(r);return t.target.checked?n.add(e.id):n.delete(e.id),n})},className:"h-3 w-3 shrink-0"}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsxs)("div",{className:"truncate font-mono text-[11px]",children:[e.id,a&&(0,n.jsx)("span",{className:"ml-1 text-[10px] text-muted-foreground",children:"\xb7 added"})]}),(0,n.jsxs)("div",{className:"truncate text-[10px] text-muted-foreground",children:[e.name,e.contextLength?` \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`:"",void 0!==e.inputCostPerMtok||void 0!==e.outputCostPerMtok?` \xb7 ${g(e.inputCostPerMtok)}/${g(e.outputCostPerMtok)} per Mtok`:""]})]})]},e.id)})})]})]})]})]})}function g(e){return void 0===e?"?":e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(2)}`}},8799:(e,t,r)=>{Promise.resolve().then(r.bind(r,821)),Promise.resolve().then(r.bind(r,8344)),Promise.resolve().then(r.bind(r,7130)),Promise.resolve().then(r.bind(r,1727))},9707:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(3884).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},9812:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(3884).A)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])}},e=>{e.O(0,[116,720,641,344,506,128,358],()=>e(e.s=8799)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[91],{4372:(e,n,t)=>{"use strict";t.d(n,{G:()=>a});var i=t(9442),o=t(821),r=t(8344);function a({children:e}){return(0,i.jsxs)("div",{className:"flex h-screen w-screen overflow-hidden bg-background text-foreground",children:[(0,i.jsx)(o.AppSidebar,{}),(0,i.jsxs)("div",{className:"flex flex-1 flex-col overflow-hidden",children:[(0,i.jsx)(r.MobileTopBar,{}),(0,i.jsx)("main",{className:"flex-1 overflow-y-auto",children:e})]})]})}},5249:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>R});var i=t(9442),o=t(6074),r=t(5902),a=t(4372),s=t(5358);function d(e,n){let t=[],i=!1,o={onmessage:null,onerror:null,onopen:null,readyState:0,url:"mock://demo",withCredentials:!1,addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!0,close:()=>{for(let e of(i=!0,t))clearTimeout(e)}};for(let r of[...e].sort((e,n)=>e.atMs-n.atMs)){let e=setTimeout(()=>{if(i)return;if(n){let e=r.payload;n("string"==typeof e.type?e.type:"",e.payload??{})}let e=o.onmessage;e&&e({data:JSON.stringify(r.payload)})},r.atMs);t.push(e)}return o}let c="review",l="**Verdict: approve**\n\n",p=[{agentName:"codex-cli-0",lineage:"codex",model:"gpt-5.5",binaryUsed:"codex",doneAtMs:3200,durationMs:3e3,usage:{inputTokens:6480,outputTokens:380,costUsd:.0094},answer:"## Codex review: `divide(a, b)`\n\n"+l+'Math is correct, types flow naturally, function is small and obvious. Approving with two notes.\n\n**The current helper:**\n```ts\nexport function divide(a: number, b: number) {\n return a / b;\n}\n```\n\n**Two minors before merge:**\n1. **Add a divide-by-zero guard.** `divide(x, 0)` silently returns `Infinity` — a footgun in any pipeline that math-chains:\n ```ts\n if (b === 0) throw new RangeError("divide: zero divisor");\n ```\n2. **Add a JSDoc block.** Three lines. Saves the next reader from reading the body to learn the type contract.'},{agentName:"gemini-cli-1",lineage:"gemini",model:"gemini-3.1-pro-preview",binaryUsed:"gemini-cli",doneAtMs:4400,durationMs:4200,usage:{inputTokens:6720,outputTokens:720,costUsd:.0258},answer:"## Gemini review: `divide(a, b)`\n\n"+l+'No structural issues. The function does one thing and the implementation matches its name. Approving with a strong suggestion to harden the test surface.\n\n**Suggested spec coverage:**\n```ts\ndescribe("divide", () => {\n it("returns a / b for finite inputs", () => {\n expect(divide(10, 2)).toBe(5);\n });\n it("rejects zero divisor", () => {\n expect(() => divide(10, 0)).toThrow();\n });\n it("rejects NaN", () => {\n expect(() => divide(NaN, 2)).toThrow();\n });\n it("rejects Infinity", () => {\n expect(() => divide(Infinity, 2)).toThrow();\n });\n});\n```\n\nFour cases close every hole I see by construction.'},{agentName:"claude-code-2",lineage:"claude",model:"claude-opus-4-7",binaryUsed:"claude-code",doneAtMs:5400,durationMs:5200,usage:{inputTokens:7100,outputTokens:1240,costUsd:.0517},answer:"## Claude review: `divide(a, b)`\n\n"+l+'Reads cleanly. The function does one thing and is trivially testable. Approving with two notes — neither blocking.\n\n**Note 1 — Zero-guard.**\n`divide(x, 0)` returns `Infinity` in JavaScript. That value flows silently through arithmetic and ends up in logs/dashboards as a real number. A typed error would prevent the silent corruption:\n```ts\nclass DivideError extends Error {}\nif (b === 0) throw new DivideError("zero divisor");\n```\n\n**Note 2 — Currency callers.**\nIf this lives on a billing/ledger hot path, prefer integer-cents or `decimal.js` over floats. IEEE 754 will accumulate cent-level drift in a high-volume ledger:\n```ts\n// safer for currency:\nexport function divideMoney(cents: number, n: number): number {\n return Math.round(cents / n);\n}\n```'},{agentName:"opencode-cli-3",lineage:"opencode",model:"opencode-go/kimi-k2.6",binaryUsed:"opencode",doneAtMs:2700,durationMs:2500,usage:{inputTokens:6240,outputTokens:280,costUsd:.0042},answer:"## Kimi review (via opencode)\n\n"+l+'Pragmatic helper. The math is correct; the holes are at the boundary, not the body. Approving — both fixes below are 60-second jobs that can land in a follow-up if you want to ship now.\n\n**Suggested patch:**\n```ts\n/**\n * Divide two finite numbers. Throws on zero divisor or non-finite input.\n */\nexport function divide(a: number, b: number): number {\n if (b === 0) throw new Error("divide: zero divisor");\n return a / b;\n}\n```\n\nAnd one test:\n```ts\nexpect(() => divide(1, 0)).toThrow("zero divisor");\n```'},{agentName:"opencode-cli-4",lineage:"opencode",model:"opencode-go/deepseek-v4-pro",binaryUsed:"opencode",doneAtMs:6200,durationMs:6e3,usage:{inputTokens:7340,outputTokens:1460,costUsd:.0228},answer:'## DeepSeek review (via opencode)\n\n**Verdict: request changes**\n\nThree blockers in a financial context. This helper would land me in a post-mortem inside three months on a busy ledger.\n\n**Blocker 1 — No divide-by-zero guard.**\n```ts\ndivide(100, 0); // → Infinity, silent corruption downstream\n```\nRequired:\n```ts\nif (b === 0) throw new DivideError("zero");\n```\n\n**Blocker 2 — No input validation.**\n```ts\ndivide("5" as any, 2); // → 2.5 (silent string coercion)\ndivide(NaN, 2); // → NaN (poisons later math)\ndivide(undefined as any, 2); // → NaN\n```\nRequired: `Number.isFinite(a) && Number.isFinite(b)` at the top.\n\n**Blocker 3 — Floats for money.**\nIEEE 754 + currency = audit-trail nightmare. Use integer-cents or `decimal.js`. Reproducer:\n```ts\n0.1 + 0.2 === 0.3; // false\ndivide(0.3, 0.1); // 2.9999999999999996\n```'},{agentName:"opencode-cli-5",lineage:"opencode",model:"opencode-go/qwen3.6-plus",binaryUsed:"opencode",doneAtMs:3700,durationMs:3500,usage:{inputTokens:6420,outputTokens:320,costUsd:.0061},answer:"## Qwen review (via opencode)\n\n"+l+"Reads cleanly. No defects in the body.\n\n**Minor — Missing documentation.**\nThree lines of JSDoc would let editor tooling surface the contract:\n```ts\n/**\n * @param a - dividend (finite number)\n * @param b - divisor (finite, non-zero)\n * @returns the quotient a / b\n */\n```\n\nHelpful for downstream callers, not blocking the merge."}];function u(e){return{participant:`reviewer-${e.agentName}`,role:"reviewer",agentName:e.agentName,lineage:e.lineage,hasAnswer:!1,model:e.model,pending:!1}}let h=[{round:1,participants:p.map(u)}],m={id:"demo-simple-6way",name:"External Review \xb7 Six Voices",description:"Six reviewers critique the artifact independently.",category:"review",agreementThreshold:"majority",onThresholdMet:"ask-user",maxRounds:1,driver:"external",driverHandoff:!1,verificationGate:"auto",costCapUsd:0,yoloDefault:!1,onError:"fail",notify:"dashboard-only",yaml:"",authorHandle:"demo",forks:0,popularity:0,phases:[{id:c,name:"External Review",description:"Six lineages critique the supplied artifact independently.",kind:"review_only",gate:"auto",doer:{lineage:"claude",models:[]},reviewer:{require:2,crossLineage:!0,candidates:["codex","gemini","claude","opencode"],candidatesWithModels:p.map(e=>({lineage:e.lineage,models:[e.model]}))},artifact:{label:"Artifact",hint:"",maxBytes:1048576},inputs:{include:[],exclude:[]},iterate:{max:1,onMax:"fail"},blindSpots:[],execution:"parallel",builtin:!0}]},v=e=>({type:"phase_start",payload:{phaseIdx:0,phaseId:c,kind:"review_only",role:"reviewer",agent:e},ts:Date.now()}),g=(e,n,t)=>({type:"phase_progress",payload:{phaseId:c,round:1,role:"reviewer",agent:e,elapsedMs:t,output:n},ts:Date.now()}),f=e=>({type:"participant_done",payload:{phaseId:c,round:1,role:"reviewer",agent:e},ts:Date.now()}),w={"codex-cli-0":"## Reviewing src/util/divide.ts\n\nCurrent implementation:\n```ts\nexport function divide(a: number, b: number) {\n return a / b;\n}\n```\n\nChecking input handling first.\n\nSpotted: no zero-guard. `divide(x, 0)` silently returns `Infinity`. In a billing pipeline that math-chains downstream, that becomes a ledger row.\n\nNo JSDoc either — readers have to read the body to learn the type contract.\n\nVerdict drafting: two minors, leaning approve with notes.","gemini-cli-1":"## Review \xb7 `divide(a, b)`\n\nReading the helper. Checking the type contract first:\n```ts\n(a: number, b: number) => number\n```\n\nCoverage gaps surfacing: `NaN`, `Infinity`, zero divisor — none asserted.\n\nDrafting a four-case spec block to close the holes by construction:\n```ts\nexpect(divide(10, 2)).toBe(5);\nexpect(() => divide(10, 0)).toThrow();\nexpect(() => divide(NaN, 2)).toThrow();\nexpect(() => divide(Infinity, 2)).toThrow();\n```\n\nApproving with this spec block as a follow-up.","claude-code-2":"## Review: divide helper\n\nLoading + cross-referencing the two callers:\n```ts\n// /billing/invoice.ts:42 — currently produces silent Infinity\nconst unitPrice = divide(invoice.total, invoice.quantity);\n\n// /reports/avg.ts:18 — already wraps in try/catch\nconst average = divide(sum, count);\n```\n\n`/billing/invoice.ts:42` is the smoking gun — confirms the silent-Infinity bug class is real, not theoretical.\n\nRecommendation:\n1. Add a zero-guard returning a typed `DivideError`.\n2. Stage `divideMoney(cents, n)` for currency callers in a follow-up.\n\nApproving the helper rewrite with these two notes.","opencode-cli-3":'## Kimi review (via opencode)\n\nInspecting `divide(a, b)`. Quick pass — math is correct, the holes are at the boundary.\n\nSuggested patch:\n```ts\n/** Divide two finite numbers. Throws on zero divisor or non-finite input. */\nexport function divide(a: number, b: number): number {\n if (b === 0) throw new Error("divide: zero divisor");\n return a / b;\n}\n```\n\nApproving — both fixes are 60-second jobs.',"opencode-cli-4":'## DeepSeek review (via opencode)\n\nLoading `divide()` + the two callers + the existing spec.\n\nReproducing the failure modes locally:\n```ts\ndivide(100, 0); // Infinity (silent corruption)\ndivide("5", 2); // 2.5 (silent string coercion)\ndivide(0.3, 0.1); // 2.9999999999999996 (IEEE 754)\n```\n\nThree blockers, all reproducible in <30 lines:\n1. **No divide-by-zero guard** — required: `Number.isFinite` check + typed error.\n2. **No input validation** — TypeScript types are erased at runtime; `as any` slips through.\n3. **Floats for money** — IEEE 754 + currency = audit-trail nightmare. Need integer-cents.\n\nWill request changes.',"opencode-cli-5":"## Qwen review (via opencode)\n\nQuick read — public API surface only.\n\nNo defects in the body. The implementation matches its name.\n\nDocumentation gap noted — three lines of JSDoc would let editor tooling surface the contract:\n```ts\n/**\n * @param a - dividend (finite number)\n * @param b - divisor (finite, non-zero)\n * @returns the quotient a / b\n */\n```\n\nApproving — JSDoc is the only minor."},b=(()=>{let e=[];for(let[n,t]of p.entries())e.push({atMs:200+20*n,payload:v(t.agentName)});for(let n of p){let t=function(e){let n=Math.floor(.3*e.length),t=Math.floor(.65*e.length);return[e.slice(0,n),e.slice(0,t),e]}(w[n.agentName]),i=[.25,.55,.85].map(e=>Math.round(n.doneAtMs*e));for(let[o,r]of t.entries())e.push({atMs:i[o],payload:g(n.agentName,r,i[o])})}for(let n of p)e.push({atMs:n.doneAtMs,payload:f(n.agentName)});let n=Math.max(...p.map(e=>e.doneAtMs));return e.push({atMs:n+200,payload:{type:"phase_done",payload:{phaseId:c,phaseIdx:0,kind:"review_only"},ts:Date.now()}}),e.push({atMs:n+400,payload:{type:"chat_done",payload:{status:"completed",verdict:"request_changes"},ts:Date.now()}}),e})(),y={agentName:"claude-code-doer",lineage:"claude",model:"claude-opus-4-7",binaryUsed:"claude-code",doneAtMs:3700,durationMs:3500},k=[{agentName:"codex-cli-0",lineage:"codex",model:"gpt-5.5",binaryUsed:"codex",doneAtMs:2800,durationMs:2600},{agentName:"gemini-cli-1",lineage:"gemini",model:"gemini-3.1-pro-preview",binaryUsed:"gemini-cli",doneAtMs:3500,durationMs:3300},{agentName:"claude-code-2",lineage:"claude",model:"claude-sonnet-4-6",binaryUsed:"claude-code",doneAtMs:3100,durationMs:2900},{agentName:"opencode-cli-3",lineage:"opencode",model:"opencode-go/kimi-k2.6",binaryUsed:"opencode",doneAtMs:3900,durationMs:3700},{agentName:"opencode-cli-4",lineage:"opencode",model:"opencode-go/deepseek-v4-pro",binaryUsed:"opencode",doneAtMs:4500,durationMs:4300}],T=[y,...k],x=[{id:"plan",name:"Plan",kind:"plan",description:"Doer drafts the implementation approach; three reviewers critique.",streams:["## Plan: divide() helper rewrite\n\n**Goal:** production-safe wrapper over `a / b`.\n\n**Three deliverables:**\n1. Zero-guard returning a typed `DivideError`.\n2. Strict input validation (numbers only, finite, non-NaN).\n3. Switch currency callers to integer-cents (`divideMoney(cents, n)` follow-up PR).\n\n**Acceptance tests:**\n```ts\nexpect(divide(10, 2)).toBe(5);\nexpect(() => divide(10, 0)).toThrow(DivideError);\nexpect(() => divide(NaN, 2)).toThrow(DivideError);\nexpect(() => divide(Infinity, 2)).toThrow(DivideError);\n```\n\n**Risks:** API churn for two callers (`/billing/invoice.ts:42`, `/reports/avg.ts:18`). Mitigation: ship v2 alongside, deprecate v1 over one minor.\n\n**Rollback:** revert single commit; no schema/migration touched.","## Codex review \xb7 plan\n\nReading the plan…\n\nThree-piece breakdown looks right:\n- zero-guard ✓\n- input validation ✓\n- decimal precision ✓\n\nAcceptance tests match the spec contract.\n\n**Approve** — sound plan. One ask: add a `bigint` handling note. The current plan is implicitly Number-only, which is the right call, but worth saying so explicitly so the next reader does not assume `BigInt` support.","## Gemini review \xb7 plan\n\nCross-checking acceptance tests against the spec contract:\n```ts\ndivide(10, 2) // 5 ✓\ndivide(10, 0) // throw ✓\ndivide(NaN, 2) // throw ✓\ndivide(Inf, 2) // throw ✓\n```\n\nConcrete enough to drive TDD.\n\n**Approve** — explicit zero-guard is the right move. One follow-up: surface the deprecation timeline in the PR body so the two affected callers can plan their cutover.","## Claude (sonnet) review \xb7 plan\n\nReading the plan + skimming the existing call sites.\n\nThree-piece breakdown is right. The `divideMoney` carve-out is the right ergonomic — keep `divide` for general arithmetic, steer money paths to integer-cents.\n\n**Approve** — one ask: pin the deprecation timeline (one minor? one major?) so the two callers can plan.","## Kimi review (via opencode) \xb7 plan\n\nPlan looks tight. Three deliverables map cleanly to three commits if you want to split for review.\n\nAcceptance test set is the right shape — unit tests against the contract, not the implementation.\n\n**Approve** — pragmatic and shippable.","## DeepSeek review \xb7 plan\n\nPulling the existing `divide()` implementation for context:\n```ts\nexport function divide(a, b) { return a / b; }\n```\n\nCross-checking against the silent-Infinity bug class.\n\nNeed a non-finite-input row added to the acceptance tests:\n```ts\nexpect(() => divide(Number.POSITIVE_INFINITY, 2)).toThrow(DivideError);\nexpect(() => divide(2, Number.NEGATIVE_INFINITY)).toThrow(DivideError);\n```\n\nThe silent-Infinity bug is what triggered this rewrite, so the test set should explicitly cover both directions.\n\n**Approve with notes** — solid plan, just close that gap."],usage:[{inputTokens:6420,outputTokens:1840,costUsd:.0682},{inputTokens:5800,outputTokens:380,costUsd:.0094},{inputTokens:6020,outputTokens:540,costUsd:.0241},{inputTokens:6020,outputTokens:410,costUsd:.0086},{inputTokens:6240,outputTokens:320,costUsd:.0048},{inputTokens:6280,outputTokens:1140,costUsd:.0488}]},{id:"spec",name:"Spec",kind:"spec",description:"Doer derives the API contract; reviewers check alignment.",streams:['## Spec: `divide(a, b)`\n\n```ts\nexport class DivideError extends Error {\n constructor(public readonly reason: "zero" | "non-finite") {\n super(`divide: ${reason}`);\n this.name = "DivideError";\n }\n}\n\nexport function divide(a: number, b: number): number;\n```\n\n**Contract:**\n- `b === 0` → throws `DivideError("zero")`\n- `!Number.isFinite(a)` → throws `DivideError("non-finite")`\n- `!Number.isFinite(b)` → throws `DivideError("non-finite")`\n- otherwise → returns `a / b`\n\n**Order of checks:** non-finite first so `divide(NaN, 0)` reports the more specific failure.',"## Codex review \xb7 spec\n\nReading the type signature:\n```ts\n(a: number, b: number) => number\n```\n\nClean. Examples cover happy + zero + non-finite.\n\n**Approve** — suggest adding NaN explicitly to the example block:\n```ts\nexpect(() => divide(NaN, 5)).toThrow(/non-finite/);\n```\n\n`Number.isFinite(NaN)` returns false so it is covered, but enumerating it makes the intent explicit.",'## Gemini review \xb7 spec\n\nThe `reason` discriminant on the error class is the right ergonomic for callers that need to branch:\n```ts\ntry { return divide(a, b); }\ncatch (err) {\n if (err instanceof DivideError && err.reason === "zero") return 0;\n throw err;\n}\n```\n\nThat pattern beats string parsing on `err.message`.\n\n**Approve** — no structural concerns.','## Claude (sonnet) review \xb7 spec\n\n`DivideError` class is well-scoped. The `name = "DivideError"` assignment is the kind of detail that pays off in stack traces:\n```\nDivideError: divide: zero\n at /billing/invoice.ts:42\n```\n\n**Approve.**',"## Kimi review (via opencode) \xb7 spec\n\nType signature is unambiguous. The `reason` discriminant lets callers branch on failure type without string parsing.\n\nOrder-of-checks (non-finite first) is the right call.\n\n**Approve** — ready for implement.","## DeepSeek review \xb7 spec\n\nLoading spec + cross-checking against plan.\n\nExamples should include negatives and -Infinity:\n```ts\nexpect(divide(-10, 2)).toBe(-5);\nexpect(divide(10, -2)).toBe(-5);\nexpect(() => divide(Number.NEGATIVE_INFINITY, 2)).toThrow();\n```\n\nThe spec contract handles them correctly via `Number.isFinite`, but the example block sets the test surface and should be exhaustive.\n\n**Approve with notes.**"],usage:[{inputTokens:7240,outputTokens:1620,costUsd:.0731},{inputTokens:6500,outputTokens:320,costUsd:.0086},{inputTokens:6720,outputTokens:460,costUsd:.0218},{inputTokens:6720,outputTokens:380,costUsd:.0078},{inputTokens:6900,outputTokens:280,costUsd:.0042},{inputTokens:6980,outputTokens:980,costUsd:.0431}]},{id:"implement",name:"Implement",kind:"implement",description:"Doer writes the code blind to tests; reviewers find bugs.",streams:['## Implementation: `src/util/divide.ts`\n\n```ts\nexport class DivideError extends Error {\n constructor(public readonly reason: "zero" | "non-finite") {\n super(`divide: ${reason}`);\n this.name = "DivideError";\n }\n}\n\nexport function divide(a: number, b: number): number {\n if (!Number.isFinite(a) || !Number.isFinite(b)) {\n throw new DivideError("non-finite");\n }\n if (b === 0) {\n throw new DivideError("zero");\n }\n return a / b;\n}\n```\n\n**Notes:**\n- Non-finite check first so `divide(NaN, 0)` reports `"non-finite"`, not `"zero"`.\n- `name` set on `DivideError` so stack traces read `DivideError: divide: zero`.','## Codex review \xb7 diff\n\nPulling the diff. Reading each branch:\n\n✓ `Number.isFinite` — rejects NaN, \xb1Infinity, non-numbers via type system.\n✓ Zero-check after — order is correct.\n✓ `DivideError` extends `Error` with `name` set.\n\nOrder of checks decision is the correct call:\n```ts\ndivide(NaN, 0); // → "non-finite" (more specific failure first)\n```\n\n**Approve** — implementation is clean. Nothing to push back on.','## Gemini review \xb7 diff\n\nThe patch matches the spec line-for-line.\n\nThe `name` assignment on `DivideError`:\n```ts\nthis.name = "DivideError";\n```\n\nis the kind of detail that pays off the first time someone reads a stack trace — `DivideError: divide: zero` is actionable; `Error: divide: zero` looks like a generic throw and gets noise-suppressed.\n\n**Approve.**',"## Claude (sonnet) review \xb7 diff\n\nReads cleanly. Inline validation is fine for two args; would extract `isInvalid()` if this grew.\n\nThe `name` assignment on `DivideError` is the right detail — actionable stack traces over generic `Error: ...` lines.\n\n**Approve.**","## Kimi review (via opencode) \xb7 diff\n\nSmall, obvious, complete. 13 lines that do exactly what the spec said.\n\nReads in one breath:\n```ts\nif (!Number.isFinite(a) || !Number.isFinite(b)) throw …;\nif (b === 0) throw …;\nreturn a / b;\n```\n\n**Approve.**","## DeepSeek review \xb7 diff\n\nDiff loaded. Walking each branch.\n\nWant a `-0` test note before merge — JavaScript treats `-0 === 0` as `true`, so the existing zero-guard catches it, but the test pins the behaviour:\n```ts\nexpect(divide(10, -2)).toBe(-5);\nexpect(() => divide(10, -0)).toThrow(/zero/); // -0 === 0\n```\n\nThe `-0` case is the easy miss — without the test, an accidental refactor to `if (b !== 0)` would pass the existing suite.\n\n**Approve with notes.**"],usage:[{inputTokens:8120,outputTokens:1980,costUsd:.0892},{inputTokens:7300,outputTokens:280,costUsd:.0072},{inputTokens:7440,outputTokens:460,costUsd:.0214},{inputTokens:7440,outputTokens:320,costUsd:.0066},{inputTokens:7620,outputTokens:360,costUsd:.0054},{inputTokens:7720,outputTokens:1180,costUsd:.0508}]},{id:"verify",name:"Verify",kind:"verify",description:"Run the test suite; reviewers confirm coverage.",streams:['## Verify\n\n```\n$ pnpm test src/util/divide.test.ts\n\n ✓ divide > returns a / b for valid inputs\n ✓ divide > handles negative dividends\n ✓ divide > handles negative divisors\n ✓ divide > -0 is treated as 0 (throws "zero")\n ✓ divide > throws "zero" for b=0\n ✓ divide > throws "non-finite" for NaN\n ✓ divide > throws "non-finite" for \xb1Infinity\n ✓ divide > non-finite check precedes zero check\n ✓ DivideError > extends Error\n ✓ DivideError > exposes reason discriminant\n\n Tests: 12 passed (12)\n Coverage: 100% lines, 100% branches\n Lint: clean\n Types: clean\n Time: 1.42s\n```',"## Codex review \xb7 verify\n\nTest report loaded.\n\n✓ 12/12 pass, 0 fail, 0 skip\n✓ Coverage 100/100/100\n✓ Lint + types clean\n\nEvery spec case has a corresponding test. The `-0` row is what the implement-phase review asked for; merged correctly.\n\n**Approve** — nothing to add.","## Gemini review \xb7 verify\n\nReading the report:\n```\nTests: 12 passed (12)\nCoverage: 100% lines, 100% branches\n```\n\nNo flakes, no skips. The `Tests: 12 passed (12)` line is exactly what the merge gate looks for.\n\nCoverage 100/100/100 satisfies the production-utility bar.\n\n**Approve.**","## Claude (sonnet) review \xb7 verify\n\n12 tests for a 13-line function is honest coverage, not theatre. Each test asserts a real boundary condition.\n\nThe `non-finite check precedes zero check` assertion is doing real work — it pins the order-of-checks decision so a future refactor cannot silently swap them.\n\n**Approve.**","## Kimi review (via opencode) \xb7 verify\n\n✓ 12/12 pass\n✓ Coverage 100/100/100\n✓ No flakes, no skips\n\nShip it.\n\n**Approve.**","## DeepSeek review \xb7 verify\n\nPulling test report + spec for cross-check.\n\n12 tests for a 13-line function is honest coverage, not theatre. Each test asserts a real boundary:\n\n- happy path \xd7 4\n- zero divisor + -0\n- NaN + \xb1Infinity\n- order-of-checks invariant\n- DivideError shape + discriminant\n\nThe `non-finite check precedes zero check` assertion pins the order-of-checks decision so a future refactor cannot silently swap them.\n\n**Approve.**"],usage:[{inputTokens:8980,outputTokens:1340,costUsd:.0641},{inputTokens:8060,outputTokens:80,costUsd:.0021},{inputTokens:8230,outputTokens:360,costUsd:.0179},{inputTokens:8230,outputTokens:280,costUsd:.0058},{inputTokens:8410,outputTokens:220,costUsd:.0033},{inputTokens:8520,outputTokens:1060,costUsd:.0418}]},{id:"pr",name:"Ship",kind:"pr",description:"Doer drafts the PR; reviewers approve merge.",streams:["## PR draft\n\n**Title:** `feat(util): production-safe divide() with DivideError + 100% branch coverage`\n\n**Body:**\n```\nIntroduces a hardened `divide()` per the attached spec.\n\nWhat:\n- New DivideError class with typed reason discriminant\n- divide(a, b) rejects non-finite + zero divisor\n- 12 new tests; 100% line + branch coverage\n- Two existing callers updated\n\nWhy:\n- Silent Infinity from divide(x, 0) was a footgun in /billing\n- IEEE 754 currency math driving audit-trail drift; companion\n divideMoney(cents, n) lands in #4129\n\nRisk:\n- Two callers updated; no other call sites in repo\n- Rollback: revert this commit (no schema touched)\n- Backward-compat: divide() v1 stays exported for one minor\n\nCloses #4127\n```","## Codex review \xb7 PR\n\nTitle is clear and accurate. Body follows the What/Why/Risk structure the merge gate expects.\n\nTwo-caller scope is small enough to revert cleanly if needed.\n\nCloses link is correct.\n\n**Approve merge.**","## Gemini review \xb7 PR\n\nContext is well-summarised. Calling out `divideMoney` as the follow-up PR (#4129) sets the right expectation for reviewers.\n\n`Closes #4127` ties the work to the original bug report — the audit trail is intact.\n\n**Approve merge.**","## Claude (sonnet) review \xb7 PR\n\nNo surprises. Two-caller scope is bounded, rollback is a single revert, backward-compat note covers the cutover.\n\nOn-call will not be paged at 3am over this one.\n\n**Approve merge.**","## Kimi review (via opencode) \xb7 PR\n\nTitle + body land the message in three sentences. Verify report linked. Risk section names the actual callers.\n\nShip it.\n\n**Approve merge.**","## DeepSeek review \xb7 PR\n\nPR + verify report cross-loaded. Risk + rollback note is the kind of thing on-call appreciates.\n\nVerify report (12 tests, 100% branch) is linked. Closes link to #4127 ties the work to the original bug.\n\nBackward-compat note covers the cutover window:\n> divide() v1 stays exported for one minor before removal\n\nNothing held back.\n\n**Approve merge.**"],usage:[{inputTokens:9420,outputTokens:1480,costUsd:.0712},{inputTokens:8460,outputTokens:60,costUsd:.0017},{inputTokens:8640,outputTokens:320,costUsd:.0163},{inputTokens:8640,outputTokens:280,costUsd:.0058},{inputTokens:8820,outputTokens:240,costUsd:.0036},{inputTokens:8930,outputTokens:920,costUsd:.0388}]}];function N(e,n){return{participant:`${e}-${n.agentName}`,role:e,agentName:n.agentName,lineage:n.lineage,hasAnswer:!1,model:n.model,pending:!1}}function E(e,n,t,i){return{participant:`${e}-${n.agentName}`,role:e,agentName:n.agentName,lineage:n.lineage,hasAnswer:!0,answer:t,durationMs:n.durationMs,model:n.model,binaryUsed:n.binaryUsed,modelUsed:n.model,usage:i}}function M(){return[N("doer",y),...k.map(e=>N("reviewer",e))]}let D=[{round:1,participants:M()}],A={id:"demo-complex-6way",name:"Plan → Ship Workflow",description:"Five-phase workflow with five reviewers per phase.",category:"review",agreementThreshold:"majority",onThresholdMet:"auto-finalize",maxRounds:1,driver:"external",driverHandoff:!1,verificationGate:"auto",costCapUsd:0,yoloDefault:!1,onError:"fail",notify:"dashboard-only",yaml:"",authorHandle:"demo",forks:0,popularity:0,phases:x.map(e=>({id:e.id,name:e.name,description:e.description,kind:e.kind,gate:"auto",doer:{lineage:"claude",models:["claude-opus-4-7"]},reviewer:{require:2,crossLineage:!0,candidates:["codex","gemini","opencode"],candidatesWithModels:k.map(e=>({lineage:e.lineage,models:[e.model]}))},artifact:{label:"Artifact",hint:"",maxBytes:1048576},inputs:{include:[],exclude:[]},iterate:{max:1,onMax:"fail"},blindSpots:[],execution:"parallel",builtin:!0}))},I=(e,n,t)=>{let i=[],o=n.id;for(let[r,a]of T.entries())i.push({atMs:t+30*r,payload:{type:"phase_start",payload:{phaseIdx:e,phaseId:o,kind:n.kind,role:0===r?"doer":"reviewer",agent:a.agentName},ts:Date.now()}});for(let[e,r]of T.entries()){let a=0===e?"doer":"reviewer",s=function(e){let n=Math.floor(.3*e.length),t=Math.floor(.65*e.length);return[e.slice(0,n),e.slice(0,t),e]}(n.streams[e]),d=[.25,.55,.85].map(e=>Math.round(r.doneAtMs*e));for(let[e,n]of s.entries())i.push({atMs:t+d[e],payload:{type:"phase_progress",payload:{phaseId:o,round:1,role:a,agent:r.agentName,elapsedMs:d[e],output:n},ts:Date.now()}})}for(let[e,n]of T.entries()){let r=0===e?"doer":"reviewer";i.push({atMs:t+n.doneAtMs,payload:{type:"participant_done",payload:{phaseId:o,round:1,role:r,agent:n.agentName},ts:Date.now()}})}return i.push({atMs:t+5e3-100,payload:{type:"phase_done",payload:{phaseId:o,phaseIdx:e,kind:n.kind},ts:Date.now()}}),i},U=(()=>{let e=[];for(let[n,t]of x.entries())e.push(...I(n,t,200+5e3*n));return e.push({atMs:200+5e3*x.length+300,payload:{type:"chat_done",payload:{status:"merged",verdict:"approve",prUrl:"https://github.com/example/repo/pull/4128"},ts:Date.now()}}),e})(),S={"simple-6way":{template:m,initialRounds:h,work:"Review src/util/divide.ts for production-readiness — six lineages, one pass, blockers welcome.",buildDataSource:function(){let e={currentParticipants:p.map(u)};return{createEventSource:()=>d(b,(n,t)=>{!function(e,n,t){if("participant_done"!==n)return;let i=t.agent;if(!i)return;let o=p.find(e=>e.agentName===i);o&&(e.currentParticipants=e.currentParticipants.map(e=>e.agentName===i?{participant:`reviewer-${o.agentName}`,role:"reviewer",agentName:o.agentName,lineage:o.lineage,hasAnswer:!0,answer:o.answer,durationMs:o.durationMs,model:o.model,binaryUsed:o.binaryUsed,modelUsed:o.model,usage:o.usage}:e))}(e,n,t)}),fetchArtifacts:()=>({rounds:[{round:1,participants:e.currentParticipants}]})}}},"complex-6way":{template:A,initialRounds:D,work:"feat(util): production-safe divide() — Plan → Spec → Implement → Verify → Ship • closes #4127",buildDataSource:function(){let e={currentPhaseIdx:0,currentParticipants:M()};return{createEventSource:()=>d(U,(n,t)=>{!function(e,n,t){if("phase_start"===n){let n=t.phaseIdx;"number"==typeof n&&n!==e.currentPhaseIdx&&(e.currentPhaseIdx=n,e.currentParticipants=M());return}if("participant_done"===n){let n=t.agent;if(!n)return;let i=T.findIndex(e=>e.agentName===n);if(i<0)return;let o=T[i],r=x[e.currentPhaseIdx];if(!r)return;let a=E(0===i?"doer":"reviewer",o,r.streams[i],r.usage[i]);e.currentParticipants=e.currentParticipants.map(e=>e.agentName===n?a:e);return}if("chat_done"===n){let n=x[x.length-1];e.currentParticipants=T.map((e,t)=>E(0===t?"doer":"reviewer",e,n.streams[t],n.usage[t])),e.currentPhaseIdx=x.length-1}}(e,n,t)}),fetchArtifacts:()=>({rounds:[{round:1,participants:e.currentParticipants}]})}}}};function R({params:e}){let{scenario:n}=(0,o.use)(e),t=S[n];t||(0,r.notFound)();let d=(0,o.useMemo)(()=>`demo-${n}-${Math.random().toString(36).slice(2,8)}`,[n]),c=(0,o.useMemo)(()=>t.buildDataSource(),[t]);return(0,i.jsx)(a.G,{children:(0,i.jsx)("div",{className:"mx-auto max-w-[1700px] px-6 py-6",children:(0,i.jsx)(s.LiveRunReal,{chatId:d,initialStatus:"reviewing",initialRounds:t.initialRounds,template:t.template,templateId:t.template.id,work:t.work,demoDataSource:c})})})}},6255:(e,n,t)=>{Promise.resolve().then(t.bind(t,5249))}},e=>{e.O(0,[116,720,344,977,506,128,358],()=>e(e.s=6255)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[91],{4372:(e,n,t)=>{"use strict";t.d(n,{G:()=>a});var i=t(9442),o=t(821),r=t(8344);function a({children:e}){return(0,i.jsxs)("div",{className:"flex h-screen w-screen overflow-hidden bg-background text-foreground",children:[(0,i.jsx)(o.AppSidebar,{}),(0,i.jsxs)("div",{className:"flex flex-1 flex-col overflow-hidden",children:[(0,i.jsx)(r.MobileTopBar,{}),(0,i.jsx)("main",{className:"flex-1 overflow-y-auto",children:e})]})]})}},5249:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>R});var i=t(9442),o=t(6074),r=t(5902),a=t(4372),s=t(5358);function d(e,n){let t=[],i=!1,o={onmessage:null,onerror:null,onopen:null,readyState:0,url:"mock://demo",withCredentials:!1,addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!0,close:()=>{for(let e of(i=!0,t))clearTimeout(e)}};for(let r of[...e].sort((e,n)=>e.atMs-n.atMs)){let e=setTimeout(()=>{if(i)return;if(n){let e=r.payload;n("string"==typeof e.type?e.type:"",e.payload??{})}let e=o.onmessage;e&&e({data:JSON.stringify(r.payload)})},r.atMs);t.push(e)}return o}let c="review",l="**Verdict: approve**\n\n",p=[{agentName:"codex-cli-0",lineage:"codex",model:"gpt-5.5",binaryUsed:"codex",doneAtMs:3200,durationMs:3e3,usage:{inputTokens:6480,outputTokens:380,costUsd:.0094},answer:"## Codex review: `divide(a, b)`\n\n"+l+'Math is correct, types flow naturally, function is small and obvious. Approving with two notes.\n\n**The current helper:**\n```ts\nexport function divide(a: number, b: number) {\n return a / b;\n}\n```\n\n**Two minors before merge:**\n1. **Add a divide-by-zero guard.** `divide(x, 0)` silently returns `Infinity` — a footgun in any pipeline that math-chains:\n ```ts\n if (b === 0) throw new RangeError("divide: zero divisor");\n ```\n2. **Add a JSDoc block.** Three lines. Saves the next reader from reading the body to learn the type contract.'},{agentName:"gemini-cli-1",lineage:"gemini",model:"gemini-3.1-pro-preview",binaryUsed:"gemini-cli",doneAtMs:4400,durationMs:4200,usage:{inputTokens:6720,outputTokens:720,costUsd:.0258},answer:"## Gemini review: `divide(a, b)`\n\n"+l+'No structural issues. The function does one thing and the implementation matches its name. Approving with a strong suggestion to harden the test surface.\n\n**Suggested spec coverage:**\n```ts\ndescribe("divide", () => {\n it("returns a / b for finite inputs", () => {\n expect(divide(10, 2)).toBe(5);\n });\n it("rejects zero divisor", () => {\n expect(() => divide(10, 0)).toThrow();\n });\n it("rejects NaN", () => {\n expect(() => divide(NaN, 2)).toThrow();\n });\n it("rejects Infinity", () => {\n expect(() => divide(Infinity, 2)).toThrow();\n });\n});\n```\n\nFour cases close every hole I see by construction.'},{agentName:"claude-code-2",lineage:"claude",model:"claude-opus-4-7",binaryUsed:"claude-code",doneAtMs:5400,durationMs:5200,usage:{inputTokens:7100,outputTokens:1240,costUsd:.0517},answer:"## Claude review: `divide(a, b)`\n\n"+l+'Reads cleanly. The function does one thing and is trivially testable. Approving with two notes — neither blocking.\n\n**Note 1 — Zero-guard.**\n`divide(x, 0)` returns `Infinity` in JavaScript. That value flows silently through arithmetic and ends up in logs/dashboards as a real number. A typed error would prevent the silent corruption:\n```ts\nclass DivideError extends Error {}\nif (b === 0) throw new DivideError("zero divisor");\n```\n\n**Note 2 — Currency callers.**\nIf this lives on a billing/ledger hot path, prefer integer-cents or `decimal.js` over floats. IEEE 754 will accumulate cent-level drift in a high-volume ledger:\n```ts\n// safer for currency:\nexport function divideMoney(cents: number, n: number): number {\n return Math.round(cents / n);\n}\n```'},{agentName:"opencode-cli-3",lineage:"opencode",model:"opencode-go/kimi-k2.6",binaryUsed:"opencode",doneAtMs:2700,durationMs:2500,usage:{inputTokens:6240,outputTokens:280,costUsd:.0042},answer:"## Kimi review (via opencode)\n\n"+l+'Pragmatic helper. The math is correct; the holes are at the boundary, not the body. Approving — both fixes below are 60-second jobs that can land in a follow-up if you want to ship now.\n\n**Suggested patch:**\n```ts\n/**\n * Divide two finite numbers. Throws on zero divisor or non-finite input.\n */\nexport function divide(a: number, b: number): number {\n if (b === 0) throw new Error("divide: zero divisor");\n return a / b;\n}\n```\n\nAnd one test:\n```ts\nexpect(() => divide(1, 0)).toThrow("zero divisor");\n```'},{agentName:"opencode-cli-4",lineage:"opencode",model:"opencode-go/deepseek-v4-pro",binaryUsed:"opencode",doneAtMs:6200,durationMs:6e3,usage:{inputTokens:7340,outputTokens:1460,costUsd:.0228},answer:'## DeepSeek review (via opencode)\n\n**Verdict: request changes**\n\nThree blockers in a financial context. This helper would land me in a post-mortem inside three months on a busy ledger.\n\n**Blocker 1 — No divide-by-zero guard.**\n```ts\ndivide(100, 0); // → Infinity, silent corruption downstream\n```\nRequired:\n```ts\nif (b === 0) throw new DivideError("zero");\n```\n\n**Blocker 2 — No input validation.**\n```ts\ndivide("5" as any, 2); // → 2.5 (silent string coercion)\ndivide(NaN, 2); // → NaN (poisons later math)\ndivide(undefined as any, 2); // → NaN\n```\nRequired: `Number.isFinite(a) && Number.isFinite(b)` at the top.\n\n**Blocker 3 — Floats for money.**\nIEEE 754 + currency = audit-trail nightmare. Use integer-cents or `decimal.js`. Reproducer:\n```ts\n0.1 + 0.2 === 0.3; // false\ndivide(0.3, 0.1); // 2.9999999999999996\n```'},{agentName:"opencode-cli-5",lineage:"opencode",model:"opencode-go/qwen3.6-plus",binaryUsed:"opencode",doneAtMs:3700,durationMs:3500,usage:{inputTokens:6420,outputTokens:320,costUsd:.0061},answer:"## Qwen review (via opencode)\n\n"+l+"Reads cleanly. No defects in the body.\n\n**Minor — Missing documentation.**\nThree lines of JSDoc would let editor tooling surface the contract:\n```ts\n/**\n * @param a - dividend (finite number)\n * @param b - divisor (finite, non-zero)\n * @returns the quotient a / b\n */\n```\n\nHelpful for downstream callers, not blocking the merge."}];function u(e){return{participant:`reviewer-${e.agentName}`,role:"reviewer",agentName:e.agentName,lineage:e.lineage,hasAnswer:!1,model:e.model,pending:!1}}let h=[{round:1,participants:p.map(u)}],m={id:"demo-simple-6way",name:"External Review \xb7 Six Voices",description:"Six reviewers critique the artifact independently.",category:"review",agreementThreshold:"majority",onThresholdMet:"ask-user",maxRounds:1,driver:"external",driverHandoff:!1,verificationGate:"auto",costCapUsd:0,yoloDefault:!1,onError:"fail",notify:"dashboard-only",yaml:"",authorHandle:"demo",forks:0,popularity:0,phases:[{id:c,name:"External Review",description:"Six lineages critique the supplied artifact independently.",kind:"review_only",gate:"auto",doer:{lineage:"claude",models:[]},reviewer:{require:2,crossLineage:!0,candidates:["codex","gemini","claude","opencode"],candidatesWithModels:p.map(e=>({lineage:e.lineage,models:[e.model]}))},artifact:{label:"Artifact",hint:"",maxBytes:1048576},inputs:{include:[],exclude:[]},iterate:{max:1,onMax:"fail"},blindSpots:[],execution:"parallel",builtin:!0}]},v=e=>({type:"phase_start",payload:{phaseIdx:0,phaseId:c,kind:"review_only",role:"reviewer",agent:e},ts:Date.now()}),g=(e,n,t)=>({type:"phase_progress",payload:{phaseId:c,round:1,role:"reviewer",agent:e,elapsedMs:t,output:n},ts:Date.now()}),f=e=>({type:"participant_done",payload:{phaseId:c,round:1,role:"reviewer",agent:e},ts:Date.now()}),w={"codex-cli-0":"## Reviewing src/util/divide.ts\n\nCurrent implementation:\n```ts\nexport function divide(a: number, b: number) {\n return a / b;\n}\n```\n\nChecking input handling first.\n\nSpotted: no zero-guard. `divide(x, 0)` silently returns `Infinity`. In a billing pipeline that math-chains downstream, that becomes a ledger row.\n\nNo JSDoc either — readers have to read the body to learn the type contract.\n\nVerdict drafting: two minors, leaning approve with notes.","gemini-cli-1":"## Review \xb7 `divide(a, b)`\n\nReading the helper. Checking the type contract first:\n```ts\n(a: number, b: number) => number\n```\n\nCoverage gaps surfacing: `NaN`, `Infinity`, zero divisor — none asserted.\n\nDrafting a four-case spec block to close the holes by construction:\n```ts\nexpect(divide(10, 2)).toBe(5);\nexpect(() => divide(10, 0)).toThrow();\nexpect(() => divide(NaN, 2)).toThrow();\nexpect(() => divide(Infinity, 2)).toThrow();\n```\n\nApproving with this spec block as a follow-up.","claude-code-2":"## Review: divide helper\n\nLoading + cross-referencing the two callers:\n```ts\n// /billing/invoice.ts:42 — currently produces silent Infinity\nconst unitPrice = divide(invoice.total, invoice.quantity);\n\n// /reports/avg.ts:18 — already wraps in try/catch\nconst average = divide(sum, count);\n```\n\n`/billing/invoice.ts:42` is the smoking gun — confirms the silent-Infinity bug class is real, not theoretical.\n\nRecommendation:\n1. Add a zero-guard returning a typed `DivideError`.\n2. Stage `divideMoney(cents, n)` for currency callers in a follow-up.\n\nApproving the helper rewrite with these two notes.","opencode-cli-3":'## Kimi review (via opencode)\n\nInspecting `divide(a, b)`. Quick pass — math is correct, the holes are at the boundary.\n\nSuggested patch:\n```ts\n/** Divide two finite numbers. Throws on zero divisor or non-finite input. */\nexport function divide(a: number, b: number): number {\n if (b === 0) throw new Error("divide: zero divisor");\n return a / b;\n}\n```\n\nApproving — both fixes are 60-second jobs.',"opencode-cli-4":'## DeepSeek review (via opencode)\n\nLoading `divide()` + the two callers + the existing spec.\n\nReproducing the failure modes locally:\n```ts\ndivide(100, 0); // Infinity (silent corruption)\ndivide("5", 2); // 2.5 (silent string coercion)\ndivide(0.3, 0.1); // 2.9999999999999996 (IEEE 754)\n```\n\nThree blockers, all reproducible in <30 lines:\n1. **No divide-by-zero guard** — required: `Number.isFinite` check + typed error.\n2. **No input validation** — TypeScript types are erased at runtime; `as any` slips through.\n3. **Floats for money** — IEEE 754 + currency = audit-trail nightmare. Need integer-cents.\n\nWill request changes.',"opencode-cli-5":"## Qwen review (via opencode)\n\nQuick read — public API surface only.\n\nNo defects in the body. The implementation matches its name.\n\nDocumentation gap noted — three lines of JSDoc would let editor tooling surface the contract:\n```ts\n/**\n * @param a - dividend (finite number)\n * @param b - divisor (finite, non-zero)\n * @returns the quotient a / b\n */\n```\n\nApproving — JSDoc is the only minor."},b=(()=>{let e=[];for(let[n,t]of p.entries())e.push({atMs:200+20*n,payload:v(t.agentName)});for(let n of p){let t=function(e){let n=Math.floor(.3*e.length),t=Math.floor(.65*e.length);return[e.slice(0,n),e.slice(0,t),e]}(w[n.agentName]),i=[.25,.55,.85].map(e=>Math.round(n.doneAtMs*e));for(let[o,r]of t.entries())e.push({atMs:i[o],payload:g(n.agentName,r,i[o])})}for(let n of p)e.push({atMs:n.doneAtMs,payload:f(n.agentName)});let n=Math.max(...p.map(e=>e.doneAtMs));return e.push({atMs:n+200,payload:{type:"phase_done",payload:{phaseId:c,phaseIdx:0,kind:"review_only"},ts:Date.now()}}),e.push({atMs:n+400,payload:{type:"chat_done",payload:{status:"completed",verdict:"request_changes"},ts:Date.now()}}),e})(),y={agentName:"claude-code-doer",lineage:"claude",model:"claude-opus-4-7",binaryUsed:"claude-code",doneAtMs:3700,durationMs:3500},k=[{agentName:"codex-cli-0",lineage:"codex",model:"gpt-5.5",binaryUsed:"codex",doneAtMs:2800,durationMs:2600},{agentName:"gemini-cli-1",lineage:"gemini",model:"gemini-3.1-pro-preview",binaryUsed:"gemini-cli",doneAtMs:3500,durationMs:3300},{agentName:"claude-code-2",lineage:"claude",model:"claude-sonnet-4-6",binaryUsed:"claude-code",doneAtMs:3100,durationMs:2900},{agentName:"opencode-cli-3",lineage:"opencode",model:"opencode-go/kimi-k2.6",binaryUsed:"opencode",doneAtMs:3900,durationMs:3700},{agentName:"opencode-cli-4",lineage:"opencode",model:"opencode-go/deepseek-v4-pro",binaryUsed:"opencode",doneAtMs:4500,durationMs:4300}],T=[y,...k],x=[{id:"plan",name:"Plan",kind:"plan",description:"Doer drafts the implementation approach; three reviewers critique.",streams:["## Plan: divide() helper rewrite\n\n**Goal:** production-safe wrapper over `a / b`.\n\n**Three deliverables:**\n1. Zero-guard returning a typed `DivideError`.\n2. Strict input validation (numbers only, finite, non-NaN).\n3. Switch currency callers to integer-cents (`divideMoney(cents, n)` follow-up PR).\n\n**Acceptance tests:**\n```ts\nexpect(divide(10, 2)).toBe(5);\nexpect(() => divide(10, 0)).toThrow(DivideError);\nexpect(() => divide(NaN, 2)).toThrow(DivideError);\nexpect(() => divide(Infinity, 2)).toThrow(DivideError);\n```\n\n**Risks:** API churn for two callers (`/billing/invoice.ts:42`, `/reports/avg.ts:18`). Mitigation: ship v2 alongside, deprecate v1 over one minor.\n\n**Rollback:** revert single commit; no schema/migration touched.","## Codex review \xb7 plan\n\nReading the plan…\n\nThree-piece breakdown looks right:\n- zero-guard ✓\n- input validation ✓\n- decimal precision ✓\n\nAcceptance tests match the spec contract.\n\n**Approve** — sound plan. One ask: add a `bigint` handling note. The current plan is implicitly Number-only, which is the right call, but worth saying so explicitly so the next reader does not assume `BigInt` support.","## Gemini review \xb7 plan\n\nCross-checking acceptance tests against the spec contract:\n```ts\ndivide(10, 2) // 5 ✓\ndivide(10, 0) // throw ✓\ndivide(NaN, 2) // throw ✓\ndivide(Inf, 2) // throw ✓\n```\n\nConcrete enough to drive TDD.\n\n**Approve** — explicit zero-guard is the right move. One follow-up: surface the deprecation timeline in the PR body so the two affected callers can plan their cutover.","## Claude (sonnet) review \xb7 plan\n\nReading the plan + skimming the existing call sites.\n\nThree-piece breakdown is right. The `divideMoney` carve-out is the right ergonomic — keep `divide` for general arithmetic, steer money paths to integer-cents.\n\n**Approve** — one ask: pin the deprecation timeline (one minor? one major?) so the two callers can plan.","## Kimi review (via opencode) \xb7 plan\n\nPlan looks tight. Three deliverables map cleanly to three commits if you want to split for review.\n\nAcceptance test set is the right shape — unit tests against the contract, not the implementation.\n\n**Approve** — pragmatic and shippable.","## DeepSeek review \xb7 plan\n\nPulling the existing `divide()` implementation for context:\n```ts\nexport function divide(a, b) { return a / b; }\n```\n\nCross-checking against the silent-Infinity bug class.\n\nNeed a non-finite-input row added to the acceptance tests:\n```ts\nexpect(() => divide(Number.POSITIVE_INFINITY, 2)).toThrow(DivideError);\nexpect(() => divide(2, Number.NEGATIVE_INFINITY)).toThrow(DivideError);\n```\n\nThe silent-Infinity bug is what triggered this rewrite, so the test set should explicitly cover both directions.\n\n**Approve with notes** — solid plan, just close that gap."],usage:[{inputTokens:6420,outputTokens:1840,costUsd:.0682},{inputTokens:5800,outputTokens:380,costUsd:.0094},{inputTokens:6020,outputTokens:540,costUsd:.0241},{inputTokens:6020,outputTokens:410,costUsd:.0086},{inputTokens:6240,outputTokens:320,costUsd:.0048},{inputTokens:6280,outputTokens:1140,costUsd:.0488}]},{id:"spec",name:"Spec",kind:"spec",description:"Doer derives the API contract; reviewers check alignment.",streams:['## Spec: `divide(a, b)`\n\n```ts\nexport class DivideError extends Error {\n constructor(public readonly reason: "zero" | "non-finite") {\n super(`divide: ${reason}`);\n this.name = "DivideError";\n }\n}\n\nexport function divide(a: number, b: number): number;\n```\n\n**Contract:**\n- `b === 0` → throws `DivideError("zero")`\n- `!Number.isFinite(a)` → throws `DivideError("non-finite")`\n- `!Number.isFinite(b)` → throws `DivideError("non-finite")`\n- otherwise → returns `a / b`\n\n**Order of checks:** non-finite first so `divide(NaN, 0)` reports the more specific failure.',"## Codex review \xb7 spec\n\nReading the type signature:\n```ts\n(a: number, b: number) => number\n```\n\nClean. Examples cover happy + zero + non-finite.\n\n**Approve** — suggest adding NaN explicitly to the example block:\n```ts\nexpect(() => divide(NaN, 5)).toThrow(/non-finite/);\n```\n\n`Number.isFinite(NaN)` returns false so it is covered, but enumerating it makes the intent explicit.",'## Gemini review \xb7 spec\n\nThe `reason` discriminant on the error class is the right ergonomic for callers that need to branch:\n```ts\ntry { return divide(a, b); }\ncatch (err) {\n if (err instanceof DivideError && err.reason === "zero") return 0;\n throw err;\n}\n```\n\nThat pattern beats string parsing on `err.message`.\n\n**Approve** — no structural concerns.','## Claude (sonnet) review \xb7 spec\n\n`DivideError` class is well-scoped. The `name = "DivideError"` assignment is the kind of detail that pays off in stack traces:\n```\nDivideError: divide: zero\n at /billing/invoice.ts:42\n```\n\n**Approve.**',"## Kimi review (via opencode) \xb7 spec\n\nType signature is unambiguous. The `reason` discriminant lets callers branch on failure type without string parsing.\n\nOrder-of-checks (non-finite first) is the right call.\n\n**Approve** — ready for implement.","## DeepSeek review \xb7 spec\n\nLoading spec + cross-checking against plan.\n\nExamples should include negatives and -Infinity:\n```ts\nexpect(divide(-10, 2)).toBe(-5);\nexpect(divide(10, -2)).toBe(-5);\nexpect(() => divide(Number.NEGATIVE_INFINITY, 2)).toThrow();\n```\n\nThe spec contract handles them correctly via `Number.isFinite`, but the example block sets the test surface and should be exhaustive.\n\n**Approve with notes.**"],usage:[{inputTokens:7240,outputTokens:1620,costUsd:.0731},{inputTokens:6500,outputTokens:320,costUsd:.0086},{inputTokens:6720,outputTokens:460,costUsd:.0218},{inputTokens:6720,outputTokens:380,costUsd:.0078},{inputTokens:6900,outputTokens:280,costUsd:.0042},{inputTokens:6980,outputTokens:980,costUsd:.0431}]},{id:"implement",name:"Implement",kind:"implement",description:"Doer writes the code blind to tests; reviewers find bugs.",streams:['## Implementation: `src/util/divide.ts`\n\n```ts\nexport class DivideError extends Error {\n constructor(public readonly reason: "zero" | "non-finite") {\n super(`divide: ${reason}`);\n this.name = "DivideError";\n }\n}\n\nexport function divide(a: number, b: number): number {\n if (!Number.isFinite(a) || !Number.isFinite(b)) {\n throw new DivideError("non-finite");\n }\n if (b === 0) {\n throw new DivideError("zero");\n }\n return a / b;\n}\n```\n\n**Notes:**\n- Non-finite check first so `divide(NaN, 0)` reports `"non-finite"`, not `"zero"`.\n- `name` set on `DivideError` so stack traces read `DivideError: divide: zero`.','## Codex review \xb7 diff\n\nPulling the diff. Reading each branch:\n\n✓ `Number.isFinite` — rejects NaN, \xb1Infinity, non-numbers via type system.\n✓ Zero-check after — order is correct.\n✓ `DivideError` extends `Error` with `name` set.\n\nOrder of checks decision is the correct call:\n```ts\ndivide(NaN, 0); // → "non-finite" (more specific failure first)\n```\n\n**Approve** — implementation is clean. Nothing to push back on.','## Gemini review \xb7 diff\n\nThe patch matches the spec line-for-line.\n\nThe `name` assignment on `DivideError`:\n```ts\nthis.name = "DivideError";\n```\n\nis the kind of detail that pays off the first time someone reads a stack trace — `DivideError: divide: zero` is actionable; `Error: divide: zero` looks like a generic throw and gets noise-suppressed.\n\n**Approve.**',"## Claude (sonnet) review \xb7 diff\n\nReads cleanly. Inline validation is fine for two args; would extract `isInvalid()` if this grew.\n\nThe `name` assignment on `DivideError` is the right detail — actionable stack traces over generic `Error: ...` lines.\n\n**Approve.**","## Kimi review (via opencode) \xb7 diff\n\nSmall, obvious, complete. 13 lines that do exactly what the spec said.\n\nReads in one breath:\n```ts\nif (!Number.isFinite(a) || !Number.isFinite(b)) throw …;\nif (b === 0) throw …;\nreturn a / b;\n```\n\n**Approve.**","## DeepSeek review \xb7 diff\n\nDiff loaded. Walking each branch.\n\nWant a `-0` test note before merge — JavaScript treats `-0 === 0` as `true`, so the existing zero-guard catches it, but the test pins the behaviour:\n```ts\nexpect(divide(10, -2)).toBe(-5);\nexpect(() => divide(10, -0)).toThrow(/zero/); // -0 === 0\n```\n\nThe `-0` case is the easy miss — without the test, an accidental refactor to `if (b !== 0)` would pass the existing suite.\n\n**Approve with notes.**"],usage:[{inputTokens:8120,outputTokens:1980,costUsd:.0892},{inputTokens:7300,outputTokens:280,costUsd:.0072},{inputTokens:7440,outputTokens:460,costUsd:.0214},{inputTokens:7440,outputTokens:320,costUsd:.0066},{inputTokens:7620,outputTokens:360,costUsd:.0054},{inputTokens:7720,outputTokens:1180,costUsd:.0508}]},{id:"verify",name:"Verify",kind:"verify",description:"Run the test suite; reviewers confirm coverage.",streams:['## Verify\n\n```\n$ pnpm test src/util/divide.test.ts\n\n ✓ divide > returns a / b for valid inputs\n ✓ divide > handles negative dividends\n ✓ divide > handles negative divisors\n ✓ divide > -0 is treated as 0 (throws "zero")\n ✓ divide > throws "zero" for b=0\n ✓ divide > throws "non-finite" for NaN\n ✓ divide > throws "non-finite" for \xb1Infinity\n ✓ divide > non-finite check precedes zero check\n ✓ DivideError > extends Error\n ✓ DivideError > exposes reason discriminant\n\n Tests: 12 passed (12)\n Coverage: 100% lines, 100% branches\n Lint: clean\n Types: clean\n Time: 1.42s\n```',"## Codex review \xb7 verify\n\nTest report loaded.\n\n✓ 12/12 pass, 0 fail, 0 skip\n✓ Coverage 100/100/100\n✓ Lint + types clean\n\nEvery spec case has a corresponding test. The `-0` row is what the implement-phase review asked for; merged correctly.\n\n**Approve** — nothing to add.","## Gemini review \xb7 verify\n\nReading the report:\n```\nTests: 12 passed (12)\nCoverage: 100% lines, 100% branches\n```\n\nNo flakes, no skips. The `Tests: 12 passed (12)` line is exactly what the merge gate looks for.\n\nCoverage 100/100/100 satisfies the production-utility bar.\n\n**Approve.**","## Claude (sonnet) review \xb7 verify\n\n12 tests for a 13-line function is honest coverage, not theatre. Each test asserts a real boundary condition.\n\nThe `non-finite check precedes zero check` assertion is doing real work — it pins the order-of-checks decision so a future refactor cannot silently swap them.\n\n**Approve.**","## Kimi review (via opencode) \xb7 verify\n\n✓ 12/12 pass\n✓ Coverage 100/100/100\n✓ No flakes, no skips\n\nShip it.\n\n**Approve.**","## DeepSeek review \xb7 verify\n\nPulling test report + spec for cross-check.\n\n12 tests for a 13-line function is honest coverage, not theatre. Each test asserts a real boundary:\n\n- happy path \xd7 4\n- zero divisor + -0\n- NaN + \xb1Infinity\n- order-of-checks invariant\n- DivideError shape + discriminant\n\nThe `non-finite check precedes zero check` assertion pins the order-of-checks decision so a future refactor cannot silently swap them.\n\n**Approve.**"],usage:[{inputTokens:8980,outputTokens:1340,costUsd:.0641},{inputTokens:8060,outputTokens:80,costUsd:.0021},{inputTokens:8230,outputTokens:360,costUsd:.0179},{inputTokens:8230,outputTokens:280,costUsd:.0058},{inputTokens:8410,outputTokens:220,costUsd:.0033},{inputTokens:8520,outputTokens:1060,costUsd:.0418}]},{id:"pr",name:"Ship",kind:"pr",description:"Doer drafts the PR; reviewers approve merge.",streams:["## PR draft\n\n**Title:** `feat(util): production-safe divide() with DivideError + 100% branch coverage`\n\n**Body:**\n```\nIntroduces a hardened `divide()` per the attached spec.\n\nWhat:\n- New DivideError class with typed reason discriminant\n- divide(a, b) rejects non-finite + zero divisor\n- 12 new tests; 100% line + branch coverage\n- Two existing callers updated\n\nWhy:\n- Silent Infinity from divide(x, 0) was a footgun in /billing\n- IEEE 754 currency math driving audit-trail drift; companion\n divideMoney(cents, n) lands in #4129\n\nRisk:\n- Two callers updated; no other call sites in repo\n- Rollback: revert this commit (no schema touched)\n- Backward-compat: divide() v1 stays exported for one minor\n\nCloses #4127\n```","## Codex review \xb7 PR\n\nTitle is clear and accurate. Body follows the What/Why/Risk structure the merge gate expects.\n\nTwo-caller scope is small enough to revert cleanly if needed.\n\nCloses link is correct.\n\n**Approve merge.**","## Gemini review \xb7 PR\n\nContext is well-summarised. Calling out `divideMoney` as the follow-up PR (#4129) sets the right expectation for reviewers.\n\n`Closes #4127` ties the work to the original bug report — the audit trail is intact.\n\n**Approve merge.**","## Claude (sonnet) review \xb7 PR\n\nNo surprises. Two-caller scope is bounded, rollback is a single revert, backward-compat note covers the cutover.\n\nOn-call will not be paged at 3am over this one.\n\n**Approve merge.**","## Kimi review (via opencode) \xb7 PR\n\nTitle + body land the message in three sentences. Verify report linked. Risk section names the actual callers.\n\nShip it.\n\n**Approve merge.**","## DeepSeek review \xb7 PR\n\nPR + verify report cross-loaded. Risk + rollback note is the kind of thing on-call appreciates.\n\nVerify report (12 tests, 100% branch) is linked. Closes link to #4127 ties the work to the original bug.\n\nBackward-compat note covers the cutover window:\n> divide() v1 stays exported for one minor before removal\n\nNothing held back.\n\n**Approve merge.**"],usage:[{inputTokens:9420,outputTokens:1480,costUsd:.0712},{inputTokens:8460,outputTokens:60,costUsd:.0017},{inputTokens:8640,outputTokens:320,costUsd:.0163},{inputTokens:8640,outputTokens:280,costUsd:.0058},{inputTokens:8820,outputTokens:240,costUsd:.0036},{inputTokens:8930,outputTokens:920,costUsd:.0388}]}];function N(e,n){return{participant:`${e}-${n.agentName}`,role:e,agentName:n.agentName,lineage:n.lineage,hasAnswer:!1,model:n.model,pending:!1}}function E(e,n,t,i){return{participant:`${e}-${n.agentName}`,role:e,agentName:n.agentName,lineage:n.lineage,hasAnswer:!0,answer:t,durationMs:n.durationMs,model:n.model,binaryUsed:n.binaryUsed,modelUsed:n.model,usage:i}}function M(){return[N("doer",y),...k.map(e=>N("reviewer",e))]}let D=[{round:1,participants:M()}],A={id:"demo-complex-6way",name:"Plan → Ship Workflow",description:"Five-phase workflow with five reviewers per phase.",category:"review",agreementThreshold:"majority",onThresholdMet:"auto-finalize",maxRounds:1,driver:"external",driverHandoff:!1,verificationGate:"auto",costCapUsd:0,yoloDefault:!1,onError:"fail",notify:"dashboard-only",yaml:"",authorHandle:"demo",forks:0,popularity:0,phases:x.map(e=>({id:e.id,name:e.name,description:e.description,kind:e.kind,gate:"auto",doer:{lineage:"claude",models:["claude-opus-4-7"]},reviewer:{require:2,crossLineage:!0,candidates:["codex","gemini","opencode"],candidatesWithModels:k.map(e=>({lineage:e.lineage,models:[e.model]}))},artifact:{label:"Artifact",hint:"",maxBytes:1048576},inputs:{include:[],exclude:[]},iterate:{max:1,onMax:"fail"},blindSpots:[],execution:"parallel",builtin:!0}))},I=(e,n,t)=>{let i=[],o=n.id;for(let[r,a]of T.entries())i.push({atMs:t+30*r,payload:{type:"phase_start",payload:{phaseIdx:e,phaseId:o,kind:n.kind,role:0===r?"doer":"reviewer",agent:a.agentName},ts:Date.now()}});for(let[e,r]of T.entries()){let a=0===e?"doer":"reviewer",s=function(e){let n=Math.floor(.3*e.length),t=Math.floor(.65*e.length);return[e.slice(0,n),e.slice(0,t),e]}(n.streams[e]),d=[.25,.55,.85].map(e=>Math.round(r.doneAtMs*e));for(let[e,n]of s.entries())i.push({atMs:t+d[e],payload:{type:"phase_progress",payload:{phaseId:o,round:1,role:a,agent:r.agentName,elapsedMs:d[e],output:n},ts:Date.now()}})}for(let[e,n]of T.entries()){let r=0===e?"doer":"reviewer";i.push({atMs:t+n.doneAtMs,payload:{type:"participant_done",payload:{phaseId:o,round:1,role:r,agent:n.agentName},ts:Date.now()}})}return i.push({atMs:t+5e3-100,payload:{type:"phase_done",payload:{phaseId:o,phaseIdx:e,kind:n.kind},ts:Date.now()}}),i},U=(()=>{let e=[];for(let[n,t]of x.entries())e.push(...I(n,t,200+5e3*n));return e.push({atMs:200+5e3*x.length+300,payload:{type:"chat_done",payload:{status:"merged",verdict:"approve",prUrl:"https://github.com/example/repo/pull/4128"},ts:Date.now()}}),e})(),S={"simple-6way":{template:m,initialRounds:h,work:"Review src/util/divide.ts for production-readiness — six lineages, one pass, blockers welcome.",buildDataSource:function(){let e={currentParticipants:p.map(u)};return{createEventSource:()=>d(b,(n,t)=>{!function(e,n,t){if("participant_done"!==n)return;let i=t.agent;if(!i)return;let o=p.find(e=>e.agentName===i);o&&(e.currentParticipants=e.currentParticipants.map(e=>e.agentName===i?{participant:`reviewer-${o.agentName}`,role:"reviewer",agentName:o.agentName,lineage:o.lineage,hasAnswer:!0,answer:o.answer,durationMs:o.durationMs,model:o.model,binaryUsed:o.binaryUsed,modelUsed:o.model,usage:o.usage}:e))}(e,n,t)}),fetchArtifacts:()=>({rounds:[{round:1,participants:e.currentParticipants}]})}}},"complex-6way":{template:A,initialRounds:D,work:"feat(util): production-safe divide() — Plan → Spec → Implement → Verify → Ship • closes #4127",buildDataSource:function(){let e={currentPhaseIdx:0,currentParticipants:M()};return{createEventSource:()=>d(U,(n,t)=>{!function(e,n,t){if("phase_start"===n){let n=t.phaseIdx;"number"==typeof n&&n!==e.currentPhaseIdx&&(e.currentPhaseIdx=n,e.currentParticipants=M());return}if("participant_done"===n){let n=t.agent;if(!n)return;let i=T.findIndex(e=>e.agentName===n);if(i<0)return;let o=T[i],r=x[e.currentPhaseIdx];if(!r)return;let a=E(0===i?"doer":"reviewer",o,r.streams[i],r.usage[i]);e.currentParticipants=e.currentParticipants.map(e=>e.agentName===n?a:e);return}if("chat_done"===n){let n=x[x.length-1];e.currentParticipants=T.map((e,t)=>E(0===t?"doer":"reviewer",e,n.streams[t],n.usage[t])),e.currentPhaseIdx=x.length-1}}(e,n,t)}),fetchArtifacts:()=>({rounds:[{round:1,participants:e.currentParticipants}]})}}}};function R({params:e}){let{scenario:n}=(0,o.use)(e),t=S[n];t||(0,r.notFound)();let d=(0,o.useMemo)(()=>`demo-${n}-${Math.random().toString(36).slice(2,8)}`,[n]),c=(0,o.useMemo)(()=>t.buildDataSource(),[t]);return(0,i.jsx)(a.G,{children:(0,i.jsx)("div",{className:"mx-auto max-w-[1700px] px-6 py-6",children:(0,i.jsx)(s.LiveRunReal,{chatId:d,initialStatus:"reviewing",initialRounds:t.initialRounds,template:t.template,templateId:t.template.id,work:t.work,demoDataSource:c})})})}},6255:(e,n,t)=>{Promise.resolve().then(t.bind(t,5249))}},e=>{e.O(0,[116,720,641,344,977,506,128,358],()=>e(e.s=6255)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[359],{63:(e,t,r)=>{"use strict";r.d(t,{Zp:()=>n});var s=r(9442);r(6074);var a=r(7362);function n({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"card",className:(0,a.cn)("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",e),...t})}},862:(e,t,r)=>{"use strict";function s(e){return!!e&&e.phases[0]?.kind==="review_only"}r.d(t,{$:()=>s})},2471:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},2919:(e,t,r)=>{Promise.resolve().then(r.bind(r,6141))},3734:(e,t,r)=>{"use strict";r.d(t,{JR:()=>c,QJ:()=>n,VW:()=>o,YM:()=>m,m_:()=>i,r2:()=>x,u5:()=>l,x0:()=>u,ze:()=>s});let s={anthropic:"Claude",openai:"Codex",google:"Gemini",opencode:"OpenCode",moonshot:"Kimi"},a={anthropic:"bg-violet-400",openai:"bg-orange-400",google:"bg-blue-400",opencode:"bg-emerald-400",moonshot:"bg-pink-400"};function n(e){return e?s[e]??e:""}function o(e){return e?a[e]??"bg-muted":"bg-muted"}let i={claude:"Claude",codex:"Codex",gemini:"Gemini",opencode:"OpenCode",kimi:"Kimi",openrouter:"OpenRouter"},d={claude:"bg-violet-400",codex:"bg-orange-400",gemini:"bg-blue-400",opencode:"bg-emerald-400",kimi:"bg-pink-400",openrouter:"bg-cyan-400"};function l(e){return e?i[e]??e:""}function c(e){return e?d[e]??"bg-muted":"bg-muted"}let u={claude:"claude-opus-4-7",codex:"gpt-5.5",gemini:"gemini-3.1-pro-preview",opencode:"kimi-k2.6",kimi:"kimi-k2.6",openrouter:""};function m(e){if(e)return u[e]}let x={claude:{dot:"bg-violet-400",ring:"ring-violet-400/40",gradient:"bg-gradient-to-b from-violet-500/15 to-card"},codex:{dot:"bg-orange-400",ring:"ring-orange-400/40",gradient:"bg-gradient-to-b from-orange-500/15 to-card"},gemini:{dot:"bg-blue-400",ring:"ring-blue-400/40",gradient:"bg-gradient-to-b from-blue-500/15 to-card"},opencode:{dot:"bg-emerald-400",ring:"ring-emerald-400/40",gradient:"bg-gradient-to-b from-emerald-500/15 to-card"},kimi:{dot:"bg-pink-400",ring:"ring-pink-400/40",gradient:"bg-gradient-to-b from-pink-500/15 to-card"},openrouter:{dot:"bg-cyan-400",ring:"ring-cyan-400/40",gradient:"bg-gradient-to-b from-cyan-500/15 to-card"}}},4372:(e,t,r)=>{"use strict";r.d(t,{G:()=>o});var s=r(9442),a=r(821),n=r(8344);function o({children:e}){return(0,s.jsxs)("div",{className:"flex h-screen w-screen overflow-hidden bg-background text-foreground",children:[(0,s.jsx)(a.AppSidebar,{}),(0,s.jsxs)("div",{className:"flex flex-1 flex-col overflow-hidden",children:[(0,s.jsx)(n.MobileTopBar,{}),(0,s.jsx)("main",{className:"flex-1 overflow-y-auto",children:e})]})]})}},5702:(e,t,r)=>{"use strict";r.d(t,{E:()=>d});var s=r(9442);r(6074);var a=r(9056),n=r(8113),o=r(7362);let i=(0,a.F)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function d({className:e,variant:t="default",asChild:r=!1,...a}){let l=r?n.bL:"span";return(0,s.jsx)(l,{"data-slot":"badge","data-variant":t,className:(0,o.cn)(i({variant:t}),e),...a})}},6141:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>N});var s=r(9442),a=r(8821),n=r(2471),o=r(5902),i=r(6074),d=r(4372),l=r(6457),c=r(5702),u=r(6185),m=r(6441),x=r(862);function p({icon:e,label:t,value:r,wide:a,children:n}){let[o,d]=(0,i.useState)(!1);return(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>d(e=>!e),className:"flex items-center gap-2 rounded-md border border-border bg-card px-3 py-1.5 text-sm transition hover:border-muted-foreground/40",children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:e}),(0,s.jsx)("span",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:t}),(0,s.jsx)("span",{className:"font-medium",children:r})]}),o&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"fixed inset-0 z-10",onClick:()=>d(!1)}),(0,s.jsx)("div",{className:`absolute left-0 top-full z-20 mt-1 rounded-md border border-border bg-popover p-1.5 shadow-xl ${a?"w-80":"w-56"}`,onClick:()=>d(!1),children:n})]})]})}var g=r(6289);let h=(0,r(3884).A)("dollar-sign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);var f=r(63),b=r(3734);function v({template:e,prompt:t,setPrompt:r,reviewOnly:a,artifactSpec:n,billingMode:o,costEstimate:i,overCap:d,isPending:l,onStart:c}){return(0,s.jsxs)(s.Fragment,{children:[a&&n&&(0,s.jsxs)("div",{className:"mb-2 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[(0,s.jsx)("span",{className:"font-medium text-foreground",children:n.label}),(0,s.jsx)("span",{className:"text-muted-foreground/60",children:"\xb7"}),(0,s.jsxs)("span",{children:["cap ",(n.maxBytes/1024).toLocaleString()," KB"]})]}),(0,s.jsxs)(f.Zp,{className:"overflow-hidden p-0 mb-4",children:[(0,s.jsx)("textarea",{value:t,onChange:e=>r(e.target.value),placeholder:a&&n?n.hint:"Describe what you want chorus to weigh in on. Paste code, errors, design docs — anything the reviewers should see.",className:`block w-full resize-none border-0 bg-transparent px-5 py-4 text-sm text-foreground placeholder:text-muted-foreground/70 focus:outline-none ${a?"font-mono text-[12px] leading-relaxed":""}`,rows:a?16:10,spellCheck:!a}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 border-t border-border bg-card/40 px-5 py-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)(j,{template:e,reviewOnly:a}),(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3 sm:justify-end",children:[(0,s.jsx)(y,{billingMode:o,costEstimate:i,overCap:d,template:e}),(0,s.jsxs)("button",{type:"button",onClick:c,disabled:!t||d||l,className:`inline-flex shrink-0 items-center gap-2 whitespace-nowrap rounded-md px-4 py-2 text-sm font-medium transition ${!t||d||l?"cursor-not-allowed bg-muted text-muted-foreground":"bg-primary text-primary-foreground hover:bg-primary/90"}`,children:[l?"Starting...":a?"Send for review":"Start the run",(0,s.jsx)(g.A,{className:"h-4 w-4"})]})]})]})]})]})}function j({template:e,reviewOnly:t}){return(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 text-xs text-muted-foreground",children:[!t&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:`h-1.5 w-1.5 rounded-full ${(0,b.JR)(e.phases[0]?.doer.lineage)}`}),"Doer: ",e.phases[0]?.doer.lineage]}),(0,s.jsx)("span",{className:"text-muted-foreground/50",children:"\xb7"})]}),(0,s.jsx)(w,{template:e}),e.phases.length>1&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-muted-foreground/50",children:"\xb7"}),(0,s.jsxs)("span",{className:"font-mono text-[10px]",children:[e.phases.length," phases"]})]})]})}function w({template:e}){let t=e.phases[0]?.reviewer.candidatesWithModels??[],r=new Map;for(let e of t)r.set(e.lineage,(r.get(e.lineage)??0)+1);return(0,s.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-muted-foreground/80",children:"Reviewers:"}),t.map((e,t)=>{let a=(r.get(e.lineage)??0)>1,n=e.models?.[0]?.split("/").pop()??e.models?.[0],o=a&&n?`${e.lineage} \xb7 ${n}`:e.lineage;return(0,s.jsxs)("span",{className:"flex items-center gap-1",title:e.models?.[0]?`${e.lineage} \xb7 ${e.models[0]}`:e.lineage,children:[(0,s.jsx)("span",{className:`h-1.5 w-1.5 rounded-full ${(0,b.JR)(e.lineage)}`}),o]},`${e.lineage}-${e.models?.[0]??"default"}-${t}`)}),e.phases[0]?.reviewer.crossLineage&&(0,s.jsx)(c.E,{variant:"outline",className:"ml-1 border-border font-mono text-[9px] uppercase",title:"Reviewer must be a different lineage than the doer",children:"cross-lineage"})]})}function y({billingMode:e,costEstimate:t,overCap:r,template:a}){return"subscription"===e?(0,s.jsxs)("div",{className:"flex items-center gap-1.5 font-mono text-[10px] text-muted-foreground",title:`~${t.inputTokens.toLocaleString()} input tokens \xd7 ${t.reviewerCount} reviewers — counts against your CLI subscription quota, not billed per call`,children:["Subscription quota \xb7 ~",t.inputTokens.toLocaleString()," tok"]}):(0,s.jsxs)("div",{className:`flex items-center gap-1.5 font-mono text-[10px] ${r?"text-rose-300":"text-muted-foreground"}`,title:`~${t.inputTokens.toLocaleString()} input tokens \xd7 ${t.reviewerCount} reviewers; up to ${t.maxRounds} round${t.maxRounds>1?"s":""} on disagreement`,children:[(0,s.jsx)(h,{className:"h-3 w-3"}),t.maxRounds>1?`~$${t.usd.toFixed(3)} – $${t.usdRangeMax.toFixed(3)} est`:`~$${t.usd.toFixed(3)} est`,a.costCapUsd>0&&(0,s.jsxs)("span",{className:"text-muted-foreground/60",children:["/ cap $",a.costCapUsd.toFixed(2)]})]})}function N(){return(0,s.jsx)(i.Suspense,{fallback:(0,s.jsx)(d.G,{children:(0,s.jsx)("div",{className:"p-8 text-sm text-muted-foreground",children:"Loading…"})}),children:(0,s.jsx)(k,{})})}function k(){let e=(0,o.useSearchParams)(),t=(0,o.useRouter)(),[r,g]=(0,i.useTransition)(),[h,f]=(0,i.useState)([]),[b,j]=(0,i.useState)(null),[w,y]=(0,i.useState)(null);(0,i.useEffect)(()=>{(0,u.eG)().then(f).catch(e=>j(e instanceof u.$v?e.message:"Failed to load templates"))},[]);let[N,k]=(0,i.useState)("api");(0,i.useEffect)(()=>{(0,m.Dl)().then(e=>k(e.mode)).catch(()=>{})},[]);let $=e.get("template")??h[0]?.id??"",[C,S]=(0,i.useState)(""),R=[],M=h.find(e=>e.id===$)??h[0],E=(0,i.useMemo)(()=>(function(e){let{template:t,prompt:r,attachments:s}=e,a=t?.phases?.[0]?.reviewer?.candidates?.length??3,n=Math.max(1,t?.maxRounds??1),o=Math.ceil(r.length/4)+1500*s.length+(t?.estimatedBaselineTokens??800),i=(3e-6*o+.018000000000000002)*a;return{usd:i,usdRangeMax:i*n,inputTokens:o,reviewerCount:a,maxRounds:n}})({template:M,prompt:C,attachments:R}),[C,R,M]),F=!!("subscription"!==N&&M?.costCapUsd&&M.costCapUsd>0&&E.usdRangeMax>M.costCapUsd),[P,L]=(0,i.useState)(!1),[A,T]=(0,i.useState)(""),O=(0,x.$)(M),G=O?M?.phases?.[0]?.artifact:void 0;async function z(){if(M&&C){if(O&&G){let e=new TextEncoder().encode(C).length;if(e>G.maxBytes)return void y(`Artifact is ${e.toLocaleString()} bytes; this template caps at ${G.maxBytes.toLocaleString()}. Trim it down.`)}y(null),g(async()=>{try{let e=A.trim(),r=await (0,u.RL)({work:O?function(e){let t="Review the supplied artifact independently.";if(!e)return t;for(let t of e.split("\n")){let e=t.trim();if(0===e.length||e.startsWith("```")||e.startsWith("~~~"))continue;if(e.length<=80)return e;let r=e.slice(0,80),s=r.lastIndexOf(" ");return(s>40?r.slice(0,s):r)+"…"}return t}(C):C,templateId:M.id,files:R.length>0?R.map(e=>e.name):void 0,...O?{artifact:C}:{},...!O&&e.length>0?{repoPath:e}:{},yolo:P});t.push(`/runs/${r.slug||r.id}`)}catch(e){y(e instanceof u.$v?e.message:"Failed to create chat")}})}}return b?(0,s.jsx)(d.G,{children:(0,s.jsx)("div",{className:"mx-auto w-full max-w-6xl px-4 py-6 sm:px-6 sm:py-8 md:px-8 md:py-10",children:(0,s.jsxs)("div",{className:"rounded-lg border border-destructive/50 bg-destructive/10 p-4",children:[(0,s.jsx)("p",{className:"text-sm text-destructive",children:"Error loading templates"}),(0,s.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:b})]})})}):M?(0,s.jsx)(d.G,{children:(0,s.jsxs)("div",{className:"mx-auto w-full max-w-6xl px-4 py-6 sm:px-6 sm:py-8 md:px-8 md:py-10",children:[(0,s.jsx)(l.z,{eyebrow:"New chat",title:O?"Paste an artifact. Get reviews.":"Paste a task. Pick a template.",subtitle:O?"Chorus skips the doer and runs your text past three reviewers. Single pass — revise yourself and resubmit for another round.":"Chorus runs it past your reviewers and reports consensus."}),w&&(0,s.jsx)("div",{className:"mb-4 rounded-lg border border-destructive/50 bg-destructive/10 p-4",children:(0,s.jsx)("p",{className:"text-sm text-destructive",children:w})}),(0,s.jsx)("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:(0,s.jsx)(p,{icon:(0,s.jsx)(a.A,{className:"h-3.5 w-3.5"}),label:"Template",value:M?.name||"Select a template",wide:!0,children:(0,s.jsx)("ul",{className:"space-y-1",children:h.map(r=>(0,s.jsx)("li",{children:(0,s.jsxs)("button",{type:"button",onClick:()=>{let s=new URLSearchParams(e);s.set("template",r.id),t.push(`/new?${s.toString()}`)},className:`block w-full rounded-md p-2 text-left transition ${r.id===$?"bg-accent":"hover:bg-accent/50"}`,children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-medium",children:r.name}),(0,x.$)(r)&&(0,s.jsx)(c.E,{variant:"outline",className:"border-blue-500/30 bg-blue-500/10 font-mono text-[9px] uppercase text-blue-300",children:"review only"})]}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground line-clamp-1",children:r.description})]})},r.id))})})}),(0,s.jsx)(v,{template:M,prompt:C,setPrompt:S,reviewOnly:O,artifactSpec:G,billingMode:N,costEstimate:E,overCap:F,isPending:r,onStart:z}),F&&(0,s.jsxs)("div",{className:"mb-4 flex items-start gap-2 rounded-md border border-rose-500/30 bg-rose-500/5 px-3 py-2 text-[11px] text-rose-200",children:[(0,s.jsx)(n.A,{className:"mt-0.5 h-3 w-3 shrink-0 text-rose-400"}),(0,s.jsxs)("span",{children:["Estimated cost"," ",(0,s.jsxs)("span",{className:"font-mono",children:["$",E.usd.toFixed(3)]})," ","exceeds template cap"," ",(0,s.jsxs)("span",{className:"font-mono",children:["$",M.costCapUsd.toFixed(2)]}),". Trim attachments, shorten the prompt, or raise the cap in template settings."]})]}),(0,s.jsxs)("div",{className:`mb-4 rounded-lg border border-dashed border-border bg-card/30 p-4 ${O?"opacity-50":""}`,children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,s.jsxs)("span",{className:"text-sm font-medium text-foreground",children:["Target repo"," ",(0,s.jsx)("span",{className:"text-muted-foreground",children:"(optional)"})]}),(0,s.jsx)(c.E,{variant:"outline",className:"border-emerald-500/30 bg-emerald-500/10 font-mono text-[10px] uppercase text-emerald-300",children:"opens PR"})]}),(0,s.jsx)("input",{type:"text",value:O?"":A,onChange:e=>T(e.target.value),disabled:O,placeholder:"/absolute/path/to/repo",className:"w-full rounded-md border border-border bg-background px-3 py-2 font-mono text-xs text-foreground placeholder:text-muted-foreground/50 focus:outline-none focus:ring-1 focus:ring-primary disabled:cursor-not-allowed disabled:opacity-60",spellCheck:!1}),(0,s.jsx)("p",{className:"mt-2 text-[11px] text-muted-foreground",children:O?"Review-only templates have no doer and no Ship phase, so there's nothing to commit. Pick a template with a doer (e.g. Tri-Review) to open a PR.":(0,s.jsxs)(s.Fragment,{children:["When set: doer makes real edits in this repo. After reviewers agree, chorus opens a PR via"," ",(0,s.jsx)("code",{className:"rounded bg-muted px-1",children:"gh pr create"})," (no auto-merge — you review + click Merge in GitHub). Leave blank to skip the Ship phase."]})})]}),(0,s.jsxs)("button",{type:"button",onClick:()=>L(e=>!e),className:`mb-4 flex w-full items-start justify-between gap-3 rounded-lg border px-4 py-3 text-left transition ${P?"border-rose-500/40 bg-rose-500/5":"border-dashed border-border bg-card/30 hover:border-foreground/30"}`,children:[(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:`mt-0.5 grid h-7 w-7 place-items-center rounded-md text-sm ${P?"bg-rose-500/20 text-rose-300":"bg-card text-muted-foreground"}`,children:"\uD83D\uDE80"}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Yolo mode"}),(0,s.jsx)(c.E,{variant:"outline",className:"border-rose-500/30 bg-rose-500/10 font-mono text-[10px] uppercase text-rose-300",children:"unsafe"})]}),(0,s.jsx)("p",{className:"mt-0.5 text-[11px] text-muted-foreground",children:P?"Reviewer gates auto-approve. Permission prompts auto-allow. The driver merges without asking. Cost cap still enforced.":"Skip every ask-user gate for this single run. Useful for trusted templates or trivial fixes."})]})]}),(0,s.jsx)("span",{className:`flex h-5 w-9 shrink-0 items-center rounded-full border p-0.5 transition ${P?"border-rose-500/40 bg-rose-500/20":"border-border bg-card"}`,children:(0,s.jsx)("span",{className:`h-3.5 w-3.5 rounded-full transition-transform ${P?"translate-x-4 bg-rose-400":"bg-muted-foreground/50"}`})})]})]})}):(0,s.jsx)(d.G,{children:(0,s.jsx)("div",{className:"mx-auto w-full max-w-6xl px-4 py-12 text-sm text-muted-foreground sm:px-6 md:px-8",children:"Loading templates…"})})}},6289:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},6457:(e,t,r)=>{"use strict";r.d(t,{z:()=>a});var s=r(9442);function a({eyebrow:e,title:t,subtitle:r,action:n}){return(0,s.jsxs)("header",{className:"mb-6 flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-xs uppercase tracking-wider text-muted-foreground",children:e}),(0,s.jsx)("h1",{className:"mt-1 text-2xl font-semibold tracking-tight",children:t}),r&&(0,s.jsx)("p",{className:"mt-2 max-w-2xl text-sm leading-relaxed text-muted-foreground",children:r})]}),n&&(0,s.jsx)("div",{className:"shrink-0 self-start sm:self-auto",children:n})]})}},9056:(e,t,r)=>{"use strict";r.d(t,{F:()=>o});var s=r(142);let a=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,n=s.$,o=(e,t)=>r=>{var s;if((null==t?void 0:t.variants)==null)return n(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:o,defaultVariants:i}=t,d=Object.keys(o).map(e=>{let t=null==r?void 0:r[e],s=null==i?void 0:i[e];if(null===t)return null;let n=a(t)||a(s);return o[e][n]}),l=r&&Object.entries(r).reduce((e,t)=>{let[r,s]=t;return void 0===s||(e[r]=s),e},{});return n(e,d,null==t||null==(s=t.compoundVariants)?void 0:s.reduce((e,t)=>{let{class:r,className:s,...a}=t;return Object.entries(a).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...i,...l}[t]):({...i,...l})[t]===r})?[...e,r,s]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}}},e=>{e.O(0,[116,720,344,506,128,358],()=>e(e.s=2919)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[359],{63:(e,t,r)=>{"use strict";r.d(t,{Zp:()=>n});var s=r(9442);r(6074);var a=r(7362);function n({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"card",className:(0,a.cn)("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",e),...t})}},862:(e,t,r)=>{"use strict";function s(e){return!!e&&e.phases[0]?.kind==="review_only"}r.d(t,{$:()=>s})},2471:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},2919:(e,t,r)=>{Promise.resolve().then(r.bind(r,6141))},3734:(e,t,r)=>{"use strict";r.d(t,{JR:()=>c,QJ:()=>n,VW:()=>o,YM:()=>m,m_:()=>i,r2:()=>x,u5:()=>l,x0:()=>u,ze:()=>s});let s={anthropic:"Claude",openai:"Codex",google:"Gemini",opencode:"OpenCode",moonshot:"Kimi"},a={anthropic:"bg-violet-400",openai:"bg-orange-400",google:"bg-blue-400",opencode:"bg-emerald-400",moonshot:"bg-pink-400"};function n(e){return e?s[e]??e:""}function o(e){return e?a[e]??"bg-muted":"bg-muted"}let i={claude:"Claude",codex:"Codex",gemini:"Gemini",opencode:"OpenCode",kimi:"Kimi",openrouter:"OpenRouter"},d={claude:"bg-violet-400",codex:"bg-orange-400",gemini:"bg-blue-400",opencode:"bg-emerald-400",kimi:"bg-pink-400",openrouter:"bg-cyan-400"};function l(e){return e?i[e]??e:""}function c(e){return e?d[e]??"bg-muted":"bg-muted"}let u={claude:"claude-opus-4-7",codex:"gpt-5.5",gemini:"gemini-3.1-pro-preview",opencode:"kimi-k2.6",kimi:"kimi-k2.6",openrouter:""};function m(e){if(e)return u[e]}let x={claude:{dot:"bg-violet-400",ring:"ring-violet-400/40",gradient:"bg-gradient-to-b from-violet-500/15 to-card"},codex:{dot:"bg-orange-400",ring:"ring-orange-400/40",gradient:"bg-gradient-to-b from-orange-500/15 to-card"},gemini:{dot:"bg-blue-400",ring:"ring-blue-400/40",gradient:"bg-gradient-to-b from-blue-500/15 to-card"},opencode:{dot:"bg-emerald-400",ring:"ring-emerald-400/40",gradient:"bg-gradient-to-b from-emerald-500/15 to-card"},kimi:{dot:"bg-pink-400",ring:"ring-pink-400/40",gradient:"bg-gradient-to-b from-pink-500/15 to-card"},openrouter:{dot:"bg-cyan-400",ring:"ring-cyan-400/40",gradient:"bg-gradient-to-b from-cyan-500/15 to-card"}}},4372:(e,t,r)=>{"use strict";r.d(t,{G:()=>o});var s=r(9442),a=r(821),n=r(8344);function o({children:e}){return(0,s.jsxs)("div",{className:"flex h-screen w-screen overflow-hidden bg-background text-foreground",children:[(0,s.jsx)(a.AppSidebar,{}),(0,s.jsxs)("div",{className:"flex flex-1 flex-col overflow-hidden",children:[(0,s.jsx)(n.MobileTopBar,{}),(0,s.jsx)("main",{className:"flex-1 overflow-y-auto",children:e})]})]})}},5702:(e,t,r)=>{"use strict";r.d(t,{E:()=>d});var s=r(9442);r(6074);var a=r(9056),n=r(8113),o=r(7362);let i=(0,a.F)("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function d({className:e,variant:t="default",asChild:r=!1,...a}){let l=r?n.bL:"span";return(0,s.jsx)(l,{"data-slot":"badge","data-variant":t,className:(0,o.cn)(i({variant:t}),e),...a})}},6141:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>N});var s=r(9442),a=r(8821),n=r(2471),o=r(5902),i=r(6074),d=r(4372),l=r(6457),c=r(5702),u=r(6185),m=r(6441),x=r(862);function p({icon:e,label:t,value:r,wide:a,children:n}){let[o,d]=(0,i.useState)(!1);return(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>d(e=>!e),className:"flex items-center gap-2 rounded-md border border-border bg-card px-3 py-1.5 text-sm transition hover:border-muted-foreground/40",children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:e}),(0,s.jsx)("span",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:t}),(0,s.jsx)("span",{className:"font-medium",children:r})]}),o&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"fixed inset-0 z-10",onClick:()=>d(!1)}),(0,s.jsx)("div",{className:`absolute left-0 top-full z-20 mt-1 rounded-md border border-border bg-popover p-1.5 shadow-xl ${a?"w-80":"w-56"}`,onClick:()=>d(!1),children:n})]})]})}var g=r(6289);let h=(0,r(3884).A)("dollar-sign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);var f=r(63),b=r(3734);function v({template:e,prompt:t,setPrompt:r,reviewOnly:a,artifactSpec:n,billingMode:o,costEstimate:i,overCap:d,isPending:l,onStart:c}){return(0,s.jsxs)(s.Fragment,{children:[a&&n&&(0,s.jsxs)("div",{className:"mb-2 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[(0,s.jsx)("span",{className:"font-medium text-foreground",children:n.label}),(0,s.jsx)("span",{className:"text-muted-foreground/60",children:"\xb7"}),(0,s.jsxs)("span",{children:["cap ",(n.maxBytes/1024).toLocaleString()," KB"]})]}),(0,s.jsxs)(f.Zp,{className:"overflow-hidden p-0 mb-4",children:[(0,s.jsx)("textarea",{value:t,onChange:e=>r(e.target.value),placeholder:a&&n?n.hint:"Describe what you want chorus to weigh in on. Paste code, errors, design docs — anything the reviewers should see.",className:`block w-full resize-none border-0 bg-transparent px-5 py-4 text-sm text-foreground placeholder:text-muted-foreground/70 focus:outline-none ${a?"font-mono text-[12px] leading-relaxed":""}`,rows:a?16:10,spellCheck:!a}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 border-t border-border bg-card/40 px-5 py-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)(j,{template:e,reviewOnly:a}),(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3 sm:justify-end",children:[(0,s.jsx)(y,{billingMode:o,costEstimate:i,overCap:d,template:e}),(0,s.jsxs)("button",{type:"button",onClick:c,disabled:!t||d||l,className:`inline-flex shrink-0 items-center gap-2 whitespace-nowrap rounded-md px-4 py-2 text-sm font-medium transition ${!t||d||l?"cursor-not-allowed bg-muted text-muted-foreground":"bg-primary text-primary-foreground hover:bg-primary/90"}`,children:[l?"Starting...":a?"Send for review":"Start the run",(0,s.jsx)(g.A,{className:"h-4 w-4"})]})]})]})]})]})}function j({template:e,reviewOnly:t}){return(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 text-xs text-muted-foreground",children:[!t&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:`h-1.5 w-1.5 rounded-full ${(0,b.JR)(e.phases[0]?.doer.lineage)}`}),"Doer: ",e.phases[0]?.doer.lineage]}),(0,s.jsx)("span",{className:"text-muted-foreground/50",children:"\xb7"})]}),(0,s.jsx)(w,{template:e}),e.phases.length>1&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-muted-foreground/50",children:"\xb7"}),(0,s.jsxs)("span",{className:"font-mono text-[10px]",children:[e.phases.length," phases"]})]})]})}function w({template:e}){let t=e.phases[0]?.reviewer.candidatesWithModels??[],r=new Map;for(let e of t)r.set(e.lineage,(r.get(e.lineage)??0)+1);return(0,s.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-muted-foreground/80",children:"Reviewers:"}),t.map((e,t)=>{let a=(r.get(e.lineage)??0)>1,n=e.models?.[0]?.split("/").pop()??e.models?.[0],o=a&&n?`${e.lineage} \xb7 ${n}`:e.lineage;return(0,s.jsxs)("span",{className:"flex items-center gap-1",title:e.models?.[0]?`${e.lineage} \xb7 ${e.models[0]}`:e.lineage,children:[(0,s.jsx)("span",{className:`h-1.5 w-1.5 rounded-full ${(0,b.JR)(e.lineage)}`}),o]},`${e.lineage}-${e.models?.[0]??"default"}-${t}`)}),e.phases[0]?.reviewer.crossLineage&&(0,s.jsx)(c.E,{variant:"outline",className:"ml-1 border-border font-mono text-[9px] uppercase",title:"Reviewer must be a different lineage than the doer",children:"cross-lineage"})]})}function y({billingMode:e,costEstimate:t,overCap:r,template:a}){return"subscription"===e?(0,s.jsxs)("div",{className:"flex items-center gap-1.5 font-mono text-[10px] text-muted-foreground",title:`~${t.inputTokens.toLocaleString()} input tokens \xd7 ${t.reviewerCount} reviewers — counts against your CLI subscription quota, not billed per call`,children:["Subscription quota \xb7 ~",t.inputTokens.toLocaleString()," tok"]}):(0,s.jsxs)("div",{className:`flex items-center gap-1.5 font-mono text-[10px] ${r?"text-rose-300":"text-muted-foreground"}`,title:`~${t.inputTokens.toLocaleString()} input tokens \xd7 ${t.reviewerCount} reviewers; up to ${t.maxRounds} round${t.maxRounds>1?"s":""} on disagreement`,children:[(0,s.jsx)(h,{className:"h-3 w-3"}),t.maxRounds>1?`~$${t.usd.toFixed(3)} – $${t.usdRangeMax.toFixed(3)} est`:`~$${t.usd.toFixed(3)} est`,a.costCapUsd>0&&(0,s.jsxs)("span",{className:"text-muted-foreground/60",children:["/ cap $",a.costCapUsd.toFixed(2)]})]})}function N(){return(0,s.jsx)(i.Suspense,{fallback:(0,s.jsx)(d.G,{children:(0,s.jsx)("div",{className:"p-8 text-sm text-muted-foreground",children:"Loading…"})}),children:(0,s.jsx)(k,{})})}function k(){let e=(0,o.useSearchParams)(),t=(0,o.useRouter)(),[r,g]=(0,i.useTransition)(),[h,f]=(0,i.useState)([]),[b,j]=(0,i.useState)(null),[w,y]=(0,i.useState)(null);(0,i.useEffect)(()=>{(0,u.eG)().then(f).catch(e=>j(e instanceof u.$v?e.message:"Failed to load templates"))},[]);let[N,k]=(0,i.useState)("api");(0,i.useEffect)(()=>{(0,m.Dl)().then(e=>k(e.mode)).catch(()=>{})},[]);let $=e.get("template")??h[0]?.id??"",[C,S]=(0,i.useState)(""),R=[],M=h.find(e=>e.id===$)??h[0],E=(0,i.useMemo)(()=>(function(e){let{template:t,prompt:r,attachments:s}=e,a=t?.phases?.[0]?.reviewer?.candidates?.length??3,n=Math.max(1,t?.maxRounds??1),o=Math.ceil(r.length/4)+1500*s.length+(t?.estimatedBaselineTokens??800),i=(3e-6*o+.018000000000000002)*a;return{usd:i,usdRangeMax:i*n,inputTokens:o,reviewerCount:a,maxRounds:n}})({template:M,prompt:C,attachments:R}),[C,R,M]),F=!!("subscription"!==N&&M?.costCapUsd&&M.costCapUsd>0&&E.usdRangeMax>M.costCapUsd),[P,L]=(0,i.useState)(!1),[A,T]=(0,i.useState)(""),O=(0,x.$)(M),G=O?M?.phases?.[0]?.artifact:void 0;async function z(){if(M&&C){if(O&&G){let e=new TextEncoder().encode(C).length;if(e>G.maxBytes)return void y(`Artifact is ${e.toLocaleString()} bytes; this template caps at ${G.maxBytes.toLocaleString()}. Trim it down.`)}y(null),g(async()=>{try{let e=A.trim(),r=await (0,u.RL)({work:O?function(e){let t="Review the supplied artifact independently.";if(!e)return t;for(let t of e.split("\n")){let e=t.trim();if(0===e.length||e.startsWith("```")||e.startsWith("~~~"))continue;if(e.length<=80)return e;let r=e.slice(0,80),s=r.lastIndexOf(" ");return(s>40?r.slice(0,s):r)+"…"}return t}(C):C,templateId:M.id,files:R.length>0?R.map(e=>e.name):void 0,...O?{artifact:C}:{},...!O&&e.length>0?{repoPath:e}:{},yolo:P});t.push(`/runs/${r.slug||r.id}`)}catch(e){y(e instanceof u.$v?e.message:"Failed to create chat")}})}}return b?(0,s.jsx)(d.G,{children:(0,s.jsx)("div",{className:"mx-auto w-full max-w-6xl px-4 py-6 sm:px-6 sm:py-8 md:px-8 md:py-10",children:(0,s.jsxs)("div",{className:"rounded-lg border border-destructive/50 bg-destructive/10 p-4",children:[(0,s.jsx)("p",{className:"text-sm text-destructive",children:"Error loading templates"}),(0,s.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:b})]})})}):M?(0,s.jsx)(d.G,{children:(0,s.jsxs)("div",{className:"mx-auto w-full max-w-6xl px-4 py-6 sm:px-6 sm:py-8 md:px-8 md:py-10",children:[(0,s.jsx)(l.z,{eyebrow:"New chat",title:O?"Paste an artifact. Get reviews.":"Paste a task. Pick a template.",subtitle:O?"Chorus skips the doer and runs your text past three reviewers. Single pass — revise yourself and resubmit for another round.":"Chorus runs it past your reviewers and reports consensus."}),w&&(0,s.jsx)("div",{className:"mb-4 rounded-lg border border-destructive/50 bg-destructive/10 p-4",children:(0,s.jsx)("p",{className:"text-sm text-destructive",children:w})}),(0,s.jsx)("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:(0,s.jsx)(p,{icon:(0,s.jsx)(a.A,{className:"h-3.5 w-3.5"}),label:"Template",value:M?.name||"Select a template",wide:!0,children:(0,s.jsx)("ul",{className:"space-y-1",children:h.map(r=>(0,s.jsx)("li",{children:(0,s.jsxs)("button",{type:"button",onClick:()=>{let s=new URLSearchParams(e);s.set("template",r.id),t.push(`/new?${s.toString()}`)},className:`block w-full rounded-md p-2 text-left transition ${r.id===$?"bg-accent":"hover:bg-accent/50"}`,children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-medium",children:r.name}),(0,x.$)(r)&&(0,s.jsx)(c.E,{variant:"outline",className:"border-blue-500/30 bg-blue-500/10 font-mono text-[9px] uppercase text-blue-300",children:"review only"})]}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground line-clamp-1",children:r.description})]})},r.id))})})}),(0,s.jsx)(v,{template:M,prompt:C,setPrompt:S,reviewOnly:O,artifactSpec:G,billingMode:N,costEstimate:E,overCap:F,isPending:r,onStart:z}),F&&(0,s.jsxs)("div",{className:"mb-4 flex items-start gap-2 rounded-md border border-rose-500/30 bg-rose-500/5 px-3 py-2 text-[11px] text-rose-200",children:[(0,s.jsx)(n.A,{className:"mt-0.5 h-3 w-3 shrink-0 text-rose-400"}),(0,s.jsxs)("span",{children:["Estimated cost"," ",(0,s.jsxs)("span",{className:"font-mono",children:["$",E.usd.toFixed(3)]})," ","exceeds template cap"," ",(0,s.jsxs)("span",{className:"font-mono",children:["$",M.costCapUsd.toFixed(2)]}),". Trim attachments, shorten the prompt, or raise the cap in template settings."]})]}),(0,s.jsxs)("div",{className:`mb-4 rounded-lg border border-dashed border-border bg-card/30 p-4 ${O?"opacity-50":""}`,children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,s.jsxs)("span",{className:"text-sm font-medium text-foreground",children:["Target repo"," ",(0,s.jsx)("span",{className:"text-muted-foreground",children:"(optional)"})]}),(0,s.jsx)(c.E,{variant:"outline",className:"border-emerald-500/30 bg-emerald-500/10 font-mono text-[10px] uppercase text-emerald-300",children:"opens PR"})]}),(0,s.jsx)("input",{type:"text",value:O?"":A,onChange:e=>T(e.target.value),disabled:O,placeholder:"/absolute/path/to/repo",className:"w-full rounded-md border border-border bg-background px-3 py-2 font-mono text-xs text-foreground placeholder:text-muted-foreground/50 focus:outline-none focus:ring-1 focus:ring-primary disabled:cursor-not-allowed disabled:opacity-60",spellCheck:!1}),(0,s.jsx)("p",{className:"mt-2 text-[11px] text-muted-foreground",children:O?"Review-only templates have no doer and no Ship phase, so there's nothing to commit. Pick a template with a doer (e.g. Tri-Review) to open a PR.":(0,s.jsxs)(s.Fragment,{children:["When set: doer makes real edits in this repo. After reviewers agree, chorus opens a PR via"," ",(0,s.jsx)("code",{className:"rounded bg-muted px-1",children:"gh pr create"})," (no auto-merge — you review + click Merge in GitHub). Leave blank to skip the Ship phase."]})})]}),(0,s.jsxs)("button",{type:"button",onClick:()=>L(e=>!e),className:`mb-4 flex w-full items-start justify-between gap-3 rounded-lg border px-4 py-3 text-left transition ${P?"border-rose-500/40 bg-rose-500/5":"border-dashed border-border bg-card/30 hover:border-foreground/30"}`,children:[(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:`mt-0.5 grid h-7 w-7 place-items-center rounded-md text-sm ${P?"bg-rose-500/20 text-rose-300":"bg-card text-muted-foreground"}`,children:"\uD83D\uDE80"}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Yolo mode"}),(0,s.jsx)(c.E,{variant:"outline",className:"border-rose-500/30 bg-rose-500/10 font-mono text-[10px] uppercase text-rose-300",children:"unsafe"})]}),(0,s.jsx)("p",{className:"mt-0.5 text-[11px] text-muted-foreground",children:P?"Reviewer gates auto-approve. Permission prompts auto-allow. The driver merges without asking. Cost cap still enforced.":"Skip every ask-user gate for this single run. Useful for trusted templates or trivial fixes."})]})]}),(0,s.jsx)("span",{className:`flex h-5 w-9 shrink-0 items-center rounded-full border p-0.5 transition ${P?"border-rose-500/40 bg-rose-500/20":"border-border bg-card"}`,children:(0,s.jsx)("span",{className:`h-3.5 w-3.5 rounded-full transition-transform ${P?"translate-x-4 bg-rose-400":"bg-muted-foreground/50"}`})})]})]})}):(0,s.jsx)(d.G,{children:(0,s.jsx)("div",{className:"mx-auto w-full max-w-6xl px-4 py-12 text-sm text-muted-foreground sm:px-6 md:px-8",children:"Loading templates…"})})}},6289:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(3884).A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},6457:(e,t,r)=>{"use strict";r.d(t,{z:()=>a});var s=r(9442);function a({eyebrow:e,title:t,subtitle:r,action:n}){return(0,s.jsxs)("header",{className:"mb-6 flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-xs uppercase tracking-wider text-muted-foreground",children:e}),(0,s.jsx)("h1",{className:"mt-1 text-2xl font-semibold tracking-tight",children:t}),r&&(0,s.jsx)("p",{className:"mt-2 max-w-2xl text-sm leading-relaxed text-muted-foreground",children:r})]}),n&&(0,s.jsx)("div",{className:"shrink-0 self-start sm:self-auto",children:n})]})}},9056:(e,t,r)=>{"use strict";r.d(t,{F:()=>o});var s=r(142);let a=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,n=s.$,o=(e,t)=>r=>{var s;if((null==t?void 0:t.variants)==null)return n(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:o,defaultVariants:i}=t,d=Object.keys(o).map(e=>{let t=null==r?void 0:r[e],s=null==i?void 0:i[e];if(null===t)return null;let n=a(t)||a(s);return o[e][n]}),l=r&&Object.entries(r).reduce((e,t)=>{let[r,s]=t;return void 0===s||(e[r]=s),e},{});return n(e,d,null==t||null==(s=t.compoundVariants)?void 0:s.reduce((e,t)=>{let{class:r,className:s,...a}=t;return Object.entries(a).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...i,...l}[t]):({...i,...l})[t]===r})?[...e,r,s]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}}},e=>{e.O(0,[116,720,641,344,506,128,358],()=>e(e.s=2919)),_N_E=e.O()}]);
|