@agent-profile/web 0.1.5 → 0.3.0

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 (258) hide show
  1. package/build/client/_app/immutable/assets/9.BDcQmxob.css +1 -0
  2. package/build/client/_app/immutable/assets/9.BDcQmxob.css.br +0 -0
  3. package/build/client/_app/immutable/assets/9.BDcQmxob.css.gz +0 -0
  4. package/build/client/_app/immutable/chunks/BcMnim1Z.js +2 -0
  5. package/build/client/_app/immutable/chunks/BcMnim1Z.js.br +0 -0
  6. package/build/client/_app/immutable/chunks/BcMnim1Z.js.gz +0 -0
  7. package/build/client/_app/immutable/chunks/D5fBh0I2.js +1 -0
  8. package/build/client/_app/immutable/chunks/D5fBh0I2.js.br +2 -0
  9. package/build/client/_app/immutable/chunks/D5fBh0I2.js.gz +0 -0
  10. package/build/client/_app/immutable/chunks/DJ5W1vn7.js +3 -0
  11. package/build/client/_app/immutable/chunks/DJ5W1vn7.js.br +0 -0
  12. package/build/client/_app/immutable/chunks/DJ5W1vn7.js.gz +0 -0
  13. package/build/client/_app/immutable/chunks/DTBN031P.js +1 -0
  14. package/build/client/_app/immutable/chunks/DTBN031P.js.br +2 -0
  15. package/build/client/_app/immutable/chunks/DTBN031P.js.gz +0 -0
  16. package/build/client/_app/immutable/chunks/D_wMLkFK.js +1 -0
  17. package/build/client/_app/immutable/chunks/D_wMLkFK.js.br +2 -0
  18. package/build/client/_app/immutable/chunks/D_wMLkFK.js.gz +0 -0
  19. package/build/client/_app/immutable/chunks/m4VeB-e-.js +3 -0
  20. package/build/client/_app/immutable/chunks/m4VeB-e-.js.br +0 -0
  21. package/build/client/_app/immutable/chunks/m4VeB-e-.js.gz +0 -0
  22. package/build/client/_app/immutable/entry/app.DMWpO7sJ.js +2 -0
  23. package/build/client/_app/immutable/entry/app.DMWpO7sJ.js.br +0 -0
  24. package/build/client/_app/immutable/entry/app.DMWpO7sJ.js.gz +0 -0
  25. package/build/client/_app/immutable/entry/start.BBaMgJ1R.js +1 -0
  26. package/build/client/_app/immutable/entry/start.BBaMgJ1R.js.br +0 -0
  27. package/build/client/_app/immutable/entry/start.BBaMgJ1R.js.gz +0 -0
  28. package/build/client/_app/immutable/nodes/0.Dv0k2Jqi.js +1 -0
  29. package/build/client/_app/immutable/nodes/0.Dv0k2Jqi.js.br +0 -0
  30. package/build/client/_app/immutable/nodes/0.Dv0k2Jqi.js.gz +0 -0
  31. package/build/client/_app/immutable/nodes/1.E6HqFVj7.js +1 -0
  32. package/build/client/_app/immutable/nodes/1.E6HqFVj7.js.br +0 -0
  33. package/build/client/_app/immutable/nodes/1.E6HqFVj7.js.gz +0 -0
  34. package/build/client/_app/immutable/nodes/10.DorD5wKe.js +3 -0
  35. package/build/client/_app/immutable/nodes/10.DorD5wKe.js.br +0 -0
  36. package/build/client/_app/immutable/nodes/10.DorD5wKe.js.gz +0 -0
  37. package/build/client/_app/immutable/nodes/{10.Bhdlxk-S.js → 11.3lkgWYOd.js} +2 -2
  38. package/build/client/_app/immutable/nodes/11.3lkgWYOd.js.br +0 -0
  39. package/build/client/_app/immutable/nodes/11.3lkgWYOd.js.gz +0 -0
  40. package/build/client/_app/immutable/nodes/12.p6ol8gkx.js +1 -0
  41. package/build/client/_app/immutable/nodes/12.p6ol8gkx.js.br +0 -0
  42. package/build/client/_app/immutable/nodes/12.p6ol8gkx.js.gz +0 -0
  43. package/build/client/_app/immutable/nodes/{2.CI-wpOC8.js → 2.DMK5rlQk.js} +2 -2
  44. package/build/client/_app/immutable/nodes/2.DMK5rlQk.js.br +0 -0
  45. package/build/client/_app/immutable/nodes/2.DMK5rlQk.js.gz +0 -0
  46. package/build/client/_app/immutable/nodes/3.BBvN4Erf.js +2 -0
  47. package/build/client/_app/immutable/nodes/3.BBvN4Erf.js.br +0 -0
  48. package/build/client/_app/immutable/nodes/3.BBvN4Erf.js.gz +0 -0
  49. package/build/client/_app/immutable/nodes/4.3VL8fZOS.js +4 -0
  50. package/build/client/_app/immutable/nodes/4.3VL8fZOS.js.br +0 -0
  51. package/build/client/_app/immutable/nodes/4.3VL8fZOS.js.gz +0 -0
  52. package/build/client/_app/immutable/nodes/5.CiNtblYV.js +2 -0
  53. package/build/client/_app/immutable/nodes/5.CiNtblYV.js.br +0 -0
  54. package/build/client/_app/immutable/nodes/5.CiNtblYV.js.gz +0 -0
  55. package/build/client/_app/immutable/nodes/6.BRCCYakl.js +5 -0
  56. package/build/client/_app/immutable/nodes/6.BRCCYakl.js.br +0 -0
  57. package/build/client/_app/immutable/nodes/6.BRCCYakl.js.gz +0 -0
  58. package/build/client/_app/immutable/nodes/7.Bn-YL1OM.js +4 -0
  59. package/build/client/_app/immutable/nodes/7.Bn-YL1OM.js.br +0 -0
  60. package/build/client/_app/immutable/nodes/7.Bn-YL1OM.js.gz +0 -0
  61. package/build/client/_app/immutable/nodes/8.CkQQuOBs.js +1 -0
  62. package/build/client/_app/immutable/nodes/8.CkQQuOBs.js.br +0 -0
  63. package/build/client/_app/immutable/nodes/8.CkQQuOBs.js.gz +0 -0
  64. package/build/client/_app/immutable/nodes/9.6KxRZbKJ.js +9 -0
  65. package/build/client/_app/immutable/nodes/9.6KxRZbKJ.js.br +0 -0
  66. package/build/client/_app/immutable/nodes/9.6KxRZbKJ.js.gz +0 -0
  67. package/build/client/_app/version.json +1 -1
  68. package/build/client/_app/version.json.br +0 -0
  69. package/build/client/_app/version.json.gz +0 -0
  70. package/build/server/chunks/{0-DWEpTDaF.js → 0-D1xG012U.js} +8 -8
  71. package/build/server/chunks/{0-DWEpTDaF.js.map → 0-D1xG012U.js.map} +1 -1
  72. package/build/server/chunks/1-B1kTzRNn.js +9 -0
  73. package/build/server/chunks/{1-B68UkVTE.js.map → 1-B1kTzRNn.js.map} +1 -1
  74. package/build/server/chunks/{9-tHCipeiW.js → 10-DahfOzGu.js} +7 -7
  75. package/build/server/chunks/10-DahfOzGu.js.map +1 -0
  76. package/build/server/chunks/11-mzYblRmm.js +9 -0
  77. package/build/server/chunks/11-mzYblRmm.js.map +1 -0
  78. package/build/server/chunks/{11-Ms74wtl9.js → 12-Dw1Y6Xen.js} +5 -5
  79. package/build/server/chunks/{11-Ms74wtl9.js.map → 12-Dw1Y6Xen.js.map} +1 -1
  80. package/build/server/chunks/{2-bmpngDVe.js → 2-Cbd6Pglj.js} +3 -3
  81. package/build/server/chunks/{2-bmpngDVe.js.map → 2-Cbd6Pglj.js.map} +1 -1
  82. package/build/server/chunks/3-DjAsck26.js +9 -0
  83. package/build/server/chunks/{3-BkezOAX7.js.map → 3-DjAsck26.js.map} +1 -1
  84. package/build/server/chunks/{4-CSfQwQwV.js → 4-CKQYCTZo.js} +5 -5
  85. package/build/server/chunks/{4-CSfQwQwV.js.map → 4-CKQYCTZo.js.map} +1 -1
  86. package/build/server/chunks/5-BDp1sX0Q.js +9 -0
  87. package/build/server/chunks/{5-D_pZV4fS.js.map → 5-BDp1sX0Q.js.map} +1 -1
  88. package/build/server/chunks/6-CUIuzy6O.js +9 -0
  89. package/build/server/chunks/{6-DcbRMrH1.js.map → 6-CUIuzy6O.js.map} +1 -1
  90. package/build/server/chunks/{7-BsMFIBGU.js → 7-BDv5_nF1.js} +6 -6
  91. package/build/server/chunks/{7-BsMFIBGU.js.map → 7-BDv5_nF1.js.map} +1 -1
  92. package/build/server/chunks/8-CspJz0xl.js +9 -0
  93. package/build/server/chunks/{8-DWleYW_e.js.map → 8-CspJz0xl.js.map} +1 -1
  94. package/build/server/chunks/9-BpgaO-rd.js +33 -0
  95. package/build/server/chunks/9-BpgaO-rd.js.map +1 -0
  96. package/build/server/chunks/{Badge-BYK3z3lr.js → Badge-DCQxSQCS.js} +2 -2
  97. package/build/server/chunks/{Badge-BYK3z3lr.js.map → Badge-DCQxSQCS.js.map} +1 -1
  98. package/build/server/chunks/{SafetyBadge-BXNCgLE-.js → SafetyBadge-BxEGojgX.js} +2 -2
  99. package/build/server/chunks/{SafetyBadge-BXNCgLE-.js.map → SafetyBadge-BxEGojgX.js.map} +1 -1
  100. package/build/server/chunks/{_layout.svelte-Cv35k3JT.js → _layout.svelte-6X0-Uv9x.js} +15 -5
  101. package/build/server/chunks/_layout.svelte-6X0-Uv9x.js.map +1 -0
  102. package/build/server/chunks/{_page.svelte-BftcSD3f.js → _page.svelte-1wUrXGW-.js} +3 -3
  103. package/build/server/chunks/{_page.svelte-BftcSD3f.js.map → _page.svelte-1wUrXGW-.js.map} +1 -1
  104. package/build/server/chunks/{_page.svelte-B-Kaw1RF.js → _page.svelte-B3CasgD8.js} +2 -2
  105. package/build/server/chunks/{_page.svelte-B-Kaw1RF.js.map → _page.svelte-B3CasgD8.js.map} +1 -1
  106. package/build/server/chunks/_page.svelte-BEU4JrAd.js +433 -0
  107. package/build/server/chunks/_page.svelte-BEU4JrAd.js.map +1 -0
  108. package/build/server/chunks/{_page.svelte-Cat8tEeF.js → _page.svelte-Bi4xsxv7.js} +4 -4
  109. package/build/server/chunks/{_page.svelte-Cat8tEeF.js.map → _page.svelte-Bi4xsxv7.js.map} +1 -1
  110. package/build/server/chunks/{_page.svelte-CIEY8g8A.js → _page.svelte-BikYFdJv.js} +4 -4
  111. package/build/server/chunks/{_page.svelte-CIEY8g8A.js.map → _page.svelte-BikYFdJv.js.map} +1 -1
  112. package/build/server/chunks/{_page.svelte-CmuUQI4Y.js → _page.svelte-Bx-fv-rO.js} +43 -20
  113. package/build/server/chunks/_page.svelte-Bx-fv-rO.js.map +1 -0
  114. package/build/server/chunks/{_page.svelte-DZX4Bixr.js → _page.svelte-CveCaqpY.js} +5 -5
  115. package/build/server/chunks/{_page.svelte-DZX4Bixr.js.map → _page.svelte-CveCaqpY.js.map} +1 -1
  116. package/build/server/chunks/{_page.svelte-DyI46sDh.js → _page.svelte-D8ffqrO3.js} +3 -3
  117. package/build/server/chunks/{_page.svelte-DyI46sDh.js.map → _page.svelte-D8ffqrO3.js.map} +1 -1
  118. package/build/server/chunks/{_page.svelte-DLQqGym0.js → _page.svelte-DNmC-yjw.js} +4 -4
  119. package/build/server/chunks/{_page.svelte-DLQqGym0.js.map → _page.svelte-DNmC-yjw.js.map} +1 -1
  120. package/build/server/chunks/{_page.svelte-DHNevyzi.js → _page.svelte-wL3fdD1l.js} +4 -4
  121. package/build/server/chunks/{_page.svelte-DHNevyzi.js.map → _page.svelte-wL3fdD1l.js.map} +1 -1
  122. package/build/server/chunks/{_page.svelte-CUnw0pLx.js → _page.svelte-xTZOj1o8.js} +3 -3
  123. package/build/server/chunks/{_page.svelte-CUnw0pLx.js.map → _page.svelte-xTZOj1o8.js.map} +1 -1
  124. package/build/server/chunks/_server.ts-BBDD0W6t.js +167 -0
  125. package/build/server/chunks/_server.ts-BBDD0W6t.js.map +1 -0
  126. package/build/server/chunks/_server.ts-BkOJmVFg.js +101 -0
  127. package/build/server/chunks/_server.ts-BkOJmVFg.js.map +1 -0
  128. package/build/server/chunks/{_server.ts-BUQYdxPs.js → _server.ts-BkcLO56D.js} +2 -2
  129. package/build/server/chunks/{_server.ts-BUQYdxPs.js.map → _server.ts-BkcLO56D.js.map} +1 -1
  130. package/build/server/chunks/{_server.ts-Dq1jAomo.js → _server.ts-C2WpZqPW.js} +4 -4
  131. package/build/server/chunks/{_server.ts-Dq1jAomo.js.map → _server.ts-C2WpZqPW.js.map} +1 -1
  132. package/build/server/chunks/{_server.ts-5396UuLQ.js → _server.ts-CKn8ym8s.js} +2 -2
  133. package/build/server/chunks/{_server.ts-5396UuLQ.js.map → _server.ts-CKn8ym8s.js.map} +1 -1
  134. package/build/server/chunks/{_server.ts-DHt1bGpF.js → _server.ts-CaVH9FSD.js} +4 -4
  135. package/build/server/chunks/{_server.ts-DHt1bGpF.js.map → _server.ts-CaVH9FSD.js.map} +1 -1
  136. package/build/server/chunks/_server.ts-D7iLlRbM.js +337 -0
  137. package/build/server/chunks/_server.ts-D7iLlRbM.js.map +1 -0
  138. package/build/server/chunks/_server.ts-DPqZOGG_.js +18 -0
  139. package/build/server/chunks/_server.ts-DPqZOGG_.js.map +1 -0
  140. package/build/server/chunks/{_server.ts-sMKRiXFg.js → _server.ts-Dz9oKgWc.js} +5 -5
  141. package/build/server/chunks/{_server.ts-sMKRiXFg.js.map → _server.ts-Dz9oKgWc.js.map} +1 -1
  142. package/build/server/chunks/{_server.ts-CvdpZfED.js → _server.ts-fVP0SuTW.js} +2 -2
  143. package/build/server/chunks/{_server.ts-CvdpZfED.js.map → _server.ts-fVP0SuTW.js.map} +1 -1
  144. package/build/server/chunks/{client-92HF3fc9.js → client-CydontyB.js} +3 -3
  145. package/build/server/chunks/{client-92HF3fc9.js.map → client-CydontyB.js.map} +1 -1
  146. package/build/server/chunks/{dev-Duv_-rxF.js → dev-BdIdjvaY.js} +216 -82
  147. package/build/server/chunks/dev-BdIdjvaY.js.map +1 -0
  148. package/build/server/chunks/{doctorSummary-Bm0dY6PW.js → doctorSummary-BOtGdd9z.js} +3 -3
  149. package/build/server/chunks/{doctorSummary-Bm0dY6PW.js.map → doctorSummary-BOtGdd9z.js.map} +1 -1
  150. package/build/server/chunks/{error.svelte-BEI8QxGW.js → error.svelte-_CDx8UPv.js} +4 -4
  151. package/build/server/chunks/{error.svelte-BEI8QxGW.js.map → error.svelte-_CDx8UPv.js.map} +1 -1
  152. package/build/server/chunks/{hooks.server-BKavEpqC.js → hooks.server-Dva4z7fv.js} +35 -1
  153. package/build/server/chunks/hooks.server-Dva4z7fv.js.map +1 -0
  154. package/build/server/chunks/{internal-DBeni9My.js → internal-DyPeC3rk.js} +21 -16
  155. package/build/server/chunks/internal-DyPeC3rk.js.map +1 -0
  156. package/build/server/chunks/{marketingSeo-Do5o0grg.js → marketingSeo-CugwK52J.js} +2 -2
  157. package/build/server/chunks/{marketingSeo-Do5o0grg.js.map → marketingSeo-CugwK52J.js.map} +1 -1
  158. package/build/server/chunks/migrationReport-f6NoxAVZ.js +40 -0
  159. package/build/server/chunks/migrationReport-f6NoxAVZ.js.map +1 -0
  160. package/build/server/chunks/{profileApiHelpers-BFzohffv.js → profileApiHelpers-DCoI7zMU.js} +3 -3
  161. package/build/server/chunks/{profileApiHelpers-BFzohffv.js.map → profileApiHelpers-DCoI7zMU.js.map} +1 -1
  162. package/build/server/chunks/{projectContext-Cxsfz84C.js → projectContext-B1D-bieW.js} +2439 -127
  163. package/build/server/chunks/projectContext-B1D-bieW.js.map +1 -0
  164. package/build/server/chunks/{src2-DNqJAXv6.js → src2-BtraGDB1.js} +2 -2
  165. package/build/server/chunks/src2-BtraGDB1.js.map +1 -0
  166. package/build/server/chunks/{src3-jm480tTA.js → src3-BXch_OaJ.js} +347 -10
  167. package/build/server/chunks/src3-BXch_OaJ.js.map +1 -0
  168. package/build/server/chunks/{tokenStore-DQfTa-N3.js → tokenStore-CTHhmHsk.js} +30 -2
  169. package/build/server/chunks/tokenStore-CTHhmHsk.js.map +1 -0
  170. package/build/server/index.js +4 -5
  171. package/build/server/index.js.map +1 -1
  172. package/build/server/manifest.js +58 -22
  173. package/build/server/manifest.js.map +1 -1
  174. package/package.json +7 -7
  175. package/build/client/_app/immutable/chunks/6SrQtk22.js +0 -3
  176. package/build/client/_app/immutable/chunks/6SrQtk22.js.br +0 -0
  177. package/build/client/_app/immutable/chunks/6SrQtk22.js.gz +0 -0
  178. package/build/client/_app/immutable/chunks/B1X0Iqjr.js +0 -3
  179. package/build/client/_app/immutable/chunks/B1X0Iqjr.js.br +0 -0
  180. package/build/client/_app/immutable/chunks/B1X0Iqjr.js.gz +0 -0
  181. package/build/client/_app/immutable/chunks/BN4Ca4cJ.js +0 -1
  182. package/build/client/_app/immutable/chunks/BN4Ca4cJ.js.br +0 -0
  183. package/build/client/_app/immutable/chunks/BN4Ca4cJ.js.gz +0 -0
  184. package/build/client/_app/immutable/chunks/BYeYmN2n.js +0 -1
  185. package/build/client/_app/immutable/chunks/BYeYmN2n.js.br +0 -2
  186. package/build/client/_app/immutable/chunks/BYeYmN2n.js.gz +0 -0
  187. package/build/client/_app/immutable/chunks/D0_SwbnT.js +0 -2
  188. package/build/client/_app/immutable/chunks/D0_SwbnT.js.br +0 -0
  189. package/build/client/_app/immutable/chunks/D0_SwbnT.js.gz +0 -0
  190. package/build/client/_app/immutable/chunks/DRoN73NW.js +0 -1
  191. package/build/client/_app/immutable/chunks/DRoN73NW.js.br +0 -2
  192. package/build/client/_app/immutable/chunks/DRoN73NW.js.gz +0 -0
  193. package/build/client/_app/immutable/entry/app.B45QQayJ.js +0 -2
  194. package/build/client/_app/immutable/entry/app.B45QQayJ.js.br +0 -0
  195. package/build/client/_app/immutable/entry/app.B45QQayJ.js.gz +0 -0
  196. package/build/client/_app/immutable/entry/start.BIlQ_snM.js +0 -1
  197. package/build/client/_app/immutable/entry/start.BIlQ_snM.js.br +0 -0
  198. package/build/client/_app/immutable/entry/start.BIlQ_snM.js.gz +0 -0
  199. package/build/client/_app/immutable/nodes/0.JRffyfUR.js +0 -1
  200. package/build/client/_app/immutable/nodes/0.JRffyfUR.js.br +0 -0
  201. package/build/client/_app/immutable/nodes/0.JRffyfUR.js.gz +0 -0
  202. package/build/client/_app/immutable/nodes/1.56EgwKsF.js +0 -1
  203. package/build/client/_app/immutable/nodes/1.56EgwKsF.js.br +0 -0
  204. package/build/client/_app/immutable/nodes/1.56EgwKsF.js.gz +0 -0
  205. package/build/client/_app/immutable/nodes/10.Bhdlxk-S.js.br +0 -0
  206. package/build/client/_app/immutable/nodes/10.Bhdlxk-S.js.gz +0 -0
  207. package/build/client/_app/immutable/nodes/11.DAqRx2TI.js +0 -1
  208. package/build/client/_app/immutable/nodes/11.DAqRx2TI.js.br +0 -0
  209. package/build/client/_app/immutable/nodes/11.DAqRx2TI.js.gz +0 -0
  210. package/build/client/_app/immutable/nodes/2.CI-wpOC8.js.br +0 -0
  211. package/build/client/_app/immutable/nodes/2.CI-wpOC8.js.gz +0 -0
  212. package/build/client/_app/immutable/nodes/3.Bphawycs.js +0 -2
  213. package/build/client/_app/immutable/nodes/3.Bphawycs.js.br +0 -0
  214. package/build/client/_app/immutable/nodes/3.Bphawycs.js.gz +0 -0
  215. package/build/client/_app/immutable/nodes/4.BGFkNM65.js +0 -4
  216. package/build/client/_app/immutable/nodes/4.BGFkNM65.js.br +0 -0
  217. package/build/client/_app/immutable/nodes/4.BGFkNM65.js.gz +0 -0
  218. package/build/client/_app/immutable/nodes/5.VTs5grF0.js +0 -2
  219. package/build/client/_app/immutable/nodes/5.VTs5grF0.js.br +0 -0
  220. package/build/client/_app/immutable/nodes/5.VTs5grF0.js.gz +0 -0
  221. package/build/client/_app/immutable/nodes/6.CndSdLIk.js +0 -5
  222. package/build/client/_app/immutable/nodes/6.CndSdLIk.js.br +0 -0
  223. package/build/client/_app/immutable/nodes/6.CndSdLIk.js.gz +0 -0
  224. package/build/client/_app/immutable/nodes/7.DpFk4StA.js +0 -4
  225. package/build/client/_app/immutable/nodes/7.DpFk4StA.js.br +0 -0
  226. package/build/client/_app/immutable/nodes/7.DpFk4StA.js.gz +0 -0
  227. package/build/client/_app/immutable/nodes/8.Y7A99ODL.js +0 -1
  228. package/build/client/_app/immutable/nodes/8.Y7A99ODL.js.br +0 -0
  229. package/build/client/_app/immutable/nodes/8.Y7A99ODL.js.gz +0 -0
  230. package/build/client/_app/immutable/nodes/9.DF3LeTGi.js +0 -3
  231. package/build/client/_app/immutable/nodes/9.DF3LeTGi.js.br +0 -0
  232. package/build/client/_app/immutable/nodes/9.DF3LeTGi.js.gz +0 -0
  233. package/build/server/chunks/1-B68UkVTE.js +0 -9
  234. package/build/server/chunks/10-D7op0myD.js +0 -9
  235. package/build/server/chunks/10-D7op0myD.js.map +0 -1
  236. package/build/server/chunks/3-BkezOAX7.js +0 -9
  237. package/build/server/chunks/5-D_pZV4fS.js +0 -9
  238. package/build/server/chunks/6-DcbRMrH1.js +0 -9
  239. package/build/server/chunks/8-DWleYW_e.js +0 -9
  240. package/build/server/chunks/9-tHCipeiW.js.map +0 -1
  241. package/build/server/chunks/_layout.svelte-Cv35k3JT.js.map +0 -1
  242. package/build/server/chunks/_page.svelte-CmuUQI4Y.js.map +0 -1
  243. package/build/server/chunks/dev-Duv_-rxF.js.map +0 -1
  244. package/build/server/chunks/hooks.server-BKavEpqC.js.map +0 -1
  245. package/build/server/chunks/internal-DBeni9My.js.map +0 -1
  246. package/build/server/chunks/projectContext-Cxsfz84C.js.map +0 -1
  247. package/build/server/chunks/src2-DNqJAXv6.js.map +0 -1
  248. package/build/server/chunks/src3-jm480tTA.js.map +0 -1
  249. package/build/server/chunks/tokenStore-DQfTa-N3.js.map +0 -1
  250. /package/build/client/_app/immutable/assets/{9.BsbC-D7w.css → 10.BsbC-D7w.css} +0 -0
  251. /package/build/client/_app/immutable/assets/{9.BsbC-D7w.css.br → 10.BsbC-D7w.css.br} +0 -0
  252. /package/build/client/_app/immutable/assets/{9.BsbC-D7w.css.gz → 10.BsbC-D7w.css.gz} +0 -0
  253. /package/build/client/_app/immutable/chunks/{I8rQr1kY.js → CP97kCR3.js} +0 -0
  254. /package/build/client/_app/immutable/chunks/{I8rQr1kY.js.br → CP97kCR3.js.br} +0 -0
  255. /package/build/client/_app/immutable/chunks/{I8rQr1kY.js.gz → CP97kCR3.js.gz} +0 -0
  256. /package/build/client/_app/immutable/chunks/{BFYQcBYR.js → O6-aNYLC.js} +0 -0
  257. /package/build/client/_app/immutable/chunks/{BFYQcBYR.js.br → O6-aNYLC.js.br} +0 -0
  258. /package/build/client/_app/immutable/chunks/{BFYQcBYR.js.gz → O6-aNYLC.js.gz} +0 -0
