@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
@@ -68,762 +68,318 @@ module.exports = require("next/dist/server/app-render/action-async-storage.exter
68
68
 
69
69
  /***/ }),
70
70
 
71
- /***/ 27823:
72
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
71
+ /***/ 27910:
72
+ /***/ ((module) => {
73
73
 
74
- __webpack_require__.r(__webpack_exports__);
75
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
76
- /* harmony export */ handler: () => (/* binding */ handler),
77
- /* harmony export */ patchFetch: () => (/* binding */ patchFetch),
78
- /* harmony export */ routeModule: () => (/* binding */ routeModule),
79
- /* harmony export */ serverHooks: () => (/* binding */ serverHooks),
80
- /* harmony export */ workAsyncStorage: () => (/* binding */ workAsyncStorage),
81
- /* harmony export */ workUnitAsyncStorage: () => (/* binding */ workUnitAsyncStorage)
82
- /* harmony export */ });
83
- /* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19225);
84
- /* 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__);
85
- /* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84006);
86
- /* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8317);
87
- /* 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__);
88
- /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99373);
89
- /* 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__);
90
- /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34775);
91
- /* 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__);
92
- /* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24235);
93
- /* 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__);
94
- /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(261);
95
- /* 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__);
96
- /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(54365);
97
- /* 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__);
98
- /* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90771);
99
- /* 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__);
100
- /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(73461);
101
- /* 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__);
102
- /* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67798);
103
- /* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(92280);
104
- /* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(62018);
105
- /* 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__);
106
- /* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(45696);
107
- /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(47929);
108
- /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
109
- /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(86439);
110
- /* 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__);
111
- /* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(10246);
112
- /* 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__);
113
- /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(37527);
114
- /* 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__);
74
+ module.exports = require("stream");
75
+
76
+ /***/ }),
77
+
78
+ /***/ 28354:
79
+ /***/ ((module) => {
80
+
81
+ module.exports = require("util");
115
82
 
83
+ /***/ }),
84
+
85
+ /***/ 29021:
86
+ /***/ ((module) => {
116
87
 
88
+ module.exports = require("fs");
117
89
 
90
+ /***/ }),
118
91
 
92
+ /***/ 29294:
93
+ /***/ ((module) => {
119
94
 
95
+ module.exports = require("next/dist/server/app-render/work-async-storage.external.js");
120
96
 
97
+ /***/ }),
121
98
 
99
+ /***/ 31421:
100
+ /***/ ((module) => {
122
101
 
102
+ module.exports = require("node:child_process");
123
103
 
104
+ /***/ }),
124
105
 
106
+ /***/ 33873:
107
+ /***/ ((module) => {
125
108
 
109
+ module.exports = require("path");
126
110
 
111
+ /***/ }),
127
112
 
113
+ /***/ 36766:
114
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
128
115
 
116
+ __webpack_require__.r(__webpack_exports__);
117
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
118
+ /* harmony export */ GET: () => (/* binding */ GET),
119
+ /* harmony export */ POST: () => (/* binding */ POST)
120
+ /* harmony export */ });
121
+ /* harmony import */ var next_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
122
+ /* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(97377);
123
+ /* harmony import */ var _lib_stores_threads__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83042);
124
+ /* harmony import */ var _lib_stores_agent_configs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41720);
125
+ /* harmony import */ var _lib_api_responses__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(39947);
126
+ /**
127
+ * @public — `GET /api/v1/threads` (list), `POST /api/v1/threads` (create)
128
+ *
129
+ * Thread lifecycle. Threads are the unit of conversation history; every
130
+ * agent run lives inside one. See `docs/api.md`.
131
+ */
129
132
 
130
133
 
131
134
 
132
135
 
