@circuitwall/jarela 2.2.0 → 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 (683) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-path-routes-manifest.json +4 -3
  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 +204 -163
  136. package/.next/standalone/.next/server/app/api/v1/models/route.js +548 -546
  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 +71 -68
  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 +1170 -719
  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 +4 -3
  221. package/.next/standalone/.next/server/chunks/{424.js → 1388.js} +345 -991
  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 +45 -45
  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 +10695 -10695
  233. package/.next/standalone/.next/server/chunks/3524.js +5 -33
  234. package/.next/standalone/.next/server/chunks/3566.js +1 -1
  235. package/.next/standalone/.next/server/chunks/4189.js +946 -0
  236. package/.next/standalone/.next/server/chunks/{9590.js → 423.js} +116 -49
  237. package/.next/standalone/.next/server/chunks/4433.js +146 -146
  238. package/.next/standalone/.next/server/chunks/4508.js +3 -3
  239. package/.next/standalone/.next/server/chunks/4588.js +1 -0
  240. package/.next/standalone/.next/server/chunks/46.js +116 -46
  241. package/.next/standalone/.next/server/chunks/466.js +100 -13
  242. package/.next/standalone/.next/server/chunks/4868.js +206 -206
  243. package/.next/standalone/.next/server/chunks/4992.js +13 -0
  244. package/.next/standalone/.next/server/chunks/5120.js +963 -0
  245. package/.next/standalone/.next/server/chunks/5701.js +1 -1
  246. package/.next/standalone/.next/server/chunks/5900.js +1 -1
  247. package/.next/standalone/.next/server/chunks/6210.js +1 -0
  248. package/.next/standalone/.next/server/chunks/6213.js +1 -1
  249. package/.next/standalone/.next/server/chunks/6649.js +3 -3
  250. package/.next/standalone/.next/server/chunks/6703.js +3 -3
  251. package/.next/standalone/.next/server/chunks/7445.js +1 -0
  252. package/.next/standalone/.next/server/chunks/8067.js +12 -0
  253. package/.next/standalone/.next/server/chunks/8461.js +14 -9
  254. package/.next/standalone/.next/server/chunks/8558.js +1 -1
  255. package/.next/standalone/.next/server/chunks/8724.js +1 -1
  256. package/.next/standalone/.next/server/chunks/8849.js +91 -91
  257. package/.next/standalone/.next/server/chunks/9032.js +6 -5
  258. package/.next/standalone/.next/server/chunks/{2563.js → 9164.js} +33106 -31420
  259. package/.next/standalone/.next/server/chunks/9237.js +396 -396
  260. package/.next/standalone/.next/server/chunks/{9640.js → 9304.js} +1628 -573
  261. package/.next/standalone/.next/server/chunks/9406.js +1 -1
  262. package/.next/standalone/.next/server/chunks/9824.js +98 -98
  263. package/.next/standalone/.next/server/chunks/9826.js +1 -0
  264. package/.next/standalone/.next/server/middleware-build-manifest.js +2 -2
  265. package/.next/standalone/.next/server/middleware.js +519 -442
  266. package/.next/standalone/.next/server/pages/404.html +2 -2
  267. package/.next/standalone/.next/server/pages/500.html +1 -1
  268. package/.next/standalone/.next/server/preview-props.json +3 -3
  269. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  270. package/.next/standalone/.next/static/chunks/{1395-f201e3e2e1f57715.js → 1395-e4a99912b8f83044.js} +101 -14
  271. package/.next/standalone/.next/static/chunks/{4576-13f7546a145a3624.js → 7045-8bc2f14e430ca661.js} +58 -2
  272. package/.next/standalone/.next/static/chunks/app/_global-error/{page-36cb8b428b38b26a.js → page-6fc5f8e744c81802.js} +1 -1
  273. package/.next/standalone/.next/static/chunks/app/api/v1/access/[identity]/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
  274. package/.next/standalone/.next/static/chunks/app/api/v1/access/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
  275. package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/compact/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
  276. package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-6fc5f8e744c81802.js +17 -0
  277. package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-6fc5f8e744c81802.js +17 -0
  278. package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-6fc5f8e744c81802.js +17 -0
  279. package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-6fc5f8e744c81802.js +17 -0
  280. package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/[hostname]/route-6fc5f8e744c81802.js +17 -0
  281. package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/route-6fc5f8e744c81802.js +17 -0
  282. package/.next/standalone/.next/static/chunks/app/api/v1/artifacts/lifecycle/route-6fc5f8e744c81802.js +17 -0
  283. package/.next/standalone/.next/static/chunks/app/api/v1/attachments/files/route-6fc5f8e744c81802.js +17 -0
  284. package/.next/standalone/.next/static/chunks/app/api/v1/attachments/images/route-6fc5f8e744c81802.js +17 -0
  285. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-6fc5f8e744c81802.js +17 -0
  286. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/[remote_jid]/route-6fc5f8e744c81802.js +17 -0
  287. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/route-6fc5f8e744c81802.js +17 -0
  288. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-6fc5f8e744c81802.js +17 -0
  289. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-6fc5f8e744c81802.js +17 -0
  290. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-6fc5f8e744c81802.js +17 -0
  291. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-6fc5f8e744c81802.js +17 -0
  292. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-6fc5f8e744c81802.js +17 -0
  293. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-6fc5f8e744c81802.js +17 -0
  294. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/kinds/route-6fc5f8e744c81802.js +17 -0
  295. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-6fc5f8e744c81802.js +17 -0
  296. package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-6fc5f8e744c81802.js +17 -0
  297. package/.next/standalone/.next/static/chunks/app/api/v1/config/route-6fc5f8e744c81802.js +17 -0
  298. package/.next/standalone/.next/static/chunks/app/api/v1/credentials/[id]/route-6fc5f8e744c81802.js +17 -0
  299. package/.next/standalone/.next/static/chunks/app/api/v1/credentials/route-6fc5f8e744c81802.js +17 -0
  300. package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/currency/route-6fc5f8e744c81802.js +17 -0
  301. package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/metrics/route-6fc5f8e744c81802.js +17 -0
  302. package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing/route-6fc5f8e744c81802.js +17 -0
  303. package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing-task/route-6fc5f8e744c81802.js +17 -0
  304. package/.next/standalone/.next/static/chunks/app/api/v1/delegations/codex/[job_id]/route-6fc5f8e744c81802.js +17 -0
  305. package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-6fc5f8e744c81802.js +17 -0
  306. package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-6fc5f8e744c81802.js +17 -0
  307. package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-6fc5f8e744c81802.js +17 -0
  308. package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-6fc5f8e744c81802.js +17 -0
  309. package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-6fc5f8e744c81802.js +17 -0
  310. package/.next/standalone/.next/static/chunks/app/api/v1/env/route-6fc5f8e744c81802.js +17 -0
  311. package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-6fc5f8e744c81802.js +17 -0
  312. package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-6fc5f8e744c81802.js +17 -0
  313. package/.next/standalone/.next/static/chunks/app/api/v1/events/route-6fc5f8e744c81802.js +17 -0
  314. package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-6fc5f8e744c81802.js +17 -0
  315. package/.next/standalone/.next/static/chunks/app/api/v1/extension/agents/route-6fc5f8e744c81802.js +17 -0
  316. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/activate/route-6fc5f8e744c81802.js +17 -0
  317. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/foreground/route-6fc5f8e744c81802.js +17 -0
  318. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/history/route-6fc5f8e744c81802.js +17 -0
  319. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/poll/route-6fc5f8e744c81802.js +17 -0
  320. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/progress/route-6fc5f8e744c81802.js +17 -0
  321. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/result/route-6fc5f8e744c81802.js +17 -0
  322. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/retry/route-6fc5f8e744c81802.js +17 -0
  323. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/status/route-6fc5f8e744c81802.js +17 -0
  324. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/tabs/route-6fc5f8e744c81802.js +17 -0
  325. package/.next/standalone/.next/static/chunks/app/api/v1/extension/fill/route-6fc5f8e744c81802.js +17 -0
  326. package/.next/standalone/.next/static/chunks/app/api/v1/extension/refine/route-6fc5f8e744c81802.js +17 -0
  327. package/.next/standalone/.next/static/chunks/app/api/v1/extension/turn/route-6fc5f8e744c81802.js +17 -0
  328. package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-6fc5f8e744c81802.js +17 -0
  329. package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/config/route-6fc5f8e744c81802.js +17 -0
  330. package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/route-6fc5f8e744c81802.js +17 -0
  331. package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-6fc5f8e744c81802.js +17 -0
  332. package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-6fc5f8e744c81802.js +17 -0
  333. package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-6fc5f8e744c81802.js +17 -0
  334. package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-6fc5f8e744c81802.js +17 -0
  335. package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-6fc5f8e744c81802.js +17 -0
  336. package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-6fc5f8e744c81802.js +17 -0
  337. package/.next/standalone/.next/static/chunks/app/api/v1/health/probes/route-6fc5f8e744c81802.js +17 -0
  338. package/.next/standalone/.next/static/chunks/app/api/v1/health/route-6fc5f8e744c81802.js +17 -0
  339. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-6fc5f8e744c81802.js +17 -0
  340. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-6fc5f8e744c81802.js +17 -0
  341. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-6fc5f8e744c81802.js +17 -0
  342. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-6fc5f8e744c81802.js +17 -0
  343. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-6fc5f8e744c81802.js +17 -0
  344. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-6fc5f8e744c81802.js +17 -0
  345. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-6fc5f8e744c81802.js +17 -0
  346. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-6fc5f8e744c81802.js +17 -0
  347. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-6fc5f8e744c81802.js +17 -0
  348. package/.next/standalone/.next/static/chunks/app/api/v1/lifecycle/adoption/route-6fc5f8e744c81802.js +17 -0
  349. package/.next/standalone/.next/static/chunks/app/api/v1/local-file/route-6fc5f8e744c81802.js +17 -0
  350. package/.next/standalone/.next/static/chunks/app/api/v1/logs/route-6fc5f8e744c81802.js +17 -0
  351. package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-6fc5f8e744c81802.js +17 -0
  352. package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-6fc5f8e744c81802.js +17 -0
  353. package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-6fc5f8e744c81802.js +17 -0
  354. package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-6fc5f8e744c81802.js +17 -0
  355. package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-6fc5f8e744c81802.js +17 -0
  356. package/.next/standalone/.next/static/chunks/app/api/v1/memory/policy/route-6fc5f8e744c81802.js +17 -0
  357. package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-6fc5f8e744c81802.js +17 -0
  358. package/.next/standalone/.next/static/chunks/app/api/v1/memory/search/route-6fc5f8e744c81802.js +17 -0
  359. package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/compact-threads/route-6fc5f8e744c81802.js +17 -0
  360. package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-6fc5f8e744c81802.js +17 -0
  361. package/.next/standalone/.next/static/chunks/app/api/v1/models/route-6fc5f8e744c81802.js +17 -0
  362. package/.next/standalone/.next/static/chunks/app/api/v1/packages/catalog/route-6fc5f8e744c81802.js +17 -0
  363. package/.next/standalone/.next/static/chunks/app/api/v1/packages/defaults/[id]/route-6fc5f8e744c81802.js +17 -0
  364. package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/[id]/route-6fc5f8e744c81802.js +17 -0
  365. package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/route-6fc5f8e744c81802.js +17 -0
  366. package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/enabled/route-6fc5f8e744c81802.js +17 -0
  367. package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/route-6fc5f8e744c81802.js +17 -0
  368. package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/route-6fc5f8e744c81802.js +17 -0
  369. package/.next/standalone/.next/static/chunks/app/api/v1/packages/reload/route-6fc5f8e744c81802.js +17 -0
  370. package/.next/standalone/.next/static/chunks/app/api/v1/packages/route-6fc5f8e744c81802.js +17 -0
  371. package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-6fc5f8e744c81802.js +17 -0
  372. package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-6fc5f8e744c81802.js +17 -0
  373. package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-6fc5f8e744c81802.js +17 -0
  374. package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-6fc5f8e744c81802.js +17 -0
  375. package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-6fc5f8e744c81802.js +17 -0
  376. package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-6fc5f8e744c81802.js +17 -0
  377. package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-6fc5f8e744c81802.js +17 -0
  378. package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/probe/route-6fc5f8e744c81802.js +17 -0
  379. package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-6fc5f8e744c81802.js +17 -0
  380. package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-6fc5f8e744c81802.js +17 -0
  381. package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-6fc5f8e744c81802.js +17 -0
  382. package/.next/standalone/.next/static/chunks/app/api/v1/redaction/init/route-6fc5f8e744c81802.js +17 -0
  383. package/.next/standalone/.next/static/chunks/app/api/v1/redaction/route-6fc5f8e744c81802.js +17 -0
  384. package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-6fc5f8e744c81802.js +17 -0
  385. package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-6fc5f8e744c81802.js +17 -0
  386. package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-6fc5f8e744c81802.js +17 -0
  387. package/.next/standalone/.next/static/chunks/app/api/v1/security/idle-timeout/route-6fc5f8e744c81802.js +17 -0
  388. package/.next/standalone/.next/static/chunks/app/api/v1/security/pin/route-6fc5f8e744c81802.js +17 -0
  389. package/.next/standalone/.next/static/chunks/app/api/v1/security/state/route-6fc5f8e744c81802.js +17 -0
  390. package/.next/standalone/.next/static/chunks/app/api/v1/security/unlock/route-6fc5f8e744c81802.js +17 -0
  391. package/.next/standalone/.next/static/chunks/app/api/v1/security/verify-pin/route-6fc5f8e744c81802.js +17 -0
  392. package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-6fc5f8e744c81802.js +17 -0
  393. package/.next/standalone/.next/static/chunks/app/api/v1/skills/[id]/route-6fc5f8e744c81802.js +17 -0
  394. package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/[id]/route-6fc5f8e744c81802.js +17 -0
  395. package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/route-6fc5f8e744c81802.js +17 -0
  396. package/.next/standalone/.next/static/chunks/app/api/v1/skills/route-6fc5f8e744c81802.js +17 -0
  397. package/.next/standalone/.next/static/chunks/app/api/v1/system/abort/route-6fc5f8e744c81802.js +17 -0
  398. package/.next/standalone/.next/static/chunks/app/api/v1/system/restart/route-6fc5f8e744c81802.js +17 -0
  399. package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-6fc5f8e744c81802.js +17 -0
  400. package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-6fc5f8e744c81802.js +17 -0
  401. package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-6fc5f8e744c81802.js +17 -0
  402. package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/activity/route-6fc5f8e744c81802.js +17 -0
  403. package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/context-pin/route-6fc5f8e744c81802.js +17 -0
  404. package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-6fc5f8e744c81802.js +17 -0
  405. package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-6fc5f8e744c81802.js +17 -0
  406. package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-6fc5f8e744c81802.js +17 -0
  407. package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-6fc5f8e744c81802.js +17 -0
  408. package/.next/standalone/.next/static/chunks/app/api/v1/update/apply/route-6fc5f8e744c81802.js +17 -0
  409. package/.next/standalone/.next/static/chunks/app/api/v1/update/route-6fc5f8e744c81802.js +17 -0
  410. package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-6fc5f8e744c81802.js +17 -0
  411. package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-6fc5f8e744c81802.js +17 -0
  412. package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-6fc5f8e744c81802.js +17 -0
  413. package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-6fc5f8e744c81802.js +17 -0
  414. package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-6fc5f8e744c81802.js +17 -0
  415. package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-6fc5f8e744c81802.js +17 -0
  416. package/.next/standalone/.next/static/chunks/app/manifest.webmanifest/route-6fc5f8e744c81802.js +17 -0
  417. package/.next/standalone/.next/static/chunks/app/{page-c6e972a7fd13dae8.js → page-213a623b37226452.js} +1012 -604
  418. package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-6fc5f8e744c81802.js +17 -0
  419. package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-6fc5f8e744c81802.js +17 -0
  420. package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-6fc5f8e744c81802.js +17 -0
  421. package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-6fc5f8e744c81802.js +17 -0
  422. package/.next/standalone/.next/static/css/{d80058f0b9b41c09.css → 312542a5725ba0d5.css} +2 -2
  423. package/.next/standalone/docs/adoption/changesets.json +309 -0
  424. package/.next/standalone/lib/skills/builtins/memory-organization/SKILL.md +16 -0
  425. package/.next/standalone/package.json +3 -3
  426. package/CHANGELOG.md +33 -0
  427. package/api/client.models.test.ts +31 -0
  428. package/api/client.ts +25 -1
  429. package/api/types.ts +37 -0
  430. package/app/api/v1/lifecycle/adoption/route.ts +14 -2
  431. package/app/api/v1/models/[name]/compact-threads/route.ts +14 -11
  432. package/app/api/v1/models/[name]/route.test.ts +89 -0
  433. package/app/api/v1/models/[name]/route.ts +54 -3
  434. package/app/api/v1/models/route.ts +4 -2
  435. package/app/api/v1/providers/[provider]/models/route.test.ts +53 -0
  436. package/app/api/v1/providers/[provider]/models/route.ts +27 -16
  437. package/app/api/v1/threads/[thread_id]/activity/route.ts +19 -0
  438. package/app/api/v1/threads/[thread_id]/context-pin/route.test.ts +1 -0
  439. package/app/api/v1/threads/[thread_id]/context-pin/route.ts +2 -1
  440. package/app/api/v1/threads/[thread_id]/route.ts +5 -1
  441. package/components/agents/agent-editor/AdvancedSection.tsx +8 -2
  442. package/components/agents/agent-editor/ModelSection.tsx +6 -3
  443. package/components/chat/ChatView.tsx +52 -11
  444. package/components/chat/ContextBoundary.test.tsx +68 -1
  445. package/components/chat/ContextBoundary.tsx +92 -13
  446. package/components/chat/MessageList.test.tsx +31 -0
  447. package/components/chat/MessageList.tsx +49 -28
  448. package/components/chat/ToolList.test.tsx +92 -16
  449. package/components/chat/ToolList.tsx +59 -4
  450. package/components/chat/chat-helpers.test.tsx +24 -1
  451. package/components/chat/chat-helpers.ts +47 -4
  452. package/components/chat/useThreadActivity.test.tsx +113 -0
  453. package/components/chat/useThreadActivity.ts +94 -0
  454. package/components/chat/useThreadData.ts +16 -16
  455. package/components/chat/workflow-step-retry.ts +25 -0
  456. package/components/models/ModelEditor.tsx +1 -1
  457. package/components/models/ModelsPanel.tsx +34 -8
  458. package/components/models/model-editor/GitHubCopilotAuth.tsx +1 -1
  459. package/components/models/model-editor/save-helpers.ts +2 -2
  460. package/components/models/model-editor/useModelEditorForm.ts +1 -1
  461. package/components/models/model-editor/useModelSaveHandlers.ts +1 -1
  462. package/components/setup/wizard/StepCredentials.tsx +1 -1
  463. package/components/setup/wizard/StepModel.tsx +3 -8
  464. package/components/ui/BootScreen.tsx +17 -0
  465. package/components/ui/WorkflowChecklist.tsx +71 -33
  466. package/hooks/useModels.ts +17 -1
  467. package/hooks/useSSE.ts +28 -3
  468. package/lib/agents/compaction-pipeline.test.ts +202 -0
  469. package/lib/agents/compaction-pipeline.ts +483 -0
  470. package/lib/agents/conversation-summary.ts +37 -21
  471. package/lib/agents/effective-model.test.ts +45 -0
  472. package/lib/agents/effective-model.ts +11 -5
  473. package/lib/agents/llm.ts +2 -2
  474. package/lib/agents/prepare/history-window.test.ts +18 -0
  475. package/lib/agents/prepare/history-window.ts +11 -2
  476. package/lib/agents/prepare/request.ts +4 -0
  477. package/lib/agents/prepare/system-prompt.test.ts +39 -0
  478. package/lib/agents/prepare/system-prompt.ts +8 -3
  479. package/lib/agents/prompt-registry.test.ts +5 -140
  480. package/lib/agents/prompt-registry.ts +45 -1
  481. package/lib/agents/prompt-variants.ts +146 -0
  482. package/lib/agents/run-registry.test.ts +22 -0
  483. package/lib/agents/run-registry.ts +29 -0
  484. package/lib/agents/run-thread.retry.test.ts +67 -1
  485. package/lib/agents/run-thread.ts +96 -6
  486. package/lib/agents/thread-activity.test.ts +31 -0
  487. package/lib/agents/thread-activity.ts +27 -0
  488. package/lib/agents/thread-compaction-state.test.ts +82 -0
  489. package/lib/agents/thread-compaction-state.ts +121 -0
  490. package/lib/agents/thread-compaction.test.ts +83 -4
  491. package/lib/agents/thread-compaction.ts +34 -11
  492. package/lib/agents/warm-summary-background.test.ts +220 -7
  493. package/lib/agents/warm-summary-background.ts +329 -149
  494. package/lib/agents/warm-topics.test.ts +37 -0
  495. package/lib/agents/warm-topics.ts +297 -0
  496. package/lib/agents/workflow-step-retry.test.ts +96 -0
  497. package/lib/agents/workflow-step-retry.ts +216 -0
  498. package/lib/api/browser-control.ts +0 -3
  499. package/lib/db/migrations.ts +15 -0
  500. package/lib/env/config.ts +2 -0
  501. package/lib/env/schema.ts +12 -0
  502. package/lib/health/probes.test.ts +8 -11
  503. package/lib/health/probes.ts +5 -31
  504. package/lib/lifecycle/changeset-build.test.ts +93 -0
  505. package/lib/lifecycle/changeset-build.ts +210 -0
  506. package/lib/lifecycle/changesets.test.ts +101 -0
  507. package/lib/lifecycle/changesets.ts +166 -0
  508. package/lib/lifecycle/surface-collect.test.ts +88 -0
  509. package/lib/lifecycle/surface-collect.ts +64 -0
  510. package/lib/lifecycle/surface-snapshot.test.ts +104 -0
  511. package/lib/lifecycle/surface-snapshot.ts +210 -0
  512. package/lib/memory/record.ts +0 -2
  513. package/lib/models/editor-payload.ts +1 -1
  514. package/lib/providers/external.ts +0 -2
  515. package/lib/providers/github-copilot-auth.ts +2 -3
  516. package/lib/providers/github-copilot.test.ts +27 -0
  517. package/lib/providers/github-copilot.ts +21 -44
  518. package/lib/skills/builtins/memory-organization/SKILL.md +16 -0
  519. package/lib/stores/integrations.test.ts +7 -0
  520. package/lib/stores/integrations.ts +4 -4
  521. package/lib/stores/model-config.test.ts +88 -0
  522. package/lib/stores/model-config.ts +90 -8
  523. package/lib/stores/threads.test.ts +9 -0
  524. package/lib/stores/threads.ts +21 -11
  525. package/lib/stores/version-adoption.test.ts +96 -0
  526. package/lib/stores/version-adoption.ts +239 -26
  527. package/lib/stores/workflow-progress.ts +3 -0
  528. package/lib/tools/communications/ms-todo.ts +0 -7
  529. package/lib/tools/general/memory.ts +1 -1
  530. package/lib/tools/general/workflow-progress.ts +2 -0
  531. package/lib/tools/runtime/catalog.ts +1 -25
  532. package/lib/triggers/registry.ts +0 -4
  533. package/package.json +3 -3
  534. package/scripts/install-to-system.ps1 +39 -11
  535. package/scripts/install-to-system.sh +37 -3
  536. package/.next/standalone/.next/server/chunks/3979.js +0 -581
  537. package/.next/standalone/.next/server/chunks/5936.js +0 -594
  538. package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-36cb8b428b38b26a.js +0 -17
  539. package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-36cb8b428b38b26a.js +0 -17
  540. package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-36cb8b428b38b26a.js +0 -17
  541. package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-36cb8b428b38b26a.js +0 -17
  542. package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/[hostname]/route-36cb8b428b38b26a.js +0 -17
  543. package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/route-36cb8b428b38b26a.js +0 -17
  544. package/.next/standalone/.next/static/chunks/app/api/v1/artifacts/lifecycle/route-36cb8b428b38b26a.js +0 -17
  545. package/.next/standalone/.next/static/chunks/app/api/v1/attachments/files/route-36cb8b428b38b26a.js +0 -17
  546. package/.next/standalone/.next/static/chunks/app/api/v1/attachments/images/route-36cb8b428b38b26a.js +0 -17
  547. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-36cb8b428b38b26a.js +0 -17
  548. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/[remote_jid]/route-36cb8b428b38b26a.js +0 -17
  549. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/route-36cb8b428b38b26a.js +0 -17
  550. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-36cb8b428b38b26a.js +0 -17
  551. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-36cb8b428b38b26a.js +0 -17
  552. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-36cb8b428b38b26a.js +0 -17
  553. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-36cb8b428b38b26a.js +0 -17
  554. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-36cb8b428b38b26a.js +0 -17
  555. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-36cb8b428b38b26a.js +0 -17
  556. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/kinds/route-36cb8b428b38b26a.js +0 -17
  557. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-36cb8b428b38b26a.js +0 -17
  558. package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-36cb8b428b38b26a.js +0 -17
  559. package/.next/standalone/.next/static/chunks/app/api/v1/config/route-36cb8b428b38b26a.js +0 -17
  560. package/.next/standalone/.next/static/chunks/app/api/v1/credentials/[id]/route-36cb8b428b38b26a.js +0 -17
  561. package/.next/standalone/.next/static/chunks/app/api/v1/credentials/route-36cb8b428b38b26a.js +0 -17
  562. package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/currency/route-36cb8b428b38b26a.js +0 -17
  563. package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/metrics/route-36cb8b428b38b26a.js +0 -17
  564. package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing/route-36cb8b428b38b26a.js +0 -17
  565. package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing-task/route-36cb8b428b38b26a.js +0 -17
  566. package/.next/standalone/.next/static/chunks/app/api/v1/delegations/codex/[job_id]/route-36cb8b428b38b26a.js +0 -17
  567. package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-36cb8b428b38b26a.js +0 -17
  568. package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-36cb8b428b38b26a.js +0 -17
  569. package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-36cb8b428b38b26a.js +0 -17
  570. package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-36cb8b428b38b26a.js +0 -17
  571. package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-36cb8b428b38b26a.js +0 -17
  572. package/.next/standalone/.next/static/chunks/app/api/v1/env/route-36cb8b428b38b26a.js +0 -17
  573. package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-36cb8b428b38b26a.js +0 -17
  574. package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-36cb8b428b38b26a.js +0 -17
  575. package/.next/standalone/.next/static/chunks/app/api/v1/events/route-36cb8b428b38b26a.js +0 -17
  576. package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-36cb8b428b38b26a.js +0 -17
  577. package/.next/standalone/.next/static/chunks/app/api/v1/extension/agents/route-36cb8b428b38b26a.js +0 -17
  578. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/activate/route-36cb8b428b38b26a.js +0 -17
  579. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/foreground/route-36cb8b428b38b26a.js +0 -17
  580. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/history/route-36cb8b428b38b26a.js +0 -17
  581. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/poll/route-36cb8b428b38b26a.js +0 -17
  582. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/progress/route-36cb8b428b38b26a.js +0 -17
  583. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/result/route-36cb8b428b38b26a.js +0 -17
  584. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/retry/route-36cb8b428b38b26a.js +0 -17
  585. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/status/route-36cb8b428b38b26a.js +0 -17
  586. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/tabs/route-36cb8b428b38b26a.js +0 -17
  587. package/.next/standalone/.next/static/chunks/app/api/v1/extension/fill/route-36cb8b428b38b26a.js +0 -17
  588. package/.next/standalone/.next/static/chunks/app/api/v1/extension/refine/route-36cb8b428b38b26a.js +0 -17
  589. package/.next/standalone/.next/static/chunks/app/api/v1/extension/turn/route-36cb8b428b38b26a.js +0 -17
  590. package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-36cb8b428b38b26a.js +0 -17
  591. package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/config/route-36cb8b428b38b26a.js +0 -17
  592. package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/route-36cb8b428b38b26a.js +0 -17
  593. package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-36cb8b428b38b26a.js +0 -17
  594. package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-36cb8b428b38b26a.js +0 -17
  595. package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-36cb8b428b38b26a.js +0 -17
  596. package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-36cb8b428b38b26a.js +0 -17
  597. package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-36cb8b428b38b26a.js +0 -17
  598. package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-36cb8b428b38b26a.js +0 -17
  599. package/.next/standalone/.next/static/chunks/app/api/v1/health/probes/route-36cb8b428b38b26a.js +0 -17
  600. package/.next/standalone/.next/static/chunks/app/api/v1/health/route-36cb8b428b38b26a.js +0 -17
  601. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-36cb8b428b38b26a.js +0 -17
  602. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-36cb8b428b38b26a.js +0 -17
  603. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-36cb8b428b38b26a.js +0 -17
  604. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-36cb8b428b38b26a.js +0 -17
  605. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-36cb8b428b38b26a.js +0 -17
  606. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-36cb8b428b38b26a.js +0 -17
  607. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-36cb8b428b38b26a.js +0 -17
  608. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-36cb8b428b38b26a.js +0 -17
  609. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-36cb8b428b38b26a.js +0 -17
  610. package/.next/standalone/.next/static/chunks/app/api/v1/lifecycle/adoption/route-36cb8b428b38b26a.js +0 -17
  611. package/.next/standalone/.next/static/chunks/app/api/v1/local-file/route-36cb8b428b38b26a.js +0 -17
  612. package/.next/standalone/.next/static/chunks/app/api/v1/logs/route-36cb8b428b38b26a.js +0 -17
  613. package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-36cb8b428b38b26a.js +0 -17
  614. package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-36cb8b428b38b26a.js +0 -17
  615. package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-36cb8b428b38b26a.js +0 -17
  616. package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-36cb8b428b38b26a.js +0 -17
  617. package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-36cb8b428b38b26a.js +0 -17
  618. package/.next/standalone/.next/static/chunks/app/api/v1/memory/policy/route-36cb8b428b38b26a.js +0 -17
  619. package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-36cb8b428b38b26a.js +0 -17
  620. package/.next/standalone/.next/static/chunks/app/api/v1/memory/search/route-36cb8b428b38b26a.js +0 -17
  621. package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/compact-threads/route-36cb8b428b38b26a.js +0 -17
  622. package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-36cb8b428b38b26a.js +0 -17
  623. package/.next/standalone/.next/static/chunks/app/api/v1/models/route-36cb8b428b38b26a.js +0 -17
  624. package/.next/standalone/.next/static/chunks/app/api/v1/packages/catalog/route-36cb8b428b38b26a.js +0 -17
  625. package/.next/standalone/.next/static/chunks/app/api/v1/packages/defaults/[id]/route-36cb8b428b38b26a.js +0 -17
  626. package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/[id]/route-36cb8b428b38b26a.js +0 -17
  627. package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/route-36cb8b428b38b26a.js +0 -17
  628. package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/enabled/route-36cb8b428b38b26a.js +0 -17
  629. package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/route-36cb8b428b38b26a.js +0 -17
  630. package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/route-36cb8b428b38b26a.js +0 -17
  631. package/.next/standalone/.next/static/chunks/app/api/v1/packages/reload/route-36cb8b428b38b26a.js +0 -17
  632. package/.next/standalone/.next/static/chunks/app/api/v1/packages/route-36cb8b428b38b26a.js +0 -17
  633. package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-36cb8b428b38b26a.js +0 -17
  634. package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-36cb8b428b38b26a.js +0 -17
  635. package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-36cb8b428b38b26a.js +0 -17
  636. package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-36cb8b428b38b26a.js +0 -17
  637. package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-36cb8b428b38b26a.js +0 -17
  638. package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-36cb8b428b38b26a.js +0 -17
  639. package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-36cb8b428b38b26a.js +0 -17
  640. package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/probe/route-36cb8b428b38b26a.js +0 -17
  641. package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-36cb8b428b38b26a.js +0 -17
  642. package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-36cb8b428b38b26a.js +0 -17
  643. package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-36cb8b428b38b26a.js +0 -17
  644. package/.next/standalone/.next/static/chunks/app/api/v1/redaction/init/route-36cb8b428b38b26a.js +0 -17
  645. package/.next/standalone/.next/static/chunks/app/api/v1/redaction/route-36cb8b428b38b26a.js +0 -17
  646. package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-36cb8b428b38b26a.js +0 -17
  647. package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-36cb8b428b38b26a.js +0 -17
  648. package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-36cb8b428b38b26a.js +0 -17
  649. package/.next/standalone/.next/static/chunks/app/api/v1/security/idle-timeout/route-36cb8b428b38b26a.js +0 -17
  650. package/.next/standalone/.next/static/chunks/app/api/v1/security/pin/route-36cb8b428b38b26a.js +0 -17
  651. package/.next/standalone/.next/static/chunks/app/api/v1/security/state/route-36cb8b428b38b26a.js +0 -17
  652. package/.next/standalone/.next/static/chunks/app/api/v1/security/unlock/route-36cb8b428b38b26a.js +0 -17
  653. package/.next/standalone/.next/static/chunks/app/api/v1/security/verify-pin/route-36cb8b428b38b26a.js +0 -17
  654. package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-36cb8b428b38b26a.js +0 -17
  655. package/.next/standalone/.next/static/chunks/app/api/v1/skills/[id]/route-36cb8b428b38b26a.js +0 -17
  656. package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/[id]/route-36cb8b428b38b26a.js +0 -17
  657. package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/route-36cb8b428b38b26a.js +0 -17
  658. package/.next/standalone/.next/static/chunks/app/api/v1/skills/route-36cb8b428b38b26a.js +0 -17
  659. package/.next/standalone/.next/static/chunks/app/api/v1/system/abort/route-36cb8b428b38b26a.js +0 -17
  660. package/.next/standalone/.next/static/chunks/app/api/v1/system/restart/route-36cb8b428b38b26a.js +0 -17
  661. package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-36cb8b428b38b26a.js +0 -17
  662. package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-36cb8b428b38b26a.js +0 -17
  663. package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-36cb8b428b38b26a.js +0 -17
  664. package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/context-pin/route-36cb8b428b38b26a.js +0 -17
  665. package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-36cb8b428b38b26a.js +0 -17
  666. package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-36cb8b428b38b26a.js +0 -17
  667. package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-36cb8b428b38b26a.js +0 -17
  668. package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-36cb8b428b38b26a.js +0 -17
  669. package/.next/standalone/.next/static/chunks/app/api/v1/update/apply/route-36cb8b428b38b26a.js +0 -17
  670. package/.next/standalone/.next/static/chunks/app/api/v1/update/route-36cb8b428b38b26a.js +0 -17
  671. package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-36cb8b428b38b26a.js +0 -17
  672. package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-36cb8b428b38b26a.js +0 -17
  673. package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-36cb8b428b38b26a.js +0 -17
  674. package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-36cb8b428b38b26a.js +0 -17
  675. package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-36cb8b428b38b26a.js +0 -17
  676. package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-36cb8b428b38b26a.js +0 -17
  677. package/.next/standalone/.next/static/chunks/app/manifest.webmanifest/route-36cb8b428b38b26a.js +0 -17
  678. package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-36cb8b428b38b26a.js +0 -17
  679. package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-36cb8b428b38b26a.js +0 -17
  680. package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-36cb8b428b38b26a.js +0 -17
  681. package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-36cb8b428b38b26a.js +0 -17
  682. /package/.next/standalone/.next/static/{e2NV1wk6mWg3SIeELXevg → bMRK5y3ruT7c3WtBfCQOG}/_buildManifest.js +0 -0
  683. /package/.next/standalone/.next/static/{e2NV1wk6mWg3SIeELXevg → bMRK5y3ruT7c3WtBfCQOG}/_ssgManifest.js +0 -0
