@cleocode/cleo 2026.9.7 → 2026.9.10
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/cli/index.js +3873 -2234
- package/package.json +14 -13
- package/scripts/check-cleo-tarball-size.mjs +105 -0
- package/scripts/copy-studio-dist.mjs +33 -9
- package/studio-dist/client/_app/immutable/chunks/{wI_OOyoh.js → BB7zPpV2.js} +1 -1
- package/studio-dist/client/_app/immutable/chunks/{D8NsLz6i.js → BOnrCZaR.js} +1 -1
- package/studio-dist/client/_app/immutable/chunks/{eK8hf4s7.js → BSRBuVG3.js} +1 -1
- package/studio-dist/client/_app/immutable/chunks/C6jhAnil.js +1 -0
- package/studio-dist/client/_app/immutable/chunks/C87Q3uxm.js +1 -0
- package/studio-dist/client/_app/immutable/chunks/{DVHIxkgs.js → CLZBEpLY.js} +1 -1
- package/studio-dist/client/_app/immutable/chunks/{CqF5Lomf.js → CTLGzgdN.js} +1 -1
- package/studio-dist/client/_app/immutable/chunks/{o1PZ6Kzq.js → CY3heNub.js} +1 -1
- package/studio-dist/client/_app/immutable/chunks/{RptFUp2P.js → Cge6qiwc.js} +1 -1
- package/studio-dist/client/_app/immutable/chunks/{BRgWBQlV.js → CnwXLaZJ.js} +1 -1
- package/studio-dist/client/_app/immutable/chunks/{Bxz2A0ZC.js → DEH43YwF.js} +1 -1
- package/studio-dist/client/_app/immutable/chunks/DGftG5oL.js +3 -0
- package/studio-dist/client/_app/immutable/chunks/DX_JOBSO.js +1 -0
- package/studio-dist/client/_app/immutable/chunks/{CEqOYim7.js → DZrdToAH.js} +1 -1
- package/studio-dist/client/_app/immutable/chunks/EZwHPWle.js +2 -0
- package/studio-dist/client/_app/immutable/chunks/cWVw9W0E.js +3 -0
- package/studio-dist/client/_app/immutable/chunks/{B9psmq5-.js → rB_71s8h.js} +1 -1
- package/studio-dist/client/_app/immutable/chunks/{JPJd4fEI.js → rUtW7Hx6.js} +1 -1
- package/studio-dist/client/_app/immutable/entry/app.tvu3-wbp.js +2 -0
- package/studio-dist/client/_app/immutable/entry/start.BS-rpdjH.js +1 -0
- package/studio-dist/client/_app/immutable/nodes/{0.CZzEEyVh.js → 0.DMP7swbx.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{1.Bj3Opbua.js → 1.CYZMFpIp.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{10.xe_Mc2Ko.js → 10.3rxHNnSx.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{11.DuKPA7JD.js → 11.B6jWv3Kz.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{12.BoZ_QrUS.js → 12.BrDHeTEq.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{13.DFJiUiv8.js → 13.CE5bd4JV.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{14.eaAlFU4w.js → 14.DgXD2LRx.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{15.BfXgiwMC.js → 15.Cz1KI9Fv.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{16.mEwy9cqh.js → 16.K9wYQPhb.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{17.DP2QtQGn.js → 17.CtUmdfMg.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{18.Bu0054sX.js → 18.mtosd0sL.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{19.UWt6QbCm.js → 19.su55K8y_.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{2.y5jKpHiR.js → 2.mqgFVWFQ.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{20.B1AIHdkP.js → 20.NJuHLxuS.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{21.CpAN71H8.js → 21.BhwhdQCq.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{22.CrYKrN4c.js → 22.BmJEWwER.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{23.pGRaHQjq.js → 23.CAVIJEH-.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{24.BUoUu37z.js → 24.CMuXs5Sy.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/25.DhMBJYAo.js +39 -0
- package/studio-dist/client/_app/immutable/nodes/26.CJ4FA5FS.js +1 -0
- package/studio-dist/client/_app/immutable/nodes/{28.DcmYM7lb.js → 28.D64RBcfs.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{29.lbHbMqNO.js → 29.yfuBeH1x.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{3.Dyir4xXj.js → 3.y115j1d5.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{30.DXj0Wm2A.js → 30.1WUv5bh9.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/4.D6vXYBoQ.js +1 -0
- package/studio-dist/client/_app/immutable/nodes/{5.VWSdP7oc.js → 5.hjw2O-4e.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{6.Dl-XLwOj.js → 6.CAoDfDt6.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{7.CFuC5L-y.js → 7.CLgPSQ8Z.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{8.BCJ0DhOb.js → 8.zuaO1Hik.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{9.Bq4SUzL9.js → 9.Cdsd85m2.js} +1 -1
- package/studio-dist/client/_app/version.json +1 -1
- package/studio-dist/server/chunks/0-BQvtFOrC.js +41 -0
- package/studio-dist/server/chunks/1-Bx2_yoiK.js +9 -0
- package/studio-dist/server/chunks/{10-DvOD4ksa.js → 10-CYLc3d5x.js} +3 -3
- package/studio-dist/server/chunks/{11-DMnBZ02H.js → 11-DcIYR5vm.js} +3 -3
- package/studio-dist/server/chunks/{12-CCyRyRWX.js → 12-WE1u104t.js} +3 -3
- package/studio-dist/server/chunks/{13-Dx1c3a_X.js → 13-joBDoxhK.js} +3 -3
- package/studio-dist/server/chunks/{14-Bo-dTCaZ.js → 14-Doj5F4uJ.js} +3 -3
- package/studio-dist/server/chunks/{15-BvUNl3KL.js → 15-nQTeHGD1.js} +3 -3
- package/studio-dist/server/chunks/{16-De6EzPSa.js → 16-CcTN0e8k.js} +5 -4
- package/studio-dist/server/chunks/{17-CZNsiZhi.js → 17-DWiFnzES.js} +10 -93
- package/studio-dist/server/chunks/{18-CbxxjZox.js → 18-Dcc9GnPo.js} +5 -4
- package/studio-dist/server/chunks/{19-DqHyladS.js → 19-BAQHPrMB.js} +3 -3
- package/studio-dist/server/chunks/{2-COvmA-ZA.js → 2-DXSVVaej.js} +10 -93
- package/studio-dist/server/chunks/20-DfQlGHPW.js +57 -0
- package/studio-dist/server/chunks/{21-DXK9ptAC.js → 21-qhGjkW41.js} +4 -31
- package/studio-dist/server/chunks/{22-DD5CLWJC.js → 22-Byy16hFA.js} +3 -3
- package/studio-dist/server/chunks/23-CZpFrGp4.js +97 -0
- package/studio-dist/server/chunks/24-EEysaT9T.js +67 -0
- package/studio-dist/server/chunks/{25-CAg6Xcmn.js → 25-CgiYn70L.js} +15 -96
- package/studio-dist/server/chunks/{26-_nfVTvNi.js → 26-Cfd6BaUb.js} +12 -93
- package/studio-dist/server/chunks/{27-C9edghG4.js → 27-Cqzlh9gZ.js} +3 -2
- package/studio-dist/server/chunks/{28-VemTJGyc.js → 28-DeYe2rpm.js} +8 -62
- package/studio-dist/server/chunks/{29-CXP-m29t.js → 29-6pjLM0Z1.js} +10 -93
- package/studio-dist/server/chunks/{3-B8KhfvHp.js → 3-E_fWDAkq.js} +9 -25
- package/studio-dist/server/chunks/{30-QiM1S4cJ.js → 30-Dw317sSW.js} +10 -93
- package/studio-dist/server/chunks/{31-BwdY9NnB.js → 31-Q4kHbp8j.js} +3 -2
- package/studio-dist/server/chunks/{4-CSaG4HjO.js → 4-C9BMSh4K.js} +4 -3
- package/studio-dist/server/chunks/{5-i5ry4y3C.js → 5-C0CF4WKG.js} +3 -3
- package/studio-dist/server/chunks/{6-DR1GWBMT.js → 6-BWyOJust.js} +3 -3
- package/studio-dist/server/chunks/{7-DSNwn3aQ.js → 7-CK4MK5gy.js} +3 -3
- package/studio-dist/server/chunks/{8-Bj0bx07K.js → 8-CiX7Xk9k.js} +3 -3
- package/studio-dist/server/chunks/{9-B3Tz0mZq.js → 9-Be5118w4.js} +3 -3
- package/studio-dist/server/chunks/{HeroHeader-v4Q9vaGr.js → HeroHeader-BrGN5WPw.js} +2 -2
- package/studio-dist/server/chunks/{Sparkline-BJ-GuhRd.js → Sparkline-DU_NVxz9.js} +2 -2
- package/studio-dist/server/chunks/{StatBlock-DHJMmOCx.js → StatBlock-jNsxycS1.js} +2 -2
- package/studio-dist/server/chunks/{Tabs-DzG6Bn9a.js → Tabs-DQKDflnT.js} +2 -2
- package/studio-dist/server/chunks/_dispatch-DTWViLGL.js +145 -0
- package/studio-dist/server/chunks/{_layout.svelte-BEIGQcIv.js → _layout.svelte-CL6GfET2.js} +7 -9
- package/studio-dist/server/chunks/{_page.svelte-al08ovKm.js → _page.svelte-6iMiGR11.js} +5 -5
- package/studio-dist/server/chunks/{_page.svelte-Byz2djto.js → _page.svelte-B-YXGvAW.js} +5 -5
- package/studio-dist/server/chunks/{_page.svelte-tYN7_LXI.js → _page.svelte-B5E6RqVb.js} +9 -11
- package/studio-dist/server/chunks/{_page.svelte-UYiF7YBK.js → _page.svelte-BCRyjlk2.js} +5 -5
- package/studio-dist/server/chunks/{_page.svelte-CCoTp89s.js → _page.svelte-BoYafqft.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-nzffIbBP.js → _page.svelte-C7Wm6_HB.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-C_VSL8NW.js → _page.svelte-Cgqt7ucn.js} +13 -71
- package/studio-dist/server/chunks/{_page.svelte-CophUar3.js → _page.svelte-CqI6hqMm.js} +5 -5
- package/studio-dist/server/chunks/{_page.svelte-BgwL2Gyu.js → _page.svelte-CvQ2rZZ1.js} +11 -13
- package/studio-dist/server/chunks/{_page.svelte-l4Z_xjl9.js → _page.svelte-CvTyJEyS.js} +9 -11
- package/studio-dist/server/chunks/{_page.svelte-DOWw416I.js → _page.svelte-CvzAttO9.js} +11 -13
- package/studio-dist/server/chunks/{_page.svelte-DYNorA0S.js → _page.svelte-Cx9Ptecp.js} +10 -67
- package/studio-dist/server/chunks/{_page.svelte-Wfx7ww_h.js → _page.svelte-Cx9dPjsT.js} +11 -13
- package/studio-dist/server/chunks/{_page.svelte-2cgtvHwW.js → _page.svelte-DGN5j-At.js} +13 -71
- package/studio-dist/server/chunks/{_page.svelte-BVVTrzTL.js → _page.svelte-DaheDIRs.js} +5 -5
- package/studio-dist/server/chunks/{_page.svelte-M5D2QnMS.js → _page.svelte-Dm8y5a8S.js} +10 -67
- package/studio-dist/server/chunks/{_page.svelte-B_pq-Z98.js → _page.svelte-DqXxyNsF.js} +7 -7
- package/studio-dist/server/chunks/{_page.svelte-C3aIui4o.js → _page.svelte-DqsbnAhk.js} +4 -4
- package/studio-dist/server/chunks/{_page.svelte-ksTJUXce.js → _page.svelte-Dt0_c1T-.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-bGhsrIjS.js → _page.svelte-Dv6iwhu7.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-BXyoMME1.js → _page.svelte-GPiHej3P.js} +5 -5
- package/studio-dist/server/chunks/{_page.svelte-CYDjW1R0.js → _page.svelte-LuRm8XxE.js} +5 -5
- package/studio-dist/server/chunks/{_page.svelte-Clbkk1gm.js → _page.svelte-Z7nL9SC-.js} +8 -9
- package/studio-dist/server/chunks/{_page.svelte-DUWbZjC7.js → _page.svelte-_kntHS6v.js} +4 -4
- package/studio-dist/server/chunks/{_page.svelte-BIlhmugm.js → _page.svelte-eiomv6Pa.js} +11 -13
- package/studio-dist/server/chunks/{_page.svelte-9OQphlnm.js → _page.svelte-jXJbd8Mx.js} +14 -69
- package/studio-dist/server/chunks/{_page.svelte-CHzXuw2Q.js → _page.svelte-me5SUosG.js} +3 -3
- package/studio-dist/server/chunks/{_server.ts-DSzRdt1U.js → _server.ts--2m_U4SL.js} +11 -94
- package/studio-dist/server/chunks/{_server.ts-ujoDR2_g.js → _server.ts--sGLmBsz.js} +10 -92
- package/studio-dist/server/chunks/{_server.ts-k2fApwOp.js → _server.ts-0ukyuE0I.js} +5 -60
- package/studio-dist/server/chunks/_server.ts-1eW2mTeh.js +40 -0
- package/studio-dist/server/chunks/{_server.ts-Bfr4u3EP.js → _server.ts-3LzqLzt0.js} +10 -92
- package/studio-dist/server/chunks/_server.ts-40h9Y46Y.js +122 -0
- package/studio-dist/server/chunks/_server.ts-5euivmMj.js +38 -0
- package/studio-dist/server/chunks/{_server.ts-CShsBkeE.js → _server.ts-B0uoay97.js} +7 -23
- package/studio-dist/server/chunks/{_server.ts-hL92cV7Z.js → _server.ts-B5vYKkI6.js} +9 -63
- package/studio-dist/server/chunks/{_server.ts-_RJXtmfi.js → _server.ts-B8dTbPHd.js} +8 -23
- package/studio-dist/server/chunks/{_server.ts-C3Jo-ju8.js → _server.ts-BA8Xdegq.js} +10 -92
- package/studio-dist/server/chunks/_server.ts-BBClE0n9.js +54 -0
- package/studio-dist/server/chunks/{_server.ts-ZS1_yMwR.js → _server.ts-BDwMoyZ_.js} +6 -32
- package/studio-dist/server/chunks/{_server.ts-sv4pA808.js → _server.ts-BE-Uhx4N.js} +5 -46
- package/studio-dist/server/chunks/{_server.ts-DV6pzF-M.js → _server.ts-BSHADOUJ.js} +4 -3
- package/studio-dist/server/chunks/_server.ts-BcsqAqXt.js +67 -0
- package/studio-dist/server/chunks/_server.ts-Bl9tMqwZ.js +159 -0
- package/studio-dist/server/chunks/_server.ts-BlzDnRI0.js +51 -0
- package/studio-dist/server/chunks/{_server.ts-DnE0f-iC.js → _server.ts-BtuemCsf.js} +4 -3
- package/studio-dist/server/chunks/{_server.ts-BPcErnS0.js → _server.ts-C2nYqbd9.js} +10 -92
- package/studio-dist/server/chunks/{_server.ts-4p6cp9ke.js → _server.ts-C6IDM_3I.js} +10 -92
- package/studio-dist/server/chunks/_server.ts-C8Z32vuL.js +45 -0
- package/studio-dist/server/chunks/_server.ts-CBXyadsy.js +26 -0
- package/studio-dist/server/chunks/{_server.ts-Do9RIPRo.js → _server.ts-CE6h2ATE.js} +5 -32
- package/studio-dist/server/chunks/_server.ts-CH06JVqZ.js +65 -0
- package/studio-dist/server/chunks/_server.ts-CNqcws-M.js +29 -0
- package/studio-dist/server/chunks/{_server.ts-CJA1djzJ.js → _server.ts-CPf8necd.js} +8 -92
- package/studio-dist/server/chunks/{_server.ts-uUx7uT2Y.js → _server.ts-CYv5YuHd.js} +6 -43
- package/studio-dist/server/chunks/{_server.ts-B2E7fxo9.js → _server.ts-CZ5GZRWX.js} +6 -91
- package/studio-dist/server/chunks/{_server.ts-DSAv66wD.js → _server.ts-CbThsyhY.js} +4 -3
- package/studio-dist/server/chunks/{_server.ts-DgbY5EB3.js → _server.ts-CeQolQOK.js} +10 -92
- package/studio-dist/server/chunks/_server.ts-ChoGyX5C.js +61 -0
- package/studio-dist/server/chunks/_server.ts-CjJYkLJH.js +61 -0
- package/studio-dist/server/chunks/{_server.ts-lPlBUIJX.js → _server.ts-CtjArzxf.js} +5 -60
- package/studio-dist/server/chunks/{_server.ts-Cq60m8Pw.js → _server.ts-D3QWZwt_.js} +4 -3
- package/studio-dist/server/chunks/{_server.ts-CkoJ2HCW.js → _server.ts-D6wP5bCh.js} +10 -92
- package/studio-dist/server/chunks/{_server.ts-DwTRjS4y.js → _server.ts-D7JwQTun.js} +10 -93
- package/studio-dist/server/chunks/_server.ts-DKFJdXPK.js +97 -0
- package/studio-dist/server/chunks/_server.ts-DNAPGKEF.js +55 -0
- package/studio-dist/server/chunks/_server.ts-DQiTiY3E.js +78 -0
- package/studio-dist/server/chunks/{_server.ts-BT0Uq2yq.js → _server.ts-DUyeSXbV.js} +10 -92
- package/studio-dist/server/chunks/{_server.ts-DRVz9D-J.js → _server.ts-DY7BwZCv.js} +9 -24
- package/studio-dist/server/chunks/{_server.ts-Cz0zgaUV.js → _server.ts-D_E276ms.js} +3 -2
- package/studio-dist/server/chunks/{_server.ts-B5g3eScF.js → _server.ts-DgtmTAp5.js} +5 -60
- package/studio-dist/server/chunks/{_server.ts-CboRJY0Q.js → _server.ts-DhTKaw7h.js} +10 -63
- package/studio-dist/server/chunks/_server.ts-DqKBSCPT.js +31 -0
- package/studio-dist/server/chunks/{_server.ts-CpmMp5D8.js → _server.ts-DyXBNnRD.js} +4 -3
- package/studio-dist/server/chunks/_server.ts-DzjUpduu.js +25 -0
- package/studio-dist/server/chunks/{_server.ts-CGiAXy5i.js → _server.ts-Dznqw6Dg.js} +8 -23
- package/studio-dist/server/chunks/{_server.ts-tKMjUFUP.js → _server.ts-EVwS7UXb.js} +4 -3
- package/studio-dist/server/chunks/_server.ts-J17j25VG.js +62 -0
- package/studio-dist/server/chunks/{_server.ts-BdN4AJ6o.js → _server.ts-VQchZxXq.js} +10 -91
- package/studio-dist/server/chunks/{_server.ts-C4BcDGqS.js → _server.ts-XLV5SvjH.js} +7 -63
- package/studio-dist/server/chunks/_server.ts-jZgqFIJz.js +45 -0
- package/studio-dist/server/chunks/{_server.ts-Bw7A4zgb.js → _server.ts-lyiGGv7w.js} +5 -3
- package/studio-dist/server/chunks/{brain-CXR7ZT7S.js → brain-xt_NeshR.js} +2 -2
- package/studio-dist/server/chunks/cleo-home-_XIqkZaL.js +109 -0
- package/studio-dist/server/chunks/{cli-action-DQcaqcfn.js → cli-action-VJPEn1pY.js} +2 -2
- package/studio-dist/server/chunks/{client-CgX38JBu.js → client-D71MZ7Vi.js} +5 -6
- package/studio-dist/server/chunks/cluster-label-layer-CysRMvhi.js +6721 -0
- package/studio-dist/server/chunks/connections-CWLPjwBP.js +15 -0
- package/studio-dist/server/chunks/{connections2-mi7mZqJM.js → connections2-DHVs5ytW.js} +32 -19
- package/studio-dist/server/chunks/{dev-BNpEUZI3.js → dev-Br5zieNA.js} +2 -2
- package/studio-dist/server/chunks/dist-BzgWhfUR.js +18748 -0
- package/studio-dist/server/chunks/{error.svelte-CplNulnS.js → error.svelte-BIToUowC.js} +6 -8
- package/studio-dist/server/chunks/{explorer-loader-BN_mkt3_.js → explorer-loader-B_uCSs9_.js} +2 -2
- package/studio-dist/server/chunks/exports-Dg-gdPPq.js +124 -0
- package/studio-dist/server/chunks/{hooks.server-DBsyphiX.js → hooks.server-CWBRp8NI.js} +10 -93
- package/studio-dist/server/chunks/{http-CRTZe306.js → http-DPU3HHl2.js} +3 -4
- package/studio-dist/server/chunks/{index-server-DocJvixA.js → index-server-BgfA6C0S.js} +17 -4
- package/studio-dist/server/chunks/{internal-D6eWgsHJ.js → internal-DPnIJYMs.js} +56 -92
- package/studio-dist/server/chunks/{memory2-Cgc_4D5q.js → memory-BZHnDZzu.js} +4 -4
- package/studio-dist/server/chunks/{nexus-adapter-9EL_VlGI.js → nexus-adapter-D1ryYG1Z.js} +5 -5
- package/studio-dist/server/chunks/{no-face-up-DcejJLy-.js → no-face-up-B_3h6Hgs.js} +2 -2
- package/studio-dist/server/chunks/project-context-BAXQmgch.js +188 -0
- package/studio-dist/server/chunks/{src-BUqGet2c.js → src-D2rW9bIF.js} +422 -5
- package/studio-dist/server/chunks/{stores-5DmdjPCH.js → stores-BZdYTyl7.js} +3 -3
- package/studio-dist/server/chunks/{tasks2-Bf9VHrv-.js → tasks-sWuEmiGW.js} +2349 -9
- package/studio-dist/server/chunks/{ui-DR8zOSpC.js → ui-CkQ-pCs3.js} +2 -2
- package/studio-dist/server/chunks/utils-g564cUMV.js +151 -0
- package/studio-dist/server/index.js +5 -16
- package/studio-dist/server/manifest.js +88 -88
- package/dist/cli/index.js.map +0 -6
- package/studio-dist/client/_app/immutable/assets/parse-worker.CSEr67Qi.js +0 -1127
- package/studio-dist/client/_app/immutable/chunks/2mEksghu2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/3KebaI-z.js +0 -53
- package/studio-dist/client/_app/immutable/chunks/3y2yNYEk2.js +0 -3
- package/studio-dist/client/_app/immutable/chunks/7UXYlaI1.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/83VLmCvk.js +0 -4
- package/studio-dist/client/_app/immutable/chunks/84Rhmi6r.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/9CV9TXTg2.js +0 -92
- package/studio-dist/client/_app/immutable/chunks/9LFtcz24.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/9bLMgKwu2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/9kKqohVR2.js +0 -37
- package/studio-dist/client/_app/immutable/chunks/B-Ye28EY.js +0 -7
- package/studio-dist/client/_app/immutable/chunks/B-jnUl7o.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/B0ORuy8x2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/B0xCM1wN2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/B0zCN4sX.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/B1wt-iGW.js +0 -7
- package/studio-dist/client/_app/immutable/chunks/B2F3KUIU.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/B2_6RrlL2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/B2qKEYxA2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/B2u2rNyI2.js +0 -8
- package/studio-dist/client/_app/immutable/chunks/B3_X3Lhd2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/B3sNtbqf.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/B4NQP1Ax2.js +0 -6
- package/studio-dist/client/_app/immutable/chunks/BAtZg5v5.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/BB6WKLm82.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/BBX8UDtn.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/BBs1U1iU.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/BEli_4Jp2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/BEt2wIUt.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/BEyM8qSW2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/BFZA3Dsk2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/BGdPweG1.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/BGiusSqE.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/BGmpyfzD.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/BH5rhSIR.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/BHciFt922.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/BHnFwTQY.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/BIvye3XP2.js +0 -59
- package/studio-dist/client/_app/immutable/chunks/BJ8mcpQA2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/BK17qSHw.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/BLkgUtyb.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/BMUko3r62.js +0 -5
- package/studio-dist/client/_app/immutable/chunks/BMwzdEaa.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/BQZx6brg.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/BUPJTTTd.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/BVNGAeZe2.js +0 -146
- package/studio-dist/client/_app/immutable/chunks/BWfLryGm.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/BXIfeogw.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/BXTfFyUU.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/BYJC6_MM.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/BZV1ZJzH.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/BZu9rehd.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/Bbzm48C52.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/BfGnlwjH.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/Bfjb9LPp.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/BieFfu-R.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/Bmv63uXe2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/BtBW1A0u.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/BxISGQCl2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/ByNR_KvT.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/BzjhD6Hr2.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/BzpWnq0c2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/C-yJVcyI2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/C0cQ-8kS2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/C1vWmhYe.js +0 -48
- package/studio-dist/client/_app/immutable/chunks/C1w6bBje.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/C243sn7r.js +0 -4
- package/studio-dist/client/_app/immutable/chunks/C2oZaDvt.js +0 -67
- package/studio-dist/client/_app/immutable/chunks/C3OziSQx.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/C3hFPbMK.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/C4P9oFvU2.js +0 -6
- package/studio-dist/client/_app/immutable/chunks/C5Nlanei.js +0 -8
- package/studio-dist/client/_app/immutable/chunks/C6KBAXPl.js +0 -15
- package/studio-dist/client/_app/immutable/chunks/C8MZnWta.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/CAoan3K12.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/CBpcINYH.js +0 -29
- package/studio-dist/client/_app/immutable/chunks/CE7phgWq.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/CFb4Co_K.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/CGWoRK3t2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/CH3t4xo1.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/CHJgk6g-.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/CHgPjuDQ.js +0 -17
- package/studio-dist/client/_app/immutable/chunks/CHkCZrnr.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/CI_91WUN.js +0 -4
- package/studio-dist/client/_app/immutable/chunks/CJ7-hP0H.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/CKIrNnkY2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/CKoQ7Ko5.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/CM8O4zqs.js +0 -56
- package/studio-dist/client/_app/immutable/chunks/CMz3AVRO.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/CNToUR3P.js +0 -13
- package/studio-dist/client/_app/immutable/chunks/CNuQG1yl2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/CQLIZtxj.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/CQYVNgM0.js +0 -20
- package/studio-dist/client/_app/immutable/chunks/CQeVOmFO2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/CSPHHq09.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/CTJEdbIn.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/CTTT3wYw.js +0 -35
- package/studio-dist/client/_app/immutable/chunks/CV4ck7fz.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/CXQrVnHf.js +0 -11
- package/studio-dist/client/_app/immutable/chunks/CXTCtOUQ.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/C_CsU7Qq.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/C_IZx3682.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/CbTnu2Po2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/Cba8RZ1a2.js +0 -8
- package/studio-dist/client/_app/immutable/chunks/Cc8xxDr5.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/CdPxoldu.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/CdqDTozW.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/CdsmcCfC.js +0 -25
- package/studio-dist/client/_app/immutable/chunks/CeYPAoY9.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/Cf4kGS9y.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/CfWEqXtJ2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/Cg7Wj2b9.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/CgTpKZfi2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/Chpy9ca7.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/CiLKuLrQ.js +0 -4
- package/studio-dist/client/_app/immutable/chunks/CjNDJjwu.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/Cjde0ZKr2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/Cjgnade02.js +0 -3
- package/studio-dist/client/_app/immutable/chunks/Ckp90om52.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/ClAPVhCD.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/ClT89UdO.js +0 -11
- package/studio-dist/client/_app/immutable/chunks/CnJf5tML.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/CpF4Rrcc2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/CqCka5yX2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/CqtqZrOl.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/CrJdywQt.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/Cs0zC2l2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/CsMn5fBs.js +0 -141
- package/studio-dist/client/_app/immutable/chunks/CsvKLHQQ2.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/Ctaresvj.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/Ctetf8vc2.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/Cv7yW6MG.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/CxRIz-Zd.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/CxbvtjIH.js +0 -3
- package/studio-dist/client/_app/immutable/chunks/CxfeoXkZ.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/CySLscL2.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/D0PKQAbM.js +0 -87
- package/studio-dist/client/_app/immutable/chunks/D0WQsLTu.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/D1LBVx6r2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/D1NlFXu9.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/D1QfC4hu2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/D1yrHAn72.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/D2pa4reh.js +0 -7
- package/studio-dist/client/_app/immutable/chunks/D3QsWcIw2.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/D4OkQuPl2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/D6UDnATk2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/D7w7HllH.js +0 -38
- package/studio-dist/client/_app/immutable/chunks/D93KpglN.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/D99fQj2G2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DB5ifLM-.js +0 -3
- package/studio-dist/client/_app/immutable/chunks/DBhP8ifO2.js +0 -15
- package/studio-dist/client/_app/immutable/chunks/DF_4OWhj.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/DFpNK1vs2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DGRYMk-W.js +0 -142
- package/studio-dist/client/_app/immutable/chunks/DH3CcQwq.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DHQfJeLU.js +0 -4
- package/studio-dist/client/_app/immutable/chunks/DL89yEDy2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DLRku_0p2.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/DMZkjPYT2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DNP72foU.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DO2GztVm.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DOVNXmCK2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DOqzs8kl2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DQnR63hh2.js +0 -7
- package/studio-dist/client/_app/immutable/chunks/DTxtWPkw.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DVDgCC9A2.js +0 -20
- package/studio-dist/client/_app/immutable/chunks/DVVCJYjz.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DWRhYUMj2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DWavBJBI.js +0 -4
- package/studio-dist/client/_app/immutable/chunks/DXDSWRw-.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DXoHaH4a.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/DXpCX2Hi.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DYP3EJMY.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DYQphR_V.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DYUlIivP.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DYo2ye8X2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DYxFu8yV.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DZ66sRb6.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/D_XTiylm2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DaRv9jn22.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DaXb9i_E.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/Dccf4VP2.js +0 -24
- package/studio-dist/client/_app/immutable/chunks/DdODs-Sb.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DdekYWer.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/DeHaovsF.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DeRRkRO52.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DeWI5qCn.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DfivR-Md.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DgmxpSo7.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DhPLWrun2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DhhrVdfi.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/Djr2dbcc2.js +0 -37
- package/studio-dist/client/_app/immutable/chunks/DjuRo5vv.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/Djz4EDzO.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DkRfaw-K2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DksB5g4W2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/Dmqenb5z2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DnbToVyf.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/DpGZwlmj.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/Dq0lE5C32.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/Dq54XqHT2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DqK84mbb.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DqjFtSJD.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/DrKWWDpL.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DsQIgu-4.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DsqdgJHS2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DtNkZUkq.js +0 -17
- package/studio-dist/client/_app/immutable/chunks/DutIls4V2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DvxYFW4C.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/Dwp-76GQ.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/DxSZd548.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DxiUMhk0.js +0 -5
- package/studio-dist/client/_app/immutable/chunks/DxslLswf.js +0 -23
- package/studio-dist/client/_app/immutable/chunks/Dy7EjGgb2.js +0 -9
- package/studio-dist/client/_app/immutable/chunks/DyGQ_VXC.js +0 -3
- package/studio-dist/client/_app/immutable/chunks/DySe3kTV2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DyzE2Uxw.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/DzhuJaxE2.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/FmMHyrh6.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/Gxs0J274.js +0 -5
- package/studio-dist/client/_app/immutable/chunks/HwtzDYxN.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/ITRz_Q7H2.js +0 -15
- package/studio-dist/client/_app/immutable/chunks/KDNP98XY2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/LmVjFhpk2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/MiAejGV_.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/Ml4JR6Jz2.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/NU5S3nNs2.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/Oh5zPjv3.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/QZkvJ9vi.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/Rbn8UpBm.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/SPX3gYwn2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/TX-23QW3.js +0 -3
- package/studio-dist/client/_app/immutable/chunks/UyeQuL132.js +0 -12
- package/studio-dist/client/_app/immutable/chunks/VQszoXcV.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/VtZsEMxD.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/W2IeK61p2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/Wadww7ZG.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/WgfA1zWk2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/WxIgAS1f.js +0 -21
- package/studio-dist/client/_app/immutable/chunks/XrsBoOj9.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/Y3PX4poR.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/YxfwqiF32.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/Z7uO1YaO.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/_4ykQk_8.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/_kRcZFVn.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/aQNM7eVA2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/bHKz_Fb2.js +0 -45
- package/studio-dist/client/_app/immutable/chunks/bJRyRGSZ.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/dlzF6lnR.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/fjRbpfEr2.js +0 -26
- package/studio-dist/client/_app/immutable/chunks/imLk4if5.js +0 -3
- package/studio-dist/client/_app/immutable/chunks/lgRG0R-32.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/mFhCjxQJ2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/mgnH6qYg.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/n6M_5LoW.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/nLIOiDZp2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/nab7WB3u2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/orUmAKoW2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/p-fLQDfY2.js +0 -63
- package/studio-dist/client/_app/immutable/chunks/s0-WkOGk2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/sPuXfbUF.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/t4h0vrqR2.js +0 -2
- package/studio-dist/client/_app/immutable/chunks/uE83FKL-.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/uzhXlm0g2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/vTrEsGlD2.js +0 -1
- package/studio-dist/client/_app/immutable/chunks/xJgCk3dx2.js +0 -28
- package/studio-dist/client/_app/immutable/chunks/z0Mt579s2.js +0 -13
- package/studio-dist/client/_app/immutable/entry/app.BoQ7cgT2.js +0 -2
- package/studio-dist/client/_app/immutable/entry/start.Cg1v8DU4.js +0 -1
- package/studio-dist/client/_app/immutable/nodes/25.ddZ1_EFk.js +0 -1
- package/studio-dist/client/_app/immutable/nodes/26.6OcmQbLV.js +0 -1
- package/studio-dist/client/_app/immutable/nodes/4.CCjOEwVU.js +0 -1
- package/studio-dist/server/chunks/0-CvsKDxQ6.js +0 -126
- package/studio-dist/server/chunks/1-ck_x2Hf0.js +0 -9
- package/studio-dist/server/chunks/20-DVU22np7.js +0 -142
- package/studio-dist/server/chunks/23-D_tUnnoc.js +0 -181
- package/studio-dist/server/chunks/24-CVlymvLF.js +0 -151
- package/studio-dist/server/chunks/AwsRestJsonProtocol-BZuoNBmL.js +0 -416
- package/studio-dist/server/chunks/UnionSerde-BflIkhKj.js +0 -2653
- package/studio-dist/server/chunks/_dispatch-ncuRztUQ.js +0 -5597
- package/studio-dist/server/chunks/_server.ts-4NyKAneX.js +0 -116
- package/studio-dist/server/chunks/_server.ts-7hGdxdEI.js +0 -136
- package/studio-dist/server/chunks/_server.ts-B6b3b-yA.js +0 -131
- package/studio-dist/server/chunks/_server.ts-BOgGqaZp.js +0 -144
- package/studio-dist/server/chunks/_server.ts-BV1HiKZ0.js +0 -120
- package/studio-dist/server/chunks/_server.ts-BWp3g6Cr.js +0 -110
- package/studio-dist/server/chunks/_server.ts-C5NF-UgC.js +0 -122
- package/studio-dist/server/chunks/_server.ts-CDMurH5m.js +0 -2301
- package/studio-dist/server/chunks/_server.ts-COJHCgbq.js +0 -127
- package/studio-dist/server/chunks/_server.ts-CUl-Utkt.js +0 -148
- package/studio-dist/server/chunks/_server.ts-D0GAFJRb.js +0 -156
- package/studio-dist/server/chunks/_server.ts-DA6p3pmi.js +0 -117
- package/studio-dist/server/chunks/_server.ts-DThYFaZj.js +0 -160
- package/studio-dist/server/chunks/_server.ts-D_3Pm0gr.js +0 -179
- package/studio-dist/server/chunks/_server.ts-DcHxdMsm.js +0 -144
- package/studio-dist/server/chunks/_server.ts-Dlfadh2I.js +0 -144
- package/studio-dist/server/chunks/_server.ts-JallJnps.js +0 -240
- package/studio-dist/server/chunks/_server.ts-NEFTbJpM.js +0 -142
- package/studio-dist/server/chunks/_server.ts-d-2NvRwX.js +0 -122
- package/studio-dist/server/chunks/_server.ts-rUWMLkIw.js +0 -146
- package/studio-dist/server/chunks/abort-events-CDRAJSqb.js +0 -30
- package/studio-dist/server/chunks/adapters-BkMgPNUM.js +0 -359
- package/studio-dist/server/chunks/adapters2-CQ3PzoaK.js +0 -28
- package/studio-dist/server/chunks/api-mode2-3W-I1-XO.js +0 -36
- package/studio-dist/server/chunks/api2-CmNQzb0b.js +0 -96
- package/studio-dist/server/chunks/attention-consolidate-CidG1jfH.js +0 -485
- package/studio-dist/server/chunks/audit3-DMO_fUGp.js +0 -52
- package/studio-dist/server/chunks/auto-extract-B84La1Vs.js +0 -34
- package/studio-dist/server/chunks/brain-consolidator-JGm6mzFf.js +0 -373
- package/studio-dist/server/chunks/brain-doctor-Dc2WqVbs.js +0 -311
- package/studio-dist/server/chunks/brain-embedding-Djw9ekXu.js +0 -42
- package/studio-dist/server/chunks/brain-lifecycle-BOOa876K.js +0 -969
- package/studio-dist/server/chunks/brain-maintenance-U6VvsvmK.js +0 -133
- package/studio-dist/server/chunks/brain-maintenance2-CwVSmfDT.js +0 -43
- package/studio-dist/server/chunks/brain-retrieval2-exR8mdgh.js +0 -751
- package/studio-dist/server/chunks/brain-search-CpSh-SNi.js +0 -48
- package/studio-dist/server/chunks/brain-search2-CwI2cXgg.js +0 -716
- package/studio-dist/server/chunks/brain-similarity-DI4yzm9e.js +0 -113
- package/studio-dist/server/chunks/brain-stdp2-BxSBIlSr.js +0 -960
- package/studio-dist/server/chunks/brain-writer-handlers-Dwu0QCAA.js +0 -188
- package/studio-dist/server/chunks/brain-writer-thread-6n7wI7Gy.js +0 -360
- package/studio-dist/server/chunks/branch-lock-Cq7zzmFK.js +0 -1118
- package/studio-dist/server/chunks/branch-lock2-CmDc4CZW.js +0 -45
- package/studio-dist/server/chunks/cancelled-child-waiver-audit-DkesrN83.js +0 -54
- package/studio-dist/server/chunks/catalog-model-resolver-Bas9qnoP.js +0 -9
- package/studio-dist/server/chunks/catalog-model-resolver2-Cexk2TN0.js +0 -237
- package/studio-dist/server/chunks/catalog-resolver-CLot3XJO.js +0 -260
- package/studio-dist/server/chunks/catalog-resolver2-JmKb91kY.js +0 -33
- package/studio-dist/server/chunks/chunk-DDP5xfzh.js +0 -39
- package/studio-dist/server/chunks/cleo-home-CCfe6kAQ.js +0 -64
- package/studio-dist/server/chunks/concrete-session2-bb_vxJ2N.js +0 -43
- package/studio-dist/server/chunks/config-DHj9CcFs.js +0 -386
- package/studio-dist/server/chunks/config2-F6PPIn7D.js +0 -35
- package/studio-dist/server/chunks/connections-BMGJVYcS.js +0 -98
- package/studio-dist/server/chunks/credential-pool-vF6NdtT9.js +0 -4600
- package/studio-dist/server/chunks/credentials-C7EJFf5O.js +0 -35
- package/studio-dist/server/chunks/credentials-store-CFygIuB2.js +0 -35
- package/studio-dist/server/chunks/cross-db-cleanup-1LWTUKPi.js +0 -147
- package/studio-dist/server/chunks/data-accessor-CWgVndbR.js +0 -72
- package/studio-dist/server/chunks/data-safety-central-DaFxK27G.js +0 -683
- package/studio-dist/server/chunks/decisions-CmVXV2-H.js +0 -574
- package/studio-dist/server/chunks/decisions2-XQsSYdxa.js +0 -48
- package/studio-dist/server/chunks/depends-waiver-audit-CUmlBYHx.js +0 -56
- package/studio-dist/server/chunks/dialectic-evaluator2-BOyyXhdI.js +0 -96
- package/studio-dist/server/chunks/dist-es2-DQy2Mjn_.js +0 -43
- package/studio-dist/server/chunks/dist-es3-CBygU4n5.js +0 -365
- package/studio-dist/server/chunks/dist-es4-CavbNu4B.js +0 -162
- package/studio-dist/server/chunks/dist-es5-Crpm8Wsl.js +0 -465
- package/studio-dist/server/chunks/dist-es6-CgePHzh4.js +0 -99
- package/studio-dist/server/chunks/dist-es7-k6c5GEd7.js +0 -311
- package/studio-dist/server/chunks/dist-es8-Bd9v0_pE.js +0 -91
- package/studio-dist/server/chunks/dist3-23bsJhRw.js +0 -27
- package/studio-dist/server/chunks/dist4-DmC1zSXi.js +0 -35618
- package/studio-dist/server/chunks/dual-scope-db-DKnWu1KM.js +0 -5672
- package/studio-dist/server/chunks/dual-scope-db2-Dht3luRw.js +0 -31
- package/studio-dist/server/chunks/duplicate-bypass-audit-BN5w1H2y.js +0 -36
- package/studio-dist/server/chunks/duplicate-detector-CaVFMKdE.js +0 -692
- package/studio-dist/server/chunks/edge-types-CgBvb0w1.js +0 -28
- package/studio-dist/server/chunks/embedding-local-xEnym8Ho.js +0 -92
- package/studio-dist/server/chunks/event-streams-Bi2p_fVo.js +0 -232
- package/studio-dist/server/chunks/execution-learning-BVCw7Plq.js +0 -278
- package/studio-dist/server/chunks/exodus-BBuuN6aA.js +0 -2594
- package/studio-dist/server/chunks/externalDataInterceptor-C3C4cObe.js +0 -21
- package/studio-dist/server/chunks/extraction-gate-DDNBq7gu.js +0 -48
- package/studio-dist/server/chunks/extraction-gate2-D77EZBQ6.js +0 -375
- package/studio-dist/server/chunks/getSSOTokenFromFile-yZAJxDci.js +0 -21
- package/studio-dist/server/chunks/governor2-CtfV3wfX.js +0 -923
- package/studio-dist/server/chunks/graph-auto-populate-Dmsr9ZJM.js +0 -42
- package/studio-dist/server/chunks/graph-auto-populate2-Cz0qeebM.js +0 -156
- package/studio-dist/server/chunks/graph-memory-bridge-CY8ft_d7.js +0 -43
- package/studio-dist/server/chunks/graph-memory-bridge2-Cd0XZwqc.js +0 -429
- package/studio-dist/server/chunks/handler-helpers-AANBGA_p.js +0 -49
- package/studio-dist/server/chunks/hash-Cm6yMET4.js +0 -14
- package/studio-dist/server/chunks/health-monitor-FepUZN1m.js +0 -106
- package/studio-dist/server/chunks/identity-DRpurt56.js +0 -30
- package/studio-dist/server/chunks/identity2-DeAB5RXE.js +0 -114
- package/studio-dist/server/chunks/index-61916rmV.js +0 -632
- package/studio-dist/server/chunks/index-DAgVDouG.js +0 -268
- package/studio-dist/server/chunks/index-Dtt_h58T.js +0 -2116
- package/studio-dist/server/chunks/indexes-DZ52grq6.js +0 -615
- package/studio-dist/server/chunks/json-Bfixam3g.js +0 -126
- package/studio-dist/server/chunks/learnings-D6Y3YGMU.js +0 -47
- package/studio-dist/server/chunks/learnings2-MwBdR9vb.js +0 -171
- package/studio-dist/server/chunks/lifecycle-ops2-V2CR5-7X.js +0 -121
- package/studio-dist/server/chunks/list-BhObczvn.js +0 -229
- package/studio-dist/server/chunks/living-brain2-j0B_Ir8j.js +0 -285
- package/studio-dist/server/chunks/llm-backend-resolver-D4ANvUPL.js +0 -295
- package/studio-dist/server/chunks/llm-extraction-DVCu4heR.js +0 -408
- package/studio-dist/server/chunks/loadSharedConfigFiles-umvW7kuz.js +0 -73
- package/studio-dist/server/chunks/loadSso-iidd5iKx.js +0 -599
- package/studio-dist/server/chunks/local-model-fit-B0TxifnX.js +0 -53
- package/studio-dist/server/chunks/local-model-fit2-BMqo6GJm.js +0 -2664
- package/studio-dist/server/chunks/lock-CA7d6lj7.js +0 -57
- package/studio-dist/server/chunks/logger-DQIoyZbq.js +0 -34
- package/studio-dist/server/chunks/memory-BUbicBbE.js +0 -618
- package/studio-dist/server/chunks/memory-accessor-i3P-RHSg.js +0 -42
- package/studio-dist/server/chunks/memory-accessor2-B981tHDR.js +0 -467
- package/studio-dist/server/chunks/memory-bridge-BOlEWg9w.js +0 -424
- package/studio-dist/server/chunks/memory-sqlite2-B7dq8doO.js +0 -42
- package/studio-dist/server/chunks/model-runner2-B71xjp4y.js +0 -43
- package/studio-dist/server/chunks/mvi-helpers-BNsJ8ZpQ.js +0 -59
- package/studio-dist/server/chunks/nexus-plasticity-BTfU8cW_.js +0 -269
- package/studio-dist/server/chunks/nexus-risk-audit-p379-TU5.js +0 -54
- package/studio-dist/server/chunks/nexus-schema-zeygY8OD.js +0 -11
- package/studio-dist/server/chunks/nexus-schema2-DP0Qd7CA.js +0 -444
- package/studio-dist/server/chunks/nexus-sqlite-BVNIpwc7.js +0 -36
- package/studio-dist/server/chunks/nexus-sqlite2-BBfY2xnY.js +0 -1103
- package/studio-dist/server/chunks/node-http-handler-CJI8kn7X.js +0 -386
- package/studio-dist/server/chunks/observe-Bo9veHGe.js +0 -47
- package/studio-dist/server/chunks/observe2-wzO0MaMY.js +0 -245
- package/studio-dist/server/chunks/observer-reflector-BwNOuq1d.js +0 -62
- package/studio-dist/server/chunks/observer-reflector2-ggtC1hmk.js +0 -478
- package/studio-dist/server/chunks/on-open-Wpcw7DV4.js +0 -740
- package/studio-dist/server/chunks/open-cleo-db--8sYNaYY.js +0 -70
- package/studio-dist/server/chunks/parseKnownFiles-Dg0pMFcT.js +0 -18
- package/studio-dist/server/chunks/parseUrl-qgGfl-Vh.js +0 -120
- package/studio-dist/server/chunks/paths-CV7S5-Zm.js +0 -30012
- package/studio-dist/server/chunks/patterns-lh5kn13I.js +0 -48
- package/studio-dist/server/chunks/patterns2-CzIcT-ai.js +0 -177
- package/studio-dist/server/chunks/pipeline-stage-IB_pOft-.js +0 -63
- package/studio-dist/server/chunks/prediction-D1lSGJ4c.js +0 -217
- package/studio-dist/server/chunks/premature-close-audit-VG09uAco.js +0 -53
- package/studio-dist/server/chunks/project-context-BjiqfEBi.js +0 -166
- package/studio-dist/server/chunks/provider-registry2-Cu7rAF0R.js +0 -35
- package/studio-dist/server/chunks/quality-feedback-CuCGEI6S.js +0 -371
- package/studio-dist/server/chunks/quality-scoring-CCPuRQmJ.js +0 -160
- package/studio-dist/server/chunks/query-ops-DCrjbZb9.js +0 -78
- package/studio-dist/server/chunks/query-promise-BkPmGPJy.js +0 -1257
- package/studio-dist/server/chunks/readFile-CxwXhymG.js +0 -31
- package/studio-dist/server/chunks/registry-CL2gN1zd.js +0 -27
- package/studio-dist/server/chunks/registry2-DoPYJnUW.js +0 -233
- package/studio-dist/server/chunks/registry3-BajEb-ll.js +0 -42
- package/studio-dist/server/chunks/registry4-DCqffZkT.js +0 -142
- package/studio-dist/server/chunks/retry-B3oEKYpp.js +0 -105
- package/studio-dist/server/chunks/role-executor-CC8BU54L.js +0 -25379
- package/studio-dist/server/chunks/role-resolver-D9QaDT0e.js +0 -6544
- package/studio-dist/server/chunks/role-resolver2-nkhzS1oy.js +0 -37
- package/studio-dist/server/chunks/rollup-CiefjN_Y.js +0 -194
- package/studio-dist/server/chunks/safety-data-accessor-CniDmGJO.js +0 -276
- package/studio-dist/server/chunks/service-connections-accessor-yBCdcgU-.js +0 -282
- package/studio-dist/server/chunks/session-factory-vbengc42.js +0 -96
- package/studio-dist/server/chunks/session-grade-BF4ZZtN_.js +0 -244
- package/studio-dist/server/chunks/session-journal-Bvey70Ur.js +0 -235
- package/studio-dist/server/chunks/session-narrative-BirZINSU.js +0 -304
- package/studio-dist/server/chunks/session-store--N_xHxUH.js +0 -557
- package/studio-dist/server/chunks/session-store2-DAM-eVTH.js +0 -43
- package/studio-dist/server/chunks/sessions-33DD4hkt.js +0 -2273
- package/studio-dist/server/chunks/sessions2-BHswKRDP.js +0 -50
- package/studio-dist/server/chunks/sigil-B-RznFXz.js +0 -33
- package/studio-dist/server/chunks/sigil2-jRMG5DuR.js +0 -47
- package/studio-dist/server/chunks/signin-BAsW3mM8.js +0 -644
- package/studio-dist/server/chunks/sleep-consolidation-BnSwXrvq.js +0 -823
- package/studio-dist/server/chunks/specialists-B_ZbpQlK.js +0 -441
- package/studio-dist/server/chunks/sqlite-Bm5LzbPs.js +0 -5977
- package/studio-dist/server/chunks/sqlite-backup-CFG1-b2e.js +0 -42
- package/studio-dist/server/chunks/sqlite-data-accessor-DD_RFX6r.js +0 -987
- package/studio-dist/server/chunks/sqlite-data-accessor2-CRmgNBnq.js +0 -44
- package/studio-dist/server/chunks/sqlite-native-BwlIqtbs.js +0 -42
- package/studio-dist/server/chunks/sqlite2-CUPut2fh.js +0 -42
- package/studio-dist/server/chunks/src2-DK8DKufK.js +0 -290
- package/studio-dist/server/chunks/src3-BJjf7XRG.js +0 -798
- package/studio-dist/server/chunks/src4-DNleK_t_.js +0 -28
- package/studio-dist/server/chunks/sso-oidc-eUvwseuL.js +0 -861
- package/studio-dist/server/chunks/storage-B9UA3BHR.js +0 -198
- package/studio-dist/server/chunks/sts-g7LDMLEd.js +0 -4655
- package/studio-dist/server/chunks/surprisal-CwTfWQi8.js +0 -224
- package/studio-dist/server/chunks/surprisal-tree-7dfHsuw1.js +0 -230
- package/studio-dist/server/chunks/system-resolver2-Bzhue_zQ.js +0 -53
- package/studio-dist/server/chunks/tasks-SHX7UPGY.js +0 -19694
- package/studio-dist/server/chunks/tasks-schema2-CTMoQKQy.js +0 -42
- package/studio-dist/server/chunks/temporal-supersession-DP4GPG_B.js +0 -298
- package/studio-dist/server/chunks/token-cAhAD9f9.js +0 -139
- package/studio-dist/server/chunks/token-util-D6drEz8_.js +0 -353
- package/studio-dist/server/chunks/token-util2-8UPSGvbb.js +0 -97
- package/studio-dist/server/chunks/transcript-scanner-kJWhWmlg.js +0 -53
- package/studio-dist/server/chunks/transformers.node-_xbxmK5p.js +0 -38475
- package/studio-dist/server/chunks/typed-query-l1D_QElt.js +0 -18
- package/studio-dist/server/chunks/unique-constraint-BZrrwgwc.js +0 -88
- package/studio-dist/server/chunks/update-B2YVBZG0.js +0 -1594
- package/studio-dist/server/chunks/user-profile-B61ZhVmC.js +0 -89
- package/studio-dist/server/chunks/utils-BPSZyajG.js +0 -1176
- package/studio-dist/server/chunks/validation-rules-CE27rtoF.js +0 -44
- package/studio-dist/server/chunks/zod-DsAeKNLm.js +0 -141
- /package/studio-dist/client/_app/immutable/chunks/{CQCxd1p9.js → B8WnZMYa.js} +0 -0
- /package/studio-dist/client/_app/immutable/chunks/{D13Quv9e2.js → B_0_YCYG.js} +0 -0
- /package/studio-dist/client/_app/immutable/chunks/{djL6V-tr.js → CqgtdAx_.js} +0 -0
- /package/studio-dist/client/_app/immutable/chunks/{_FU7h_8p2.js → KrUPZzXZ.js} +0 -0
|
@@ -1,1103 +0,0 @@
|
|
|
1
|
-
import { b as getLogger, g as getCleoHome } from './paths-CV7S5-Zm.js';
|
|
2
|
-
import { r as resolveDualScopeDbPath, b as createCleoRuntime, S as SQLiteAsyncSession, l as SQLiteAsyncPreparedQuery, m as SQLiteAsyncTransaction, n as SQLiteDialect, p as SQLiteAsyncDatabase, d as openDualScopeDb, q as resolveCorePackageMigrationsFolder, t as reconcileJournal, v as resolveConsolidatedJournalSiblings, x as migrateWithRetry, y as isSqliteBusy, z as ensureColumns } from './dual-scope-db-DKnWu1KM.js';
|
|
3
|
-
import { resolve, join } from 'node:path';
|
|
4
|
-
import './nexus-schema2-DP0Qd7CA.js';
|
|
5
|
-
import { existsSync, copyFileSync } from 'node:fs';
|
|
6
|
-
import { e as entityKind, s as sql, Y as jitCompatCheck } from './utils-BPSZyajG.js';
|
|
7
|
-
import { r as DrizzleQueryError } from './query-promise-BkPmGPJy.js';
|
|
8
|
-
import { N as NoopLogger, D as DefaultLogger } from './logger-DQIoyZbq.js';
|
|
9
|
-
import { DatabaseSync } from 'node:sqlite';
|
|
10
|
-
|
|
11
|
-
//#region ../core/dist/store/ports/domain-binding.js
|
|
12
|
-
/**
|
|
13
|
-
* Path-keyed domain binding registry — the single owner of every per-domain
|
|
14
|
-
* Drizzle wrapper in the CLEO runtime.
|
|
15
|
-
*
|
|
16
|
-
* ## Why this module exists (E6-L13 · T12037)
|
|
17
|
-
*
|
|
18
|
-
* Before this leaf, each store facade (`sqlite.ts`, `memory-sqlite.ts`,
|
|
19
|
-
* `conduit-sqlite.ts`, `nexus-sqlite.ts`, `skills-db.ts`) owned its OWN
|
|
20
|
-
* process-global singleton quartet:
|
|
21
|
-
*
|
|
22
|
-
* ```ts
|
|
23
|
-
* let _db: NodeSQLiteDatabase | null = null;
|
|
24
|
-
* let _nativeDb: DatabaseSync | null = null;
|
|
25
|
-
* let _dbPath: string | null = null;
|
|
26
|
-
* let _initPromise: Promise<NodeSQLiteDatabase> | null = null;
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
* Five independent caches over ONE shared `DatabaseSync` produced a documented
|
|
30
|
-
* class of defects:
|
|
31
|
-
*
|
|
32
|
-
* - **Last-project-wins** — `_dbPath` held a single project. Touching project B
|
|
33
|
-
* reset the singleton, so an interleaved project-A query re-opened and
|
|
34
|
-
* re-migrated on every alternation (thrash, not just slowness).
|
|
35
|
-
* - **Cross-domain staleness** — the tasks singleton could reference a
|
|
36
|
-
* `DatabaseSync` that the brain domain had already closed (T12019/T12020),
|
|
37
|
-
* surfacing as `database is not open` or, worse, a silently-nulled
|
|
38
|
-
* `sourceSessionId`.
|
|
39
|
-
* - **Band-aid retry loops** — both `getDb` and `getBrainDb` grew bounded
|
|
40
|
-
* re-acquisition loops (T12035) purely to paper over the above.
|
|
41
|
-
*
|
|
42
|
-
* This module replaces all five with ONE registry keyed by
|
|
43
|
-
* `${scope}::${canonical dbPath}::${domain}`, layered on the
|
|
44
|
-
* {@link CleoRuntime} store registry (T12036). A binding is valid only while
|
|
45
|
-
* the {@link ProjectStore} / {@link GlobalStore} instance it was established
|
|
46
|
-
* against is still the one the runtime hands out AND its native handle is
|
|
47
|
-
* open. Any eviction — a `close()`, a `_resetDualScopeDbCache`, an external
|
|
48
|
-
* teardown — yields a fresh store object, which invalidates every binding
|
|
49
|
-
* derived from it by identity comparison. No liveness polling, no retry loop,
|
|
50
|
-
* no "last opened project".
|
|
51
|
-
*
|
|
52
|
-
* ## What a domain owns after this leaf
|
|
53
|
-
*
|
|
54
|
-
* A domain owns its `establish` function — the schema reconciliation it must
|
|
55
|
-
* run against a native handle (legacy Drizzle wrapping, `runMigrations`,
|
|
56
|
-
* vec0 extension loading, seed rows). It no longer owns caching, path
|
|
57
|
-
* resolution, single-flight, or liveness. Those are this module's job.
|
|
58
|
-
*
|
|
59
|
-
* @packageDocumentation
|
|
60
|
-
* @task T12037 (E6-L13)
|
|
61
|
-
* @epic T11249 (E6)
|
|
62
|
-
* @saga T11242 (SG-DB-SUBSTRATE-V2)
|
|
63
|
-
*/
|
|
64
|
-
/**
|
|
65
|
-
* The process-wide {@link CleoRuntime} instance backing every domain port.
|
|
66
|
-
*
|
|
67
|
-
* A single runtime is correct here: the runtime registry is itself path-keyed,
|
|
68
|
-
* so one instance serves every project the process touches. It is lazily
|
|
69
|
-
* constructed so importing this module has no side effects (a hard constraint
|
|
70
|
-
* — the Gate-13 chokepoint audit rejects import-time DB work).
|
|
71
|
-
*/
|
|
72
|
-
var _runtime = null;
|
|
73
|
-
/**
|
|
74
|
-
* Get (or lazily create) the process-wide {@link CleoRuntime}.
|
|
75
|
-
*
|
|
76
|
-
* @returns The shared runtime store registry.
|
|
77
|
-
*/
|
|
78
|
-
function getCleoRuntime() {
|
|
79
|
-
if (!_runtime) _runtime = createCleoRuntime();
|
|
80
|
-
return _runtime;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Established bindings, keyed `${scope}::${canonical dbPath}::${domain}`.
|
|
84
|
-
* Type-erased; {@link bindProjectDomain} re-applies the caller's type at the
|
|
85
|
-
* boundary, which is sound because the key includes the domain id and each
|
|
86
|
-
* domain passes exactly one `establish` shape.
|
|
87
|
-
*/
|
|
88
|
-
var _bindings = /* @__PURE__ */ new Map();
|
|
89
|
-
/**
|
|
90
|
-
* In-flight `establish` calls, same keying as {@link _bindings}. Concurrent
|
|
91
|
-
* binders for one key share a single establishment (single-flight).
|
|
92
|
-
*/
|
|
93
|
-
var _inflight = /* @__PURE__ */ new Map();
|
|
94
|
-
/**
|
|
95
|
-
* Build the composite registry key for a domain binding.
|
|
96
|
-
*
|
|
97
|
-
* @param scope - The dual-scope discriminator.
|
|
98
|
-
* @param dbPath - Canonical (already `path.resolve`d) database path.
|
|
99
|
-
* @param domain - Stable domain id (e.g. `'tasks'`, `'brain'`).
|
|
100
|
-
*/
|
|
101
|
-
function bindingKey(scope, dbPath, domain) {
|
|
102
|
-
return `${scope}::${dbPath}::${domain}`;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Extract the underlying `DatabaseSync` from a store's Drizzle handle.
|
|
106
|
-
*
|
|
107
|
-
* Drizzle's `node:sqlite` driver exposes the native connection as `$client`.
|
|
108
|
-
* This is the ONLY place that reach-through happens — domains receive the
|
|
109
|
-
* already-extracted handle.
|
|
110
|
-
*
|
|
111
|
-
* @param store - The runtime store to unwrap.
|
|
112
|
-
* @returns The live native connection.
|
|
113
|
-
* @throws If the Drizzle handle exposes no `$client`.
|
|
114
|
-
*/
|
|
115
|
-
function nativeOf(store) {
|
|
116
|
-
const native = store.db.$client;
|
|
117
|
-
if (!native) throw new Error(`T12037: CleoRuntime store for ${store.scope}::${store.dbPath} exposed no $client — cannot bind a domain schema to it.`);
|
|
118
|
-
return native;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Reuse the cached binding for `key` if it is still valid.
|
|
122
|
-
*
|
|
123
|
-
* A binding is valid iff it was established against the SAME store instance
|
|
124
|
-
* the runtime just returned (identity, not path — a reopened store is a new
|
|
125
|
-
* object) and that store's native connection is still open.
|
|
126
|
-
*
|
|
127
|
-
* @param key - Composite registry key.
|
|
128
|
-
* @param store - The store the runtime returned for this open.
|
|
129
|
-
* @returns The still-valid row, or `undefined` if it must be re-established.
|
|
130
|
-
*/
|
|
131
|
-
function reuseValid(key, store) {
|
|
132
|
-
const row = _bindings.get(key);
|
|
133
|
-
if (!row) return void 0;
|
|
134
|
-
if (row.store !== store || !store.isOpen || !row.native.isOpen) {
|
|
135
|
-
_bindings.delete(key);
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
return row;
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Establish (or reuse) `domain`'s binding against a store, single-flighted.
|
|
142
|
-
*
|
|
143
|
-
* @param key - Composite registry key.
|
|
144
|
-
* @param store - The store to bind against.
|
|
145
|
-
* @param establish - Domain schema reconciliation.
|
|
146
|
-
*/
|
|
147
|
-
async function bindAgainst(key, store, establish) {
|
|
148
|
-
const cached = reuseValid(key, store);
|
|
149
|
-
if (cached) return cached;
|
|
150
|
-
const pending = _inflight.get(key);
|
|
151
|
-
if (pending) {
|
|
152
|
-
const row = await pending;
|
|
153
|
-
if (row.store === store && row.native.isOpen) return row;
|
|
154
|
-
return bindAgainst(key, store, establish);
|
|
155
|
-
}
|
|
156
|
-
const native = nativeOf(store);
|
|
157
|
-
const flight = (async () => {
|
|
158
|
-
const row = {
|
|
159
|
-
store,
|
|
160
|
-
native,
|
|
161
|
-
db: await establish(native, store)
|
|
162
|
-
};
|
|
163
|
-
if (store.isOpen && native.isOpen) _bindings.set(key, row);
|
|
164
|
-
return row;
|
|
165
|
-
})();
|
|
166
|
-
_inflight.set(key, flight);
|
|
167
|
-
try {
|
|
168
|
-
return await flight;
|
|
169
|
-
} finally {
|
|
170
|
-
if (_inflight.get(key) === flight) _inflight.delete(key);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* Maximum consecutive attempts to obtain a binding over a LIVE connection.
|
|
175
|
-
*
|
|
176
|
-
* The shared consolidated `DatabaseSync` can be closed in the microtask gap
|
|
177
|
-
* between the runtime resolving a store and `establish` finishing against it
|
|
178
|
-
* (another domain's `closeDb()`, a `_resetDualScopeDbCache`, a fire-and-forget
|
|
179
|
-
* brain write crossing a test boundary). One reacquisition is enough: closing
|
|
180
|
-
* the dead store evicts it from BOTH the runtime registry and the dual-scope
|
|
181
|
-
* chokepoint cache, so the retry necessarily opens a fresh connection.
|
|
182
|
-
*
|
|
183
|
-
* Before this module each facade carried its own copy of this loop
|
|
184
|
-
* (T12020 · T12035). It lives here now — one implementation, every domain.
|
|
185
|
-
*/
|
|
186
|
-
var MAX_LIVENESS_ATTEMPTS = 2;
|
|
187
|
-
/**
|
|
188
|
-
* Obtain a binding whose connection is guaranteed live, with bounded
|
|
189
|
-
* reacquisition.
|
|
190
|
-
*
|
|
191
|
-
* @param scope - Dual-scope discriminator, for the eviction filter.
|
|
192
|
-
* @param key - Composite registry key.
|
|
193
|
-
* @param dbPath - Canonical database path, for the eviction filter.
|
|
194
|
-
* @param openStore - Opens (or reuses) the store for this key.
|
|
195
|
-
* @param establish - Domain schema reconciliation.
|
|
196
|
-
* @returns A row whose `native` was open at publication.
|
|
197
|
-
* @throws When every attempt yielded a dead connection.
|
|
198
|
-
*/
|
|
199
|
-
async function bindLive(scope, key, dbPath, openStore, establish) {
|
|
200
|
-
let lastError;
|
|
201
|
-
for (let attempt = 0; attempt < MAX_LIVENESS_ATTEMPTS; attempt += 1) {
|
|
202
|
-
let store;
|
|
203
|
-
try {
|
|
204
|
-
store = await openStore();
|
|
205
|
-
} catch (err) {
|
|
206
|
-
lastError = err;
|
|
207
|
-
releaseDomainBindings({
|
|
208
|
-
scope,
|
|
209
|
-
dbPath
|
|
210
|
-
});
|
|
211
|
-
if (attempt + 1 >= MAX_LIVENESS_ATTEMPTS) throw err;
|
|
212
|
-
continue;
|
|
213
|
-
}
|
|
214
|
-
try {
|
|
215
|
-
const row = await bindAgainst(key, store, establish);
|
|
216
|
-
if (row.store.isOpen && row.native.isOpen) return row;
|
|
217
|
-
} catch (err) {
|
|
218
|
-
lastError = err;
|
|
219
|
-
if (store.isOpen) throw err;
|
|
220
|
-
}
|
|
221
|
-
releaseDomainBindings({
|
|
222
|
-
scope,
|
|
223
|
-
dbPath
|
|
224
|
-
});
|
|
225
|
-
try {
|
|
226
|
-
store.close();
|
|
227
|
-
} catch {}
|
|
228
|
-
}
|
|
229
|
-
if (lastError !== void 0) throw lastError;
|
|
230
|
-
throw new Error(`T12037: could not bind ${key} over a live connection after ${MAX_LIVENESS_ATTEMPTS} attempts — the consolidated handle was closed each time.`);
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* Bind a project-scope domain schema to the {@link ProjectStore} for `cwd`.
|
|
234
|
-
*
|
|
235
|
-
* This is the replacement for every `getXxxDb(cwd)` project-domain facade.
|
|
236
|
-
* The returned binding carries the store itself, so callers that need a
|
|
237
|
-
* cross-domain transaction hold an explicit handle rather than reaching for a
|
|
238
|
-
* process global.
|
|
239
|
-
*
|
|
240
|
-
* @typeParam TDb - The domain's Drizzle handle type.
|
|
241
|
-
* @param domain - Stable domain id; part of the registry key.
|
|
242
|
-
* @param cwd - Project working directory. Resolved to the canonical
|
|
243
|
-
* `cleo.db` path and forwarded as `exodusCwd` so a port open arms the
|
|
244
|
-
* exodus-on-open auto-migration exactly like the facade it replaces.
|
|
245
|
-
* @param establish - Reconcile the domain's schema against the native handle
|
|
246
|
-
* and return the domain-typed Drizzle instance. Called once per
|
|
247
|
-
* (path, domain, store instance); MUST be idempotent because a store
|
|
248
|
-
* eviction re-runs it.
|
|
249
|
-
* @returns The live {@link DomainBinding}.
|
|
250
|
-
*/
|
|
251
|
-
async function bindProjectDomain(domain, cwd, establish) {
|
|
252
|
-
const dbPath = resolve(resolveDualScopeDbPath("project", cwd));
|
|
253
|
-
return await bindLive("project", bindingKey("project", dbPath, domain), dbPath, () => getCleoRuntime().openProject(dbPath, { exodusCwd: cwd }), establish);
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* Bind a global-scope domain schema to the {@link GlobalStore}.
|
|
257
|
-
*
|
|
258
|
-
* This is the replacement for every `getXxxDb()` global-domain facade
|
|
259
|
-
* (nexus, skills, agents, telemetry).
|
|
260
|
-
*
|
|
261
|
-
* @typeParam TDb - The domain's Drizzle handle type.
|
|
262
|
-
* @param domain - Stable domain id; part of the registry key.
|
|
263
|
-
* @param establish - See {@link bindProjectDomain}.
|
|
264
|
-
* @param cwd - Optional cwd forwarded as `exodusCwd` for the global scope's
|
|
265
|
-
* own legacy-fleet auto-migration.
|
|
266
|
-
*/
|
|
267
|
-
async function bindGlobalDomain(domain, establish, cwd) {
|
|
268
|
-
const dbPath = resolve(resolveDualScopeDbPath("global"));
|
|
269
|
-
return await bindLive("global", bindingKey("global", dbPath, domain), dbPath, () => getCleoRuntime().openGlobal({ exodusCwd: cwd }), establish);
|
|
270
|
-
}
|
|
271
|
-
/**
|
|
272
|
-
* Bind a global-scope domain schema to an EXPLICIT database path.
|
|
273
|
-
*
|
|
274
|
-
* The path-aware sibling of {@link bindGlobalDomain}, for domains whose
|
|
275
|
-
* lifecycle API accepts an on-disk path — notably the skills registry's
|
|
276
|
-
* test-sandbox `{ path }` override. Never arms exodus-on-open.
|
|
277
|
-
*
|
|
278
|
-
* @typeParam TDb - The domain's Drizzle handle type.
|
|
279
|
-
* @param domain - Stable domain id.
|
|
280
|
-
* @param dbPath - Absolute path to a global-scope `cleo.db`.
|
|
281
|
-
* @param establish - See {@link bindProjectDomain}.
|
|
282
|
-
*/
|
|
283
|
-
async function bindGlobalDomainAtPath(domain, dbPath, establish) {
|
|
284
|
-
const normalized = resolve(dbPath);
|
|
285
|
-
return await bindLive("global", bindingKey("global", normalized, domain), normalized, () => getCleoRuntime().openGlobalAt(normalized), establish);
|
|
286
|
-
}
|
|
287
|
-
/**
|
|
288
|
-
* Synchronously read an ALREADY-established binding at an EXPLICIT path.
|
|
289
|
-
*
|
|
290
|
-
* @typeParam TDb - The domain's Drizzle handle type.
|
|
291
|
-
* @param scope - Dual-scope discriminator.
|
|
292
|
-
* @param dbPath - Absolute database path.
|
|
293
|
-
* @param domain - Stable domain id.
|
|
294
|
-
*/
|
|
295
|
-
function peekDomainAtPath(scope, dbPath, domain) {
|
|
296
|
-
const row = _bindings.get(bindingKey(scope, resolve(dbPath), domain));
|
|
297
|
-
if (!row?.native.isOpen) return null;
|
|
298
|
-
return row;
|
|
299
|
-
}
|
|
300
|
-
/**
|
|
301
|
-
* Drop cached bindings.
|
|
302
|
-
*
|
|
303
|
-
* Dropping a binding does NOT close any connection — the runtime registry and
|
|
304
|
-
* the dual-scope chokepoint own connection lifecycle. This only forces the
|
|
305
|
-
* next bind to re-run the domain's `establish`.
|
|
306
|
-
*
|
|
307
|
-
* @param filter - Restrict the drop. Omit any field to match all values of it.
|
|
308
|
-
* `{ scope: 'project' }` drops every project-domain binding;
|
|
309
|
-
* `{ domain: 'brain' }` drops the brain binding for every project.
|
|
310
|
-
*/
|
|
311
|
-
function releaseDomainBindings(filter) {
|
|
312
|
-
if (!filter) {
|
|
313
|
-
_bindings.clear();
|
|
314
|
-
return;
|
|
315
|
-
}
|
|
316
|
-
const wantPath = filter.dbPath === void 0 ? void 0 : resolve(filter.dbPath);
|
|
317
|
-
for (const key of [..._bindings.keys()]) {
|
|
318
|
-
const sep = key.indexOf("::");
|
|
319
|
-
const lastSep = key.lastIndexOf("::");
|
|
320
|
-
const scope = key.slice(0, sep);
|
|
321
|
-
const dbPath = key.slice(sep + 2, lastSep);
|
|
322
|
-
const domain = key.slice(lastSep + 2);
|
|
323
|
-
if (filter.scope !== void 0 && scope !== filter.scope) continue;
|
|
324
|
-
if (wantPath !== void 0 && dbPath !== wantPath) continue;
|
|
325
|
-
if (filter.domain !== void 0 && domain !== filter.domain) continue;
|
|
326
|
-
_bindings.delete(key);
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
/**
|
|
330
|
-
* Synchronously look up the native `DatabaseSync` of an ALREADY-established
|
|
331
|
-
* project-domain binding.
|
|
332
|
-
*
|
|
333
|
-
* This exists solely to keep the legacy synchronous native getters
|
|
334
|
-
* (`getNativeDb`, `getNativeTasksDb`, `getBrainNativeDb`) working while their
|
|
335
|
-
* call sites migrate to the async binding. Unlike the module-global they
|
|
336
|
-
* replace, this lookup is **path-keyed** — passing the caller's `cwd` returns
|
|
337
|
-
* that project's handle rather than "whichever project was opened last".
|
|
338
|
-
*
|
|
339
|
-
* Returns `null` when nothing is bound yet or the connection has since
|
|
340
|
-
* closed; callers must have awaited the domain's async binder first.
|
|
341
|
-
*
|
|
342
|
-
* @param domain - Stable domain id.
|
|
343
|
-
* @param cwd - Project working directory; resolved to the canonical path.
|
|
344
|
-
* @returns The live native connection, or `null`.
|
|
345
|
-
*
|
|
346
|
-
* @deprecated Read `.native` from the {@link DomainBinding} instead. Removed
|
|
347
|
-
* when the last synchronous native getter is retired (T12040 · E6-L16).
|
|
348
|
-
*/
|
|
349
|
-
function boundProjectNative(domain, cwd) {
|
|
350
|
-
return peekProjectDomain(domain, cwd)?.native ?? null;
|
|
351
|
-
}
|
|
352
|
-
/**
|
|
353
|
-
* Synchronously read an ALREADY-established project-domain binding without
|
|
354
|
-
* opening anything.
|
|
355
|
-
*
|
|
356
|
-
* Returns `null` when the domain is unbound for that project or its
|
|
357
|
-
* connection has closed. Unlike {@link bindProjectDomain} this never triggers
|
|
358
|
-
* an open, so it is safe on synchronous code paths (accessor predicates,
|
|
359
|
-
* health probes) that must not force a migration.
|
|
360
|
-
*
|
|
361
|
-
* @typeParam TDb - The domain's Drizzle handle type, as passed to
|
|
362
|
-
* {@link bindProjectDomain}. Unchecked at runtime — the caller is
|
|
363
|
-
* responsible for using the same type it bound with.
|
|
364
|
-
* @param domain - Stable domain id.
|
|
365
|
-
* @param cwd - Project working directory.
|
|
366
|
-
*/
|
|
367
|
-
function peekProjectDomain(domain, cwd) {
|
|
368
|
-
const dbPath = resolve(resolveDualScopeDbPath("project", cwd));
|
|
369
|
-
const row = _bindings.get(bindingKey("project", dbPath, domain));
|
|
370
|
-
if (row?.native.isOpen) return row;
|
|
371
|
-
if (cwd !== void 0) return null;
|
|
372
|
-
const suffix = `::${domain}`;
|
|
373
|
-
let sole;
|
|
374
|
-
for (const [key, candidate] of _bindings) {
|
|
375
|
-
if (!key.startsWith("project::") || !key.endsWith(suffix)) continue;
|
|
376
|
-
if (!candidate.native.isOpen) continue;
|
|
377
|
-
if (sole) return null;
|
|
378
|
-
sole = candidate;
|
|
379
|
-
}
|
|
380
|
-
return sole ?? null;
|
|
381
|
-
}
|
|
382
|
-
/**
|
|
383
|
-
* Synchronous sibling of {@link peekProjectDomain} for the global scope.
|
|
384
|
-
*
|
|
385
|
-
* @typeParam TDb - The domain's Drizzle handle type.
|
|
386
|
-
* @param domain - Stable domain id.
|
|
387
|
-
*/
|
|
388
|
-
function peekGlobalDomain(domain) {
|
|
389
|
-
const dbPath = resolve(resolveDualScopeDbPath("global"));
|
|
390
|
-
const row = _bindings.get(bindingKey("global", dbPath, domain));
|
|
391
|
-
if (!row || !row.native.isOpen) return null;
|
|
392
|
-
return row;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
//#region src/node-sqlite/session.ts
|
|
396
|
-
var NodeSQLiteSession = class extends SQLiteAsyncSession {
|
|
397
|
-
static [entityKind] = "SQLJsSession";
|
|
398
|
-
logger;
|
|
399
|
-
constructor(client, dialect, relations, options = {}) {
|
|
400
|
-
super(dialect, "sync");
|
|
401
|
-
this.client = client;
|
|
402
|
-
this.relations = relations;
|
|
403
|
-
this.options = options;
|
|
404
|
-
this.logger = options.logger ?? new NoopLogger();
|
|
405
|
-
}
|
|
406
|
-
prepareQuery(query, mode, _prepare, executeMethod, mapper, queryMetadata) {
|
|
407
|
-
let stmt;
|
|
408
|
-
try {
|
|
409
|
-
stmt = this.client.prepare(query.sql);
|
|
410
|
-
} catch (e) {
|
|
411
|
-
throw new DrizzleQueryError(query.sql, query.params, e);
|
|
412
|
-
}
|
|
413
|
-
return new SQLiteAsyncPreparedQuery("sync", executeMethod, {
|
|
414
|
-
all: (params) => {
|
|
415
|
-
stmt.setReturnArrays(mode === "arrays");
|
|
416
|
-
const res = stmt.all(...params);
|
|
417
|
-
if (mode === "objects") return res.map((row) => ({ ...row }));
|
|
418
|
-
return res;
|
|
419
|
-
},
|
|
420
|
-
get: (params) => {
|
|
421
|
-
stmt.setReturnArrays(mode === "arrays");
|
|
422
|
-
const res = stmt.get(...params);
|
|
423
|
-
if (res && mode === "objects") return { ...res };
|
|
424
|
-
return res;
|
|
425
|
-
},
|
|
426
|
-
run: (params) => {
|
|
427
|
-
stmt.setReturnArrays(false);
|
|
428
|
-
return stmt.run(...params);
|
|
429
|
-
},
|
|
430
|
-
values: (params) => {
|
|
431
|
-
stmt.setReturnArrays(true);
|
|
432
|
-
return stmt.all(...params);
|
|
433
|
-
}
|
|
434
|
-
}, query, mapper, mode, this.logger, void 0, queryMetadata, void 0);
|
|
435
|
-
}
|
|
436
|
-
transaction(transaction, config = {}) {
|
|
437
|
-
const tx = new NodeSQLiteTransaction("sync", this.dialect, this, this.relations);
|
|
438
|
-
this.run(sql.raw(`begin${config.behavior ? ` ${config.behavior}` : ""}`));
|
|
439
|
-
try {
|
|
440
|
-
const result = transaction(tx);
|
|
441
|
-
this.run(sql`commit`);
|
|
442
|
-
return result;
|
|
443
|
-
} catch (err) {
|
|
444
|
-
this.run(sql`rollback`);
|
|
445
|
-
throw err;
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
};
|
|
449
|
-
var NodeSQLiteTransaction = class NodeSQLiteTransaction extends SQLiteAsyncTransaction {
|
|
450
|
-
static [entityKind] = "SQLJsTransaction";
|
|
451
|
-
transaction(transaction) {
|
|
452
|
-
const savepointName = `sp${this.nestedIndex + 1}`;
|
|
453
|
-
const tx = new NodeSQLiteTransaction("sync", this.dialect, this.session, this._.relations, this.nestedIndex + 1);
|
|
454
|
-
tx.run(sql.raw(`savepoint ${savepointName}`));
|
|
455
|
-
try {
|
|
456
|
-
const result = transaction(tx);
|
|
457
|
-
tx.run(sql.raw(`release savepoint ${savepointName}`));
|
|
458
|
-
return result;
|
|
459
|
-
} catch (err) {
|
|
460
|
-
tx.run(sql.raw(`rollback to savepoint ${savepointName}`));
|
|
461
|
-
throw err;
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
};
|
|
465
|
-
|
|
466
|
-
//#region src/node-sqlite/driver.ts
|
|
467
|
-
var NodeSQLiteDatabase = class extends SQLiteAsyncDatabase {
|
|
468
|
-
static [entityKind] = "NodeSQLiteDatabase";
|
|
469
|
-
};
|
|
470
|
-
function construct(client, config = {}) {
|
|
471
|
-
const dialect = new SQLiteDialect({ useJitMappers: jitCompatCheck(config.jit) });
|
|
472
|
-
let logger;
|
|
473
|
-
if (config.logger === true) logger = new DefaultLogger();
|
|
474
|
-
else if (config.logger !== false) logger = config.logger;
|
|
475
|
-
const relations = config.relations ?? {};
|
|
476
|
-
const db = new NodeSQLiteDatabase("sync", dialect, new NodeSQLiteSession(client, dialect, relations, { logger }), relations);
|
|
477
|
-
db.$client = client;
|
|
478
|
-
return db;
|
|
479
|
-
}
|
|
480
|
-
function drizzle(...params) {
|
|
481
|
-
if (params[0] === void 0 || typeof params[0] === "string") return construct(params[0] === void 0 ? new DatabaseSync(":memory:") : new DatabaseSync(params[0]), params[1]);
|
|
482
|
-
const { connection, client, ...config } = params[0];
|
|
483
|
-
if (client) return construct(client, config);
|
|
484
|
-
if (typeof connection === "object") {
|
|
485
|
-
const { path, ...options } = connection;
|
|
486
|
-
return construct(new DatabaseSync(path ?? ":memory:", options), config);
|
|
487
|
-
}
|
|
488
|
-
return construct(new DatabaseSync(connection ?? ":memory:"), config);
|
|
489
|
-
}
|
|
490
|
-
(function(_drizzle) {
|
|
491
|
-
function mock(config) {
|
|
492
|
-
return construct({}, config);
|
|
493
|
-
}
|
|
494
|
-
_drizzle.mock = mock;
|
|
495
|
-
})(drizzle || (drizzle = {}));
|
|
496
|
-
|
|
497
|
-
//#region ../core/dist/store/nexus-sqlite.js
|
|
498
|
-
/**
|
|
499
|
-
* SQLite store for the NEXUS domain via drizzle-orm/node-sqlite + node:sqlite
|
|
500
|
-
* (DatabaseSync).
|
|
501
|
-
*
|
|
502
|
-
* ## Dual-scope residency split (ADR-090 · T11648 — runtime read half)
|
|
503
|
-
*
|
|
504
|
-
* The nexus domain is now SPLIT across the two consolidated `cleo.db` files:
|
|
505
|
-
*
|
|
506
|
-
* - **GRAPH (project scope):** the four code-graph tables (`nexus_nodes`,
|
|
507
|
-
* `nexus_relations`, `nexus_contracts`, `nexus_code_index`) + the
|
|
508
|
-
* `nexus_relation_weights` plasticity sibling live in
|
|
509
|
-
* `<projectRoot>/.cleo/cleo.db` — the portable per-project living brain.
|
|
510
|
-
* This is where exodus WRITES them (`resolveTableTargetScope` in
|
|
511
|
-
* `store/exodus/table-name-map.ts`), so the runtime READS them from there too.
|
|
512
|
-
* - **REGISTRY/identity (global scope):** the six cross-project tables
|
|
513
|
-
* (`nexus_project_registry`, `nexus_project_id_aliases`, `nexus_user_profile`,
|
|
514
|
-
* `nexus_sigils`, `nexus_audit_log`, `nexus_schema_meta`) stay in the GLOBAL
|
|
515
|
-
* `cleo.db` under {@link getCleoHome} (ADR-090 §2.2).
|
|
516
|
-
*
|
|
517
|
-
* `getNexusDb()` opens the PROJECT scope as `main` (via {@link openDualScopeDb}
|
|
518
|
-
* ('project')) and ATTACHes the GLOBAL `cleo.db` under
|
|
519
|
-
* {@link NEXUS_GLOBAL_ATTACH_ALIAS}. SQLite's bare-name resolution then routes
|
|
520
|
-
* each query to the correct file with ZERO accessor changes: graph tables exist
|
|
521
|
-
* in `main` (project) and resolve there; registry/identity tables are absent
|
|
522
|
-
* from `main` and fall through to the attached GLOBAL db. The GLOBAL db also
|
|
523
|
-
* carries empty graph tables (frozen T11363 migration leftovers), correctly
|
|
524
|
-
* SHADOWED by `main`.
|
|
525
|
-
*
|
|
526
|
-
* ### Why this fix (T11648)
|
|
527
|
-
*
|
|
528
|
-
* T11538/T11539 moved the graph schema to PROJECT scope and routed exodus there,
|
|
529
|
-
* but the runtime READ accessors still opened the GLOBAL handle — so after a
|
|
530
|
-
* `cleo exodus migrate` the project held 24k+ `nexus_nodes` while the runtime
|
|
531
|
-
* read 0 from global (`cleo nexus search-code` / `context` returned empty). This
|
|
532
|
-
* module is the deferred runtime half: it reads the graph from the SAME scope
|
|
533
|
-
* exodus writes it.
|
|
534
|
-
*
|
|
535
|
-
* This preserves the prior guarantees:
|
|
536
|
-
* - Every nexus-domain open flows through the single pragma SSoT (ADR-068/069).
|
|
537
|
-
* - DB Open Guard Gate 3 (`scripts/lint-no-direct-db-open.mjs`) stays green: the
|
|
538
|
-
* only native open is inside `dual-scope-db.ts` (the ATTACH below is a SQL
|
|
539
|
-
* statement on an already-chokepointed handle, not a `new DatabaseSync(`).
|
|
540
|
-
*
|
|
541
|
-
* ## COMPLETE-CUTOVER to prefixed `nexus_*` tables (T11578 · AC3)
|
|
542
|
-
*
|
|
543
|
-
* The nexus runtime READ + WRITE path targets PREFIXED consolidated tables. The
|
|
544
|
-
* five PROJECT graph tables are owned by the consolidated cleo-project migration;
|
|
545
|
-
* the six GLOBAL registry/identity tables by the consolidated cleo-global
|
|
546
|
-
* migration. The former legacy drop/rebuild (`establishLegacyNexusSchema`) and
|
|
547
|
-
* BARE registry tables (`project_registry`, …) are GONE. The runtime schema
|
|
548
|
-
* barrel `schema/nexus-schema.ts` maps every export symbol to its prefixed
|
|
549
|
-
* physical name — accessors need ZERO change.
|
|
550
|
-
*
|
|
551
|
-
* The `drizzle-nexus` migration set carries ONLY the delta the consolidated
|
|
552
|
-
* migration cannot model: the `nexus_symbols_fts` FTS5 virtual table + its three
|
|
553
|
-
* `nexus_nodes` triggers, the `nexus_relation_weights` plasticity-partition
|
|
554
|
-
* sibling (T11545), and the `_nexus_meta` health-probe table (the reconcile
|
|
555
|
-
* sentinel). The destructive half of the plasticity partition is applied
|
|
556
|
-
* idempotently at open by `ensureNexusRelationWeights` (a no-op for the
|
|
557
|
-
* already-narrow project-scope `nexus_relations`).
|
|
558
|
-
*
|
|
559
|
-
* @adr ADR-036 — registry/identity is global-only (relaxed for the 4 graph
|
|
560
|
-
* tables by ADR-090 §2.4).
|
|
561
|
-
* @adr ADR-090 — nexus code-graph residency global→project scope split.
|
|
562
|
-
* @task T5365
|
|
563
|
-
* @task T11524 - E6-L4: route getNexusDb through the dual-scope chokepoint
|
|
564
|
-
* @task T11578 - AC3: COMPLETE-CUTOVER nexus runtime → prefixed nexus_* tables
|
|
565
|
-
* @task T11648 - ADR-090 runtime read half: route graph reads to project scope
|
|
566
|
-
*/
|
|
567
|
-
/** Schema version for newly created nexus databases. Single source of truth. */
|
|
568
|
-
var NEXUS_SCHEMA_VERSION = "1.0.0";
|
|
569
|
-
/**
|
|
570
|
-
* SQLite ATTACH alias under which the GLOBAL consolidated `cleo.db` is mounted
|
|
571
|
-
* into the PROJECT-scope nexus handle so the cross-project registry/identity
|
|
572
|
-
* tables (`nexus_project_registry`, `nexus_user_profile`, `nexus_sigils`,
|
|
573
|
-
* `nexus_project_id_aliases`, `nexus_audit_log`, `nexus_schema_meta`) stay
|
|
574
|
-
* reachable by their BARE names (ADR-090 · T11648).
|
|
575
|
-
*
|
|
576
|
-
* SQLite resolves a bare table name against `main` first, then attached
|
|
577
|
-
* databases in attach order. The PROJECT `cleo.db` (`main`) physically carries
|
|
578
|
-
* ONLY the five graph tables (`nexus_nodes`, `nexus_relations`,
|
|
579
|
-
* `nexus_contracts`, `nexus_code_index`, `nexus_relation_weights`), so those
|
|
580
|
-
* bare names resolve to the populated project graph; the registry/identity
|
|
581
|
-
* tables — absent from `main` — fall through to this attached GLOBAL db. The
|
|
582
|
-
* GLOBAL db ALSO carries empty graph tables (frozen T11363 migration leftovers),
|
|
583
|
-
* but those are correctly SHADOWED by `main` and never read or written.
|
|
584
|
-
*/
|
|
585
|
-
var NEXUS_GLOBAL_ATTACH_ALIAS = "nexus_global";
|
|
586
|
-
/**
|
|
587
|
-
* Returns the nexus GRAPH DB path — the consolidated PROJECT `cleo.db`
|
|
588
|
-
* (`<projectRoot>/.cleo/cleo.db`), where the four code-graph tables
|
|
589
|
-
* (`nexus_nodes`, `nexus_relations`, `nexus_contracts`, `nexus_code_index`) and
|
|
590
|
-
* the `nexus_relation_weights` plasticity sibling physically reside post the
|
|
591
|
-
* ADR-090 residency split (T11538/T11539).
|
|
592
|
-
*
|
|
593
|
-
* ## ADR-090 residency move — runtime read half (T11648)
|
|
594
|
-
*
|
|
595
|
-
* Exodus WRITES the graph tables to PROJECT scope (per `resolveTableTargetScope`
|
|
596
|
-
* in `store/exodus/table-name-map.ts`); this resolver routes the runtime READ
|
|
597
|
-
* path to the SAME scope so the migrated graph is visible. Previously this
|
|
598
|
-
* returned the GLOBAL `cleo.db` (`resolveDualScopeDbPath('global')`), which left
|
|
599
|
-
* `cleo nexus search-code` / `context` reading the empty global graph tables —
|
|
600
|
-
* the T11538/T11539 runtime-half gap this fix closes. The cross-project
|
|
601
|
-
* registry/identity tables stay GLOBAL and are reached via the
|
|
602
|
-
* {@link NEXUS_GLOBAL_ATTACH_ALIAS} attach (see {@link getNexusRegistryDbPath}).
|
|
603
|
-
*
|
|
604
|
-
* @param cwd - Optional working directory used to resolve the owning project
|
|
605
|
-
* root (forwarded to {@link resolveDualScopeDbPath}('project', cwd)).
|
|
606
|
-
* @task T307
|
|
607
|
-
* @epic T299
|
|
608
|
-
* @task T11648 (ADR-090 runtime read half — route graph reads to project scope)
|
|
609
|
-
* @why ADR-090 §2.1/§2.4 supersedes ADR-036's global-only assertion FOR THE
|
|
610
|
-
* GRAPH TABLES ONLY. The graph is per-project and must live in the portable
|
|
611
|
-
* `.cleo/cleo.db`; the registry/identity tables remain global-asserted in
|
|
612
|
-
* {@link getNexusRegistryDbPath}.
|
|
613
|
-
*/
|
|
614
|
-
function getNexusDbPath(cwd) {
|
|
615
|
-
return resolveDualScopeDbPath("project", cwd);
|
|
616
|
-
}
|
|
617
|
-
/**
|
|
618
|
-
* Returns the cross-project nexus REGISTRY/identity DB path — the consolidated
|
|
619
|
-
* GLOBAL `cleo.db` under `getCleoHome()`.
|
|
620
|
-
*
|
|
621
|
-
* The registry/identity tables (`nexus_project_registry`,
|
|
622
|
-
* `nexus_project_id_aliases`, `nexus_user_profile`, `nexus_sigils`,
|
|
623
|
-
* `nexus_audit_log`, `nexus_schema_meta`) are genuinely global (ADR-090 §2.2)
|
|
624
|
-
* and MUST stay under `getCleoHome()`. The ADR-036 global-only assertion is
|
|
625
|
-
* retained here as defence-in-depth (it was relaxed only for the four graph
|
|
626
|
-
* tables, now homed in PROJECT scope via {@link getNexusDbPath}).
|
|
627
|
-
*
|
|
628
|
-
* @task T11648 (ADR-090 — registry stays global-asserted)
|
|
629
|
-
* @adr ADR-036 — registry/identity is global-only.
|
|
630
|
-
* @throws {Error} If the resolved path is not under `getCleoHome()`.
|
|
631
|
-
*/
|
|
632
|
-
function getNexusRegistryDbPath() {
|
|
633
|
-
const cleoHome = getCleoHome();
|
|
634
|
-
const registryPath = resolveDualScopeDbPath("global");
|
|
635
|
-
if (!registryPath.startsWith(cleoHome)) throw new Error(`BUG: getNexusRegistryDbPath() resolved to "${registryPath}" which is NOT under getCleoHome() ("${cleoHome}"). The nexus registry/identity tables are global-only per ADR-036/ADR-090 §2.2. This indicates a code path that bypasses canonical path resolution — fix the caller, do not suppress this error.`);
|
|
636
|
-
return registryPath;
|
|
637
|
-
}
|
|
638
|
-
/**
|
|
639
|
-
* Idempotently ATTACH the GLOBAL consolidated `cleo.db` into a PROJECT-scope
|
|
640
|
-
* nexus handle under {@link NEXUS_GLOBAL_ATTACH_ALIAS}, so the cross-project
|
|
641
|
-
* registry/identity tables resolve by their bare names (ADR-090 · T11648).
|
|
642
|
-
*
|
|
643
|
-
* Safe to call repeatedly: if the alias is already attached (a sibling domain
|
|
644
|
-
* opened the same shared project handle first, or a prior nexus open ran this),
|
|
645
|
-
* the duplicate `ATTACH` throws and is swallowed. The global `cleo.db` is the
|
|
646
|
-
* canonical registry home; we ensure its directory exists via the global open
|
|
647
|
-
* resolver before attaching.
|
|
648
|
-
*
|
|
649
|
-
* @param nativeDb - The open PROJECT-scope `DatabaseSync` handle.
|
|
650
|
-
* @task T11648
|
|
651
|
-
*/
|
|
652
|
-
function ensureGlobalRegistryAttached(nativeDb) {
|
|
653
|
-
const globalPath = getNexusRegistryDbPath();
|
|
654
|
-
const escaped = globalPath.replace(/'/g, "''");
|
|
655
|
-
const existing = nativeDb.prepare("PRAGMA database_list").all().find((row) => row.name === NEXUS_GLOBAL_ATTACH_ALIAS);
|
|
656
|
-
if (existing) {
|
|
657
|
-
if (existing.file === globalPath) return;
|
|
658
|
-
try {
|
|
659
|
-
nativeDb.exec(`DETACH DATABASE ${NEXUS_GLOBAL_ATTACH_ALIAS}`);
|
|
660
|
-
} catch {
|
|
661
|
-
return;
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
nativeDb.exec(`ATTACH DATABASE '${escaped}' AS ${NEXUS_GLOBAL_ATTACH_ALIAS}`);
|
|
665
|
-
}
|
|
666
|
-
/**
|
|
667
|
-
* Resolve the absolute path to the drizzle-nexus migrations folder inside
|
|
668
|
-
* @cleocode/core, using ESM-native module resolution (T1177).
|
|
669
|
-
*
|
|
670
|
-
* Delegates to {@link resolveCorePackageMigrationsFolder} which handles
|
|
671
|
-
* bundled dist/, workspace dev, and global-install layouts uniformly via
|
|
672
|
-
* `import.meta.resolve()` + `createRequire().resolve()` fallback.
|
|
673
|
-
*/
|
|
674
|
-
function resolveNexusMigrationsFolder() {
|
|
675
|
-
return resolveCorePackageMigrationsFolder("drizzle-nexus");
|
|
676
|
-
}
|
|
677
|
-
/**
|
|
678
|
-
* Canonical filename within the nested `<cleoHome>/nexus/` subdirectory that
|
|
679
|
-
* indicates the structural bug ADR-086 BANs. If this file exists, the install
|
|
680
|
-
* has not yet run `scripts/migrate-nested-nexus.mjs`.
|
|
681
|
-
*/
|
|
682
|
-
var NESTED_NEXUS_SENTINEL = "nexus.db";
|
|
683
|
-
/**
|
|
684
|
-
* One-shot warning gate keyed on the absolute nested path. Prevents the
|
|
685
|
-
* warning from spamming when `getNexusDb()` is called repeatedly within a
|
|
686
|
-
* single process (e.g. CLI commands that re-open the handle, tests that
|
|
687
|
-
* exercise nexus across many describe blocks).
|
|
688
|
-
*
|
|
689
|
-
* Exposed via {@link _resetNestedNexusWarningGate} for test hygiene.
|
|
690
|
-
*/
|
|
691
|
-
var _warnedNestedPaths = /* @__PURE__ */ new Set();
|
|
692
|
-
/**
|
|
693
|
-
* Returns the absolute path that, if present, indicates the install carries
|
|
694
|
-
* the nested-nexus structural bug. ALWAYS `<cleoHome>/nexus/nexus.db`.
|
|
695
|
-
*
|
|
696
|
-
* Exposed for tests; production callers should use
|
|
697
|
-
* {@link detectAndWarnOnNestedNexus} instead.
|
|
698
|
-
*
|
|
699
|
-
* @task T10321
|
|
700
|
-
* @adr ADR-086
|
|
701
|
-
*/
|
|
702
|
-
function getNestedNexusSentinelPath() {
|
|
703
|
-
return join(getCleoHome(), "nexus", NESTED_NEXUS_SENTINEL);
|
|
704
|
-
}
|
|
705
|
-
/**
|
|
706
|
-
* Detect the presence of the nested-nexus structural bug and emit a one-shot
|
|
707
|
-
* warning via the canonical pino logger if found.
|
|
708
|
-
*
|
|
709
|
-
* The function is non-blocking and non-throwing — it never alters the
|
|
710
|
-
* outcome of the surrounding `getNexusDb()` open. The canonical consolidated
|
|
711
|
-
* open proceeds normally regardless of whether the nested debris is present.
|
|
712
|
-
*
|
|
713
|
-
* Idempotency: the first call for a given nested path emits the warning;
|
|
714
|
-
* subsequent calls within the same process are no-ops. Tests can reset the
|
|
715
|
-
* gate via {@link _resetNestedNexusWarningGate}.
|
|
716
|
-
*
|
|
717
|
-
* @returns `true` when the warning fired on this call; `false` otherwise.
|
|
718
|
-
*
|
|
719
|
-
* @task T10321
|
|
720
|
-
* @adr ADR-086
|
|
721
|
-
*/
|
|
722
|
-
function detectAndWarnOnNestedNexus() {
|
|
723
|
-
let nestedPath;
|
|
724
|
-
try {
|
|
725
|
-
nestedPath = getNestedNexusSentinelPath();
|
|
726
|
-
} catch {
|
|
727
|
-
return false;
|
|
728
|
-
}
|
|
729
|
-
if (!existsSync(nestedPath)) return false;
|
|
730
|
-
if (_warnedNestedPaths.has(nestedPath)) return false;
|
|
731
|
-
_warnedNestedPaths.add(nestedPath);
|
|
732
|
-
const canonicalPath = getNexusDbPath();
|
|
733
|
-
getLogger("nexus-sqlite").warn({
|
|
734
|
-
nestedPath,
|
|
735
|
-
canonicalPath,
|
|
736
|
-
migrationCommand: "node scripts/migrate-nested-nexus.mjs",
|
|
737
|
-
adr: "ADR-086",
|
|
738
|
-
task: "T10321"
|
|
739
|
-
}, "Detected nested-nexus structural bug — canonical consolidated cleo.db is in use; nested duplicates at <cleoHome>/nexus/ are migration debris. Run the migration script to remove them.");
|
|
740
|
-
return true;
|
|
741
|
-
}
|
|
742
|
-
/**
|
|
743
|
-
* Reset the one-shot warning gate. Tests only — production callers MUST NOT
|
|
744
|
-
* use this.
|
|
745
|
-
*
|
|
746
|
-
* @internal
|
|
747
|
-
* @task T10321
|
|
748
|
-
*/
|
|
749
|
-
function _resetNestedNexusWarningGate() {
|
|
750
|
-
_warnedNestedPaths.clear();
|
|
751
|
-
}
|
|
752
|
-
/**
|
|
753
|
-
* Check whether a table exists in the SQLite database.
|
|
754
|
-
*/
|
|
755
|
-
function tableExists(nativeDb, tableName) {
|
|
756
|
-
return !!nativeDb.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name=?").get(tableName);
|
|
757
|
-
}
|
|
758
|
-
/**
|
|
759
|
-
* Check whether a virtual table (or any object) exists in the SQLite database.
|
|
760
|
-
*
|
|
761
|
-
* sqlite_master covers virtual tables, triggers, and regular tables alike.
|
|
762
|
-
*/
|
|
763
|
-
function objectExists(nativeDb, type, name) {
|
|
764
|
-
return !!nativeDb.prepare("SELECT name FROM sqlite_master WHERE type=? AND name=?").get(type, name);
|
|
765
|
-
}
|
|
766
|
-
/**
|
|
767
|
-
* Idempotent FTS5 setup for nexus_symbols_fts (T1839).
|
|
768
|
-
*
|
|
769
|
-
* Creates the FTS5 virtual table indexed on label + file_path, installs the
|
|
770
|
-
* three nexus_nodes triggers (INSERT/UPDATE/DELETE), and backfills any existing
|
|
771
|
-
* nexus_nodes rows that are not yet represented in the FTS5 table.
|
|
772
|
-
*
|
|
773
|
-
* Called before drizzle migrations so existing DBs are covered. Each DDL
|
|
774
|
-
* statement is guarded by IF NOT EXISTS / DROP IF EXISTS — safe to re-run.
|
|
775
|
-
*
|
|
776
|
-
* Uses nativeDb.exec() (not prepare().run()) to avoid the node:sqlite
|
|
777
|
-
* first-statement-only limitation.
|
|
778
|
-
*
|
|
779
|
-
* @task T1839
|
|
780
|
-
*/
|
|
781
|
-
function ensureNexusFts5(nativeDb) {
|
|
782
|
-
if (!tableExists(nativeDb, "nexus_nodes")) return;
|
|
783
|
-
if (!objectExists(nativeDb, "table", "nexus_symbols_fts")) nativeDb.exec(`
|
|
784
|
-
CREATE VIRTUAL TABLE nexus_symbols_fts USING fts5(
|
|
785
|
-
node_id UNINDEXED,
|
|
786
|
-
label,
|
|
787
|
-
file_path,
|
|
788
|
-
tokenize = 'unicode61 remove_diacritics 1'
|
|
789
|
-
)
|
|
790
|
-
`);
|
|
791
|
-
nativeDb.exec(`DROP TRIGGER IF EXISTS nexus_nodes_fts_ai`);
|
|
792
|
-
nativeDb.exec(`
|
|
793
|
-
CREATE TRIGGER nexus_nodes_fts_ai
|
|
794
|
-
AFTER INSERT ON nexus_nodes
|
|
795
|
-
BEGIN
|
|
796
|
-
INSERT INTO nexus_symbols_fts(rowid, node_id, label, file_path)
|
|
797
|
-
VALUES (new.rowid, new.id, new.label, new.file_path);
|
|
798
|
-
END
|
|
799
|
-
`);
|
|
800
|
-
nativeDb.exec(`DROP TRIGGER IF EXISTS nexus_nodes_fts_ad`);
|
|
801
|
-
nativeDb.exec(`
|
|
802
|
-
CREATE TRIGGER nexus_nodes_fts_ad
|
|
803
|
-
AFTER DELETE ON nexus_nodes
|
|
804
|
-
BEGIN
|
|
805
|
-
DELETE FROM nexus_symbols_fts WHERE rowid = old.rowid;
|
|
806
|
-
END
|
|
807
|
-
`);
|
|
808
|
-
nativeDb.exec(`DROP TRIGGER IF EXISTS nexus_nodes_fts_au`);
|
|
809
|
-
nativeDb.exec(`
|
|
810
|
-
CREATE TRIGGER nexus_nodes_fts_au
|
|
811
|
-
AFTER UPDATE ON nexus_nodes
|
|
812
|
-
BEGIN
|
|
813
|
-
DELETE FROM nexus_symbols_fts WHERE rowid = old.rowid;
|
|
814
|
-
INSERT INTO nexus_symbols_fts(rowid, node_id, label, file_path)
|
|
815
|
-
VALUES (new.rowid, new.id, new.label, new.file_path);
|
|
816
|
-
END
|
|
817
|
-
`);
|
|
818
|
-
nativeDb.exec(`
|
|
819
|
-
INSERT INTO nexus_symbols_fts(rowid, node_id, label, file_path)
|
|
820
|
-
SELECT rowid, id, label, file_path
|
|
821
|
-
FROM nexus_nodes
|
|
822
|
-
WHERE rowid NOT IN (SELECT rowid FROM nexus_symbols_fts)
|
|
823
|
-
`);
|
|
824
|
-
}
|
|
825
|
-
/**
|
|
826
|
-
* Idempotent safety net + partition completer for `nexus_relation_weights`
|
|
827
|
-
* (T11545 · ADR-090 §5.3 · T11578 · AC3).
|
|
828
|
-
*
|
|
829
|
-
* The Hebbian plasticity columns were partitioned out of `nexus_relations` into
|
|
830
|
-
* this sibling 1:1 table. After the AC3 cutover the consolidated cleo-global
|
|
831
|
-
* migration (T11363) owns `nexus_relations` but still creates it with the THREE
|
|
832
|
-
* inline plasticity columns (`weight`, `last_accessed_at`, `co_accessed_count`)
|
|
833
|
-
* — the T11363 shape predates the partition. This safety net completes the
|
|
834
|
-
* partition idempotently at runtime (the destructive column-DROP is kept OUT of
|
|
835
|
-
* the journaled migration SQL, where re-runs would throw):
|
|
836
|
-
*
|
|
837
|
-
* 1. CREATE the sibling table (+ indexes) — covers fresh + pre-partition DBs.
|
|
838
|
-
* 2. When the inline columns are still present on `nexus_relations`, BACKFILL
|
|
839
|
-
* any non-default plasticity state into the sibling table so no weights are
|
|
840
|
-
* lost, then DROP the three inline columns so the structural graph row is
|
|
841
|
-
* narrow (matching `nexus-schema.ts` + the must-pass fresh-init test).
|
|
842
|
-
*
|
|
843
|
-
* Every statement is guarded by IF-NOT-EXISTS / column-presence probes; safe to
|
|
844
|
-
* re-run on every open (the DROP only fires while the inline columns exist).
|
|
845
|
-
*
|
|
846
|
-
* @task T11545
|
|
847
|
-
* @task T11578
|
|
848
|
-
*/
|
|
849
|
-
function ensureNexusRelationWeights(nativeDb) {
|
|
850
|
-
if (!tableExists(nativeDb, "nexus_relations")) return;
|
|
851
|
-
nativeDb.exec(`
|
|
852
|
-
CREATE TABLE IF NOT EXISTS nexus_relation_weights (
|
|
853
|
-
relation_id TEXT PRIMARY KEY NOT NULL,
|
|
854
|
-
weight REAL DEFAULT 0.0 NOT NULL,
|
|
855
|
-
last_accessed_at TEXT,
|
|
856
|
-
co_accessed_count INTEGER DEFAULT 0 NOT NULL
|
|
857
|
-
)
|
|
858
|
-
`);
|
|
859
|
-
nativeDb.exec(`CREATE INDEX IF NOT EXISTS idx_nexus_relation_weights_last_accessed ON nexus_relation_weights (last_accessed_at)`);
|
|
860
|
-
nativeDb.exec(`CREATE INDEX IF NOT EXISTS idx_nexus_relation_weights_weight ON nexus_relation_weights (weight)`);
|
|
861
|
-
if (!nativeDb.prepare("PRAGMA table_info(nexus_relations)").all().some((c) => c.name === "weight")) return;
|
|
862
|
-
nativeDb.exec(`
|
|
863
|
-
INSERT OR IGNORE INTO nexus_relation_weights (relation_id, weight, last_accessed_at, co_accessed_count)
|
|
864
|
-
SELECT id, COALESCE(weight, 0.0), last_accessed_at, COALESCE(co_accessed_count, 0)
|
|
865
|
-
FROM nexus_relations
|
|
866
|
-
WHERE COALESCE(weight, 0.0) > 0.0
|
|
867
|
-
OR last_accessed_at IS NOT NULL
|
|
868
|
-
OR COALESCE(co_accessed_count, 0) > 0
|
|
869
|
-
`);
|
|
870
|
-
const fkWasOn = nativeDb.prepare("PRAGMA foreign_keys").get()?.foreign_keys === 1;
|
|
871
|
-
nativeDb.exec("PRAGMA foreign_keys=OFF");
|
|
872
|
-
try {
|
|
873
|
-
nativeDb.exec("DROP INDEX IF EXISTS idx_nexus_relations_last_accessed");
|
|
874
|
-
nativeDb.exec(`
|
|
875
|
-
CREATE TABLE nexus_relations__narrow (
|
|
876
|
-
id text PRIMARY KEY,
|
|
877
|
-
project_id text NOT NULL,
|
|
878
|
-
source_id text NOT NULL,
|
|
879
|
-
target_id text NOT NULL,
|
|
880
|
-
type text NOT NULL,
|
|
881
|
-
confidence real NOT NULL,
|
|
882
|
-
reason text,
|
|
883
|
-
step integer,
|
|
884
|
-
indexed_at text DEFAULT (datetime('now')) NOT NULL,
|
|
885
|
-
CHECK ("type" IN ('contains', 'defines', 'imports', 'accesses', 'calls', 'extends', 'implements', 'method_overrides', 'method_implements', 'has_method', 'has_property', 'member_of', 'step_in_process', 'handles_route', 'fetches', 'handles_tool', 'entry_point_of', 'wraps', 'queries', 'documents', 'applies_to', 'co_changed', 'co_cited_in_task')),
|
|
886
|
-
CHECK ("indexed_at" IS NULL OR "indexed_at" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]*')
|
|
887
|
-
)
|
|
888
|
-
`);
|
|
889
|
-
nativeDb.exec(`
|
|
890
|
-
INSERT INTO nexus_relations__narrow
|
|
891
|
-
(id, project_id, source_id, target_id, type, confidence, reason, step, indexed_at)
|
|
892
|
-
SELECT id, project_id, source_id, target_id, type, confidence, reason, step, indexed_at
|
|
893
|
-
FROM nexus_relations
|
|
894
|
-
`);
|
|
895
|
-
nativeDb.exec("DROP TABLE nexus_relations");
|
|
896
|
-
nativeDb.exec("ALTER TABLE nexus_relations__narrow RENAME TO nexus_relations");
|
|
897
|
-
nativeDb.exec("CREATE INDEX IF NOT EXISTS idx_nexus_relations_project ON nexus_relations (project_id)");
|
|
898
|
-
nativeDb.exec("CREATE INDEX IF NOT EXISTS idx_nexus_relations_source ON nexus_relations (source_id)");
|
|
899
|
-
nativeDb.exec("CREATE INDEX IF NOT EXISTS idx_nexus_relations_target ON nexus_relations (target_id)");
|
|
900
|
-
nativeDb.exec("CREATE INDEX IF NOT EXISTS idx_nexus_relations_type ON nexus_relations (type)");
|
|
901
|
-
nativeDb.exec("CREATE INDEX IF NOT EXISTS idx_nexus_relations_project_type ON nexus_relations (project_id, type)");
|
|
902
|
-
nativeDb.exec("CREATE INDEX IF NOT EXISTS idx_nexus_relations_source_type ON nexus_relations (source_id, type)");
|
|
903
|
-
nativeDb.exec("CREATE INDEX IF NOT EXISTS idx_nexus_relations_target_type ON nexus_relations (target_id, type)");
|
|
904
|
-
nativeDb.exec("CREATE INDEX IF NOT EXISTS idx_nexus_relations_confidence ON nexus_relations (confidence)");
|
|
905
|
-
} finally {
|
|
906
|
-
nativeDb.exec(`PRAGMA foreign_keys=${fkWasOn ? "ON" : "OFF"}`);
|
|
907
|
-
}
|
|
908
|
-
}
|
|
909
|
-
/**
|
|
910
|
-
* Apply the nexus-domain DELTA migration + idempotent safety nets on top of the
|
|
911
|
-
* PREFIXED consolidated graph tables the PROJECT dual-scope chokepoint already
|
|
912
|
-
* created (T11578 · AC3 · ADR-090 T11648).
|
|
913
|
-
*
|
|
914
|
-
* ## COMPLETE-CUTOVER (T11578 · AC3) + residency move (ADR-090 · T11648)
|
|
915
|
-
*
|
|
916
|
-
* The consolidated cleo-project migration OWNS the five PREFIXED graph tables
|
|
917
|
-
* in the PROJECT `cleo.db` `main` (`nexus_nodes`, `nexus_relations`,
|
|
918
|
-
* `nexus_contracts`, `nexus_code_index`, `nexus_relation_weights`); the
|
|
919
|
-
* cross-project registry/identity tables are owned by the cleo-global migration
|
|
920
|
-
* and reached through the {@link NEXUS_GLOBAL_ATTACH_ALIAS} attach. The runtime
|
|
921
|
-
* no longer drops/rebuilds a legacy shape (former `establishLegacyNexusSchema`).
|
|
922
|
-
* The `drizzle-nexus` set carries ONLY the delta the consolidated migration
|
|
923
|
-
* cannot model:
|
|
924
|
-
* - the `nexus_relation_weights` sibling (plasticity partition, T11545),
|
|
925
|
-
* - the `nexus_symbols_fts` FTS5 virtual table + its three triggers (over the
|
|
926
|
-
* project-scope `nexus_nodes`), and
|
|
927
|
-
* - the `_nexus_meta` health-probe table (also the reconcile sentinel).
|
|
928
|
-
*
|
|
929
|
-
* The reconcile sentinel is `_nexus_meta` (a table the nexus migration ITSELF
|
|
930
|
-
* creates, NOT a consolidated-owned table). This keeps `reconcileJournal`
|
|
931
|
-
* Scenario 2 (orphan deletion) dormant until the nexus migration set is journaled
|
|
932
|
-
* — otherwise the consolidated PROJECT migration's journal entries (written FIRST
|
|
933
|
-
* by `openDualScopeDb`) would look like orphans and be deleted, corrupting the
|
|
934
|
-
* shared journal (mirrors the conduit `_conduit_meta` sentinel, AC4).
|
|
935
|
-
*
|
|
936
|
-
* @task T5365
|
|
937
|
-
* @task T11578
|
|
938
|
-
* @task T11648
|
|
939
|
-
*/
|
|
940
|
-
function runNexusMigrations(nativeDb, db, dbPath) {
|
|
941
|
-
const migrationsFolder = resolveNexusMigrationsFolder();
|
|
942
|
-
if (tableExists(nativeDb, "nexus_nodes")) {
|
|
943
|
-
const backupPath = dbPath.replace(/\.db$/, "-pre-cleo.db.bak");
|
|
944
|
-
if (!existsSync(backupPath)) try {
|
|
945
|
-
copyFileSync(dbPath, backupPath);
|
|
946
|
-
} catch {}
|
|
947
|
-
}
|
|
948
|
-
reconcileJournal(nativeDb, migrationsFolder, "_nexus_meta", "nexus", resolveConsolidatedJournalSiblings("drizzle-nexus"));
|
|
949
|
-
const MAX_RETRIES = 5;
|
|
950
|
-
const BASE_DELAY_MS = 100;
|
|
951
|
-
const MAX_DELAY_MS = 2e3;
|
|
952
|
-
let lastError;
|
|
953
|
-
for (let attempt = 1; attempt <= MAX_RETRIES; attempt++) try {
|
|
954
|
-
migrateWithRetry(db, migrationsFolder, nativeDb, "_nexus_meta", "nexus");
|
|
955
|
-
lastError = void 0;
|
|
956
|
-
break;
|
|
957
|
-
} catch (err) {
|
|
958
|
-
if (!isSqliteBusy(err) || attempt === MAX_RETRIES) throw err;
|
|
959
|
-
lastError = err;
|
|
960
|
-
const delay = Math.min(BASE_DELAY_MS * 2 ** (attempt - 1) * (1 + Math.random() * .5), MAX_DELAY_MS);
|
|
961
|
-
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, Math.round(delay));
|
|
962
|
-
}
|
|
963
|
-
/* c8 ignore next 1 */
|
|
964
|
-
if (lastError) throw lastError;
|
|
965
|
-
ensureNexusRelationWeights(nativeDb);
|
|
966
|
-
ensureColumns(nativeDb, "nexus_nodes", [{
|
|
967
|
-
name: "is_external",
|
|
968
|
-
ddl: "integer DEFAULT 0"
|
|
969
|
-
}], "nexus");
|
|
970
|
-
ensureNexusFts5(nativeDb);
|
|
971
|
-
}
|
|
972
|
-
/**
|
|
973
|
-
* Initialize the consolidated PROJECT `cleo.db` (the nexus GRAPH home) with the
|
|
974
|
-
* GLOBAL `cleo.db` ATTACHed for registry/identity reads, plus the nexus DELTA
|
|
975
|
-
* schema within it (lazy, singleton).
|
|
976
|
-
*
|
|
977
|
-
* ## ADR-090 residency move — runtime read half (T11648)
|
|
978
|
-
*
|
|
979
|
-
* The four code-graph tables (`nexus_nodes`, `nexus_relations`, `nexus_contracts`,
|
|
980
|
-
* `nexus_code_index`) + the `nexus_relation_weights` plasticity sibling now live
|
|
981
|
-
* in PROJECT scope (`<projectRoot>/.cleo/cleo.db`) — that is where exodus WRITES
|
|
982
|
-
* them. The runtime READ path therefore opens the PROJECT scope as `main` so the
|
|
983
|
-
* graph is visible (previously it opened GLOBAL and read empty graph tables —
|
|
984
|
-
* the T11538/T11539 gap). The cross-project registry/identity tables stay GLOBAL;
|
|
985
|
-
* we open GLOBAL first (so its consolidated migration creates them) then ATTACH
|
|
986
|
-
* it under {@link NEXUS_GLOBAL_ATTACH_ALIAS} so the registry/identity accessors —
|
|
987
|
-
* which reference bare names (`nexus_project_registry`, `nexus_user_profile`,
|
|
988
|
-
* `nexus_sigils`, `nexus_project_id_aliases`, `nexus_audit_log`,
|
|
989
|
-
* `nexus_schema_meta`) — resolve via SQLite's bare-name fall-through to the
|
|
990
|
-
* attached GLOBAL db. ADR-036's global-only assertion is relaxed for the four
|
|
991
|
-
* graph tables ONLY (registry stays global-asserted in {@link getNexusRegistryDbPath}).
|
|
992
|
-
*
|
|
993
|
-
* Uses a promise guard so concurrent callers wait for the same initialization to
|
|
994
|
-
* complete (migrations are async).
|
|
995
|
-
*
|
|
996
|
-
* @task T307
|
|
997
|
-
* @task T11524 (E6-L4 — dual-scope chokepoint delegation)
|
|
998
|
-
* @task T11578 (AC3 — prefixed `nexus_*` tables)
|
|
999
|
-
* @task T11648 (ADR-090 runtime read half — project-scope graph + global attach)
|
|
1000
|
-
*/
|
|
1001
|
-
async function getNexusDb() {
|
|
1002
|
-
return (await bindNexusDomain()).db.drizzle;
|
|
1003
|
-
}
|
|
1004
|
-
/**
|
|
1005
|
-
* Bind the nexus schema to the {@link ProjectStore} holding the code graph,
|
|
1006
|
-
* with the GLOBAL `cleo.db` ATTACHed for registry/identity reads.
|
|
1007
|
-
*
|
|
1008
|
-
* ## E6-L15 cutover (T12039)
|
|
1009
|
-
*
|
|
1010
|
-
* Replaces this module's singleton quintet (`_nexusDb` / `_nexusNativeDb` /
|
|
1011
|
-
* `_nexusDbPath` / `_nexusRegistryPath` / `_nexusInitPromise`). Path keying,
|
|
1012
|
-
* single-flight, and handle liveness move to the binding registry; this
|
|
1013
|
-
* function keeps only what is genuinely nexus-specific — the two-scope open
|
|
1014
|
-
* order and the registry ATTACH.
|
|
1015
|
-
*
|
|
1016
|
-
* The GLOBAL registry path is captured in the bound value rather than a
|
|
1017
|
-
* separate module-global, so a `CLEO_HOME` change invalidates exactly this
|
|
1018
|
-
* binding (and re-runs the global migration before re-attaching) instead of
|
|
1019
|
-
* resetting a process-wide singleton that other projects also depended on.
|
|
1020
|
-
*
|
|
1021
|
-
* @returns The live nexus-domain binding.
|
|
1022
|
-
*
|
|
1023
|
-
* @task T12039 (E6-L15)
|
|
1024
|
-
*/
|
|
1025
|
-
async function bindNexusDomain() {
|
|
1026
|
-
const requestedRegistryPath = getNexusRegistryDbPath();
|
|
1027
|
-
const bound = peekProjectDomain("nexus");
|
|
1028
|
-
if (bound && bound.db.registryPath !== requestedRegistryPath) releaseDomainBindings({
|
|
1029
|
-
scope: "project",
|
|
1030
|
-
domain: "nexus"
|
|
1031
|
-
});
|
|
1032
|
-
detectAndWarnOnNestedNexus();
|
|
1033
|
-
await openDualScopeDb("global");
|
|
1034
|
-
const binding = await bindProjectDomain("nexus", void 0, (nativeDb, store) => {
|
|
1035
|
-
ensureGlobalRegistryAttached(nativeDb);
|
|
1036
|
-
const db = drizzle({ client: nativeDb });
|
|
1037
|
-
runNexusMigrations(nativeDb, db, store.dbPath);
|
|
1038
|
-
nativeDb.prepare(`INSERT OR IGNORE INTO nexus_schema_meta (key, value) VALUES ('schemaVersion', '${NEXUS_SCHEMA_VERSION}')`).run();
|
|
1039
|
-
return {
|
|
1040
|
-
drizzle: db,
|
|
1041
|
-
registryPath: requestedRegistryPath
|
|
1042
|
-
};
|
|
1043
|
-
});
|
|
1044
|
-
try {
|
|
1045
|
-
ensureGlobalRegistryAttached(binding.native);
|
|
1046
|
-
} catch {
|
|
1047
|
-
releaseDomainBindings({
|
|
1048
|
-
scope: "project",
|
|
1049
|
-
domain: "nexus"
|
|
1050
|
-
});
|
|
1051
|
-
throw new Error("T12039: nexus binding lost its GLOBAL registry ATTACH and could not re-attach.");
|
|
1052
|
-
}
|
|
1053
|
-
return binding;
|
|
1054
|
-
}
|
|
1055
|
-
/**
|
|
1056
|
-
* Close the nexus-domain database connection and release resources.
|
|
1057
|
-
*
|
|
1058
|
-
* ## E6-L4 (T11524) · ADR-090 runtime read half (T11648)
|
|
1059
|
-
*
|
|
1060
|
-
* The nexus GRAPH domain now SHARES the consolidated PROJECT `cleo.db` handle
|
|
1061
|
-
* with the other project-tier domains (tasks/brain/conduit — all open it via
|
|
1062
|
-
* {@link openDualScopeDb}('project'), same cache key), with the GLOBAL `cleo.db`
|
|
1063
|
-
* ATTACHed for registry/identity reads. This function therefore must NOT close
|
|
1064
|
-
* the underlying `DatabaseSync` nor evict the dual-scope cache — doing so would
|
|
1065
|
-
* break in-flight queries from those siblings with "database is not open". It
|
|
1066
|
-
* only drops the nexus-domain singleton references; the shared handle's lifecycle
|
|
1067
|
-
* (and the global ATTACH) is owned by `openDualScopeDb` and torn down by a
|
|
1068
|
-
* coordinated reset (`closeAllDatabases` → `_resetDualScopeDbCache`).
|
|
1069
|
-
*/
|
|
1070
|
-
function closeNexusDb() {
|
|
1071
|
-
releaseDomainBindings({
|
|
1072
|
-
scope: "project",
|
|
1073
|
-
domain: "nexus"
|
|
1074
|
-
});
|
|
1075
|
-
}
|
|
1076
|
-
/**
|
|
1077
|
-
* Reset nexus singleton state without saving.
|
|
1078
|
-
* Used during tests or when the database file is recreated.
|
|
1079
|
-
* Safe to call multiple times.
|
|
1080
|
-
*
|
|
1081
|
-
* ## E6-L4 (T11524) · ADR-090 runtime read half (T11648)
|
|
1082
|
-
*
|
|
1083
|
-
* Drops only the nexus-domain singleton references — does NOT close the shared
|
|
1084
|
-
* dual-scope PROJECT `cleo.db` handle nor evict the dual-scope cache (that handle
|
|
1085
|
-
* is shared with the other project-tier domains). Mirrors {@link closeNexusDb}.
|
|
1086
|
-
*/
|
|
1087
|
-
function resetNexusDbState() {
|
|
1088
|
-
releaseDomainBindings({
|
|
1089
|
-
scope: "project",
|
|
1090
|
-
domain: "nexus"
|
|
1091
|
-
});
|
|
1092
|
-
}
|
|
1093
|
-
/**
|
|
1094
|
-
* Get the underlying node:sqlite DatabaseSync instance for the nexus domain.
|
|
1095
|
-
* Useful for direct PRAGMA calls or raw SQL operations.
|
|
1096
|
-
* Returns null if the database hasn't been initialized.
|
|
1097
|
-
*/
|
|
1098
|
-
function getNexusNativeDb() {
|
|
1099
|
-
return boundProjectNative("nexus");
|
|
1100
|
-
}
|
|
1101
|
-
|
|
1102
|
-
export { NEXUS_SCHEMA_VERSION as N, _resetNestedNexusWarningGate as _, getNexusNativeDb as a, bindNexusDomain as b, closeNexusDb as c, detectAndWarnOnNestedNexus as d, getNestedNexusSentinelPath as e, getNexusDbPath as f, getNexusDb as g, getNexusRegistryDbPath as h, resolveNexusMigrationsFolder as i, boundProjectNative as j, bindProjectDomain as k, bindGlobalDomainAtPath as l, peekDomainAtPath as m, drizzle as n, releaseDomainBindings as o, peekProjectDomain as p, peekGlobalDomain as q, resetNexusDbState as r, bindGlobalDomain as s };
|
|
1103
|
-
//# sourceMappingURL=nexus-sqlite2-BBfY2xnY.js.map
|