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