@ai-development-environment/server 0.0.27 → 0.0.29
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/package.json +1 -1
- package/prisma-runtime/prisma/migrations/20260718220000_add_build_freshness/migration.sql +1 -0
- package/prisma-runtime/prisma/schema.prisma +1 -0
- package/standalone/.next/BUILD_ID +1 -1
- package/standalone/.next/build-manifest.json +3 -3
- package/standalone/.next/prerender-manifest.json +3 -3
- package/standalone/.next/server/app/[locale]/actions/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/actions/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/agents/[id]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/agents/[id]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/agents/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/agents/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/build-data/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/build-data/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/builds/[buildId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/builds/[buildId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/builds/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/builds/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/codebases/[codebaseId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/codebases/[codebaseId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/codebases/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/codebases/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/codebases/repositories/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/comments/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/comments/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/jira/cache/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/jira/cache/tickets/[issueKey]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/jira/tickets/[issueKey]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/jira/tickets/[issueKey]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/jira/tickets/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/jira/tickets/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/jobs/[jobId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/pull-requests/[owner]/[repository]/[number]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/pull-requests/[owner]/[repository]/[number]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/pull-requests/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/pull-requests/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/settings/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/skills/[skillId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/skills/groups/[groupId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/skills/groups/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/skills/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/skills/sync/[runId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/tools/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/usage/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/usage/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/worktrees/[worktreeId]/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/worktrees/[worktreeId]/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/[locale]/worktrees/page.js.nft.json +1 -1
- package/standalone/.next/server/app/[locale]/worktrees/page_client-reference-manifest.js +1 -1
- package/standalone/.next/server/app/_global-error.html +1 -1
- package/standalone/.next/server/app/_global-error.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.html +1 -1
- package/standalone/.next/server/app/_not-found.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/standalone/.next/server/app/api/build-artifact-uploads/[uploadId]/route.js +2 -2
- package/standalone/.next/server/app/api/build-artifact-uploads/[uploadId]/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/builds/[buildId]/artifacts/[artifactId]/route.js +2 -2
- package/standalone/.next/server/app/api/builds/[buildId]/artifacts/[artifactId]/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/codebases/by-path/route.js +2 -2
- package/standalone/.next/server/app/api/codebases/by-path/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/codebases/route.js +2 -2
- package/standalone/.next/server/app/api/codebases/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/graphql/route.js +2 -2
- package/standalone/.next/server/app/api/graphql/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/mcp/route.js +2 -2
- package/standalone/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/tools/call/route.js +2 -2
- package/standalone/.next/server/app/api/tools/call/route.js.nft.json +1 -1
- package/standalone/.next/server/app/api/tools/catalog/route.js +2 -2
- package/standalone/.next/server/app/api/tools/catalog/route.js.nft.json +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__1iv83x0._.js → [root-of-the-server]__0-ypkf7._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__08w_8a-._.js → [root-of-the-server]__00ku6-v._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__0yfvw4a._.js → [root-of-the-server]__0138gz-._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__0r5s0h6._.js → [root-of-the-server]__02vqwey._.js} +2 -2
- package/standalone/.next/server/chunks/{[root-of-the-server]__098f8w4._.js → [root-of-the-server]__056cnsc._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__1l6ed2g._.js → [root-of-the-server]__08mfybr._.js} +2 -2
- package/standalone/.next/server/chunks/{[root-of-the-server]__0cs2bfc._.js → [root-of-the-server]__08u874i._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__01h2pl1._.js → [root-of-the-server]__09skp6r._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__14-aq4c._.js → [root-of-the-server]__0cyubup._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__0_l5rqe._.js → [root-of-the-server]__0da1wsf._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__1mgcft0._.js → [root-of-the-server]__0e1fqyr._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__1frrx8s._.js → [root-of-the-server]__0f3ptor._.js} +2 -2
- package/standalone/.next/server/chunks/{[root-of-the-server]__0k01mi-._.js → [root-of-the-server]__0fih0li._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__02qjyhj._.js → [root-of-the-server]__0g0tnct._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__1ehdq4c._.js → [root-of-the-server]__0gbor-2._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__09lyzw2._.js → [root-of-the-server]__0mj6qcr._.js} +2 -2
- package/standalone/.next/server/chunks/{[root-of-the-server]__14uwobw._.js → [root-of-the-server]__0p_h088._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__0i4bd9d._.js → [root-of-the-server]__0vvjqp5._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__04rx7b9._.js → [root-of-the-server]__0w20bq-._.js} +2 -2
- package/standalone/.next/server/chunks/{[root-of-the-server]__0hmrx3m._.js → [root-of-the-server]__0wf0pka._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__0nxj1ky._.js → [root-of-the-server]__0wg2umj._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__17bgip6._.js → [root-of-the-server]__0xa_els._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__0wx4-1l._.js → [root-of-the-server]__0xukz2x._.js} +2 -2
- package/standalone/.next/server/chunks/[root-of-the-server]__1-z6lg_._.js +3 -0
- package/standalone/.next/server/chunks/{[root-of-the-server]__020ggc3._.js → [root-of-the-server]__15aat79._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__00_-x1w._.js → [root-of-the-server]__15bbm2q._.js} +2 -2
- package/standalone/.next/server/chunks/{[root-of-the-server]__09c7zmy._.js → [root-of-the-server]__16l4wed._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__04hrhu3._.js → [root-of-the-server]__19zwwdv._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__0d4_f1e._.js → [root-of-the-server]__1a5_am-._.js} +1 -1
- package/standalone/.next/server/chunks/{[root-of-the-server]__0kxltc8._.js → [root-of-the-server]__1ajaiy1._.js} +1 -1
- package/standalone/.next/server/chunks/[root-of-the-server]__1dtlzq1._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__1kpqohm._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__1l7234r._.js +3 -0
- package/standalone/.next/server/chunks/{[root-of-the-server]__0qjhcow._.js → [root-of-the-server]__1oahp4o._.js} +2 -2
- package/standalone/.next/server/chunks/[root-of-the-server]__1vip3sa._.js +3 -0
- package/standalone/.next/server/chunks/{[root-of-the-server]__0cryh-d._.js → [root-of-the-server]__1wtng3p._.js} +1 -1
- package/standalone/.next/server/chunks/[root-of-the-server]__1wu654b._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__1x2nph5._.js +3 -0
- package/standalone/.next/server/chunks/[root-of-the-server]__1xk-0be._.js +3 -0
- package/standalone/.next/server/chunks/{[root-of-the-server]__0h0mvv8._.js → [root-of-the-server]__210dhdj._.js} +1 -1
- package/standalone/.next/server/chunks/_0exkna-._.js +29 -8
- package/standalone/.next/server/chunks/{_0bru086._.js → _0jurkow._.js} +26 -26
- package/standalone/.next/server/chunks/{_00mzn-u._.js → _0rx5rfm._.js} +27 -27
- package/standalone/.next/server/chunks/_0tufgj0._.js +68 -47
- package/standalone/.next/server/chunks/_0w2eghf._.js +29 -8
- package/standalone/.next/server/chunks/_152rnkf._.js +3 -3
- package/standalone/.next/server/chunks/{_1_g2i-t._.js → _16x77b_._.js} +27 -27
- package/standalone/.next/server/chunks/_1dbqy8c._.js +3 -3
- package/standalone/.next/server/chunks/_1vrixpc._.js +3 -3
- package/standalone/.next/server/chunks/_1yfz-9u._.js +3 -3
- package/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1osx7qy._.js → [root-of-the-server]__0361lgt._.js} +8 -2
- package/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ay4_3d._.js +37 -0
- package/standalone/.next/server/chunks/ssr/[root-of-the-server]__0dm8osz._.js +3 -0
- package/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0oj1os4._.js → [root-of-the-server]__1xv798-._.js} +2 -2
- package/standalone/.next/server/chunks/ssr/[root-of-the-server]__1z955gh._.js +3 -0
- package/standalone/.next/server/chunks/ssr/_00ye62k._.js +35 -0
- package/standalone/.next/server/chunks/ssr/_07tglcd._.js +35 -0
- package/standalone/.next/server/chunks/ssr/_0bvpmhm._.js +29 -25
- package/standalone/.next/server/chunks/ssr/{_0hoc_fd._.js → _0ddgabq._.js} +2 -2
- package/standalone/.next/server/chunks/ssr/{_1x13g5y._.js → _0eb36qa._.js} +2 -2
- package/standalone/.next/server/chunks/ssr/{_1dnm1d4._.js → _0mr9u9p._.js} +2 -2
- package/standalone/.next/server/chunks/ssr/_0nm6upn._.js +3 -0
- package/standalone/.next/server/chunks/ssr/_0quhjav._.js +3 -0
- package/standalone/.next/server/chunks/ssr/_0w05v7m._.js +3 -0
- package/standalone/.next/server/chunks/ssr/_0xozjkz._.js +3 -0
- package/standalone/.next/server/chunks/ssr/_0xrpdyy._.js +3 -0
- package/standalone/.next/server/chunks/ssr/_1-2qcpf._.js +3 -0
- package/standalone/.next/server/chunks/ssr/{_1vhf014._.js → _1-grolz._.js} +2 -2
- package/standalone/.next/server/chunks/ssr/_12ws_f2._.js +11 -0
- package/standalone/.next/server/chunks/ssr/_17p59oz._.js +3 -0
- package/standalone/.next/server/chunks/ssr/_19fwji0._.js +11 -0
- package/standalone/.next/server/chunks/ssr/_1_1j9nd._.js +13 -0
- package/standalone/.next/server/chunks/ssr/_1g3i459._.js +15 -0
- package/standalone/.next/server/chunks/ssr/{_1oh35yj._.js → _1g_aflc._.js} +2 -2
- package/standalone/.next/server/chunks/ssr/{_1dsdn7w._.js → _1lcwubl._.js} +2 -2
- package/standalone/.next/server/chunks/ssr/{_0sp1ojg._.js → _1r2rmfp._.js} +8 -2
- package/standalone/.next/server/chunks/ssr/_1za3z6k._.js +28 -24
- package/standalone/.next/server/chunks/ssr/{_13jl9nw._.js → _1zyjq9y._.js} +2 -2
- package/standalone/.next/server/chunks/ssr/_20ufqtr._.js +3 -0
- package/standalone/.next/server/chunks/ssr/messages_de_json_[json]_cjs_1uig1ud._.js +1 -1
- package/standalone/.next/server/chunks/ssr/messages_en_json_[json]_cjs_206072-._.js +1 -1
- package/standalone/.next/server/chunks/ssr/messages_es_json_[json]_cjs_082yukd._.js +1 -1
- package/standalone/.next/server/chunks/ssr/messages_fr_json_[json]_cjs_0j6-w0i._.js +1 -1
- package/standalone/.next/server/chunks/ssr/src_components_agents_agent-detail_tsx_0lfa4ui._.js +2 -2
- package/standalone/.next/server/chunks/ssr/src_components_builds_build-detail-page_tsx_0q1lvps._.js +9 -13
- package/standalone/.next/server/chunks/ssr/src_components_builds_builds-page_tsx_17qzmsl._.js +8 -12
- package/standalone/.next/server/chunks/ssr/src_components_github_actions-page_tsx_18434xt._.js +5 -5
- package/standalone/.next/server/chunks/ssr/src_components_github_pull-requests-page_tsx_1il3ga-._.js +12 -12
- package/standalone/.next/server/chunks/ssr/src_components_tools_tools-page_tsx_0k1jqcz._.js +2 -2
- package/standalone/.next/server/chunks/ssr/src_components_worktrees_worktree-detail-page_tsx_1oexgu_._.js +13 -4
- package/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/standalone/.next/server/pages/404.html +1 -1
- package/standalone/.next/server/pages/500.html +1 -1
- package/standalone/.next/server/server-reference-manifest.js +1 -1
- package/standalone/.next/server/server-reference-manifest.json +1 -1
- package/standalone/.next/static/chunks/{0sp_r-c6262te.js → 0newuocvg03xy.js} +1 -1
- package/standalone/.next/static/chunks/{3oyhf7rk2xr_g.js → 0rlomhlt6030e.js} +1 -1
- package/standalone/.next/static/chunks/16tfdsma_h0r5.js +33 -0
- package/standalone/.next/static/chunks/{1xjd6ye7mxyf5.js → 1802j8gq2g47d.js} +2 -2
- package/standalone/.next/static/chunks/1_tnhhn4f122y.js +9 -0
- package/standalone/.next/static/chunks/1eny65xy2ho48.js +1 -0
- package/standalone/.next/static/chunks/1l4bkigul15i3.js +25 -0
- package/standalone/.next/static/chunks/{3td_-1s61zkpa.js → 1nnp0crt0mi_-.js} +1 -1
- package/standalone/.next/static/chunks/1qd6cse_d9ae1.js +99 -0
- package/standalone/.next/static/chunks/{2dwchs_6y_o5f.js → 2-mxmazwsh-wz.js} +1 -1
- package/standalone/.next/static/chunks/2fzwgr2iq_783.css +1 -0
- package/standalone/.next/static/chunks/{278dxvyf095b_.js → 2jbygfc0lzu0t.js} +7 -7
- package/standalone/.next/static/chunks/2n7u72nxziv_5.js +7 -0
- package/standalone/.next/static/chunks/{1rivge68m21sm.js → 2rjf8o4g23no8.js} +10 -10
- package/standalone/.next/static/chunks/{42flok13o-l0b.js → 2x8qovg070057.js} +1 -1
- package/standalone/.next/static/chunks/{091l-ij_cv0b6.js → 3-u7pvogc5_bx.js} +12 -12
- package/standalone/.next/static/chunks/3-zh9b0tcttiw.js +33 -0
- package/standalone/.next/static/chunks/31wyih3wwkeid.js +1 -0
- package/standalone/.next/static/chunks/{1nqkxeuycfmrt.js → 36_1bjzx79v18.js} +5 -5
- package/standalone/.next/static/chunks/3ajj69p_sj615.js +1 -0
- package/standalone/.next/static/chunks/3jd8_7lna-j_x.js +40 -0
- package/standalone/.next/static/chunks/3jv2gnnn4vx-j.js +43 -0
- package/standalone/.next/static/chunks/3k0oakdayt9yt.js +40 -0
- package/standalone/.next/static/chunks/3pgngh8lg3be3.js +99 -0
- package/standalone/.next/static/chunks/{0w8rd_g6hnvmz.js → 4013cp3x6bvuw.js} +1 -1
- package/standalone/src/services/builds/build-freshness.test.ts +107 -0
- package/standalone/src/services/builds/build-freshness.ts +73 -0
- package/standalone/src/services/builds/builds.service.test.ts +167 -8
- package/standalone/src/services/builds/builds.service.ts +115 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__1878s0b._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__18zrtty._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__1_xz_m2._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__1mx1hqe._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__1sjjkyp._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__1vk9266._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__1yn6pds._.js +0 -3
- package/standalone/.next/server/chunks/[root-of-the-server]__1zwpjfo._.js +0 -3
- package/standalone/.next/server/chunks/ssr/[root-of-the-server]__03m5q8h._.js +0 -27
- package/standalone/.next/server/chunks/ssr/[root-of-the-server]__06bk7ik._.js +0 -3
- package/standalone/.next/server/chunks/ssr/_09l5w5d._.js +0 -3
- package/standalone/.next/server/chunks/ssr/_0_726fj._.js +0 -3
- package/standalone/.next/server/chunks/ssr/_0a1zku5._.js +0 -3
- package/standalone/.next/server/chunks/ssr/_0pu14lm._.js +0 -3
- package/standalone/.next/server/chunks/ssr/_1eol9we._.js +0 -3
- package/standalone/.next/server/chunks/ssr/_1h3t5g1._.js +0 -3
- package/standalone/.next/server/chunks/ssr/_1kemhyd._.js +0 -39
- package/standalone/.next/server/chunks/ssr/_1kmkrz5._.js +0 -3
- package/standalone/.next/server/chunks/ssr/_1r9ohdr._.js +0 -3
- package/standalone/.next/server/chunks/ssr/_1yzb5-u._.js +0 -11
- package/standalone/.next/server/chunks/ssr/src_components_0wvh73y._.js +0 -11
- package/standalone/.next/server/chunks/ssr/src_components_github_167_ydi._.js +0 -35
- package/standalone/.next/static/chunks/00dx8gu-2oyqe.js +0 -45
- package/standalone/.next/static/chunks/0j5n6p9i-vyzo.js +0 -9
- package/standalone/.next/static/chunks/0weklluydd2mf.js +0 -23
- package/standalone/.next/static/chunks/1eehbcjby4go8.js +0 -95
- package/standalone/.next/static/chunks/23_75iur2dq8p.js +0 -1
- package/standalone/.next/static/chunks/2lgsgstcvc7uk.css +0 -1
- package/standalone/.next/static/chunks/32agjzrkphjrl.js +0 -9
- package/standalone/.next/static/chunks/399uxexoo8x7f.js +0 -33
- package/standalone/.next/static/chunks/39ecics7n8z5m.js +0 -1
- package/standalone/.next/static/chunks/3_kaby2qep1pd.js +0 -34
- package/standalone/.next/static/chunks/3q7vh58-5dkv2.js +0 -25
- package/standalone/.next/static/chunks/3xkoiasuwi3ms.js +0 -95
- package/standalone/.next/static/chunks/41s57pssydrel.js +0 -43
- /package/standalone/.next/static/{AxIbPSeZUHq852SCBMR8d → 8uBWJ8MOV-OEPe88M3PhU}/_buildManifest.js +0 -0
- /package/standalone/.next/static/{AxIbPSeZUHq852SCBMR8d → 8uBWJ8MOV-OEPe88M3PhU}/_clientMiddlewareManifest.js +0 -0
- /package/standalone/.next/static/{AxIbPSeZUHq852SCBMR8d → 8uBWJ8MOV-OEPe88M3PhU}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,573474,e=>{"use strict";let t=(0,e.i(456420).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,t],573474)},340953,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(30030);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function i(...e){return a.useCallback(function(...e){return t=>{let a=!1,r=e.map(e=>{let r=n(e,t);return a||"function"!=typeof r||(a=!0),r});if(a)return()=>{for(let t=0;t<r.length;t++){let a=r[t];"function"==typeof a?a():n(e[t],null)}}}}(...e),e)}var s=e.i(326999);"u">typeof window&&window.document&&window.document.createElement;var o="AlertDialog",[l,c]=(0,r.createContextScope)(o,[s.createDialogScope]),d=(0,s.createDialogScope)(),u=e=>{let{__scopeAlertDialog:a,...r}=e,n=d(a);return(0,t.jsx)(s.Root,{...n,...r,modal:!0})};u.displayName=o;var p=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,i=d(r);return(0,t.jsx)(s.Trigger,{...i,...n,ref:a})});p.displayName="AlertDialogTrigger";var h=e=>{let{__scopeAlertDialog:a,...r}=e,n=d(a);return(0,t.jsx)(s.Portal,{...n,...r})};h.displayName="AlertDialogPortal";var m=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,i=d(r);return(0,t.jsx)(s.Overlay,{...i,...n,ref:a})});m.displayName="AlertDialogOverlay";var f="AlertDialogContent",[g,x]=l(f),y=a.forwardRef((e,r)=>{let{__scopeAlertDialog:n,children:o,...l}=e,c=d(n),u=i(r,a.useRef(null)),p=a.useRef(null);return(0,t.jsx)(g,{scope:n,cancelRef:p,children:(0,t.jsx)(s.Content,{role:"alertdialog",...c,...l,ref:u,onOpenAutoFocus:function(e,t,{checkForDefaultPrevented:a=!0}={}){return function(r){if(e?.(r),!1===a||!r||!r.defaultPrevented)return t?.(r)}}(l.onOpenAutoFocus,e=>{e.preventDefault(),p.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:o})})});y.displayName=f;var b=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,i=d(r);return(0,t.jsx)(s.Title,{...i,...n,ref:a})});b.displayName="AlertDialogTitle";var v=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,i=d(r);return(0,t.jsx)(s.Description,{...i,...n,ref:a})});v.displayName="AlertDialogDescription";var j=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,i=d(r);return(0,t.jsx)(s.Close,{...i,...n,ref:a})});j.displayName="AlertDialogAction";var C="AlertDialogCancel",w=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,{cancelRef:o}=x(C,r),l=d(r),c=i(a,o);return(0,t.jsx)(s.Close,{...l,...n,ref:c})});w.displayName=C,e.s(["Action",0,j,"AlertDialog",0,u,"AlertDialogAction",0,j,"AlertDialogCancel",0,w,"AlertDialogContent",0,y,"AlertDialogDescription",0,v,"AlertDialogOverlay",0,m,"AlertDialogPortal",0,h,"AlertDialogTitle",0,b,"AlertDialogTrigger",0,p,"Cancel",0,w,"Content",0,y,"Description",0,v,"Overlay",0,m,"Portal",0,h,"Root",0,u,"Title",0,b,"Trigger",0,p,"createAlertDialogScope",0,c],691162);var E=e.i(691162),E=E,N=e.i(975157),S=e.i(519455);function D({...e}){return(0,t.jsx)(E.Root,{"data-slot":"alert-dialog",...e})}function T({...e}){return(0,t.jsx)(E.Trigger,{"data-slot":"alert-dialog-trigger",...e})}function A({...e}){return(0,t.jsx)(E.Portal,{"data-slot":"alert-dialog-portal",...e})}function I({className:e,...a}){return(0,t.jsx)(E.Overlay,{"data-slot":"alert-dialog-overlay",className:(0,N.cn)("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a})}function B({className:e,size:a="default",...r}){return(0,t.jsxs)(A,{children:[(0,t.jsx)(I,{}),(0,t.jsx)(E.Content,{"data-slot":"alert-dialog-content","data-size":a,className:(0,N.cn)("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...r})]})}function k({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,N.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...a})}function O({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,N.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...a})}function _({className:e,...a}){return(0,t.jsx)(E.Title,{"data-slot":"alert-dialog-title",className:(0,N.cn)("font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...a})}function $({className:e,...a}){return(0,t.jsx)(E.Description,{"data-slot":"alert-dialog-description",className:(0,N.cn)("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...a})}function R({className:e,variant:a="default",size:r="default",...n}){return(0,t.jsx)(S.Button,{variant:a,size:r,asChild:!0,children:(0,t.jsx)(E.Action,{"data-slot":"alert-dialog-action",className:(0,N.cn)(e),...n})})}function L({className:e,variant:a="outline",size:r="default",...n}){return(0,t.jsx)(S.Button,{variant:a,size:r,asChild:!0,children:(0,t.jsx)(E.Cancel,{"data-slot":"alert-dialog-cancel",className:(0,N.cn)(e),...n})})}e.s(["ConfirmationDialog",0,function({actionLabel:e,cancelLabel:a,description:r,onConfirm:n,onOpenChange:i,open:s,title:o,trigger:l}){return(0,t.jsxs)(D,{onOpenChange:i,open:s,children:[l&&(0,t.jsx)(T,{asChild:!0,children:l}),(0,t.jsxs)(B,{children:[(0,t.jsxs)(k,{children:[(0,t.jsx)(_,{children:o}),(0,t.jsx)($,{children:r})]}),(0,t.jsxs)(O,{children:[(0,t.jsx)(L,{children:a}),(0,t.jsx)(R,{onClick:()=>void n(),variant:"destructive",children:e})]})]})]})}],340953)},711241,e=>{"use strict";let t=(0,e.i(456420).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],711241)},784774,e=>{"use strict";var t=e.i(843476),a=e.i(975157);e.s(["Table",0,function({className:e,containerClassName:r,...n}){return(0,t.jsx)("div",{className:(0,a.cn)("w-full overflow-x-auto",r),children:(0,t.jsx)("table",{className:(0,a.cn)("w-full caption-bottom text-sm",e),...n})})},"TableBody",0,function({className:e,...r}){return(0,t.jsx)("tbody",{className:(0,a.cn)("divide-y",e),...r})},"TableCell",0,function({className:e,...r}){return(0,t.jsx)("td",{className:(0,a.cn)("whitespace-nowrap px-3 py-3 align-middle",e),...r})},"TableFooter",0,function({className:e,...r}){return(0,t.jsx)("tfoot",{className:(0,a.cn)("border-t bg-muted/50 font-medium",e),...r})},"TableHead",0,function({className:e,...r}){return(0,t.jsx)("th",{className:(0,a.cn)("h-10 whitespace-nowrap px-3 text-left align-middle text-xs font-medium text-muted-foreground",e),...r})},"TableHeader",0,function({className:e,...r}){return(0,t.jsx)("thead",{className:(0,a.cn)("border-b",e),...r})},"TableRow",0,function({className:e,...r}){return(0,t.jsx)("tr",{className:(0,a.cn)("transition-colors hover:bg-muted/40",e),...r})}])},689664,e=>{"use strict";var t=e.i(643957);e.s(["Check",()=>t.default])},508734,e=>{"use strict";let t=(0,e.i(456420).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],508734)},929592,e=>{"use strict";var t=e.i(843476),a=e.i(225913),r=e.i(975157);let n=(0,a.cva)("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});e.s(["Alert",0,function({className:e,variant:a,...i}){return(0,t.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,r.cn)(n({variant:a}),e),...i})},"AlertDescription",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-description",className:(0,r.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...a})}])},515288,e=>{"use strict";var t=e.i(843476),a=e.i(975157);e.s(["Card",0,function({className:e,size:r="default",...n}){return(0,t.jsx)("div",{"data-slot":"card","data-size":r,className:(0,a.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...n})},"CardAction",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-action",className:(0,a.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...r})},"CardContent",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,a.cn)("px-(--card-spacing)",e),...r})},"CardDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,a.cn)("text-sm text-muted-foreground",e),...r})},"CardFooter",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-footer",className:(0,a.cn)("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",e),...r})},"CardHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,a.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...r})},"CardTitle",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,a.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...r})}])},758379,e=>{"use strict";let t=(0,e.i(456420).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t])},987968,e=>{"use strict";var t=e.i(843476),a=e.i(975157),r=e.i(758379),r=r;e.s(["Spinner",0,function({className:e,...n}){return(0,t.jsx)(r.default,{"data-slot":"spinner",role:"status","aria-label":"Loading",className:(0,a.cn)("size-4 animate-spin",e),...n})}],987968)},637611,e=>{"use strict";var t,a,r=e.i(247167);function n(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function i(e){return"object"===n(e)}function s(e,t){return e.length<124?e:t}var o=((t=o||{})[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",t),l=((a=l||{}).ConnectionInit="connection_init",a.ConnectionAck="connection_ack",a.Ping="ping",a.Pong="pong",a.Subscribe="subscribe",a.Next="next",a.Error="error",a.Complete="complete",a);function c(e){if(!i(e))throw Error(`Message is expected to be an object, but got ${n(e)}`);if(!e.type)throw Error("Message is missing the 'type' property");if("string"!=typeof e.type)throw Error(`Message is expects the 'type' property to be a string, but got ${n(e.type)}`);switch(e.type){case"connection_init":case"connection_ack":case"ping":case"pong":if(null!=e.payload&&!i(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break;case"subscribe":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!i(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${n(e.payload)}`);if("string"!=typeof e.payload.query)throw Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${n(e.payload.query)}`);if(null!=e.payload.variables&&!i(e.payload.variables))throw Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${n(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==n(e.payload.operationName))throw Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${n(e.payload.operationName)}`);if(null!=e.payload.extensions&&!i(e.payload.extensions))throw Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${n(e.payload.extensions)}`);break;case"next":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!i(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${n(e.payload)}`);break;case"error":var t;if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!(Array.isArray(t=e.payload)&&t.length>0&&t.every(e=>"message"in e)))throw Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break;case"complete":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);break;default:throw Error(`Invalid message 'type' property "${e.type}"`)}return e}function d(e,t){return c(e),JSON.stringify(e,t)}class u extends Error{name="TerminatedCloseEvent";message="4499: Terminated";code=4499;reason="Terminated";wasClean=!1}function p(e){return i(e)&&"code"in e&&"reason"in e}async function h(e,t){let a=await fetch("/api/graphql",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:e,variables:t})}),r=await a.json();if(!a.ok||r.errors?.length||!r.data)throw Error(r.errors?.map(e=>e.message).join("; ")||`HTTP ${a.status}`);return r.data}let m=null;function f(){let e=r.default.env.NEXT_PUBLIC_AGENT_WS_URL;return e||("https:"===window.location.protocol?`wss://${window.location.host}/graphql`:`ws://${window.location.hostname}:3091/graphql`)}e.s(["controlPlaneRequest",0,h,"controlPlaneSubscriptions",0,function(){return m??=function(t){let a,r,n,i,{url:h,connectionParams:m,lazy:f=!0,onNonLazyError:g=console.error,lazyCloseTimeout:x=0,keepAlive:y=0,disablePong:b,connectionAckWaitTimeout:v=0,retryAttempts:j=5,retryWait:C=async function(e){let t=Math.pow(2,e);await new Promise(e=>setTimeout(e,1e3*t+Math.floor(2700*Math.random()+300)))},shouldRetry:w=p,on:E,webSocketImpl:N,generateID:S=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},jsonMessageReplacer:D,jsonMessageReviver:T}=t;if(N){var A;if(!("function"==typeof(A=N)&&"constructor"in A&&"CLOSED"in A&&"CLOSING"in A&&"CONNECTING"in A&&"OPEN"in A))throw Error("Invalid WebSocket implementation provided");a=N}else a="u">typeof WebSocket?WebSocket:e.g.WebSocket||e.g.MozWebSocket;if(!a)throw Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");let I=a,B=(r={},n={on:(e,t)=>(r[e]=t,()=>{delete r[e]}),emit(e){"id"in e&&r[e.id]?.(e)}},i={connecting:E?.connecting?[E.connecting]:[],opened:E?.opened?[E.opened]:[],connected:E?.connected?[E.connected]:[],ping:E?.ping?[E.ping]:[],pong:E?.pong?[E.pong]:[],message:E?.message?[n.emit,E.message]:[n.emit],closed:E?.closed?[E.closed]:[],error:E?.error?[E.error]:[]},{onMessage:n.on,on(e,t){let a=i[e];return a.push(t),()=>{a.splice(a.indexOf(t),1)}},emit(e,...t){for(let a of[...i[e]])a(...t)}});function k(e){let t=[B.on("error",a=>{t.forEach(e=>e()),e(a)}),B.on("closed",a=>{t.forEach(e=>e()),e(a)})]}let O,_=0,$,R=!1,L=0,P=!1;async function z(){clearTimeout($);let[e,t]=await (O??(O=new Promise((e,t)=>(async()=>{let a,r;if(R){if(await C(L),!_)return O=void 0,t({code:1e3,reason:"All Subscriptions Gone"});L++}B.emit("connecting",R);let n=new I("function"==typeof h?await h():h,"graphql-transport-ws");function i(){isFinite(y)&&y>0&&(clearTimeout(r),r=setTimeout(()=>{n.readyState===I.OPEN&&(n.send(d({type:l.Ping})),B.emit("ping",!1,void 0))},y))}k(e=>{O=void 0,clearTimeout(a),clearTimeout(r),t(e),e instanceof u&&(n.close(4499,"Terminated"),n.onerror=null,n.onclose=null)}),n.onerror=e=>B.emit("error",e),n.onclose=e=>B.emit("closed",e),n.onopen=async()=>{try{B.emit("opened",n);let e="function"==typeof m?await m():m;if(n.readyState!==I.OPEN)return;n.send(d(e?{type:l.ConnectionInit,payload:e}:{type:l.ConnectionInit},D)),isFinite(v)&&v>0&&(a=setTimeout(()=>{n.close(o.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},v)),i()}catch(e){B.emit("error",e),n.close(o.InternalClientError,s(e instanceof Error?e.message:String(e),"Internal client error"))}};let p=!1;n.onmessage=({data:t})=>{try{let r=c("string"==typeof t?JSON.parse(t,T):t);if(B.emit("message",r),"ping"===r.type||"pong"===r.type){B.emit(r.type,!0,r.payload),"pong"===r.type?i():b||(n.send(d(r.payload?{type:l.Pong,payload:r.payload}:{type:l.Pong})),B.emit("pong",!1,r.payload));return}if(p)return;if(r.type!==l.ConnectionAck)throw Error(`First message cannot be of type ${r.type}`);clearTimeout(a),p=!0,B.emit("connected",n,r.payload,R),R=!1,L=0,e([n,new Promise((e,t)=>k(t))])}catch(e){n.onmessage=null,B.emit("error",e),n.close(o.BadResponse,s(e instanceof Error?e.message:String(e),"Bad response"))}}})())));e.readyState===I.CLOSING&&await t;let a=()=>{},r=new Promise(e=>a=e);return[e,a,Promise.race([r.then(()=>{_||(isFinite(x)&&x>0?$=setTimeout(()=>{e.readyState===I.OPEN&&e.close(1e3,"Normal Closure")},x):e.close(1e3,"Normal Closure"))}),t])]}function M(e){var t;if(p(e)&&(![1e3,1001,1006,1005,1012,1013,1014].includes(t=e.code)&&t>=1e3&&t<=1999||[o.InternalServerError,o.InternalClientError,o.BadRequest,o.BadResponse,o.Unauthorized,o.SubprotocolNotAcceptable,o.SubscriberAlreadyExists,o.TooManyInitialisationRequests].includes(e.code)))throw e;if(P)return!1;if(p(e)&&1e3===e.code)return _>0;if(!j||L>=j||!w(e))throw e;return R=!0}function F(e,t){let a=S(e),r=!1,n=!1,i=()=>{_--,r=!0};return(async()=>{for(_++;;)try{let[s,o,c]=await z();if(r)return o();let u=B.onMessage(a,e=>{switch(e.type){case l.Next:return void t.next(e.payload);case l.Error:n=!0,r=!0,t.error(e.payload),i();return;case l.Complete:r=!0,i();return}});s.send(d({id:a,type:l.Subscribe,payload:e},D)),i=()=>{r||s.readyState!==I.OPEN||s.send(d({id:a,type:l.Complete},D)),_--,r=!0,o()},await c.finally(u);return}catch(e){if(!M(e))return}})().then(()=>{n||t.complete()}).catch(e=>{t.error(e)}),()=>{r||i()}}return f||(async()=>{for(_++;;)try{let[,,e]=await z();await e}catch(e){try{if(!M(e))return}catch(e){return g?.(e)}}})(),{on:B.on,subscribe:F,iterate(e){let t=[],a={done:!1,error:null,resolve:()=>{}},r=F(e,{next(e){t.push(e),a.resolve()},error(e){a.done=!0,a.error=e,a.resolve()},complete(){a.done=!0,a.resolve()}}),n=async function*(){for(;;){for(t.length||await new Promise(e=>a.resolve=e);t.length;)yield t.shift();if(a.error)throw a.error;if(a.done)return}}();return n.throw=async e=>(a.done||(a.done=!0,a.error=e,a.resolve()),{done:!0,value:void 0}),n.return=async()=>(r(),{done:!0,value:void 0}),n},async dispose(){if(P=!0,O){let[e]=await O;e.close(1e3,"Normal Closure")}},terminate(){O&&B.emit("closed",new u)}}}({url:f,lazy:!0,retryAttempts:1/0,shouldRetry:()=>!0})}],637611)},487486,e=>{"use strict";var t=e.i(843476),a=e.i(225913),r=e.i(709840),n=e.i(975157);let i=(0,a.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:a="default",asChild:s=!1,...o}){let l=s?r.Slot.Root:"span";return(0,t.jsx)(l,{className:(0,n.cn)(i({variant:a}),e),"data-slot":"badge","data-variant":a,...o})}])},643957,e=>{"use strict";let t=(0,e.i(456420).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",0,t])},26495,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",0,t])},144716,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",0,t])},716327,e=>{"use strict";var t=e.i(26495);e.s(["ChevronDown",()=>t.default])},741120,e=>{"use strict";let t=(0,e.i(456420).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],741120)},82612,e=>{"use strict";var t=e.i(843476),a=e.i(225913),r=e.i(975157);let n=(0,a.cva)("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default"}});e.s(["Empty",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty",className:(0,r.cn)("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",e),...a})},"EmptyDescription",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-description",className:(0,r.cn)("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...a})},"EmptyHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-header",className:(0,r.cn)("flex max-w-sm flex-col items-center gap-2",e),...a})},"EmptyMedia",0,function({className:e,variant:a="default",...i}){return(0,t.jsx)("div",{"data-slot":"empty-icon","data-variant":a,className:(0,r.cn)(n({variant:a,className:e})),...i})},"EmptyTitle",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-title",className:(0,r.cn)("font-heading text-sm font-medium tracking-tight",e),...a})}])},462777,e=>{"use strict";async function t(e){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch{}let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.append(t),t.select();let a=document.execCommand("copy");if(t.remove(),!a)throw Error("Copy is not supported by this browser")}e.s(["copyText",0,t,"createClientId",0,function(){try{if(globalThis.crypto?.randomUUID)return globalThis.crypto.randomUUID()}catch{}if(globalThis.crypto?.getRandomValues)try{let e=globalThis.crypto.getRandomValues(new Uint8Array(16));return Array.from(e,e=>e.toString(16).padStart(2,"0")).join("")}catch{}return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}])},778434,e=>{"use strict";e.s(["AGENT_FIELDS",0,"id name hostname version osVersion architecture cpuModel memoryTotalBytes memoryFreeBytes diskTotalBytes diskFreeBytes capabilities baseRepoDirectory derivedDataLocationMode derivedDataPath buildsDirectory defaultBuildsDirectory effectiveBuildsDirectory connectionStatus ipAddress lastSeenAt disconnectedAt createdAt","JOB_FIELDS",0,"id agentId kind payload status error result timeoutSeconds createdAt startedAt finishedAt updatedAt","JOB_LOG_FIELDS",0,"id jobId sequence stream message createdAt"])},250832,e=>{"use strict";let t=(0,e.i(456420).default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);e.s(["Settings2",0,t],250832)},762368,e=>{"use strict";let t=(0,e.i(456420).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["Download",0,t],762368)},421645,e=>{"use strict";e.s(["CODEBASE_BROWSE_JOB_KIND",0,"codebase.browse","CODEBASE_FETCH_JOB_KIND",0,"codebase.fetch","CODEBASE_GIT_INSPECT_JOB_KIND",0,"codebase.git.inspect","CODEBASE_GIT_OPERATION_JOB_KIND",0,"codebase.git.operation","CODEBASE_INSPECT_JOB_KIND",0,"codebase.inspect","CODEBASE_RECONCILE_EVENT_CAPABILITY",0,"codebase.reconcile.requested","CODEBASE_REFRESH_JOB_KIND",0,"codebase.refresh","DEFAULT_CODEBASE_RECONCILE_INTERVAL_SECONDS",0,30,"MAX_CODEBASE_RECONCILE_INTERVAL_SECONDS",0,3600,"MIN_CODEBASE_RECONCILE_INTERVAL_SECONDS",0,10])},899101,e=>{"use strict";var t=e.i(843476),a=e.i(421645);let r=(0,e.i(456420).default)("archive-restore",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]]);var n=e.i(711241),i=e.i(689664),s=e.i(716327),o=e.i(144716),o=o,l=e.i(508734),c=e.i(762368),d=e.i(269846),u=e.i(741120),p=e.i(250832),h=e.i(573474),m=e.i(861745),f=e.i(948148),g=e.i(271645),x=e.i(778434),y=e.i(340953),b=e.i(929592),v=e.i(487486),j=e.i(519455),C=e.i(515288),w=e.i(82612),E=e.i(987968),N=e.i(784774),S=e.i(677572),D=e.i(520133),T=e.i(462777),A=e.i(637611);let I=`
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,573474,e=>{"use strict";let t=(0,e.i(456420).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,t],573474)},340953,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(30030);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function i(...e){return a.useCallback(function(...e){return t=>{let a=!1,r=e.map(e=>{let r=n(e,t);return a||"function"!=typeof r||(a=!0),r});if(a)return()=>{for(let t=0;t<r.length;t++){let a=r[t];"function"==typeof a?a():n(e[t],null)}}}}(...e),e)}var s=e.i(326999);"u">typeof window&&window.document&&window.document.createElement;var o="AlertDialog",[l,c]=(0,r.createContextScope)(o,[s.createDialogScope]),d=(0,s.createDialogScope)(),u=e=>{let{__scopeAlertDialog:a,...r}=e,n=d(a);return(0,t.jsx)(s.Root,{...n,...r,modal:!0})};u.displayName=o;var p=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,i=d(r);return(0,t.jsx)(s.Trigger,{...i,...n,ref:a})});p.displayName="AlertDialogTrigger";var h=e=>{let{__scopeAlertDialog:a,...r}=e,n=d(a);return(0,t.jsx)(s.Portal,{...n,...r})};h.displayName="AlertDialogPortal";var m=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,i=d(r);return(0,t.jsx)(s.Overlay,{...i,...n,ref:a})});m.displayName="AlertDialogOverlay";var f="AlertDialogContent",[g,x]=l(f),y=a.forwardRef((e,r)=>{let{__scopeAlertDialog:n,children:o,...l}=e,c=d(n),u=i(r,a.useRef(null)),p=a.useRef(null);return(0,t.jsx)(g,{scope:n,cancelRef:p,children:(0,t.jsx)(s.Content,{role:"alertdialog",...c,...l,ref:u,onOpenAutoFocus:function(e,t,{checkForDefaultPrevented:a=!0}={}){return function(r){if(e?.(r),!1===a||!r||!r.defaultPrevented)return t?.(r)}}(l.onOpenAutoFocus,e=>{e.preventDefault(),p.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:o})})});y.displayName=f;var b=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,i=d(r);return(0,t.jsx)(s.Title,{...i,...n,ref:a})});b.displayName="AlertDialogTitle";var v=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,i=d(r);return(0,t.jsx)(s.Description,{...i,...n,ref:a})});v.displayName="AlertDialogDescription";var j=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,i=d(r);return(0,t.jsx)(s.Close,{...i,...n,ref:a})});j.displayName="AlertDialogAction";var C="AlertDialogCancel",w=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,{cancelRef:o}=x(C,r),l=d(r),c=i(a,o);return(0,t.jsx)(s.Close,{...l,...n,ref:c})});w.displayName=C,e.s(["Action",0,j,"AlertDialog",0,u,"AlertDialogAction",0,j,"AlertDialogCancel",0,w,"AlertDialogContent",0,y,"AlertDialogDescription",0,v,"AlertDialogOverlay",0,m,"AlertDialogPortal",0,h,"AlertDialogTitle",0,b,"AlertDialogTrigger",0,p,"Cancel",0,w,"Content",0,y,"Description",0,v,"Overlay",0,m,"Portal",0,h,"Root",0,u,"Title",0,b,"Trigger",0,p,"createAlertDialogScope",0,c],691162);var E=e.i(691162),E=E,N=e.i(975157),S=e.i(519455);function D({...e}){return(0,t.jsx)(E.Root,{"data-slot":"alert-dialog",...e})}function T({...e}){return(0,t.jsx)(E.Trigger,{"data-slot":"alert-dialog-trigger",...e})}function A({...e}){return(0,t.jsx)(E.Portal,{"data-slot":"alert-dialog-portal",...e})}function I({className:e,...a}){return(0,t.jsx)(E.Overlay,{"data-slot":"alert-dialog-overlay",className:(0,N.cn)("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a})}function B({className:e,size:a="default",...r}){return(0,t.jsxs)(A,{children:[(0,t.jsx)(I,{}),(0,t.jsx)(E.Content,{"data-slot":"alert-dialog-content","data-size":a,className:(0,N.cn)("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...r})]})}function k({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,N.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...a})}function O({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,N.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...a})}function _({className:e,...a}){return(0,t.jsx)(E.Title,{"data-slot":"alert-dialog-title",className:(0,N.cn)("font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...a})}function $({className:e,...a}){return(0,t.jsx)(E.Description,{"data-slot":"alert-dialog-description",className:(0,N.cn)("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...a})}function R({className:e,variant:a="default",size:r="default",...n}){return(0,t.jsx)(S.Button,{variant:a,size:r,asChild:!0,children:(0,t.jsx)(E.Action,{"data-slot":"alert-dialog-action",className:(0,N.cn)(e),...n})})}function L({className:e,variant:a="outline",size:r="default",...n}){return(0,t.jsx)(S.Button,{variant:a,size:r,asChild:!0,children:(0,t.jsx)(E.Cancel,{"data-slot":"alert-dialog-cancel",className:(0,N.cn)(e),...n})})}e.s(["ConfirmationDialog",0,function({actionLabel:e,cancelLabel:a,description:r,onConfirm:n,onOpenChange:i,open:s,title:o,trigger:l}){return(0,t.jsxs)(D,{onOpenChange:i,open:s,children:[l&&(0,t.jsx)(T,{asChild:!0,children:l}),(0,t.jsxs)(B,{children:[(0,t.jsxs)(k,{children:[(0,t.jsx)(_,{children:o}),(0,t.jsx)($,{children:r})]}),(0,t.jsxs)(O,{children:[(0,t.jsx)(L,{children:a}),(0,t.jsx)(R,{onClick:()=>void n(),variant:"destructive",children:e})]})]})]})}],340953)},711241,e=>{"use strict";let t=(0,e.i(456420).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],711241)},778434,e=>{"use strict";e.s(["AGENT_FIELDS",0,"id name hostname version osVersion architecture cpuModel memoryTotalBytes memoryFreeBytes diskTotalBytes diskFreeBytes capabilities baseRepoDirectory derivedDataLocationMode derivedDataPath buildsDirectory defaultBuildsDirectory effectiveBuildsDirectory connectionStatus ipAddress lastSeenAt disconnectedAt createdAt","JOB_FIELDS",0,"id agentId kind payload status error result timeoutSeconds createdAt startedAt finishedAt updatedAt","JOB_LOG_FIELDS",0,"id jobId sequence stream message createdAt"])},741120,e=>{"use strict";let t=(0,e.i(456420).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],741120)},784774,e=>{"use strict";var t=e.i(843476),a=e.i(975157);e.s(["Table",0,function({className:e,containerClassName:r,...n}){return(0,t.jsx)("div",{className:(0,a.cn)("w-full overflow-x-auto",r),children:(0,t.jsx)("table",{className:(0,a.cn)("w-full caption-bottom text-sm",e),...n})})},"TableBody",0,function({className:e,...r}){return(0,t.jsx)("tbody",{className:(0,a.cn)("divide-y",e),...r})},"TableCell",0,function({className:e,...r}){return(0,t.jsx)("td",{className:(0,a.cn)("whitespace-nowrap px-3 py-3 align-middle",e),...r})},"TableFooter",0,function({className:e,...r}){return(0,t.jsx)("tfoot",{className:(0,a.cn)("border-t bg-muted/50 font-medium",e),...r})},"TableHead",0,function({className:e,...r}){return(0,t.jsx)("th",{className:(0,a.cn)("h-10 whitespace-nowrap px-3 text-left align-middle text-xs font-medium text-muted-foreground",e),...r})},"TableHeader",0,function({className:e,...r}){return(0,t.jsx)("thead",{className:(0,a.cn)("border-b",e),...r})},"TableRow",0,function({className:e,...r}){return(0,t.jsx)("tr",{className:(0,a.cn)("transition-colors hover:bg-muted/40",e),...r})}])},689664,e=>{"use strict";var t=e.i(643957);e.s(["Check",()=>t.default])},82612,e=>{"use strict";var t=e.i(843476),a=e.i(225913),r=e.i(975157);let n=(0,a.cva)("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default"}});e.s(["Empty",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty",className:(0,r.cn)("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",e),...a})},"EmptyDescription",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-description",className:(0,r.cn)("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...a})},"EmptyHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-header",className:(0,r.cn)("flex max-w-sm flex-col items-center gap-2",e),...a})},"EmptyMedia",0,function({className:e,variant:a="default",...i}){return(0,t.jsx)("div",{"data-slot":"empty-icon","data-variant":a,className:(0,r.cn)(n({variant:a,className:e})),...i})},"EmptyTitle",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-title",className:(0,r.cn)("font-heading text-sm font-medium tracking-tight",e),...a})}])},462777,e=>{"use strict";async function t(e){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch{}let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.append(t),t.select();let a=document.execCommand("copy");if(t.remove(),!a)throw Error("Copy is not supported by this browser")}e.s(["copyText",0,t,"createClientId",0,function(){try{if(globalThis.crypto?.randomUUID)return globalThis.crypto.randomUUID()}catch{}if(globalThis.crypto?.getRandomValues)try{let e=globalThis.crypto.getRandomValues(new Uint8Array(16));return Array.from(e,e=>e.toString(16).padStart(2,"0")).join("")}catch{}return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}])},929592,e=>{"use strict";var t=e.i(843476),a=e.i(225913),r=e.i(975157);let n=(0,a.cva)("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});e.s(["Alert",0,function({className:e,variant:a,...i}){return(0,t.jsx)("div",{"data-slot":"alert",role:"alert",className:(0,r.cn)(n({variant:a}),e),...i})},"AlertDescription",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-description",className:(0,r.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...a})}])},515288,e=>{"use strict";var t=e.i(843476),a=e.i(975157);e.s(["Card",0,function({className:e,size:r="default",...n}){return(0,t.jsx)("div",{"data-slot":"card","data-size":r,className:(0,a.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...n})},"CardAction",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-action",className:(0,a.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...r})},"CardContent",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,a.cn)("px-(--card-spacing)",e),...r})},"CardDescription",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,a.cn)("text-sm text-muted-foreground",e),...r})},"CardFooter",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-footer",className:(0,a.cn)("flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",e),...r})},"CardHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,a.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...r})},"CardTitle",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,a.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...r})}])},758379,e=>{"use strict";let t=(0,e.i(456420).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t])},987968,e=>{"use strict";var t=e.i(843476),a=e.i(975157),r=e.i(758379),r=r;e.s(["Spinner",0,function({className:e,...n}){return(0,t.jsx)(r.default,{"data-slot":"spinner",role:"status","aria-label":"Loading",className:(0,a.cn)("size-4 animate-spin",e),...n})}],987968)},637611,e=>{"use strict";var t,a,r=e.i(247167);function n(e){return null===e?"null":Array.isArray(e)?"array":typeof e}function i(e){return"object"===n(e)}function s(e,t){return e.length<124?e:t}var o=((t=o||{})[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests",t),l=((a=l||{}).ConnectionInit="connection_init",a.ConnectionAck="connection_ack",a.Ping="ping",a.Pong="pong",a.Subscribe="subscribe",a.Next="next",a.Error="error",a.Complete="complete",a);function c(e){if(!i(e))throw Error(`Message is expected to be an object, but got ${n(e)}`);if(!e.type)throw Error("Message is missing the 'type' property");if("string"!=typeof e.type)throw Error(`Message is expects the 'type' property to be a string, but got ${n(e.type)}`);switch(e.type){case"connection_init":case"connection_ack":case"ping":case"pong":if(null!=e.payload&&!i(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${e.payload}"`);break;case"subscribe":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!i(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${n(e.payload)}`);if("string"!=typeof e.payload.query)throw Error(`"${e.type}" message payload expects the 'query' property to be a string, but got ${n(e.payload.query)}`);if(null!=e.payload.variables&&!i(e.payload.variables))throw Error(`"${e.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${n(e.payload.variables)}`);if(null!=e.payload.operationName&&"string"!==n(e.payload.operationName))throw Error(`"${e.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${n(e.payload.operationName)}`);if(null!=e.payload.extensions&&!i(e.payload.extensions))throw Error(`"${e.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${n(e.payload.extensions)}`);break;case"next":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!i(e.payload))throw Error(`"${e.type}" message expects the 'payload' property to be an object, but got ${n(e.payload)}`);break;case"error":var t;if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);if(!(Array.isArray(t=e.payload)&&t.length>0&&t.every(e=>"message"in e)))throw Error(`"${e.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(e.payload)}`);break;case"complete":if("string"!=typeof e.id)throw Error(`"${e.type}" message expects the 'id' property to be a string, but got ${n(e.id)}`);if(!e.id)throw Error(`"${e.type}" message requires a non-empty 'id' property`);break;default:throw Error(`Invalid message 'type' property "${e.type}"`)}return e}function d(e,t){return c(e),JSON.stringify(e,t)}class u extends Error{name="TerminatedCloseEvent";message="4499: Terminated";code=4499;reason="Terminated";wasClean=!1}function p(e){return i(e)&&"code"in e&&"reason"in e}async function h(e,t){let a=await fetch("/api/graphql",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({query:e,variables:t})}),r=await a.json();if(!a.ok||r.errors?.length||!r.data)throw Error(r.errors?.map(e=>e.message).join("; ")||`HTTP ${a.status}`);return r.data}let m=null;function f(){let e=r.default.env.NEXT_PUBLIC_AGENT_WS_URL;return e||("https:"===window.location.protocol?`wss://${window.location.host}/graphql`:`ws://${window.location.hostname}:3091/graphql`)}e.s(["controlPlaneRequest",0,h,"controlPlaneSubscriptions",0,function(){return m??=function(t){let a,r,n,i,{url:h,connectionParams:m,lazy:f=!0,onNonLazyError:g=console.error,lazyCloseTimeout:x=0,keepAlive:y=0,disablePong:b,connectionAckWaitTimeout:v=0,retryAttempts:j=5,retryWait:C=async function(e){let t=Math.pow(2,e);await new Promise(e=>setTimeout(e,1e3*t+Math.floor(2700*Math.random()+300)))},shouldRetry:w=p,on:E,webSocketImpl:N,generateID:S=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})},jsonMessageReplacer:D,jsonMessageReviver:T}=t;if(N){var A;if(!("function"==typeof(A=N)&&"constructor"in A&&"CLOSED"in A&&"CLOSING"in A&&"CONNECTING"in A&&"OPEN"in A))throw Error("Invalid WebSocket implementation provided");a=N}else a="u">typeof WebSocket?WebSocket:e.g.WebSocket||e.g.MozWebSocket;if(!a)throw Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");let I=a,B=(r={},n={on:(e,t)=>(r[e]=t,()=>{delete r[e]}),emit(e){"id"in e&&r[e.id]?.(e)}},i={connecting:E?.connecting?[E.connecting]:[],opened:E?.opened?[E.opened]:[],connected:E?.connected?[E.connected]:[],ping:E?.ping?[E.ping]:[],pong:E?.pong?[E.pong]:[],message:E?.message?[n.emit,E.message]:[n.emit],closed:E?.closed?[E.closed]:[],error:E?.error?[E.error]:[]},{onMessage:n.on,on(e,t){let a=i[e];return a.push(t),()=>{a.splice(a.indexOf(t),1)}},emit(e,...t){for(let a of[...i[e]])a(...t)}});function k(e){let t=[B.on("error",a=>{t.forEach(e=>e()),e(a)}),B.on("closed",a=>{t.forEach(e=>e()),e(a)})]}let O,_=0,$,R=!1,L=0,P=!1;async function z(){clearTimeout($);let[e,t]=await (O??(O=new Promise((e,t)=>(async()=>{let a,r;if(R){if(await C(L),!_)return O=void 0,t({code:1e3,reason:"All Subscriptions Gone"});L++}B.emit("connecting",R);let n=new I("function"==typeof h?await h():h,"graphql-transport-ws");function i(){isFinite(y)&&y>0&&(clearTimeout(r),r=setTimeout(()=>{n.readyState===I.OPEN&&(n.send(d({type:l.Ping})),B.emit("ping",!1,void 0))},y))}k(e=>{O=void 0,clearTimeout(a),clearTimeout(r),t(e),e instanceof u&&(n.close(4499,"Terminated"),n.onerror=null,n.onclose=null)}),n.onerror=e=>B.emit("error",e),n.onclose=e=>B.emit("closed",e),n.onopen=async()=>{try{B.emit("opened",n);let e="function"==typeof m?await m():m;if(n.readyState!==I.OPEN)return;n.send(d(e?{type:l.ConnectionInit,payload:e}:{type:l.ConnectionInit},D)),isFinite(v)&&v>0&&(a=setTimeout(()=>{n.close(o.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},v)),i()}catch(e){B.emit("error",e),n.close(o.InternalClientError,s(e instanceof Error?e.message:String(e),"Internal client error"))}};let p=!1;n.onmessage=({data:t})=>{try{let r=c("string"==typeof t?JSON.parse(t,T):t);if(B.emit("message",r),"ping"===r.type||"pong"===r.type){B.emit(r.type,!0,r.payload),"pong"===r.type?i():b||(n.send(d(r.payload?{type:l.Pong,payload:r.payload}:{type:l.Pong})),B.emit("pong",!1,r.payload));return}if(p)return;if(r.type!==l.ConnectionAck)throw Error(`First message cannot be of type ${r.type}`);clearTimeout(a),p=!0,B.emit("connected",n,r.payload,R),R=!1,L=0,e([n,new Promise((e,t)=>k(t))])}catch(e){n.onmessage=null,B.emit("error",e),n.close(o.BadResponse,s(e instanceof Error?e.message:String(e),"Bad response"))}}})())));e.readyState===I.CLOSING&&await t;let a=()=>{},r=new Promise(e=>a=e);return[e,a,Promise.race([r.then(()=>{_||(isFinite(x)&&x>0?$=setTimeout(()=>{e.readyState===I.OPEN&&e.close(1e3,"Normal Closure")},x):e.close(1e3,"Normal Closure"))}),t])]}function M(e){var t;if(p(e)&&(![1e3,1001,1006,1005,1012,1013,1014].includes(t=e.code)&&t>=1e3&&t<=1999||[o.InternalServerError,o.InternalClientError,o.BadRequest,o.BadResponse,o.Unauthorized,o.SubprotocolNotAcceptable,o.SubscriberAlreadyExists,o.TooManyInitialisationRequests].includes(e.code)))throw e;if(P)return!1;if(p(e)&&1e3===e.code)return _>0;if(!j||L>=j||!w(e))throw e;return R=!0}function F(e,t){let a=S(e),r=!1,n=!1,i=()=>{_--,r=!0};return(async()=>{for(_++;;)try{let[s,o,c]=await z();if(r)return o();let u=B.onMessage(a,e=>{switch(e.type){case l.Next:return void t.next(e.payload);case l.Error:n=!0,r=!0,t.error(e.payload),i();return;case l.Complete:r=!0,i();return}});s.send(d({id:a,type:l.Subscribe,payload:e},D)),i=()=>{r||s.readyState!==I.OPEN||s.send(d({id:a,type:l.Complete},D)),_--,r=!0,o()},await c.finally(u);return}catch(e){if(!M(e))return}})().then(()=>{n||t.complete()}).catch(e=>{t.error(e)}),()=>{r||i()}}return f||(async()=>{for(_++;;)try{let[,,e]=await z();await e}catch(e){try{if(!M(e))return}catch(e){return g?.(e)}}})(),{on:B.on,subscribe:F,iterate(e){let t=[],a={done:!1,error:null,resolve:()=>{}},r=F(e,{next(e){t.push(e),a.resolve()},error(e){a.done=!0,a.error=e,a.resolve()},complete(){a.done=!0,a.resolve()}}),n=async function*(){for(;;){for(t.length||await new Promise(e=>a.resolve=e);t.length;)yield t.shift();if(a.error)throw a.error;if(a.done)return}}();return n.throw=async e=>(a.done||(a.done=!0,a.error=e,a.resolve()),{done:!0,value:void 0}),n.return=async()=>(r(),{done:!0,value:void 0}),n},async dispose(){if(P=!0,O){let[e]=await O;e.close(1e3,"Normal Closure")}},terminate(){O&&B.emit("closed",new u)}}}({url:f,lazy:!0,retryAttempts:1/0,shouldRetry:()=>!0})}],637611)},487486,e=>{"use strict";var t=e.i(843476),a=e.i(225913),r=e.i(709840),n=e.i(975157);let i=(0,a.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:a="default",asChild:s=!1,...o}){let l=s?r.Slot.Root:"span";return(0,t.jsx)(l,{className:(0,n.cn)(i({variant:a}),e),"data-slot":"badge","data-variant":a,...o})}])},643957,e=>{"use strict";let t=(0,e.i(456420).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",0,t])},26495,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",0,t])},144716,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",0,t])},716327,e=>{"use strict";var t=e.i(26495);e.s(["ChevronDown",()=>t.default])},508734,e=>{"use strict";let t=(0,e.i(456420).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],508734)},250832,e=>{"use strict";let t=(0,e.i(456420).default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);e.s(["Settings2",0,t],250832)},762368,e=>{"use strict";let t=(0,e.i(456420).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["Download",0,t],762368)},421645,e=>{"use strict";e.s(["CODEBASE_BROWSE_JOB_KIND",0,"codebase.browse","CODEBASE_FETCH_JOB_KIND",0,"codebase.fetch","CODEBASE_GIT_INSPECT_JOB_KIND",0,"codebase.git.inspect","CODEBASE_GIT_OPERATION_JOB_KIND",0,"codebase.git.operation","CODEBASE_INSPECT_JOB_KIND",0,"codebase.inspect","CODEBASE_RECONCILE_EVENT_CAPABILITY",0,"codebase.reconcile.requested","CODEBASE_REFRESH_JOB_KIND",0,"codebase.refresh","DEFAULT_CODEBASE_RECONCILE_INTERVAL_SECONDS",0,30,"MAX_CODEBASE_RECONCILE_INTERVAL_SECONDS",0,3600,"MIN_CODEBASE_RECONCILE_INTERVAL_SECONDS",0,10])},899101,e=>{"use strict";var t=e.i(843476),a=e.i(421645);let r=(0,e.i(456420).default)("archive-restore",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]]);var n=e.i(711241),i=e.i(689664),s=e.i(716327),o=e.i(144716),o=o,l=e.i(508734),c=e.i(762368),d=e.i(269846),u=e.i(741120),p=e.i(250832),h=e.i(573474),m=e.i(861745),f=e.i(948148),g=e.i(271645),x=e.i(778434),y=e.i(340953),b=e.i(929592),v=e.i(487486),j=e.i(519455),C=e.i(515288),w=e.i(82612),E=e.i(987968),N=e.i(784774),S=e.i(677572),D=e.i(520133),T=e.i(462777),A=e.i(637611);let I=`
|
|
2
2
|
id folder observedOrigin branch headSha upstream ahead behind syncState availability
|
|
3
3
|
statusError defaultBranch localBranches remoteBranches lastCheckedAt lastFetchedAt lastFetchAttemptAt lastFetchError
|
|
4
4
|
agent { ${x.AGENT_FIELDS} }
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { describe, expect, test } from "vitest";
|
|
2
|
+
|
|
3
|
+
import { buildOutOfDate } from "./build-freshness";
|
|
4
|
+
|
|
5
|
+
const worktree = {
|
|
6
|
+
headSha: "head-1",
|
|
7
|
+
codeStateHash: "state-1",
|
|
8
|
+
hasStagedChanges: false,
|
|
9
|
+
hasUnstagedChanges: false,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
describe("buildOutOfDate", () => {
|
|
13
|
+
test("compares completed builds with the current exact code state", () => {
|
|
14
|
+
expect(
|
|
15
|
+
buildOutOfDate({
|
|
16
|
+
status: "SUCCEEDED",
|
|
17
|
+
snapshotJson: JSON.stringify({
|
|
18
|
+
worktree: { headSha: "head-1", codeStateHash: "state-1" },
|
|
19
|
+
}),
|
|
20
|
+
worktree,
|
|
21
|
+
}),
|
|
22
|
+
).toBe(false);
|
|
23
|
+
expect(
|
|
24
|
+
buildOutOfDate({
|
|
25
|
+
status: "SUCCEEDED",
|
|
26
|
+
snapshotJson: JSON.stringify({
|
|
27
|
+
worktree: { headSha: "head-1", codeStateHash: "older-state" },
|
|
28
|
+
}),
|
|
29
|
+
worktree,
|
|
30
|
+
}),
|
|
31
|
+
).toBe(true);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
test("never marks active builds out of date during pre-build scripts", () => {
|
|
35
|
+
expect(
|
|
36
|
+
buildOutOfDate({
|
|
37
|
+
status: "RUNNING",
|
|
38
|
+
snapshotJson: JSON.stringify({
|
|
39
|
+
worktree: { headSha: "head-1", codeStateHash: "state-before-hook" },
|
|
40
|
+
}),
|
|
41
|
+
worktree: { ...worktree, codeStateHash: "temporary-hook-state" },
|
|
42
|
+
}),
|
|
43
|
+
).toBe(false);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
test("suppresses older build freshness while another build runs hooks", () => {
|
|
47
|
+
expect(
|
|
48
|
+
buildOutOfDate({
|
|
49
|
+
status: "SUCCEEDED",
|
|
50
|
+
snapshotJson: JSON.stringify({
|
|
51
|
+
worktree: { headSha: "head-1", codeStateHash: "state-before-hook" },
|
|
52
|
+
}),
|
|
53
|
+
worktree: {
|
|
54
|
+
...worktree,
|
|
55
|
+
codeStateHash: "temporary-hook-state",
|
|
56
|
+
_count: { builds: 1 },
|
|
57
|
+
},
|
|
58
|
+
}),
|
|
59
|
+
).toBe(false);
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
test("waits for a stable post-build worktree observation", () => {
|
|
63
|
+
const build = {
|
|
64
|
+
status: "SUCCEEDED",
|
|
65
|
+
finishedAt: new Date("2026-07-18T20:00:00Z"),
|
|
66
|
+
snapshotJson: JSON.stringify({
|
|
67
|
+
worktree: { headSha: "head-1", codeStateHash: "state-before-hook" },
|
|
68
|
+
}),
|
|
69
|
+
};
|
|
70
|
+
expect(
|
|
71
|
+
buildOutOfDate({
|
|
72
|
+
...build,
|
|
73
|
+
worktree: {
|
|
74
|
+
...worktree,
|
|
75
|
+
codeStateHash: "temporary-hook-state",
|
|
76
|
+
lastCheckedAt: new Date("2026-07-18T19:59:59Z"),
|
|
77
|
+
},
|
|
78
|
+
}),
|
|
79
|
+
).toBe(false);
|
|
80
|
+
expect(
|
|
81
|
+
buildOutOfDate({
|
|
82
|
+
...build,
|
|
83
|
+
worktree: {
|
|
84
|
+
...worktree,
|
|
85
|
+
codeStateHash: "changed-after-build",
|
|
86
|
+
lastCheckedAt: new Date("2026-07-18T20:00:01Z"),
|
|
87
|
+
},
|
|
88
|
+
}),
|
|
89
|
+
).toBe(true);
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
test("falls back to the captured commit and dirty state for older builds", () => {
|
|
93
|
+
expect(
|
|
94
|
+
buildOutOfDate({
|
|
95
|
+
status: "FAILED",
|
|
96
|
+
snapshotJson: JSON.stringify({
|
|
97
|
+
worktree: {
|
|
98
|
+
headSha: "head-1",
|
|
99
|
+
hasStagedChanges: false,
|
|
100
|
+
hasUnstagedChanges: false,
|
|
101
|
+
},
|
|
102
|
+
}),
|
|
103
|
+
worktree: { ...worktree, codeStateHash: null, headSha: "head-2" },
|
|
104
|
+
}),
|
|
105
|
+
).toBe(true);
|
|
106
|
+
});
|
|
107
|
+
});
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
const ACTIVE_BUILD_STATUSES = new Set(["QUEUED", "PREPARING", "RUNNING"]);
|
|
2
|
+
|
|
3
|
+
type FreshnessBuild = {
|
|
4
|
+
status: string;
|
|
5
|
+
snapshotJson: string;
|
|
6
|
+
finishedAt?: Date | null;
|
|
7
|
+
worktree?: {
|
|
8
|
+
headSha: string | null;
|
|
9
|
+
codeStateHash: string | null;
|
|
10
|
+
hasStagedChanges: boolean;
|
|
11
|
+
hasUnstagedChanges: boolean;
|
|
12
|
+
lastCheckedAt?: Date | null;
|
|
13
|
+
_count?: { builds: number };
|
|
14
|
+
} | null;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export function buildOutOfDate(build: FreshnessBuild): boolean {
|
|
18
|
+
if (
|
|
19
|
+
ACTIVE_BUILD_STATUSES.has(build.status) ||
|
|
20
|
+
!build.worktree ||
|
|
21
|
+
(build.worktree._count?.builds ?? 0) > 0
|
|
22
|
+
) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
if (
|
|
26
|
+
build.finishedAt &&
|
|
27
|
+
(!build.worktree.lastCheckedAt ||
|
|
28
|
+
build.worktree.lastCheckedAt < build.finishedAt)
|
|
29
|
+
) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
let snapshot: unknown;
|
|
33
|
+
try {
|
|
34
|
+
snapshot = JSON.parse(build.snapshotJson);
|
|
35
|
+
} catch {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
if (!snapshot || typeof snapshot !== "object" || Array.isArray(snapshot)) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
const worktreeSnapshot = (snapshot as Record<string, unknown>).worktree;
|
|
42
|
+
if (
|
|
43
|
+
!worktreeSnapshot ||
|
|
44
|
+
typeof worktreeSnapshot !== "object" ||
|
|
45
|
+
Array.isArray(worktreeSnapshot)
|
|
46
|
+
) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
const captured = worktreeSnapshot as Record<string, unknown>;
|
|
50
|
+
if (
|
|
51
|
+
typeof captured.codeStateHash === "string" &&
|
|
52
|
+
build.worktree.codeStateHash
|
|
53
|
+
) {
|
|
54
|
+
return captured.codeStateHash !== build.worktree.codeStateHash;
|
|
55
|
+
}
|
|
56
|
+
if (
|
|
57
|
+
typeof captured.headSha === "string" &&
|
|
58
|
+
build.worktree.headSha !== captured.headSha
|
|
59
|
+
) {
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
if (typeof captured.hasStagedChanges === "boolean") {
|
|
63
|
+
if (captured.hasStagedChanges !== build.worktree.hasStagedChanges) {
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
} else if (build.worktree.hasStagedChanges) {
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
if (typeof captured.hasUnstagedChanges === "boolean") {
|
|
70
|
+
return captured.hasUnstagedChanges !== build.worktree.hasUnstagedChanges;
|
|
71
|
+
}
|
|
72
|
+
return build.worktree.hasUnstagedChanges;
|
|
73
|
+
}
|
|
@@ -37,6 +37,9 @@ function worktree() {
|
|
|
37
37
|
gitDirectory: "/agent/repository/.git",
|
|
38
38
|
branch: "main",
|
|
39
39
|
headSha: "abc123",
|
|
40
|
+
codeStateHash: "state-before-build",
|
|
41
|
+
hasStagedChanges: false,
|
|
42
|
+
hasUnstagedChanges: false,
|
|
40
43
|
missingAt: null,
|
|
41
44
|
availability: "AVAILABLE",
|
|
42
45
|
codebase: {
|
|
@@ -244,6 +247,50 @@ describe("BuildsService", () => {
|
|
|
244
247
|
expect(createJob).not.toHaveBeenCalled();
|
|
245
248
|
});
|
|
246
249
|
|
|
250
|
+
test("rebuilds with the original destination and selected settings", async () => {
|
|
251
|
+
getPrismaClient.mockResolvedValue({
|
|
252
|
+
build: {
|
|
253
|
+
findUnique: vi.fn().mockResolvedValue({
|
|
254
|
+
worktreeId: "worktree-1",
|
|
255
|
+
configurationId: "configuration-1",
|
|
256
|
+
destinationJson: JSON.stringify(destination),
|
|
257
|
+
action: "TEST",
|
|
258
|
+
snapshotJson: JSON.stringify({
|
|
259
|
+
worktree: { id: "worktree-snapshot" },
|
|
260
|
+
configuration: {
|
|
261
|
+
id: "configuration-snapshot",
|
|
262
|
+
advancedSettings: {
|
|
263
|
+
testPlan: "Integration",
|
|
264
|
+
enableCodeCoverage: true,
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
scripts: [{ id: "script-1" }, { id: "script-2" }],
|
|
268
|
+
}),
|
|
269
|
+
}),
|
|
270
|
+
},
|
|
271
|
+
});
|
|
272
|
+
const service = new BuildsService(control());
|
|
273
|
+
const startBuild = vi
|
|
274
|
+
.spyOn(service, "startBuild")
|
|
275
|
+
.mockResolvedValue({ id: "build-rebuilt" } as never);
|
|
276
|
+
|
|
277
|
+
await expect(
|
|
278
|
+
service.rebuildBuild("build-1", "rebuild-request"),
|
|
279
|
+
).resolves.toEqual({ id: "build-rebuilt" });
|
|
280
|
+
expect(startBuild).toHaveBeenCalledWith({
|
|
281
|
+
worktreeId: "worktree-1",
|
|
282
|
+
configurationId: "configuration-1",
|
|
283
|
+
destination,
|
|
284
|
+
scriptIds: ["script-1", "script-2"],
|
|
285
|
+
action: "TEST",
|
|
286
|
+
advancedSettings: {
|
|
287
|
+
testPlan: "Integration",
|
|
288
|
+
enableCodeCoverage: true,
|
|
289
|
+
},
|
|
290
|
+
requestId: "rebuild-request",
|
|
291
|
+
});
|
|
292
|
+
});
|
|
293
|
+
|
|
247
294
|
test("queues a generic simulator build from saved settings without reparsing", async () => {
|
|
248
295
|
const buildCreate = vi.fn().mockResolvedValue({ id: "build-1" });
|
|
249
296
|
const buildUpdate = vi.fn().mockResolvedValue({ id: "build-1" });
|
|
@@ -308,6 +355,86 @@ describe("BuildsService", () => {
|
|
|
308
355
|
expect(JSON.parse(data.snapshotJson).configuration.parse.status).toBe(
|
|
309
356
|
"UNPARSED",
|
|
310
357
|
);
|
|
358
|
+
expect(JSON.parse(data.snapshotJson).worktree).toMatchObject({
|
|
359
|
+
codeStateHash: "state-before-build",
|
|
360
|
+
hasStagedChanges: false,
|
|
361
|
+
hasUnstagedChanges: false,
|
|
362
|
+
});
|
|
363
|
+
});
|
|
364
|
+
|
|
365
|
+
test("captures the pre-hook code state and restores the final worktree state on completion", async () => {
|
|
366
|
+
let completeBuild:
|
|
367
|
+
| ((job: {
|
|
368
|
+
id: string;
|
|
369
|
+
status: string;
|
|
370
|
+
resultJson: string | null;
|
|
371
|
+
error: string | null;
|
|
372
|
+
}) => Promise<void>)
|
|
373
|
+
| undefined;
|
|
374
|
+
const buildUpdate = vi.fn();
|
|
375
|
+
const worktreeUpdate = vi.fn().mockResolvedValue({ count: 1 });
|
|
376
|
+
const transaction = {
|
|
377
|
+
build: { update: buildUpdate },
|
|
378
|
+
worktree: { updateMany: worktreeUpdate },
|
|
379
|
+
buildArtifact: { upsert: vi.fn() },
|
|
380
|
+
buildScriptExecution: { updateMany: vi.fn() },
|
|
381
|
+
};
|
|
382
|
+
getPrismaClient.mockResolvedValue({
|
|
383
|
+
build: {
|
|
384
|
+
findFirst: vi.fn().mockResolvedValue({
|
|
385
|
+
id: "build-1",
|
|
386
|
+
status: "RUNNING",
|
|
387
|
+
errorCode: null,
|
|
388
|
+
error: null,
|
|
389
|
+
startedAt: new Date(0),
|
|
390
|
+
worktreeId: "worktree-1",
|
|
391
|
+
snapshotJson: JSON.stringify({
|
|
392
|
+
worktree: { id: "worktree-1", codeStateHash: "queued-state" },
|
|
393
|
+
}),
|
|
394
|
+
}),
|
|
395
|
+
},
|
|
396
|
+
$transaction: vi.fn((callback) => callback(transaction)),
|
|
397
|
+
});
|
|
398
|
+
new BuildsService({
|
|
399
|
+
registerCompletionHandler: vi.fn((kind, handler) => {
|
|
400
|
+
if (kind === IOS_BUILD_JOB_KIND) completeBuild = handler as never;
|
|
401
|
+
}),
|
|
402
|
+
} as unknown as AgentControlService);
|
|
403
|
+
|
|
404
|
+
await completeBuild!({
|
|
405
|
+
id: "job-1",
|
|
406
|
+
status: "SUCCEEDED",
|
|
407
|
+
resultJson: JSON.stringify({
|
|
408
|
+
sourceStateHash: "state-before-hooks",
|
|
409
|
+
finalStateHash: "state-after-post-hooks",
|
|
410
|
+
codeStateObservedAt: "2026-07-18T20:00:00.000Z",
|
|
411
|
+
artifacts: [],
|
|
412
|
+
scriptExecutions: [],
|
|
413
|
+
}),
|
|
414
|
+
error: null,
|
|
415
|
+
});
|
|
416
|
+
|
|
417
|
+
expect(buildUpdate).toHaveBeenCalledWith(
|
|
418
|
+
expect.objectContaining({
|
|
419
|
+
data: expect.objectContaining({
|
|
420
|
+
snapshotJson: expect.stringContaining("state-before-hooks"),
|
|
421
|
+
status: "SUCCEEDED",
|
|
422
|
+
}),
|
|
423
|
+
}),
|
|
424
|
+
);
|
|
425
|
+
expect(worktreeUpdate).toHaveBeenCalledWith({
|
|
426
|
+
where: {
|
|
427
|
+
id: "worktree-1",
|
|
428
|
+
OR: [
|
|
429
|
+
{ lastCheckedAt: null },
|
|
430
|
+
{ lastCheckedAt: { lt: new Date("2026-07-18T20:00:00.000Z") } },
|
|
431
|
+
],
|
|
432
|
+
},
|
|
433
|
+
data: {
|
|
434
|
+
codeStateHash: "state-after-post-hooks",
|
|
435
|
+
lastCheckedAt: new Date("2026-07-18T20:00:00.000Z"),
|
|
436
|
+
},
|
|
437
|
+
});
|
|
311
438
|
});
|
|
312
439
|
|
|
313
440
|
test("resolves Xcode 26 test products from a compatible prior build", async () => {
|
|
@@ -572,15 +699,45 @@ describe("BuildsService", () => {
|
|
|
572
699
|
);
|
|
573
700
|
});
|
|
574
701
|
|
|
575
|
-
test("returns generic build targets
|
|
576
|
-
const createJob = vi.fn();
|
|
702
|
+
test("returns generic and connected build targets from the agent preflight", async () => {
|
|
703
|
+
const createJob = vi.fn().mockResolvedValue({ id: "destinations-job" });
|
|
704
|
+
const genericSimulator = {
|
|
705
|
+
type: "SIMULATOR",
|
|
706
|
+
id: "generic-ios-simulator",
|
|
707
|
+
name: "Any iOS Simulator",
|
|
708
|
+
platform: "iOS Simulator",
|
|
709
|
+
osVersion: null,
|
|
710
|
+
state: null,
|
|
711
|
+
generic: true,
|
|
712
|
+
};
|
|
713
|
+
const genericPhysical = {
|
|
714
|
+
type: "PHYSICAL_DEVICE",
|
|
715
|
+
id: "generic-ios",
|
|
716
|
+
name: "Any Physical iOS Device",
|
|
717
|
+
platform: "iOS",
|
|
718
|
+
osVersion: null,
|
|
719
|
+
state: null,
|
|
720
|
+
generic: true,
|
|
721
|
+
};
|
|
577
722
|
getPrismaClient.mockResolvedValue({
|
|
578
723
|
worktree: { findUnique: vi.fn().mockResolvedValue(worktree()) },
|
|
579
724
|
buildConfiguration: {
|
|
580
725
|
findUnique: vi.fn().mockResolvedValue(configuration()),
|
|
581
726
|
},
|
|
727
|
+
agentJob: { deleteMany: vi.fn().mockResolvedValue({ count: 1 }) },
|
|
582
728
|
});
|
|
583
|
-
const service = new BuildsService(
|
|
729
|
+
const service = new BuildsService({
|
|
730
|
+
registerCompletionHandler: vi.fn(),
|
|
731
|
+
createJob,
|
|
732
|
+
getJob: vi.fn().mockResolvedValue({
|
|
733
|
+
id: "destinations-job",
|
|
734
|
+
status: "SUCCEEDED",
|
|
735
|
+
resultJson: JSON.stringify({
|
|
736
|
+
destinations: [genericSimulator, genericPhysical, destination],
|
|
737
|
+
}),
|
|
738
|
+
error: null,
|
|
739
|
+
}),
|
|
740
|
+
} as unknown as AgentControlService);
|
|
584
741
|
|
|
585
742
|
await expect(
|
|
586
743
|
service.destinations({
|
|
@@ -589,11 +746,13 @@ describe("BuildsService", () => {
|
|
|
589
746
|
action: "BUILD",
|
|
590
747
|
requestId: "generic-destinations",
|
|
591
748
|
}),
|
|
592
|
-
).resolves.toEqual([
|
|
593
|
-
|
|
594
|
-
expect.objectContaining({
|
|
595
|
-
|
|
596
|
-
|
|
749
|
+
).resolves.toEqual([genericSimulator, genericPhysical, destination]);
|
|
750
|
+
expect(createJob).toHaveBeenCalledWith(
|
|
751
|
+
expect.objectContaining({
|
|
752
|
+
kind: IOS_DESTINATIONS_JOB_KIND,
|
|
753
|
+
payload: expect.objectContaining({ action: "BUILD" }),
|
|
754
|
+
}),
|
|
755
|
+
);
|
|
597
756
|
});
|
|
598
757
|
|
|
599
758
|
test("orders and paginates build-wide logs by timestamp and ID", async () => {
|