@circuitwall/jarela 2.2.1 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (651) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-path-routes-manifest.json +6 -5
  3. package/.next/standalone/.next/build-manifest.json +2 -2
  4. package/.next/standalone/.next/prerender-manifest.json +3 -3
  5. package/.next/standalone/.next/routes-manifest.json +8 -0
  6. package/.next/standalone/.next/server/app/_global-error/page.js +68 -68
  7. package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  12. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  13. package/.next/standalone/.next/server/app/_not-found/page.js +76 -76
  14. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/.next/server/app/_not-found.html +2 -2
  16. package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
  17. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  18. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  19. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  20. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  21. package/.next/standalone/.next/server/app/api/v1/access/[identity]/route.js +93 -93
  22. package/.next/standalone/.next/server/app/api/v1/access/route.js +169 -169
  23. package/.next/standalone/.next/server/app/api/v1/agents/[id]/compact/route.js +82 -56
  24. package/.next/standalone/.next/server/app/api/v1/agents/[id]/compact/route.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/api/v1/agents/[id]/display-filters/route.js +122 -122
  26. package/.next/standalone/.next/server/app/api/v1/agents/[id]/route.js +100 -100
  27. package/.next/standalone/.next/server/app/api/v1/agents/[id]/thread/route.js +753 -753
  28. package/.next/standalone/.next/server/app/api/v1/agents/route.js +65 -65
  29. package/.next/standalone/.next/server/app/api/v1/allowed-sites/[hostname]/route.js +364 -364
  30. package/.next/standalone/.next/server/app/api/v1/allowed-sites/route.js +802 -802
  31. package/.next/standalone/.next/server/app/api/v1/artifacts/lifecycle/route.js +2 -2
  32. package/.next/standalone/.next/server/app/api/v1/attachments/files/route.js +49 -49
  33. package/.next/standalone/.next/server/app/api/v1/attachments/images/route.js +910 -910
  34. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/chats/route.js +589 -16
  35. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/chats/route.js.nft.json +1 -1
  36. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/ignores/[remote_jid]/route.js +23 -23
  37. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/ignores/route.js +30 -30
  38. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js +703 -130
  39. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js.nft.json +1 -1
  40. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/pair/route.js +708 -135
  41. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/pair/route.js.nft.json +1 -1
  42. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/route.js +802 -229
  43. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/route.js.nft.json +1 -1
  44. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/routes/[route_id]/route.js +739 -739
  45. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/routes/route.js +1035 -1035
  46. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js +679 -106
  47. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js.nft.json +1 -1
  48. package/.next/standalone/.next/server/app/api/v1/bridges/kinds/route.js +804 -804
  49. package/.next/standalone/.next/server/app/api/v1/bridges/route.js +700 -700
  50. package/.next/standalone/.next/server/app/api/v1/builtin-tools/route.js +9 -9
  51. package/.next/standalone/.next/server/app/api/v1/builtin-tools/route.js.nft.json +1 -1
  52. package/.next/standalone/.next/server/app/api/v1/config/route.js +85 -85
  53. package/.next/standalone/.next/server/app/api/v1/credentials/[id]/route.js +709 -709
  54. package/.next/standalone/.next/server/app/api/v1/credentials/[id]/route.js.nft.json +1 -1
  55. package/.next/standalone/.next/server/app/api/v1/credentials/route.js +2 -2
  56. package/.next/standalone/.next/server/app/api/v1/credentials/route.js.nft.json +1 -1
  57. package/.next/standalone/.next/server/app/api/v1/dashboard/currency/route.js +10 -10
  58. package/.next/standalone/.next/server/app/api/v1/dashboard/metrics/route.js +784 -784
  59. package/.next/standalone/.next/server/app/api/v1/dashboard/pricing/route.js +23 -23
  60. package/.next/standalone/.next/server/app/api/v1/dashboard/pricing-task/route.js +86 -86
  61. package/.next/standalone/.next/server/app/api/v1/dashboard/pricing-task/route.js.nft.json +1 -1
  62. package/.next/standalone/.next/server/app/api/v1/delegations/codex/[job_id]/route.js +57 -57
  63. package/.next/standalone/.next/server/app/api/v1/delegations/codex/[job_id]/route.js.nft.json +1 -1
  64. package/.next/standalone/.next/server/app/api/v1/documents/search/route.js +523 -523
  65. package/.next/standalone/.next/server/app/api/v1/documents/settings/route.js +44 -44
  66. package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/reindex/route.js +65 -65
  67. package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/reindex/route.js.nft.json +1 -1
  68. package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/route.js +122 -122
  69. package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/route.js.nft.json +1 -1
  70. package/.next/standalone/.next/server/app/api/v1/documents/sources/route.js +37 -37
  71. package/.next/standalone/.next/server/app/api/v1/documents/sources/route.js.nft.json +1 -1
  72. package/.next/standalone/.next/server/app/api/v1/env/route.js +9 -9
  73. package/.next/standalone/.next/server/app/api/v1/env-sync/allowlist/route.js +368 -368
  74. package/.next/standalone/.next/server/app/api/v1/env-sync/route.js +44 -44
  75. package/.next/standalone/.next/server/app/api/v1/events/route.js +751 -178
  76. package/.next/standalone/.next/server/app/api/v1/events/route.js.nft.json +1 -1
  77. package/.next/standalone/.next/server/app/api/v1/events/test/route.js +77 -77
  78. package/.next/standalone/.next/server/app/api/v1/extension/agents/route.js +763 -763
  79. package/.next/standalone/.next/server/app/api/v1/extension/agents/route.js.nft.json +1 -1
  80. package/.next/standalone/.next/server/app/api/v1/extension/browser/activate/route.js +44 -44
  81. package/.next/standalone/.next/server/app/api/v1/extension/browser/foreground/route.js +9 -9
  82. package/.next/standalone/.next/server/app/api/v1/extension/browser/history/route.js +65 -65
  83. package/.next/standalone/.next/server/app/api/v1/extension/browser/poll/route.js +34 -34
  84. package/.next/standalone/.next/server/app/api/v1/extension/browser/progress/route.js +204 -204
  85. package/.next/standalone/.next/server/app/api/v1/extension/browser/result/route.js +133 -133
  86. package/.next/standalone/.next/server/app/api/v1/extension/browser/retry/route.js +106 -106
  87. package/.next/standalone/.next/server/app/api/v1/extension/browser/status/route.js +114 -114
  88. package/.next/standalone/.next/server/app/api/v1/extension/browser/tabs/route.js +134 -134
  89. package/.next/standalone/.next/server/app/api/v1/extension/fill/route.js +690 -690
  90. package/.next/standalone/.next/server/app/api/v1/extension/fill/route.js.nft.json +1 -1
  91. package/.next/standalone/.next/server/app/api/v1/extension/refine/route.js +93 -93
  92. package/.next/standalone/.next/server/app/api/v1/extension/refine/route.js.nft.json +1 -1
  93. package/.next/standalone/.next/server/app/api/v1/extension/turn/route.js +9 -9
  94. package/.next/standalone/.next/server/app/api/v1/extension/turn/route.js.nft.json +1 -1
  95. package/.next/standalone/.next/server/app/api/v1/extensions/route.js +185 -185
  96. package/.next/standalone/.next/server/app/api/v1/extensions/route.js.nft.json +1 -1
  97. package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/config/route.js +171 -171
  98. package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/config/route.js.nft.json +1 -1
  99. package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/route.js +396 -396
  100. package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/route.js.nft.json +1 -1
  101. package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/secrets/route.js +212 -212
  102. package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/secrets/route.js.nft.json +1 -1
  103. package/.next/standalone/.next/server/app/api/v1/files/[name]/route.js +235 -235
  104. package/.next/standalone/.next/server/app/api/v1/fs/browse/route.js +26 -26
  105. package/.next/standalone/.next/server/app/api/v1/harnesses/[id]/route.js +221 -221
  106. package/.next/standalone/.next/server/app/api/v1/harnesses/default/route.js +58 -58
  107. package/.next/standalone/.next/server/app/api/v1/harnesses/route.js +72 -72
  108. package/.next/standalone/.next/server/app/api/v1/health/probes/route.js +9 -9
  109. package/.next/standalone/.next/server/app/api/v1/health/probes/route.js.nft.json +1 -1
  110. package/.next/standalone/.next/server/app/api/v1/health/route.js +772 -772
  111. package/.next/standalone/.next/server/app/api/v1/integrations/[name]/route.js +133 -133
  112. package/.next/standalone/.next/server/app/api/v1/integrations/[name]/test/route.js +9 -9
  113. package/.next/standalone/.next/server/app/api/v1/integrations/[name]/test/route.js.nft.json +1 -1
  114. package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/callback/route.js +363 -363
  115. package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/start/route.js +233 -233
  116. package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/status/route.js +682 -682
  117. package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/callback/route.js +879 -879
  118. package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/start/route.js +108 -108
  119. package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/status/route.js +952 -952
  120. package/.next/standalone/.next/server/app/api/v1/integrations/route.js +216 -216
  121. package/.next/standalone/.next/server/app/api/v1/lifecycle/adoption/route.js +864 -847
  122. package/.next/standalone/.next/server/app/api/v1/lifecycle/adoption/route.js.nft.json +1 -1
  123. package/.next/standalone/.next/server/app/api/v1/local-file/route.js +26 -26
  124. package/.next/standalone/.next/server/app/api/v1/logs/route.js +70 -70
  125. package/.next/standalone/.next/server/app/api/v1/maps/embed/route.js +72 -72
  126. package/.next/standalone/.next/server/app/api/v1/mcp-servers/[name]/route.js +979 -979
  127. package/.next/standalone/.next/server/app/api/v1/mcp-servers/registry/route.js +196 -196
  128. package/.next/standalone/.next/server/app/api/v1/mcp-servers/route.js +2 -2
  129. package/.next/standalone/.next/server/app/api/v1/memory/[namespace]/[key]/route.js +381 -381
  130. package/.next/standalone/.next/server/app/api/v1/memory/policy/route.js +79 -79
  131. package/.next/standalone/.next/server/app/api/v1/memory/route.js +51 -51
  132. package/.next/standalone/.next/server/app/api/v1/memory/search/route.js +131 -131
  133. package/.next/standalone/.next/server/app/api/v1/models/[name]/compact-threads/route.js +374 -369
  134. package/.next/standalone/.next/server/app/api/v1/models/[name]/compact-threads/route.js.nft.json +1 -1
  135. package/.next/standalone/.next/server/app/api/v1/models/[name]/route.js +143 -143
  136. package/.next/standalone/.next/server/app/api/v1/models/route.js +543 -543
  137. package/.next/standalone/.next/server/app/api/v1/packages/catalog/route.js +445 -445
  138. package/.next/standalone/.next/server/app/api/v1/packages/defaults/[id]/route.js +120 -120
  139. package/.next/standalone/.next/server/app/api/v1/packages/defaults/[id]/route.js.nft.json +1 -1
  140. package/.next/standalone/.next/server/app/api/v1/packages/install/[id]/route.js +234 -234
  141. package/.next/standalone/.next/server/app/api/v1/packages/install/[id]/route.js.nft.json +1 -1
  142. package/.next/standalone/.next/server/app/api/v1/packages/install/route.js +407 -407
  143. package/.next/standalone/.next/server/app/api/v1/packages/install/route.js.nft.json +1 -1
  144. package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/enabled/route.js +37 -37
  145. package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/enabled/route.js.nft.json +1 -1
  146. package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/route.js +107 -107
  147. package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/route.js.nft.json +1 -1
  148. package/.next/standalone/.next/server/app/api/v1/packages/manifests/route.js +228 -228
  149. package/.next/standalone/.next/server/app/api/v1/packages/manifests/route.js.nft.json +1 -1
  150. package/.next/standalone/.next/server/app/api/v1/packages/reload/route.js +9 -9
  151. package/.next/standalone/.next/server/app/api/v1/packages/reload/route.js.nft.json +1 -1
  152. package/.next/standalone/.next/server/app/api/v1/packages/route.js +148 -148
  153. package/.next/standalone/.next/server/app/api/v1/packages/route.js.nft.json +1 -1
  154. package/.next/standalone/.next/server/app/api/v1/page-capture/route.js +787 -787
  155. package/.next/standalone/.next/server/app/api/v1/page-capture/route.js.nft.json +1 -1
  156. package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/approve/route.js +507 -507
  157. package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/approve/route.js.nft.json +1 -1
  158. package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/deny/route.js +181 -181
  159. package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/deny/route.js.nft.json +1 -1
  160. package/.next/standalone/.next/server/app/api/v1/pending-actions/route.js +258 -258
  161. package/.next/standalone/.next/server/app/api/v1/pending-actions/route.js.nft.json +1 -1
  162. package/.next/standalone/.next/server/app/api/v1/profile/location/route.js +30 -30
  163. package/.next/standalone/.next/server/app/api/v1/profile/route.js +164 -164
  164. package/.next/standalone/.next/server/app/api/v1/providers/[provider]/models/route.js +44 -44
  165. package/.next/standalone/.next/server/app/api/v1/providers/[provider]/probe/route.js +9 -9
  166. package/.next/standalone/.next/server/app/api/v1/providers/github-copilot/auth/route.js +164 -164
  167. package/.next/standalone/.next/server/app/api/v1/providers/route.js +94 -94
  168. package/.next/standalone/.next/server/app/api/v1/proxy-config/route.js +450 -450
  169. package/.next/standalone/.next/server/app/api/v1/redaction/init/route.js +37 -37
  170. package/.next/standalone/.next/server/app/api/v1/redaction/route.js +58 -58
  171. package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/route.js +600 -600
  172. package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/run/route.js +44 -44
  173. package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/run/route.js.nft.json +1 -1
  174. package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/route.js +732 -732
  175. package/.next/standalone/.next/server/app/api/v1/security/idle-timeout/route.js +359 -359
  176. package/.next/standalone/.next/server/app/api/v1/security/pin/route.js +197 -197
  177. package/.next/standalone/.next/server/app/api/v1/security/state/route.js +51 -51
  178. package/.next/standalone/.next/server/app/api/v1/security/unlock/route.js +176 -176
  179. package/.next/standalone/.next/server/app/api/v1/security/verify-pin/route.js +190 -190
  180. package/.next/standalone/.next/server/app/api/v1/setup/test-key/route.js +26 -26
  181. package/.next/standalone/.next/server/app/api/v1/skills/[id]/route.js +770 -770
  182. package/.next/standalone/.next/server/app/api/v1/skills/repos/[id]/route.js +115 -115
  183. package/.next/standalone/.next/server/app/api/v1/skills/repos/route.js +327 -327
  184. package/.next/standalone/.next/server/app/api/v1/skills/route.js +870 -870
  185. package/.next/standalone/.next/server/app/api/v1/system/abort/route.js +838 -808
  186. package/.next/standalone/.next/server/app/api/v1/system/restart/route.js +177 -177
  187. package/.next/standalone/.next/server/app/api/v1/system/restart/route.js.nft.json +1 -1
  188. package/.next/standalone/.next/server/app/api/v1/tailscale/route.js +164 -164
  189. package/.next/standalone/.next/server/app/api/v1/tasks/[agent_id]/route.js +115 -115
  190. package/.next/standalone/.next/server/app/api/v1/tasks/route.js +23 -23
  191. package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route.js +1429 -0
  192. package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route.js.nft.json +1 -0
  193. package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route_client-reference-manifest.js +1 -0
  194. package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/context-pin/route.js +635 -634
  195. package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/context-pin/route.js.nft.json +1 -1
  196. package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/route.js +53 -439
  197. package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/route.js.nft.json +1 -1
  198. package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/run/route.js +172 -172
  199. package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/run/route.js.nft.json +1 -1
  200. package/.next/standalone/.next/server/app/api/v1/threads/route.js +908 -908
  201. package/.next/standalone/.next/server/app/api/v1/tools/route.js +2 -2
  202. package/.next/standalone/.next/server/app/api/v1/tools/route.js.nft.json +1 -1
  203. package/.next/standalone/.next/server/app/api/v1/update/apply/route.js +17 -17
  204. package/.next/standalone/.next/server/app/api/v1/update/apply/route.js.nft.json +1 -1
  205. package/.next/standalone/.next/server/app/api/v1/update/route.js +570 -570
  206. package/.next/standalone/.next/server/app/api/v1/voice/transcribe/route.js +224 -224
  207. package/.next/standalone/.next/server/app/api/v1/voice/tts/route.js +975 -975
  208. package/.next/standalone/.next/server/app/api/v1/watchers/[id]/route.js +23 -23
  209. package/.next/standalone/.next/server/app/api/v1/watchers/[id]/run/route.js +72 -72
  210. package/.next/standalone/.next/server/app/api/v1/watchers/[id]/run/route.js.nft.json +1 -1
  211. package/.next/standalone/.next/server/app/api/v1/watchers/reaction-scripts/route.js +128 -128
  212. package/.next/standalone/.next/server/app/api/v1/watchers/route.js +164 -164
  213. package/.next/standalone/.next/server/app/api/v1/watchers/route.js.nft.json +1 -1
  214. package/.next/standalone/.next/server/app/icon.svg/route.js +62 -62
  215. package/.next/standalone/.next/server/app/manifest.webmanifest/route.js +436 -436
  216. package/.next/standalone/.next/server/app/page.js +1243 -854
  217. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  218. package/.next/standalone/.next/server/app/setup/page.js +91 -91
  219. package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  220. package/.next/standalone/.next/server/app-paths-manifest.json +6 -5
  221. package/.next/standalone/.next/server/chunks/{424.js → 1388.js} +335 -986
  222. package/.next/standalone/.next/server/chunks/1433.js +1 -1
  223. package/.next/standalone/.next/server/chunks/1638.js +1 -2
  224. package/.next/standalone/.next/server/chunks/1738.js +1 -1
  225. package/.next/standalone/.next/server/chunks/210.js +6 -6
  226. package/.next/standalone/.next/server/chunks/2151.js +31 -1
  227. package/.next/standalone/.next/server/chunks/2207.js +1 -0
  228. package/.next/standalone/.next/server/chunks/2471.js +28 -28
  229. package/.next/standalone/.next/server/chunks/2504.js +1 -1
  230. package/.next/standalone/.next/server/chunks/2695.js +17 -17
  231. package/.next/standalone/.next/server/chunks/3042.js +14 -8
  232. package/.next/standalone/.next/server/chunks/3399.js +1 -1
  233. package/.next/standalone/.next/server/chunks/3566.js +1 -1
  234. package/.next/standalone/.next/server/chunks/4189.js +946 -0
  235. package/.next/standalone/.next/server/chunks/{9590.js → 423.js} +8 -3
  236. package/.next/standalone/.next/server/chunks/4433.js +146 -146
  237. package/.next/standalone/.next/server/chunks/4508.js +1 -1
  238. package/.next/standalone/.next/server/chunks/4588.js +1 -0
  239. package/.next/standalone/.next/server/chunks/46.js +5 -0
  240. package/.next/standalone/.next/server/chunks/466.js +12 -0
  241. package/.next/standalone/.next/server/chunks/4868.js +206 -206
  242. package/.next/standalone/.next/server/chunks/4992.js +13 -0
  243. package/.next/standalone/.next/server/chunks/5120.js +963 -0
  244. package/.next/standalone/.next/server/chunks/5701.js +1 -1
  245. package/.next/standalone/.next/server/chunks/5900.js +1 -1
  246. package/.next/standalone/.next/server/chunks/6210.js +1 -0
  247. package/.next/standalone/.next/server/chunks/6213.js +1 -1
  248. package/.next/standalone/.next/server/chunks/6649.js +2 -2
  249. package/.next/standalone/.next/server/chunks/6703.js +3 -3
  250. package/.next/standalone/.next/server/chunks/7445.js +1 -0
  251. package/.next/standalone/.next/server/chunks/8067.js +12 -0
  252. package/.next/standalone/.next/server/chunks/8461.js +14 -9
  253. package/.next/standalone/.next/server/chunks/8558.js +1 -1
  254. package/.next/standalone/.next/server/chunks/8724.js +1 -1
  255. package/.next/standalone/.next/server/chunks/8849.js +91 -91
  256. package/.next/standalone/.next/server/chunks/9032.js +6 -5
  257. package/.next/standalone/.next/server/chunks/{2563.js → 9164.js} +33173 -31461
  258. package/.next/standalone/.next/server/chunks/9237.js +396 -396
  259. package/.next/standalone/.next/server/chunks/{9640.js → 9304.js} +1628 -570
  260. package/.next/standalone/.next/server/chunks/9406.js +1 -1
  261. package/.next/standalone/.next/server/chunks/9824.js +98 -98
  262. package/.next/standalone/.next/server/chunks/9826.js +1 -0
  263. package/.next/standalone/.next/server/middleware-build-manifest.js +2 -2
  264. package/.next/standalone/.next/server/middleware.js +415 -397
  265. package/.next/standalone/.next/server/pages/404.html +2 -2
  266. package/.next/standalone/.next/server/pages/500.html +1 -1
  267. package/.next/standalone/.next/server/preview-props.json +3 -3
  268. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  269. package/.next/standalone/.next/static/chunks/{1395-a340fb0a345382a4.js → 1395-e4a99912b8f83044.js} +13 -1
  270. package/.next/standalone/.next/static/chunks/app/_global-error/{page-36cb8b428b38b26a.js → page-6fc5f8e744c81802.js} +1 -1
  271. package/.next/standalone/.next/static/chunks/app/api/v1/access/[identity]/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
  272. package/.next/standalone/.next/static/chunks/app/api/v1/access/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
  273. package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/compact/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
  274. package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-6fc5f8e744c81802.js +17 -0
  275. package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-6fc5f8e744c81802.js +17 -0
  276. package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-6fc5f8e744c81802.js +17 -0
  277. package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-6fc5f8e744c81802.js +17 -0
  278. package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/[hostname]/route-6fc5f8e744c81802.js +17 -0
  279. package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/route-6fc5f8e744c81802.js +17 -0
  280. package/.next/standalone/.next/static/chunks/app/api/v1/artifacts/lifecycle/route-6fc5f8e744c81802.js +17 -0
  281. package/.next/standalone/.next/static/chunks/app/api/v1/attachments/files/route-6fc5f8e744c81802.js +17 -0
  282. package/.next/standalone/.next/static/chunks/app/api/v1/attachments/images/route-6fc5f8e744c81802.js +17 -0
  283. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-6fc5f8e744c81802.js +17 -0
  284. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/[remote_jid]/route-6fc5f8e744c81802.js +17 -0
  285. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/route-6fc5f8e744c81802.js +17 -0
  286. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-6fc5f8e744c81802.js +17 -0
  287. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-6fc5f8e744c81802.js +17 -0
  288. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-6fc5f8e744c81802.js +17 -0
  289. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-6fc5f8e744c81802.js +17 -0
  290. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-6fc5f8e744c81802.js +17 -0
  291. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-6fc5f8e744c81802.js +17 -0
  292. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/kinds/route-6fc5f8e744c81802.js +17 -0
  293. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-6fc5f8e744c81802.js +17 -0
  294. package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-6fc5f8e744c81802.js +17 -0
  295. package/.next/standalone/.next/static/chunks/app/api/v1/config/route-6fc5f8e744c81802.js +17 -0
  296. package/.next/standalone/.next/static/chunks/app/api/v1/credentials/[id]/route-6fc5f8e744c81802.js +17 -0
  297. package/.next/standalone/.next/static/chunks/app/api/v1/credentials/route-6fc5f8e744c81802.js +17 -0
  298. package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/currency/route-6fc5f8e744c81802.js +17 -0
  299. package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/metrics/route-6fc5f8e744c81802.js +17 -0
  300. package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing/route-6fc5f8e744c81802.js +17 -0
  301. package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing-task/route-6fc5f8e744c81802.js +17 -0
  302. package/.next/standalone/.next/static/chunks/app/api/v1/delegations/codex/[job_id]/route-6fc5f8e744c81802.js +17 -0
  303. package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-6fc5f8e744c81802.js +17 -0
  304. package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-6fc5f8e744c81802.js +17 -0
  305. package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-6fc5f8e744c81802.js +17 -0
  306. package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-6fc5f8e744c81802.js +17 -0
  307. package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-6fc5f8e744c81802.js +17 -0
  308. package/.next/standalone/.next/static/chunks/app/api/v1/env/route-6fc5f8e744c81802.js +17 -0
  309. package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-6fc5f8e744c81802.js +17 -0
  310. package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-6fc5f8e744c81802.js +17 -0
  311. package/.next/standalone/.next/static/chunks/app/api/v1/events/route-6fc5f8e744c81802.js +17 -0
  312. package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-6fc5f8e744c81802.js +17 -0
  313. package/.next/standalone/.next/static/chunks/app/api/v1/extension/agents/route-6fc5f8e744c81802.js +17 -0
  314. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/activate/route-6fc5f8e744c81802.js +17 -0
  315. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/foreground/route-6fc5f8e744c81802.js +17 -0
  316. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/history/route-6fc5f8e744c81802.js +17 -0
  317. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/poll/route-6fc5f8e744c81802.js +17 -0
  318. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/progress/route-6fc5f8e744c81802.js +17 -0
  319. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/result/route-6fc5f8e744c81802.js +17 -0
  320. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/retry/route-6fc5f8e744c81802.js +17 -0
  321. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/status/route-6fc5f8e744c81802.js +17 -0
  322. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/tabs/route-6fc5f8e744c81802.js +17 -0
  323. package/.next/standalone/.next/static/chunks/app/api/v1/extension/fill/route-6fc5f8e744c81802.js +17 -0
  324. package/.next/standalone/.next/static/chunks/app/api/v1/extension/refine/route-6fc5f8e744c81802.js +17 -0
  325. package/.next/standalone/.next/static/chunks/app/api/v1/extension/turn/route-6fc5f8e744c81802.js +17 -0
  326. package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-6fc5f8e744c81802.js +17 -0
  327. package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/config/route-6fc5f8e744c81802.js +17 -0
  328. package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/route-6fc5f8e744c81802.js +17 -0
  329. package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-6fc5f8e744c81802.js +17 -0
  330. package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-6fc5f8e744c81802.js +17 -0
  331. package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-6fc5f8e744c81802.js +17 -0
  332. package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-6fc5f8e744c81802.js +17 -0
  333. package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-6fc5f8e744c81802.js +17 -0
  334. package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-6fc5f8e744c81802.js +17 -0
  335. package/.next/standalone/.next/static/chunks/app/api/v1/health/probes/route-6fc5f8e744c81802.js +17 -0
  336. package/.next/standalone/.next/static/chunks/app/api/v1/health/route-6fc5f8e744c81802.js +17 -0
  337. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-6fc5f8e744c81802.js +17 -0
  338. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-6fc5f8e744c81802.js +17 -0
  339. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-6fc5f8e744c81802.js +17 -0
  340. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-6fc5f8e744c81802.js +17 -0
  341. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-6fc5f8e744c81802.js +17 -0
  342. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-6fc5f8e744c81802.js +17 -0
  343. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-6fc5f8e744c81802.js +17 -0
  344. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-6fc5f8e744c81802.js +17 -0
  345. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-6fc5f8e744c81802.js +17 -0
  346. package/.next/standalone/.next/static/chunks/app/api/v1/lifecycle/adoption/route-6fc5f8e744c81802.js +17 -0
  347. package/.next/standalone/.next/static/chunks/app/api/v1/local-file/route-6fc5f8e744c81802.js +17 -0
  348. package/.next/standalone/.next/static/chunks/app/api/v1/logs/route-6fc5f8e744c81802.js +17 -0
  349. package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-6fc5f8e744c81802.js +17 -0
  350. package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-6fc5f8e744c81802.js +17 -0
  351. package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-6fc5f8e744c81802.js +17 -0
  352. package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-6fc5f8e744c81802.js +17 -0
  353. package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-6fc5f8e744c81802.js +17 -0
  354. package/.next/standalone/.next/static/chunks/app/api/v1/memory/policy/route-6fc5f8e744c81802.js +17 -0
  355. package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-6fc5f8e744c81802.js +17 -0
  356. package/.next/standalone/.next/static/chunks/app/api/v1/memory/search/route-6fc5f8e744c81802.js +17 -0
  357. package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/compact-threads/route-6fc5f8e744c81802.js +17 -0
  358. package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-6fc5f8e744c81802.js +17 -0
  359. package/.next/standalone/.next/static/chunks/app/api/v1/models/route-6fc5f8e744c81802.js +17 -0
  360. package/.next/standalone/.next/static/chunks/app/api/v1/packages/catalog/route-6fc5f8e744c81802.js +17 -0
  361. package/.next/standalone/.next/static/chunks/app/api/v1/packages/defaults/[id]/route-6fc5f8e744c81802.js +17 -0
  362. package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/[id]/route-6fc5f8e744c81802.js +17 -0
  363. package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/route-6fc5f8e744c81802.js +17 -0
  364. package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/enabled/route-6fc5f8e744c81802.js +17 -0
  365. package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/route-6fc5f8e744c81802.js +17 -0
  366. package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/route-6fc5f8e744c81802.js +17 -0
  367. package/.next/standalone/.next/static/chunks/app/api/v1/packages/reload/route-6fc5f8e744c81802.js +17 -0
  368. package/.next/standalone/.next/static/chunks/app/api/v1/packages/route-6fc5f8e744c81802.js +17 -0
  369. package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-6fc5f8e744c81802.js +17 -0
  370. package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-6fc5f8e744c81802.js +17 -0
  371. package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-6fc5f8e744c81802.js +17 -0
  372. package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-6fc5f8e744c81802.js +17 -0
  373. package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-6fc5f8e744c81802.js +17 -0
  374. package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-6fc5f8e744c81802.js +17 -0
  375. package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-6fc5f8e744c81802.js +17 -0
  376. package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/probe/route-6fc5f8e744c81802.js +17 -0
  377. package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-6fc5f8e744c81802.js +17 -0
  378. package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-6fc5f8e744c81802.js +17 -0
  379. package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-6fc5f8e744c81802.js +17 -0
  380. package/.next/standalone/.next/static/chunks/app/api/v1/redaction/init/route-6fc5f8e744c81802.js +17 -0
  381. package/.next/standalone/.next/static/chunks/app/api/v1/redaction/route-6fc5f8e744c81802.js +17 -0
  382. package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-6fc5f8e744c81802.js +17 -0
  383. package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-6fc5f8e744c81802.js +17 -0
  384. package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-6fc5f8e744c81802.js +17 -0
  385. package/.next/standalone/.next/static/chunks/app/api/v1/security/idle-timeout/route-6fc5f8e744c81802.js +17 -0
  386. package/.next/standalone/.next/static/chunks/app/api/v1/security/pin/route-6fc5f8e744c81802.js +17 -0
  387. package/.next/standalone/.next/static/chunks/app/api/v1/security/state/route-6fc5f8e744c81802.js +17 -0
  388. package/.next/standalone/.next/static/chunks/app/api/v1/security/unlock/route-6fc5f8e744c81802.js +17 -0
  389. package/.next/standalone/.next/static/chunks/app/api/v1/security/verify-pin/route-6fc5f8e744c81802.js +17 -0
  390. package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-6fc5f8e744c81802.js +17 -0
  391. package/.next/standalone/.next/static/chunks/app/api/v1/skills/[id]/route-6fc5f8e744c81802.js +17 -0
  392. package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/[id]/route-6fc5f8e744c81802.js +17 -0
  393. package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/route-6fc5f8e744c81802.js +17 -0
  394. package/.next/standalone/.next/static/chunks/app/api/v1/skills/route-6fc5f8e744c81802.js +17 -0
  395. package/.next/standalone/.next/static/chunks/app/api/v1/system/abort/route-6fc5f8e744c81802.js +17 -0
  396. package/.next/standalone/.next/static/chunks/app/api/v1/system/restart/route-6fc5f8e744c81802.js +17 -0
  397. package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-6fc5f8e744c81802.js +17 -0
  398. package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-6fc5f8e744c81802.js +17 -0
  399. package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-6fc5f8e744c81802.js +17 -0
  400. package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/activity/route-6fc5f8e744c81802.js +17 -0
  401. package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/context-pin/route-6fc5f8e744c81802.js +17 -0
  402. package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-6fc5f8e744c81802.js +17 -0
  403. package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-6fc5f8e744c81802.js +17 -0
  404. package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-6fc5f8e744c81802.js +17 -0
  405. package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-6fc5f8e744c81802.js +17 -0
  406. package/.next/standalone/.next/static/chunks/app/api/v1/update/apply/route-6fc5f8e744c81802.js +17 -0
  407. package/.next/standalone/.next/static/chunks/app/api/v1/update/route-6fc5f8e744c81802.js +17 -0
  408. package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-6fc5f8e744c81802.js +17 -0
  409. package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-6fc5f8e744c81802.js +17 -0
  410. package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-6fc5f8e744c81802.js +17 -0
  411. package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-6fc5f8e744c81802.js +17 -0
  412. package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-6fc5f8e744c81802.js +17 -0
  413. package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-6fc5f8e744c81802.js +17 -0
  414. package/.next/standalone/.next/static/chunks/app/manifest.webmanifest/route-6fc5f8e744c81802.js +17 -0
  415. package/.next/standalone/.next/static/chunks/app/{page-7017f07f8a7a083c.js → page-213a623b37226452.js} +1041 -652
  416. package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-6fc5f8e744c81802.js +17 -0
  417. package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-6fc5f8e744c81802.js +17 -0
  418. package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-6fc5f8e744c81802.js +17 -0
  419. package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-6fc5f8e744c81802.js +17 -0
  420. package/.next/standalone/.next/static/css/{d80058f0b9b41c09.css → 312542a5725ba0d5.css} +2 -2
  421. package/.next/standalone/docs/adoption/changesets.json +309 -0
  422. package/.next/standalone/lib/skills/builtins/memory-organization/SKILL.md +16 -0
  423. package/.next/standalone/package.json +3 -3
  424. package/CHANGELOG.md +25 -0
  425. package/api/client.ts +9 -0
  426. package/api/types.ts +29 -0
  427. package/app/api/v1/lifecycle/adoption/route.ts +14 -2
  428. package/app/api/v1/models/[name]/compact-threads/route.ts +14 -11
  429. package/app/api/v1/threads/[thread_id]/activity/route.ts +19 -0
  430. package/app/api/v1/threads/[thread_id]/context-pin/route.test.ts +1 -0
  431. package/app/api/v1/threads/[thread_id]/context-pin/route.ts +2 -1
  432. package/app/api/v1/threads/[thread_id]/route.ts +5 -1
  433. package/components/chat/ChatView.tsx +52 -11
  434. package/components/chat/ContextBoundary.test.tsx +68 -1
  435. package/components/chat/ContextBoundary.tsx +92 -13
  436. package/components/chat/MessageList.test.tsx +31 -0
  437. package/components/chat/MessageList.tsx +49 -28
  438. package/components/chat/ToolList.test.tsx +92 -16
  439. package/components/chat/ToolList.tsx +59 -4
  440. package/components/chat/chat-helpers.test.tsx +24 -1
  441. package/components/chat/chat-helpers.ts +47 -4
  442. package/components/chat/useThreadActivity.test.tsx +113 -0
  443. package/components/chat/useThreadActivity.ts +94 -0
  444. package/components/chat/useThreadData.ts +16 -16
  445. package/components/chat/workflow-step-retry.ts +25 -0
  446. package/components/ui/BootScreen.tsx +17 -0
  447. package/components/ui/WorkflowChecklist.tsx +71 -33
  448. package/hooks/useSSE.ts +28 -3
  449. package/lib/agents/compaction-pipeline.test.ts +202 -0
  450. package/lib/agents/compaction-pipeline.ts +483 -0
  451. package/lib/agents/conversation-summary.ts +37 -21
  452. package/lib/agents/prepare/history-window.test.ts +18 -0
  453. package/lib/agents/prepare/history-window.ts +11 -2
  454. package/lib/agents/prepare/request.ts +4 -0
  455. package/lib/agents/prepare/system-prompt.test.ts +39 -0
  456. package/lib/agents/prepare/system-prompt.ts +8 -3
  457. package/lib/agents/prompt-registry.test.ts +5 -140
  458. package/lib/agents/prompt-registry.ts +45 -1
  459. package/lib/agents/prompt-variants.ts +146 -0
  460. package/lib/agents/run-registry.test.ts +22 -0
  461. package/lib/agents/run-registry.ts +29 -0
  462. package/lib/agents/run-thread.retry.test.ts +67 -1
  463. package/lib/agents/run-thread.ts +86 -1
  464. package/lib/agents/thread-activity.test.ts +31 -0
  465. package/lib/agents/thread-activity.ts +27 -0
  466. package/lib/agents/thread-compaction-state.test.ts +82 -0
  467. package/lib/agents/thread-compaction-state.ts +121 -0
  468. package/lib/agents/thread-compaction.test.ts +83 -4
  469. package/lib/agents/thread-compaction.ts +34 -11
  470. package/lib/agents/warm-summary-background.test.ts +219 -5
  471. package/lib/agents/warm-summary-background.ts +325 -142
  472. package/lib/agents/warm-topics.test.ts +37 -0
  473. package/lib/agents/warm-topics.ts +297 -0
  474. package/lib/agents/workflow-step-retry.test.ts +96 -0
  475. package/lib/agents/workflow-step-retry.ts +216 -0
  476. package/lib/api/browser-control.ts +0 -3
  477. package/lib/db/migrations.ts +5 -0
  478. package/lib/env/config.ts +2 -0
  479. package/lib/env/schema.ts +12 -0
  480. package/lib/lifecycle/changeset-build.test.ts +93 -0
  481. package/lib/lifecycle/changeset-build.ts +210 -0
  482. package/lib/lifecycle/changesets.test.ts +101 -0
  483. package/lib/lifecycle/changesets.ts +166 -0
  484. package/lib/lifecycle/surface-collect.test.ts +88 -0
  485. package/lib/lifecycle/surface-collect.ts +64 -0
  486. package/lib/lifecycle/surface-snapshot.test.ts +104 -0
  487. package/lib/lifecycle/surface-snapshot.ts +210 -0
  488. package/lib/memory/record.ts +0 -2
  489. package/lib/providers/external.ts +0 -2
  490. package/lib/skills/builtins/memory-organization/SKILL.md +16 -0
  491. package/lib/stores/threads.test.ts +9 -0
  492. package/lib/stores/threads.ts +21 -11
  493. package/lib/stores/version-adoption.test.ts +96 -0
  494. package/lib/stores/version-adoption.ts +239 -26
  495. package/lib/stores/workflow-progress.ts +3 -0
  496. package/lib/tools/communications/ms-todo.ts +0 -7
  497. package/lib/tools/general/memory.ts +1 -1
  498. package/lib/tools/general/workflow-progress.ts +2 -0
  499. package/lib/tools/runtime/catalog.ts +1 -25
  500. package/lib/triggers/registry.ts +0 -4
  501. package/package.json +3 -3
  502. package/scripts/install-to-system.ps1 +39 -11
  503. package/scripts/install-to-system.sh +37 -3
  504. package/.next/standalone/.next/server/chunks/3979.js +0 -581
  505. package/.next/standalone/.next/server/chunks/5936.js +0 -594
  506. package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-36cb8b428b38b26a.js +0 -17
  507. package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-36cb8b428b38b26a.js +0 -17
  508. package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-36cb8b428b38b26a.js +0 -17
  509. package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-36cb8b428b38b26a.js +0 -17
  510. package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/[hostname]/route-36cb8b428b38b26a.js +0 -17
  511. package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/route-36cb8b428b38b26a.js +0 -17
  512. package/.next/standalone/.next/static/chunks/app/api/v1/artifacts/lifecycle/route-36cb8b428b38b26a.js +0 -17
  513. package/.next/standalone/.next/static/chunks/app/api/v1/attachments/files/route-36cb8b428b38b26a.js +0 -17
  514. package/.next/standalone/.next/static/chunks/app/api/v1/attachments/images/route-36cb8b428b38b26a.js +0 -17
  515. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-36cb8b428b38b26a.js +0 -17
  516. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/[remote_jid]/route-36cb8b428b38b26a.js +0 -17
  517. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/route-36cb8b428b38b26a.js +0 -17
  518. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-36cb8b428b38b26a.js +0 -17
  519. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-36cb8b428b38b26a.js +0 -17
  520. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-36cb8b428b38b26a.js +0 -17
  521. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-36cb8b428b38b26a.js +0 -17
  522. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-36cb8b428b38b26a.js +0 -17
  523. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-36cb8b428b38b26a.js +0 -17
  524. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/kinds/route-36cb8b428b38b26a.js +0 -17
  525. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-36cb8b428b38b26a.js +0 -17
  526. package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-36cb8b428b38b26a.js +0 -17
  527. package/.next/standalone/.next/static/chunks/app/api/v1/config/route-36cb8b428b38b26a.js +0 -17
  528. package/.next/standalone/.next/static/chunks/app/api/v1/credentials/[id]/route-36cb8b428b38b26a.js +0 -17
  529. package/.next/standalone/.next/static/chunks/app/api/v1/credentials/route-36cb8b428b38b26a.js +0 -17
  530. package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/currency/route-36cb8b428b38b26a.js +0 -17
  531. package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/metrics/route-36cb8b428b38b26a.js +0 -17
  532. package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing/route-36cb8b428b38b26a.js +0 -17
  533. package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing-task/route-36cb8b428b38b26a.js +0 -17
  534. package/.next/standalone/.next/static/chunks/app/api/v1/delegations/codex/[job_id]/route-36cb8b428b38b26a.js +0 -17
  535. package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-36cb8b428b38b26a.js +0 -17
  536. package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-36cb8b428b38b26a.js +0 -17
  537. package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-36cb8b428b38b26a.js +0 -17
  538. package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-36cb8b428b38b26a.js +0 -17
  539. package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-36cb8b428b38b26a.js +0 -17
  540. package/.next/standalone/.next/static/chunks/app/api/v1/env/route-36cb8b428b38b26a.js +0 -17
  541. package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-36cb8b428b38b26a.js +0 -17
  542. package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-36cb8b428b38b26a.js +0 -17
  543. package/.next/standalone/.next/static/chunks/app/api/v1/events/route-36cb8b428b38b26a.js +0 -17
  544. package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-36cb8b428b38b26a.js +0 -17
  545. package/.next/standalone/.next/static/chunks/app/api/v1/extension/agents/route-36cb8b428b38b26a.js +0 -17
  546. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/activate/route-36cb8b428b38b26a.js +0 -17
  547. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/foreground/route-36cb8b428b38b26a.js +0 -17
  548. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/history/route-36cb8b428b38b26a.js +0 -17
  549. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/poll/route-36cb8b428b38b26a.js +0 -17
  550. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/progress/route-36cb8b428b38b26a.js +0 -17
  551. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/result/route-36cb8b428b38b26a.js +0 -17
  552. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/retry/route-36cb8b428b38b26a.js +0 -17
  553. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/status/route-36cb8b428b38b26a.js +0 -17
  554. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/tabs/route-36cb8b428b38b26a.js +0 -17
  555. package/.next/standalone/.next/static/chunks/app/api/v1/extension/fill/route-36cb8b428b38b26a.js +0 -17
  556. package/.next/standalone/.next/static/chunks/app/api/v1/extension/refine/route-36cb8b428b38b26a.js +0 -17
  557. package/.next/standalone/.next/static/chunks/app/api/v1/extension/turn/route-36cb8b428b38b26a.js +0 -17
  558. package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-36cb8b428b38b26a.js +0 -17
  559. package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/config/route-36cb8b428b38b26a.js +0 -17
  560. package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/route-36cb8b428b38b26a.js +0 -17
  561. package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-36cb8b428b38b26a.js +0 -17
  562. package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-36cb8b428b38b26a.js +0 -17
  563. package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-36cb8b428b38b26a.js +0 -17
  564. package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-36cb8b428b38b26a.js +0 -17
  565. package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-36cb8b428b38b26a.js +0 -17
  566. package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-36cb8b428b38b26a.js +0 -17
  567. package/.next/standalone/.next/static/chunks/app/api/v1/health/probes/route-36cb8b428b38b26a.js +0 -17
  568. package/.next/standalone/.next/static/chunks/app/api/v1/health/route-36cb8b428b38b26a.js +0 -17
  569. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-36cb8b428b38b26a.js +0 -17
  570. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-36cb8b428b38b26a.js +0 -17
  571. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-36cb8b428b38b26a.js +0 -17
  572. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-36cb8b428b38b26a.js +0 -17
  573. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-36cb8b428b38b26a.js +0 -17
  574. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-36cb8b428b38b26a.js +0 -17
  575. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-36cb8b428b38b26a.js +0 -17
  576. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-36cb8b428b38b26a.js +0 -17
  577. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-36cb8b428b38b26a.js +0 -17
  578. package/.next/standalone/.next/static/chunks/app/api/v1/lifecycle/adoption/route-36cb8b428b38b26a.js +0 -17
  579. package/.next/standalone/.next/static/chunks/app/api/v1/local-file/route-36cb8b428b38b26a.js +0 -17
  580. package/.next/standalone/.next/static/chunks/app/api/v1/logs/route-36cb8b428b38b26a.js +0 -17
  581. package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-36cb8b428b38b26a.js +0 -17
  582. package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-36cb8b428b38b26a.js +0 -17
  583. package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-36cb8b428b38b26a.js +0 -17
  584. package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-36cb8b428b38b26a.js +0 -17
  585. package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-36cb8b428b38b26a.js +0 -17
  586. package/.next/standalone/.next/static/chunks/app/api/v1/memory/policy/route-36cb8b428b38b26a.js +0 -17
  587. package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-36cb8b428b38b26a.js +0 -17
  588. package/.next/standalone/.next/static/chunks/app/api/v1/memory/search/route-36cb8b428b38b26a.js +0 -17
  589. package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/compact-threads/route-36cb8b428b38b26a.js +0 -17
  590. package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-36cb8b428b38b26a.js +0 -17
  591. package/.next/standalone/.next/static/chunks/app/api/v1/models/route-36cb8b428b38b26a.js +0 -17
  592. package/.next/standalone/.next/static/chunks/app/api/v1/packages/catalog/route-36cb8b428b38b26a.js +0 -17
  593. package/.next/standalone/.next/static/chunks/app/api/v1/packages/defaults/[id]/route-36cb8b428b38b26a.js +0 -17
  594. package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/[id]/route-36cb8b428b38b26a.js +0 -17
  595. package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/route-36cb8b428b38b26a.js +0 -17
  596. package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/enabled/route-36cb8b428b38b26a.js +0 -17
  597. package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/route-36cb8b428b38b26a.js +0 -17
  598. package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/route-36cb8b428b38b26a.js +0 -17
  599. package/.next/standalone/.next/static/chunks/app/api/v1/packages/reload/route-36cb8b428b38b26a.js +0 -17
  600. package/.next/standalone/.next/static/chunks/app/api/v1/packages/route-36cb8b428b38b26a.js +0 -17
  601. package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-36cb8b428b38b26a.js +0 -17
  602. package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-36cb8b428b38b26a.js +0 -17
  603. package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-36cb8b428b38b26a.js +0 -17
  604. package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-36cb8b428b38b26a.js +0 -17
  605. package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-36cb8b428b38b26a.js +0 -17
  606. package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-36cb8b428b38b26a.js +0 -17
  607. package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-36cb8b428b38b26a.js +0 -17
  608. package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/probe/route-36cb8b428b38b26a.js +0 -17
  609. package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-36cb8b428b38b26a.js +0 -17
  610. package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-36cb8b428b38b26a.js +0 -17
  611. package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-36cb8b428b38b26a.js +0 -17
  612. package/.next/standalone/.next/static/chunks/app/api/v1/redaction/init/route-36cb8b428b38b26a.js +0 -17
  613. package/.next/standalone/.next/static/chunks/app/api/v1/redaction/route-36cb8b428b38b26a.js +0 -17
  614. package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-36cb8b428b38b26a.js +0 -17
  615. package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-36cb8b428b38b26a.js +0 -17
  616. package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-36cb8b428b38b26a.js +0 -17
  617. package/.next/standalone/.next/static/chunks/app/api/v1/security/idle-timeout/route-36cb8b428b38b26a.js +0 -17
  618. package/.next/standalone/.next/static/chunks/app/api/v1/security/pin/route-36cb8b428b38b26a.js +0 -17
  619. package/.next/standalone/.next/static/chunks/app/api/v1/security/state/route-36cb8b428b38b26a.js +0 -17
  620. package/.next/standalone/.next/static/chunks/app/api/v1/security/unlock/route-36cb8b428b38b26a.js +0 -17
  621. package/.next/standalone/.next/static/chunks/app/api/v1/security/verify-pin/route-36cb8b428b38b26a.js +0 -17
  622. package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-36cb8b428b38b26a.js +0 -17
  623. package/.next/standalone/.next/static/chunks/app/api/v1/skills/[id]/route-36cb8b428b38b26a.js +0 -17
  624. package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/[id]/route-36cb8b428b38b26a.js +0 -17
  625. package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/route-36cb8b428b38b26a.js +0 -17
  626. package/.next/standalone/.next/static/chunks/app/api/v1/skills/route-36cb8b428b38b26a.js +0 -17
  627. package/.next/standalone/.next/static/chunks/app/api/v1/system/abort/route-36cb8b428b38b26a.js +0 -17
  628. package/.next/standalone/.next/static/chunks/app/api/v1/system/restart/route-36cb8b428b38b26a.js +0 -17
  629. package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-36cb8b428b38b26a.js +0 -17
  630. package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-36cb8b428b38b26a.js +0 -17
  631. package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-36cb8b428b38b26a.js +0 -17
  632. package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/context-pin/route-36cb8b428b38b26a.js +0 -17
  633. package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-36cb8b428b38b26a.js +0 -17
  634. package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-36cb8b428b38b26a.js +0 -17
  635. package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-36cb8b428b38b26a.js +0 -17
  636. package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-36cb8b428b38b26a.js +0 -17
  637. package/.next/standalone/.next/static/chunks/app/api/v1/update/apply/route-36cb8b428b38b26a.js +0 -17
  638. package/.next/standalone/.next/static/chunks/app/api/v1/update/route-36cb8b428b38b26a.js +0 -17
  639. package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-36cb8b428b38b26a.js +0 -17
  640. package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-36cb8b428b38b26a.js +0 -17
  641. package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-36cb8b428b38b26a.js +0 -17
  642. package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-36cb8b428b38b26a.js +0 -17
  643. package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-36cb8b428b38b26a.js +0 -17
  644. package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-36cb8b428b38b26a.js +0 -17
  645. package/.next/standalone/.next/static/chunks/app/manifest.webmanifest/route-36cb8b428b38b26a.js +0 -17
  646. package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-36cb8b428b38b26a.js +0 -17
  647. package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-36cb8b428b38b26a.js +0 -17
  648. package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-36cb8b428b38b26a.js +0 -17
  649. package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-36cb8b428b38b26a.js +0 -17
  650. /package/.next/standalone/.next/static/{NUrC9xax1sp1Q70nlFqS6 → bMRK5y3ruT7c3WtBfCQOG}/_buildManifest.js +0 -0
  651. /package/.next/standalone/.next/static/{NUrC9xax1sp1Q70nlFqS6 → bMRK5y3ruT7c3WtBfCQOG}/_ssgManifest.js +0 -0
