@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
@@ -0,0 +1,166 @@
1
+ /**
2
+ * Bundled release changesets (docs/adoption/changesets.json), generated at
3
+ * release time by `npm run release:changeset`. Installed bundles have no git
4
+ * history, so version adoption reads these to learn which prompts and tool
5
+ * descriptions/schemas changed between the user's last adopted version and
6
+ * the running one.
7
+ */
8
+ import { z } from "zod";
9
+ import bundled from "@/docs/adoption/changesets.json";
10
+ import type { PromptChange, ToolChange } from "./surface-snapshot";
11
+
12
+ const changeKind = z.enum(["added", "removed", "changed"]);
13
+
14
+ const promptChangeSchema = z.object({
15
+ id: z.string(),
16
+ source: z.string(),
17
+ change: changeKind,
18
+ added_lines: z.array(z.string()),
19
+ removed_lines: z.array(z.string()),
20
+ omitted_lines: z.number().int().nonnegative(),
21
+ });
22
+
23
+ const toolChangeSchema = z.object({
24
+ name: z.string(),
25
+ change: changeKind,
26
+ description_changed: z.boolean(),
27
+ description: z.string().optional(),
28
+ previous_description: z.string().optional(),
29
+ params_added: z.array(z.string()),
30
+ params_removed: z.array(z.string()),
31
+ params_changed: z.array(z.string()),
32
+ required_added: z.array(z.string()),
33
+ required_removed: z.array(z.string()),
34
+ });
35
+
36
+ export const releaseChangesetSchema = z.object({
37
+ version: z.string().regex(/^\d+\.\d+\.\d+$/),
38
+ previous_version: z.string().regex(/^\d+\.\d+\.\d+$/).nullable(),
39
+ date: z.string(),
40
+ hints: z.array(z.string()),
41
+ commits: z.array(z.string()),
42
+ prompts: z.array(promptChangeSchema),
43
+ tools: z.array(toolChangeSchema),
44
+ });
45
+
46
+ export const changesetFileSchema = z.object({
47
+ schema_version: z.literal(1),
48
+ changesets: z.array(releaseChangesetSchema),
49
+ });
50
+
51
+ export type ReleaseChangeset = z.infer<typeof releaseChangesetSchema>;
52
+ export type ChangesetFile = z.infer<typeof changesetFileSchema>;
53
+
54
+ // Compile-time guard: the bundled schema must stay in sync with the diff types.
55
+ type Assert<T extends true> = T;
56
+ type _PromptShape = Assert<PromptChange extends z.infer<typeof promptChangeSchema> ? true : false>;
57
+ type _ToolShape = Assert<ToolChange extends z.infer<typeof toolChangeSchema> ? true : false>;
58
+
59
+ export function compareVersions(a: string, b: string): number {
60
+ const pa = a.split(".").map((part) => Number.parseInt(part, 10) || 0);
61
+ const pb = b.split(".").map((part) => Number.parseInt(part, 10) || 0);
62
+ for (let i = 0; i < Math.max(pa.length, pb.length); i++) {
63
+ const diff = (pa[i] ?? 0) - (pb[i] ?? 0);
64
+ if (diff !== 0) return diff;
65
+ }
66
+ return 0;
67
+ }
68
+
69
+ let cached: ReleaseChangeset[] | null = null;
70
+
71
+ export function loadBundledChangesets(): ReleaseChangeset[] {
72
+ if (cached) return cached;
73
+ const parsed = changesetFileSchema.safeParse(bundled);
74
+ cached = parsed.success
75
+ ? [...parsed.data.changesets].sort((a, b) => compareVersions(a.version, b.version))
76
+ : [];
77
+ return cached;
78
+ }
79
+
80
+ export interface ChangesetRange {
81
+ entries: ReleaseChangeset[];
82
+ /** True when the entries chain fully from `previous` to `current`. */
83
+ complete: boolean;
84
+ }
85
+
86
+ /** Cumulative changesets for versions in (previous, current]. */
87
+ export function changesetsBetween(
88
+ previous: string,
89
+ current: string,
90
+ all: readonly ReleaseChangeset[] = loadBundledChangesets(),
91
+ ): ChangesetRange {
92
+ const entries = all
93
+ .filter((entry) => compareVersions(entry.version, previous) > 0 && compareVersions(entry.version, current) <= 0)
94
+ .sort((a, b) => compareVersions(a.version, b.version));
95
+ const reachesCurrent = entries.some((entry) => compareVersions(entry.version, current) === 0);
96
+ const first = entries[0];
97
+ const reachesPrevious = Boolean(first?.previous_version && compareVersions(first.previous_version, previous) <= 0);
98
+ return { entries, complete: reachesCurrent && reachesPrevious };
99
+ }
100
+
101
+ export interface ChangesetSurfaceSummary {
102
+ promptIds: string[];
103
+ toolNames: string[];
104
+ removedTools: string[];
105
+ hints: string[];
106
+ }
107
+
108
+ /** Collapses a version range to the latest state of each changed surface. */
109
+ export function summarizeChangesets(entries: readonly ReleaseChangeset[]): ChangesetSurfaceSummary {
110
+ const prompts = new Set<string>();
111
+ const tools = new Map<string, ToolChange["change"]>();
112
+ const hints: string[] = [];
113
+ for (const entry of entries) {
114
+ for (const prompt of entry.prompts) prompts.add(prompt.id);
115
+ for (const tool of entry.tools) tools.set(tool.name, tool.change);
116
+ for (const hint of entry.hints) hints.push(`${entry.version}: ${hint}`);
117
+ }
118
+ return {
119
+ promptIds: [...prompts].sort(),
120
+ toolNames: [...tools.keys()].sort(),
121
+ removedTools: [...tools].filter(([, change]) => change === "removed").map(([name]) => name).sort(),
122
+ hints,
123
+ };
124
+ }
125
+
126
+ function describeTool(tool: ToolChange): string {
127
+ const parts: string[] = [];
128
+ if (tool.change === "added") parts.push("new tool");
129
+ if (tool.change === "removed") parts.push("removed — references to it will fail");
130
+ if (tool.description_changed) parts.push("description changed");
131
+ if (tool.params_added.length) parts.push(`params added: ${tool.params_added.join(", ")}`);
132
+ if (tool.params_removed.length) parts.push(`params removed: ${tool.params_removed.join(", ")}`);
133
+ if (tool.params_changed.length) parts.push(`params changed: ${tool.params_changed.join(", ")}`);
134
+ if (tool.required_added.length) parts.push(`now required: ${tool.required_added.join(", ")}`);
135
+ if (tool.required_removed.length) parts.push(`no longer required: ${tool.required_removed.join(", ")}`);
136
+ const head = ` - tool \`${tool.name}\`: ${parts.join("; ") || tool.change}`;
137
+ return tool.description && tool.change !== "removed"
138
+ ? `${head}\n description: ${tool.description}`
139
+ : head;
140
+ }
141
+
142
+ function describePrompt(prompt: PromptChange): string {
143
+ const lines = [` - prompt \`${prompt.id}\` (${prompt.source}): ${prompt.change}`];
144
+ for (const line of prompt.added_lines) lines.push(` + ${line}`);
145
+ for (const line of prompt.removed_lines) lines.push(` - ${line}`);
146
+ if (prompt.omitted_lines > 0) lines.push(` … ${prompt.omitted_lines} more changed line(s)`);
147
+ return lines.join("\n");
148
+ }
149
+
150
+ /** Renders the range for the adoption prompt, bounded to `maxChars`. */
151
+ export function formatChangesetsForPrompt(entries: readonly ReleaseChangeset[], maxChars = 8000): string {
152
+ const blocks: string[] = [];
153
+ for (const entry of entries) {
154
+ const lines = [`Version ${entry.version} (from ${entry.previous_version ?? "unknown"}, ${entry.date}):`];
155
+ if (entry.hints.length) lines.push(...entry.hints.map((hint) => ` - adoption hint: ${hint}`));
156
+ lines.push(...entry.tools.map(describeTool));
157
+ lines.push(...entry.prompts.map(describePrompt));
158
+ if (!entry.hints.length && !entry.tools.length && !entry.prompts.length) {
159
+ lines.push(" - no prompt or tool surface changes");
160
+ }
161
+ blocks.push(lines.join("\n"));
162
+ }
163
+ const text = blocks.join("\n");
164
+ if (text.length <= maxChars) return text;
165
+ return `${text.slice(0, maxChars)}\n… changeset truncated; the full record is docs/adoption/changesets.json in the release.`;
166
+ }
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Collects the live prompt + tool surface and checks it is complete and
3
+ * deterministic. `scripts/release-changeset.mjs` also drives this file to
4
+ * write snapshots and release changesets, because collection needs the
5
+ * TypeScript runtime and the `@/` alias:
6
+ * JARELA_SURFACE_OUT=<path> write the live snapshot to <path>
7
+ * JARELA_CHANGESET_WRITE=1 record the release changeset (see the script)
8
+ */
9
+ import { describe, it, expect, afterAll } from "vitest";
10
+ import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
11
+ import { tmpdir } from "node:os";
12
+ import { join } from "node:path";
13
+
14
+ const tmpRoot = mkdtempSync(join(tmpdir(), "jarela-surface-"));
15
+ process.env.JARELA_DB_DIR = tmpRoot;
16
+
17
+ const { collectSurfaceSnapshot } = await import("./surface-collect");
18
+ const { SURFACE_SNAPSHOT_SCHEMA_VERSION } = await import("./surface-snapshot");
19
+ type SurfaceSnapshot = import("./surface-snapshot").SurfaceSnapshot;
20
+
21
+ afterAll(() => {
22
+ try { rmSync(tmpRoot, { recursive: true, force: true }); } catch { /* held open */ }
23
+ });
24
+
25
+ const root = process.cwd();
26
+ const packageVersion = (JSON.parse(readFileSync(join(root, "package.json"), "utf8")) as { version: string }).version;
27
+ const snapshot = await collectSurfaceSnapshot(packageVersion);
28
+
29
+ if (process.env.JARELA_SURFACE_OUT) {
30
+ writeFileSync(process.env.JARELA_SURFACE_OUT, `${JSON.stringify(snapshot, null, 2)}\n`, "utf8");
31
+ }
32
+
33
+ if (process.env.JARELA_CHANGESET_WRITE === "1") {
34
+ const { writeReleaseChangeset, readSnapshot } = await import("./changeset-build");
35
+ const readOptional = (path: string | undefined): SurfaceSnapshot | undefined =>
36
+ path ? readSnapshot(path) : undefined;
37
+ const entry = writeReleaseChangeset({
38
+ root,
39
+ version: process.env.JARELA_CHANGESET_VERSION || packageVersion,
40
+ nextSnapshot: readOptional(process.env.JARELA_CHANGESET_NEXT_SNAPSHOT) ?? snapshot,
41
+ previousSnapshot: readOptional(process.env.JARELA_CHANGESET_PREVIOUS_SNAPSHOT),
42
+ date: process.env.JARELA_CHANGESET_DATE || new Date().toISOString().slice(0, 10),
43
+ ref: process.env.JARELA_CHANGESET_REF || undefined,
44
+ });
45
+ if (process.env.JARELA_CHANGESET_REPORT) {
46
+ writeFileSync(process.env.JARELA_CHANGESET_REPORT, JSON.stringify({
47
+ version: entry.version,
48
+ previous_version: entry.previous_version,
49
+ prompts: entry.prompts.length,
50
+ tools: entry.tools.length,
51
+ hints: entry.hints.length,
52
+ commits: entry.commits.length,
53
+ }), "utf8");
54
+ }
55
+ }
56
+
57
+ describe("model-facing surface snapshot", () => {
58
+ it("covers static prompts, system prompt sections, and built-in tools", () => {
59
+ expect(snapshot.schema_version).toBe(SURFACE_SNAPSHOT_SCHEMA_VERSION);
60
+ expect(snapshot.prompts["static.agent.tool-usage-sop"]?.text).toBeTruthy();
61
+ expect(Object.keys(snapshot.prompts).filter((id) => id.startsWith("system."))).toEqual(
62
+ expect.arrayContaining(["system.Tool usage SOP", "system.Self-configuration (with user approval)"]),
63
+ );
64
+ expect(Object.keys(snapshot.tools).length).toBeGreaterThan(50);
65
+ expect(snapshot.tools.update_scheduled_task?.description).toBeTruthy();
66
+ });
67
+
68
+ it("records an object parameter schema for every tool", () => {
69
+ for (const [name, tool] of Object.entries(snapshot.tools)) {
70
+ expect((tool.parameters as { type?: unknown }).type, name).toBe("object");
71
+ expect(tool.parameters, name).not.toHaveProperty("$schema");
72
+ }
73
+ });
74
+
75
+ it("excludes host- and time-dependent prompt content", () => {
76
+ expect(snapshot.prompts).not.toHaveProperty(["system.Host environment"]);
77
+ expect(snapshot.prompts).not.toHaveProperty(["system.System signals"]);
78
+ for (const [id, prompt] of Object.entries(snapshot.prompts)) {
79
+ if (!id.startsWith("system.")) continue;
80
+ expect(prompt.text, id).not.toMatch(/^Current (time|local date and time):/m);
81
+ expect(prompt.text, id).not.toContain(tmpRoot);
82
+ }
83
+ });
84
+
85
+ it("is deterministic across collections", async () => {
86
+ expect(await collectSurfaceSnapshot(packageVersion)).toEqual(snapshot);
87
+ });
88
+ });
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Collects the live model-facing surface (see surface-snapshot.ts). Imports
3
+ * the agent runtime, so callers must point JARELA_DB_DIR at a scratch
4
+ * directory first. Used only by the release changeset generator and its
5
+ * tests — never by the running app.
6
+ */
7
+ import { toJsonSchema } from "@langchain/core/utils/json_schema";
8
+ import { allBuiltins } from "@/lib/tools";
9
+ import { listStaticPrompts } from "@/lib/agents/prompt-registry";
10
+ import { buildVariants } from "@/lib/agents/prompt-variants";
11
+ import {
12
+ SURFACE_SNAPSHOT_SCHEMA_VERSION,
13
+ splitSystemPromptSections,
14
+ type SurfacePrompt,
15
+ type SurfaceSnapshot,
16
+ type SurfaceTool,
17
+ } from "./surface-snapshot";
18
+
19
+ const SYSTEM_PROMPT_SOURCE = "lib/agents/prepare/system-prompt.ts";
20
+ /** Richest variant first so shared sections keep their fullest form. */
21
+ const VARIANT_PRIORITY = ["pinned-tools-all-bound", "delivery-channel", "proxy-only-and-provider-cap", "minimal-agent"];
22
+
23
+ function sortedRecord<T>(record: Record<string, T>): Record<string, T> {
24
+ return Object.fromEntries(Object.entries(record).sort(([a], [b]) => a.localeCompare(b)));
25
+ }
26
+
27
+ export async function collectSurfaceSnapshot(version: string): Promise<SurfaceSnapshot> {
28
+ const prompts: Record<string, SurfacePrompt> = {};
29
+ for (const prompt of listStaticPrompts()) {
30
+ prompts[`static.${prompt.id}`] = { source: prompt.source, text: prompt.text };
31
+ }
32
+
33
+ const variants = await buildVariants();
34
+ const rank = (id: string) => {
35
+ const index = VARIANT_PRIORITY.indexOf(id);
36
+ return index === -1 ? VARIANT_PRIORITY.length : index;
37
+ };
38
+ for (const variant of [...variants].sort((a, b) => rank(a.id) - rank(b.id))) {
39
+ for (const [title, text] of Object.entries(splitSystemPromptSections(variant.prompt))) {
40
+ prompts[`system.${title}`] ??= { source: SYSTEM_PROMPT_SOURCE, text };
41
+ }
42
+ }
43
+
44
+ const tools: Record<string, SurfaceTool> = {};
45
+ for (const tool of allBuiltins()) {
46
+ let parameters: unknown;
47
+ try {
48
+ parameters = toJsonSchema(tool.schema as Parameters<typeof toJsonSchema>[0]);
49
+ } catch {
50
+ parameters = {};
51
+ }
52
+ if (parameters && typeof parameters === "object") {
53
+ delete (parameters as Record<string, unknown>).$schema;
54
+ }
55
+ tools[tool.name] = { description: tool.description ?? "", parameters };
56
+ }
57
+
58
+ return {
59
+ schema_version: SURFACE_SNAPSHOT_SCHEMA_VERSION,
60
+ version,
61
+ prompts: sortedRecord(prompts),
62
+ tools: sortedRecord(tools),
63
+ };
64
+ }
@@ -0,0 +1,104 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import { diffPrompts, diffTools, splitSystemPromptSections } from "./surface-snapshot";
3
+
4
+ const objectSchema = (properties: Record<string, unknown>, required: string[] = []) => ({
5
+ type: "object",
6
+ properties,
7
+ required,
8
+ });
9
+
10
+ describe("splitSystemPromptSections", () => {
11
+ it("splits on section headers and drops host- and time-dependent content", () => {
12
+ const sections = splitSystemPromptSections([
13
+ "intro line",
14
+ "--- Tool usage SOP ---",
15
+ "1. Use tools.",
16
+ "<!-- jarela:dynamic -->",
17
+ "--- Host environment ---",
18
+ "OS: win32",
19
+ "--- System signals ---",
20
+ "[]",
21
+ "--- Enabled tools ---",
22
+ "Current time: 2026-01-01T00:00:00Z (UTC).",
23
+ "Current local date and time: 2026-01-01 01:00",
24
+ "- web_search",
25
+ ].join("\n"));
26
+ expect(sections).toEqual({
27
+ Preamble: "intro line",
28
+ "Tool usage SOP": "1. Use tools.",
29
+ "Enabled tools": "- web_search",
30
+ });
31
+ });
32
+ });
33
+
34
+ describe("diffPrompts", () => {
35
+ it("reports line-level additions and removals and ignores whitespace-only edits", () => {
36
+ const prev = {
37
+ a: { source: "a.ts", text: "keep\nold rule" },
38
+ b: { source: "b.ts", text: "same" },
39
+ gone: { source: "g.ts", text: "bye" },
40
+ };
41
+ const next = {
42
+ a: { source: "a.ts", text: "keep\nnew rule" },
43
+ b: { source: "b.ts", text: " same \n" },
44
+ fresh: { source: "f.ts", text: "hello" },
45
+ };
46
+ expect(diffPrompts(prev, next)).toEqual([
47
+ { id: "a", source: "a.ts", change: "changed", added_lines: ["new rule"], removed_lines: ["old rule"], omitted_lines: 0 },
48
+ { id: "fresh", source: "f.ts", change: "added", added_lines: [], removed_lines: [], omitted_lines: 0 },
49
+ { id: "gone", source: "g.ts", change: "removed", added_lines: [], removed_lines: [], omitted_lines: 0 },
50
+ ]);
51
+ });
52
+
53
+ it("caps excerpts and counts the omitted lines", () => {
54
+ const lines = Array.from({ length: 20 }, (_, i) => `line ${i}`).join("\n");
55
+ const [change] = diffPrompts({ p: { source: "p.ts", text: "x" } }, { p: { source: "p.ts", text: lines } });
56
+ expect(change.added_lines).toHaveLength(12);
57
+ expect(change.omitted_lines).toBe(8);
58
+ });
59
+ });
60
+
61
+ describe("diffTools", () => {
62
+ it("classifies parameter, requirement, and description changes", () => {
63
+ const prev = {
64
+ t: { description: "Old.", parameters: objectSchema({ a: { type: "string" }, b: { type: "number" }, gone: {} }, ["a"]) },
65
+ same: { description: "Same.", parameters: objectSchema({ q: { type: "string" } }) },
66
+ };
67
+ const next = {
68
+ t: { description: "New.", parameters: objectSchema({ a: { type: "string" }, b: { type: "string" }, c: {} }, ["a", "c"]) },
69
+ same: { description: "Same.", parameters: objectSchema({ q: { type: "string" } }) },
70
+ };
71
+ expect(diffTools(prev, next)).toEqual([{
72
+ name: "t",
73
+ change: "changed",
74
+ description_changed: true,
75
+ description: "New.",
76
+ previous_description: "Old.",
77
+ params_added: ["c"],
78
+ params_removed: ["gone"],
79
+ params_changed: ["b"],
80
+ required_added: ["c"],
81
+ required_removed: [],
82
+ }]);
83
+ });
84
+
85
+ it("treats property order differences as unchanged", () => {
86
+ const prev = { t: { description: "d", parameters: objectSchema({ a: { type: "string", description: "x" } }) } };
87
+ const next = { t: { description: "d", parameters: objectSchema({ a: { description: "x", type: "string" } }) } };
88
+ expect(diffTools(prev, next)).toEqual([]);
89
+ });
90
+
91
+ it("records added and removed tools", () => {
92
+ const tool = { description: "T.", parameters: objectSchema({ a: {} }, ["a"]) };
93
+ expect(diffTools({ old: tool }, { added: tool })).toEqual([
94
+ {
95
+ name: "added", change: "added", description_changed: false, description: "T.",
96
+ params_added: ["a"], params_removed: [], params_changed: [], required_added: ["a"], required_removed: [],
97
+ },
98
+ {
99
+ name: "old", change: "removed", description_changed: false,
100
+ params_added: [], params_removed: [], params_changed: [], required_added: [], required_removed: [],
101
+ },
102
+ ]);
103
+ });
104
+ });
@@ -0,0 +1,210 @@
1
+ /**
2
+ * The model-facing surface of a Jarela release: every prompt text Jarela
3
+ * sends and every built-in tool's description and parameter schema. Release
4
+ * changesets diff two snapshots so version adoption can tell which user
5
+ * instructions, skills, settings, and scheduled prompts may need adapting.
6
+ * Pure functions only — collection lives in surface-collect.ts.
7
+ */
8
+
9
+ export const SURFACE_SNAPSHOT_SCHEMA_VERSION = 1;
10
+
11
+ export interface SurfacePrompt {
12
+ source: string;
13
+ text: string;
14
+ }
15
+
16
+ export interface SurfaceTool {
17
+ description: string;
18
+ parameters: unknown;
19
+ }
20
+
21
+ export interface SurfaceSnapshot {
22
+ schema_version: number;
23
+ version: string;
24
+ prompts: Record<string, SurfacePrompt>;
25
+ tools: Record<string, SurfaceTool>;
26
+ }
27
+
28
+ export type SurfaceChangeKind = "added" | "removed" | "changed";
29
+
30
+ export interface PromptChange {
31
+ id: string;
32
+ source: string;
33
+ change: SurfaceChangeKind;
34
+ added_lines: string[];
35
+ removed_lines: string[];
36
+ /** Lines beyond the excerpt cap, so readers know the excerpt is partial. */
37
+ omitted_lines: number;
38
+ }
39
+
40
+ export interface ToolChange {
41
+ name: string;
42
+ change: SurfaceChangeKind;
43
+ description_changed: boolean;
44
+ description?: string;
45
+ previous_description?: string;
46
+ params_added: string[];
47
+ params_removed: string[];
48
+ params_changed: string[];
49
+ required_added: string[];
50
+ required_removed: string[];
51
+ }
52
+
53
+ export interface SurfaceDelta {
54
+ prompts: PromptChange[];
55
+ tools: ToolChange[];
56
+ }
57
+
58
+ const SECTION_HEADER = /^--- (.+) ---$/;
59
+ /** Sections whose content depends on the host machine or the moment of collection. */
60
+ const VOLATILE_SECTIONS = new Set(["Host environment", "System signals"]);
61
+ const VOLATILE_LINES = [/^Current time:/, /^Current local date and time:/];
62
+ const MAX_EXCERPT_LINES = 12;
63
+ const MAX_LINE_CHARS = 300;
64
+ const MAX_DESCRIPTION_CHARS = 600;
65
+
66
+ function clip(text: string, max: number): string {
67
+ return text.length > max ? `${text.slice(0, max - 1)}…` : text;
68
+ }
69
+
70
+ /**
71
+ * Splits an assembled agent system prompt into its `--- Title ---` sections,
72
+ * dropping host- and time-dependent content so two snapshots of the same code
73
+ * compare equal on any machine.
74
+ */
75
+ export function splitSystemPromptSections(prompt: string): Record<string, string> {
76
+ const sections: Record<string, string[]> = {};
77
+ let current = "Preamble";
78
+ for (const raw of prompt.split(/\r?\n/)) {
79
+ const header = SECTION_HEADER.exec(raw.trim());
80
+ if (header) {
81
+ current = header[1].trim();
82
+ sections[current] ??= [];
83
+ continue;
84
+ }
85
+ if (raw.startsWith("<!-- jarela:")) continue;
86
+ if (VOLATILE_LINES.some((pattern) => pattern.test(raw.trim()))) continue;
87
+ (sections[current] ??= []).push(raw);
88
+ }
89
+ const out: Record<string, string> = {};
90
+ for (const [title, lines] of Object.entries(sections)) {
91
+ if (VOLATILE_SECTIONS.has(title)) continue;
92
+ const text = lines.join("\n").trim();
93
+ if (text) out[title] = text;
94
+ }
95
+ return out;
96
+ }
97
+
98
+ function significantLines(text: string): string[] {
99
+ return text.split(/\r?\n/).map((line) => line.trim()).filter(Boolean);
100
+ }
101
+
102
+ function excerpt(lines: string[]): { lines: string[]; omitted: number } {
103
+ return {
104
+ lines: lines.slice(0, MAX_EXCERPT_LINES).map((line) => clip(line, MAX_LINE_CHARS)),
105
+ omitted: Math.max(0, lines.length - MAX_EXCERPT_LINES),
106
+ };
107
+ }
108
+
109
+ export function diffPrompts(
110
+ prev: Record<string, SurfacePrompt>,
111
+ next: Record<string, SurfacePrompt>,
112
+ ): PromptChange[] {
113
+ const ids = [...new Set([...Object.keys(prev), ...Object.keys(next)])].sort();
114
+ const changes: PromptChange[] = [];
115
+ for (const id of ids) {
116
+ const before = prev[id];
117
+ const after = next[id];
118
+ if (before && after && before.text === after.text) continue;
119
+ const beforeLines = before ? significantLines(before.text) : [];
120
+ const afterLines = after ? significantLines(after.text) : [];
121
+ const beforeSet = new Set(beforeLines);
122
+ const afterSet = new Set(afterLines);
123
+ const added = excerpt(afterLines.filter((line) => !beforeSet.has(line)));
124
+ const removed = excerpt(beforeLines.filter((line) => !afterSet.has(line)));
125
+ // Whitespace-only edits change the text but not what the model reads.
126
+ if (before && after && added.lines.length === 0 && removed.lines.length === 0) continue;
127
+ changes.push({
128
+ id,
129
+ source: (after ?? before).source,
130
+ change: !before ? "added" : !after ? "removed" : "changed",
131
+ added_lines: before ? added.lines : [],
132
+ removed_lines: after ? removed.lines : [],
133
+ omitted_lines: (before ? added.omitted : 0) + (after ? removed.omitted : 0),
134
+ });
135
+ }
136
+ return changes;
137
+ }
138
+
139
+ interface ObjectSchema {
140
+ properties: Record<string, unknown>;
141
+ required: string[];
142
+ }
143
+
144
+ function objectSchema(parameters: unknown): ObjectSchema {
145
+ const schema = parameters && typeof parameters === "object" ? parameters as Record<string, unknown> : {};
146
+ const properties = schema.properties && typeof schema.properties === "object"
147
+ ? schema.properties as Record<string, unknown>
148
+ : {};
149
+ const required = Array.isArray(schema.required)
150
+ ? schema.required.filter((name): name is string => typeof name === "string")
151
+ : [];
152
+ return { properties, required };
153
+ }
154
+
155
+ function stableJson(value: unknown): string {
156
+ if (Array.isArray(value)) return `[${value.map(stableJson).join(",")}]`;
157
+ if (value && typeof value === "object") {
158
+ const entries = Object.entries(value as Record<string, unknown>).sort(([a], [b]) => a.localeCompare(b));
159
+ return `{${entries.map(([key, inner]) => `${JSON.stringify(key)}:${stableJson(inner)}`).join(",")}}`;
160
+ }
161
+ return JSON.stringify(value) ?? "null";
162
+ }
163
+
164
+ export function diffTools(
165
+ prev: Record<string, SurfaceTool>,
166
+ next: Record<string, SurfaceTool>,
167
+ ): ToolChange[] {
168
+ const names = [...new Set([...Object.keys(prev), ...Object.keys(next)])].sort();
169
+ const changes: ToolChange[] = [];
170
+ for (const name of names) {
171
+ const before = prev[name];
172
+ const after = next[name];
173
+ const beforeSchema = objectSchema(before?.parameters);
174
+ const afterSchema = objectSchema(after?.parameters);
175
+ const beforeParams = Object.keys(beforeSchema.properties);
176
+ const afterParams = Object.keys(afterSchema.properties);
177
+ const paramsAdded = afterParams.filter((param) => !(param in beforeSchema.properties)).sort();
178
+ const paramsRemoved = beforeParams.filter((param) => !(param in afterSchema.properties)).sort();
179
+ const paramsChanged = afterParams
180
+ .filter((param) => param in beforeSchema.properties)
181
+ .filter((param) => stableJson(beforeSchema.properties[param]) !== stableJson(afterSchema.properties[param]))
182
+ .sort();
183
+ const requiredAdded = afterSchema.required.filter((param) => !beforeSchema.required.includes(param)).sort();
184
+ const requiredRemoved = beforeSchema.required.filter((param) => !afterSchema.required.includes(param)).sort();
185
+ const descriptionChanged = Boolean(before && after && before.description.trim() !== after.description.trim());
186
+ const schemaChanged = paramsAdded.length + paramsRemoved.length + paramsChanged.length
187
+ + requiredAdded.length + requiredRemoved.length > 0;
188
+ if (before && after && !descriptionChanged && !schemaChanged) continue;
189
+ changes.push({
190
+ name,
191
+ change: !before ? "added" : !after ? "removed" : "changed",
192
+ description_changed: descriptionChanged,
193
+ ...(after && (!before || descriptionChanged) ? { description: clip(after.description.trim(), MAX_DESCRIPTION_CHARS) } : {}),
194
+ ...(before && after && descriptionChanged ? { previous_description: clip(before.description.trim(), MAX_DESCRIPTION_CHARS) } : {}),
195
+ params_added: after ? paramsAdded : [],
196
+ params_removed: before && after ? paramsRemoved : [],
197
+ params_changed: paramsChanged,
198
+ required_added: after ? requiredAdded : [],
199
+ required_removed: before && after ? requiredRemoved : [],
200
+ });
201
+ }
202
+ return changes;
203
+ }
204
+
205
+ export function diffSurfaces(prev: SurfaceSnapshot, next: SurfaceSnapshot): SurfaceDelta {
206
+ return {
207
+ prompts: diffPrompts(prev.prompts, next.prompts),
208
+ tools: diffTools(prev.tools, next.tools),
209
+ };
210
+ }
@@ -65,9 +65,7 @@ export const StructuredMemoryInputSchema = z.object({
65
65
  status: z.enum(MEMORY_STATUSES).default("active"),
66
66
  }).strict();