133
- // We inject the nextConfigOutput here so that we can use them in the route
134
- // module.
135
- const nextConfigOutput = "standalone"
136
- const routeModule = new next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppRouteRouteModule({
137
- definition: {
138
- kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
139
- page: "/api/v1/threads/route",
140
- pathname: "/api/v1/threads",
141
- filename: "route",
142
- bundlePath: "app/api/v1/threads/route"
143
- },
144
- distDir: ".next" || 0,
145
- relativeProjectDir: false || '',
146
- resolvedPagePath: "/home/runner/work/jarela/jarela/app/api/v1/threads/route.ts",
147
- nextConfigOutput,
148
- // The lazy require factory ensures that:
149
- // - In dev: devRequestTimingInternalsEnd is set before userland executes,
150
- // correctly attributing module load time to application-code rather than
151
- // framework internals.
152
- // - In all modes: async modules (route files with top-level await) are
153
- // handled correctly — require() returns a Promise for such modules, which
154
- // ensureUserland() awaits before the first request is handled.
155
- userland: ()=>__webpack_require__(36766),
156
- // In Turbopack dev mode, also provide a synchronous per-request getter so
157
- // server HMR updates are picked up without re-executing the entry chunk.
158
- // Using require() (synchronous) avoids adding async overhead that would be
159
- // incorrectly attributed to application-code time in devRequestTiming.
160
- ... false ? 0 : {}
136
+ const CreateBody = zod__WEBPACK_IMPORTED_MODULE_4__/* .object */ .Ikc({
137
+ agent_id: zod__WEBPACK_IMPORTED_MODULE_4__/* .string */ .YjP().min(1, "agent_id required"),
138
+ title: zod__WEBPACK_IMPORTED_MODULE_4__/* .string */ .YjP().optional()
161
139
  });
162
- // Pull out the exports that we need to expose from the module. This should
163
- // be eliminated when we've moved the other routes to the new format. These
164
- // are used to hook into the route.
165
- const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
166
- function patchFetch() {
167
- return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
168
- workAsyncStorage,
169
- workUnitAsyncStorage
170
- });
140
+ function GET(req) {
141
+ const { searchParams } = req.nextUrl;
142
+ const limit = Number(searchParams.get("limit") ?? 50);
143
+ const offset = Number(searchParams.get("offset") ?? 0);
144
+ return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json((0,_lib_stores_threads__WEBPACK_IMPORTED_MODULE_1__/* .listThreads */ .Mi)(limit, offset));
145
+ }
146
+ async function POST(req) {
147
+ const body = await (0,_lib_api_responses__WEBPACK_IMPORTED_MODULE_3__/* .validateBody */ .Jb)(req, CreateBody);
148
+ if (body instanceof next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse) return body;
149
+ if (!(0,_lib_stores_agent_configs__WEBPACK_IMPORTED_MODULE_2__/* .getAgentConfig */ .mJ)(body.agent_id)) return (0,_lib_api_responses__WEBPACK_IMPORTED_MODULE_3__/* .notFoundResponse */ .HN)(`Agent "${body.agent_id}" not found`);
150
+ const thread = (0,_lib_stores_threads__WEBPACK_IMPORTED_MODULE_1__/* .createThread */ .Nw)(body.agent_id, body.title);
151
+ return (0,_lib_api_responses__WEBPACK_IMPORTED_MODULE_3__/* .createdResponse */ .K2)(thread);
171
152
  }
172
153
 
173
- async function handler(req, res, ctx) {
174
- if (ctx.requestMeta) {
175
- (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.setRequestMeta)(req, ctx.requestMeta);
176
- }
177
- if (routeModule.isDev) {
178
- (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.addRequestMeta)(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());
179
- }
180
- let srcPage = "/api/v1/threads/route";
181
- // turbopack doesn't normalize `/index` in the page name
182
- // so we need to to process dynamic routes properly
183
- // TODO: fix turbopack providing differing value from webpack
184
- if (false) {} else if (srcPage === '/index') {
185
- // we always normalize /index specifically
186
- srcPage = '/';
187
- }
188
- const multiZoneDraftMode = false;
189
- const prepareResult = await routeModule.prepare(req, res, {
190
- srcPage,
191
- multiZoneDraftMode
154
+
155
+ /***/ }),
156
+
157
+ /***/ 37067:
158
+ /***/ ((module) => {
159
+
160
+ module.exports = require("node:http");
161
+
162
+ /***/ }),
163
+
164
+ /***/ 38522:
165
+ /***/ ((module) => {
166
+
167
+ module.exports = require("node:zlib");
168
+
169
+ /***/ }),
170
+
171
+ /***/ 39947:
172
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
173
+
174
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
175
+ /* harmony export */ Bm: () => (/* binding */ cachedJson),
176
+ /* harmony export */ HN: () => (/* binding */ notFoundResponse),
177
+ /* harmony export */ Jb: () => (/* binding */ validateBody),
178
+ /* harmony export */ K2: () => (/* binding */ createdResponse),
179
+ /* harmony export */ Ng: () => (/* binding */ noStoreJson),
180
+ /* harmony export */ yj: () => (/* binding */ errorResponse)
181
+ /* harmony export */ });
182
+ /* harmony import */ var next_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
183
+ // Shared HTTP response builders for app/api/v1/** route handlers.
184
+ //
185
+ // Goal: every error/success payload across the v1 surface has the same
186
+ // shape. Before this lived inline, response bodies drifted —
187
+ // `{error: "x"}` vs `{message: "x"}`, 400 vs 422 for the same condition,
188
+ // some routes returned Zod's raw issue array, others stringified it.
189
+
190
+ function errorResponse(message, status = 400) {
191
+ return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json({
192
+ error: message
193
+ }, {
194
+ status
192
195
  });
193
- if (!prepareResult) {
194
- res.statusCode = 400;
195
- res.end('Bad Request');
196
- ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());
197
- return null;
198
- }
199
- const { buildId, deploymentId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest, previewProps } = prepareResult;
200
- const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__.normalizeAppPath)(srcPage);
201
- // Only this route's prerenders can establish ISR or admit generated params.
202
- 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]));
203
- let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || isPrerendered);
204
- const render404 = async ()=>{
205
- // TODO: should route-module itself handle rendering the 404
206
- if (routerServerContext == null ? void 0 : routerServerContext.render404) {
207
- await routerServerContext.render404(req, res, parsedUrl, false);
208
- } else {
209
- res.end('This page could not be found');
210
- }
211
- return null;
212
- };
213
- if (isIsr && !isDraftMode) {
214
- const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];
215
- if (prerenderInfo) {
216
- if (prerenderInfo.fallback === false && !isPrerendered) {
217
- if (nextConfig.adapterPath) {
218
- return await render404();
219
- }
220
- throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError();
221
- }
196
+ }
197
+ function notFoundResponse(message = "Not found") {
198
+ return errorResponse(message, 404);
199
+ }
200
+ function createdResponse(data) {
201
+ return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json(data, {
202
+ status: 201
203
+ });
204
+ }
205
+ // Wrap a 200 JSON response with a private Cache-Control header. Use on safe
206
+ // GET endpoints that serve user-scoped data the client refetches often (panel
207
+ // mounts, navigation back/forward) but mutates rarely. The TTL is short
208
+ // enough that explicit mutations — which patch the client-side ApiClient
209
+ // cache in place — stay observably consistent without an extra roundtrip.
210
+ //
211
+ // swrSeconds (optional): stale-while-revalidate window. When set, the browser
212
+ // serves the cached response immediately and refreshes in the background,
213
+ // making navigation feel instant. Use for data that can tolerate brief
214
+ // staleness (tool list, agent configs, model list). Omit for real-time data
215
+ // (dashboard metrics, credential state).
216
+ function cachedJson(data, maxAgeSeconds, swrSeconds) {
217
+ const swr = swrSeconds ? `, stale-while-revalidate=${swrSeconds}` : "";
218
+ return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json(data, {
219
+ headers: {
220
+ "Cache-Control": `private, max-age=${maxAgeSeconds}${swr}`
222
221
  }
222
+ });
223
+ }
224
+ // Use for endpoints whose response contains live state that must never be
225
+ // served from cache — credentials, connection status, live config values.
226
+ function noStoreJson(data) {
227
+ return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json(data, {
228
+ headers: {
229
+ "Cache-Control": "no-store"
230
+ }
231
+ });
232
+ }
233
+ // Validate a JSON request body against a zod schema.
234
+ // Returns either the parsed data or a 400 NextResponse explaining the issue.
235
+ // Caller pattern:
236
+ // const parsed = await validateBody(req, Schema);
237
+ // if (parsed instanceof NextResponse) return parsed;
238
+ // // use parsed.field
239
+ async function validateBody(req, schema) {
240
+ let raw;
241
+ try {
242
+ raw = await req.json();
243
+ } catch {
244
+ return errorResponse("Request body must be valid JSON", 400);
223
245
  }
224
- let cacheKey = null;
225
- if (isIsr && !routeModule.isDev && !isDraftMode) {
226
- cacheKey = resolvedPathname;
227
- // ensure /index and / is normalized to one key
228
- cacheKey = cacheKey === '/index' ? '/' : cacheKey;
229
- }
230
- // Before rendering (which initializes component tree modules), we have to
231
- // set the reference manifests to our global store so Server Action's
232
- // encryption util can access to them at the top level of the page module.
233
- if (serverActionsManifest && clientReferenceManifest) {
234
- (0,next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__.setManifestsSingleton)({
235
- page: srcPage,
236
- clientReferenceManifest,
237
- serverActionsManifest
238
- });
246
+ const parsed = schema.safeParse(raw);
247
+ if (!parsed.success) {
248
+ return errorResponse(parsed.error.issues[0]?.message ?? "invalid body", 400);
239
249
  }
240
- const method = req.method || 'GET';
241
- const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)();
242
- const activeSpan = tracer.getActiveScopeSpan();
243
- const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);
244
- const isMinimalMode = Boolean((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'minimalMode'));
245
- const incrementalCache = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, previewProps, prerenderManifest, isMinimalMode);
246
- incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();
247
- globalThis.__incrementalCache = incrementalCache;
248
- const context = {
249
- params,
250
- previewProps,
251
- renderOpts: {
252
- experimental: {
253
- authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
254
- useCacheTimeout: nextConfig.experimental.useCacheTimeout,
255
- durableUseCacheEntries: Boolean(nextConfig.experimental.durableUseCacheEntries)
256
- },
257
- cacheComponents: Boolean(nextConfig.cacheComponents),
258
- validationLevel: nextConfig.experimental.instantInsights.validationLevel,
259
- isDraftMode,
260
- incrementalCache,
261
- hmrRefreshHash: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'hmrRefreshHash'),
262
- cacheLifeProfiles: nextConfig.cacheLife,
263
- staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,
264
- waitUntil: ctx.waitUntil,
265
- onClose: (cb)=>{
266
- res.on('close', cb);
267
- },
268
- onAfterTaskError: undefined
269
- },
270
- sharedContext: {
271
- buildId,
272
- deploymentId
250
+ return parsed.data;
251
+ }
252
+
253
+
254
+ /***/ }),
255
+
256
+ /***/ 41720:
257
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
258
+
259
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
260
+ /* harmony export */ BM: () => (/* binding */ upsertAgentConfig),
261
+ /* harmony export */ E1: () => (/* binding */ updateAgentDisplayFilters),
262
+ /* harmony export */ P2: () => (/* binding */ parseCitationStrictness),
263
+ /* harmony export */ S2: () => (/* binding */ getAgentToolCredentials),
264
+ /* harmony export */ SJ: () => (/* binding */ generateAgentId),
265
+ /* harmony export */ TG: () => (/* binding */ getAgentTools),
266
+ /* harmony export */ bg: () => (/* binding */ parseDelegateTargets),
267
+ /* harmony export */ d2: () => (/* binding */ DISPLAY_FILTER_KEYS),
268
+ /* harmony export */ fg: () => (/* binding */ getAgentTierProportions),
269
+ /* harmony export */ mJ: () => (/* binding */ getAgentConfig),
270
+ /* harmony export */ nV: () => (/* binding */ getAgentDisplayFilters),
271
+ /* harmony export */ vU: () => (/* binding */ getDefaultAgentConfig),
272
+ /* harmony export */ vi: () => (/* binding */ DISPLAY_FILTER_DEFAULTS),
273
+ /* harmony export */ xi: () => (/* binding */ deleteAgentConfig),
274
+ /* harmony export */ zb: () => (/* binding */ listAgentConfigs)
275
+ /* harmony export */ });
276
+ /* harmony import */ var _lib_db__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(46);
277
+ /* harmony import */ var _lib_db_transaction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(99043);
278
+ /* harmony import */ var _lib_agents_adaptive_persona_presets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(66849);
279
+
280
+
281
+
282
+ const now = ()=>new Date().toISOString();
283
+ /** Coerce arbitrary input (DB row TEXT, API body, undefined) to the enum.
284
+ * Returns `null` for null/undefined/unknown values so callers can default. */ function parseCitationStrictness(value) {
285
+ if (value === "off" || value === "informational" || value === "standard" || value === "strict") {
286
+ return value;
287
+ }
288
+ return null;
289
+ }
290
+ /**
291
+ * Parse the JSON-encoded per-agent override of context tier proportions.
292
+ * Returns `null` for NULL, blank, malformed JSON, or any payload that
293
+ * doesn't have three finite non-negative numeric fields. Callers fall
294
+ * back to the model config's value (or built-in defaults) on null.
295
+ */ function getAgentTierProportions(row) {
296
+ const raw = row.context_tier_proportions;
297
+ if (!raw) return null;
298
+ try {
299
+ const parsed = JSON.parse(raw);
300
+ const hot = Number(parsed.hot);
301
+ const warm = Number(parsed.warm);
302
+ const facts = Number(parsed.facts);
303
+ if (![
304
+ hot,
305
+ warm,
306
+ facts
307
+ ].every((n)=>Number.isFinite(n) && n >= 0)) return null;
308
+ if (hot + warm + facts <= 0) return null;
309
+ return {
310
+ hot,
311
+ warm,
312
+ facts
313
+ };
314
+ } catch {
315
+ return null;
316
+ }
317
+ }
318
+ function listAgentConfigs() {
319
+ // Default agent always first; then by the timestamp of each agent's latest message.
320
+ return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare(`SELECT a.*
321
+ FROM agent_configs a
322
+ LEFT JOIN (
323
+ SELECT t.agent_id, MAX(m.created_at) AS last_message_at
324
+ FROM threads t
325
+ JOIN messages m ON m.thread_id = t.thread_id
326
+ GROUP BY t.agent_id
327
+ ) latest ON latest.agent_id = a.id
328
+ ORDER BY a.is_default DESC, COALESCE(latest.last_message_at, a.created_at) DESC, a.id ASC`).all();
329
+ }
330
+ function getDefaultAgentConfig() {
331
+ return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("SELECT * FROM agent_configs WHERE is_default=1 LIMIT 1").get() ?? null;
332
+ }
333
+ function getAgentConfig(id) {
334
+ return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("SELECT * FROM agent_configs WHERE id=?").get(id) ?? null;
335
+ }
336
+ /**
337
+ * Parse the JSON-encoded delegate whitelist into a deduped string[]. Returns
338
+ * an empty array for NULL, blank, or malformed JSON (delegation is opt-in).
339
+ */ /**
340
+ * Parse the agent's tool allowlist (`tools` column, stored as a JSON string).
341
+ * Returns an empty array on NULL/blank/malformed JSON — same defensive shape
342
+ * as parseDelegateTargets. Callers that previously did `JSON.parse(cfg.tools)`
343
+ * inline should switch to this getter so the serialization contract stays
344
+ * owned by this store.
345
+ */ function getAgentTools(cfg) {
346
+ if (!cfg?.tools) return [];
347
+ try {
348
+ const parsed = JSON.parse(cfg.tools);
349
+ if (!Array.isArray(parsed)) return [];
350
+ return parsed.filter((x)=>typeof x === "string" && x.length > 0);
351
+ } catch {
352
+ return [];
353
+ }
354
+ }
355
+ function parseDelegateTargets(raw) {
356
+ if (!raw) return [];
357
+ try {
358
+ const parsed = JSON.parse(raw);
359
+ if (!Array.isArray(parsed)) return [];
360
+ const ids = parsed.filter((x)=>typeof x === "string" && x.length > 0);
361
+ return Array.from(new Set(ids));
362
+ } catch {
363
+ return [];
364
+ }
365
+ }
366
+ /**
367
+ * Parse the per-agent `{ toolName: credentialId }` override map stored in
368
+ * the `tool_credentials` column. Returns an empty record on NULL / blank /
369
+ * malformed JSON / non-string entries so downstream code can treat the
370
+ * result as a plain lookup without further validation.
371
+ */ function getAgentToolCredentials(cfg) {
372
+ if (!cfg?.tool_credentials) return {};
373
+ try {
374
+ const parsed = JSON.parse(cfg.tool_credentials);
375
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return {};
376
+ const out = {};
377
+ for (const [k, v] of Object.entries(parsed)){
378
+ if (typeof v === "string" && v.length > 0) out[k] = v;
273
379
  }
274
- };
275
- const nodeNextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextRequest(req);
276
- const nodeNextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextResponse(res);
277
- 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));
278
- const responseGenerator = async ({ previousCacheEntry })=>{
279
- try {
280
- if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {
281
- res.statusCode = 404;
282
- // on-demand revalidate always sets this header
283
- res.setHeader('x-nextjs-cache', 'REVALIDATED');
284
- res.end('This page could not be found');
285
- return null;
286
- }
287
- const response = cacheKey === null ? await routeModule.handle(nextReq, context) : await routeModule.prerender(nextReq, context);
288
- req.fetchMetrics = context.renderOpts.fetchMetrics;
289
- let pendingWaitUntil = context.renderOpts.pendingWaitUntil;
290
- // Attempt using provided waitUntil if available
291
- // if it's not we fallback to sendResponse's handling
292
- if (pendingWaitUntil) {
293
- if (ctx.waitUntil) {
294
- ctx.waitUntil(pendingWaitUntil);
295
- pendingWaitUntil = undefined;
296
- }
297
- }
298
- const cacheTags = context.renderOpts.collectedTags;
299
- // If the request is for a static response, we can cache it so long
300
- // as it's not edge.
301
- if (isIsr) {
302
- const blob = await response.blob();
303
- // Copy the headers from the response.
304
- const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.toNodeOutgoingHttpHeaders)(response.headers);
305
- if (cacheTags) {
306
- headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER] = cacheTags;
307
- }
308
- if (!headers['content-type'] && blob.type) {
309
- headers['content-type'] = blob.type;
310
- }
311
- const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;
312
- 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
313
- // explicit `expire` (e.g. via `cacheLife`). This mirrors the
314
- // build-time fallback in `build/index.ts` so cache entries
315
- // and the response Cache-Control header agree on the route's
316
- // effective expire. Routes that opt out of revalidation
317
- // (`revalidate: false`) or that are dynamic (`revalidate: 0`)
318
- // keep `expire: undefined`.
319
- revalidate !== false && revalidate > 0 ? nextConfig.expireTime : undefined : context.renderOpts.collectedExpire;
320
- // Create the cache entry for the response.
321
- const cacheEntry = {
322
- value: {
323
- kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE,
324
- status: response.status,
325
- body: Buffer.from(await blob.arrayBuffer()),
326
- headers
327
- },
328
- cacheControl: {
329
- revalidate,
330
- expire
331
- }
332
- };
333
- return cacheEntry;
334
- } else {
335
- // send response without caching if not ISR
336
- await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, response, pendingWaitUntil);
337
- return null;
338
- }
339
- } catch (err) {
340
- // if this is a background revalidate we need to report
341
- // the request error here as it won't be bubbled
342
- if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {
343
- const silenceLog = false;
344
- await routeModule.onRequestError(req, err, {
345
- routerKind: 'App Router',
346
- routePath: srcPage,
347
- routeType: 'route',
348
- revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
349
- isStaticGeneration: cacheKey !== null,
350
- isOnDemandRevalidate
351
- })
352
- }, silenceLog, routerServerContext);
353
- }
354
- throw err;
355
- }
356
- };
357
- const handleResponse = async (currentSpan, parentSpan)=>{
358
- try {
359
- var _cacheEntry_value;
360
- const cacheEntry = await routeModule.handleResponse({
361
- req,
362
- nextConfig,
363
- cacheKey,
364
- routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
365
- isFallback: false,
366
- previewProps,
367
- prerenderManifest,
368
- isRoutePPREnabled: false,
369
- isOnDemandRevalidate,
370
- revalidateOnlyGenerated,
371
- responseGenerator,
372
- waitUntil: ctx.waitUntil,
373
- isMinimalMode
374
- });
375
- if (cacheEntry !== null && 'error' in cacheEntry) {
376
- throw cacheEntry.error;
377
- }
378
- // we don't create a cacheEntry for ISR
379
- if (!isIsr) {
380
- return;
381
- }
382
- 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) {
383
- var _cacheEntry_value1;
384
- throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
385
- }
386
- if (!isMinimalMode) {
387
- res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
388
- }
389
- // Draft mode should never be cached
390
- if (isDraftMode) {
391
- res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
392
- }
393
- const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
394
- if (!(isMinimalMode && isIsr)) {
395
- headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
396
- }
397
- // If cache control is already set on the response we don't
398
- // override it to allow users to customize it via next.config
399
- if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
400
- headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
401
- }
402
- 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'.
403
- new Response(cacheEntry.value.body, {
404
- headers,
405
- status: cacheEntry.value.status || 200
406
- }));
407
- return;
408
- } catch (err) {
409
- if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError)) {
410
- const silenceLog = false;
411
- await routeModule.onRequestError(req, err, {
412
- routerKind: 'App Router',
413
- routePath: normalizedSrcPage,
414
- routeType: 'route',
415
- revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
416
- isStaticGeneration: cacheKey !== null,
417
- isOnDemandRevalidate
418
- })
419
- }, silenceLog, routerServerContext);
420
- }
421
- // rethrow so that we can handle serving error page
422
- // If this is during static generation, throw the error again.
423
- if (isIsr) throw err;
424
- // Otherwise, send a 500 response unless the original response has
425
- // already committed. In that case, preserve its status code for
426
- // telemetry while still recording the failure and terminating a response
427
- // that the failed pipeline left open.
428
- if (res.headersSent) {
429
- if (currentSpan) {
430
- const error = err instanceof Error ? err : new Error('Unknown app route error');
431
- currentSpan.recordException(error);
432
- currentSpan.setStatus({
433
- code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR,
434
- message: error.message
435
- });
436
- currentSpan.setAttribute('error.type', error.name);
437
- }
438
- if (!res.writableEnded && !res.destroyed) {
439
- res.end();
440
- }
441
- } else {
442
- await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
443
- status: 500
444
- }));
445
- }
446
- return;
447
- } finally{
448
- ;
449
- (()=>{
450
- if (!currentSpan) {
451
- return;
452
- }
453
- let statusCode = res.statusCode;
454
- currentSpan.setAttributes({
455
- 'http.status_code': statusCode,
456
- 'next.rsc': false
457
- });
458
- if (statusCode && statusCode >= 500) {
459
- // For 5xx status codes: SHOULD be set to 'Error' span status.
460
- // x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
461
- currentSpan.setStatus({
462
- code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
463
- });
464
- // For span status 'Error', SHOULD set 'error.type' attribute.
465
- currentSpan.setAttribute('error.type', statusCode.toString());
466
- }
467
- const rootSpanAttributes = tracer.getRootSpanAttributes();
468
- // We were unable to get attributes, probably OTEL is not enabled
469
- if (!rootSpanAttributes) {
470
- return;
471
- }
472
- if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
473
- console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
474
- return;
475
- }
476
- const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
477
- const name = `${method} ${route}`;
478
- currentSpan.setAttributes({
479
- 'next.route': route,
480
- 'http.route': route,
481
- 'next.span_name': name
482
- });
483
- currentSpan.updateName(name);
484
- // Propagate http.route to the parent span if one exists (e.g.
485
- // a platform-created HTTP span in adapter deployments).
486
- if (parentSpan && parentSpan !== currentSpan) {
487
- parentSpan.setAttribute('http.route', route);
488
- parentSpan.updateName(name);
489
- }
490
- })();
491
- }
492
- };
493
- // TODO: activeSpan code path is for when wrapped by
494
- // next-server can be removed when this is no longer used
495
- if (isWrappedByNextServer && activeSpan) {
496
- await handleResponse(activeSpan, undefined);
497
- } else {
498
- let parentSpan = tracer.getActiveScopeSpan();
499
- await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest, {
500
- spanName: `${method} ${srcPage}`,
501
- kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanKind.SERVER,
502
- attributes: {
503
- 'http.method': method,
504
- 'http.target': req.url
505
- }
506
- }, (span)=>handleResponse(span, parentSpan)), undefined, !isWrappedByNextServer);
507
- }
508
- }
509
-
510
- //# sourceMappingURL=app-route.js.map
511
-
512
-
513
- /***/ }),
514
-
515
- /***/ 27910:
516
- /***/ ((module) => {
517
-
518
- module.exports = require("stream");
519
-
520
- /***/ }),
521
-
522
- /***/ 28354:
523
- /***/ ((module) => {
524
-
525
- module.exports = require("util");
526
-
527
- /***/ }),
528
-
529
- /***/ 29021:
530
- /***/ ((module) => {
531
-
532
- module.exports = require("fs");
533
-
534
- /***/ }),
535
-
536
- /***/ 29294:
537
- /***/ ((module) => {
538
-
539
- module.exports = require("next/dist/server/app-render/work-async-storage.external.js");
540
-
541
- /***/ }),
542
-
543
- /***/ 31421:
544
- /***/ ((module) => {
545
-
546
- module.exports = require("node:child_process");
547
-
548
- /***/ }),
549
-
550
- /***/ 33873:
551
- /***/ ((module) => {
552
-
553
- module.exports = require("path");
554
-
555
- /***/ }),
556
-
557
- /***/ 36766:
558
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
559
-
560
- __webpack_require__.r(__webpack_exports__);
561
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
562
- /* harmony export */ GET: () => (/* binding */ GET),
563
- /* harmony export */ POST: () => (/* binding */ POST)
564
- /* harmony export */ });
565
- /* harmony import */ var next_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
566
- /* harmony import */ var zod__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(97377);
567
- /* harmony import */ var _lib_stores_threads__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83042);
568
- /* harmony import */ var _lib_stores_agent_configs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41720);
569
- /* harmony import */ var _lib_api_responses__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(39947);
570
- /**
571
- * @public — `GET /api/v1/threads` (list), `POST /api/v1/threads` (create)
572
- *
573
- * Thread lifecycle. Threads are the unit of conversation history; every
574
- * agent run lives inside one. See `docs/api.md`.
575
- */
576
-
577
-
578
-
579
-
580
- const CreateBody = zod__WEBPACK_IMPORTED_MODULE_4__/* .object */ .Ikc({
581
- agent_id: zod__WEBPACK_IMPORTED_MODULE_4__/* .string */ .YjP().min(1, "agent_id required"),
582
- title: zod__WEBPACK_IMPORTED_MODULE_4__/* .string */ .YjP().optional()
583
- });
584
- function GET(req) {
585
- const { searchParams } = req.nextUrl;
586
- const limit = Number(searchParams.get("limit") ?? 50);
587
- const offset = Number(searchParams.get("offset") ?? 0);
588
- return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json((0,_lib_stores_threads__WEBPACK_IMPORTED_MODULE_1__/* .listThreads */ .Mi)(limit, offset));
589
- }
590
- async function POST(req) {
591
- const body = await (0,_lib_api_responses__WEBPACK_IMPORTED_MODULE_3__/* .validateBody */ .Jb)(req, CreateBody);
592
- if (body instanceof next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse) return body;
593
- if (!(0,_lib_stores_agent_configs__WEBPACK_IMPORTED_MODULE_2__/* .getAgentConfig */ .mJ)(body.agent_id)) return (0,_lib_api_responses__WEBPACK_IMPORTED_MODULE_3__/* .notFoundResponse */ .HN)(`Agent "${body.agent_id}" not found`);
594
- const thread = (0,_lib_stores_threads__WEBPACK_IMPORTED_MODULE_1__/* .createThread */ .Nw)(body.agent_id, body.title);
595
- return (0,_lib_api_responses__WEBPACK_IMPORTED_MODULE_3__/* .createdResponse */ .K2)(thread);
596
- }
597
-
598
-
599
- /***/ }),
600
-
601
- /***/ 37067:
602
- /***/ ((module) => {
603
-
604
- module.exports = require("node:http");
605
-
606
- /***/ }),
607
-
608
- /***/ 38522:
609
- /***/ ((module) => {
610
-
611
- module.exports = require("node:zlib");
612
-
613
- /***/ }),
614
-
615
- /***/ 39947:
616
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
617
-
618
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
619
- /* harmony export */ Bm: () => (/* binding */ cachedJson),
620
- /* harmony export */ HN: () => (/* binding */ notFoundResponse),
621
- /* harmony export */ Jb: () => (/* binding */ validateBody),
622
- /* harmony export */ K2: () => (/* binding */ createdResponse),
623
- /* harmony export */ Ng: () => (/* binding */ noStoreJson),
624
- /* harmony export */ yj: () => (/* binding */ errorResponse)
625
- /* harmony export */ });
626
- /* harmony import */ var next_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23211);
627
- // Shared HTTP response builders for app/api/v1/** route handlers.
628
- //
629
- // Goal: every error/success payload across the v1 surface has the same
630
- // shape. Before this lived inline, response bodies drifted —
631
- // `{error: "x"}` vs `{message: "x"}`, 400 vs 422 for the same condition,
632
- // some routes returned Zod's raw issue array, others stringified it.
633
-
634
- function errorResponse(message, status = 400) {
635
- return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json({
636
- error: message
637
- }, {
638
- status
639
- });
640
- }
641
- function notFoundResponse(message = "Not found") {
642
- return errorResponse(message, 404);
643
- }
644
- function createdResponse(data) {
645
- return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json(data, {
646
- status: 201
647
- });
648
- }
649
- // Wrap a 200 JSON response with a private Cache-Control header. Use on safe
650
- // GET endpoints that serve user-scoped data the client refetches often (panel
651
- // mounts, navigation back/forward) but mutates rarely. The TTL is short
652
- // enough that explicit mutations — which patch the client-side ApiClient
653
- // cache in place — stay observably consistent without an extra roundtrip.
654
- //
655
- // swrSeconds (optional): stale-while-revalidate window. When set, the browser
656
- // serves the cached response immediately and refreshes in the background,
657
- // making navigation feel instant. Use for data that can tolerate brief
658
- // staleness (tool list, agent configs, model list). Omit for real-time data
659
- // (dashboard metrics, credential state).
660
- function cachedJson(data, maxAgeSeconds, swrSeconds) {
661
- const swr = swrSeconds ? `, stale-while-revalidate=${swrSeconds}` : "";
662
- return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json(data, {
663
- headers: {
664
- "Cache-Control": `private, max-age=${maxAgeSeconds}${swr}`
665
- }
666
- });
667
- }
668
- // Use for endpoints whose response contains live state that must never be
669
- // served from cache — credentials, connection status, live config values.
670
- function noStoreJson(data) {
671
- return next_server__WEBPACK_IMPORTED_MODULE_0__.NextResponse.json(data, {
672
- headers: {
673
- "Cache-Control": "no-store"
674
- }
675
- });
676
- }
677
- // Validate a JSON request body against a zod schema.
678
- // Returns either the parsed data or a 400 NextResponse explaining the issue.
679
- // Caller pattern:
680
- // const parsed = await validateBody(req, Schema);
681
- // if (parsed instanceof NextResponse) return parsed;
682
- // // use parsed.field
683
- async function validateBody(req, schema) {
684
- let raw;
685
- try {
686
- raw = await req.json();
687
- } catch {
688
- return errorResponse("Request body must be valid JSON", 400);
689
- }
690
- const parsed = schema.safeParse(raw);
691
- if (!parsed.success) {
692
- return errorResponse(parsed.error.issues[0]?.message ?? "invalid body", 400);
693
- }
694
- return parsed.data;
695
- }
696
-
697
-
698
- /***/ }),
699
-
700
- /***/ 41720:
701
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
702
-
703
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
704
- /* harmony export */ BM: () => (/* binding */ upsertAgentConfig),
705
- /* harmony export */ E1: () => (/* binding */ updateAgentDisplayFilters),
706
- /* harmony export */ P2: () => (/* binding */ parseCitationStrictness),
707
- /* harmony export */ S2: () => (/* binding */ getAgentToolCredentials),
708
- /* harmony export */ SJ: () => (/* binding */ generateAgentId),
709
- /* harmony export */ TG: () => (/* binding */ getAgentTools),
710
- /* harmony export */ bg: () => (/* binding */ parseDelegateTargets),
711
- /* harmony export */ d2: () => (/* binding */ DISPLAY_FILTER_KEYS),
712
- /* harmony export */ fg: () => (/* binding */ getAgentTierProportions),
713
- /* harmony export */ mJ: () => (/* binding */ getAgentConfig),
714
- /* harmony export */ nV: () => (/* binding */ getAgentDisplayFilters),
715
- /* harmony export */ vU: () => (/* binding */ getDefaultAgentConfig),
716
- /* harmony export */ vi: () => (/* binding */ DISPLAY_FILTER_DEFAULTS),
717
- /* harmony export */ xi: () => (/* binding */ deleteAgentConfig),
718
- /* harmony export */ zb: () => (/* binding */ listAgentConfigs)
719
- /* harmony export */ });
720
- /* harmony import */ var _lib_db__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(46);
721
- /* harmony import */ var _lib_db_transaction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(99043);
722
- /* harmony import */ var _lib_agents_adaptive_persona_presets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(66849);
723
-
724
-
725
-
726
- const now = ()=>new Date().toISOString();
727
- /** Coerce arbitrary input (DB row TEXT, API body, undefined) to the enum.
728
- * Returns `null` for null/undefined/unknown values so callers can default. */ function parseCitationStrictness(value) {
729
- if (value === "off" || value === "informational" || value === "standard" || value === "strict") {
730
- return value;
731
- }
732
- return null;
733
- }
734
- /**
735
- * Parse the JSON-encoded per-agent override of context tier proportions.
736
- * Returns `null` for NULL, blank, malformed JSON, or any payload that
737
- * doesn't have three finite non-negative numeric fields. Callers fall
738
- * back to the model config's value (or built-in defaults) on null.
739
- */ function getAgentTierProportions(row) {
740
- const raw = row.context_tier_proportions;
741
- if (!raw) return null;
742
- try {
743
- const parsed = JSON.parse(raw);
744
- const hot = Number(parsed.hot);
745
- const warm = Number(parsed.warm);
746
- const facts = Number(parsed.facts);
747
- if (![
748
- hot,
749
- warm,
750
- facts
751
- ].every((n)=>Number.isFinite(n) && n >= 0)) return null;
752
- if (hot + warm + facts <= 0) return null;
753
- return {
754
- hot,
755
- warm,
756
- facts
757
- };
758
- } catch {
759
- return null;
760
- }
761
- }
762
- function listAgentConfigs() {
763
- // Default agent always first; then by the timestamp of each agent's latest message.
764
- return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare(`SELECT a.*
765
- FROM agent_configs a
766
- LEFT JOIN (
767
- SELECT t.agent_id, MAX(m.created_at) AS last_message_at
768
- FROM threads t
769
- JOIN messages m ON m.thread_id = t.thread_id
770
- GROUP BY t.agent_id
771
- ) latest ON latest.agent_id = a.id
772
- ORDER BY a.is_default DESC, COALESCE(latest.last_message_at, a.created_at) DESC, a.id ASC`).all();
773
- }
774
- function getDefaultAgentConfig() {
775
- return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("SELECT * FROM agent_configs WHERE is_default=1 LIMIT 1").get() ?? null;
776
- }
777
- function getAgentConfig(id) {
778
- return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("SELECT * FROM agent_configs WHERE id=?").get(id) ?? null;
779
- }
780
- /**
781
- * Parse the JSON-encoded delegate whitelist into a deduped string[]. Returns
782
- * an empty array for NULL, blank, or malformed JSON (delegation is opt-in).
783
- */ /**
784
- * Parse the agent's tool allowlist (`tools` column, stored as a JSON string).
785
- * Returns an empty array on NULL/blank/malformed JSON — same defensive shape
786
- * as parseDelegateTargets. Callers that previously did `JSON.parse(cfg.tools)`
787
- * inline should switch to this getter so the serialization contract stays
788
- * owned by this store.
789
- */ function getAgentTools(cfg) {
790
- if (!cfg?.tools) return [];
791
- try {
792
- const parsed = JSON.parse(cfg.tools);
793
- if (!Array.isArray(parsed)) return [];
794
- return parsed.filter((x)=>typeof x === "string" && x.length > 0);
795
- } catch {
796
- return [];
797
- }
798
- }
799
- function parseDelegateTargets(raw) {
800
- if (!raw) return [];
801
- try {
802
- const parsed = JSON.parse(raw);
803
- if (!Array.isArray(parsed)) return [];
804
- const ids = parsed.filter((x)=>typeof x === "string" && x.length > 0);
805
- return Array.from(new Set(ids));
806
- } catch {
807
- return [];
808
- }
809
- }
810
- /**
811
- * Parse the per-agent `{ toolName: credentialId }` override map stored in
812
- * the `tool_credentials` column. Returns an empty record on NULL / blank /
813
- * malformed JSON / non-string entries so downstream code can treat the
814
- * result as a plain lookup without further validation.
815
- */ function getAgentToolCredentials(cfg) {
816
- if (!cfg?.tool_credentials) return {};
817
- try {
818
- const parsed = JSON.parse(cfg.tool_credentials);
819
- if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return {};
820
- const out = {};
821
- for (const [k, v] of Object.entries(parsed)){
822
- if (typeof v === "string" && v.length > 0) out[k] = v;
823
- }
824
- return out;
825
- } catch {
826
- return {};
380
+ return out;
381
+ } catch {
382
+ return {};
827
383
  }
828
384
  }
