@cleocode/cleo 2026.11.18 → 2026.11.19

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.
Files changed (177) hide show
  1. package/dist/.source-stamp.json +1 -1
  2. package/dist/cli/{adapter-5LAPPWDG.js → adapter-EFD36GFQ.js} +4 -4
  3. package/dist/cli/{add-UW5YQRJF.js → add-SYARGDLT.js} +4 -4
  4. package/dist/cli/{add-batch-VCNJVNUF.js → add-batch-UNPNK64J.js} +4 -4
  5. package/dist/cli/{admin-MEJYZGFJ.js → admin-C3LSZ6OG.js} +4 -4
  6. package/dist/cli/{admin-4CPCNOLE.js → admin-DJND4FTT.js} +3 -3
  7. package/dist/cli/{adr-UE4H6ZFL.js → adr-AVOB676W.js} +4 -4
  8. package/dist/cli/{analyze-QZTXBKVH.js → analyze-GQJAHW6B.js} +4 -4
  9. package/dist/cli/{archive-ZC2DBZIP.js → archive-YX62ROGC.js} +4 -4
  10. package/dist/cli/{archive-stats-WVSAILA7.js → archive-stats-I64Z4OVP.js} +4 -4
  11. package/dist/cli/{attention-Q266HLPT.js → attention-FYMOCKLJ.js} +4 -4
  12. package/dist/cli/{backup-D76DEXWA.js → backup-RGKNCU4Y.js} +4 -4
  13. package/dist/cli/{blockers-CPYGYMB6.js → blockers-3HMTZIV7.js} +4 -4
  14. package/dist/cli/{briefing-ZXYIHVNM.js → briefing-4QMU3O7N.js} +4 -4
  15. package/dist/cli/{cancel-UE7FE44Q.js → cancel-BI5WD3X3.js} +4 -4
  16. package/dist/cli/{check-PPARGLFQ.js → check-HHRHQRTW.js} +2 -2
  17. package/dist/cli/{check-ZPP4LIEG.js → check-IXK3HBFY.js} +4 -4
  18. package/dist/cli/{chunk-DGHNP57Z.js → chunk-AOWFWHND.js} +11 -11
  19. package/dist/cli/{chunk-6ESGNFUU.js → chunk-VKLBPCHP.js} +3 -3
  20. package/dist/cli/{chunk-MUM7NTUD.js → chunk-XI6OWOWH.js} +2 -2
  21. package/dist/cli/{chunk-QKMBWYAS.js → chunk-XU4NQVYG.js} +11 -3
  22. package/dist/cli/{claim-Y3MXS5UB.js → claim-7K3KHAE7.js} +4 -4
  23. package/dist/cli/{cli-RQDZRMOL.js → cli-IYFCSIWH.js} +4 -4
  24. package/dist/cli/{complete-2DBOR6IF.js → complete-WPHS3HVC.js} +5 -5
  25. package/dist/cli/{complexity-MISBHEYY.js → complexity-AGRH456D.js} +4 -4
  26. package/dist/cli/{compliance-SUXO6APO.js → compliance-2UQAJRI4.js} +4 -4
  27. package/dist/cli/{config-K45SIZXW.js → config-M2X5K7ZY.js} +4 -4
  28. package/dist/cli/{consensus-5P6OMOCZ.js → consensus-QN5DNYGG.js} +4 -4
  29. package/dist/cli/{context-2PRS2NQH.js → context-WN6ZO6U2.js} +4 -4
  30. package/dist/cli/{contribution-7WVUFD6G.js → contribution-FV4OT5XD.js} +4 -4
  31. package/dist/cli/{current-LC4ICPLM.js → current-E7XAQAK5.js} +4 -4
  32. package/dist/cli/{daemon-FH6HPZJU.js → daemon-M4GPCGOV.js} +4 -4
  33. package/dist/cli/{dash-WR2J7RE4.js → dash-5SIU2N3S.js} +4 -4
  34. package/dist/cli/{decompose-QMIBRXT6.js → decompose-WGSQJKBN.js} +4 -4
  35. package/dist/cli/{decomposition-IDCYNOYT.js → decomposition-65MIIB76.js} +4 -4
  36. package/dist/cli/{delete-ELF5TYA7.js → delete-TW2CWSGV.js} +4 -4
  37. package/dist/cli/{deps-PSQ7PMW4.js → deps-JETGX2OJ.js} +9 -6
  38. package/dist/cli/{detect-QQL62ZNC.js → detect-FNEFAQ3B.js} +4 -4
  39. package/dist/cli/{diagnostics-EAVXKZKZ.js → diagnostics-3EZO3PV7.js} +4 -4
  40. package/dist/cli/{docs-N4UZ762Y.js → docs-UMSCILRN.js} +24 -14
  41. package/dist/cli/{docs-2WLNHCKX.js → docs-Z44ZRTWH.js} +6 -4
  42. package/dist/cli/{doctor-JO3TOQDK.js → doctor-KEZDKUMZ.js} +4 -4
  43. package/dist/cli/{done-P2X6HAAI.js → done-WDXLAQXR.js} +5 -5
  44. package/dist/cli/{export-K46IDT7J.js → export-SVXYR7XM.js} +4 -4
  45. package/dist/cli/{export-tasks-YWA2R6SV.js → export-tasks-6HHOBMGE.js} +4 -4
  46. package/dist/cli/{find-EAMOXG5D.js → find-24Y4LNJI.js} +4 -4
  47. package/dist/cli/{focus-7VMY4OPJ.js → focus-4CG6O4G2.js} +4 -4
  48. package/dist/cli/{goal-BJPJ6QIF.js → goal-BEX7VMW3.js} +2 -2
  49. package/dist/cli/{grade-4NZ4PFR4.js → grade-ADH27XSR.js} +4 -4
  50. package/dist/cli/{graph-YHCDCIYY.js → graph-DIIS54OT.js} +4 -4
  51. package/dist/cli/{history-LRFQTQIM.js → history-RVJPSDWD.js} +4 -4
  52. package/dist/cli/{import-TOPFUH6D.js → import-OTHEDKKC.js} +4 -4
  53. package/dist/cli/{import-tasks-43JE5CHL.js → import-tasks-DC5WC73D.js} +4 -4
  54. package/dist/cli/index.js +101 -101
  55. package/dist/cli/{inject-TPWXIDUC.js → inject-T5I3VXVO.js} +4 -4
  56. package/dist/cli/{intelligence-SNGSKZXV.js → intelligence-4WZDNNVJ.js} +4 -4
  57. package/dist/cli/{issue-KDY2MBQZ.js → issue-OFNKFHXO.js} +4 -4
  58. package/dist/cli/{labels-LRGDKLF6.js → labels-RY7WHZZL.js} +4 -4
  59. package/dist/cli/{lifecycle-QZ3EN2PW.js → lifecycle-Y7SQH5NN.js} +4 -4
  60. package/dist/cli/{list-WRFWYGDJ.js → list-K4N5SOSY.js} +4 -4
  61. package/dist/cli/{llm-AMXBN24Y.js → llm-4DMJCGUB.js} +4 -4
  62. package/dist/cli/{log-SWJWYYBR.js → log-PBDC2HWK.js} +4 -4
  63. package/dist/cli/{manifest-JES75O7E.js → manifest-Q5KQWLIF.js} +4 -4
  64. package/dist/cli/{map-KXYE3ZCU.js → map-UZ4RF2T5.js} +4 -4
  65. package/dist/cli/{memory-TBB7EPI4.js → memory-AMCXE2MB.js} +4 -4
  66. package/dist/cli/{memory-6GJVZXLU.js → memory-YYL34OUW.js} +2 -2
  67. package/dist/cli/{migrate-claude-mem-5K6LARZL.js → migrate-claude-mem-M46SHKMI.js} +4 -4
  68. package/dist/cli/{next-CASQPK7P.js → next-6KGILVMN.js} +4 -4
  69. package/dist/cli/{nexus-KZ3KWNAF.js → nexus-AUQVYJ42.js} +2 -2
  70. package/dist/cli/{nexus-Q5OGKS2O.js → nexus-RYP75CGR.js} +4 -4
  71. package/dist/cli/{ops-BAGCCCGL.js → ops-22POQQNK.js} +4 -4
  72. package/dist/cli/{orchestrate-56TWH7VX.js → orchestrate-IEPFQORA.js} +2 -2
  73. package/dist/cli/{orchestrate-KH3UMO3A.js → orchestrate-MYSL6JYC.js} +4 -4
  74. package/dist/cli/{phase-YFUIHHO3.js → phase-CU24NPK2.js} +4 -4
  75. package/dist/cli/{pipeline-OWBRNTF4.js → pipeline-244IAWR3.js} +2 -2
  76. package/dist/cli/{pivot-YUMSSFTZ.js → pivot-APAOE7LX.js} +4 -4
  77. package/dist/cli/{plan-GXKPNFFR.js → plan-U3P5V3L4.js} +4 -4
  78. package/dist/cli/{playbook-2ENSNMBX.js → playbook-F267HUWL.js} +4 -4
  79. package/dist/cli/{promote-NNAEHQJE.js → promote-JMKECS2G.js} +4 -4
  80. package/dist/cli/{provenance-TVJDA63I.js → provenance-BLHMS3LA.js} +4 -4
  81. package/dist/cli/{provider-UXQ6FRLT.js → provider-M66NSBCH.js} +4 -4
  82. package/dist/cli/{reason-Q4O56AEQ.js → reason-XL65QLG2.js} +4 -4
  83. package/dist/cli/{reconcile-DNB26STV.js → reconcile-SCOZMSIC.js} +4 -4
  84. package/dist/cli/{relates-C75YWMZJ.js → relates-F2T6OS4F.js} +4 -4
  85. package/dist/cli/{release-REL4CB7S.js → release-EGYJONXU.js} +4 -4
  86. package/dist/cli/{reorder-J2IDDXE2.js → reorder-PPGN2FTP.js} +4 -4
  87. package/dist/cli/{reparent-YPTCMIZ4.js → reparent-VIXRMMPY.js} +4 -4
  88. package/dist/cli/{req-BVFFKTXR.js → req-ZEEGP75U.js} +4 -4
  89. package/dist/cli/{research-IVYLZXES.js → research-TUFF5RHO.js} +4 -4
  90. package/dist/cli/{restore-SR2ODC2F.js → restore-6I3XW3BO.js} +4 -4
  91. package/dist/cli/{roadmap-ZVR4BFVV.js → roadmap-PMFWO6RS.js} +4 -4
  92. package/dist/cli/{safestop-4NJAFUGS.js → safestop-4D7ZWK7G.js} +4 -4
  93. package/dist/cli/{saga-4JJWDB5R.js → saga-IAN5UXYD.js} +4 -4
  94. package/dist/cli/{selfimprove-WQZKONL2.js → selfimprove-JBRCSBCC.js} +2 -2
  95. package/dist/cli/{selfimprove-SS27Z7EN.js → selfimprove-TL6YK2UJ.js} +4 -4
  96. package/dist/cli/{sequence-XSYQKOVZ.js → sequence-H45PZZQS.js} +4 -4
  97. package/dist/cli/{service-MBYXZ7BL.js → service-ILO4T5NI.js} +4 -4
  98. package/dist/cli/{session-F3ULVXCB.js → session-BXYQVTQN.js} +2 -2
  99. package/dist/cli/{session-7EX5W2NE.js → session-L5JTZDUY.js} +4 -4
  100. package/dist/cli/{show-VGFTRMMQ.js → show-KE4BZ3QO.js} +4 -4
  101. package/dist/cli/{skills-56K36QBG.js → skills-2QIVIATQ.js} +4 -4
  102. package/dist/cli/{snapshot-3QATGRU5.js → snapshot-DOGOMYOO.js} +4 -4
  103. package/dist/cli/{start-2FQRPHWC.js → start-L5ZPYZMR.js} +4 -4
  104. package/dist/cli/{stats-WBNXMCF2.js → stats-CQ5FPW3Z.js} +4 -4
  105. package/dist/cli/{sticky-MND4WZLA.js → sticky-QAQ5MSRG.js} +4 -4
  106. package/dist/cli/{stop-CHVH7FQA.js → stop-MJEHRYMC.js} +4 -4
  107. package/dist/cli/{sync-4SJ6UWUU.js → sync-2O6EDEHK.js} +4 -4
  108. package/dist/cli/{tasks-SHTN4VNH.js → tasks-CKR7A2FB.js} +2 -2
  109. package/dist/cli/{tasks-5YEGHPQW.js → tasks-ITCOMXPU.js} +4 -4
  110. package/dist/cli/{testing-2NACMGOB.js → testing-U7PNVSPZ.js} +4 -4
  111. package/dist/cli/{token-C7EUTCGG.js → token-3QXCQF4W.js} +4 -4
  112. package/dist/cli/{update-ZD5HYSKB.js → update-HGFOACPX.js} +4 -4
  113. package/dist/cli/{verify-LVM4TRD3.js → verify-4KFMN6M3.js} +4 -4
  114. package/dist/cli/{worktree-3TENVCFN.js → worktree-6NPH4XS7.js} +4 -4
  115. package/package.json +20 -20
  116. package/studio-dist/client/_app/immutable/chunks/{DibDuJs3.js → B0pkPLyJ.js} +1 -1
  117. package/studio-dist/client/_app/immutable/chunks/{DbccpEZ2.js → BI049d4j.js} +1 -1
  118. package/studio-dist/client/_app/immutable/chunks/BzWml3hV.js +3 -0
  119. package/studio-dist/client/_app/immutable/chunks/DeIoc-yE.js +1 -0
  120. package/studio-dist/client/_app/immutable/entry/{app.D4YI_RAP.js → app.B4lVhhy4.js} +2 -2
  121. package/studio-dist/client/_app/immutable/entry/start.BUj3TuWl.js +1 -0
  122. package/studio-dist/client/_app/immutable/nodes/{0.D_UzQ8Yl.js → 0.Dpyt1Npl.js} +1 -1
  123. package/studio-dist/client/_app/immutable/nodes/{1.CAVDaxks.js → 1.By_GhV31.js} +1 -1
  124. package/studio-dist/client/_app/immutable/nodes/{15.BLW07CRr.js → 15.8zQZAJZd.js} +1 -1
  125. package/studio-dist/client/_app/immutable/nodes/{16.OwFHKxFl.js → 16.BO4YtHQI.js} +1 -1
  126. package/studio-dist/client/_app/immutable/nodes/{17.ByNcDwwk.js → 17.DAjU5Ojt.js} +1 -1
  127. package/studio-dist/client/_app/immutable/nodes/{18.DQ2z0cVj.js → 18.HuG1yXzK.js} +1 -1
  128. package/studio-dist/client/_app/immutable/nodes/{20.DcklgcYr.js → 20.Bt6zN-Kv.js} +1 -1
  129. package/studio-dist/client/_app/immutable/nodes/{24.CFNCQUQa.js → 24.B9hbvMP4.js} +1 -1
  130. package/studio-dist/client/_app/immutable/nodes/{25.DOpU5M2h.js → 25.CshBAyVt.js} +2 -2
  131. package/studio-dist/client/_app/immutable/nodes/{26.BZvubV3F.js → 26.BQ5CobQB.js} +1 -1
  132. package/studio-dist/client/_app/immutable/nodes/{3.DfqLHFYv.js → 3.Bo_1kb7a.js} +1 -1
  133. package/studio-dist/client/_app/version.json +1 -1
  134. package/studio-dist/server/chunks/{0-CbgboTx6.js → 0-iXDxxedF.js} +3 -3
  135. package/studio-dist/server/chunks/1-CfKLg7qv.js +9 -0
  136. package/studio-dist/server/chunks/{15-HB3bkWMP.js → 15-DdryicP_.js} +3 -3
  137. package/studio-dist/server/chunks/{16-DGVo0Czi.js → 16-BWrHdS11.js} +3 -3
  138. package/studio-dist/server/chunks/{17-CNX9-knu.js → 17-DP1IVeN3.js} +3 -3
  139. package/studio-dist/server/chunks/{18-1spEvEI8.js → 18-Cq8Ff9eu.js} +3 -3
  140. package/studio-dist/server/chunks/{20-DJJyDqmv.js → 20-Drx4SXlc.js} +3 -3
  141. package/studio-dist/server/chunks/{24-CCnxieNz.js → 24-BaG-T5zd.js} +3 -3
  142. package/studio-dist/server/chunks/{25-DiDtvOeY.js → 25-Dpfgtt0Y.js} +5 -5
  143. package/studio-dist/server/chunks/{26-BIzvIYSx.js → 26-CU07dFbn.js} +3 -3
  144. package/studio-dist/server/chunks/{3-WAClmfHo.js → 3-CJvBA5Rf.js} +5 -5
  145. package/studio-dist/server/chunks/{_layout.svelte-D6Ldlo8e.js → _layout.svelte-Bfgl42yR.js} +4 -4
  146. package/studio-dist/server/chunks/{_page.svelte-COWnE68H.js → _page.svelte-Bq-NlxlD.js} +3 -3
  147. package/studio-dist/server/chunks/{_page.svelte-BAQybygW.js → _page.svelte-C7v5WkXH.js} +3 -3
  148. package/studio-dist/server/chunks/{_page.svelte-Dpr2yepq.js → _page.svelte-CB2EM78j.js} +3 -3
  149. package/studio-dist/server/chunks/{_page.svelte-imuh1_oL.js → _page.svelte-CYubLP3t.js} +6 -6
  150. package/studio-dist/server/chunks/{_page.svelte-Bm6AVnMf.js → _page.svelte-CcVaPXmp.js} +3 -3
  151. package/studio-dist/server/chunks/{_page.svelte-KD8A9NNL.js → _page.svelte-D6z2pH5p.js} +3 -3
  152. package/studio-dist/server/chunks/{_page.svelte-D4YDVEYh.js → _page.svelte-DyFHb3Ni.js} +3 -3
  153. package/studio-dist/server/chunks/{_page.svelte-Cz61TPsq.js → _page.svelte-gEDyxwsk.js} +3 -3
  154. package/studio-dist/server/chunks/{_page.svelte--c8tMFPx.js → _page.svelte-kiI377AH.js} +4 -4
  155. package/studio-dist/server/chunks/{_server.ts-BiyZRJLN.js → _server.ts-0cS4nH3B.js} +2 -2
  156. package/studio-dist/server/chunks/{_server.ts-CSH4fzXf.js → _server.ts-BI7omFLf.js} +3 -3
  157. package/studio-dist/server/chunks/{_server.ts-MJtlS_2Z.js → _server.ts-BNWf4Ya1.js} +2 -2
  158. package/studio-dist/server/chunks/{_server.ts-B-ezGzXl.js → _server.ts-BsLmUFLj.js} +3 -3
  159. package/studio-dist/server/chunks/{_server.ts-BkEnOqaQ.js → _server.ts-CD48s5Bf.js} +3 -3
  160. package/studio-dist/server/chunks/{_server.ts-Dz-499Yg.js → _server.ts-CFUanB80.js} +2 -2
  161. package/studio-dist/server/chunks/{_server.ts-B9qiqq4z.js → _server.ts-CZ5qHF3u.js} +3 -3
  162. package/studio-dist/server/chunks/{_server.ts-C4rPjGI1.js → _server.ts-CgemM1Fw.js} +3 -3
  163. package/studio-dist/server/chunks/{_server.ts-pZ4SU8_H.js → _server.ts-DEVbc6oI.js} +3 -3
  164. package/studio-dist/server/chunks/{brain-BTM0v0Cd.js → brain-B7Le_niq.js} +2 -2
  165. package/studio-dist/server/chunks/{client-BcCBvM6e.js → client-MsskzBXA.js} +2 -2
  166. package/studio-dist/server/chunks/{error.svelte-BI9UKC3a.js → error.svelte-DVTqW6me.js} +3 -3
  167. package/studio-dist/server/chunks/{http-DcRPuXuV.js → http-Cf9a4LfQ.js} +2 -2
  168. package/studio-dist/server/chunks/{internal-CWvXHt7s.js → internal--0bSFjBP.js} +2 -2
  169. package/studio-dist/server/chunks/{operations-registry-DPL0JZAc.js → operations-registry-DXIoZJCO.js} +9 -2
  170. package/studio-dist/server/chunks/{src-DHIA6U44.js → src-kxlatCMO.js} +142 -27
  171. package/studio-dist/server/chunks/{stores-mFH1rHF6.js → stores-zOnV-ilH.js} +2 -2
  172. package/studio-dist/server/index.js +1 -1
  173. package/studio-dist/server/manifest.js +21 -21
  174. package/studio-dist/client/_app/immutable/chunks/BPn6xjpy.js +0 -3
  175. package/studio-dist/client/_app/immutable/chunks/C113yBd0.js +0 -1
  176. package/studio-dist/client/_app/immutable/entry/start._LyaK-iD.js +0 -1
  177. package/studio-dist/server/chunks/1-Cyw2DSw5.js +0 -9
