failproofai 1.0.11-beta.0 → 1.0.11-beta.2

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 (975) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +109 -9
  3. package/.next/standalone/.next/prerender-manifest.json +6 -6
  4. package/.next/standalone/.next/required-server-files.json +17 -2
  5. package/.next/standalone/.next/server/app/_global-error/page/build-manifest.json +8 -6
  6. package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +2 -3
  7. package/.next/standalone/.next/server/app/_global-error/page.js +13 -8
  8. package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
  9. package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  11. package/.next/standalone/.next/server/app/_global-error.rsc +17 -13
  12. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +19 -15
  13. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +17 -13
  14. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +2 -1
  15. package/.next/standalone/.next/server/app/_not-found/page/build-manifest.json +8 -6
  16. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +2 -3
  17. package/.next/standalone/.next/server/app/_not-found/page.js +17 -12
  18. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  19. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  20. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  21. package/.next/standalone/.next/server/app/_not-found.rsc +32 -21
  22. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +32 -21
  23. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +37 -27
  24. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +4 -2
  25. package/.next/standalone/.next/server/app/api/audit/invite/route.js +11 -7
  26. package/.next/standalone/.next/server/app/api/audit/invite/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/audit/run/route.js +38 -11
  28. package/.next/standalone/.next/server/app/api/audit/run/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/audit/status/route.js +6 -4
  30. package/.next/standalone/.next/server/app/api/audit/status/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/api/auth/login-request/route.js +10 -6
  32. package/.next/standalone/.next/server/app/api/auth/login-request/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/auth/login-verify/route.js +11 -7
  34. package/.next/standalone/.next/server/app/api/auth/login-verify/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/api/auth/logout/route.js +11 -6
  36. package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/api/auth/status/route.js +11 -6
  38. package/.next/standalone/.next/server/app/api/auth/status/route.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js +6 -4
  40. package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/audit/page/build-manifest.json +8 -6
  42. package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +4 -6
  43. package/.next/standalone/.next/server/app/audit/page.js +26 -19
  44. package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -1
  45. package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
  46. package/.next/standalone/.next/server/app/index.html +1 -1
  47. package/.next/standalone/.next/server/app/index.rsc +30 -20
  48. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +34 -25
  49. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +30 -20
  50. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +3 -2
  51. package/.next/standalone/.next/server/app/page/build-manifest.json +8 -6
  52. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +2 -3
  53. package/.next/standalone/.next/server/app/page.js +20 -14
  54. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  55. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  56. package/.next/standalone/.next/server/app/policies/page/build-manifest.json +8 -6
  57. package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +28 -42
  58. package/.next/standalone/.next/server/app/policies/page.js +30 -21
  59. package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
  60. package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
  61. package/.next/standalone/.next/server/app/project/[name]/page/build-manifest.json +8 -6
  62. package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +2 -3
  63. package/.next/standalone/.next/server/app/project/[name]/page.js +44 -20
  64. package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
  65. package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
  66. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/build-manifest.json +8 -6
  67. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
  68. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +4 -6
  69. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js +39 -23
  70. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
  71. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
  72. package/.next/standalone/.next/server/app/projects/page/build-manifest.json +8 -6
  73. package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +2 -3
  74. package/.next/standalone/.next/server/app/projects/page.js +24 -16
  75. package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
  76. package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  77. package/.next/standalone/.next/server/app/settings/page/build-manifest.json +8 -6
  78. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +16 -24
  79. package/.next/standalone/.next/server/app/settings/page.js +30 -22
  80. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  81. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  82. package/.next/standalone/.next/server/chunks/1oeh_server_app_api_download_[project]_[session]_route_actions_1is7vs762er-g.js +3 -0
  83. package/.next/standalone/.next/server/chunks/[externals]__08d8xc5bifn8z._.js +3 -0
  84. package/.next/standalone/.next/server/chunks/{[externals]__0h0p9dm._.js → [externals]__0h0p9dmv_e7r7._.js} +1 -1
  85. package/.next/standalone/.next/server/chunks/{[externals]__0hjaw70._.js → [externals]__0hjaw70fchx66._.js} +1 -1
  86. package/.next/standalone/.next/server/chunks/{[externals]__1oenfmn._.js → [externals]__0qkp92tjfvw8r._.js} +1 -1
  87. package/.next/standalone/.next/server/chunks/[externals]__105ihae9i2b_d._.js +3 -0
  88. package/.next/standalone/.next/server/chunks/{[externals]__0sds_16._.js → [externals]__1_407huhlmj1m._.js} +1 -1
  89. package/.next/standalone/.next/server/chunks/[externals]__1k8s9m68ew993._.js +3 -0
  90. package/.next/standalone/.next/server/chunks/{[externals]__0d7i9ea._.js → [externals]__1rlxpymm37wel._.js} +1 -1
  91. package/.next/standalone/.next/server/chunks/{[externals]__1s462yl._.js → [externals]__1s462ylxpc7-5._.js} +1 -1
  92. package/.next/standalone/.next/server/chunks/[externals]_node_net_1yam_zj43-40b._.js +3 -0
  93. package/.next/standalone/.next/server/chunks/{[externals]_node_os_0by37l-._.js → [externals]_node_os_0by37l-11q5ls._.js} +1 -1
  94. package/.next/standalone/.next/server/chunks/[root-of-the-server]__07l68zv0hqdiu._.js +3 -0
  95. package/.next/standalone/.next/server/chunks/[root-of-the-server]__08dchfudh2_4f._.js +3 -0
  96. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_0xu5zkw15bs._.js +3 -0
  97. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0car70pylmvor._.js +3 -0
  98. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0jz5xqu-p_lfc._.js +3 -0
  99. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0spt0kv8azrpl._.js +3 -0
  100. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0swiyzbmvja2d._.js +327 -0
  101. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0u3i025_setk_._.js +3 -0
  102. package/.next/standalone/.next/server/chunks/[root-of-the-server]__10a2f6s636yc7._.js +3 -0
  103. package/.next/standalone/.next/server/chunks/[root-of-the-server]__168oo8wb5n23f._.js +3 -0
  104. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1ey11fel2q2qw._.js +3 -0
  105. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1izwqj_ij_9x_._.js +3 -0
  106. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1qt5u58xrcuk6._.js +3 -0
  107. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1r7kbfkiw2xmu._.js +322 -0
  108. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1ztigqa01tigq._.js +3 -0
  109. package/.next/standalone/.next/server/chunks/[turbopack]_runtime.js +146 -16
  110. package/.next/standalone/.next/server/chunks/_09dz7xva4ce_2._.js +27 -0
  111. package/.next/standalone/.next/server/chunks/_0hf5q4xzyg40j._.js +3 -0
  112. package/.next/standalone/.next/server/chunks/_0p53ge1jmkucy._.js +3 -0
  113. package/.next/standalone/.next/server/chunks/_0tovk6q0miud6._.js +3 -0
  114. package/.next/standalone/.next/server/chunks/_0trp3ycqv17cl._.js +3 -0
  115. package/.next/standalone/.next/server/chunks/_1-2owkp-1_987._.js +3 -0
  116. package/.next/standalone/.next/server/chunks/_13ltj8a9z92o8._.js +3 -0
  117. package/.next/standalone/.next/server/chunks/_15k37au70vjvg._.js +3 -0
  118. package/.next/standalone/.next/server/chunks/_18rfu4__wjhwb._.js +3 -0
  119. package/.next/standalone/.next/server/chunks/_19011-u44143j._.js +3 -0
  120. package/.next/standalone/.next/server/chunks/_1ek68lnh2daur._.js +33 -0
  121. package/.next/standalone/.next/server/chunks/_1fz8m31sndkcu._.js +3 -0
  122. package/.next/standalone/.next/server/chunks/_1ixl-kxq_ctsa._.js +3 -0
  123. package/.next/standalone/.next/server/chunks/_1ogwigfb0163w._.js +3 -0
  124. package/.next/standalone/.next/server/chunks/_1vslkoe35wok6._.js +3 -0
  125. package/.next/standalone/.next/server/chunks/{_next-internal_server_app_api_audit_invite_route_actions_0-2n5sy.js → _next-internal_server_app_api_audit_invite_route_actions_0-2n5sycrn1ab.js} +1 -1
  126. package/.next/standalone/.next/server/chunks/{_next-internal_server_app_api_audit_run_route_actions_1qgp9io.js → _next-internal_server_app_api_audit_run_route_actions_1qgp9iombfpdn.js} +1 -1
  127. package/.next/standalone/.next/server/chunks/{_next-internal_server_app_api_audit_status_route_actions_1f7pjof.js → _next-internal_server_app_api_audit_status_route_actions_1f7pjofwh4n7b.js} +1 -1
  128. package/.next/standalone/.next/server/chunks/{_next-internal_server_app_api_auth_login-request_route_actions_1c49co0.js → _next-internal_server_app_api_auth_login-request_route_actions_1c49co0x3-dl8.js} +1 -1
  129. package/.next/standalone/.next/server/chunks/{_next-internal_server_app_api_auth_login-verify_route_actions_1r3slzk.js → _next-internal_server_app_api_auth_login-verify_route_actions_1r3slzk0v320p.js} +1 -1
  130. package/.next/standalone/.next/server/chunks/{_next-internal_server_app_api_auth_logout_route_actions_0regwyr.js → _next-internal_server_app_api_auth_logout_route_actions_0regwyrnie28t.js} +1 -1
  131. package/.next/standalone/.next/server/chunks/{_next-internal_server_app_api_auth_status_route_actions_1aho9zu.js → _next-internal_server_app_api_auth_status_route_actions_1aho9zu4gx9_5.js} +1 -1
  132. package/.next/standalone/.next/server/chunks/lib_11qmqmccehybz._.js +3 -0
  133. package/.next/standalone/.next/server/chunks/lib_1sezqnatvr8j-._.js +3 -0
  134. package/.next/standalone/.next/server/chunks/lib_antigravity-projects_ts_0hdx6fkrln72c._.js +3 -0
  135. package/.next/standalone/.next/server/chunks/lib_antigravity-sessions_ts_0jayregp7h3h5._.js +3 -0
  136. package/.next/standalone/.next/server/chunks/lib_auth_api-server-client_ts_1r1w6kn8-org8._.js +3 -0
  137. package/.next/standalone/.next/server/chunks/lib_auth_auth-store_ts_03o40zz0emkkg._.js +3 -0
  138. package/.next/standalone/.next/server/chunks/lib_codex-projects_ts_0di6zenec7h7n._.js +3 -0
  139. package/.next/standalone/.next/server/chunks/lib_codex-sessions_ts_17znrhpys8lz9._.js +3 -0
  140. package/.next/standalone/.next/server/chunks/lib_copilot-projects_ts_00-tojoja20ke._.js +3 -0
  141. package/.next/standalone/.next/server/chunks/lib_copilot-sessions_ts_200_qjwcll3_i._.js +3 -0
  142. package/.next/standalone/.next/server/chunks/lib_cursor-projects_ts_1carno5mv3ix_._.js +3 -0
  143. package/.next/standalone/.next/server/chunks/lib_cursor-sessions_ts_1lq8fkhczl3_y._.js +3 -0
  144. package/.next/standalone/.next/server/chunks/lib_devin-sessions_ts_0kirblxnhsnmd._.js +3 -0
  145. package/.next/standalone/.next/server/chunks/lib_factory-projects_ts_1eo_bk-vm4wdz._.js +3 -0
  146. package/.next/standalone/.next/server/chunks/lib_factory-sessions_ts_0lwe8buimuthh._.js +3 -0
  147. package/.next/standalone/.next/server/chunks/lib_goose-sessions_ts_15jnf4alr5isl._.js +3 -0
  148. package/.next/standalone/.next/server/chunks/lib_hermes-profiles_ts_0jki1620x7wxh._.js +3 -0
  149. package/.next/standalone/.next/server/chunks/lib_hermes-projects_ts_0h9ny-woruqft._.js +3 -0
  150. package/.next/standalone/.next/server/chunks/lib_hermes-sessions_ts_1bo14h38efuti._.js +3 -0
  151. package/.next/standalone/.next/server/chunks/lib_log-entries_ts_0e1mnh5npsol1._.js +3 -0
  152. package/.next/standalone/.next/server/chunks/{lib_logger_ts_07e65t5._.js → lib_logger_ts_07e65t5sy13vi._.js} +1 -1
  153. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0faqz9x._.js → lib_openclaw-db_ts_0nax8ld9h9ii8._.js} +5 -5
  154. package/.next/standalone/.next/server/chunks/lib_openclaw-projects_ts_0gc-p24z7gzy8._.js +3 -0
  155. package/.next/standalone/.next/server/chunks/lib_openclaw-sessions_ts_06lc8rgfj4huq._.js +3 -0
  156. package/.next/standalone/.next/server/chunks/lib_opencode-projects_ts_1r-bu98cz4660._.js +3 -0
  157. package/.next/standalone/.next/server/chunks/lib_opencode-sessions_ts_0fdxj6q_np7ll._.js +3 -0
  158. package/.next/standalone/.next/server/chunks/lib_pi-projects_ts_1_cy5lfxd21kv._.js +3 -0
  159. package/.next/standalone/.next/server/chunks/lib_pi-sessions_ts_09ha0x-gi38y1._.js +3 -0
  160. package/.next/standalone/.next/server/chunks/lib_projects_ts_01v279z8xccq4._.js +3 -0
  161. package/.next/standalone/.next/server/chunks/lib_telemetry-id_ts_1k8gj9ot530oy._.js +3 -0
  162. package/.next/standalone/.next/server/chunks/lib_telemetry_ts_0dctyyw_s81oo._.js +3 -0
  163. package/.next/standalone/.next/server/chunks/lib_telemetry_ts_1cx7iwiprqsm6._.js +3 -0
  164. package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_01r25oigsgz07._.js +4 -0
  165. package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_077n_4ip5__fu._.js +3 -0
  166. package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_09z9-p77cu37y._.js +4 -0
  167. package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_0mqvvxcn6v0op._.js +3 -0
  168. package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_0pb7ds5g0vzgn._.js +3 -0
  169. package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_1gasm5xkeqmm3._.js +3 -0
  170. package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_1q1heqmkhh8l4._.js +3 -0
  171. package/.next/standalone/.next/server/chunks/{package_json_[json]_cjs_1nxcc4v._.js → package_json_[json]_cjs_1nxcc4vkpxxu7._.js} +2 -2
  172. package/.next/standalone/.next/server/chunks/src_hooks_1aveq0uhs2t1b._.js +5 -0
  173. package/.next/standalone/.next/server/chunks/src_hooks_1eem5a7cyqlb2._.js +3 -0
  174. package/.next/standalone/.next/server/chunks/src_hooks_custom-hooks-loader_ts_0lnb3n3h94wnn._.js +12 -0
  175. package/.next/standalone/.next/server/chunks/src_hooks_daemon-client_ts_0il_yu1zc0291._.js +3 -0
  176. package/.next/standalone/.next/server/chunks/src_hooks_fp-config_ts_0ow57t1myy6o_._.js +3 -0
  177. package/.next/standalone/.next/server/chunks/src_hooks_fp-home_ts_09kv0bn_4twyh._.js +3 -0
  178. package/.next/standalone/.next/server/chunks/ssr/{[externals]__0ilfh9m._.js → [externals]__0ilfh9mfnzsth._.js} +1 -1
  179. package/.next/standalone/.next/server/chunks/ssr/{[externals]__0ohnuzs._.js → [externals]__0ohnuzsaozaca._.js} +1 -1
  180. package/.next/standalone/.next/server/chunks/ssr/{[externals]__0vmspq5._.js → [externals]__12qr51qgrrt6o._.js} +2 -2
  181. package/.next/standalone/.next/server/chunks/ssr/[externals]_fs_promises_03norioyty3bq._.js +3 -0
  182. package/.next/standalone/.next/server/chunks/ssr/[externals]_node_net_1yam_zj43-40b._.js +3 -0
  183. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__075uro8t92s0_._.js +14 -0
  184. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0888k4s6spfmh._.js +3 -0
  185. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__08ch3staq3ejw._.js +3 -0
  186. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__08t6vt57mg_42._.js +3 -0
  187. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0_bflu046ep5j._.js +3 -0
  188. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0bigvy9xmv2ka._.js +3 -0
  189. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0fdwgktjfhedo._.js +3 -0
  190. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h1jw32uvrhh0._.js +3 -0
  191. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h86bl2qf0k_o._.js +3 -0
  192. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0hvw4ifjuhdn7._.js +3 -0
  193. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0pia5h3p8re4c._.js +3 -0
  194. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0s4deza787asx._.js +3 -0
  195. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0vcyntk4snf0f._.js +3 -0
  196. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1-9s1nsw-5q8o._.js +3 -0
  197. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1-ey9fgesfbc0._.js +3 -0
  198. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11ujqychsg_3_._.js +3 -0
  199. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__123o89o2a1ht0._.js +3 -0
  200. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__13whohpm024qr._.js +3 -0
  201. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__15bi9em2xe0x2._.js +3 -0
  202. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__15usvs-ms-0hf._.js +3 -0
  203. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__16gb3_92zvk5x._.js +3 -0
  204. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__18qe-hu0gwqm4._.js +3 -0
  205. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1_p_9xe520fex._.js +3 -0
  206. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1_xbg2kx30wp-._.js +3 -0
  207. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1avi2kypusyb_._.js +3 -0
  208. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1czstykkitjd8._.js +3 -0
  209. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1fmhm8_s9i4re._.js +3 -0
  210. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1g76awtnmimd1._.js +3 -0
  211. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1l1qgu5mfapkh._.js +3 -0
  212. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1ob2uzmms1adf._.js +3 -0
  213. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1pczevlpk5lxh._.js +3 -0
  214. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1r7drlqli-ado._.js +3 -0
  215. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1vxwetblyf8vp._.js +3 -0
  216. package/.next/standalone/.next/server/chunks/ssr/[turbopack]_runtime.js +146 -16
  217. package/.next/standalone/.next/server/chunks/ssr/_0-f9uotv7v2n9._.js +3 -0
  218. package/.next/standalone/.next/server/chunks/ssr/_00e4_rvim31u_._.js +3 -0
  219. package/.next/standalone/.next/server/chunks/ssr/_00qm74p9x8cwt._.js +3 -0
  220. package/.next/standalone/.next/server/chunks/ssr/_0bseae9u7g98r._.js +3 -0
  221. package/.next/standalone/.next/server/chunks/ssr/_0eoura3_9gjb-._.js +25 -0
  222. package/.next/standalone/.next/server/chunks/ssr/_0kqw2_f1ywmpo._.js +3 -0
  223. package/.next/standalone/.next/server/chunks/ssr/_0mouhaflye1ro._.js +3 -0
  224. package/.next/standalone/.next/server/chunks/ssr/_0pedwblqdoh58._.js +3 -0
  225. package/.next/standalone/.next/server/chunks/ssr/_0tfqha481f033._.js +4 -0
  226. package/.next/standalone/.next/server/chunks/ssr/_1_ozgifqv1ssi._.js +3 -0
  227. package/.next/standalone/.next/server/chunks/ssr/_1a516zcgtqius._.js +3 -0
  228. package/.next/standalone/.next/server/chunks/ssr/_1ddpc5gj57uuf._.js +3 -0
  229. package/.next/standalone/.next/server/chunks/ssr/_1djqs9i27e4kg._.js +3 -0
  230. package/.next/standalone/.next/server/chunks/ssr/_1ew6ra24vt-ij._.js +3 -0
  231. package/.next/standalone/.next/server/chunks/ssr/_1gb0ifpkowwub._.js +234 -0
  232. package/.next/standalone/.next/server/chunks/ssr/_1or8gixmrpv5i._.js +3 -0
  233. package/.next/standalone/.next/server/chunks/ssr/_1s8zk-upxzp00._.js +3 -0
  234. package/.next/standalone/.next/server/chunks/ssr/_1u9tpla2o6utw._.js +3 -0
  235. package/.next/standalone/.next/server/chunks/ssr/_1v4_ul3sj2lq_._.js +3 -0
  236. package/.next/standalone/.next/server/chunks/ssr/_1y3xzro8ca8t6._.js +3 -0
  237. package/.next/standalone/.next/server/chunks/ssr/_20hn4gn87nsjc._.js +3 -0
  238. package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_policies_page_actions_1sp2-yo5_vm5f.js +17 -0
  239. package/.next/standalone/.next/server/chunks/ssr/app_087bt9wus25zs._.js +3 -0
  240. package/.next/standalone/.next/server/chunks/ssr/app_0trz6ik19xz5_._.js +3 -0
  241. package/.next/standalone/.next/server/chunks/ssr/app_1fvisnppn1unv._.js +3 -0
  242. package/.next/standalone/.next/server/chunks/ssr/app_209u41o446my6._.js +3 -0
  243. package/.next/standalone/.next/server/chunks/ssr/app_actions_get-scheduled-audit_ts_0ei9snixb5fd-._.js +3 -0
  244. package/.next/standalone/.next/server/chunks/ssr/app_audit_0hku_y73ischw._.js +3 -0
  245. package/.next/standalone/.next/server/chunks/ssr/{app_audit__components_audit-dashboard_tsx_0p9ud47._.js → app_audit__components_audit-dashboard_tsx_0p9ud47q0xq5w._.js} +3 -3
  246. package/.next/standalone/.next/server/chunks/ssr/{app_audit_loading_tsx_1j1kc6j._.js → app_audit_loading_tsx_1j1kc6j4v4-rl._.js} +1 -1
  247. package/.next/standalone/.next/server/chunks/ssr/app_components_project-list_tsx_1ke6anr0vt64h._.js +3 -0
  248. package/.next/standalone/.next/server/chunks/ssr/app_components_sessions-list_tsx_0gysftd_pn1m8._.js +3 -0
  249. package/.next/standalone/.next/server/chunks/ssr/app_error_tsx_15zfp7nrwf_b6._.js +3 -0
  250. package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_0w002m_ccu8zg._.js +3 -0
  251. package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x33jqb6._.js +3 -0
  252. package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpcz0uxur._.js +8 -0
  253. package/.next/standalone/.next/server/chunks/ssr/app_project_[name]_error_tsx_08qg6ncy93-17._.js +3 -0
  254. package/.next/standalone/.next/server/chunks/ssr/{app_project_[name]_loading_tsx_05-l4uf._.js → app_project_[name]_loading_tsx_05-l4uf5vgzpv._.js} +1 -1
  255. package/.next/standalone/.next/server/chunks/ssr/app_project_[name]_session_[sessionId]_error_tsx_0rf4j1nefwesi._.js +3 -0
  256. package/.next/standalone/.next/server/chunks/ssr/{app_project_[name]_session_[sessionId]_loading_tsx_0l4aixs._.js → app_project_[name]_session_[sessionId]_loading_tsx_0l4aixs89x_2g._.js} +1 -1
  257. package/.next/standalone/.next/server/chunks/ssr/{app_projects_loading_tsx_20-3u8b._.js → app_projects_loading_tsx_20-3u8bb2wqz2._.js} +1 -1
  258. package/.next/standalone/.next/server/chunks/ssr/app_settings_02tf1h47jmhhd._.js +3 -0
  259. package/.next/standalone/.next/server/chunks/ssr/lib_16jvhmthj_k3a._.js +3 -0
  260. package/.next/standalone/.next/server/chunks/ssr/lib_antigravity-projects_ts_0_6zf11xjo990._.js +3 -0
  261. package/.next/standalone/.next/server/chunks/ssr/lib_antigravity-sessions_ts_1xf7so6xrlevb._.js +3 -0
  262. package/.next/standalone/.next/server/chunks/ssr/lib_codex-projects_ts_0pqlw37q6qrb-._.js +3 -0
  263. package/.next/standalone/.next/server/chunks/ssr/lib_copilot-projects_ts_19wl7tpiv2zyg._.js +3 -0
  264. package/.next/standalone/.next/server/chunks/ssr/lib_cursor-projects_ts_18-iwyks4twze._.js +3 -0
  265. package/.next/standalone/.next/server/chunks/ssr/lib_devin-projects_ts_0a64qdyjacs0k._.js +3 -0
  266. package/.next/standalone/.next/server/chunks/ssr/lib_devin-sessions_ts_02u5rpzqjmxdw._.js +3 -0
  267. package/.next/standalone/.next/server/chunks/ssr/lib_factory-projects_ts_1uyaahq_zte1q._.js +3 -0
  268. package/.next/standalone/.next/server/chunks/ssr/lib_factory-sessions_ts_1tx9qelwapqun._.js +3 -0
  269. package/.next/standalone/.next/server/chunks/ssr/lib_format-duration_ts_09vnd_qdginp7._.js +3 -0
  270. package/.next/standalone/.next/server/chunks/ssr/lib_goose-projects_ts_0zkscrisyu15q._.js +3 -0
  271. package/.next/standalone/.next/server/chunks/ssr/lib_goose-sessions_ts_0-aebo0qkd1z9._.js +3 -0
  272. package/.next/standalone/.next/server/chunks/ssr/lib_hermes-profiles_ts_01q9fd6hz34il._.js +3 -0
  273. package/.next/standalone/.next/server/chunks/ssr/lib_hermes-projects_ts_05b8-itvkrig2._.js +3 -0
  274. package/.next/standalone/.next/server/chunks/ssr/lib_hermes-sessions_ts_076dzms3cnx9r._.js +3 -0
  275. package/.next/standalone/.next/server/chunks/ssr/lib_log-entries_ts_0vp7lm0yx4iba._.js +3 -0
  276. package/.next/standalone/.next/server/chunks/ssr/lib_openclaw-projects_ts_0qxq3bp7gsa2t._.js +3 -0
  277. package/.next/standalone/.next/server/chunks/ssr/lib_openclaw-sessions_ts_1f78qf2fle0uv._.js +22 -0
  278. package/.next/standalone/.next/server/chunks/ssr/lib_opencode-db_ts_18dv-h5ry0uo9._.js +3 -0
  279. package/.next/standalone/.next/server/chunks/ssr/lib_opencode-projects_ts_15bjxkmp2wls4._.js +3 -0
  280. package/.next/standalone/.next/server/chunks/ssr/lib_pi-projects_ts_1wikofbccx6w1._.js +3 -0
  281. package/.next/standalone/.next/server/chunks/ssr/lib_projects_ts_0f-jqrg5ftipx._.js +3 -0
  282. package/.next/standalone/.next/server/chunks/ssr/{lib_utils_ts_0az0sfq._.js → lib_utils_ts_0az0sfq5wo-3f._.js} +2 -2
  283. package/.next/standalone/.next/server/chunks/ssr/node_modules_05vgn62--7c5e._.js +3 -0
  284. package/.next/standalone/.next/server/chunks/ssr/node_modules_09s4n108bqreq._.js +3 -0
  285. package/.next/standalone/.next/server/chunks/ssr/node_modules_0dad4au22rq0p._.js +3 -0
  286. package/.next/standalone/.next/server/chunks/ssr/node_modules_0gxlxpuufujz9._.js +33 -0
  287. package/.next/standalone/.next/server/chunks/ssr/node_modules_html-to-image_es_index_15q9vt1a-slcq.js +3 -0
  288. package/.next/standalone/.next/server/chunks/ssr/{node_modules_html-to-image_es_index_1ao30b1.js → node_modules_html-to-image_es_index_1ao30b1e-jmzy.js} +2 -2
  289. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_0zuikgt2xho-v._.js +271 -0
  290. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_0janj0i6dqko7._.js +6 -0
  291. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_158jo-9mwvgad._.js +291 -0
  292. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_19r82zsxo2jj1._.js +291 -0
  293. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_1dupwucoqt5qm._.js +3 -0
  294. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_1et9oq9q9-y3v._.js +3 -0
  295. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j32_ibz4._.js +3 -0
  296. package/.next/standalone/.next/server/chunks/ssr/{node_modules_next_dist_client_components_builtin_forbidden_0symwr9.js → node_modules_next_dist_client_components_builtin_forbidden_0symwr9mbf-fh.js} +1 -1
  297. package/.next/standalone/.next/server/chunks/ssr/{node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0x.js → node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0xky89qu.js} +1 -1
  298. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_compiled_@edge-runtime_cookies_index_1kiz_an963mbg.js +3 -0
  299. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0-uvagv_giw2o.js +3 -0
  300. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_03c7gi5rntgf9.js +3 -0
  301. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_09p-8omsyjg4b.js +3 -0
  302. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0dwo94s84hht0.js +3 -0
  303. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0v-kfiu0qiy63.js +3 -0
  304. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0xrgzyzq__1k6.js +3 -0
  305. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1806lsc28_bd0.js +3 -0
  306. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1j6dd-erq474h.js +3 -0
  307. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1sa65r-crehoe.js +3 -0
  308. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_shared_lib_03w27x2kh17_8._.js +23 -0
  309. package/.next/standalone/.next/server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_0dagmbznysrc2._.js +3 -0
  310. package/.next/standalone/.next/server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_11bnuznb72p7z._.js +4 -0
  311. package/.next/standalone/.next/server/chunks/ssr/package_json_[json]_cjs_013tntikdft59._.js +3 -0
  312. package/.next/standalone/.next/server/chunks/ssr/src_audit_dashboard-cache_ts_1-v0y_pr_b4vx._.js +3 -0
  313. package/.next/standalone/.next/server/chunks/ssr/src_hooks_0-q0ummbuhlg5._.js +3 -0
  314. package/.next/standalone/.next/server/chunks/ssr/src_hooks_06kzv9ddabn3_._.js +12 -0
  315. package/.next/standalone/.next/server/chunks/ssr/src_hooks_0g194syq7r7ql._.js +3 -0
  316. package/.next/standalone/.next/server/chunks/ssr/src_hooks_1cv9_c4l1tzrm._.js +12 -0
  317. package/.next/standalone/.next/server/chunks/ssr/src_hooks_1kx9e0dx_1-8o._.js +3 -0
  318. package/.next/standalone/.next/server/chunks/ssr/src_hooks_daemon-client_ts_0k41_i7jg6ndv._.js +3 -0
  319. package/.next/standalone/.next/server/chunks/ssr/src_hooks_daemon-service_ts_0ibufora3s_bw._.js +3 -0
  320. package/.next/standalone/.next/server/chunks/ssr/src_hooks_effective-reviewers_ts_1h4wtvo55j16x._.js +5 -0
  321. package/.next/standalone/.next/server/chunks/ssr/src_hooks_fp-config_ts_04t589gp4p60j._.js +4 -0
  322. package/.next/standalone/.next/server/chunks/ssr/src_hooks_fp-home_ts_0je3xkv_2e7f7._.js +3 -0
  323. package/.next/standalone/.next/server/chunks/ssr/src_hooks_hook-activity-store_ts_178ewqzp9cvrg._.js +3 -0
  324. package/.next/standalone/.next/server/chunks/ssr/src_hooks_pack-cli_ts_0t7me658zqmh_._.js +3 -0
  325. package/.next/standalone/.next/server/chunks/ssr/src_hooks_semantic_pack-policies_ts_0gh_bu_3oswax._.js +3 -0
  326. package/.next/standalone/.next/server/instrumentation.js +1 -1
  327. package/.next/standalone/.next/server/middleware-build-manifest.js +109 -9
  328. package/.next/standalone/.next/server/middleware.js +2 -2
  329. package/.next/standalone/.next/server/pages/404.html +1 -1
  330. package/.next/standalone/.next/server/pages/500.html +1 -1
  331. package/.next/standalone/.next/server/preview-props.json +5 -0
  332. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  333. package/.next/standalone/.next/server/server-reference-manifest.json +54 -85
  334. package/.next/standalone/.next/static/chunks/08fodmjweitv-.js +6 -0
  335. package/.next/standalone/.next/static/chunks/0dr6b-sp478i9.js +1 -0
  336. package/.next/standalone/.next/static/chunks/0m-tv1y6ghhtk.js +1 -0
  337. package/.next/standalone/.next/static/chunks/0qeojb9uu_8_e.js +1 -0
  338. package/.next/standalone/.next/static/chunks/0zw6_ase89dfk.js +1 -0
  339. package/.next/standalone/.next/static/chunks/1024g0jaymm46.js +1 -0
  340. package/.next/standalone/.next/static/chunks/165ezyyx0j1ft.js +22 -0
  341. package/.next/standalone/.next/static/chunks/{1mylcr99gccyz.js → 1v1mi4-0ziecn.js} +2 -2
  342. package/.next/standalone/.next/static/chunks/{3_e_wg5_oay87.css → 26c4gmdpsthv6.css} +1 -1
  343. package/.next/standalone/.next/static/chunks/276ifklxc2-x4.js +1 -0
  344. package/.next/standalone/.next/static/chunks/281u-2vtn53n5.js +1 -0
  345. package/.next/standalone/.next/static/chunks/2_sj5ssr_m_wm.js +1 -0
  346. package/.next/standalone/.next/static/chunks/2cn0x2d6tyiuq.js +31 -0
  347. package/.next/standalone/.next/static/chunks/{34jpdb2xjm-x7.js → 2j5zpvs3pd7mw.js} +1 -1
  348. package/.next/standalone/.next/static/chunks/2l7j1dpmejuqn.js +1 -0
  349. package/.next/standalone/.next/static/chunks/2ojf3r8g4tn7s.js +1 -0
  350. package/.next/standalone/.next/static/chunks/2zyrjasvbmwpq.js +1 -0
  351. package/.next/standalone/.next/static/chunks/31fan-ze541d1.js +1 -0
  352. package/.next/standalone/.next/static/chunks/32s3y34p0t2pe.js +1 -0
  353. package/.next/standalone/.next/static/chunks/36re0fegaocq-.js +1 -0
  354. package/.next/standalone/.next/static/chunks/3fhk60ouw_ae6.js +1 -0
  355. package/.next/standalone/.next/static/chunks/3oin924a_3ohe.js +1 -0
  356. package/.next/standalone/.next/static/chunks/{3zkg2s2vzxc3d.js → 3vpfbqzaue6_i.js} +1 -1
  357. package/.next/standalone/.next/static/chunks/3xhybr6ywsmdf.js +1 -0
  358. package/.next/standalone/.next/static/chunks/turbopack-3-ry682tkyiqk.js +1 -0
  359. package/.next/standalone/fp-cloud-cli/uv.lock +6 -6
  360. package/.next/standalone/hermes-plugin/plugin.yaml +1 -1
  361. package/.next/standalone/node_modules/@next/env/package.json +1 -1
  362. package/.next/standalone/node_modules/next/dist/build/define-env.js +12 -18
  363. package/.next/standalone/node_modules/next/dist/build/next-config-ts/transpile-config.js +1 -5
  364. package/.next/standalone/node_modules/next/dist/build/nft.js +119 -0
  365. package/.next/standalone/node_modules/next/dist/build/segment-config/app/app-segment-config.js +19 -5
  366. package/.next/standalone/node_modules/next/dist/build/segment-config/app/app-segments.js +120 -29
  367. package/.next/standalone/node_modules/next/dist/build/segment-config/app/collect-root-param-keys.js +1 -5
  368. package/.next/standalone/node_modules/next/dist/build/static-paths/app/extract-pathname-route-param-segments-from-loader-tree.js +8 -2
  369. package/.next/standalone/node_modules/next/dist/build/static-paths/app.js +230 -133
  370. package/.next/standalone/node_modules/next/dist/build/static-paths/pages.js +8 -40
  371. package/.next/standalone/node_modules/next/dist/build/static-paths/param-matching.js +200 -0
  372. package/.next/standalone/node_modules/next/dist/build/swc/index.js +92 -162
  373. package/.next/standalone/node_modules/next/dist/build/utils.js +180 -90
  374. package/.next/standalone/node_modules/next/dist/cli/next-test.js +4 -0
  375. package/.next/standalone/node_modules/next/dist/client/app-call-server.js +16 -18
  376. package/.next/standalone/node_modules/next/dist/client/components/app-router-instance.js +43 -187
  377. package/.next/standalone/node_modules/next/dist/client/components/{segment-cache/navigation.js → app-router-state.js} +88 -334
  378. package/.next/standalone/node_modules/next/dist/client/components/app-router-utils.js +1 -5
  379. package/.next/standalone/node_modules/next/dist/client/components/app-router.js +83 -74
  380. package/.next/standalone/node_modules/next/dist/client/components/dev-root-http-access-fallback-boundary.js +1 -5
  381. package/.next/standalone/node_modules/next/dist/client/components/forbidden.js +2 -10
  382. package/.next/standalone/node_modules/next/dist/client/components/handle-isr-error.js +19 -4
  383. package/.next/standalone/node_modules/next/dist/client/components/instant-samples.js +4 -11
  384. package/.next/standalone/node_modules/next/dist/client/components/links.js +6 -7
  385. package/.next/standalone/node_modules/next/dist/client/components/navigation-dynamic-rendering.js +3 -3
  386. package/.next/standalone/node_modules/next/dist/client/components/navigation-untracked.js +1 -2
  387. package/.next/standalone/node_modules/next/dist/client/components/navigation.js +2 -6
  388. package/.next/standalone/node_modules/next/dist/client/components/navigation.react-server.js +1 -5
  389. package/.next/standalone/node_modules/next/dist/client/components/navigator.js +73 -0
  390. package/.next/standalone/node_modules/next/dist/client/components/not-found.js +1 -5
  391. package/.next/standalone/node_modules/next/dist/client/components/prefetch.js +83 -0
  392. package/.next/standalone/node_modules/next/dist/client/components/readonly-url-search-params.js +0 -5
  393. package/.next/standalone/node_modules/next/dist/client/components/redirect.js +3 -15
  394. package/.next/standalone/node_modules/next/dist/client/components/{router-reducer/ppr-navigations.js → render-tree.js} +365 -400
  395. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/compute-changed-path.js +13 -5
  396. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/create-initial-router-state.js +67 -54
  397. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js +1 -7
  398. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/create-segment-key.js +42 -0
  399. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/fetch-server-response.js +71 -50
  400. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js +4 -4
  401. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/hmr-refresh-reducer.js +2 -2
  402. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js +5 -5
  403. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/refresh-reducer.js +11 -8
  404. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/restore-reducer.js +12 -9
  405. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/server-action-reducer.js +30 -29
  406. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/server-patch-reducer.js +5 -5
  407. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/router-reducer.js +2 -10
  408. package/.next/standalone/node_modules/next/dist/client/components/segment-cache/bfcache.js +11 -21
  409. package/.next/standalone/node_modules/next/dist/client/components/segment-cache/cache.js +1168 -1181
  410. package/.next/standalone/node_modules/next/dist/client/components/segment-cache/decode-server-response.js +419 -0
  411. package/.next/standalone/node_modules/next/dist/client/components/segment-cache/navigation-testing-lock.js +1 -1
  412. package/.next/standalone/node_modules/next/dist/client/components/segment-cache/optimistic-routes.js +77 -82
  413. package/.next/standalone/node_modules/next/dist/client/components/segment-cache/scheduler.js +464 -425
  414. package/.next/standalone/node_modules/next/dist/client/components/segment-cache/types.js +12 -3
  415. package/.next/standalone/node_modules/next/dist/client/components/segment-cache/vary-path.js +140 -126
  416. package/.next/standalone/node_modules/next/dist/client/components/sequential-router-queue.js +163 -0
  417. package/.next/standalone/node_modules/next/dist/client/components/unauthorized.js +2 -10
  418. package/.next/standalone/node_modules/next/dist/client/components/unstable-rethrow.js +1 -2
  419. package/.next/standalone/node_modules/next/dist/client/components/use-action-queue.js +2 -10
  420. package/.next/standalone/node_modules/next/dist/client/dev/debug-channel.js +6 -323
  421. package/.next/standalone/node_modules/next/dist/client/flight-data-helpers.js +41 -94
  422. package/.next/standalone/node_modules/next/dist/client/route-params.js +34 -12
  423. package/.next/standalone/node_modules/next/dist/client/sequential-call-server.js +45 -0
  424. package/.next/standalone/node_modules/next/dist/compiled/@mswjs/interceptors/ClientRequest/index.js +1 -1
  425. package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +203 -59
  426. package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +203 -59
  427. package/.next/standalone/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +5 -3
  428. package/.next/standalone/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +13 -13
  429. package/.next/standalone/node_modules/next/dist/compiled/react-is/package.json +1 -1
  430. package/.next/standalone/node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js +1 -1
  431. package/.next/standalone/node_modules/next/dist/experimental/testmode/fetch.js +2 -10
  432. package/.next/standalone/node_modules/next/dist/export/helpers/create-incremental-cache.js +21 -16
  433. package/.next/standalone/node_modules/next/dist/export/utils.js +37 -0
  434. package/.next/standalone/node_modules/next/dist/lib/batcher.js +2 -2
  435. package/.next/standalone/node_modules/next/dist/lib/dist-dir.js +88 -0
  436. package/.next/standalone/node_modules/next/dist/lib/download-swc.js +2 -10
  437. package/.next/standalone/node_modules/next/dist/lib/fallback.js +3 -15
  438. package/.next/standalone/node_modules/next/dist/lib/find-pages-dir.js +2 -10
  439. package/.next/standalone/node_modules/next/dist/lib/helpers/get-cache-directory.js +1 -5
  440. package/.next/standalone/node_modules/next/dist/lib/helpers/get-npx-command.js +1 -1
  441. package/.next/standalone/node_modules/next/dist/lib/helpers/get-registry.js +1 -5
  442. package/.next/standalone/node_modules/next/dist/lib/helpers/git.js +52 -7
  443. package/.next/standalone/node_modules/next/dist/lib/inline-static-env.js +1 -5
  444. package/.next/standalone/node_modules/next/dist/lib/is-error.js +3 -15
  445. package/.next/standalone/node_modules/next/dist/lib/is-serializable-props.js +6 -35
  446. package/.next/standalone/node_modules/next/dist/lib/metadata/index.js +18 -0
  447. package/.next/standalone/node_modules/next/dist/lib/metadata/metadata-elements.js +1498 -0
  448. package/.next/standalone/node_modules/next/dist/lib/metadata/metadata-parallel.js +175 -0
  449. package/.next/standalone/node_modules/next/dist/lib/metadata/metadata-resolution-primitives.js +467 -0
  450. package/.next/standalone/node_modules/next/dist/lib/metadata/metadata.js +30 -1516
  451. package/.next/standalone/node_modules/next/dist/lib/metadata/resolve-metadata-parallel.js +632 -0
  452. package/.next/standalone/node_modules/next/dist/lib/metadata/resolve-metadata.js +15 -414
  453. package/.next/standalone/node_modules/next/dist/lib/mkcert.js +4 -20
  454. package/.next/standalone/node_modules/next/dist/lib/patch-incorrect-lockfile.js +4 -8
  455. package/.next/standalone/node_modules/next/dist/lib/picocolors.js +10 -0
  456. package/.next/standalone/node_modules/next/dist/lib/pretty-bytes.js +1 -5
  457. package/.next/standalone/node_modules/next/dist/lib/recursive-delete.js +50 -11
  458. package/.next/standalone/node_modules/next/dist/lib/resolve-build-paths.js +1 -5
  459. package/.next/standalone/node_modules/next/dist/lib/resolve-from.js +2 -10
  460. package/.next/standalone/node_modules/next/dist/lib/static-env.js +1 -5
  461. package/.next/standalone/node_modules/next/dist/lib/typescript/getTypeScriptConfiguration.js +3 -15
  462. package/.next/standalone/node_modules/next/dist/lib/typescript/missingDependencyError.js +1 -5
  463. package/.next/standalone/node_modules/next/dist/lib/typescript/runTypeCheck.js +1 -9
  464. package/.next/standalone/node_modules/next/dist/lib/typescript/runTypeCheckCli.js +0 -1
  465. package/.next/standalone/node_modules/next/dist/lib/typescript/runTypeScriptCli.js +4 -16
  466. package/.next/standalone/node_modules/next/dist/lib/verify-partytown-setup.js +1 -5
  467. package/.next/standalone/node_modules/next/dist/lib/warn-missing-react-dependencies.js +33 -0
  468. package/.next/standalone/node_modules/next/dist/lib/worker.js +1 -5
  469. package/.next/standalone/node_modules/next/dist/server/accept-header.js +3 -15
  470. package/.next/standalone/node_modules/next/dist/server/after/after-context.js +5 -25
  471. package/.next/standalone/node_modules/next/dist/server/after/after.js +1 -5
  472. package/.next/standalone/node_modules/next/dist/server/after/awaiter.js +1 -5
  473. package/.next/standalone/node_modules/next/dist/server/after/run-with-after.js +2 -2
  474. package/.next/standalone/node_modules/next/dist/server/api-utils/index.js +1 -10
  475. package/.next/standalone/node_modules/next/dist/server/api-utils/node/api-resolver.js +10 -50
  476. package/.next/standalone/node_modules/next/dist/server/api-utils/node/parse-body.js +3 -15
  477. package/.next/standalone/node_modules/next/dist/server/app-render/action-async-storage-instance.js +1 -1
  478. package/.next/standalone/node_modules/next/dist/server/app-render/action-handler.js +104 -141
  479. package/.next/standalone/node_modules/next/dist/server/app-render/after-task-async-storage-instance.js +1 -1
  480. package/.next/standalone/node_modules/next/dist/server/app-render/app-render-prerender-utils.js +6 -30
  481. package/.next/standalone/node_modules/next/dist/server/app-render/app-render-render-utils.js +1 -5
  482. package/.next/standalone/node_modules/next/dist/server/app-render/app-render-scheduling.js +3 -15
  483. package/.next/standalone/node_modules/next/dist/server/app-render/app-render.js +1346 -1211
  484. package/.next/standalone/node_modules/next/dist/server/app-render/async-local-storage.js +11 -6
  485. package/.next/standalone/node_modules/next/dist/server/app-render/blocking-route-messages.js +119 -70
  486. package/.next/standalone/node_modules/next/dist/server/app-render/cache-signal.js +61 -35
  487. package/.next/standalone/node_modules/next/dist/server/app-render/collect-segment-data.js +326 -260
  488. package/.next/standalone/node_modules/next/dist/server/app-render/console-async-storage-instance.js +1 -1
  489. package/.next/standalone/node_modules/next/dist/server/app-render/create-component-tree.js +136 -160
  490. package/.next/standalone/node_modules/next/dist/server/app-render/create-error-handler.js +12 -6
  491. package/.next/standalone/node_modules/next/dist/server/app-render/create-transport-tree-from-loader-tree.js +190 -0
  492. package/.next/standalone/node_modules/next/dist/server/app-render/debug-channel-server.web.js +1 -5
  493. package/.next/standalone/node_modules/next/dist/server/app-render/dev-validation-error-delivery.js +1 -10
  494. package/.next/standalone/node_modules/next/dist/server/app-render/dev-validation-scheduler.js +4 -5
  495. package/.next/standalone/node_modules/next/dist/server/app-render/dev-validation-worker-snapshot.js +3 -1
  496. package/.next/standalone/node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js +1 -1
  497. package/.next/standalone/node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js +26 -3
  498. package/.next/standalone/node_modules/next/dist/server/app-render/dynamic-rendering-client.js +124 -0
  499. package/.next/standalone/node_modules/next/dist/server/app-render/dynamic-rendering.js +260 -329
  500. package/.next/standalone/node_modules/next/dist/server/app-render/encryption-utils.js +1 -5
  501. package/.next/standalone/node_modules/next/dist/server/app-render/encryption.js +4 -17
  502. package/.next/standalone/node_modules/next/dist/server/app-render/entry-base.js +1 -6
  503. package/.next/standalone/node_modules/next/dist/server/app-render/instant-validation/boundary-impl.js +3 -12
  504. package/.next/standalone/node_modules/next/dist/server/app-render/instant-validation/boundary-tracking.js +2 -2
  505. package/.next/standalone/node_modules/next/dist/server/app-render/instant-validation/instant-config.js +4 -12
  506. package/.next/standalone/node_modules/next/dist/server/app-render/instant-validation/instant-samples.js +13 -62
  507. package/.next/standalone/node_modules/next/dist/server/app-render/instant-validation/instant-validation.js +145 -206
  508. package/.next/standalone/node_modules/next/dist/server/app-render/instant-validation/stream-utils.js +2 -10
  509. package/.next/standalone/node_modules/next/dist/server/app-render/manifests-singleton.js +110 -38
  510. package/.next/standalone/node_modules/next/dist/server/app-render/module-loading/track-dynamic-import.js +2 -10
  511. package/.next/standalone/node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js +1 -1
  512. package/.next/standalone/node_modules/next/dist/server/app-render/parse-and-validate-flight-router-state.js +3 -15
  513. package/.next/standalone/node_modules/next/dist/server/app-render/postponed-state.js +87 -51
  514. package/.next/standalone/node_modules/next/dist/server/app-render/prospective-render-utils.js +2 -6
  515. package/.next/standalone/node_modules/next/dist/server/app-render/render-in-browser.js +27 -0
  516. package/.next/standalone/node_modules/next/dist/server/app-render/required-scripts.js +1 -5
  517. package/.next/standalone/node_modules/next/dist/server/app-render/rsc/taint.js +1 -5
  518. package/.next/standalone/node_modules/next/dist/server/app-render/segment-config/ensure-static.js +206 -0
  519. package/.next/standalone/node_modules/next/dist/server/app-render/staged-rendering.js +46 -54
  520. package/.next/standalone/node_modules/next/dist/server/app-render/stream-ops.node.js +18 -12
  521. package/.next/standalone/node_modules/next/dist/server/app-render/stream-ops.web.js +4 -20
  522. package/.next/standalone/node_modules/next/dist/server/app-render/sync-io-messages.js +2 -10
  523. package/.next/standalone/node_modules/next/dist/server/app-render/types.js +2 -1
  524. package/.next/standalone/node_modules/next/dist/server/app-render/use-flight-response.js +4 -17
  525. package/.next/standalone/node_modules/next/dist/server/app-render/vary-params.js +12 -11
  526. package/.next/standalone/node_modules/next/dist/server/app-render/walk-tree-with-flight-router-state.js +95 -97
  527. package/.next/standalone/node_modules/next/dist/server/app-render/work-async-storage-instance.js +1 -1
  528. package/.next/standalone/node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js +1 -1
  529. package/.next/standalone/node_modules/next/dist/server/app-render/work-unit-async-storage.external.js +36 -26
  530. package/.next/standalone/node_modules/next/dist/server/async-storage/draft-mode-provider.js +1 -5
  531. package/.next/standalone/node_modules/next/dist/server/async-storage/request-store.js +6 -5
  532. package/.next/standalone/node_modules/next/dist/server/async-storage/work-store.js +24 -26
  533. package/.next/standalone/node_modules/next/dist/server/base-http/node.js +1 -5
  534. package/.next/standalone/node_modules/next/dist/server/base-http/web.js +4 -12
  535. package/.next/standalone/node_modules/next/dist/server/base-server.js +346 -155
  536. package/.next/standalone/node_modules/next/dist/server/client-component-renderer-logger.js +129 -28
  537. package/.next/standalone/node_modules/next/dist/server/config-schema.js +61 -9
  538. package/.next/standalone/node_modules/next/dist/server/config-shared.js +26 -4
  539. package/.next/standalone/node_modules/next/dist/server/config.js +154 -332
  540. package/.next/standalone/node_modules/next/dist/server/dev/debug-channel.js +1 -5
  541. package/.next/standalone/node_modules/next/dist/server/dev/dev-validation-worker-pool.js +1 -0
  542. package/.next/standalone/node_modules/next/dist/server/dev/get-source-map-from-file.js +5 -25
  543. package/.next/standalone/node_modules/next/dist/server/dev/hot-middleware.js +27 -1
  544. package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +338 -200
  545. package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-types.js +3 -0
  546. package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-webpack.js +26 -20
  547. package/.next/standalone/node_modules/next/dist/server/dev/messages.js +2 -10
  548. package/.next/standalone/node_modules/next/dist/server/dev/middleware-turbopack.js +4 -20
  549. package/.next/standalone/node_modules/next/dist/server/dev/middleware-webpack.js +2 -10
  550. package/.next/standalone/node_modules/next/dist/server/dev/node-stack-frames.js +2 -19
  551. package/.next/standalone/node_modules/next/dist/server/dev/on-demand-entry-handler.js +12 -12
  552. package/.next/standalone/node_modules/next/dist/server/dev/runtime-error-state.js +220 -0
  553. package/.next/standalone/node_modules/next/dist/server/dev/serialized-errors.js +1 -5
  554. package/.next/standalone/node_modules/next/dist/server/dev/static-paths-worker.js +16 -15
  555. package/.next/standalone/node_modules/next/dist/server/dev/turbopack-utils.js +20 -36
  556. package/.next/standalone/node_modules/next/dist/server/dev/use-cache-probe-pool.js +1 -0
  557. package/.next/standalone/node_modules/next/dist/server/dev/use-cache-probe-worker.js +4 -3
  558. package/.next/standalone/node_modules/next/dist/server/dynamic-rendering-utils.js +298 -55
  559. package/.next/standalone/node_modules/next/dist/server/image-optimizer/detect-content-type.js +229 -0
  560. package/.next/standalone/node_modules/next/dist/server/image-optimizer/extract-etag.js +53 -0
  561. package/.next/standalone/node_modules/next/dist/server/image-optimizer/get-image-size.js +25 -0
  562. package/.next/standalone/node_modules/next/dist/server/image-optimizer/get-max-age.js +41 -0
  563. package/.next/standalone/node_modules/next/dist/server/image-optimizer/get-previously-cached-image-or-null.js +22 -0
  564. package/.next/standalone/node_modules/next/dist/server/image-optimizer/image-error.js +23 -0
  565. package/.next/standalone/node_modules/next/dist/server/image-optimizer/image-type.js +86 -0
  566. package/.next/standalone/node_modules/next/dist/server/image-optimizer/transform.js +227 -0
  567. package/.next/standalone/node_modules/next/dist/server/image-optimizer.js +78 -674
  568. package/.next/standalone/node_modules/next/dist/server/lib/app-info-log.js +19 -9
  569. package/.next/standalone/node_modules/next/dist/server/lib/cache-handlers/default.js +9 -13
  570. package/.next/standalone/node_modules/next/dist/server/lib/chrome-devtools-workspace.js +1 -5
  571. package/.next/standalone/node_modules/next/dist/server/lib/dedupe-fetch.js +1 -5
  572. package/.next/standalone/node_modules/next/dist/server/lib/dev-bundler-service.js +6 -6
  573. package/.next/standalone/node_modules/next/dist/server/lib/generate-agent-files.js +158 -35
  574. package/.next/standalone/node_modules/next/dist/server/lib/i18n-provider.js +1 -5
  575. package/.next/standalone/node_modules/next/dist/server/lib/incremental-cache/file-system-cache.js +14 -20
  576. package/.next/standalone/node_modules/next/dist/server/lib/incremental-cache/index.js +19 -29
  577. package/.next/standalone/node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js +1 -5
  578. package/.next/standalone/node_modules/next/dist/server/lib/lazy-module.js +1 -5
  579. package/.next/standalone/node_modules/next/dist/server/lib/lru-cache.js +1 -5
  580. package/.next/standalone/node_modules/next/dist/server/lib/mock-request.js +24 -120
  581. package/.next/standalone/node_modules/next/dist/server/lib/module-loader/node-module-loader.js +1 -5
  582. package/.next/standalone/node_modules/next/dist/server/lib/module-loader/route-module-loader.js +1 -5
  583. package/.next/standalone/node_modules/next/dist/server/lib/params-utils.js +0 -18
  584. package/.next/standalone/node_modules/next/dist/server/lib/patch-fetch.js +44 -38
  585. package/.next/standalone/node_modules/next/dist/server/lib/postponed-request-body.js +1 -5
  586. package/.next/standalone/node_modules/next/dist/server/lib/render-server.js +2 -10
  587. package/.next/standalone/node_modules/next/dist/server/lib/router-server.js +106 -36
  588. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/build-data-route.js +26 -3
  589. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/cache-life-type-utils.js +14 -45
  590. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/decode-path-params.js +1 -5
  591. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/filesystem.js +212 -31
  592. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js +61 -1
  593. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js +1 -5
  594. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/normalize-catchall-routes.js +320 -0
  595. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/proxy-request.js +2 -2
  596. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/resolve-routes.js +17 -11
  597. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/strict-route-matching-config.js +28 -0
  598. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/typegen.js +56 -10
  599. package/.next/standalone/node_modules/next/dist/server/lib/start-server.js +48 -38
  600. package/.next/standalone/node_modules/next/dist/server/lib/trace/constants.js +40 -0
  601. package/.next/standalone/node_modules/next/dist/server/lib/trace/request-insights-identity.js +1 -3
  602. package/.next/standalone/node_modules/next/dist/server/lib/trace/tracer.js +10 -10
  603. package/.next/standalone/node_modules/next/dist/server/lib/utils.js +66 -15
  604. package/.next/standalone/node_modules/next/dist/server/lib/worker-utils.js +1 -5
  605. package/.next/standalone/node_modules/next/dist/server/load-components.js +7 -2
  606. package/.next/standalone/node_modules/next/dist/server/load-manifest.external.js +16 -17
  607. package/.next/standalone/node_modules/next/dist/server/mcp/tools/utils/browser-communication.js +2 -10
  608. package/.next/standalone/node_modules/next/dist/server/mcp/tools/utils/format-errors.js +5 -5
  609. package/.next/standalone/node_modules/next/dist/server/next-server.js +130 -124
  610. package/.next/standalone/node_modules/next/dist/server/next.js +25 -37
  611. package/.next/standalone/node_modules/next/dist/server/node-environment-extensions/console-dim.external.js +1 -2
  612. package/.next/standalone/node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js +115 -62
  613. package/.next/standalone/node_modules/next/dist/server/node-environment-extensions/global-behaviors.js +1 -5
  614. package/.next/standalone/node_modules/next/dist/server/node-environment-extensions/io-utils.js +11 -10
  615. package/.next/standalone/node_modules/next/dist/server/node-environment-extensions/process-error-handlers.js +0 -9
  616. package/.next/standalone/node_modules/next/dist/server/node-environment-extensions/unhandled-rejection.external.js +1 -12
  617. package/.next/standalone/node_modules/next/dist/server/normalizers/built/app/app-page-normalizer.js +1 -1
  618. package/.next/standalone/node_modules/next/dist/server/normalizers/request/base-path.js +1 -5
  619. package/.next/standalone/node_modules/next/dist/server/normalizers/request/next-data.js +1 -5
  620. package/.next/standalone/node_modules/next/dist/server/normalizers/request/prefix.js +1 -5
  621. package/.next/standalone/node_modules/next/dist/server/og/cache-image-response.js +2 -7
  622. package/.next/standalone/node_modules/next/dist/server/patch-error-inspect.js +19 -11
  623. package/.next/standalone/node_modules/next/dist/server/pipe-readable.js +42 -30
  624. package/.next/standalone/node_modules/next/dist/server/render-result.js +5 -17
  625. package/.next/standalone/node_modules/next/dist/server/render.js +37 -183
  626. package/.next/standalone/node_modules/next/dist/server/request/cache-stages.js +250 -0
  627. package/.next/standalone/node_modules/next/dist/server/request/connection.js +9 -40
  628. package/.next/standalone/node_modules/next/dist/server/request/cookies.js +11 -46
  629. package/.next/standalone/node_modules/next/dist/server/request/draft-mode.js +14 -60
  630. package/.next/standalone/node_modules/next/dist/server/request/fallback-params.js +23 -9
  631. package/.next/standalone/node_modules/next/dist/server/request/headers.js +10 -44
  632. package/.next/standalone/node_modules/next/dist/server/request/io.js +2 -11
  633. package/.next/standalone/node_modules/next/dist/server/request/params.js +62 -196
  634. package/.next/standalone/node_modules/next/dist/server/request/pathname.js +9 -61
  635. package/.next/standalone/node_modules/next/dist/server/request/root-params.js +25 -81
  636. package/.next/standalone/node_modules/next/dist/server/request/search-params.js +42 -119
  637. package/.next/standalone/node_modules/next/dist/server/request/utils.js +3 -10
  638. package/.next/standalone/node_modules/next/dist/server/response-cache/index.js +54 -32
  639. package/.next/standalone/node_modules/next/dist/server/response-cache/utils.js +1 -5
  640. package/.next/standalone/node_modules/next/dist/server/response-cache/web.js +5 -2
  641. package/.next/standalone/node_modules/next/dist/server/resume-data-cache/cache-store.js +18 -0
  642. package/.next/standalone/node_modules/next/dist/server/resume-data-cache/resume-data-cache.js +51 -49
  643. package/.next/standalone/node_modules/next/dist/server/revalidation-utils.js +15 -13
  644. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/dev-render-context.js +23 -0
  645. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/helpers/prerender-manifest-matcher.js +5 -4
  646. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/module.js +13 -1
  647. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/module.render.js +26 -11
  648. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/parse-request-headers.js +58 -0
  649. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/entrypoints.js +1 -5
  650. package/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/entrypoints.js +1 -5
  651. package/.next/standalone/node_modules/next/dist/server/route-modules/app-route/helpers/auto-implement-methods.js +1 -5
  652. package/.next/standalone/node_modules/next/dist/server/route-modules/app-route/module.js +399 -432
  653. package/.next/standalone/node_modules/next/dist/server/route-modules/pages/module.render.js +1 -5
  654. package/.next/standalone/node_modules/next/dist/server/route-modules/pages/pages-handler.js +20 -16
  655. package/.next/standalone/node_modules/next/dist/server/route-modules/pages-api/module.js +1 -5
  656. package/.next/standalone/node_modules/next/dist/server/route-modules/route-module.js +57 -61
  657. package/.next/standalone/node_modules/next/dist/server/serve-static.js +1 -5
  658. package/.next/standalone/node_modules/next/dist/server/setup-http-agent-env.js +1 -5
  659. package/.next/standalone/node_modules/next/dist/server/stream-utils/encoded-tags.js +1 -1
  660. package/.next/standalone/node_modules/next/dist/server/stream-utils/node-web-streams-helper.js +7 -11
  661. package/.next/standalone/node_modules/next/dist/server/typescript/constant.js +2 -0
  662. package/.next/standalone/node_modules/next/dist/server/typescript/rules/config.js +29 -2
  663. package/.next/standalone/node_modules/next/dist/server/use-cache/cache-life-profile.js +6 -30
  664. package/.next/standalone/node_modules/next/dist/server/use-cache/cache-life.js +9 -32
  665. package/.next/standalone/node_modules/next/dist/server/use-cache/cache-tag.js +6 -12
  666. package/.next/standalone/node_modules/next/dist/server/use-cache/constants.js +1 -5
  667. package/.next/standalone/node_modules/next/dist/server/use-cache/handlers.js +27 -36
  668. package/.next/standalone/node_modules/next/dist/server/use-cache/tiered-cache-handler.js +6 -4
  669. package/.next/standalone/node_modules/next/dist/server/use-cache/use-cache-errors.js +18 -19
  670. package/.next/standalone/node_modules/next/dist/server/use-cache/use-cache-messages.js +190 -0
  671. package/.next/standalone/node_modules/next/dist/server/use-cache/use-cache-wrapper.js +485 -407
  672. package/.next/standalone/node_modules/next/dist/server/web/adapter.js +14 -35
  673. package/.next/standalone/node_modules/next/dist/server/web/edge-route-module-wrapper.js +6 -7
  674. package/.next/standalone/node_modules/next/dist/server/web/error.js +0 -15
  675. package/.next/standalone/node_modules/next/dist/server/web/globals.js +3 -15
  676. package/.next/standalone/node_modules/next/dist/server/web/next-url.js +1 -5
  677. package/.next/standalone/node_modules/next/dist/server/web/sandbox/context.js +10 -34
  678. package/.next/standalone/node_modules/next/dist/server/web/sandbox/sandbox.js +1 -5
  679. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/adapters/headers.js +0 -5
  680. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/adapters/next-request.js +1 -5
  681. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/adapters/request-cookies.js +0 -5
  682. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/fetch-event.js +2 -10
  683. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/image-response.js +1 -5
  684. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/response.js +2 -10
  685. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/revalidate.js +28 -66
  686. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/unstable-cache.js +14 -22
  687. package/.next/standalone/node_modules/next/dist/server/web/spec-extension/unstable-no-store.js +1 -2
  688. package/.next/standalone/node_modules/next/dist/server/web/utils.js +1 -5
  689. package/.next/standalone/node_modules/next/dist/server/web/web-on-close.js +2 -10
  690. package/.next/standalone/node_modules/next/dist/shared/lib/app-router-types.js +38 -28
  691. package/.next/standalone/node_modules/next/dist/shared/lib/constants.js +5 -0
  692. package/.next/standalone/node_modules/next/dist/shared/lib/deployment-id.js +1 -1
  693. package/.next/standalone/node_modules/next/dist/shared/lib/errors/code-frame.js +3 -2
  694. package/.next/standalone/node_modules/next/dist/shared/lib/errors/empty-generate-static-params-error.js +1 -5
  695. package/.next/standalone/node_modules/next/dist/shared/lib/errors/ensure-static-gsp-errors.js +30 -0
  696. package/.next/standalone/node_modules/next/dist/shared/lib/errors/hard-deprecated-config-error.js +0 -5
  697. package/.next/standalone/node_modules/next/dist/shared/lib/html-context.shared-runtime.js +1 -5
  698. package/.next/standalone/node_modules/next/dist/shared/lib/image-config.js +52 -1
  699. package/.next/standalone/node_modules/next/dist/shared/lib/instant-messages.js +2 -10
  700. package/.next/standalone/node_modules/next/dist/shared/lib/invariant-error.js +0 -5
  701. package/.next/standalone/node_modules/next/dist/shared/lib/lazy-dynamic/react-browser-bailout.js +45 -0
  702. package/.next/standalone/node_modules/next/dist/shared/lib/magic-identifier.js +198 -0
  703. package/.next/standalone/node_modules/next/dist/shared/lib/match-remote-pattern.js +1 -5
  704. package/.next/standalone/node_modules/next/dist/shared/lib/router/routes/app.js +3 -15
  705. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/app-paths.js +6 -1
  706. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js +4 -12
  707. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/interception-routes.js +63 -20
  708. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/parse-relative-url.js +1 -5
  709. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/prepare-destination.js +1 -5
  710. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/querystring.js +31 -0
  711. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/resolve-param-value.js +1 -5
  712. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/route-matcher.js +1 -5
  713. package/.next/standalone/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js +11 -55
  714. package/.next/standalone/node_modules/next/dist/shared/lib/rsc-transport.js +108 -0
  715. package/.next/standalone/node_modules/next/dist/shared/lib/segment-cache/segment-value-encoding.js +0 -13
  716. package/.next/standalone/node_modules/next/dist/shared/lib/segment-cache/vary-params-decoding.js +48 -27
  717. package/.next/standalone/node_modules/next/dist/shared/lib/segment.js +1 -13
  718. package/.next/standalone/node_modules/next/dist/shared/lib/turbopack/internal-error.js +2 -7
  719. package/.next/standalone/node_modules/next/dist/shared/lib/utils.js +2 -11
  720. package/.next/standalone/node_modules/next/dist/shared/lib/zod.js +2 -6
  721. package/.next/standalone/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
  722. package/.next/standalone/node_modules/next/dist/telemetry/detached-flush.js +8 -15
  723. package/.next/standalone/node_modules/next/dist/telemetry/events/build.js +1 -2
  724. package/.next/standalone/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
  725. package/.next/standalone/node_modules/next/dist/telemetry/events/version.js +2 -2
  726. package/.next/standalone/node_modules/next/dist/telemetry/post-telemetry-payload.js +1 -5
  727. package/.next/standalone/node_modules/next/dist/telemetry/storage.js +31 -19
  728. package/.next/standalone/node_modules/next/dist/trace/report/index.js +5 -2
  729. package/.next/standalone/node_modules/next/dist/trace/report/to-json-build.js +4 -2
  730. package/.next/standalone/node_modules/next/dist/trace/report/to-json.js +141 -97
  731. package/.next/standalone/node_modules/next/dist/trace/trace.js +14 -9
  732. package/.next/standalone/node_modules/next/package.json +11 -10
  733. package/.next/standalone/package.json +11 -11
  734. package/.next/standalone/sdk/python/uv.lock +30 -115
  735. package/.next/standalone/sdk/typescript/CHANGELOG.md +11 -0
  736. package/.next/standalone/sdk/typescript/integration/fixtures/mastra-1/package-lock.json +16 -4
  737. package/.next/standalone/sdk/typescript/integration/fixtures/mastra-1/package.json +3 -0
  738. package/.next/standalone/server.js +1 -1
  739. package/bin/failproofai.mjs +2 -2
  740. package/dist/cli.mjs +27125 -26785
  741. package/dist/worker.mjs +117 -111
  742. package/hermes-plugin/plugin.yaml +1 -1
  743. package/package.json +11 -11
  744. package/scripts/skew-log-filter.ts +5 -1
  745. package/src/hooks/cloud-connection.ts +86 -17
  746. package/src/hooks/cloud-enrollment.ts +4 -3
  747. package/src/hooks/cloud-managed-policies.ts +15 -11
  748. package/src/hooks/codex-system-hooks.ts +687 -0
  749. package/src/hooks/collector-config.ts +5 -4
  750. package/src/hooks/config-status.ts +47 -114
  751. package/src/hooks/configure-wizard.ts +55 -65
  752. package/src/hooks/credential-recovery.ts +36 -0
  753. package/src/hooks/daemon-service.ts +2 -2
  754. package/src/hooks/delivery-health.ts +20 -9
  755. package/src/hooks/fp-config.ts +17 -5
  756. package/src/hooks/fp-home.ts +1 -1
  757. package/src/hooks/integrations.ts +16 -0
  758. package/src/hooks/manager.ts +62 -2
  759. package/src/hooks/otel-cli.ts +51 -20
  760. package/src/hooks/otel-writers.ts +26 -17
  761. package/src/hooks/uninstall-cli.ts +28 -7
  762. package/.next/standalone/.next/server/chunks/[externals]__1_9ze9b._.js +0 -3
  763. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0--lkk6._.js +0 -3
  764. package/.next/standalone/.next/server/chunks/[root-of-the-server]__03r-lqq._.js +0 -3
  765. package/.next/standalone/.next/server/chunks/[root-of-the-server]__08dchfu._.js +0 -3
  766. package/.next/standalone/.next/server/chunks/[root-of-the-server]__08w4wmd._.js +0 -3
  767. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_0xu5z._.js +0 -3
  768. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0f7mikp._.js +0 -3
  769. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0g6bbuw._.js +0 -3
  770. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ga9hs7._.js +0 -3
  771. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0l3yhx4._.js +0 -160
  772. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0moxohc._.js +0 -22
  773. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0o07qi9._.js +0 -3
  774. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0q-v9z2._.js +0 -3
  775. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0q0qzx1._.js +0 -3
  776. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0rv7m0k._.js +0 -3
  777. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0z2ll-a._.js +0 -3
  778. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0zlqo2t._.js +0 -3
  779. package/.next/standalone/.next/server/chunks/[root-of-the-server]__12021ot._.js +0 -3
  780. package/.next/standalone/.next/server/chunks/[root-of-the-server]__17g9wh7._.js +0 -3
  781. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1adacul._.js +0 -165
  782. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1anxb5k._.js +0 -3
  783. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1autwno._.js +0 -3
  784. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1ffkmds._.js +0 -3
  785. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1jm9fw6._.js +0 -3
  786. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1l71g3y._.js +0 -22
  787. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1legmza._.js +0 -3
  788. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1ou2ehh._.js +0 -3
  789. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1qb590j._.js +0 -3
  790. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1shcqgr._.js +0 -3
  791. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1v25n-6._.js +0 -3
  792. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1w9zl9-._.js +0 -3
  793. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1xuedea._.js +0 -3
  794. package/.next/standalone/.next/server/chunks/_09dz7xv._.js +0 -27
  795. package/.next/standalone/.next/server/chunks/_0p53ge1._.js +0 -3
  796. package/.next/standalone/.next/server/chunks/_0tovk6q._.js +0 -3
  797. package/.next/standalone/.next/server/chunks/_0trp3yc._.js +0 -3
  798. package/.next/standalone/.next/server/chunks/_1ek68ln._.js +0 -33
  799. package/.next/standalone/.next/server/chunks/_1fz8m31._.js +0 -3
  800. package/.next/standalone/.next/server/chunks/_1jrv3hg._.js +0 -3
  801. package/.next/standalone/.next/server/chunks/_1nx8fim._.js +0 -3
  802. package/.next/standalone/.next/server/chunks/_1ogwigf._.js +0 -3
  803. package/.next/standalone/.next/server/chunks/_1q27azx._.js +0 -3
  804. package/.next/standalone/.next/server/chunks/_1vslkoe._.js +0 -3
  805. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_download_[project]_[session]_route_actions_1is7vs7.js +0 -3
  806. package/.next/standalone/.next/server/chunks/lib_16xa545._.js +0 -3
  807. package/.next/standalone/.next/server/chunks/lib_factory-projects_ts_1eo_bk-._.js +0 -3
  808. package/.next/standalone/.next/server/chunks/lib_openclaw-projects_ts_0gc-p24._.js +0 -3
  809. package/.next/standalone/.next/server/chunks/lib_telemetry-id_ts_1k8gj9o._.js +0 -3
  810. package/.next/standalone/.next/server/chunks/lib_telemetry_ts_0dctyyw._.js +0 -3
  811. package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_01r25oi._.js +0 -4
  812. package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_09z9-p7._.js +0 -4
  813. package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_0ol5pa3._.js +0 -3
  814. package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_1rqmk27._.js +0 -3
  815. package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_1w7tiq4._.js +0 -3
  816. package/.next/standalone/.next/server/chunks/src_hooks_1aveq0u._.js +0 -5
  817. package/.next/standalone/.next/server/chunks/src_hooks_1eem5a7._.js +0 -3
  818. package/.next/standalone/.next/server/chunks/src_hooks_custom-hooks-loader_ts_0lnb3n3._.js +0 -12
  819. package/.next/standalone/.next/server/chunks/src_hooks_fp-home_ts_09kv0bn._.js +0 -3
  820. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__04usis8._.js +0 -4
  821. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0502lat._.js +0 -3
  822. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0576iuy._.js +0 -3
  823. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__059yza8._.js +0 -3
  824. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05r_17v._.js +0 -3
  825. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__06pflha._.js +0 -3
  826. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0_gn5iz._.js +0 -4
  827. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e2l3c1._.js +0 -3
  828. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0eip4_k._.js +0 -22
  829. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0er05u0._.js +0 -3
  830. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0f765xr._.js +0 -4
  831. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h38gzz._.js +0 -3
  832. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0hci7t3._.js +0 -3
  833. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0hoaz1g._.js +0 -4
  834. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0mxmwtx._.js +0 -3
  835. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0p84xee._.js +0 -3
  836. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qcb0mg._.js +0 -3
  837. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0sjzdjg._.js +0 -3
  838. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0uescqv._.js +0 -3
  839. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__13d-wb6._.js +0 -3
  840. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1484zv2._.js +0 -3
  841. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__19dutr7._.js +0 -14
  842. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1_qv8oh._.js +0 -3
  843. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1ab4ifb._.js +0 -3
  844. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1b2dbet._.js +0 -33
  845. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1dinjii._.js +0 -3
  846. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1fbrk56._.js +0 -4
  847. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1kaotix._.js +0 -22
  848. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1pprgri._.js +0 -4
  849. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1py795m._.js +0 -3
  850. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1qapotl._.js +0 -3
  851. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1qiz0e4._.js +0 -3
  852. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1um4yxn._.js +0 -4
  853. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1v185mo._.js +0 -3
  854. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1wb4yt2._.js +0 -4
  855. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1y3n3cn._.js +0 -4
  856. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1zl_r0t._.js +0 -3
  857. package/.next/standalone/.next/server/chunks/ssr/_0-yi74u._.js +0 -3
  858. package/.next/standalone/.next/server/chunks/ssr/_08x1r5t._.js +0 -3
  859. package/.next/standalone/.next/server/chunks/ssr/_0bqoto4._.js +0 -3
  860. package/.next/standalone/.next/server/chunks/ssr/_0lnpwk8._.js +0 -23
  861. package/.next/standalone/.next/server/chunks/ssr/_0uyu3jf._.js +0 -3
  862. package/.next/standalone/.next/server/chunks/ssr/_0wso5d3._.js +0 -3
  863. package/.next/standalone/.next/server/chunks/ssr/_1-3unkg._.js +0 -3
  864. package/.next/standalone/.next/server/chunks/ssr/_15y8myg._.js +0 -3
  865. package/.next/standalone/.next/server/chunks/ssr/_1_ozgif._.js +0 -3
  866. package/.next/standalone/.next/server/chunks/ssr/_1ddpc5g._.js +0 -3
  867. package/.next/standalone/.next/server/chunks/ssr/_1gb0ifp._.js +0 -232
  868. package/.next/standalone/.next/server/chunks/ssr/_1o95rf0._.js +0 -3
  869. package/.next/standalone/.next/server/chunks/ssr/_1q46vxx._.js +0 -22
  870. package/.next/standalone/.next/server/chunks/ssr/_1thr5rf._.js +0 -3
  871. package/.next/standalone/.next/server/chunks/ssr/_1y3xzro._.js +0 -3
  872. package/.next/standalone/.next/server/chunks/ssr/_1ylae7o._.js +0 -3
  873. package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_policies_page_actions_1sp2-yo.js +0 -16
  874. package/.next/standalone/.next/server/chunks/ssr/app_087bt9w._.js +0 -3
  875. package/.next/standalone/.next/server/chunks/ssr/app_1fvisnp._.js +0 -3
  876. package/.next/standalone/.next/server/chunks/ssr/app_209u41o._.js +0 -3
  877. package/.next/standalone/.next/server/chunks/ssr/app_actions_get-scheduled-audit_ts_0ei9sni._.js +0 -3
  878. package/.next/standalone/.next/server/chunks/ssr/app_components_project-list_tsx_1ke6anr._.js +0 -3
  879. package/.next/standalone/.next/server/chunks/ssr/app_error_tsx_15zfp7n._.js +0 -3
  880. package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_0w002m_._.js +0 -3
  881. package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x._.js +0 -3
  882. package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpc._.js +0 -8
  883. package/.next/standalone/.next/server/chunks/ssr/app_project_[name]_error_tsx_08qg6nc._.js +0 -3
  884. package/.next/standalone/.next/server/chunks/ssr/app_project_[name]_session_[sessionId]_error_tsx_0rf4j1n._.js +0 -3
  885. package/.next/standalone/.next/server/chunks/ssr/app_settings_02tf1h4._.js +0 -3
  886. package/.next/standalone/.next/server/chunks/ssr/lib_1cf5ya2._.js +0 -3
  887. package/.next/standalone/.next/server/chunks/ssr/lib_antigravity-projects_ts_0_6zf11._.js +0 -3
  888. package/.next/standalone/.next/server/chunks/ssr/lib_codex-projects_ts_0pqlw37._.js +0 -3
  889. package/.next/standalone/.next/server/chunks/ssr/lib_copilot-projects_ts_19wl7tp._.js +0 -3
  890. package/.next/standalone/.next/server/chunks/ssr/lib_cursor-projects_ts_18-iwyk._.js +0 -3
  891. package/.next/standalone/.next/server/chunks/ssr/lib_devin-projects_ts_0a64qdy._.js +0 -3
  892. package/.next/standalone/.next/server/chunks/ssr/lib_factory-projects_ts_1uyaahq._.js +0 -3
  893. package/.next/standalone/.next/server/chunks/ssr/lib_goose-projects_ts_0zkscri._.js +0 -3
  894. package/.next/standalone/.next/server/chunks/ssr/lib_hermes-projects_ts_05b8-it._.js +0 -3
  895. package/.next/standalone/.next/server/chunks/ssr/lib_openclaw-projects_ts_0qxq3bp._.js +0 -3
  896. package/.next/standalone/.next/server/chunks/ssr/lib_opencode-projects_ts_15bjxkm._.js +0 -3
  897. package/.next/standalone/.next/server/chunks/ssr/lib_pi-projects_ts_1wikofb._.js +0 -3
  898. package/.next/standalone/.next/server/chunks/ssr/node_modules_1hl81y4._.js +0 -3
  899. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_0aiy-os._.js +0 -131
  900. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_0nkkbfv._.js +0 -6
  901. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_0w6mzq5._.js +0 -151
  902. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_18_d8l1._.js +0 -151
  903. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_1v8aef8._.js +0 -3
  904. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j3._.js +0 -3
  905. package/.next/standalone/.next/server/chunks/ssr/node_modules_posthog-node_dist_entrypoints_index_node_mjs_11bnuzn._.js +0 -4
  906. package/.next/standalone/.next/server/chunks/ssr/src_hooks_0-q0umm._.js +0 -3
  907. package/.next/standalone/.next/server/chunks/ssr/src_hooks_06kzv9d._.js +0 -12
  908. package/.next/standalone/.next/server/chunks/ssr/src_hooks_0g194sy._.js +0 -3
  909. package/.next/standalone/.next/server/chunks/ssr/src_hooks_1cv9_c4._.js +0 -12
  910. package/.next/standalone/.next/server/chunks/ssr/src_hooks_1kx9e0d._.js +0 -3
  911. package/.next/standalone/.next/server/chunks/ssr/src_hooks_effective-reviewers_ts_1h4wtvo._.js +0 -5
  912. package/.next/standalone/.next/server/chunks/ssr/src_hooks_fp-config_ts_04t589g._.js +0 -4
  913. package/.next/standalone/.next/server/chunks/ssr/src_hooks_fp-home_ts_0je3xkv._.js +0 -3
  914. package/.next/standalone/.next/server/chunks/ssr/src_hooks_pack-cli_ts_0t7me65._.js +0 -3
  915. package/.next/standalone/.next/server/chunks/ssr/src_hooks_semantic_pack-policies_ts_0gh_bu_._.js +0 -3
  916. package/.next/standalone/.next/static/chunks/0pra9i676pym1.js +0 -1
  917. package/.next/standalone/.next/static/chunks/1-lpi0m-hc1kb.js +0 -1
  918. package/.next/standalone/.next/static/chunks/17yvyyblr_eb5.js +0 -1
  919. package/.next/standalone/.next/static/chunks/1c6aptmytnu6q.js +0 -1
  920. package/.next/standalone/.next/static/chunks/1eyl7fzkmnkf_.js +0 -1
  921. package/.next/standalone/.next/static/chunks/1wozchtn2etvh.js +0 -1
  922. package/.next/standalone/.next/static/chunks/1xacnwjkbekn7.js +0 -1
  923. package/.next/standalone/.next/static/chunks/23thtelz1a-ur.js +0 -6
  924. package/.next/standalone/.next/static/chunks/2bc17tohgs4bs.js +0 -1
  925. package/.next/standalone/.next/static/chunks/2hg_bp8z_vm2g.js +0 -1
  926. package/.next/standalone/.next/static/chunks/2xq-ejo8kti18.js +0 -1
  927. package/.next/standalone/.next/static/chunks/2yuzx8716maf0.js +0 -1
  928. package/.next/standalone/.next/static/chunks/3-_pth_c9n938.js +0 -1
  929. package/.next/standalone/.next/static/chunks/35fgpd_feci6x.js +0 -1
  930. package/.next/standalone/.next/static/chunks/3n46e45atic-m.js +0 -22
  931. package/.next/standalone/.next/static/chunks/3q7sndqftqhw9.js +0 -1
  932. package/.next/standalone/.next/static/chunks/3qfoeqhy5l10x.js +0 -1
  933. package/.next/standalone/.next/static/chunks/3sg07wnn969xq.js +0 -31
  934. package/.next/standalone/.next/static/chunks/3xpjn3cdgm-7m.js +0 -1
  935. package/.next/standalone/.next/static/chunks/4448_qq7bd963.js +0 -1
  936. package/.next/standalone/.next/static/chunks/turbopack-1opxka4dtjbc5.js +0 -1
  937. package/.next/standalone/node_modules/next/dist/client/components/match-segments.js +0 -32
  938. package/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/find-head-in-cache.js +0 -63
  939. package/.next/standalone/node_modules/next/dist/client/components/segment-cache/prefetch.js +0 -32
  940. package/.next/standalone/node_modules/next/dist/lib/detached-promise.js +0 -32
  941. package/.next/standalone/node_modules/next/dist/lib/error-telemetry-utils.js +0 -42
  942. package/.next/standalone/node_modules/next/dist/server/app-render/create-flight-router-state-from-loader-tree.js +0 -154
  943. package/.next/standalone/node_modules/next/dist/server/app-render/rsc/postpone.js +0 -18
  944. package/.next/standalone/node_modules/next/dist/server/lib/experimental/ppr.js +0 -47
  945. package/.next/standalone/node_modules/next/dist/server/lib/router-utils/is-postpone.js +0 -16
  946. package/.next/standalone/node_modules/next/dist/server/route-matcher-managers/default-route-matcher-manager.js +0 -239
  947. package/.next/standalone/node_modules/next/dist/server/route-matcher-managers/dev-route-matcher-manager.js +0 -120
  948. package/.next/standalone/node_modules/next/dist/server/route-matcher-managers/route-matcher-manager.js +0 -6
  949. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/app-page-route-matcher-provider.js +0 -55
  950. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/app-route-route-matcher-provider.js +0 -43
  951. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/dev/dev-app-page-route-matcher-provider.js +0 -91
  952. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/dev/dev-app-route-route-matcher-provider.js +0 -112
  953. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/dev/dev-pages-api-route-matcher-provider.js +0 -77
  954. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/dev/dev-pages-route-matcher-provider.js +0 -77
  955. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/dev/file-cache-route-matcher-provider.js +0 -28
  956. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/dev/helpers/file-reader/batched-file-reader.js +0 -106
  957. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/dev/helpers/file-reader/default-file-reader.js +0 -42
  958. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/dev/helpers/file-reader/file-reader.js +0 -6
  959. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/helpers/cached-route-matcher-provider.js +0 -30
  960. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/helpers/manifest-loaders/manifest-loader.js +0 -6
  961. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/helpers/manifest-loaders/node-manifest-loader.js +0 -34
  962. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/helpers/manifest-loaders/server-manifest-loader.js +0 -20
  963. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/manifest-route-matcher-provider.js +0 -21
  964. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/pages-api-route-matcher-provider.js +0 -55
  965. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/pages-route-matcher-provider.js +0 -64
  966. package/.next/standalone/node_modules/next/dist/server/route-matcher-providers/route-matcher-provider.js +0 -6
  967. package/.next/standalone/node_modules/next/dist/server/route-matchers/app-page-route-matcher.js +0 -18
  968. package/.next/standalone/node_modules/next/dist/server/route-matchers/app-route-route-matcher.js +0 -15
  969. package/.next/standalone/node_modules/next/dist/server/route-matchers/locale-route-matcher.js +0 -68
  970. package/.next/standalone/node_modules/next/dist/server/route-matchers/pages-api-route-matcher.js +0 -30
  971. package/.next/standalone/node_modules/next/dist/server/route-matchers/pages-route-matcher.js +0 -30
  972. package/.next/standalone/node_modules/next/dist/server/route-matchers/route-matcher.js +0 -54
  973. /package/.next/standalone/.next/static/{xtcpqBNBdjQVerPMkI2HI → RrRjb2981tB2X7pKdNBUm}/_buildManifest.js +0 -0
  974. /package/.next/standalone/.next/static/{xtcpqBNBdjQVerPMkI2HI → RrRjb2981tB2X7pKdNBUm}/_clientMiddlewareManifest.js +0 -0
  975. /package/.next/standalone/.next/static/{xtcpqBNBdjQVerPMkI2HI → RrRjb2981tB2X7pKdNBUm}/_ssgManifest.js +0 -0