@@ -82,599 +82,155 @@ module.exports = require("next/dist/server/app-render/action-async-storage.exter
82
82
 
83
83
  /***/ }),
84
84
 
85
- /***/ 20769:
85
+ /***/ 27910:
86
+ /***/ ((module) => {
87
+
88
+ module.exports = require("stream");
89
+
90
+ /***/ }),
91
+
92
+ /***/ 28354:
93
+ /***/ ((module) => {
94
+
95
+ module.exports = require("util");
96
+
97
+ /***/ }),
98
+
99
+ /***/ 29021:
100
+ /***/ ((module) => {
101
+
102
+ module.exports = require("fs");
103
+
104
+ /***/ }),
105
+
106
+ /***/ 29294:
107
+ /***/ ((module) => {
108
+
109
+ module.exports = require("next/dist/server/app-render/work-async-storage.external.js");
110
+
111
+ /***/ }),
112
+
113
+ /***/ 31421:
114
+ /***/ ((module) => {
115
+
116
+ module.exports = require("node:child_process");
117
+
118
+ /***/ }),
119
+
120
+ /***/ 33873:
121
+ /***/ ((module) => {
122
+
123
+ module.exports = require("path");
124
+
125
+ /***/ }),
126
+
127
+ /***/ 37067:
128
+ /***/ ((module) => {
129
+
130
+ module.exports = require("node:http");
131
+
132
+ /***/ }),
133
+
134
+ /***/ 38522:
135
+ /***/ ((module) => {
136
+
137
+ module.exports = require("node:zlib");
138
+
139
+ /***/ }),
140
+
141
+ /***/ 39765:
86
142
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
87
143
 