@@ -0,0 +1,101 @@
1
+ import { r as resolveProjectRoot, a as applyWritePlan } from './projectContext-B1D-bieW.js';
2
+ import { r as runDoctor } from './src3-BXch_OaJ.js';
3
+ import { r as readJsonRequestBody } from './profileApiHelpers-DCoI7zMU.js';
4
+ import { v as verifyCsrfToken, l as lookupMigrationPlan, c as consumeMigrationPlan } from './tokenStore-CTHhmHsk.js';
5
+ import { j as json } from './index-CLnuRv4X.js';
6
+ import 'node:fs/promises';
7
+ import 'process';
8
+ import 'buffer';
9
+ import 'node:util';
10
+ import 'node:path';
11
+ import 'node:crypto';
12
+ import 'diff';
13
+ import './index-DBqjc0Yf.js';
14
+
15
+ //#region src/routes/api/migration/apply/+server.ts
16
+ var POST = async ({ request }) => {
17
+ if (!verifyCsrfToken(request.headers.get("x-csrf-token"))) return json({ error: "csrf_failed" }, { status: 403 });
18
+ if (!(request.headers.get("content-type") ?? "").includes("application/json")) return json({ error: "unsupported_media_type" }, { status: 415 });
19
+ const parsed = await readJsonRequestBody(request);
20
+ if (!parsed.ok) return json({
21
+ error: parsed.error,
22
+ message: parsed.message
23
+ }, { status: parsed.status });
24
+ const body = parsed.body;
25
+ if (!isRecord(body) || typeof body.planToken !== "string") return json({
26
+ error: "invalid_request",
27
+ message: "Missing `planToken`."
28
+ }, { status: 400 });
29
+ const peeked = lookupMigrationPlan(body.planToken);
30
+ if (!peeked) return json({
31
+ error: "plan_expired",
32
+ message: "Migration plan token has expired or is unknown."
33
+ }, { status: 410 });
34
+ if (peeked.requiresReplaceConfirmation && body.confirmReplace !== true) return json({
35
+ error: "confirm_replace_required",
36
+ message: "This plan touches generated-owned files. Re-issue apply with confirmReplace:true."
37
+ }, { status: 412 });
38
+ const entry = consumeMigrationPlan(body.planToken);
39
+ if (!entry) return json({
40
+ error: "plan_expired",
41
+ message: "Migration plan token expired while applying."
42
+ }, { status: 410 });
43
+ let serialized;
44
+ try {
45
+ serialized = JSON.parse(entry.serializedPlan);
46
+ } catch {
47
+ return json({
48
+ error: "plan_corrupted",
49
+ message: "Stored plan could not be decoded."
50
+ }, { status: 500 });
51
+ }
52
+ if (!serialized || !Array.isArray(serialized.writes)) return json({
53
+ error: "plan_corrupted",
54
+ message: "Stored plan has no writes."
55
+ }, { status: 500 });
56
+ const writes = serialized.writes.map((w) => ({
57
+ path: w.path,
58
+ bytes: Buffer.from(w.bytesBase64, "base64")
59
+ }));
60
+ const rootDir = resolveProjectRoot();
61
+ let writeResult;
62
+ try {
63
+ writeResult = await applyWritePlan({
64
+ rootDir,
65
+ writes
66
+ });
67
+ } catch (err) {
68
+ return json({
69
+ error: "write_failed",
70
+ message: err instanceof Error ? err.message : "unknown write error"
71
+ }, { status: 422 });
72
+ }
73
+ let doctor;
74
+ try {
75
+ doctor = await runDoctor({ rootDir });
76
+ } catch (err) {
77
+ return json({
78
+ counts: writeResult.counts,
79
+ writes: writeResult.actions,
80
+ doctor: {
81
+ ok: false,
82
+ message: err instanceof Error ? err.message : "doctor failed"
83
+ }
84
+ }, { status: 200 });
85
+ }
86
+ return json({
87
+ counts: writeResult.counts,
88
+ writes: writeResult.actions,
89
+ doctor: {
90
+ ok: true,
91
+ status: doctor.status,
92
+ issues: doctor.issues
93
+ }
94
+ });
95
+ };
96
+ function isRecord(v) {
97
+ return typeof v === "object" && v !== null && !Array.isArray(v);
98
+ }
99
+
100
+ export { POST };
101
+ //# sourceMappingURL=_server.ts-BkOJmVFg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_server.ts-BkOJmVFg.js","sources":["../../../.svelte-kit/adapter-node/entries/endpoints/api/migration/apply/_server.ts.js"],"sourcesContent":["import { p as applyWritePlan, r as resolveProjectRoot } from \"../../../../../chunks/projectContext.js\";\nimport { t as runDoctor } from \"../../../../../chunks/src3.js\";\nimport { r as readJsonRequestBody } from \"../../../../../chunks/profileApiHelpers.js\";\nimport { i as lookupMigrationPlan, s as verifyCsrfToken, t as consumeMigrationPlan } from \"../../../../../chunks/tokenStore.js\";\nimport { json } from \"@sveltejs/kit\";\n//#region src/routes/api/migration/apply/+server.ts\nvar POST = async ({ request }) => {\n\tif (!verifyCsrfToken(request.headers.get(\"x-csrf-token\"))) return json({ error: \"csrf_failed\" }, { status: 403 });\n\tif (!(request.headers.get(\"content-type\") ?? \"\").includes(\"application/json\")) return json({ error: \"unsupported_media_type\" }, { status: 415 });\n\tconst parsed = await readJsonRequestBody(request);\n\tif (!parsed.ok) return json({\n\t\terror: parsed.error,\n\t\tmessage: parsed.message\n\t}, { status: parsed.status });\n\tconst body = parsed.body;\n\tif (!isRecord(body) || typeof body.planToken !== \"string\") return json({\n\t\terror: \"invalid_request\",\n\t\tmessage: \"Missing `planToken`.\"\n\t}, { status: 400 });\n\tconst peeked = lookupMigrationPlan(body.planToken);\n\tif (!peeked) return json({\n\t\terror: \"plan_expired\",\n\t\tmessage: \"Migration plan token has expired or is unknown.\"\n\t}, { status: 410 });\n\tif (peeked.requiresReplaceConfirmation && body.confirmReplace !== true) return json({\n\t\terror: \"confirm_replace_required\",\n\t\tmessage: \"This plan touches generated-owned files. Re-issue apply with confirmReplace:true.\"\n\t}, { status: 412 });\n\tconst entry = consumeMigrationPlan(body.planToken);\n\tif (!entry) return json({\n\t\terror: \"plan_expired\",\n\t\tmessage: \"Migration plan token expired while applying.\"\n\t}, { status: 410 });\n\tlet serialized;\n\ttry {\n\t\tserialized = JSON.parse(entry.serializedPlan);\n\t} catch {\n\t\treturn json({\n\t\t\terror: \"plan_corrupted\",\n\t\t\tmessage: \"Stored plan could not be decoded.\"\n\t\t}, { status: 500 });\n\t}\n\tif (!serialized || !Array.isArray(serialized.writes)) return json({\n\t\terror: \"plan_corrupted\",\n\t\tmessage: \"Stored plan has no writes.\"\n\t}, { status: 500 });\n\tconst writes = serialized.writes.map((w) => ({\n\t\tpath: w.path,\n\t\tbytes: Buffer.from(w.bytesBase64, \"base64\")\n\t}));\n\tconst rootDir = resolveProjectRoot();\n\tlet writeResult;\n\ttry {\n\t\twriteResult = await applyWritePlan({\n\t\t\trootDir,\n\t\t\twrites\n\t\t});\n\t} catch (err) {\n\t\treturn json({\n\t\t\terror: \"write_failed\",\n\t\t\tmessage: err instanceof Error ? err.message : \"unknown write error\"\n\t\t}, { status: 422 });\n\t}\n\tlet doctor;\n\ttry {\n\t\tdoctor = await runDoctor({ rootDir });\n\t} catch (err) {\n\t\treturn json({\n\t\t\tcounts: writeResult.counts,\n\t\t\twrites: writeResult.actions,\n\t\t\tdoctor: {\n\t\t\t\tok: false,\n\t\t\t\tmessage: err instanceof Error ? err.message : \"doctor failed\"\n\t\t\t}\n\t\t}, { status: 200 });\n\t}\n\treturn json({\n\t\tcounts: writeResult.counts,\n\t\twrites: writeResult.actions,\n\t\tdoctor: {\n\t\t\tok: true,\n\t\t\tstatus: doctor.status,\n\t\t\tissues: doctor.issues\n\t\t}\n\t});\n};\nfunction isRecord(v) {\n\treturn typeof v === \"object\" && v !== null && !Array.isArray(v);\n}\n//#endregion\nexport { POST };\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAKA;AACG,IAAC,IAAI,GAAG,OAAO,EAAE,OAAO,EAAE,KAAK;AAClC,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,EAAE,OAAO,IAAI,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AAClH,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,IAAI,CAAC,EAAE,KAAK,EAAE,wBAAwB,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AACjJ,CAAC,MAAM,MAAM,GAAG,MAAM,mBAAmB,CAAC,OAAO,CAAC;AAClD,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,IAAI,CAAC;AAC7B,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK;AACrB,EAAE,OAAO,EAAE,MAAM,CAAC;AAClB,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;AAC9B,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI;AACzB,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,OAAO,IAAI,CAAC,SAAS,KAAK,QAAQ,EAAE,OAAO,IAAI,CAAC;AACxE,EAAE,KAAK,EAAE,iBAAiB;AAC1B,EAAE,OAAO,EAAE;AACX,EAAE,EAAE,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GAAG,EAAE,EAAE,IAAI;AACX,GAAG,MAAM,EAAE,MAAM,CAAC,MAAM;AACxB,GAAG,MAAM,EAAE,MAAM,CAAC;AAClB;AACA,EAAE,CAAC;AACH;AACA,SAAS,QAAQ,CAAC,CAAC,EAAE;AACrB,CAAC,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AAChE;;;;"}
@@ -1,8 +1,8 @@
1
- import { a as buildRobotsTxt } from './marketingSeo-Do5o0grg.js';
1
+ import { a as buildRobotsTxt } from './marketingSeo-CugwK52J.js';
2
2
 