@@ -5,7 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  0 && (module.exports = {
6
6
  FreshnessPolicy: null,
7
7
  beginLockedNavigation: null,
8
- createInitialCacheNodeForHydration: null,
8
+ createInitialRenderTreeForHydration: null,
9
+ createRootNavigationTask: null,
9
10
  getCurrentNavigationLock: null,
10
11
  isDeferredRsc: null,
11
12
  resetNavigationLockToPending: null,
@@ -25,8 +26,11 @@ _export(exports, {
25
26
  beginLockedNavigation: function() {
26
27
  return beginLockedNavigation;
27
28
  },
28
- createInitialCacheNodeForHydration: function() {
29
- return createInitialCacheNodeForHydration;
29
+ createInitialRenderTreeForHydration: function() {
30
+ return createInitialRenderTreeForHydration;
31
+ },
32
+ createRootNavigationTask: function() {
33
+ return createRootNavigationTask;
30
34
  },
31
35
  getCurrentNavigationLock: function() {
32
36
  return getCurrentNavigationLock;
@@ -44,23 +48,26 @@ _export(exports, {
44
48
  return startPPRNavigation;
45
49
  }
46
50
  });
47
- const _approutertypes = require("../../../shared/lib/app-router-types");
48
- const _segment = require("../../../shared/lib/segment");
49
- const _matchsegments = require("../match-segments");
50
- const _createhreffromurl = require("./create-href-from-url");
51
- const _fetchserverresponse = require("./fetch-server-response");
52
- const _useactionqueue = require("../use-action-queue");
53
- const _routerreducertypes = require("./router-reducer-types");
54
- const _isnavigatingtonewrootlayout = require("./is-navigating-to-new-root-layout");
55
- const _committedstate = require("./reducers/committed-state");
56
- const _navigation = require("../segment-cache/navigation");
57
- const _cache = require("../segment-cache/cache");
58
- const _types = require("../segment-cache/types");
59
- const _optimisticroutes = require("../segment-cache/optimistic-routes");
60
- const _constants = require("../../../lib/constants");
61
- const _routeparams = require("../../route-params");
62
- const _varypath = require("../segment-cache/vary-path");
63
- const _bfcache = require("../segment-cache/bfcache");
51
+ const _approutertypes = require("../../shared/lib/app-router-types");
52
+ const _segment = require("../../shared/lib/segment");
53
+ const _segmentvalueencoding = require("../../shared/lib/segment-cache/segment-value-encoding");
54
+ const _createhreffromurl = require("./router-reducer/create-href-from-url");
55
+ const _fetchserverresponse = require("./router-reducer/fetch-server-response");
56
+ const _useactionqueue = require("./use-action-queue");
57
+ const _routerreducertypes = require("./router-reducer/router-reducer-types");
58
+ const _isnavigatingtonewrootlayout = require("./router-reducer/is-navigating-to-new-root-layout");
59
+ const _committedstate = require("./router-reducer/reducers/committed-state");
60
+ const _decodeserverresponse = require("./segment-cache/decode-server-response");
61
+ const _cache = require("./segment-cache/cache");
62
+ const _optimisticroutes = require("./segment-cache/optimistic-routes");
63
+ const _varypath = require("./segment-cache/vary-path");
64
+ const _bfcache = require("./segment-cache/bfcache");
65
+ function createRootNavigationTask(tree, head) {
66
+ return {
67
+ tree,
68
+ head
69
+ };
70
+ }
64
71
  var FreshnessPolicy = /*#__PURE__*/ function(FreshnessPolicy) {
65
72
  FreshnessPolicy[FreshnessPolicy["Default"] = 0] = "Default";
66
73
  FreshnessPolicy[FreshnessPolicy["Hydration"] = 1] = "Hydration";
@@ -71,19 +78,22 @@ var FreshnessPolicy = /*#__PURE__*/ function(FreshnessPolicy) {
71
78
  return FreshnessPolicy;
72
79
  }({});
73
80
  const noop = ()=>{};
74
- function createInitialCacheNodeForHydration(navigatedAt, initialTree, seedData, seedHead, seedDynamicStaleAt) {
81
+ function createInitialRenderTreeForHydration(navigatedAt, initialRoot, seedDynamicStaleAt) {
75
82
  // Create the initial cache node tree, using the data embedded into the
76
83
  // HTML document.
77
84
  const accumulation = {
78
85
  separateRefreshUrls: null,
79
86
  scrollRef: null
80
87
  };
88
+ const parentNeedsDynamicRequest = false;
81
89
  const restrictToShell = false;
82
- const task = createCacheNodeOnNavigation(navigatedAt, initialTree, null, 1, seedData, seedHead, seedDynamicStaleAt, false, accumulation, // Hydration is bound to the shared map.
83
- _cache.segmentCacheMap, restrictToShell);
84
- return task;
90
+ // Hydration is bound to the shared map.
91
+ const map = _cache.segmentCacheMap;
92
+ const tree = createRenderTreeOnNavigation(navigatedAt, initialRoot.tree, 1, seedDynamicStaleAt, parentNeedsDynamicRequest, accumulation, map, restrictToShell);
93
+ const head = createRenderTreeOnNavigation(navigatedAt, initialRoot.head, 1, seedDynamicStaleAt, parentNeedsDynamicRequest, accumulation, map, restrictToShell);
94
+ return createRootNavigationTask(tree, head);
85
95
  }
86
- function startPPRNavigation(navigatedAt, oldUrl, oldRenderedSearch, oldCacheNode, oldRouterState, newRouteTree, newMetadataVaryPath, freshness, seedData, seedHead, seedDynamicStaleAt, isSamePageNavigation, accumulation, // The segment cache map this navigation is bound to: a locked navigation's
96
+ function startPPRNavigation(navigatedAt, oldUrl, oldRenderedSearch, oldRoot, newRoot, freshness, seedDynamicStaleAt, isSamePageNavigation, accumulation, // The segment cache map this navigation is bound to: a locked navigation's
87
97
  // driving-task map, or the shared map. See `segmentCacheMap` in cache.ts.
88
98
  map, // Instant Navigation Testing API only — restricts segment reads to shell
89
99
  // entries. Always false outside the testing API. See navigation-testing-lock.
@@ -94,22 +104,39 @@ restrictToShell) {
94
104
  canonicalUrl: (0, _createhreffromurl.createHrefFromUrl)(oldUrl),
95
105
  renderedSearch: oldRenderedSearch
96
106
  };
97
- return updateCacheNodeOnNavigation(navigatedAt, oldUrl, oldCacheNode !== null ? oldCacheNode : undefined, oldRouterState, newRouteTree, newMetadataVaryPath, freshness, seedData, seedHead, seedDynamicStaleAt, isSamePageNavigation, parentNeedsDynamicRequest, oldRootRefreshState, parentRefreshState, accumulation, map, restrictToShell);
107
+ const tree = updateRenderTreeOnNavigation(navigatedAt, oldRoot.tree, newRoot.tree, freshness, seedDynamicStaleAt, isSamePageNavigation, parentNeedsDynamicRequest, oldRootRefreshState, parentRefreshState, accumulation, map, restrictToShell);
108
+ if (tree === null) {
109
+ // The route tree changed at or above the root layout. Perform a full-page
110
+ // navigation.
111
+ return null;
112
+ }
113
+ const head = updateRenderTreeOnNavigation(navigatedAt, oldRoot.head, newRoot.head, freshness, seedDynamicStaleAt, isSamePageNavigation, parentNeedsDynamicRequest, oldRootRefreshState, parentRefreshState, accumulation, map, restrictToShell);
114
+ if (head === null) {
115
+ // Unreachable: a one-node tree has no root layout to change and no slots.
116
+ return null;
117
+ }
118
+ return createRootNavigationTask(tree, head);
119
+ }
120
+ // TODO: Unify NavigationTask with CacheNode.
121
+ function createNavigationTask(status, route, node, dynamicRequestTree, children) {
122
+ return {
123
+ status,
124
+ route,
125
+ node,
126
+ dynamicRequestTree,
127
+ children
128
+ };
98
129
  }
99
- function updateCacheNodeOnNavigation(navigatedAt, oldUrl, oldCacheNode, oldRouterState, newRouteTree, newMetadataVaryPath, freshness, seedData, seedHead, seedDynamicStaleAt, isSamePageNavigation, parentNeedsDynamicRequest, oldRootRefreshState, parentRefreshState, accumulation, map, // Instant Navigation Testing API only — restricts segment reads to shell
130
+ function updateRenderTreeOnNavigation(navigatedAt, oldRenderTree, newRouteTree, freshness, seedDynamicStaleAt, isSamePageNavigation, parentNeedsDynamicRequest, oldRootRefreshState, parentRefreshState, accumulation, map, // Instant Navigation Testing API only — restricts segment reads to shell
100
131
  // entries. Always false outside the testing API. See navigation-testing-lock.
101
132
  restrictToShell) {
102
- // Check if this segment matches the one in the previous route. A
103
- // search-param-only difference at a page segment falls through to the
104
- // matched branch — the CacheNode is rebuilt (so data refetches), but the
105
- // bfcacheId carries forward as if the segment had matched.
106
- const oldSegment = oldRouterState[0];
107
- const newSegment = createSegmentFromRouteTree(newRouteTree);
108
- const segmentMatchKind = compareSegments(newSegment, oldSegment);
109
- if (segmentMatchKind === 1) {
133
+ // Check if the route structure changed. If only the params changed, that's
134
+ // handled further down.
135
+ const newSegment = newRouteTree.segment;
136
+ if (!(0, _cache.doesRouteStructureMatch)(oldRenderTree, newRouteTree)) {
110
137
  // This segment does not match the previous route. We're now entering the
111
138
  // new part of the target route. Switch to the "create" path.
112
- if ((newRouteTree.prefetchHints & _approutertypes.PrefetchHint.IsRootLayoutOrAbove) !== 0 && (0, _isnavigatingtonewrootlayout.isNavigatingToNewRootLayout)(oldRouterState, newRouteTree) || // The global Not Found route (app/global-not-found.tsx) is a special
139
+ if ((newRouteTree.prefetchHints & _approutertypes.PrefetchHint.IsRootLayoutOrAbove) !== 0 && (0, _isnavigatingtonewrootlayout.isNavigatingToNewRootLayout)(oldRenderTree, newRouteTree) || // The global Not Found route (app/global-not-found.tsx) is a special
113
140
  // case, because it acts like a root layout, but in the router tree, it
114
141
  // is rendered in the same position as app/layout.tsx.
115
142
  //
@@ -122,11 +149,9 @@ restrictToShell) {
122
149
  newSegment === _segment.NOT_FOUND_SEGMENT_KEY) {
123
150
  return null;
124
151
  }
125
- return createCacheNodeOnNavigation(navigatedAt, newRouteTree, newMetadataVaryPath, freshness, seedData, seedHead, seedDynamicStaleAt, parentNeedsDynamicRequest, accumulation, map, restrictToShell);
152
+ return createRenderTreeOnNavigation(navigatedAt, newRouteTree, freshness, seedDynamicStaleAt, parentNeedsDynamicRequest, accumulation, map, restrictToShell);
126
153
  }
127
154
  const newSlots = newRouteTree.slots;
128
- const oldRouterStateChildren = oldRouterState[1];
129
- const seedDataChildren = seedData !== null ? seedData[1] : null;
130
155
  let shouldRefreshDynamicData = false;
131
156
  switch(freshness){
132
157
  case 0:
@@ -143,52 +168,82 @@ restrictToShell) {
143
168
  freshness;
144
169
  break;
145
170
  }
146
- // TODO: We're not consistent about how we do this check. Some places
147
- // check if the segment starts with PAGE_SEGMENT_KEY, but most seem to
148
- // check if there any any children, which is why I'm doing it here. We
149
- // should probably encode an empty children set as `null` though. Either
150
- // way, we should update all the checks to be consistent.
151
171
  const isLeafSegment = newSlots === null;
152
172
  // Get the data for this segment. Since it was part of the previous route,
153
- // usually we just clone the data from the old CacheNode. However, during a
154
- // refresh or a revalidation, there won't be any existing CacheNode. So we
155
- // may need to consult the prefetch cache, like we would for a new segment.
156
- let newCacheNode;
173
+ // usually we just reuse the data from the old render tree. If the params
174
+ // changed, or during a refresh or revalidation, consult the prefetch cache
175
+ // or response seed instead.
176
+ let newRenderTree;
157
177
  let needsDynamicRequest;
158
- if (oldCacheNode !== undefined && !shouldRefreshDynamicData && // During a same-page navigation, we always refetch the page segments
159
- !(isLeafSegment && isSamePageNavigation) && // A search-param-only change is treated as a refresh of the page segment.
160
- // The internal cache key of the data is different, but the identity of
161
- // the node in the route tree is the same.
162
- segmentMatchKind !== 2) {
163
- // Reuse the existing CacheNode
164
- const dropPrefetchRsc = false;
165
- newCacheNode = reuseSharedCacheNode(dropPrefetchRsc, oldCacheNode);
166
- needsDynamicRequest = false;
167
- } else {
168
- // If this is part of a refresh, ignore the existing CacheNode and create a
169
- // new one.
170
- const seedRsc = seedData !== null ? seedData[0] : null;
171
- const result = createCacheNodeForSegment(navigatedAt, newRouteTree, seedRsc, newMetadataVaryPath, seedHead, freshness, seedDynamicStaleAt, // Carry forward the existing bfcacheId when there's a prior CacheNode:
172
- // even though the data is being refreshed, the state identity of the
173
- // route hasn't changed. Otherwise (no prior node) mint a fresh one.
174
- oldCacheNode !== undefined ? oldCacheNode.bfcacheId : generateBFCacheId(freshness), map, restrictToShell);
175
- newCacheNode = result.cacheNode;
176
- needsDynamicRequest = result.needsDynamicRequest;
177
- // Scroll handling
178
- if (isLeafSegment && segmentMatchKind === 2) {
179
- // Special case: A search param change mostly acts the same as a
180
- // refresh, except it does trigger a scroll.
181
- accumulateScrollRef(freshness, newCacheNode, accumulation);
178
+ const paramsChange = (0, _varypath.compareParams)(oldRenderTree.varyPath, newRouteTree.varyPath);
179
+ if (paramsChange !== _varypath.ParamsChange.None) {
180
+ // Path params are part of LayoutRouter's React key, so changing one
181
+ // remounts this segment and everything below it. Generate a new bfcacheId
182
+ // to match. Search params aren't part of the key, so a page whose search
183
+ // params changed keeps its existing id.
184
+ let bfcacheId;
185
+ if (paramsChange === _varypath.ParamsChange.PathParam) {
186
+ bfcacheId = generateBFCacheId(freshness);
182
187
  } else {
183
- // Normal case: This is a refresh of an existing segment. Carry forward
184
- // the old node's scrollRef. This preserves scroll intent when a prior
185
- // navigation's CacheNode is replaced by a refresh before the scroll
186
- // handler has had a chance to fire — e.g. when router.push() and
187
- // router.refresh() are called in the same startTransition batch.
188
- if (oldCacheNode !== undefined) {
189
- newCacheNode.scrollRef = oldCacheNode.scrollRef;
190
- }
188
+ bfcacheId = oldRenderTree.data.bfcacheId;
189
+ }
190
+ switch(freshness){
191
+ case 0:
192
+ case 5:
193
+ {
194
+ // If the existing data didn't read any of the params that changed, we
195
+ // can keep using it. Refreshes always fetch new data, and back/forward
196
+ // navigations restore the entry from the BFCache instead.
197
+ const oldCacheNode = oldRenderTree.data;
198
+ if (!(0, _varypath.didReadChangedParam)(oldRenderTree.varyPath, newRouteTree.varyPath, oldCacheNode.varyParams)) {
199
+ const cacheNode = createCacheNode(oldCacheNode.rsc, oldCacheNode.prefetchRsc, oldCacheNode.varyParams, bfcacheId);
200
+ if (freshness !== 5) {
201
+ (0, _bfcache.writeToBFCache)(navigatedAt, newRouteTree.varyPath, cacheNode, seedDynamicStaleAt);
202
+ }
203
+ newRenderTree = createRenderTree(newRouteTree, cacheNode);
204
+ needsDynamicRequest = false;
205
+ break;
206
+ }
207
+ // Intentional fallthrough
208
+ }
209
+ case 1:
210
+ case 2:
211
+ case 3:
212
+ case 4:
213
+ {
214
+ const result = createRenderTreeForSegment(navigatedAt, newRouteTree, freshness, seedDynamicStaleAt, bfcacheId, map, restrictToShell);
215
+ newRenderTree = result.node;
216
+ needsDynamicRequest = result.needsDynamicRequest;
217
+ break;
218
+ }
219
+ }
220
+ // A param change mostly acts the same as a refresh, except it does
221
+ // trigger a scroll.
222
+ if (isLeafSegment) {
223
+ accumulateScrollRef(freshness, newRenderTree.data, accumulation);
191
224
  }
225
+ } else if (shouldRefreshDynamicData || // During a same-page navigation, we always refetch the page segments
226
+ isLeafSegment && isSamePageNavigation) {
227
+ // This is a refresh of an existing segment. Ignore the existing render
228
+ // tree and create a new one.
229
+ const result = createRenderTreeForSegment(navigatedAt, newRouteTree, freshness, seedDynamicStaleAt, // Refreshing data preserves the identity of the active segment.
230
+ oldRenderTree.data.bfcacheId, map, restrictToShell);
231
+ newRenderTree = result.node;
232
+ needsDynamicRequest = result.needsDynamicRequest;
233
+ // Carry forward the old node's scrollRef. This preserves scroll intent
234
+ // when a prior navigation's render tree is replaced by a refresh before
235
+ // the scroll handler has had a chance to fire — e.g. when router.push()
236
+ // and router.refresh() are called in the same startTransition batch.
237
+ newRenderTree.data.scrollRef = oldRenderTree.data.scrollRef;
238
+ } else {
239
+ // This segment appears in both the old and new routes. Reuse the existing
240
+ // data without triggering a request.
241
+ // TODO: Consider adding a fast path where if this segment is unchanged and
242
+ // all of its children are unchanged, we return the exact same RenderTree
243
+ // object. Reusing the exact previous object gives React more of a chance to
244
+ // bail out of rendering.
245
+ newRenderTree = createRenderTree(newRouteTree, oldRenderTree.data);
246
+ needsDynamicRequest = false;
192
247
  }
193
248
  // During a refresh navigation, there's a special case that happens when
194
249
  // entering a "default" slot. The default slot may not be part of the
@@ -198,6 +253,7 @@ restrictToShell) {
198
253
  const maybeRefreshState = newRouteTree.refreshState;
199
254
  const refreshState = maybeRefreshState !== undefined && maybeRefreshState !== null ? // refresh URL as we continue traversing the tree.
200
255
  maybeRefreshState : parentRefreshState;
256
+ newRenderTree.refreshState = refreshState;
201
257
  // If this segment itself needs to fetch new data from the server, then by
202
258
  // definition it is being refreshed. Track its refresh URL so we know which
203
259
  // URL to request the data from.
@@ -229,37 +285,32 @@ restrictToShell) {
229
285
  // include paths that are dynamic. Instead of reusing the
230
286
  // FlightRouterState type.
231
287
  let dynamicRequestTreeChildren = {};
232
- let newCacheNodeSlots = null;
233
288
  if (newSlots !== null) {
234
- const oldCacheNodeSlots = oldCacheNode !== undefined ? oldCacheNode.slots : null;
235
- newCacheNode.slots = newCacheNodeSlots = {};
289
+ const oldRenderTreeSlots = oldRenderTree.slots;
290
+ const newRenderTreeSlots = new Map();
291
+ newRenderTree.slots = newRenderTreeSlots;
236
292
  taskChildren = new Map();
237
293
  for (let [parallelRouteKey, newRouteTreeChild] of newSlots){
238
- const oldRouterStateChild = oldRouterStateChildren[parallelRouteKey];
239
- if (oldRouterStateChild === undefined) {
294
+ const oldRenderTreeChild = oldRenderTreeSlots?.get(parallelRouteKey);
295
+ if (oldRenderTreeChild === undefined) {
240
296
  // This should never happen, but if it does, it suggests a malformed
241
297
  // server response. Trigger a full-page navigation.
242
298
  return null;
243
299
  }
244
- let seedDataChild = seedDataChildren !== null ? seedDataChildren[parallelRouteKey] : null;
245
- const oldSegmentChild = oldRouterStateChild[0];
246
- let newSegmentChild = createSegmentFromRouteTree(newRouteTreeChild);
247
- let seedHeadChild = seedHead;
300
+ const oldSegmentChild = oldRenderTreeChild.segment;
301
+ const newSegmentChild = newRouteTreeChild.segment;
248
302
  if (// Skip this branch during a history traversal. We restore the tree that
249
303
  // was stashed in the history entry as-is.
250
- freshness !== 2 && newSegmentChild === _segment.DEFAULT_SEGMENT_KEY && oldSegmentChild !== _segment.DEFAULT_SEGMENT_KEY) {
304
+ freshness !== 2 && newSegmentChild === _segment.DEFAULT_SEGMENT_KEY && oldSegmentChild !== _segment.DEFAULT_SEGMENT_KEY && // The active segment was rendered with this layout's params. If a
305
+ // path param changed, we can't keep it. Use the default segment from
306
+ // the server instead.
307
+ paramsChange !== _varypath.ParamsChange.PathParam) {
251
308
  // This is a "default" segment. These are never sent by the server during
252
309
  // a soft navigation; instead, the client reuses whatever segment was
253
310
  // already active in that slot on the previous route.
254
- newRouteTreeChild = reuseActiveSegmentInDefaultSlot(newRouteTree, parallelRouteKey, oldRootRefreshState, oldRouterStateChild);
255
- newSegmentChild = createSegmentFromRouteTree(newRouteTreeChild);
256
- // Since we're switching to a different route tree, these are no
257
- // longer valid, because they correspond to the outer tree.
258
- seedDataChild = null;
259
- seedHeadChild = null;
311
+ newRouteTreeChild = reuseActiveSegmentInDefaultSlot(oldRootRefreshState, oldRenderTreeChild);
260
312
  }
261
- const oldCacheNodeChild = oldCacheNodeSlots !== null ? oldCacheNodeSlots[parallelRouteKey] : undefined;
262
- const taskChild = updateCacheNodeOnNavigation(navigatedAt, oldUrl, oldCacheNodeChild, oldRouterStateChild, newRouteTreeChild, newMetadataVaryPath, freshness, seedDataChild ?? null, seedHeadChild, seedDynamicStaleAt, isSamePageNavigation, parentNeedsDynamicRequest || needsDynamicRequest, oldRootRefreshState, refreshState, accumulation, map, restrictToShell);
313
+ const taskChild = updateRenderTreeOnNavigation(navigatedAt, oldRenderTreeChild, newRouteTreeChild, freshness, seedDynamicStaleAt, isSamePageNavigation, parentNeedsDynamicRequest || needsDynamicRequest, oldRootRefreshState, refreshState, accumulation, map, restrictToShell);
263
314
  if (taskChild === null) {
264
315
  // One of the child tasks discovered a change to the root layout.
265
316
  // Immediately unwind from this recursive traversal. This will trigger a
@@ -268,7 +319,7 @@ restrictToShell) {
268
319
  }
269
320
  // Recursively propagate up the child tasks.
270
321
  taskChildren.set(parallelRouteKey, taskChild);
271
- newCacheNodeSlots[parallelRouteKey] = taskChild.node;
322
+ newRenderTreeSlots.set(parallelRouteKey, taskChild.node);
272
323
  // The child tree's route state may be different from the prefetched
273
324
  // route sent by the server. We need to clone it as we traverse back up
274
325
  // the tree.
@@ -284,24 +335,8 @@ restrictToShell) {
284
335
  }
285
336
  }
286
337
  }
287
- const newFlightRouterState = [
288
- createSegmentFromRouteTree(newRouteTree),
289
- patchedRouterStateChildren,
290
- refreshState !== null ? [
291
- refreshState.canonicalUrl,
292
- refreshState.renderedSearch
293
- ] : null,
294
- null,
295
- newRouteTree.prefetchHints
296
- ];
297
- return {
298
- status: needsDynamicRequest ? 0 : 1,
299
- route: newFlightRouterState,
300
- node: newCacheNode,
301
- dynamicRequestTree: createDynamicRequestTree(newFlightRouterState, dynamicRequestTreeChildren, needsDynamicRequest, childNeedsDynamicRequest, parentNeedsDynamicRequest),
302
- refreshState,
303
- children: taskChildren
304
- };
338
+ const newFlightRouterState = createRouterStateForSegment(newRouteTree, patchedRouterStateChildren, refreshState);
339
+ return createNavigationTask(needsDynamicRequest ? 0 : 1, newFlightRouterState, newRenderTree, createDynamicRequestTree(newFlightRouterState, dynamicRequestTreeChildren, needsDynamicRequest, childNeedsDynamicRequest, parentNeedsDynamicRequest), taskChildren);
305
340
  }
306
341
  /**
307
342
  * Assigns a ScrollRef to a new leaf CacheNode so the scroll handler
@@ -309,16 +344,14 @@ restrictToShell) {
309
344
  * navigation share the same ScrollRef — the first segment to scroll
310
345
  * consumes it, preventing others from also scrolling.
311
346
  *
312
- * This is only called inside `createCacheNodeOnNavigation`, which only
313
- * runs when segments diverge from the previous route. So for a refresh
314
- * where the route structure stays the same, segments match, the update
315
- * path is taken, and this function is never called — no scroll ref is
316
- * assigned. A scroll ref is only assigned when the route actually
317
- * changed (e.g. a redirect, or a dynamic condition on the server that
318
- * produces a different route).
347
+ * Called for newly entered segments, and for segments whose params changed
348
+ * (even if their data was reused). Refreshes keep the existing scroll ref.
319
349
  *
320
350
  * Skipped during hydration (initial render should not scroll) and
321
351
  * history traversal (scroll restoration is handled separately).
352
+ *
353
+ * The head passes through here as a leaf too; its `scrollRef` is never read
354
+ * (only LayoutRouter reads one), and the page leaf sets the same shared ref.
322
355
  */ function accumulateScrollRef(freshness, cacheNode, accumulation) {
323
356
  switch(freshness){
324
357
  case 0:
@@ -341,44 +374,40 @@ restrictToShell) {
341
374
  break;
342
375
  }
343
376
  }
344
- function createCacheNodeOnNavigation(navigatedAt, newRouteTree, newMetadataVaryPath, freshness, seedData, seedHead, seedDynamicStaleAt, parentNeedsDynamicRequest, accumulation, map, // Instant Navigation Testing API only — restricts segment reads to shell
377
+ function createRenderTreeOnNavigation(navigatedAt, newRouteTree, freshness, seedDynamicStaleAt, parentNeedsDynamicRequest, accumulation, map, // Instant Navigation Testing API only — restricts segment reads to shell
345
378
  // entries. Always false outside the testing API. See navigation-testing-lock.
346
379
  restrictToShell) {
347
- // Same traversal as updateCacheNodeNavigation, but simpler. We switch to this
380
+ // Same traversal as updateRenderTreeOnNavigation, but simpler. We switch to this
348
381
  // path once we reach the part of the tree that was not in the previous route.
349
382
  // We don't need to diff against the old tree, we just need to create a new
350
383
  // one. We also don't need to worry about any refresh-related logic.
351
384
  //
352
- // For the most part, this is a subset of updateCacheNodeOnNavigation, so any
385
+ // For the most part, this is a subset of updateRenderTreeOnNavigation, so any
353
386
  // change that happens in this function likely needs to be applied to that
354
387
  // one, too. However there are some places where the behavior intentionally
355
388
  // diverges, which is why we keep them separate.
356
- const newSegment = createSegmentFromRouteTree(newRouteTree);
357
389
  const newSlots = newRouteTree.slots;
358
- const seedDataChildren = seedData !== null ? seedData[1] : null;
359
- const seedRsc = seedData !== null ? seedData[0] : null;
360
- const result = createCacheNodeForSegment(navigatedAt, newRouteTree, seedRsc, newMetadataVaryPath, seedHead, freshness, seedDynamicStaleAt, // This segment was not part of the previous route, so mint a fresh
390
+ const result = createRenderTreeForSegment(navigatedAt, newRouteTree, freshness, seedDynamicStaleAt, // This segment was not part of the previous route, so mint a fresh
361
391
  // bfcacheId.
362
392
  generateBFCacheId(freshness), map, restrictToShell);
363
- const newCacheNode = result.cacheNode;
393
+ const newRenderTree = result.node;
364
394
  const needsDynamicRequest = result.needsDynamicRequest;
365
395
  const isLeafSegment = newSlots === null;
366
396
  if (isLeafSegment) {
367
- accumulateScrollRef(freshness, newCacheNode, accumulation);
397
+ accumulateScrollRef(freshness, newRenderTree.data, accumulation);
368
398
  }
369
399
  let patchedRouterStateChildren = {};
370
400
  let taskChildren = null;
371
401
  let childNeedsDynamicRequest = false;
372
402
  let dynamicRequestTreeChildren = {};
373
- let newCacheNodeSlots = null;
374
403
  if (newSlots !== null) {
375
- newCacheNode.slots = newCacheNodeSlots = {};
404
+ const newRenderTreeSlots = new Map();
405
+ newRenderTree.slots = newRenderTreeSlots;
376
406
  taskChildren = new Map();
377
407
  for (const [parallelRouteKey, newRouteTreeChild] of newSlots){
378
- const seedDataChild = seedDataChildren !== null ? seedDataChildren[parallelRouteKey] : null;
379
- const taskChild = createCacheNodeOnNavigation(navigatedAt, newRouteTreeChild, newMetadataVaryPath, freshness, seedDataChild ?? null, seedHead, seedDynamicStaleAt, parentNeedsDynamicRequest || needsDynamicRequest, accumulation, map, restrictToShell);
408
+ const taskChild = createRenderTreeOnNavigation(navigatedAt, newRouteTreeChild, freshness, seedDynamicStaleAt, parentNeedsDynamicRequest || needsDynamicRequest, accumulation, map, restrictToShell);
380
409
  taskChildren.set(parallelRouteKey, taskChild);
381
- newCacheNodeSlots[parallelRouteKey] = taskChild.node;
410
+ newRenderTreeSlots.set(parallelRouteKey, taskChild.node);
382
411
  const taskChildRoute = taskChild.route;
383
412
  patchedRouterStateChildren[parallelRouteKey] = taskChildRoute;
384
413
  const dynamicRequestTreeChild = taskChild.dynamicRequestTree;
@@ -390,47 +419,32 @@ restrictToShell) {
390
419
  }
391
420
  }
392
421
  }
393
- const newFlightRouterState = [
394
- newSegment,
395
- patchedRouterStateChildren,
396
- null,
422
+ // This route is not part of the current tree, so there's no reason to
423
+ // track the refresh URL.
424
+ const refreshState = null;
425
+ const newFlightRouterState = createRouterStateForSegment(newRouteTree, patchedRouterStateChildren, refreshState);
426
+ return createNavigationTask(needsDynamicRequest ? 0 : 1, newFlightRouterState, newRenderTree, createDynamicRequestTree(newFlightRouterState, dynamicRequestTreeChildren, needsDynamicRequest, childNeedsDynamicRequest, parentNeedsDynamicRequest), taskChildren);
427
+ }
428
+ // Converts a route tree node into the router state the client sends back to
429
+ // the server. Page nodes carry their rendered search in its own slot.
430
+ function createRouterStateForSegment(routeTree, children, refreshState) {
431
+ const routerState = [
432
+ routeTree.segment,
433
+ children,
434
+ refreshState !== null ? [
435
+ refreshState.canonicalUrl,
436
+ refreshState.renderedSearch
437
+ ] : null,
397
438
  null,
398
- newRouteTree.prefetchHints
439
+ routeTree.prefetchHints
399
440
  ];
400
- return {
401
- status: needsDynamicRequest ? 0 : 1,
402
- route: newFlightRouterState,
403
- node: newCacheNode,
404
- dynamicRequestTree: createDynamicRequestTree(newFlightRouterState, dynamicRequestTreeChildren, needsDynamicRequest, childNeedsDynamicRequest, parentNeedsDynamicRequest),
405
- // This route is not part of the current tree, so there's no reason to
406
- // track the refresh URL.
407
- refreshState: null,
408
- children: taskChildren
409
- };
410
- }
411
- function createSegmentFromRouteTree(newRouteTree) {
412
- if (newRouteTree.isPage) {
413
- // In a dynamic server response, the server embeds the search params into
414
- // the segment key, but in a static one it's omitted. The client handles
415
- // this inconsistency by adding the search params back right at the end.
416
- //
417
- // TODO: The only thing this is used for is to create a cache key for
418
- // ChildSegmentMap. But we already track the `renderedSearch` everywhere as
419
- // part of the varyPath. The plan is get rid of ChildSegmentMap and
420
- // store the page data in a CacheMap using the varyPath, like we do
421
- // for prefetches. Then we can remove it from the segment key.
422
- //
423
- // As an incremental step, we can grab the search params from the varyPath.
424
- const renderedSearch = (0, _varypath.getRenderedSearchFromVaryPath)(newRouteTree.varyPath);
425
- if (renderedSearch === null) {
426
- return _segment.PAGE_SEGMENT_KEY;
441
+ if (routeTree.segment === _segment.PAGE_SEGMENT_KEY) {
442
+ const renderedSearch = (0, _varypath.getRenderedSearchFromVaryPath)(routeTree.varyPath);
443
+ if (renderedSearch !== null) {
444
+ routerState[5] = renderedSearch;
427
445
  }
428
- // This is based on equivalent logic in addSearchParamsIfPageSegment, used
429
- // on the server.
430
- const stringifiedQuery = JSON.stringify((0, _routeparams.urlSearchParamsToParsedUrlQuery)(new URLSearchParams(renderedSearch)));
431
- return stringifiedQuery !== '{}' ? _segment.PAGE_SEGMENT_KEY + '?' + stringifiedQuery : _segment.PAGE_SEGMENT_KEY;
432
446
  }
433
- return newRouteTree.segment;
447
+ return routerState;
434
448
  }
435
449
  function patchRouterStateWithNewChildren(baseRouterState, newChildren) {
436
450
  const clone = [
@@ -449,6 +463,9 @@ function patchRouterStateWithNewChildren(baseRouterState, newChildren) {
449
463
  if (4 in baseRouterState) {
450
464
  clone[4] = baseRouterState[4];
451
465
  }
466
+ if (5 in baseRouterState) {
467
+ clone[5] = baseRouterState[5];
468
+ }
452
469
  return clone;
453
470
  }
454
471
  function createDynamicRequestTree(newRouterState, dynamicRequestTreeChildren, needsDynamicRequest, childNeedsDynamicRequest, parentNeedsDynamicRequest) {
@@ -495,20 +512,20 @@ function accumulateRefreshUrl(accumulation, refreshState) {
495
512
  separateRefreshUrls.add(refreshUrl);
496
513
  }
497
514
  }
498
- function reuseActiveSegmentInDefaultSlot(parentRouteTree, parallelRouteKey, oldRootRefreshState, oldRouterState) {
515
+ function reuseActiveSegmentInDefaultSlot(oldRootRefreshState, oldRenderTree) {
499
516
  // This is a "default" segment. These are never sent by the server during a
500
517
  // soft navigation; instead, the client reuses whatever segment was already
501
518
  // active in that slot on the previous route. This means if we later need to
502
519
  // refresh the segment, it will have to be refetched from the previous route's
503
- // URL. We store it in the Flight Router State.
520
+ // URL. We store the refresh context on the active render tree.
504
521
  let reusedUrl;
505
522
  let reusedRenderedSearch;
506
- const oldRefreshState = oldRouterState[2];
507
- if (oldRefreshState !== undefined && oldRefreshState !== null) {
523
+ const oldRefreshState = oldRenderTree.refreshState;
524
+ if (oldRefreshState !== null) {
508
525
  // This segment was already reused from an even older route. Keep its
509
526
  // existing URL and refresh state.
510
- reusedUrl = oldRefreshState[0];
511
- reusedRenderedSearch = oldRefreshState[1];
527
+ reusedUrl = oldRefreshState.canonicalUrl;
528
+ reusedRenderedSearch = oldRefreshState.renderedSearch;
512
529
  } else {
513
530
  // Since this route didn't already have a refresh state, it must have been
514
531
  // reachable from the root of the old route. So we use the refresh state
@@ -516,29 +533,31 @@ function reuseActiveSegmentInDefaultSlot(parentRouteTree, parallelRouteKey, oldR
516
533
  reusedUrl = oldRootRefreshState.canonicalUrl;
517
534
  reusedRenderedSearch = oldRootRefreshState.renderedSearch;
518
535
  }
519
- const acc = {
520
- metadataVaryPath: null,
521
- treeDivergedFromBase: false
522
- };
523
- const reusedRouteTree = (0, _cache.convertReusedFlightRouterStateToRouteTree)(parentRouteTree, parallelRouteKey, oldRouterState, reusedRenderedSearch, acc);
536
+ const reusedRouteTree = (0, _cache.rebaseInactiveRouteTree)(oldRenderTree);
524
537
  reusedRouteTree.refreshState = {
525
538
  canonicalUrl: reusedUrl,
526
539
  renderedSearch: reusedRenderedSearch
527
540
  };
528
541
  return reusedRouteTree;
529
542
  }
530
- function reuseSharedCacheNode(dropPrefetchRsc, existingCacheNode) {
531
- // Clone the CacheNode that was already present in the previous tree.
532
- // Carry forward the scrollRef so scroll intent from a prior navigation
533
- // survives tree rebuilds (e.g. push + refresh in the same batch).
534
- // Carry forward the bfcacheId so shared-layout segments retain stable
535
- // identity across navigations.
536
- return createCacheNode(existingCacheNode.rsc, dropPrefetchRsc ? null : existingCacheNode.prefetchRsc, existingCacheNode.head, dropPrefetchRsc ? null : existingCacheNode.prefetchHead, existingCacheNode.bfcacheId, existingCacheNode.scrollRef);
543
+ function createRenderTree(routeTree, cacheNode) {
544
+ return {
545
+ requestKey: routeTree.requestKey,
546
+ segment: routeTree.segment,
547
+ shellVaryPath: routeTree.shellVaryPath,
548
+ refreshState: null,
549
+ data: cacheNode,
550
+ varyPath: routeTree.varyPath,
551
+ slots: null,
552
+ prefetchHints: routeTree.prefetchHints
553
+ };
537
554
  }
538
- function createCacheNodeForSegment(now, tree, seedRsc, metadataVaryPath, seedHead, freshness, dynamicStaleAt, bfcacheId, map, // Instant Navigation Testing API only — restricts segment reads to shell
555
+ function createRenderTreeForSegment(now, // A route tree node, or the one-node metadata tree that stands in for the
556
+ // head (see createMetadataRouteTree).
557
+ tree, freshness, dynamicStaleAt, bfcacheId, map, // Instant Navigation Testing API only — restricts segment reads to shell
539
558
  // entries. Always false outside the testing API. See navigation-testing-lock.
540
559
  restrictToShell) {
541
- // Construct a new CacheNode using data from the BFCache, the client's
560
+ // Construct an owned render tree using data from the BFCache, the client's
542
561
  // Segment Cache, or seeded from a server response.
543
562
  //
544
563
  // If there's a cache miss, or if we only have a partial hit, we'll render
@@ -552,7 +571,9 @@ restrictToShell) {
552
571
  // as in the case of a Server Action-initiated redirect or refresh, we may
553
572
  // also be able to use that data without spawning a new request. (This is
554
573
  // referred to as the "seed" data.)
555
- const isPage = tree.isPage;
574
+ const seedData = tree.data;
575
+ const seedRsc = seedData !== null ? seedData.rsc : null;
576
+ const seedVaryParams = seedData !== null ? seedData.varyParams : null;
556
577
  // During certain kinds of navigations, we may be able to render from
557
578
  // the BFCache.
558
579
  switch(freshness){
@@ -569,7 +590,7 @@ restrictToShell) {
569
590
  // BFCacheEntry's id is only restored on history-traversal
570
591
  // navigations.
571
592
  return {
572
- cacheNode: createCacheNode(bfcacheEntry.rsc, bfcacheEntry.prefetchRsc, bfcacheEntry.head, bfcacheEntry.prefetchHead, bfcacheId),
593
+ node: createRenderTree(tree, createCacheNode(bfcacheEntry.rsc, bfcacheEntry.prefetchRsc, bfcacheEntry.varyParams, bfcacheId)),
573
594
  needsDynamicRequest: false
574
595
  };
575
596
  }
@@ -592,17 +613,11 @@ restrictToShell) {
592
613
  // triggers this path. But it does render correctly despite that. That's an
593
614
  // unusual render path so it's not surprising, but we should look into
594
615
  // modeling it in a more consistent way. See also the /_notFound special
595
- // case in updateCacheNodeOnNavigation.
596
- const rsc = seedRsc;
597
- const prefetchRsc = null;
598
- const head = isPage ? seedHead : null;
599
- const prefetchHead = null;
600
- (0, _bfcache.writeToBFCache)(now, tree.varyPath, rsc, prefetchRsc, head, prefetchHead, dynamicStaleAt, bfcacheId);
601
- if (isPage && metadataVaryPath !== null) {
602
- (0, _bfcache.writeHeadToBFCache)(now, metadataVaryPath, head, prefetchHead, dynamicStaleAt, bfcacheId);
603
- }
616
+ // case in updateRenderTreeOnNavigation.
617
+ const cacheNode = createCacheNode(seedRsc, null, seedVaryParams, bfcacheId);
618
+ (0, _bfcache.writeToBFCache)(now, tree.varyPath, cacheNode, dynamicStaleAt);
604
619
  return {
605
- cacheNode: createCacheNode(rsc, prefetchRsc, head, prefetchHead, bfcacheId),
620
+ node: createRenderTree(tree, cacheNode),
606
621
  needsDynamicRequest: false
607
622
  };
608
623
  }
@@ -626,7 +641,7 @@ restrictToShell) {
626
641
  // navigations preserve the original id, regardless of whether
627
642
  // `cacheComponents` Activity preservation is enabled.
628
643
  return {
629
- cacheNode: createCacheNode(bfcacheEntry.rsc, dropPrefetchRsc ? null : bfcacheEntry.prefetchRsc, bfcacheEntry.head, dropPrefetchRsc ? null : bfcacheEntry.prefetchHead, bfcacheEntry.bfcacheId),
644
+ node: createRenderTree(tree, createCacheNode(bfcacheEntry.rsc, dropPrefetchRsc ? null : bfcacheEntry.prefetchRsc, bfcacheEntry.varyParams, bfcacheEntry.bfcacheId)),
630
645
  needsDynamicRequest: false
631
646
  };
632
647
  }
@@ -641,6 +656,7 @@ restrictToShell) {
641
656
  }
642
657
  let cachedRsc = null;
643
658
  let isCachedRscPartial = true;
659
+ let cachedVaryParams = null;
644
660
  const segmentEntry = (0, _cache.readSegmentCacheEntryForNavigation)(now, map, tree.varyPath, restrictToShell);
645
661
  if (segmentEntry !== null) {
646
662
  switch(segmentEntry.status){
@@ -649,6 +665,7 @@ restrictToShell) {
649
665
  // Happy path: a cache hit
650
666
  cachedRsc = segmentEntry.rsc;
651
667
  isCachedRscPartial = segmentEntry.isPartial;
668
+ cachedVaryParams = segmentEntry.varyParams;
652
669
  break;
653
670
  }
654
671
  case _cache.EntryStatus.Pending:
@@ -658,6 +675,8 @@ restrictToShell) {
658
675
  // before the dynamic data response, we might as well use it.
659
676
  const promiseForFulfilledEntry = (0, _cache.waitForSegmentCacheEntry)(segmentEntry);
660
677
  cachedRsc = promiseForFulfilledEntry.then((entry)=>entry !== null ? entry.rsc : null);
678
+ // The entry's data hasn't arrived, and neither has the source of the
679
+ // params it depends on; `cachedVaryParams` stays null.
661
680
  // Because the request is still pending, we typically don't know yet
662
681
  // whether the response will be partial. We shouldn't skip this segment
663
682
  // during the dynamic navigation request. Otherwise, we might need to
@@ -683,6 +702,24 @@ restrictToShell) {
683
702
  }
684
703
  }
685
704
  }
705
+ if (process.env.__NEXT_OPTIMISTIC_ROUTING && tree.segment === _segmentvalueencoding.HEAD_REQUEST_KEY && isCachedRscPartial) {
706
+ // TODO: When optimistic routing is enabled, don't block on waiting for
707
+ // the viewport to resolve. This is a temporary workaround until Vary
708
+ // Params are tracked when rendering the metadata. We'll fix it before
709
+ // this feature is stable. However, it's not a critical issue because 1)
710
+ // it will stream in eventually anyway 2) metadata is wrapped in an
711
+ // internal Suspense boundary, so is always non-blocking; this only
712
+ // affects the viewport node, which is meant to blocking, however... 3)
713
+ // before Segment Cache landed this wasn't always the case, anyway, so
714
+ // it's unlikely that many people are relying on this behavior. Still,
715
+ // will be fixed before stable. It's the very next step in the sequence of
716
+ // work on this project.
717
+ //
718
+ // This line of code works because the App Router treats `null` as
719
+ // "no renderable head available", rather than an empty head. React treats
720
+ // an empty string as empty.
721
+ cachedRsc = '';
722
+ }
686
723
  // Now combine the cached data with the seed data to determine what we can
687
724
  // render immediately, versus what needs to stream in later.
688
725
  // A partial state to show immediately while we wait for the final data to
@@ -694,6 +731,10 @@ restrictToShell) {
694
731
  // means the data failed to load; the LayoutRouter will suspend indefinitely
695
732
  // until the router updates again (refer to finishNavigationTask).
696
733
  let rsc;
734
+ // The source of the params `rsc` depends on. A server response or a
735
+ // fulfilled segment cache entry carries one; a deferred `rsc` gets its
736
+ // source when the response arrives (finishPendingCacheNode).
737
+ let varyParams;
697
738
  let doesSegmentNeedDynamicRequest;
698
739
  if (seedRsc !== null) {
699
740
  // We already have a dynamic server response for this segment.
@@ -702,6 +743,7 @@ restrictToShell) {
702
743
  // partial cached state in the meantime.
703
744
  prefetchRsc = cachedRsc;
704
745
  rsc = seedRsc;
746
+ varyParams = seedVaryParams;
705
747
  } else {
706
748
  // We already have a completely cached segment. Ignore the seed data,
707
749
  // which may still be streaming in. This shouldn't happen in the normal
@@ -709,6 +751,7 @@ restrictToShell) {
709
751
  // already fully cached, and the server will skip rendering them.
710
752
  prefetchRsc = null;
711
753
  rsc = cachedRsc;
754
+ varyParams = cachedVaryParams;
712
755
  }
713
756
  doesSegmentNeedDynamicRequest = false;
714
757
  } else {
@@ -721,118 +764,38 @@ restrictToShell) {
721
764
  // data arrives from the server.
722
765
  prefetchRsc = cachedRsc;
723
766
  rsc = createDeferredRsc();
767
+ varyParams = null;
724
768
  } else {
725
769
  // The data is fully cached.
726
770
  prefetchRsc = null;
727
771
  rsc = cachedRsc;
772
+ varyParams = cachedVaryParams;
728
773
  }
729
774
  doesSegmentNeedDynamicRequest = isCachedRscPartial;
730
775
  }
731
- // If this is a page segment, we need to do the same for the head. This
732
- // follows analogous logic to the segment data above.
733
- // TODO: We don't need to store the head on the page segment's CacheNode; we
734
- // can lift it to the main state object. Then we can also delete
735
- // findHeadCache.
736
- let prefetchHead = null;
737
- let head = null;
738
- let doesHeadNeedDynamicRequest = isPage;
739
- if (isPage) {
740
- let cachedHead = null;
741
- let isCachedHeadPartial = true;
742
- if (metadataVaryPath !== null) {
743
- const metadataEntry = (0, _cache.readSegmentCacheEntryForNavigation)(now, map, metadataVaryPath, restrictToShell);
744
- if (metadataEntry !== null) {
745
- switch(metadataEntry.status){
746
- case _cache.EntryStatus.Fulfilled:
747
- {
748
- cachedHead = metadataEntry.rsc;
749
- isCachedHeadPartial = metadataEntry.isPartial;
750
- break;
751
- }
752
- case _cache.EntryStatus.Pending:
753
- {
754
- cachedHead = (0, _cache.waitForSegmentCacheEntry)(metadataEntry).then((entry)=>entry !== null ? entry.rsc : null);
755
- isCachedHeadPartial = metadataEntry.isPartial;
756
- break;
757
- }
758
- case _cache.EntryStatus.Empty:
759
- case _cache.EntryStatus.Rejected:
760
- {
761
- break;
762
- }
763
- default:
764
- {
765
- metadataEntry;
766
- break;
767
- }
768
- }
769
- }
770
- }
771
- if (process.env.__NEXT_OPTIMISTIC_ROUTING && isCachedHeadPartial) {
772
- // TODO: When optimistic routing is enabled, don't block on waiting for
773
- // the viewport to resolve. This is a temporary workaround until Vary
774
- // Params are tracked when rendering the metadata. We'll fix it before
775
- // this feature is stable. However, it's not a critical issue because 1)
776
- // it will stream in eventually anyway 2) metadata is wrapped in an
777
- // internal Suspense boundary, so is always non-blocking; this only
778
- // affects the viewport node, which is meant to blocking, however... 3)
779
- // before Segment Cache landed this wasn't always the case, anyway, so
780
- // it's unlikely that many people are relying on this behavior. Still,
781
- // will be fixed before stable. It's the very next step in the sequence of
782
- // work on this project.
783
- //
784
- // This line of code works because the App Router treats `null` as
785
- // "no renderable head available", rather than an empty head. React treats
786
- // an empty string as empty.
787
- cachedHead = '';
788
- }
789
- if (seedHead !== null) {
790
- if (isCachedHeadPartial) {
791
- prefetchHead = cachedHead;
792
- head = seedHead;
793
- } else {
794
- prefetchHead = null;
795
- head = cachedHead;
796
- }
797
- doesHeadNeedDynamicRequest = false;
798
- } else {
799
- if (isCachedHeadPartial) {
800
- prefetchHead = cachedHead;
801
- head = createDeferredRsc();
802
- } else {
803
- prefetchHead = null;
804
- head = cachedHead;
805
- }
806
- doesHeadNeedDynamicRequest = isCachedHeadPartial;
807
- }
808
- }
809
776
  // Now that we're creating a new segment, write its data to the BFCache. A
810
777
  // subsequent back/forward navigation will reuse this same data, until or
811
778
  // unless it's cleared by a refresh/revalidation.
812
779
  //
813
780
  // Skip BFCache writes for optimistic navigations since they are transient
814
781
  // and will be replaced by the canonical navigation.
782
+ const cacheNode = createCacheNode(rsc, prefetchRsc, varyParams, bfcacheId);
815
783
  if (freshness !== 5) {
816
- (0, _bfcache.writeToBFCache)(now, tree.varyPath, rsc, prefetchRsc, head, prefetchHead, dynamicStaleAt, bfcacheId);
817
- if (isPage && metadataVaryPath !== null) {
818
- (0, _bfcache.writeHeadToBFCache)(now, metadataVaryPath, head, prefetchHead, dynamicStaleAt, bfcacheId);
819
- }
784
+ (0, _bfcache.writeToBFCache)(now, tree.varyPath, cacheNode, dynamicStaleAt);
820
785
  }
821
786
  return {
822
- cacheNode: createCacheNode(rsc, prefetchRsc, head, prefetchHead, bfcacheId),
787
+ node: createRenderTree(tree, cacheNode),
823
788
  // TODO: We should store this field on the CacheNode itself. I think we can
824
789
  // probably unify NavigationTask, CacheNode, and DeferredRsc into a
825
790
  // single type. Or at least CacheNode and DeferredRsc.
826
- needsDynamicRequest: doesSegmentNeedDynamicRequest || doesHeadNeedDynamicRequest
791
+ needsDynamicRequest: doesSegmentNeedDynamicRequest
827
792
  };
828
793
  }
829
- function createCacheNode(rsc, prefetchRsc, head, prefetchHead, bfcacheId, scrollRef = null) {
794
+ function createCacheNode(rsc, prefetchRsc, varyParams, bfcacheId, scrollRef = null) {
830
795
  return {
831
796
  rsc,
832
797
  prefetchRsc,
833
- head,
834
- prefetchHead,
835
- slots: null,
798
+ varyParams,
836
799
  scrollRef,
837
800
  bfcacheId
838
801
  };
@@ -849,20 +812,11 @@ function generateBFCacheId(freshness) {
849
812
  if (freshness === 1) return 0;
850
813
  return ++nextBFCacheId;
851
814
  }
852
- function compareSegments(newSegment, oldSegment) {
853
- if ((0, _matchsegments.matchSegment)(newSegment, oldSegment)) {
854
- return 0;
855
- }
856
- if (typeof newSegment === 'string' && typeof oldSegment === 'string' && newSegment.startsWith(_segment.PAGE_SEGMENT_KEY) && oldSegment.startsWith(_segment.PAGE_SEGMENT_KEY)) {
857
- return 2;
858
- }
859
- return 1;
860
- }
861
815
  // Represents whether the previuos navigation resulted in a route tree mismatch.
862
816
  // A mismatch results in a refresh of the page. If there are two successive
863
817
  // mismatches, we will fall back to an MPA navigation, to prevent a retry loop.
864
818
  let previousNavigationDidMismatch = false;
865
- function spawnDynamicRequests(task, primaryUrl, nextUrl, freshnessPolicy, accumulation, // The route cache entry used for this navigation, if it came from route
819
+ function spawnDynamicRequests(navigation, primaryUrl, nextUrl, freshnessPolicy, accumulation, // The route cache entry used for this navigation, if it came from route
866
820
  // prediction. Passed through so it can be marked as having a dynamic rewrite
867
821
  // if the server returns a different pathname than expected (indicating
868
822
  // dynamic rewrite behavior that varies by param value).
@@ -872,11 +826,17 @@ routeCacheEntry, // The original navigation's push/replace intent. Threaded thro
872
826
  navigateType, navigationLock, // The segment cache map this navigation is bound to. See `segmentCacheMap`
873
827
  // in cache.ts.
874
828
  map, signal) {
875
- const dynamicRequestTree = task.dynamicRequestTree;
829
+ let dynamicRequestTree = navigation.tree.dynamicRequestTree;
876
830
  if (dynamicRequestTree === null) {
877
- // This navigation was fully cached. There are no dynamic requests to spawn.
878
- previousNavigationDidMismatch = false;
879
- return;
831
+ if (navigation.head.status === 0) {
832
+ // Every segment is cached, but the head is not. Ask the server for the
833
+ // head alone.
834
+ dynamicRequestTree = _cache.MetadataOnlyRequestTree;
835
+ } else {
836
+ // This navigation was fully cached. There are no dynamic requests to spawn.
837
+ previousNavigationDidMismatch = false;
838
+ return;
839
+ }
880
840
  }
881
841
  // This is intentionally not an async function to discourage the caller from
882
842
  // awaiting the result. Any subsequent async operations spawned by this
@@ -887,7 +847,7 @@ map, signal) {
887
847
  // block the navigation, and collect the promises. The next function,
888
848
  // `finishNavigationTask`, can await the promises in any order without
889
849
  // accidentally introducing a network waterfall.
890
- const primaryRequestPromise = fetchMissingDynamicData(task, dynamicRequestTree, primaryUrl, nextUrl, freshnessPolicy, routeCacheEntry, navigationLock, map, signal);
850
+ const primaryRequestPromise = fetchMissingDynamicData(navigation.tree, navigation.head, dynamicRequestTree, primaryUrl, nextUrl, freshnessPolicy, routeCacheEntry, navigationLock, map, signal);
891
851
  const separateRefreshUrls = accumulation.separateRefreshUrls;
892
852
  let refreshRequestPromises = null;
893
853
  if (separateRefreshUrls !== null) {
@@ -917,7 +877,8 @@ map, signal) {
917
877
  // const scopedDynamicRequestTree = splitTaskByURL(task, refreshUrl)
918
878
  const scopedDynamicRequestTree = dynamicRequestTree;
919
879
  if (scopedDynamicRequestTree !== null) {
920
- refreshRequestPromises.push(fetchMissingDynamicData(task, scopedDynamicRequestTree, new URL(refreshUrl, location.origin), // TODO: Just noticed that this should actually the Next-Url at the
880
+ refreshRequestPromises.push(fetchMissingDynamicData(navigation.tree, // The head belongs to the primary URL.
881
+ null, scopedDynamicRequestTree, new URL(refreshUrl, location.origin), // TODO: Just noticed that this should actually the Next-Url at the
921
882
  // time the refresh URL was set, not the current Next-Url. Need to
922
883
  // start tracking this alongside the refresh URL. In the meantime,
923
884
  // if a refresh fails due to a mismatch, it will trigger a
@@ -928,12 +889,12 @@ map, signal) {
928
889
  }
929
890
  // Further async operations are moved into this separate function to
930
891
  // discourage sequential network requests.
931
- const voidPromise = finishNavigationTask(task, nextUrl, primaryRequestPromise, refreshRequestPromises, routeCacheEntry, navigateType);
892
+ const voidPromise = finishNavigationTask(navigation, nextUrl, primaryRequestPromise, refreshRequestPromises, routeCacheEntry, navigateType);
932
893
  // `finishNavigationTask` is responsible for error handling, so we can attach
933
894
  // noop callbacks to this promise.
934
895
  voidPromise.then(noop, noop);
935
896
  }
936
- async function finishNavigationTask(task, nextUrl, primaryRequestPromise, refreshRequestPromises, routeCacheEntry, navigateType) {
897
+ async function finishNavigationTask(navigation, nextUrl, primaryRequestPromise, refreshRequestPromises, routeCacheEntry, navigateType) {
937
898
  // Wait for all the requests to finish, or for the first one to fail.
938
899
  let exitStatus = await waitForRequestsToFinish(primaryRequestPromise, refreshRequestPromises);
939
900
  // Once the all the requests have finished, check the tree for any remaining
@@ -943,7 +904,15 @@ async function finishNavigationTask(task, nextUrl, primaryRequestPromise, refres
943
904
  // first phase; it doesn't matter in that case because we're going to refresh
944
905
  // the whole tree regardless.
945
906
  if (exitStatus === 0) {
946
- exitStatus = abortRemainingPendingTasks(task, null, null);
907
+ exitStatus = abortRemainingPendingTasks(navigation.tree, null, null);
908
+ // A response without a head is a mismatch, like any missing segment. The
909
+ // head's deferred rsc must be resolved to `null` here, never rejected: it
910
+ // renders at the app root, so a rejection would hit the root error
911
+ // boundary while the retry is in flight.
912
+ const headExitStatus = abortRemainingPendingTasks(navigation.head, null, null);
913
+ if (headExitStatus > exitStatus) {
914
+ exitStatus = headExitStatus;
915
+ }
947
916
  }
948
917
  switch(exitStatus){
949
918
  case -1:
@@ -970,7 +939,7 @@ async function finishNavigationTask(task, nextUrl, primaryRequestPromise, refres
970
939
  // happen in a row, fall back to a hard retry.
971
940
  const isHardRetry = false;
972
941
  const primaryRequestResult = await primaryRequestPromise;
973
- dispatchRetryDueToTreeMismatch(isHardRetry, primaryRequestResult.url, nextUrl, primaryRequestResult.seed, task.route, routeCacheEntry, navigateType, 3);
942
+ dispatchRetryDueToTreeMismatch(isHardRetry, primaryRequestResult.url, nextUrl, primaryRequestResult.seed, navigation, routeCacheEntry, navigateType, 3);
974
943
  return;
975
944
  }
976
945
  case 3:
@@ -981,7 +950,7 @@ async function finishNavigationTask(task, nextUrl, primaryRequestPromise, refres
981
950
  // (HistoryTraversal) instead of re-fetching it. See issue #95195.
982
951
  const isHardRetry = false;
983
952
  const primaryRequestResult = await primaryRequestPromise;
984
- dispatchRetryDueToTreeMismatch(isHardRetry, primaryRequestResult.url, nextUrl, primaryRequestResult.seed, task.route, routeCacheEntry, navigateType, 2);
953
+ dispatchRetryDueToTreeMismatch(isHardRetry, primaryRequestResult.url, nextUrl, primaryRequestResult.seed, navigation, routeCacheEntry, navigateType, 2);
985
954
  return;
986
955
  }
987
956
  case 2:
@@ -996,7 +965,7 @@ async function finishNavigationTask(task, nextUrl, primaryRequestPromise, refres
996
965
  // doesn't exist yet.
997
966
  const isHardRetry = true;
998
967
  const primaryRequestResult = await primaryRequestPromise;
999
- dispatchRetryDueToTreeMismatch(isHardRetry, primaryRequestResult.url, nextUrl, primaryRequestResult.seed, task.route, routeCacheEntry, navigateType, 3);
968
+ dispatchRetryDueToTreeMismatch(isHardRetry, primaryRequestResult.url, nextUrl, primaryRequestResult.seed, navigation, routeCacheEntry, navigateType, 3);
1000
969
  return;
1001
970
  }
1002
971
  default:
@@ -1010,7 +979,7 @@ function waitForRequestsToFinish(primaryRequestPromise, refreshRequestPromises)
1010
979
  // we don't assume that's available.
1011
980
  //
1012
981
  // Each promise resolves once the server responsds and the data is written
1013
- // into the CacheNode tree. Resolve the combined promise once all the
982
+ // into the render tree. Resolve the combined promise once all the
1014
983
  // requests finish.
1015
984
  //
1016
985
  // Or, resolve as soon as one of the requests fails, without waiting for the
@@ -1045,7 +1014,7 @@ function waitForRequestsToFinish(primaryRequestPromise, refreshRequestPromises)
1045
1014
  }
1046
1015
  });
1047
1016
  }
1048
- function dispatchRetryDueToTreeMismatch(isHardRetry, retryUrl, retryNextUrl, seed, baseTree, // The route cache entry used for this navigation, if it came from route
1017
+ function dispatchRetryDueToTreeMismatch(isHardRetry, retryUrl, retryNextUrl, seed, navigation, // The route cache entry used for this navigation, if it came from route
1049
1018
  // prediction. If the navigation results in a mismatch, we mark it as having
1050
1019
  // a dynamic rewrite so future predictions bail out.
1051
1020
  routeCacheEntry, // The original navigation's push/replace intent.
@@ -1054,26 +1023,32 @@ originalNavigateType, // Freshness policy for the retry navigation. `RefreshAll`
1054
1023
  // reuses the data already in the tree (used when only the URL needs
1055
1024
  // correcting after a redirect).
1056
1025
  retryFreshnessPolicy) {
1057
- // If the navigation used a route prediction, mark it as having a dynamic
1058
- // rewrite since it resulted in a mismatch.
1026
+ // If the navigation used a route prediction, mark the node it was predicted
1027
+ // from as having a dynamic rewrite since it resulted in a mismatch. A route
1028
+ // entry the server resolved has nothing to mark: nothing was predicted
1029
+ // from it.
1059
1030
  if (routeCacheEntry !== null) {
1060
- (0, _cache.markRouteEntryAsDynamicRewrite)(routeCacheEntry);
1031
+ const predictedFrom = routeCacheEntry.predictedFrom;
1032
+ if (predictedFrom !== null) {
1033
+ predictedFrom.hasDynamicRewrite = true;
1034
+ }
1061
1035
  } else if (seed !== null) {
1062
1036
  // Even without a direct reference to the route cache entry, we can still
1063
1037
  // mark the route as having a dynamic rewrite by traversing the known route
1064
1038
  // tree. This handles cases where the navigation didn't originate from a
1065
1039
  // route prediction, but still needs to mark the pattern.
1066
- const metadataVaryPath = seed.metadataVaryPath;
1067
- if (metadataVaryPath !== null) {
1068
- const now = Date.now();
1069
- (0, _optimisticroutes.discoverKnownRoute)(now, retryUrl.pathname, retryUrl.search, retryNextUrl, null, seed.routeTree, metadataVaryPath, false, (0, _createhreffromurl.createHrefFromUrl)(retryUrl), false, true // hasDynamicRewrite
1070
- );
1071
- }
1040
+ const now = Date.now();
1041
+ (0, _optimisticroutes.discoverKnownRoute)(now, retryUrl.pathname, retryUrl.search, retryNextUrl, null, seed.root, false, (0, _createhreffromurl.createHrefFromUrl)(retryUrl), seed.renderedSearch, false, true // hasDynamicRewrite
1042
+ );
1072
1043
  }
1073
- // Invalidate all route cache entries. Other entries may have been derived
1074
- // from the template before we knew it had a dynamic rewrite. This also
1044
+ // Invalidate all route cache entries. If the navigation used a route entry
1045
+ // the server resolved, its tree is what the server just contradicted, so
1046
+ // the retry must re-fetch it rather than navigate with it again. This also
1075
1047
  // triggers re-prefetching of visible links.
1076
- (0, _cache.invalidateRouteCacheEntries)(retryNextUrl, baseTree);
1048
+ (0, _cache.invalidateRouteCacheEntries)(retryNextUrl, {
1049
+ tree: navigation.tree.node,
1050
+ head: navigation.head.node
1051
+ });
1077
1052
  // If this is the second time in a row that a navigation resulted in a
1078
1053
  // mismatch, fall back to a hard (MPA) refresh.
1079
1054
  isHardRetry = isHardRetry || previousNavigationDidMismatch;
@@ -1092,6 +1067,7 @@ retryFreshnessPolicy) {
1092
1067
  // not here where the action is constructed. But the current action queue
1093
1068
  // doesn't provide a natural place for that. Revisit when we refactor the
1094
1069
  // action queue into a more reactive navigation model.
1070
+ const baseTree = navigation.tree.route;
1095
1071
  const lastCommitted = (0, _committedstate.getLastCommittedTree)();
1096
1072
  const retryNavigateType = lastCommitted !== null && baseTree !== lastCommitted ? originalNavigateType : 'replace';
1097
1073
  const retryAction = {
@@ -1106,7 +1082,7 @@ retryFreshnessPolicy) {
1106
1082
  };
1107
1083
  (0, _useactionqueue.dispatchAppRouterAction)(retryAction);
1108
1084
  }
1109
- async function fetchMissingDynamicData(task, dynamicRequestTree, url, nextUrl, freshnessPolicy, routeCacheEntry, navigationLock, map, signal) {
1085
+ async function fetchMissingDynamicData(tree, head, dynamicRequestTree, url, nextUrl, freshnessPolicy, routeCacheEntry, navigationLock, map, signal) {
1110
1086
  try {
1111
1087
  const result = await (0, _fetchserverresponse.fetchServerResponse)(url, {
1112
1088
  flightRouterState: dynamicRequestTree,
@@ -1126,32 +1102,22 @@ async function fetchMissingDynamicData(task, dynamicRequestTree, url, nextUrl, f
1126
1102
  };
1127
1103
  }
1128
1104
  const now = Date.now();
1129
- const seed = (0, _navigation.convertServerPatchToFullTree)(now, task.route, result.flightData, result.renderedSearch, result.dynamicStaleTime);
1105
+ const seed = (0, _decodeserverresponse.createNavigationSeed)(now, tree.route, result.transportData, // Navigation responses stream in incrementally, so their vary params
1106
+ // can't be drained here; they decode as null.
1107
+ null, result.isResponsePartial, // Navigation responses always include the param values in the tree, so
1108
+ // there's no pathname to parse them from (nor a need to).
1109
+ null, result.renderedSearch, null, result.dynamicStaleTime);
1130
1110
  // If the navigation lock is active, wait for it to be released before
1131
1111
  // writing the dynamic data. This allows tests to assert on the prefetched
1132
1112
  // UI state.
1133
1113
  if (process.env.__NEXT_EXPOSE_TESTING_API && navigationLock !== null) {
1134
1114
  await navigationLock;
1135
1115
  }
1136
- // TODO: Implement Shell extraction as part of Cached Navigations.
1137
- // Intentionally holding off on doing this until we decide how the Cached
1138
- // Navigations behavior should work in combination with App Shells.
1139
- if (routeCacheEntry !== null && result.staticStageData !== null) {
1140
- const { response: staticStageResponse, isResponsePartial } = result.staticStageData;
1141
- (0, _cache.resolveStaleAt)(now, staticStageResponse.s).then((staleAt)=>{
1142
- const buildId = result.responseHeaders.get(_constants.NEXT_NAV_DEPLOYMENT_ID_HEADER) ?? staticStageResponse.b;
1143
- (0, _cache.writePrerenderResponseIntoCache)(now, _types.FetchStrategy.PPR, staticStageResponse.f, buildId, staticStageResponse.h, staticStageResponse.r ?? null, staleAt, dynamicRequestTree, result.renderedSearch, isResponsePartial, map);
1144
- }).catch(()=>{
1145
- // The static stage processing failed. Not fatal — the navigation
1146
- // completed normally, we just won't write into the cache.
1147
- });
1116
+ if (routeCacheEntry !== null && result.staticStageResponse !== null) {
1117
+ (0, _cache.spawnStaticStageCacheWrite)(now, result.staticStageResponse, result.isResponsePartial, result.responseHeaders, dynamicRequestTree, result.renderedSearch, map);
1148
1118
  }
1149
1119
  if (routeCacheEntry !== null && result.runtimePrefetchStream !== null) {
1150
- (0, _cache.processRuntimePrefetchStream)(now, result.runtimePrefetchStream, dynamicRequestTree, result.renderedSearch).then((processed)=>{
1151
- if (processed !== null) {
1152
- (0, _cache.writeDynamicRenderResponseIntoCache)(now, _types.FetchStrategy.PPRRuntime, processed.flightDatas, processed.buildId, processed.isResponsePartial, processed.headVaryParams, processed.rootVaryParamsIterable, processed.staleAt, processed.navigationSeed, null, map);
1153
- }
1154
- }).catch(()=>{
1120
+ (0, _cache.writeRuntimePrefetchStreamIntoCache)(now, result.runtimePrefetchStream, dynamicRequestTree, result.renderedSearch, map).catch(()=>{
1155
1121
  // The runtime prefetch cache write failed. Not fatal — the
1156
1122
  // navigation completed normally, we just won't cache runtime data.
1157
1123
  });
@@ -1159,7 +1125,10 @@ async function fetchMissingDynamicData(task, dynamicRequestTree, url, nextUrl, f
1159
1125
  // result.dynamicStaleTime is in seconds (from the server's `d` field).
1160
1126
  // Convert to an absolute timestamp using the centralized helper.
1161
1127
  const dynamicStaleAt = (0, _bfcache.computeDynamicStaleAt)(now, result.dynamicStaleTime);
1162
- const didReceiveUnknownParallelRoute = writeDynamicDataIntoNavigationTask(task, seed.routeTree, seed.data, seed.head, dynamicStaleAt, result.debugInfo, result.revealAfter);
1128
+ const didReceiveUnknownParallelRoute = writeDynamicDataIntoNavigationTask(tree, seed.root.tree, dynamicStaleAt, result.debugInfo, result.revealAfter);
1129
+ if (head !== null) {
1130
+ writeDynamicDataIntoNavigationTask(head, seed.root.head, dynamicStaleAt, result.debugInfo, result.revealAfter);
1131
+ }
1163
1132
  const resolvedUrl = new URL(result.canonicalUrl, location.origin);
1164
1133
  // Decide whether the navigation needs to be retried.
1165
1134
  //
@@ -1208,27 +1177,31 @@ async function fetchMissingDynamicData(task, dynamicRequestTree, url, nextUrl, f
1208
1177
  };
1209
1178
  }
1210
1179
  }
1211
- function writeDynamicDataIntoNavigationTask(task, serverRouteTree, dynamicData, dynamicHead, dynamicStaleAt, debugInfo, revealAfter) {
1180
+ function writeDynamicDataIntoNavigationTask(task, serverRouteTree, dynamicStaleAt, debugInfo, revealAfter) {
1181
+ // A non-null data object means the response accounted for this segment,
1182
+ // even if it didn't render it (data.rsc may still be null, e.g. for the
1183
+ // intermediate segments on the path to a rendered subtree).
1184
+ const dynamicData = serverRouteTree.data;
1212
1185
  if (task.status === 0 && dynamicData !== null) {
1213
1186
  task.status = 1;
1214
- finishPendingCacheNode(task.node, dynamicData, dynamicHead, debugInfo, revealAfter);
1215
- // Update the BFCache entry's staleAt for this segment with the value
1216
- // from the dynamic response. This applies the per-page
1217
- // unstable_dynamicStaleTime if set, or the default DYNAMIC_STALETIME_MS.
1218
- // We only update segments that received dynamic data — static segments
1219
- // are unaffected.
1220
- (0, _bfcache.updateBFCacheEntryStaleAt)(serverRouteTree.varyPath, dynamicStaleAt);
1187
+ const cacheNode = task.node.data;
1188
+ finishPendingCacheNode(cacheNode, dynamicData, debugInfo, revealAfter);
1189
+ // The BFCache entry for this segment was written before the response
1190
+ // arrived. Bring it up to date with what the response filled in: its
1191
+ // staleAt (the per-page unstable_dynamicStaleTime if set, or the default
1192
+ // DYNAMIC_STALETIME_MS) and the source of the params its data depends
1193
+ // on. We only update segments that received dynamic data — static
1194
+ // segments are unaffected.
1195
+ (0, _bfcache.updateBFCacheEntryFromDynamicResponse)(serverRouteTree.varyPath, cacheNode, dynamicStaleAt);
1221
1196
  }
1222
1197
  const taskChildren = task.children;
1223
1198
  const serverChildren = serverRouteTree.slots;
1224
- const dynamicDataChildren = dynamicData !== null ? dynamicData[1] : null;
1225
1199
  // Detect whether the server sends a parallel route slot that the client
1226
1200
  // doesn't know about.
1227
1201
  let didReceiveUnknownParallelRoute = false;
1228
1202
  if (taskChildren !== null) {
1229
1203
  if (serverChildren !== null) {
1230
1204
  for (const [parallelRouteKey, serverRouteTreeChild] of serverChildren){
1231
- const dynamicDataChild = dynamicDataChildren !== null ? dynamicDataChildren[parallelRouteKey] : null;
1232
1205
  const taskChild = taskChildren.get(parallelRouteKey);
1233
1206
  if (taskChild === undefined) {
1234
1207
  // The server sent a child segment that the client doesn't know about.
@@ -1246,11 +1219,11 @@ function writeDynamicDataIntoNavigationTask(task, serverRouteTree, dynamicData,
1246
1219
  // path. But as an extra precaution, we validate in prod, too.
1247
1220
  didReceiveUnknownParallelRoute = true;
1248
1221
  } else {
1249
- const taskSegment = taskChild.route[0];
1250
- const serverSegment = createSegmentFromRouteTree(serverRouteTreeChild);
1251
- if ((0, _matchsegments.matchSegment)(serverSegment, taskSegment) && dynamicDataChild !== null && dynamicDataChild !== undefined) {
1222
+ // Check that the response is for the route we expected: same route
1223
+ // structure and same params, including the page's search params.
1224
+ if ((0, _cache.doesRouteStructureMatch)(taskChild.node, serverRouteTreeChild) && serverRouteTreeChild.data !== null && (0, _varypath.compareParams)(taskChild.node.varyPath, serverRouteTreeChild.varyPath) === _varypath.ParamsChange.None) {
1252
1225
  // Found a match for this task. Keep traversing down the task tree.
1253
- const childDidReceiveUnknownParallelRoute = writeDynamicDataIntoNavigationTask(taskChild, serverRouteTreeChild, dynamicDataChild, dynamicHead, dynamicStaleAt, debugInfo, revealAfter);
1226
+ const childDidReceiveUnknownParallelRoute = writeDynamicDataIntoNavigationTask(taskChild, serverRouteTreeChild, dynamicStaleAt, debugInfo, revealAfter);
1254
1227
  if (childDidReceiveUnknownParallelRoute) {
1255
1228
  didReceiveUnknownParallelRoute = true;
1256
1229
  }
@@ -1266,41 +1239,47 @@ function writeDynamicDataIntoNavigationTask(task, serverRouteTree, dynamicData,
1266
1239
  }
1267
1240
  return didReceiveUnknownParallelRoute;
1268
1241
  }
1269
- function finishPendingCacheNode(cacheNode, dynamicData, dynamicHead, debugInfo, revealAfter) {
1270
- // Writes a dynamic response into an existing Cache Node tree. This does _not_
1242
+ function finishPendingCacheNode(cacheNode, dynamicData, debugInfo, revealAfter) {
1243
+ // Writes a dynamic response into an existing render tree. This does _not_
1271
1244
  // create a new tree, it updates the existing tree in-place. So it must follow
1272
1245
  // the Suspense rules of cache safety — it can resolve pending promises, but
1273
1246
  // it cannot overwrite existing data. It can add segments to the tree (because
1274
- // a missing segment will cause the layout router to suspend).
1275
- // but it cannot delete them.
1247
+ // a missing segment will cause the layout router to suspend) but it cannot
1248
+ // delete them.
1276
1249
  //
1277
1250
  // We must resolve every promise in the tree, or else it will suspend
1278
1251
  // indefinitely. If we did not receive data for a segment, we will resolve its
1279
1252
  // data promise to `null` to trigger a lazy fetch during render.
1280
- // Use the dynamic data from the server to fulfill the deferred RSC promise
1281
- // on the Cache Node.
1253
+ // Use the dynamic data from the server to fulfill the deferred RSC promise.
1282
1254
  const rsc = cacheNode.rsc;
1283
- const dynamicSegmentData = dynamicData[0];
1255
+ const dynamicSegmentData = dynamicData.rsc;
1284
1256
  if (dynamicSegmentData === null) {
1285
- // This is an empty CacheNode; this particular server request did not
1257
+ // This particular server request did not
1286
1258
  // render this segment. There may be a separate pending request that will,
1287
1259
  // though, so we won't abort the task until all pending requests finish.
1288
1260
  return;
1289
1261
  }
1262
+ // TODO: `varyParams` must always describe the render that produced `rsc`,
1263
+ // but nothing in the CacheNode type ties the two fields together; this
1264
+ // function keeps them in lockstep by writing both at once. Eventually the
1265
+ // whole CacheNode should be a thenable whose fields are populated through
1266
+ // dedicated helpers that own the state transition.
1290
1267
  if (rsc === null) {
1291
1268
  // This is a lazy cache node. We can overwrite it. This is only safe
1292
1269
  // because we know that the LayoutRouter suspends if `rsc` is `null`.
1293
1270
  cacheNode.rsc = dynamicSegmentData;
1294
- } else if (isDeferredRsc(rsc)) {
1271
+ cacheNode.varyParams = dynamicData.varyParams;
1272
+ } else if (isDeferredRsc(rsc) && rsc.status === 'pending') {
1295
1273
  // This is a deferred RSC promise. We can fulfill it with the data we just
1296
- // received from the server. If it was already resolved by a different
1297
- // navigation, then this does nothing because we can't overwrite data.
1274
+ // received from the server. The source of the params that data depends
1275
+ // on travels with it.
1298
1276
  //
1299
1277
  // In the streaming dev render, defer the fill until `revealAfter` settles,
1300
1278
  // so React doesn't render the boundary's children before their row has been
1301
1279
  // decoded (otherwise it suspends on the still-pending children and commits
1302
1280
  // a premature fallback). Outside that render `revealAfter` is null and we
1303
1281
  // resolve immediately.
1282
+ cacheNode.varyParams = dynamicData.varyParams;
1304
1283
  if (revealAfter !== null) {
1305
1284
  const resolveRsc = ()=>rsc.resolve(dynamicSegmentData, debugInfo);
1306
1285
  // Use the same callback for both outcomes: we don't expect `revealAfter`
@@ -1311,15 +1290,9 @@ function finishPendingCacheNode(cacheNode, dynamicData, dynamicHead, debugInfo,
1311
1290
  rsc.resolve(dynamicSegmentData, debugInfo);
1312
1291
  }
1313
1292
  } else {
1314
- // This is not a deferred RSC promise, nor is it empty, so it must have
1315
- // been populated by a different navigation. We must not overwrite it.
1316
- }
1317
- // Check if this is a leaf segment. If so, it will have a `head` property with
1318
- // a pending promise that needs to be resolved with the dynamic head from
1319
- // the server.
1320
- const head = cacheNode.head;
1321
- if (isDeferredRsc(head)) {
1322
- head.resolve(dynamicHead, debugInfo);
1293
+ // This is not a deferred RSC promise that's still pending, nor is it
1294
+ // empty, so it must have been populated by a different navigation. We
1295
+ // must not overwrite it (nor its dependency source).
1323
1296
  }
1324
1297
  }
1325
1298
  function abortRemainingPendingTasks(task, error, debugInfo) {
@@ -1327,7 +1300,7 @@ function abortRemainingPendingTasks(task, error, debugInfo) {
1327
1300
  if (task.status === 0) {
1328
1301
  // The data for this segment is still missing.
1329
1302
  task.status = 2;
1330
- abortPendingCacheNode(task.node, error, debugInfo);
1303
+ abortPendingCacheNode(task.node.data, error, debugInfo);
1331
1304
  // If the server failed to fulfill the data for this segment, it implies
1332
1305
  // that the route tree received from the server mismatched the tree that
1333
1306
  // was previously prefetched.
@@ -1340,7 +1313,7 @@ function abortRemainingPendingTasks(task, error, debugInfo) {
1340
1313
  //
1341
1314
  // When this happens, we treat this the same as a refresh(). The entire
1342
1315
  // tree will be re-rendered from the root.
1343
- if (task.refreshState === null) {
1316
+ if (task.node.refreshState === null) {
1344
1317
  // Trigger a "soft" refresh. Essentially the same as calling `refresh()`
1345
1318
  // in a Server Action.
1346
1319
  exitStatus = 1;
@@ -1382,14 +1355,6 @@ function abortPendingCacheNode(cacheNode, error, debugInfo) {
1382
1355
  rsc.reject(error, debugInfo);
1383
1356
  }
1384
1357
  }
1385
- // Check if this is a leaf segment. If so, it will have a `head` property with
1386
- // a pending promise that needs to be resolved. If an error was provided, we
1387
- // will not resolve it with an error, since this is rendered at the root of
1388
- // the app. We want the segment to error, not the entire app.
1389
- const head = cacheNode.head;
1390
- if (isDeferredRsc(head)) {
1391
- head.resolve(null, debugInfo);
1392
- }
1393
1358
  }
1394
1359
  const DEFERRED = Symbol();
1395
1360
  function isDeferredRsc(value) {
@@ -1446,21 +1411,21 @@ function createDeferredRsc() {
1446
1411
  }
1447
1412
  function getCurrentNavigationLock() {
1448
1413
  if (process.env.__NEXT_EXPOSE_TESTING_API) {
1449
- const { getCurrentNavigationGate } = require('../segment-cache/navigation-testing-lock');
1414
+ const { getCurrentNavigationGate } = require('./segment-cache/navigation-testing-lock');
1450
1415
  return getCurrentNavigationGate();
1451
1416
  }
1452
1417
  return null;
1453
1418
  }
1454
1419
  function beginLockedNavigation() {
1455
1420
  if (process.env.__NEXT_EXPOSE_TESTING_API) {
1456
- const { beginLockedNavigation: begin } = require('../segment-cache/navigation-testing-lock');
1421
+ const { beginLockedNavigation: begin } = require('./segment-cache/navigation-testing-lock');
1457
1422
  return begin();
1458
1423
  }
1459
1424
  return null;
1460
1425
  }
1461
1426
  function resetNavigationLockToPending() {
1462
1427
  if (process.env.__NEXT_EXPOSE_TESTING_API) {
1463
- const { resetNavigationLockToPending: reset } = require('../segment-cache/navigation-testing-lock');
1428
+ const { resetNavigationLockToPending: reset } = require('./segment-cache/navigation-testing-lock');
1464
1429
  reset();
1465
1430
  }
1466
1431
  }
@@ -1471,4 +1436,4 @@ if ((typeof exports.default === 'function' || (typeof exports.default === 'objec
1471
1436
  module.exports = exports.default;
1472
1437
  }
1473
1438
 
1474
- //# sourceMappingURL=ppr-navigations.js.map
1439
+ //# sourceMappingURL=render-tree.js.map