88
144
  __webpack_require__.r(__webpack_exports__);
89
145
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
90
- /* harmony export */ handler: () => (/* binding */ handler),
91
- /* harmony export */ patchFetch: () => (/* binding */ patchFetch),
92
- /* harmony export */ routeModule: () => (/* binding */ routeModule),
93
- /* harmony export */ serverHooks: () => (/* binding */ serverHooks),
94
- /* harmony export */ workAsyncStorage: () => (/* binding */ workAsyncStorage),
95
- /* harmony export */ workUnitAsyncStorage: () => (/* binding */ workUnitAsyncStorage)
146
+ /* harmony export */ GET: () => (/* binding */ GET)
96
147
  /* harmony export */ });
97
- /* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19225);
98
- /* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__);
99
- /* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84006);
100
- /* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8317);
101
- /* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__);
102
- /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99373);
103
- /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__);
104
- /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34775);
105
- /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__);
106
- /* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24235);
107
- /* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__);
108
- /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(261);
109
- /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__);
110
- /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(54365);
111
- /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__);
112
- /* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90771);
113
- /* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__);
114
- /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(73461);
115
- /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__);
116
- /* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67798);
117
- /* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(92280);
118
- /* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(62018);
119
- /* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__);
120
- /* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(45696);
121
- /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(47929);
122
- /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
123
- /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(86439);
124
- /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__);
125
- /* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(10246);
126
- /* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__);
127
- /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(37527);
128
- /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__);
148
+ /* harmony import */ var next_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
149
+ /* harmony import */ var _lib_bridges_registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(44540);
129
150
 