3
3
  //#region src/routes/robots.txt/+server.ts
4
4
  var prerender = process.env.AGENT_PROFILE_MARKETING_BUILD === "1";
5
5
  var GET = () => new Response(buildRobotsTxt(), { headers: { "content-type": "text/plain; charset=utf-8" } });
6
6
 
7
7
  export { GET, prerender };
8
- //# sourceMappingURL=_server.ts-BUQYdxPs.js.map
8
+ //# sourceMappingURL=_server.ts-BkcLO56D.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"_server.ts-BUQYdxPs.js","sources":["../../../.svelte-kit/adapter-node/entries/endpoints/robots.txt/_server.ts.js"],"sourcesContent":["import { n as buildRobotsTxt } from \"../../../chunks/marketingSeo.js\";\n//#region src/routes/robots.txt/+server.ts\nvar prerender = process.env.AGENT_PROFILE_MARKETING_BUILD === \"1\";\nvar GET = () => new Response(buildRobotsTxt(), { headers: { \"content-type\": \"text/plain; charset=utf-8\" } });\n//#endregion\nexport { GET, prerender };\n"],"names":[],"mappings":";;AACA;AACG,IAAC,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,6BAA6B,KAAK;AAC3D,IAAC,GAAG,GAAG,MAAM,IAAI,QAAQ,CAAC,cAAc,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,cAAc,EAAE,2BAA2B,EAAE,EAAE;;;;"}
1
+ {"version":3,"file":"_server.ts-BkcLO56D.js","sources":["../../../.svelte-kit/adapter-node/entries/endpoints/robots.txt/_server.ts.js"],"sourcesContent":["import { n as buildRobotsTxt } from \"../../../chunks/marketingSeo.js\";\n//#region src/routes/robots.txt/+server.ts\nvar prerender = process.env.AGENT_PROFILE_MARKETING_BUILD === \"1\";\nvar GET = () => new Response(buildRobotsTxt(), { headers: { \"content-type\": \"text/plain; charset=utf-8\" } });\n//#endregion\nexport { GET, prerender };\n"],"names":[],"mappings":";;AACA;AACG,IAAC,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,6BAA6B,KAAK;AAC3D,IAAC,GAAG,GAAG,MAAM,IAAI,QAAQ,CAAC,cAAc,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,cAAc,EAAE,2BAA2B,EAAE,EAAE;;;;"}
@@ -1,6 +1,6 @@
1
- import { l as loadProjectContext } from './projectContext-Cxsfz84C.js';
2
- import { r as readDiskProfile } from './profileApiHelpers-BFzohffv.js';
3
- import { i as issueCsrfToken } from './tokenStore-DQfTa-N3.js';
1
+ import { z as loadProjectContext } from './projectContext-B1D-bieW.js';
2
+ import { a as readDiskProfile } from './profileApiHelpers-DCoI7zMU.js';
3
+ import { i as issueCsrfToken } from './tokenStore-CTHhmHsk.js';
4
4
  import { j as json } from './index-CLnuRv4X.js';
