@ulpi/cli 0.1.10 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-F32YQRFR.js → chunk-3YFN5ZOR.js} +1 -1
- package/dist/{ci-QBXWR3GW.js → ci-EXYAXQVI.js} +1 -1
- package/dist/{doctor-SRJIZM2T.js → doctor-2EHFGL6W.js} +1 -1
- package/dist/{history-UGYO7Z3U.js → history-MXKIYCX4.js} +1 -1
- package/dist/index.js +8 -8
- package/dist/portal/apps/portal/.next/BUILD_ID +1 -1
- package/dist/portal/apps/portal/.next/app-build-manifest.json +107 -107
- package/dist/portal/apps/portal/.next/app-path-routes-manifest.json +18 -18
- package/dist/portal/apps/portal/.next/build-manifest.json +2 -2
- package/dist/portal/apps/portal/.next/prerender-manifest.json +109 -109
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/billing/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/codemap/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/history/[sha]/transcript/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/history/page.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/history/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/jobs/[id]/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/jobs/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/loop/page.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/loop/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/mcps/[name]/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/mcps/catalog/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/mcps/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/mcps/secrets/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/mcps/submissions/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/mcps/usage/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/memory/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/memory/settings/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/memory/timeline/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/notifications/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/parallel/page.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/parallel/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/prd/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/repos/[id]/guards/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/repos/[id]/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/repos/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/review/config/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/review/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/review/plan/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/review/queue/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/rules/[id]/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/rules/new/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/rules/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/rules/pipelines/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/sessions/[sessionId]/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/sessions/page.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/sessions/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/settings/github/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/settings/installations/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/settings/keys/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/settings/members/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/settings/orgs/new/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/settings/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/skills/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/sprints/[batchId]/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/sprints/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/(dashboard)/templates/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/_not-found.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/_not-found.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/auth/callback/page_client-reference-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/app/auth/callback.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/auth/callback.rsc +1 -1
- package/dist/portal/apps/portal/.next/server/app/billing.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/billing.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/codemap.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/codemap.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/dashboard.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/dashboard.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/history.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/history.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/jobs.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/jobs.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/loop.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/loop.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/mcps/catalog.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/mcps/catalog.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/mcps/secrets.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/mcps/secrets.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/mcps/submissions.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/mcps/submissions.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/mcps/usage.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/mcps/usage.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/mcps.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/mcps.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/memory/settings.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/memory/settings.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/memory/timeline.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/memory/timeline.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/memory.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/memory.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/notifications.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/notifications.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/parallel.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/parallel.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/prd.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/prd.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/repos.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/repos.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/review/config.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/review/config.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/review/plan.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/review/plan.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/review/queue.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/review/queue.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/review.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/review.meta +2 -0
- package/dist/portal/apps/portal/.next/server/app/review.rsc +2 -2
- package/dist/portal/apps/portal/.next/server/app/rules/new.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/rules/new.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/rules/pipelines.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/rules/pipelines.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/rules.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/rules.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/sessions.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/sessions.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/settings/github.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/settings/github.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/settings/installations.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/settings/installations.rsc +2 -2
- package/dist/portal/apps/portal/.next/server/app/settings/keys.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/settings/keys.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/settings/members.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/settings/members.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/settings/orgs/new.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/settings/orgs/new.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/settings.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/settings.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/skills.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/skills.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/sprints.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/sprints.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app/templates.html +1 -1
- package/dist/portal/apps/portal/.next/server/app/templates.rsc +3 -3
- package/dist/portal/apps/portal/.next/server/app-paths-manifest.json +18 -18
- package/dist/portal/apps/portal/.next/server/chunks/1522.js +1 -1
- package/dist/portal/apps/portal/.next/server/next-font-manifest.js +1 -1
- package/dist/portal/apps/portal/.next/server/next-font-manifest.json +1 -1
- package/dist/portal/apps/portal/.next/server/pages/404.html +1 -1
- package/dist/portal/apps/portal/.next/server/pages/500.html +1 -1
- package/dist/portal/apps/portal/.next/server/pages-manifest.json +1 -1
- package/dist/portal/apps/portal/.next/static/chunks/380-71bdca6a9260da3e.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/7525-85f4ca4276511230.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/7889-a8be276e20a74863.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/8744-29d969a2ddf40afe.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/{8934-bb365eb647fb2d5a.js → 8934-9fbad2b348b6ada1.js} +1 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/codemap/page-e85b24075b2ae8e9.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/dashboard/page-701be25e4930fcb6.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/history/{page-264989cf873cd3de.js → page-0275ca43fdd64bf2.js} +1 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/layout-4232b69653c5fbbf.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/loop/page-c3f658ffb8d7397b.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/mcps/[name]/page-f5283ca4a2a1141b.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/mcps/catalog/page-9b228ecfe1982eba.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/mcps/page-d8028301dcd11348.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/memory/page-34fe9bf93ef853d0.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/memory/settings/page-5c9c471c9425d814.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/memory/timeline/page-590f707b60b9ba47.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/notifications/page-46a9b033af7430e6.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/parallel/{page-85690140ff82dd58.js → page-49a26690ced20482.js} +1 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/repos/page-155cd1007250e5da.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/review/config/page-5ffb558d24a57b2c.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/review/queue/page-9fe0df848d23c383.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/rules/page-e17685f3220da942.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/rules/pipelines/page-589f30a41f066568.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/sessions/page-4ff5d7490cc0d260.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/settings/page-045a30e0bd843279.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/skills/page-2bd816bd8e62dc04.js +1 -0
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/templates/page-28a51e2788c5798d.js +1 -0
- package/dist/portal/package.json +1 -1
- package/dist/{start-DWZHVBUO.js → start-6SLTMLI4.js} +1 -1
- package/dist/{update-IBPDEBEK.js → update-563P3ZIS.js} +1 -1
- package/dist/{version-checker-XKFQNN3I.js → version-checker-JHHM4OTR.js} +1 -1
- package/package.json +6 -6
- package/dist/portal/apps/portal/.next/static/chunks/380-52bab5fc966d7cf9.js +0 -1
- package/dist/portal/apps/portal/.next/static/chunks/7525-d6350803a451284c.js +0 -1
- package/dist/portal/apps/portal/.next/static/chunks/7889-a3331988a8344d05.js +0 -1
- package/dist/portal/apps/portal/.next/static/chunks/8744-d545a53c9709467b.js +0 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/codemap/page-bf1ece66c1b05822.js +0 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/dashboard/page-936391d6b330f0cc.js +0 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/layout-05fc9732a636a609.js +0 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/loop/page-faeaacd95742c754.js +0 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/mcps/[name]/page-f24841b78e8c05c0.js +0 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/mcps/catalog/page-2ff0e6b6a5d76dac.js +0 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/mcps/page-2476b9c29c44c372.js +0 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/memory/page-79f977cd348c57ae.js +0 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/memory/settings/page-a3be96ef297c8e33.js +0 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/memory/timeline/page-30db4506366d09f4.js +0 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/notifications/page-df5f393a51d8e17b.js +0 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/repos/page-a0bcc68a119f63e1.js +0 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/review/config/page-770321f5a71a29a3.js +0 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/review/queue/page-33687733a5398264.js +0 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/rules/page-ac19551ab9f2128d.js +0 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/rules/pipelines/page-96ecfcce3a60ebb2.js +0 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/sessions/page-6b199747e9f587de.js +0 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/settings/page-ec4076cedf8df275.js +0 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/skills/page-81f63d5d894b0b03.js +0 -1
- package/dist/portal/apps/portal/.next/static/chunks/app/(dashboard)/templates/page-263e03b6690d36f5.js +0 -1
- /package/dist/portal/apps/portal/.next/static/{02AzZdYDA5HVAwITp37Ql → p-7mo3JdIgTzhlpqhShmK}/_buildManifest.js +0 -0
- /package/dist/portal/apps/portal/.next/static/{02AzZdYDA5HVAwITp37Ql → p-7mo3JdIgTzhlpqhShmK}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
exports.id=1522,exports.ids=[1522],exports.modules={4074:(a,b,c)=>{Promise.resolve().then(c.bind(c,90856))},10538:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(94026).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/ciprian/work_cip/ulpi/hooks/apps/portal/src/app/error.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.")},"/Users/ciprian/work_cip/ulpi/hooks/apps/portal/src/app/error.tsx","default")},11824:(a,b,c)=>{Promise.resolve().then(c.bind(c,38100))},21350:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,20576,23)),Promise.resolve().then(c.t.bind(c,60611,23)),Promise.resolve().then(c.t.bind(c,55519,23)),Promise.resolve().then(c.t.bind(c,54450,23)),Promise.resolve().then(c.t.bind(c,56358,23)),Promise.resolve().then(c.t.bind(c,67034,23)),Promise.resolve().then(c.t.bind(c,25506,23)),Promise.resolve().then(c.t.bind(c,2455,23)),Promise.resolve().then(c.bind(c,84978))},37009:()=>{},37681:()=>{},38100:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>e});var d=c(82164);function e({error:a,reset:b}){return(0,d.jsxs)("div",{style:{padding:"2rem",fontFamily:"system-ui, sans-serif"},children:[(0,d.jsx)("h2",{children:"Something went wrong"}),(0,d.jsx)("p",{style:{color:"#666"},children:a.message||"An unexpected error occurred."}),(0,d.jsx)("button",{onClick:b,style:{marginTop:"1rem",padding:"0.5rem 1rem",background:"#7C3AED",color:"white",border:"none",borderRadius:"0.375rem",cursor:"pointer"},children:"Try again"})]})}},39990:(a,b,c)=>{"use strict";function d(){return"local"===process.env.NEXT_PUBLIC_ULPI_MODE||"https://ulpi-cloud-api.ngrok.app".includes("localhost"),"https://ulpi-cloud-api.ngrok.app"}function e(){return"local"===process.env.NEXT_PUBLIC_ULPI_MODE||"https://ulpi-cloud-api.ngrok.app".includes("localhost")===!0}c.d(b,{J:()=>e,h:()=>d})},44267:()=>{},45460:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(94026).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/ciprian/work_cip/ulpi/hooks/apps/portal/src/app/(dashboard)/layout.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.")},"/Users/ciprian/work_cip/ulpi/hooks/apps/portal/src/app/(dashboard)/layout.tsx","default")},52894:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,2714,23)),Promise.resolve().then(c.t.bind(c,65701,23)),Promise.resolve().then(c.t.bind(c,68709,23)),Promise.resolve().then(c.t.bind(c,60492,23)),Promise.resolve().then(c.t.bind(c,13012,23)),Promise.resolve().then(c.t.bind(c,65800,23)),Promise.resolve().then(c.t.bind(c,11968,23)),Promise.resolve().then(c.t.bind(c,55273,23)),Promise.resolve().then(c.t.bind(c,61824,23))},53680:(a,b,c)=>{Promise.resolve().then(c.bind(c,10538))},60520:(a,b,c)=>{"use strict";c.d(b,{uE:()=>f});class d extends Error{constructor(a,b,c){super(`API Error ${a}: ${b}`),this.status=a,this.statusText=b,this.body=c,this.name="ApiError"}}class e{constructor(a,b){this.baseUrl=a.replace(/\/$/,""),this.token=b}setToken(a){this.token=a}async request(a,b,c){let e={"Content-Type":"application/json"};this.token&&!this.isLocalMode()&&(e.Authorization=`Bearer ${this.token}`);let f=await fetch(`${this.baseUrl}${b}`,{method:a,headers:e,body:c?JSON.stringify(c):void 0,credentials:"include"});if(!f.ok){let a;try{a=await f.json()}catch{}throw new d(f.status,f.statusText,a)}if(204!==f.status)return f.json()}async getMe(){return(await this.request("GET","/auth/me")).user}async getGitHubAuthUrl(){return this.request("GET","/auth/github")}async exchangeOAuthCode(a){return this.request("POST","/auth/github/callback",{code:a})}async logout(){return this.request("POST","/auth/logout")}async listOrgs(){return(await this.request("GET","/api/orgs")).orgs}async getOrg(a){let b=await this.request("GET",`/api/orgs/${a}`);return{...b.org,role:b.role}}async createOrg(a){return(await this.request("POST","/api/orgs",a)).org}async updateOrg(a,b){await this.request("PATCH",`/api/orgs/${a}`,b)}async deleteOrg(a){await this.request("DELETE",`/api/orgs/${a}`)}async listMembers(a){return(await this.request("GET",`/api/orgs/${a}/members`)).members}async inviteMember(a,b){await this.request("POST",`/api/orgs/${a}/members`,b)}async updateMemberRole(a,b,c){await this.request("PATCH",`/api/orgs/${a}/members/${b}`,{role:c})}async removeMember(a,b){await this.request("DELETE",`/api/orgs/${a}/members/${b}`)}async getSubscription(a){return this.request("GET",`/api/orgs/${a}/billing`)}async changePlan(a,b){return this.request("POST",`/api/orgs/${a}/billing/change-plan`,{tier:b})}async getUsage(a){return this.request("GET",`/api/orgs/${a}/billing/usage`)}async listInvoices(a){return(await this.request("GET",`/api/orgs/${a}/billing/invoices`)).invoices}async getCustomerPortalUrl(a){return this.request("POST",`/api/orgs/${a}/billing/portal`)}async listRepos(a){return(await this.request("GET",`/api/orgs/${a}/repos`)).repos}async getRepo(a,b){return this.request("GET",`/api/orgs/${a}/repos/${b}`)}async listAvailableRepos(a,b){return this.request("GET",`/api/orgs/${a}/repos/available?installation_id=${b}`)}async connectRepo(a,b){return this.request("POST",`/api/orgs/${a}/repos`,b)}async updateRepoConfig(a,b,c){await this.request("PATCH",`/api/orgs/${a}/repos/${b}`,{config:c})}async disconnectRepo(a,b){await this.request("DELETE",`/api/orgs/${a}/repos/${b}`)}async listJobs(a,b){let c=new URLSearchParams;b?.status&&c.set("status",b.status),b?.repo_id&&c.set("repo_id",b.repo_id),b?.page&&c.set("page",String(b.page));let d=c.toString();return this.request("GET",`/api/orgs/${a}/jobs${d?`?${d}`:""}`)}async getJob(a,b){return(await this.request("GET",`/api/orgs/${a}/jobs/${b}`)).job}async cancelJob(a,b){await this.request("POST",`/api/orgs/${a}/jobs/${b}/cancel`)}async retryJob(a,b){return this.request("POST",`/api/orgs/${a}/jobs/${b}/retry`)}async deleteJob(a,b){await this.request("DELETE",`/api/orgs/${a}/jobs/${b}`)}async createJob(a,b){return this.request("POST",`/api/orgs/${a}/jobs`,b)}getJobLogStreamUrl(a,b){return`${this.baseUrl}/api/orgs/${a}/jobs/${b}/logs`}async listApiKeys(a){return(await this.request("GET",`/api/orgs/${a}/keys`)).keys}async createApiKey(a,b){return this.request("POST",`/api/orgs/${a}/keys`,b)}async revokeApiKey(a,b){await this.request("DELETE",`/api/orgs/${a}/keys/${b}`)}async createSecret(a,b){return{id:(await this.request("POST",`/api/orgs/${a}/secrets`,b)).id}}async deleteSecret(a,b){await this.request("DELETE",`/api/orgs/${a}/secrets/${b}`)}async listInstallations(a){return(await this.request("GET",`/api/orgs/${a}/github/installations`)).installations}async linkInstallation(a,b){return this.request("POST",`/api/orgs/${a}/github/installations`,{installation_id:b})}async getInstallUrl(a){return this.request("GET",`/api/orgs/${a}/github/install-url`)}async createBatchJob(a,b){return this.request("POST",`/api/orgs/${a}/batch-jobs`,b)}async listBatchJobs(a,b){let c=new URLSearchParams;b?.status&&c.set("status",b.status),b?.page&&c.set("page",String(b.page));let d=c.toString();return this.request("GET",`/api/orgs/${a}/batch-jobs${d?`?${d}`:""}`)}async getBatchJob(a,b){return(await this.request("GET",`/api/orgs/${a}/batch-jobs/${b}`)).batch_job}async cancelBatchJob(a,b){await this.request("POST",`/api/orgs/${a}/batch-jobs/${b}/cancel`)}async listSessions(a,b){let c=new URLSearchParams;b?.status&&c.set("status",b.status),b?.page&&c.set("page",String(b.page));let d=c.toString();return this.request("GET",`/api/orgs/${a}/sessions${d?`?${d}`:""}`)}async getSession(a,b){return(await this.request("GET",`/api/orgs/${a}/sessions/${b}`)).session}getSessionLogStreamUrl(a,b){return`${this.baseUrl}/api/orgs/${a}/sessions/${b}/logs`}async getDashboardStats(a){return this.request("GET",`/api/orgs/${a}/dashboard`)}async getRecentJobs(a,b=10){return this.request("GET",`/api/orgs/${a}/jobs/recent?limit=${b}`)}async getMcpUsage(a,b=30){return this.request("GET",`/api/orgs/${a}/gateway/usage?days=${b}`)}async installMcp(a,b,c,d){return this.request("POST",`/api/orgs/${a}/mcps/install`,{catalog_name:b,repo_ids:c,config:d})}async listSecrets(a){return this.request("GET",`/api/orgs/${a}/secrets`)}async createOrgSecret(a,b,c,d,e){return this.request("POST",`/api/orgs/${a}/secrets`,{name:b,value:c,scope:d,repo_id:e})}async deleteOrgSecret(a,b){return this.request("DELETE",`/api/orgs/${a}/secrets/${b}`)}async getCatalogReadiness(a){return this.request("GET",`/api/orgs/${a}/mcps/catalog/readiness`)}async listCatalogSubmissions(a,b){let c=b?`?status=${b}`:"";return this.request("GET",`/api/orgs/${a}/mcps/submissions${c}`)}async createCatalogSubmission(a,b){return this.request("POST",`/api/orgs/${a}/mcps/submissions`,b)}async getCatalogSubmission(a,b){return this.request("GET",`/api/orgs/${a}/mcps/submissions/${b}`)}async updateCatalogSubmissionStatus(a,b,c,d){return this.request("PATCH",`/api/orgs/${a}/mcps/submissions/${b}/status`,{status:c,review_notes:d})}isLocalMode(){return this.baseUrl.includes("localhost")||this.baseUrl.includes("127.0.0.1")}isAuthenticated(){return!this.isLocalMode()&&!!this.token}}let f=new e("https://ulpi-cloud-api.ngrok.app")},62878:(a,b,c)=>{"use strict";c.d(b,{As:()=>i,OJ:()=>h});var d=c(54509),e=c.n(d),f=c(60520);let g=(0,d.createContext)({user:null,org:null,orgs:[],session:null,loading:!0,switchOrg:async()=>{},logout:async()=>{},refresh:async()=>{}});function h({children:a}){let[b,c]=(0,d.useState)(null),[h,i]=(0,d.useState)(null),[j,k]=(0,d.useState)([]),[l,m]=(0,d.useState)(null),[n,o]=(0,d.useState)(!0),p=(0,d.useCallback)(async()=>{let a=function(){if("undefined"==typeof document)return null;let a=document.cookie.match(RegExp("(^| )ulpi_session=([^;]+)"));return a?decodeURIComponent(a[2]):null}(),b=a?function(a){try{let b=a.split(".");if(3!==b.length)return null;return JSON.parse(atob(b[1]))}catch{return null}}(a):null;if(b&&1e3*b.exp<Date.now()){m(null),c(null),i(null),k([]),o(!1);return}if(m(b),!b||!a){c(null),i(null),k([]),o(!1);return}f.uE.setToken(a);try{let[a,b]=await Promise.all([f.uE.getMe(),f.uE.listOrgs()]);c(a),k(b);let d=b[0]??null;i(d)}catch{c(null),i(null),k([])}finally{o(!1)}},[]),q=(0,d.useCallback)(async a=>{let b=j.find(b=>b.id===a);b&&i(b)},[j]),r=(0,d.useCallback)(async()=>{try{await f.uE.logout()}catch{}document.cookie="ulpi_session=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT",c(null),i(null),k([]),m(null)},[]);return e().createElement(g.Provider,{value:{user:b,org:h,orgs:j,session:l,loading:n,switchOrg:q,logout:r,refresh:p}},a)}function i(){return(0,d.useContext)(g)}},73754:(a,b,c)=>{"use strict";c.d(b,{Kv:()=>i,HI:()=>l,Xk:()=>j,yC:()=>k});var d=c(82164),e=c(54509),f=c(39990);class g{constructor(){this.repo=null,this.baseUrl=(0,f.h)()}async request(a,b){let c=`${this.baseUrl}${a}`;if(this.repo){let a=c.includes("?")?"&":"?";c=`${c}${a}repo=${encodeURIComponent(this.repo)}`}let d=process.env.NEXT_PUBLIC_ULPI_API_SECRET,e=await fetch(c,{...b,headers:{"Content-Type":"application/json",...d?{"X-Ulpi-Secret":d}:{},...b?.headers}});if(!e.ok)throw Error((await e.json().catch(()=>({error:e.statusText}))).error||`API error: ${e.status}`);return e.json()}async get(a){return this.request(a)}async post(a,b){return this.request(a,{method:"POST",body:b?JSON.stringify(b):void 0})}async put(a,b){return this.request(a,{method:"PUT",body:b?JSON.stringify(b):void 0})}async delete(a){return this.request(a,{method:"DELETE"})}}let h=(0,e.createContext)({mode:"cloud",localClient:null});function i({children:a}){let b=(0,e.useMemo)(()=>{let a=(0,f.J)()?"local":"cloud";return{mode:a,localClient:"local"===a?new g:null}},[]);return(0,d.jsx)(h,{value:b,children:a})}function j(){return(0,e.useContext)(h).mode}function k(){let{localClient:a}=(0,e.useContext)(h);if(!a)throw Error("LocalApiClient not available in cloud mode");return a}function l(){return(0,e.useContext)(h)}},82648:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>j,metadata:()=>i});var d=c(38098),e=c(9490),f=c.n(e),g=c(85836),h=c.n(g);c(44267);let i={title:{default:"ULPI — The Intelligence Layer for AI Coding Agents",template:"%s | ULPI"},description:"Free intelligence and governance layer for AI coding agents. Semantic code search, agent memory, dependency graphs, guard rules, session history — zero infrastructure, everything stored in git.",keywords:["AI coding agent","Claude Code","guard rules","code review","plan review","CodeMap","semantic code search","agent memory","dependency graph","DepGraph","shadow branches","zero infrastructure","MCP tools","developer tools","ULPI"],openGraph:{title:"ULPI — The Intelligence Layer for AI Coding Agents",description:"Free intelligence and governance layer for AI coding agents. Zero infrastructure — everything stored in git shadow branches.",url:"https://app.ulpi.io",siteName:"ULPI",type:"website"}};function j({children:a}){return(0,d.jsx)("html",{lang:"en",className:"dark",children:(0,d.jsx)("body",{className:`${f().variable} ${h().variable} font-sans bg-surface-950 text-gray-100 antialiased`,children:a})})}},85922:(a,b,c)=>{Promise.resolve().then(c.bind(c,45460))},90856:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>C});var d=c(82164),e=c(62878),f=c(73754),g=c(54509),h=c(39990);let i=(0,g.createContext)({repos:[],selected:null,loading:!0,select:()=>{},refresh:async()=>{}});function j({children:a}){let{localClient:b}=(0,f.HI)(),[c,e]=(0,g.useState)([]),[j,k]=(0,g.useState)(()=>null),[l,m]=(0,g.useState)(!0),n=(0,g.useCallback)(async()=>{if(!b||!(0,h.J)())return void m(!1);try{let a=b.repo;b.repo=null;let c=await b.get("/api/repos");b.repo=a;let d=c.repos??[];if(e(d),j)if(d.find(a=>a.id===j))b.repo=j;else{let a=d.find(a=>a.isDefault)??d[0];a&&(k(a.id),b.repo=a.id,a.id)}else{let a=d.find(a=>a.isDefault)??d[0];a&&(k(a.id),b.repo=a.id,a.id)}}catch{}finally{m(!1)}},[b,j]),o=(0,g.useCallback)(a=>{k(a),b&&(b.repo=a)},[b]),p=c.find(a=>a.id===j)??null;return(0,d.jsx)(i,{value:{repos:c,selected:p,loading:l,select:o,refresh:n},children:a})}function k(){return(0,g.useContext)(i)}var l=c(60520),m=c(5543),n=c.n(m),o=c(26170);function p(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15m3 0 3-3m0 0-3-3m3 3H9"})})}function q(){return(0,d.jsx)("svg",{className:"h-3 w-3 text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})})}function r(){return(0,d.jsx)("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})})}function s(){return(0,d.jsx)("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})})}function t(){return(0,d.jsx)("span",{className:"ml-auto rounded-full bg-primary-500/15 px-1.5 py-0.5 text-[9px] font-medium text-primary-400",children:"Cloud"})}let u=[{label:"Overview",items:[{label:"Dashboard",href:"/dashboard",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25a2.25 2.25 0 0 1-2.25-2.25v-2.25Z"})})},{}),shortcut:"D"}]},{label:"Execution",items:[{label:"PRD",href:"/prd",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})})},{}),shortcut:"Q"},{label:"Loop",href:"/loop",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182"})})},{}),shortcut:"L"},{label:"Parallel",href:"/parallel",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7.5L7.5 3m0 0L12 7.5M7.5 3v13.5m13.5-6L16.5 15m0 0L12 10.5m4.5 4.5V1.5"})})},{}),shortcut:"A"},{label:"Jobs",href:"/jobs",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z"})})},{}),shortcut:"J",cloudOnly:!0},{label:"Sprints",href:"/sprints",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 0 1 0 3.75H5.625a1.875 1.875 0 0 1 0-3.75Z"})})},{}),shortcut:"X",cloudOnly:!0}]},{label:"Governance",items:[{label:"Rules",href:"/rules",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z"})})},{}),shortcut:"R"},{label:"Templates",href:"/templates",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})})},{}),shortcut:"T"},{label:"Skills",href:"/skills",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.455 2.456L21.75 6l-1.036.259a3.375 3.375 0 0 0-2.455 2.456Z"})})},{}),shortcut:"K"}]},{label:"Intelligence",items:[{label:"CodeMap",href:"/codemap",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"})})},{}),shortcut:"C"},{label:"Memory",href:"/memory",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 3v1.5M4.5 8.25H3m18 0h-1.5M4.5 12H3m18 0h-1.5m-15 3.75H3m18 0h-1.5M8.25 19.5V21M12 3v1.5m0 15V21m3.75-18v1.5m0 15V21m-9-1.5h10.5a2.25 2.25 0 0 0 2.25-2.25V6.75a2.25 2.25 0 0 0-2.25-2.25H6.75A2.25 2.25 0 0 0 4.5 6.75v10.5a2.25 2.25 0 0 0 2.25 2.25Z"})})},{}),shortcut:"M"},{label:"MCP Tools",href:"/mcps",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.25 6.087c0-.355.186-.676.401-.959.221-.29.349-.634.349-1.003 0-1.036-1.007-1.875-2.25-1.875s-2.25.84-2.25 1.875c0 .369.128.713.349 1.003.215.283.401.604.401.959v0a.64.64 0 0 1-.657.643 48.39 48.39 0 0 1-4.163-.3c.186 1.613.293 3.25.315 4.907a.656.656 0 0 1-.658.663v0c-.355 0-.676-.186-.959-.401a1.647 1.647 0 0 0-1.003-.349c-1.036 0-1.875 1.007-1.875 2.25s.84 2.25 1.875 2.25c.369 0 .713-.128 1.003-.349.283-.215.604-.401.959-.401v0c.31 0 .555.26.532.57a48.039 48.039 0 0 1-.642 5.056c1.518.19 3.058.309 4.616.354a.64.64 0 0 0 .657-.643v0c0-.355-.186-.676-.401-.959a1.647 1.647 0 0 1-.349-1.003c0-1.035 1.008-1.875 2.25-1.875 1.243 0 2.25.84 2.25 1.875 0 .369-.128.713-.349 1.003-.215.283-.4.604-.4.959v0c0 .333.277.599.61.58a48.1 48.1 0 0 0 5.427-.63 48.05 48.05 0 0 0 .582-4.717.532.532 0 0 0-.533-.57v0c-.355 0-.676.186-.959.401-.29.221-.634.349-1.003.349-1.035 0-1.875-1.007-1.875-2.25s.84-2.25 1.875-2.25c.37 0 .713.128 1.003.349.283.215.604.401.959.401v0a.656.656 0 0 0 .658-.663 48.422 48.422 0 0 0-.37-5.36c-1.886.342-3.81.574-5.766.689a.578.578 0 0 1-.61-.58v0Z"})})},{}),shortcut:"I"}]},{label:"Monitoring",items:[{label:"Sessions",href:"/sessions",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 7.5l3 2.25-3 2.25m4.5 0h3m-9 8.25h13.5A2.25 2.25 0 0 0 21 18V6a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 6v12a2.25 2.25 0 0 0 2.25 2.25Z"})})},{}),shortcut:"E"},{label:"History",href:"/history",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})})},{}),shortcut:"H"}]},{label:"Review",items:[{label:"Review Queue",href:"/review",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15a2.25 2.25 0 0 1 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25ZM6.75 12h.008v.008H6.75V12Zm0 3h.008v.008H6.75V15Zm0 3h.008v.008H6.75V18Z"})})},{}),shortcut:"V"}]},{label:"Repos",items:[{label:"Repos",href:"/repos",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"})})},{}),shortcut:"P"}]},{label:"Settings",items:[{label:"Settings",href:"/settings",icon:(0,d.jsx)(function(){return(0,d.jsxs)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:[(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}),(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})]})},{}),shortcut:"S"},{label:"Notifications",href:"/notifications",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0"})})},{}),shortcut:"N"},{label:"Billing",href:"/billing",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Z"})})},{}),shortcut:"B",cloudOnly:!0}]}],v=["bg-primary-500","bg-blue-500","bg-emerald-500","bg-orange-500","bg-pink-500","bg-cyan-500"];function w(a){let b=0;for(let c=0;c<a.length;c++)b=a.charCodeAt(c)+((b<<5)-b);return v[Math.abs(b)%v.length]}function x(){let a=(0,o.usePathname)(),{org:b,orgs:c,switchOrg:f,user:i,logout:j}=(0,e.As)(),{repos:l,selected:m,select:v}=k(),[x,y]=(0,g.useState)(!1),[z,A]=(0,g.useState)(!1),[B,C]=(0,g.useState)(!1),[D,E]=(0,g.useState)(!1),[F,G]=(0,g.useState)(!1),H=(0,h.J)(),I=(0,d.jsxs)("div",{className:"flex h-full flex-col",children:[(0,d.jsxs)("div",{className:"relative border-b border-white/[0.06] px-3 py-3",children:[H&&!x&&(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)("button",{onClick:()=>E(!D),className:"flex w-full items-center gap-2.5 rounded-lg px-2 py-1.5 transition-colors hover:bg-white/[0.04]",children:[(0,d.jsx)("div",{className:"flex h-6 w-6 shrink-0 items-center justify-center rounded bg-primary-500",children:(0,d.jsx)("span",{className:"text-[10px] font-bold text-white",children:m?m.name.charAt(0).toUpperCase():"U"})}),(0,d.jsx)("span",{className:"flex-1 truncate text-left text-sm font-medium text-gray-200",children:m?.name??"No repo"}),(0,d.jsx)("span",{className:"rounded-full bg-primary-500/20 px-1.5 py-0.5 text-[9px] font-medium text-primary-400",children:"Local"}),l.length>1&&(0,d.jsx)(q,{})]})}),H&&D&&!x&&l.length>1&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"fixed inset-0 z-10",onClick:()=>E(!1)}),(0,d.jsx)("div",{className:"absolute left-3 right-3 top-full z-20 mt-1 rounded-lg border border-white/[0.08] bg-surface-850 py-1 shadow-xl",children:l.map(a=>(0,d.jsxs)("button",{onClick:()=>{v(a.id),E(!1)},className:`flex w-full items-center gap-2.5 px-3 py-2 text-left text-sm transition-colors hover:bg-white/[0.04] ${a.id===m?.id?"text-white":"text-gray-400"}`,children:[(0,d.jsx)("div",{className:`flex h-5 w-5 shrink-0 items-center justify-center rounded ${w(a.name)}`,children:(0,d.jsx)("span",{className:"text-[9px] font-bold text-white",children:a.name.charAt(0).toUpperCase()})}),(0,d.jsx)("span",{className:"flex-1 truncate",children:a.name}),(0,d.jsx)("span",{className:"truncate text-[10px] text-gray-600",children:a.path.split("/").pop()}),a.id===m?.id&&(0,d.jsx)("svg",{className:"ml-auto h-3.5 w-3.5 shrink-0 text-primary-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"})})]},a.id))})]}),b&&!H&&(0,d.jsxs)("button",{onClick:()=>!x&&C(!B),className:`flex w-full items-center gap-2.5 rounded-lg px-2 py-1.5 transition-colors hover:bg-white/[0.04] ${x?"justify-center":""}`,children:[(0,d.jsx)("div",{className:`flex h-6 w-6 shrink-0 items-center justify-center rounded ${w(b.name)}`,children:(0,d.jsx)("span",{className:"text-[10px] font-bold text-white",children:b.name.charAt(0).toUpperCase()})}),!x&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"flex-1 truncate text-left text-sm font-medium text-gray-200",children:b.name}),(0,d.jsx)(q,{})]})]}),B&&!x&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"fixed inset-0 z-10",onClick:()=>C(!1)}),(0,d.jsxs)("div",{className:"absolute left-3 right-3 top-full z-20 mt-1 rounded-lg border border-white/[0.08] bg-surface-850 py-1 shadow-xl",children:[c.map(a=>(0,d.jsxs)("button",{onClick:()=>{f(a.id),C(!1)},className:`flex w-full items-center gap-2.5 px-3 py-2 text-left text-sm transition-colors hover:bg-white/[0.04] ${a.id===b?.id?"text-white":"text-gray-400"}`,children:[(0,d.jsx)("div",{className:`flex h-5 w-5 shrink-0 items-center justify-center rounded ${w(a.name)}`,children:(0,d.jsx)("span",{className:"text-[9px] font-bold text-white",children:a.name.charAt(0).toUpperCase()})}),(0,d.jsx)("span",{className:"truncate",children:a.name}),a.id===b?.id&&(0,d.jsx)("svg",{className:"ml-auto h-3.5 w-3.5 text-primary-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"})})]},a.id)),(0,d.jsx)("div",{className:"border-t border-white/[0.06] mt-1 pt-1",children:(0,d.jsxs)("a",{href:"/settings/orgs/new",onClick:()=>C(!1),className:"flex w-full items-center gap-2.5 px-3 py-2 text-left text-sm text-gray-500 transition-colors hover:bg-white/[0.04] hover:text-gray-300",children:[(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})}),(0,d.jsx)("span",{children:"Create organization"})]})})]})]})]}),(0,d.jsx)("nav",{className:"flex-1 overflow-y-auto px-3 pt-3 pb-2",children:u.map(b=>{let c=b.items.filter(a=>!0);return 0===c.length?null:(0,d.jsxs)("div",{className:"mt-4 first:mt-0",children:[!x&&(0,d.jsx)("p",{className:"mb-1.5 px-2 text-[10px] font-medium uppercase tracking-widest text-gray-600",children:b.label}),(0,d.jsx)("div",{className:"space-y-0.5",children:c.map(b=>{var c,e;let f=H&&b.cloudOnly,g=(c=b.href,!!a&&("/dashboard"===c?"/dashboard"===a:a.startsWith(c)));return f?(0,d.jsxs)("div",{className:`group flex items-center rounded-md text-sm opacity-50 pointer-events-none text-gray-500 ${x?"justify-center px-1 py-2":"gap-2.5 px-2 py-1.5"}`,children:[(0,d.jsx)("span",{className:`text-gray-600 ${x?"[&>svg]:h-8 [&>svg]:w-8":""}`,children:b.icon}),!x&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"flex-1",children:b.label}),(0,d.jsx)(t,{})]})]},b.href):(0,d.jsxs)(n(),{href:(e=b.href,H&&m?.id?`${e}?repo=${m.id}`:e),onClick:()=>A(!1),className:`group flex items-center rounded-md text-sm transition-colors ${x?"justify-center px-1 py-2":"gap-2.5 px-2 py-1.5"} ${g?x?"bg-white/[0.04] text-white":"border-l-2 border-primary-500 bg-white/[0.04] pl-[6px] text-white":"text-gray-400 hover:bg-white/[0.03] hover:text-gray-200"}`,children:[(0,d.jsx)("span",{className:`${g?"text-primary-400":"text-gray-500 group-hover:text-gray-400"} ${x?"[&>svg]:h-8 [&>svg]:w-8":""}`,children:b.icon}),!x&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"flex-1",children:b.label}),b.shortcut&&(0,d.jsxs)("span",{className:"flex items-center gap-0.5",children:[(0,d.jsx)("kbd",{className:"inline-flex h-4 min-w-[16px] items-center justify-center rounded border border-white/[0.06] bg-surface-800 px-1 text-[9px] font-medium text-gray-600 group-hover:text-gray-500",children:"⌘"}),(0,d.jsx)("kbd",{className:"inline-flex h-4 min-w-[16px] items-center justify-center rounded border border-white/[0.06] bg-surface-800 px-1 text-[9px] font-medium text-gray-600 group-hover:text-gray-500",children:b.shortcut})]})]})]},b.href)})})]},b.label)})}),i&&!x&&(0,d.jsx)("div",{className:"border-t border-white/[0.06] px-3 py-3",onMouseEnter:()=>G(!0),onMouseLeave:()=>G(!1),children:(0,d.jsxs)("div",{className:"flex items-center gap-2.5 rounded-md px-2 py-1.5",children:[i.avatar_url?(0,d.jsx)("img",{src:i.avatar_url,alt:i.name,className:"h-6 w-6 rounded-full"}):(0,d.jsx)("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-surface-700 text-[10px] font-medium text-gray-300",children:i.name.charAt(0).toUpperCase()}),(0,d.jsx)("span",{className:"flex-1 truncate text-sm text-gray-300",children:i.name}),F&&(0,d.jsx)("button",{onClick:()=>void j(),className:"rounded p-1 text-gray-500 transition-colors hover:bg-white/[0.06] hover:text-gray-300",title:"Sign out",children:(0,d.jsx)(p,{})})]})}),(0,d.jsx)("div",{className:"hidden border-t border-white/[0.06] px-3 py-2 lg:block",children:(0,d.jsx)("button",{onClick:()=>y(!x),className:"flex w-full items-center justify-center rounded-md py-1 text-gray-600 transition-colors hover:bg-white/[0.03] hover:text-gray-400",children:(0,d.jsx)("svg",{className:`h-3.5 w-3.5 transition-transform ${x?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5 8.25 12l7.5-7.5"})})})})]});return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{onClick:()=>A(!0),className:"fixed left-4 top-4 z-40 rounded-lg bg-surface-800 p-2 text-gray-400 shadow-lg lg:hidden",children:(0,d.jsx)(r,{})}),z&&(0,d.jsx)("div",{className:"fixed inset-0 z-40 bg-black/60 backdrop-blur-sm lg:hidden",onClick:()=>A(!1)}),(0,d.jsxs)("aside",{className:`fixed inset-y-0 left-0 z-50 w-60 border-r border-white/[0.06] bg-surface-900 transition-transform lg:hidden ${z?"translate-x-0":"-translate-x-full"}`,children:[(0,d.jsx)("button",{onClick:()=>A(!1),className:"absolute right-3 top-3 rounded p-1 text-gray-500 hover:text-white",children:(0,d.jsx)(s,{})}),I]}),(0,d.jsx)("aside",{className:`hidden shrink-0 border-r border-white/[0.06] bg-surface-900 lg:block ${x?"w-12":"w-60"} transition-all duration-200`,children:I})]})}function y(){return(0,d.jsx)("svg",{className:"h-4 w-4 text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"})})}function z({onClose:a}){let b=(0,o.useRouter)(),c=(0,o.usePathname)(),[e,f]=(0,g.useState)(""),[i,j]=(0,g.useState)(0),l=(0,g.useRef)(null),m=(0,h.J)(),{selected:n}=k(),p=[{id:"dashboard",label:"Dashboard",category:"Pages",href:"/dashboard",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25a2.25 2.25 0 0 1-2.25-2.25v-2.25Z"})}),shortcut:"D"},{id:"prd",label:"PRD",category:"Pages",href:"/prd",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})}),shortcut:"Q"},{id:"loop",label:"Loop",category:"Pages",href:"/loop",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182M21.015 4.356v4.992"})}),shortcut:"L"},{id:"parallel",label:"Parallel",category:"Pages",href:"/parallel",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7.5L7.5 3m0 0L12 7.5M7.5 3v13.5m13.5-6L16.5 15m0 0L12 10.5m4.5 4.5V1.5"})}),shortcut:"A"},{id:"jobs",label:"Jobs",category:"Pages",href:"/jobs",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z"})}),shortcut:"J"},{id:"sprints",label:"Sprints",category:"Pages",href:"/sprints",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 0 1 0 3.75H5.625a1.875 1.875 0 0 1 0-3.75Z"})})},{id:"rules",label:"Rules",category:"Pages",href:"/rules",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z"})}),shortcut:"R"},{id:"templates",label:"Templates",category:"Pages",href:"/templates",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})}),shortcut:"T"},{id:"skills",label:"Skills",category:"Pages",href:"/skills",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 13.5l10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75Z"})}),shortcut:"K"},{id:"codemap",label:"CodeMap",category:"Pages",href:"/codemap",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 6.75V15m6-6v8.25m.503 3.498 4.875-2.437c.381-.19.622-.58.622-1.006V4.82c0-.836-.88-1.38-1.628-.1l-3.869 1.934c-.317.159-.69.159-1.006 0L9.503 3.252a1.125 1.125 0 0 0-1.006 0L3.622 5.689C3.24 5.88 3 6.27 3 6.695V19.18c0 .836.88 1.38 1.628.1l3.869-1.934c.317-.159.69-.159 1.006 0l4.994 2.497c.317.158.69.158 1.006 0Z"})}),shortcut:"C"},{id:"memory",label:"Memory",category:"Pages",href:"/memory",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 3v1.5M4.5 8.25H3m18 0h-1.5M4.5 12H3m18 0h-1.5m-15 3.75H3m18 0h-1.5M8.25 19.5V21M12 3v1.5m0 15V21m3.75-18v1.5m0 15V21m-9-1.5h10.5a2.25 2.25 0 0 0 2.25-2.25V6.75a2.25 2.25 0 0 0-2.25-2.25H6.75A2.25 2.25 0 0 0 4.5 6.75v10.5a2.25 2.25 0 0 0 2.25 2.25Z"})}),shortcut:"M"},{id:"mcps",label:"MCP Tools",category:"Pages",href:"/mcps",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.25 6.087c0-.355.186-.676.401-.959.221-.29.349-.634.349-1.003 0-1.036-1.007-1.875-2.25-1.875s-2.25.84-2.25 1.875c0 .369.128.713.349 1.003.215.283.401.604.401.959v0a.64.64 0 0 1-.657.643 48.39 48.39 0 0 1-4.163-.3c.186 1.613.293 3.25.315 4.907a.656.656 0 0 1-.658.663v0c-.355 0-.676-.186-.959-.401a1.647 1.647 0 0 0-1.003-.349c-1.036 0-1.875 1.007-1.875 2.25s.84 2.25 1.875 2.25c.369 0 .713-.128 1.003-.349.283-.215.604-.401.959-.401v0c.31 0 .555.26.532.57a48.039 48.039 0 0 1-.642 5.056c1.518.19 3.058.309 4.616.354a.64.64 0 0 0 .657-.643v0c0-.355-.186-.676-.401-.959a1.647 1.647 0 0 1-.349-1.003c0-1.035 1.008-1.875 2.25-1.875 1.243 0 2.25.84 2.25 1.875 0 .369-.128.713-.349 1.003-.215.283-.4.604-.4.959v0c0 .333.277.599.61.58a48.1 48.1 0 0 0 5.427-.63 48.05 48.05 0 0 0 .582-4.717.532.532 0 0 0-.533-.57v0c-.355 0-.676.186-.959.401-.29.221-.634.349-1.003.349-1.035 0-1.875-1.007-1.875-2.25s.84-2.25 1.875-2.25c.37 0 .713.128 1.003.349.283.215.604.401.959.401v0a.656.656 0 0 0 .658-.663 48.422 48.422 0 0 0-.37-5.36c-1.886.342-3.81.574-5.766.689a.578.578 0 0 1-.61-.58v0Z"})}),shortcut:"I"},{id:"secrets",label:"Secrets",category:"Pages",href:"/mcps/secrets",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z"})})},{id:"sessions",label:"Sessions",category:"Pages",href:"/sessions",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 7.5l3 2.25-3 2.25m4.5 0h3m-9 8.25h13.5A2.25 2.25 0 0 0 21 18V6a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 6v12a2.25 2.25 0 0 0 2.25 2.25Z"})}),shortcut:"E"},{id:"history",label:"History",category:"Pages",href:"/history",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})}),shortcut:"H"},{id:"review",label:"Review Queue",category:"Pages",href:"/review",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15a2.25 2.25 0 0 1 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25ZM6.75 12h.008v.008H6.75V12Zm0 3h.008v.008H6.75V15Zm0 3h.008v.008H6.75V18Z"})}),shortcut:"V"},{id:"repos",label:"Repos",category:"Pages",href:"/repos",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"})}),shortcut:"P"},{id:"settings",label:"Settings",category:"Pages",href:"/settings",icon:(0,d.jsxs)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:[(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}),(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})]}),shortcut:"S"},{id:"notifications",label:"Notifications",category:"Pages",href:"/notifications",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0"})}),shortcut:"N"},{id:"billing",label:"Billing",category:"Pages",href:"/billing",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Z"})}),shortcut:"B"},{id:"docs",label:"View Documentation",category:"Actions",href:"/docs",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6.042A8.967 8.967 0 0 0 6 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 0 1 6 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 0 1 6-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0 0 18 18a8.967 8.967 0 0 0-6 2.292m0-14.25v14.25"})})},{id:"github",label:"Visit GitHub",category:"Actions",action:()=>window.open("https://github.com/ulpi-dev/ulpi","_blank"),icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})})}],q=new Set(["billing","jobs","sprints"]),r=m?p.filter(a=>!q.has(a.id)):p,s=e.trim()?r.filter(a=>a.label.toLowerCase().includes(e.toLowerCase())):r,t=[],u=new Set;for(let a of s)u.has(a.category)||(u.add(a.category),t.push({category:a.category,items:s.filter(b=>b.category===a.category)}));let v=(0,g.useCallback)(c=>{if(a(),c.action)c.action();else{var d;c.href&&b.push((d=c.href,m&&n?.id?`${d}?repo=${n.id}`:d))}},[a,b]),w=-1;return(0,d.jsxs)("div",{className:"fixed inset-0 z-50 flex items-start justify-center pt-[20vh]",children:[(0,d.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:a}),(0,d.jsxs)("div",{className:"relative z-10 w-full max-w-lg animate-in rounded-xl border border-white/[0.08] bg-surface-900/95 shadow-2xl backdrop-blur-xl",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 border-b border-white/[0.06] px-4 py-3",children:[(0,d.jsx)(y,{}),(0,d.jsx)("input",{ref:l,type:"text",placeholder:"Search pages and actions...",value:e,onChange:a=>f(a.target.value),className:"flex-1 bg-transparent text-sm text-gray-200 placeholder-gray-500 outline-none"}),(0,d.jsx)("kbd",{className:"rounded border border-white/[0.08] bg-surface-800 px-1.5 py-0.5 text-[10px] text-gray-500",children:"ESC"})]}),(0,d.jsxs)("div",{className:"max-h-72 overflow-y-auto py-2",children:[0===s.length&&(0,d.jsx)("div",{className:"px-4 py-8 text-center text-sm text-gray-500",children:"No results found."}),t.map(a=>(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"px-4 pb-1 pt-2 text-[10px] font-medium uppercase tracking-widest text-gray-600",children:a.category}),a.items.map(a=>{let b=++w,e=c===a.href;return(0,d.jsxs)("button",{onClick:()=>v(a),onMouseEnter:()=>j(b),className:`flex w-full items-center gap-3 px-4 py-2 text-left text-sm transition-colors ${b===i?"bg-white/[0.06] text-white":"text-gray-400 hover:bg-white/[0.03]"}`,children:[(0,d.jsx)("span",{className:b===i?"text-primary-400":"text-gray-500",children:a.icon}),(0,d.jsx)("span",{className:"flex-1",children:a.label}),e&&(0,d.jsx)("span",{className:"text-[10px] text-gray-600",children:"Current"}),a.shortcut&&(0,d.jsxs)("span",{className:"flex items-center gap-0.5",children:[(0,d.jsx)("kbd",{className:"inline-flex h-4 min-w-[16px] items-center justify-center rounded border border-white/[0.06] bg-surface-800 px-1 text-[9px] font-medium text-gray-600",children:"⌘"}),(0,d.jsx)("kbd",{className:"inline-flex h-4 min-w-[16px] items-center justify-center rounded border border-white/[0.06] bg-surface-800 px-1 text-[9px] font-medium text-gray-600",children:a.shortcut})]})]},a.id)})]},a.category))]})]})]})}function A({onCreated:a}){let{session:b}=(0,e.As)(),[c,f]=(0,g.useState)(""),[h,i]=(0,g.useState)(""),[j,k]=(0,g.useState)(!1),[m,n]=(0,g.useState)(null);async function o(){if(c.trim()&&h.trim()){k(!0),n(null);try{await l.uE.createOrg({name:c.trim(),slug:h.trim()}),a()}catch(a){n(a&&"object"==typeof a&&"body"in a?String(a.body?.error??"Failed to create organization"):"Failed to create organization"),k(!1)}}}return(0,d.jsx)("div",{className:"flex h-screen items-center justify-center bg-surface-950 px-6",children:(0,d.jsx)("div",{className:"w-full max-w-md",children:(0,d.jsxs)("div",{className:"rounded-2xl border border-white/[0.06] bg-surface-900 p-8",children:[(0,d.jsx)("div",{className:"flex justify-center",children:(0,d.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-xl bg-primary-500",children:(0,d.jsx)("span",{className:"text-base font-bold text-white",children:"U"})})}),(0,d.jsx)("h1",{className:"mt-5 text-center text-xl font-bold text-white",children:"Create your organization"}),(0,d.jsxs)("p",{className:"mt-2 text-center text-sm text-gray-400",children:["Welcome",b?.name?`, ${b.name}`:"","! Create an organization to get started with ULPI Cloud CI."]}),(0,d.jsxs)("div",{className:"mt-6 space-y-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block text-xs font-medium text-gray-400",children:"Organization name"}),(0,d.jsx)("input",{type:"text",value:c,onChange:a=>{var b;f(b=a.target.value),i(b.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,""))},placeholder:"My Team",className:"mt-1 w-full rounded-lg border border-white/[0.08] bg-surface-800 px-3 py-2 text-sm text-white placeholder-gray-600 outline-none focus:border-primary-500/50"})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block text-xs font-medium text-gray-400",children:"Slug"}),(0,d.jsx)("input",{type:"text",value:h,onChange:a=>i(a.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"")),placeholder:"my-team",className:"mt-1 w-full rounded-lg border border-white/[0.08] bg-surface-800 px-3 py-2 font-mono text-sm text-white placeholder-gray-600 outline-none focus:border-primary-500/50"}),(0,d.jsx)("p",{className:"mt-1 text-[11px] text-gray-600",children:"Lowercase letters, numbers, and hyphens only."})]}),m&&(0,d.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/[0.06] px-3 py-2 text-xs text-red-400",children:m}),(0,d.jsx)("button",{onClick:()=>void o(),disabled:j||!c.trim()||!h.trim(),className:"w-full rounded-lg bg-primary-500 px-4 py-2.5 text-sm font-semibold text-white transition-colors hover:bg-primary-600 disabled:cursor-not-allowed disabled:opacity-50",children:j?"Creating...":"Create Organization"})]})]})})})}function B({children:a}){let{session:b,loading:c,org:f,refresh:i}=(0,e.As)();(0,o.useRouter)();let[j,k]=(0,g.useState)(!1);return(0,h.J)()?(0,d.jsxs)("div",{className:"flex h-screen bg-surface-950",children:[(0,d.jsx)(x,{}),(0,d.jsx)("main",{className:"flex-1 overflow-y-auto",children:(0,d.jsx)("div",{className:"px-4 py-4 lg:px-6",children:a})}),j&&(0,d.jsx)(z,{onClose:()=>k(!1)})]}):c?(0,d.jsx)("div",{className:"flex h-screen items-center justify-center bg-surface-950",children:(0,d.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,d.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-primary-500 border-t-transparent"}),(0,d.jsx)("p",{className:"text-sm text-gray-400",children:"Loading..."})]})}):b?f?(0,d.jsxs)("div",{className:"flex h-screen bg-surface-950",children:[(0,d.jsx)(x,{}),(0,d.jsx)("main",{className:"flex-1 overflow-y-auto",children:(0,d.jsx)("div",{className:"px-4 py-4 lg:px-6",children:a})}),j&&(0,d.jsx)(z,{onClose:()=>k(!1)})]}):(0,d.jsx)(A,{onCreated:()=>void i()}):null}function C({children:a}){return(0,d.jsx)(e.OJ,{children:(0,d.jsx)(f.Kv,{children:(0,d.jsx)(j,{children:(0,d.jsx)(B,{children:a})})})})}}};
|
|
1
|
+
exports.id=1522,exports.ids=[1522],exports.modules={4074:(a,b,c)=>{Promise.resolve().then(c.bind(c,90856))},10538:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(94026).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/ciprian/work_cip/ulpi/hooks/apps/portal/src/app/error.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.")},"/Users/ciprian/work_cip/ulpi/hooks/apps/portal/src/app/error.tsx","default")},11824:(a,b,c)=>{Promise.resolve().then(c.bind(c,38100))},21350:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,20576,23)),Promise.resolve().then(c.t.bind(c,60611,23)),Promise.resolve().then(c.t.bind(c,55519,23)),Promise.resolve().then(c.t.bind(c,54450,23)),Promise.resolve().then(c.t.bind(c,56358,23)),Promise.resolve().then(c.t.bind(c,67034,23)),Promise.resolve().then(c.t.bind(c,25506,23)),Promise.resolve().then(c.t.bind(c,2455,23)),Promise.resolve().then(c.bind(c,84978))},37009:()=>{},37681:()=>{},38100:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>e});var d=c(82164);function e({error:a,reset:b}){return(0,d.jsxs)("div",{style:{padding:"2rem",fontFamily:"system-ui, sans-serif"},children:[(0,d.jsx)("h2",{children:"Something went wrong"}),(0,d.jsx)("p",{style:{color:"#666"},children:a.message||"An unexpected error occurred."}),(0,d.jsx)("button",{onClick:b,style:{marginTop:"1rem",padding:"0.5rem 1rem",background:"#7C3AED",color:"white",border:"none",borderRadius:"0.375rem",cursor:"pointer"},children:"Try again"})]})}},39990:(a,b,c)=>{"use strict";function d(){return!0}function e(){return"http://localhost:9800"}c.d(b,{J:()=>d,h:()=>e})},44267:()=>{},45460:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(94026).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/ciprian/work_cip/ulpi/hooks/apps/portal/src/app/(dashboard)/layout.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.")},"/Users/ciprian/work_cip/ulpi/hooks/apps/portal/src/app/(dashboard)/layout.tsx","default")},52894:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,2714,23)),Promise.resolve().then(c.t.bind(c,65701,23)),Promise.resolve().then(c.t.bind(c,68709,23)),Promise.resolve().then(c.t.bind(c,60492,23)),Promise.resolve().then(c.t.bind(c,13012,23)),Promise.resolve().then(c.t.bind(c,65800,23)),Promise.resolve().then(c.t.bind(c,11968,23)),Promise.resolve().then(c.t.bind(c,55273,23)),Promise.resolve().then(c.t.bind(c,61824,23))},53680:(a,b,c)=>{Promise.resolve().then(c.bind(c,10538))},60520:(a,b,c)=>{"use strict";c.d(b,{uE:()=>f});class d extends Error{constructor(a,b,c){super(`API Error ${a}: ${b}`),this.status=a,this.statusText=b,this.body=c,this.name="ApiError"}}class e{constructor(a,b){this.baseUrl=a.replace(/\/$/,""),this.token=b}setToken(a){this.token=a}async request(a,b,c){let e={"Content-Type":"application/json"};this.token&&!this.isLocalMode()&&(e.Authorization=`Bearer ${this.token}`);let f=await fetch(`${this.baseUrl}${b}`,{method:a,headers:e,body:c?JSON.stringify(c):void 0,credentials:"include"});if(!f.ok){let a;try{a=await f.json()}catch{}throw new d(f.status,f.statusText,a)}if(204!==f.status)return f.json()}async getMe(){return(await this.request("GET","/auth/me")).user}async getGitHubAuthUrl(){return this.request("GET","/auth/github")}async exchangeOAuthCode(a){return this.request("POST","/auth/github/callback",{code:a})}async logout(){return this.request("POST","/auth/logout")}async listOrgs(){return(await this.request("GET","/api/orgs")).orgs}async getOrg(a){let b=await this.request("GET",`/api/orgs/${a}`);return{...b.org,role:b.role}}async createOrg(a){return(await this.request("POST","/api/orgs",a)).org}async updateOrg(a,b){await this.request("PATCH",`/api/orgs/${a}`,b)}async deleteOrg(a){await this.request("DELETE",`/api/orgs/${a}`)}async listMembers(a){return(await this.request("GET",`/api/orgs/${a}/members`)).members}async inviteMember(a,b){await this.request("POST",`/api/orgs/${a}/members`,b)}async updateMemberRole(a,b,c){await this.request("PATCH",`/api/orgs/${a}/members/${b}`,{role:c})}async removeMember(a,b){await this.request("DELETE",`/api/orgs/${a}/members/${b}`)}async getSubscription(a){return this.request("GET",`/api/orgs/${a}/billing`)}async changePlan(a,b){return this.request("POST",`/api/orgs/${a}/billing/change-plan`,{tier:b})}async getUsage(a){return this.request("GET",`/api/orgs/${a}/billing/usage`)}async listInvoices(a){return(await this.request("GET",`/api/orgs/${a}/billing/invoices`)).invoices}async getCustomerPortalUrl(a){return this.request("POST",`/api/orgs/${a}/billing/portal`)}async listRepos(a){return(await this.request("GET",`/api/orgs/${a}/repos`)).repos}async getRepo(a,b){return this.request("GET",`/api/orgs/${a}/repos/${b}`)}async listAvailableRepos(a,b){return this.request("GET",`/api/orgs/${a}/repos/available?installation_id=${b}`)}async connectRepo(a,b){return this.request("POST",`/api/orgs/${a}/repos`,b)}async updateRepoConfig(a,b,c){await this.request("PATCH",`/api/orgs/${a}/repos/${b}`,{config:c})}async disconnectRepo(a,b){await this.request("DELETE",`/api/orgs/${a}/repos/${b}`)}async listJobs(a,b){let c=new URLSearchParams;b?.status&&c.set("status",b.status),b?.repo_id&&c.set("repo_id",b.repo_id),b?.page&&c.set("page",String(b.page));let d=c.toString();return this.request("GET",`/api/orgs/${a}/jobs${d?`?${d}`:""}`)}async getJob(a,b){return(await this.request("GET",`/api/orgs/${a}/jobs/${b}`)).job}async cancelJob(a,b){await this.request("POST",`/api/orgs/${a}/jobs/${b}/cancel`)}async retryJob(a,b){return this.request("POST",`/api/orgs/${a}/jobs/${b}/retry`)}async deleteJob(a,b){await this.request("DELETE",`/api/orgs/${a}/jobs/${b}`)}async createJob(a,b){return this.request("POST",`/api/orgs/${a}/jobs`,b)}getJobLogStreamUrl(a,b){return`${this.baseUrl}/api/orgs/${a}/jobs/${b}/logs`}async listApiKeys(a){return(await this.request("GET",`/api/orgs/${a}/keys`)).keys}async createApiKey(a,b){return this.request("POST",`/api/orgs/${a}/keys`,b)}async revokeApiKey(a,b){await this.request("DELETE",`/api/orgs/${a}/keys/${b}`)}async createSecret(a,b){return{id:(await this.request("POST",`/api/orgs/${a}/secrets`,b)).id}}async deleteSecret(a,b){await this.request("DELETE",`/api/orgs/${a}/secrets/${b}`)}async listInstallations(a){return(await this.request("GET",`/api/orgs/${a}/github/installations`)).installations}async linkInstallation(a,b){return this.request("POST",`/api/orgs/${a}/github/installations`,{installation_id:b})}async getInstallUrl(a){return this.request("GET",`/api/orgs/${a}/github/install-url`)}async createBatchJob(a,b){return this.request("POST",`/api/orgs/${a}/batch-jobs`,b)}async listBatchJobs(a,b){let c=new URLSearchParams;b?.status&&c.set("status",b.status),b?.page&&c.set("page",String(b.page));let d=c.toString();return this.request("GET",`/api/orgs/${a}/batch-jobs${d?`?${d}`:""}`)}async getBatchJob(a,b){return(await this.request("GET",`/api/orgs/${a}/batch-jobs/${b}`)).batch_job}async cancelBatchJob(a,b){await this.request("POST",`/api/orgs/${a}/batch-jobs/${b}/cancel`)}async listSessions(a,b){let c=new URLSearchParams;b?.status&&c.set("status",b.status),b?.page&&c.set("page",String(b.page));let d=c.toString();return this.request("GET",`/api/orgs/${a}/sessions${d?`?${d}`:""}`)}async getSession(a,b){return(await this.request("GET",`/api/orgs/${a}/sessions/${b}`)).session}getSessionLogStreamUrl(a,b){return`${this.baseUrl}/api/orgs/${a}/sessions/${b}/logs`}async getDashboardStats(a){return this.request("GET",`/api/orgs/${a}/dashboard`)}async getRecentJobs(a,b=10){return this.request("GET",`/api/orgs/${a}/jobs/recent?limit=${b}`)}async getMcpUsage(a,b=30){return this.request("GET",`/api/orgs/${a}/gateway/usage?days=${b}`)}async installMcp(a,b,c,d){return this.request("POST",`/api/orgs/${a}/mcps/install`,{catalog_name:b,repo_ids:c,config:d})}async listSecrets(a){return this.request("GET",`/api/orgs/${a}/secrets`)}async createOrgSecret(a,b,c,d,e){return this.request("POST",`/api/orgs/${a}/secrets`,{name:b,value:c,scope:d,repo_id:e})}async deleteOrgSecret(a,b){return this.request("DELETE",`/api/orgs/${a}/secrets/${b}`)}async getCatalogReadiness(a){return this.request("GET",`/api/orgs/${a}/mcps/catalog/readiness`)}async listCatalogSubmissions(a,b){let c=b?`?status=${b}`:"";return this.request("GET",`/api/orgs/${a}/mcps/submissions${c}`)}async createCatalogSubmission(a,b){return this.request("POST",`/api/orgs/${a}/mcps/submissions`,b)}async getCatalogSubmission(a,b){return this.request("GET",`/api/orgs/${a}/mcps/submissions/${b}`)}async updateCatalogSubmissionStatus(a,b,c,d){return this.request("PATCH",`/api/orgs/${a}/mcps/submissions/${b}/status`,{status:c,review_notes:d})}isLocalMode(){return this.baseUrl.includes("localhost")||this.baseUrl.includes("127.0.0.1")}isAuthenticated(){return!this.isLocalMode()&&!!this.token}}let f=new e("http://localhost:9800")},62878:(a,b,c)=>{"use strict";c.d(b,{As:()=>i,OJ:()=>h});var d=c(54509),e=c.n(d),f=c(60520);let g=(0,d.createContext)({user:null,org:null,orgs:[],session:null,loading:!0,switchOrg:async()=>{},logout:async()=>{},refresh:async()=>{}});function h({children:a}){let[b,c]=(0,d.useState)(null),[h,i]=(0,d.useState)(null),[j,k]=(0,d.useState)([]),[l,m]=(0,d.useState)(null),[n,o]=(0,d.useState)(!0),p=(0,d.useCallback)(async()=>{let a=function(){if("undefined"==typeof document)return null;let a=document.cookie.match(RegExp("(^| )ulpi_session=([^;]+)"));return a?decodeURIComponent(a[2]):null}(),b=a?function(a){try{let b=a.split(".");if(3!==b.length)return null;return JSON.parse(atob(b[1]))}catch{return null}}(a):null;if(b&&1e3*b.exp<Date.now()){m(null),c(null),i(null),k([]),o(!1);return}if(m(b),!b||!a){c(null),i(null),k([]),o(!1);return}f.uE.setToken(a);try{let[a,b]=await Promise.all([f.uE.getMe(),f.uE.listOrgs()]);c(a),k(b);let d=b[0]??null;i(d)}catch{c(null),i(null),k([])}finally{o(!1)}},[]),q=(0,d.useCallback)(async a=>{let b=j.find(b=>b.id===a);b&&i(b)},[j]),r=(0,d.useCallback)(async()=>{try{await f.uE.logout()}catch{}document.cookie="ulpi_session=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT",c(null),i(null),k([]),m(null)},[]);return e().createElement(g.Provider,{value:{user:b,org:h,orgs:j,session:l,loading:n,switchOrg:q,logout:r,refresh:p}},a)}function i(){return(0,d.useContext)(g)}},73754:(a,b,c)=>{"use strict";c.d(b,{Kv:()=>i,HI:()=>l,Xk:()=>j,yC:()=>k});var d=c(82164),e=c(54509),f=c(39990);class g{constructor(){this.repo=null,this.baseUrl=(0,f.h)()}async request(a,b){let c=`${this.baseUrl}${a}`;if(this.repo){let a=c.includes("?")?"&":"?";c=`${c}${a}repo=${encodeURIComponent(this.repo)}`}let d=process.env.NEXT_PUBLIC_ULPI_API_SECRET,e=await fetch(c,{...b,headers:{"Content-Type":"application/json",...d?{"X-Ulpi-Secret":d}:{},...b?.headers}});if(!e.ok)throw Error((await e.json().catch(()=>({error:e.statusText}))).error||`API error: ${e.status}`);return e.json()}async get(a){return this.request(a)}async post(a,b){return this.request(a,{method:"POST",body:b?JSON.stringify(b):void 0})}async put(a,b){return this.request(a,{method:"PUT",body:b?JSON.stringify(b):void 0})}async delete(a){return this.request(a,{method:"DELETE"})}}let h=(0,e.createContext)({mode:"cloud",localClient:null});function i({children:a}){let b=(0,e.useMemo)(()=>{let a=(0,f.J)()?"local":"cloud";return{mode:a,localClient:"local"===a?new g:null}},[]);return(0,d.jsx)(h,{value:b,children:a})}function j(){return(0,e.useContext)(h).mode}function k(){let{localClient:a}=(0,e.useContext)(h);if(!a)throw Error("LocalApiClient not available in cloud mode");return a}function l(){return(0,e.useContext)(h)}},82648:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>j,metadata:()=>i});var d=c(38098),e=c(9490),f=c.n(e),g=c(85836),h=c.n(g);c(44267);let i={title:{default:"ULPI — The Intelligence Layer for AI Coding Agents",template:"%s | ULPI"},description:"Free intelligence and governance layer for AI coding agents. Semantic code search, agent memory, dependency graphs, guard rules, session history — zero infrastructure, everything stored in git.",keywords:["AI coding agent","Claude Code","guard rules","code review","plan review","CodeMap","semantic code search","agent memory","dependency graph","DepGraph","shadow branches","zero infrastructure","MCP tools","developer tools","ULPI"],openGraph:{title:"ULPI — The Intelligence Layer for AI Coding Agents",description:"Free intelligence and governance layer for AI coding agents. Zero infrastructure — everything stored in git shadow branches.",url:"https://app.ulpi.io",siteName:"ULPI",type:"website"}};function j({children:a}){return(0,d.jsx)("html",{lang:"en",className:"dark",children:(0,d.jsx)("body",{className:`${f().variable} ${h().variable} font-sans bg-surface-950 text-gray-100 antialiased`,children:a})})}},85922:(a,b,c)=>{Promise.resolve().then(c.bind(c,45460))},90856:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>C});var d=c(82164),e=c(62878),f=c(73754),g=c(54509),h=c(39990);let i=(0,g.createContext)({repos:[],selected:null,loading:!0,select:()=>{},refresh:async()=>{}});function j({children:a}){let{localClient:b}=(0,f.HI)(),[c,e]=(0,g.useState)([]),[j,k]=(0,g.useState)(()=>null),[l,m]=(0,g.useState)(!0),n=(0,g.useCallback)(async()=>{if(!b||!(0,h.J)())return void m(!1);try{let a=b.repo;b.repo=null;let c=await b.get("/api/repos");b.repo=a;let d=c.repos??[];if(e(d),j)if(d.find(a=>a.id===j))b.repo=j;else{let a=d.find(a=>a.isDefault)??d[0];a&&(k(a.id),b.repo=a.id,a.id)}else{let a=d.find(a=>a.isDefault)??d[0];a&&(k(a.id),b.repo=a.id,a.id)}}catch{}finally{m(!1)}},[b,j]),o=(0,g.useCallback)(a=>{k(a),b&&(b.repo=a)},[b]),p=c.find(a=>a.id===j)??null;return(0,d.jsx)(i,{value:{repos:c,selected:p,loading:l,select:o,refresh:n},children:a})}function k(){return(0,g.useContext)(i)}var l=c(60520),m=c(5543),n=c.n(m),o=c(26170);function p(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15m3 0 3-3m0 0-3-3m3 3H9"})})}function q(){return(0,d.jsx)("svg",{className:"h-3 w-3 text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})})}function r(){return(0,d.jsx)("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})})}function s(){return(0,d.jsx)("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"})})}function t(){return(0,d.jsx)("span",{className:"ml-auto rounded-full bg-primary-500/15 px-1.5 py-0.5 text-[9px] font-medium text-primary-400",children:"Cloud"})}let u=[{label:"Overview",items:[{label:"Dashboard",href:"/dashboard",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25a2.25 2.25 0 0 1-2.25-2.25v-2.25Z"})})},{}),shortcut:"D"}]},{label:"Execution",items:[{label:"PRD",href:"/prd",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})})},{}),shortcut:"Q"},{label:"Loop",href:"/loop",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182"})})},{}),shortcut:"L"},{label:"Parallel",href:"/parallel",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7.5L7.5 3m0 0L12 7.5M7.5 3v13.5m13.5-6L16.5 15m0 0L12 10.5m4.5 4.5V1.5"})})},{}),shortcut:"A"},{label:"Jobs",href:"/jobs",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z"})})},{}),shortcut:"J",cloudOnly:!0},{label:"Sprints",href:"/sprints",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 0 1 0 3.75H5.625a1.875 1.875 0 0 1 0-3.75Z"})})},{}),shortcut:"X",cloudOnly:!0}]},{label:"Governance",items:[{label:"Rules",href:"/rules",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z"})})},{}),shortcut:"R"},{label:"Templates",href:"/templates",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})})},{}),shortcut:"T"},{label:"Skills",href:"/skills",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.455 2.456L21.75 6l-1.036.259a3.375 3.375 0 0 0-2.455 2.456Z"})})},{}),shortcut:"K"}]},{label:"Intelligence",items:[{label:"CodeMap",href:"/codemap",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"})})},{}),shortcut:"C"},{label:"Memory",href:"/memory",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 3v1.5M4.5 8.25H3m18 0h-1.5M4.5 12H3m18 0h-1.5m-15 3.75H3m18 0h-1.5M8.25 19.5V21M12 3v1.5m0 15V21m3.75-18v1.5m0 15V21m-9-1.5h10.5a2.25 2.25 0 0 0 2.25-2.25V6.75a2.25 2.25 0 0 0-2.25-2.25H6.75A2.25 2.25 0 0 0 4.5 6.75v10.5a2.25 2.25 0 0 0 2.25 2.25Z"})})},{}),shortcut:"M"},{label:"MCP Tools",href:"/mcps",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.25 6.087c0-.355.186-.676.401-.959.221-.29.349-.634.349-1.003 0-1.036-1.007-1.875-2.25-1.875s-2.25.84-2.25 1.875c0 .369.128.713.349 1.003.215.283.401.604.401.959v0a.64.64 0 0 1-.657.643 48.39 48.39 0 0 1-4.163-.3c.186 1.613.293 3.25.315 4.907a.656.656 0 0 1-.658.663v0c-.355 0-.676-.186-.959-.401a1.647 1.647 0 0 0-1.003-.349c-1.036 0-1.875 1.007-1.875 2.25s.84 2.25 1.875 2.25c.369 0 .713-.128 1.003-.349.283-.215.604-.401.959-.401v0c.31 0 .555.26.532.57a48.039 48.039 0 0 1-.642 5.056c1.518.19 3.058.309 4.616.354a.64.64 0 0 0 .657-.643v0c0-.355-.186-.676-.401-.959a1.647 1.647 0 0 1-.349-1.003c0-1.035 1.008-1.875 2.25-1.875 1.243 0 2.25.84 2.25 1.875 0 .369-.128.713-.349 1.003-.215.283-.4.604-.4.959v0c0 .333.277.599.61.58a48.1 48.1 0 0 0 5.427-.63 48.05 48.05 0 0 0 .582-4.717.532.532 0 0 0-.533-.57v0c-.355 0-.676.186-.959.401-.29.221-.634.349-1.003.349-1.035 0-1.875-1.007-1.875-2.25s.84-2.25 1.875-2.25c.37 0 .713.128 1.003.349.283.215.604.401.959.401v0a.656.656 0 0 0 .658-.663 48.422 48.422 0 0 0-.37-5.36c-1.886.342-3.81.574-5.766.689a.578.578 0 0 1-.61-.58v0Z"})})},{}),shortcut:"I"}]},{label:"Monitoring",items:[{label:"Sessions",href:"/sessions",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 7.5l3 2.25-3 2.25m4.5 0h3m-9 8.25h13.5A2.25 2.25 0 0 0 21 18V6a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 6v12a2.25 2.25 0 0 0 2.25 2.25Z"})})},{}),shortcut:"E"},{label:"History",href:"/history",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})})},{}),shortcut:"H"}]},{label:"Review",items:[{label:"Review Queue",href:"/review",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15a2.25 2.25 0 0 1 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25ZM6.75 12h.008v.008H6.75V12Zm0 3h.008v.008H6.75V15Zm0 3h.008v.008H6.75V18Z"})})},{}),shortcut:"V"}]},{label:"Repos",items:[{label:"Repos",href:"/repos",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"})})},{}),shortcut:"P"}]},{label:"Settings",items:[{label:"Settings",href:"/settings",icon:(0,d.jsx)(function(){return(0,d.jsxs)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:[(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}),(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})]})},{}),shortcut:"S"},{label:"Notifications",href:"/notifications",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0"})})},{}),shortcut:"N"},{label:"Billing",href:"/billing",icon:(0,d.jsx)(function(){return(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Z"})})},{}),shortcut:"B",cloudOnly:!0}]}],v=["bg-primary-500","bg-blue-500","bg-emerald-500","bg-orange-500","bg-pink-500","bg-cyan-500"];function w(a){let b=0;for(let c=0;c<a.length;c++)b=a.charCodeAt(c)+((b<<5)-b);return v[Math.abs(b)%v.length]}function x(){let a=(0,o.usePathname)(),{org:b,orgs:c,switchOrg:f,user:i,logout:j}=(0,e.As)(),{repos:l,selected:m,select:v}=k(),[x,y]=(0,g.useState)(!1),[z,A]=(0,g.useState)(!1),[B,C]=(0,g.useState)(!1),[D,E]=(0,g.useState)(!1),[F,G]=(0,g.useState)(!1),H=(0,h.J)(),I=(0,d.jsxs)("div",{className:"flex h-full flex-col",children:[(0,d.jsxs)("div",{className:"relative border-b border-white/[0.06] px-3 py-3",children:[H&&!x&&(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)("button",{onClick:()=>E(!D),className:"flex w-full items-center gap-2.5 rounded-lg px-2 py-1.5 transition-colors hover:bg-white/[0.04]",children:[(0,d.jsx)("div",{className:"flex h-6 w-6 shrink-0 items-center justify-center rounded bg-primary-500",children:(0,d.jsx)("span",{className:"text-[10px] font-bold text-white",children:m?m.name.charAt(0).toUpperCase():"U"})}),(0,d.jsx)("span",{className:"flex-1 truncate text-left text-sm font-medium text-gray-200",children:m?.name??"No repo"}),(0,d.jsx)("span",{className:"rounded-full bg-primary-500/20 px-1.5 py-0.5 text-[9px] font-medium text-primary-400",children:"Local"}),l.length>1&&(0,d.jsx)(q,{})]})}),H&&D&&!x&&l.length>1&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"fixed inset-0 z-10",onClick:()=>E(!1)}),(0,d.jsx)("div",{className:"absolute left-3 right-3 top-full z-20 mt-1 rounded-lg border border-white/[0.08] bg-surface-850 py-1 shadow-xl",children:l.map(a=>(0,d.jsxs)("button",{onClick:()=>{v(a.id),E(!1)},className:`flex w-full items-center gap-2.5 px-3 py-2 text-left text-sm transition-colors hover:bg-white/[0.04] ${a.id===m?.id?"text-white":"text-gray-400"}`,children:[(0,d.jsx)("div",{className:`flex h-5 w-5 shrink-0 items-center justify-center rounded ${w(a.name)}`,children:(0,d.jsx)("span",{className:"text-[9px] font-bold text-white",children:a.name.charAt(0).toUpperCase()})}),(0,d.jsx)("span",{className:"flex-1 truncate",children:a.name}),(0,d.jsx)("span",{className:"truncate text-[10px] text-gray-600",children:a.path.split("/").pop()}),a.id===m?.id&&(0,d.jsx)("svg",{className:"ml-auto h-3.5 w-3.5 shrink-0 text-primary-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"})})]},a.id))})]}),b&&!H&&(0,d.jsxs)("button",{onClick:()=>!x&&C(!B),className:`flex w-full items-center gap-2.5 rounded-lg px-2 py-1.5 transition-colors hover:bg-white/[0.04] ${x?"justify-center":""}`,children:[(0,d.jsx)("div",{className:`flex h-6 w-6 shrink-0 items-center justify-center rounded ${w(b.name)}`,children:(0,d.jsx)("span",{className:"text-[10px] font-bold text-white",children:b.name.charAt(0).toUpperCase()})}),!x&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"flex-1 truncate text-left text-sm font-medium text-gray-200",children:b.name}),(0,d.jsx)(q,{})]})]}),B&&!x&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"fixed inset-0 z-10",onClick:()=>C(!1)}),(0,d.jsxs)("div",{className:"absolute left-3 right-3 top-full z-20 mt-1 rounded-lg border border-white/[0.08] bg-surface-850 py-1 shadow-xl",children:[c.map(a=>(0,d.jsxs)("button",{onClick:()=>{f(a.id),C(!1)},className:`flex w-full items-center gap-2.5 px-3 py-2 text-left text-sm transition-colors hover:bg-white/[0.04] ${a.id===b?.id?"text-white":"text-gray-400"}`,children:[(0,d.jsx)("div",{className:`flex h-5 w-5 shrink-0 items-center justify-center rounded ${w(a.name)}`,children:(0,d.jsx)("span",{className:"text-[9px] font-bold text-white",children:a.name.charAt(0).toUpperCase()})}),(0,d.jsx)("span",{className:"truncate",children:a.name}),a.id===b?.id&&(0,d.jsx)("svg",{className:"ml-auto h-3.5 w-3.5 text-primary-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"})})]},a.id)),(0,d.jsx)("div",{className:"border-t border-white/[0.06] mt-1 pt-1",children:(0,d.jsxs)("a",{href:"/settings/orgs/new",onClick:()=>C(!1),className:"flex w-full items-center gap-2.5 px-3 py-2 text-left text-sm text-gray-500 transition-colors hover:bg-white/[0.04] hover:text-gray-300",children:[(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})}),(0,d.jsx)("span",{children:"Create organization"})]})})]})]})]}),(0,d.jsx)("nav",{className:"flex-1 overflow-y-auto px-3 pt-3 pb-2",children:u.map(b=>{let c=b.items.filter(a=>!0);return 0===c.length?null:(0,d.jsxs)("div",{className:"mt-4 first:mt-0",children:[!x&&(0,d.jsx)("p",{className:"mb-1.5 px-2 text-[10px] font-medium uppercase tracking-widest text-gray-600",children:b.label}),(0,d.jsx)("div",{className:"space-y-0.5",children:c.map(b=>{var c,e;let f=H&&b.cloudOnly,g=(c=b.href,!!a&&("/dashboard"===c?"/dashboard"===a:a.startsWith(c)));return f?(0,d.jsxs)("div",{className:`group flex items-center rounded-md text-sm opacity-50 pointer-events-none text-gray-500 ${x?"justify-center px-1 py-2":"gap-2.5 px-2 py-1.5"}`,children:[(0,d.jsx)("span",{className:`text-gray-600 ${x?"[&>svg]:h-8 [&>svg]:w-8":""}`,children:b.icon}),!x&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"flex-1",children:b.label}),(0,d.jsx)(t,{})]})]},b.href):(0,d.jsxs)(n(),{href:(e=b.href,H&&m?.id?`${e}?repo=${m.id}`:e),onClick:()=>A(!1),className:`group flex items-center rounded-md text-sm transition-colors ${x?"justify-center px-1 py-2":"gap-2.5 px-2 py-1.5"} ${g?x?"bg-white/[0.04] text-white":"border-l-2 border-primary-500 bg-white/[0.04] pl-[6px] text-white":"text-gray-400 hover:bg-white/[0.03] hover:text-gray-200"}`,children:[(0,d.jsx)("span",{className:`${g?"text-primary-400":"text-gray-500 group-hover:text-gray-400"} ${x?"[&>svg]:h-8 [&>svg]:w-8":""}`,children:b.icon}),!x&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"flex-1",children:b.label}),b.shortcut&&(0,d.jsxs)("span",{className:"flex items-center gap-0.5",children:[(0,d.jsx)("kbd",{className:"inline-flex h-4 min-w-[16px] items-center justify-center rounded border border-white/[0.06] bg-surface-800 px-1 text-[9px] font-medium text-gray-600 group-hover:text-gray-500",children:"⌘"}),(0,d.jsx)("kbd",{className:"inline-flex h-4 min-w-[16px] items-center justify-center rounded border border-white/[0.06] bg-surface-800 px-1 text-[9px] font-medium text-gray-600 group-hover:text-gray-500",children:b.shortcut})]})]})]},b.href)})})]},b.label)})}),i&&!x&&(0,d.jsx)("div",{className:"border-t border-white/[0.06] px-3 py-3",onMouseEnter:()=>G(!0),onMouseLeave:()=>G(!1),children:(0,d.jsxs)("div",{className:"flex items-center gap-2.5 rounded-md px-2 py-1.5",children:[i.avatar_url?(0,d.jsx)("img",{src:i.avatar_url,alt:i.name,className:"h-6 w-6 rounded-full"}):(0,d.jsx)("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-surface-700 text-[10px] font-medium text-gray-300",children:i.name.charAt(0).toUpperCase()}),(0,d.jsx)("span",{className:"flex-1 truncate text-sm text-gray-300",children:i.name}),F&&(0,d.jsx)("button",{onClick:()=>void j(),className:"rounded p-1 text-gray-500 transition-colors hover:bg-white/[0.06] hover:text-gray-300",title:"Sign out",children:(0,d.jsx)(p,{})})]})}),(0,d.jsx)("div",{className:"hidden border-t border-white/[0.06] px-3 py-2 lg:block",children:(0,d.jsx)("button",{onClick:()=>y(!x),className:"flex w-full items-center justify-center rounded-md py-1 text-gray-600 transition-colors hover:bg-white/[0.03] hover:text-gray-400",children:(0,d.jsx)("svg",{className:`h-3.5 w-3.5 transition-transform ${x?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5 8.25 12l7.5-7.5"})})})})]});return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{onClick:()=>A(!0),className:"fixed left-4 top-4 z-40 rounded-lg bg-surface-800 p-2 text-gray-400 shadow-lg lg:hidden",children:(0,d.jsx)(r,{})}),z&&(0,d.jsx)("div",{className:"fixed inset-0 z-40 bg-black/60 backdrop-blur-sm lg:hidden",onClick:()=>A(!1)}),(0,d.jsxs)("aside",{className:`fixed inset-y-0 left-0 z-50 w-60 border-r border-white/[0.06] bg-surface-900 transition-transform lg:hidden ${z?"translate-x-0":"-translate-x-full"}`,children:[(0,d.jsx)("button",{onClick:()=>A(!1),className:"absolute right-3 top-3 rounded p-1 text-gray-500 hover:text-white",children:(0,d.jsx)(s,{})}),I]}),(0,d.jsx)("aside",{className:`hidden shrink-0 border-r border-white/[0.06] bg-surface-900 lg:block ${x?"w-12":"w-60"} transition-all duration-200`,children:I})]})}function y(){return(0,d.jsx)("svg",{className:"h-4 w-4 text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"})})}function z({onClose:a}){let b=(0,o.useRouter)(),c=(0,o.usePathname)(),[e,f]=(0,g.useState)(""),[i,j]=(0,g.useState)(0),l=(0,g.useRef)(null),m=(0,h.J)(),{selected:n}=k(),p=[{id:"dashboard",label:"Dashboard",category:"Pages",href:"/dashboard",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25a2.25 2.25 0 0 1-2.25-2.25v-2.25Z"})}),shortcut:"D"},{id:"prd",label:"PRD",category:"Pages",href:"/prd",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})}),shortcut:"Q"},{id:"loop",label:"Loop",category:"Pages",href:"/loop",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182M21.015 4.356v4.992"})}),shortcut:"L"},{id:"parallel",label:"Parallel",category:"Pages",href:"/parallel",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7.5L7.5 3m0 0L12 7.5M7.5 3v13.5m13.5-6L16.5 15m0 0L12 10.5m4.5 4.5V1.5"})}),shortcut:"A"},{id:"jobs",label:"Jobs",category:"Pages",href:"/jobs",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z"})}),shortcut:"J"},{id:"sprints",label:"Sprints",category:"Pages",href:"/sprints",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 0 1 0 3.75H5.625a1.875 1.875 0 0 1 0-3.75Z"})})},{id:"rules",label:"Rules",category:"Pages",href:"/rules",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z"})}),shortcut:"R"},{id:"templates",label:"Templates",category:"Pages",href:"/templates",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})}),shortcut:"T"},{id:"skills",label:"Skills",category:"Pages",href:"/skills",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 13.5l10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75Z"})}),shortcut:"K"},{id:"codemap",label:"CodeMap",category:"Pages",href:"/codemap",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 6.75V15m6-6v8.25m.503 3.498 4.875-2.437c.381-.19.622-.58.622-1.006V4.82c0-.836-.88-1.38-1.628-.1l-3.869 1.934c-.317.159-.69.159-1.006 0L9.503 3.252a1.125 1.125 0 0 0-1.006 0L3.622 5.689C3.24 5.88 3 6.27 3 6.695V19.18c0 .836.88 1.38 1.628.1l3.869-1.934c.317-.159.69-.159 1.006 0l4.994 2.497c.317.158.69.158 1.006 0Z"})}),shortcut:"C"},{id:"memory",label:"Memory",category:"Pages",href:"/memory",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 3v1.5M4.5 8.25H3m18 0h-1.5M4.5 12H3m18 0h-1.5m-15 3.75H3m18 0h-1.5M8.25 19.5V21M12 3v1.5m0 15V21m3.75-18v1.5m0 15V21m-9-1.5h10.5a2.25 2.25 0 0 0 2.25-2.25V6.75a2.25 2.25 0 0 0-2.25-2.25H6.75A2.25 2.25 0 0 0 4.5 6.75v10.5a2.25 2.25 0 0 0 2.25 2.25Z"})}),shortcut:"M"},{id:"mcps",label:"MCP Tools",category:"Pages",href:"/mcps",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.25 6.087c0-.355.186-.676.401-.959.221-.29.349-.634.349-1.003 0-1.036-1.007-1.875-2.25-1.875s-2.25.84-2.25 1.875c0 .369.128.713.349 1.003.215.283.401.604.401.959v0a.64.64 0 0 1-.657.643 48.39 48.39 0 0 1-4.163-.3c.186 1.613.293 3.25.315 4.907a.656.656 0 0 1-.658.663v0c-.355 0-.676-.186-.959-.401a1.647 1.647 0 0 0-1.003-.349c-1.036 0-1.875 1.007-1.875 2.25s.84 2.25 1.875 2.25c.369 0 .713-.128 1.003-.349.283-.215.604-.401.959-.401v0c.31 0 .555.26.532.57a48.039 48.039 0 0 1-.642 5.056c1.518.19 3.058.309 4.616.354a.64.64 0 0 0 .657-.643v0c0-.355-.186-.676-.401-.959a1.647 1.647 0 0 1-.349-1.003c0-1.035 1.008-1.875 2.25-1.875 1.243 0 2.25.84 2.25 1.875 0 .369-.128.713-.349 1.003-.215.283-.4.604-.4.959v0c0 .333.277.599.61.58a48.1 48.1 0 0 0 5.427-.63 48.05 48.05 0 0 0 .582-4.717.532.532 0 0 0-.533-.57v0c-.355 0-.676.186-.959.401-.29.221-.634.349-1.003.349-1.035 0-1.875-1.007-1.875-2.25s.84-2.25 1.875-2.25c.37 0 .713.128 1.003.349.283.215.604.401.959.401v0a.656.656 0 0 0 .658-.663 48.422 48.422 0 0 0-.37-5.36c-1.886.342-3.81.574-5.766.689a.578.578 0 0 1-.61-.58v0Z"})}),shortcut:"I"},{id:"secrets",label:"Secrets",category:"Pages",href:"/mcps/secrets",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z"})})},{id:"sessions",label:"Sessions",category:"Pages",href:"/sessions",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 7.5l3 2.25-3 2.25m4.5 0h3m-9 8.25h13.5A2.25 2.25 0 0 0 21 18V6a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 6v12a2.25 2.25 0 0 0 2.25 2.25Z"})}),shortcut:"E"},{id:"history",label:"History",category:"Pages",href:"/history",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})}),shortcut:"H"},{id:"review",label:"Review Queue",category:"Pages",href:"/review",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15a2.25 2.25 0 0 1 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25ZM6.75 12h.008v.008H6.75V12Zm0 3h.008v.008H6.75V15Zm0 3h.008v.008H6.75V18Z"})}),shortcut:"V"},{id:"repos",label:"Repos",category:"Pages",href:"/repos",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"})}),shortcut:"P"},{id:"settings",label:"Settings",category:"Pages",href:"/settings",icon:(0,d.jsxs)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:[(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}),(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})]}),shortcut:"S"},{id:"notifications",label:"Notifications",category:"Pages",href:"/notifications",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0"})}),shortcut:"N"},{id:"billing",label:"Billing",category:"Pages",href:"/billing",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Z"})}),shortcut:"B"},{id:"docs",label:"View Documentation",category:"Actions",href:"/docs",icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6.042A8.967 8.967 0 0 0 6 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 0 1 6 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 0 1 6-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0 0 18 18a8.967 8.967 0 0 0-6 2.292m0-14.25v14.25"})})},{id:"github",label:"Visit GitHub",category:"Actions",action:()=>window.open("https://github.com/ulpi-dev/ulpi","_blank"),icon:(0,d.jsx)("svg",{className:"h-4 w-4",fill:"currentColor",viewBox:"0 0 24 24",children:(0,d.jsx)("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})})}],q=new Set(["billing","jobs","sprints"]),r=m?p.filter(a=>!q.has(a.id)):p,s=e.trim()?r.filter(a=>a.label.toLowerCase().includes(e.toLowerCase())):r,t=[],u=new Set;for(let a of s)u.has(a.category)||(u.add(a.category),t.push({category:a.category,items:s.filter(b=>b.category===a.category)}));let v=(0,g.useCallback)(c=>{if(a(),c.action)c.action();else{var d;c.href&&b.push((d=c.href,m&&n?.id?`${d}?repo=${n.id}`:d))}},[a,b]),w=-1;return(0,d.jsxs)("div",{className:"fixed inset-0 z-50 flex items-start justify-center pt-[20vh]",children:[(0,d.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:a}),(0,d.jsxs)("div",{className:"relative z-10 w-full max-w-lg animate-in rounded-xl border border-white/[0.08] bg-surface-900/95 shadow-2xl backdrop-blur-xl",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 border-b border-white/[0.06] px-4 py-3",children:[(0,d.jsx)(y,{}),(0,d.jsx)("input",{ref:l,type:"text",placeholder:"Search pages and actions...",value:e,onChange:a=>f(a.target.value),className:"flex-1 bg-transparent text-sm text-gray-200 placeholder-gray-500 outline-none"}),(0,d.jsx)("kbd",{className:"rounded border border-white/[0.08] bg-surface-800 px-1.5 py-0.5 text-[10px] text-gray-500",children:"ESC"})]}),(0,d.jsxs)("div",{className:"max-h-72 overflow-y-auto py-2",children:[0===s.length&&(0,d.jsx)("div",{className:"px-4 py-8 text-center text-sm text-gray-500",children:"No results found."}),t.map(a=>(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"px-4 pb-1 pt-2 text-[10px] font-medium uppercase tracking-widest text-gray-600",children:a.category}),a.items.map(a=>{let b=++w,e=c===a.href;return(0,d.jsxs)("button",{onClick:()=>v(a),onMouseEnter:()=>j(b),className:`flex w-full items-center gap-3 px-4 py-2 text-left text-sm transition-colors ${b===i?"bg-white/[0.06] text-white":"text-gray-400 hover:bg-white/[0.03]"}`,children:[(0,d.jsx)("span",{className:b===i?"text-primary-400":"text-gray-500",children:a.icon}),(0,d.jsx)("span",{className:"flex-1",children:a.label}),e&&(0,d.jsx)("span",{className:"text-[10px] text-gray-600",children:"Current"}),a.shortcut&&(0,d.jsxs)("span",{className:"flex items-center gap-0.5",children:[(0,d.jsx)("kbd",{className:"inline-flex h-4 min-w-[16px] items-center justify-center rounded border border-white/[0.06] bg-surface-800 px-1 text-[9px] font-medium text-gray-600",children:"⌘"}),(0,d.jsx)("kbd",{className:"inline-flex h-4 min-w-[16px] items-center justify-center rounded border border-white/[0.06] bg-surface-800 px-1 text-[9px] font-medium text-gray-600",children:a.shortcut})]})]},a.id)})]},a.category))]})]})]})}function A({onCreated:a}){let{session:b}=(0,e.As)(),[c,f]=(0,g.useState)(""),[h,i]=(0,g.useState)(""),[j,k]=(0,g.useState)(!1),[m,n]=(0,g.useState)(null);async function o(){if(c.trim()&&h.trim()){k(!0),n(null);try{await l.uE.createOrg({name:c.trim(),slug:h.trim()}),a()}catch(a){n(a&&"object"==typeof a&&"body"in a?String(a.body?.error??"Failed to create organization"):"Failed to create organization"),k(!1)}}}return(0,d.jsx)("div",{className:"flex h-screen items-center justify-center bg-surface-950 px-6",children:(0,d.jsx)("div",{className:"w-full max-w-md",children:(0,d.jsxs)("div",{className:"rounded-2xl border border-white/[0.06] bg-surface-900 p-8",children:[(0,d.jsx)("div",{className:"flex justify-center",children:(0,d.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-xl bg-primary-500",children:(0,d.jsx)("span",{className:"text-base font-bold text-white",children:"U"})})}),(0,d.jsx)("h1",{className:"mt-5 text-center text-xl font-bold text-white",children:"Create your organization"}),(0,d.jsxs)("p",{className:"mt-2 text-center text-sm text-gray-400",children:["Welcome",b?.name?`, ${b.name}`:"","! Create an organization to get started with ULPI Cloud CI."]}),(0,d.jsxs)("div",{className:"mt-6 space-y-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block text-xs font-medium text-gray-400",children:"Organization name"}),(0,d.jsx)("input",{type:"text",value:c,onChange:a=>{var b;f(b=a.target.value),i(b.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,""))},placeholder:"My Team",className:"mt-1 w-full rounded-lg border border-white/[0.08] bg-surface-800 px-3 py-2 text-sm text-white placeholder-gray-600 outline-none focus:border-primary-500/50"})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block text-xs font-medium text-gray-400",children:"Slug"}),(0,d.jsx)("input",{type:"text",value:h,onChange:a=>i(a.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"")),placeholder:"my-team",className:"mt-1 w-full rounded-lg border border-white/[0.08] bg-surface-800 px-3 py-2 font-mono text-sm text-white placeholder-gray-600 outline-none focus:border-primary-500/50"}),(0,d.jsx)("p",{className:"mt-1 text-[11px] text-gray-600",children:"Lowercase letters, numbers, and hyphens only."})]}),m&&(0,d.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/[0.06] px-3 py-2 text-xs text-red-400",children:m}),(0,d.jsx)("button",{onClick:()=>void o(),disabled:j||!c.trim()||!h.trim(),className:"w-full rounded-lg bg-primary-500 px-4 py-2.5 text-sm font-semibold text-white transition-colors hover:bg-primary-600 disabled:cursor-not-allowed disabled:opacity-50",children:j?"Creating...":"Create Organization"})]})]})})})}function B({children:a}){let{session:b,loading:c,org:f,refresh:i}=(0,e.As)();(0,o.useRouter)();let[j,k]=(0,g.useState)(!1);return(0,h.J)()?(0,d.jsxs)("div",{className:"flex h-screen bg-surface-950",children:[(0,d.jsx)(x,{}),(0,d.jsx)("main",{className:"flex-1 overflow-y-auto",children:(0,d.jsx)("div",{className:"px-4 py-4 lg:px-6",children:a})}),j&&(0,d.jsx)(z,{onClose:()=>k(!1)})]}):c?(0,d.jsx)("div",{className:"flex h-screen items-center justify-center bg-surface-950",children:(0,d.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,d.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-primary-500 border-t-transparent"}),(0,d.jsx)("p",{className:"text-sm text-gray-400",children:"Loading..."})]})}):b?f?(0,d.jsxs)("div",{className:"flex h-screen bg-surface-950",children:[(0,d.jsx)(x,{}),(0,d.jsx)("main",{className:"flex-1 overflow-y-auto",children:(0,d.jsx)("div",{className:"px-4 py-4 lg:px-6",children:a})}),j&&(0,d.jsx)(z,{onClose:()=>k(!1)})]}):(0,d.jsx)(A,{onCreated:()=>void i()}):null}function C({children:a}){return(0,d.jsx)(e.OJ,{children:(0,d.jsx)(f.Kv,{children:(0,d.jsx)(j,{children:(0,d.jsx)(B,{children:a})})})})}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__NEXT_FONT_MANIFEST='{"pages":{},"app":{"/Users/ciprian/work_cip/ulpi/hooks/apps/portal/src/app/layout":["static/media/
|
|
1
|
+
self.__NEXT_FONT_MANIFEST='{"pages":{},"app":{"/Users/ciprian/work_cip/ulpi/hooks/apps/portal/src/app/layout":["static/media/e4af272ccee01ff0-s.p.woff2","static/media/bb3ef058b751a6ad-s.p.woff2"]},"appUsingSizeAdjust":true,"pagesUsingSizeAdjust":false}';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"pages":{},"app":{"/Users/ciprian/work_cip/ulpi/hooks/apps/portal/src/app/layout":["static/media/
|
|
1
|
+
{"pages":{},"app":{"/Users/ciprian/work_cip/ulpi/hooks/apps/portal/src/app/layout":["static/media/e4af272ccee01ff0-s.p.woff2","static/media/bb3ef058b751a6ad-s.p.woff2"]},"appUsingSizeAdjust":true,"pagesUsingSizeAdjust":false}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
1
|
+
<!DOCTYPE html><!--p_7mo3JdIgTzhlpqhShmK--><html lang="en" class="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/bb3ef058b751a6ad-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/e4af272ccee01ff0-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/cf8a94d8f0136ff9.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/d8d33dd99ab06e3d.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-474e7ba2d816be4a.js"/><script src="/_next/static/chunks/8e6518bb-ac69cad76942bec4.js" async=""></script><script src="/_next/static/chunks/9743-95b86e1be6debaf2.js" async=""></script><script src="/_next/static/chunks/main-app-c430e897f4183333.js" async=""></script><script src="/_next/static/chunks/app/error-78a7677dcd24ca1b.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>ULPI — The Intelligence Layer for AI Coding Agents</title><meta name="description" content="Free intelligence and governance layer for AI coding agents. Semantic code search, agent memory, dependency graphs, guard rules, session history — zero infrastructure, everything stored in git."/><meta name="keywords" content="AI coding agent,Claude Code,guard rules,code review,plan review,CodeMap,semantic code search,agent memory,dependency graph,DepGraph,shadow branches,zero infrastructure,MCP tools,developer tools,ULPI"/><meta property="og:title" content="ULPI — The Intelligence Layer for AI Coding Agents"/><meta property="og:description" content="Free intelligence and governance layer for AI coding agents. Zero infrastructure — everything stored in git shadow branches."/><meta property="og:url" content="https://app.ulpi.io"/><meta property="og:site_name" content="ULPI"/><meta property="og:type" content="website"/><meta name="twitter:card" content="summary"/><meta name="twitter:title" content="ULPI — The Intelligence Layer for AI Coding Agents"/><meta name="twitter:description" content="Free intelligence and governance layer for AI coding agents. Zero infrastructure — everything stored in git shadow branches."/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_f367f3 __variable_3c557b font-sans bg-surface-950 text-gray-100 antialiased"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-474e7ba2d816be4a.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[8954,[],\"\"]\n3:I[7704,[\"8039\",\"static/chunks/app/error-78a7677dcd24ca1b.js\"],\"default\"]\n4:I[5640,[],\"\"]\n5:I[2051,[],\"OutletBoundary\"]\n7:I[6658,[],\"AsyncMetadataOutlet\"]\n9:I[2051,[],\"ViewportBoundary\"]\nb:I[2051,[],\"MetadataBoundary\"]\nc:\"$Sreact.suspense\"\ne:I[7698,[],\"\"]\n:HL[\"/_next/static/media/bb3ef058b751a6ad-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/e4af272ccee01ff0-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/cf8a94d8f0136ff9.css\",\"style\"]\n:HL[\"/_next/static/css/d8d33dd99ab06e3d.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"p-7mo3JdIgTzhlpqhShmK\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/cf8a94d8f0136ff9.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/d8d33dd99ab06e3d.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"dark\",\"children\":[\"$\",\"body\",null,{\"className\":\"__variable_f367f3 __variable_3c557b font-sans bg-surface-950 text-gray-100 antialiased\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$3\",\"errorStyles\":[],\"errorScripts\":[],\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L5\",null,{\"children\":[\"$L6\",[\"$\",\"$L7\",null,{\"promise\":\"$@8\"}]]}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$L9\",null,{\"children\":\"$La\"}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]],[\"$\",\"$Lb\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$c\",null,{\"fallback\":null,\"children\":\"$Ld\"}]}]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$e\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"a:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n6:null\n"])</script><script>self.__next_f.push([1,"8:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"ULPI — The Intelligence Layer for AI Coding Agents\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Free intelligence and governance layer for AI coding agents. Semantic code search, agent memory, dependency graphs, guard rules, session history — zero infrastructure, everything stored in git.\"}],[\"$\",\"meta\",\"2\",{\"name\":\"keywords\",\"content\":\"AI coding agent,Claude Code,guard rules,code review,plan review,CodeMap,semantic code search,agent memory,dependency graph,DepGraph,shadow branches,zero infrastructure,MCP tools,developer tools,ULPI\"}],[\"$\",\"meta\",\"3\",{\"property\":\"og:title\",\"content\":\"ULPI — The Intelligence Layer for AI Coding Agents\"}],[\"$\",\"meta\",\"4\",{\"property\":\"og:description\",\"content\":\"Free intelligence and governance layer for AI coding agents. Zero infrastructure — everything stored in git shadow branches.\"}],[\"$\",\"meta\",\"5\",{\"property\":\"og:url\",\"content\":\"https://app.ulpi.io\"}],[\"$\",\"meta\",\"6\",{\"property\":\"og:site_name\",\"content\":\"ULPI\"}],[\"$\",\"meta\",\"7\",{\"property\":\"og:type\",\"content\":\"website\"}],[\"$\",\"meta\",\"8\",{\"name\":\"twitter:card\",\"content\":\"summary\"}],[\"$\",\"meta\",\"9\",{\"name\":\"twitter:title\",\"content\":\"ULPI — The Intelligence Layer for AI Coding Agents\"}],[\"$\",\"meta\",\"10\",{\"name\":\"twitter:description\",\"content\":\"Free intelligence and governance layer for AI coding agents. Zero infrastructure — everything stored in git shadow branches.\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"d:\"$8:metadata\"\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-474e7ba2d816be4a.js" defer=""></script><script src="/_next/static/chunks/framework-75cfa26b018833d3.js" defer=""></script><script src="/_next/static/chunks/main-e68e858b767a865d.js" defer=""></script><script src="/_next/static/chunks/pages/_app-b72399330ab02b1c.js" defer=""></script><script src="/_next/static/chunks/pages/_error-3bc8428364d92a37.js" defer=""></script><script src="/_next/static/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8" data-next-head=""/><meta name="viewport" content="width=device-width" data-next-head=""/><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-474e7ba2d816be4a.js" defer=""></script><script src="/_next/static/chunks/framework-75cfa26b018833d3.js" defer=""></script><script src="/_next/static/chunks/main-e68e858b767a865d.js" defer=""></script><script src="/_next/static/chunks/pages/_app-b72399330ab02b1c.js" defer=""></script><script src="/_next/static/chunks/pages/_error-3bc8428364d92a37.js" defer=""></script><script src="/_next/static/p-7mo3JdIgTzhlpqhShmK/_buildManifest.js" defer=""></script><script src="/_next/static/p-7mo3JdIgTzhlpqhShmK/_ssgManifest.js" defer=""></script></head><body><div id="__next"></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/_error","query":{},"buildId":"p-7mo3JdIgTzhlpqhShmK","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[380],{250:(t,e,n)=>{function r(t){if("string"==typeof t)return t;if(null==t)return"";if(null!=t.message){let e=t.message;if("string"==typeof e.content)return e.content;if(Array.isArray(e.content))return e.content.map(t=>"string"==typeof t?t:"thinking"===t.type||"tool_use"===t.type||"tool_result"===t.type?"":"text"===t.type&&"string"==typeof t.text?t.text.includes("<system-reminder>")?"":t.text:"").filter(Boolean).join("\n");if("string"==typeof e)return e}return"string"==typeof t.content?t.content:Array.isArray(t.content)?t.content.map(t=>"string"==typeof t?t:"string"==typeof t.text?t.text.includes("<system-reminder>")?"":t.text:"").filter(Boolean).join("\n"):"string"==typeof t.text?t.text:""}n.d(e,{K9:()=>s,Pv:()=>a});let l=new Set(["file-history-snapshot","progress","system","metadata","config","summary","result","error","thinking"]);function s(t){let e=t.split("\n").filter(t=>t.trim().length>0);if(0===e.length)return null;let n=[],s=0;for(let t of e)try{let e=JSON.parse(t),i=function(t){var e,n,s,i,a,o,u;if(function(t){var e;let n=null!=(e=t.type)?e:"";return!!l.has(n)||("sessionId"in t||"parentUuid"in t||"isSidechain"in t)&&!("role"in t)&&!("content"in t)&&!("message"in t)||"isSnapshotUpdate"in t&&"snapshot"in t||!1}(t))return null;let c=(null!=(n=null!=(e=t.type)?e:t.role)?n:"").toLowerCase();if("human"===c||"user"===c){let e=r(t);return e.trim()?{type:"human",content:e,raw:t}:null}if("assistant"===c){let e=r(t);return e.trim()?{type:"assistant",content:e,raw:t}:null}if("tool_use"===c){let e=null!=(o=null!=(a=t.name)?a:null==(s=t.message)?void 0:s.name)?o:"Tool",n=null!=(u=t.input)?u:null==(i=t.message)?void 0:i.input;return{type:"tool_use",content:"".concat(e),toolName:e,toolInput:null!=n?JSON.stringify(n,null,2):void 0,raw:t}}if("tool_result"===c)return{type:"tool_result",content:r(t),raw:t};if("user"===t.role||"human"===t.role){let e=r(t);return e.trim()?{type:"human",content:e,raw:t}:null}if("assistant"===t.role){let e=r(t);return e.trim()?{type:"assistant",content:e,raw:t}:null}return null}(e);null!==i&&n.push(i),s++}catch(t){}return 0===s||s/e.length<.2?null:n}let i=["...","[earlier messages trimmed]","[messages trimmed]","[truncated]"];function a(t){var e,n;let r=null!=(n=null==(e=t.trimStart().split("\n")[0])?void 0:e.trim())?n:"";return i.some(t=>r.startsWith(t))}},422:(t,e,n)=>{function r(){{let t=window.location.hostname;return"localhost"===t||"127.0.0.1"===t}}function l(){return r(),"http://localhost:9800"}n.d(e,{J:()=>r,h:()=>l})},3446:(t,e,n)=>{n.d(e,{Kv:()=>u,HI:()=>h,Xk:()=>c,yC:()=>d});var r=n(8111),l=n(5271),s=n(422),i=n(7811);class a{async request(t,e){let n="".concat(this.baseUrl).concat(t);if(this.repo){let t=n.includes("?")?"&":"?";n="".concat(n).concat(t,"repo=").concat(encodeURIComponent(this.repo))}let r=i.env.NEXT_PUBLIC_ULPI_API_SECRET,l=await fetch(n,{...e,headers:{"Content-Type":"application/json",...r?{"X-Ulpi-Secret":r}:{},...null==e?void 0:e.headers}});if(!l.ok)throw Error((await l.json().catch(()=>({error:l.statusText}))).error||"API error: ".concat(l.status));return l.json()}async get(t){return this.request(t)}async post(t,e){return this.request(t,{method:"POST",body:e?JSON.stringify(e):void 0})}async put(t,e){return this.request(t,{method:"PUT",body:e?JSON.stringify(e):void 0})}async delete(t){return this.request(t,{method:"DELETE"})}constructor(){this.repo=null,this.baseUrl=(0,s.h)()}}let o=(0,l.createContext)({mode:"cloud",localClient:null});function u(t){let{children:e}=t,n=(0,l.useMemo)(()=>{let t=(0,s.J)()?"local":"cloud";return{mode:t,localClient:"local"===t?new a:null}},[]);return(0,r.jsx)(o,{value:n,children:e})}function c(){return(0,l.useContext)(o).mode}function d(){let{localClient:t}=(0,l.useContext)(o);if(!t)throw Error("LocalApiClient not available in cloud mode");return t}function h(){return(0,l.useContext)(o)}},3951:(t,e,n)=>{n.d(e,{G:()=>l});var r=n(8111);function l(t){let{rows:e=3,variant:n="skeleton",className:l=""}=t;return"spinner"===n?(0,r.jsx)("div",{className:"flex items-center justify-center py-16 ".concat(l),children:(0,r.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,r.jsx)("div",{className:"h-7 w-7 animate-spin rounded-full border-2 border-primary-500 border-t-transparent"}),(0,r.jsx)("p",{className:"text-xs text-gray-500",children:"Loading..."})]})}):(0,r.jsx)("div",{className:"space-y-3 ".concat(l),children:Array.from({length:e}).map((t,e)=>(0,r.jsx)("div",{className:"animate-pulse rounded-xl border border-white/[0.04] bg-surface-800/50 p-4",children:(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsx)("div",{className:"h-8 w-8 rounded-lg bg-white/[0.06]"}),(0,r.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,r.jsx)("div",{className:"h-3.5 w-1/3 rounded bg-white/[0.06]"}),(0,r.jsx)("div",{className:"h-3 w-2/3 rounded bg-white/[0.04]"})]}),(0,r.jsx)("div",{className:"h-5 w-16 rounded-full bg-white/[0.04]"})]})},e))})}},4401:(t,e,n)=>{n.d(e,{J:()=>g,O4:()=>o,RK:()=>y,W7:()=>p,_q:()=>s,bj:()=>m,hh:()=>h,oI:()=>u,uX:()=>c,xy:()=>f,zg:()=>d});var r=n(5271),l=n(3446);function s(t){let e=(0,l.yC)(),[n,s]=(0,r.useState)([]),[i,a]=(0,r.useState)(!0),[o,u]=(0,r.useState)(null),c=(0,r.useCallback)(async()=>{a(!0),u(null);try{let n=t?"/api/history/entries?tag=".concat(encodeURIComponent(t)):"/api/history/entries",r=await e.get(n),l=Array.isArray(r)?r:[];s(l)}catch(t){u(t instanceof Error?t.message:"Failed to fetch history")}finally{a(!1)}},[e,t]);return(0,r.useEffect)(()=>{c()},[c]),{entries:n,loading:i,error:o,refresh:c}}function i(t){return null!=t&&""!==t?String(t):void 0}function a(t){return Array.isArray(t)?t.filter(t=>"string"==typeof t):void 0}function o(t){let e=(0,l.yC)(),[n,s]=(0,r.useState)(null),[o,u]=(0,r.useState)(!0),c=(0,r.useCallback)(async()=>{if(t){u(!0);try{let n=await e.get("/api/history/entries/".concat(t));s(function(t){var e,n,r,l,s,o,u,c;let d,h,f=null!=(e=t.commit)?e:{},y=null!=(n=t.diff)?n:{},m=t.enrichment,p=t.session,g=Array.isArray(y.files)?y.files:[],v={added:"A",modified:"M",deleted:"D",renamed:"R",copied:"C"},b=g.map(t=>{var e,n,r,l;let s=String(null!=(e=t.status)?e:"M");return{path:String(null!=(r=null!=(n=t.path)?n:t.filePath)?r:""),status:null!=(l=v[s])?l:s,additions:"number"==typeof t.additions?t.additions:0,deletions:"number"==typeof t.deletions?t.deletions:0,oldPath:i(t.oldPath)}});t.tags&&(Array.isArray(t.tags)?d=t.tags:"object"==typeof t.tags&&(d=Object.keys(t.tags))),Array.isArray(t.reviewPlans)&&t.reviewPlans.length>0&&(h=t.reviewPlans.map(t=>{var e,n,r,l,s;let i=t.version,a=null==i?void 0:i.decision;return{title:String(null!=(e=t.title)?e:"Untitled Plan"),slug:String(null!=(n=t.slug)?n:""),plan:String(null!=(l=null!=(r=t.plan)?r:null==i?void 0:i.markdown)?l:""),decision:a?{behavior:String(a.behavior),message:String(null!=(s=a.message)?s:"")}:void 0}})),null==p||p.stats;let w="number"==typeof(null==p?void 0:p.durationMs)?p.durationMs:void 0,x=String(null!=(l=null!=(r=f.sha)?r:t.sha)?l:"");return{sha:x,shortSha:x.slice(0,8),date:String(null!=(u=null!=(o=null!=(s=f.authorDate)?s:t.capturedAt)?o:t.date)?u:""),subject:i(f.subject),message:i(f.message),branch:i(f.branch),authorName:i(f.authorName),summary:i(null==m?void 0:m.summary),filesChanged:"number"==typeof y.filesChanged?y.filesChanged:b.length,insertions:"number"==typeof y.insertions?y.insertions:void 0,deletions:"number"==typeof y.deletions?y.deletions:void 0,duration:null!=w?"".concat(Math.round(w/1e3),"s"):void 0,durationMs:w,tags:d,hasSession:null!=p,hasEnrichment:null!=m,hasTranscript:!!(null!=(c=t.hasTranscript)?c:"number"==typeof t.transcriptSize&&t.transcriptSize>0),hasReviewPlans:null!=h&&h.length>0,enrichment:m?{summary:i(m.summary),intent:i(m.intent),outcome:i(m.outcome),insights:a(m.ruleInsights),challenges:a(m.challenges),recommendations:a(m.recommendations),complexity:i(m.complexity)}:void 0,files:b.length>0?b:void 0,reviewPlans:h}}(n))}catch(t){s(null)}finally{u(!1)}}},[e,t]);return(0,r.useEffect)(()=>{c()},[c]),{entry:n,loading:o,refresh:c}}function u(t){let e=(0,l.yC)(),[n,s]=(0,r.useState)(null),[i,a]=(0,r.useState)(!0),o=(0,r.useCallback)(async()=>{if(t){a(!0);try{var n;let r=await e.get("/api/history/entries/".concat(t,"/transcript"));s(null!=(n=r.transcript)?n:null)}catch(t){s(null)}finally{a(!1)}}},[e,t]);return(0,r.useEffect)(()=>{o()},[o]),{transcript:n,loading:i,refresh:o}}function c(){let t=(0,l.yC)(),[e,n]=(0,r.useState)(null),[s,i]=(0,r.useState)(!0),a=(0,r.useCallback)(async()=>{i(!0);try{let e=await t.get("/api/history/status");n(e)}catch(t){n(null)}finally{i(!1)}},[t]);return(0,r.useEffect)(()=>{a()},[a]),{status:e,loading:s,refresh:a}}function d(){let t=(0,l.yC)(),[e,n]=(0,r.useState)(null),[s,i]=(0,r.useState)(!0),a=(0,r.useCallback)(async()=>{i(!0);try{let e=await t.get("/api/history/stats");n(e)}catch(t){n(null)}finally{i(!1)}},[t]);return(0,r.useEffect)(()=>{a()},[a]),{stats:e,loading:s,refresh:a}}function h(){let t=(0,l.yC)(),[e,n]=(0,r.useState)(null),[s,i]=(0,r.useState)(!0),a=(0,r.useCallback)(async()=>{i(!0);try{let e=await t.get("/api/history/enrich/status");n(e)}catch(t){n(null)}finally{i(!1)}},[t]);return(0,r.useEffect)(()=>{a()},[a]),{enrichmentStatus:e,loading:s,refresh:a}}async function f(t,e){var n;return t.post("/api/history/init",{collectReviewPlans:null!=(n=null==e?void 0:e.collectReviewPlans)&&n})}async function y(t,e){return t.post("/api/history/backfill",{limit:null==e?void 0:e.limit})}async function m(t){return t.get("/api/history/export")}async function p(t,e){return t.post("/api/history/enrich",e?{sha:e}:{})}async function g(t){return t.delete("/api/history/enrich/status")}}}]);
|