@cleocode/cleo 2026.9.5 → 2026.9.7
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 +32 -3
- package/dist/cli/index.js.map +1 -1
- package/package.json +13 -13
- package/scripts/copy-studio-dist.mjs +97 -3
- package/studio-dist/client/_app/immutable/chunks/BGmpyfzD.js +1 -0
- package/studio-dist/client/_app/immutable/chunks/{CKXdW4mW.js → DVHIxkgs.js} +1 -1
- package/studio-dist/client/_app/immutable/chunks/{DrfFUIvQ.js → TX-23QW3.js} +1 -1
- package/studio-dist/client/_app/immutable/chunks/{C7UP-KLT.js → eK8hf4s7.js} +1 -1
- package/studio-dist/client/_app/immutable/entry/{app.BwkUGH1B.js → app.BoQ7cgT2.js} +2 -2
- package/studio-dist/client/_app/immutable/entry/start.Cg1v8DU4.js +1 -0
- package/studio-dist/client/_app/immutable/nodes/{0.DcUJW-xi.js → 0.CZzEEyVh.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{1.DyTt_cQs.js → 1.Bj3Opbua.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{15.LRqqoueS.js → 15.BfXgiwMC.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{16.-hGPNXOI.js → 16.mEwy9cqh.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{17.ChMxgTIY.js → 17.DP2QtQGn.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{18.B9zeITVb.js → 18.Bu0054sX.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{20.BHg5roNq.js → 20.B1AIHdkP.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{24.B_s9aY5m.js → 24.BUoUu37z.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{25.DZXkDxw_.js → 25.ddZ1_EFk.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{26.BBRbdwIG.js → 26.6OcmQbLV.js} +1 -1
- package/studio-dist/client/_app/immutable/nodes/{3.DMYcrZeG.js → 3.Dyir4xXj.js} +1 -1
- package/studio-dist/client/_app/version.json +1 -1
- package/studio-dist/server/chunks/{0-CM4iQVYP.js → 0-CvsKDxQ6.js} +3 -3
- package/studio-dist/server/chunks/{1-BQFD-dx6.js → 1-ck_x2Hf0.js} +3 -3
- package/studio-dist/server/chunks/{15-Cng10n82.js → 15-BvUNl3KL.js} +3 -3
- package/studio-dist/server/chunks/{16-u3KwU3N4.js → 16-De6EzPSa.js} +3 -3
- package/studio-dist/server/chunks/{17-BDtxQX9n.js → 17-CZNsiZhi.js} +3 -3
- package/studio-dist/server/chunks/{18-wwUoSO4F.js → 18-CbxxjZox.js} +3 -3
- package/studio-dist/server/chunks/{20-B-0CBvqY.js → 20-DVU22np7.js} +3 -3
- package/studio-dist/server/chunks/{24-BeVcofpU.js → 24-CVlymvLF.js} +3 -3
- package/studio-dist/server/chunks/{25-DIuzTPOu.js → 25-CAg6Xcmn.js} +3 -3
- package/studio-dist/server/chunks/{26-CY8x0KNI.js → 26-_nfVTvNi.js} +3 -3
- package/studio-dist/server/chunks/{3-p3RwD-FY.js → 3-B8KhfvHp.js} +3 -3
- package/studio-dist/server/chunks/{_layout.svelte-rswfOTDe.js → _layout.svelte-BEIGQcIv.js} +4 -4
- package/studio-dist/server/chunks/{_page.svelte-DaYxqOUS.js → _page.svelte-2cgtvHwW.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-BT1YF8j2.js → _page.svelte-9OQphlnm.js} +4 -4
- package/studio-dist/server/chunks/{_page.svelte-CiIYIPG9.js → _page.svelte-BIlhmugm.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-C9twD2l1.js → _page.svelte-BgwL2Gyu.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-DKVwBmIp.js → _page.svelte-C_VSL8NW.js} +4 -4
- package/studio-dist/server/chunks/{_page.svelte-CHH1vmfg.js → _page.svelte-DOWw416I.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-D8NhlkPD.js → _page.svelte-Wfx7ww_h.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-DZEnHo1L.js → _page.svelte-l4Z_xjl9.js} +3 -3
- package/studio-dist/server/chunks/{_page.svelte-DmTXiXKT.js → _page.svelte-tYN7_LXI.js} +3 -3
- package/studio-dist/server/chunks/{client-ym-URLFs.js → client-CgX38JBu.js} +2 -2
- package/studio-dist/server/chunks/{error.svelte-Bt1EbBZe.js → error.svelte-CplNulnS.js} +3 -3
- package/studio-dist/server/chunks/{internal-D3i_4gCl.js → internal-D6eWgsHJ.js} +2 -2
- package/studio-dist/server/chunks/{stores-ByevKXL9.js → stores-5DmdjPCH.js} +2 -2
- package/studio-dist/server/index.js +1 -1
- package/studio-dist/server/manifest.js +12 -12
- package/studio-dist/client/_app/immutable/assets/ort-wasm-simd-threaded.asyncify.BrebZMa_.wasm +0 -0
- package/studio-dist/client/_app/immutable/chunks/9yrFrmKZ.js +0 -1
- package/studio-dist/client/_app/immutable/entry/start.BcsID0Sf.js +0 -1
- package/studio-dist/server/chunks/0-CM4iQVYP.js.map +0 -1
- package/studio-dist/server/chunks/1-BQFD-dx6.js.map +0 -1
- package/studio-dist/server/chunks/10-DvOD4ksa.js.map +0 -1
- package/studio-dist/server/chunks/11-DMnBZ02H.js.map +0 -1
- package/studio-dist/server/chunks/12-CCyRyRWX.js.map +0 -1
- package/studio-dist/server/chunks/13-Dx1c3a_X.js.map +0 -1
- package/studio-dist/server/chunks/14-Bo-dTCaZ.js.map +0 -1
- package/studio-dist/server/chunks/15-Cng10n82.js.map +0 -1
- package/studio-dist/server/chunks/16-u3KwU3N4.js.map +0 -1
- package/studio-dist/server/chunks/17-BDtxQX9n.js.map +0 -1
- package/studio-dist/server/chunks/18-wwUoSO4F.js.map +0 -1
- package/studio-dist/server/chunks/19-DqHyladS.js.map +0 -1
- package/studio-dist/server/chunks/2-COvmA-ZA.js.map +0 -1
- package/studio-dist/server/chunks/20-B-0CBvqY.js.map +0 -1
- package/studio-dist/server/chunks/21-DXK9ptAC.js.map +0 -1
- package/studio-dist/server/chunks/22-DD5CLWJC.js.map +0 -1
- package/studio-dist/server/chunks/23-D_tUnnoc.js.map +0 -1
- package/studio-dist/server/chunks/24-BeVcofpU.js.map +0 -1
- package/studio-dist/server/chunks/25-DIuzTPOu.js.map +0 -1
- package/studio-dist/server/chunks/26-CY8x0KNI.js.map +0 -1
- package/studio-dist/server/chunks/27-C9edghG4.js.map +0 -1
- package/studio-dist/server/chunks/28-VemTJGyc.js.map +0 -1
- package/studio-dist/server/chunks/29-CXP-m29t.js.map +0 -1
- package/studio-dist/server/chunks/3-p3RwD-FY.js.map +0 -1
- package/studio-dist/server/chunks/30-QiM1S4cJ.js.map +0 -1
- package/studio-dist/server/chunks/31-BwdY9NnB.js.map +0 -1
- package/studio-dist/server/chunks/4-CSaG4HjO.js.map +0 -1
- package/studio-dist/server/chunks/5-i5ry4y3C.js.map +0 -1
- package/studio-dist/server/chunks/6-DR1GWBMT.js.map +0 -1
- package/studio-dist/server/chunks/7-DSNwn3aQ.js.map +0 -1
- package/studio-dist/server/chunks/8-Bj0bx07K.js.map +0 -1
- package/studio-dist/server/chunks/9-B3Tz0mZq.js.map +0 -1
- package/studio-dist/server/chunks/AwsRestJsonProtocol-BZuoNBmL.js.map +0 -1
- package/studio-dist/server/chunks/HeroHeader-v4Q9vaGr.js.map +0 -1
- package/studio-dist/server/chunks/Sparkline-BJ-GuhRd.js.map +0 -1
- package/studio-dist/server/chunks/StatBlock-DHJMmOCx.js.map +0 -1
- package/studio-dist/server/chunks/Tabs-DzG6Bn9a.js.map +0 -1
- package/studio-dist/server/chunks/UnionSerde-BflIkhKj.js.map +0 -1
- package/studio-dist/server/chunks/_dispatch-ncuRztUQ.js.map +0 -1
- package/studio-dist/server/chunks/_lafs-C3_fBF_X.js.map +0 -1
- package/studio-dist/server/chunks/_layout.svelte-rswfOTDe.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-BT1YF8j2.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-BVVTrzTL.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-BXyoMME1.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-B_pq-Z98.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-Byz2djto.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-C3aIui4o.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-C9twD2l1.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-CCoTp89s.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-CHH1vmfg.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-CHzXuw2Q.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-CYDjW1R0.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-CiIYIPG9.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-Clbkk1gm.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-CophUar3.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-D8NhlkPD.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-DKVwBmIp.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-DUWbZjC7.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-DYNorA0S.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-DZEnHo1L.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-DaYxqOUS.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-DmTXiXKT.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-EkXO_YfN.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-M5D2QnMS.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-UYiF7YBK.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-al08ovKm.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-bGhsrIjS.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-ksTJUXce.js.map +0 -1
- package/studio-dist/server/chunks/_page.svelte-nzffIbBP.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-4NyKAneX.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-4p6cp9ke.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-7hGdxdEI.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-B2E7fxo9.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-B5g3eScF.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-B6b3b-yA.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-BOgGqaZp.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-BPcErnS0.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-BT0Uq2yq.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-BV1HiKZ0.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-BWp3g6Cr.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-BdN4AJ6o.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-Bfr4u3EP.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-Bw7A4zgb.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-C3Jo-ju8.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-C4BcDGqS.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-C5NF-UgC.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-CDMurH5m.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-CGiAXy5i.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-CJA1djzJ.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-COJHCgbq.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-CShsBkeE.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-CUl-Utkt.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-CboRJY0Q.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-CkoJ2HCW.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-CpmMp5D8.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-Cq60m8Pw.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-Cz0zgaUV.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-D0GAFJRb.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-DA6p3pmi.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-DRVz9D-J.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-DSAv66wD.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-DSzRdt1U.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-DThYFaZj.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-DV6pzF-M.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-D_3Pm0gr.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-DcHxdMsm.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-DgbY5EB3.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-Dlfadh2I.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-DnE0f-iC.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-Do9RIPRo.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-DwTRjS4y.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-JallJnps.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-NEFTbJpM.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-ZS1_yMwR.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-_RJXtmfi.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-d-2NvRwX.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-hL92cV7Z.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-k2fApwOp.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-lPlBUIJX.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-rUWMLkIw.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-sv4pA808.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-tKMjUFUP.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-uUx7uT2Y.js.map +0 -1
- package/studio-dist/server/chunks/_server.ts-ujoDR2_g.js.map +0 -1
- package/studio-dist/server/chunks/abort-events-CDRAJSqb.js.map +0 -1
- package/studio-dist/server/chunks/adapters-BkMgPNUM.js.map +0 -1
- package/studio-dist/server/chunks/adapters2-CQ3PzoaK.js.map +0 -1
- package/studio-dist/server/chunks/api-mode2-3W-I1-XO.js.map +0 -1
- package/studio-dist/server/chunks/api2-CmNQzb0b.js.map +0 -1
- package/studio-dist/server/chunks/attention-consolidate-CidG1jfH.js.map +0 -1
- package/studio-dist/server/chunks/audit-log-BXVi9iyE.js.map +0 -1
- package/studio-dist/server/chunks/audit3-DMO_fUGp.js.map +0 -1
- package/studio-dist/server/chunks/auto-extract-B84La1Vs.js.map +0 -1
- package/studio-dist/server/chunks/brain-CXR7ZT7S.js.map +0 -1
- package/studio-dist/server/chunks/brain-consolidator-JGm6mzFf.js.map +0 -1
- package/studio-dist/server/chunks/brain-doctor-Dc2WqVbs.js.map +0 -1
- package/studio-dist/server/chunks/brain-embedding-Djw9ekXu.js.map +0 -1
- package/studio-dist/server/chunks/brain-lifecycle-BOOa876K.js.map +0 -1
- package/studio-dist/server/chunks/brain-maintenance-U6VvsvmK.js.map +0 -1
- package/studio-dist/server/chunks/brain-maintenance2-CwVSmfDT.js.map +0 -1
- package/studio-dist/server/chunks/brain-retrieval2-exR8mdgh.js.map +0 -1
- package/studio-dist/server/chunks/brain-search-CpSh-SNi.js.map +0 -1
- package/studio-dist/server/chunks/brain-search2-CwI2cXgg.js.map +0 -1
- package/studio-dist/server/chunks/brain-similarity-DI4yzm9e.js.map +0 -1
- package/studio-dist/server/chunks/brain-stdp2-BxSBIlSr.js.map +0 -1
- package/studio-dist/server/chunks/brain-writer-handlers-Dwu0QCAA.js.map +0 -1
- package/studio-dist/server/chunks/brain-writer-thread-6n7wI7Gy.js.map +0 -1
- package/studio-dist/server/chunks/branch-lock-Cq7zzmFK.js.map +0 -1
- package/studio-dist/server/chunks/branch-lock2-CmDc4CZW.js.map +0 -1
- package/studio-dist/server/chunks/cancelled-child-waiver-audit-DkesrN83.js.map +0 -1
- package/studio-dist/server/chunks/catalog-model-resolver-Bas9qnoP.js.map +0 -1
- package/studio-dist/server/chunks/catalog-model-resolver2-Cexk2TN0.js.map +0 -1
- package/studio-dist/server/chunks/catalog-resolver-CLot3XJO.js.map +0 -1
- package/studio-dist/server/chunks/catalog-resolver2-JmKb91kY.js.map +0 -1
- package/studio-dist/server/chunks/chunk-DDP5xfzh.js.map +0 -1
- package/studio-dist/server/chunks/cleo-home-CCfe6kAQ.js.map +0 -1
- package/studio-dist/server/chunks/cli-action-DQcaqcfn.js.map +0 -1
- package/studio-dist/server/chunks/client-ym-URLFs.js.map +0 -1
- package/studio-dist/server/chunks/concrete-session2-bb_vxJ2N.js.map +0 -1
- package/studio-dist/server/chunks/config-DHj9CcFs.js.map +0 -1
- package/studio-dist/server/chunks/config2-F6PPIn7D.js.map +0 -1
- package/studio-dist/server/chunks/connections-BMGJVYcS.js.map +0 -1
- package/studio-dist/server/chunks/connections2-mi7mZqJM.js.map +0 -1
- package/studio-dist/server/chunks/credential-pool-vF6NdtT9.js.map +0 -1
- package/studio-dist/server/chunks/credentials-C7EJFf5O.js.map +0 -1
- package/studio-dist/server/chunks/credentials-store-CFygIuB2.js.map +0 -1
- package/studio-dist/server/chunks/cross-db-cleanup-1LWTUKPi.js.map +0 -1
- package/studio-dist/server/chunks/data-accessor-CWgVndbR.js.map +0 -1
- package/studio-dist/server/chunks/data-safety-central-DaFxK27G.js.map +0 -1
- package/studio-dist/server/chunks/decisions-CmVXV2-H.js.map +0 -1
- package/studio-dist/server/chunks/decisions2-XQsSYdxa.js.map +0 -1
- package/studio-dist/server/chunks/depends-waiver-audit-CUmlBYHx.js.map +0 -1
- package/studio-dist/server/chunks/dev-BNpEUZI3.js.map +0 -1
- package/studio-dist/server/chunks/dialectic-evaluator2-BOyyXhdI.js.map +0 -1
- package/studio-dist/server/chunks/dist-es2-DQy2Mjn_.js.map +0 -1
- package/studio-dist/server/chunks/dist-es3-CBygU4n5.js.map +0 -1
- package/studio-dist/server/chunks/dist-es4-CavbNu4B.js.map +0 -1
- package/studio-dist/server/chunks/dist-es5-Crpm8Wsl.js.map +0 -1
- package/studio-dist/server/chunks/dist-es6-CgePHzh4.js.map +0 -1
- package/studio-dist/server/chunks/dist-es7-k6c5GEd7.js.map +0 -1
- package/studio-dist/server/chunks/dist-es8-Bd9v0_pE.js.map +0 -1
- package/studio-dist/server/chunks/dist3-23bsJhRw.js.map +0 -1
- package/studio-dist/server/chunks/dist4-DmC1zSXi.js.map +0 -1
- package/studio-dist/server/chunks/dual-scope-db-DKnWu1KM.js.map +0 -1
- package/studio-dist/server/chunks/dual-scope-db2-Dht3luRw.js.map +0 -1
- package/studio-dist/server/chunks/duplicate-bypass-audit-BN5w1H2y.js.map +0 -1
- package/studio-dist/server/chunks/duplicate-detector-CaVFMKdE.js.map +0 -1
- package/studio-dist/server/chunks/edge-types-CgBvb0w1.js.map +0 -1
- package/studio-dist/server/chunks/embedding-local-xEnym8Ho.js.map +0 -1
- package/studio-dist/server/chunks/error.svelte-Bt1EbBZe.js.map +0 -1
- package/studio-dist/server/chunks/event-streams-Bi2p_fVo.js.map +0 -1
- package/studio-dist/server/chunks/execution-learning-BVCw7Plq.js.map +0 -1
- package/studio-dist/server/chunks/exodus-BBuuN6aA.js.map +0 -1
- package/studio-dist/server/chunks/explorer-loader-BN_mkt3_.js.map +0 -1
- package/studio-dist/server/chunks/externalDataInterceptor-C3C4cObe.js.map +0 -1
- package/studio-dist/server/chunks/extraction-gate-DDNBq7gu.js.map +0 -1
- package/studio-dist/server/chunks/extraction-gate2-D77EZBQ6.js.map +0 -1
- package/studio-dist/server/chunks/getSSOTokenFromFile-yZAJxDci.js.map +0 -1
- package/studio-dist/server/chunks/governor2-CtfV3wfX.js.map +0 -1
- package/studio-dist/server/chunks/graph-auto-populate-Dmsr9ZJM.js.map +0 -1
- package/studio-dist/server/chunks/graph-auto-populate2-Cz0qeebM.js.map +0 -1
- package/studio-dist/server/chunks/graph-memory-bridge-CY8ft_d7.js.map +0 -1
- package/studio-dist/server/chunks/graph-memory-bridge2-Cd0XZwqc.js.map +0 -1
- package/studio-dist/server/chunks/handler-helpers-AANBGA_p.js.map +0 -1
- package/studio-dist/server/chunks/hash-Cm6yMET4.js.map +0 -1
- package/studio-dist/server/chunks/health-monitor-FepUZN1m.js.map +0 -1
- package/studio-dist/server/chunks/hooks.server-DBsyphiX.js.map +0 -1
- package/studio-dist/server/chunks/http-CRTZe306.js.map +0 -1
- package/studio-dist/server/chunks/identity-DRpurt56.js.map +0 -1
- package/studio-dist/server/chunks/identity2-DeAB5RXE.js.map +0 -1
- package/studio-dist/server/chunks/index-61916rmV.js.map +0 -1
- package/studio-dist/server/chunks/index-DAgVDouG.js.map +0 -1
- package/studio-dist/server/chunks/index-Dtt_h58T.js.map +0 -1
- package/studio-dist/server/chunks/index-server-DocJvixA.js.map +0 -1
- package/studio-dist/server/chunks/indexes-DZ52grq6.js.map +0 -1
- package/studio-dist/server/chunks/internal-D3i_4gCl.js.map +0 -1
- package/studio-dist/server/chunks/json-Bfixam3g.js.map +0 -1
- package/studio-dist/server/chunks/lane-transition-lM2ngbbc.js.map +0 -1
- package/studio-dist/server/chunks/learnings-D6Y3YGMU.js.map +0 -1
- package/studio-dist/server/chunks/learnings2-MwBdR9vb.js.map +0 -1
- package/studio-dist/server/chunks/lifecycle-ops2-V2CR5-7X.js.map +0 -1
- package/studio-dist/server/chunks/list-BhObczvn.js.map +0 -1
- package/studio-dist/server/chunks/living-brain2-j0B_Ir8j.js.map +0 -1
- package/studio-dist/server/chunks/llm-backend-resolver-D4ANvUPL.js.map +0 -1
- package/studio-dist/server/chunks/llm-extraction-DVCu4heR.js.map +0 -1
- package/studio-dist/server/chunks/loadSharedConfigFiles-umvW7kuz.js.map +0 -1
- package/studio-dist/server/chunks/loadSso-iidd5iKx.js.map +0 -1
- package/studio-dist/server/chunks/local-model-fit-B0TxifnX.js.map +0 -1
- package/studio-dist/server/chunks/local-model-fit2-BMqo6GJm.js.map +0 -1
- package/studio-dist/server/chunks/lock-CA7d6lj7.js.map +0 -1
- package/studio-dist/server/chunks/logger-DQIoyZbq.js.map +0 -1
- package/studio-dist/server/chunks/memory-BUbicBbE.js.map +0 -1
- package/studio-dist/server/chunks/memory-accessor-i3P-RHSg.js.map +0 -1
- package/studio-dist/server/chunks/memory-accessor2-B981tHDR.js.map +0 -1
- package/studio-dist/server/chunks/memory-bridge-BOlEWg9w.js.map +0 -1
- package/studio-dist/server/chunks/memory-sqlite2-B7dq8doO.js.map +0 -1
- package/studio-dist/server/chunks/memory2-Cgc_4D5q.js.map +0 -1
- package/studio-dist/server/chunks/model-runner2-B71xjp4y.js.map +0 -1
- package/studio-dist/server/chunks/mvi-helpers-BNsJ8ZpQ.js.map +0 -1
- package/studio-dist/server/chunks/nexus-adapter-9EL_VlGI.js.map +0 -1
- package/studio-dist/server/chunks/nexus-plasticity-BTfU8cW_.js.map +0 -1
- package/studio-dist/server/chunks/nexus-risk-audit-p379-TU5.js.map +0 -1
- package/studio-dist/server/chunks/nexus-schema-zeygY8OD.js.map +0 -1
- package/studio-dist/server/chunks/nexus-schema2-DP0Qd7CA.js.map +0 -1
- package/studio-dist/server/chunks/nexus-sqlite-BVNIpwc7.js.map +0 -1
- package/studio-dist/server/chunks/nexus-sqlite2-BBfY2xnY.js.map +0 -1
- package/studio-dist/server/chunks/no-face-up-DcejJLy-.js.map +0 -1
- package/studio-dist/server/chunks/node-http-handler-CJI8kn7X.js.map +0 -1
- package/studio-dist/server/chunks/observe-Bo9veHGe.js.map +0 -1
- package/studio-dist/server/chunks/observe2-wzO0MaMY.js.map +0 -1
- package/studio-dist/server/chunks/observer-reflector-BwNOuq1d.js.map +0 -1
- package/studio-dist/server/chunks/observer-reflector2-ggtC1hmk.js.map +0 -1
- package/studio-dist/server/chunks/on-open-Wpcw7DV4.js.map +0 -1
- package/studio-dist/server/chunks/open-cleo-db--8sYNaYY.js.map +0 -1
- package/studio-dist/server/chunks/parseKnownFiles-Dg0pMFcT.js.map +0 -1
- package/studio-dist/server/chunks/parseUrl-qgGfl-Vh.js.map +0 -1
- package/studio-dist/server/chunks/paths-CV7S5-Zm.js.map +0 -1
- package/studio-dist/server/chunks/patterns-lh5kn13I.js.map +0 -1
- package/studio-dist/server/chunks/patterns2-CzIcT-ai.js.map +0 -1
- package/studio-dist/server/chunks/pipeline-stage-IB_pOft-.js.map +0 -1
- package/studio-dist/server/chunks/prediction-D1lSGJ4c.js.map +0 -1
- package/studio-dist/server/chunks/premature-close-audit-VG09uAco.js.map +0 -1
- package/studio-dist/server/chunks/project-context-BjiqfEBi.js.map +0 -1
- package/studio-dist/server/chunks/provider-registry2-Cu7rAF0R.js.map +0 -1
- package/studio-dist/server/chunks/quality-feedback-CuCGEI6S.js.map +0 -1
- package/studio-dist/server/chunks/quality-scoring-CCPuRQmJ.js.map +0 -1
- package/studio-dist/server/chunks/query-ops-DCrjbZb9.js.map +0 -1
- package/studio-dist/server/chunks/query-promise-BkPmGPJy.js.map +0 -1
- package/studio-dist/server/chunks/readFile-CxwXhymG.js.map +0 -1
- package/studio-dist/server/chunks/registry-CL2gN1zd.js.map +0 -1
- package/studio-dist/server/chunks/registry2-DoPYJnUW.js.map +0 -1
- package/studio-dist/server/chunks/registry3-BajEb-ll.js.map +0 -1
- package/studio-dist/server/chunks/registry4-DCqffZkT.js.map +0 -1
- package/studio-dist/server/chunks/retry-B3oEKYpp.js.map +0 -1
- package/studio-dist/server/chunks/role-executor-CC8BU54L.js.map +0 -1
- package/studio-dist/server/chunks/role-resolver-D9QaDT0e.js.map +0 -1
- package/studio-dist/server/chunks/role-resolver2-nkhzS1oy.js.map +0 -1
- package/studio-dist/server/chunks/rollup-CiefjN_Y.js.map +0 -1
- package/studio-dist/server/chunks/safety-data-accessor-CniDmGJO.js.map +0 -1
- package/studio-dist/server/chunks/service-connections-accessor-yBCdcgU-.js.map +0 -1
- package/studio-dist/server/chunks/session-factory-vbengc42.js.map +0 -1
- package/studio-dist/server/chunks/session-grade-BF4ZZtN_.js.map +0 -1
- package/studio-dist/server/chunks/session-journal-Bvey70Ur.js.map +0 -1
- package/studio-dist/server/chunks/session-narrative-BirZINSU.js.map +0 -1
- package/studio-dist/server/chunks/session-store--N_xHxUH.js.map +0 -1
- package/studio-dist/server/chunks/session-store2-DAM-eVTH.js.map +0 -1
- package/studio-dist/server/chunks/sessions-33DD4hkt.js.map +0 -1
- package/studio-dist/server/chunks/sessions2-BHswKRDP.js.map +0 -1
- package/studio-dist/server/chunks/sigil-B-RznFXz.js.map +0 -1
- package/studio-dist/server/chunks/sigil2-jRMG5DuR.js.map +0 -1
- package/studio-dist/server/chunks/signin-BAsW3mM8.js.map +0 -1
- package/studio-dist/server/chunks/sleep-consolidation-BnSwXrvq.js.map +0 -1
- package/studio-dist/server/chunks/spawn-cli-wI1lBJhm.js.map +0 -1
- package/studio-dist/server/chunks/specialists-B_ZbpQlK.js.map +0 -1
- package/studio-dist/server/chunks/sqlite-Bm5LzbPs.js.map +0 -1
- package/studio-dist/server/chunks/sqlite-backup-CFG1-b2e.js.map +0 -1
- package/studio-dist/server/chunks/sqlite-data-accessor-DD_RFX6r.js.map +0 -1
- package/studio-dist/server/chunks/sqlite-data-accessor2-CRmgNBnq.js.map +0 -1
- package/studio-dist/server/chunks/sqlite-native-BwlIqtbs.js.map +0 -1
- package/studio-dist/server/chunks/sqlite2-CUPut2fh.js.map +0 -1
- package/studio-dist/server/chunks/src-BUqGet2c.js.map +0 -1
- package/studio-dist/server/chunks/src2-DK8DKufK.js.map +0 -1
- package/studio-dist/server/chunks/src3-BJjf7XRG.js.map +0 -1
- package/studio-dist/server/chunks/src4-DNleK_t_.js.map +0 -1
- package/studio-dist/server/chunks/sso-oidc-eUvwseuL.js.map +0 -1
- package/studio-dist/server/chunks/storage-B9UA3BHR.js.map +0 -1
- package/studio-dist/server/chunks/stores-ByevKXL9.js.map +0 -1
- package/studio-dist/server/chunks/sts-g7LDMLEd.js.map +0 -1
- package/studio-dist/server/chunks/surprisal-CwTfWQi8.js.map +0 -1
- package/studio-dist/server/chunks/surprisal-tree-7dfHsuw1.js.map +0 -1
- package/studio-dist/server/chunks/system-resolver2-Bzhue_zQ.js.map +0 -1
- package/studio-dist/server/chunks/tasks-SHX7UPGY.js.map +0 -1
- package/studio-dist/server/chunks/tasks-schema2-CTMoQKQy.js.map +0 -1
- package/studio-dist/server/chunks/tasks2-Bf9VHrv-.js.map +0 -1
- package/studio-dist/server/chunks/temporal-supersession-DP4GPG_B.js.map +0 -1
- package/studio-dist/server/chunks/token-cAhAD9f9.js.map +0 -1
- package/studio-dist/server/chunks/token-util-D6drEz8_.js.map +0 -1
- package/studio-dist/server/chunks/token-util2-8UPSGvbb.js.map +0 -1
- package/studio-dist/server/chunks/transcript-scanner-kJWhWmlg.js.map +0 -1
- package/studio-dist/server/chunks/transformers.node-_xbxmK5p.js.map +0 -1
- package/studio-dist/server/chunks/typed-query-l1D_QElt.js.map +0 -1
- package/studio-dist/server/chunks/ui-DR8zOSpC.js.map +0 -1
- package/studio-dist/server/chunks/unique-constraint-BZrrwgwc.js.map +0 -1
- package/studio-dist/server/chunks/update-B2YVBZG0.js.map +0 -1
- package/studio-dist/server/chunks/user-profile-B61ZhVmC.js.map +0 -1
- package/studio-dist/server/chunks/utils-BPSZyajG.js.map +0 -1
- package/studio-dist/server/chunks/validation-rules-CE27rtoF.js.map +0 -1
- package/studio-dist/server/chunks/zod-DsAeKNLm.js.map +0 -1
- package/studio-dist/server/index.js.map +0 -1
- package/studio-dist/server/manifest.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"on-open-Wpcw7DV4.js","sources":["../../../.svelte-kit/adapter-node/chunks/ensure-config.js","../../../.svelte-kit/adapter-node/chunks/archive.js","../../../.svelte-kit/adapter-node/chunks/on-open.js"],"sourcesContent":["import \"./paths.js\";\nimport \"./json.js\";\nimport { readFileSync } from \"node:fs\";\nimport { dirname, join, resolve } from \"node:path\";\nimport \"node:crypto\";\nimport { fileURLToPath } from \"node:url\";\nimport \"node:fs/promises\";\n//#region ../core/dist/scaffold/ensure-config.js\n/**\n* Resolve the package root directory (where schemas/ and templates/ live).\n*\n* @returns Absolute path to the @cleocode/core package root\n*/\nfunction getPackageRoot() {\n\treturn resolve(dirname(fileURLToPath(import.meta.url)), \"..\", \"..\");\n}\n/**\n* Read CLEO version from package.json.\n*\n* @returns Semver version string, or \"0.0.0\" if unavailable\n*/\nfunction getCleoVersion() {\n\ttry {\n\t\tconst pkgPath = join(getPackageRoot(), \"package.json\");\n\t\treturn JSON.parse(readFileSync(pkgPath, \"utf-8\")).version ?? \"0.0.0\";\n\t} catch {\n\t\treturn \"0.0.0\";\n\t}\n}\n//#endregion\nexport { getPackageRoot as n, getCleoVersion as t };\n","import { t as getLogger } from \"./logger.js\";\nimport { d as resolveCleoDir, o as getCleoHome } from \"./paths.js\";\nimport { t as getCleoVersion } from \"./ensure-config.js\";\nimport { copyFileSync, existsSync, mkdirSync, renameSync, unlinkSync, writeFileSync } from \"node:fs\";\nimport { basename, join } from \"node:path\";\n//#region ../core/dist/store/exodus/archive.js\n/**\n* Exodus source-DB ARCHIVE + completion-marker subsystem (T11777).\n*\n* ## Why this exists (stranded-residue corruption trigger)\n*\n* The exodus engine migrates from SIX legacy source DBs (project: `tasks.db`,\n* `brain.db`, `conduit.db`; global: `nexus.db`, `signaldock.db`, `skills.db`)\n* but, historically, NEVER retired them — `on-open.ts` literally notes \"the file\n* is never unlinked.\" Every cutover therefore STRANDS the legacy files, and each\n* stranded file re-arms the `tasks_tasks=0` auto-recover / exodus-on-open\n* corruption trigger (DHQ-052 · T11662): on the next open the consolidated DB\n* looks empty-with-legacy-present and the hook re-fires.\n*\n* This module closes the loop. After a migration's lossless validation passes\n* (row-count parity + integrity — `verifyMigration` / `isDataContinuityOk`), the\n* consumed source DBs are ARCHIVED (moved, never deleted) into a per-scope\n* `_archive/` directory, and a committed COMPLETION MARKER records the cutover.\n* The marker becomes the durable \"this scope is already migrated\" signal so a\n* re-appearing or stranded legacy file can never re-trigger exodus-on-open.\n*\n* ## Archive destinations (per scope, via the paths SSoT)\n*\n* - project sources → `<cleoDir>/_archive/` (e.g. `.cleo/_archive/`)\n* - global sources → `<cleoHome>/_archive/` (e.g. `~/.local/share/cleo/_archive/`)\n*\n* Both are resolved through `resolveCleoDir(cwd)` / `getCleoHome()` — never a\n* hardcoded `~/.local/share` (Paths SSoT · Gate 2 · D009).\n*\n* ## Reversibility + idempotency invariants\n*\n* - **Reversible** — archiving is an atomic `rename` (fallback copy+unlink\n* across filesystems). Nothing is ever deleted; an operator can move a DB\n* back out of `_archive/` to roll the cutover back.\n* - **Idempotent** — a source that is already absent (already archived, or a\n* fresh install that never had it) is a silent no-op. Re-running over an\n* already-archived fleet does nothing and never throws.\n* - **Never blind-move** — only sources the caller asserts were actually\n* consumed + validated by the migration are archived. A source whose\n* migration did not run is left untouched.\n* - **Emergency-archive reconciliation** — this box was emergency-archived\n* (`.cleo/_archive-legacy-postcutover-*` already holds `tasks.db` +\n* `conduit.db`). When the canonical destination already contains a file with\n* the same name, the incoming file is parked under a timestamped sibling name\n* rather than clobbering the prior archive.\n*\n* @module\n* @task T11777 (exodus archives all 6 legacy DBs post-validation + completion marker)\n* @epic T11249 (E6)\n* @saga T11242 (SG-DB-SUBSTRATE-V2)\n* @see packages/core/src/store/exodus/on-open.ts — wires this into the validated success path\n* @see packages/core/src/store/exodus/plan.ts — buildSourceDescriptors (the 6 sources)\n*/\nvar log = getLogger(\"exodus-archive\");\n/** Per-scope archive directory name (sibling of the migrated DBs). */\nvar ARCHIVE_DIR_NAME = \"_archive\";\n/** Per-scope completion-marker filename written next to the consolidated cleo.db. */\nvar MARKER_FILENAME_BY_SCOPE = {\n\tproject: \"exodus-complete\",\n\tglobal: \"exodus-complete\"\n};\n/** SQLite sidecar suffixes archived alongside the main DB file. */\nvar SIDECAR_SUFFIXES = [\"-wal\", \"-shm\"];\n/**\n* Resolve the directory that holds a scope's legacy source DBs (and therefore\n* its archive + completion marker): project → `<cleoDir>`, global →\n* `<cleoHome>`. Always via the paths SSoT.\n*\n* @param scope - Target scope.\n* @param cwd - Working directory used to resolve the project `.cleo/` dir.\n* @returns Absolute path to the scope's base directory.\n*/\nfunction scopeBaseDir(scope, cwd) {\n\treturn scope === \"project\" ? resolveCleoDir(cwd) : getCleoHome();\n}\n/**\n* Absolute path to a scope's `_archive/` directory.\n*\n* @param scope - Target scope.\n* @param cwd - Working directory used to resolve the project `.cleo/` dir.\n* @returns Absolute path to `<scopeBase>/_archive/`.\n*/\nfunction exodusArchiveDir(scope, cwd) {\n\treturn join(scopeBaseDir(scope, cwd), ARCHIVE_DIR_NAME);\n}\n/**\n* Absolute path to a scope's exodus completion marker file.\n*\n* @param scope - Target scope.\n* @param cwd - Working directory used to resolve the project `.cleo/` dir.\n* @returns Absolute path to `<scopeBase>/exodus-complete`.\n*/\nfunction exodusMarkerPath(scope, cwd) {\n\treturn join(scopeBaseDir(scope, cwd), MARKER_FILENAME_BY_SCOPE[scope]);\n}\n/**\n* Return `true` if a scope's exodus completion marker exists on disk.\n*\n* Resolution-safe: when the project `.cleo/` dir cannot be resolved (e.g. `cwd`\n* is not inside a CLEO project — `resolveCleoDir` throws), this returns `false`\n* (no marker) rather than propagating, so the on-open trigger gate degrades to\n* the source-file path safely instead of crashing the open.\n*\n* @param scope - Target scope.\n* @param cwd - Working directory used to resolve the project `.cleo/` dir.\n* @returns Whether `<scopeBase>/exodus-complete` exists.\n*/\nfunction hasExodusCompleteMarker(scope, cwd) {\n\ttry {\n\t\treturn existsSync(exodusMarkerPath(scope, cwd));\n\t} catch {\n\t\treturn false;\n\t}\n}\n/**\n* Write a scope's exodus completion marker atomically (write-then-rename).\n*\n* Idempotent: re-writing simply refreshes the marker (same path). The marker is\n* the SSoT trigger-gate consulted by {@link maybeRunExodusOnOpen} — once present,\n* a stranded/re-appearing legacy file cannot re-arm the auto-migration.\n*\n* @param scope - Scope being certified as migrated.\n* @param archivedSources - Logical names of the sources archived for this scope.\n* @param cwd - Working directory used to resolve the project dir.\n* @returns The marker's absolute path.\n*\n* @task T11777\n*/\nfunction writeExodusCompleteMarker(scope, archivedSources, cwd) {\n\tconst markerPath = exodusMarkerPath(scope, cwd);\n\tmkdirSync(scopeBaseDir(scope, cwd), { recursive: true });\n\tconst marker = {\n\t\tversion: 1,\n\t\tscope,\n\t\tcleoVersion: getCleoVersion(),\n\t\tcompletedAt: (/* @__PURE__ */ new Date()).toISOString(),\n\t\tarchivedSources: [...archivedSources]\n\t};\n\tconst tmpPath = `${markerPath}.tmp`;\n\twriteFileSync(tmpPath, JSON.stringify(marker, null, 2) + \"\\n\", \"utf8\");\n\trenameSync(tmpPath, markerPath);\n\tlog.info({\n\t\tscope,\n\t\tmarkerPath,\n\t\tarchivedSources\n\t}, \"exodus: wrote completion marker\");\n\treturn markerPath;\n}\n/**\n* Move a single file to `destDir`, atomically when possible.\n*\n* Uses `rename`; on a cross-filesystem `EXDEV` (or any rename failure) falls back\n* to copy-then-unlink so the move still completes. When `destDir` already holds a\n* file with the same name (e.g. a prior emergency archive), the incoming file is\n* parked under a timestamped sibling name so the prior archive is never clobbered.\n*\n* @param srcPath - Absolute source file path (assumed to exist).\n* @param destDir - Absolute archive directory (created if missing).\n* @returns The absolute destination path the file landed at.\n*/\nfunction moveFileInto(srcPath, destDir) {\n\tmkdirSync(destDir, { recursive: true });\n\tlet dest = join(destDir, basename(srcPath));\n\tif (existsSync(dest)) {\n\t\tconst stamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, \"\").replace(/Z$/, \"Z\");\n\t\tdest = join(destDir, `${basename(srcPath)}.${stamp}`);\n\t}\n\ttry {\n\t\trenameSync(srcPath, dest);\n\t} catch {\n\t\tcopyFileSync(srcPath, dest);\n\t\tunlinkSync(srcPath);\n\t}\n\treturn dest;\n}\n/**\n* Archive ONE legacy source DB (and its `-wal` / `-shm` sidecars) into the\n* scope's `_archive/` directory.\n*\n* Idempotent: if the main DB file is already absent, this is a no-op (the file\n* was already archived, or never existed). Sidecars are archived best-effort and\n* only when the main DB is present.\n*\n* @param source - The descriptor for the source DB to archive.\n* @param cwd - Working directory used to resolve the project dir.\n* @returns A {@link ArchivedSourceResult} describing what happened.\n*\n* @task T11777\n*/\nfunction archiveSourceDb(source, cwd) {\n\tif (!existsSync(source.path)) return {\n\t\tname: source.name,\n\t\tsourcePath: source.path,\n\t\tarchivedTo: null,\n\t\taction: \"absent\"\n\t};\n\tconst destDir = exodusArchiveDir(source.targetScope, cwd);\n\tconst archivedTo = moveFileInto(source.path, destDir);\n\tfor (const suffix of SIDECAR_SUFFIXES) {\n\t\tconst sidecar = `${source.path}${suffix}`;\n\t\tif (existsSync(sidecar)) try {\n\t\t\tmoveFileInto(sidecar, destDir);\n\t\t} catch (err) {\n\t\t\tlog.warn({\n\t\t\t\terr,\n\t\t\t\tsidecar,\n\t\t\t\tsourceName: source.name\n\t\t\t}, \"exodus-archive: failed to archive sidecar (non-fatal)\");\n\t\t}\n\t}\n\tlog.info({\n\t\tsourceName: source.name,\n\t\tsourcePath: source.path,\n\t\tarchivedTo,\n\t\tscope: source.targetScope\n\t}, \"exodus-archive: archived legacy source DB\");\n\treturn {\n\t\tname: source.name,\n\t\tsourcePath: source.path,\n\t\tarchivedTo,\n\t\taction: \"archived\"\n\t};\n}\n/**\n* Archive every consumed legacy source DB AFTER a validated cutover and write a\n* per-scope completion marker.\n*\n* **Never blind-moves**: only the descriptors passed in `consumed` are archived\n* — the caller (the validated migrate/on-open success path) passes exactly the\n* sources whose migration actually ran and passed parity. A completion marker is\n* written for every scope represented in `consumed`, even if some of that scope's\n* sources were already absent (already archived) — the marker certifies \"this\n* scope's cutover is done\", which is true once parity passed.\n*\n* Idempotent + reversible (see module docs). Safe to call repeatedly.\n*\n* @param consumed - Source descriptors the migration consumed + validated.\n* @param cwd - Working directory used to resolve the project dir.\n* @returns A {@link ArchiveMigratedSourcesResult} with per-source + per-scope outcomes.\n*\n* @task T11777\n*/\nfunction archiveMigratedSources(consumed, cwd) {\n\tconst results = [];\n\tconst scopes = /* @__PURE__ */ new Set();\n\tfor (const source of consumed) {\n\t\tscopes.add(source.targetScope);\n\t\tresults.push(archiveSourceDb(source, cwd));\n\t}\n\tconst markersWritten = [];\n\tfor (const scope of scopes) {\n\t\twriteExodusCompleteMarker(scope, consumed.filter((s) => s.targetScope === scope).map((s) => s.name), cwd);\n\t\tmarkersWritten.push(scope);\n\t}\n\treturn {\n\t\tsources: results,\n\t\tmarkersWritten\n\t};\n}\n/**\n* Detect stranded legacy source DBs: any of the six sources still present on\n* disk for a scope whose exodus completion marker exists.\n*\n* Returns an empty array when no marker exists for either scope (a pre-cutover\n* install where legacy DBs are still the live source of truth — NOT residue) or\n* when every source for a marked scope has been archived.\n*\n* @param sources - The full legacy source descriptor list (from `buildExodusPlan`).\n* @param cwd - Working directory used to resolve the project dir + markers.\n* @returns The stranded entries (empty when clean).\n*\n* @task T11777\n*/\nfunction detectStrandedResidue(sources, cwd) {\n\tconst markedScopes = /* @__PURE__ */ new Set();\n\tfor (const scope of [\"project\", \"global\"]) if (hasExodusCompleteMarker(scope, cwd)) markedScopes.add(scope);\n\tif (markedScopes.size === 0) return [];\n\tconst stranded = [];\n\tfor (const source of sources) {\n\t\tif (!markedScopes.has(source.targetScope)) continue;\n\t\tif (existsSync(source.path)) stranded.push({\n\t\t\tname: source.name,\n\t\t\tpath: source.path,\n\t\t\tscope: source.targetScope\n\t\t});\n\t}\n\treturn stranded;\n}\n//#endregion\nexport { exodusMarkerPath as a, exodusArchiveDir as i, archiveSourceDb as n, hasExodusCompleteMarker as o, detectStrandedResidue as r, writeExodusCompleteMarker as s, archiveMigratedSources as t };\n","import { t as getLogger } from \"./logger.js\";\nimport { t as withLock } from \"./lock.js\";\nimport { o as hasExodusCompleteMarker, t as archiveMigratedSources } from \"./archive.js\";\nimport { existsSync } from \"node:fs\";\n//#region ../core/dist/store/exodus/on-open.js\n/**\n* Exodus-on-open — lazy, idempotent, parity-gated auto-migration of the legacy\n* multi-DB fleet into the consolidated dual-scope `cleo.db` on first open.\n*\n* ## Why this exists (data-continuity safety net · T11553)\n*\n* E6 routes every `getDb`/`getBrainDb`/etc read at the consolidated `cleo.db`.\n* On an *existing* install the consolidated DB is freshly migrated but **empty**\n* (0 base-table rows), while the user's real data still lives in the legacy\n* `tasks.db` / `brain.db` / `conduit.db` / `signaldock.db` fleet (e.g. 4465\n* tasks). Without an auto-migration the E8/T11251 cutover would make every\n* user's data **invisible**. This module wires the existing `runExodusMigrate`\n* engine to run **once, automatically, on first open** — gated by the\n* `verifyMigration` (T11551) parity check so a partial or lossy migration NEVER\n* becomes the live source of truth.\n*\n* ## Trigger condition (AC1)\n*\n* On first `openDualScopeDb(scope)` the hook runs iff **both**:\n* 1. the consolidated `cleo.db` for that scope is EMPTY (the canonical first\n* base table has zero rows), AND\n* 2. at least one legacy source DB for that scope has rows.\n*\n* ## Idempotency (AC1)\n*\n* After a successful migration the consolidated DB is non-empty, so the\n* emptiness check short-circuits on every subsequent open — a second open is a\n* no-op. The check is also re-evaluated *inside* the single-flight lock\n* (double-checked locking) so the process that loses a concurrency race never\n* re-migrates.\n*\n* ## Parity gate + clean abort (AC2)\n*\n* After the copy, `verifyMigration` (T11551) compares row counts + canonical\n* digests + FK integrity + enum drift legacy↔consolidated. The data-continuity\n* gate is **row-count parity + zero migration-INTRODUCED FK orphans** (hash/enum\n* drift are the expected normalisation diagnostics, and pre-existing SOURCE FK\n* orphans are tolerated as zero-loss — see {@link isDataContinuityOk}). If a\n* genuine deficit/introduced-orphan is detected the hook **aborts the cutover**:\n* it rolls the half-migrated consolidated tables back to EMPTY (`DELETE FROM`\n* every user table — see {@link rollbackConsolidatedToEmpty}) so the legacy DBs\n* remain the source of truth, no half-migrated `cleo.db` is exposed, and there\n* are no silent `INSERT OR IGNORE` row drops. The file is never unlinked; the\n* chokepoint re-opens a fresh handle afterwards (the migrate engine closes the\n* handles it opened, so the rollback re-opens the scope before truncating it).\n*\n* ## Retry correctness — journal invalidation on abort (T11572)\n*\n* `runExodusMigrate` is resumable: it journals each table `done` and SKIPS\n* already-`done` tables on a re-run. On abort we truncate the consolidated rows\n* back to empty, so a stale `done` journal would make the next open re-trigger\n* (target empty), copy NOTHING (journal says done), re-verify the still-empty\n* target, and re-abort — a permanent loop. The abort path therefore also calls\n* `clearExodusJournal(plan.stagingDir)` so a post-abort retry RE-COPIES from\n* scratch.\n*\n* ## Concurrency safety (AC6 · reconcile with T11554 / R13-T11278)\n*\n* Two processes opening a brand-new empty `cleo.db` simultaneously must not both\n* migrate. A `proper-lockfile` single-flight lock on\n* `<cleo.db>.exodus-on-open.lock` serialises the attempt; the loser re-checks\n* emptiness under the lock and bails. This is the same first-run-race concern\n* T11554 raises for schema bootstrap — both are solved by serialising the\n* first-open mutation.\n*\n* @module\n* @task T11553 (E6 · exodus-on-open)\n* @epic T11249 (E6)\n* @saga T11242 (SG-DB-SUBSTRATE-V2)\n* @see packages/core/src/store/exodus/migrate.ts — runExodusMigrate engine\n* @see packages/core/src/store/exodus/verify-migration.ts — verifyMigration parity gate (T11551)\n* @see packages/core/src/store/dual-scope-db.ts — the open chokepoint that calls this\n*/\nvar log = getLogger(\"exodus-on-open\");\n/**\n* Re-entrancy guard. `runExodusMigrate` itself calls `openDualScopeDb` for both\n* scopes to create + populate the consolidated schema. Those nested opens MUST\n* NOT recursively trigger another exodus-on-open. This flag is set for the\n* duration of an auto-migration so the chokepoint skips the hook while a\n* migration is already in flight.\n*/\nvar _exodusInProgress = false;\n/**\n* Opt-out env flag. Set `CLEO_DISABLE_EXODUS_ON_OPEN=1` to skip the lazy\n* auto-migration entirely (e.g. for tooling that intentionally inspects an\n* empty consolidated DB). The manual `cleo exodus migrate` path is unaffected.\n*/\nfunction isDisabledByEnv() {\n\tconst v = process.env.CLEO_DISABLE_EXODUS_ON_OPEN;\n\treturn v === \"1\" || v === \"true\";\n}\n/**\n* The canonical \"first base table\" for each scope — the same existence anchor\n* used by the migration journal reconciliation. If this table has zero rows the\n* consolidated DB is considered empty for the purposes of the trigger.\n*\n* - project → `tasks_tasks`\n* - global → `nexus_project_registry`\n*/\nfunction baseTableForScope(scope) {\n\treturn scope === \"project\" ? \"tasks_tasks\" : \"nexus_project_registry\";\n}\n/**\n* Count rows in `table` on `nativeDb`, returning `0` if the table does not yet\n* exist or the query fails. Used to decide whether the consolidated DB is empty.\n*/\nfunction safeRowCount(nativeDb, table) {\n\ttry {\n\t\treturn nativeDb.prepare(`SELECT COUNT(*) AS n FROM \"${table}\"`).get()?.n ?? 0;\n\t} catch {\n\t\treturn 0;\n\t}\n}\n/**\n* Return `true` if the consolidated `cleo.db` for `scope` is empty — i.e. the\n* canonical base table for that scope has zero rows.\n*/\nfunction consolidatedIsEmpty(nativeDb, scope) {\n\treturn safeRowCount(nativeDb, baseTableForScope(scope)) === 0;\n}\n/**\n* Roll a half-migrated consolidated `cleo.db` back to EMPTY on the given native\n* handle — without deleting the file.\n*\n* Called on a parity-failure abort. As of T11782 (FIX D) the handle passed here\n* is a DEDICATED, NON-cached connection opened by {@link rollbackBothScopes}, NOT\n* the cached caller handle. This is critical: a scope-wide `DELETE FROM` on the\n* CALLER's connection would roll back any concurrent task INSERT (`tasks.add`)\n* issued on that same connection during the migrate window. Truncating on an\n* isolated connection limits the blast radius to the migration's own writes —\n* the caller's concurrent INSERT on its own connection survives. We `DELETE FROM`\n* every user table inside a single transaction with foreign keys OFF, restoring\n* the post-migration *empty* schema, so the legacy DBs remain the source of\n* truth — exactly the AC2 \"no half-migrated cleo.db\" contract. The file is never\n* unlinked; the caller's (separate) cached handle stays valid and sees the\n* committed empty state on its next read (WAL).\n*\n* The schema (tables, indexes, drizzle journal) is preserved; only data rows are\n* removed. Idempotent and best-effort: a failure to clear one table is logged\n* but does not throw (the next open's emptiness check still sees a populated\n* base table and could re-attempt, which is acceptable — it will re-abort).\n*\n* @param nativeDb - The dedicated consolidated connection to truncate.\n* @param scope - Scope label for logging.\n*/\nfunction rollbackConsolidatedToEmpty(nativeDb, scope) {\n\tlet userTables = [];\n\ttry {\n\t\tuserTables = nativeDb.prepare(\"SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%' AND name NOT LIKE '__drizzle_%'\").all().map((r) => r.name);\n\t} catch (err) {\n\t\tlog.error({\n\t\t\terr,\n\t\t\tscope\n\t\t}, \"exodus-on-open: failed to enumerate tables for rollback\");\n\t\treturn;\n\t}\n\ttry {\n\t\tnativeDb.exec(\"PRAGMA foreign_keys = OFF\");\n\t\tnativeDb.exec(\"BEGIN\");\n\t\tfor (const table of userTables) try {\n\t\t\tnativeDb.exec(`DELETE FROM \"${table}\"`);\n\t\t} catch (err) {\n\t\t\tlog.warn({\n\t\t\t\terr,\n\t\t\t\ttable,\n\t\t\t\tscope\n\t\t\t}, \"exodus-on-open: failed to clear table during rollback\");\n\t\t}\n\t\tnativeDb.exec(\"COMMIT\");\n\t} catch (err) {\n\t\ttry {\n\t\t\tnativeDb.exec(\"ROLLBACK\");\n\t\t} catch {}\n\t\tlog.error({\n\t\t\terr,\n\t\t\tscope\n\t\t}, \"exodus-on-open: rollback transaction failed\");\n\t} finally {\n\t\ttry {\n\t\t\tnativeDb.exec(\"PRAGMA foreign_keys = ON\");\n\t\t} catch {}\n\t}\n}\n/**\n* Roll BOTH consolidated scopes back to empty after a failed auto-migration.\n*\n* ## Connection isolation (T11782 · FIX D)\n*\n* The rollback opens each scope on a DEDICATED, NON-cached connection (a second\n* SQLite handle to the same file — WAL allows it) and truncates THAT, NEVER the\n* cached caller handle. This is the load-bearing half of the write-reliability\n* fix: a scope-wide `DELETE FROM`/`BEGIN…COMMIT` on the CALLER's shared\n* connection would sweep away any concurrent task INSERT (`tasks.add`) issued on\n* that same connection during the migrate window. Truncating on an isolated\n* connection means the abort can only ever clear the migration's own writes; a\n* caller's concurrent INSERT on its own connection is physically outside this\n* rollback's transaction and survives.\n*\n* `runExodusMigrate` already closed its dedicated migrate connections by the\n* time we get here, so the rows it wrote are still on disk; we re-open a fresh\n* dedicated connection per scope and truncate. `_exodusInProgress` is still\n* `true`, so these opens do not recurse into the hook (dedicated opens never arm\n* exodus-on-open anyway).\n*\n* @param scope - The scope being opened (logging context only; both\n* scopes are cleared because `runExodusMigrate` populates both).\n* @param projectDbPath - Absolute path to the consolidated project `cleo.db`.\n* @param globalDbPath - Absolute path to the consolidated global `cleo.db`.\n*/\nasync function rollbackBothScopes(scope, projectDbPath, globalDbPath) {\n\tconst { openDualScopeDbAtPath } = await import(\"./dual-scope-db2.js\");\n\tfor (const s of [\"project\", \"global\"]) {\n\t\tconst path = s === \"project\" ? projectDbPath : globalDbPath;\n\t\tlet handle = null;\n\t\ttry {\n\t\t\thandle = s === \"project\" ? await openDualScopeDbAtPath(\"project\", path, void 0, { dedicated: true }) : await openDualScopeDbAtPath(\"global\", path, void 0, { dedicated: true });\n\t\t\tconst native = handle.db.$client;\n\t\t\tif (native) rollbackConsolidatedToEmpty(native, s);\n\t\t} catch (err) {\n\t\t\tlog.warn({\n\t\t\t\terr,\n\t\t\t\tscope: s,\n\t\t\t\topeningScope: scope\n\t\t\t}, \"exodus-on-open: could not roll back scope (best-effort)\");\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\thandle?.close();\n\t\t\t} catch {}\n\t\t}\n\t}\n}\n/**\n* Decide whether a {@link verifyMigration} result clears the **data-continuity**\n* gate — the campaign-aligned zero-loss invariant (DHQ-045 · T11551).\n*\n* `verifyMigration().ok` is intentionally STRICTER than data-continuity: it also\n* requires `hashMatch` and zero enum-drift findings. After a CORRECT migration\n* those two will legitimately be `false`, because the migration NORMALISES the\n* data (legacy enum aliases like `'ACCEPTED'`→`'accepted'`, epoch→ISO\n* timestamps) — so the consolidated content digest differs from the un-normalised\n* source, and the source still reports its raw drift as a diagnostic. Treating\n* that as a parity failure would abort EVERY real migration.\n*\n* The zero-loss invariant the exodus campaign actually proves (and the one the\n* representative real-data parity test asserts) is:\n*\n* 1. every data-bearing base table copied with NO ROW DEFICIT\n* (`targetCount >= sourceCount` — you cannot LOSE a row you have MORE of),\n* AND\n* 2. NO referential orphans the migration INTRODUCED on the consolidated\n* target (`introducedForeignKeyViolations` empty).\n*\n* ## A row SURPLUS is NOT data loss (T11577)\n*\n* Data loss means rows are MISSING: `targetCount < sourceCount` (a DEFICIT).\n* A SURPLUS (`targetCount > sourceCount`) cannot be loss — every source row is\n* still present, plus extra. The canonical benign surplus is the migration's\n* OWN audit trail: `runExodusMigrate` opens the nexus registry, whose\n* `writeNexusAudit` (`nexus/registry.ts`) appends rows to `nexus_audit_log`\n* DURING the migrating open, so the consolidated `nexus_audit_log` legitimately\n* has a few MORE rows than the legacy source (e.g. 161923 → 161926). Gating on\n* exact `countMatch` (`source === target`) wrongly aborts the cutover on that\n* append. The gate therefore fails ONLY on a genuine DEFICIT; a surplus is\n* tolerated and logged as a WARN (with the table + delta) so it stays visible\n* and a double-copy on a non-append table could still be spotted by an operator.\n* Deficits are NEVER tolerated — that is the real data-loss class.\n*\n* ## Pre-existing source orphans are tolerated (T11572)\n*\n* A legacy source DB can already contain referential orphans (e.g. a\n* `tasks_task_relations` row pointing at a task that was deleted long before the\n* migration). Those rows copy through faithfully — that is ZERO loss, not a\n* migration defect — so they appear on BOTH sides and `verifyMigration`\n* classifies them as `preExistingForeignKeyViolations`. Gating on the *total*\n* orphan set (`foreignKeyViolations`) would permanently abort every real cutover\n* over a defect the data already had. The gate therefore fails ONLY on\n* `introducedForeignKeyViolations` — orphans present on the target that the\n* source did not have (i.e. the migration dropped a parent row). Pre-existing\n* orphans are logged as a WARN for a data-hygiene follow-up.\n*\n* Hash mismatch + source enum-drift are surfaced as WARN diagnostics (a true\n* content corruption would normally also show up as an introduced FK orphan or a\n* count deficit), but they do NOT, on their own, indicate data loss.\n*\n* @param result - The {@link VerifyMigrationResult} from `verifyMigration`.\n* @returns `true` when NO base table has a row DEFICIT (`targetCount <\n* sourceCount`) and the migration introduced no new FK orphans — i.e. the\n* cutover is safe. A surplus (`targetCount > sourceCount`) is tolerated.\n*\n* @task T11577 (deficit-only gate — tolerate benign migration-time surplus)\n*/\nfunction isDataContinuityOk(result) {\n\tconst deficits = result.tables.filter((t) => t.targetCount < t.sourceCount);\n\tconst surpluses = result.tables.filter((t) => t.targetCount > t.sourceCount);\n\tif (surpluses.length > 0) log.warn({ surpluses: surpluses.map((t) => ({\n\t\ttable: t.targetTable,\n\t\tscope: t.scope,\n\t\tsource: t.sourceCount,\n\t\ttarget: t.targetCount,\n\t\tdelta: t.targetCount - t.sourceCount\n\t})) }, `exodus-on-open: ${surpluses.length} table(s) have MORE rows in target than source (row surplus — NOT data loss, tolerated; e.g. migration-time nexus_audit_log writes). Verify none is an unexpected double-copy on a non-append table.`);\n\treturn deficits.length === 0 && result.introducedForeignKeyViolations.length === 0;\n}\n/**\n* Lazily migrate the legacy fleet into the consolidated `cleo.db` on first open.\n*\n* This is the thin guard wired into {@link openDualScopeDb}. It is invoked AFTER\n* the consolidated schema migrations have run (so the base tables exist) but\n* BEFORE the handle is returned to the caller. It is a no-op unless the trigger\n* condition (AC1) holds.\n*\n* Re-entrancy, concurrency, parity gating, and clean abort are all handled here\n* — see the module docs. The heavy lifting (copy, journal, backup, attach-leak\n* safety) is delegated to the existing {@link runExodusMigrate} engine; this\n* function adds only the *when* (lazy trigger) and the *safety envelope*\n* (single-flight + verify-or-rollback).\n*\n* On a parity-failure abort the migration's writes are rolled back IN PLACE on\n* the caller's live handle (see {@link rollbackConsolidatedToEmpty}) — the\n* handle is never closed and the file is never deleted, so the chokepoint caller\n* (`getBrainDb`/`ensureConduitDb`/…) keeps a valid, empty `cleo.db` and the\n* legacy DBs remain the source of truth.\n*\n* @param scope - The scope being opened (`'project'` | `'global'`).\n* @param dbPath - Absolute path to the consolidated `cleo.db` for `scope`.\n* @param nativeDb - The freshly-opened native handle (post-migration). This is\n* the SAME cached handle `runExodusMigrate` writes through,\n* so the rollback truncates it in place rather than deleting.\n* @param cwd - Working directory used to resolve the project root.\n* @returns The {@link ExodusOnOpenResult} describing what happened.\n*\n* @task T11553 (AC1, AC2, AC6)\n* @epic T11249 (E6)\n* @saga T11242\n*/\nasync function maybeRunExodusOnOpen(scope, dbPath, nativeDb, cwd) {\n\tif (_exodusInProgress) return {\n\t\toutcome: \"skipped\",\n\t\treason: \"re-entrant open during active migration\"\n\t};\n\tif (isDisabledByEnv()) return {\n\t\toutcome: \"skipped\",\n\t\treason: \"CLEO_DISABLE_EXODUS_ON_OPEN set\"\n\t};\n\tif (hasExodusCompleteMarker(scope, cwd)) return {\n\t\toutcome: \"skipped\",\n\t\treason: \"exodus completion marker present — scope already migrated (cutover sealed)\"\n\t};\n\tif (!consolidatedIsEmpty(nativeDb, scope)) return {\n\t\toutcome: \"skipped\",\n\t\treason: \"consolidated cleo.db already populated\"\n\t};\n\tconst { buildExodusPlan, runExodusMigrate, verifyMigration, clearExodusJournal } = await import(\"./exodus.js\");\n\tconst plan = buildExodusPlan(cwd);\n\tif (!plan.sources.filter((s) => s.targetScope === scope).some((s) => existsSync(s.path))) return {\n\t\toutcome: \"skipped\",\n\t\treason: `no legacy ${scope}-scope source DBs present (fresh install or cross-scope-only)`\n\t};\n\treturn withLock(`${dbPath}.exodus-on-open.lock`, async () => {\n\t\tif (!consolidatedIsEmpty(nativeDb, scope)) return {\n\t\t\toutcome: \"skipped\",\n\t\t\treason: \"migrated by a concurrent process (lock winner)\"\n\t\t};\n\t\tlog.info({\n\t\t\tscope,\n\t\t\tdbPath,\n\t\t\tsources: plan.sources.filter((s) => existsSync(s.path)).map((s) => s.name)\n\t\t}, \"exodus-on-open: consolidated cleo.db is empty and legacy data present — auto-migrating\");\n\t\t_exodusInProgress = true;\n\t\ttry {\n\t\t\tconst migrateResult = await runExodusMigrate(plan, false, (msg) => log.debug({ scope }, `exodus-on-open: ${msg}`));\n\t\t\tif (!migrateResult.ok) {\n\t\t\t\tawait rollbackBothScopes(scope, plan.projectDbPath, plan.globalDbPath);\n\t\t\t\tclearExodusJournal(migrateResult.stagingDir);\n\t\t\t\tconst reason = `migration failed: ${migrateResult.error ?? \"unknown error\"} — legacy DBs kept as source`;\n\t\t\t\tlog.error({\n\t\t\t\t\tscope,\n\t\t\t\t\terror: migrateResult.error\n\t\t\t\t}, `exodus-on-open: ${reason}`);\n\t\t\t\treturn {\n\t\t\t\t\toutcome: \"aborted\",\n\t\t\t\t\treason\n\t\t\t\t};\n\t\t\t}\n\t\t\tconst verifyResult = verifyMigration(plan.sources, plan.projectDbPath, plan.globalDbPath, (msg) => log.debug({ scope }, `exodus-on-open verify: ${msg}`));\n\t\t\tif (!verifyResult.ok) log.warn({\n\t\t\t\tscope,\n\t\t\t\tenumDrift: verifyResult.enumDrift.length,\n\t\t\t\thashMismatches: verifyResult.tables.filter((t) => !t.hashMatch).length\n\t\t\t}, \"exodus-on-open: verifyMigration reported non-fatal drift (normalisation expected); checking data-continuity gate\");\n\t\t\tif (!isDataContinuityOk(verifyResult)) {\n\t\t\t\tawait rollbackBothScopes(scope, plan.projectDbPath, plan.globalDbPath);\n\t\t\t\tclearExodusJournal(plan.stagingDir);\n\t\t\t\tconst deficits = verifyResult.tables.filter((t) => t.targetCount < t.sourceCount).map((t) => `${t.targetTable}(${t.sourceCount}→${t.targetCount})`);\n\t\t\t\tconst reason = `parity verification failed — cutover aborted, legacy DBs kept as source. count deficits: [${deficits.join(\", \")}]; INTRODUCED fk orphans: ${verifyResult.introducedForeignKeyViolations.length} (pre-existing source orphans tolerated: ${verifyResult.preExistingForeignKeyViolations.length}). ` + `${verifyResult.error ?? \"\"}`.trim();\n\t\t\t\tlog.error({\n\t\t\t\t\tscope,\n\t\t\t\t\tcountDeficits: deficits,\n\t\t\t\t\tintroducedFkViolations: verifyResult.introducedForeignKeyViolations.length,\n\t\t\t\t\tpreExistingFkViolations: verifyResult.preExistingForeignKeyViolations.length\n\t\t\t\t}, \"exodus-on-open: data-continuity FAILED — consolidated cleo.db rolled back to empty, legacy kept\");\n\t\t\t\treturn {\n\t\t\t\t\toutcome: \"aborted\",\n\t\t\t\t\treason\n\t\t\t\t};\n\t\t\t}\n\t\t\tconst rowsCopied = migrateResult.tables.filter((t) => !t.skipped).reduce((n, t) => n + t.rowsCopied, 0);\n\t\t\tlog.info({\n\t\t\t\tscope,\n\t\t\t\trowsCopied,\n\t\t\t\ttables: migrateResult.tables.length\n\t\t\t}, \"exodus-on-open: parity verified — legacy data migrated into consolidated cleo.db\");\n\t\t\ttry {\n\t\t\t\tconst archiveResult = archiveMigratedSources(plan.sources.filter((s) => existsSync(s.path)), cwd);\n\t\t\t\tlog.info({\n\t\t\t\t\tscope,\n\t\t\t\t\tarchived: archiveResult.sources.filter((s) => s.action === \"archived\").length,\n\t\t\t\t\tmarkersWritten: archiveResult.markersWritten\n\t\t\t\t}, \"exodus-on-open: archived legacy sources + sealed completion marker(s)\");\n\t\t\t} catch (err) {\n\t\t\t\tlog.error({\n\t\t\t\t\terr,\n\t\t\t\t\tscope\n\t\t\t\t}, \"exodus-on-open: post-migration archive/marker step failed (migration itself succeeded — legacy DBs left in place, will be re-checked by `cleo doctor exodus-residue`)\");\n\t\t\t}\n\t\t\treturn {\n\t\t\t\toutcome: \"migrated\",\n\t\t\t\treason: `migrated ${rowsCopied} rows across ${migrateResult.tables.length} tables; parity verified`,\n\t\t\t\trowsCopied\n\t\t\t};\n\t\t} finally {\n\t\t\t_exodusInProgress = false;\n\t\t}\n\t}, {\n\t\tstale: 6e5,\n\t\tretries: 30\n\t});\n}\n//#endregion\nexport { maybeRunExodusOnOpen };\n"],"names":["log"],"mappings":";;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,cAAc,GAAG;AAC1B,CAAC,OAAO,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,I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file":"open-cleo-db--8sYNaYY.js","sources":["../../../.svelte-kit/adapter-node/chunks/open-cleo-db.js"],"sourcesContent":["import { t as applyPerfPragmas } from \"./sqlite-pragmas.js\";\nimport { Xn as ExitCode } from \"./dist2.js\";\nimport { t as CleoError } from \"./errors.js\";\nimport { a as getCleoDirAbsolute, f as resolveOrCwd } from \"./paths.js\";\nimport { o as openDualScopeDb } from \"./dual-scope-db.js\";\nimport { t as assertDbPathIsNotWorktreeResident } from \"./worktree-isolation-guard.js\";\nimport { createRequire } from \"node:module\";\nimport { existsSync, readFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport \"node:fs/promises\";\n//#region ../core/dist/project-info.js\n/**\n* Thin reader for .cleo/project-info.json.\n*\n* The file is written by scaffold.ts (ensureProjectInfo). This module\n* provides a typed read interface for consumers that need the project-local\n* identity fields without importing the full scaffold machinery.\n*\n* @task T5333\n* @task T11008 — resolveProjectByCwd and resolveCanonicalCleoDir added to @cleocode/paths\n*/\n/**\n* Synchronous variant for use in hot paths where async is not feasible.\n* Returns null if the file is missing or unparseable.\n*/\nfunction getProjectInfoSync(cwd) {\n\tconst projectRoot = resolveOrCwd(cwd);\n\tconst infoPath = join(getCleoDirAbsolute(projectRoot), \"project-info.json\");\n\tif (!existsSync(infoPath)) return null;\n\ttry {\n\t\tconst raw = readFileSync(infoPath, \"utf-8\");\n\t\tconst data = JSON.parse(raw);\n\t\tif (typeof data.projectHash !== \"string\" || data.projectHash.length === 0) return null;\n\t\tconst segments = projectRoot.replace(/[\\\\/]+$/, \"\").split(/[\\\\/]/);\n\t\tconst projectName = segments[segments.length - 1] ?? \"unknown\";\n\t\treturn {\n\t\t\tprojectHash: data.projectHash,\n\t\t\tprojectId: typeof data.projectId === \"string\" ? data.projectId : \"\",\n\t\t\tprojectRoot,\n\t\t\tprojectName\n\t\t};\n\t} catch {\n\t\treturn null;\n\t}\n}\n//#endregion\n//#region ../core/dist/store/open-cleo-db.js\n/**\n* Canonical DB-open chokepoint for all CLEO SQLite databases.\n*\n* ## Invariant (ADR-068 §3, T9047)\n*\n* Every CLEO SQLite database open MUST flow through `openCleoDb(role, cwd)`.\n* Raw `new DatabaseSync(path)` calls outside `packages/core/src/store/` are\n* rejected by the `db-open-guard` CI job (`scripts/lint-no-raw-db-opens.mjs`).\n*\n* ## Rationale (ADR-069 Coordination Layers)\n*\n* - **Pragma consistency**: every handle receives the SSoT pragma set from\n* `specs/sqlite-pragmas.json` (busy_timeout, WAL, cache_size, mmap_size).\n* - **Topology visibility**: the `CleoDbRole` union enumerates all databases;\n* `cleo health` can audit which are open.\n* - **Lifecycle centralisation**: singleton management and WAL state live in\n* one place, preventing lock contention between concurrent CLI processes.\n*\n* ## Usage\n*\n* ```typescript\n* import { openCleoDb } from '@cleocode/core/store/open-cleo-db';\n*\n* // Dual-scope consolidated cleo.db (D1″ lifecycle — E3/E4 exodus):\n* const projHandle = await openCleoDb('project', cwd);\n* const globHandle = await openCleoDb('global');\n* // use handle.db (native DatabaseSync) ...\n* await handle.close();\n* ```\n*\n* ## Dual-scope delegation (T11517 · E3 · T11526 · E6-L6)\n*\n* `openCleoDb` accepts ONLY `'project'` | `'global'` and delegates directly to\n* {@link openDualScopeDb} from `./dual-scope-db.ts`. The legacy 8-role API\n* (`tasks` / `brain` / `sessions` / `signaldock` / `conduit` / `nexus` /\n* `skills` / `llmtxt`) was removed in E6-L6 (T11526) — the per-domain leaf\n* modules (L1–L5) now open the consolidated `cleo.db` through `openDualScopeDb`\n* directly, so the chokepoint no longer needs the per-role dispatch table.\n*\n* The returned `CleoDbHandle.db` is the **native** `DatabaseSync` handle\n* (extracted from the Drizzle wrapper's `$client`), preserving the contract\n* the legacy roles exposed so callers that issue raw `prepare`/`exec` SQL keep\n* working with only a role-string swap.\n*\n* ## Snapshot opener (read-only, no migrations)\n*\n* For short-lived read-only opens (backup verification, schema integrity\n* checks, registry reads from non-CLEO processes like Studio), use\n* {@link openCleoDbSnapshot}. It applies the same pragma SSoT but skips\n* migrations and singleton management, so the caller owns the handle's\n* lifecycle directly.\n*\n* @task T9047, T9685, T11517, T11526\n* @adr ADR-068, ADR-069\n*/\nfunction unwrapNativeSqliteDb(db) {\n\tif (db && typeof db === \"object\" && \"$client\" in db) return db.$client ?? db;\n\treturn db;\n}\nfunction isDatabaseSync(db) {\n\treturn Boolean(db && typeof db === \"object\" && \"exec\" in db && \"prepare\" in db);\n}\n/**\n* Scopes whose `cleo.db` tracks a per-project `project_id` and therefore need\n* a cross-check against `.cleo/project-info.json` on every open.\n*\n* After the E6 consolidation the cross-project registry (formerly nexus.db)\n* lives inside the **global** `cleo.db`. Its `nexus_project_registry` table\n* (T11578 · AC3 prefixed shape) records one row per known project with\n* `(project_id PRIMARY KEY, project_path UNIQUE)`. The drift check verifies\n* that a row whose `project_path` matches the caller's project root has the\n* same `project_id` as the caller's `.cleo/project-info.json`. Mismatch →\n* `E_PROJECT_ID_DRIFT`.\n*\n* The project-tier `cleo.db` (tasks, brain, conduit, sessions data) does NOT\n* carry a `project_id` column — it lives under per-project `.cleo/` and\n* inherits project identity from its parent directory. The path-layer (T9803)\n* and worktree-isolation guard (T9806) already prevent cross-project misroutes\n* for the project scope.\n*\n* @task T10322, T11526\n* @saga T10281\n* @adr ADR-068\n*/\nvar PROJECT_ID_TRACKING_ROLES = new Set([\"global\"]);\n/**\n* Cross-check `.cleo/project-info.json::projectId` against the project_id\n* recorded for this project's path inside the DB being opened.\n*\n* No-ops (returns silently) for ALL non-drift cases:\n* - The role does not track `project_id` (see {@link PROJECT_ID_TRACKING_ROLES}).\n* - `.cleo/project-info.json` is missing or unparseable (pre-init / fresh clone).\n* - The `projectId` field is empty (pre-T5333 install).\n* - The DB's project-tracking table does not yet exist (pre-bootstrap).\n* - No row in the tracking table matches the caller's project path\n* (project not yet registered with nexus).\n*\n* Throws `CleoError(CONFIG_ERROR, \"E_PROJECT_ID_DRIFT\", ...)` IFF every\n* condition is satisfied:\n* 1. The role tracks project_id, AND\n* 2. `.cleo/project-info.json` reports a non-empty `projectId`, AND\n* 3. The DB has a project-registry row for the caller's `projectRoot`, AND\n* 4. That row's `project_id` differs from the project-info projectId.\n*\n* Read-only: never writes to the DB.\n*\n* @task T10322\n* @saga T10281 (SG-BRAIN-DB-RESILIENCE)\n* @epic T10285 (E4-DB-CROSS-LINKS)\n* @adr ADR-068\n*/\nfunction validateProjectIdConsistency(role, db, cwd) {\n\tif (!PROJECT_ID_TRACKING_ROLES.has(role)) return;\n\tif (!isDatabaseSync(db)) return;\n\tconst projectInfo = getProjectInfoSync(resolveOrCwd(cwd));\n\tif (!projectInfo || projectInfo.projectId.length === 0) return;\n\tlet row;\n\ttry {\n\t\trow = db.prepare(\"SELECT project_id, project_path FROM nexus_project_registry WHERE project_path = ? LIMIT 1\").get(projectInfo.projectRoot);\n\t} catch {\n\t\treturn;\n\t}\n\tif (!row || typeof row.project_id !== \"string\" || row.project_id.length === 0) return;\n\tif (row.project_id !== projectInfo.projectId) throw new CleoError(ExitCode.CONFIG_ERROR, `E_PROJECT_ID_DRIFT: ${role} DB reports project_id=${row.project_id} for path=${projectInfo.projectRoot} but .cleo/project-info.json reports projectId=${projectInfo.projectId}. The DB and project-info.json are not pointing at the same project — a backup/restore or directory move has left them inconsistent.`, { fix: `Inspect both values: \\`cat ${projectInfo.projectRoot}/.cleo/project-info.json\\` and the corresponding row in nexus.db's project_registry. Reconcile by either (a) updating project-info.json to the canonical ID, or (b) re-registering this project with \\`cleo init --reset\\` if the registry entry is stale.` });\n}\n/**\n* Open (or create) a CLEO database by dual-scope selector.\n*\n* ## Dual-scope delegation (T11517 · E3 · T11526 · E6-L6)\n*\n* Accepts ONLY `'project'` | `'global'` and delegates to {@link openDualScopeDb}\n* from `./dual-scope-db.ts`, which applies the pragma SSoT, runs migrations,\n* and manages the singleton cache for the consolidated `cleo.db`.\n*\n* ```ts\n* const handle = await openCleoDb('project', cwd);\n* const handle = await openCleoDb('global');\n* ```\n*\n* `CleoDbHandle.db` is the **native** `DatabaseSync` handle (extracted from the\n* Drizzle wrapper's `$client`). This preserves the contract the legacy 8-role\n* API exposed, so callers issuing raw `prepare`/`exec` SQL keep working after\n* swapping their role string (`tasks`/`brain`/`sessions`/`conduit` → `project`;\n* `nexus`/`signaldock`/`skills` → `global`).\n*\n* Single chokepoint for all DB opens. Enforces the worktree-isolation guard\n* (T9806) for the project scope on top of T9803's path-layer THROWS-on-orphan\n* fix.\n*\n* @task T9047, T9685, T11517, T11526\n* @adr ADR-068, ADR-069\n*/\nasync function openCleoDb(role, cwd) {\n\tif (role === \"project\") assertDbPathIsNotWorktreeResident(\"tasks\", cwd);\n\tconst dualHandle = role === \"project\" ? await openDualScopeDb(\"project\", cwd) : await openDualScopeDb(\"global\", cwd);\n\tconst db = unwrapNativeSqliteDb(dualHandle.db);\n\tif (isDatabaseSync(db)) applyPerfPragmas(db);\n\tvalidateProjectIdConsistency(role, db, cwd);\n\treturn {\n\t\tdb,\n\t\trole,\n\t\tasync close() {\n\t\t\tdualHandle.close();\n\t\t}\n\t};\n}\n/**\n* Open a SQLite database file as a read-only snapshot, applying the\n* canonical pragma SSoT but skipping migrations and singleton management.\n*\n* ## When to use\n*\n* - Backup verification (e.g. `migration/checksum.ts`)\n* - Atomic / read-side database validation (e.g. `store/atomic.ts`)\n* - Short-lived registry reads from a non-CLEO process (e.g. Studio\n* SvelteKit endpoints that read nexus.db for project listings)\n*\n* Do NOT use for the long-lived role databases — those go through\n* {@link openCleoDb} which manages singletons + migrations.\n*\n* ## Pragma application\n*\n* When `applyPragmas !== false` (default), the canonical performance pragmas\n* are applied via `applyPerfPragmas`. For read-only handles, `enableWal` is\n* forced `false` because WAL mode is unsettable on a read-only connection.\n*\n* ## Lifecycle\n*\n* The handle is caller-owned — call `handle.close()` when done. Unlike\n* {@link openCleoDb}, the snapshot opener does NOT participate in any\n* singleton cache, so leaking a snapshot handle leaks a file descriptor.\n*\n* @task T9685\n* @adr ADR-068, ADR-069\n*\n* @example\n* ```typescript\n* import { openCleoDbSnapshot } from '@cleocode/core/store/open-cleo-db';\n*\n* const snap = openCleoDbSnapshot('/path/to/cleo.db');\n* try {\n* const rows = snap.db.prepare('SELECT * FROM nexus_project_registry').all();\n* // ...\n* } finally {\n* snap.close();\n* }\n* ```\n*/\nfunction openCleoDbSnapshot(path, options = {}) {\n\tconst { readOnly = true, applyPragmas = true } = options;\n\tconst { DatabaseSync: DatabaseSyncCtor } = createRequire(import.meta.url)(\"node:sqlite\");\n\tconst db = new DatabaseSyncCtor(path, { readOnly });\n\tif (applyPragmas) applyPerfPragmas(db, { enableWal: !readOnly });\n\tlet closed = false;\n\treturn {\n\t\tdb,\n\t\tpath,\n\t\tclose() {\n\t\t\tif (closed) return;\n\t\t\tclosed = true;\n\t\t\ttry {\n\t\t\t\tdb.close();\n\t\t\t} catch {}\n\t\t}\n\t};\n}\n//#endregion\nexport { getProjectInfoSync as i, openCleoDbSnapshot as n, validateProjectIdConsistency as r, openCleoDb as t };\n"],"names":[],"mappings":";;;;;;;AAqNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,EAAE,EAAE;AAChD,CAAC,MAAM,EAAE,QAAQ,GAAG,IAAI,EAAE,YAAY,GAAG,IAAI,EAAE,GAAG,OAAO;AACzD,CAAC,MAAM,EAAE,YAAY,EAAE,gBAAgB,EAAE,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,aAAa,CAAC;AACzF,CAAC,MAAM,EAAE,GAAG,IAAI,gBAAgB,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC;AACpD,CAAC,IAAI,YAAY,EAAE,gBAAgB,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,QAAQ,EAAE,CAAC;AACjE,CAAC,IAAI,MAAM,GAAG,KAAK;AACnB,CAAC,OAAO;AACR,EAAE,EAAE;AACJ,EAAE,IAAI;AACN,EAAE,KAAK,GAAG;AACV,GAAG,IAAI,MAAM,EAAE;AACf,GAAG,MAAM,GAAG,IAAI;AAChB,GAAG,IAAI;AACP,IAAI,EAAE,CAAC,KAAK,EAAE;AACd,GAAG,CAAC,CAAC,MAAM,CAAC;AACZ,EAAE;AACF,EAAE;AACF;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parseKnownFiles-Dg0pMFcT.js","sources":["../../../.svelte-kit/adapter-node/chunks/parseKnownFiles.js"],"sourcesContent":["import { t as loadSharedConfigFiles } from \"./loadSharedConfigFiles.js\";\n//#region ../../node_modules/.pnpm/@smithy+core@3.24.3/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/mergeConfigFiles.js\nvar mergeConfigFiles = (...files) => {\n\tconst merged = {};\n\tfor (const file of files) for (const [key, values] of Object.entries(file)) if (merged[key] !== void 0) Object.assign(merged[key], values);\n\telse merged[key] = values;\n\treturn merged;\n};\n//#endregion\n//#region ../../node_modules/.pnpm/@smithy+core@3.24.3/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/parseKnownFiles.js\nvar parseKnownFiles = async (init) => {\n\tconst parsedFiles = await loadSharedConfigFiles(init);\n\treturn mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile);\n};\n//#endregion\nexport { parseKnownFiles as t };\n"],"names":[],"mappings":";;AACA;AACA,IAAI,gBAAgB,GAAG,CAAC,GAAG,KAAK,KAAK;AACrC,CAAC,MAAM,MAAM,GAAG,EAAE;AAClB,CAAC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,KAAK,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;AAC3I,MAAM,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM;AAC1B,CAAC,OAAO,MAAM;AACd,CAAC;AACD;AACA;AACG,IAAC,eAAe,GAAG,OAAO,IAAI,KAAK;AACtC,CAAC,MAAM,WAAW,GAAG,MAAM,qBAAqB,CAAC,IAAI,CAAC;AACtD,CAAC,OAAO,gBAAgB,CAAC,WAAW,CAAC,UAAU,EAAE,WAAW,CAAC,eAAe,CAAC;AAC7E;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parseUrl-qgGfl-Vh.js","sources":["../../../.svelte-kit/adapter-node/chunks/parseUrl.js"],"sourcesContent":["import { n as getProfileName } from \"./getProfileName.js\";\nimport { t as CredentialsProviderError } from \"./CredentialsProviderError.js\";\nimport { t as chain } from \"./chain.js\";\nimport { t as loadSharedConfigFiles } from \"./loadSharedConfigFiles.js\";\n//#region ../../node_modules/.pnpm/@smithy+core@3.24.3/node_modules/@smithy/core/dist-es/submodules/config/property-provider/fromValue.js\nvar fromValue = (staticValue) => () => Promise.resolve(staticValue);\n//#endregion\n//#region ../../node_modules/.pnpm/@smithy+core@3.24.3/node_modules/@smithy/core/dist-es/submodules/config/property-provider/memoize.js\nvar memoize = (provider, isExpired, requiresRefresh) => {\n\tlet resolved;\n\tlet pending;\n\tlet hasResult;\n\tlet isConstant = false;\n\tconst coalesceProvider = async () => {\n\t\tif (!pending) pending = provider();\n\t\ttry {\n\t\t\tresolved = await pending;\n\t\t\thasResult = true;\n\t\t\tisConstant = false;\n\t\t} finally {\n\t\t\tpending = void 0;\n\t\t}\n\t\treturn resolved;\n\t};\n\tif (isExpired === void 0) return async (options) => {\n\t\tif (!hasResult || options?.forceRefresh) resolved = await coalesceProvider();\n\t\treturn resolved;\n\t};\n\treturn async (options) => {\n\t\tif (!hasResult || options?.forceRefresh) resolved = await coalesceProvider();\n\t\tif (isConstant) return resolved;\n\t\tif (requiresRefresh && !requiresRefresh(resolved)) {\n\t\t\tisConstant = true;\n\t\t\treturn resolved;\n\t\t}\n\t\tif (isExpired(resolved)) {\n\t\t\tawait coalesceProvider();\n\t\t\treturn resolved;\n\t\t}\n\t\treturn resolved;\n\t};\n};\n//#endregion\n//#region ../../node_modules/.pnpm/@smithy+core@3.24.3/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/getSelectorName.js\nfunction getSelectorName(functionString) {\n\ttry {\n\t\tconst constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? []));\n\t\tconstants.delete(\"CONFIG\");\n\t\tconstants.delete(\"CONFIG_PREFIX_SEPARATOR\");\n\t\tconstants.delete(\"ENV\");\n\t\treturn [...constants].join(\", \");\n\t} catch (e) {\n\t\treturn functionString;\n\t}\n}\n//#endregion\n//#region ../../node_modules/.pnpm/@smithy+core@3.24.3/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromEnv.js\nvar fromEnv = (envVarSelector, options) => async () => {\n\ttry {\n\t\tconst config = envVarSelector(process.env, options);\n\t\tif (config === void 0) throw new Error();\n\t\treturn config;\n\t} catch (e) {\n\t\tthrow new CredentialsProviderError(e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, { logger: options?.logger });\n\t}\n};\n//#endregion\n//#region ../../node_modules/.pnpm/@smithy+core@3.24.3/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromSharedConfigFiles.js\nvar fromSharedConfigFiles = (configSelector, { preferredFile = \"config\", ...init } = {}) => async () => {\n\tconst profile = getProfileName(init);\n\tconst { configFile, credentialsFile } = await loadSharedConfigFiles(init);\n\tconst profileFromCredentials = credentialsFile[profile] || {};\n\tconst profileFromConfig = configFile[profile] || {};\n\tconst mergedProfile = preferredFile === \"config\" ? {\n\t\t...profileFromCredentials,\n\t\t...profileFromConfig\n\t} : {\n\t\t...profileFromConfig,\n\t\t...profileFromCredentials\n\t};\n\ttry {\n\t\tconst configValue = configSelector(mergedProfile, preferredFile === \"config\" ? configFile : credentialsFile);\n\t\tif (configValue === void 0) throw new Error();\n\t\treturn configValue;\n\t} catch (e) {\n\t\tthrow new CredentialsProviderError(e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, { logger: init.logger });\n\t}\n};\n//#endregion\n//#region ../../node_modules/.pnpm/@smithy+core@3.24.3/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/fromStatic.js\nvar isFunction = (func) => typeof func === \"function\";\nvar fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : fromValue(defaultValue);\n//#endregion\n//#region ../../node_modules/.pnpm/@smithy+core@3.24.3/node_modules/@smithy/core/dist-es/submodules/config/node-config-provider/configLoader.js\nvar loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => {\n\tconst { signingName, logger } = configuration;\n\treturn memoize(chain(fromEnv(environmentVariableSelector, {\n\t\tsigningName,\n\t\tlogger\n\t}), fromSharedConfigFiles(configFileSelector, configuration), fromStatic(defaultValue)));\n};\n//#endregion\n//#region ../../node_modules/.pnpm/@smithy+core@3.24.3/node_modules/@smithy/core/dist-es/submodules/protocols/querystring-parser/parseQueryString.js\nfunction parseQueryString(querystring) {\n\tconst query = {};\n\tquerystring = querystring.replace(/^\\?/, \"\");\n\tif (querystring) for (const pair of querystring.split(\"&\")) {\n\t\tlet [key, value = null] = pair.split(\"=\");\n\t\tkey = decodeURIComponent(key);\n\t\tif (value) value = decodeURIComponent(value);\n\t\tif (!(key in query)) query[key] = value;\n\t\telse if (Array.isArray(query[key])) query[key].push(value);\n\t\telse query[key] = [query[key], value];\n\t}\n\treturn query;\n}\n//#endregion\n//#region ../../node_modules/.pnpm/@smithy+core@3.24.3/node_modules/@smithy/core/dist-es/submodules/protocols/url-parser/parseUrl.js\nvar parseUrl = (url) => {\n\tif (typeof url === \"string\") return parseUrl(new URL(url));\n\tconst { hostname, pathname, port, protocol, search } = url;\n\tlet query;\n\tif (search) query = parseQueryString(search);\n\treturn {\n\t\thostname,\n\t\tport: port ? parseInt(port) : void 0,\n\t\tprotocol,\n\t\tpath: pathname,\n\t\tquery\n\t};\n};\n//#endregion\nexport { loadConfig as n, memoize as r, parseUrl as t };\n"],"names":[],"mappings":";;;AAIA;AACA,IAAI,SAAS,GAAG,CAAC,WAAW,KAAK,MAAM,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC;AACnE;AACA;AACG,IAAC,OAAO,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,eAAe,KAAK;AACxD,CAAC,IAAI,QAAQ;AACb,CAAC,IAAI,OAAO;AACZ,CAAC,IAAI,SAAS;AACd,CAAC,IAAI,UAAU,GAAG,KAAK;AACvB,CAAC,MAAM,gBAAgB,GAAG,YAAY;AACtC,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,QAAQ,EAAE;AACpC,EAAE,IAAI;AACN,GAAG,QAAQ,GAAG,MAAM,OAAO;AAC3B,GAAG,SAAS,GAAG,IAAI;AACnB,GAAG,UAAU,GAAG,KAAK;AACrB,EAAE,CAAC,SAAS;AACZ,GAAG,OAAO,GAAG,MAAM;AACnB,EAAE;AACF,EAAE,OAAO,QAAQ;AACjB,CAAC,CAAC;AACF,CAA2B,OAAO,OAAO,OAAO,KAAK;AACrD,EAAE,IAAI,CAAC,SAAS,IAAI,OAAO,EAAE,YAAY,EAAE,QAAQ,GAAG,MAAM,gBAAgB,EAAE;AAC9E,EAAE,OAAO,QAAQ;AACjB,CAAC,CAAC;AAcF;AACA;AACA;AACA,SAAS,eAAe,CAAC,cAAc,EAAE;AACzC,CAAC,IAAI;AACL,EAAE,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC,CAAC;AACpF,EAAE,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC;AAC5B,EAA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