5
5
  import 'node:fs/promises';
6
6
  import 'process';
@@ -40,4 +40,4 @@ var GET = async () => {
40
40
  };
41
41
 
42
42
  export { GET };
43
- //# sourceMappingURL=_server.ts-Dq1jAomo.js.map
43
+ //# sourceMappingURL=_server.ts-C2WpZqPW.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"_server.ts-Dq1jAomo.js","sources":["../../../.svelte-kit/adapter-node/entries/endpoints/api/profile/_server.ts.js"],"sourcesContent":["import { t as loadProjectContext } from \"../../../../chunks/projectContext.js\";\nimport { n as readDiskProfile } from \"../../../../chunks/profileApiHelpers.js\";\nimport { n as issueCsrfToken } from \"../../../../chunks/tokenStore.js\";\nimport { json } from \"@sveltejs/kit\";\n//#region src/routes/api/profile/+server.ts\nvar GET = async () => {\n\tconst disk = await readDiskProfile((await loadProjectContext()).rootDir);\n\tconst csrfToken = issueCsrfToken();\n\tif (!disk.ok) {\n\t\tif (disk.reason === \"not_found\") return json({\n\t\t\terror: \"file_not_found\",\n\t\t\tmessage: \"ai-profile.yaml not found; run agent-profile init --write.\"\n\t\t}, { status: 404 });\n\t\treturn json({\n\t\t\terror: \"invalid_profile\",\n\t\t\tissues: disk.issues,\n\t\t\tunsupportedEditing: disk.unsupportedEditing,\n\t\t\tetag: disk.etag ?? null,\n\t\t\tcsrfToken\n\t\t}, { status: 422 });\n\t}\n\treturn json({\n\t\tprofile: disk.profile,\n\t\tsafety: disk.safety,\n\t\teffectivePermissions: disk.effectivePermissions,\n\t\tbytes: disk.bytes.length,\n\t\tetag: disk.etag,\n\t\tcsrfToken,\n\t\tprofilePath: \"ai-profile.yaml\"\n\t});\n};\n//#endregion\nexport { GET };\n"],"names":[],"mappings":";;;;;;;;;;;;;AAIA;AACG,IAAC,GAAG,GAAG,YAAY;AACtB,CAAC,MAAM,IAAI,GAAG,MAAM,eAAe,CAAC,CAAC,MAAM,kBAAkB,EAAE,EAAE,OAAO,CAAC;AACzE,CAAC,MAAM,SAAS,GAAG,cAAc,EAAE;AACnC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;AACf,EAAE,IAAI,IAAI,CAAC,MAAM,KAAK,WAAW,EAAE,OAAO,IAAI,CAAC;AAC/C,GAAG,KAAK,EAAE,gBAAgB;AAC1B,GAAG,OAAO,EAAE;AACZ,GAAG,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AACrB,EAAE,OAAO,IAAI,CAAC;AACd,GAAG,KAAK,EAAE,iBAAiB;AAC3B,GAAG,MAAM,EAAE,IAAI,CAAC,MAAM;AACtB,GAAG,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;AAC9C,GAAG,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI;AAC1B,GAAG;AACH,GAAG,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AACrB,CAAC;AACD,CAAC,OAAO,IAAI,CAAC;AACb,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO;AACvB,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM;AACrB,EAAE,oBAAoB,EAAE,IAAI,CAAC,oBAAoB;AACjD,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;AAC1B,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI;AACjB,EAAE,SAAS;AACX,EAAE,WAAW,EAAE;AACf,EAAE,CAAC;AACH;;;;"}
1
+ {"version":3,"file":"_server.ts-C2WpZqPW.js","sources":["../../../.svelte-kit/adapter-node/entries/endpoints/api/profile/_server.ts.js"],"sourcesContent":["import { t as loadProjectContext } from \"../../../../chunks/projectContext.js\";\nimport { n as readDiskProfile } from \"../../../../chunks/profileApiHelpers.js\";\nimport { r as issueCsrfToken } from \"../../../../chunks/tokenStore.js\";\nimport { json } from \"@sveltejs/kit\";\n//#region src/routes/api/profile/+server.ts\nvar GET = async () => {\n\tconst disk = await readDiskProfile((await loadProjectContext()).rootDir);\n\tconst csrfToken = issueCsrfToken();\n\tif (!disk.ok) {\n\t\tif (disk.reason === \"not_found\") return json({\n\t\t\terror: \"file_not_found\",\n\t\t\tmessage: \"ai-profile.yaml not found; run agent-profile init --write.\"\n\t\t}, { status: 404 });\n\t\treturn json({\n\t\t\terror: \"invalid_profile\",\n\t\t\tissues: disk.issues,\n\t\t\tunsupportedEditing: disk.unsupportedEditing,\n\t\t\tetag: disk.etag ?? null,\n\t\t\tcsrfToken\n\t\t}, { status: 422 });\n\t}\n\treturn json({\n\t\tprofile: disk.profile,\n\t\tsafety: disk.safety,\n\t\teffectivePermissions: disk.effectivePermissions,\n\t\tbytes: disk.bytes.length,\n\t\tetag: disk.etag,\n\t\tcsrfToken,\n\t\tprofilePath: \"ai-profile.yaml\"\n\t});\n};\n//#endregion\nexport { GET };\n"],"names":[],"mappings":";;;;;;;;;;;;;AAIA;AACG,IAAC,GAAG,GAAG,YAAY;AACtB,CAAC,MAAM,IAAI,GAAG,MAAM,eAAe,CAAC,CAAC,MAAM,kBAAkB,EAAE,EAAE,OAAO,CAAC;AACzE,CAAC,MAAM,SAAS,GAAG,cAAc,EAAE;AACnC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;AACf,EAAE,IAAI,IAAI,CAAC,MAAM,KAAK,WAAW,EAAE,OAAO,IAAI,CAAC;AAC/C,GAAG,KAAK,EAAE,gBAAgB;AAC1B,GAAG,OAAO,EAAE;AACZ,GAAG,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AACrB,EAAE,OAAO,IAAI,CAAC;AACd,GAAG,KAAK,EAAE,iBAAiB;AAC3B,GAAG,MAAM,EAAE,IAAI,CAAC,MAAM;AACtB,GAAG,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;AAC9C,GAAG,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI;AAC1B,GAAG;AACH,GAAG,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AACrB,CAAC;AACD,CAAC,OAAO,IAAI,CAAC;AACb,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO;AACvB,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM;AACrB,EAAE,oBAAoB,EAAE,IAAI,CAAC,oBAAoB;AACjD,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;AAC1B,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI;AACjB,EAAE,SAAS;AACX,EAAE,WAAW,EAAE;AACf,EAAE,CAAC;AACH;;;;"}
@@ -1,8 +1,8 @@
1
- import { b as buildLlmsTxt } from './marketingSeo-Do5o0grg.js';
1
+ import { b as buildLlmsTxt } from './marketingSeo-CugwK52J.js';
2
2
 