130
151
 
152
+ function GET() {
153
+ return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json((0,_lib_bridges_registry__WEBPACK_IMPORTED_MODULE_1__/* .listBridgeModules */ .Ll)());
154
+ }
131
155
 
132
156
 
157
+ /***/ }),
133
158
 
159
+ /***/ 42482:
160
+ /***/ ((module) => {
134
161
 
162
+ module.exports = import("sharp");;
135
163
 
164
+ /***/ }),
136
165
 
166
+ /***/ 44708:
167
+ /***/ ((module) => {
137
168
 
169
+ module.exports = require("node:https");
138
170
 
171
+ /***/ }),
139
172
 
173
+ /***/ 44870:
174
+ /***/ ((module) => {
140
175
 
176
+ module.exports = require("next/dist/compiled/next-server/app-route.runtime.prod.js");
141
177
 
178
+ /***/ }),
142
179
 
180
+ /***/ 48161:
181
+ /***/ ((module) => {
143
182
 
183
+ module.exports = require("node:os");
144
184
 
185
+ /***/ }),
145
186
 
187
+ /***/ 51455:
188
+ /***/ ((module) => {
146
189
 
147
- // We inject the nextConfigOutput here so that we can use them in the route
148
- // module.
149
- const nextConfigOutput = "standalone"
150
- const routeModule = new next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppRouteRouteModule({
151
- definition: {
152
- kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
153
- page: "/api/v1/bridges/kinds/route",
154
- pathname: "/api/v1/bridges/kinds",
155
- filename: "route",
156
- bundlePath: "app/api/v1/bridges/kinds/route"
157
- },
158
- distDir: ".next" || 0,
159
- relativeProjectDir: false || '',
160
- resolvedPagePath: "/home/runner/work/jarela/jarela/app/api/v1/bridges/kinds/route.ts",
161
- nextConfigOutput,
162
- // The lazy require factory ensures that:
163
- // - In dev: devRequestTimingInternalsEnd is set before userland executes,
164
- // correctly attributing module load time to application-code rather than
165
- // framework internals.
166
- // - In all modes: async modules (route files with top-level await) are
167
- // handled correctly — require() returns a Promise for such modules, which
168
- // ensureUserland() awaits before the first request is handled.
169
- userland: ()=>__webpack_require__(39765),
170
- // In Turbopack dev mode, also provide a synchronous per-request getter so
171
- // server HMR updates are picked up without re-executing the entry chunk.
172
- // Using require() (synchronous) avoids adding async overhead that would be
173
- // incorrectly attributed to application-code time in devRequestTiming.
174
- ... false ? 0 : {}
175
- });
176
- // Pull out the exports that we need to expose from the module. This should
177
- // be eliminated when we've moved the other routes to the new format. These
178
- // are used to hook into the route.
179
- const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
180
- function patchFetch() {
181
- return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
182
- workAsyncStorage,
183
- workUnitAsyncStorage
184
- });
185
- }
186
-
187
- async function handler(req, res, ctx) {
188
- if (ctx.requestMeta) {
189
- (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.setRequestMeta)(req, ctx.requestMeta);
190
- }
191
- if (routeModule.isDev) {
192
- (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.addRequestMeta)(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());
193
- }
194
- let srcPage = "/api/v1/bridges/kinds/route";
195
- // turbopack doesn't normalize `/index` in the page name
196
- // so we need to to process dynamic routes properly
197
- // TODO: fix turbopack providing differing value from webpack
198
- if (false) {} else if (srcPage === '/index') {
199
- // we always normalize /index specifically
200
- srcPage = '/';
201
- }
202
- const multiZoneDraftMode = false;
203
- const prepareResult = await routeModule.prepare(req, res, {
204
- srcPage,
205
- multiZoneDraftMode
206
- });
207
- if (!prepareResult) {
208
- res.statusCode = 400;
209
- res.end('Bad Request');
210
- ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());
211
- return null;
212
- }
213
- const { buildId, deploymentId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest, previewProps } = prepareResult;
214
- const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__.normalizeAppPath)(srcPage);
215
- // Only this route's prerenders can establish ISR or admit generated params.
216
- const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]) && (routeModule.isDev || (0,next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__.isRouteCacheOwner)(resolvedPathname, routeModule.cacheOwner, prerenderManifest.routes[resolvedPathname]));
217
- let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || isPrerendered);
218
- const render404 = async ()=>{
219
- // TODO: should route-module itself handle rendering the 404
220
- if (routerServerContext == null ? void 0 : routerServerContext.render404) {
221
- await routerServerContext.render404(req, res, parsedUrl, false);
222
- } else {
223
- res.end('This page could not be found');
224
- }
225
- return null;
226
- };
227
- if (isIsr && !isDraftMode) {
228
- const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];
229
- if (prerenderInfo) {
230
- if (prerenderInfo.fallback === false && !isPrerendered) {
231
- if (nextConfig.adapterPath) {
232
- return await render404();
233
- }
234
- throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError();
235
- }
236
- }
237
- }
238
- let cacheKey = null;
239
- if (isIsr && !routeModule.isDev && !isDraftMode) {
240
- cacheKey = resolvedPathname;
241
- // ensure /index and / is normalized to one key
242
- cacheKey = cacheKey === '/index' ? '/' : cacheKey;
243
- }
244
- // Before rendering (which initializes component tree modules), we have to
245
- // set the reference manifests to our global store so Server Action's
246
- // encryption util can access to them at the top level of the page module.
247
- if (serverActionsManifest && clientReferenceManifest) {
248
- (0,next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__.setManifestsSingleton)({
249
- page: srcPage,
250
- clientReferenceManifest,
251
- serverActionsManifest
252
- });
253
- }
254
- const method = req.method || 'GET';
255
- const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)();
256
- const activeSpan = tracer.getActiveScopeSpan();
257
- const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);
258
- const isMinimalMode = Boolean((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'minimalMode'));
259
- const incrementalCache = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, previewProps, prerenderManifest, isMinimalMode);
260
- incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();
261
- globalThis.__incrementalCache = incrementalCache;
262
- const context = {
263
- params,
264
- previewProps,
265
- renderOpts: {
266
- experimental: {
267
- authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
268
- useCacheTimeout: nextConfig.experimental.useCacheTimeout,
269
- durableUseCacheEntries: Boolean(nextConfig.experimental.durableUseCacheEntries)
270
- },
271
- cacheComponents: Boolean(nextConfig.cacheComponents),
272
- validationLevel: nextConfig.experimental.instantInsights.validationLevel,
273
- isDraftMode,
274
- incrementalCache,
275
- hmrRefreshHash: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'hmrRefreshHash'),
276
- cacheLifeProfiles: nextConfig.cacheLife,
277
- staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,
278
- waitUntil: ctx.waitUntil,
279
- onClose: (cb)=>{
280
- res.on('close', cb);
281
- },
282
- onAfterTaskError: undefined
283
- },
284
- sharedContext: {
285
- buildId,
286
- deploymentId
287
- }
288
- };
289
- const nodeNextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextRequest(req);
290
- const nodeNextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextResponse(res);
291
- const nextReq = next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__.NextRequestAdapter.fromNodeNextRequest(nodeNextReq, (0,next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__.signalFromNodeResponse)(res));
292
- const responseGenerator = async ({ previousCacheEntry })=>{
293
- try {
294
- if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {
295
- res.statusCode = 404;
296
- // on-demand revalidate always sets this header
297
- res.setHeader('x-nextjs-cache', 'REVALIDATED');
298
- res.end('This page could not be found');
299
- return null;
300
- }
301
- const response = cacheKey === null ? await routeModule.handle(nextReq, context) : await routeModule.prerender(nextReq, context);
302
- req.fetchMetrics = context.renderOpts.fetchMetrics;
303
- let pendingWaitUntil = context.renderOpts.pendingWaitUntil;
304
- // Attempt using provided waitUntil if available
305
- // if it's not we fallback to sendResponse's handling
306
- if (pendingWaitUntil) {
307
- if (ctx.waitUntil) {
308
- ctx.waitUntil(pendingWaitUntil);
309
- pendingWaitUntil = undefined;
310
- }
311
- }
312
- const cacheTags = context.renderOpts.collectedTags;
313
- // If the request is for a static response, we can cache it so long
314
- // as it's not edge.
315
- if (isIsr) {
316
- const blob = await response.blob();
317
- // Copy the headers from the response.
318
- const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.toNodeOutgoingHttpHeaders)(response.headers);
319
- if (cacheTags) {
320
- headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER] = cacheTags;
321
- }
322
- if (!headers['content-type'] && blob.type) {
323
- headers['content-type'] = blob.type;
324
- }
325
- const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;
326
- const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? // route has a numeric `revalidate` but didn't declare an
327
- // explicit `expire` (e.g. via `cacheLife`). This mirrors the
328
- // build-time fallback in `build/index.ts` so cache entries
329
- // and the response Cache-Control header agree on the route's
330
- // effective expire. Routes that opt out of revalidation
331
- // (`revalidate: false`) or that are dynamic (`revalidate: 0`)
332
- // keep `expire: undefined`.
333
- revalidate !== false && revalidate > 0 ? nextConfig.expireTime : undefined : context.renderOpts.collectedExpire;
334
- // Create the cache entry for the response.
335
- const cacheEntry = {
336
- value: {
337
- kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE,
338
- status: response.status,
339
- body: Buffer.from(await blob.arrayBuffer()),
340
- headers
341
- },
342
- cacheControl: {
343
- revalidate,
344
- expire
345
- }
346
- };
347
- return cacheEntry;
348
- } else {
349
- // send response without caching if not ISR
350
- await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, response, pendingWaitUntil);
351
- return null;
352
- }
353
- } catch (err) {
354
- // if this is a background revalidate we need to report
355
- // the request error here as it won't be bubbled
356
- if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {
357
- const silenceLog = false;
358
- await routeModule.onRequestError(req, err, {
359
- routerKind: 'App Router',
360
- routePath: srcPage,
361
- routeType: 'route',
362
- revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
363
- isStaticGeneration: cacheKey !== null,
364
- isOnDemandRevalidate
365
- })
366
- }, silenceLog, routerServerContext);
367
- }
368
- throw err;
369
- }
370
- };
371
- const handleResponse = async (currentSpan, parentSpan)=>{
372
- try {
373
- var _cacheEntry_value;
374
- const cacheEntry = await routeModule.handleResponse({
375
- req,
376
- nextConfig,
377
- cacheKey,
378
- routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
379
- isFallback: false,
380
- previewProps,
381
- prerenderManifest,
382
- isRoutePPREnabled: false,
383
- isOnDemandRevalidate,
384
- revalidateOnlyGenerated,
385
- responseGenerator,
386
- waitUntil: ctx.waitUntil,
387
- isMinimalMode
388
- });
389
- if (cacheEntry !== null && 'error' in cacheEntry) {
390
- throw cacheEntry.error;
391
- }
392
- // we don't create a cacheEntry for ISR
393
- if (!isIsr) {
394
- return;
395
- }
396
- if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE) {
397
- var _cacheEntry_value1;
398
- throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
399
- }
400
- if (!isMinimalMode) {
401
- res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
402
- }
403
- // Draft mode should never be cached
404
- if (isDraftMode) {
405
- res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
406
- }
407
- const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
408
- if (!(isMinimalMode && isIsr)) {
409
- headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
410
- }
411
- // If cache control is already set on the response we don't
412
- // override it to allow users to customize it via next.config
413
- if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
414
- headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
415
- }
416
- await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.
417
- new Response(cacheEntry.value.body, {
418
- headers,
419
- status: cacheEntry.value.status || 200
420
- }));
421
- return;
422
- } catch (err) {
423
- if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError)) {
424
- const silenceLog = false;
425
- await routeModule.onRequestError(req, err, {
426
- routerKind: 'App Router',
427
- routePath: normalizedSrcPage,
428
- routeType: 'route',
429
- revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
430
- isStaticGeneration: cacheKey !== null,
431
- isOnDemandRevalidate
432
- })
433
- }, silenceLog, routerServerContext);
434
- }
435
- // rethrow so that we can handle serving error page
436
- // If this is during static generation, throw the error again.
437
- if (isIsr) throw err;
438
- // Otherwise, send a 500 response unless the original response has
439
- // already committed. In that case, preserve its status code for
440
- // telemetry while still recording the failure and terminating a response
441
- // that the failed pipeline left open.
442
- if (res.headersSent) {
443
- if (currentSpan) {
444
- const error = err instanceof Error ? err : new Error('Unknown app route error');
445
- currentSpan.recordException(error);
446
- currentSpan.setStatus({
447
- code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR,
448
- message: error.message
449
- });
450
- currentSpan.setAttribute('error.type', error.name);
451
- }
452
- if (!res.writableEnded && !res.destroyed) {
453
- res.end();
454
- }
455
- } else {
456
- await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
457
- status: 500
458
- }));
459
- }
460
- return;
461
- } finally{
462
- ;
463
- (()=>{
464
- if (!currentSpan) {
465
- return;
466
- }
467
- let statusCode = res.statusCode;
468
- currentSpan.setAttributes({
469
- 'http.status_code': statusCode,
470
- 'next.rsc': false
471
- });
472
- if (statusCode && statusCode >= 500) {
473
- // For 5xx status codes: SHOULD be set to 'Error' span status.
474
- // x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
475
- currentSpan.setStatus({
476
- code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
477
- });
478
- // For span status 'Error', SHOULD set 'error.type' attribute.
479
- currentSpan.setAttribute('error.type', statusCode.toString());
480
- }
481
- const rootSpanAttributes = tracer.getRootSpanAttributes();
482
- // We were unable to get attributes, probably OTEL is not enabled
483
- if (!rootSpanAttributes) {
484
- return;
485
- }
486
- if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
487
- console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
488
- return;
489
- }
490
- const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
491
- const name = `${method} ${route}`;
492
- currentSpan.setAttributes({
493
- 'next.route': route,
494
- 'http.route': route,
495
- 'next.span_name': name
496
- });
497
- currentSpan.updateName(name);
498
- // Propagate http.route to the parent span if one exists (e.g.
499
- // a platform-created HTTP span in adapter deployments).
500
- if (parentSpan && parentSpan !== currentSpan) {
501
- parentSpan.setAttribute('http.route', route);
502
- parentSpan.updateName(name);
503
- }
504
- })();
505
- }
506
- };
507
- // TODO: activeSpan code path is for when wrapped by
508
- // next-server can be removed when this is no longer used
509
- if (isWrappedByNextServer && activeSpan) {
510
- await handleResponse(activeSpan, undefined);
511
- } else {
512
- let parentSpan = tracer.getActiveScopeSpan();
513
- await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest, {
514
- spanName: `${method} ${srcPage}`,
515
- kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanKind.SERVER,
516
- attributes: {
517
- 'http.method': method,
518
- 'http.target': req.url
519
- }
520
- }, (span)=>handleResponse(span, parentSpan)), undefined, !isWrappedByNextServer);
521
- }
522
- }
523
-
524
- //# sourceMappingURL=app-route.js.map
525
-
526
-
527
- /***/ }),
528
-
529
- /***/ 27910:
530
- /***/ ((module) => {
531
-
532
- module.exports = require("stream");
533
-
534
- /***/ }),
535
-
536
- /***/ 28354:
537
- /***/ ((module) => {
538
-
539
- module.exports = require("util");
540
-
541
- /***/ }),
542
-
543
- /***/ 29021:
544
- /***/ ((module) => {
545
-
546
- module.exports = require("fs");
547
-
548
- /***/ }),
549
-
550
- /***/ 29294:
551
- /***/ ((module) => {
552
-
553
- module.exports = require("next/dist/server/app-render/work-async-storage.external.js");
554
-
555
- /***/ }),
556
-
557
- /***/ 31421:
558
- /***/ ((module) => {
559
-
560
- module.exports = require("node:child_process");
561
-
562
- /***/ }),
563
-
564
- /***/ 33873:
565
- /***/ ((module) => {
566
-
567
- module.exports = require("path");
568
-
569
- /***/ }),
570
-
571
- /***/ 37067:
572
- /***/ ((module) => {
573
-
574
- module.exports = require("node:http");
575
-
576
- /***/ }),
577
-
578
- /***/ 38522:
579
- /***/ ((module) => {
580
-
581
- module.exports = require("node:zlib");
582
-
583
- /***/ }),
584
-
585
- /***/ 39765:
586
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
587
-
588
- __webpack_require__.r(__webpack_exports__);
589
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
590
- /* harmony export */ GET: () => (/* binding */ GET)
591
- /* harmony export */ });
592
- /* harmony import */ var next_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
593
- /* harmony import */ var _lib_bridges_registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(44540);
594
-
595
-
596
- function GET() {
597
- return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json((0,_lib_bridges_registry__WEBPACK_IMPORTED_MODULE_1__/* .listBridgeModules */ .Ll)());
598
- }
599
-
600
-
601
- /***/ }),
602
-
603
- /***/ 42482:
604
- /***/ ((module) => {
605
-
606
- module.exports = import("sharp");;
607
-
608
- /***/ }),
609
-
610
- /***/ 44708:
611
- /***/ ((module) => {
612
-
613
- module.exports = require("node:https");
614
-
615
- /***/ }),
616
-
617
- /***/ 44870:
618
- /***/ ((module) => {
619
-
620
- module.exports = require("next/dist/compiled/next-server/app-route.runtime.prod.js");
621
-
622
- /***/ }),
623
-
624
- /***/ 48161:
625
- /***/ ((module) => {
626
-
627
- module.exports = require("node:os");
628
-
629
- /***/ }),
630
-
631
- /***/ 51455:
632
- /***/ ((module) => {
633
-
634
- module.exports = require("node:fs/promises");
635
-
636
- /***/ }),
637
-
638
- /***/ 55511:
639
- /***/ ((module) => {
640
-
641
- module.exports = require("crypto");
642
-
643
- /***/ }),
644
-
645
- /***/ 55591:
646
- /***/ ((module) => {
647
-
648
- module.exports = require("https");
649
-
650
- /***/ }),
651
-
652
- /***/ 57075:
653
- /***/ ((module) => {
654
-
655
- module.exports = require("node:stream");
656
-
657
- /***/ }),
658
-
659
- /***/ 57975:
660
- /***/ ((module) => {
661
-
662
- module.exports = require("node:util");
663
-
664
- /***/ }),
665
-
666
- /***/ 58154:
667
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
668
-
669
-
670
- // EXPORTS
671
- __webpack_require__.d(__webpack_exports__, {
672
- kx: () => (/* binding */ readFileRef),
673
- vw: () => (/* binding */ readImageRef),
674
- fX: () => (/* binding */ spillAttachments),
675
- spillFileBuffer: () => (/* binding */ spillFileBuffer),
676
- ui: () => (/* binding */ spillImageBuffer),
677
- Jb: () => (/* binding */ spillImagePart)
190
+ module.exports = require("node:fs/promises");
191
+
192
+ /***/ }),
193
+
194
+ /***/ 55511:
195
+ /***/ ((module) => {
196
+
197
+ module.exports = require("crypto");
198
+
199
+ /***/ }),
200
+
201
+ /***/ 55591:
202
+ /***/ ((module) => {
203
+
204
+ module.exports = require("https");
205
+
206
+ /***/ }),
207
+
208
+ /***/ 57075:
209
+ /***/ ((module) => {
210
+
211
+ module.exports = require("node:stream");
212
+
213
+ /***/ }),
214
+
215
+ /***/ 57975:
216
+ /***/ ((module) => {
217
+
218
+ module.exports = require("node:util");
219
+
220
+ /***/ }),
221
+
222
+ /***/ 58154:
223
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
224
+
225
+
226
+ // EXPORTS
227
+ __webpack_require__.d(__webpack_exports__, {
228
+ kx: () => (/* binding */ readFileRef),
229
+ vw: () => (/* binding */ readImageRef),
230
+ fX: () => (/* binding */ spillAttachments),
231
+ spillFileBuffer: () => (/* binding */ spillFileBuffer),
232
+ ui: () => (/* binding */ spillImageBuffer),
233
+ Jb: () => (/* binding */ spillImagePart)
678
234
  });