@@ -322,820 +322,820 @@ module.exports = require("node:http");
322
322
 
323
323
  /***/ }),
324
324
 
325
- /***/ 38241:
326
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
327
-
328
- __webpack_require__.r(__webpack_exports__);
329
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
330
- /* harmony export */ handler: () => (/* binding */ handler),
331
- /* harmony export */ patchFetch: () => (/* binding */ patchFetch),
332
- /* harmony export */ routeModule: () => (/* binding */ routeModule),
333
- /* harmony export */ serverHooks: () => (/* binding */ serverHooks),
334
- /* harmony export */ workAsyncStorage: () => (/* binding */ workAsyncStorage),
335
- /* harmony export */ workUnitAsyncStorage: () => (/* binding */ workUnitAsyncStorage)
336
- /* harmony export */ });
337
- /* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19225);
338
- /* 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__);
339
- /* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84006);
340
- /* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8317);
341
- /* 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__);
342
- /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99373);
343
- /* 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__);
344
- /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34775);
345
- /* 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__);
346
- /* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24235);
347
- /* 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__);
348
- /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(261);
349
- /* 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__);
350
- /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(54365);
351
- /* 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__);
352
- /* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90771);
353
- /* 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__);
354
- /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(73461);
355
- /* 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__);
356
- /* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67798);
357
- /* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(92280);
358
- /* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(62018);
359
- /* 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__);
360
- /* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(45696);
361
- /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(47929);
362
- /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
363
- /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(86439);
364
- /* 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__);
365
- /* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(10246);
366
- /* 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__);
367
- /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(37527);
368
- /* 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__);
369
-
370
-
371
-
372
-
373
-
374
-
375
-
376
-
377
-
378
-
379
-
380
-
325
+ /***/ 38522:
326
+ /***/ ((module) => {
381
327
 
328
+ module.exports = require("node:zlib");
382
329
 
330
+ /***/ }),
383
331
 