3
3
  //#region src/routes/llms.txt/+server.ts
4
4
  var prerender = process.env.AGENT_PROFILE_MARKETING_BUILD === "1";
5
5
  var GET = () => new Response(buildLlmsTxt(), { headers: { "content-type": "text/plain; charset=utf-8" } });
6
6
 
7
7
  export { GET, prerender };
8
- //# sourceMappingURL=_server.ts-5396UuLQ.js.map
8
+ //# sourceMappingURL=_server.ts-CKn8ym8s.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"_server.ts-5396UuLQ.js","sources":["../../../.svelte-kit/adapter-node/entries/endpoints/llms.txt/_server.ts.js"],"sourcesContent":["import { t as buildLlmsTxt } from \"../../../chunks/marketingSeo.js\";\n//#region src/routes/llms.txt/+server.ts\nvar prerender = process.env.AGENT_PROFILE_MARKETING_BUILD === \"1\";\nvar GET = () => new Response(buildLlmsTxt(), { headers: { \"content-type\": \"text/plain; charset=utf-8\" } });\n//#endregion\nexport { GET, prerender };\n"],"names":[],"mappings":";;AACA;AACG,IAAC,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,6BAA6B,KAAK;AAC3D,IAAC,GAAG,GAAG,MAAM,IAAI,QAAQ,CAAC,YAAY,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,cAAc,EAAE,2BAA2B,EAAE,EAAE;;;;"}
1
+ {"version":3,"file":"_server.ts-CKn8ym8s.js","sources":["../../../.svelte-kit/adapter-node/entries/endpoints/llms.txt/_server.ts.js"],"sourcesContent":["import { t as buildLlmsTxt } from \"../../../chunks/marketingSeo.js\";\n//#region src/routes/llms.txt/+server.ts\nvar prerender = process.env.AGENT_PROFILE_MARKETING_BUILD === \"1\";\nvar GET = () => new Response(buildLlmsTxt(), { headers: { \"content-type\": \"text/plain; charset=utf-8\" } });\n//#endregion\nexport { GET, prerender };\n"],"names":[],"mappings":";;AACA;AACG,IAAC,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,6BAA6B,KAAK;AAC3D,IAAC,GAAG,GAAG,MAAM,IAAI,QAAQ,CAAC,YAAY,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,cAAc,EAAE,2BAA2B,EAAE,EAAE;;;;"}
@@ -1,6 +1,6 @@
1
- import { l as loadProjectContext } from './projectContext-Cxsfz84C.js';
2
- import { a as readJsonRequestBody, r as readDiskProfile, v as validateCandidate, c as computeProfileDiff } from './profileApiHelpers-BFzohffv.js';
3
- import { v as verifyCsrfToken, s as storePlan } from './tokenStore-DQfTa-N3.js';
1
+ import { z as loadProjectContext } from './projectContext-B1D-bieW.js';
2
+ import { r as readJsonRequestBody, a as readDiskProfile, v as validateCandidate, c as computeProfileDiff } from './profileApiHelpers-DCoI7zMU.js';
3
+ import { v as verifyCsrfToken, b as storePlan } from './tokenStore-CTHhmHsk.js';
4
4
  import { j as json } from './index-CLnuRv4X.js';
5
5
  import 'node:fs/promises';
6
6
  import 'process';
@@ -82,4 +82,4 @@ function isRecord(v) {
82
82
  }
83
83
 
84
84
  export { POST };