679
235
 
680
236
  // EXTERNAL MODULE: external "node:fs"
@@ -838,253 +394,697 @@ const ALWAYS_PASSTHROUGH = new Set([
838
394
  }
839
395
  }
840
396
 
841
- ;// ./lib/attachments/spill.ts
842
- // Attachment spill store.
843
- //
844
- // Turns inline `image`/`file` ContentParts (base64 or text blob in the
845
- // message row) into `image_ref`/`file_ref` parts that point at a file under
846
- // `<dataDir>/files/`. The message row shrinks from ~400 KB per image to
847
- // ~200 B; `toBaseMessages` in lib/agents/llm.ts reads the file back only
848
- // when it needs to (see ADR-0090), so the bytes never enter the checkpoint
849
- // store or the warm summariser.
850
- //
851
- // Content-addressed: the on-disk file name is `<sha256>.<ext>` so an image
852
- // forwarded / retried / re-ingested twice collapses to one file. This is
853
- // the primitive the previous "delete-checkpoints-per-turn" hack was
854
- // compensating for — see ADR-0065.
397
+ ;// ./lib/attachments/spill.ts
398
+ // Attachment spill store.
399
+ //
400
+ // Turns inline `image`/`file` ContentParts (base64 or text blob in the
401
+ // message row) into `image_ref`/`file_ref` parts that point at a file under
402
+ // `<dataDir>/files/`. The message row shrinks from ~400 KB per image to
403
+ // ~200 B; `toBaseMessages` in lib/agents/llm.ts reads the file back only
404
+ // when it needs to (see ADR-0090), so the bytes never enter the checkpoint
405
+ // store or the warm summariser.
406
+ //
407
+ // Content-addressed: the on-disk file name is `<sha256>.<ext>` so an image
408
+ // forwarded / retried / re-ingested twice collapses to one file. This is
409
+ // the primitive the previous "delete-checkpoints-per-turn" hack was
410
+ // compensating for — see ADR-0065.
411
+
412
+
413
+
414
+
415
+
416
+ const MIME_EXT = {
417
+ "image/png": "png",
418
+ "image/jpeg": "jpg",
419
+ "image/jpg": "jpg",
420
+ "image/webp": "webp",
421
+ "image/gif": "gif",
422
+ "image/svg+xml": "svg",
423
+ "image/heic": "heic",
424
+ "image/heif": "heif",
425
+ "image/bmp": "bmp",
426
+ "image/tiff": "tiff",
427
+ "application/pdf": "pdf",
428
+ "application/json": "json",
429
+ "text/plain": "txt"
430
+ };
431
+ function extForMime(media_type) {
432
+ return MIME_EXT[media_type.toLowerCase()] ?? "bin";
433
+ }
434
+ function isTextMediaType(media_type) {
435
+ return media_type.startsWith("text/") || media_type === "application/json";
436
+ }
437
+ function safeDisplayName(name) {
438
+ const trimmed = name.trim();
439
+ return trimmed.length > 0 ? trimmed.replace(/[\r\n\t]/g, " ").slice(0, 240) : "attachment";
440
+ }
441
+ function extForFile(media_type, filename) {
442
+ const fromMime = extForMime(media_type);
443
+ if (fromMime !== "bin") return fromMime;
444
+ const ext = filename ? (0,external_node_path_.extname)(filename).slice(1).toLowerCase() : "";
445
+ return /^[a-z0-9]{1,12}$/.test(ext) ? ext : "bin";
446
+ }
447
+ async function writeContentAddressedFile(buf, ext) {
448
+ const sha256 = (0,external_node_crypto_.createHash)("sha256").update(buf).digest("hex");
449
+ const name = `${sha256}.${ext}`;
450
+ if (!(0,files/* isSafeFileName */.Dh)(name)) throw new Error(`spill: unsafe file name ${name}`);
451
+ const abs = (0,external_node_path_.join)(files/* FILES_DIR */.qM, name);
452
+ let exists = false;
453
+ try {
454
+ const s = (0,external_node_fs_.statSync)(abs);
455
+ exists = s.isFile() && s.size === buf.length;
456
+ } catch {
457
+ exists = false;
458
+ }
459
+ if (!exists) {
460
+ await external_node_fs_.promises.writeFile(abs, buf);
461
+ }
462
+ return {
463
+ name,
464
+ sha256
465
+ };
466
+ }
467
+ /**
468
+ * Persist one base64-encoded image blob to the files dir, keyed by its
469
+ * content hash. Idempotent: re-writing the same bytes is a no-op.
470
+ * Returns the `image_ref` variant the caller should store instead.
471
+ *
472
+ * The blob is run through `shrinkImage` first (ADR-0066) so what lands
473
+ * on disk is already resized to a vision-friendly 1600px max-edge and
474
+ * transcoded off HEIC/BMP/TIFF. Pass `shrink: { maxEdge: 0 }`-style
475
+ * opts through if you need to override defaults.
476
+ */ async function spillImageBuffer(raw, media_type, opts) {
477
+ const shrunk = await shrinkImage(raw, media_type, opts?.shrink);
478
+ const buf = shrunk.buf;
479
+ const storedMediaType = shrunk.media_type;
480
+ const { name, sha256 } = await writeContentAddressedFile(buf, extForMime(storedMediaType));
481
+ const ref = {
482
+ type: "image_ref",
483
+ media_type: storedMediaType,
484
+ name,
485
+ sha256,
486
+ size: buf.length
487
+ };
488
+ if (opts?.filename) ref.filename = safeDisplayName(opts.filename);
489
+ if (shrunk.width) ref.width = shrunk.width;
490
+ if (shrunk.height) ref.height = shrunk.height;
491
+ return ref;
492
+ }
493
+ async function spillImagePart(part, opts) {
494
+ return spillImageBuffer(Buffer.from(part.data, "base64"), part.media_type, opts);
495
+ }
496
+ async function spillFileBuffer(raw, media_type, filename) {
497
+ const { name, sha256 } = await writeContentAddressedFile(raw, extForFile(media_type, filename));
498
+ return {
499
+ type: "file_ref",
500
+ media_type,
501
+ name,
502
+ filename: safeDisplayName(filename),
503
+ sha256,
504
+ size: raw.length
505
+ };
506
+ }
507
+ /**
508
+ * Walk a ContentPart[] and replace every inline `image`/`file` part with an
509
+ * `image_ref`/`file_ref`. Leaves other part types untouched. Safe to call on
510
+ * already-refactored parts — the ref variants are passed through.
511
+ * Returns a new array (does not mutate the input).
512
+ *
513
+ * `file.data` is plain UTF-8 text for text/json attachments (the InputBar
514
+ * client reads text/code files with `readAsText`, never base64) and base64
515
+ * otherwise, mirroring the decode convention already used to render `file`
516
+ * parts in lib/agents/llm.ts and the provider adapters.
517
+ */ async function spillAttachments(parts, opts) {
518
+ const out = [];
519
+ for (const p of parts){
520
+ if (p.type === "image") out.push(await spillImagePart(p, opts));
521
+ else if (p.type === "file") {
522
+ const buf = isTextMediaType(p.media_type) ? Buffer.from(p.data, "utf8") : Buffer.from(p.data, "base64");
523
+ out.push(await spillFileBuffer(buf, p.media_type, p.name));
524
+ } else out.push(p);
525
+ }
526
+ return out;
527
+ }
528
+ /**
529
+ * Read an `image_ref` back off disk as raw bytes. Used at LLM invocation
530
+ * time (see `toBaseMessages` in `lib/agents/llm.ts`) — the base64
531
+ * re-encoding lives on the provider block only, never in state.
532
+ * Throws when the file is missing so the caller can surface a clear error
533
+ * to the user instead of the provider returning a puzzling 400.
534
+ */ async function readImageRef(ref) {
535
+ if (!(0,files/* isSafeFileName */.Dh)(ref.name)) {
536
+ throw new Error(`readImageRef: unsafe file name ${ref.name}`);
537
+ }
538
+ const abs = (0,external_node_path_.join)(files/* FILES_DIR */.qM, ref.name);
539
+ return external_node_fs_.promises.readFile(abs);
540
+ }
541
+ /**
542
+ * Read a `file_ref` back off disk as raw bytes. Same shape as
543
+ * `readImageRef` — used both for the newest turn's full readout and for
544
+ * the `view_attachment` tool's on-demand re-read (ADR-0090).
545
+ */ async function readFileRef(ref) {
546
+ if (!(0,files/* isSafeFileName */.Dh)(ref.name)) {
547
+ throw new Error(`readFileRef: unsafe file name ${ref.name}`);
548
+ }
549
+ const abs = (0,external_node_path_.join)(files/* FILES_DIR */.qM, ref.name);
550
+ return external_node_fs_.promises.readFile(abs);
551
+ }
552
+
855
553
 