@@ -896,21 +896,62 @@ function tryQuery(errors, name, query) {
896
896
  }
897
897
  }
898
898
  /**
899
+ * Runs one node query through {@link tryQuery}, adding `kind` to `failedKinds`
900
+ * when it fails, so edges to unloaded nodes of that kind are dropped (T14659).
901
+ *
902
+ * @param errors - Collects `<name>: <message>` for each failed query.
903
+ * @param failedKinds - Collects the kind of each failed node query.
904
+ * @param kind - The node kind the query loads.
905
+ * @param name - The query's name in the recorded message (usually its table).
906
+ * @param query - The query to run.
907
+ * @returns The query's rows, or an empty array when it failed.
908
+ */
909
+ function tryNodeQuery(errors, failedKinds, kind, name, query) {
910
+ const before = errors.length;
911
+ const rows = tryQuery(errors, name, query);
912
+ if (errors.length > before) failedKinds.add(kind);
913
+ return rows;
914
+ }
915
+ /**
916
+ * Builds the store error sink of an adapter: a whole-store failure (an open
917
+ * failure or a thrown read) records the message and marks every node kind the
918
+ * adapter owns as failed, since none of them loaded (T14659).
919
+ *
920
+ * @param errors - Collects the failure message.
921
+ * @param failedKinds - Receives every kind in `kinds` on failure.
922
+ * @param kinds - The node kinds the adapter loads from this store.
923
+ * @returns The sink to pass to {@link readProjectStore} or {@link readGlobalStore}.
924
+ */
925
+ function storeFailureSink(errors, failedKinds, kinds) {
926
+ return (message) => {
927
+ errors.push(message);
928
+ for (const kind of kinds) failedKinds.add(kind);
929
+ };
930
+ }
931
+ /**
899
932
  * Builds an adapter result, joining the recorded failures into `error`.
900
933
  *
901
934
  * @param nodes - Nodes read from the substrate.
902
935
  * @param edges - Edges read from the substrate.
903
936
  * @param errors - Failures recorded while reading; empty when every read succeeded.
904
- * @returns The result, with `error` set only when a read failed.
937
+ * @param failedKinds - Kinds whose node query failed (see {@link tryNodeQuery}).
938
+ * @returns The result, with `error` set only when a read failed and
939
+ * `failedKinds` only when a node query failed.
905
940
  */