332
+ /***/ 41720:
333
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
384
334
 
335
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
336
+ /* harmony export */ BM: () => (/* binding */ upsertAgentConfig),
337
+ /* harmony export */ E1: () => (/* binding */ updateAgentDisplayFilters),
338
+ /* harmony export */ P2: () => (/* binding */ parseCitationStrictness),
339
+ /* harmony export */ S2: () => (/* binding */ getAgentToolCredentials),
340
+ /* harmony export */ SJ: () => (/* binding */ generateAgentId),
341
+ /* harmony export */ TG: () => (/* binding */ getAgentTools),
342
+ /* harmony export */ bg: () => (/* binding */ parseDelegateTargets),
343
+ /* harmony export */ d2: () => (/* binding */ DISPLAY_FILTER_KEYS),
344
+ /* harmony export */ fg: () => (/* binding */ getAgentTierProportions),
345
+ /* harmony export */ mJ: () => (/* binding */ getAgentConfig),
346
+ /* harmony export */ nV: () => (/* binding */ getAgentDisplayFilters),
347
+ /* harmony export */ vU: () => (/* binding */ getDefaultAgentConfig),
348
+ /* harmony export */ vi: () => (/* binding */ DISPLAY_FILTER_DEFAULTS),
349
+ /* harmony export */ xi: () => (/* binding */ deleteAgentConfig),
350
+ /* harmony export */ zb: () => (/* binding */ listAgentConfigs)
351
+ /* harmony export */ });
352
+ /* harmony import */ var _lib_db__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(46);
353
+ /* harmony import */ var _lib_db_transaction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(99043);
354
+ /* harmony import */ var _lib_agents_adaptive_persona_presets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(66849);
385
355
 