554
+ /***/ }),
856
555
 
556
+ /***/ 63033:
557
+ /***/ ((module) => {
857
558
 
559
+ module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
858
560
 
561
+ /***/ }),
859
562
 
860
- const MIME_EXT = {
861
- "image/png": "png",
862
- "image/jpeg": "jpg",
863
- "image/jpg": "jpg",
864
- "image/webp": "webp",
865
- "image/gif": "gif",
866
- "image/svg+xml": "svg",
867
- "image/heic": "heic",
868
- "image/heif": "heif",
869
- "image/bmp": "bmp",
870
- "image/tiff": "tiff",
871
- "application/pdf": "pdf",
872
- "application/json": "json",
873
- "text/plain": "txt"
874
- };
875
- function extForMime(media_type) {
876
- return MIME_EXT[media_type.toLowerCase()] ?? "bin";
877
- }
878
- function isTextMediaType(media_type) {
879
- return media_type.startsWith("text/") || media_type === "application/json";
880
- }
881
- function safeDisplayName(name) {
882
- const trimmed = name.trim();
883
- return trimmed.length > 0 ? trimmed.replace(/[\r\n\t]/g, " ").slice(0, 240) : "attachment";
884
- }
885
- function extForFile(media_type, filename) {
886
- const fromMime = extForMime(media_type);
887
- if (fromMime !== "bin") return fromMime;
888
- const ext = filename ? (0,external_node_path_.extname)(filename).slice(1).toLowerCase() : "";
889
- return /^[a-z0-9]{1,12}$/.test(ext) ? ext : "bin";
890
- }
891
- async function writeContentAddressedFile(buf, ext) {
892
- const sha256 = (0,external_node_crypto_.createHash)("sha256").update(buf).digest("hex");
893
- const name = `${sha256}.${ext}`;
894
- if (!(0,files/* isSafeFileName */.Dh)(name)) throw new Error(`spill: unsafe file name ${name}`);
895
- const abs = (0,external_node_path_.join)(files/* FILES_DIR */.qM, name);
896
- let exists = false;
897
- try {
898
- const s = (0,external_node_fs_.statSync)(abs);
899
- exists = s.isFile() && s.size === buf.length;
900
- } catch {
901
- exists = false;
563
+ /***/ 73024:
564
+ /***/ ((module) => {
565
+
566
+ module.exports = require("node:fs");
567
+
568
+ /***/ }),
569
+
570
+ /***/ 74075:
571
+ /***/ ((module) => {
572
+
573
+ module.exports = require("zlib");
574
+
575
+ /***/ }),
576
+
577
+ /***/ 75919:
578
+ /***/ ((module) => {
579
+
580
+ module.exports = require("node:worker_threads");
581
+
582
+ /***/ }),
583
+
584
+ /***/ 76760:
585
+ /***/ ((module) => {
586
+
587
+ module.exports = require("node:path");
588
+
589
+ /***/ }),
590
+
591
+ /***/ 77598:
592
+ /***/ ((module) => {
593
+
594
+ module.exports = require("node:crypto");
595
+
596
+ /***/ }),
597
+
598
+ /***/ 79428:
599
+ /***/ ((module) => {
600
+
601
+ module.exports = require("buffer");
602
+
603
+ /***/ }),
604
+
605
+ /***/ 80099:
606
+ /***/ ((module) => {
607
+
608
+ module.exports = require("node:sqlite");
609
+
610
+ /***/ }),
611
+
612
+ /***/ 80481:
613
+ /***/ ((module) => {
614
+
615
+ module.exports = require("node:readline");
616
+
617
+ /***/ }),
618
+
619
+ /***/ 81630:
620
+ /***/ ((module) => {
621
+
622
+ module.exports = require("http");
623
+
624
+ /***/ }),
625
+
626
+ /***/ 86439:
627
+ /***/ ((module) => {
628
+
629
+ module.exports = require("next/dist/shared/lib/no-fallback-error.external");
630
+
631
+ /***/ }),
632
+
633
+ /***/ 94735:
634
+ /***/ ((module) => {
635
+
636
+ module.exports = require("events");
637
+
638
+ /***/ }),
639
+
640
+ /***/ 99253:
641
+ /***/ ((module) => {
642
+
643
+ module.exports = import("@huggingface/transformers");;
644
+
645
+ /***/ }),
646
+
647
+ /***/ 99867:
648
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
649
+
650
+ __webpack_require__.r(__webpack_exports__);
651
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
652
+ /* harmony export */ handler: () => (/* binding */ handler),
653
+ /* harmony export */ patchFetch: () => (/* binding */ patchFetch),
654
+ /* harmony export */ routeModule: () => (/* binding */ routeModule),
655
+ /* harmony export */ serverHooks: () => (/* binding */ serverHooks),
656
+ /* harmony export */ workAsyncStorage: () => (/* binding */ workAsyncStorage),
657
+ /* harmony export */ workUnitAsyncStorage: () => (/* binding */ workUnitAsyncStorage)
658
+ /* harmony export */ });
659
+ /* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19225);
660
+ /* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__);
661
+ /* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84006);
662
+ /* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8317);
663
+ /* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__);
664
+ /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99373);
665
+ /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__);
666
+ /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34775);
667
+ /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__);
668
+ /* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24235);
669
+ /* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__);
670
+ /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(261);
671
+ /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__);
672
+ /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(54365);
673
+ /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__);
674
+ /* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90771);
675
+ /* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__);
676
+ /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(73461);
677
+ /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__);
678
+ /* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67798);
679
+ /* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(92280);
680
+ /* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(62018);
681
+ /* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__);
682
+ /* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(45696);
683
+ /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(47929);
684
+ /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
685
+ /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(86439);
686
+ /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__);
687
+ /* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(10246);
688
+ /* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__);
689
+ /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(37527);
690
+ /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__);
691
+
692
+
693
+
694
+
695
+
696
+
697
+
698
+
699
+
700
+
701
+
702
+
703
+
704
+
705
+
706
+
707
+
708
+
709
+ // We inject the nextConfigOutput here so that we can use them in the route
710
+ // module.
711
+ const nextConfigOutput = "standalone"
712
+ const routeModule = new next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppRouteRouteModule({
713
+ definition: {
714
+ kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
715
+ page: "/api/v1/bridges/kinds/route",
716
+ pathname: "/api/v1/bridges/kinds",
717
+ filename: "route",
718
+ bundlePath: "app/api/v1/bridges/kinds/route"
719
+ },
720
+ distDir: ".next" || 0,
721
+ relativeProjectDir: false || '',
722
+ resolvedPagePath: "/home/runner/work/jarela/jarela/app/api/v1/bridges/kinds/route.ts",
723
+ nextConfigOutput,
724
+ // The lazy require factory ensures that:
725
+ // - In dev: devRequestTimingInternalsEnd is set before userland executes,
726
+ // correctly attributing module load time to application-code rather than
727
+ // framework internals.
728
+ // - In all modes: async modules (route files with top-level await) are
729
+ // handled correctly — require() returns a Promise for such modules, which
730
+ // ensureUserland() awaits before the first request is handled.
731
+ userland: ()=>__webpack_require__(39765),
732
+ // In Turbopack dev mode, also provide a synchronous per-request getter so
733
+ // server HMR updates are picked up without re-executing the entry chunk.
734
+ // Using require() (synchronous) avoids adding async overhead that would be
735
+ // incorrectly attributed to application-code time in devRequestTiming.
736
+ ... false ? 0 : {}
737
+ });
738
+ // Pull out the exports that we need to expose from the module. This should
739
+ // be eliminated when we've moved the other routes to the new format. These
740
+ // are used to hook into the route.
741
+ const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
742
+ function patchFetch() {
743
+ return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
744
+ workAsyncStorage,
745
+ workUnitAsyncStorage
746
+ });
747
+ }
748
+
749
+ async function handler(req, res, ctx) {
750
+ if (ctx.requestMeta) {
751
+ (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.setRequestMeta)(req, ctx.requestMeta);
902
752
  }
903
- if (!exists) {
904
- await external_node_fs_.promises.writeFile(abs, buf);
753
+ if (routeModule.isDev) {
754
+ (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.addRequestMeta)(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());
905
755
  }
906
- return {
907
- name,
908
- sha256
756
+ let srcPage = "/api/v1/bridges/kinds/route";
757
+ // turbopack doesn't normalize `/index` in the page name
758
+ // so we need to to process dynamic routes properly
759
+ // TODO: fix turbopack providing differing value from webpack
760
+ if (false) {} else if (srcPage === '/index') {
761
+ // we always normalize /index specifically
762
+ srcPage = '/';
763
+ }
764
+ const multiZoneDraftMode = false;
765
+ const prepareResult = await routeModule.prepare(req, res, {
766
+ srcPage,
767
+ multiZoneDraftMode
768
+ });
769
+ if (!prepareResult) {
770
+ res.statusCode = 400;
771
+ res.end('Bad Request');
772
+ ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());
773
+ return null;
774
+ }
775
+ const { buildId, deploymentId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest, previewProps } = prepareResult;
776
+ const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__.normalizeAppPath)(srcPage);
777
+ // Only this route's prerenders can establish ISR or admit generated params.
778
+ const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]) && (routeModule.isDev || (0,next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__.isRouteCacheOwner)(resolvedPathname, routeModule.cacheOwner, prerenderManifest.routes[resolvedPathname]));
779
+ let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || isPrerendered);
780
+ const render404 = async ()=>{
781
+ // TODO: should route-module itself handle rendering the 404
782
+ if (routerServerContext == null ? void 0 : routerServerContext.render404) {
783
+ await routerServerContext.render404(req, res, parsedUrl, false);
784
+ } else {
785
+ res.end('This page could not be found');
786
+ }
787
+ return null;
909
788
  };
910
- }
911
- /**
912
- * Persist one base64-encoded image blob to the files dir, keyed by its
913
- * content hash. Idempotent: re-writing the same bytes is a no-op.
914
- * Returns the `image_ref` variant the caller should store instead.
915
- *
916
- * The blob is run through `shrinkImage` first (ADR-0066) so what lands
917
- * on disk is already resized to a vision-friendly 1600px max-edge and
918
- * transcoded off HEIC/BMP/TIFF. Pass `shrink: { maxEdge: 0 }`-style
919
- * opts through if you need to override defaults.
920
- */ async function spillImageBuffer(raw, media_type, opts) {
921
- const shrunk = await shrinkImage(raw, media_type, opts?.shrink);
922
- const buf = shrunk.buf;
923
- const storedMediaType = shrunk.media_type;
924
- const { name, sha256 } = await writeContentAddressedFile(buf, extForMime(storedMediaType));
925
- const ref = {
926
- type: "image_ref",
927
- media_type: storedMediaType,
928
- name,
929
- sha256,
930
- size: buf.length
789
+ if (isIsr && !isDraftMode) {
790
+ const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];
791
+ if (prerenderInfo) {
792
+ if (prerenderInfo.fallback === false && !isPrerendered) {
793
+ if (nextConfig.adapterPath) {
794
+ return await render404();
795
+ }
796
+ throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError();
797
+ }
798
+ }
799
+ }
800
+ let cacheKey = null;
801
+ if (isIsr && !routeModule.isDev && !isDraftMode) {
802
+ cacheKey = resolvedPathname;
803
+ // ensure /index and / is normalized to one key
804
+ cacheKey = cacheKey === '/index' ? '/' : cacheKey;
805
+ }
806
+ // Before rendering (which initializes component tree modules), we have to
807
+ // set the reference manifests to our global store so Server Action's
808
+ // encryption util can access to them at the top level of the page module.
809
+ if (serverActionsManifest && clientReferenceManifest) {
810
+ (0,next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__.setManifestsSingleton)({
811
+ page: srcPage,
812
+ clientReferenceManifest,
813
+ serverActionsManifest
814
+ });
815
+ }
816
+ const method = req.method || 'GET';
817
+ const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)();
818
+ const activeSpan = tracer.getActiveScopeSpan();
819
+ const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);
820
+ const isMinimalMode = Boolean((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'minimalMode'));
821
+ const incrementalCache = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, previewProps, prerenderManifest, isMinimalMode);
822
+ incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();
823
+ globalThis.__incrementalCache = incrementalCache;
824
+ const context = {
825
+ params,
826
+ previewProps,
827
+ renderOpts: {
828
+ experimental: {
829
+ authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
830
+ useCacheTimeout: nextConfig.experimental.useCacheTimeout,
831
+ durableUseCacheEntries: Boolean(nextConfig.experimental.durableUseCacheEntries)
832
+ },
833
+ cacheComponents: Boolean(nextConfig.cacheComponents),
834
+ validationLevel: nextConfig.experimental.instantInsights.validationLevel,
835
+ isDraftMode,
836
+ incrementalCache,
837
+ hmrRefreshHash: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'hmrRefreshHash'),
838
+ cacheLifeProfiles: nextConfig.cacheLife,
839
+ staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,
840
+ waitUntil: ctx.waitUntil,
841
+ onClose: (cb)=>{
842
+ res.on('close', cb);
843
+ },
844
+ onAfterTaskError: undefined
845
+ },
846
+ sharedContext: {
847
+ buildId,
848
+ deploymentId
849
+ }
931
850
  };