906
- function substrateResult(nodes, edges, errors) {
907
- return errors.length === 0 ? {
941
+ function substrateResult(nodes, edges, errors, failedKinds = /* @__PURE__ */ new Set()) {
942
+ if (errors.length === 0) return {
908
943
  nodes,
909
944
  edges
910
- } : {
945
+ };
946
+ return failedKinds.size === 0 ? {
911
947
  nodes,
912
948
  edges,
913
949
  error: errors.join("; ")
950
+ } : {
951
+ nodes,
952
+ edges,
953
+ error: errors.join("; "),
954
+ failedKinds: [...failedKinds]
914
955
  };
915
956
  }
916
957
  //#endregion
@@ -952,8 +993,9 @@ function getAgentRegistrySubstrate(options = {}) {
952
993
  const nodes = [];
953
994
  const edges = [];
954
995
  const errors = [];
996
+ const failedKinds = /* @__PURE__ */ new Set();
955
997
  readGlobalStore((db) => {
956
- const agentRows = tryQuery(errors, "agent_registry_agents", () => allTyped(db.prepare(`SELECT agent_id, name, status,
998
+ const agentRows = tryNodeQuery(errors, failedKinds, "agent", "agent_registry_agents", () => allTyped(db.prepare(`SELECT agent_id, name, status,
957
999
  CASE WHEN typeof(created_at) = 'integer'
958
1000
  THEN strftime('%Y-%m-%dT%H:%M:%S', created_at, 'unixepoch')
959
1001
  ELSE strftime('%Y-%m-%dT%H:%M:%S', created_at)
@@ -974,8 +1016,8 @@ function getAgentRegistrySubstrate(options = {}) {
974
1016
  created_at: row.created_at
975
1017
  }
976
1018
  });
977
- }, (message) => errors.push(message));
978
- return substrateResult(nodes, edges, errors);
1019
+ }, storeFailureSink(errors, failedKinds, ["agent"]));
1020
+ return substrateResult(nodes, edges, errors, failedKinds);
979
1021
  }
980
1022
  //#endregion
981
1023
  //#region ../brain/dist/src/project-context.js
@@ -1110,8 +1152,10 @@ function getBrainSubstrate(options = {}) {
1110
1152
  const nodes = [];
1111
1153
  const edges = [];
1112
1154
  const errors = [];
1155
+ /** Node kinds whose query failed; their unloaded endpoints never become edges (T14658). */
1156
+ const failedKinds = /* @__PURE__ */ new Set();
1113
1157
  readProjectStore(ctx, (db) => {
1114
- const obsRows = tryQuery(errors, "brain_observations", () => allTyped(db.prepare(`SELECT id, title, quality_score, memory_tier,
1158
+ const obsRows = tryNodeQuery(errors, failedKinds, "observation", "brain_observations", () => allTyped(db.prepare(`SELECT id, title, quality_score, memory_tier,
1115
1159
  strftime('%Y-%m-%dT%H:%M:%S', created_at) AS created_at,
1116
1160
  source_session_id, files_modified_json
1117
1161
  FROM main.brain_observations
@@ -1131,7 +1175,7 @@ function getBrainSubstrate(options = {}) {
1131
1175
  source_session_id: row.source_session_id
1132
1176
  }
1133
1177
  });
1134
- const decRows = tryQuery(errors, "brain_decisions", () => allTyped(db.prepare(`SELECT id, decision, quality_score, context_task_id,
1178
+ const decRows = tryNodeQuery(errors, failedKinds, "decision", "brain_decisions", () => allTyped(db.prepare(`SELECT id, decision, quality_score, context_task_id,
1135
1179
  strftime('%Y-%m-%dT%H:%M:%S', created_at) AS created_at
1136
1180
  FROM main.brain_decisions
1137
1181
  WHERE (quality_score IS NULL OR quality_score >= ?)
@@ -1149,7 +1193,7 @@ function getBrainSubstrate(options = {}) {
1149
1193
  created_at: row.created_at
1150
1194
  }
1151
1195
  });
1152
- const patRows = tryQuery(errors, "brain_patterns", () => allTyped(db.prepare(`SELECT id, pattern, type, quality_score,
1196
+ const patRows = tryNodeQuery(errors, failedKinds, "pattern", "brain_patterns", () => allTyped(db.prepare(`SELECT id, pattern, type, quality_score,
1153
1197
  strftime('%Y-%m-%dT%H:%M:%S', extracted_at) AS extracted_at
1154
1198
  FROM main.brain_patterns
1155
1199
  WHERE (quality_score IS NULL OR quality_score >= ?)
@@ -1167,7 +1211,7 @@ function getBrainSubstrate(options = {}) {
1167
1211
  created_at: row.extracted_at
1168
1212
  }
1169
1213
  });
1170
- const learnRows = tryQuery(errors, "brain_learnings", () => allTyped(db.prepare(`SELECT id, insight, quality_score,
1214
+ const learnRows = tryNodeQuery(errors, failedKinds, "learning", "brain_learnings", () => allTyped(db.prepare(`SELECT id, insight, quality_score,
1171
1215
  strftime('%Y-%m-%dT%H:%M:%S', created_at) AS created_at
1172
1216
  FROM main.brain_learnings
1173
1217
  WHERE (quality_score IS NULL OR quality_score >= ?)
@@ -1192,10 +1236,20 @@ function getBrainSubstrate(options = {}) {
1192
1236
  else typePrefix = "learning";
1193
1237
  typeIdToBrainNodeId.set(`${typePrefix}:${rawId}`, n.id);
1194
1238
  }
1239
+ const droppedByKind = /* @__PURE__ */ new Map();
1240
+ /** Counts the edge as dropped when `typeId` is unloaded and of a failed kind. */
1241
+ const dropsUnloadedFailedNode = (typeId) => {
1242
+ if (typeIdToBrainNodeId.has(typeId)) return false;
1243
+ const kind = typeId.slice(0, typeId.indexOf(":"));
1244
+ if (!failedKinds.has(kind)) return false;
1245
+ droppedByKind.set(kind, (droppedByKind.get(kind) ?? 0) + 1);
1246
+ return true;
1247
+ };
1195
1248
  const pageEdgeRows = tryQuery(errors, "brain_page_edges", () => allTyped(db.prepare(`SELECT from_id, to_id, edge_type, weight FROM main.brain_page_edges`)));
1196
1249
  for (const row of pageEdgeRows) {
1197
1250
  const sourceBrainNodeId = typeIdToBrainNodeId.get(row.from_id) ?? brainTypeIdToBrainNodeId(row.from_id);
1198
1251
  if (!sourceBrainNodeId) continue;
1252
+ if (dropsUnloadedFailedNode(row.from_id)) continue;
1199
1253
  if (isTaskId(row.to_id)) edges.push({
1200
1254
  source: sourceBrainNodeId,
1201
1255
  target: taskRefToBrainNodeId(row.to_id),
@@ -1212,7 +1266,7 @@ function getBrainSubstrate(options = {}) {
1212
1266
  });
1213
1267
  else {
1214
1268
  const targetBrainNodeId = typeIdToBrainNodeId.get(row.to_id) ?? brainTypeIdToBrainNodeId(row.to_id);
1215
- if (targetBrainNodeId) edges.push({
1269
+ if (targetBrainNodeId && !dropsUnloadedFailedNode(row.to_id)) edges.push({
1216
1270
  source: sourceBrainNodeId,
1217
1271
  target: targetBrainNodeId,
1218
1272
  type: row.edge_type,
@@ -1227,6 +1281,7 @@ function getBrainSubstrate(options = {}) {
1227
1281
  const sourceTypeId = `${row.memory_type}:${row.memory_id}`;
1228
1282
  const sourceBrainNodeId = typeIdToBrainNodeId.get(sourceTypeId) ?? brainTypeIdToBrainNodeId(sourceTypeId);
1229
1283
  if (!sourceBrainNodeId) continue;
1284
+ if (dropsUnloadedFailedNode(sourceTypeId)) continue;
1230
1285
  edges.push({
1231
1286
  source: sourceBrainNodeId,
1232
1287
  target: `tasks:${row.task_id}`,
@@ -1235,6 +1290,7 @@ function getBrainSubstrate(options = {}) {
1235
1290
  substrate: "cross"
1236
1291
  });
1237
1292
  }
1293
+ for (const [kind, count] of droppedByKind) errors.push(`dropped ${count} edge(s) whose ${kind} endpoint did not load because its node query failed`);
1238
1294
  for (const row of obsRows) {
1239
1295
  if (!row.files_modified_json) continue;
1240
1296
  let filePaths;
@@ -1263,8 +1319,13 @@ function getBrainSubstrate(options = {}) {
1263
1319
  weight: .8,
1264
1320
  substrate: "cross"
1265
1321
  });
1266
- }, (message) => errors.push(message));
1267
- return substrateResult(nodes, edges, errors);
1322
+ }, storeFailureSink(errors, failedKinds, [
1323
+ "observation",
1324
+ "decision",
1325
+ "pattern",
1326
+ "learning"
1327
+ ]));
1328
+ return substrateResult(nodes, edges, errors, failedKinds);
1268
1329
  }
1269
1330
  //#endregion
1270
1331
  //#region ../brain/dist/src/adapters/conduit.js
@@ -1294,8 +1355,9 @@ function getConduitSubstrate(options = {}) {
1294
1355
  const nodes = [];
1295
1356
  const edges = [];
1296
1357
  const errors = [];
1358
+ const failedKinds = /* @__PURE__ */ new Set();
1297
1359
  readProjectStore(ctx, (db) => {
1298
- const msgRows = tryQuery(errors, "conduit_messages", () => allTyped(db.prepare(`SELECT id, content, from_agent_id, to_agent_id,
1360
+ const msgRows = tryNodeQuery(errors, failedKinds, "message", "conduit_messages", () => allTyped(db.prepare(`SELECT id, content, from_agent_id, to_agent_id,
1299
1361
  strftime('%Y-%m-%dT%H:%M:%S', created_at) AS created_at, conversation_id
1300
1362
  FROM main.conduit_messages
1301
1363
  ORDER BY created_at DESC
@@ -1337,8 +1399,8 @@ function getConduitSubstrate(options = {}) {
1337
1399
  substrate: "cross"
1338
1400
  });
1339
1401
  }
1340
- }, (message) => errors.push(message));
1341
- return substrateResult(nodes, edges, errors);
1402
+ }, storeFailureSink(errors, failedKinds, ["message"]));
1403
+ return substrateResult(nodes, edges, errors, failedKinds);
1342
1404
  }
1343
1405
  //#endregion
1344
1406
  //#region ../brain/dist/src/adapters/nexus.js
@@ -1452,8 +1514,9 @@ function getTasksSubstrate(options = {}) {
1452
1514
  const nodes = [];
1453
1515
  const edges = [];
1454
1516
  const errors = [];
1517
+ const failedKinds = /* @__PURE__ */ new Set();
1455
1518
  readProjectStore(ctx, (db) => {
1456
- const taskRows = tryQuery(errors, "tasks_tasks", () => allTyped(db.prepare(`SELECT id, title, status, priority, type, parent_id, created_at
1519
+ const taskRows = tryNodeQuery(errors, failedKinds, "task", "tasks_tasks", () => allTyped(db.prepare(`SELECT id, title, status, priority, type, parent_id, created_at
1457
1520
  FROM main.tasks_tasks
1458
1521
  WHERE status NOT IN ('archived', 'cancelled')
1459
1522
  ORDER BY
@@ -1483,7 +1546,7 @@ function getTasksSubstrate(options = {}) {
1483
1546
  }
1484
1547
  });
1485
1548
  }
1486
- const sessionRows = tryQuery(errors, "tasks_sessions", () => allTyped(db.prepare(`SELECT id, status, started_at, ended_at
1549
+ const sessionRows = tryNodeQuery(errors, failedKinds, "session", "tasks_sessions", () => allTyped(db.prepare(`SELECT id, status, started_at, ended_at
1487
1550
  FROM main.tasks_sessions
1488
1551
  ORDER BY started_at DESC
1489
1552
  LIMIT ?`), Math.ceil(perSubstrateLimit * .2)));
@@ -1536,8 +1599,8 @@ function getTasksSubstrate(options = {}) {
1536
1599
  substrate: "tasks"
1537
1600
  });
1538
1601
  }
1539
- }, (message) => errors.push(message));
1540
- return substrateResult(nodes, edges, errors);
1602
+ }, storeFailureSink(errors, failedKinds, ["task", "session"]));
1603
+ return substrateResult(nodes, edges, errors, failedKinds);
1541
1604
  }
1542
1605
  //#endregion
1543
1606
  //#region ../brain/dist/src/adapters/index.js
@@ -1571,9 +1634,11 @@ var ADAPTER_MAP = {
1571
1634
  * @param ctx - Project whose `cleo.db` code graph resolves nexus stubs.
1572
1635
  * @param errors - Collects a failed nexus stub read, so the stubs it would
1573
1636
  * have recovered are never dropped silently (T14656).
1637
+ * @param isFailedTarget - True for a target whose kind's node query failed: it
1638
+ * gets no query-less stub, since the node may exist but failed to load (T14659).
1574
1639
  * @returns Array of stub BrainNode objects for missing targets.
1575
1640
  */
1576
- function loadStubNodesForEdgeTargets(loadedNodeIds, edges, ctx, errors) {
1641
+ function loadStubNodesForEdgeTargets(loadedNodeIds, edges, ctx, errors, isFailedTarget) {
1577
1642
  const missingTargetIds = /* @__PURE__ */ new Set();
1578
1643
  for (const edge of edges) if (!loadedNodeIds.has(edge.target)) missingTargetIds.add(edge.target);
1579
1644
  if (missingTargetIds.size === 0) return [];
@@ -1619,6 +1684,7 @@ function loadStubNodesForEdgeTargets(loadedNodeIds, edges, ctx, errors) {
1619
1684
  for (const [substrate, nodeIds] of stubsBySubstrate) {
1620
1685
  if (substrate === "nexus") continue;
1621
1686
  for (const nodeId of nodeIds) {
1687
+ if (isFailedTarget(nodeId)) continue;
1622
1688
  const rawId = nodeId.replace(new RegExp(`^${substrate}:`), "");
1623
1689
  stubs.push({
1624
1690
  id: nodeId,
@@ -1634,6 +1700,24 @@ function loadStubNodesForEdgeTargets(loadedNodeIds, edges, ctx, errors) {
1634
1700
  return stubs;
1635
1701
  }
1636
1702
  /**
1703
+ * Returns the kind of a query-less stub target when its ID alone settles it.
1704
+ *
1705
+ * Brain IDs carry no kind; the brain adapter drops its own failed-kind
1706
+ * endpoints, so a missing brain target is never judged here.
1707
+ *
1708
+ * @param substrate - The target's substrate.
1709
+ * @param rawId - The target ID without its substrate prefix.
1710
+ * @returns The target's kind, or null when the ID does not determine it.
1711
+ */
1712
+ function stubTargetKind(substrate, rawId) {
1713
+ switch (substrate) {
1714
+ case "tasks": return rawId.startsWith("ses_") ? "session" : "task";
1715
+ case "conduit": return "message";
1716
+ case "agent-registry": return "agent";
1717
+ default: return null;
1718
+ }
1719
+ }
1720
+ /**
1637
1721
  * Queries all five substrates and merges the results into a unified BrainGraph.
1638
1722
  *
1639
1723
  * When `options.substrates` is provided, only those substrates are queried.
@@ -1645,7 +1729,11 @@ function loadStubNodesForEdgeTargets(loadedNodeIds, edges, ctx, errors) {
1645
1729
  * stub (id, substrate, kind, label). This recovers cross-substrate edges
1646
1730
  * that would otherwise be silently dropped.
1647
1731
  *
1648
- * Stub nodes carry `meta.isStub: true` for optional UI differentiation.
1732
+ * Stub nodes carry `meta.isStub: true` for optional UI differentiation. A
1733
+ * target whose kind's node query failed gets no query-less stub: its edge is
1734
+ * dropped and counted in that substrate's error (T14658). A missing target of
1735
+ * a kind that loaded is stubbed as before, even when another query of its
1736
+ * substrate failed (T14659).
1649
1737
  * A substrate whose read failed is named in `errors` with the SQL error, so a
1650
1738
  * broken query never passes for an empty substrate (T14647). Each query is
1651
1739
  * caught on its own, so one failure never skips a substrate's other queries;
@@ -1662,14 +1750,16 @@ function getAllSubstrates(options = {}) {
1662
1750
  const nodeCounts = Object.fromEntries(ALL_SUBSTRATES.map((s) => [s, 0]));
1663
1751
  const edgeCounts = Object.fromEntries([...ALL_SUBSTRATES, "cross"].map((s) => [s, 0]));
1664
1752
  const errors = {};
1753
+ const failedKinds = /* @__PURE__ */ new Map();
1665
1754
  for (const substrate of substrates) {
1666
1755
  const adapter = ADAPTER_MAP[substrate];
1667
1756
  if (!adapter) continue;
1668
- const { nodes, edges, error } = adapter({
1757
+ const { nodes, edges, error, failedKinds: kinds } = adapter({
1669
1758
  ...options,
1670
1759
  limit
1671
1760
  });
1672
1761
  if (error !== void 0) errors[substrate] = error;
1762
+ if (kinds !== void 0) failedKinds.set(substrate, new Set(kinds));
1673
1763
  allNodes.push(...nodes);
1674
1764
  allEdges.push(...edges);
1675
1765
  nodeCounts[substrate] = nodes.length;
@@ -1682,8 +1772,16 @@ function getAllSubstrates(options = {}) {
1682
1772
  uniqueNodes.push(node);
1683
1773
  }
1684
1774
  const requestedSubstrateSet = options.substrates ? new Set(options.substrates) : null;
1775
+ /** The kind of `nodeId` when that kind's node query failed, else null. */
1776
+ const failedTargetKind = (nodeId) => {
1777
+ const sep = nodeId.indexOf(":");
1778
+ const substrate = nodeId.slice(0, sep);
1779
+ const kind = stubTargetKind(substrate, nodeId.slice(sep + 1));
1780
+ return kind !== null && failedKinds.get(substrate)?.has(kind) ? kind : null;
1781
+ };
1782
+ const isFailedTarget = (nodeId) => failedTargetKind(nodeId) !== null;
1685
1783
  const stubErrors = [];
1686
- const stubNodes = loadStubNodesForEdgeTargets(seenIds, allEdges, options.projectCtx ?? resolveDefaultProjectContext(), stubErrors);
1784
+ const stubNodes = loadStubNodesForEdgeTargets(seenIds, allEdges, options.projectCtx ?? resolveDefaultProjectContext(), stubErrors, isFailedTarget);
1687
1785
  for (const message of stubErrors) {
1688
1786
  if (errors.nexus?.includes(message)) continue;
1689
1787
  errors.nexus = errors.nexus === void 0 ? message : `${errors.nexus}; ${message}`;
@@ -1693,10 +1791,27 @@ function getAllSubstrates(options = {}) {
1693
1791
  seenIds.add(stubNode.id);
1694
1792
  uniqueNodes.push(stubNode);
1695
1793
  }
1794
+ const dropped = /* @__PURE__ */ new Map();
1795
+ const edges = allEdges.filter((edge) => {
1796
+ const kind = seenIds.has(edge.target) ? null : failedTargetKind(edge.target);
1797
+ if (kind === null) return true;
1798
+ const substrate = edge.target.slice(0, edge.target.indexOf(":"));
1799
+ const key = `${substrate}:${kind}`;
1800
+ const entry = dropped.get(key) ?? {
1801
+ substrate,
1802
+ kind,
1803
+ count: 0
1804
+ };
1805
+ entry.count += 1;
1806
+ dropped.set(key, entry);
1807
+ edgeCounts[edge.substrate] -= 1;
1808
+ return false;
1809
+ });
1810
+ for (const { substrate, kind, count } of dropped.values()) errors[substrate] = `${errors[substrate]}; dropped ${count} edge(s) whose ${kind} target did not load because its node query failed`;
1696
1811
  const truncated = uniqueNodes.length >= limit;
1697
1812
  return {
1698
1813
  nodes: truncated ? uniqueNodes.slice(0, limit) : uniqueNodes,
1699
- edges: allEdges,
1814
+ edges,
1700
1815
  counts: {
1701
1816
  nodes: nodeCounts,
1702
1817
  edges: edgeCounts
@@ -1707,4 +1822,4 @@ function getAllSubstrates(options = {}) {
1707
1822
  }
1708
1823
 
1709
1824
  export { getAllSubstrates as g, readProjectStore as r };
1710
- //# sourceMappingURL=src-DHIA6U44.js.map
1825
+ //# sourceMappingURL=src-kxlatCMO.js.map
@@ -1,6 +1,6 @@
1
1
  import { g as getContext } from './dev-Br5zieNA.js';
2
2
  import 'node:module';
3
- import './client-BcCBvM6e.js';
3
+ import './client-MsskzBXA.js';
4
4
 
5
5
  //#region ../../node_modules/.pnpm/@sveltejs+kit@2.57.1_@opentelemetry+api@1.9.0_@sveltejs+vite-plugin-svelte@5.1.1_svelte_e94e6db60b0c5f7146157d0facbe8042/node_modules/@sveltejs/kit/src/runtime/app/stores.js
6
6
  /**
@@ -30,4 +30,4 @@ var page = { subscribe(fn) {
30
30
  } };
31
31
 
32
32
  export { page as p };
33
- //# sourceMappingURL=stores-mFH1rHF6.js.map
33
+ //# sourceMappingURL=stores-zOnV-ilH.js.map
@@ -1,5 +1,5 @@
1
1
  import { _ as __commonJSMin } from './chunks/index-server-BgfA6C0S.js';
2
- import { c as coalesce_to_error, g as get_status, a as get_message, w as with_request_store, p as parse, o as options, I as IN_WEBCONTAINER, b as get_hooks, n as noop, T as TRAILING_SLASH_PARAM, d as INVALIDATED_PARAM, e as decode_pathname, f as find_route, h as normalize_path, i as disable_search, m as merge_tracing, v as validate_layout_server_exports, j as validate_layout_exports, k as validate_page_server_exports, l as validate_page_exports, q as noop_span, r as create_remote_key, s as hash, t as compact, u as once, x as normalize_error, y as resolve, z as parse_remote_arg, A as stringify, B as make_trackable, C as stringify$1, D as read_implementation, E as split_remote_key, N as NULL_BODY_STATUS, F as set_read_implementation } from './chunks/internal-CWvXHt7s.js';
2
+ import { c as coalesce_to_error, g as get_status, a as get_message, w as with_request_store, p as parse, o as options, I as IN_WEBCONTAINER, b as get_hooks, n as noop, T as TRAILING_SLASH_PARAM, d as INVALIDATED_PARAM, e as decode_pathname, f as find_route, h as normalize_path, i as disable_search, m as merge_tracing, v as validate_layout_server_exports, j as validate_layout_exports, k as validate_page_server_exports, l as validate_page_exports, q as noop_span, r as create_remote_key, s as hash, t as compact, u as once, x as normalize_error, y as resolve, z as parse_remote_arg, A as stringify, B as make_trackable, C as stringify$1, D as read_implementation, E as split_remote_key, N as NULL_BODY_STATUS, F as set_read_implementation } from './chunks/internal--0bSFjBP.js';
3
3
  import { H as HttpError, a as text_decoder, S as SvelteKitError, h as has_resolution_suffix, c as has_data_suffix, s as strip_resolution_suffix, d as strip_data_suffix, e as add_data_suffix, f as add_resolution_suffix, R as Redirect, t as text_encoder, A as ActionFailure, g as get_relative_path, i as base64_encode } from './chunks/utils-g564cUMV.js';
4
4
  import { j as json, t as text, e as error, i as isRedirect } from './chunks/exports-Dg-gdPPq.js';
5
5
  import { u as uneval, aa as writable, ab as readable } from './chunks/dev-Br5zieNA.js';
@@ -10,12 +10,12 @@ return {
10
10
  assets: new Set(["favicon.png"]),
11
11
  mimeTypes: {".png":"image/png"},
12
12
  _: {
13
- client: {start:"_app/immutable/entry/start._LyaK-iD.js",app:"_app/immutable/entry/app.D4YI_RAP.js",imports:["_app/immutable/entry/start._LyaK-iD.js","_app/immutable/chunks/BPn6xjpy.js","_app/immutable/chunks/DGftG5oL.js","_app/immutable/entry/app.D4YI_RAP.js","_app/immutable/chunks/DGftG5oL.js","_app/immutable/chunks/C6jhAnil.js","_app/immutable/chunks/B8WnZMYa.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
13
+ client: {start:"_app/immutable/entry/start.BUj3TuWl.js",app:"_app/immutable/entry/app.B4lVhhy4.js",imports:["_app/immutable/entry/start.BUj3TuWl.js","_app/immutable/chunks/BzWml3hV.js","_app/immutable/chunks/DGftG5oL.js","_app/immutable/entry/app.B4lVhhy4.js","_app/immutable/chunks/DGftG5oL.js","_app/immutable/chunks/C6jhAnil.js","_app/immutable/chunks/B8WnZMYa.js"],stylesheets:[],fonts:[],uses_env_dynamic_public:false},
14
14
  nodes: [
15
- __memo(() => import('./chunks/0-CbgboTx6.js')),
16
- __memo(() => import('./chunks/1-Cyw2DSw5.js')),
15
+ __memo(() => import('./chunks/0-iXDxxedF.js')),
16
+ __memo(() => import('./chunks/1-CfKLg7qv.js')),
17
17
  __memo(() => import('./chunks/2-q7c9jKfs.js')),
18
- __memo(() => import('./chunks/3-WAClmfHo.js')),
18
+ __memo(() => import('./chunks/3-CJvBA5Rf.js')),
19
19
  __memo(() => import('./chunks/4-C9BMSh4K.js')),
20
20
  __memo(() => import('./chunks/5-C0CF4WKG.js')),
21
21
  __memo(() => import('./chunks/6-BWyOJust.js')),
@@ -27,18 +27,18 @@ return {
27
27
  __memo(() => import('./chunks/12-WE1u104t.js')),
28
28
  __memo(() => import('./chunks/13-joBDoxhK.js')),
29
29
  __memo(() => import('./chunks/14-Doj5F4uJ.js')),
30
- __memo(() => import('./chunks/15-HB3bkWMP.js')),
31
- __memo(() => import('./chunks/16-DGVo0Czi.js')),
32
- __memo(() => import('./chunks/17-CNX9-knu.js')),
33
- __memo(() => import('./chunks/18-1spEvEI8.js')),
30
+ __memo(() => import('./chunks/15-DdryicP_.js')),
31
+ __memo(() => import('./chunks/16-BWrHdS11.js')),
32
+ __memo(() => import('./chunks/17-DP1IVeN3.js')),
33
+ __memo(() => import('./chunks/18-Cq8Ff9eu.js')),
34
34
  __memo(() => import('./chunks/19-BAQHPrMB.js')),
35
- __memo(() => import('./chunks/20-DJJyDqmv.js')),
35
+ __memo(() => import('./chunks/20-Drx4SXlc.js')),
36
36
  __memo(() => import('./chunks/21-qhGjkW41.js')),
37
37
  __memo(() => import('./chunks/22-Byy16hFA.js')),
38
38
  __memo(() => import('./chunks/23-DlXFHweb.js')),
39
- __memo(() => import('./chunks/24-CCnxieNz.js')),
40
- __memo(() => import('./chunks/25-DiDtvOeY.js').then(function (n) { return n._; })),
41
- __memo(() => import('./chunks/26-BIzvIYSx.js')),
39
+ __memo(() => import('./chunks/24-BaG-T5zd.js')),
40
+ __memo(() => import('./chunks/25-Dpfgtt0Y.js').then(function (n) { return n._; })),
41
+ __memo(() => import('./chunks/26-CU07dFbn.js')),
42
42
  __memo(() => import('./chunks/27-Cqzlh9gZ.js')),
43
43
  __memo(() => import('./chunks/28-B9Yozjcu.js')),
44
44
  __memo(() => import('./chunks/29-Bn8aU2AL.js')),
@@ -61,35 +61,35 @@ return {
61
61
  pattern: /^\/api\/brain\/?$/,
62
62
  params: [],
63
63
  page: null,
64
- endpoint: __memo(() => import('./chunks/_server.ts-pZ4SU8_H.js'))
64
+ endpoint: __memo(() => import('./chunks/_server.ts-DEVbc6oI.js'))
65
65
  },
66
66
  {
67
67
  id: "/api/brain/chunks",
68
68
  pattern: /^\/api\/brain\/chunks\/?$/,
69
69
  params: [],
70
70
  page: null,
71
- endpoint: __memo(() => import('./chunks/_server.ts-CSH4fzXf.js'))
71
+ endpoint: __memo(() => import('./chunks/_server.ts-BI7omFLf.js'))
72
72
  },
73
73
  {
74
74
  id: "/api/brain/node/[id]",
75
75
  pattern: /^\/api\/brain\/node\/([^/]+?)\/?$/,
76
76
  params: [{"name":"id","optional":false,"rest":false,"chained":false}],
77
77
  page: null,
78
- endpoint: __memo(() => import('./chunks/_server.ts-Dz-499Yg.js'))
78
+ endpoint: __memo(() => import('./chunks/_server.ts-CFUanB80.js'))
79
79
  },
80
80
  {
81
81
  id: "/api/brain/stream",
82
82
  pattern: /^\/api\/brain\/stream\/?$/,
83
83
  params: [],
84
84
  page: null,
85
- endpoint: __memo(() => import('./chunks/_server.ts-BkEnOqaQ.js'))
85
+ endpoint: __memo(() => import('./chunks/_server.ts-CD48s5Bf.js'))
86
86
  },
87
87
  {
88
88
  id: "/api/brain/substrate/[name]",
89
89
  pattern: /^\/api\/brain\/substrate\/([^/]+?)\/?$/,
90
90
  params: [{"name":"name","optional":false,"rest":false,"chained":false}],
91
91
  page: null,
92
- endpoint: __memo(() => import('./chunks/_server.ts-BiyZRJLN.js'))
92
+ endpoint: __memo(() => import('./chunks/_server.ts-0cS4nH3B.js'))
93
93
  },
94
94
  {
95
95
  id: "/api/credentials",
@@ -110,7 +110,7 @@ return {
110
110
  pattern: /^\/api\/health\/?$/,
111
111
  params: [],
112
112
  page: null,
113
- endpoint: __memo(() => import('./chunks/_server.ts-MJtlS_2Z.js'))
113
+ endpoint: __memo(() => import('./chunks/_server.ts-BNWf4Ya1.js'))
114
114
  },
115
115
  {
116
116
  id: "/api/memory/decision-store",
@@ -355,7 +355,7 @@ return {
355
355
  pattern: /^\/api\/tasks\/events\/?$/,
356
356
  params: [],
357
357
  page: null,
358
- endpoint: __memo(() => import('./chunks/_server.ts-C4rPjGI1.js'))
358
+ endpoint: __memo(() => import('./chunks/_server.ts-CgemM1Fw.js'))
359
359
  },
360
360
  {
361
361
  id: "/api/tasks/graph",
@@ -390,7 +390,7 @@ return {
390
390
  pattern: /^\/api\/tasks\/subscribe\/?$/,
391
391
  params: [],
392
392
  page: null,
393
- endpoint: __memo(() => import('./chunks/_server.ts-B-ezGzXl.js'))
393
+ endpoint: __memo(() => import('./chunks/_server.ts-BsLmUFLj.js'))
394
394
  },
395
395
  {
396
396
  id: "/api/tasks/tree/[epicId]",
@@ -425,7 +425,7 @@ return {
425
425
  pattern: /^\/api\/tasks\/([^/]+?)\/stream\/?$/,
426
426
  params: [{"name":"id","optional":false,"rest":false,"chained":false}],
427
427
  page: null,
428
- endpoint: __memo(() => import('./chunks/_server.ts-B9qiqq4z.js'))
428
+ endpoint: __memo(() => import('./chunks/_server.ts-CZ5qHF3u.js'))
429
429
  },
430
430
  {
431
431
  id: "/api/tasks/[id]/transition",
@@ -1,3 +0,0 @@
1
- import{$ as e,I as t,L as n,Q as r,R as i,r as a,rt as o,t as s}from"./DGftG5oL.js";var c=class{constructor(e,t){this.status=e,typeof t==`string`?this.body={message:t}:t?this.body=t:this.body={message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}},l=class{constructor(e,t){try{new Headers({location:t})}catch{throw Error(`Invalid redirect location ${JSON.stringify(t)}: this string contains characters that cannot be used in HTTP headers`)}this.status=e,this.location=t}},u=class extends Error{constructor(e,t,n){super(n),this.status=e,this.text=t}};new URL(`sveltekit-internal://`);function d(e,t){return e===`/`||t===`ignore`?e:t===`never`?e.endsWith(`/`)?e.slice(0,-1):e:t===`always`&&!e.endsWith(`/`)?e+`/`:e}function f(e){return e.split(`%25`).map(decodeURI).join(`%25`)}function p(e){for(let t in e)e[t]=decodeURIComponent(e[t]);return e}function m({href:e}){return e.split(`#`)[0]}function h(){}function ee(...e){let t=5381;for(let n of e)if(typeof n==`string`){let e=n.length;for(;e;)t=t*33^n.charCodeAt(--e)}else if(ArrayBuffer.isView(n)){let e=new Uint8Array(n.buffer,n.byteOffset,n.byteLength),r=e.length;for(;r;)t=t*33^e[--r]}else throw TypeError(`value must be a string or TypedArray`);return(t>>>0).toString(36)}new TextEncoder;var g=new TextDecoder;function _(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}var te=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||`GET`)!==`GET`&&v.delete(b(e)),te(e,t));var v=new Map;function y(e,t){let n=b(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:e,...t}=JSON.parse(r.textContent),i=r.getAttribute(`data-ttl`);return i&&v.set(n,{body:e,init:t,ttl:1e3*Number(i)}),r.getAttribute(`data-b64`)!==null&&(e=_(e)),Promise.resolve(new Response(e,t))}return window.fetch(e,t)}function ne(e,t,n){if(v.size>0){let t=b(e,n),r=v.get(t);if(r){if(performance.now()<r.ttl&&[`default`,`force-cache`,`only-if-cached`,void 0].includes(n?.cache))return new Response(r.body,r.init);v.delete(t)}}return window.fetch(t,n)}function b(e,t){let n=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){let e=[];t.headers&&e.push([...new Headers(t.headers)].join(`,`)),t.body&&(typeof t.body==`string`||ArrayBuffer.isView(t.body))&&e.push(t.body),n+=`[data-hash="${ee(...e)}"]`}return n}var re=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function ie(e){let t=[];return{pattern:e===`/`?/^\/$/:RegExp(`^${oe(e).map(e=>{let n=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(e);if(n)return t.push({name:n[1],matcher:n[2],optional:!1,rest:!0,chained:!0}),`(?:/([^]*))?`;let r=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(e);if(r)return t.push({name:r[1],matcher:r[2],optional:!0,rest:!1,chained:!0}),`(?:/([^/]+))?`;if(!e)return;let i=e.split(/\[(.+?)\](?!\])/);return`/`+i.map((e,n)=>{if(n%2){if(e.startsWith(`x+`))return ce(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith(`u+`))return ce(String.fromCharCode(...e.slice(2).split(`-`).map(e=>parseInt(e,16))));let[,r,a,o,s]=re.exec(e);return t.push({name:o,matcher:s,optional:!!r,rest:!!a,chained:a?n===1&&i[0]===``:!1}),a?`([^]*?)`:r?`([^/]*)?`:`([^/]+?)`}return ce(e)}).join(``)}).join(``)}/?$`),params:t}}function ae(e){return e!==``&&!/^\([^)]+\)$/.test(e)}function oe(e){return e.slice(1).split(`/`).filter(ae)}function se(e,t,n){let r={},i=e.slice(1),a=i.filter(e=>e!==void 0),o=0;for(let e=0;e<t.length;e+=1){let s=t[e],c=i[e-o];if(s.chained&&s.rest&&o&&(c=i.slice(e-o,e+1).filter(e=>e).join(`/`),o=0),c===void 0)if(s.rest)c=``;else continue;if(!s.matcher||n[s.matcher](c)){r[s.name]=c;let n=t[e+1],l=i[e+1];n&&!n.rest&&n.optional&&l&&s.chained&&(o=0),!n&&!l&&Object.keys(r).length===a.length&&(o=0);continue}if(s.optional&&s.chained){o++;continue}return}if(!o)return r}function ce(e){return e.normalize().replace(/[[\]]/g,`\\$&`).replace(/%/g,`%25`).replace(/\//g,`%2[Ff]`).replace(/\?/g,`%3[Ff]`).replace(/#/g,`%23`).replace(/[.*+?^${}()|\\]/g,`\\$&`)}function le({nodes:e,server_loads:t,dictionary:n,matchers:r}){let i=new Set(t);return Object.entries(n).map(([t,[n,i,s]])=>{let{pattern:c,params:l}=ie(t),u={id:t,exec:e=>{let t=c.exec(e);if(t)return se(t,l,r)},errors:[1,...s||[]].map(t=>e[t]),layouts:[0,...i||[]].map(o),leaf:a(n)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function a(t){let n=t<0;return n&&(t=~t),[n,e[t]]}function o(t){return t===void 0?t:[i.has(t),e[t]]}}function ue(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function de(e,t,n=JSON.stringify){let r=n(t);try{sessionStorage[e]=r}catch{}}var x=globalThis.__sveltekit_1tu5gn1?.base??``,fe=globalThis.__sveltekit_1tu5gn1?.assets??x??``,pe=`1795688692797`,me=`sveltekit:snapshot`,he=`sveltekit:scroll`,ge=`sveltekit:states`,S=`sveltekit:history`,C=`sveltekit:navigation`,w={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},T=location.origin;function _e(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){let e=document.getElementsByTagName(`base`);t=e.length?e[0].href:document.URL}return new URL(e,t)}function E(){return{x:pageXOffset,y:pageYOffset}}function D(e,t){return e.getAttribute(`data-sveltekit-${t}`)}var ve={...w,"":w.hover};function ye(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function be(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()===`A`&&e.hasAttribute(`href`))return e;e=ye(e)}}function xe(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){let e=location.hash.split(`#`)[1]||`/`;r.hash=`#${e}${r.hash}`}}catch{}let i=e instanceof SVGAElement?e.target.baseVal:e.target,a=!r||!!i||Ee(r,t,n)||(e.getAttribute(`rel`)||``).split(/\s+/).includes(`external`),o=r?.origin===T&&e.hasAttribute(`download`);return{url:r,external:a,target:i,download:o}}function Se(e){let t=null,n=null,r=null,i=null,a=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=D(s,`preload-code`)),i===null&&(i=D(s,`preload-data`)),t===null&&(t=D(s,`keepfocus`)),n===null&&(n=D(s,`noscroll`)),a===null&&(a=D(s,`reload`)),o===null&&(o=D(s,`replacestate`)),s=ye(s);function c(e){switch(e){case``:case`true`:return!0;case`off`:case`false`:return!1;default:return}}return{preload_code:ve[r??`off`],preload_data:ve[i??`off`],keepfocus:c(t),noscroll:c(n),reload:c(a),replace_state:c(o)}}function Ce(e){let t=o(e),n=!0;function r(){n=!0,t.update(e=>e)}function i(e){n=!1,t.set(e)}function a(e){let r;return t.subscribe(t=>{(r===void 0||n&&t!==r)&&e(r=t)})}return{notify:r,set:i,subscribe:a}}var we={v:h};function Te(){let{set:e,subscribe:t}=o(!1);async function n(){clearTimeout(void 0);try{let t=await fetch(`${fe}/_app/version.json`,{headers:{pragma:`no-cache`,"cache-control":`no-cache`}});if(!t.ok)return!1;let n=(await t.json()).version!==pe;return n&&(e(!0),we.v(),clearTimeout(void 0)),n}catch{return!1}}return{subscribe:t,check:n}}function Ee(e,t,n){return e.origin!==T||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function De(e){}function Oe(e){return Uint8Array.fromBase64(e).buffer}function ke(e){return Uint8Array.from(Buffer.from(e,`base64`)).buffer}function Ae(e){let t=atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r.buffer}var je=typeof Uint8Array.fromBase64==`function`,Me=typeof process==`object`&&process.versions?.node!==void 0,Ne=je?Oe:Me?ke:Ae;function Pe(e,t){return Fe(JSON.parse(e),t)}function Fe(e,t){if(typeof e==`number`)return a(e,!0);if(!Array.isArray(e)||e.length===0)throw Error(`Invalid input`);let n=e,r=Array(n.length),i=null;function a(e,o=!1){if(e===-1)return;if(e===-3)return NaN;if(e===-4)return 1/0;if(e===-5)return-1/0;if(e===-6)return-0;if(o||typeof e!=`number`)throw Error(`Invalid input`);if(e in r)return r[e];let s=n[e];if(!s||typeof s!=`object`)r[e]=s;else if(Array.isArray(s))if(typeof s[0]==`string`){let o=s[0],c=t&&Object.hasOwn(t,o)?t[o]:void 0;if(c){let t=s[1];if(typeof t!=`number`&&(t=n.push(s[1])-1),i??=new Set,i.has(t))throw Error(`Invalid circular reference`);return i.add(t),r[e]=c(a(t)),i.delete(t),r[e]}switch(o){case`Date`:r[e]=new Date(s[1]);break;case`Set`:let t=new Set;r[e]=t;for(let e=1;e<s.length;e+=1)t.add(a(s[e]));break;case`Map`:let i=new Map;r[e]=i;for(let e=1;e<s.length;e+=2)i.set(a(s[e]),a(s[e+1]));break;case`RegExp`:r[e]=new RegExp(s[1],s[2]);break;case`Object`:{let t=s[1];if(typeof n[t]==`object`&&n[t][0]!==`BigInt`)throw Error(`Invalid input`);r[e]=Object(a(t));break}case`BigInt`:r[e]=BigInt(s[1]);break;case`null`:let c=Object.create(null);r[e]=c;for(let e=1;e<s.length;e+=2){if(s[e]===`__proto__`)throw Error("Cannot parse an object with a `__proto__` property");c[s[e]]=a(s[e+1])}break;case`Int8Array`:case`Uint8Array`:case`Uint8ClampedArray`:case`Int16Array`:case`Uint16Array`:case`Float16Array`:case`Int32Array`:case`Uint32Array`:case`Float32Array`:case`Float64Array`:case`BigInt64Array`:case`BigUint64Array`:case`DataView`:{if(n[s[1]][0]!==`ArrayBuffer`)throw Error(`Invalid data`);let t=globalThis[o],i=a(s[1]);r[e]=s[2]===void 0?new t(i):new t(i,s[2],s[3]);break}case`ArrayBuffer`:{let t=s[1];if(typeof t!=`string`)throw Error(`Invalid ArrayBuffer encoding`);r[e]=Ne(t);break}case`Temporal.Duration`:case`Temporal.Instant`:case`Temporal.PlainDate`:case`Temporal.PlainTime`:case`Temporal.PlainDateTime`:case`Temporal.PlainMonthDay`:case`Temporal.PlainYearMonth`:case`Temporal.ZonedDateTime`:{let t=o.slice(9);r[e]=Temporal[t].from(s[1]);break}case`URL`:r[e]=new URL(s[1]);break;case`URLSearchParams`:r[e]=new URLSearchParams(s[1]);break;default:throw Error(`Unknown type ${o}`)}}else if(s[0]===-7){let t=s[1];if(!Number.isInteger(t)||t<0)throw Error(`Invalid input`);let n=Array(t);r[e]=n;for(let e=2;e<s.length;e+=2){let r=s[e];if(!Number.isInteger(r)||r<0||r>=t)throw Error(`Invalid input`);n[r]=a(s[e+1])}}else{let t=Array(s.length);r[e]=t;for(let e=0;e<s.length;e+=1){let n=s[e];n!==-2&&(t[e]=a(n))}}else{let t={};r[e]=t;for(let e of Object.keys(s)){if(e===`__proto__`)throw Error("Cannot parse an object with a `__proto__` property");let n=s[e];t[e]=a(n)}}return r[e]}return a(0)}var Ie=new Set([`load`,`prerender`,`csr`,`ssr`,`trailingSlash`,`config`]);new Set([...Ie,`entries`]);var Le=new Set([...Ie]);new Set([...Le,`actions`,`entries`]);function Re(e){return e.filter(e=>e!=null)}var ze=`x-sveltekit-invalidated`,Be=`x-sveltekit-trailing-slash`;function Ve(e){return e instanceof c||e instanceof u?e.status:500}function He(e){return e instanceof u?e.text:`Internal Error`}var O,k,Ue,We=a.toString().includes(`$$`)||/function \w+\(\) \{\}/.test(a.toString()),Ge=`a:`;We?(O={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Ge)},k={current:null},Ue={current:!1}):(O=new class{#e=e({});get data(){return t(this.#e)}set data(e){r(this.#e,e)}#t=e(null);get form(){return t(this.#t)}set form(e){r(this.#t,e)}#n=e(null);get error(){return t(this.#n)}set error(e){r(this.#n,e)}#r=e({});get params(){return t(this.#r)}set params(e){r(this.#r,e)}#i=e({id:null});get route(){return t(this.#i)}set route(e){r(this.#i,e)}#a=e({});get state(){return t(this.#a)}set state(e){r(this.#a,e)}#o=e(-1);get status(){return t(this.#o)}set status(e){r(this.#o,e)}#s=e(new URL(Ge));get url(){return t(this.#s)}set url(e){r(this.#s,e)}},k=new class{#e=e(null);get current(){return t(this.#e)}set current(e){r(this.#e,e)}},Ue=new class{#e=e(!1);get current(){return t(this.#e)}set current(e){r(this.#e,e)}},we.v=()=>Ue.current=!0);function Ke(e){Object.assign(O,e)}var qe=`/__data.json`,Je=`.html__data.json`;function Ye(e){return e.endsWith(`.html`)?e.replace(/\.html$/,Je):e.replace(/\/$/,``)+qe}var{onMount:Xe,tick:Ze}=s,Qe=new Set([`icon`,`shortcut icon`,`apple-touch-icon`]),A=null,j=ue(`sveltekit:scroll`)??{},M=ue(`sveltekit:snapshot`)??{},N={url:Ce({}),page:Ce({}),navigating:o(null),updated:Te()};function $e(e){j[e]=E()}function et(e,t){let n=e+1;for(;j[n];)delete j[n],n+=1;for(n=t+1;M[n];)delete M[n],n+=1}function P(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(h)}async function tt(){if(`serviceWorker`in navigator){let e=await navigator.serviceWorker.getRegistration(x||`/`);e&&await e.update()}}var nt,rt,F,I,it,L,at=[],ot=[],R=null;function z(){R?.fork?.then(e=>e?.discard()),R=null}var st=new Map,ct=new Set,lt=new Set,B=new Set,V={branch:[],error:null,url:null,nav:null},ut=!1,dt=!1,ft=!0,H=!1,U=!1,pt=!1,W=!1,G,K,q,J,Y=new Set,mt,ht=new Map;async function gt(e,t,n){globalThis.__sveltekit_1tu5gn1&&(globalThis.__sveltekit_1tu5gn1.query,globalThis.__sveltekit_1tu5gn1.prerender),document.URL!==location.href&&(location.href=location.href),L=e,await e.hooks.init?.(),nt=le(e),I=document.documentElement,it=t,rt=e.nodes[0],F=e.nodes[1],rt(),F(),K=history.state?.[S],q=history.state?.[C],K||(K=q=Date.now(),history.replaceState({...history.state,[S]:K,[C]:q},``));let r=j[K];function i(){r&&(history.scrollRestoration=`manual`,scrollTo(r.x,r.y))}n?(i(),await qt(it,n)):(await Q({type:`enter`,url:_e(L.hash?en(new URL(location.href)):location.href),replace_state:!0}),i()),Kt()}async function _t(e=!0,t=!0){if(await(mt||=Promise.resolve()),!mt)return;mt=null;let n=J={},r=await Z(V.url,!0);if(z(),W&&ht.forEach(e=>{e.forEach(({resource:e})=>{e.refresh?.()})}),e){let e=O.state,i=r&&await Mt(r);if(!i||n!==J)return;if(i.type===`redirect`)return St(new URL(i.location,V.url).href,{replaceState:!0},1,n);t||(i.props.page.state=e),Ke(i.props.page),V={...i.state,nav:V.nav},vt(),G.$set(i.props)}else vt();await Promise.all([...ht.values()].flatMap(e=>[...e.values()].map(({resource:e})=>e))).catch(h)}function vt(){at.length=0,W=!1}function yt(e){ot.some(e=>e?.snapshot)&&(M[e]=ot.map(e=>e?.snapshot?.capture()))}function bt(e){M[e]?.forEach((e,t)=>{ot[t]?.snapshot?.restore(e)})}function xt(){$e(K),de(he,j),yt(q),de(me,M)}async function St(e,t,n,r){let a;t.invalidateAll&&z(),await Q({type:`goto`,url:_e(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(W=!0,a=[],ht.forEach((e,t)=>{for(let n of e.keys())a.push(t+`/`+n)})),t.invalidate&&t.invalidate.forEach(Ht)}}),t.invalidateAll&&i().then(i).then(()=>{ht.forEach((e,t)=>{e.forEach(({resource:e},n)=>{a?.includes(t+`/`+n)&&e.refresh?.()})})})}async function Ct(e){if(e.id!==R?.id){z();let t={};Y.add(t),R={id:e.id,token:t,promise:Mt({...e,preload:t}).then(e=>(Y.delete(t),e.type===`loaded`&&e.state.error&&z(),e)),fork:null}}return R.promise}async function wt(e){let t=(await Z(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(e=>e[1]()))}async function Tt(e,t,n){let r={params:V.params,route:{id:V.route?.id??null},url:new URL(location.href)};V={...e.state,nav:r};let i=document.querySelector(`style[data-sveltekit]`);if(i&&i.remove(),Object.assign(O,e.props.page),G=new L.root({target:t,props:{...e.props,stores:N,components:ot},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),bt(q),n){let e={from:null,to:{...r,scroll:j[K]??E()},willUnload:!1,type:`enter`,complete:Promise.resolve()};B.forEach(t=>t(e))}dt=!0}async function X({url:e,params:t,branch:n,errors:r,status:i,error:a,route:o,form:s}){let c=`never`;if(x&&(e.pathname===x||e.pathname===x+`/`))c=`always`;else for(let e of n)e?.slash!==void 0&&(c=e.slash);e.pathname=d(e.pathname,c),e.search=e.search;let l={type:`loaded`,state:{url:e,params:t,branch:n,error:a,route:o},props:{constructors:Re(n).map(e=>e.node.component),page:$t(O)}};s!==void 0&&(l.props.form=s);let u={},f=!O,p=0;for(let e=0;e<Math.max(n.length,V.branch.length);e+=1){let t=n[e],r=V.branch[e];t?.data!==r?.data&&(f=!0),t&&(u={...u,...t.data},f&&(l.props[`data_${p}`]=u),p+=1)}return(!V.url||e.href!==V.url.href||V.error!==a||s!==void 0&&s!==O.form||f)&&(l.props.page={error:a,params:t,route:{id:o?.id??null},state:{},status:i,url:new URL(e),form:s??null,data:f?u:O.data}),l}async function Et({loader:e,parent:t,url:n,params:r,route:i,server_data_node:a}){let o={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},s=await e();return{node:s,loader:e,server:a,universal:s.universal?.load?{type:`data`,data:null,uses:o}:null,data:a?.data??null,slash:s.universal?.trailingSlash??a?.slash}}function Dt(e,t,n){let r=e instanceof Request?e.url:e,i=new URL(r,n);return i.origin===n.origin&&(r=i.href.slice(n.origin.length)),{resolved:i,promise:dt?ne(r,i.href,t):y(r,t)}}function Ot(e,t,n,r,i,a){if(W)return!0;if(!i)return!1;if(i.parent&&e||i.route&&t||i.url&&n)return!0;for(let e of i.search_params)if(r.has(e))return!0;for(let e of i.params)if(a[e]!==V.params[e])return!0;for(let e of i.dependencies)if(at.some(t=>t(new URL(e))))return!0;return!1}function kt(e,t){return e?.type===`data`?e:e?.type===`skip`?t??null:null}function At(e,t){if(!e)return new Set(t.searchParams.keys());let n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(let r of n){let i=e.searchParams.getAll(r),a=t.searchParams.getAll(r);i.every(e=>a.includes(e))&&a.every(e=>i.includes(e))&&n.delete(r)}return n}function jt({error:e,url:t,route:n,params:r}){return{type:`loaded`,state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:$t(O),constructors:[]}}}async function Mt({id:e,invalidating:t,url:n,params:r,route:i,preload:a}){if(R?.id===e)return Y.delete(R.token),R.promise;let{errors:o,layouts:s,leaf:u}=i,d=[...s,u];o.forEach(e=>e?.().catch(h)),d.forEach(e=>e?.[1]().catch(h));let f=null,p=V.url?e!==Lt(V.url):!1,m=V.route?i.id!==V.route.id:!1,ee=At(V.url,n),g=!1;{let t=d.map((e,t)=>{let n=V.branch[t],i=!!e?.[0]&&(n?.loader!==e[1]||Ot(g,m,p,ee,n.server?.uses,r));return i&&(g=!0),i});if(t.some(Boolean)){try{f=await Jt(n,t)}catch(t){let o=await $(t,{url:n,params:r,route:{id:e}});return Y.has(a)?jt({error:o,url:n,params:r,route:i}):Pt({status:Ve(t),error:o,url:n,route:i})}if(f.type===`redirect`)return f}}let _=f?.nodes,te=!1,v=d.map(async(e,t)=>{if(!e)return;let a=V.branch[t],o=_?.[t];if((!o||o.type===`skip`)&&e[1]===a?.loader&&!Ot(te,m,p,ee,a.universal?.uses,r))return a;if(te=!0,o?.type===`error`)throw o;return Et({loader:e[1],url:n,params:r,route:i,parent:async()=>{let e={};for(let n=0;n<t;n+=1)Object.assign(e,(await v[n])?.data);return e},server_data_node:kt(o===void 0&&e[0]?{type:`skip`}:o??null,e[0]?a?.server:void 0)})});for(let e of v)e.catch(h);let y=[];for(let e=0;e<d.length;e+=1)if(d[e])try{y.push(await v[e])}catch(t){if(t instanceof l)return{type:`redirect`,location:t.location};if(Y.has(a))return jt({error:await $(t,{params:r,url:n,route:{id:i.id}}),url:n,params:r,route:i});let s=Ve(t),u;if(_?.includes(t))s=t.status??s,u=t.error;else if(t instanceof c)u=t.body;else{if(await N.updated.check())return await tt(),await P(n);u=await $(t,{params:r,url:n,route:{id:i.id}})}let d=await Nt(e,y,o);return d?X({url:n,params:r,branch:y.slice(0,d.idx).concat(d.node),errors:o,status:s,error:u,route:i}):await zt(n,{id:i.id},u,s)}else y.push(void 0);return X({url:n,params:r,branch:y,errors:o,status:200,error:null,route:i,form:t?void 0:null})}async function Nt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)--r;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Pt({status:e,error:t,url:n,route:r}){let i={},a=null;if(L.server_loads[0]===0)try{let e=await Jt(n,[!0]);if(e.type!==`data`||e.nodes[0]&&e.nodes[0].type!==`data`)throw 0;a=e.nodes[0]??null}catch{(n.origin!==T||n.pathname!==location.pathname||ut)&&await P(n)}try{return X({url:n,params:i,branch:[await Et({loader:rt,url:n,params:i,route:r,parent:()=>Promise.resolve({}),server_data_node:kt(a)}),{node:await F(),loader:F,universal:null,server:null,data:null}],status:e,error:t,errors:[],route:null})}catch(e){if(e instanceof l)return St(new URL(e.location,location.href),{},0);throw e}}async function Ft(e){let t=e.href;if(st.has(t))return st.get(t);let n;try{let r=(async()=>{let t=await L.hooks.reroute({url:new URL(e),fetch:async(t,n)=>Dt(t,n,e).promise})??e;if(typeof t==`string`){let n=new URL(e);L.hash?n.hash=t:n.pathname=t,t=n}return t})();st.set(t,r),n=await r}catch{st.delete(t);return}return n}async function Z(e,t){if(e&&!Ee(e,x,L.hash)){let n=await Ft(e);if(!n)return;let r=It(n);for(let n of nt){let i=n.exec(r);if(i)return{id:Lt(e),invalidating:t,route:n,params:p(i),url:e}}}}function It(e){return f(L.hash?e.hash.replace(/^#/,``).replace(/[?#].+/,``):e.pathname.slice(x.length))||`/`}function Lt(e){return(L.hash?e.hash.replace(/^#/,``):e.pathname)+e.search}function Rt({url:e,type:t,intent:n,delta:r,event:i,scroll:a}){let o=!1,s=Qt(V,n,e,t,a??null);r!==void 0&&(s.navigation.delta=r),i!==void 0&&(s.navigation.event=i);let c={...s.navigation,cancel:()=>{o=!0,s.reject(Error(`navigation cancelled`))}};return H||ct.forEach(e=>e(c)),o?null:s}async function Q({type:e,url:t,popped:r,keepfocus:a,noscroll:o,replace_state:s,state:c={},redirect_count:l=0,nav_token:d={},accept:f=h,block:p=h,event:m}){let ee=J;J=d;let g=await Z(t,!1),_=e===`enter`?Qt(V,g,t,e):Rt({url:t,type:e,delta:r?.delta,intent:g,scroll:r?.scroll,event:m});if(!_){p(),J===d&&(J=ee);return}let te=K,v=q;f(),H=!0,dt&&_.navigation.type!==`enter`&&N.navigating.set(k.current=_.navigation);let y=g&&await Mt(g);if(!y){if(Ee(t,x,L.hash))return await P(t,s);y=await zt(t,{id:null},await $(new u(404,`Not Found`,`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,s)}if(t=g?.url||t,J!==d)return _.reject(Error(`navigation aborted`)),!1;if(y.type===`redirect`){if(l<20){await Q({type:e,url:new URL(y.location,t),popped:r,keepfocus:a,noscroll:o,replace_state:s,state:c,redirect_count:l+1,nav_token:d}),_.fulfil(void 0);return}y=await Pt({status:500,error:await $(Error(`Redirect loop`),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else y.props.page.status>=400&&await N.updated.check()&&(await tt(),await P(t,s));if(vt(),$e(te),yt(v),y.props.page.url.pathname!==t.pathname&&(t.pathname=y.props.page.url.pathname),c=r?r.state:c,!r){let e=+!s,n={[S]:K+=e,[C]:q+=e,[ge]:c};(s?history.replaceState:history.pushState).call(history,n,``,t),s||et(K,q)}let ne=g&&R?.id===g.id?R.fork:null;R?.fork&&!ne&&z(),R=null,y.props.page.state=c;let b;if(dt){let e=(await Promise.all(Array.from(lt,e=>e(_.navigation)))).filter(e=>typeof e==`function`);if(e.length>0){function t(){e.forEach(e=>{B.delete(e)})}e.push(t),e.forEach(e=>{B.add(e)})}let r=_.navigation.to;V={...y.state,nav:{params:r.params,route:r.route,url:r.url}},y.props.page&&(y.props.page.url=t);let i=ne&&await ne;i?b=i.commit():(A=null,G.$set(y.props),A&&Object.assign(y.props.page,A),Ke(y.props.page),b=n?.()),pt=!0}else await Tt(y,it,!1);let{activeElement:re}=document;await b,await i(),await i();let ie=null;if(ft){let e=r?r.scroll:o?E():null;e?scrollTo(e.x,e.y):(ie=t.hash&&document.getElementById(tn(t)))?ie.scrollIntoView():scrollTo(0,0)}let ae=document.activeElement!==re&&document.activeElement!==document.body;!a&&!ae&&Zt(t,!ie),ft=!0,y.props.page&&(A&&Object.assign(y.props.page,A),Object.assign(O,y.props.page)),H=!1,e===`popstate`&&bt(q),_.fulfil(void 0),_.navigation.to&&(_.navigation.to.scroll=E()),B.forEach(e=>e(_.navigation)),N.navigating.set(k.current=null)}async function zt(e,t,n,r,i){return e.origin===T&&e.pathname===location.pathname&&!ut?await Pt({status:r,error:n,url:e,route:t}):await P(e,i)}function Bt(){let e,t={element:void 0,href:void 0},n;I.addEventListener(`mousemove`,t=>{let n=t.target;clearTimeout(e),e=setTimeout(()=>{a(n,w.hover)},20)});function r(e){e.defaultPrevented||a(e.composedPath()[0],w.tap)}I.addEventListener(`mousedown`,r),I.addEventListener(`touchstart`,r,{passive:!0});let i=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&(wt(new URL(t.target.href)),i.unobserve(t.target))},{threshold:0});async function a(e,r){let i=be(e,I),a=i===t.element&&i?.href===t.href&&r>=n;if(!i||a)return;let{url:o,external:s,download:c}=xe(i,x,L.hash);if(s||c)return;let l=Se(i),u=o&&Lt(V.url)===Lt(o);if(!(l.reload||u))if(r<=l.preload_data){t={element:i,href:i.href},n=w.tap;let e=await Z(o,!1);if(!e)return;Ct(e)}else r<=l.preload_code&&(t={element:i,href:i.href},n=r,wt(o))}function o(){i.disconnect();for(let e of I.querySelectorAll(`a`)){let{url:t,external:n,download:r}=xe(e,x,L.hash);if(n||r)continue;let a=Se(e);a.reload||(a.preload_code===w.viewport&&i.observe(e),a.preload_code===w.eager&&wt(t))}}B.add(o),o()}function $(e,t){if(e instanceof c)return e.body;let n=Ve(e),r=He(e);return L.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Vt(e,t={}){return e=new URL(_e(e)),e.origin===T?St(e,t,0):Promise.reject(Error(`goto: invalid URL`))}function Ht(e){if(typeof e==`function`)at.push(e);else{let{href:t}=new URL(e,location.href);at.push(e=>e.href===t)}}function Ut(){return W=!0,_t()}async function Wt(e){e.type===`error`?await Gt(e.error,e.status):e.type===`redirect`?await St(e.location,{invalidateAll:!0},0):(O.form=e.data,O.status=e.status,G.$set({form:null,page:$t(O)}),await Ze(),G.$set({form:e.data}),e.type===`success`&&Zt(O.url))}async function Gt(e,t=500){let n=new URL(location.href),{branch:r,route:i}=V;if(!i)return;let a=await Nt(V.branch.length,r,i.errors);if(a){let o=await X({url:n,params:V.params,branch:r.slice(0,a.idx).concat(a.node),status:t,error:e,route:i});V={...o.state,nav:V.nav},G.$set(o.props),Ke(o.props.page),Ze().then(()=>Zt(V.url))}}function Kt(){history.scrollRestoration=`manual`,addEventListener(`beforeunload`,e=>{let t=!1;if(xt(),!H){let e=Qt(V,void 0,null,`leave`),n={...e.navigation,cancel:()=>{t=!0,e.reject(Error(`navigation cancelled`))}};ct.forEach(e=>e(n))}t?(e.preventDefault(),e.returnValue=``):history.scrollRestoration=`auto`}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&xt()}),navigator.connection?.saveData||Bt(),I.addEventListener(`click`,async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;let n=be(t.composedPath()[0],I);if(!n)return;let{url:r,external:i,target:a,download:o}=xe(n,x,L.hash);if(!r)return;if(a===`_parent`||a===`_top`){if(window.parent!==window)return}else if(a&&a!==`_self`)return;let s=Se(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol===`https:`||r.protocol===`http:`)||o)return;let[c,l]=(L.hash?r.hash.replace(/^#/,``):r.href).split(`#`),u=c===m(location);if(i||s.reload&&(!u||!l)){Rt({url:r,type:`link`,event:t})?H=!0:t.preventDefault();return}if(l!==void 0&&u){let[,i]=V.url.href.split(`#`);if(i===l){if(t.preventDefault(),l===``||l===`top`&&n.ownerDocument.getElementById(`top`)===null)scrollTo({top:0});else{let e=n.ownerDocument.getElementById(decodeURIComponent(l));e&&(e.scrollIntoView(),e.focus())}return}if(U=!0,$e(K),e(r),!s.replace_state)return;U=!1}t.preventDefault(),await new Promise(e=>{requestAnimationFrame(()=>{setTimeout(e,0)}),setTimeout(e,100)}),await Q({type:`link`,url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}),I.addEventListener(`submit`,e=>{if(e.defaultPrevented)return;let t=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if((n?.formTarget||t.target)===`_blank`||(n?.formMethod||t.method)!==`get`)return;let r=new URL(n?.hasAttribute(`formaction`)&&n?.formAction||t.action);if(Ee(r,x,!1))return;let i=e.target,a=Se(i);if(a.reload)return;e.preventDefault(),e.stopPropagation();let o=new FormData(i,n);r.search=new URLSearchParams(o).toString(),Q({type:`form`,url:r,keepfocus:a.keepfocus,noscroll:a.noscroll,replace_state:a.replace_state??r.href===location.href,event:e})}),addEventListener(`popstate`,async t=>{if(!Xt)if(t.state?.[`sveltekit:history`]){let n=t.state[S];if(J={},n===K)return;let r=j[n],i=t.state[`sveltekit:states`]??{},a=new URL(t.state[`sveltekit:pageurl`]??location.href),o=t.state[C],s=V.url?m(location)===m(V.url):!1;if(o===q&&(pt||s)){i!==O.state&&(O.state=i),e(a),j[K]=E(),r&&scrollTo(r.x,r.y),K=n;return}let c=n-K;await Q({type:`popstate`,url:a,popped:{state:i,scroll:r,delta:c},accept:()=>{K=n,q=o},block:()=>{history.go(-c)},nav_token:J,event:t})}else U||(e(new URL(location.href)),L.hash&&location.reload())}),addEventListener(`hashchange`,()=>{U&&(U=!1,history.replaceState({...history.state,[S]:++K,[C]:q},``,location.href))});for(let e of document.querySelectorAll(`link`))Qe.has(e.rel)&&(e.href=e.href);addEventListener(`pageshow`,e=>{e.persisted&&N.navigating.set(k.current=null)});function e(e){V.url=O.url=e,N.page.set($t(O)),N.page.notify()}}async function qt(e,{status:t=200,error:n,node_ids:r,params:i,route:a,server_route:o,data:s,form:c}){ut=!0;let u=new URL(location.href),d;({params:i={},route:a={id:null}}=await Z(u,!1)||{}),d=nt.find(({id:e})=>e===a.id);let f,p=!0;try{let e=r.map(async(t,n)=>{let r=s[n];return r?.uses&&(r.uses=Yt(r.uses)),Et({loader:L.nodes[t],url:u,params:i,route:a,parent:async()=>{let t={};for(let r=0;r<n;r+=1)Object.assign(t,(await e[r]).data);return t},server_data_node:kt(r)})}),o=await Promise.all(e);if(d){let e=d.layouts;for(let t=0;t<e.length;t++)e[t]||o.splice(t,0,void 0)}f=await X({url:u,params:i,branch:o,status:t,error:n,errors:d?.errors,form:c,route:d??null})}catch(t){if(t instanceof l){await P(new URL(t.location,location.href));return}f=await Pt({status:Ve(t),error:await $(t,{url:u,params:i,route:a}),url:u,route:a}),e.textContent=``,p=!1}f.props.page&&(f.props.page.state={}),await Tt(f,e,p)}async function Jt(e,t){let n=new URL(e);n.pathname=Ye(e.pathname),e.pathname.endsWith(`/`)&&n.searchParams.append(Be,`1`),n.searchParams.append(ze,t.map(e=>e?`1`:`0`).join(``));let r=await(0,window.fetch)(n.href,{});if(!r.ok){let e;throw r.headers.get(`content-type`)?.includes(`application/json`)?e=await r.json():r.status===404?e=`Not Found`:r.status===500&&(e=`Internal Error`),new c(r.status,e)}return new Promise(async e=>{let t=new Map,n=r.body.getReader();function i(e){return Fe(e,{...L.decoders,Promise:e=>new Promise((n,r)=>{t.set(e,{fulfil:n,reject:r})})})}let a=``;for(;;){let{done:r,value:o}=await n.read();if(r&&!a)break;for(a+=!o&&a?`
2
- `:g.decode(o,{stream:!0});;){let n=a.indexOf(`
3
- `);if(n===-1)break;let r=JSON.parse(a.slice(0,n));if(a=a.slice(n+1),r.type===`redirect`)return e(r);if(r.type===`data`)r.nodes?.forEach(e=>{e?.type===`data`&&(e.uses=Yt(e.uses),e.data=i(e.data))}),e(r);else if(r.type===`chunk`){let{id:e,data:n,error:a}=r,o=t.get(e);t.delete(e),a?o.reject(i(a)):o.fulfil(i(n))}}}})}function Yt(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}var Xt=!1;function Zt(e,t=!0){let n=document.querySelector(`[autofocus]`);if(n)n.focus();else{let n=tn(e);if(n&&document.getElementById(n)){let{x:r,y:i}=E();setTimeout(()=>{let a=history.state;Xt=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(a,``,e),t&&scrollTo(r,i),Xt=!1})}else{let e=document.body,t=e.getAttribute(`tabindex`);e.tabIndex=-1,e.focus({preventScroll:!0,focusVisible:!1}),t===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,t)}let r=getSelection();if(r&&r.type!==`None`){let e=[];for(let t=0;t<r.rangeCount;t+=1)e.push(r.getRangeAt(t));setTimeout(()=>{if(r.rangeCount===e.length){for(let t=0;t<r.rangeCount;t+=1){let n=e[t],i=r.getRangeAt(t);if(n.commonAncestorContainer!==i.commonAncestorContainer||n.startContainer!==i.startContainer||n.endContainer!==i.endContainer||n.startOffset!==i.startOffset||n.endOffset!==i.endOffset)return}r.removeAllRanges()}})}}}function Qt(e,t,n,r,i=null){let a,o,s=new Promise((e,t)=>{a=e,o=t});return s.catch(h),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:E()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:i},willUnload:!t,type:r,complete:s},fulfil:a,reject:o}}function $t(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function en(e){let t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function tn(e){let t;if(L.hash){let[,,n]=e.hash.split(`#`,3);t=n??``}else t=e.hash.slice(1);return decodeURIComponent(t)}export{gt as a,O as c,De as d,h as f,Ut as i,Ue as l,Wt as n,N as o,Vt as r,k as s,L as t,Pe as u};
@@ -1 +0,0 @@
1
- import"./BPn6xjpy.js";
@@ -1 +0,0 @@
1
- import{a as e,d as t}from"../chunks/BPn6xjpy.js";export{t as load_css,e as start};
@@ -1,9 +0,0 @@
1
- const index = 1;
2
- let component_cache;
3
- const component = async () => component_cache ??= (await import('./error.svelte-BI9UKC3a.js')).default;
4
- const imports = ["_app/immutable/nodes/1.CAVDaxks.js","_app/immutable/chunks/DGftG5oL.js","_app/immutable/chunks/DbccpEZ2.js","_app/immutable/chunks/BPn6xjpy.js","_app/immutable/chunks/B8WnZMYa.js"];
5
- const stylesheets = [];
6
- const fonts = [];
7
-
8
- export { component, fonts, imports, index, stylesheets };
9
- //# sourceMappingURL=1-Cyw2DSw5.js.map