386
356
 
387
- // We inject the nextConfigOutput here so that we can use them in the route
388
- // module.
389
- const nextConfigOutput = "standalone"
390
- const routeModule = new next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppRouteRouteModule({
391
- definition: {
392
- kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
393
- page: "/api/v1/health/route",
394
- pathname: "/api/v1/health",
395
- filename: "route",
396
- bundlePath: "app/api/v1/health/route"
397
- },
398
- distDir: ".next" || 0,
399
- relativeProjectDir: false || '',
400
- resolvedPagePath: "/home/runner/work/jarela/jarela/app/api/v1/health/route.ts",
401
- nextConfigOutput,
402
- // The lazy require factory ensures that:
403
- // - In dev: devRequestTimingInternalsEnd is set before userland executes,
404
- // correctly attributing module load time to application-code rather than
405
- // framework internals.
406
- // - In all modes: async modules (route files with top-level await) are
407
- // handled correctly — require() returns a Promise for such modules, which
408
- // ensureUserland() awaits before the first request is handled.
409
- userland: ()=>__webpack_require__(8081),
410
- // In Turbopack dev mode, also provide a synchronous per-request getter so
411
- // server HMR updates are picked up without re-executing the entry chunk.
412
- // Using require() (synchronous) avoids adding async overhead that would be
413
- // incorrectly attributed to application-code time in devRequestTiming.
414
- ... false ? 0 : {}
415
- });
416
- // Pull out the exports that we need to expose from the module. This should
417
- // be eliminated when we've moved the other routes to the new format. These
418
- // are used to hook into the route.
419
- const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
420
- function patchFetch() {
421
- return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
422
- workAsyncStorage,
423
- workUnitAsyncStorage
424
- });
425
- }
426
357
 