932
- if (opts?.filename) ref.filename = safeDisplayName(opts.filename);
933
- if (shrunk.width) ref.width = shrunk.width;
934
- if (shrunk.height) ref.height = shrunk.height;
935
- return ref;
936
- }
937
- async function spillImagePart(part, opts) {
938
- return spillImageBuffer(Buffer.from(part.data, "base64"), part.media_type, opts);
939
- }
940
- async function spillFileBuffer(raw, media_type, filename) {
941
- const { name, sha256 } = await writeContentAddressedFile(raw, extForFile(media_type, filename));
942
- return {
943
- type: "file_ref",
944
- media_type,
945
- name,
946
- filename: safeDisplayName(filename),
947
- sha256,
948
- size: raw.length
851
+ const nodeNextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextRequest(req);
852
+ const nodeNextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextResponse(res);
853
+ const nextReq = next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__.NextRequestAdapter.fromNodeNextRequest(nodeNextReq, (0,next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__.signalFromNodeResponse)(res));
854
+ const responseGenerator = async ({ previousCacheEntry })=>{
855
+ try {
856
+ if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {
857
+ res.statusCode = 404;
858
+ // on-demand revalidate always sets this header
859
+ res.setHeader('x-nextjs-cache', 'REVALIDATED');
860
+ res.end('This page could not be found');
861
+ return null;
862
+ }
863
+ const response = cacheKey === null ? await routeModule.handle(nextReq, context) : await routeModule.prerender(nextReq, context);
864
+ req.fetchMetrics = context.renderOpts.fetchMetrics;
865
+ let pendingWaitUntil = context.renderOpts.pendingWaitUntil;
866
+ // Attempt using provided waitUntil if available
867
+ // if it's not we fallback to sendResponse's handling
868
+ if (pendingWaitUntil) {
869
+ if (ctx.waitUntil) {
870
+ ctx.waitUntil(pendingWaitUntil);
871
+ pendingWaitUntil = undefined;
872
+ }
873
+ }
874
+ const cacheTags = context.renderOpts.collectedTags;
875
+ // If the request is for a static response, we can cache it so long
876
+ // as it's not edge.
877
+ if (isIsr) {
878
+ const blob = await response.blob();
879
+ // Copy the headers from the response.
880
+ const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.toNodeOutgoingHttpHeaders)(response.headers);
881
+ if (cacheTags) {
882
+ headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER] = cacheTags;
883
+ }
884
+ if (!headers['content-type'] && blob.type) {
885
+ headers['content-type'] = blob.type;
886
+ }
887
+ const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;
888
+ const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? // route has a numeric `revalidate` but didn't declare an
889
+ // explicit `expire` (e.g. via `cacheLife`). This mirrors the
890
+ // build-time fallback in `build/index.ts` so cache entries
891
+ // and the response Cache-Control header agree on the route's
892
+ // effective expire. Routes that opt out of revalidation
893
+ // (`revalidate: false`) or that are dynamic (`revalidate: 0`)
894
+ // keep `expire: undefined`.
895
+ revalidate !== false && revalidate > 0 ? nextConfig.expireTime : undefined : context.renderOpts.collectedExpire;
896
+ // Create the cache entry for the response.
897
+ const cacheEntry = {
898
+ value: {
899
+ kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE,
900
+ status: response.status,
901
+ body: Buffer.from(await blob.arrayBuffer()),
902
+ headers
903
+ },
904
+ cacheControl: {
905
+ revalidate,
906
+ expire
907
+ }
908
+ };
909
+ return cacheEntry;
910
+ } else {
911
+ // send response without caching if not ISR
912
+ await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, response, pendingWaitUntil);
913
+ return null;
914
+ }
915
+ } catch (err) {
916
+ // if this is a background revalidate we need to report
917
+ // the request error here as it won't be bubbled
918
+ if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {
919
+ const silenceLog = false;
920
+ await routeModule.onRequestError(req, err, {
921
+ routerKind: 'App Router',
922
+ routePath: srcPage,
923
+ routeType: 'route',
924
+ revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
925
+ isStaticGeneration: cacheKey !== null,
926
+ isOnDemandRevalidate
927
+ })
928
+ }, silenceLog, routerServerContext);
929
+ }
930
+ throw err;
931
+ }
932
+ };
933
+ const handleResponse = async (currentSpan, parentSpan)=>{
934
+ try {
935
+ var _cacheEntry_value;
936
+ const cacheEntry = await routeModule.handleResponse({
937
+ req,
938
+ nextConfig,
939
+ cacheKey,
940
+ routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
941
+ isFallback: false,
942
+ previewProps,
943
+ prerenderManifest,
944
+ isRoutePPREnabled: false,
945
+ isOnDemandRevalidate,
946
+ revalidateOnlyGenerated,
947
+ responseGenerator,
948
+ waitUntil: ctx.waitUntil,
949
+ isMinimalMode
950
+ });
951
+ if (cacheEntry !== null && 'error' in cacheEntry) {
952
+ throw cacheEntry.error;
953
+ }
954
+ // we don't create a cacheEntry for ISR
955
+ if (!isIsr) {
956
+ return;
957
+ }
958
+ if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE) {
959
+ var _cacheEntry_value1;
960
+ throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
961
+ }
962
+ if (!isMinimalMode) {
963
+ res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
964
+ }
965
+ // Draft mode should never be cached
966
+ if (isDraftMode) {
967
+ res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
968
+ }
969
+ const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
970
+ if (!(isMinimalMode && isIsr)) {
971
+ headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
972
+ }
973
+ // If cache control is already set on the response we don't
974
+ // override it to allow users to customize it via next.config
975
+ if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
976
+ headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
977
+ }
978
+ await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.
979
+ new Response(cacheEntry.value.body, {
980
+ headers,
981
+ status: cacheEntry.value.status || 200
982
+ }));
983
+ return;
984
+ } catch (err) {
985
+ if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError)) {
986
+ const silenceLog = false;
987
+ await routeModule.onRequestError(req, err, {
988
+ routerKind: 'App Router',
989
+ routePath: normalizedSrcPage,
990
+ routeType: 'route',
991
+ revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
992
+ isStaticGeneration: cacheKey !== null,
993
+ isOnDemandRevalidate
994
+ })
995
+ }, silenceLog, routerServerContext);
996
+ }
997
+ // rethrow so that we can handle serving error page
998
+ // If this is during static generation, throw the error again.
999
+ if (isIsr) throw err;
1000
+ // Otherwise, send a 500 response unless the original response has
1001
+ // already committed. In that case, preserve its status code for
1002
+ // telemetry while still recording the failure and terminating a response
1003
+ // that the failed pipeline left open.
1004
+ if (res.headersSent) {
1005
+ if (currentSpan) {
1006
+ const error = err instanceof Error ? err : new Error('Unknown app route error');
1007
+ currentSpan.recordException(error);
1008
+ currentSpan.setStatus({
1009
+ code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR,
1010
+ message: error.message
1011
+ });
1012
+ currentSpan.setAttribute('error.type', error.name);
1013
+ }
1014
+ if (!res.writableEnded && !res.destroyed) {
1015
+ res.end();
1016
+ }
1017
+ } else {
1018
+ await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
1019
+ status: 500
1020
+ }));
1021
+ }
1022
+ return;
1023
+ } finally{
1024
+ ;
1025
+ (()=>{
1026
+ if (!currentSpan) {
1027
+ return;
1028
+ }
1029
+ let statusCode = res.statusCode;
1030
+ currentSpan.setAttributes({
1031
+ 'http.status_code': statusCode,
1032
+ 'next.rsc': false
1033
+ });
1034
+ if (statusCode && statusCode >= 500) {
1035
+ // For 5xx status codes: SHOULD be set to 'Error' span status.
1036
+ // x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
1037
+ currentSpan.setStatus({
1038
+ code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
1039
+ });
1040
+ // For span status 'Error', SHOULD set 'error.type' attribute.
1041
+ currentSpan.setAttribute('error.type', statusCode.toString());
1042
+ }
1043
+ const rootSpanAttributes = tracer.getRootSpanAttributes();
1044
+ // We were unable to get attributes, probably OTEL is not enabled
1045
+ if (!rootSpanAttributes) {
1046
+ return;
1047
+ }
1048
+ if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
1049
+ console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
1050
+ return;
1051
+ }
1052
+ const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
1053
+ const name = `${method} ${route}`;
1054
+ currentSpan.setAttributes({
1055
+ 'next.route': route,
1056
+ 'http.route': route,
1057
+ 'next.span_name': name
1058
+ });
1059
+ currentSpan.updateName(name);
1060
+ // Propagate http.route to the parent span if one exists (e.g.
1061
+ // a platform-created HTTP span in adapter deployments).
1062
+ if (parentSpan && parentSpan !== currentSpan) {
1063
+ parentSpan.setAttribute('http.route', route);
1064
+ parentSpan.updateName(name);
1065
+ }
1066
+ })();
1067
+ }
949
1068
  };