829
385
  function upsertAgentConfig(input) {
@@ -905,189 +461,633 @@ function serialiseToolCredentials(input, existing) {
905
461
  if (typeof k === "string" && k.length > 0 && typeof v === "string" && v.length > 0) {
906
462
  cleaned[k] = v;
907
463
  }
908
- }
909
- if (Object.keys(cleaned).length === 0) return null;
910
- return JSON.stringify(cleaned);
911
- }
912
- function toMbti(v) {
913
- if (!v) return null;
914
- return v in _lib_agents_adaptive_persona_presets__WEBPACK_IMPORTED_MODULE_2__/* .MBTI_PRESETS */ .e ? v : null;
915
- }
916
- function deleteAgentConfig(id) {
917
- return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("DELETE FROM agent_configs WHERE id=?").run(id).changes > 0;
918
- }
919
- function generateAgentId(name) {
920
- const slug = name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40);
921
- const suffix = Math.random().toString(36).slice(2, 6);
922
- return slug ? `${slug}-${suffix}` : `agent-${suffix}`;
923
- }
924
- // ── ADR-0022: per-agent message-channel display filters ─────────────────
925
- // Canonical channel keys mirrored in `hooks/useMessageFilters.ts`. Kept
926
- // in sync there by importing this constant — single source of truth.
927
- const DISPLAY_FILTER_KEYS = [
928
- "scheduled_task",
929
- "watcher",
930
- "bridge",
931
- "extension",
932
- "page_capture",
933
- "synthetic",
934
- "tool_use",
935
- "thinking"
936
- ];
937
- const DISPLAY_FILTER_DEFAULTS = {
938
- scheduled_task: true,
939
- watcher: true,
940
- bridge: true,
941
- extension: true,
942
- page_capture: true,
943
- synthetic: true,
944
- tool_use: true,
945
- thinking: true
946
- };
947
- function parseDisplayFilters(raw) {
948
- if (!raw) return {
949
- ...DISPLAY_FILTER_DEFAULTS
950
- };
951
- try {
952
- const parsed = JSON.parse(raw);
953
- // Merge over defaults so newly-added channels stay visible on old rows.
954
- return {
955
- ...DISPLAY_FILTER_DEFAULTS,
956
- ...parsed
957
- };
958
- } catch {
959
- return {
960
- ...DISPLAY_FILTER_DEFAULTS
961
- };
962
- }
963
- }
964
- function getAgentDisplayFilters(id) {
965
- const row = getAgentConfig(id);
966
- if (!row) return null;
967
- return parseDisplayFilters(row.display_filters);
968
- }
969
- /**
970
- * Merge a partial filter map into the agent's stored prefs. Pass `null` to
971
- * reset to defaults (clears the column). Safe against concurrent toggles
972
- * from multiple browser tabs because the merge happens server-side.
973
- */ function updateAgentDisplayFilters(id, patch) {
974
- const row = getAgentConfig(id);
975
- if (!row) return null;
976
- if (patch === null) {
977
- (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("UPDATE agent_configs SET display_filters=NULL, updated_at=? WHERE id=?").run(now(), id);
978
- return {
979
- ...DISPLAY_FILTER_DEFAULTS
980
- };
981
- }
982
- const current = parseDisplayFilters(row.display_filters);
983
- const next = {
984
- ...current
464
+ }
465
+ if (Object.keys(cleaned).length === 0) return null;
466
+ return JSON.stringify(cleaned);
467
+ }
468
+ function toMbti(v) {
469
+ if (!v) return null;
470
+ return v in _lib_agents_adaptive_persona_presets__WEBPACK_IMPORTED_MODULE_2__/* .MBTI_PRESETS */ .e ? v : null;
471
+ }
472
+ function deleteAgentConfig(id) {
473
+ return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("DELETE FROM agent_configs WHERE id=?").run(id).changes > 0;
474
+ }
475
+ function generateAgentId(name) {
476
+ const slug = name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40);
477
+ const suffix = Math.random().toString(36).slice(2, 6);
478
+ return slug ? `${slug}-${suffix}` : `agent-${suffix}`;
479
+ }
480
+ // ── ADR-0022: per-agent message-channel display filters ─────────────────
481
+ // Canonical channel keys mirrored in `hooks/useMessageFilters.ts`. Kept
482
+ // in sync there by importing this constant — single source of truth.
483
+ const DISPLAY_FILTER_KEYS = [
484
+ "scheduled_task",
485
+ "watcher",
486
+ "bridge",
487
+ "extension",
488
+ "page_capture",
489
+ "synthetic",
490
+ "tool_use",
491
+ "thinking"
492
+ ];
493
+ const DISPLAY_FILTER_DEFAULTS = {
494
+ scheduled_task: true,
495
+ watcher: true,
496
+ bridge: true,
497
+ extension: true,
498
+ page_capture: true,
499
+ synthetic: true,
500
+ tool_use: true,
501
+ thinking: true
502
+ };
503
+ function parseDisplayFilters(raw) {
504
+ if (!raw) return {
505
+ ...DISPLAY_FILTER_DEFAULTS
506
+ };
507
+ try {
508
+ const parsed = JSON.parse(raw);
509
+ // Merge over defaults so newly-added channels stay visible on old rows.
510
+ return {
511
+ ...DISPLAY_FILTER_DEFAULTS,
512
+ ...parsed
513
+ };
514
+ } catch {
515
+ return {
516
+ ...DISPLAY_FILTER_DEFAULTS
517
+ };
518
+ }
519
+ }
520
+ function getAgentDisplayFilters(id) {
521
+ const row = getAgentConfig(id);
522
+ if (!row) return null;
523
+ return parseDisplayFilters(row.display_filters);
524
+ }
525
+ /**
526
+ * Merge a partial filter map into the agent's stored prefs. Pass `null` to
527
+ * reset to defaults (clears the column). Safe against concurrent toggles
528
+ * from multiple browser tabs because the merge happens server-side.
529
+ */ function updateAgentDisplayFilters(id, patch) {
530
+ const row = getAgentConfig(id);
531
+ if (!row) return null;
532
+ if (patch === null) {
533
+ (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("UPDATE agent_configs SET display_filters=NULL, updated_at=? WHERE id=?").run(now(), id);
534
+ return {
535
+ ...DISPLAY_FILTER_DEFAULTS
536
+ };
537
+ }
538
+ const current = parseDisplayFilters(row.display_filters);
539
+ const next = {
540
+ ...current
541
+ };
542
+ for (const k of DISPLAY_FILTER_KEYS){
543
+ if (k in patch && typeof patch[k] === "boolean") next[k] = patch[k];
544
+ }
545
+ (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("UPDATE agent_configs SET display_filters=?, updated_at=? WHERE id=?").run(JSON.stringify(next), now(), id);
546
+ return next;
547
+ }
548
+
549
+
550
+ /***/ }),
551
+
552
+ /***/ 44708:
553
+ /***/ ((module) => {
554
+
555
+ module.exports = require("node:https");
556
+
557
+ /***/ }),
558
+
559
+ /***/ 44870:
560
+ /***/ ((module) => {
561
+
562
+ module.exports = require("next/dist/compiled/next-server/app-route.runtime.prod.js");
563
+
564
+ /***/ }),
565
+
566
+ /***/ 48161:
567
+ /***/ ((module) => {
568
+
569
+ module.exports = require("node:os");
570
+
571
+ /***/ }),
572
+
573
+ /***/ 51455:
574
+ /***/ ((module) => {
575
+
576
+ module.exports = require("node:fs/promises");
577
+
578
+ /***/ }),
579
+
580
+ /***/ 55511:
581
+ /***/ ((module) => {
582
+
583
+ module.exports = require("crypto");
584
+
585
+ /***/ }),
586
+
587
+ /***/ 55591:
588
+ /***/ ((module) => {
589
+
590
+ module.exports = require("https");
591
+
592
+ /***/ }),
593
+
594
+ /***/ 57075:
595
+ /***/ ((module) => {
596
+
597
+ module.exports = require("node:stream");
598
+
599
+ /***/ }),
600
+
601
+ /***/ 57975:
602
+ /***/ ((module) => {
603
+
604
+ module.exports = require("node:util");
605
+
606
+ /***/ }),
607
+
608
+ /***/ 63033:
609
+ /***/ ((module) => {
610
+
611
+ module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
612
+
613
+ /***/ }),
614
+
615
+ /***/ 73024:
616
+ /***/ ((module) => {
617
+
618
+ module.exports = require("node:fs");
619
+
620
+ /***/ }),
621
+
622
+ /***/ 75919:
623
+ /***/ ((module) => {
624
+
625
+ module.exports = require("node:worker_threads");
626
+
627
+ /***/ }),
628
+
629
+ /***/ 76760:
630
+ /***/ ((module) => {
631
+
632
+ module.exports = require("node:path");
633
+
634
+ /***/ }),
635
+
636
+ /***/ 77598:
637
+ /***/ ((module) => {
638
+
639
+ module.exports = require("node:crypto");
640
+
641
+ /***/ }),
642
+
643
+ /***/ 79428:
644
+ /***/ ((module) => {
645
+
646
+ module.exports = require("buffer");
647
+
648
+ /***/ }),
649
+
650
+ /***/ 80058:
651
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
652
+
653
+ __webpack_require__.r(__webpack_exports__);
654
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
655
+ /* harmony export */ handler: () => (/* binding */ handler),
656
+ /* harmony export */ patchFetch: () => (/* binding */ patchFetch),
657
+ /* harmony export */ routeModule: () => (/* binding */ routeModule),
658
+ /* harmony export */ serverHooks: () => (/* binding */ serverHooks),
659
+ /* harmony export */ workAsyncStorage: () => (/* binding */ workAsyncStorage),
660
+ /* harmony export */ workUnitAsyncStorage: () => (/* binding */ workUnitAsyncStorage)
661
+ /* harmony export */ });
662
+ /* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19225);
663
+ /* 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__);
664
+ /* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84006);
665
+ /* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8317);
666
+ /* 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__);
667
+ /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99373);
668
+ /* 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__);
669
+ /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34775);
670
+ /* 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__);
671
+ /* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24235);
672
+ /* 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__);
673
+ /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(261);
674
+ /* 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__);
675
+ /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(54365);
676
+ /* 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__);
677
+ /* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90771);
678
+ /* 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__);
679
+ /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(73461);
680
+ /* 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__);
681
+ /* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67798);
682
+ /* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(92280);
683
+ /* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(62018);
684
+ /* 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__);
685
+ /* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(45696);
686
+ /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(47929);
687
+ /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
688
+ /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(86439);
689
+ /* 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__);
690
+ /* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(10246);
691
+ /* 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__);
692
+ /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(37527);
693
+ /* 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__);
694
+
695
+
696
+
697
+
698
+
699
+
700
+
701
+
702
+
703
+
704
+
705
+
706
+
707
+
708
+
709
+
710
+
711
+
712
+ // We inject the nextConfigOutput here so that we can use them in the route
713
+ // module.
714
+ const nextConfigOutput = "standalone"
715
+ const routeModule = new next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppRouteRouteModule({
716
+ definition: {
717
+ kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
718
+ page: "/api/v1/threads/route",
719
+ pathname: "/api/v1/threads",
720
+ filename: "route",
721
+ bundlePath: "app/api/v1/threads/route"
722
+ },
723
+ distDir: ".next" || 0,
724
+ relativeProjectDir: false || '',
725
+ resolvedPagePath: "/home/runner/work/jarela/jarela/app/api/v1/threads/route.ts",
726
+ nextConfigOutput,
727
+ // The lazy require factory ensures that:
728
+ // - In dev: devRequestTimingInternalsEnd is set before userland executes,
729
+ // correctly attributing module load time to application-code rather than
730
+ // framework internals.
731
+ // - In all modes: async modules (route files with top-level await) are
732
+ // handled correctly — require() returns a Promise for such modules, which
733
+ // ensureUserland() awaits before the first request is handled.
734
+ userland: ()=>__webpack_require__(36766),
735
+ // In Turbopack dev mode, also provide a synchronous per-request getter so
736
+ // server HMR updates are picked up without re-executing the entry chunk.
737
+ // Using require() (synchronous) avoids adding async overhead that would be
738
+ // incorrectly attributed to application-code time in devRequestTiming.
739
+ ... false ? 0 : {}
740
+ });
741
+ // Pull out the exports that we need to expose from the module. This should
742
+ // be eliminated when we've moved the other routes to the new format. These
743
+ // are used to hook into the route.
744
+ const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
745
+ function patchFetch() {
746
+ return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
747
+ workAsyncStorage,
748
+ workUnitAsyncStorage
749
+ });
750
+ }
751
+
752
+ async function handler(req, res, ctx) {
753
+ if (ctx.requestMeta) {
754
+ (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.setRequestMeta)(req, ctx.requestMeta);
755
+ }
756
+ if (routeModule.isDev) {
757
+ (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.addRequestMeta)(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());
758
+ }
759
+ let srcPage = "/api/v1/threads/route";
760
+ // turbopack doesn't normalize `/index` in the page name
761
+ // so we need to to process dynamic routes properly
762
+ // TODO: fix turbopack providing differing value from webpack
763
+ if (false) {} else if (srcPage === '/index') {
764
+ // we always normalize /index specifically
765
+ srcPage = '/';
766
+ }
767
+ const multiZoneDraftMode = false;
768
+ const prepareResult = await routeModule.prepare(req, res, {
769
+ srcPage,
770
+ multiZoneDraftMode
771
+ });
772
+ if (!prepareResult) {
773
+ res.statusCode = 400;
774
+ res.end('Bad Request');
775
+ ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());
776
+ return null;
777
+ }
778
+ const { buildId, deploymentId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest, previewProps } = prepareResult;
779
+ const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__.normalizeAppPath)(srcPage);
780
+ // Only this route's prerenders can establish ISR or admit generated params.
781
+ 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]));
782
+ let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || isPrerendered);
783
+ const render404 = async ()=>{
784
+ // TODO: should route-module itself handle rendering the 404
785
+ if (routerServerContext == null ? void 0 : routerServerContext.render404) {
786
+ await routerServerContext.render404(req, res, parsedUrl, false);
787
+ } else {
788
+ res.end('This page could not be found');
789
+ }
790
+ return null;
791
+ };
792
+ if (isIsr && !isDraftMode) {
793
+ const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];
794
+ if (prerenderInfo) {
795
+ if (prerenderInfo.fallback === false && !isPrerendered) {
796
+ if (nextConfig.adapterPath) {
797
+ return await render404();
798
+ }
799
+ throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError();
800
+ }
801
+ }
802
+ }
803
+ let cacheKey = null;
804
+ if (isIsr && !routeModule.isDev && !isDraftMode) {
805
+ cacheKey = resolvedPathname;
806
+ // ensure /index and / is normalized to one key
807
+ cacheKey = cacheKey === '/index' ? '/' : cacheKey;
808
+ }
809
+ // Before rendering (which initializes component tree modules), we have to
810
+ // set the reference manifests to our global store so Server Action's
811
+ // encryption util can access to them at the top level of the page module.
812
+ if (serverActionsManifest && clientReferenceManifest) {
813
+ (0,next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__.setManifestsSingleton)({
814
+ page: srcPage,
815
+ clientReferenceManifest,
816
+ serverActionsManifest
817
+ });
818
+ }
819
+ const method = req.method || 'GET';
820
+ const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)();
821
+ const activeSpan = tracer.getActiveScopeSpan();
822
+ const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);
823
+ const isMinimalMode = Boolean((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'minimalMode'));
824
+ const incrementalCache = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, previewProps, prerenderManifest, isMinimalMode);
825
+ incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();
826
+ globalThis.__incrementalCache = incrementalCache;
827
+ const context = {
828
+ params,
829
+ previewProps,
830
+ renderOpts: {
831
+ experimental: {
832
+ authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
833
+ useCacheTimeout: nextConfig.experimental.useCacheTimeout,
834
+ durableUseCacheEntries: Boolean(nextConfig.experimental.durableUseCacheEntries)
835
+ },
836
+ cacheComponents: Boolean(nextConfig.cacheComponents),
837
+ validationLevel: nextConfig.experimental.instantInsights.validationLevel,
838
+ isDraftMode,
839
+ incrementalCache,
840
+ hmrRefreshHash: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'hmrRefreshHash'),
841
+ cacheLifeProfiles: nextConfig.cacheLife,
842
+ staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,
843
+ waitUntil: ctx.waitUntil,
844
+ onClose: (cb)=>{
845
+ res.on('close', cb);
846
+ },
847
+ onAfterTaskError: undefined
848
+ },
849
+ sharedContext: {
850
+ buildId,
851
+ deploymentId
852
+ }
853
+ };
854
+ const nodeNextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextRequest(req);
855
+ const nodeNextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextResponse(res);
856
+ 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));
857
+ const responseGenerator = async ({ previousCacheEntry })=>{
858
+ try {
859
+ if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {
860
+ res.statusCode = 404;
861
+ // on-demand revalidate always sets this header
862
+ res.setHeader('x-nextjs-cache', 'REVALIDATED');
863
+ res.end('This page could not be found');
864
+ return null;
865
+ }
866
+ const response = cacheKey === null ? await routeModule.handle(nextReq, context) : await routeModule.prerender(nextReq, context);
867
+ req.fetchMetrics = context.renderOpts.fetchMetrics;
868
+ let pendingWaitUntil = context.renderOpts.pendingWaitUntil;
869
+ // Attempt using provided waitUntil if available
870
+ // if it's not we fallback to sendResponse's handling
871
+ if (pendingWaitUntil) {
872
+ if (ctx.waitUntil) {
873
+ ctx.waitUntil(pendingWaitUntil);
874
+ pendingWaitUntil = undefined;
875
+ }
876
+ }
877
+ const cacheTags = context.renderOpts.collectedTags;
878
+ // If the request is for a static response, we can cache it so long
879
+ // as it's not edge.
880
+ if (isIsr) {
881
+ const blob = await response.blob();
882
+ // Copy the headers from the response.
883
+ const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.toNodeOutgoingHttpHeaders)(response.headers);
884
+ if (cacheTags) {
885
+ headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER] = cacheTags;
886
+ }
887
+ if (!headers['content-type'] && blob.type) {
888
+ headers['content-type'] = blob.type;
889
+ }
890
+ const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;
891
+ 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
892
+ // explicit `expire` (e.g. via `cacheLife`). This mirrors the
893
+ // build-time fallback in `build/index.ts` so cache entries
894
+ // and the response Cache-Control header agree on the route's
895
+ // effective expire. Routes that opt out of revalidation
896
+ // (`revalidate: false`) or that are dynamic (`revalidate: 0`)
897
+ // keep `expire: undefined`.
898
+ revalidate !== false && revalidate > 0 ? nextConfig.expireTime : undefined : context.renderOpts.collectedExpire;
899
+ // Create the cache entry for the response.
900
+ const cacheEntry = {
901
+ value: {
902
+ kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE,
903
+ status: response.status,
904
+ body: Buffer.from(await blob.arrayBuffer()),
905
+ headers
906
+ },
907
+ cacheControl: {
908
+ revalidate,
909
+ expire
910
+ }
911
+ };
912
+ return cacheEntry;
913
+ } else {
914
+ // send response without caching if not ISR
915
+ await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, response, pendingWaitUntil);
916
+ return null;
917
+ }
918
+ } catch (err) {
919
+ // if this is a background revalidate we need to report
920
+ // the request error here as it won't be bubbled
921
+ if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {
922
+ const silenceLog = false;
923
+ await routeModule.onRequestError(req, err, {
924
+ routerKind: 'App Router',
925
+ routePath: srcPage,
926
+ routeType: 'route',
927
+ revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
928
+ isStaticGeneration: cacheKey !== null,
929
+ isOnDemandRevalidate
930
+ })
931
+ }, silenceLog, routerServerContext);
932
+ }
933
+ throw err;
934
+ }
935
+ };
936
+ const handleResponse = async (currentSpan, parentSpan)=>{
937
+ try {
938
+ var _cacheEntry_value;
939
+ const cacheEntry = await routeModule.handleResponse({
940
+ req,
941
+ nextConfig,
942
+ cacheKey,
943
+ routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
944
+ isFallback: false,
945
+ previewProps,
946
+ prerenderManifest,
947
+ isRoutePPREnabled: false,
948
+ isOnDemandRevalidate,
949
+ revalidateOnlyGenerated,
950
+ responseGenerator,
951
+ waitUntil: ctx.waitUntil,
952
+ isMinimalMode
953
+ });
954
+ if (cacheEntry !== null && 'error' in cacheEntry) {
955
+ throw cacheEntry.error;
956
+ }
957
+ // we don't create a cacheEntry for ISR
958
+ if (!isIsr) {
959
+ return;
960
+ }
961
+ 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) {
962
+ var _cacheEntry_value1;
963
+ throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
964
+ }
965
+ if (!isMinimalMode) {
966
+ res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
967
+ }
968
+ // Draft mode should never be cached
969
+ if (isDraftMode) {
970
+ res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
971
+ }
972
+ const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
973
+ if (!(isMinimalMode && isIsr)) {
974
+ headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
975
+ }
976
+ // If cache control is already set on the response we don't
977
+ // override it to allow users to customize it via next.config
978
+ if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
979
+ headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
980
+ }
981
+ 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'.
982
+ new Response(cacheEntry.value.body, {
983
+ headers,
984
+ status: cacheEntry.value.status || 200
985
+ }));
986
+ return;
987
+ } catch (err) {
988
+ if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError)) {
989
+ const silenceLog = false;
990
+ await routeModule.onRequestError(req, err, {
991
+ routerKind: 'App Router',
992
+ routePath: normalizedSrcPage,
993
+ routeType: 'route',
994
+ revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
995
+ isStaticGeneration: cacheKey !== null,
996
+ isOnDemandRevalidate
997
+ })
998
+ }, silenceLog, routerServerContext);
999
+ }
1000
+ // rethrow so that we can handle serving error page
1001
+ // If this is during static generation, throw the error again.
1002
+ if (isIsr) throw err;
1003
+ // Otherwise, send a 500 response unless the original response has
1004
+ // already committed. In that case, preserve its status code for
1005
+ // telemetry while still recording the failure and terminating a response
1006
+ // that the failed pipeline left open.
1007
+ if (res.headersSent) {
1008
+ if (currentSpan) {
1009
+ const error = err instanceof Error ? err : new Error('Unknown app route error');
1010
+ currentSpan.recordException(error);
1011
+ currentSpan.setStatus({
1012
+ code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR,
1013
+ message: error.message
1014
+ });
1015
+ currentSpan.setAttribute('error.type', error.name);
1016
+ }
1017
+ if (!res.writableEnded && !res.destroyed) {
1018
+ res.end();
1019
+ }
1020
+ } else {
1021
+ await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
1022
+ status: 500
1023
+ }));
1024
+ }
1025
+ return;
1026
+ } finally{
1027
+ ;
1028
+ (()=>{
1029
+ if (!currentSpan) {
1030
+ return;
1031
+ }
1032
+ let statusCode = res.statusCode;
1033
+ currentSpan.setAttributes({
1034
+ 'http.status_code': statusCode,
1035
+ 'next.rsc': false
1036
+ });
1037
+ if (statusCode && statusCode >= 500) {
1038
+ // For 5xx status codes: SHOULD be set to 'Error' span status.
1039
+ // x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
1040
+ currentSpan.setStatus({
1041
+ code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
1042
+ });
1043
+ // For span status 'Error', SHOULD set 'error.type' attribute.
1044
+ currentSpan.setAttribute('error.type', statusCode.toString());
1045
+ }
1046
+ const rootSpanAttributes = tracer.getRootSpanAttributes();
1047
+ // We were unable to get attributes, probably OTEL is not enabled
1048
+ if (!rootSpanAttributes) {
1049
+ return;
1050
+ }
1051
+ if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
1052
+ console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
1053
+ return;
1054
+ }
1055
+ const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
1056
+ const name = `${method} ${route}`;
1057
+ currentSpan.setAttributes({
1058
+ 'next.route': route,
1059
+ 'http.route': route,
1060
+ 'next.span_name': name
1061
+ });
1062
+ currentSpan.updateName(name);
1063
+ // Propagate http.route to the parent span if one exists (e.g.
1064
+ // a platform-created HTTP span in adapter deployments).
1065
+ if (parentSpan && parentSpan !== currentSpan) {
1066
+ parentSpan.setAttribute('http.route', route);
1067
+ parentSpan.updateName(name);
1068
+ }
1069
+ })();
1070
+ }
985
1071
  };
986
- for (const k of DISPLAY_FILTER_KEYS){
987
- if (k in patch && typeof patch[k] === "boolean") next[k] = patch[k];
1072
+ // TODO: activeSpan code path is for when wrapped by
1073
+ // next-server can be removed when this is no longer used
1074
+ if (isWrappedByNextServer && activeSpan) {
1075
+ await handleResponse(activeSpan, undefined);
1076
+ } else {
1077
+ let parentSpan = tracer.getActiveScopeSpan();
1078
+ await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest, {
1079
+ spanName: `${method} ${srcPage}`,
1080
+ kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanKind.SERVER,
1081
+ attributes: {
1082
+ 'http.method': method,
1083
+ 'http.target': req.url
1084
+ }
1085
+ }, (span)=>handleResponse(span, parentSpan)), undefined, !isWrappedByNextServer);
988
1086
  }
989
- (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("UPDATE agent_configs SET display_filters=?, updated_at=? WHERE id=?").run(JSON.stringify(next), now(), id);
990
- return next;
991
1087
  }
992
1088
 
1089
+ //# sourceMappingURL=app-route.js.map
993
1090
 
994
- /***/ }),
995
-
996
- /***/ 44708:
997
- /***/ ((module) => {
998
-
999
- module.exports = require("node:https");
1000
-
1001
- /***/ }),
1002
-
1003
- /***/ 44870:
1004
- /***/ ((module) => {
1005
-
1006
- module.exports = require("next/dist/compiled/next-server/app-route.runtime.prod.js");
1007
-
1008
- /***/ }),
1009
-
1010
- /***/ 48161:
1011
- /***/ ((module) => {
1012
-
1013
- module.exports = require("node:os");
1014
-
1015
- /***/ }),
1016
-
1017
- /***/ 51455:
1018
- /***/ ((module) => {
1019
-
1020
- module.exports = require("node:fs/promises");
1021
-
1022
- /***/ }),
1023
-
1024
- /***/ 55511:
1025
- /***/ ((module) => {
1026
-
1027
- module.exports = require("crypto");
1028
-
1029
- /***/ }),
1030
-
1031
- /***/ 55591:
1032
- /***/ ((module) => {
1033
-
1034
- module.exports = require("https");
1035
-
1036
- /***/ }),
1037
-
1038
- /***/ 57075:
1039
- /***/ ((module) => {
1040
-
1041
- module.exports = require("node:stream");
1042
-
1043
- /***/ }),
1044
-
1045
- /***/ 57975:
1046
- /***/ ((module) => {
1047
-
1048
- module.exports = require("node:util");
1049
-
1050
- /***/ }),
1051
-
1052
- /***/ 63033:
1053
- /***/ ((module) => {
1054
-
1055
- module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
1056
-
1057
- /***/ }),
1058
-
1059
- /***/ 73024:
1060
- /***/ ((module) => {
1061
-
1062
- module.exports = require("node:fs");
1063
-
1064
- /***/ }),
1065
-
1066
- /***/ 75919:
1067
- /***/ ((module) => {
1068
-
1069
- module.exports = require("node:worker_threads");
1070
-
1071
- /***/ }),
1072
-
1073
- /***/ 76760:
1074
- /***/ ((module) => {
1075
-
1076
- module.exports = require("node:path");
1077
-
1078
- /***/ }),
1079
-
1080
- /***/ 77598:
1081
- /***/ ((module) => {
1082
-
1083
- module.exports = require("node:crypto");
1084
-
1085
- /***/ }),
1086
-
1087
- /***/ 79428:
1088
- /***/ ((module) => {
1089
-
1090
- module.exports = require("buffer");
1091
1091
 
1092
1092
  /***/ }),
1093
1093
 
@@ -1140,7 +1140,7 @@ module.exports = import("@huggingface/transformers");;
1140
1140
  var __webpack_require__ = require("../../../../webpack-runtime.js");
1141
1141
  __webpack_require__.C(exports);
1142
1142
  var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
1143
- var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,1813,7981,4992,46,3042], () => (__webpack_exec__(27823)));
1143
+ var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,1813,7981,4992,46,3042], () => (__webpack_exec__(80058)));
1144
1144
  module.exports = __webpack_exports__;
1145
1145
 
1146
1146
  })();