85
- //# sourceMappingURL=_server.ts-DHt1bGpF.js.map
85
+ //# sourceMappingURL=_server.ts-CaVH9FSD.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"_server.ts-DHt1bGpF.js","sources":["../../../.svelte-kit/adapter-node/entries/endpoints/api/profile/plan/_server.ts.js"],"sourcesContent":["import { t as loadProjectContext } from \"../../../../../chunks/projectContext.js\";\nimport { i as validateCandidate, n as readDiskProfile, r as readJsonRequestBody, t as computeProfileDiff } from \"../../../../../chunks/profileApiHelpers.js\";\nimport { i as verifyCsrfToken, r as storePlan } from \"../../../../../chunks/tokenStore.js\";\nimport { json } from \"@sveltejs/kit\";\n//#region src/routes/api/profile/plan/+server.ts\nvar POST = async ({ request }) => {\n\tif (!verifyCsrfToken(request.headers.get(\"x-csrf-token\"))) return json({ error: \"csrf_failed\" }, { status: 403 });\n\tif (!(request.headers.get(\"content-type\") ?? \"\").includes(\"application/json\")) return json({ error: \"unsupported_media_type\" }, { status: 415 });\n\tconst parsedBody = await readJsonRequestBody(request);\n\tif (!parsedBody.ok) return json({\n\t\terror: parsedBody.error,\n\t\tmessage: parsedBody.message\n\t}, { status: parsedBody.status });\n\tconst body = parsedBody.body;\n\tif (!isRecord(body) || !body.candidate || typeof body.baseEtag !== \"string\") return json({\n\t\terror: \"invalid_request\",\n\t\tmessage: \"Missing candidate or baseEtag.\"\n\t}, { status: 400 });\n\tconst disk = await readDiskProfile((await loadProjectContext()).rootDir);\n\tif (!disk.ok) {\n\t\tif (disk.reason === \"not_found\") return json({ error: \"file_not_found\" }, { status: 404 });\n\t\treturn json({\n\t\t\terror: \"invalid_profile\",\n\t\t\tissues: disk.issues,\n\t\t\tunsupportedEditing: disk.unsupportedEditing\n\t\t}, { status: 422 });\n\t}\n\tif (disk.etag !== body.baseEtag) return json({\n\t\terror: \"stale_profile\",\n\t\tmessage: \"Profile changed since form was loaded; reload and retry.\"\n\t}, { status: 409 });\n\tconst candidateValidation = validateCandidate(body.candidate);\n\tif (!candidateValidation.ok) {\n\t\tif (candidateValidation.reason === \"secret_like\") return json({\n\t\t\terror: \"secret_like_value\",\n\t\t\tpaths: candidateValidation.paths\n\t\t}, { status: 422 });\n\t\tif (candidateValidation.reason === \"invalid_encoding\") return json({\n\t\t\terror: \"invalid_encoding\",\n\t\t\tpaths: candidateValidation.paths\n\t\t}, { status: 422 });\n\t\treturn json({\n\t\t\terror: \"invalid_profile\",\n\t\t\tissues: candidateValidation.issues\n\t\t}, { status: 422 });\n\t}\n\tconst diffResult = computeProfileDiff(disk.source, candidateValidation.yaml);\n\tconst action = diffResult.changed ? \"change\" : \"unchanged\";\n\tconst expiresAt = new Date(Date.now() + 6e4).toISOString();\n\tconst planToken = storePlan({\n\t\tetag: disk.etag,\n\t\tcandidateYaml: candidateValidation.yaml,\n\t\tcandidateEtag: candidateValidation.etag\n\t});\n\treturn json({\n\t\tdiff: {\n\t\t\tformat: \"unified\",\n\t\t\ttext: diffResult.text,\n\t\t\tcounts: {\n\t\t\t\tadded: diffResult.added,\n\t\t\t\tremoved: diffResult.removed\n\t\t\t}\n\t\t},\n\t\taction,\n\t\tcandidateBytes: Buffer.byteLength(candidateValidation.yaml, \"utf8\"),\n\t\tplanToken,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":["../../../.svelte-kit/adapter-node/entries/endpoints/api/profile/plan/_server.ts.js"],"sourcesContent":["import { t as loadProjectContext } from \"../../../../../chunks/projectContext.js\";\nimport { i as validateCandidate, n as readDiskProfile, r as readJsonRequestBody, t as computeProfileDiff } from \"../../../../../chunks/profileApiHelpers.js\";\nimport { o as storePlan, s as verifyCsrfToken } from \"../../../../../chunks/tokenStore.js\";\nimport { json } from \"@sveltejs/kit\";\n//#region src/routes/api/profile/plan/+server.ts\nvar POST = async ({ request }) => {\n\tif (!verifyCsrfToken(request.headers.get(\"x-csrf-token\"))) return json({ error: \"csrf_failed\" }, { status: 403 });\n\tif (!(request.headers.get(\"content-type\") ?? \"\").includes(\"application/json\")) return json({ error: \"unsupported_media_type\" }, { status: 415 });\n\tconst parsedBody = await readJsonRequestBody(request);\n\tif (!parsedBody.ok) return json({\n\t\terror: parsedBody.error,\n\t\tmessage: parsedBody.message\n\t}, { status: parsedBody.status });\n\tconst body = parsedBody.body;\n\tif (!isRecord(body) || !body.candidate || typeof body.baseEtag !== \"string\") return json({\n\t\terror: \"invalid_request\",\n\t\tmessage: \"Missing candidate or baseEtag.\"\n\t}, { status: 400 });\n\tconst disk = await readDiskProfile((await loadProjectContext()).rootDir);\n\tif (!disk.ok) {\n\t\tif (disk.reason === \"not_found\") return json({ error: \"file_not_found\" }, { status: 404 });\n\t\treturn json({\n\t\t\terror: \"invalid_profile\",\n\t\t\tissues: disk.issues,\n\t\t\tunsupportedEditing: disk.unsupportedEditing\n\t\t}, { status: 422 });\n\t}\n\tif (disk.etag !== body.baseEtag) return json({\n\t\terror: \"stale_profile\",\n\t\tmessage: \"Profile changed since form was loaded; reload and retry.\"\n\t}, { status: 409 });\n\tconst candidateValidation = validateCandidate(body.candidate);\n\tif (!candidateValidation.ok) {\n\t\tif (candidateValidation.reason === \"secret_like\") return json({\n\t\t\terror: \"secret_like_value\",\n\t\t\tpaths: candidateValidation.paths\n\t\t}, { status: 422 });\n\t\tif (candidateValidation.reason === \"invalid_encoding\") return json({\n\t\t\terror: \"invalid_encoding\",\n\t\t\tpaths: candidateValidation.paths\n\t\t}, { status: 422 });\n\t\treturn json({\n\t\t\terror: \"invalid_profile\",\n\t\t\tissues: candidateValidation.issues\n\t\t}, { status: 422 });\n\t}\n\tconst diffResult = computeProfileDiff(disk.source, candidateValidation.yaml);\n\tconst action = diffResult.changed ? \"change\" : \"unchanged\";\n\tconst expiresAt = new Date(Date.now() + 6e4).toISOString();\n\tconst planToken = storePlan({\n\t\tetag: disk.etag,\n\t\tcandidateYaml: candidateValidation.yaml,\n\t\tcandidateEtag: candidateValidation.etag\n\t});\n\treturn json({\n\t\tdiff: {\n\t\t\tformat: \"unified\",\n\t\t\ttext: diffResult.text,\n\t\t\tcounts: {\n\t\t\t\tadded: diffResult.added,\n\t\t\t\tremoved: diffResult.removed\n\t\t\t}\n\t\t},\n\t\taction,\n\t\tcandidateBytes: Buffer.byteLength(candidateValidation.yaml, \"utf8\"),\n\t\tplanToken,\n\t\texpiresAt,\n\t\tetag: disk.etag\n\t});\n};\nfunction isRecord(v) {\n\treturn typeof v === \"object\" && v !== null && !Array.isArray(v);\n}\n//#endregion\nexport { POST };\n"],"names":[],"mappings":";;;;;;;;;;;;;AAIA;AACG,IAAC,IAAI,GAAG,OAAO,EAAE,OAAO,EAAE,KAAK;AAClC,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,EAAE,OAAO,IAAI,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AAClH,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,IAAI,CAAC,EAAE,KAAK,EAAE,wBAAwB,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AACjJ,C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EAAE,IAAI,EAAE;AACR,GAAG,MAAM,EAAE,SAAS;AACpB,GAAG,IAAI,EAAE,UAAU,CAAC,IAAI;AACxB,GAAG,MAAM,EAAE;AACX,IAAI,KAAK,EAAE,UAAU,CAAC,KAAK;AAC3B,IAAI,OAAO,EAAE,UAAU,CAAC;AACxB;AACA,GAAG;AACH,EAAE,MAAM;AACR,EAAE,cAAc,EAAE,MAAM,CAAC,UAAU,CAAC,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC;AACrE,EAAE,SAAS;AACX,EAAE,SAAS;AACX,EAAE,IAAI,EAAE,IAAI,CAAC;AACb,EAAE,CAAC;AACH;AACA,SAAS,QAAQ,CAAC,CAAC,EAAE;AACrB,CAAC,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AAChE;;;;"}
@@ -0,0 +1,337 @@
1
+ import { r as resolveProjectRoot, o as readLockfileForRegions, c as compileProfile, q as planRootInstructionsAdoption, u as planWrites, p as parseProfileYaml, R as REGION_AWARE_ROOT_PATHS } from './projectContext-B1D-bieW.js';
2
+ import { r as readJsonRequestBody } from './profileApiHelpers-DCoI7zMU.js';
3
+ import { v as verifyCsrfToken, s as storeMigrationPlan } from './tokenStore-CTHhmHsk.js';
4
+ import { j as json } from './index-CLnuRv4X.js';
5
+ import { readFile } from 'node:fs/promises';
6
+ import path from 'node:path';
7
+ import 'process';
8
+ import 'buffer';
9
+ import 'node:util';
10
+ import 'node:crypto';
11
+ import 'diff';
12
+ import './index-DBqjc0Yf.js';
13
+
14
+ //#region src/lib/server/migrationPlan.ts
15
+ var REGION_ROOTS = new Set(REGION_AWARE_ROOT_PATHS);
16
+ async function buildMigrationPlan(rootDir, rows) {
17
+ const profile = await readOptionalProfile(rootDir);
18
+ const lockfile = await readLockfileForRegions(rootDir);
19
+ let compiledGeneratedByPath;
20
+ let compileError;
21
+ if (profile) {
22
+ const result = compileProfile({ profile });
23
+ if (result.ok) {
24
+ compiledGeneratedByPath = /* @__PURE__ */ new Map();
25
+ for (const f of result.files) compiledGeneratedByPath.set(f.path, f.bytes);
26
+ } else compileError = result.issues.map((issue) => `${issue.code}: ${issue.message}`).join("; ");
27
+ }
28
+ const generatedBytesByRoot = /* @__PURE__ */ new Map();
29
+ if (compiledGeneratedByPath) for (const root of REGION_ROOTS) {
30
+ const bytes = compiledGeneratedByPath.get(root);
31
+ if (bytes) generatedBytesByRoot.set(root, bytes);
32
+ }
33
+ const rootAdoptions = await planRootInstructionsAdoption(rootDir, generatedBytesByRoot);
34
+ const rootOutcomeByPath = /* @__PURE__ */ new Map();
35
+ for (const outcome of rootAdoptions) rootOutcomeByPath.set(outcome.path, outcome);
36
+ const ownershipByPath = /* @__PURE__ */ new Map();
37
+ if (lockfile) for (const output of lockfile.outputs) ownershipByPath.set(output.path, output.ownership);
38
+ const writes = [];
39
+ const refusals = [];
40
+ const resolved = [];
41
+ for (const row of rows) {
42
+ if (row.action === "skip" || row.action === "preserve") {
43
+ resolved.push({
44
+ path: row.path,
45
+ action: row.action,
46
+ bytes: 0
47
+ });
48
+ continue;
49
+ }
50
+ if (row.action === "replace-generated-owned" && row.confirmReplace !== true) {
51
+ refusals.push({
52
+ path: row.path,
53
+ reason: "missing-replace-confirmation",
54
+ note: "replace-generated-owned requires confirmReplace:true"
55
+ });
56
+ continue;
57
+ }
58
+ if (REGION_ROOTS.has(row.path)) {
59
+ const outcome = rootOutcomeByPath.get(row.path);
60
+ if (!outcome) {
61
+ refusals.push({
62
+ path: row.path,
63
+ reason: "unsupported-path",
64
+ note: "no root outcome was computed for this path"
65
+ });
66
+ continue;
67
+ }
68
+ if (row.action === "add-regions") {
69
+ if (!profile) {
70
+ refusals.push({
71
+ path: row.path,
72
+ reason: "requires-profile",
73
+ note: "add-regions needs ai-profile.yaml so compile can emit the generated region"
74
+ });
75
+ continue;
76
+ }
77
+ if (compileError) {
78
+ refusals.push({
79
+ path: row.path,
80
+ reason: "compile-failed",
81
+ note: compileError
82
+ });
83
+ continue;
84
+ }
85
+ applyRootOutcome(row, outcome, true, void 0, writes, refusals, resolved);
86
+ continue;
87
+ }
88
+ if (row.action === "update-generated-region") {
89
+ if (!profile) {
90
+ refusals.push({
91
+ path: row.path,
92
+ reason: "requires-profile",
93
+ note: "update-generated-region needs ai-profile.yaml; create one first"
94
+ });
95
+ continue;
96
+ }
97
+ if (compileError) {
98
+ refusals.push({
99
+ path: row.path,
100
+ reason: "compile-failed",
101
+ note: compileError
102
+ });
103
+ continue;
104
+ }
105
+ if (!generatedBytesByRoot.has(row.path)) {
106
+ refusals.push({
107
+ path: row.path,
108
+ reason: "no-compiled-output",
109
+ note: `compile did not emit ${row.path}`
110
+ });
111
+ continue;
112
+ }
113
+ applyRootOutcome(row, outcome, true, void 0, writes, refusals, resolved);
114
+ continue;
115
+ }
116
+ if (row.action === "replace-generated-owned") {
117
+ refusals.push({
118
+ path: row.path,
119
+ reason: "ownership-mismatch",
120
+ note: "replace-generated-owned is not available for root instructions; use update-generated-region"
121
+ });
122
+ continue;
123
+ }
124
+ }
125
+ if (!profile) {
126
+ refusals.push({
127
+ path: row.path,
128
+ reason: "requires-profile",
129
+ note: "this action needs ai-profile.yaml; create one first"
130
+ });
131
+ continue;
132
+ }
133
+ if (compileError) {
134
+ refusals.push({
135
+ path: row.path,
136
+ reason: "compile-failed",
137
+ note: compileError
138
+ });
139
+ continue;
140
+ }
141
+ const compiledBytes = compiledGeneratedByPath?.get(row.path);
142
+ if (!compiledBytes) {
143
+ refusals.push({
144
+ path: row.path,
145
+ reason: "no-compiled-output",
146
+ note: `compile did not emit ${row.path}`
147
+ });
148
+ continue;
149
+ }
150
+ if (row.action === "replace-generated-owned") {
151
+ const ownership = ownershipByPath.get(row.path);
152
+ if (ownership !== "generated-owned") {
153
+ refusals.push({
154
+ path: row.path,
155
+ reason: "ownership-mismatch",
156
+ note: `replace-generated-owned requires lockfile ownership=generated-owned (was ${ownership ?? "absent"})`
157
+ });
158
+ continue;
159
+ }
160
+ writes.push({
161
+ path: row.path,
162
+ bytes: compiledBytes
163
+ });
164
+ resolved.push({
165
+ path: row.path,
166
+ action: row.action,
167
+ bytes: compiledBytes.length
168
+ });
169
+ continue;
170
+ }
171
+ if (row.action === "update-generated-region") {
172
+ const ownership = ownershipByPath.get(row.path);
173
+ if (ownership !== "mixed") {
174
+ refusals.push({
175
+ path: row.path,
176
+ reason: "ownership-mismatch",
177
+ note: `update-generated-region requires lockfile ownership=mixed (was ${ownership ?? "absent"})`
178
+ });
179
+ continue;
180
+ }
181
+ refusals.push({
182
+ path: row.path,
183
+ reason: "no-compiled-output",
184
+ note: "compile does not emit mixed outputs for non-root paths yet"
185
+ });
186
+ continue;
187
+ }
188
+ if (row.action === "add-regions") {
189
+ refusals.push({
190
+ path: row.path,
191
+ reason: "unsupported-path",
192
+ note: "add-regions is only valid for AGENTS.md and CLAUDE.md"
193
+ });
194
+ continue;
195
+ }
196
+ }
197
+ return {
198
+ writes,
199
+ refusals,
200
+ resolved
201
+ };
202
+ }
203
+ function applyRootOutcome(row, outcome, profileLoaded, compileError, writes, refusals, resolved) {
204
+ if (!outcome.ok) switch (outcome.reason) {
205
+ case "symlink":
206
+ refusals.push({
207
+ path: outcome.path,
208
+ reason: "symlinked",
209
+ note: "Phase 14 refuses to follow symlinks"
210
+ });
211
+ return;
212
+ case "partial-markers":
213
+ refusals.push({
214
+ path: outcome.path,
215
+ reason: "partial-region-markers",
216
+ note: "file has partial region markers and must be repaired manually"
217
+ });
218
+ return;
219
+ case "duplicate-markers":
220
+ refusals.push({
221
+ path: outcome.path,
222
+ reason: "duplicate-region-markers",
223
+ note: "file has duplicate generated markers; cannot safely replace"
224
+ });
225
+ return;
226
+ case "missing-file":
227
+ refusals.push({
228
+ path: outcome.path,
229
+ reason: "missing-file",
230
+ note: "file does not exist on disk; nothing to adopt"
231
+ });
232
+ return;
233
+ case "missing-generated-bytes":
234
+ refusals.push({
235
+ path: outcome.path,
236
+ reason: "no-compiled-output" ,
237
+ note: `compile did not emit ${outcome.path}`
238
+ });
239
+ return;
240
+ }
241
+ writes.push({
242
+ path: outcome.path,
243
+ bytes: outcome.bytes
244
+ });
245
+ resolved.push({
246
+ path: row.path,
247
+ action: row.action,
248
+ bytes: outcome.bytes.length
249
+ });
250
+ }
251
+ async function previewMigrationPlan(rootDir, plan) {
252
+ return planWrites({
253
+ rootDir,
254
+ writes: plan.writes
255
+ });
256
+ }
257
+ async function readOptionalProfile(rootDir) {
258
+ let source;
259
+ try {
260
+ source = await readFile(path.join(rootDir, "ai-profile.yaml"), "utf8");
261
+ } catch (err) {
262
+ if (typeof err === "object" && err !== null && "code" in err && err.code === "ENOENT") return;
263
+ throw err;
264
+ }
265
+ const parsed = parseProfileYaml(source);
266
+ return parsed.ok ? parsed.profile : void 0;
267
+ }
268
+ //#endregion
269
+ //#region src/routes/api/migration/plan/+server.ts
270
+ var VALID_ACTIONS = [
271
+ "preserve",
272
+ "add-regions",
273
+ "update-generated-region",
274
+ "replace-generated-owned",
275
+ "skip"
276
+ ];
277
+ var POST = async ({ request }) => {
278
+ if (!verifyCsrfToken(request.headers.get("x-csrf-token"))) return json({ error: "csrf_failed" }, { status: 403 });
279
+ if (!(request.headers.get("content-type") ?? "").includes("application/json")) return json({ error: "unsupported_media_type" }, { status: 415 });
280
+ const parsed = await readJsonRequestBody(request);
281
+ if (!parsed.ok) return json({
282
+ error: parsed.error,
283
+ message: parsed.message
284
+ }, { status: parsed.status });
285
+ const body = parsed.body;
286
+ if (!isRecord(body) || !Array.isArray(body.actions)) return json({
287
+ error: "invalid_request",
288
+ message: "Missing `actions` array."
289
+ }, { status: 400 });
290
+ const rows = [];
291
+ for (const candidate of body.actions) {
292
+ if (!isRecord(candidate)) return json({
293
+ error: "invalid_request",
294
+ message: "Each action must be an object."
295
+ }, { status: 400 });
296
+ const pathValue = candidate.path;
297
+ const actionValue = candidate.action;
298
+ if (typeof pathValue !== "string" || typeof actionValue !== "string") return json({
299
+ error: "invalid_request",
300
+ message: "path/action must be strings."
301
+ }, { status: 400 });
302
+ if (!VALID_ACTIONS.includes(actionValue)) return json({
303
+ error: "invalid_request",
304
+ message: `Unknown action: ${actionValue}`
305
+ }, { status: 400 });
306
+ rows.push({
307
+ path: pathValue,
308
+ action: actionValue,
309
+ confirmReplace: candidate.confirmReplace === true ? true : void 0
310
+ });
311
+ }
312
+ const rootDir = resolveProjectRoot();
313
+ const plan = await buildMigrationPlan(rootDir, rows);
314
+ const preview = await previewMigrationPlan(rootDir, plan);
315
+ const requiresReplaceConfirmation = plan.resolved.some((entry) => entry.action === "replace-generated-owned");
316
+ return json({
317
+ planToken: storeMigrationPlan({
318
+ serializedPlan: JSON.stringify({ writes: plan.writes.map((w) => ({
319
+ path: w.path,
320
+ bytesBase64: Buffer.from(w.bytes).toString("base64")
321
+ })) }),
322
+ requiresReplaceConfirmation
323
+ }),
324
+ expiresAt: new Date(Date.now() + 6e4).toISOString(),
325
+ counts: preview.counts,
326
+ actions: preview.actions,
327
+ resolved: plan.resolved,
328
+ refusals: plan.refusals,
329
+ requiresReplaceConfirmation
330
+ });
331
+ };
332
+ function isRecord(v) {
333
+ return typeof v === "object" && v !== null && !Array.isArray(v);
334
+ }
335
+
336
+ export { POST };
337
+ //# sourceMappingURL=_server.ts-D7iLlRbM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_server.ts-D7iLlRbM.js","sources":["../../../.svelte-kit/adapter-node/entries/endpoints/api/migration/plan/_server.ts.js"],"sourcesContent":["import { _ as compileProfile, h as planWrites, l as planRootInstructionsAdoption, r as resolveProjectRoot, s as REGION_AWARE_ROOT_PATHS, u as readLockfileForRegions } from \"../../../../../chunks/projectContext.js\";\nimport { h as parseProfileYaml } from \"../../../../../chunks/src.js\";\nimport { r as readJsonRequestBody } from \"../../../../../chunks/profileApiHelpers.js\";\nimport { a as storeMigrationPlan, s as verifyCsrfToken } from \"../../../../../chunks/tokenStore.js\";\nimport { json } from \"@sveltejs/kit\";\nimport { readFile } from \"node:fs/promises\";\nimport path from \"node:path\";\n//#region src/lib/server/migrationPlan.ts\nvar REGION_ROOTS = new Set(REGION_AWARE_ROOT_PATHS);\nasync function buildMigrationPlan(rootDir, rows) {\n\tconst profile = await readOptionalProfile(rootDir);\n\tconst lockfile = await readLockfileForRegions(rootDir);\n\tlet compiledGeneratedByPath;\n\tlet compileError;\n\tif (profile) {\n\t\tconst result = compileProfile({ profile });\n\t\tif (result.ok) {\n\t\t\tcompiledGeneratedByPath = /* @__PURE__ */ new Map();\n\t\t\tfor (const f of result.files) compiledGeneratedByPath.set(f.path, f.bytes);\n\t\t} else compileError = result.issues.map((issue) => `${issue.code}: ${issue.message}`).join(\"; \");\n\t}\n\tconst generatedBytesByRoot = /* @__PURE__ */ new Map();\n\tif (compiledGeneratedByPath) for (const root of REGION_ROOTS) {\n\t\tconst bytes = compiledGeneratedByPath.get(root);\n\t\tif (bytes) generatedBytesByRoot.set(root, bytes);\n\t}\n\tconst rootAdoptions = await planRootInstructionsAdoption(rootDir, generatedBytesByRoot);\n\tconst rootOutcomeByPath = /* @__PURE__ */ new Map();\n\tfor (const outcome of rootAdoptions) rootOutcomeByPath.set(outcome.path, outcome);\n\tconst ownershipByPath = /* @__PURE__ */ new Map();\n\tif (lockfile) for (const output of lockfile.outputs) ownershipByPath.set(output.path, output.ownership);\n\tconst writes = [];\n\tconst refusals = [];\n\tconst resolved = [];\n\tfor (const row of rows) {\n\t\tif (row.action === \"skip\" || row.action === \"preserve\") {\n\t\t\tresolved.push({\n\t\t\t\tpath: row.path,\n\t\t\t\taction: row.action,\n\t\t\t\tbytes: 0\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (row.action === \"replace-generated-owned\" && row.confirmReplace !== true) {\n\t\t\trefusals.push({\n\t\t\t\tpath: row.path,\n\t\t\t\treason: \"missing-replace-confirmation\",\n\t\t\t\tnote: \"replace-generated-owned requires confirmReplace:true\"\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (REGION_ROOTS.has(row.path)) {\n\t\t\tconst outcome = rootOutcomeByPath.get(row.path);\n\t\t\tif (!outcome) {\n\t\t\t\trefusals.push({\n\t\t\t\t\tpath: row.path,\n\t\t\t\t\treason: \"unsupported-path\",\n\t\t\t\t\tnote: \"no root outcome was computed for this path\"\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (row.action === \"add-regions\") {\n\t\t\t\tif (!profile) {\n\t\t\t\t\trefusals.push({\n\t\t\t\t\t\tpath: row.path,\n\t\t\t\t\t\treason: \"requires-profile\",\n\t\t\t\t\t\tnote: \"add-regions needs ai-profile.yaml so compile can emit the generated region\"\n\t\t\t\t\t});\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (compileError) {\n\t\t\t\t\trefusals.push({\n\t\t\t\t\t\tpath: row.path,\n\t\t\t\t\t\treason: \"compile-failed\",\n\t\t\t\t\t\tnote: compileError\n\t\t\t\t\t});\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tapplyRootOutcome(row, outcome, true, void 0, writes, refusals, resolved);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (row.action === \"update-generated-region\") {\n\t\t\t\tif (!profile) {\n\t\t\t\t\trefusals.push({\n\t\t\t\t\t\tpath: row.path,\n\t\t\t\t\t\treason: \"requires-profile\",\n\t\t\t\t\t\tnote: \"update-generated-region needs ai-profile.yaml; create one first\"\n\t\t\t\t\t});\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (compileError) {\n\t\t\t\t\trefusals.push({\n\t\t\t\t\t\tpath: row.path,\n\t\t\t\t\t\treason: \"compile-failed\",\n\t\t\t\t\t\tnote: compileError\n\t\t\t\t\t});\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (!generatedBytesByRoot.has(row.path)) {\n\t\t\t\t\trefusals.push({\n\t\t\t\t\t\tpath: row.path,\n\t\t\t\t\t\treason: \"no-compiled-output\",\n\t\t\t\t\t\tnote: `compile did not emit ${row.path}`\n\t\t\t\t\t});\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tapplyRootOutcome(row, outcome, true, void 0, writes, refusals, resolved);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (row.action === \"replace-generated-owned\") {\n\t\t\t\trefusals.push({\n\t\t\t\t\tpath: row.path,\n\t\t\t\t\treason: \"ownership-mismatch\",\n\t\t\t\t\tnote: \"replace-generated-owned is not available for root instructions; use update-generated-region\"\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tif (!profile) {\n\t\t\trefusals.push({\n\t\t\t\tpath: row.path,\n\t\t\t\treason: \"requires-profile\",\n\t\t\t\tnote: \"this action needs ai-profile.yaml; create one first\"\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (compileError) {\n\t\t\trefusals.push({\n\t\t\t\tpath: row.path,\n\t\t\t\treason: \"compile-failed\",\n\t\t\t\tnote: compileError\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst compiledBytes = compiledGeneratedByPath?.get(row.path);\n\t\tif (!compiledBytes) {\n\t\t\trefusals.push({\n\t\t\t\tpath: row.path,\n\t\t\t\treason: \"no-compiled-output\",\n\t\t\t\tnote: `compile did not emit ${row.path}`\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (row.action === \"replace-generated-owned\") {\n\t\t\tconst ownership = ownershipByPath.get(row.path);\n\t\t\tif (ownership !== \"generated-owned\") {\n\t\t\t\trefusals.push({\n\t\t\t\t\tpath: row.path,\n\t\t\t\t\treason: \"ownership-mismatch\",\n\t\t\t\t\tnote: `replace-generated-owned requires lockfile ownership=generated-owned (was ${ownership ?? \"absent\"})`\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\twrites.push({\n\t\t\t\tpath: row.path,\n\t\t\t\tbytes: compiledBytes\n\t\t\t});\n\t\t\tresolved.push({\n\t\t\t\tpath: row.path,\n\t\t\t\taction: row.action,\n\t\t\t\tbytes: compiledBytes.length\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (row.action === \"update-generated-region\") {\n\t\t\tconst ownership = ownershipByPath.get(row.path);\n\t\t\tif (ownership !== \"mixed\") {\n\t\t\t\trefusals.push({\n\t\t\t\t\tpath: row.path,\n\t\t\t\t\treason: \"ownership-mismatch\",\n\t\t\t\t\tnote: `update-generated-region requires lockfile ownership=mixed (was ${ownership ?? \"absent\"})`\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\trefusals.push({\n\t\t\t\tpath: row.path,\n\t\t\t\treason: \"no-compiled-output\",\n\t\t\t\tnote: \"compile does not emit mixed outputs for non-root paths yet\"\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (row.action === \"add-regions\") {\n\t\t\trefusals.push({\n\t\t\t\tpath: row.path,\n\t\t\t\treason: \"unsupported-path\",\n\t\t\t\tnote: \"add-regions is only valid for AGENTS.md and CLAUDE.md\"\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t}\n\treturn {\n\t\twrites,\n\t\trefusals,\n\t\tresolved\n\t};\n}\nfunction applyRootOutcome(row, outcome, profileLoaded, compileError, writes, refusals, resolved) {\n\tif (!outcome.ok) switch (outcome.reason) {\n\t\tcase \"symlink\":\n\t\t\trefusals.push({\n\t\t\t\tpath: outcome.path,\n\t\t\t\treason: \"symlinked\",\n\t\t\t\tnote: \"Phase 14 refuses to follow symlinks\"\n\t\t\t});\n\t\t\treturn;\n\t\tcase \"partial-markers\":\n\t\t\trefusals.push({\n\t\t\t\tpath: outcome.path,\n\t\t\t\treason: \"partial-region-markers\",\n\t\t\t\tnote: \"file has partial region markers and must be repaired manually\"\n\t\t\t});\n\t\t\treturn;\n\t\tcase \"duplicate-markers\":\n\t\t\trefusals.push({\n\t\t\t\tpath: outcome.path,\n\t\t\t\treason: \"duplicate-region-markers\",\n\t\t\t\tnote: \"file has duplicate generated markers; cannot safely replace\"\n\t\t\t});\n\t\t\treturn;\n\t\tcase \"missing-file\":\n\t\t\trefusals.push({\n\t\t\t\tpath: outcome.path,\n\t\t\t\treason: \"missing-file\",\n\t\t\t\tnote: \"file does not exist on disk; nothing to adopt\"\n\t\t\t});\n\t\t\treturn;\n\t\tcase \"missing-generated-bytes\":\n\t\t\trefusals.push({\n\t\t\t\tpath: outcome.path,\n\t\t\t\treason: profileLoaded ? compileError ? \"compile-failed\" : \"no-compiled-output\" : \"requires-profile\",\n\t\t\t\tnote: profileLoaded ? compileError ?? `compile did not emit ${outcome.path}` : \"ai-profile.yaml is missing; cannot insert a generated region\"\n\t\t\t});\n\t\t\treturn;\n\t}\n\twrites.push({\n\t\tpath: outcome.path,\n\t\tbytes: outcome.bytes\n\t});\n\tresolved.push({\n\t\tpath: row.path,\n\t\taction: row.action,\n\t\tbytes: outcome.bytes.length\n\t});\n}\nasync function previewMigrationPlan(rootDir, plan) {\n\treturn planWrites({\n\t\trootDir,\n\t\twrites: plan.writes\n\t});\n}\nasync function readOptionalProfile(rootDir) {\n\tlet source;\n\ttry {\n\t\tsource = await readFile(path.join(rootDir, \"ai-profile.yaml\"), \"utf8\");\n\t} catch (err) {\n\t\tif (typeof err === \"object\" && err !== null && \"code\" in err && err.code === \"ENOENT\") return;\n\t\tthrow err;\n\t}\n\tconst parsed = parseProfileYaml(source);\n\treturn parsed.ok ? parsed.profile : void 0;\n}\n//#endregion\n//#region src/routes/api/migration/plan/+server.ts\nvar VALID_ACTIONS = [\n\t\"preserve\",\n\t\"add-regions\",\n\t\"update-generated-region\",\n\t\"replace-generated-owned\",\n\t\"skip\"\n];\nvar POST = async ({ request }) => {\n\tif (!verifyCsrfToken(request.headers.get(\"x-csrf-token\"))) return json({ error: \"csrf_failed\" }, { status: 403 });\n\tif (!(request.headers.get(\"content-type\") ?? \"\").includes(\"application/json\")) return json({ error: \"unsupported_media_type\" }, { status: 415 });\n\tconst parsed = await readJsonRequestBody(request);\n\tif (!parsed.ok) return json({\n\t\terror: parsed.error,\n\t\tmessage: parsed.message\n\t}, { status: parsed.status });\n\tconst body = parsed.body;\n\tif (!isRecord(body) || !Array.isArray(body.actions)) return json({\n\t\terror: \"invalid_request\",\n\t\tmessage: \"Missing `actions` array.\"\n\t}, { status: 400 });\n\tconst rows = [];\n\tfor (const candidate of body.actions) {\n\t\tif (!isRecord(candidate)) return json({\n\t\t\terror: \"invalid_request\",\n\t\t\tmessage: \"Each action must be an object.\"\n\t\t}, { status: 400 });\n\t\tconst pathValue = candidate.path;\n\t\tconst actionValue = candidate.action;\n\t\tif (typeof pathValue !== \"string\" || typeof actionValue !== \"string\") return json({\n\t\t\terror: \"invalid_request\",\n\t\t\tmessage: \"path/action must be strings.\"\n\t\t}, { status: 400 });\n\t\tif (!VALID_ACTIONS.includes(actionValue)) return json({\n\t\t\terror: \"invalid_request\",\n\t\t\tmessage: `Unknown action: ${actionValue}`\n\t\t}, { status: 400 });\n\t\trows.push({\n\t\t\tpath: pathValue,\n\t\t\taction: actionValue,\n\t\t\tconfirmReplace: candidate.confirmReplace === true ? true : void 0\n\t\t});\n\t}\n\tconst rootDir = resolveProjectRoot();\n\tconst plan = await buildMigrationPlan(rootDir, rows);\n\tconst preview = await previewMigrationPlan(rootDir, plan);\n\tconst requiresReplaceConfirmation = plan.resolved.some((entry) => entry.action === \"replace-generated-owned\");\n\treturn json({\n\t\tplanToken: storeMigrationPlan({\n\t\t\tserializedPlan: JSON.stringify({ writes: plan.writes.map((w) => ({\n\t\t\t\tpath: w.path,\n\t\t\t\tbytesBase64: Buffer.from(w.bytes).toString(\"base64\")\n\t\t\t})) }),\n\t\t\trequiresReplaceConfirmation\n\t\t}),\n\t\texpiresAt: new Date(Date.now() + 6e4).toISOString(),\n\t\tcounts: preview.counts,\n\t\tactions: preview.actions,\n\t\tresolved: plan.resolved,\n\t\trefusals: plan.refusals,\n\t\trequiresReplaceConfirmation\n\t});\n};\nfunction isRecord(v) {\n\treturn typeof v === \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,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AAChE;;;;"}
@@ -0,0 +1,18 @@
1
+ import { r as resolveProjectRoot } from './projectContext-B1D-bieW.js';
2
+ import { b as buildMigrationReport } from './migrationReport-f6NoxAVZ.js';
3
+ import { j as json } from './index-CLnuRv4X.js';
4
+ import 'node:fs/promises';
5
+ import 'process';
6
+ import 'buffer';
7
+ import 'node:util';
8
+ import 'node:path';
9
+ import 'node:crypto';
10
+ import './index-DBqjc0Yf.js';
11
+
12
+ //#region src/routes/api/migration/+server.ts
13
+ var GET = async () => {
14
+ return json(await buildMigrationReport(resolveProjectRoot()));
15
+ };
16
+
17
+ export { GET };
18
+ //# sourceMappingURL=_server.ts-DPqZOGG_.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_server.ts-DPqZOGG_.js","sources":["../../../.svelte-kit/adapter-node/entries/endpoints/api/migration/_server.ts.js"],"sourcesContent":["import { r as resolveProjectRoot } from \"../../../../chunks/projectContext.js\";\nimport { t as buildMigrationReport } from \"../../../../chunks/migrationReport.js\";\nimport { json } from \"@sveltejs/kit\";\n//#region src/routes/api/migration/+server.ts\nvar GET = async () => {\n\treturn json(await buildMigrationReport(resolveProjectRoot()));\n};\n//#endregion\nexport { GET };\n"],"names":[],"mappings":";;;;;;;;;;;AAGA;AACG,IAAC,GAAG,GAAG,YAAY;AACtB,CAAC,OAAO,IAAI,CAAC,MAAM,oBAAoB,CAAC,kBAAkB,EAAE,CAAC,CAAC;AAC9D;;;;"}