950
- }
951
- /**
952
- * Walk a ContentPart[] and replace every inline `image`/`file` part with an
953
- * `image_ref`/`file_ref`. Leaves other part types untouched. Safe to call on
954
- * already-refactored parts — the ref variants are passed through.
955
- * Returns a new array (does not mutate the input).
956
- *
957
- * `file.data` is plain UTF-8 text for text/json attachments (the InputBar
958
- * client reads text/code files with `readAsText`, never base64) and base64
959
- * otherwise, mirroring the decode convention already used to render `file`
960
- * parts in lib/agents/llm.ts and the provider adapters.
961
- */ async function spillAttachments(parts, opts) {
962
- const out = [];
963
- for (const p of parts){
964
- if (p.type === "image") out.push(await spillImagePart(p, opts));
965
- else if (p.type === "file") {
966
- const buf = isTextMediaType(p.media_type) ? Buffer.from(p.data, "utf8") : Buffer.from(p.data, "base64");
967
- out.push(await spillFileBuffer(buf, p.media_type, p.name));
968
- } else out.push(p);
969
- }
970
- return out;
971
- }
972
- /**
973
- * Read an `image_ref` back off disk as raw bytes. Used at LLM invocation
974
- * time (see `toBaseMessages` in `lib/agents/llm.ts`) — the base64
975
- * re-encoding lives on the provider block only, never in state.
976
- * Throws when the file is missing so the caller can surface a clear error
977
- * to the user instead of the provider returning a puzzling 400.
978
- */ async function readImageRef(ref) {
979
- if (!(0,files/* isSafeFileName */.Dh)(ref.name)) {
980
- throw new Error(`readImageRef: unsafe file name ${ref.name}`);
981
- }
982
- const abs = (0,external_node_path_.join)(files/* FILES_DIR */.qM, ref.name);
983
- return external_node_fs_.promises.readFile(abs);
984
- }
985
- /**
986
- * Read a `file_ref` back off disk as raw bytes. Same shape as
987
- * `readImageRef` — used both for the newest turn's full readout and for
988
- * the `view_attachment` tool's on-demand re-read (ADR-0090).
989
- */ async function readFileRef(ref) {
990
- if (!(0,files/* isSafeFileName */.Dh)(ref.name)) {
991
- throw new Error(`readFileRef: unsafe file name ${ref.name}`);
1069
+ // TODO: activeSpan code path is for when wrapped by
1070
+ // next-server can be removed when this is no longer used
1071
+ if (isWrappedByNextServer && activeSpan) {
1072
+ await handleResponse(activeSpan, undefined);
1073
+ } else {
1074
+ let parentSpan = tracer.getActiveScopeSpan();
1075
+ await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest, {
1076
+ spanName: `${method} ${srcPage}`,
1077
+ kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanKind.SERVER,
1078
+ attributes: {
1079
+ 'http.method': method,
1080
+ 'http.target': req.url
1081
+ }
1082
+ }, (span)=>handleResponse(span, parentSpan)), undefined, !isWrappedByNextServer);
992
1083
  }
993
- const abs = (0,external_node_path_.join)(files/* FILES_DIR */.qM, ref.name);
994
- return external_node_fs_.promises.readFile(abs);
995
1084
  }
996
1085
 
1086
+ //# sourceMappingURL=app-route.js.map
997
1087
 
998
- /***/ }),
999
-
1000
- /***/ 63033:
1001
- /***/ ((module) => {
1002
-
1003
- module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
1004
-
1005
- /***/ }),
1006
-
1007
- /***/ 73024:
1008
- /***/ ((module) => {
1009
-
1010
- module.exports = require("node:fs");
1011
-
1012
- /***/ }),
1013
-
1014
- /***/ 74075:
1015
- /***/ ((module) => {
1016
-
1017
- module.exports = require("zlib");
1018
-
1019
- /***/ }),
1020
-
1021
- /***/ 75919:
1022
- /***/ ((module) => {
1023
-
1024
- module.exports = require("node:worker_threads");
1025
-
1026
- /***/ }),
1027
-
1028
- /***/ 76760:
1029
- /***/ ((module) => {
1030
-
1031
- module.exports = require("node:path");
1032
-
1033
- /***/ }),
1034
-
1035
- /***/ 77598:
1036
- /***/ ((module) => {
1037
-
1038
- module.exports = require("node:crypto");
1039
-
1040
- /***/ }),
1041
-
1042
- /***/ 79428:
1043
- /***/ ((module) => {
1044
-
1045
- module.exports = require("buffer");
1046
-
1047
- /***/ }),
1048
-
1049
- /***/ 80099:
1050
- /***/ ((module) => {
1051
-
1052
- module.exports = require("node:sqlite");
1053
-
1054
- /***/ }),
1055
-
1056
- /***/ 80481:
1057
- /***/ ((module) => {
1058
-
1059
- module.exports = require("node:readline");
1060
-
1061
- /***/ }),
1062
-
1063
- /***/ 81630:
1064
- /***/ ((module) => {
1065
-
1066
- module.exports = require("http");
1067
-
1068
- /***/ }),
1069
-
1070
- /***/ 86439:
1071
- /***/ ((module) => {
1072
-
1073
- module.exports = require("next/dist/shared/lib/no-fallback-error.external");
1074
-
1075
- /***/ }),
1076
-
1077
- /***/ 94735:
1078
- /***/ ((module) => {
1079
-
1080
- module.exports = require("events");
1081
-
1082
- /***/ }),
1083
-
1084
- /***/ 99253:
1085
- /***/ ((module) => {
1086
-
1087
- module.exports = import("@huggingface/transformers");;
1088
1088
 
1089
1089
  /***/ })
1090
1090
 
@@ -1095,7 +1095,7 @@ module.exports = import("@huggingface/transformers");;
1095
1095
  var __webpack_require__ = require("../../../../../webpack-runtime.js");
1096
1096
  __webpack_require__.C(exports);
1097
1097
  var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
1098
- var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,1813,7981,4992,46,4540], () => (__webpack_exec__(20769)));
1098
+ var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,1813,7981,4992,46,4540], () => (__webpack_exec__(99867)));
1099
1099
  module.exports = __webpack_exports__;
1100
1100
 
1101
1101
  })();