427
- async function handler(req, res, ctx) {
428
- if (ctx.requestMeta) {
429
- (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.setRequestMeta)(req, ctx.requestMeta);
430
- }
431
- if (routeModule.isDev) {
432
- (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.addRequestMeta)(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());
433
- }
434
- let srcPage = "/api/v1/health/route";
435
- // turbopack doesn't normalize `/index` in the page name
436
- // so we need to to process dynamic routes properly
437
- // TODO: fix turbopack providing differing value from webpack
438
- if (false) {} else if (srcPage === '/index') {
439
- // we always normalize /index specifically
440
- srcPage = '/';
358
+ const now = ()=>new Date().toISOString();
359
+ /** Coerce arbitrary input (DB row TEXT, API body, undefined) to the enum.
360
+ * Returns `null` for null/undefined/unknown values so callers can default. */ function parseCitationStrictness(value) {
361
+ if (value === "off" || value === "informational" || value === "standard" || value === "strict") {
362
+ return value;
441
363
  }
442
- const multiZoneDraftMode = false;
443
- const prepareResult = await routeModule.prepare(req, res, {
444
- srcPage,
445
- multiZoneDraftMode
446
- });
447
- if (!prepareResult) {
448
- res.statusCode = 400;
449
- res.end('Bad Request');
450
- ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());
364
+ return null;
365
+ }
366
+ /**
367
+ * Parse the JSON-encoded per-agent override of context tier proportions.
368
+ * Returns `null` for NULL, blank, malformed JSON, or any payload that
369
+ * doesn't have three finite non-negative numeric fields. Callers fall
370
+ * back to the model config's value (or built-in defaults) on null.
371
+ */ function getAgentTierProportions(row) {
372
+ const raw = row.context_tier_proportions;
373
+ if (!raw) return null;
374
+ try {
375
+ const parsed = JSON.parse(raw);
376
+ const hot = Number(parsed.hot);
377
+ const warm = Number(parsed.warm);
378
+ const facts = Number(parsed.facts);
379
+ if (![
380
+ hot,
381
+ warm,
382
+ facts
383
+ ].every((n)=>Number.isFinite(n) && n >= 0)) return null;
384
+ if (hot + warm + facts <= 0) return null;
385
+ return {
386
+ hot,
387
+ warm,
388
+ facts
389
+ };
390
+ } catch {
451
391
  return null;
452
392
  }
453
- const { buildId, deploymentId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest, previewProps } = prepareResult;
454
- const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__.normalizeAppPath)(srcPage);
455
- // Only this route's prerenders can establish ISR or admit generated params.
456
- 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]));
457
- let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || isPrerendered);
458
- const render404 = async ()=>{
459
- // TODO: should route-module itself handle rendering the 404
460
- if (routerServerContext == null ? void 0 : routerServerContext.render404) {
461
- await routerServerContext.render404(req, res, parsedUrl, false);
462
- } else {
463
- res.end('This page could not be found');
464
- }
465
- return null;
466
- };
467
- if (isIsr && !isDraftMode) {
468
- const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];
469
- if (prerenderInfo) {
470
- if (prerenderInfo.fallback === false && !isPrerendered) {
471
- if (nextConfig.adapterPath) {
472
- return await render404();
473
- }
474
- throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError();
475
- }
476
- }
393
+ }
394
+ function listAgentConfigs() {
395
+ // Default agent always first; then by the timestamp of each agent's latest message.
396
+ return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare(`SELECT a.*
397
+ FROM agent_configs a
398
+ LEFT JOIN (
399
+ SELECT t.agent_id, MAX(m.created_at) AS last_message_at
400
+ FROM threads t
401
+ JOIN messages m ON m.thread_id = t.thread_id
402
+ GROUP BY t.agent_id
403
+ ) latest ON latest.agent_id = a.id
404
+ ORDER BY a.is_default DESC, COALESCE(latest.last_message_at, a.created_at) DESC, a.id ASC`).all();
405
+ }
406
+ function getDefaultAgentConfig() {
407
+ return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("SELECT * FROM agent_configs WHERE is_default=1 LIMIT 1").get() ?? null;
408
+ }
409
+ function getAgentConfig(id) {
410
+ return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("SELECT * FROM agent_configs WHERE id=?").get(id) ?? null;
411
+ }
412
+ /**
413
+ * Parse the JSON-encoded delegate whitelist into a deduped string[]. Returns
414
+ * an empty array for NULL, blank, or malformed JSON (delegation is opt-in).
415
+ */ /**
416
+ * Parse the agent's tool allowlist (`tools` column, stored as a JSON string).
417
+ * Returns an empty array on NULL/blank/malformed JSON — same defensive shape
418
+ * as parseDelegateTargets. Callers that previously did `JSON.parse(cfg.tools)`
419
+ * inline should switch to this getter so the serialization contract stays
420
+ * owned by this store.
421
+ */ function getAgentTools(cfg) {
422
+ if (!cfg?.tools) return [];
423
+ try {
424
+ const parsed = JSON.parse(cfg.tools);
425
+ if (!Array.isArray(parsed)) return [];
426
+ return parsed.filter((x)=>typeof x === "string" && x.length > 0);
427
+ } catch {
428
+ return [];
477
429
  }
478
- let cacheKey = null;
479
- if (isIsr && !routeModule.isDev && !isDraftMode) {
480
- cacheKey = resolvedPathname;
481
- // ensure /index and / is normalized to one key
482
- cacheKey = cacheKey === '/index' ? '/' : cacheKey;
430
+ }
431
+ function parseDelegateTargets(raw) {
432
+ if (!raw) return [];
433
+ try {
434
+ const parsed = JSON.parse(raw);
435
+ if (!Array.isArray(parsed)) return [];
436
+ const ids = parsed.filter((x)=>typeof x === "string" && x.length > 0);
437
+ return Array.from(new Set(ids));
438
+ } catch {
439
+ return [];
483
440
  }
484
- // Before rendering (which initializes component tree modules), we have to
485
- // set the reference manifests to our global store so Server Action's
486
- // encryption util can access to them at the top level of the page module.
487
- if (serverActionsManifest && clientReferenceManifest) {
488
- (0,next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__.setManifestsSingleton)({
489
- page: srcPage,
490
- clientReferenceManifest,
491
- serverActionsManifest
492
- });
441
+ }
442
+ /**
443
+ * Parse the per-agent `{ toolName: credentialId }` override map stored in
444
+ * the `tool_credentials` column. Returns an empty record on NULL / blank /
445
+ * malformed JSON / non-string entries so downstream code can treat the
446
+ * result as a plain lookup without further validation.
447
+ */ function getAgentToolCredentials(cfg) {
448
+ if (!cfg?.tool_credentials) return {};
449
+ try {
450
+ const parsed = JSON.parse(cfg.tool_credentials);
451
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return {};
452
+ const out = {};
453
+ for (const [k, v] of Object.entries(parsed)){
454
+ if (typeof v === "string" && v.length > 0) out[k] = v;
455
+ }
456
+ return out;
457
+ } catch {
458
+ return {};
493
459
  }
494
- const method = req.method || 'GET';
495
- const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)();
496
- const activeSpan = tracer.getActiveScopeSpan();
497
- const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);
498
- const isMinimalMode = Boolean((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'minimalMode'));
499
- const incrementalCache = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, previewProps, prerenderManifest, isMinimalMode);
500
- incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();
501
- globalThis.__incrementalCache = incrementalCache;
502
- const context = {
503
- params,
504
- previewProps,
505
- renderOpts: {
506
- experimental: {
507
- authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
508
- useCacheTimeout: nextConfig.experimental.useCacheTimeout,
509
- durableUseCacheEntries: Boolean(nextConfig.experimental.durableUseCacheEntries)
510
- },
511
- cacheComponents: Boolean(nextConfig.cacheComponents),
512
- validationLevel: nextConfig.experimental.instantInsights.validationLevel,
513
- isDraftMode,
514
- incrementalCache,
515
- hmrRefreshHash: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'hmrRefreshHash'),
516
- cacheLifeProfiles: nextConfig.cacheLife,
517
- staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,
518
- waitUntil: ctx.waitUntil,
519
- onClose: (cb)=>{
520
- res.on('close', cb);
521
- },
522
- onAfterTaskError: undefined
523
- },
524
- sharedContext: {
525
- buildId,
526
- deploymentId
460
+ }
461
+ function upsertAgentConfig(input) {
462
+ return (0,_lib_db_transaction__WEBPACK_IMPORTED_MODULE_1__/* .withDbTransaction */ .J)(()=>upsertAgentConfigTransaction(input));
463
+ }
464
+ function upsertAgentConfigTransaction(input) {
465
+ const t = now();
466
+ const db = (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)();
467
+ const existing = getAgentConfig(input.id);
468
+ const created_at = existing?.created_at ?? t;
469
+ const mbti = input.adaptive_mbti ?? toMbti(existing?.adaptive_mbti) ?? "INTJ";
470
+ const preset = _lib_agents_adaptive_persona_presets__WEBPACK_IMPORTED_MODULE_2__/* .MBTI_PRESETS */ .e[mbti];
471
+ const strength = input.adaptive_persona_strength ?? preset.strength;
472
+ const empathy = input.adaptive_empathy ?? preset.empathy;
473
+ const expressiveness = input.adaptive_expressiveness ?? preset.expressiveness;
474
+ const verbosity = input.adaptive_verbosity ?? preset.verbosity;
475
+ if (input.is_default) db.prepare("UPDATE agent_configs SET is_default=0").run();
476
+ // harness_id: explicit `undefined` means "keep existing"; explicit `null`
477
+ // means "use the global default". Empty string is normalised to null too,
478
+ // matching how the AgentEditor sends "" for the inherit option.
479
+ const harnessId = input.harness_id === undefined ? existing?.harness_id ?? null : input.harness_id && input.harness_id.length > 0 ? input.harness_id : null;
480
+ // delegate_targets: undefined = keep existing; explicit empty array clears.
481
+ 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))));
482
+ // context_tier_proportions: undefined = keep existing; null = clear and
483
+ // inherit from the model; object = serialise as JSON. Negative values are
484
+ // clamped to 0 so the upsert can't poison the column with bad data.
485
+ const tierProportions = input.context_tier_proportions === undefined ? existing?.context_tier_proportions ?? null : input.context_tier_proportions === null ? null : JSON.stringify({
486
+ hot: Math.max(0, Number(input.context_tier_proportions.hot) || 0),
487
+ warm: Math.max(0, Number(input.context_tier_proportions.warm) || 0),
488
+ facts: Math.max(0, Number(input.context_tier_proportions.facts) || 0)
489
+ });
490
+ // Anti-hallucination override: `undefined` keeps existing; `null` clears
491
+ // the override (inherits env). Empty-string model is normalised to null
492
+ // so the editor can ship "" for the inherit option.
493
+ 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;
494
+ 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;
495
+ const citationStrictness = input.citation_strictness === undefined ? parseCitationStrictness(existing?.citation_strictness) ?? "off" : parseCitationStrictness(input.citation_strictness) ?? "off";
496
+ const toolCredentials = serialiseToolCredentials(input.tool_credentials, existing?.tool_credentials ?? null);
497
+ const VALID_ROUTER_POLICIES = new Set([
498
+ "cheap",
499
+ "fast",
500
+ "balanced",
501
+ "quality"
502
+ ]);
503
+ 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;
504
+ const routerEnabled = input.router_enabled === undefined ? existing?.router_enabled ?? null : input.router_enabled === null ? null : input.router_enabled ? 1 : 0;
505
+ const VALID_USAGE_STRATEGIES = new Set([
506
+ "cost_saving",
507
+ "fast",
508
+ "balanced",
509
+ "high_reasoning"
510
+ ]);
511
+ 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;
512
+ const requestedWarmSummaryLimit = input.warm_summary_limit ?? existing?.warm_summary_limit ?? 50;
513
+ const warmSummaryLimit = Number.isFinite(requestedWarmSummaryLimit) ? Math.max(0, Math.floor(requestedWarmSummaryLimit)) : existing?.warm_summary_limit ?? 50;
514
+ db.prepare(`INSERT OR REPLACE INTO agent_configs
515
+ (id, name, icon, identity, instructions, tools, model_config_name, is_default,
516
+ history_limit, history_window_hours, warm_summary_limit, never_reply,
517
+ hot_turn_limit,
518
+ adaptive_persona_enabled, adaptive_persona_strength, adaptive_empathy, adaptive_expressiveness, adaptive_verbosity, adaptive_mbti,
519
+ voice_enabled, voice_model, voice_name, voice_stt_model, voice_auto_speak,
520
+ harness_id, delegate_targets, context_tier_proportions,
521
+ anti_hallucination_mode, anti_hallucination_model_config, citation_strictness,
522
+ tool_credentials, router_policy, router_enabled, usage_strategy,
523
+ created_at, updated_at)
524
+ 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"
525
+ // (important for PATCH-style updates that omit the field).
526
+ 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);
527
+ return getAgentConfig(input.id);
528
+ }
529
+ function clampPercent(next, fallback) {
530
+ const n = Number.isFinite(next) ? Number(next) : fallback;
531
+ return Math.max(0, Math.min(100, Math.round(n)));
532
+ }
533
+ function serialiseToolCredentials(input, existing) {
534
+ if (input === undefined) return existing;
535
+ const cleaned = {};
536
+ for (const [k, v] of Object.entries(input)){
537
+ if (typeof k === "string" && k.length > 0 && typeof v === "string" && v.length > 0) {
538
+ cleaned[k] = v;
527
539
  }
540
+ }
541
+ if (Object.keys(cleaned).length === 0) return null;
542
+ return JSON.stringify(cleaned);
543
+ }
544
+ function toMbti(v) {
545
+ if (!v) return null;
546
+ return v in _lib_agents_adaptive_persona_presets__WEBPACK_IMPORTED_MODULE_2__/* .MBTI_PRESETS */ .e ? v : null;
547
+ }
548
+ function deleteAgentConfig(id) {
549
+ return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("DELETE FROM agent_configs WHERE id=?").run(id).changes > 0;
550
+ }
551
+ function generateAgentId(name) {
552
+ const slug = name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40);
553
+ const suffix = Math.random().toString(36).slice(2, 6);
554
+ return slug ? `${slug}-${suffix}` : `agent-${suffix}`;
555
+ }
556
+ // ── ADR-0022: per-agent message-channel display filters ─────────────────
557
+ // Canonical channel keys mirrored in `hooks/useMessageFilters.ts`. Kept
558
+ // in sync there by importing this constant — single source of truth.
559
+ const DISPLAY_FILTER_KEYS = [
560
+ "scheduled_task",
561
+ "watcher",
562
+ "bridge",
563
+ "extension",
564
+ "page_capture",
565
+ "synthetic",
566
+ "tool_use",
567
+ "thinking"
568
+ ];
569
+ const DISPLAY_FILTER_DEFAULTS = {
570
+ scheduled_task: true,
571
+ watcher: true,
572
+ bridge: true,
573
+ extension: true,
574
+ page_capture: true,
575
+ synthetic: true,
576
+ tool_use: true,
577
+ thinking: true
578
+ };
579
+ function parseDisplayFilters(raw) {
580
+ if (!raw) return {
581
+ ...DISPLAY_FILTER_DEFAULTS
528
582
  };
529
- const nodeNextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextRequest(req);
530
- const nodeNextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextResponse(res);
531
- 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));
532
- const responseGenerator = async ({ previousCacheEntry })=>{
533
- try {
534
- if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {
535
- res.statusCode = 404;
536
- // on-demand revalidate always sets this header
537
- res.setHeader('x-nextjs-cache', 'REVALIDATED');
538
- res.end('This page could not be found');
539
- return null;
540
- }
541
- const response = cacheKey === null ? await routeModule.handle(nextReq, context) : await routeModule.prerender(nextReq, context);
542
- req.fetchMetrics = context.renderOpts.fetchMetrics;
543
- let pendingWaitUntil = context.renderOpts.pendingWaitUntil;
544
- // Attempt using provided waitUntil if available
545
- // if it's not we fallback to sendResponse's handling
546
- if (pendingWaitUntil) {
547
- if (ctx.waitUntil) {
548
- ctx.waitUntil(pendingWaitUntil);
549
- pendingWaitUntil = undefined;
550
- }
551
- }
552
- const cacheTags = context.renderOpts.collectedTags;
553
- // If the request is for a static response, we can cache it so long
554
- // as it's not edge.
555
- if (isIsr) {
556
- const blob = await response.blob();
557
- // Copy the headers from the response.
558
- const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.toNodeOutgoingHttpHeaders)(response.headers);
559
- if (cacheTags) {
560
- headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER] = cacheTags;
561
- }
562
- if (!headers['content-type'] && blob.type) {
563
- headers['content-type'] = blob.type;
564
- }
565
- const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;
566
- 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
567
- // explicit `expire` (e.g. via `cacheLife`). This mirrors the
568
- // build-time fallback in `build/index.ts` so cache entries
569
- // and the response Cache-Control header agree on the route's
570
- // effective expire. Routes that opt out of revalidation
571
- // (`revalidate: false`) or that are dynamic (`revalidate: 0`)
572
- // keep `expire: undefined`.
573
- revalidate !== false && revalidate > 0 ? nextConfig.expireTime : undefined : context.renderOpts.collectedExpire;
574
- // Create the cache entry for the response.
575
- const cacheEntry = {
576
- value: {
577
- kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE,
578
- status: response.status,
579
- body: Buffer.from(await blob.arrayBuffer()),
580
- headers
581
- },
582
- cacheControl: {
583
- revalidate,
584
- expire
585
- }
586
- };
587
- return cacheEntry;
588
- } else {
589
- // send response without caching if not ISR
590
- await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, response, pendingWaitUntil);
591
- return null;
592
- }
593
- } catch (err) {
594
- // if this is a background revalidate we need to report
595
- // the request error here as it won't be bubbled
596
- if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {
597
- const silenceLog = false;
598
- await routeModule.onRequestError(req, err, {
599
- routerKind: 'App Router',
600
- routePath: srcPage,
601
- routeType: 'route',
602
- revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
603
- isStaticGeneration: cacheKey !== null,
604
- isOnDemandRevalidate
605
- })
606
- }, silenceLog, routerServerContext);
607
- }
608
- throw err;
609
- }
610
- };
611
- const handleResponse = async (currentSpan, parentSpan)=>{
612
- try {
613
- var _cacheEntry_value;
614
- const cacheEntry = await routeModule.handleResponse({
615
- req,
616
- nextConfig,
617
- cacheKey,
618
- routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
619
- isFallback: false,
620
- previewProps,
621
- prerenderManifest,
622
- isRoutePPREnabled: false,
623
- isOnDemandRevalidate,
624
- revalidateOnlyGenerated,
625
- responseGenerator,
626
- waitUntil: ctx.waitUntil,
627
- isMinimalMode
628
- });
629
- if (cacheEntry !== null && 'error' in cacheEntry) {
630
- throw cacheEntry.error;
631
- }
632
- // we don't create a cacheEntry for ISR
633
- if (!isIsr) {
634
- return;
635
- }
636
- 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) {
637
- var _cacheEntry_value1;
638
- throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
639
- }
640
- if (!isMinimalMode) {
641
- res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
642
- }
643
- // Draft mode should never be cached
644
- if (isDraftMode) {
645
- res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
646
- }
647
- const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
648
- if (!(isMinimalMode && isIsr)) {
649
- headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
650
- }
651
- // If cache control is already set on the response we don't
652
- // override it to allow users to customize it via next.config
653
- if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
654
- headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
655
- }
656
- 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'.
657
- new Response(cacheEntry.value.body, {
658
- headers,
659
- status: cacheEntry.value.status || 200
660
- }));
661
- return;
662
- } catch (err) {
663
- if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError)) {
664
- const silenceLog = false;
665
- await routeModule.onRequestError(req, err, {
666
- routerKind: 'App Router',
667
- routePath: normalizedSrcPage,
668
- routeType: 'route',
669
- revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
670
- isStaticGeneration: cacheKey !== null,
671
- isOnDemandRevalidate
672
- })
673
- }, silenceLog, routerServerContext);
674
- }
675
- // rethrow so that we can handle serving error page
676
- // If this is during static generation, throw the error again.
677
- if (isIsr) throw err;
678
- // Otherwise, send a 500 response unless the original response has
679
- // already committed. In that case, preserve its status code for
680
- // telemetry while still recording the failure and terminating a response
681
- // that the failed pipeline left open.
682
- if (res.headersSent) {
683
- if (currentSpan) {
684
- const error = err instanceof Error ? err : new Error('Unknown app route error');
685
- currentSpan.recordException(error);
686
- currentSpan.setStatus({
687
- code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR,
688
- message: error.message
689
- });
690
- currentSpan.setAttribute('error.type', error.name);
691
- }
692
- if (!res.writableEnded && !res.destroyed) {
693
- res.end();
694
- }
695
- } else {
696
- await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
697
- status: 500
698
- }));
699
- }
700
- return;
701
- } finally{
702
- ;
703
- (()=>{
704
- if (!currentSpan) {
705
- return;
706
- }
707
- let statusCode = res.statusCode;
708
- currentSpan.setAttributes({
709
- 'http.status_code': statusCode,
710
- 'next.rsc': false
711
- });
712
- if (statusCode && statusCode >= 500) {
713
- // For 5xx status codes: SHOULD be set to 'Error' span status.
714
- // x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
715
- currentSpan.setStatus({
716
- code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
717
- });
718
- // For span status 'Error', SHOULD set 'error.type' attribute.
719
- currentSpan.setAttribute('error.type', statusCode.toString());
720
- }
721
- const rootSpanAttributes = tracer.getRootSpanAttributes();
722
- // We were unable to get attributes, probably OTEL is not enabled
723
- if (!rootSpanAttributes) {
724
- return;
725
- }
726
- if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
727
- console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
728
- return;
729
- }
730
- const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
731
- const name = `${method} ${route}`;
732
- currentSpan.setAttributes({
733
- 'next.route': route,
734
- 'http.route': route,
735
- 'next.span_name': name
736
- });
737
- currentSpan.updateName(name);
738
- // Propagate http.route to the parent span if one exists (e.g.
739
- // a platform-created HTTP span in adapter deployments).
740
- if (parentSpan && parentSpan !== currentSpan) {
741
- parentSpan.setAttribute('http.route', route);
742
- parentSpan.updateName(name);
743
- }
744
- })();
745
- }
583
+ try {
584
+ const parsed = JSON.parse(raw);
585
+ // Merge over defaults so newly-added channels stay visible on old rows.
586
+ return {
587
+ ...DISPLAY_FILTER_DEFAULTS,
588
+ ...parsed
589
+ };
590
+ } catch {
591
+ return {
592
+ ...DISPLAY_FILTER_DEFAULTS
593
+ };
594
+ }
595
+ }
596
+ function getAgentDisplayFilters(id) {
597
+ const row = getAgentConfig(id);
598
+ if (!row) return null;
599
+ return parseDisplayFilters(row.display_filters);
600
+ }
601
+ /**
602
+ * Merge a partial filter map into the agent's stored prefs. Pass `null` to
603
+ * reset to defaults (clears the column). Safe against concurrent toggles
604
+ * from multiple browser tabs because the merge happens server-side.
605
+ */ function updateAgentDisplayFilters(id, patch) {
606
+ const row = getAgentConfig(id);
607
+ if (!row) return null;
608
+ if (patch === null) {
609
+ (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("UPDATE agent_configs SET display_filters=NULL, updated_at=? WHERE id=?").run(now(), id);
610
+ return {
611
+ ...DISPLAY_FILTER_DEFAULTS
612
+ };
613
+ }
614
+ const current = parseDisplayFilters(row.display_filters);
615
+ const next = {
616
+ ...current
746
617
  };
747
- // TODO: activeSpan code path is for when wrapped by
748
- // next-server can be removed when this is no longer used
749
- if (isWrappedByNextServer && activeSpan) {
750
- await handleResponse(activeSpan, undefined);
751
- } else {
752
- let parentSpan = tracer.getActiveScopeSpan();
753
- await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest, {
754
- spanName: `${method} ${srcPage}`,
755
- kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanKind.SERVER,
756
- attributes: {
757
- 'http.method': method,
758
- 'http.target': req.url
759
- }
760
- }, (span)=>handleResponse(span, parentSpan)), undefined, !isWrappedByNextServer);
618
+ for (const k of DISPLAY_FILTER_KEYS){
619
+ if (k in patch && typeof patch[k] === "boolean") next[k] = patch[k];
761
620
  }
621
+ (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);
622
+ return next;
762
623
  }
763
624
 
764
- //# sourceMappingURL=app-route.js.map
765
625
 
626
+ /***/ }),
627
+
628
+ /***/ 44708:
629
+ /***/ ((module) => {
630
+
631
+ module.exports = require("node:https");
766
632
 
767
633
  /***/ }),
768
634
 
769
- /***/ 38522:
635
+ /***/ 44870:
770
636
  /***/ ((module) => {
771
637
 
772
- module.exports = require("node:zlib");
638
+ module.exports = require("next/dist/compiled/next-server/app-route.runtime.prod.js");
773
639
 
774
640
  /***/ }),
775
641
 
776
- /***/ 41720:
777
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
642
+ /***/ 48161:
643
+ /***/ ((module) => {
778
644
 
779
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
780
- /* harmony export */ BM: () => (/* binding */ upsertAgentConfig),
781
- /* harmony export */ E1: () => (/* binding */ updateAgentDisplayFilters),
782
- /* harmony export */ P2: () => (/* binding */ parseCitationStrictness),
783
- /* harmony export */ S2: () => (/* binding */ getAgentToolCredentials),
784
- /* harmony export */ SJ: () => (/* binding */ generateAgentId),
785
- /* harmony export */ TG: () => (/* binding */ getAgentTools),
786
- /* harmony export */ bg: () => (/* binding */ parseDelegateTargets),
787
- /* harmony export */ d2: () => (/* binding */ DISPLAY_FILTER_KEYS),
788
- /* harmony export */ fg: () => (/* binding */ getAgentTierProportions),
789
- /* harmony export */ mJ: () => (/* binding */ getAgentConfig),
790
- /* harmony export */ nV: () => (/* binding */ getAgentDisplayFilters),
791
- /* harmony export */ vU: () => (/* binding */ getDefaultAgentConfig),
792
- /* harmony export */ vi: () => (/* binding */ DISPLAY_FILTER_DEFAULTS),
793
- /* harmony export */ xi: () => (/* binding */ deleteAgentConfig),
794
- /* harmony export */ zb: () => (/* binding */ listAgentConfigs)
795
- /* harmony export */ });
796
- /* harmony import */ var _lib_db__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(46);
797
- /* harmony import */ var _lib_db_transaction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(99043);
798
- /* harmony import */ var _lib_agents_adaptive_persona_presets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(66849);
645
+ module.exports = require("node:os");
799
646
 
647
+ /***/ }),
800
648
 
649
+ /***/ 51455:
650
+ /***/ ((module) => {
801
651
 
802
- const now = ()=>new Date().toISOString();
803
- /** Coerce arbitrary input (DB row TEXT, API body, undefined) to the enum.
804
- * Returns `null` for null/undefined/unknown values so callers can default. */ function parseCitationStrictness(value) {
805
- if (value === "off" || value === "informational" || value === "standard" || value === "strict") {
806
- return value;
807
- }
808
- return null;
809
- }
810
- /**
811
- * Parse the JSON-encoded per-agent override of context tier proportions.
812
- * Returns `null` for NULL, blank, malformed JSON, or any payload that
813
- * doesn't have three finite non-negative numeric fields. Callers fall
814
- * back to the model config's value (or built-in defaults) on null.
815
- */ function getAgentTierProportions(row) {
816
- const raw = row.context_tier_proportions;
817
- if (!raw) return null;
818
- try {
819
- const parsed = JSON.parse(raw);
820
- const hot = Number(parsed.hot);
821
- const warm = Number(parsed.warm);
822
- const facts = Number(parsed.facts);
823
- if (![
824
- hot,
825
- warm,
826
- facts
827
- ].every((n)=>Number.isFinite(n) && n >= 0)) return null;
828
- if (hot + warm + facts <= 0) return null;
829
- return {
830
- hot,
831
- warm,
832
- facts
833
- };
834
- } catch {
835
- return null;
836
- }
837
- }
838
- function listAgentConfigs() {
839
- // Default agent always first; then by the timestamp of each agent's latest message.
840
- return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare(`SELECT a.*
841
- FROM agent_configs a
842
- LEFT JOIN (
843
- SELECT t.agent_id, MAX(m.created_at) AS last_message_at
844
- FROM threads t
845
- JOIN messages m ON m.thread_id = t.thread_id
846
- GROUP BY t.agent_id
847
- ) latest ON latest.agent_id = a.id
848
- ORDER BY a.is_default DESC, COALESCE(latest.last_message_at, a.created_at) DESC, a.id ASC`).all();
849
- }
850
- function getDefaultAgentConfig() {
851
- return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("SELECT * FROM agent_configs WHERE is_default=1 LIMIT 1").get() ?? null;
852
- }
853
- function getAgentConfig(id) {
854
- return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("SELECT * FROM agent_configs WHERE id=?").get(id) ?? null;
652
+ module.exports = require("node:fs/promises");
653
+
654
+ /***/ }),
655
+
656
+ /***/ 55511:
657
+ /***/ ((module) => {
658
+
659
+ module.exports = require("crypto");
660
+
661
+ /***/ }),
662
+
663
+ /***/ 55591:
664
+ /***/ ((module) => {
665
+
666
+ module.exports = require("https");
667
+
668
+ /***/ }),
669
+
670
+ /***/ 57075:
671
+ /***/ ((module) => {
672
+
673
+ module.exports = require("node:stream");
674
+
675
+ /***/ }),
676
+
677
+ /***/ 57975:
678
+ /***/ ((module) => {
679
+
680
+ module.exports = require("node:util");
681
+
682
+ /***/ }),
683
+
684
+ /***/ 63033:
685
+ /***/ ((module) => {
686
+
687
+ module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
688
+
689
+ /***/ }),
690
+
691
+ /***/ 73024:
692
+ /***/ ((module) => {
693
+
694
+ module.exports = require("node:fs");
695
+
696
+ /***/ }),
697
+
698
+ /***/ 75355:
699
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
700
+
701
+ __webpack_require__.r(__webpack_exports__);
702
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
703
+ /* harmony export */ handler: () => (/* binding */ handler),
704
+ /* harmony export */ patchFetch: () => (/* binding */ patchFetch),
705
+ /* harmony export */ routeModule: () => (/* binding */ routeModule),
706
+ /* harmony export */ serverHooks: () => (/* binding */ serverHooks),
707
+ /* harmony export */ workAsyncStorage: () => (/* binding */ workAsyncStorage),
708
+ /* harmony export */ workUnitAsyncStorage: () => (/* binding */ workUnitAsyncStorage)
709
+ /* harmony export */ });
710
+ /* harmony import */ var next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19225);
711
+ /* 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__);
712
+ /* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84006);
713
+ /* harmony import */ var next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8317);
714
+ /* 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__);
715
+ /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99373);
716
+ /* 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__);
717
+ /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34775);
718
+ /* 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__);
719
+ /* harmony import */ var next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(24235);
720
+ /* 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__);
721
+ /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(261);
722
+ /* 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__);
723
+ /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(54365);
724
+ /* 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__);
725
+ /* harmony import */ var next_dist_server_web_spec_extension_adapters_next_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90771);
726
+ /* 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__);
727
+ /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(73461);
728
+ /* 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__);
729
+ /* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(67798);
730
+ /* harmony import */ var next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(92280);
731
+ /* harmony import */ var next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(62018);
732
+ /* 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__);
733
+ /* harmony import */ var next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(45696);
734
+ /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(47929);
735
+ /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__);
736
+ /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(86439);
737
+ /* 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__);
738
+ /* harmony import */ var next_dist_server_lib_route_cache_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(10246);
739
+ /* 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__);
740
+ /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(37527);
741
+ /* 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__);
742
+
743
+
744
+
745
+
746
+
747
+
748
+
749
+
750
+
751
+
752
+
753
+
754
+
755
+
756
+
757
+
758
+
759
+
760
+ // We inject the nextConfigOutput here so that we can use them in the route
761
+ // module.
762
+ const nextConfigOutput = "standalone"
763
+ const routeModule = new next_dist_server_route_modules_app_route_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppRouteRouteModule({
764
+ definition: {
765
+ kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
766
+ page: "/api/v1/health/route",
767
+ pathname: "/api/v1/health",
768
+ filename: "route",
769
+ bundlePath: "app/api/v1/health/route"
770
+ },
771
+ distDir: ".next" || 0,
772
+ relativeProjectDir: false || '',
773
+ resolvedPagePath: "/home/runner/work/jarela/jarela/app/api/v1/health/route.ts",
774
+ nextConfigOutput,
775
+ // The lazy require factory ensures that:
776
+ // - In dev: devRequestTimingInternalsEnd is set before userland executes,
777
+ // correctly attributing module load time to application-code rather than
778
+ // framework internals.
779
+ // - In all modes: async modules (route files with top-level await) are
780
+ // handled correctly — require() returns a Promise for such modules, which
781
+ // ensureUserland() awaits before the first request is handled.
782
+ userland: ()=>__webpack_require__(8081),
783
+ // In Turbopack dev mode, also provide a synchronous per-request getter so
784
+ // server HMR updates are picked up without re-executing the entry chunk.
785
+ // Using require() (synchronous) avoids adding async overhead that would be
786
+ // incorrectly attributed to application-code time in devRequestTiming.
787
+ ... false ? 0 : {}
788
+ });
789
+ // Pull out the exports that we need to expose from the module. This should
790
+ // be eliminated when we've moved the other routes to the new format. These
791
+ // are used to hook into the route.
792
+ const { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;
793
+ function patchFetch() {
794
+ return (0,next_dist_server_lib_patch_fetch__WEBPACK_IMPORTED_MODULE_2__.patchFetch)({
795
+ workAsyncStorage,
796
+ workUnitAsyncStorage
797
+ });
855
798
  }
856
- /**
857
- * Parse the JSON-encoded delegate whitelist into a deduped string[]. Returns
858
- * an empty array for NULL, blank, or malformed JSON (delegation is opt-in).
859
- */ /**
860
- * Parse the agent's tool allowlist (`tools` column, stored as a JSON string).
861
- * Returns an empty array on NULL/blank/malformed JSON — same defensive shape
862
- * as parseDelegateTargets. Callers that previously did `JSON.parse(cfg.tools)`
863
- * inline should switch to this getter so the serialization contract stays
864
- * owned by this store.
865
- */ function getAgentTools(cfg) {
866
- if (!cfg?.tools) return [];
867
- try {
868
- const parsed = JSON.parse(cfg.tools);
869
- if (!Array.isArray(parsed)) return [];
870
- return parsed.filter((x)=>typeof x === "string" && x.length > 0);
871
- } catch {
872
- return [];
799
+
800
+ async function handler(req, res, ctx) {
801
+ if (ctx.requestMeta) {
802
+ (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.setRequestMeta)(req, ctx.requestMeta);
873
803
  }
874
- }
875
- function parseDelegateTargets(raw) {
876
- if (!raw) return [];
877
- try {
878
- const parsed = JSON.parse(raw);
879
- if (!Array.isArray(parsed)) return [];
880
- const ids = parsed.filter((x)=>typeof x === "string" && x.length > 0);
881
- return Array.from(new Set(ids));
882
- } catch {
883
- return [];
804
+ if (routeModule.isDev) {
805
+ (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.addRequestMeta)(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());
884
806
  }
885
- }
886
- /**
887
- * Parse the per-agent `{ toolName: credentialId }` override map stored in
888
- * the `tool_credentials` column. Returns an empty record on NULL / blank /
889
- * malformed JSON / non-string entries so downstream code can treat the
890
- * result as a plain lookup without further validation.
891
- */ function getAgentToolCredentials(cfg) {
892
- if (!cfg?.tool_credentials) return {};
893
- try {
894
- const parsed = JSON.parse(cfg.tool_credentials);
895
- if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return {};
896
- const out = {};
897
- for (const [k, v] of Object.entries(parsed)){
898
- if (typeof v === "string" && v.length > 0) out[k] = v;
899
- }
900
- return out;
901
- } catch {
902
- return {};
807
+ let srcPage = "/api/v1/health/route";
808
+ // turbopack doesn't normalize `/index` in the page name
809
+ // so we need to to process dynamic routes properly
810
+ // TODO: fix turbopack providing differing value from webpack
811
+ if (false) {} else if (srcPage === '/index') {
812
+ // we always normalize /index specifically
813
+ srcPage = '/';
903
814
  }
904
- }
905
- function upsertAgentConfig(input) {
906
- return (0,_lib_db_transaction__WEBPACK_IMPORTED_MODULE_1__/* .withDbTransaction */ .J)(()=>upsertAgentConfigTransaction(input));
907
- }
908
- function upsertAgentConfigTransaction(input) {
909
- const t = now();
910
- const db = (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)();
911
- const existing = getAgentConfig(input.id);
912
- const created_at = existing?.created_at ?? t;
913
- const mbti = input.adaptive_mbti ?? toMbti(existing?.adaptive_mbti) ?? "INTJ";
914
- const preset = _lib_agents_adaptive_persona_presets__WEBPACK_IMPORTED_MODULE_2__/* .MBTI_PRESETS */ .e[mbti];
915
- const strength = input.adaptive_persona_strength ?? preset.strength;
916
- const empathy = input.adaptive_empathy ?? preset.empathy;
917
- const expressiveness = input.adaptive_expressiveness ?? preset.expressiveness;
918
- const verbosity = input.adaptive_verbosity ?? preset.verbosity;
919
- if (input.is_default) db.prepare("UPDATE agent_configs SET is_default=0").run();
920
- // harness_id: explicit `undefined` means "keep existing"; explicit `null`
921
- // means "use the global default". Empty string is normalised to null too,
922
- // matching how the AgentEditor sends "" for the inherit option.
923
- const harnessId = input.harness_id === undefined ? existing?.harness_id ?? null : input.harness_id && input.harness_id.length > 0 ? input.harness_id : null;
924
- // delegate_targets: undefined = keep existing; explicit empty array clears.
925
- 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))));
926
- // context_tier_proportions: undefined = keep existing; null = clear and
927
- // inherit from the model; object = serialise as JSON. Negative values are
928
- // clamped to 0 so the upsert can't poison the column with bad data.
929
- const tierProportions = input.context_tier_proportions === undefined ? existing?.context_tier_proportions ?? null : input.context_tier_proportions === null ? null : JSON.stringify({
930
- hot: Math.max(0, Number(input.context_tier_proportions.hot) || 0),
931
- warm: Math.max(0, Number(input.context_tier_proportions.warm) || 0),
932
- facts: Math.max(0, Number(input.context_tier_proportions.facts) || 0)
815
+ const multiZoneDraftMode = false;
816
+ const prepareResult = await routeModule.prepare(req, res, {
817
+ srcPage,
818
+ multiZoneDraftMode
933
819
  });
934
- // Anti-hallucination override: `undefined` keeps existing; `null` clears
935
- // the override (inherits env). Empty-string model is normalised to null
936
- // so the editor can ship "" for the inherit option.
937
- 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;
938
- 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;
939
- const citationStrictness = input.citation_strictness === undefined ? parseCitationStrictness(existing?.citation_strictness) ?? "off" : parseCitationStrictness(input.citation_strictness) ?? "off";
940
- const toolCredentials = serialiseToolCredentials(input.tool_credentials, existing?.tool_credentials ?? null);
941
- const VALID_ROUTER_POLICIES = new Set([
942
- "cheap",
943
- "fast",
944
- "balanced",
945
- "quality"
946
- ]);
947
- 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;
948
- const routerEnabled = input.router_enabled === undefined ? existing?.router_enabled ?? null : input.router_enabled === null ? null : input.router_enabled ? 1 : 0;
949
- const VALID_USAGE_STRATEGIES = new Set([
950
- "cost_saving",
951
- "fast",
952
- "balanced",
953
- "high_reasoning"
954
- ]);
955
- 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;
956
- const requestedWarmSummaryLimit = input.warm_summary_limit ?? existing?.warm_summary_limit ?? 50;
957
- const warmSummaryLimit = Number.isFinite(requestedWarmSummaryLimit) ? Math.max(0, Math.floor(requestedWarmSummaryLimit)) : existing?.warm_summary_limit ?? 50;
958
- db.prepare(`INSERT OR REPLACE INTO agent_configs
959
- (id, name, icon, identity, instructions, tools, model_config_name, is_default,
960
- history_limit, history_window_hours, warm_summary_limit, never_reply,
961
- hot_turn_limit,
962
- adaptive_persona_enabled, adaptive_persona_strength, adaptive_empathy, adaptive_expressiveness, adaptive_verbosity, adaptive_mbti,
963
- voice_enabled, voice_model, voice_name, voice_stt_model, voice_auto_speak,
964
- harness_id, delegate_targets, context_tier_proportions,
965
- anti_hallucination_mode, anti_hallucination_model_config, citation_strictness,
966
- tool_credentials, router_policy, router_enabled, usage_strategy,
967
- created_at, updated_at)
968
- 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"
969
- // (important for PATCH-style updates that omit the field).
970
- 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);
971
- return getAgentConfig(input.id);
972
- }
973
- function clampPercent(next, fallback) {
974
- const n = Number.isFinite(next) ? Number(next) : fallback;
975
- return Math.max(0, Math.min(100, Math.round(n)));
976
- }
977
- function serialiseToolCredentials(input, existing) {
978
- if (input === undefined) return existing;
979
- const cleaned = {};
980
- for (const [k, v] of Object.entries(input)){
981
- if (typeof k === "string" && k.length > 0 && typeof v === "string" && v.length > 0) {
982
- cleaned[k] = v;
820
+ if (!prepareResult) {
821
+ res.statusCode = 400;
822
+ res.end('Bad Request');
823
+ ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());
824
+ return null;
825
+ }
826
+ const { buildId, deploymentId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest, previewProps } = prepareResult;
827
+ const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_6__.normalizeAppPath)(srcPage);
828
+ // Only this route's prerenders can establish ISR or admit generated params.
829
+ 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]));
830
+ let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || isPrerendered);
831
+ const render404 = async ()=>{
832
+ // TODO: should route-module itself handle rendering the 404
833
+ if (routerServerContext == null ? void 0 : routerServerContext.render404) {
834
+ await routerServerContext.render404(req, res, parsedUrl, false);
835
+ } else {
836
+ res.end('This page could not be found');
837
+ }
838
+ return null;
839
+ };
840
+ if (isIsr && !isDraftMode) {
841
+ const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];
842
+ if (prerenderInfo) {
843
+ if (prerenderInfo.fallback === false && !isPrerendered) {
844
+ if (nextConfig.adapterPath) {
845
+ return await render404();
846
+ }
847
+ throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError();
848
+ }
849
+ }
850
+ }
851
+ let cacheKey = null;
852
+ if (isIsr && !routeModule.isDev && !isDraftMode) {
853
+ cacheKey = resolvedPathname;
854
+ // ensure /index and / is normalized to one key
855
+ cacheKey = cacheKey === '/index' ? '/' : cacheKey;
856
+ }
857
+ // Before rendering (which initializes component tree modules), we have to
858
+ // set the reference manifests to our global store so Server Action's
859
+ // encryption util can access to them at the top level of the page module.
860
+ if (serverActionsManifest && clientReferenceManifest) {
861
+ (0,next_dist_server_app_render_manifests_singleton__WEBPACK_IMPORTED_MODULE_5__.setManifestsSingleton)({
862
+ page: srcPage,
863
+ clientReferenceManifest,
864
+ serverActionsManifest
865
+ });
866
+ }
867
+ const method = req.method || 'GET';
868
+ const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.getTracer)();
869
+ const activeSpan = tracer.getActiveScopeSpan();
870
+ const isWrappedByNextServer = Boolean(routerServerContext == null ? void 0 : routerServerContext.isWrappedByNextServer);
871
+ const isMinimalMode = Boolean((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'minimalMode'));
872
+ const incrementalCache = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'incrementalCache') || await routeModule.getIncrementalCache(req, nextConfig, previewProps, prerenderManifest, isMinimalMode);
873
+ incrementalCache == null ? void 0 : incrementalCache.resetRequestCache();
874
+ globalThis.__incrementalCache = incrementalCache;
875
+ const context = {
876
+ params,
877
+ previewProps,
878
+ renderOpts: {
879
+ experimental: {
880
+ authInterrupts: Boolean(nextConfig.experimental.authInterrupts),
881
+ useCacheTimeout: nextConfig.experimental.useCacheTimeout,
882
+ durableUseCacheEntries: Boolean(nextConfig.experimental.durableUseCacheEntries)
883
+ },
884
+ cacheComponents: Boolean(nextConfig.cacheComponents),
885
+ validationLevel: nextConfig.experimental.instantInsights.validationLevel,
886
+ isDraftMode,
887
+ incrementalCache,
888
+ hmrRefreshHash: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_3__.getRequestMeta)(req, 'hmrRefreshHash'),
889
+ cacheLifeProfiles: nextConfig.cacheLife,
890
+ staticPageGenerationTimeout: nextConfig.staticPageGenerationTimeout,
891
+ waitUntil: ctx.waitUntil,
892
+ onClose: (cb)=>{
893
+ res.on('close', cb);
894
+ },
895
+ onAfterTaskError: undefined
896
+ },
897
+ sharedContext: {
898
+ buildId,
899
+ deploymentId
900
+ }
901
+ };
902
+ const nodeNextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextRequest(req);
903
+ const nodeNextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_7__.NodeNextResponse(res);
904
+ 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));
905
+ const responseGenerator = async ({ previousCacheEntry })=>{
906
+ try {
907
+ if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {
908
+ res.statusCode = 404;
909
+ // on-demand revalidate always sets this header
910
+ res.setHeader('x-nextjs-cache', 'REVALIDATED');
911
+ res.end('This page could not be found');
912
+ return null;
913
+ }
914
+ const response = cacheKey === null ? await routeModule.handle(nextReq, context) : await routeModule.prerender(nextReq, context);
915
+ req.fetchMetrics = context.renderOpts.fetchMetrics;
916
+ let pendingWaitUntil = context.renderOpts.pendingWaitUntil;
917
+ // Attempt using provided waitUntil if available
918
+ // if it's not we fallback to sendResponse's handling
919
+ if (pendingWaitUntil) {
920
+ if (ctx.waitUntil) {
921
+ ctx.waitUntil(pendingWaitUntil);
922
+ pendingWaitUntil = undefined;
923
+ }
924
+ }
925
+ const cacheTags = context.renderOpts.collectedTags;
926
+ // If the request is for a static response, we can cache it so long
927
+ // as it's not edge.
928
+ if (isIsr) {
929
+ const blob = await response.blob();
930
+ // Copy the headers from the response.
931
+ const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.toNodeOutgoingHttpHeaders)(response.headers);
932
+ if (cacheTags) {
933
+ headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER] = cacheTags;
934
+ }
935
+ if (!headers['content-type'] && blob.type) {
936
+ headers['content-type'] = blob.type;
937
+ }
938
+ const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;
939
+ 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
940
+ // explicit `expire` (e.g. via `cacheLife`). This mirrors the
941
+ // build-time fallback in `build/index.ts` so cache entries
942
+ // and the response Cache-Control header agree on the route's
943
+ // effective expire. Routes that opt out of revalidation
944
+ // (`revalidate: false`) or that are dynamic (`revalidate: 0`)
945
+ // keep `expire: undefined`.
946
+ revalidate !== false && revalidate > 0 ? nextConfig.expireTime : undefined : context.renderOpts.collectedExpire;
947
+ // Create the cache entry for the response.
948
+ const cacheEntry = {
949
+ value: {
950
+ kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_17__.CachedRouteKind.APP_ROUTE,
951
+ status: response.status,
952
+ body: Buffer.from(await blob.arrayBuffer()),
953
+ headers
954
+ },
955
+ cacheControl: {
956
+ revalidate,
957
+ expire
958
+ }
959
+ };
960
+ return cacheEntry;
961
+ } else {
962
+ // send response without caching if not ISR
963
+ await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, response, pendingWaitUntil);
964
+ return null;
965
+ }
966
+ } catch (err) {
967
+ // if this is a background revalidate we need to report
968
+ // the request error here as it won't be bubbled
969
+ if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {
970
+ const silenceLog = false;
971
+ await routeModule.onRequestError(req, err, {
972
+ routerKind: 'App Router',
973
+ routePath: srcPage,
974
+ routeType: 'route',
975
+ revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
976
+ isStaticGeneration: cacheKey !== null,
977
+ isOnDemandRevalidate
978
+ })
979
+ }, silenceLog, routerServerContext);
980
+ }
981
+ throw err;
982
+ }
983
+ };
984
+ const handleResponse = async (currentSpan, parentSpan)=>{
985
+ try {
986
+ var _cacheEntry_value;
987
+ const cacheEntry = await routeModule.handleResponse({
988
+ req,
989
+ nextConfig,
990
+ cacheKey,
991
+ routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_ROUTE,
992
+ isFallback: false,
993
+ previewProps,
994
+ prerenderManifest,
995
+ isRoutePPREnabled: false,
996
+ isOnDemandRevalidate,
997
+ revalidateOnlyGenerated,
998
+ responseGenerator,
999
+ waitUntil: ctx.waitUntil,
1000
+ isMinimalMode
1001
+ });
1002
+ if (cacheEntry !== null && 'error' in cacheEntry) {
1003
+ throw cacheEntry.error;
1004
+ }
1005
+ // we don't create a cacheEntry for ISR
1006
+ if (!isIsr) {
1007
+ return;
1008
+ }
1009
+ 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) {
1010
+ var _cacheEntry_value1;
1011
+ throw new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`);
1012
+ }
1013
+ if (!isMinimalMode) {
1014
+ res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');
1015
+ }
1016
+ // Draft mode should never be cached
1017
+ if (isDraftMode) {
1018
+ res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');
1019
+ }
1020
+ const headers = (0,next_dist_server_web_utils__WEBPACK_IMPORTED_MODULE_12__.fromNodeOutgoingHttpHeaders)(cacheEntry.value.headers);
1021
+ if (!(isMinimalMode && isIsr)) {
1022
+ headers.delete(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_14__.NEXT_CACHE_TAGS_HEADER);
1023
+ }
1024
+ // If cache control is already set on the response we don't
1025
+ // override it to allow users to customize it via next.config
1026
+ if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {
1027
+ headers.set('Cache-Control', (0,next_dist_server_lib_cache_control__WEBPACK_IMPORTED_MODULE_13__.getCacheControlHeader)(cacheEntry.cacheControl));
1028
+ }
1029
+ 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'.
1030
+ new Response(cacheEntry.value.body, {
1031
+ headers,
1032
+ status: cacheEntry.value.status || 200
1033
+ }));
1034
+ return;
1035
+ } catch (err) {
1036
+ if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_15__.NoFallbackError)) {
1037
+ const silenceLog = false;
1038
+ await routeModule.onRequestError(req, err, {
1039
+ routerKind: 'App Router',
1040
+ routePath: normalizedSrcPage,
1041
+ routeType: 'route',
1042
+ revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_10__.getRevalidateReason)({
1043
+ isStaticGeneration: cacheKey !== null,
1044
+ isOnDemandRevalidate
1045
+ })
1046
+ }, silenceLog, routerServerContext);
1047
+ }
1048
+ // rethrow so that we can handle serving error page
1049
+ // If this is during static generation, throw the error again.
1050
+ if (isIsr) throw err;
1051
+ // Otherwise, send a 500 response unless the original response has
1052
+ // already committed. In that case, preserve its status code for
1053
+ // telemetry while still recording the failure and terminating a response
1054
+ // that the failed pipeline left open.
1055
+ if (res.headersSent) {
1056
+ if (currentSpan) {
1057
+ const error = err instanceof Error ? err : new Error('Unknown app route error');
1058
+ currentSpan.recordException(error);
1059
+ currentSpan.setStatus({
1060
+ code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR,
1061
+ message: error.message
1062
+ });
1063
+ currentSpan.setAttribute('error.type', error.name);
1064
+ }
1065
+ if (!res.writableEnded && !res.destroyed) {
1066
+ res.end();
1067
+ }
1068
+ } else {
1069
+ await (0,next_dist_server_send_response__WEBPACK_IMPORTED_MODULE_11__/* .sendResponse */ .I)(nodeNextReq, nodeNextRes, new Response(null, {
1070
+ status: 500
1071
+ }));
1072
+ }
1073
+ return;
1074
+ } finally{
1075
+ ;
1076
+ (()=>{
1077
+ if (!currentSpan) {
1078
+ return;
1079
+ }
1080
+ let statusCode = res.statusCode;
1081
+ currentSpan.setAttributes({
1082
+ 'http.status_code': statusCode,
1083
+ 'next.rsc': false
1084
+ });
1085
+ if (statusCode && statusCode >= 500) {
1086
+ // For 5xx status codes: SHOULD be set to 'Error' span status.
1087
+ // x-ref: https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
1088
+ currentSpan.setStatus({
1089
+ code: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanStatusCode.ERROR
1090
+ });
1091
+ // For span status 'Error', SHOULD set 'error.type' attribute.
1092
+ currentSpan.setAttribute('error.type', statusCode.toString());
1093
+ }
1094
+ const rootSpanAttributes = tracer.getRootSpanAttributes();
1095
+ // We were unable to get attributes, probably OTEL is not enabled
1096
+ if (!rootSpanAttributes) {
1097
+ return;
1098
+ }
1099
+ if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest) {
1100
+ console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);
1101
+ return;
1102
+ }
1103
+ const route = rootSpanAttributes.get('next.route') || normalizedSrcPage;
1104
+ const name = `${method} ${route}`;
1105
+ currentSpan.setAttributes({
1106
+ 'next.route': route,
1107
+ 'http.route': route,
1108
+ 'next.span_name': name
1109
+ });
1110
+ currentSpan.updateName(name);
1111
+ // Propagate http.route to the parent span if one exists (e.g.
1112
+ // a platform-created HTTP span in adapter deployments).
1113
+ if (parentSpan && parentSpan !== currentSpan) {
1114
+ parentSpan.setAttribute('http.route', route);
1115
+ parentSpan.updateName(name);
1116
+ }
1117
+ })();
983
1118
  }
984
- }
985
- if (Object.keys(cleaned).length === 0) return null;
986
- return JSON.stringify(cleaned);
987
- }
988
- function toMbti(v) {
989
- if (!v) return null;
990
- return v in _lib_agents_adaptive_persona_presets__WEBPACK_IMPORTED_MODULE_2__/* .MBTI_PRESETS */ .e ? v : null;
991
- }
992
- function deleteAgentConfig(id) {
993
- return (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("DELETE FROM agent_configs WHERE id=?").run(id).changes > 0;
994
- }
995
- function generateAgentId(name) {
996
- const slug = name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40);
997
- const suffix = Math.random().toString(36).slice(2, 6);
998
- return slug ? `${slug}-${suffix}` : `agent-${suffix}`;
999
- }
1000
- // ── ADR-0022: per-agent message-channel display filters ─────────────────
1001
- // Canonical channel keys mirrored in `hooks/useMessageFilters.ts`. Kept
1002
- // in sync there by importing this constant — single source of truth.
1003
- const DISPLAY_FILTER_KEYS = [
1004
- "scheduled_task",
1005
- "watcher",
1006
- "bridge",
1007
- "extension",
1008
- "page_capture",
1009
- "synthetic",
1010
- "tool_use",
1011
- "thinking"
1012
- ];
1013
- const DISPLAY_FILTER_DEFAULTS = {
1014
- scheduled_task: true,
1015
- watcher: true,
1016
- bridge: true,
1017
- extension: true,
1018
- page_capture: true,
1019
- synthetic: true,
1020
- tool_use: true,
1021
- thinking: true
1022
- };
1023
- function parseDisplayFilters(raw) {
1024
- if (!raw) return {
1025
- ...DISPLAY_FILTER_DEFAULTS
1026
- };
1027
- try {
1028
- const parsed = JSON.parse(raw);
1029
- // Merge over defaults so newly-added channels stay visible on old rows.
1030
- return {
1031
- ...DISPLAY_FILTER_DEFAULTS,
1032
- ...parsed
1033
- };
1034
- } catch {
1035
- return {
1036
- ...DISPLAY_FILTER_DEFAULTS
1037
- };
1038
- }
1039
- }
1040
- function getAgentDisplayFilters(id) {
1041
- const row = getAgentConfig(id);
1042
- if (!row) return null;
1043
- return parseDisplayFilters(row.display_filters);
1044
- }
1045
- /**
1046
- * Merge a partial filter map into the agent's stored prefs. Pass `null` to
1047
- * reset to defaults (clears the column). Safe against concurrent toggles
1048
- * from multiple browser tabs because the merge happens server-side.
1049
- */ function updateAgentDisplayFilters(id, patch) {
1050
- const row = getAgentConfig(id);
1051
- if (!row) return null;
1052
- if (patch === null) {
1053
- (0,_lib_db__WEBPACK_IMPORTED_MODULE_0__/* .getDb */ .Lf)().prepare("UPDATE agent_configs SET display_filters=NULL, updated_at=? WHERE id=?").run(now(), id);
1054
- return {
1055
- ...DISPLAY_FILTER_DEFAULTS
1056
- };
1057
- }
1058
- const current = parseDisplayFilters(row.display_filters);
1059
- const next = {
1060
- ...current
1061
1119
  };
1062
- for (const k of DISPLAY_FILTER_KEYS){
1063
- if (k in patch && typeof patch[k] === "boolean") next[k] = patch[k];
1120
+ // TODO: activeSpan code path is for when wrapped by
1121
+ // next-server can be removed when this is no longer used
1122
+ if (isWrappedByNextServer && activeSpan) {
1123
+ await handleResponse(activeSpan, undefined);
1124
+ } else {
1125
+ let parentSpan = tracer.getActiveScopeSpan();
1126
+ await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_9__.BaseServerSpan.handleRequest, {
1127
+ spanName: `${method} ${srcPage}`,
1128
+ kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_4__.SpanKind.SERVER,
1129
+ attributes: {
1130
+ 'http.method': method,
1131
+ 'http.target': req.url
1132
+ }
1133
+ }, (span)=>handleResponse(span, parentSpan)), undefined, !isWrappedByNextServer);
1064
1134
  }
1065
- (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);
1066
- return next;
1067
1135
  }
1068
1136
 
1137
+ //# sourceMappingURL=app-route.js.map
1069
1138
 
1070
- /***/ }),
1071
-
1072
- /***/ 44708:
1073
- /***/ ((module) => {
1074
-
1075
- module.exports = require("node:https");
1076
-
1077
- /***/ }),
1078
-
1079
- /***/ 44870:
1080
- /***/ ((module) => {
1081
-
1082
- module.exports = require("next/dist/compiled/next-server/app-route.runtime.prod.js");
1083
-
1084
- /***/ }),
1085
-
1086
- /***/ 48161:
1087
- /***/ ((module) => {
1088
-
1089
- module.exports = require("node:os");
1090
-
1091
- /***/ }),
1092
-
1093
- /***/ 51455:
1094
- /***/ ((module) => {
1095
-
1096
- module.exports = require("node:fs/promises");
1097
-
1098
- /***/ }),
1099
-
1100
- /***/ 55511:
1101
- /***/ ((module) => {
1102
-
1103
- module.exports = require("crypto");
1104
-
1105
- /***/ }),
1106
-
1107
- /***/ 55591:
1108
- /***/ ((module) => {
1109
-
1110
- module.exports = require("https");
1111
-
1112
- /***/ }),
1113
-
1114
- /***/ 57075:
1115
- /***/ ((module) => {
1116
-
1117
- module.exports = require("node:stream");
1118
-
1119
- /***/ }),
1120
-
1121
- /***/ 57975:
1122
- /***/ ((module) => {
1123
-
1124
- module.exports = require("node:util");
1125
-
1126
- /***/ }),
1127
-
1128
- /***/ 63033:
1129
- /***/ ((module) => {
1130
-
1131
- module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");
1132
-
1133
- /***/ }),
1134
-
1135
- /***/ 73024:
1136
- /***/ ((module) => {
1137
-
1138
- module.exports = require("node:fs");
1139
1139
 
1140
1140
  /***/ }),
1141
1141
 
@@ -1257,7 +1257,7 @@ module.exports = import("@huggingface/transformers");;
1257
1257
  var __webpack_require__ = require("../../../../webpack-runtime.js");
1258
1258
  __webpack_require__.C(exports);
1259
1259
  var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
1260
- var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,1813,7981,4992,46], () => (__webpack_exec__(38241)));
1260
+ var __webpack_exports__ = __webpack_require__.X(0, [2970,7377,1813,7981,4992,46], () => (__webpack_exec__(75355)));
1261
1261
  module.exports = __webpack_exports__;
1262
1262
 
1263
1263
  })();