67
67
 
68
- export type StructuredMemoryInput = z.infer<typeof StructuredMemoryInputSchema>;
69
68
  export type StructuredMemoryRecord = z.infer<typeof StructuredMemoryEnvelopeV2Schema>;
70
- export type StructuredMemoryHistoryEntry = z.infer<typeof StructuredMemoryHistoryEntrySchema>;
71
69
 
72
70
  function normalizeStructuredMemoryCandidate(candidate: unknown): unknown {
73
71
  if (!candidate || typeof candidate !== "object") return candidate;
@@ -24,7 +24,7 @@ export interface ModelEditorFormInput {
24
24
  credential_id?: string | null;
25
25
  }
26
26
 
27
- export type ModelEditorPayload = Omit<ModelConfig, "name" | "created_at" | "updated_at">;
27
+ export type ModelEditorPayload = Omit<ModelConfig, "name" | "enabled" | "created_at" | "updated_at">;
28
28
 
29
29
  export type BuildResult =
30
30
  | { ok: true; name: string; payload: ModelEditorPayload }
@@ -97,5 +97,3 @@ export function loadExternalProviders(
97
97
  ): Record<string, ModelProvider> {
98
98
  return loadExternalProvidersDetailed(builtins).providers;
99
99
  }
100
-
101
- export { type ExternalProviderCredentialField as ProviderCredentialField };
@@ -1,6 +1,5 @@
1
- // GitHub Copilot device-flow login. Lets users sign in with their Copilot
2
- // subscription instead of pasting a PAT (which can't be exchanged for a
3
- // Copilot session token and gets rate-limited on the Models REST API).
1
+ // GitHub Copilot device-flow login. The legacy PAT path depended on GitHub
2
+ // Models, which has been retired; use this flow for Copilot Chat access.
4
3
  //
5
4
  // Flow (RFC 8628):
6
5
  // 1. POST github.com/login/device/code with the VS Code Copilot client_id.