@mndrk/agx 2.4.8 → 2.4.9
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/README.md +22 -53
- package/cloud-runtime/standalone/apps/local/.next/BUILD_ID +1 -1
- package/cloud-runtime/standalone/apps/local/.next/build-manifest.json +2 -2
- package/cloud-runtime/standalone/apps/local/.next/prerender-manifest.json +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents/[id]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents.segments/agents/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents.segments/agents.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/index.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/index.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.rsc +4 -4
- package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.segments/_full.segment.rsc +4 -4
- package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.segments/integrations/github/select-repos/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.segments/integrations/github/select-repos.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.segments/integrations/github.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/integrations/github/select-repos.segments/integrations.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/automations/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/env-vars/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/folders/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/graph/[taskId]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/notifications/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/objectives/[objectiveId]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/objectives/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/prs/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/[teamId]/agents/[agentId]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/[teamId]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/adopt/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/new/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/replace/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/terminal/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/thread/[threadId]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/thread/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/tracking/[tracker]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/tracking/connect/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/tracking/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects.segments/projects/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects.segments/projects.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup.segments/setup.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/status/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/status.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/status.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/status/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/status.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__5187dece._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__7752d2d2._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__e8c6a1f1._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_components_projects_ProjectObjectivesWorkspace_tsx_751ab3d3._.js +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/middleware-manifest.json +5 -5
- package/cloud-runtime/standalone/apps/local/.next/server/pages/404.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/pages/500.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/server-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/server-reference-manifest.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{ed606d6f94457578.css → 6d8a7494a0cea7a0.css} +1 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{52a7b1805199c6fb.js → b4716c6337e3335c.js} +1 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{7bfbfcd072f8d61e.js → d0ba5f3dc5296486.js} +3 -3
- package/cloud-runtime/standalone/apps/local/app/integrations/github/select-repos/page.tsx +2 -0
- package/cloud-runtime/standalone/apps/local/app/layout.tsx +1 -1
- package/cloud-runtime/standalone/apps/local/components/projects/ProjectObjectivesWorkspace.tsx +22 -2
- package/cloud-runtime/standalone/apps/local/worker/index.js +2 -2
- package/package.json +2 -2
- /package/cloud-runtime/standalone/apps/local/.next/static/{O3Yu8lY-DN5fauB8GipIL → EGpM0P8xAEWKkoW-3Ib69}/_buildManifest.js +0 -0
- /package/cloud-runtime/standalone/apps/local/.next/static/{O3Yu8lY-DN5fauB8GipIL → EGpM0P8xAEWKkoW-3Ib69}/_clientMiddlewareManifest.json +0 -0
- /package/cloud-runtime/standalone/apps/local/.next/static/{O3Yu8lY-DN5fauB8GipIL → EGpM0P8xAEWKkoW-3Ib69}/_ssgManifest.js +0 -0
package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/_full.segment.rsc
CHANGED
|
@@ -13,12 +13,12 @@ f:I[351240,["/_next/static/chunks/7212cdf092396efe.js","/_next/static/chunks/341
|
|
|
13
13
|
11:I[351240,["/_next/static/chunks/7212cdf092396efe.js","/_next/static/chunks/341a398270fbed77.js"],"MetadataBoundary"]
|
|
14
14
|
13:I[23023,["/_next/static/chunks/7212cdf092396efe.js","/_next/static/chunks/341a398270fbed77.js"],"default"]
|
|
15
15
|
:HL["/_next/static/chunks/2473c16c0c2f6b5f.css","style"]
|
|
16
|
-
:HL["/_next/static/chunks/
|
|
16
|
+
:HL["/_next/static/chunks/6d8a7494a0cea7a0.css","style"]
|
|
17
17
|
:HL["/_next/static/media/797e433ab948586e-s.p.dbea232f.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
18
18
|
:HL["/_next/static/media/caa3a2e1cccd8315-s.p.853070df.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
19
|
-
0:{"P":null,"b":"
|
|
19
|
+
0:{"P":null,"b":"EGpM0P8xAEWKkoW-3Ib69","c":["","status"],"q":"","i":false,"f":[[["",{"children":["status",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/2473c16c0c2f6b5f.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/chunks/6d8a7494a0cea7a0.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/d1609799f66b572c.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n(() => {\n try {\n const storedTheme = localStorage.getItem(\"agx-theme\");\n const theme = storedTheme === \"dark\" || storedTheme === \"light\"\n ? storedTheme\n : (window.matchMedia(\"(prefers-color-scheme: dark)\").matches ? \"dark\" : \"light\");\n const root = document.documentElement;\n root.classList.toggle(\"dark\", theme === \"dark\");\n root.style.colorScheme = theme;\n } catch {}\n})();\n"}}]}],["$","body",null,{"className":"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable antialiased min-h-screen overflow-x-hidden overflow-y-auto bg-[var(--background)] text-[var(--foreground)] selection:bg-[var(--primary)] selection:text-[var(--primary-foreground)]","children":[["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","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."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}],["$","$L5",null,{}],["$","$L6",null,{}],["$","$L7",null,{}]]}]]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$L8",null,{"Component":"$9","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@a","$@b"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/114ea1bfd6907330.js","async":true,"nonce":"$undefined"}]],["$","$Lc",null,{"children":["$","$d",null,{"name":"Next.MetadataOutlet","children":"$@e"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Lf",null,{"children":"$L10"}],["$","div",null,{"hidden":true,"children":["$","$L11",null,{"children":["$","$d",null,{"name":"Next.Metadata","children":"$L12"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$13",[]],"S":true}
|
|
20
20
|
a:{}
|
|
21
21
|
b:"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params"
|
|
22
22
|
10:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
|
23
23
|
e:null
|
|
24
|
-
12:[["$","title","0",{"children":"AGX"}],["$","meta","1",{"name":"description","content":"
|
|
24
|
+
12:[["$","title","0",{"children":"AGX"}],["$","meta","1",{"name":"description","content":"Workflow surface for AI-assisted dev work — tickets, repos, PRs, and agents in one window."}]]
|
package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/_head.segment.rsc
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
2:I[351240,["/_next/static/chunks/7212cdf092396efe.js","/_next/static/chunks/341a398270fbed77.js"],"ViewportBoundary"]
|
|
3
3
|
3:I[351240,["/_next/static/chunks/7212cdf092396efe.js","/_next/static/chunks/341a398270fbed77.js"],"MetadataBoundary"]
|
|
4
4
|
4:"$Sreact.suspense"
|
|
5
|
-
0:{"buildId":"
|
|
5
|
+
0:{"buildId":"EGpM0P8xAEWKkoW-3Ib69","rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"AGX"}],["$","meta","1",{"name":"description","content":"Workflow surface for AI-assisted dev work — tickets, repos, PRs, and agents in one window."}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false}
|
package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/_index.segment.rsc
CHANGED
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
6:I[934689,["/_next/static/chunks/d1609799f66b572c.js"],"GoogleAnalytics"]
|
|
7
7
|
7:I[404581,["/_next/static/chunks/d1609799f66b572c.js"],"PostHogAnalytics"]
|
|
8
8
|
:HL["/_next/static/chunks/2473c16c0c2f6b5f.css","style"]
|
|
9
|
-
:HL["/_next/static/chunks/
|
|
10
|
-
0:{"buildId":"
|
|
9
|
+
:HL["/_next/static/chunks/6d8a7494a0cea7a0.css","style"]
|
|
10
|
+
0:{"buildId":"EGpM0P8xAEWKkoW-3Ib69","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/2473c16c0c2f6b5f.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/chunks/6d8a7494a0cea7a0.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/d1609799f66b572c.js","async":true}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n(() => {\n try {\n const storedTheme = localStorage.getItem(\"agx-theme\");\n const theme = storedTheme === \"dark\" || storedTheme === \"light\"\n ? storedTheme\n : (window.matchMedia(\"(prefers-color-scheme: dark)\").matches ? \"dark\" : \"light\");\n const root = document.documentElement;\n root.classList.toggle(\"dark\", theme === \"dark\");\n root.style.colorScheme = theme;\n } catch {}\n})();\n"}}]}],["$","body",null,{"className":"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable antialiased min-h-screen overflow-x-hidden overflow-y-auto bg-[var(--background)] text-[var(--foreground)] selection:bg-[var(--primary)] selection:text-[var(--primary-foreground)]","children":[["$","$L2",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","template":["$","$L4",null,{}],"notFound":[[["$","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."}]}]]}]}]],[]]}]}],["$","$L5",null,{}],["$","$L6",null,{}],["$","$L7",null,{}]]}]]}]]}],"loading":null,"isPartial":false}
|
package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/_tree.segment.rsc
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
:HL["/_next/static/chunks/2473c16c0c2f6b5f.css","style"]
|
|
2
|
-
:HL["/_next/static/chunks/
|
|
2
|
+
:HL["/_next/static/chunks/6d8a7494a0cea7a0.css","style"]
|
|
3
3
|
:HL["/_next/static/media/797e433ab948586e-s.p.dbea232f.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
4
4
|
:HL["/_next/static/media/caa3a2e1cccd8315-s.p.853070df.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
5
|
-
0:{"buildId":"
|
|
5
|
+
0:{"buildId":"EGpM0P8xAEWKkoW-3Ib69","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"status","paramType":null,"paramKey":"status","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
3:I[381830,["/_next/static/chunks/d1609799f66b572c.js","/_next/static/chunks/114ea1bfd6907330.js"],"default"]
|
|
4
4
|
6:I[351240,["/_next/static/chunks/7212cdf092396efe.js","/_next/static/chunks/341a398270fbed77.js"],"OutletBoundary"]
|
|
5
5
|
7:"$Sreact.suspense"
|
|
6
|
-
0:{"buildId":"
|
|
6
|
+
0:{"buildId":"EGpM0P8xAEWKkoW-3Ib69","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/114ea1bfd6907330.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false}
|
|
7
7
|
4:{}
|
|
8
8
|
5:"$0:rsc:props:children:0:props:serverProvidedParams:params"
|
|
9
9
|
8:null
|
package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/status.segment.rsc
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
1:"$Sreact.fragment"
|
|
2
2
|
2:I[803750,["/_next/static/chunks/7212cdf092396efe.js","/_next/static/chunks/341a398270fbed77.js"],"default"]
|
|
3
3
|
3:I[954957,["/_next/static/chunks/7212cdf092396efe.js","/_next/static/chunks/341a398270fbed77.js"],"default"]
|
|
4
|
-
0:{"buildId":"
|
|
4
|
+
0:{"buildId":"EGpM0P8xAEWKkoW-3Ib69","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false}
|
|
@@ -10,6 +10,6 @@ module.exports=[589578,a=>{a.v({className:"geist_a71539c9-module__T19VSG__classN
|
|
|
10
10
|
root.style.colorScheme = theme;
|
|
11
11
|
} catch {}
|
|
12
12
|
})();
|
|
13
|
-
`;function l({children:a}){return(0,b.jsxs)("html",{lang:"en",suppressHydrationWarning:!0,children:[(0,b.jsx)("head",{children:(0,b.jsx)("script",{dangerouslySetInnerHTML:{__html:k}})}),(0,b.jsxs)("body",{className:`${d.variable} ${f.variable} antialiased min-h-screen overflow-x-hidden overflow-y-auto bg-[var(--background)] text-[var(--foreground)] selection:bg-[var(--primary)] selection:text-[var(--primary-foreground)]`,children:[(0,b.jsx)(i.default,{children:a}),(0,b.jsx)(j.default,{}),(0,b.jsx)(g.GoogleAnalytics,{}),(0,b.jsx)(h.PostHogAnalytics,{})]})]})}a.s(["default",()=>l,"metadata",0,{title:"AGX",description:"
|
|
13
|
+
`;function l({children:a}){return(0,b.jsxs)("html",{lang:"en",suppressHydrationWarning:!0,children:[(0,b.jsx)("head",{children:(0,b.jsx)("script",{dangerouslySetInnerHTML:{__html:k}})}),(0,b.jsxs)("body",{className:`${d.variable} ${f.variable} antialiased min-h-screen overflow-x-hidden overflow-y-auto bg-[var(--background)] text-[var(--foreground)] selection:bg-[var(--primary)] selection:text-[var(--primary-foreground)]`,children:[(0,b.jsx)(i.default,{children:a}),(0,b.jsx)(j.default,{}),(0,b.jsx)(g.GoogleAnalytics,{}),(0,b.jsx)(h.PostHogAnalytics,{})]})]})}a.s(["default",()=>l,"metadata",0,{title:"AGX",description:"Workflow surface for AI-assisted dev work — tickets, repos, PRs, and agents in one window."}],888541)}];
|
|
14
14
|
|
|
15
15
|
//# sourceMappingURL=%5Broot-of-the-server%5D__5187dece._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[193695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},80388,a=>{a.n(a.i(888541))},367314,a=>{a.n(a.i(531160))},742015,a=>{a.n(a.i(758956))},787941,a=>{a.n(a.i(319271))},468951,a=>{a.n(a.i(295343))},238682,a=>{"use strict";a.s(["default",()=>
|
|
1
|
+
module.exports=[193695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},80388,a=>{a.n(a.i(888541))},367314,a=>{a.n(a.i(531160))},742015,a=>{a.n(a.i(758956))},787941,a=>{a.n(a.i(319271))},468951,a=>{a.n(a.i(295343))},238682,a=>{"use strict";a.s(["default",()=>c,"dynamic",()=>d]);var b=a.i(22688);let c=(0,b.registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/apps/local/app/integrations/github/select-repos/page.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/local/app/integrations/github/select-repos/page.tsx <module evaluation>","default"),d=(0,b.registerClientReference)(function(){throw Error("Attempted to call dynamic() from the server but dynamic is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/local/app/integrations/github/select-repos/page.tsx <module evaluation>","dynamic")},237380,a=>{"use strict";a.s(["default",()=>c,"dynamic",()=>d]);var b=a.i(22688);let c=(0,b.registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/apps/local/app/integrations/github/select-repos/page.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/local/app/integrations/github/select-repos/page.tsx","default"),d=(0,b.registerClientReference)(function(){throw Error("Attempted to call dynamic() from the server but dynamic is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/local/app/integrations/github/select-repos/page.tsx","dynamic")},350298,a=>{"use strict";a.i(238682);var b=a.i(237380);a.n(b)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=%5Broot-of-the-server%5D__7752d2d2._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[556704,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},419920,(a,b,c)=>{"use strict";b.exports=a.r(433430).vendored.contexts.HooksClientContext},731042,(a,b,c)=>{"use strict";b.exports=a.r(433430).vendored.contexts.ServerInsertedHtml},120635,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},263841,(a,b,c)=>{"use strict";b.exports=a.r(433430).vendored.contexts.AppRouterContext},204246,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={DEFAULT_SEGMENT_KEY:function(){return l},NOT_FOUND_SEGMENT_KEY:function(){return m},PAGE_SEGMENT_KEY:function(){return k},addSearchParamsIfPageSegment:function(){return i},computeSelectedLayoutSegment:function(){return j},getSegmentValue:function(){return f},getSelectedLayoutSegmentPath:function(){return function a(b,c,d=!0,e=[]){let g;if(d)g=b[1][c];else{let a=b[1];g=a.children??Object.values(a)[0]}if(!g)return e;let h=f(g[0]);return!h||h.startsWith(k)?e:(e.push(h),a(g,c,!1,e))}},isGroupSegment:function(){return g},isParallelRouteSegment:function(){return h}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});function f(a){return Array.isArray(a)?a[1]:a}function g(a){return"("===a[0]&&a.endsWith(")")}function h(a){return a.startsWith("@")&&"@children"!==a}function i(a,b){if(a.includes(k)){let a=JSON.stringify(b);return"{}"!==a?k+"?"+a:k}return a}function j(a,b){if(!a||0===a.length)return null;let c="children"===b?a[0]:a[a.length-1];return c===l?null:c}let k="__PAGE__",l="__DEFAULT__",m="/_not-found"},490335,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={BailoutToCSRError:function(){return g},isBailoutToCSRError:function(){return h}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f="BAILOUT_TO_CLIENT_SIDE_RENDERING";class g extends Error{constructor(a){super(`Bail out to client-side rendering: ${a}`),this.reason=a,this.digest=f}}function h(a){return"object"==typeof a&&null!==a&&"digest"in a&&a.digest===f}},446362,a=>{"use strict";var b=a.i(308316),c=a.i(786220),d=a.i(516909);function e(){let a=(0,d.useRouter)(),e=(0,d.useSearchParams)(),[f,g]=(0,c.useState)(null),[h,i]=(0,c.useState)(null),[j,k]=(0,c.useState)(null),[l,m]=(0,c.useState)(null),[n,o]=(0,c.useState)(null),[p,q]=(0,c.useState)(null),[r,s]=(0,c.useState)(null),[t,u]=(0,c.useState)([]),[v,w]=(0,c.useState)(new Set),[x,y]=(0,c.useState)(""),[z,A]=(0,c.useState)("all"),[B,C]=(0,c.useState)(!0),[D,E]=(0,c.useState)(!1),[F,G]=(0,c.useState)(null);(0,c.useEffect)(()=>{let a=e.get("access_token"),b=a||null;if(!b){G("Missing access token"),C(!1);return}if(a){let b=e.get("refresh_token"),c=e.get("expires_in"),d=e.get("scope"),f=e.get("session"),h=e.get("login"),j=e.get("expires_at");g(a),i(b),k(c),m(d),o(f),q(h),s(j),sessionStorage.setItem("github_token",a),b&&sessionStorage.setItem("github_refresh_token",b),c&&sessionStorage.setItem("github_expires_in",c),d&&sessionStorage.setItem("github_scope",d),f&&sessionStorage.setItem("github_session",f),h&&sessionStorage.setItem("github_login",h),j&&sessionStorage.setItem("github_expires_at",j),window.history.replaceState({},"","/integrations/github/select-repos")}else g(b),i(sessionStorage.getItem("github_refresh_token")),k(sessionStorage.getItem("github_expires_in")),m(sessionStorage.getItem("github_scope")),o(sessionStorage.getItem("github_session")),q(sessionStorage.getItem("github_login")),s(sessionStorage.getItem("github_expires_at"))},[e]),(0,c.useEffect)(()=>{f&&(async()=>{try{let a={Authorization:`token ${f}`,Accept:"application/vnd.github+json","User-Agent":"agx","X-GitHub-Api-Version":"2022-11-28"},b=[],c=1;for(;c<=10;){let d=`https://api.github.com/user/repos?per_page=100&page=${c}&visibility=all&affiliation=owner,collaborator,organization_member&sort=updated`,e=await fetch(d,{headers:a});if(!e.ok)throw Error(`Failed to fetch repos: ${e.status}`);let f=await e.json();if(b.push(...f),f.length<100)break;c++}u(b),C(!1)}catch(a){G(a instanceof Error?a.message:"Failed to fetch repos"),C(!1)}})()},[f]);let H=(0,c.useMemo)(()=>{let a=x.trim().toLowerCase();return t.filter(b=>("public"!==z||!b.private)&&("private"!==z||!!b.private)&&(!a||b.full_name.toLowerCase().includes(a)||(b.description??"").toLowerCase().includes(a)))},[t,x,z]),I=H.length>0&&H.every(a=>v.has(a.id)),J=async()=>{if(!f||0===v.size)return;E(!0);let b=t.filter(a=>v.has(a.id));try{await Promise.all(b.map(a=>fetch("/api/github/repos",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({owner:a.owner.login,name:a.name,private:a.private})})))}catch(a){G(a instanceof Error?a.message:"Failed to save repos"),E(!1);return}let c=new URLSearchParams({access_token:f,repos:b.map(a=>a.full_name).join(",")});h&&c.set("refresh_token",h),j&&c.set("expires_in",j),l&&c.set("scope",l),n&&c.set("session",n),p&&c.set("login",p),r&&c.set("expires_at",r),l&&c.set("scopes",l),a.push(`/api/trackers/github/token-receive?${c.toString()}`)};return(0,b.jsx)("div",{className:"min-h-screen bg-[var(--background)] text-[var(--foreground)]",children:(0,b.jsxs)("div",{className:"max-w-3xl mx-auto px-6 py-10",children:[(0,b.jsxs)("header",{className:"mb-6",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-xs text-[var(--muted-foreground)] mb-2",children:[(0,b.jsx)("span",{children:"GitHub"}),(0,b.jsx)("span",{children:"·"}),(0,b.jsx)("span",{children:"Connect"})]}),(0,b.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:"Select repositories"}),(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)] mt-1",children:"Pick the repos you want agx to track. You can change this later in project settings."}),l&&(0,b.jsxs)("p",{className:"text-[11px] text-[var(--muted-foreground)] mt-2 font-mono",children:["Token scopes: ",l]})]}),F?(0,b.jsx)("div",{className:"rounded-lg border border-[var(--status-failed-border)] bg-[var(--status-failed-bg)] text-[var(--status-failed)] px-4 py-3 text-sm",children:F}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 mb-3",children:[(0,b.jsxs)("div",{className:"relative flex-1",children:[(0,b.jsxs)("svg",{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--muted-foreground)]",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,b.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,b.jsx)("path",{d:"m21 21-4.3-4.3"})]}),(0,b.jsx)("input",{type:"text",value:x,onChange:a=>y(a.target.value),placeholder:"Search repositories...",className:"w-full pl-9 pr-3 py-2 rounded-lg border border-[var(--border)] bg-[var(--input)] text-sm focus:outline-none focus:border-[var(--primary)] focus:bg-[var(--input-focus)] transition-colors"})]}),(0,b.jsx)("div",{className:"flex gap-1 rounded-lg border border-[var(--border)] p-1",children:["all","public","private"].map(a=>(0,b.jsx)("button",{onClick:()=>A(a),className:`px-3 py-1 text-xs rounded-md capitalize transition-colors ${z===a?"bg-[var(--primary)] text-[var(--primary-foreground)]":"text-[var(--muted-foreground)] hover:text-[var(--foreground)]"}`,children:a},a))})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between mb-2 text-xs text-[var(--muted-foreground)]",children:[(0,b.jsxs)("button",{onClick:()=>{w(a=>{let b=new Set(a);return I?H.forEach(a=>b.delete(a.id)):H.forEach(a=>b.add(a.id)),b})},disabled:0===H.length,className:"hover:text-[var(--foreground)] transition-colors disabled:opacity-50",children:[I?"Deselect all":"Select all",x||"all"!==z?` (${H.length} shown)`:""]}),v.size>0&&(0,b.jsx)("button",{onClick:()=>w(new Set),className:"hover:text-[var(--foreground)] transition-colors",children:"Clear selection"})]}),(0,b.jsx)("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--card-bg)] overflow-hidden",children:(0,b.jsx)("div",{className:"max-h-[60vh] overflow-y-auto",children:B?(0,b.jsx)("div",{className:"divide-y divide-[var(--border)]",children:Array.from({length:6}).map((a,c)=>(0,b.jsxs)("div",{className:"px-4 py-3 flex items-center gap-3 animate-pulse",children:[(0,b.jsx)("div",{className:"w-4 h-4 rounded bg-[var(--muted)]"}),(0,b.jsx)("div",{className:"w-6 h-6 rounded-full bg-[var(--muted)]"}),(0,b.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,b.jsx)("div",{className:"h-3 w-1/3 rounded bg-[var(--muted)]"}),(0,b.jsx)("div",{className:"h-2 w-2/3 rounded bg-[var(--muted)]"})]})]},c))}):0===H.length?(0,b.jsx)("div",{className:"px-4 py-10 text-center text-sm text-[var(--muted-foreground)]",children:0===t.length?"No repositories found on your account.":"No repos match your search."}):(0,b.jsx)("ul",{className:"divide-y divide-[var(--border)]",children:H.map(a=>{let c=v.has(a.id);return(0,b.jsx)("li",{children:(0,b.jsxs)("label",{className:`flex items-start gap-3 px-4 py-3 cursor-pointer transition-colors ${c?"bg-[var(--primary-muted)]":"hover:bg-[var(--item-hover-bg)]"}`,children:[(0,b.jsx)("input",{type:"checkbox",checked:c,onChange:()=>{var b;return b=a.id,void w(a=>{let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c})},className:"mt-1 accent-[var(--primary)]"}),(0,b.jsx)("img",{src:a.owner.avatar_url,alt:"",className:"w-6 h-6 rounded-full mt-0.5 flex-shrink-0"}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,b.jsx)("span",{className:"text-sm font-medium truncate",children:a.full_name}),a.private&&(0,b.jsx)("span",{className:"text-[10px] uppercase tracking-wide px-1.5 py-0.5 rounded bg-[var(--muted)] text-[var(--muted-foreground)]",children:"Private"})]}),a.description&&(0,b.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] mt-0.5 line-clamp-1",children:a.description}),(0,b.jsxs)("div",{className:"text-[11px] text-[var(--muted-foreground)] mt-0.5",children:["Updated ",function(a){let b=Math.floor((Date.now()-new Date(a).getTime())/1e3);if(b<60)return"just now";let c=Math.floor(b/60);if(c<60)return`${c}m ago`;let d=Math.floor(c/60);if(d<24)return`${d}h ago`;let e=Math.floor(d/24);if(e<30)return`${e}d ago`;let f=Math.floor(e/30);return f<12?`${f}mo ago`:`${Math.floor(f/12)}y ago`}(a.updated_at)]})]})]})},a.id)})})})}),(0,b.jsxs)("div",{className:"flex items-center justify-between mt-4",children:[(0,b.jsxs)("span",{className:"text-sm text-[var(--muted-foreground)]",children:[v.size," selected"]}),(0,b.jsx)("button",{onClick:J,disabled:0===v.size||D,className:"px-4 py-2 rounded-lg bg-[var(--primary)] hover:bg-[var(--primary-hover)] text-[var(--primary-foreground)] text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:D?"Connecting...":`Continue with ${v.size} ${1===v.size?"repo":"repos"}`})]})]})]})})}a.s(["default",()=>e])}];
|
|
1
|
+
module.exports=[556704,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},419920,(a,b,c)=>{"use strict";b.exports=a.r(433430).vendored.contexts.HooksClientContext},731042,(a,b,c)=>{"use strict";b.exports=a.r(433430).vendored.contexts.ServerInsertedHtml},120635,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},263841,(a,b,c)=>{"use strict";b.exports=a.r(433430).vendored.contexts.AppRouterContext},204246,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={DEFAULT_SEGMENT_KEY:function(){return l},NOT_FOUND_SEGMENT_KEY:function(){return m},PAGE_SEGMENT_KEY:function(){return k},addSearchParamsIfPageSegment:function(){return i},computeSelectedLayoutSegment:function(){return j},getSegmentValue:function(){return f},getSelectedLayoutSegmentPath:function(){return function a(b,c,d=!0,e=[]){let g;if(d)g=b[1][c];else{let a=b[1];g=a.children??Object.values(a)[0]}if(!g)return e;let h=f(g[0]);return!h||h.startsWith(k)?e:(e.push(h),a(g,c,!1,e))}},isGroupSegment:function(){return g},isParallelRouteSegment:function(){return h}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});function f(a){return Array.isArray(a)?a[1]:a}function g(a){return"("===a[0]&&a.endsWith(")")}function h(a){return a.startsWith("@")&&"@children"!==a}function i(a,b){if(a.includes(k)){let a=JSON.stringify(b);return"{}"!==a?k+"?"+a:k}return a}function j(a,b){if(!a||0===a.length)return null;let c="children"===b?a[0]:a[a.length-1];return c===l?null:c}let k="__PAGE__",l="__DEFAULT__",m="/_not-found"},490335,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={BailoutToCSRError:function(){return g},isBailoutToCSRError:function(){return h}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f="BAILOUT_TO_CLIENT_SIDE_RENDERING";class g extends Error{constructor(a){super(`Bail out to client-side rendering: ${a}`),this.reason=a,this.digest=f}}function h(a){return"object"==typeof a&&null!==a&&"digest"in a&&a.digest===f}},446362,a=>{"use strict";var b=a.i(308316),c=a.i(786220),d=a.i(516909);function e(){let a=(0,d.useRouter)(),e=(0,d.useSearchParams)(),[f,g]=(0,c.useState)(null),[h,i]=(0,c.useState)(null),[j,k]=(0,c.useState)(null),[l,m]=(0,c.useState)(null),[n,o]=(0,c.useState)(null),[p,q]=(0,c.useState)(null),[r,s]=(0,c.useState)(null),[t,u]=(0,c.useState)([]),[v,w]=(0,c.useState)(new Set),[x,y]=(0,c.useState)(""),[z,A]=(0,c.useState)("all"),[B,C]=(0,c.useState)(!0),[D,E]=(0,c.useState)(!1),[F,G]=(0,c.useState)(null);(0,c.useEffect)(()=>{let a=e.get("access_token"),b=a||null;if(!b){G("Missing access token"),C(!1);return}if(a){let b=e.get("refresh_token"),c=e.get("expires_in"),d=e.get("scope"),f=e.get("session"),h=e.get("login"),j=e.get("expires_at");g(a),i(b),k(c),m(d),o(f),q(h),s(j),sessionStorage.setItem("github_token",a),b&&sessionStorage.setItem("github_refresh_token",b),c&&sessionStorage.setItem("github_expires_in",c),d&&sessionStorage.setItem("github_scope",d),f&&sessionStorage.setItem("github_session",f),h&&sessionStorage.setItem("github_login",h),j&&sessionStorage.setItem("github_expires_at",j),window.history.replaceState({},"","/integrations/github/select-repos")}else g(b),i(sessionStorage.getItem("github_refresh_token")),k(sessionStorage.getItem("github_expires_in")),m(sessionStorage.getItem("github_scope")),o(sessionStorage.getItem("github_session")),q(sessionStorage.getItem("github_login")),s(sessionStorage.getItem("github_expires_at"))},[e]),(0,c.useEffect)(()=>{f&&(async()=>{try{let a={Authorization:`token ${f}`,Accept:"application/vnd.github+json","User-Agent":"agx","X-GitHub-Api-Version":"2022-11-28"},b=[],c=1;for(;c<=10;){let d=`https://api.github.com/user/repos?per_page=100&page=${c}&visibility=all&affiliation=owner,collaborator,organization_member&sort=updated`,e=await fetch(d,{headers:a});if(!e.ok)throw Error(`Failed to fetch repos: ${e.status}`);let f=await e.json();if(b.push(...f),f.length<100)break;c++}u(b),C(!1)}catch(a){G(a instanceof Error?a.message:"Failed to fetch repos"),C(!1)}})()},[f]);let H=(0,c.useMemo)(()=>{let a=x.trim().toLowerCase();return t.filter(b=>("public"!==z||!b.private)&&("private"!==z||!!b.private)&&(!a||b.full_name.toLowerCase().includes(a)||(b.description??"").toLowerCase().includes(a)))},[t,x,z]),I=H.length>0&&H.every(a=>v.has(a.id)),J=async()=>{if(!f||0===v.size)return;E(!0);let b=t.filter(a=>v.has(a.id));try{await Promise.all(b.map(a=>fetch("/api/github/repos",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({owner:a.owner.login,name:a.name,private:a.private})})))}catch(a){G(a instanceof Error?a.message:"Failed to save repos"),E(!1);return}let c=new URLSearchParams({access_token:f,repos:b.map(a=>a.full_name).join(",")});h&&c.set("refresh_token",h),j&&c.set("expires_in",j),l&&c.set("scope",l),n&&c.set("session",n),p&&c.set("login",p),r&&c.set("expires_at",r),l&&c.set("scopes",l),a.push(`/api/trackers/github/token-receive?${c.toString()}`)};return(0,b.jsx)("div",{className:"min-h-screen bg-[var(--background)] text-[var(--foreground)]",children:(0,b.jsxs)("div",{className:"max-w-3xl mx-auto px-6 py-10",children:[(0,b.jsxs)("header",{className:"mb-6",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-xs text-[var(--muted-foreground)] mb-2",children:[(0,b.jsx)("span",{children:"GitHub"}),(0,b.jsx)("span",{children:"·"}),(0,b.jsx)("span",{children:"Connect"})]}),(0,b.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:"Select repositories"}),(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)] mt-1",children:"Pick the repos you want agx to track. You can change this later in project settings."}),l&&(0,b.jsxs)("p",{className:"text-[11px] text-[var(--muted-foreground)] mt-2 font-mono",children:["Token scopes: ",l]})]}),F?(0,b.jsx)("div",{className:"rounded-lg border border-[var(--status-failed-border)] bg-[var(--status-failed-bg)] text-[var(--status-failed)] px-4 py-3 text-sm",children:F}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 mb-3",children:[(0,b.jsxs)("div",{className:"relative flex-1",children:[(0,b.jsxs)("svg",{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--muted-foreground)]",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,b.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,b.jsx)("path",{d:"m21 21-4.3-4.3"})]}),(0,b.jsx)("input",{type:"text",value:x,onChange:a=>y(a.target.value),placeholder:"Search repositories...",className:"w-full pl-9 pr-3 py-2 rounded-lg border border-[var(--border)] bg-[var(--input)] text-sm focus:outline-none focus:border-[var(--primary)] focus:bg-[var(--input-focus)] transition-colors"})]}),(0,b.jsx)("div",{className:"flex gap-1 rounded-lg border border-[var(--border)] p-1",children:["all","public","private"].map(a=>(0,b.jsx)("button",{onClick:()=>A(a),className:`px-3 py-1 text-xs rounded-md capitalize transition-colors ${z===a?"bg-[var(--primary)] text-[var(--primary-foreground)]":"text-[var(--muted-foreground)] hover:text-[var(--foreground)]"}`,children:a},a))})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between mb-2 text-xs text-[var(--muted-foreground)]",children:[(0,b.jsxs)("button",{onClick:()=>{w(a=>{let b=new Set(a);return I?H.forEach(a=>b.delete(a.id)):H.forEach(a=>b.add(a.id)),b})},disabled:0===H.length,className:"hover:text-[var(--foreground)] transition-colors disabled:opacity-50",children:[I?"Deselect all":"Select all",x||"all"!==z?` (${H.length} shown)`:""]}),v.size>0&&(0,b.jsx)("button",{onClick:()=>w(new Set),className:"hover:text-[var(--foreground)] transition-colors",children:"Clear selection"})]}),(0,b.jsx)("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--card-bg)] overflow-hidden",children:(0,b.jsx)("div",{className:"max-h-[60vh] overflow-y-auto",children:B?(0,b.jsx)("div",{className:"divide-y divide-[var(--border)]",children:Array.from({length:6}).map((a,c)=>(0,b.jsxs)("div",{className:"px-4 py-3 flex items-center gap-3 animate-pulse",children:[(0,b.jsx)("div",{className:"w-4 h-4 rounded bg-[var(--muted)]"}),(0,b.jsx)("div",{className:"w-6 h-6 rounded-full bg-[var(--muted)]"}),(0,b.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,b.jsx)("div",{className:"h-3 w-1/3 rounded bg-[var(--muted)]"}),(0,b.jsx)("div",{className:"h-2 w-2/3 rounded bg-[var(--muted)]"})]})]},c))}):0===H.length?(0,b.jsx)("div",{className:"px-4 py-10 text-center text-sm text-[var(--muted-foreground)]",children:0===t.length?"No repositories found on your account.":"No repos match your search."}):(0,b.jsx)("ul",{className:"divide-y divide-[var(--border)]",children:H.map(a=>{let c=v.has(a.id);return(0,b.jsx)("li",{children:(0,b.jsxs)("label",{className:`flex items-start gap-3 px-4 py-3 cursor-pointer transition-colors ${c?"bg-[var(--primary-muted)]":"hover:bg-[var(--item-hover-bg)]"}`,children:[(0,b.jsx)("input",{type:"checkbox",checked:c,onChange:()=>{var b;return b=a.id,void w(a=>{let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c})},className:"mt-1 accent-[var(--primary)]"}),(0,b.jsx)("img",{src:a.owner.avatar_url,alt:"",className:"w-6 h-6 rounded-full mt-0.5 flex-shrink-0"}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,b.jsx)("span",{className:"text-sm font-medium truncate",children:a.full_name}),a.private&&(0,b.jsx)("span",{className:"text-[10px] uppercase tracking-wide px-1.5 py-0.5 rounded bg-[var(--muted)] text-[var(--muted-foreground)]",children:"Private"})]}),a.description&&(0,b.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] mt-0.5 line-clamp-1",children:a.description}),(0,b.jsxs)("div",{className:"text-[11px] text-[var(--muted-foreground)] mt-0.5",children:["Updated ",function(a){let b=Math.floor((Date.now()-new Date(a).getTime())/1e3);if(b<60)return"just now";let c=Math.floor(b/60);if(c<60)return`${c}m ago`;let d=Math.floor(c/60);if(d<24)return`${d}h ago`;let e=Math.floor(d/24);if(e<30)return`${e}d ago`;let f=Math.floor(e/30);return f<12?`${f}mo ago`:`${Math.floor(f/12)}y ago`}(a.updated_at)]})]})]})},a.id)})})})}),(0,b.jsxs)("div",{className:"flex items-center justify-between mt-4",children:[(0,b.jsxs)("span",{className:"text-sm text-[var(--muted-foreground)]",children:[v.size," selected"]}),(0,b.jsx)("button",{onClick:J,disabled:0===v.size||D,className:"px-4 py-2 rounded-lg bg-[var(--primary)] hover:bg-[var(--primary-hover)] text-[var(--primary-foreground)] text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:D?"Connecting...":`Continue with ${v.size} ${1===v.size?"repo":"repos"}`})]})]})]})})}a.s(["default",()=>e,"dynamic",0,"force-dynamic"])}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=%5Broot-of-the-server%5D__e8c6a1f1._.js.map
|
|
@@ -15,8 +15,8 @@ When updating the objective, you can edit this file directly. Rules:
|
|
|
15
15
|
- NEVER change the \`id\` or \`createdAt\` fields.
|
|
16
16
|
- Always update \`updatedAt\` to the current ISO timestamp when making changes.
|
|
17
17
|
- After any edit, call \`GET ${u}\` to verify the file is still valid.
|
|
18
|
-
- If validation fails, fix the errors immediately before doing anything else.`,"Scheduled tasks live in the shared scheduled-task list and are filtered by this objective label.","Your job is to help the team develop the strategy needed to reach the goal, including the right combination of objective notes, scheduled tasks, and tracker tickets.","Use the current session history to build on prior reasoning. Only reset and start from scratch when the user explicitly starts a new session.","Use this thread to pressure-test strategy, suggest better tactics, rewrite the objective when asked, propose the right operational cadence, and take concrete follow-up actions when the user wants them applied.","When suggesting edits, prefer editing the frontmatter file directly or using the notes API. When the user asks you to make a change, edit the file, validate, then confirm.","Local objective APIs:",`- PATCH ${p} with JSON fields such as {"title","teamId","key"} to update the objective itself.`,`- GET ${r} to list all notes for this objective. Returns {"notes":[...],"total","page","limit","hasMore"}.`,`- POST ${r} with {"title","body"} to create a new note.`,`- GET ${r}/{noteId} to read a single note.`,`- PATCH ${r}/{noteId} with {"title","body"} to update a note.`,`- DELETE ${r}/{noteId} to delete a note.`,`- GET ${q} to inspect the scheduled tasks already tracked for this objective.`,`- POST ${q} with {"name","prompt","cadence","agentId"} to create a scheduled task for this objective.`,`- GET ${u} to validate the objective file on disk. Returns {"valid":true} or {"valid":false,"errors":[...]}.`,"Tracker integrations:",`- Available tracker types: ${o.available.length>0?o.available.map(a=>`${a.displayName} (${a.type})`).join(", "):"none registered"}.`,`- Configured for this project: ${o.configured.length>0?o.configured.map(a=>{let b=o.defaultType===a.type;return`${a.displayName} (${a.type})${b?" — default":""}`}).join(", "):"none — ask the user to connect a tracker in project settings if they want ticket workflows"}.`,o.defaultType?`- Default tracker for ticket workflows: ${o.defaultType}. Prefer this tracker when creating or referencing tickets for this objective unless the user asks otherwise.`:o.configured.length>1?"- No default tracker has been selected; ask the user which connected tracker to use before creating tickets.":"",...o.configured.map(b=>`- GET /api/trackers/${b.type}/items?projectId=${a} to list ${b.displayName} items. Filter client-side by label "${f.key}" to find tickets tied to this objective.`)].filter(Boolean).join("\n\n")),m].filter(Boolean).join("\n\n"),A=await Z(b,d,w,y,e,g,h?[h]:x,c,z,n);!y&&A&&(G(A),E("detail"))},[null,aj,ay,aC,av,f,N,a,c,F,Z,i]),aE=(0,e.useMemo)(()=>av?au?.messages??[]:[],[av,au]),aF=(0,e.useMemo)(()=>av&&F?Object.entries(ad).filter(([,a])=>a.rootMessageId===F):[],[av,F,ad]),aG=(0,e.useCallback)(a=>{p(b=>{let c=Math.max(320,Math.min(1200,b-a));return(0,al.persistObjectiveChatPanelWidth)(c),c})},[]);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(ap,{onResize:aG}),(0,b.jsxs)("aside",{className:"relative flex h-full min-h-[420px] w-full flex-col overflow-hidden border-t border-[var(--border)] bg-[var(--overlay-panel)] xl:min-h-0 xl:w-[var(--objective-chat-panel-width)] xl:shrink-0 xl:self-stretch xl:border-l xl:border-t-0",style:{"--objective-chat-panel-width":`${o}px`},children:[(0,b.jsx)(aw,{message:P}),av?(0,b.jsx)("div",{className:"border-b border-[var(--border)] px-4 py-4",children:(0,b.jsxs)("button",{type:"button",onClick:()=>E("list"),"aria-label":"Back to sessions",className:"inline-flex min-w-0 items-center gap-2 text-left text-sm font-medium text-[var(--foreground)] transition-colors hover:text-[var(--primary)]",children:[(0,b.jsx)(g.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{className:"truncate",children:au?.title??"Loading session..."})]})}):(0,b.jsx)("div",{className:"border-b border-[var(--border)] px-4 py-4",children:(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("p",{className:"text-xs font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:"Strategy Sessions"}),(0,b.jsx)("p",{className:"text-xs text-[var(--muted-foreground)]",children:"Start a new strategy conversation below, or open an earlier session to keep building on it."})]})}),(0,b.jsx)("div",{ref:T,className:`min-h-0 flex-1 overflow-y-auto pb-[calc(15rem+env(safe-area-inset-bottom))] ${av?"px-4 py-4":"px-0 py-0"}`,children:av?0===aE.length?(0,b.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 px-4 text-center text-[var(--muted-foreground)]",children:[(0,b.jsx)("p",{className:"text-sm font-medium text-[var(--foreground)]",children:"Loading strategy session"}),(0,b.jsx)("p",{className:"max-w-sm text-xs",children:"The conversation will appear here once the session history is ready."})]}):(0,b.jsxs)("div",{className:"space-y-5",children:[aE.map(a=>{let c=a.participantId?ao.get(a.participantId):null,d=H===a.id;return(0,b.jsxs)("div",{"data-objective-message-id":a.id,className:`flex gap-3 rounded-2xl transition-colors ${d?"bg-[var(--status-in-progress-bg)] p-2 -m-2":""}`,children:["user"===a.role?(0,b.jsx)("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-[var(--overlay-panel-soft)] text-[var(--muted-foreground)]",children:(0,b.jsx)(r.User,{className:"h-4 w-4"})}):(0,b.jsx)("img",{src:(0,B.agentAvatarUrl)(a.participantId??"assistant",32,c?.color),alt:c?.name??"Agent",className:"h-8 w-8 shrink-0 rounded-full border border-[var(--border)] object-cover"}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-sm font-medium text-[var(--foreground)]",children:"user"===a.role?"You":c?.name??"Agent"}),(0,b.jsx)("span",{className:"text-[11px] text-[var(--muted-foreground)]",children:new Date(a.timestamp).toLocaleString([],{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})})]}),(0,b.jsx)("div",{className:"mt-2 rounded-2xl border border-[var(--border)] bg-[var(--overlay-panel-muted)] px-4 py-3 text-[15px] leading-relaxed text-[var(--foreground)]",children:"user"===a.role?(0,b.jsx)(z.Markdown,{content:(0,C.stripMarkers)(a.content),isUser:!0}):(0,b.jsx)(A.StreamingSegments,{content:(0,C.stripMarkers)(a.content)})})]})]},a.id)}),aF.map(([a])=>{let c=ao.get(a);return(0,b.jsxs)("div",{className:"flex items-center gap-3 text-sm text-[var(--muted-foreground)]",children:[(0,b.jsx)("img",{src:(0,B.agentAvatarUrl)(a,32,c?.color),alt:c?.name??"Agent",className:"h-8 w-8 shrink-0 rounded-full border border-[var(--border)] object-cover"}),(0,b.jsxs)("span",{children:[c?.name??"Agent"," is thinking..."]})]},`stream-${a}`)}),(0,b.jsx)("div",{ref:U})]}):0===as.length?(0,b.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 px-4 text-center text-[var(--muted-foreground)]",children:[(0,b.jsx)("p",{className:"text-sm font-medium text-[var(--foreground)]",children:"No strategy sessions yet"}),(0,b.jsx)("p",{className:"max-w-sm text-xs",children:"Use the composer below to start the first conversation about how this objective should be reached."})]}):(0,b.jsx)("div",{className:"divide-y divide-[var(--border)]",children:as.map(a=>{var c;let d=az.get(a.rootMessageId)??null;return(0,b.jsxs)("button",{type:"button",onClick:()=>{G(a.rootMessageId),E("detail")},className:"flex w-full items-start justify-between gap-3 px-4 py-3 text-left transition-colors hover:bg-[var(--overlay-panel-soft)]",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("p",{className:"truncate text-sm font-medium text-[var(--foreground)]",children:a.title}),(0,b.jsxs)("p",{className:"mt-1 text-[11px] text-[var(--muted-foreground)]",children:[1===(c=a.messageCount)?"1 message":`${c} messages`," · Last"," ",aq(a.updatedAt)]})]}),(0,b.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[d?(0,b.jsx)("span",{className:"rounded-full border border-[var(--status-in-progress-border)] bg-[var(--status-in-progress-bg)] px-2 py-1 text-[10px] font-semibold uppercase tracking-[0.18em] text-[var(--status-in-progress-text)]",children:"queued"===d?"Queued":"Working"}):null,(0,b.jsx)(h.ArrowRight,{className:"mt-0.5 h-4 w-4 text-[var(--muted-foreground)]"})]})]},a.rootMessageId)})})}),(0,b.jsx)(ah.JumpToLatestButton,{visible:av&&V&&aE.length>10,onClick:ag,direction:"bottom",offsetClassName:"bottom-[calc(15rem+env(safe-area-inset-bottom))]"}),(0,b.jsx)("div",{className:"absolute bottom-0 left-0 right-0 bg-[var(--overlay-panel)] p-3 pb-[calc(0.75rem+env(safe-area-inset-bottom))]",children:(0,b.jsx)(y.Composer,{onSend:aD,onStop:aC,participants:N,commands:[],projectId:a,projectSlug:c,loading:"ready"!==aA,activityStatus:aA,sendInterruptsBusy:!0,placeholder:av?`Continue strategy for "${f.title}"...`:`Start a new strategy session for "${f.title}"...`,initialPinnedParticipantId:N[0]?.id})})]})]})}function av({label:a}){return(0,b.jsx)("div",{className:"flex h-full items-center justify-center text-sm text-[var(--muted-foreground)]",children:a})}function aw({message:a}){return a?(0,b.jsxs)("div",{className:"mt-3 flex items-center gap-2 rounded-2xl border border-rose-500/20 bg-rose-500/10 px-3 py-2 text-sm text-rose-100",children:[(0,b.jsx)(f.AlertTriangle,{className:"h-4 w-4"}),(0,b.jsx)("span",{children:a})]}):null}function ax({content:a,editable:c=!1,onChange:d,placeholder:e}){let f=a.trim().length>0;return c||f?(0,b.jsx)("div",{className:"overflow-hidden border-l-2 border-[var(--border)]/60 pl-4 transition-all focus-within:border-indigo-500/60",children:c||f?(0,b.jsx)(D.default,{content:a,editable:c,onChange:d,placeholder:e}):null}):null}function ay({onResize:a}){let{isTouchLayout:c}=(0,aj.useInputCapabilities)();return c?null:(0,b.jsx)(ai.ResizeHandle,{onResize:a,ariaLabel:"Resize objective list panel"})}function az({objective:a,activityCount:c,lastActivityAt:d,activeAgentIds:e,participants:f,isSelected:g,onSelect:h}){let i,j=(i=1===c?"1 activity":`${c} activities`,d?`${i} \xb7 Last ${aq(d)}`:`${i} \xb7 No activity yet`);return(0,b.jsx)("article",{className:"px-2",children:(0,b.jsxs)("button",{type:"button",onClick:h,"aria-label":`Open details for ${a.title}`,className:`group flex w-full items-center gap-3 rounded-xl px-2 py-2 text-left transition-colors ${g?"bg-[var(--primary)]/10 border border-[var(--primary)]/20":"border border-transparent hover:bg-[var(--secondary)]"}`,children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1 py-0.5",children:[(0,b.jsx)("div",{className:"flex min-w-0 items-center gap-2",children:(0,b.jsx)("span",{className:`rounded-full border px-1.5 py-0 text-[9px] font-semibold uppercase tracking-[0.12em] ${ao[a.status].chipClass}`,children:ao[a.status].label})}),(0,b.jsx)("p",{className:"mt-1 truncate text-sm font-medium text-[var(--foreground)]",children:a.title}),(0,b.jsx)("p",{className:"mt-0.5 text-[11px] text-[var(--muted-foreground)]",children:j})]}),e&&e.length>0&&(0,b.jsx)("span",{className:"inline-flex items-center -space-x-1 shrink-0",children:e.slice(0,3).map(a=>{let c=f?.find(b=>b.id===a);return(0,b.jsxs)("span",{className:"relative inline-block",title:c?.name??a,children:[(0,b.jsx)("img",{src:(0,B.agentAvatarUrl)(a,16,c?.color??void 0),alt:c?.name??a,className:"h-3 w-3 rounded-full ring-[1.5px] ring-[var(--background)]"}),(0,b.jsx)("span",{className:"absolute -bottom-px -right-px h-1.5 w-1.5 rounded-full bg-green-500 ring-[1px] ring-[var(--background)]"})]},a)})})]})})}function aA({projectSlug:a,initialObjectiveId:c}){let{isLoading:d,project:f,workspace:g,teams:h,persistWorkspace:i}=as(a),j=g.objectives,[k,l]=(0,e.useState)(c??null),[m,n]=(0,e.useState)(()=>(0,al.loadObjectiveListPanelWidth)()||320),[p,q]=(0,e.useState)(null),[r,s]=(0,e.useState)(!1),[t,u]=(0,e.useState)(null),[v,w]=(0,e.useState)(new Map),[x,y]=(0,e.useState)([]);(0,e.useEffect)(()=>{!k&&j.length>0&&l(j[0].id)},[k,j]),(0,e.useEffect)(()=>{k&&j.length>0&&!j.some(a=>a.id===k)&&l(j[0]?.id??null)},[k,j]),(0,e.useEffect)(()=>{let a=!1;return async function(){try{let b=await fetch("/api/participants");b.ok&&!a&&y(await b.json())}catch{}}(),()=>{a=!0}},[]),(0,e.useEffect)(()=>{let a=new Map;for(let b of j)b.threadId&&a.set(b.threadId,b.id);if(0===a.size)return;let b=!1;async function c(){try{let c=Array.from(a.keys()).join(","),d=await fetch(`/api/chat-runs/active-agents?threadIds=${encodeURIComponent(c)}`);if(!d.ok||b)return;let e=await d.json(),f=new Map;for(let[b,c]of Object.entries(e.activeAgents??{})){let d=a.get(b);d&&Array.isArray(c)&&c.length>0&&f.set(d,c)}b||w(f)}catch{}}c();let d=setInterval(()=>void c(),5e3);return()=>{b=!0,clearInterval(d)}},[j]);let z=async()=>{if(!p)return;let a=p.title.trim();if(!a)return void u("Objective statement is required.");let b=p.teamId.trim();if(!b)return void u("Team is required.");let c=new Date().toISOString(),d=(0,an.createProjectObjective)({title:a,teamId:b,key:(0,an.generateProjectObjectiveKey)(a,g.objectives),summary:p.summary,now:c});s(!0),u(null);try{await i((0,an.upsertProjectObjective)(g,d));try{await fetch(`/api/projects/${f?.id}/objectives/${d.id}/worker`,{method:"POST",headers:{"Content-Type":"application/json"}})}catch{}q(null),l(d.id)}catch(a){u(a instanceof Error?a.message:"Failed to save objective updates.")}finally{s(!1)}},A=(0,e.useCallback)(a=>{n(b=>{let c=Math.max(240,Math.min(480,b+a));return(0,al.persistObjectiveListPanelWidth)(c),c})},[]);return d&&!f?(0,b.jsx)(av,{label:"Loading objectives..."}):f?(0,b.jsxs)("div",{className:"flex h-full min-h-0 overflow-hidden bg-[var(--background)] text-[var(--foreground)]",children:[(0,b.jsxs)("div",{className:"flex flex-shrink-0 flex-col border-r border-[var(--border)] bg-[var(--background)]",style:{width:m},children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-4 py-3",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("p",{className:"text-xs font-semibold uppercase tracking-[0.12em] text-[var(--muted-foreground)]",children:"Objectives"}),(0,b.jsx)("p",{className:"mt-0.5 text-[11px] text-[var(--muted-foreground)]",children:0===j.length?"None yet":`${j.length} total`})]}),(0,b.jsx)("button",{type:"button",onClick:()=>q(ar()),className:"inline-flex h-7 w-7 items-center justify-center rounded-lg text-[var(--muted-foreground)] transition-colors hover:bg-[var(--secondary)] hover:text-[var(--foreground)]","aria-label":"New objective",children:(0,b.jsx)(o.Plus,{className:"h-4 w-4"})})]}),(0,b.jsx)(aw,{message:t}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto py-1",children:0===j.length?(0,b.jsxs)("div",{className:"px-4 py-8 text-center",children:[(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No objectives yet."}),(0,b.jsx)("button",{type:"button",onClick:()=>q(ar()),className:"mt-2 text-sm text-[var(--primary)] hover:underline",children:"Create one"})]}):(0,b.jsx)("div",{className:"space-y-0.5",children:j.map(a=>{let c=(0,an.buildObjectiveTimelineActivities)({objective:a,workspace:g});return(0,b.jsx)(az,{objective:a,activityCount:c.length,lastActivityAt:c[0]?.createdAt??null,activeAgentIds:v.get(a.id),participants:x,isSelected:k===a.id,onSelect:()=>l(a.id)},a.id)})})})]}),(0,b.jsx)(ay,{onResize:A}),(0,b.jsx)("div",{className:"flex-1 min-w-0 min-h-0 overflow-hidden",children:k?(0,b.jsx)(aB,{projectSlug:a,objectiveId:k,onObjectiveDeleted:()=>l(null)}):(0,b.jsx)("div",{className:"flex h-full items-center justify-center text-sm text-[var(--muted-foreground)]",children:0===j.length?"Create an objective to get started.":"Select an objective from the list."})}),p?(0,b.jsx)(aD,{mode:"create",draft:p,teams:h,isSaving:r,onChange:q,onClose:()=>q(null),onSave:()=>void z()}):null]}):(0,b.jsx)(av,{label:"Project not found."})}function aB({projectSlug:a,objectiveId:f,onObjectiveDeleted:g}){var h;let i,r,v,w,x,y,A,B,C,D=(0,d.useRouter)(),{isLoading:F,project:G,workspace:H,teams:I,persistWorkspace:K,refetchProject:L}=as(a),M=(0,e.useMemo)(()=>H.objectives.find(a=>a.id===f)??null,[f,H.objectives]),N=M?(h=M.teamId,I.find(a=>a.id===h)?.name??null):null,[O,Q]=(0,e.useState)(null),[R,S]=(0,e.useState)(null),[T,U]=(0,e.useState)("activity"),[V,W]=(0,e.useState)(0),[Y,Z]=(0,e.useState)(!1),[$,_]=(0,e.useState)(null),[aa,ab]=(0,e.useState)([]),[ac,ad]=(0,e.useState)(!1),[ae,ai]=(0,e.useState)(null),[aj,ak]=(0,e.useState)({}),[al,am]=(0,e.useState)({}),[ap,ar]=(0,e.useState)(new Set),[at,ay]=(0,e.useState)(!1),[az,aA]=(0,e.useState)(""),[aB,aD]=(0,e.useState)([]),[aE,aF]=(0,e.useState)([]),[aG,aH]=(0,e.useState)([]),[aI,aJ]=(0,e.useState)(null),[aK,aL]=(0,e.useState)(!1),[aM,aN]=(0,e.useState)(null),[aO,aP]=(0,e.useState)(null),[aQ,aR]=(0,e.useState)(null),[aS,aT]=(0,e.useState)(!1),aU=(0,e.useRef)(null),[aV,aW]=(0,e.useState)(!1);(0,e.useEffect)(()=>{let a=aU.current;if(!a)return;let b=()=>aW(a.scrollTop>400);return a.addEventListener("scroll",b,{passive:!0}),()=>a.removeEventListener("scroll",b)},[f]);let aX=(0,e.useCallback)(()=>{aU.current?.scrollTo({top:0,behavior:"smooth"})},[]),{jobs:aY}=(0,J.usePromptJobs)(G?.id??null,{requireProjectId:!0,includeObjectiveJobs:!0,objectiveId:f}),aZ=(0,e.useMemo)(()=>aY.filter(a=>a.objectiveId===f).length,[aY,f]),a$=async a=>{Z(!0),_(null);try{await K(a)}catch(a){throw _(a instanceof Error?a.message:"Failed to save objective updates."),a}finally{Z(!1)}},a_=async()=>{if(!O||!M)return;let a=O.title.trim();if(!a)return void _("Objective statement is required.");let b={...M,title:a,updatedAt:new Date().toISOString()};await a$((0,an.upsertProjectObjective)(H,b)),Q(null)},a0=(0,e.useCallback)(async()=>{if(G?.id&&M?.id){ad(!0);try{let a=await fetch(`/api/projects/${G.id}/objectives/${M.id}/notes?limit=100`);if(a.ok){let b=await a.json();ab(b.notes??[])}}catch{}finally{ad(!1)}}},[G?.id,M?.id]);(0,e.useEffect)(()=>{a0()},[a0]);let a1=(0,e.useCallback)(async()=>{if(G?.id&&M?.id)try{let a=await fetch(`/api/projects/${G.id}/objectives/${M.id}/program`);if(a.ok){let b=await a.json();aN(b.program?.content??null),aP(b.program?.path??null)}}catch{}},[G?.id,M?.id]);(0,e.useEffect)(()=>{a1()},[a1]);let a2=(0,e.useCallback)(async()=>{if(G?.id&&M?.id&&null!==aQ){aT(!0);try{let a=await fetch(`/api/projects/${G.id}/objectives/${M.id}/program`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:aQ})});if(a.ok){let b=await a.json();aN(b.program?.content??null),aP(b.program?.path??null),aR(null)}}finally{aT(!1)}}},[G?.id,M?.id,aQ]);(0,e.useEffect)(()=>{"notes"===T&&a0()},[T,a0]),(0,e.useEffect)(()=>{if(!G?.id||!M?.id)return;let a=new Set;for(let[b,c]of Object.entries(aj)){let d=aa.find(a=>a.id===b);d&&d.body!==c&&a.add(b)}for(let[b,c]of Object.entries(al)){let d=aa.find(a=>a.id===b);d&&d.title!==c&&a.add(b)}if(0===a.size)return;let b=[];for(let c of a){let a={},d=aj[c],e=al[c],f=aa.find(a=>a.id===c);if(!f||(void 0!==d&&d!==f.body&&(a.body=d),void 0!==e&&e!==f.title&&e.trim()&&(a.title=e.trim()),0===Object.keys(a).length))continue;let g=window.setTimeout(async()=>{ar(a=>new Set(a).add(c));try{let b=await fetch(`/api/projects/${G.id}/objectives/${M.id}/notes/${c}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(b.ok){let a=await b.json();ab(b=>b.map(b=>b.id===c?a.note:b))}}catch{_("Failed to save note.")}finally{ar(a=>{let b=new Set(a);return b.delete(c),b})}},700);b.push(g)}return()=>{for(let a of b)window.clearTimeout(a)}},[aj,al,aa,G?.id,M?.id]);let a3=async()=>{if(G?.id&&M?.id){ay(!0);try{let a=await fetch(`/api/projects/${G.id}/objectives/${M.id}/notes`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:"Untitled",body:""})});if(a.ok){let b=await a.json();ab(a=>[b.note,...a]),ai(b.note.id)}}catch{_("Failed to create note.")}finally{ay(!1)}}},a4=async a=>{if(G?.id&&M?.id)try{let b=await fetch(`/api/projects/${G.id}/objectives/${M.id}/notes/${a}`,{method:"DELETE"});(b.ok||204===b.status)&&(ab(b=>b.filter(b=>b.id!==a)),ae===a&&ai(null))}catch{_("Failed to delete note.")}},a5=async()=>{!M||window.confirm(`Delete "${M.title}"?`)&&(await a$((0,an.removeProjectObjective)(H,M.id)),g?g():D.push(`/projects/${a}`))},a6=(0,e.useCallback)(async a=>{M&&M.threadId!==a&&await a$((0,an.upsertProjectObjective)(H,{...M,threadId:a,updatedAt:new Date().toISOString()}))},[M,a$,H]),a7=(0,e.useCallback)(async a=>{if(!G?.id||!M?.id)return _("Objective not found."),!1;_(null);try{let b=await fetch(`/api/projects/${G.id}/objectives/${M.id}/scheduled-tasks`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,prompt:function(a,b){let c=b.trim();if(!c)return c;let d=`Objective label: ${a.key}`;return c.toLowerCase().includes(d.toLowerCase())?c:[d,`Write your output as an activity file at ~/.agx/projects/<project>/objectives/${a.key}/activities/<timestamp>-<slug>.md
|
|
18
|
+
- If validation fails, fix the errors immediately before doing anything else.`,"Scheduled tasks live in the shared scheduled-task list and are filtered by this objective label.","Your job is to help the team develop the strategy needed to reach the goal, including the right combination of objective notes, scheduled tasks, and tracker tickets.","Use the current session history to build on prior reasoning. Only reset and start from scratch when the user explicitly starts a new session.","Use this thread to pressure-test strategy, suggest better tactics, rewrite the objective when asked, propose the right operational cadence, and take concrete follow-up actions when the user wants them applied.","When suggesting edits, prefer editing the frontmatter file directly or using the notes API. When the user asks you to make a change, edit the file, validate, then confirm.","Local objective APIs:",`- PATCH ${p} with JSON fields such as {"title","teamId","key"} to update the objective itself.`,`- GET ${r} to list all notes for this objective. Returns {"notes":[...],"total","page","limit","hasMore"}.`,`- POST ${r} with {"title","body"} to create a new note.`,`- GET ${r}/{noteId} to read a single note.`,`- PATCH ${r}/{noteId} with {"title","body"} to update a note.`,`- DELETE ${r}/{noteId} to delete a note.`,`- GET ${q} to inspect the scheduled tasks already tracked for this objective.`,`- POST ${q} with {"name","prompt","cadence","agentId"} to create a scheduled task for this objective.`,`- GET ${u} to validate the objective file on disk. Returns {"valid":true} or {"valid":false,"errors":[...]}.`,"Tracker integrations:",`- Available tracker types: ${o.available.length>0?o.available.map(a=>`${a.displayName} (${a.type})`).join(", "):"none registered"}.`,`- Configured for this project: ${o.configured.length>0?o.configured.map(a=>{let b=o.defaultType===a.type;return`${a.displayName} (${a.type})${b?" — default":""}`}).join(", "):"none — ask the user to connect a tracker in project settings if they want ticket workflows"}.`,o.defaultType?`- Default tracker for ticket workflows: ${o.defaultType}. Prefer this tracker when creating or referencing tickets for this objective unless the user asks otherwise.`:o.configured.length>1?"- No default tracker has been selected; ask the user which connected tracker to use before creating tickets.":"",...o.configured.map(b=>`- GET /api/trackers/${b.type}/items?projectId=${a} to list ${b.displayName} items. Filter client-side by label "${f.key}" to find tickets tied to this objective.`)].filter(Boolean).join("\n\n")),m].filter(Boolean).join("\n\n"),A=await Z(b,d,w,y,e,g,h?[h]:x,c,z,n);!y&&A&&(G(A),E("detail"))},[null,aj,ay,aC,av,f,N,a,c,F,Z,i]),aE=(0,e.useMemo)(()=>av?au?.messages??[]:[],[av,au]),aF=(0,e.useMemo)(()=>av&&F?Object.entries(ad).filter(([,a])=>a.rootMessageId===F):[],[av,F,ad]),aG=(0,e.useCallback)(a=>{p(b=>{let c=Math.max(320,Math.min(1200,b-a));return(0,al.persistObjectiveChatPanelWidth)(c),c})},[]);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(ap,{onResize:aG}),(0,b.jsxs)("aside",{className:"relative flex h-full min-h-[420px] w-full flex-col overflow-hidden border-t border-[var(--border)] bg-[var(--overlay-panel)] xl:min-h-0 xl:w-[var(--objective-chat-panel-width)] xl:shrink-0 xl:self-stretch xl:border-l xl:border-t-0",style:{"--objective-chat-panel-width":`${o}px`},children:[(0,b.jsx)(aw,{message:P}),av?(0,b.jsx)("div",{className:"border-b border-[var(--border)] px-4 py-4",children:(0,b.jsxs)("button",{type:"button",onClick:()=>E("list"),"aria-label":"Back to sessions",className:"inline-flex min-w-0 items-center gap-2 text-left text-sm font-medium text-[var(--foreground)] transition-colors hover:text-[var(--primary)]",children:[(0,b.jsx)(g.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{className:"truncate",children:au?.title??"Loading session..."})]})}):(0,b.jsx)("div",{className:"border-b border-[var(--border)] px-4 py-4",children:(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("p",{className:"text-xs font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:"Strategy Sessions"}),(0,b.jsx)("p",{className:"text-xs text-[var(--muted-foreground)]",children:"Start a new strategy conversation below, or open an earlier session to keep building on it."})]})}),(0,b.jsx)("div",{ref:T,className:`min-h-0 flex-1 overflow-y-auto pb-[calc(15rem+env(safe-area-inset-bottom))] ${av?"px-4 py-4":"px-0 py-0"}`,children:av?0===aE.length?(0,b.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 px-4 text-center text-[var(--muted-foreground)]",children:[(0,b.jsx)("p",{className:"text-sm font-medium text-[var(--foreground)]",children:"Loading strategy session"}),(0,b.jsx)("p",{className:"max-w-sm text-xs",children:"The conversation will appear here once the session history is ready."})]}):(0,b.jsxs)("div",{className:"space-y-5",children:[aE.map(a=>{let c=a.participantId?ao.get(a.participantId):null,d=H===a.id;return(0,b.jsxs)("div",{"data-objective-message-id":a.id,className:`flex gap-3 rounded-2xl transition-colors ${d?"bg-[var(--status-in-progress-bg)] p-2 -m-2":""}`,children:["user"===a.role?(0,b.jsx)("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-[var(--overlay-panel-soft)] text-[var(--muted-foreground)]",children:(0,b.jsx)(r.User,{className:"h-4 w-4"})}):(0,b.jsx)("img",{src:(0,B.agentAvatarUrl)(a.participantId??"assistant",32,c?.color),alt:c?.name??"Agent",className:"h-8 w-8 shrink-0 rounded-full border border-[var(--border)] object-cover"}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-sm font-medium text-[var(--foreground)]",children:"user"===a.role?"You":c?.name??"Agent"}),(0,b.jsx)("span",{className:"text-[11px] text-[var(--muted-foreground)]",children:new Date(a.timestamp).toLocaleString([],{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})})]}),(0,b.jsx)("div",{className:"mt-2 rounded-2xl border border-[var(--border)] bg-[var(--overlay-panel-muted)] px-4 py-3 text-[15px] leading-relaxed text-[var(--foreground)]",children:"user"===a.role?(0,b.jsx)(z.Markdown,{content:(0,C.stripMarkers)(a.content),isUser:!0}):(0,b.jsx)(A.StreamingSegments,{content:(0,C.stripMarkers)(a.content)})})]})]},a.id)}),aF.map(([a])=>{let c=ao.get(a);return(0,b.jsxs)("div",{className:"flex items-center gap-3 text-sm text-[var(--muted-foreground)]",children:[(0,b.jsx)("img",{src:(0,B.agentAvatarUrl)(a,32,c?.color),alt:c?.name??"Agent",className:"h-8 w-8 shrink-0 rounded-full border border-[var(--border)] object-cover"}),(0,b.jsxs)("span",{children:[c?.name??"Agent"," is thinking..."]})]},`stream-${a}`)}),(0,b.jsx)("div",{ref:U})]}):0===as.length?(0,b.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 px-4 text-center text-[var(--muted-foreground)]",children:[(0,b.jsx)("p",{className:"text-sm font-medium text-[var(--foreground)]",children:"No strategy sessions yet"}),(0,b.jsx)("p",{className:"max-w-sm text-xs",children:"Use the composer below to start the first conversation about how this objective should be reached."})]}):(0,b.jsx)("div",{className:"divide-y divide-[var(--border)]",children:as.map(a=>{var c;let d=az.get(a.rootMessageId)??null;return(0,b.jsxs)("button",{type:"button",onClick:()=>{G(a.rootMessageId),E("detail")},className:"flex w-full items-start justify-between gap-3 px-4 py-3 text-left transition-colors hover:bg-[var(--overlay-panel-soft)]",children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("p",{className:"truncate text-sm font-medium text-[var(--foreground)]",children:a.title}),(0,b.jsxs)("p",{className:"mt-1 text-[11px] text-[var(--muted-foreground)]",children:[1===(c=a.messageCount)?"1 message":`${c} messages`," · Last"," ",aq(a.updatedAt)]})]}),(0,b.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[d?(0,b.jsx)("span",{className:"rounded-full border border-[var(--status-in-progress-border)] bg-[var(--status-in-progress-bg)] px-2 py-1 text-[10px] font-semibold uppercase tracking-[0.18em] text-[var(--status-in-progress-text)]",children:"queued"===d?"Queued":"Working"}):null,(0,b.jsx)(h.ArrowRight,{className:"mt-0.5 h-4 w-4 text-[var(--muted-foreground)]"})]})]},a.rootMessageId)})})}),(0,b.jsx)(ah.JumpToLatestButton,{visible:av&&V&&aE.length>10,onClick:ag,direction:"bottom",offsetClassName:"bottom-[calc(15rem+env(safe-area-inset-bottom))]"}),(0,b.jsx)("div",{className:"absolute bottom-0 left-0 right-0 bg-[var(--overlay-panel)] p-3 pb-[calc(0.75rem+env(safe-area-inset-bottom))]",children:(0,b.jsx)(y.Composer,{onSend:aD,onStop:aC,participants:N,commands:[],projectId:a,projectSlug:c,loading:"ready"!==aA,activityStatus:aA,sendInterruptsBusy:!0,placeholder:av?`Continue strategy for "${f.title}"...`:`Start a new strategy session for "${f.title}"...`,initialPinnedParticipantId:N[0]?.id})})]})]})}function av({label:a}){return(0,b.jsx)("div",{className:"flex h-full items-center justify-center text-sm text-[var(--muted-foreground)]",children:a})}function aw({message:a}){return a?(0,b.jsxs)("div",{className:"mt-3 flex items-center gap-2 rounded-2xl border border-rose-500/20 bg-rose-500/10 px-3 py-2 text-sm text-rose-100",children:[(0,b.jsx)(f.AlertTriangle,{className:"h-4 w-4"}),(0,b.jsx)("span",{children:a})]}):null}function ax({content:a,editable:c=!1,onChange:d,placeholder:e}){let f=a.trim().length>0;return c||f?(0,b.jsx)("div",{className:"overflow-hidden border-l-2 border-[var(--border)]/60 pl-4 transition-all focus-within:border-indigo-500/60",children:c||f?(0,b.jsx)(D.default,{content:a,editable:c,onChange:d,placeholder:e}):null}):null}function ay({onResize:a}){let{isTouchLayout:c}=(0,aj.useInputCapabilities)();return c?null:(0,b.jsx)(ai.ResizeHandle,{onResize:a,ariaLabel:"Resize objective list panel"})}function az({objective:a,activityCount:c,lastActivityAt:d,activeAgentIds:e,participants:f,isSelected:g,onSelect:h}){let i,j=(i=1===c?"1 activity":`${c} activities`,d?`${i} \xb7 Last ${aq(d)}`:`${i} \xb7 No activity yet`);return(0,b.jsx)("article",{className:"px-2",children:(0,b.jsxs)("button",{type:"button",onClick:h,"aria-label":`Open details for ${a.title}`,className:`group flex w-full items-center gap-3 rounded-xl px-2 py-2 text-left transition-colors ${g?"bg-[var(--primary)]/10 border border-[var(--primary)]/20":"border border-transparent hover:bg-[var(--secondary)]"}`,children:[(0,b.jsxs)("div",{className:"min-w-0 flex-1 py-0.5",children:[(0,b.jsx)("div",{className:"flex min-w-0 items-center gap-2",children:(0,b.jsx)("span",{className:`rounded-full border px-1.5 py-0 text-[9px] font-semibold uppercase tracking-[0.12em] ${ao[a.status].chipClass}`,children:ao[a.status].label})}),(0,b.jsx)("p",{className:"mt-1 truncate text-sm font-medium text-[var(--foreground)]",children:a.title}),(0,b.jsx)("p",{className:"mt-0.5 text-[11px] text-[var(--muted-foreground)]",children:j})]}),e&&e.length>0&&(0,b.jsx)("span",{className:"inline-flex items-center -space-x-1 shrink-0",children:e.slice(0,3).map(a=>{let c=f?.find(b=>b.id===a);return(0,b.jsxs)("span",{className:"relative inline-block",title:c?.name??a,children:[(0,b.jsx)("img",{src:(0,B.agentAvatarUrl)(a,16,c?.color??void 0),alt:c?.name??a,className:"h-3 w-3 rounded-full ring-[1.5px] ring-[var(--background)]"}),(0,b.jsx)("span",{className:"absolute -bottom-px -right-px h-1.5 w-1.5 rounded-full bg-green-500 ring-[1px] ring-[var(--background)]"})]},a)})})]})})}function aA({projectSlug:a,initialObjectiveId:c}){let{isLoading:d,project:f,workspace:g,teams:h,persistWorkspace:i}=as(a),j=g.objectives,[k,l]=(0,e.useState)(c??null),[m,n]=(0,e.useState)(()=>(0,al.loadObjectiveListPanelWidth)()||320),[p,q]=(0,e.useState)(null),[r,s]=(0,e.useState)(!1),[t,u]=(0,e.useState)(null),[v,w]=(0,e.useState)(new Map),[x,y]=(0,e.useState)([]);(0,e.useEffect)(()=>{!k&&j.length>0&&l(j[0].id)},[k,j]),(0,e.useEffect)(()=>{k&&j.length>0&&!j.some(a=>a.id===k)&&l(j[0]?.id??null)},[k,j]),(0,e.useEffect)(()=>{let a=!1;return async function(){try{let b=await fetch("/api/participants");b.ok&&!a&&y(await b.json())}catch{}}(),()=>{a=!0}},[]),(0,e.useEffect)(()=>{let a=new Map;for(let b of j)b.threadId&&a.set(b.threadId,b.id);if(0===a.size)return;let b=!1;async function c(){try{let c=Array.from(a.keys()).join(","),d=await fetch(`/api/chat-runs/active-agents?threadIds=${encodeURIComponent(c)}`);if(!d.ok||b)return;let e=await d.json(),f=new Map;for(let[b,c]of Object.entries(e.activeAgents??{})){let d=a.get(b);d&&Array.isArray(c)&&c.length>0&&f.set(d,c)}b||w(f)}catch{}}c();let d=setInterval(()=>void c(),5e3);return()=>{b=!0,clearInterval(d)}},[j]);let z=async()=>{if(!p)return;let a=p.title.trim();if(!a)return void u("Objective statement is required.");let b=p.teamId.trim();if(!b)return void u("Team is required.");let c=new Date().toISOString(),d=(0,an.createProjectObjective)({title:a,teamId:b,key:(0,an.generateProjectObjectiveKey)(a,g.objectives),summary:p.summary,now:c});s(!0),u(null);try{await i((0,an.upsertProjectObjective)(g,d));try{await fetch(`/api/projects/${f?.id}/objectives/${d.id}/worker`,{method:"POST",headers:{"Content-Type":"application/json"}})}catch{}q(null),l(d.id)}catch(a){u(a instanceof Error?a.message:"Failed to save objective updates.")}finally{s(!1)}},A=(0,e.useCallback)(a=>{n(b=>{let c=Math.max(240,Math.min(480,b+a));return(0,al.persistObjectiveListPanelWidth)(c),c})},[]);return d&&!f?(0,b.jsx)(av,{label:"Loading objectives..."}):f?(0,b.jsxs)("div",{className:"flex h-full min-h-0 overflow-hidden bg-[var(--background)] text-[var(--foreground)]",children:[(0,b.jsxs)("div",{className:`flex-shrink-0 flex-col border-r border-[var(--border)] bg-[var(--background)] max-md:!w-full max-md:border-r-0 ${k?"hidden md:flex":"flex"}`,style:{width:m},children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-4 py-3",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("p",{className:"text-xs font-semibold uppercase tracking-[0.12em] text-[var(--muted-foreground)]",children:"Objectives"}),(0,b.jsx)("p",{className:"mt-0.5 text-[11px] text-[var(--muted-foreground)]",children:0===j.length?"None yet":`${j.length} total`})]}),(0,b.jsx)("button",{type:"button",onClick:()=>q(ar()),className:"inline-flex h-7 w-7 items-center justify-center rounded-lg text-[var(--muted-foreground)] transition-colors hover:bg-[var(--secondary)] hover:text-[var(--foreground)]","aria-label":"New objective",children:(0,b.jsx)(o.Plus,{className:"h-4 w-4"})})]}),(0,b.jsx)(aw,{message:t}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto py-1",children:0===j.length?(0,b.jsxs)("div",{className:"px-4 py-8 text-center",children:[(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No objectives yet."}),(0,b.jsx)("button",{type:"button",onClick:()=>q(ar()),className:"mt-2 text-sm text-[var(--primary)] hover:underline",children:"Create one"})]}):(0,b.jsx)("div",{className:"space-y-0.5",children:j.map(a=>{let c=(0,an.buildObjectiveTimelineActivities)({objective:a,workspace:g});return(0,b.jsx)(az,{objective:a,activityCount:c.length,lastActivityAt:c[0]?.createdAt??null,activeAgentIds:v.get(a.id),participants:x,isSelected:k===a.id,onSelect:()=>l(a.id)},a.id)})})})]}),(0,b.jsx)(ay,{onResize:A}),(0,b.jsx)("div",{className:`flex-1 min-w-0 min-h-0 overflow-hidden ${k?"":"max-md:hidden"}`,children:k?(0,b.jsx)(aB,{projectSlug:a,objectiveId:k,onObjectiveDeleted:()=>l(null),onBack:()=>l(null)}):(0,b.jsx)("div",{className:"flex h-full items-center justify-center text-sm text-[var(--muted-foreground)]",children:0===j.length?"Create an objective to get started.":"Select an objective from the list."})}),p?(0,b.jsx)(aD,{mode:"create",draft:p,teams:h,isSaving:r,onChange:q,onClose:()=>q(null),onSave:()=>void z()}):null]}):(0,b.jsx)(av,{label:"Project not found."})}function aB({projectSlug:a,objectiveId:f,onObjectiveDeleted:h,onBack:i}){var r;let v,w,x,y,A,B,C,D,F,G=(0,d.useRouter)(),{isLoading:H,project:I,workspace:K,teams:L,persistWorkspace:M,refetchProject:N}=as(a),O=(0,e.useMemo)(()=>K.objectives.find(a=>a.id===f)??null,[f,K.objectives]),Q=O?(r=O.teamId,L.find(a=>a.id===r)?.name??null):null,[R,S]=(0,e.useState)(null),[T,U]=(0,e.useState)(null),[V,W]=(0,e.useState)("activity"),[Y,Z]=(0,e.useState)(0),[$,_]=(0,e.useState)(!1),[aa,ab]=(0,e.useState)(null),[ac,ad]=(0,e.useState)([]),[ae,ai]=(0,e.useState)(!1),[aj,ak]=(0,e.useState)(null),[al,am]=(0,e.useState)({}),[ap,ar]=(0,e.useState)({}),[at,ay]=(0,e.useState)(new Set),[az,aA]=(0,e.useState)(!1),[aB,aD]=(0,e.useState)(""),[aE,aF]=(0,e.useState)([]),[aG,aH]=(0,e.useState)([]),[aI,aJ]=(0,e.useState)([]),[aK,aL]=(0,e.useState)(null),[aM,aN]=(0,e.useState)(!1),[aO,aP]=(0,e.useState)(null),[aQ,aR]=(0,e.useState)(null),[aS,aT]=(0,e.useState)(null),[aU,aV]=(0,e.useState)(!1),aW=(0,e.useRef)(null),[aX,aY]=(0,e.useState)(!1);(0,e.useEffect)(()=>{let a=aW.current;if(!a)return;let b=()=>aY(a.scrollTop>400);return a.addEventListener("scroll",b,{passive:!0}),()=>a.removeEventListener("scroll",b)},[f]);let aZ=(0,e.useCallback)(()=>{aW.current?.scrollTo({top:0,behavior:"smooth"})},[]),{jobs:a$}=(0,J.usePromptJobs)(I?.id??null,{requireProjectId:!0,includeObjectiveJobs:!0,objectiveId:f}),a_=(0,e.useMemo)(()=>a$.filter(a=>a.objectiveId===f).length,[a$,f]),a0=async a=>{_(!0),ab(null);try{await M(a)}catch(a){throw ab(a instanceof Error?a.message:"Failed to save objective updates."),a}finally{_(!1)}},a1=async()=>{if(!R||!O)return;let a=R.title.trim();if(!a)return void ab("Objective statement is required.");let b={...O,title:a,updatedAt:new Date().toISOString()};await a0((0,an.upsertProjectObjective)(K,b)),S(null)},a2=(0,e.useCallback)(async()=>{if(I?.id&&O?.id){ai(!0);try{let a=await fetch(`/api/projects/${I.id}/objectives/${O.id}/notes?limit=100`);if(a.ok){let b=await a.json();ad(b.notes??[])}}catch{}finally{ai(!1)}}},[I?.id,O?.id]);(0,e.useEffect)(()=>{a2()},[a2]);let a3=(0,e.useCallback)(async()=>{if(I?.id&&O?.id)try{let a=await fetch(`/api/projects/${I.id}/objectives/${O.id}/program`);if(a.ok){let b=await a.json();aP(b.program?.content??null),aR(b.program?.path??null)}}catch{}},[I?.id,O?.id]);(0,e.useEffect)(()=>{a3()},[a3]);let a4=(0,e.useCallback)(async()=>{if(I?.id&&O?.id&&null!==aS){aV(!0);try{let a=await fetch(`/api/projects/${I.id}/objectives/${O.id}/program`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:aS})});if(a.ok){let b=await a.json();aP(b.program?.content??null),aR(b.program?.path??null),aT(null)}}finally{aV(!1)}}},[I?.id,O?.id,aS]);(0,e.useEffect)(()=>{"notes"===V&&a2()},[V,a2]),(0,e.useEffect)(()=>{if(!I?.id||!O?.id)return;let a=new Set;for(let[b,c]of Object.entries(al)){let d=ac.find(a=>a.id===b);d&&d.body!==c&&a.add(b)}for(let[b,c]of Object.entries(ap)){let d=ac.find(a=>a.id===b);d&&d.title!==c&&a.add(b)}if(0===a.size)return;let b=[];for(let c of a){let a={},d=al[c],e=ap[c],f=ac.find(a=>a.id===c);if(!f||(void 0!==d&&d!==f.body&&(a.body=d),void 0!==e&&e!==f.title&&e.trim()&&(a.title=e.trim()),0===Object.keys(a).length))continue;let g=window.setTimeout(async()=>{ay(a=>new Set(a).add(c));try{let b=await fetch(`/api/projects/${I.id}/objectives/${O.id}/notes/${c}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(b.ok){let a=await b.json();ad(b=>b.map(b=>b.id===c?a.note:b))}}catch{ab("Failed to save note.")}finally{ay(a=>{let b=new Set(a);return b.delete(c),b})}},700);b.push(g)}return()=>{for(let a of b)window.clearTimeout(a)}},[al,ap,ac,I?.id,O?.id]);let a5=async()=>{if(I?.id&&O?.id){aA(!0);try{let a=await fetch(`/api/projects/${I.id}/objectives/${O.id}/notes`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:"Untitled",body:""})});if(a.ok){let b=await a.json();ad(a=>[b.note,...a]),ak(b.note.id)}}catch{ab("Failed to create note.")}finally{aA(!1)}}},a6=async a=>{if(I?.id&&O?.id)try{let b=await fetch(`/api/projects/${I.id}/objectives/${O.id}/notes/${a}`,{method:"DELETE"});(b.ok||204===b.status)&&(ad(b=>b.filter(b=>b.id!==a)),aj===a&&ak(null))}catch{ab("Failed to delete note.")}},a7=async()=>{!O||window.confirm(`Delete "${O.title}"?`)&&(await a0((0,an.removeProjectObjective)(K,O.id)),h?h():G.push(`/projects/${a}`))},a8=(0,e.useCallback)(async a=>{O&&O.threadId!==a&&await a0((0,an.upsertProjectObjective)(K,{...O,threadId:a,updatedAt:new Date().toISOString()}))},[O,a0,K]),a9=(0,e.useCallback)(async a=>{if(!I?.id||!O?.id)return ab("Objective not found."),!1;ab(null);try{let b=await fetch(`/api/projects/${I.id}/objectives/${O.id}/scheduled-tasks`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,prompt:function(a,b){let c=b.trim();if(!c)return c;let d=`Objective label: ${a.key}`;return c.toLowerCase().includes(d.toLowerCase())?c:[d,`Write your output as an activity file at ~/.agx/projects/<project>/objectives/${a.key}/activities/<timestamp>-<slug>.md
|
|
19
19
|
The file must have YAML frontmatter with: id (unique), source (your task ID), objectiveLabel: "${a.key}", createdAt (ISO), type (one of: metric-check, status-update, milestone, note).
|
|
20
|
-
The markdown body below the frontmatter contains your output.`,c].join("\n\n")}(M,a.prompt)})}),c=await b.json().catch(()=>({}));if(!b.ok)throw Error(c.error||"Failed to create scheduled task.");return await L(),!0}catch(a){return _(a instanceof Error?a.message:"Failed to create scheduled task."),!1}},[M,G?.id,L]),a8=(0,e.useCallback)(async()=>{if(!G?.id||!M?.id)return _("Objective not found."),!1;if(!M.teamId)return _("Assign a team to this objective before creating a worker."),!1;_(null);try{let a=await fetch(`/api/projects/${G.id}/objectives/${M.id}/worker`,{method:"PUT"}),b=await a.json().catch(()=>({}));if(!a.ok)throw Error(b.error||"Failed to trigger objective worker.");return await L(),!0}catch(a){return _(a instanceof Error?a.message:"Failed to trigger objective worker."),!1}},[M,G?.id,L]);return((0,e.useEffect)(()=>{if(!G?.id||!M?.id||!M?.key){aD([]),aF([]),aH([]);return}let a=G.id,b=M.key,c=!1;return async function(){try{let d=await fetch(`/api/trackers/connections?projectId=${encodeURIComponent(a)}`);if(!d.ok){c||(aD([]),aF([]),aH([]));return}let e=await d.json();if(c)return;let f=Array.isArray(e.available)?e.available:[],g=(e.connections??[]).map(a=>({type:a.type,displayName:f.find(b=>b.type===a.type)?.displayName??a.type,connected:!1!==a.connected})),h="string"==typeof e.defaultTracker&&e.defaultTracker?e.defaultTracker:null;aH(f),aF(g),aJ(h);let i=g.filter(a=>a.connected),j=h&&i.some(a=>a.type===h)?i.filter(a=>a.type===h):i;if(0===j.length)return void aD([]);let k=b.trim().toLowerCase(),l=await Promise.all(j.map(async b=>{try{let c=await fetch(`/api/trackers/${encodeURIComponent(b.type)}/items?projectId=${encodeURIComponent(a)}&limit=500`);if(!c.ok)return[];let d=await c.json();return(Array.isArray(d.items)?d.items:[]).filter(a=>(a.labels??[]).some(a=>a.trim().toLowerCase()===k)).map(a=>({id:a.id,trackerType:a.trackerType??b.type,identifier:a.identifier,title:a.title,url:a.url??null,status:a.status,assignee:a.assignee?.name??null,updatedAt:a.updatedAt,labels:a.labels}))}catch{return[]}}));if(c)return;aD(l.flat())}catch(a){if(c)return;console.warn("Failed to load objective tracker resources",a),aD([]),aF([]),aH([])}}(),()=>{c=!0}},[M?.id,M?.key,G?.id]),F&&!G)?(0,b.jsx)(av,{label:"Loading objective..."}):G?M?(0,b.jsx)("div",{className:"flex h-full min-h-0 flex-col bg-[radial-gradient(circle_at_top_left,rgba(59,130,246,0.1),transparent_28%),var(--background)] text-[var(--foreground)]",children:(0,b.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden",children:(0,b.jsxs)("div",{className:"flex h-full min-h-0 flex-col xl:flex-row",children:[(0,b.jsxs)("div",{className:"relative min-h-0 flex-1 flex flex-col",children:[(0,b.jsx)("div",{ref:aU,className:"min-h-0 flex-1 overflow-y-auto",children:(0,b.jsxs)("div",{className:"max-w-5xl mx-auto pt-16 px-8 pb-20",children:[(0,b.jsx)(aw,{message:$}),(0,b.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,b.jsx)("span",{className:"rounded-full border border-[var(--tone-neutral-border)] bg-[var(--tone-neutral-bg)] px-2.5 py-0.5 text-[10px] font-mono uppercase tracking-wider text-[var(--tone-neutral)]",children:M.key}),(0,b.jsx)("span",{className:`rounded-full border px-2.5 py-0.5 text-[10px] font-semibold uppercase tracking-[0.18em] ${ao[M.status].chipClass}`,children:ao[M.status].label})]}),(0,b.jsx)("div",{className:"mb-6",children:O?(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("input",{autoFocus:!0,value:O.title,onChange:a=>Q({...O,title:a.target.value}),onKeyDown:a=>{"Enter"===a.key&&a_(),"Escape"===a.key&&Q(null)},className:"flex-1 border-b-2 border-[var(--primary)] bg-transparent px-0 py-1 text-[28px] font-semibold leading-tight text-[var(--foreground)] outline-none",placeholder:"Objective statement"}),(0,b.jsx)("button",{type:"button",onClick:()=>void a_(),disabled:Y,className:"rounded-md p-1.5 text-[var(--primary)] transition-colors hover:bg-[var(--status-in-progress-bg)]","aria-label":"Save objective",children:(0,b.jsx)(k.Check,{size:18})}),(0,b.jsx)("button",{type:"button",onClick:()=>Q(null),className:"rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)]","aria-label":"Cancel editing",children:(0,b.jsx)(u.X,{size:18})})]}):(0,b.jsxs)("button",{type:"button","aria-label":`Edit objective ${M.title}`,className:"flex items-center gap-3 group cursor-pointer text-left",onClick:()=>Q({id:M.id,title:M.title,teamId:M.teamId,summary:M.summary}),children:[(0,b.jsx)("h1",{className:"text-[28px] leading-tight font-semibold text-[var(--foreground)]",children:M.title}),(0,b.jsx)(n.Pencil,{size:16,className:"shrink-0 text-[var(--muted-foreground)] opacity-0 transition-opacity group-hover:opacity-100"})]})}),(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-3 mb-10",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)("span",{className:"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-[var(--muted-foreground)]",children:[(0,b.jsx)(s.Users,{size:12})," Team"]}),(0,b.jsx)("span",{className:"text-[var(--app-shell-soft-text)]",children:"·"}),R?(0,b.jsx)("div",{className:"min-w-[180px]",children:(0,b.jsx)(E.default,{options:I.map(a=>({id:a.id,label:a.name})),value:R.teamId,onChange:a=>{S({teamId:a});let b=a.trim();b&&M&&(a$((0,an.upsertProjectObjective)(H,{...M,teamId:b,updatedAt:new Date().toISOString()})),S(null))},placeholder:"Select a team…"})}):(0,b.jsxs)("button",{type:"button","aria-label":`Edit team for ${M.title}`,onClick:()=>S({teamId:M.teamId}),className:"group -mx-1.5 -my-0.5 flex items-center gap-2 rounded px-1.5 py-0.5 transition-colors hover:bg-[var(--muted)]",children:[(0,b.jsx)("div",{className:"w-5 h-5 rounded-full bg-blue-500/20 text-blue-400 flex items-center justify-center text-[10px] font-bold border border-blue-500/30",children:(N??"?").charAt(0).toUpperCase()}),(0,b.jsx)("span",{className:"text-sm text-[var(--foreground)] transition-colors group-hover:text-[var(--primary)]",children:N??"Not assigned"})]})]}),G.id&&M.id?(0,b.jsx)(af,{projectId:G.id,objectiveId:M.id,objectiveKey:M.key,metadata:G.metadata,currentProgress:M.progress,currentStatus:M.status,objectiveUpdatedAt:M.updatedAt}):null]}),(0,b.jsxs)("div",{className:"mb-6 rounded-xl border border-[var(--border)] bg-[var(--card-bg)]",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-4 py-2.5",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(m.FileText,{size:14,className:"text-[var(--muted-foreground)]"}),(0,b.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--muted-foreground)]",children:"Program"}),aO?(0,b.jsx)("span",{className:"font-mono text-[10px] text-[var(--muted-foreground)] opacity-70",children:aO.replace(/^.*\/\.agx\//,"~/.agx/")}):null]}),null===aQ?(0,b.jsx)("button",{type:"button",onClick:()=>aR(aM??""),className:"rounded-md p-1 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]","aria-label":"Edit program",children:(0,b.jsx)(n.Pencil,{size:14})}):(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsx)("button",{type:"button",onClick:()=>void a2(),disabled:aS,className:"rounded-md p-1 text-[var(--primary)] transition-colors hover:bg-[var(--status-in-progress-bg)] disabled:opacity-50","aria-label":"Save program",children:(0,b.jsx)(k.Check,{size:14})}),(0,b.jsx)("button",{type:"button",onClick:()=>aR(null),className:"rounded-md p-1 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)]","aria-label":"Cancel editing",children:(0,b.jsx)(u.X,{size:14})})]})]}),(0,b.jsx)("div",{className:"px-4 py-3",children:null!==aQ?(0,b.jsx)("textarea",{autoFocus:!0,value:aQ,onChange:a=>aR(a.target.value),rows:8,placeholder:"Goal: why this exists\n\nDefinition of better: the metric or signal that says we're done\n\nBlast radius: paths/systems in scope, what's off-limits\n\nNotes: things we've learned",className:"w-full resize-y rounded-md border border-[var(--border)] bg-[var(--background)] px-3 py-2 font-mono text-xs text-[var(--foreground)] outline-none focus:border-[var(--primary)]"}):aM&&aM.trim().length>0?(0,b.jsx)("div",{className:"prose prose-sm max-w-none text-sm text-[var(--foreground)]",children:(0,b.jsx)(z.Markdown,{content:aM})}):(0,b.jsxs)("p",{className:"text-sm text-[var(--muted-foreground)]",children:["No program yet. Define what ",(0,b.jsx)("em",{children:"better"})," looks like for this objective — the metric, the scope, any constraints. Agents read this before every run, and will ask for it in chat if it's missing."]})})]}),(0,b.jsx)("div",{className:"mb-6",children:(0,b.jsxs)("button",{type:"button",onClick:async()=>{aL(!0),await a8(),aL(!1)},disabled:aK,className:"inline-flex items-center gap-2 rounded-xl border border-[var(--status-completed-border)] bg-[var(--status-completed-bg)] px-3 py-2 text-sm text-[var(--status-completed-text)] transition-opacity hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,b.jsx)(t.Sparkles,{className:"h-4 w-4"}),aK?"Working...":"Work on objective"]})}),(0,b.jsx)("div",{className:"mb-8 border-b border-[var(--border)]",children:(0,b.jsx)("nav",{className:"flex gap-1 -mb-px","aria-label":"Objective sections",children:[{id:"activity",label:"Activity",icon:l.Clock},{id:"notes",label:"Notes",icon:m.FileText},{id:"tasks",label:"Tasks",icon:a=>{let c=aE.filter(a=>a.connected),d=(aI&&c.some(a=>a.type===aI)?aI:c[0]?.type)??"tracker";return(0,b.jsx)(ag.TrackerIcon,{trackerType:d,className:"h-3.5 w-3.5"})}},{id:"scheduled-tasks",label:"Scheduled Jobs",icon:j}].map(a=>{let c,d;return(0,b.jsxs)("button",{type:"button",onClick:()=>U(a.id),className:`flex items-center gap-2 px-3 py-2.5 text-sm font-medium border-b-2 transition-colors ${T===a.id?"border-[var(--primary)] text-[var(--foreground)]":"border-transparent text-[var(--muted-foreground)] hover:border-[var(--border)] hover:text-[var(--foreground)]"}`,children:[(0,b.jsx)(a.icon,{size:14}),a.label,"activity"===a.id&&V>0&&(0,b.jsx)("span",{className:"rounded-full bg-[var(--tone-neutral-bg)] px-1.5 py-0.5 font-mono text-[10px] text-[var(--tone-neutral)]",children:V}),"notes"===a.id&&aa.length>0&&(0,b.jsx)("span",{className:"rounded-full bg-[var(--tone-neutral-bg)] px-1.5 py-0.5 font-mono text-[10px] text-[var(--tone-neutral)]",children:aa.length}),"tasks"===a.id&&(c=["done","canceled","cancelled","completed","duplicate"],(d=aB.filter((a,b,d)=>d.findIndex(b=>b.id===a.id)===b&&!c.includes(a.status.toLowerCase()))).length>0?(0,b.jsx)("span",{className:"rounded-full bg-[var(--tone-neutral-bg)] px-1.5 py-0.5 font-mono text-[10px] text-[var(--tone-neutral)]",children:d.length}):null),"scheduled-tasks"===a.id&&aZ>0&&(0,b.jsx)("span",{className:"rounded-full bg-[var(--tone-neutral-bg)] px-1.5 py-0.5 font-mono text-[10px] text-[var(--tone-neutral)]",children:aZ})]},a.id)})})}),(0,b.jsxs)("div",{className:"space-y-10",children:["notes"===T&&(0,b.jsxs)("section",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,b.jsxs)("div",{className:"relative flex-1",children:[(0,b.jsx)(p.Search,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--muted-foreground)]"}),(0,b.jsx)("input",{type:"text",value:az,onChange:a=>aA(a.target.value),placeholder:"Search notes...",className:"w-full rounded-md border border-[var(--border)] bg-[var(--input)] py-1.5 pl-8 pr-3 text-sm text-[var(--foreground)] placeholder:text-[var(--app-shell-soft-text)] focus:border-[var(--primary)] focus:outline-none"})]}),(0,b.jsxs)("button",{type:"button",onClick:a3,disabled:at,className:"flex items-center gap-1.5 rounded-md border border-[var(--status-in-progress-border)] bg-[var(--status-in-progress-bg)] px-3 py-1.5 text-sm font-medium text-[var(--status-in-progress-text)] transition-opacity hover:opacity-90 disabled:opacity-50",children:[(0,b.jsx)(o.Plus,{size:14}),"New note"]})]}),ac?(0,b.jsx)("p",{className:"py-4 text-sm text-[var(--muted-foreground)]",children:"Loading notes..."}):0===aa.length?(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)] py-4",children:"No notes yet. Add one above."}):0===(r=(i=az.toLowerCase())?aa.filter(a=>a.title.toLowerCase().includes(i)||a.body.toLowerCase().includes(i)):aa).length?(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)] py-4",children:"No notes match your search."}):(0,b.jsx)("div",{className:"columns-1 gap-3 sm:columns-2 lg:columns-3",style:{columnFill:"balance"},children:r.map(a=>(0,b.jsxs)("button",{type:"button",onClick:()=>ai(a.id),className:"mb-3 block w-full break-inside-avoid overflow-hidden rounded-lg border border-[var(--border)] bg-[var(--overlay-panel-muted)] text-left transition-shadow hover:shadow-md",children:[(0,b.jsx)("div",{className:"px-3 pt-3 pb-1",children:(0,b.jsx)("h4",{className:"text-sm font-medium text-[var(--foreground)] leading-snug",children:a.title})}),a.body.trim()&&(0,b.jsx)("div",{className:"px-3 pb-2 text-xs text-[var(--muted-foreground)] line-clamp-4",children:(0,b.jsx)(z.Markdown,{content:a.body})}),(0,b.jsx)("div",{className:"flex items-center justify-between px-3 pb-2",children:(0,b.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)]",children:new Date(a.updatedAt).toLocaleDateString()})})]},a.id))}),ae&&(()=>{let a=aa.find(a=>a.id===ae);if(!a)return null;let c=aj[a.id]??a.body,d=al[a.id]??a.title,e=ap.has(a.id);return(0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 pt-[5vh]",onClick:a=>{a.target===a.currentTarget&&ai(null)},children:(0,b.jsxs)("div",{className:"mx-6 w-full max-w-7xl rounded-xl border border-[var(--border)] bg-[var(--background)] shadow-xl",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[(0,b.jsx)("input",{type:"text",autoFocus:!0,value:d,onFocus:a=>{"Untitled"===d&&a.target.select()},onChange:b=>am(c=>({...c,[a.id]:b.target.value})),className:"flex-1 bg-transparent text-base font-semibold text-[var(--foreground)] focus:outline-none"}),(0,b.jsxs)("div",{className:"flex items-center gap-2 ml-3",children:[(0,b.jsx)("span",{className:"text-[11px] text-[var(--muted-foreground)]",children:e?"Saving...":new Date(a.updatedAt).toLocaleDateString()}),(0,b.jsx)("button",{type:"button",onClick:()=>a4(a.id),className:"p-1 text-[var(--muted-foreground)] transition-colors hover:text-[var(--destructive)]",children:(0,b.jsx)(q.Trash2,{size:14})}),(0,b.jsx)("button",{type:"button",onClick:()=>ai(null),className:"p-1 text-[var(--muted-foreground)] transition-colors hover:text-[var(--foreground)]",children:(0,b.jsx)(u.X,{size:14})})]})]}),(0,b.jsx)("div",{className:"max-h-[75vh] overflow-y-auto px-5 py-4",children:(0,b.jsx)(ax,{content:c,editable:!0,onChange:b=>ak(c=>({...c,[a.id]:b})),placeholder:"Write your note..."})})]})})})()]}),"activity"===T&&G.id&&M.id&&(0,b.jsx)(X,{projectId:G.id,objectiveId:M.id,onTotalChange:W}),"tasks"===T&&(v=aB.filter((a,b,c)=>c.findIndex(b=>b.id===a.id)===b),w=["done","canceled","cancelled","completed","duplicate"],x=v.filter(a=>!w.includes(a.status.toLowerCase())),y=v.filter(a=>w.includes(a.status.toLowerCase())).slice(-5),A=aE.filter(a=>a.connected),C=0===(B=aI&&A.some(a=>a.type===aI)?A.filter(a=>a.type===aI):A).length?null:B.map(a=>a.displayName).join(", "),(0,b.jsxs)("section",{children:[(0,b.jsx)("div",{className:"flex flex-wrap items-start justify-between gap-3 mb-4",children:(0,b.jsxs)("p",{className:"text-sm text-[var(--muted-foreground)]",children:["Tickets tracked by the objective label"," ",(0,b.jsx)("code",{className:"rounded bg-[var(--tone-neutral-bg)] px-1.5 py-0.5 font-mono text-[11px] text-[var(--foreground)]",children:M.key}),C?(0,b.jsxs)(b.Fragment,{children:[" across ",C,"."]}):"."]})}),0===B.length?(0,b.jsx)(aC,{label:0===aG.length?"No tracker integrations registered.":`Connect a tracker (${aG.map(a=>a.displayName).join(", ")}) to create and track tickets for this objective.`}):0===v.length?(0,b.jsx)(aC,{label:`No tracker tickets with label ${M.key} yet.`}):(0,b.jsxs)(b.Fragment,{children:[x.length>0&&(0,b.jsx)("div",{className:"space-y-3",children:x.map(c=>(0,b.jsxs)("div",{className:"rounded-xl border border-[var(--border)] bg-[var(--overlay-panel-muted)] p-4",children:[(0,b.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:[(0,b.jsx)(ag.TrackerIcon,{trackerType:c.trackerType,className:"h-3 w-3"}),(0,b.jsx)("span",{children:c.identifier})]}),(0,b.jsx)("a",{href:c.url??`/projects/${a}/tracking/${c.trackerType}?issue=${c.id}`,target:c.url?"_blank":void 0,rel:c.url?"noreferrer":void 0,className:"mt-1 block text-sm font-medium text-[var(--foreground)] transition-colors hover:text-[var(--primary)]",children:c.title})]}),(0,b.jsx)("span",{className:"rounded-full border border-[var(--tone-neutral-border)] px-2 py-1 text-[10px] font-semibold uppercase tracking-[0.18em] text-[var(--tone-neutral)]",children:c.status})]}),(0,b.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2 text-[11px] text-[var(--muted-foreground)]",children:[(0,b.jsxs)("span",{children:["Updated ",aq(c.updatedAt)]}),(0,b.jsx)("span",{children:c.assignee?`Assigned to ${c.assignee}`:"Unassigned"})]})]},c.id))}),y.length>0&&(0,b.jsxs)("div",{className:x.length>0?"mt-6":"",children:[(0,b.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-[0.18em] text-[var(--muted-foreground)] mb-2",children:"Completed"}),(0,b.jsx)("div",{className:"space-y-0.5",children:y.map(c=>(0,b.jsxs)("a",{href:c.url??`/projects/${a}/tracking/${c.trackerType}?issue=${c.id}`,target:c.url?"_blank":void 0,rel:c.url?"noreferrer":void 0,className:"group flex items-center gap-3 rounded-md px-2 py-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]",children:[(0,b.jsx)(ag.TrackerIcon,{trackerType:c.trackerType,className:"h-3 w-3 shrink-0"}),(0,b.jsx)("span",{className:"text-[11px] font-mono shrink-0",children:c.identifier}),(0,b.jsx)("span",{className:"text-[12px] truncate",children:c.title}),(0,b.jsx)("span",{className:"ml-auto shrink-0 text-[10px] text-[var(--app-shell-soft-text)] group-hover:text-[var(--muted-foreground)]",children:c.status})]},c.id))})]})]})]})),"scheduled-tasks"===T&&(0,b.jsx)("section",{children:(0,b.jsx)(P,{projectId:G.id,objectiveId:M.id,objectiveKey:M.key,createDefaults:{name:`Work on ${M.title}`},onCreateTask:a7})}),(0,b.jsxs)("section",{className:"pt-10",children:[(0,b.jsx)("div",{className:"mb-4",children:(0,b.jsx)("h2",{className:"text-sm font-semibold text-[var(--destructive)]",children:"Danger Zone"})}),(0,b.jsxs)("div",{className:"flex items-center justify-between rounded-xl border border-[var(--destructive-border)] bg-[var(--destructive-bg)] p-5",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-medium text-[var(--foreground)]",children:"Delete Objective"}),(0,b.jsx)("p",{className:"mt-1 text-sm text-[var(--muted-foreground)]",children:"Once you delete an objective, there is no going back."})]}),(0,b.jsxs)("button",{type:"button",onClick:()=>void a5(),"aria-label":`Delete objective ${M.title}`,className:"flex items-center gap-2 whitespace-nowrap rounded-md border border-[var(--destructive-border)] bg-[var(--destructive-bg)] px-3 py-1.5 text-sm font-medium text-[var(--destructive)] transition-opacity hover:opacity-90",children:[(0,b.jsx)(q.Trash2,{size:14})," Delete"]})]})]})]})]})}),(0,b.jsx)(ah.JumpToLatestButton,{visible:aV,direction:"top",onClick:aX})]}),(0,b.jsx)(au,{projectId:G.id,projectSlug:a,objective:M,teamName:N,trackerConnections:aE,availableTrackers:aG,defaultTrackerType:aI,onThreadLinked:a6,onObjectiveUpdated:L})]})})}):(0,b.jsx)("div",{className:"flex h-full items-center justify-center px-4 bg-[var(--background)]",children:(0,b.jsxs)("div",{className:"rounded-xl border border-[var(--border)] bg-[var(--card-bg)] p-8 text-center",children:[(0,b.jsx)("p",{className:"text-lg font-semibold text-[var(--foreground)]",children:"Objective not found"}),(0,b.jsx)("p",{className:"mt-2 text-sm text-[var(--muted-foreground)]",children:"It may have been deleted or the link is stale."}),(0,b.jsx)(c.default,{href:`/projects/${a}`,className:"mt-4 inline-flex items-center gap-2 rounded-md border border-[var(--border)] bg-[var(--card-bg)] px-3 py-1.5 text-sm text-[var(--foreground)] transition-colors hover:bg-[var(--secondary)]",children:"Back to objectives"})]})}):(0,b.jsx)(av,{label:"Project not found."})}function aC({label:a}){return(0,b.jsx)("div",{className:"flex items-center rounded-xl border border-dashed border-[var(--border)] bg-[var(--overlay-panel-muted)] p-6",children:(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:a})})}function aD({mode:a,draft:c,teams:d=[],isSaving:e,onChange:f,onClose:g,onSave:h}){return(0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/45 p-4",children:(0,b.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"edit"===a?"Edit objective":"New objective",className:"w-full max-w-3xl overflow-hidden rounded-[32px] border border-[var(--border)] bg-[var(--overlay-panel-strong)] shadow-2xl",children:[(0,b.jsxs)("div",{className:"border-b border-[var(--border)] px-5 py-4",children:[(0,b.jsx)("h3",{className:"text-lg font-semibold text-[var(--foreground)]",children:"edit"===a?"Edit objective":"New objective"}),(0,b.jsx)("p",{className:"mt-1 text-sm text-[var(--muted-foreground)]",children:"edit"===a?"Update the tracking details for this objective.":"Keep the statement measurable and use notes only for context that matters."})]}),(0,b.jsxs)("div",{className:"space-y-4 px-5 py-5",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)(aE,{label:"Objective statement"}),(0,b.jsx)("input",{value:c.title,onChange:a=>f({...c,title:a.target.value}),className:"w-full rounded-2xl border border-[var(--border)] bg-[var(--input)] px-4 py-3 text-sm text-[var(--foreground)] outline-none transition-colors focus:border-[var(--primary)]",placeholder:"Get 50 qualified visitors daily"})]}),"create"===a?(0,b.jsxs)("div",{children:[(0,b.jsx)(aE,{label:"Team"}),(0,b.jsxs)("select",{value:c.teamId,onChange:a=>f({...c,teamId:a.target.value}),className:"w-full rounded-2xl border border-[var(--border)] bg-[var(--input)] px-3 py-3 text-sm text-[var(--foreground)] outline-none transition-colors focus:border-[var(--primary)]",children:[(0,b.jsx)("option",{value:"",children:"Select a team"}),d.map(a=>(0,b.jsx)("option",{value:a.id,children:a.name},a.id))]}),(0,b.jsx)("p",{className:"mt-2 text-xs text-[var(--muted-foreground)]",children:"Teams can only own one objective at a time."})]}):null]}),(0,b.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[(0,b.jsx)("button",{type:"button",onClick:g,className:"rounded-xl border border-[var(--border)] px-3 py-2 text-sm text-[var(--muted-foreground)] transition-colors hover:text-[var(--foreground)]",children:"Cancel"}),(0,b.jsx)("button",{type:"button",onClick:h,disabled:e,className:"rounded-xl border border-[var(--status-in-progress-border)] bg-[var(--status-in-progress-bg)] px-3 py-2 text-sm font-medium text-[var(--status-in-progress-text)] transition-opacity hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:e?"Saving...":"edit"===a?"Save objective":"Create objective"})]})]})})}function aE({label:a}){return(0,b.jsx)("label",{className:"mb-2 block text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:a})}a.s(["ProjectObjectivesOverview",()=>aA],739515)}];
|
|
20
|
+
The markdown body below the frontmatter contains your output.`,c].join("\n\n")}(O,a.prompt)})}),c=await b.json().catch(()=>({}));if(!b.ok)throw Error(c.error||"Failed to create scheduled task.");return await N(),!0}catch(a){return ab(a instanceof Error?a.message:"Failed to create scheduled task."),!1}},[O,I?.id,N]),ba=(0,e.useCallback)(async()=>{if(!I?.id||!O?.id)return ab("Objective not found."),!1;if(!O.teamId)return ab("Assign a team to this objective before creating a worker."),!1;ab(null);try{let a=await fetch(`/api/projects/${I.id}/objectives/${O.id}/worker`,{method:"PUT"}),b=await a.json().catch(()=>({}));if(!a.ok)throw Error(b.error||"Failed to trigger objective worker.");return await N(),!0}catch(a){return ab(a instanceof Error?a.message:"Failed to trigger objective worker."),!1}},[O,I?.id,N]);return((0,e.useEffect)(()=>{if(!I?.id||!O?.id||!O?.key){aF([]),aH([]),aJ([]);return}let a=I.id,b=O.key,c=!1;return async function(){try{let d=await fetch(`/api/trackers/connections?projectId=${encodeURIComponent(a)}`);if(!d.ok){c||(aF([]),aH([]),aJ([]));return}let e=await d.json();if(c)return;let f=Array.isArray(e.available)?e.available:[],g=(e.connections??[]).map(a=>({type:a.type,displayName:f.find(b=>b.type===a.type)?.displayName??a.type,connected:!1!==a.connected})),h="string"==typeof e.defaultTracker&&e.defaultTracker?e.defaultTracker:null;aJ(f),aH(g),aL(h);let i=g.filter(a=>a.connected),j=h&&i.some(a=>a.type===h)?i.filter(a=>a.type===h):i;if(0===j.length)return void aF([]);let k=b.trim().toLowerCase(),l=await Promise.all(j.map(async b=>{try{let c=await fetch(`/api/trackers/${encodeURIComponent(b.type)}/items?projectId=${encodeURIComponent(a)}&limit=500`);if(!c.ok)return[];let d=await c.json();return(Array.isArray(d.items)?d.items:[]).filter(a=>(a.labels??[]).some(a=>a.trim().toLowerCase()===k)).map(a=>({id:a.id,trackerType:a.trackerType??b.type,identifier:a.identifier,title:a.title,url:a.url??null,status:a.status,assignee:a.assignee?.name??null,updatedAt:a.updatedAt,labels:a.labels}))}catch{return[]}}));if(c)return;aF(l.flat())}catch(a){if(c)return;console.warn("Failed to load objective tracker resources",a),aF([]),aH([]),aJ([])}}(),()=>{c=!0}},[O?.id,O?.key,I?.id]),H&&!I)?(0,b.jsx)(av,{label:"Loading objective..."}):I?O?(0,b.jsx)("div",{className:"flex h-full min-h-0 flex-col bg-[radial-gradient(circle_at_top_left,rgba(59,130,246,0.1),transparent_28%),var(--background)] text-[var(--foreground)]",children:(0,b.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden",children:(0,b.jsxs)("div",{className:"flex h-full min-h-0 flex-col xl:flex-row",children:[(0,b.jsxs)("div",{className:"relative min-h-0 flex-1 flex flex-col",children:[(0,b.jsx)("div",{ref:aW,className:"min-h-0 flex-1 overflow-y-auto",children:(0,b.jsxs)("div",{className:"max-w-5xl mx-auto pt-16 px-8 pb-20",children:[(0,b.jsx)(aw,{message:aa}),i?(0,b.jsxs)("button",{type:"button",onClick:i,className:"md:hidden mb-4 inline-flex items-center gap-1.5 rounded-md border border-[var(--border)] bg-[var(--card-bg)] px-2.5 py-1 text-xs text-[var(--muted-foreground)] transition-colors hover:bg-[var(--secondary)] hover:text-[var(--foreground)]",children:[(0,b.jsx)(g.ArrowLeft,{className:"h-3.5 w-3.5"}),"Back to objectives"]}):null,(0,b.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,b.jsx)("span",{className:"rounded-full border border-[var(--tone-neutral-border)] bg-[var(--tone-neutral-bg)] px-2.5 py-0.5 text-[10px] font-mono uppercase tracking-wider text-[var(--tone-neutral)]",children:O.key}),(0,b.jsx)("span",{className:`rounded-full border px-2.5 py-0.5 text-[10px] font-semibold uppercase tracking-[0.18em] ${ao[O.status].chipClass}`,children:ao[O.status].label})]}),(0,b.jsx)("div",{className:"mb-6",children:R?(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("input",{autoFocus:!0,value:R.title,onChange:a=>S({...R,title:a.target.value}),onKeyDown:a=>{"Enter"===a.key&&a1(),"Escape"===a.key&&S(null)},className:"flex-1 border-b-2 border-[var(--primary)] bg-transparent px-0 py-1 text-[28px] font-semibold leading-tight text-[var(--foreground)] outline-none",placeholder:"Objective statement"}),(0,b.jsx)("button",{type:"button",onClick:()=>void a1(),disabled:$,className:"rounded-md p-1.5 text-[var(--primary)] transition-colors hover:bg-[var(--status-in-progress-bg)]","aria-label":"Save objective",children:(0,b.jsx)(k.Check,{size:18})}),(0,b.jsx)("button",{type:"button",onClick:()=>S(null),className:"rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)]","aria-label":"Cancel editing",children:(0,b.jsx)(u.X,{size:18})})]}):(0,b.jsxs)("button",{type:"button","aria-label":`Edit objective ${O.title}`,className:"flex items-center gap-3 group cursor-pointer text-left",onClick:()=>S({id:O.id,title:O.title,teamId:O.teamId,summary:O.summary}),children:[(0,b.jsx)("h1",{className:"text-[28px] leading-tight font-semibold text-[var(--foreground)]",children:O.title}),(0,b.jsx)(n.Pencil,{size:16,className:"shrink-0 text-[var(--muted-foreground)] opacity-0 transition-opacity group-hover:opacity-100"})]})}),(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-3 mb-10",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)("span",{className:"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wider text-[var(--muted-foreground)]",children:[(0,b.jsx)(s.Users,{size:12})," Team"]}),(0,b.jsx)("span",{className:"text-[var(--app-shell-soft-text)]",children:"·"}),T?(0,b.jsx)("div",{className:"min-w-[180px]",children:(0,b.jsx)(E.default,{options:L.map(a=>({id:a.id,label:a.name})),value:T.teamId,onChange:a=>{U({teamId:a});let b=a.trim();b&&O&&(a0((0,an.upsertProjectObjective)(K,{...O,teamId:b,updatedAt:new Date().toISOString()})),U(null))},placeholder:"Select a team…"})}):(0,b.jsxs)("button",{type:"button","aria-label":`Edit team for ${O.title}`,onClick:()=>U({teamId:O.teamId}),className:"group -mx-1.5 -my-0.5 flex items-center gap-2 rounded px-1.5 py-0.5 transition-colors hover:bg-[var(--muted)]",children:[(0,b.jsx)("div",{className:"w-5 h-5 rounded-full bg-blue-500/20 text-blue-400 flex items-center justify-center text-[10px] font-bold border border-blue-500/30",children:(Q??"?").charAt(0).toUpperCase()}),(0,b.jsx)("span",{className:"text-sm text-[var(--foreground)] transition-colors group-hover:text-[var(--primary)]",children:Q??"Not assigned"})]})]}),I.id&&O.id?(0,b.jsx)(af,{projectId:I.id,objectiveId:O.id,objectiveKey:O.key,metadata:I.metadata,currentProgress:O.progress,currentStatus:O.status,objectiveUpdatedAt:O.updatedAt}):null]}),(0,b.jsxs)("div",{className:"mb-6 rounded-xl border border-[var(--border)] bg-[var(--card-bg)]",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-4 py-2.5",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(m.FileText,{size:14,className:"text-[var(--muted-foreground)]"}),(0,b.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--muted-foreground)]",children:"Program"}),aQ?(0,b.jsx)("span",{className:"font-mono text-[10px] text-[var(--muted-foreground)] opacity-70",children:aQ.replace(/^.*\/\.agx\//,"~/.agx/")}):null]}),null===aS?(0,b.jsx)("button",{type:"button",onClick:()=>aT(aO??""),className:"rounded-md p-1 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]","aria-label":"Edit program",children:(0,b.jsx)(n.Pencil,{size:14})}):(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsx)("button",{type:"button",onClick:()=>void a4(),disabled:aU,className:"rounded-md p-1 text-[var(--primary)] transition-colors hover:bg-[var(--status-in-progress-bg)] disabled:opacity-50","aria-label":"Save program",children:(0,b.jsx)(k.Check,{size:14})}),(0,b.jsx)("button",{type:"button",onClick:()=>aT(null),className:"rounded-md p-1 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)]","aria-label":"Cancel editing",children:(0,b.jsx)(u.X,{size:14})})]})]}),(0,b.jsx)("div",{className:"px-4 py-3",children:null!==aS?(0,b.jsx)("textarea",{autoFocus:!0,value:aS,onChange:a=>aT(a.target.value),rows:8,placeholder:"Goal: why this exists\n\nDefinition of better: the metric or signal that says we're done\n\nBlast radius: paths/systems in scope, what's off-limits\n\nNotes: things we've learned",className:"w-full resize-y rounded-md border border-[var(--border)] bg-[var(--background)] px-3 py-2 font-mono text-xs text-[var(--foreground)] outline-none focus:border-[var(--primary)]"}):aO&&aO.trim().length>0?(0,b.jsx)("div",{className:"prose prose-sm max-w-none text-sm text-[var(--foreground)]",children:(0,b.jsx)(z.Markdown,{content:aO})}):(0,b.jsxs)("p",{className:"text-sm text-[var(--muted-foreground)]",children:["No program yet. Define what ",(0,b.jsx)("em",{children:"better"})," looks like for this objective — the metric, the scope, any constraints. Agents read this before every run, and will ask for it in chat if it's missing."]})})]}),(0,b.jsx)("div",{className:"mb-6",children:(0,b.jsxs)("button",{type:"button",onClick:async()=>{aN(!0),await ba(),aN(!1)},disabled:aM,className:"inline-flex items-center gap-2 rounded-xl border border-[var(--status-completed-border)] bg-[var(--status-completed-bg)] px-3 py-2 text-sm text-[var(--status-completed-text)] transition-opacity hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,b.jsx)(t.Sparkles,{className:"h-4 w-4"}),aM?"Working...":"Work on objective"]})}),(0,b.jsx)("div",{className:"mb-8 border-b border-[var(--border)]",children:(0,b.jsx)("nav",{className:"flex gap-1 -mb-px","aria-label":"Objective sections",children:[{id:"activity",label:"Activity",icon:l.Clock},{id:"notes",label:"Notes",icon:m.FileText},{id:"tasks",label:"Tasks",icon:a=>{let c=aG.filter(a=>a.connected),d=(aK&&c.some(a=>a.type===aK)?aK:c[0]?.type)??"tracker";return(0,b.jsx)(ag.TrackerIcon,{trackerType:d,className:"h-3.5 w-3.5"})}},{id:"scheduled-tasks",label:"Scheduled Jobs",icon:j}].map(a=>{let c,d;return(0,b.jsxs)("button",{type:"button",onClick:()=>W(a.id),className:`flex items-center gap-2 px-3 py-2.5 text-sm font-medium border-b-2 transition-colors ${V===a.id?"border-[var(--primary)] text-[var(--foreground)]":"border-transparent text-[var(--muted-foreground)] hover:border-[var(--border)] hover:text-[var(--foreground)]"}`,children:[(0,b.jsx)(a.icon,{size:14}),a.label,"activity"===a.id&&Y>0&&(0,b.jsx)("span",{className:"rounded-full bg-[var(--tone-neutral-bg)] px-1.5 py-0.5 font-mono text-[10px] text-[var(--tone-neutral)]",children:Y}),"notes"===a.id&&ac.length>0&&(0,b.jsx)("span",{className:"rounded-full bg-[var(--tone-neutral-bg)] px-1.5 py-0.5 font-mono text-[10px] text-[var(--tone-neutral)]",children:ac.length}),"tasks"===a.id&&(c=["done","canceled","cancelled","completed","duplicate"],(d=aE.filter((a,b,d)=>d.findIndex(b=>b.id===a.id)===b&&!c.includes(a.status.toLowerCase()))).length>0?(0,b.jsx)("span",{className:"rounded-full bg-[var(--tone-neutral-bg)] px-1.5 py-0.5 font-mono text-[10px] text-[var(--tone-neutral)]",children:d.length}):null),"scheduled-tasks"===a.id&&a_>0&&(0,b.jsx)("span",{className:"rounded-full bg-[var(--tone-neutral-bg)] px-1.5 py-0.5 font-mono text-[10px] text-[var(--tone-neutral)]",children:a_})]},a.id)})})}),(0,b.jsxs)("div",{className:"space-y-10",children:["notes"===V&&(0,b.jsxs)("section",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,b.jsxs)("div",{className:"relative flex-1",children:[(0,b.jsx)(p.Search,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--muted-foreground)]"}),(0,b.jsx)("input",{type:"text",value:aB,onChange:a=>aD(a.target.value),placeholder:"Search notes...",className:"w-full rounded-md border border-[var(--border)] bg-[var(--input)] py-1.5 pl-8 pr-3 text-sm text-[var(--foreground)] placeholder:text-[var(--app-shell-soft-text)] focus:border-[var(--primary)] focus:outline-none"})]}),(0,b.jsxs)("button",{type:"button",onClick:a5,disabled:az,className:"flex items-center gap-1.5 rounded-md border border-[var(--status-in-progress-border)] bg-[var(--status-in-progress-bg)] px-3 py-1.5 text-sm font-medium text-[var(--status-in-progress-text)] transition-opacity hover:opacity-90 disabled:opacity-50",children:[(0,b.jsx)(o.Plus,{size:14}),"New note"]})]}),ae?(0,b.jsx)("p",{className:"py-4 text-sm text-[var(--muted-foreground)]",children:"Loading notes..."}):0===ac.length?(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)] py-4",children:"No notes yet. Add one above."}):0===(w=(v=aB.toLowerCase())?ac.filter(a=>a.title.toLowerCase().includes(v)||a.body.toLowerCase().includes(v)):ac).length?(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)] py-4",children:"No notes match your search."}):(0,b.jsx)("div",{className:"columns-1 gap-3 sm:columns-2 lg:columns-3",style:{columnFill:"balance"},children:w.map(a=>(0,b.jsxs)("button",{type:"button",onClick:()=>ak(a.id),className:"mb-3 block w-full break-inside-avoid overflow-hidden rounded-lg border border-[var(--border)] bg-[var(--overlay-panel-muted)] text-left transition-shadow hover:shadow-md",children:[(0,b.jsx)("div",{className:"px-3 pt-3 pb-1",children:(0,b.jsx)("h4",{className:"text-sm font-medium text-[var(--foreground)] leading-snug",children:a.title})}),a.body.trim()&&(0,b.jsx)("div",{className:"px-3 pb-2 text-xs text-[var(--muted-foreground)] line-clamp-4",children:(0,b.jsx)(z.Markdown,{content:a.body})}),(0,b.jsx)("div",{className:"flex items-center justify-between px-3 pb-2",children:(0,b.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)]",children:new Date(a.updatedAt).toLocaleDateString()})})]},a.id))}),aj&&(()=>{let a=ac.find(a=>a.id===aj);if(!a)return null;let c=al[a.id]??a.body,d=ap[a.id]??a.title,e=at.has(a.id);return(0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-start justify-center bg-black/50 pt-[5vh]",onClick:a=>{a.target===a.currentTarget&&ak(null)},children:(0,b.jsxs)("div",{className:"mx-6 w-full max-w-7xl rounded-xl border border-[var(--border)] bg-[var(--background)] shadow-xl",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[(0,b.jsx)("input",{type:"text",autoFocus:!0,value:d,onFocus:a=>{"Untitled"===d&&a.target.select()},onChange:b=>ar(c=>({...c,[a.id]:b.target.value})),className:"flex-1 bg-transparent text-base font-semibold text-[var(--foreground)] focus:outline-none"}),(0,b.jsxs)("div",{className:"flex items-center gap-2 ml-3",children:[(0,b.jsx)("span",{className:"text-[11px] text-[var(--muted-foreground)]",children:e?"Saving...":new Date(a.updatedAt).toLocaleDateString()}),(0,b.jsx)("button",{type:"button",onClick:()=>a6(a.id),className:"p-1 text-[var(--muted-foreground)] transition-colors hover:text-[var(--destructive)]",children:(0,b.jsx)(q.Trash2,{size:14})}),(0,b.jsx)("button",{type:"button",onClick:()=>ak(null),className:"p-1 text-[var(--muted-foreground)] transition-colors hover:text-[var(--foreground)]",children:(0,b.jsx)(u.X,{size:14})})]})]}),(0,b.jsx)("div",{className:"max-h-[75vh] overflow-y-auto px-5 py-4",children:(0,b.jsx)(ax,{content:c,editable:!0,onChange:b=>am(c=>({...c,[a.id]:b})),placeholder:"Write your note..."})})]})})})()]}),"activity"===V&&I.id&&O.id&&(0,b.jsx)(X,{projectId:I.id,objectiveId:O.id,onTotalChange:Z}),"tasks"===V&&(x=aE.filter((a,b,c)=>c.findIndex(b=>b.id===a.id)===b),y=["done","canceled","cancelled","completed","duplicate"],A=x.filter(a=>!y.includes(a.status.toLowerCase())),B=x.filter(a=>y.includes(a.status.toLowerCase())).slice(-5),C=aG.filter(a=>a.connected),F=0===(D=aK&&C.some(a=>a.type===aK)?C.filter(a=>a.type===aK):C).length?null:D.map(a=>a.displayName).join(", "),(0,b.jsxs)("section",{children:[(0,b.jsx)("div",{className:"flex flex-wrap items-start justify-between gap-3 mb-4",children:(0,b.jsxs)("p",{className:"text-sm text-[var(--muted-foreground)]",children:["Tickets tracked by the objective label"," ",(0,b.jsx)("code",{className:"rounded bg-[var(--tone-neutral-bg)] px-1.5 py-0.5 font-mono text-[11px] text-[var(--foreground)]",children:O.key}),F?(0,b.jsxs)(b.Fragment,{children:[" across ",F,"."]}):"."]})}),0===D.length?(0,b.jsx)(aC,{label:0===aI.length?"No tracker integrations registered.":`Connect a tracker (${aI.map(a=>a.displayName).join(", ")}) to create and track tickets for this objective.`}):0===x.length?(0,b.jsx)(aC,{label:`No tracker tickets with label ${O.key} yet.`}):(0,b.jsxs)(b.Fragment,{children:[A.length>0&&(0,b.jsx)("div",{className:"space-y-3",children:A.map(c=>(0,b.jsxs)("div",{className:"rounded-xl border border-[var(--border)] bg-[var(--overlay-panel-muted)] p-4",children:[(0,b.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:[(0,b.jsx)(ag.TrackerIcon,{trackerType:c.trackerType,className:"h-3 w-3"}),(0,b.jsx)("span",{children:c.identifier})]}),(0,b.jsx)("a",{href:c.url??`/projects/${a}/tracking/${c.trackerType}?issue=${c.id}`,target:c.url?"_blank":void 0,rel:c.url?"noreferrer":void 0,className:"mt-1 block text-sm font-medium text-[var(--foreground)] transition-colors hover:text-[var(--primary)]",children:c.title})]}),(0,b.jsx)("span",{className:"rounded-full border border-[var(--tone-neutral-border)] px-2 py-1 text-[10px] font-semibold uppercase tracking-[0.18em] text-[var(--tone-neutral)]",children:c.status})]}),(0,b.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2 text-[11px] text-[var(--muted-foreground)]",children:[(0,b.jsxs)("span",{children:["Updated ",aq(c.updatedAt)]}),(0,b.jsx)("span",{children:c.assignee?`Assigned to ${c.assignee}`:"Unassigned"})]})]},c.id))}),B.length>0&&(0,b.jsxs)("div",{className:A.length>0?"mt-6":"",children:[(0,b.jsx)("p",{className:"text-[11px] font-medium uppercase tracking-[0.18em] text-[var(--muted-foreground)] mb-2",children:"Completed"}),(0,b.jsx)("div",{className:"space-y-0.5",children:B.map(c=>(0,b.jsxs)("a",{href:c.url??`/projects/${a}/tracking/${c.trackerType}?issue=${c.id}`,target:c.url?"_blank":void 0,rel:c.url?"noreferrer":void 0,className:"group flex items-center gap-3 rounded-md px-2 py-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]",children:[(0,b.jsx)(ag.TrackerIcon,{trackerType:c.trackerType,className:"h-3 w-3 shrink-0"}),(0,b.jsx)("span",{className:"text-[11px] font-mono shrink-0",children:c.identifier}),(0,b.jsx)("span",{className:"text-[12px] truncate",children:c.title}),(0,b.jsx)("span",{className:"ml-auto shrink-0 text-[10px] text-[var(--app-shell-soft-text)] group-hover:text-[var(--muted-foreground)]",children:c.status})]},c.id))})]})]})]})),"scheduled-tasks"===V&&(0,b.jsx)("section",{children:(0,b.jsx)(P,{projectId:I.id,objectiveId:O.id,objectiveKey:O.key,createDefaults:{name:`Work on ${O.title}`},onCreateTask:a9})}),(0,b.jsxs)("section",{className:"pt-10",children:[(0,b.jsx)("div",{className:"mb-4",children:(0,b.jsx)("h2",{className:"text-sm font-semibold text-[var(--destructive)]",children:"Danger Zone"})}),(0,b.jsxs)("div",{className:"flex items-center justify-between rounded-xl border border-[var(--destructive-border)] bg-[var(--destructive-bg)] p-5",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-medium text-[var(--foreground)]",children:"Delete Objective"}),(0,b.jsx)("p",{className:"mt-1 text-sm text-[var(--muted-foreground)]",children:"Once you delete an objective, there is no going back."})]}),(0,b.jsxs)("button",{type:"button",onClick:()=>void a7(),"aria-label":`Delete objective ${O.title}`,className:"flex items-center gap-2 whitespace-nowrap rounded-md border border-[var(--destructive-border)] bg-[var(--destructive-bg)] px-3 py-1.5 text-sm font-medium text-[var(--destructive)] transition-opacity hover:opacity-90",children:[(0,b.jsx)(q.Trash2,{size:14})," Delete"]})]})]})]})]})}),(0,b.jsx)(ah.JumpToLatestButton,{visible:aX,direction:"top",onClick:aZ})]}),(0,b.jsx)(au,{projectId:I.id,projectSlug:a,objective:O,teamName:Q,trackerConnections:aG,availableTrackers:aI,defaultTrackerType:aK,onThreadLinked:a8,onObjectiveUpdated:N})]})})}):(0,b.jsx)("div",{className:"flex h-full items-center justify-center px-4 bg-[var(--background)]",children:(0,b.jsxs)("div",{className:"rounded-xl border border-[var(--border)] bg-[var(--card-bg)] p-8 text-center",children:[(0,b.jsx)("p",{className:"text-lg font-semibold text-[var(--foreground)]",children:"Objective not found"}),(0,b.jsx)("p",{className:"mt-2 text-sm text-[var(--muted-foreground)]",children:"It may have been deleted or the link is stale."}),(0,b.jsx)(c.default,{href:`/projects/${a}`,className:"mt-4 inline-flex items-center gap-2 rounded-md border border-[var(--border)] bg-[var(--card-bg)] px-3 py-1.5 text-sm text-[var(--foreground)] transition-colors hover:bg-[var(--secondary)]",children:"Back to objectives"})]})}):(0,b.jsx)(av,{label:"Project not found."})}function aC({label:a}){return(0,b.jsx)("div",{className:"flex items-center rounded-xl border border-dashed border-[var(--border)] bg-[var(--overlay-panel-muted)] p-6",children:(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:a})})}function aD({mode:a,draft:c,teams:d=[],isSaving:e,onChange:f,onClose:g,onSave:h}){return(0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/45 p-4",children:(0,b.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"edit"===a?"Edit objective":"New objective",className:"w-full max-w-3xl overflow-hidden rounded-[32px] border border-[var(--border)] bg-[var(--overlay-panel-strong)] shadow-2xl",children:[(0,b.jsxs)("div",{className:"border-b border-[var(--border)] px-5 py-4",children:[(0,b.jsx)("h3",{className:"text-lg font-semibold text-[var(--foreground)]",children:"edit"===a?"Edit objective":"New objective"}),(0,b.jsx)("p",{className:"mt-1 text-sm text-[var(--muted-foreground)]",children:"edit"===a?"Update the tracking details for this objective.":"Keep the statement measurable and use notes only for context that matters."})]}),(0,b.jsxs)("div",{className:"space-y-4 px-5 py-5",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)(aE,{label:"Objective statement"}),(0,b.jsx)("input",{value:c.title,onChange:a=>f({...c,title:a.target.value}),className:"w-full rounded-2xl border border-[var(--border)] bg-[var(--input)] px-4 py-3 text-sm text-[var(--foreground)] outline-none transition-colors focus:border-[var(--primary)]",placeholder:"Get 50 qualified visitors daily"})]}),"create"===a?(0,b.jsxs)("div",{children:[(0,b.jsx)(aE,{label:"Team"}),(0,b.jsxs)("select",{value:c.teamId,onChange:a=>f({...c,teamId:a.target.value}),className:"w-full rounded-2xl border border-[var(--border)] bg-[var(--input)] px-3 py-3 text-sm text-[var(--foreground)] outline-none transition-colors focus:border-[var(--primary)]",children:[(0,b.jsx)("option",{value:"",children:"Select a team"}),d.map(a=>(0,b.jsx)("option",{value:a.id,children:a.name},a.id))]}),(0,b.jsx)("p",{className:"mt-2 text-xs text-[var(--muted-foreground)]",children:"Teams can only own one objective at a time."})]}):null]}),(0,b.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[(0,b.jsx)("button",{type:"button",onClick:g,className:"rounded-xl border border-[var(--border)] px-3 py-2 text-sm text-[var(--muted-foreground)] transition-colors hover:text-[var(--foreground)]",children:"Cancel"}),(0,b.jsx)("button",{type:"button",onClick:h,disabled:e,className:"rounded-xl border border-[var(--status-in-progress-border)] bg-[var(--status-in-progress-bg)] px-3 py-2 text-sm font-medium text-[var(--status-in-progress-text)] transition-opacity hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:e?"Saving...":"edit"===a?"Save objective":"Create objective"})]})]})})}function aE({label:a}){return(0,b.jsx)("label",{className:"mb-2 block text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:a})}a.s(["ProjectObjectivesOverview",()=>aA],739515)}];
|
|
21
21
|
|
|
22
22
|
//# sourceMappingURL=apps_local_components_projects_ProjectObjectivesWorkspace_tsx_751ab3d3._.js.map
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"wasm": [],
|
|
21
21
|
"assets": [],
|
|
22
22
|
"env": {
|
|
23
|
-
"__NEXT_BUILD_ID": "
|
|
24
|
-
"NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "
|
|
25
|
-
"__NEXT_PREVIEW_MODE_ID": "
|
|
26
|
-
"__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "
|
|
27
|
-
"__NEXT_PREVIEW_MODE_SIGNING_KEY": "
|
|
23
|
+
"__NEXT_BUILD_ID": "EGpM0P8xAEWKkoW-3Ib69",
|
|
24
|
+
"NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "ucmTjbGtw5nF2bprKINX45gIelSEZ3jHV6it6a+y1FM=",
|
|
25
|
+
"__NEXT_PREVIEW_MODE_ID": "09b29e8a9945d678569447bc2a5fdc7a",
|
|
26
|
+
"__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "0aab087145f638737bae1bcd621e6601b97aee6d140563e77c22fd421f3d16a7",
|
|
27
|
+
"__NEXT_PREVIEW_MODE_SIGNING_KEY": "8f0f064bf3cac07b0eda519854e210e46c40f63ddd30fec74c364bb5e02d2a8c"
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
1
|
+
<!DOCTYPE html><!--EGpM0P8xAEWKkoW_3Ib69--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/2473c16c0c2f6b5f.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/chunks/6d8a7494a0cea7a0.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/dd43daafe104f561.js"/><script src="/_next/static/chunks/aa3029ae0b62f930.js" async=""></script><script src="/_next/static/chunks/df673c7fb40f4048.js" async=""></script><script src="/_next/static/chunks/2dcb395af210b784.js" async=""></script><script src="/_next/static/chunks/edb0e1ed5398cec6.js" async=""></script><script src="/_next/static/chunks/turbopack-87f23485587f08c3.js" async=""></script><script src="/_next/static/chunks/ddcc46bd872e6481.js" async=""></script><script src="/_next/static/chunks/341a398270fbed77.js" async=""></script><link rel="preload" href="https://www.googletagmanager.com/gtag/js?id=G-DVQQG95LNL" as="script"/><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>AGX</title><meta name="description" content="Workflow surface for AI-assisted dev work — tickets, repos, PRs, and agents in one window."/><script>
|
|
2
2
|
(() => {
|
|
3
3
|
try {
|
|
4
4
|
const storedTheme = localStorage.getItem("agx-theme");
|
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
root.style.colorScheme = theme;
|
|
11
11
|
} catch {}
|
|
12
12
|
})();
|
|
13
|
-
</script><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body class="geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable antialiased min-h-screen overflow-x-hidden overflow-y-auto bg-[var(--background)] text-[var(--foreground)] selection:bg-[var(--primary)] selection:text-[var(--primary-foreground)]"><div hidden=""><!--$--><!--/$--></div><div class="min-h-screen flex items-center justify-center bg-[var(--background)]"><span class="spinner w-8 h-8 border-3 border-[var(--primary)] border-t-transparent rounded-full"></span></div><script src="/_next/static/chunks/dd43daafe104f561.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[6167,[\"/_next/static/chunks/ddcc46bd872e6481.js\",\"/_next/static/chunks/341a398270fbed77.js\"],\"default\"]\n3:I[803750,[\"/_next/static/chunks/ddcc46bd872e6481.js\",\"/_next/static/chunks/341a398270fbed77.js\"],\"default\"]\n4:I[954957,[\"/_next/static/chunks/ddcc46bd872e6481.js\",\"/_next/static/chunks/341a398270fbed77.js\"],\"default\"]\n5:I[356453,[\"/_next/static/chunks/ddcc46bd872e6481.js\",\"/_next/static/chunks/341a398270fbed77.js\"],\"default\"]\n6:I[934689,[\"/_next/static/chunks/ddcc46bd872e6481.js\",\"/_next/static/chunks/341a398270fbed77.js\"],\"GoogleAnalytics\"]\n7:I[404581,[\"/_next/static/chunks/ddcc46bd872e6481.js\",\"/_next/static/chunks/341a398270fbed77.js\"],\"PostHogAnalytics\"]\n8:I[351240,[\"/_next/static/chunks/ddcc46bd872e6481.js\",\"/_next/static/chunks/341a398270fbed77.js\"],\"OutletBoundary\"]\n9:\"$Sreact.suspense\"\nb:I[351240,[\"/_next/static/chunks/ddcc46bd872e6481.js\",\"/_next/static/chunks/341a398270fbed77.js\"],\"ViewportBoundary\"]\nd:I[351240,[\"/_next/static/chunks/ddcc46bd872e6481.js\",\"/_next/static/chunks/341a398270fbed77.js\"],\"MetadataBoundary\"]\nf:I[23023,[\"/_next/static/chunks/ddcc46bd872e6481.js\",\"/_next/static/chunks/341a398270fbed77.js\"],\"default\"]\n:HL[\"/_next/static/chunks/2473c16c0c2f6b5f.css\",\"style\"]\n:HL[\"/_next/static/chunks/
|
|
13
|
+
</script><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body class="geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable antialiased min-h-screen overflow-x-hidden overflow-y-auto bg-[var(--background)] text-[var(--foreground)] selection:bg-[var(--primary)] selection:text-[var(--primary-foreground)]"><div hidden=""><!--$--><!--/$--></div><div class="min-h-screen flex items-center justify-center bg-[var(--background)]"><span class="spinner w-8 h-8 border-3 border-[var(--primary)] border-t-transparent rounded-full"></span></div><script src="/_next/static/chunks/dd43daafe104f561.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[6167,[\"/_next/static/chunks/ddcc46bd872e6481.js\",\"/_next/static/chunks/341a398270fbed77.js\"],\"default\"]\n3:I[803750,[\"/_next/static/chunks/ddcc46bd872e6481.js\",\"/_next/static/chunks/341a398270fbed77.js\"],\"default\"]\n4:I[954957,[\"/_next/static/chunks/ddcc46bd872e6481.js\",\"/_next/static/chunks/341a398270fbed77.js\"],\"default\"]\n5:I[356453,[\"/_next/static/chunks/ddcc46bd872e6481.js\",\"/_next/static/chunks/341a398270fbed77.js\"],\"default\"]\n6:I[934689,[\"/_next/static/chunks/ddcc46bd872e6481.js\",\"/_next/static/chunks/341a398270fbed77.js\"],\"GoogleAnalytics\"]\n7:I[404581,[\"/_next/static/chunks/ddcc46bd872e6481.js\",\"/_next/static/chunks/341a398270fbed77.js\"],\"PostHogAnalytics\"]\n8:I[351240,[\"/_next/static/chunks/ddcc46bd872e6481.js\",\"/_next/static/chunks/341a398270fbed77.js\"],\"OutletBoundary\"]\n9:\"$Sreact.suspense\"\nb:I[351240,[\"/_next/static/chunks/ddcc46bd872e6481.js\",\"/_next/static/chunks/341a398270fbed77.js\"],\"ViewportBoundary\"]\nd:I[351240,[\"/_next/static/chunks/ddcc46bd872e6481.js\",\"/_next/static/chunks/341a398270fbed77.js\"],\"MetadataBoundary\"]\nf:I[23023,[\"/_next/static/chunks/ddcc46bd872e6481.js\",\"/_next/static/chunks/341a398270fbed77.js\"],\"default\"]\n:HL[\"/_next/static/chunks/2473c16c0c2f6b5f.css\",\"style\"]\n:HL[\"/_next/static/chunks/6d8a7494a0cea7a0.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"EGpM0P8xAEWKkoW-3Ib69\",\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/2473c16c0c2f6b5f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/6d8a7494a0cea7a0.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/ddcc46bd872e6481.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/341a398270fbed77.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n(() =\u003e {\\n try {\\n const storedTheme = localStorage.getItem(\\\"agx-theme\\\");\\n const theme = storedTheme === \\\"dark\\\" || storedTheme === \\\"light\\\"\\n ? storedTheme\\n : (window.matchMedia(\\\"(prefers-color-scheme: dark)\\\").matches ? \\\"dark\\\" : \\\"light\\\");\\n const root = document.documentElement;\\n root.classList.toggle(\\\"dark\\\", theme === \\\"dark\\\");\\n root.style.colorScheme = theme;\\n } catch {}\\n})();\\n\"}}]}],[\"$\",\"body\",null,{\"className\":\"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable antialiased min-h-screen overflow-x-hidden overflow-y-auto bg-[var(--background)] text-[var(--foreground)] selection:bg-[var(--primary)] selection:text-[var(--primary-foreground)]\",\"children\":[[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"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.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}],[\"$\",\"$L5\",null,{}],[\"$\",\"$L6\",null,{}],[\"$\",\"$L7\",null,{}]]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",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\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:0:props:children:props:notFound:0:1:props:style\",\"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\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:0:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:0:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:0:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L8\",null,{\"children\":[\"$\",\"$9\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@a\"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$Lb\",null,{\"children\":\"$Lc\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Ld\",null,{\"children\":[\"$\",\"$9\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Le\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$f\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"a:null\ne:[[\"$\",\"title\",\"0\",{\"children\":\"AGX\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Workflow surface for AI-assisted dev work — tickets, repos, PRs, and agents in one window.\"}]]\n"])</script></body></html>
|