@circuitwall/jarela 2.2.1 → 2.4.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 (703) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-path-routes-manifest.json +2 -1
  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 +100 -93
  22. package/.next/standalone/.next/server/app/api/v1/access/route.js +176 -169
  23. package/.next/standalone/.next/server/app/api/v1/agents/[id]/compact/route.js +89 -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 +139 -127
  26. package/.next/standalone/.next/server/app/api/v1/agents/[id]/route.js +107 -100
  27. package/.next/standalone/.next/server/app/api/v1/agents/[id]/thread/route.js +765 -753
  28. package/.next/standalone/.next/server/app/api/v1/agents/route.js +72 -65
  29. package/.next/standalone/.next/server/app/api/v1/allowed-sites/[hostname]/route.js +371 -364
  30. package/.next/standalone/.next/server/app/api/v1/allowed-sites/route.js +809 -802
  31. package/.next/standalone/.next/server/app/api/v1/artifacts/lifecycle/route.js +9 -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 +583 -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 +41 -30
  37. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/ignores/route.js +48 -37
  38. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js +697 -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 +703 -136
  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 +796 -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 +762 -746
  45. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/routes/route.js +1050 -1034
  46. package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js +673 -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 +811 -804
  49. package/.next/standalone/.next/server/app/api/v1/bridges/kinds/route.js.nft.json +1 -1
  50. package/.next/standalone/.next/server/app/api/v1/bridges/route.js +718 -706
  51. package/.next/standalone/.next/server/app/api/v1/bridges/route.js.nft.json +1 -1
  52. package/.next/standalone/.next/server/app/api/v1/builtin-tools/route.js +9 -9
  53. package/.next/standalone/.next/server/app/api/v1/builtin-tools/route.js.nft.json +1 -1
  54. package/.next/standalone/.next/server/app/api/v1/config/route.js +85 -85
  55. package/.next/standalone/.next/server/app/api/v1/credentials/[id]/route.js +709 -709
  56. package/.next/standalone/.next/server/app/api/v1/credentials/[id]/route.js.nft.json +1 -1
  57. package/.next/standalone/.next/server/app/api/v1/credentials/route.js +2 -2
  58. package/.next/standalone/.next/server/app/api/v1/credentials/route.js.nft.json +1 -1
  59. package/.next/standalone/.next/server/app/api/v1/dashboard/currency/route.js +10 -10
  60. package/.next/standalone/.next/server/app/api/v1/dashboard/metrics/route.js +796 -784
  61. package/.next/standalone/.next/server/app/api/v1/dashboard/pricing/route.js +30 -23
  62. package/.next/standalone/.next/server/app/api/v1/dashboard/pricing-task/route.js +86 -86
  63. package/.next/standalone/.next/server/app/api/v1/dashboard/pricing-task/route.js.nft.json +1 -1
  64. package/.next/standalone/.next/server/app/api/v1/delegations/codex/[job_id]/route.js +57 -57
  65. package/.next/standalone/.next/server/app/api/v1/delegations/codex/[job_id]/route.js.nft.json +1 -1
  66. package/.next/standalone/.next/server/app/api/v1/documents/search/route.js +385 -378
  67. package/.next/standalone/.next/server/app/api/v1/documents/settings/route.js +51 -44
  68. package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/reindex/route.js +65 -65
  69. package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/reindex/route.js.nft.json +1 -1
  70. package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/route.js +122 -122
  71. package/.next/standalone/.next/server/app/api/v1/documents/sources/[id]/route.js.nft.json +1 -1
  72. package/.next/standalone/.next/server/app/api/v1/documents/sources/route.js +37 -37
  73. package/.next/standalone/.next/server/app/api/v1/documents/sources/route.js.nft.json +1 -1
  74. package/.next/standalone/.next/server/app/api/v1/env/route.js +9 -9
  75. package/.next/standalone/.next/server/app/api/v1/env-sync/allowlist/route.js +375 -368
  76. package/.next/standalone/.next/server/app/api/v1/env-sync/route.js +51 -44
  77. package/.next/standalone/.next/server/app/api/v1/events/route.js +745 -178
  78. package/.next/standalone/.next/server/app/api/v1/events/route.js.nft.json +1 -1
  79. package/.next/standalone/.next/server/app/api/v1/events/test/route.js +77 -77
  80. package/.next/standalone/.next/server/app/api/v1/extension/agents/route.js +763 -763
  81. package/.next/standalone/.next/server/app/api/v1/extension/agents/route.js.nft.json +1 -1
  82. package/.next/standalone/.next/server/app/api/v1/extension/browser/activate/route.js +51 -44
  83. package/.next/standalone/.next/server/app/api/v1/extension/browser/foreground/route.js +16 -9
  84. package/.next/standalone/.next/server/app/api/v1/extension/browser/history/route.js +72 -65
  85. package/.next/standalone/.next/server/app/api/v1/extension/browser/poll/route.js +41 -34
  86. package/.next/standalone/.next/server/app/api/v1/extension/browser/progress/route.js +211 -204
  87. package/.next/standalone/.next/server/app/api/v1/extension/browser/result/route.js +140 -133
  88. package/.next/standalone/.next/server/app/api/v1/extension/browser/retry/route.js +113 -106
  89. package/.next/standalone/.next/server/app/api/v1/extension/browser/status/route.js +121 -114
  90. package/.next/standalone/.next/server/app/api/v1/extension/browser/tabs/route.js +141 -134
  91. package/.next/standalone/.next/server/app/api/v1/extension/fill/route.js +690 -690
  92. package/.next/standalone/.next/server/app/api/v1/extension/fill/route.js.nft.json +1 -1
  93. package/.next/standalone/.next/server/app/api/v1/extension/refine/route.js +93 -93
  94. package/.next/standalone/.next/server/app/api/v1/extension/refine/route.js.nft.json +1 -1
  95. package/.next/standalone/.next/server/app/api/v1/extension/turn/route.js +9 -9
  96. package/.next/standalone/.next/server/app/api/v1/extension/turn/route.js.nft.json +1 -1
  97. package/.next/standalone/.next/server/app/api/v1/extensions/route.js +185 -185
  98. package/.next/standalone/.next/server/app/api/v1/extensions/route.js.nft.json +1 -1
  99. package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/config/route.js +171 -171
  100. package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/config/route.js.nft.json +1 -1
  101. package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/route.js +396 -396
  102. package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/route.js.nft.json +1 -1
  103. package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/secrets/route.js +212 -212
  104. package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/secrets/route.js.nft.json +1 -1
  105. package/.next/standalone/.next/server/app/api/v1/files/[name]/route.js +235 -235
  106. package/.next/standalone/.next/server/app/api/v1/fs/browse/route.js +26 -26
  107. package/.next/standalone/.next/server/app/api/v1/harnesses/[id]/route.js +228 -221
  108. package/.next/standalone/.next/server/app/api/v1/harnesses/default/route.js +65 -58
  109. package/.next/standalone/.next/server/app/api/v1/harnesses/route.js +79 -72
  110. package/.next/standalone/.next/server/app/api/v1/health/probes/route.js +9 -9
  111. package/.next/standalone/.next/server/app/api/v1/health/probes/route.js.nft.json +1 -1
  112. package/.next/standalone/.next/server/app/api/v1/health/route.js +783 -771
  113. package/.next/standalone/.next/server/app/api/v1/integrations/[name]/route.js +140 -133
  114. package/.next/standalone/.next/server/app/api/v1/integrations/[name]/test/route.js +9 -9
  115. package/.next/standalone/.next/server/app/api/v1/integrations/[name]/test/route.js.nft.json +1 -1
  116. package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/callback/route.js +370 -363
  117. package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/start/route.js +240 -233
  118. package/.next/standalone/.next/server/app/api/v1/integrations/gmail/oauth/status/route.js +689 -682
  119. package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/callback/route.js +886 -879
  120. package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/start/route.js +115 -108
  121. package/.next/standalone/.next/server/app/api/v1/integrations/outlook/oauth/status/route.js +955 -948
  122. package/.next/standalone/.next/server/app/api/v1/integrations/route.js +223 -216
  123. package/.next/standalone/.next/server/app/api/v1/lifecycle/adoption/route.js +876 -847
  124. package/.next/standalone/.next/server/app/api/v1/lifecycle/adoption/route.js.nft.json +1 -1
  125. package/.next/standalone/.next/server/app/api/v1/local-file/route.js +26 -26
  126. package/.next/standalone/.next/server/app/api/v1/logs/route.js +70 -70
  127. package/.next/standalone/.next/server/app/api/v1/maps/embed/route.js +79 -72
  128. package/.next/standalone/.next/server/app/api/v1/mcp-servers/[name]/route.js +991 -979
  129. package/.next/standalone/.next/server/app/api/v1/mcp-servers/registry/route.js +196 -196
  130. package/.next/standalone/.next/server/app/api/v1/mcp-servers/route.js +19 -7
  131. package/.next/standalone/.next/server/app/api/v1/memory/[namespace]/[key]/route.js +539 -532
  132. package/.next/standalone/.next/server/app/api/v1/memory/policy/route.js +86 -79
  133. package/.next/standalone/.next/server/app/api/v1/memory/route.js +58 -51
  134. package/.next/standalone/.next/server/app/api/v1/memory/search/route.js +138 -131
  135. package/.next/standalone/.next/server/app/api/v1/models/[name]/compact-threads/route.js +381 -369
  136. package/.next/standalone/.next/server/app/api/v1/models/[name]/compact-threads/route.js.nft.json +1 -1
  137. package/.next/standalone/.next/server/app/api/v1/models/[name]/route.js +150 -143
  138. package/.next/standalone/.next/server/app/api/v1/models/route.js +634 -627
  139. package/.next/standalone/.next/server/app/api/v1/packages/catalog/route.js +445 -445
  140. package/.next/standalone/.next/server/app/api/v1/packages/defaults/[id]/route.js +120 -120
  141. package/.next/standalone/.next/server/app/api/v1/packages/defaults/[id]/route.js.nft.json +1 -1
  142. package/.next/standalone/.next/server/app/api/v1/packages/install/[id]/route.js +234 -234
  143. package/.next/standalone/.next/server/app/api/v1/packages/install/[id]/route.js.nft.json +1 -1
  144. package/.next/standalone/.next/server/app/api/v1/packages/install/route.js +407 -407
  145. package/.next/standalone/.next/server/app/api/v1/packages/install/route.js.nft.json +1 -1
  146. package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/enabled/route.js +37 -37
  147. package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/enabled/route.js.nft.json +1 -1
  148. package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/route.js +107 -107
  149. package/.next/standalone/.next/server/app/api/v1/packages/manifests/[name]/route.js.nft.json +1 -1
  150. package/.next/standalone/.next/server/app/api/v1/packages/manifests/route.js +228 -228
  151. package/.next/standalone/.next/server/app/api/v1/packages/manifests/route.js.nft.json +1 -1
  152. package/.next/standalone/.next/server/app/api/v1/packages/reload/route.js +9 -9
  153. package/.next/standalone/.next/server/app/api/v1/packages/reload/route.js.nft.json +1 -1
  154. package/.next/standalone/.next/server/app/api/v1/packages/route.js +148 -148
  155. package/.next/standalone/.next/server/app/api/v1/packages/route.js.nft.json +1 -1
  156. package/.next/standalone/.next/server/app/api/v1/page-capture/route.js +787 -787
  157. package/.next/standalone/.next/server/app/api/v1/page-capture/route.js.nft.json +1 -1
  158. package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/approve/route.js +529 -514
  159. package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/approve/route.js.nft.json +1 -1
  160. package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/deny/route.js +181 -181
  161. package/.next/standalone/.next/server/app/api/v1/pending-actions/[id]/deny/route.js.nft.json +1 -1
  162. package/.next/standalone/.next/server/app/api/v1/pending-actions/route.js +258 -258
  163. package/.next/standalone/.next/server/app/api/v1/pending-actions/route.js.nft.json +1 -1
  164. package/.next/standalone/.next/server/app/api/v1/profile/location/route.js +37 -30
  165. package/.next/standalone/.next/server/app/api/v1/profile/route.js +171 -164
  166. package/.next/standalone/.next/server/app/api/v1/providers/[provider]/models/route.js +51 -44
  167. package/.next/standalone/.next/server/app/api/v1/providers/[provider]/probe/route.js +15 -8
  168. package/.next/standalone/.next/server/app/api/v1/providers/github-copilot/auth/route.js +171 -164
  169. package/.next/standalone/.next/server/app/api/v1/providers/route.js +101 -94
  170. package/.next/standalone/.next/server/app/api/v1/proxy-config/route.js +457 -450
  171. package/.next/standalone/.next/server/app/api/v1/redaction/init/route.js +44 -37
  172. package/.next/standalone/.next/server/app/api/v1/redaction/route.js +65 -58
  173. package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/route.js +617 -605
  174. package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/run/route.js +44 -44
  175. package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/[id]/run/route.js.nft.json +1 -1
  176. package/.next/standalone/.next/server/app/api/v1/scheduled-tasks/route.js +739 -732
  177. package/.next/standalone/.next/server/app/api/v1/security/idle-timeout/route.js +329 -322
  178. package/.next/standalone/.next/server/app/api/v1/security/pin/route.js +204 -197
  179. package/.next/standalone/.next/server/app/api/v1/security/state/route.js +58 -51
  180. package/.next/standalone/.next/server/app/api/v1/security/unlock/route.js +183 -176
  181. package/.next/standalone/.next/server/app/api/v1/security/verify-pin/route.js +194 -187
  182. package/.next/standalone/.next/server/app/api/v1/setup/test-key/route.js +26 -26
  183. package/.next/standalone/.next/server/app/api/v1/skills/[id]/route.js +776 -769
  184. package/.next/standalone/.next/server/app/api/v1/skills/repos/[id]/route.js +122 -115
  185. package/.next/standalone/.next/server/app/api/v1/skills/repos/route.js +334 -327
  186. package/.next/standalone/.next/server/app/api/v1/skills/route.js +873 -866
  187. package/.next/standalone/.next/server/app/api/v1/system/abort/route.js +838 -808
  188. package/.next/standalone/.next/server/app/api/v1/system/restart/route.js +177 -177
  189. package/.next/standalone/.next/server/app/api/v1/system/restart/route.js.nft.json +1 -1
  190. package/.next/standalone/.next/server/app/api/v1/tailscale/route.js +164 -164
  191. package/.next/standalone/.next/server/app/api/v1/tasks/[agent_id]/route.js +122 -115
  192. package/.next/standalone/.next/server/app/api/v1/tasks/route.js +30 -23
  193. package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route.js +1436 -0
  194. package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route.js.nft.json +1 -0
  195. package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/activity/route_client-reference-manifest.js +1 -0
  196. package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/context-pin/route.js +638 -631
  197. package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/context-pin/route.js.nft.json +1 -1
  198. package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/route.js +60 -439
  199. package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/route.js.nft.json +1 -1
  200. package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/run/route.js +172 -173
  201. package/.next/standalone/.next/server/app/api/v1/threads/[thread_id]/run/route.js.nft.json +1 -1
  202. package/.next/standalone/.next/server/app/api/v1/threads/route.js +925 -913
  203. package/.next/standalone/.next/server/app/api/v1/tools/route.js +2 -2
  204. package/.next/standalone/.next/server/app/api/v1/tools/route.js.nft.json +1 -1
  205. package/.next/standalone/.next/server/app/api/v1/update/apply/route.js +17 -17
  206. package/.next/standalone/.next/server/app/api/v1/update/apply/route.js.nft.json +1 -1
  207. package/.next/standalone/.next/server/app/api/v1/update/route.js +570 -570
  208. package/.next/standalone/.next/server/app/api/v1/voice/transcribe/route.js +241 -229
  209. package/.next/standalone/.next/server/app/api/v1/voice/tts/route.js +989 -977
  210. package/.next/standalone/.next/server/app/api/v1/watchers/[id]/route.js +40 -28
  211. package/.next/standalone/.next/server/app/api/v1/watchers/[id]/run/route.js +72 -72
  212. package/.next/standalone/.next/server/app/api/v1/watchers/[id]/run/route.js.nft.json +1 -1
  213. package/.next/standalone/.next/server/app/api/v1/watchers/reaction-scripts/route.js +128 -128
  214. package/.next/standalone/.next/server/app/api/v1/watchers/route.js +164 -164
  215. package/.next/standalone/.next/server/app/api/v1/watchers/route.js.nft.json +1 -1
  216. package/.next/standalone/.next/server/app/icon.svg/route.js +62 -62
  217. package/.next/standalone/.next/server/app/manifest.webmanifest/route.js +436 -436
  218. package/.next/standalone/.next/server/app/page.js +1179 -743
  219. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  220. package/.next/standalone/.next/server/app/setup/page.js +99 -91
  221. package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  222. package/.next/standalone/.next/server/app-paths-manifest.json +2 -1
  223. package/.next/standalone/.next/server/chunks/{424.js → 1388.js} +441 -1022
  224. package/.next/standalone/.next/server/chunks/1433.js +1 -1
  225. package/.next/standalone/.next/server/chunks/1638.js +1 -2
  226. package/.next/standalone/.next/server/chunks/1738.js +1 -1
  227. package/.next/standalone/.next/server/chunks/2068.js +47 -10
  228. package/.next/standalone/.next/server/chunks/210.js +3 -3
  229. package/.next/standalone/.next/server/chunks/2151.js +31 -1
  230. package/.next/standalone/.next/server/chunks/2207.js +1 -0
  231. package/.next/standalone/.next/server/chunks/2447.js +10 -5
  232. package/.next/standalone/.next/server/chunks/2471.js +45 -45
  233. package/.next/standalone/.next/server/chunks/2504.js +1 -1
  234. package/.next/standalone/.next/server/chunks/2695.js +17 -17
  235. package/.next/standalone/.next/server/chunks/3042.js +24 -16
  236. package/.next/standalone/.next/server/chunks/{4540.js → 309.js} +104 -38
  237. package/.next/standalone/.next/server/chunks/{2350.js → 3272.js} +104 -37
  238. package/.next/standalone/.next/server/chunks/3399.js +526 -526
  239. package/.next/standalone/.next/server/chunks/3524.js +150 -67
  240. package/.next/standalone/.next/server/chunks/3566.js +1 -1
  241. package/.next/standalone/.next/server/chunks/4189.js +946 -0
  242. package/.next/standalone/.next/server/chunks/4433.js +146 -146
  243. package/.next/standalone/.next/server/chunks/4508.js +3 -3
  244. package/.next/standalone/.next/server/chunks/4588.js +1 -0
  245. package/.next/standalone/.next/server/chunks/46.js +78 -28
  246. package/.next/standalone/.next/server/chunks/466.js +12 -0
  247. package/.next/standalone/.next/server/chunks/4868.js +206 -206
  248. package/.next/standalone/.next/server/chunks/4992.js +13 -0
  249. package/.next/standalone/.next/server/chunks/5120.js +963 -0
  250. package/.next/standalone/.next/server/chunks/5701.js +1 -1
  251. package/.next/standalone/.next/server/chunks/5900.js +1 -1
  252. package/.next/standalone/.next/server/chunks/5908.js +63 -42
  253. package/.next/standalone/.next/server/chunks/6142.js +10 -2
  254. package/.next/standalone/.next/server/chunks/6210.js +1 -0
  255. package/.next/standalone/.next/server/chunks/6213.js +1 -1
  256. package/.next/standalone/.next/server/chunks/6649.js +3 -3
  257. package/.next/standalone/.next/server/chunks/6703.js +3 -3
  258. package/.next/standalone/.next/server/chunks/7445.js +1 -0
  259. package/.next/standalone/.next/server/chunks/8067.js +12 -0
  260. package/.next/standalone/.next/server/chunks/8461.js +24 -17
  261. package/.next/standalone/.next/server/chunks/8558.js +1 -1
  262. package/.next/standalone/.next/server/chunks/8724.js +1 -1
  263. package/.next/standalone/.next/server/chunks/8849.js +91 -91
  264. package/.next/standalone/.next/server/chunks/9032.js +4 -3
  265. package/.next/standalone/.next/server/chunks/{2563.js → 9164.js} +33389 -31418
  266. package/.next/standalone/.next/server/chunks/9237.js +396 -396
  267. package/.next/standalone/.next/server/chunks/{9640.js → 9304.js} +1672 -575
  268. package/.next/standalone/.next/server/chunks/9406.js +1 -1
  269. package/.next/standalone/.next/server/chunks/9590.js +68 -18
  270. package/.next/standalone/.next/server/chunks/9824.js +98 -98
  271. package/.next/standalone/.next/server/chunks/9826.js +1 -0
  272. package/.next/standalone/.next/server/middleware-build-manifest.js +2 -2
  273. package/.next/standalone/.next/server/middleware.js +486 -415
  274. package/.next/standalone/.next/server/pages/404.html +2 -2
  275. package/.next/standalone/.next/server/pages/500.html +1 -1
  276. package/.next/standalone/.next/server/preview-props.json +3 -3
  277. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  278. package/.next/standalone/.next/static/chunks/{1395-a340fb0a345382a4.js → 1395-e4a99912b8f83044.js} +13 -1
  279. package/.next/standalone/.next/static/chunks/app/_global-error/{page-36cb8b428b38b26a.js → page-6fc5f8e744c81802.js} +1 -1
  280. package/.next/standalone/.next/static/chunks/app/api/v1/access/[identity]/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
  281. package/.next/standalone/.next/static/chunks/app/api/v1/access/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
  282. package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/compact/{route-36cb8b428b38b26a.js → route-6fc5f8e744c81802.js} +1 -1
  283. package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-6fc5f8e744c81802.js +17 -0
  284. package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-6fc5f8e744c81802.js +17 -0
  285. package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-6fc5f8e744c81802.js +17 -0
  286. package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-6fc5f8e744c81802.js +17 -0
  287. package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/[hostname]/route-6fc5f8e744c81802.js +17 -0
  288. package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/route-6fc5f8e744c81802.js +17 -0
  289. package/.next/standalone/.next/static/chunks/app/api/v1/artifacts/lifecycle/route-6fc5f8e744c81802.js +17 -0
  290. package/.next/standalone/.next/static/chunks/app/api/v1/attachments/files/route-6fc5f8e744c81802.js +17 -0
  291. package/.next/standalone/.next/static/chunks/app/api/v1/attachments/images/route-6fc5f8e744c81802.js +17 -0
  292. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-6fc5f8e744c81802.js +17 -0
  293. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/[remote_jid]/route-6fc5f8e744c81802.js +17 -0
  294. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/route-6fc5f8e744c81802.js +17 -0
  295. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-6fc5f8e744c81802.js +17 -0
  296. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-6fc5f8e744c81802.js +17 -0
  297. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-6fc5f8e744c81802.js +17 -0
  298. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-6fc5f8e744c81802.js +17 -0
  299. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-6fc5f8e744c81802.js +17 -0
  300. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-6fc5f8e744c81802.js +17 -0
  301. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/kinds/route-6fc5f8e744c81802.js +17 -0
  302. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-6fc5f8e744c81802.js +17 -0
  303. package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-6fc5f8e744c81802.js +17 -0
  304. package/.next/standalone/.next/static/chunks/app/api/v1/config/route-6fc5f8e744c81802.js +17 -0
  305. package/.next/standalone/.next/static/chunks/app/api/v1/credentials/[id]/route-6fc5f8e744c81802.js +17 -0
  306. package/.next/standalone/.next/static/chunks/app/api/v1/credentials/route-6fc5f8e744c81802.js +17 -0
  307. package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/currency/route-6fc5f8e744c81802.js +17 -0
  308. package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/metrics/route-6fc5f8e744c81802.js +17 -0
  309. package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing/route-6fc5f8e744c81802.js +17 -0
  310. package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing-task/route-6fc5f8e744c81802.js +17 -0
  311. package/.next/standalone/.next/static/chunks/app/api/v1/delegations/codex/[job_id]/route-6fc5f8e744c81802.js +17 -0
  312. package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-6fc5f8e744c81802.js +17 -0
  313. package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-6fc5f8e744c81802.js +17 -0
  314. package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-6fc5f8e744c81802.js +17 -0
  315. package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-6fc5f8e744c81802.js +17 -0
  316. package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-6fc5f8e744c81802.js +17 -0
  317. package/.next/standalone/.next/static/chunks/app/api/v1/env/route-6fc5f8e744c81802.js +17 -0
  318. package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-6fc5f8e744c81802.js +17 -0
  319. package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-6fc5f8e744c81802.js +17 -0
  320. package/.next/standalone/.next/static/chunks/app/api/v1/events/route-6fc5f8e744c81802.js +17 -0
  321. package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-6fc5f8e744c81802.js +17 -0
  322. package/.next/standalone/.next/static/chunks/app/api/v1/extension/agents/route-6fc5f8e744c81802.js +17 -0
  323. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/activate/route-6fc5f8e744c81802.js +17 -0
  324. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/foreground/route-6fc5f8e744c81802.js +17 -0
  325. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/history/route-6fc5f8e744c81802.js +17 -0
  326. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/poll/route-6fc5f8e744c81802.js +17 -0
  327. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/progress/route-6fc5f8e744c81802.js +17 -0
  328. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/result/route-6fc5f8e744c81802.js +17 -0
  329. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/retry/route-6fc5f8e744c81802.js +17 -0
  330. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/status/route-6fc5f8e744c81802.js +17 -0
  331. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/tabs/route-6fc5f8e744c81802.js +17 -0
  332. package/.next/standalone/.next/static/chunks/app/api/v1/extension/fill/route-6fc5f8e744c81802.js +17 -0
  333. package/.next/standalone/.next/static/chunks/app/api/v1/extension/refine/route-6fc5f8e744c81802.js +17 -0
  334. package/.next/standalone/.next/static/chunks/app/api/v1/extension/turn/route-6fc5f8e744c81802.js +17 -0
  335. package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-6fc5f8e744c81802.js +17 -0
  336. package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/config/route-6fc5f8e744c81802.js +17 -0
  337. package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/route-6fc5f8e744c81802.js +17 -0
  338. package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-6fc5f8e744c81802.js +17 -0
  339. package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-6fc5f8e744c81802.js +17 -0
  340. package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-6fc5f8e744c81802.js +17 -0
  341. package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-6fc5f8e744c81802.js +17 -0
  342. package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-6fc5f8e744c81802.js +17 -0
  343. package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-6fc5f8e744c81802.js +17 -0
  344. package/.next/standalone/.next/static/chunks/app/api/v1/health/probes/route-6fc5f8e744c81802.js +17 -0
  345. package/.next/standalone/.next/static/chunks/app/api/v1/health/route-6fc5f8e744c81802.js +17 -0
  346. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-6fc5f8e744c81802.js +17 -0
  347. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-6fc5f8e744c81802.js +17 -0
  348. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-6fc5f8e744c81802.js +17 -0
  349. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-6fc5f8e744c81802.js +17 -0
  350. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-6fc5f8e744c81802.js +17 -0
  351. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-6fc5f8e744c81802.js +17 -0
  352. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-6fc5f8e744c81802.js +17 -0
  353. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-6fc5f8e744c81802.js +17 -0
  354. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-6fc5f8e744c81802.js +17 -0
  355. package/.next/standalone/.next/static/chunks/app/api/v1/lifecycle/adoption/route-6fc5f8e744c81802.js +17 -0
  356. package/.next/standalone/.next/static/chunks/app/api/v1/local-file/route-6fc5f8e744c81802.js +17 -0
  357. package/.next/standalone/.next/static/chunks/app/api/v1/logs/route-6fc5f8e744c81802.js +17 -0
  358. package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-6fc5f8e744c81802.js +17 -0
  359. package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-6fc5f8e744c81802.js +17 -0
  360. package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-6fc5f8e744c81802.js +17 -0
  361. package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-6fc5f8e744c81802.js +17 -0
  362. package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-6fc5f8e744c81802.js +17 -0
  363. package/.next/standalone/.next/static/chunks/app/api/v1/memory/policy/route-6fc5f8e744c81802.js +17 -0
  364. package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-6fc5f8e744c81802.js +17 -0
  365. package/.next/standalone/.next/static/chunks/app/api/v1/memory/search/route-6fc5f8e744c81802.js +17 -0
  366. package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/compact-threads/route-6fc5f8e744c81802.js +17 -0
  367. package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-6fc5f8e744c81802.js +17 -0
  368. package/.next/standalone/.next/static/chunks/app/api/v1/models/route-6fc5f8e744c81802.js +17 -0
  369. package/.next/standalone/.next/static/chunks/app/api/v1/packages/catalog/route-6fc5f8e744c81802.js +17 -0
  370. package/.next/standalone/.next/static/chunks/app/api/v1/packages/defaults/[id]/route-6fc5f8e744c81802.js +17 -0
  371. package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/[id]/route-6fc5f8e744c81802.js +17 -0
  372. package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/route-6fc5f8e744c81802.js +17 -0
  373. package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/enabled/route-6fc5f8e744c81802.js +17 -0
  374. package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/route-6fc5f8e744c81802.js +17 -0
  375. package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/route-6fc5f8e744c81802.js +17 -0
  376. package/.next/standalone/.next/static/chunks/app/api/v1/packages/reload/route-6fc5f8e744c81802.js +17 -0
  377. package/.next/standalone/.next/static/chunks/app/api/v1/packages/route-6fc5f8e744c81802.js +17 -0
  378. package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-6fc5f8e744c81802.js +17 -0
  379. package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-6fc5f8e744c81802.js +17 -0
  380. package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-6fc5f8e744c81802.js +17 -0
  381. package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-6fc5f8e744c81802.js +17 -0
  382. package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-6fc5f8e744c81802.js +17 -0
  383. package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-6fc5f8e744c81802.js +17 -0
  384. package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-6fc5f8e744c81802.js +17 -0
  385. package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/probe/route-6fc5f8e744c81802.js +17 -0
  386. package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-6fc5f8e744c81802.js +17 -0
  387. package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-6fc5f8e744c81802.js +17 -0
  388. package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-6fc5f8e744c81802.js +17 -0
  389. package/.next/standalone/.next/static/chunks/app/api/v1/redaction/init/route-6fc5f8e744c81802.js +17 -0
  390. package/.next/standalone/.next/static/chunks/app/api/v1/redaction/route-6fc5f8e744c81802.js +17 -0
  391. package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-6fc5f8e744c81802.js +17 -0
  392. package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-6fc5f8e744c81802.js +17 -0
  393. package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-6fc5f8e744c81802.js +17 -0
  394. package/.next/standalone/.next/static/chunks/app/api/v1/security/idle-timeout/route-6fc5f8e744c81802.js +17 -0
  395. package/.next/standalone/.next/static/chunks/app/api/v1/security/pin/route-6fc5f8e744c81802.js +17 -0
  396. package/.next/standalone/.next/static/chunks/app/api/v1/security/state/route-6fc5f8e744c81802.js +17 -0
  397. package/.next/standalone/.next/static/chunks/app/api/v1/security/unlock/route-6fc5f8e744c81802.js +17 -0
  398. package/.next/standalone/.next/static/chunks/app/api/v1/security/verify-pin/route-6fc5f8e744c81802.js +17 -0
  399. package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-6fc5f8e744c81802.js +17 -0
  400. package/.next/standalone/.next/static/chunks/app/api/v1/skills/[id]/route-6fc5f8e744c81802.js +17 -0
  401. package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/[id]/route-6fc5f8e744c81802.js +17 -0
  402. package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/route-6fc5f8e744c81802.js +17 -0
  403. package/.next/standalone/.next/static/chunks/app/api/v1/skills/route-6fc5f8e744c81802.js +17 -0
  404. package/.next/standalone/.next/static/chunks/app/api/v1/system/abort/route-6fc5f8e744c81802.js +17 -0
  405. package/.next/standalone/.next/static/chunks/app/api/v1/system/restart/route-6fc5f8e744c81802.js +17 -0
  406. package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-6fc5f8e744c81802.js +17 -0
  407. package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-6fc5f8e744c81802.js +17 -0
  408. package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-6fc5f8e744c81802.js +17 -0
  409. package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/activity/route-6fc5f8e744c81802.js +17 -0
  410. package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/context-pin/route-6fc5f8e744c81802.js +17 -0
  411. package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-6fc5f8e744c81802.js +17 -0
  412. package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-6fc5f8e744c81802.js +17 -0
  413. package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-6fc5f8e744c81802.js +17 -0
  414. package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-6fc5f8e744c81802.js +17 -0
  415. package/.next/standalone/.next/static/chunks/app/api/v1/update/apply/route-6fc5f8e744c81802.js +17 -0
  416. package/.next/standalone/.next/static/chunks/app/api/v1/update/route-6fc5f8e744c81802.js +17 -0
  417. package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-6fc5f8e744c81802.js +17 -0
  418. package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-6fc5f8e744c81802.js +17 -0
  419. package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-6fc5f8e744c81802.js +17 -0
  420. package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-6fc5f8e744c81802.js +17 -0
  421. package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-6fc5f8e744c81802.js +17 -0
  422. package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-6fc5f8e744c81802.js +17 -0
  423. package/.next/standalone/.next/static/chunks/app/manifest.webmanifest/route-6fc5f8e744c81802.js +17 -0
  424. package/.next/standalone/.next/static/chunks/app/{page-7017f07f8a7a083c.js → page-04748847c6ff866f.js} +1013 -585
  425. package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-6fc5f8e744c81802.js +17 -0
  426. package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-6fc5f8e744c81802.js +17 -0
  427. package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-6fc5f8e744c81802.js +17 -0
  428. package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-6fc5f8e744c81802.js +17 -0
  429. package/.next/standalone/.next/static/css/{d80058f0b9b41c09.css → 2669e8744cc8c212.css} +2 -2
  430. package/.next/standalone/docs/adoption/changesets.json +358 -0
  431. package/.next/standalone/lib/skills/builtins/memory-organization/SKILL.md +16 -0
  432. package/.next/standalone/package.json +3 -3
  433. package/CHANGELOG.md +44 -0
  434. package/api/client.ts +9 -0
  435. package/api/types.ts +29 -0
  436. package/app/api/v1/lifecycle/adoption/route.ts +14 -2
  437. package/app/api/v1/models/[name]/compact-threads/route.ts +14 -11
  438. package/app/api/v1/threads/[thread_id]/activity/route.ts +19 -0
  439. package/app/api/v1/threads/[thread_id]/context-pin/route.test.ts +1 -0
  440. package/app/api/v1/threads/[thread_id]/context-pin/route.ts +2 -1
  441. package/app/api/v1/threads/[thread_id]/route.ts +5 -1
  442. package/app/api/v1/threads/[thread_id]/run/route.ts +0 -1
  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/MessageBubble.tsx +12 -0
  447. package/components/chat/MessageList.test.tsx +31 -0
  448. package/components/chat/MessageList.tsx +49 -28
  449. package/components/chat/ToolList.test.tsx +92 -16
  450. package/components/chat/ToolList.tsx +59 -4
  451. package/components/chat/chat-helpers.test.tsx +24 -1
  452. package/components/chat/chat-helpers.ts +47 -4
  453. package/components/chat/useThreadActivity.test.tsx +113 -0
  454. package/components/chat/useThreadActivity.ts +94 -0
  455. package/components/chat/useThreadData.ts +16 -16
  456. package/components/chat/workflow-step-retry.ts +25 -0
  457. package/components/integrations/NetworkSection.tsx +2 -2
  458. package/components/ui/BootScreen.tsx +17 -0
  459. package/components/ui/WorkflowChecklist.tsx +71 -33
  460. package/hooks/useSSE.ts +28 -3
  461. package/lib/agents/citation-checker.test.ts +40 -2
  462. package/lib/agents/citation-checker.ts +56 -11
  463. package/lib/agents/compaction-pipeline.test.ts +202 -0
  464. package/lib/agents/compaction-pipeline.ts +483 -0
  465. package/lib/agents/context-boundary.ts +5 -6
  466. package/lib/agents/conversation-summary.ts +37 -21
  467. package/lib/agents/instruction-edits.test.ts +120 -0
  468. package/lib/agents/instruction-edits.ts +65 -42
  469. package/lib/agents/prepare/history-window.test.ts +18 -0
  470. package/lib/agents/prepare/history-window.ts +11 -2
  471. package/lib/agents/prepare/request.ts +4 -2
  472. package/lib/agents/prepare/system-prompt.test.ts +49 -0
  473. package/lib/agents/prepare/system-prompt.ts +16 -5
  474. package/lib/agents/prompt-registry.test.ts +5 -140
  475. package/lib/agents/prompt-registry.ts +45 -1
  476. package/lib/agents/prompt-variants.ts +146 -0
  477. package/lib/agents/proposals.test.ts +76 -0
  478. package/lib/agents/proposals.ts +13 -5
  479. package/lib/agents/run-registry.test.ts +22 -0
  480. package/lib/agents/run-registry.ts +29 -0
  481. package/lib/agents/run-thread.auto-boundary.test.ts +125 -5
  482. package/lib/agents/run-thread.retry.test.ts +67 -1
  483. package/lib/agents/run-thread.ts +110 -10
  484. package/lib/agents/sqlite-checkpoint-saver.test.ts +91 -0
  485. package/lib/agents/thread-activity.test.ts +31 -0
  486. package/lib/agents/thread-activity.ts +27 -0
  487. package/lib/agents/thread-compaction-state.test.ts +82 -0
  488. package/lib/agents/thread-compaction-state.ts +121 -0
  489. package/lib/agents/thread-compaction.test.ts +83 -4
  490. package/lib/agents/thread-compaction.ts +34 -11
  491. package/lib/agents/warm-summary-background.test.ts +219 -5
  492. package/lib/agents/warm-summary-background.ts +346 -143
  493. package/lib/agents/warm-topics.test.ts +191 -0
  494. package/lib/agents/warm-topics.ts +317 -0
  495. package/lib/agents/workflow-step-retry.test.ts +96 -0
  496. package/lib/agents/workflow-step-retry.ts +216 -0
  497. package/lib/api/browser-control.ts +0 -3
  498. package/lib/bridges/dispatcher.ts +1 -0
  499. package/lib/bridges/message-role.test.ts +81 -0
  500. package/lib/bridges/message-role.ts +23 -10
  501. package/lib/bridges/types.ts +6 -0
  502. package/lib/bridges/whatsapp-link.test.ts +32 -0
  503. package/lib/bridges/whatsapp-link.ts +21 -0
  504. package/lib/bridges/whatsapp.inbound.test.ts +239 -0
  505. package/lib/bridges/whatsapp.sender.test.ts +80 -1
  506. package/lib/bridges/whatsapp.ts +76 -38
  507. package/lib/db/migrations.ts +5 -0
  508. package/lib/env/config.ts +2 -0
  509. package/lib/env/schema.ts +12 -0
  510. package/lib/lifecycle/changeset-build.test.ts +93 -0
  511. package/lib/lifecycle/changeset-build.ts +210 -0
  512. package/lib/lifecycle/changesets.test.ts +101 -0
  513. package/lib/lifecycle/changesets.ts +166 -0
  514. package/lib/lifecycle/surface-collect.test.ts +88 -0
  515. package/lib/lifecycle/surface-collect.ts +64 -0
  516. package/lib/lifecycle/surface-snapshot.test.ts +104 -0
  517. package/lib/lifecycle/surface-snapshot.ts +210 -0
  518. package/lib/memory/record.ts +0 -2
  519. package/lib/pricing/snapshot.test.ts +70 -0
  520. package/lib/pricing/snapshot.ts +10 -2
  521. package/lib/providers/external.ts +0 -2
  522. package/lib/proxy/dispatcher.test.ts +119 -1
  523. package/lib/proxy/dispatcher.ts +22 -9
  524. package/lib/skills/builtins/memory-organization/SKILL.md +16 -0
  525. package/lib/stores/agent-configs.ts +10 -5
  526. package/lib/stores/bridges.test.ts +81 -0
  527. package/lib/stores/bridges.ts +9 -8
  528. package/lib/stores/proxy-config.test.ts +120 -0
  529. package/lib/stores/proxy-config.ts +22 -4
  530. package/lib/stores/threads.test.ts +9 -0
  531. package/lib/stores/threads.ts +33 -19
  532. package/lib/stores/version-adoption.test.ts +96 -0
  533. package/lib/stores/version-adoption.ts +239 -26
  534. package/lib/stores/workflow-progress.ts +3 -0
  535. package/lib/tools/communications/calendar.test.ts +43 -2
  536. package/lib/tools/communications/calendar.ts +2 -0
  537. package/lib/tools/communications/gmail.test.ts +51 -1
  538. package/lib/tools/communications/gmail.ts +44 -2
  539. package/lib/tools/communications/ms-todo.ts +0 -7
  540. package/lib/tools/communications/outlook-calendar.ts +2 -0
  541. package/lib/tools/communications/outlook.test.ts +33 -2
  542. package/lib/tools/communications/outlook.ts +2 -0
  543. package/lib/tools/filesystem/edit-match.test.ts +133 -0
  544. package/lib/tools/filesystem/edit-match.ts +7 -2
  545. package/lib/tools/general/memory.ts +1 -1
  546. package/lib/tools/general/workflow-progress.ts +2 -0
  547. package/lib/tools/runtime/catalog.ts +1 -25
  548. package/lib/tools/support/result-refs.test.ts +131 -0
  549. package/lib/tools/support/result-refs.ts +41 -9
  550. package/lib/triggers/registry.ts +0 -4
  551. package/lib/utils/source-link.test.ts +51 -0
  552. package/lib/utils/source-link.ts +45 -0
  553. package/package.json +3 -3
  554. package/scripts/install-to-system.ps1 +39 -11
  555. package/scripts/install-to-system.sh +37 -3
  556. package/.next/standalone/.next/server/chunks/3979.js +0 -581
  557. package/.next/standalone/.next/server/chunks/5936.js +0 -594
  558. package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-36cb8b428b38b26a.js +0 -17
  559. package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-36cb8b428b38b26a.js +0 -17
  560. package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-36cb8b428b38b26a.js +0 -17
  561. package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-36cb8b428b38b26a.js +0 -17
  562. package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/[hostname]/route-36cb8b428b38b26a.js +0 -17
  563. package/.next/standalone/.next/static/chunks/app/api/v1/allowed-sites/route-36cb8b428b38b26a.js +0 -17
  564. package/.next/standalone/.next/static/chunks/app/api/v1/artifacts/lifecycle/route-36cb8b428b38b26a.js +0 -17
  565. package/.next/standalone/.next/static/chunks/app/api/v1/attachments/files/route-36cb8b428b38b26a.js +0 -17
  566. package/.next/standalone/.next/static/chunks/app/api/v1/attachments/images/route-36cb8b428b38b26a.js +0 -17
  567. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-36cb8b428b38b26a.js +0 -17
  568. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/[remote_jid]/route-36cb8b428b38b26a.js +0 -17
  569. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/ignores/route-36cb8b428b38b26a.js +0 -17
  570. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-36cb8b428b38b26a.js +0 -17
  571. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-36cb8b428b38b26a.js +0 -17
  572. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-36cb8b428b38b26a.js +0 -17
  573. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-36cb8b428b38b26a.js +0 -17
  574. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-36cb8b428b38b26a.js +0 -17
  575. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-36cb8b428b38b26a.js +0 -17
  576. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/kinds/route-36cb8b428b38b26a.js +0 -17
  577. package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-36cb8b428b38b26a.js +0 -17
  578. package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-36cb8b428b38b26a.js +0 -17
  579. package/.next/standalone/.next/static/chunks/app/api/v1/config/route-36cb8b428b38b26a.js +0 -17
  580. package/.next/standalone/.next/static/chunks/app/api/v1/credentials/[id]/route-36cb8b428b38b26a.js +0 -17
  581. package/.next/standalone/.next/static/chunks/app/api/v1/credentials/route-36cb8b428b38b26a.js +0 -17
  582. package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/currency/route-36cb8b428b38b26a.js +0 -17
  583. package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/metrics/route-36cb8b428b38b26a.js +0 -17
  584. package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing/route-36cb8b428b38b26a.js +0 -17
  585. package/.next/standalone/.next/static/chunks/app/api/v1/dashboard/pricing-task/route-36cb8b428b38b26a.js +0 -17
  586. package/.next/standalone/.next/static/chunks/app/api/v1/delegations/codex/[job_id]/route-36cb8b428b38b26a.js +0 -17
  587. package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-36cb8b428b38b26a.js +0 -17
  588. package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-36cb8b428b38b26a.js +0 -17
  589. package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-36cb8b428b38b26a.js +0 -17
  590. package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-36cb8b428b38b26a.js +0 -17
  591. package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-36cb8b428b38b26a.js +0 -17
  592. package/.next/standalone/.next/static/chunks/app/api/v1/env/route-36cb8b428b38b26a.js +0 -17
  593. package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-36cb8b428b38b26a.js +0 -17
  594. package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-36cb8b428b38b26a.js +0 -17
  595. package/.next/standalone/.next/static/chunks/app/api/v1/events/route-36cb8b428b38b26a.js +0 -17
  596. package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-36cb8b428b38b26a.js +0 -17
  597. package/.next/standalone/.next/static/chunks/app/api/v1/extension/agents/route-36cb8b428b38b26a.js +0 -17
  598. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/activate/route-36cb8b428b38b26a.js +0 -17
  599. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/foreground/route-36cb8b428b38b26a.js +0 -17
  600. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/history/route-36cb8b428b38b26a.js +0 -17
  601. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/poll/route-36cb8b428b38b26a.js +0 -17
  602. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/progress/route-36cb8b428b38b26a.js +0 -17
  603. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/result/route-36cb8b428b38b26a.js +0 -17
  604. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/retry/route-36cb8b428b38b26a.js +0 -17
  605. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/status/route-36cb8b428b38b26a.js +0 -17
  606. package/.next/standalone/.next/static/chunks/app/api/v1/extension/browser/tabs/route-36cb8b428b38b26a.js +0 -17
  607. package/.next/standalone/.next/static/chunks/app/api/v1/extension/fill/route-36cb8b428b38b26a.js +0 -17
  608. package/.next/standalone/.next/static/chunks/app/api/v1/extension/refine/route-36cb8b428b38b26a.js +0 -17
  609. package/.next/standalone/.next/static/chunks/app/api/v1/extension/turn/route-36cb8b428b38b26a.js +0 -17
  610. package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-36cb8b428b38b26a.js +0 -17
  611. package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/config/route-36cb8b428b38b26a.js +0 -17
  612. package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/route-36cb8b428b38b26a.js +0 -17
  613. package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-36cb8b428b38b26a.js +0 -17
  614. package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-36cb8b428b38b26a.js +0 -17
  615. package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-36cb8b428b38b26a.js +0 -17
  616. package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-36cb8b428b38b26a.js +0 -17
  617. package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-36cb8b428b38b26a.js +0 -17
  618. package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-36cb8b428b38b26a.js +0 -17
  619. package/.next/standalone/.next/static/chunks/app/api/v1/health/probes/route-36cb8b428b38b26a.js +0 -17
  620. package/.next/standalone/.next/static/chunks/app/api/v1/health/route-36cb8b428b38b26a.js +0 -17
  621. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-36cb8b428b38b26a.js +0 -17
  622. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-36cb8b428b38b26a.js +0 -17
  623. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-36cb8b428b38b26a.js +0 -17
  624. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-36cb8b428b38b26a.js +0 -17
  625. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-36cb8b428b38b26a.js +0 -17
  626. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-36cb8b428b38b26a.js +0 -17
  627. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-36cb8b428b38b26a.js +0 -17
  628. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-36cb8b428b38b26a.js +0 -17
  629. package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-36cb8b428b38b26a.js +0 -17
  630. package/.next/standalone/.next/static/chunks/app/api/v1/lifecycle/adoption/route-36cb8b428b38b26a.js +0 -17
  631. package/.next/standalone/.next/static/chunks/app/api/v1/local-file/route-36cb8b428b38b26a.js +0 -17
  632. package/.next/standalone/.next/static/chunks/app/api/v1/logs/route-36cb8b428b38b26a.js +0 -17
  633. package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-36cb8b428b38b26a.js +0 -17
  634. package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-36cb8b428b38b26a.js +0 -17
  635. package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-36cb8b428b38b26a.js +0 -17
  636. package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-36cb8b428b38b26a.js +0 -17
  637. package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-36cb8b428b38b26a.js +0 -17
  638. package/.next/standalone/.next/static/chunks/app/api/v1/memory/policy/route-36cb8b428b38b26a.js +0 -17
  639. package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-36cb8b428b38b26a.js +0 -17
  640. package/.next/standalone/.next/static/chunks/app/api/v1/memory/search/route-36cb8b428b38b26a.js +0 -17
  641. package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/compact-threads/route-36cb8b428b38b26a.js +0 -17
  642. package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-36cb8b428b38b26a.js +0 -17
  643. package/.next/standalone/.next/static/chunks/app/api/v1/models/route-36cb8b428b38b26a.js +0 -17
  644. package/.next/standalone/.next/static/chunks/app/api/v1/packages/catalog/route-36cb8b428b38b26a.js +0 -17
  645. package/.next/standalone/.next/static/chunks/app/api/v1/packages/defaults/[id]/route-36cb8b428b38b26a.js +0 -17
  646. package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/[id]/route-36cb8b428b38b26a.js +0 -17
  647. package/.next/standalone/.next/static/chunks/app/api/v1/packages/install/route-36cb8b428b38b26a.js +0 -17
  648. package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/enabled/route-36cb8b428b38b26a.js +0 -17
  649. package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/[name]/route-36cb8b428b38b26a.js +0 -17
  650. package/.next/standalone/.next/static/chunks/app/api/v1/packages/manifests/route-36cb8b428b38b26a.js +0 -17
  651. package/.next/standalone/.next/static/chunks/app/api/v1/packages/reload/route-36cb8b428b38b26a.js +0 -17
  652. package/.next/standalone/.next/static/chunks/app/api/v1/packages/route-36cb8b428b38b26a.js +0 -17
  653. package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-36cb8b428b38b26a.js +0 -17
  654. package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-36cb8b428b38b26a.js +0 -17
  655. package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-36cb8b428b38b26a.js +0 -17
  656. package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-36cb8b428b38b26a.js +0 -17
  657. package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-36cb8b428b38b26a.js +0 -17
  658. package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-36cb8b428b38b26a.js +0 -17
  659. package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-36cb8b428b38b26a.js +0 -17
  660. package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/probe/route-36cb8b428b38b26a.js +0 -17
  661. package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-36cb8b428b38b26a.js +0 -17
  662. package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-36cb8b428b38b26a.js +0 -17
  663. package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-36cb8b428b38b26a.js +0 -17
  664. package/.next/standalone/.next/static/chunks/app/api/v1/redaction/init/route-36cb8b428b38b26a.js +0 -17
  665. package/.next/standalone/.next/static/chunks/app/api/v1/redaction/route-36cb8b428b38b26a.js +0 -17
  666. package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-36cb8b428b38b26a.js +0 -17
  667. package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-36cb8b428b38b26a.js +0 -17
  668. package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-36cb8b428b38b26a.js +0 -17
  669. package/.next/standalone/.next/static/chunks/app/api/v1/security/idle-timeout/route-36cb8b428b38b26a.js +0 -17
  670. package/.next/standalone/.next/static/chunks/app/api/v1/security/pin/route-36cb8b428b38b26a.js +0 -17
  671. package/.next/standalone/.next/static/chunks/app/api/v1/security/state/route-36cb8b428b38b26a.js +0 -17
  672. package/.next/standalone/.next/static/chunks/app/api/v1/security/unlock/route-36cb8b428b38b26a.js +0 -17
  673. package/.next/standalone/.next/static/chunks/app/api/v1/security/verify-pin/route-36cb8b428b38b26a.js +0 -17
  674. package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-36cb8b428b38b26a.js +0 -17
  675. package/.next/standalone/.next/static/chunks/app/api/v1/skills/[id]/route-36cb8b428b38b26a.js +0 -17
  676. package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/[id]/route-36cb8b428b38b26a.js +0 -17
  677. package/.next/standalone/.next/static/chunks/app/api/v1/skills/repos/route-36cb8b428b38b26a.js +0 -17
  678. package/.next/standalone/.next/static/chunks/app/api/v1/skills/route-36cb8b428b38b26a.js +0 -17
  679. package/.next/standalone/.next/static/chunks/app/api/v1/system/abort/route-36cb8b428b38b26a.js +0 -17
  680. package/.next/standalone/.next/static/chunks/app/api/v1/system/restart/route-36cb8b428b38b26a.js +0 -17
  681. package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-36cb8b428b38b26a.js +0 -17
  682. package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-36cb8b428b38b26a.js +0 -17
  683. package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-36cb8b428b38b26a.js +0 -17
  684. package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/context-pin/route-36cb8b428b38b26a.js +0 -17
  685. package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-36cb8b428b38b26a.js +0 -17
  686. package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-36cb8b428b38b26a.js +0 -17
  687. package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-36cb8b428b38b26a.js +0 -17
  688. package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-36cb8b428b38b26a.js +0 -17
  689. package/.next/standalone/.next/static/chunks/app/api/v1/update/apply/route-36cb8b428b38b26a.js +0 -17
  690. package/.next/standalone/.next/static/chunks/app/api/v1/update/route-36cb8b428b38b26a.js +0 -17
  691. package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-36cb8b428b38b26a.js +0 -17
  692. package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-36cb8b428b38b26a.js +0 -17
  693. package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-36cb8b428b38b26a.js +0 -17
  694. package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-36cb8b428b38b26a.js +0 -17
  695. package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-36cb8b428b38b26a.js +0 -17
  696. package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-36cb8b428b38b26a.js +0 -17
  697. package/.next/standalone/.next/static/chunks/app/manifest.webmanifest/route-36cb8b428b38b26a.js +0 -17
  698. package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-36cb8b428b38b26a.js +0 -17
  699. package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-36cb8b428b38b26a.js +0 -17
  700. package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-36cb8b428b38b26a.js +0 -17
  701. package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-36cb8b428b38b26a.js +0 -17
  702. /package/.next/standalone/.next/static/{NUrC9xax1sp1Q70nlFqS6 → hwujW4hR1b-r3k5WdMxZO}/_buildManifest.js +0 -0
  703. /package/.next/standalone/.next/static/{NUrC9xax1sp1Q70nlFqS6 → hwujW4hR1b-r3k5WdMxZO}/_ssgManifest.js +0 -0
@@ -0,0 +1,946 @@
1
+ "use strict";
2
+ exports.id = 4189;
3
+ exports.ids = [4189];
4
+ exports.modules = {
5
+
6
+ /***/ 96570:
7
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8
+
9
+
10
+ // EXPORTS
11
+ __webpack_require__.d(__webpack_exports__, {
12
+ mD: () => (/* binding */ VersionAdoptionRequestError),
13
+ QO: () => (/* binding */ getVersionAdoptionState),
14
+ EG: () => (/* binding */ recordVersionAdoptionWorkflowProgress),
15
+ $n: () => (/* binding */ updateVersionAdoptionState)
16
+ });
17
+
18
+ // EXTERNAL MODULE: external "node:child_process"
19
+ var external_node_child_process_ = __webpack_require__(31421);
20
+ // EXTERNAL MODULE: ./lib/stores/memory.ts
21
+ var memory = __webpack_require__(80956);
22
+ // EXTERNAL MODULE: ./lib/stores/agent-configs.ts
23
+ var agent_configs = __webpack_require__(41720);
24
+ // EXTERNAL MODULE: ./lib/stores/threads.ts
25
+ var threads = __webpack_require__(83042);
26
+ // EXTERNAL MODULE: external "node:fs"
27
+ var external_node_fs_ = __webpack_require__(73024);
28
+ // EXTERNAL MODULE: external "node:path"
29
+ var external_node_path_ = __webpack_require__(76760);
30
+ ;// ./lib/lifecycle/version.ts
31
+
32
+
33
+ function getCurrentVersion() {
34
+ try {
35
+ const raw = (0,external_node_fs_.readFileSync)((0,external_node_path_.join)(process.cwd(), "package.json"), "utf8");
36
+ return JSON.parse(raw).version ?? "0.0.0";
37
+ } catch {
38
+ return "0.0.0";
39
+ }
40
+ }
41
+
42
+ // EXTERNAL MODULE: ./node_modules/zod/v4/classic/schemas.js + 4 modules
43
+ var schemas = __webpack_require__(97377);
44
+ ;// ./docs/adoption/changesets.json
45
+ const changesets_namespaceObject = /*#__PURE__*/JSON.parse('{"schema_version":1,"changesets":[{"version":"2.0.1","previous_version":"2.0.0","date":"2026-10-11","hints":[],"commits":["chore(release): bump to 2.0.1","fix(npm): remove oversized runtime assets"],"prompts":[],"tools":[]},{"version":"2.0.2","previous_version":"2.0.1","date":"2026-10-11","hints":[],"commits":["chore(release): bump to 2.0.2","fix(npm): exclude nested server source maps"],"prompts":[],"tools":[]},{"version":"2.0.3","previous_version":"2.0.2","date":"2026-10-12","hints":[],"commits":["chore(release): bump to 2.0.3","fix(npm): remove maps before npm packing"],"prompts":[],"tools":[]},{"version":"2.0.4","previous_version":"2.0.3","date":"2026-10-12","hints":[],"commits":["chore(release): bump to 2.0.4","fix(npm): use installed onnx runtime dependencies"],"prompts":[],"tools":[]},{"version":"2.0.5","previous_version":"2.0.4","date":"2026-10-13","hints":[],"commits":["chore(release): bump to 2.0.5","fix(providers): detect streams that end without events","fix(http): fix gzip response decoding","docs(site): update guides, theme, and architecture diagrams","refactor(bridges): add capability-driven bridge modules","fix(security): update vulnerable media parser","refactor(modules): split built-in provider and package registries"],"prompts":[],"tools":[]},{"version":"2.1.0","previous_version":"2.0.5","date":"2026-10-14","hints":[],"commits":["chore(release): bump to 2.1.0","fix(release): add model download retries and cache","fix(chat): render grouped summary topic previews","fix(workflows): validate legacy checklist items","docs(pricing): document aggregator data sources","feat(core): add verified workflows, pricing signals, and summaries"],"prompts":[{"id":"static.agent.tool-usage-sop","source":"lib/agents/prepare/system-prompt.ts","change":"changed","added_lines":["0. Classify the request. Informational answers may be direct; read/retrieve requests need a read tool; write/change requests need a state-changing tool; destructive requests also need the required confirmation. Use only these operation labels when describing work: read, write, execute, send, schedu…"],"removed_lines":["0. Classify the request. Informational answers may be direct; read/retrieve requests need a read tool; write/change requests need a state-changing tool; destructive requests also need the required confirmation. Use only these operation labels when describing work: read, write, execute, send, schedu…"],"omitted_lines":0},{"id":"system.Tool usage SOP","source":"lib/agents/prepare/system-prompt.ts","change":"changed","added_lines":["0. Classify the request. Informational answers may be direct; read/retrieve requests need a read tool; write/change requests need a state-changing tool; destructive requests also need the required confirmation. Use only these operation labels when describing work: read, write, execute, send, schedu…"],"removed_lines":["0. Classify the request. Informational answers may be direct; read/retrieve requests need a read tool; write/change requests need a state-changing tool; destructive requests also need the required confirmation. Use only these operation labels when describing work: read, write, execute, send, schedu…"],"omitted_lines":0}],"tools":[{"name":"refresh_model_pricing","change":"changed","description_changed":true,"description":"Refresh provider pricing pages and separate OpenRouter/LiteLLM reference feeds, then recalculate dashboard estimates using provider-page rates only. Returns rate changes, source health, confidence, and current-versus-recorded dashboard totals. These are estimates, not invoice amounts.","previous_description":"Refresh the configured official LLM pricing sources and recalculate dashboard estimates using the latest rates. Returns rate changes, source health, confidence, and current-versus-recorded dashboard totals. These are estimates, not invoice amounts.","params_added":[],"params_removed":[],"params_changed":[],"required_added":[],"required_removed":[]},{"name":"workflow_progress","change":"changed","description_changed":true,"description":"Report structured progress for a substantial multi-step task. Use only when the task has several dependent phases, likely spans turns, or needs explicit verification; skip simple tasks and work already covered by native tool progress. For agent-created workflows, send the full current items snapshot on every call and reuse the same workflow_id. Keep secrets and private data out of workflow fields. Mark items done only with observed validation evidence; use needs_attention for blockers; phase=complete requires every item done or skipped. Every item needs input, expected output, and concrete va…","previous_description":"Report structured progress for a substantial multi-step task. Use only when the task has several dependent phases, likely spans turns, or needs explicit verification; skip simple tasks and work already covered by native tool progress. For agent-created workflows, send the full current items snapshot on every call and reuse the same workflow_id. Keep secrets and private data out of workflow fields. Mark items done only after verifying the action; use needs_attention for blockers; phase=complete requires every item done or skipped. The system-owned version_adoption workflow has its own durable …","params_added":["validation_evidence"],"params_removed":[],"params_changed":["items"],"required_added":[],"required_removed":[]}]},{"version":"2.2.0","previous_version":"2.1.0","date":"2026-10-15","hints":[],"commits":["chore(release): bump to 2.2.0","feat(embeddings): add on-demand local model download","fix(build): exclude foreign runtimes from standalone bundles"],"prompts":[],"tools":[]},{"version":"2.2.1","previous_version":"2.2.0","date":"2026-10-15","hints":[],"commits":["chore(release): bump to 2.2.1","fix(api): skip browser http cache for client requests","feat(models): add model enable toggle and atomic default","fix(github-copilot): remove retired pat route"],"prompts":[],"tools":[]},{"version":"2.3.0","previous_version":"2.2.1","date":"2026-10-16","hints":["If an agent\'s instructions or skills tell it to leave fact capture to compaction or to avoid `memory_upsert`, remove that guidance, since agents now save facts during the turn.","If a scheduled task or watcher prompt asks the agent to write memory facts, keep that in the agent\'s own turn; automation channel summaries no longer extract facts."],"commits":["chore(repo): remove dead exports and the unused deepseek package","fix(chat): restore thread activity and bound compaction per thread","fix(chat): render automation recaps in the warm summary card","fix(chat): restore the compacting state after switching agents","fix(chat): allow compacting bridge-only threads, report via toasts","fix(scripts): align make targets and install the current working tree","feat(agents): add topic pipeline to automation channel summaries","feat(agents): add validated topic pipeline for warm compaction","feat(agents): add proactive, validated memory saving for agents","fix(chat): group older summaries into collapsible topic rows","feat(agents): add auto-retry for failed workflow step contracts","feat(chat): add per-step retry to workflow checklists","feat(lifecycle): add release changesets for version adoption","fix(chat): keep boundary locate from snapping to bottom"],"prompts":[{"id":"static.agent.compaction-group","source":"lib/agents/compaction-pipeline.ts","change":"added","added_lines":[],"removed_lines":[],"omitted_lines":0},{"id":"static.agent.compaction-group-automation","source":"lib/agents/compaction-pipeline.ts","change":"added","added_lines":[],"removed_lines":[],"omitted_lines":0},{"id":"static.agent.compaction-topic-recap","source":"lib/agents/compaction-pipeline.ts","change":"added","added_lines":[],"removed_lines":[],"omitted_lines":0},{"id":"static.agent.compaction-topic-recap-automation","source":"lib/agents/compaction-pipeline.ts","change":"added","added_lines":[],"removed_lines":[],"omitted_lines":0},{"id":"static.agent.conversation-summary","source":"lib/agents/conversation-summary.ts","change":"changed","added_lines":["A topic groups every consecutive message about one subject and must","span at least two messages (a request and its reply); fold a stray","single message into the adjacent topic instead of giving it its own."],"removed_lines":[],"omitted_lines":0},{"id":"static.agent.tool-usage-sop","source":"lib/agents/prepare/system-prompt.ts","change":"changed","added_lines":["0. Classify the request. Informational answers may be direct; read/retrieve requests need a read tool; write/change requests need a state-changing tool; destructive requests also need the required confirmation. Use only these operation labels when describing work: read, write, execute, send, schedu…"],"removed_lines":["0. Classify the request. Informational answers may be direct; read/retrieve requests need a read tool; write/change requests need a state-changing tool; destructive requests also need the required confirmation. Use only these operation labels when describing work: read, write, execute, send, schedu…"],"omitted_lines":0},{"id":"system.Memory & recall","source":"lib/agents/prepare/system-prompt.ts","change":"changed","added_lines":["You have long-term memory across sessions, shared with every other Jarela agent. A record you save is available to other agents immediately. Background compaction also extracts facts later, but it runs late and can miss details, so it is a backstop, not your save step.","Proactive save procedure — run it whenever information fits the active memory policy, without waiting to be asked:","1. Trigger: the user states a preference, a fact about themselves or their work, a decision, a constraint, or a correction to something saved; or a tool result verifies a durable fact. Routine status, one-off chatter, secrets, credentials, and raw transcripts never qualify.","2. Check: memory_search (or memory_read for a known key) for an existing record on the same subject. Update that stable key rather than creating a duplicate or contradictory copy.","3. Write: call memory_upsert in the same turn, before your final reply, with namespace=\'facts\', a stable descriptive key, standalone content, concise tags, confidence=\'explicit\' for user-stated information (\'verified\' when tool-backed, \'inferred\' only when useful and reversible), observed_at when t…","4. Validate: the memory_upsert result must contain ok:true and the key you sent. If it failed, correct the arguments and retry once; if it still fails, tell the user it was not saved.","5. Cite: end your reply with one short line naming each saved key, for example \'Saved to memory: facts/answer-format-preference\'. Omit the line when nothing was saved."],"removed_lines":["You have long-term memory across sessions.","- Use memory_upsert proactively for structured records. Use namespace=\'facts\', concise tags, confidence=\'explicit\' for user-stated information, observed_at when the information was true, and expires_at for temporary facts. Keep memory_write only for legacy/free-form notes."],"omitted_lines":0},{"id":"system.Tool usage SOP","source":"lib/agents/prepare/system-prompt.ts","change":"changed","added_lines":["0. Classify the request. Informational answers may be direct; read/retrieve requests need a read tool; write/change requests need a state-changing tool; destructive requests also need the required confirmation. Use only these operation labels when describing work: read, write, execute, send, schedu…"],"removed_lines":["0. Classify the request. Informational answers may be direct; read/retrieve requests need a read tool; write/change requests need a state-changing tool; destructive requests also need the required confirmation. Use only these operation labels when describing work: read, write, execute, send, schedu…"],"omitted_lines":0}],"tools":[{"name":"memory_upsert","change":"changed","description_changed":true,"description":"Store a durable, structured memory record for proactive semantic recall. Use namespace=\'facts\' for information that should surface in future conversations. Store explicit user preferences, verified facts, decisions, constraints, and reusable project context; do not store transient chat details or secrets. Use an expiry for temporary facts, and status=\'archived\' to soft-retire a record instead of deleting it. Save proactively in the same turn the information appears so other agents can use it immediately; do not defer to background compaction.","previous_description":"Store a durable, structured memory record for proactive semantic recall. Use namespace=\'facts\' for information that should surface in future conversations. Store explicit user preferences, verified facts, decisions, constraints, and reusable project context; do not store transient chat details or secrets. Use an expiry for temporary facts, and status=\'archived\' to soft-retire a record instead of deleting it.","params_added":[],"params_removed":[],"params_changed":[],"required_added":[],"required_removed":[]},{"name":"workflow_progress","change":"changed","description_changed":true,"description":"Report structured progress for a substantial multi-step task. Use only when the task has several dependent phases, likely spans turns, or needs explicit verification; skip simple tasks and work already covered by native tool progress. For agent-created workflows, send the full current items snapshot on every call and reuse the same workflow_id. Keep secrets and private data out of workflow fields. Mark items done only with observed validation evidence; use needs_attention for blockers; phase=complete requires every item done or skipped. A rejected update, or a step left checking or needs_atte…","previous_description":"Report structured progress for a substantial multi-step task. Use only when the task has several dependent phases, likely spans turns, or needs explicit verification; skip simple tasks and work already covered by native tool progress. For agent-created workflows, send the full current items snapshot on every call and reuse the same workflow_id. Keep secrets and private data out of workflow fields. Mark items done only with observed validation evidence; use needs_attention for blockers; phase=complete requires every item done or skipped. Every item needs input, expected output, and concrete va…","params_added":["needs_user"],"params_removed":[],"params_changed":[],"required_added":[],"required_removed":[]}]},{"version":"2.4.0","previous_version":"2.3.0","date":"2026-10-16","hints":["If an agent\'s instructions or skills tell it not to include links or URLs in replies, decide whether it should now cite sources with the provided `cite_as` and chat links.","If you listed `localhost` or `127.0.0.1` in the proxy bypass list only to reach local services, you can remove them; loopback is always direct now."],"commits":["fix(core): keep proxy loopback direct, unicode fact keys, agent tuning","fix(agents): avoid repeated compaction from bridge rows and topic pins","fix(core): keep per-chat backlog, permalink refs and code fences","fix(core): fix edge cases in edits, paging, bridges and pricing","feat(integrations): add source permalinks to mail, calendar, chats"],"prompts":[{"id":"static.agent.tool-usage-sop","source":"lib/agents/prepare/system-prompt.ts","change":"changed","added_lines":["10. Link the source. When your reply refers to a specific email, calendar event, or chat that a tool result or bridge message gave you, link it: paste the item\'s cite_as value verbatim when present, otherwise use its web_link, html_link, or chat_link URL as a markdown link. Use only links you were …"],"removed_lines":[],"omitted_lines":0},{"id":"system.Delivery channel","source":"lib/agents/prepare/system-prompt.ts","change":"changed","added_lines":["WhatsApp does not render markdown links: write any link as the bare URL, even where a cite_as value is given."],"removed_lines":[],"omitted_lines":0},{"id":"system.Tool usage SOP","source":"lib/agents/prepare/system-prompt.ts","change":"changed","added_lines":["10. Link the source. When your reply refers to a specific email, calendar event, or chat that a tool result or bridge message gave you, link it: paste the item\'s cite_as value verbatim when present, otherwise use its web_link, html_link, or chat_link URL as a markdown link. Use only links you were …"],"removed_lines":[],"omitted_lines":0}],"tools":[]}]}');
46
+ ;// ./lib/lifecycle/changesets.ts
47
+ /**
48
+ * Bundled release changesets (docs/adoption/changesets.json), generated at
49
+ * release time by `npm run release:changeset`. Installed bundles have no git
50
+ * history, so version adoption reads these to learn which prompts and tool
51
+ * descriptions/schemas changed between the user's last adopted version and
52
+ * the running one.
53
+ */
54
+
55
+ const changeKind = schemas/* enum */.k5n([
56
+ "added",
57
+ "removed",
58
+ "changed"
59
+ ]);
60
+ const promptChangeSchema = schemas/* object */.Ikc({
61
+ id: schemas/* string */.YjP(),
62
+ source: schemas/* string */.YjP(),
63
+ change: changeKind,
64
+ added_lines: schemas/* array */.YOg(schemas/* string */.YjP()),
65
+ removed_lines: schemas/* array */.YOg(schemas/* string */.YjP()),
66
+ omitted_lines: schemas/* number */.aig().int().nonnegative()
67
+ });
68
+ const toolChangeSchema = schemas/* object */.Ikc({
69
+ name: schemas/* string */.YjP(),
70
+ change: changeKind,
71
+ description_changed: schemas/* boolean */.zMY(),
72
+ description: schemas/* string */.YjP().optional(),
73
+ previous_description: schemas/* string */.YjP().optional(),
74
+ params_added: schemas/* array */.YOg(schemas/* string */.YjP()),
75
+ params_removed: schemas/* array */.YOg(schemas/* string */.YjP()),
76
+ params_changed: schemas/* array */.YOg(schemas/* string */.YjP()),
77
+ required_added: schemas/* array */.YOg(schemas/* string */.YjP()),
78
+ required_removed: schemas/* array */.YOg(schemas/* string */.YjP())
79
+ });
80
+ const releaseChangesetSchema = schemas/* object */.Ikc({
81
+ version: schemas/* string */.YjP().regex(/^\d+\.\d+\.\d+$/),
82
+ previous_version: schemas/* string */.YjP().regex(/^\d+\.\d+\.\d+$/).nullable(),
83
+ date: schemas/* string */.YjP(),
84
+ hints: schemas/* array */.YOg(schemas/* string */.YjP()),
85
+ commits: schemas/* array */.YOg(schemas/* string */.YjP()),
86
+ prompts: schemas/* array */.YOg(promptChangeSchema),
87
+ tools: schemas/* array */.YOg(toolChangeSchema)
88
+ });
89
+ const changesetFileSchema = schemas/* object */.Ikc({
90
+ schema_version: schemas/* literal */.euz(1),
91
+ changesets: schemas/* array */.YOg(releaseChangesetSchema)
92
+ });
93
+ function compareVersions(a, b) {
94
+ const pa = a.split(".").map((part)=>Number.parseInt(part, 10) || 0);
95
+ const pb = b.split(".").map((part)=>Number.parseInt(part, 10) || 0);
96
+ for(let i = 0; i < Math.max(pa.length, pb.length); i++){
97
+ const diff = (pa[i] ?? 0) - (pb[i] ?? 0);
98
+ if (diff !== 0) return diff;
99
+ }
100
+ return 0;
101
+ }
102
+ let cached = null;
103
+ function loadBundledChangesets() {
104
+ if (cached) return cached;
105
+ const parsed = changesetFileSchema.safeParse(changesets_namespaceObject);
106
+ cached = parsed.success ? [
107
+ ...parsed.data.changesets
108
+ ].sort((a, b)=>compareVersions(a.version, b.version)) : [];
109
+ return cached;
110
+ }
111
+ /** Cumulative changesets for versions in (previous, current]. */ function changesetsBetween(previous, current, all = loadBundledChangesets()) {
112
+ const entries = all.filter((entry)=>compareVersions(entry.version, previous) > 0 && compareVersions(entry.version, current) <= 0).sort((a, b)=>compareVersions(a.version, b.version));
113
+ const reachesCurrent = entries.some((entry)=>compareVersions(entry.version, current) === 0);
114
+ const first = entries[0];
115
+ const reachesPrevious = Boolean(first?.previous_version && compareVersions(first.previous_version, previous) <= 0);
116
+ return {
117
+ entries,
118
+ complete: reachesCurrent && reachesPrevious
119
+ };
120
+ }
121
+ /** Collapses a version range to the latest state of each changed surface. */ function summarizeChangesets(entries) {
122
+ const prompts = new Set();
123
+ const tools = new Map();
124
+ const hints = [];
125
+ for (const entry of entries){
126
+ for (const prompt of entry.prompts)prompts.add(prompt.id);
127
+ for (const tool of entry.tools)tools.set(tool.name, tool.change);
128
+ for (const hint of entry.hints)hints.push(`${entry.version}: ${hint}`);
129
+ }
130
+ return {
131
+ promptIds: [
132
+ ...prompts
133
+ ].sort(),
134
+ toolNames: [
135
+ ...tools.keys()
136
+ ].sort(),
137
+ removedTools: [
138
+ ...tools
139
+ ].filter(([, change])=>change === "removed").map(([name])=>name).sort(),
140
+ hints
141
+ };
142
+ }
143
+ function describeTool(tool) {
144
+ const parts = [];
145
+ if (tool.change === "added") parts.push("new tool");
146
+ if (tool.change === "removed") parts.push("removed — references to it will fail");
147
+ if (tool.description_changed) parts.push("description changed");
148
+ if (tool.params_added.length) parts.push(`params added: ${tool.params_added.join(", ")}`);
149
+ if (tool.params_removed.length) parts.push(`params removed: ${tool.params_removed.join(", ")}`);
150
+ if (tool.params_changed.length) parts.push(`params changed: ${tool.params_changed.join(", ")}`);
151
+ if (tool.required_added.length) parts.push(`now required: ${tool.required_added.join(", ")}`);
152
+ if (tool.required_removed.length) parts.push(`no longer required: ${tool.required_removed.join(", ")}`);
153
+ const head = ` - tool \`${tool.name}\`: ${parts.join("; ") || tool.change}`;
154
+ return tool.description && tool.change !== "removed" ? `${head}\n description: ${tool.description}` : head;
155
+ }
156
+ function describePrompt(prompt) {
157
+ const lines = [
158
+ ` - prompt \`${prompt.id}\` (${prompt.source}): ${prompt.change}`
159
+ ];
160
+ for (const line of prompt.added_lines)lines.push(` + ${line}`);
161
+ for (const line of prompt.removed_lines)lines.push(` - ${line}`);
162
+ if (prompt.omitted_lines > 0) lines.push(` … ${prompt.omitted_lines} more changed line(s)`);
163
+ return lines.join("\n");
164
+ }
165
+ /** Renders the range for the adoption prompt, bounded to `maxChars`. */ function formatChangesetsForPrompt(entries, maxChars = 8000) {
166
+ const blocks = [];
167
+ for (const entry of entries){
168
+ const lines = [
169
+ `Version ${entry.version} (from ${entry.previous_version ?? "unknown"}, ${entry.date}):`
170
+ ];
171
+ if (entry.hints.length) lines.push(...entry.hints.map((hint)=>` - adoption hint: ${hint}`));
172
+ lines.push(...entry.tools.map(describeTool));
173
+ lines.push(...entry.prompts.map(describePrompt));
174
+ if (!entry.hints.length && !entry.tools.length && !entry.prompts.length) {
175
+ lines.push(" - no prompt or tool surface changes");
176
+ }
177
+ blocks.push(lines.join("\n"));
178
+ }
179
+ const text = blocks.join("\n");
180
+ if (text.length <= maxChars) return text;
181
+ return `${text.slice(0, maxChars)}\n… changeset truncated; the full record is docs/adoption/changesets.json in the release.`;
182
+ }
183
+
184
+ ;// ./lib/stores/workflow-progress.ts
185
+ function shouldPreserveCompleted(current, next) {
186
+ return current === "done" && (next === "pending" || next === "checking");
187
+ }
188
+ function startWorkflow(state, phase) {
189
+ return {
190
+ ...state,
191
+ phase
192
+ };
193
+ }
194
+ function updateWorkflowItem(state, itemId, status, validationEvidence) {
195
+ let found = false;
196
+ const checklist = state.checklist.map((item)=>{
197
+ if (item.id !== itemId) return item;
198
+ found = true;
199
+ if (status === "done" && !validationEvidence?.trim()) {
200
+ throw new Error("Completing a workflow item requires observed validation evidence");
201
+ }
202
+ if (shouldPreserveCompleted(item.status, status)) return item;
203
+ return {
204
+ ...item,
205
+ status,
206
+ ...status === "checking" && item.status !== "checking" ? {
207
+ attempts: (item.attempts ?? 0) + 1
208
+ } : {},
209
+ ...validationEvidence ? {
210
+ validation_evidence: validationEvidence
211
+ } : {}
212
+ };
213
+ });
214
+ if (!found) throw new Error(`Workflow item "${itemId}" not found`);
215
+ return {
216
+ ...state,
217
+ checklist
218
+ };
219
+ }
220
+ function completeWorkflow(state, phase, validationEvidence) {
221
+ if (!validationEvidence.trim()) {
222
+ throw new Error("Completing a workflow requires observed validation evidence");
223
+ }
224
+ if (state.checklist.some((item)=>item.status === "done" && !item.validation_evidence?.trim())) {
225
+ throw new Error("A workflow cannot complete with items marked done without validation evidence");
226
+ }
227
+ return {
228
+ ...state,
229
+ phase,
230
+ checklist: state.checklist.map((item)=>item.status === "pending" || item.status === "checking" || item.status === "needs_attention" ? {
231
+ ...item,
232
+ status: "done",
233
+ validation_evidence: validationEvidence
234
+ } : item)
235
+ };
236
+ }
237
+ function mergeWorkflowProgress(state, update) {
238
+ let next = state;
239
+ let updatedItemId = null;
240
+ if (Object.prototype.hasOwnProperty.call(update, "phase")) {
241
+ next = {
242
+ ...next,
243
+ phase: update.phase ?? null
244
+ };
245
+ }
246
+ if (update.item_id || update.status) {
247
+ if (!update.item_id || !update.status) {
248
+ throw new Error("Workflow item progress requires both item_id and status");
249
+ }
250
+ next = updateWorkflowItem(next, update.item_id, update.status, update.validation_evidence);
251
+ updatedItemId = update.item_id;
252
+ }
253
+ if (Object.prototype.hasOwnProperty.call(update, "summary")) {
254
+ next = {
255
+ ...next,
256
+ summary: update.summary ?? ""
257
+ };
258
+ }
259
+ if (Object.prototype.hasOwnProperty.call(update, "error")) {
260
+ next = {
261
+ ...next,
262
+ error: update.error ?? null
263
+ };
264
+ }
265
+ return {
266
+ state: next,
267
+ updated_item_id: updatedItemId
268
+ };
269
+ }
270
+
271
+ ;// ./lib/stores/version-adoption.ts
272
+
273
+
274
+
275
+
276
+
277
+
278
+
279
+ const NAMESPACE = "app-lifecycle";
280
+ const STATE_KEY = "version_adoption_state";
281
+ /** A client request that cannot be applied to the current adoption state. */ class VersionAdoptionRequestError extends Error {
282
+ }
283
+ const DEFAULT_CHECKLIST = [
284
+ {
285
+ id: "instructions",
286
+ label: "Review instructions and skills",
287
+ input: "Changed instruction, skill, and harness files, plus the current agent behavior they define.",
288
+ output: "Findings and any required instruction or skill updates.",
289
+ validation: "Read each affected file and verify findings against the active prompt/skill loading path.",
290
+ status: "pending",
291
+ reason: "Agent behavior may depend on changed repo instructions, built-in skills, or prompt guidance.",
292
+ affected_files: [],
293
+ action: "read_instructions"
294
+ },
295
+ {
296
+ id: "tools",
297
+ label: "Review tool and permission changes",
298
+ input: "Changed tool implementations, registrations, descriptions, and permission rules.",
299
+ output: "Findings and required tool or permission adoption actions.",
300
+ validation: "Trace affected tools through registration and permission checks; run focused tests when available.",
301
+ status: "pending",
302
+ reason: "Tool descriptions, permissions, or package registrations can change how agents should act.",
303
+ affected_files: [],
304
+ action: "review_tools"
305
+ },
306
+ {
307
+ id: "scheduled-work",
308
+ label: "Review scheduled tasks and watchers",
309
+ input: "Changed scheduler, watcher, trigger, and long-lived prompt behavior.",
310
+ output: "Findings and required scheduled-work prompt updates.",
311
+ validation: "Inspect affected scheduling paths and run relevant tests; report any unchecked behavior as unknown.",
312
+ status: "pending",
313
+ reason: "Long-lived prompts for scheduled tasks and watchers can become stale after runtime or tool changes.",
314
+ affected_files: [],
315
+ action: "review_schedule"
316
+ }
317
+ ];
318
+ const PHASE_1_CHECKLIST = [
319
+ {
320
+ id: "fetch-changes",
321
+ label: "Fetch changes",
322
+ input: "Previously adopted version, current version, the bundled release changesets, and git history when running from a source checkout.",
323
+ output: "The prompt and tool description/schema deltas from the release changesets, or the changed-file list from git, between the baseline and current version.",
324
+ validation: "Use the system-computed changeset or git diff result; if no baseline is available, explicitly identify first-adoption status.",
325
+ status: "pending",
326
+ reason: "Compare the current version with the previously adopted version or baseline.",
327
+ affected_files: []
328
+ },
329
+ {
330
+ id: "build-todo-list",
331
+ label: "Build todo list",
332
+ input: "System-computed change surface and classified adoption surfaces.",
333
+ output: "A Phase 2 checklist covering all matched changes and a fallback review for unmatched changes.",
334
+ validation: "Check that every changed prompt, tool, or path is represented by an adoption item or explicitly covered by the fallback.",
335
+ status: "pending",
336
+ reason: "Turn detected version changes into the concrete Phase 2 adoption checklist.",
337
+ affected_files: []
338
+ }
339
+ ];
340
+ function now() {
341
+ return new Date().toISOString();
342
+ }
343
+ function parseStored() {
344
+ const row = (0,memory/* getMemory */.So)(NAMESPACE, STATE_KEY);
345
+ if (!row?.value) return null;
346
+ try {
347
+ const parsed = JSON.parse(row.value);
348
+ if (typeof parsed.current_version !== "string") return null;
349
+ return {
350
+ current_version: parsed.current_version,
351
+ previous_version: typeof parsed.previous_version === "string" ? parsed.previous_version : null,
352
+ is_first_adoption: parsed.is_first_adoption === true,
353
+ status: isStatus(parsed.status) ? parsed.status : "pending",
354
+ phase: isPhase(parsed.phase) ? parsed.phase : null,
355
+ default_agent_id: typeof parsed.default_agent_id === "string" ? parsed.default_agent_id : null,
356
+ default_agent_name: typeof parsed.default_agent_name === "string" ? parsed.default_agent_name : null,
357
+ adoption_thread_id: typeof parsed.adoption_thread_id === "string" ? parsed.adoption_thread_id : null,
358
+ adoption_prompt: typeof parsed.adoption_prompt === "string" ? parsed.adoption_prompt : null,
359
+ started_at: typeof parsed.started_at === "string" ? parsed.started_at : null,
360
+ completed_at: typeof parsed.completed_at === "string" ? parsed.completed_at : null,
361
+ dismissed_at: typeof parsed.dismissed_at === "string" ? parsed.dismissed_at : null,
362
+ summary: typeof parsed.summary === "string" ? parsed.summary : "",
363
+ checklist: Array.isArray(parsed.checklist) ? parsed.checklist.map(normalizeChecklistItem).filter((item)=>item !== null) : [],
364
+ stale_prompt_risks: Array.isArray(parsed.stale_prompt_risks) ? parsed.stale_prompt_risks.filter((item)=>typeof item === "string") : [],
365
+ error: typeof parsed.error === "string" ? parsed.error : null,
366
+ last_adopted_version: typeof parsed.last_adopted_version === "string" ? parsed.last_adopted_version : null
367
+ };
368
+ } catch {
369
+ return null;
370
+ }
371
+ }
372
+ function isStatus(value) {
373
+ return value === "idle" || value === "pending" || value === "running" || value === "done" || value === "failed" || value === "dismissed" || value === "blocked_no_default_agent";
374
+ }
375
+ function isPhase(value) {
376
+ return value === "impact_radius" || value === "adoption" || value === "complete" || value === null;
377
+ }
378
+ function normalizeChecklistItem(value) {
379
+ if (!value || typeof value !== "object") return null;
380
+ const item = value;
381
+ if (typeof item.id !== "string" || typeof item.label !== "string" || typeof item.reason !== "string") return null;
382
+ const validationEvidence = typeof item.validation_evidence === "string" && item.validation_evidence.trim() ? item.validation_evidence : undefined;
383
+ const storedStatus = isChecklistStatus(item.status) ? item.status : "pending";
384
+ const legacyCompletionNeedsReview = storedStatus === "done" && !validationEvidence;
385
+ return {
386
+ id: item.id,
387
+ label: item.label,
388
+ status: legacyCompletionNeedsReview ? "needs_attention" : storedStatus,
389
+ reason: legacyCompletionNeedsReview ? `${item.reason} Previously stored completion had no validation evidence; review this step again.` : item.reason,
390
+ affected_files: Array.isArray(item.affected_files) ? item.affected_files.filter((file)=>typeof file === "string") : [],
391
+ input: typeof item.input === "string" ? item.input : "Previously stored workflow context and affected files.",
392
+ output: typeof item.output === "string" ? item.output : "Review findings and any required adoption actions.",
393
+ validation: typeof item.validation === "string" ? item.validation : "Verify findings against the affected files; report unavailable evidence instead of inferring.",
394
+ ...validationEvidence ? {
395
+ validation_evidence: validationEvidence
396
+ } : {},
397
+ ...typeof item.attempts === "number" && Number.isInteger(item.attempts) && item.attempts > 0 ? {
398
+ attempts: item.attempts
399
+ } : {},
400
+ ...isVersionAdoptionAction(item.action) ? {
401
+ action: item.action
402
+ } : {}
403
+ };
404
+ }
405
+ function isChecklistStatus(value) {
406
+ return value === "pending" || value === "checking" || value === "done" || value === "needs_attention" || value === "skipped";
407
+ }
408
+ function isVersionAdoptionAction(value) {
409
+ return value === "read_skill" || value === "review_permissions" || value === "review_schedule" || value === "review_watcher" || value === "read_instructions" || value === "review_tools" || value === "review_api" || value === "review_persistence" || value === "review_release";
410
+ }
411
+ function persist(state) {
412
+ (0,memory/* putMemory */.Ri)(NAMESPACE, STATE_KEY, state);
413
+ return publicState(state);
414
+ }
415
+ function publicState(state) {
416
+ const { last_adopted_version: _last, ...visible } = state;
417
+ return visible;
418
+ }
419
+ function changedFiles(previousVersion, currentVersion) {
420
+ if (!previousVersion) return [];
421
+ const tag = `v${previousVersion}`;
422
+ try {
423
+ (0,external_node_child_process_.execFileSync)("git", [
424
+ "rev-parse",
425
+ "--is-inside-work-tree"
426
+ ], {
427
+ stdio: "ignore"
428
+ });
429
+ (0,external_node_child_process_.execFileSync)("git", [
430
+ "rev-parse",
431
+ "--verify",
432
+ tag
433
+ ], {
434
+ stdio: "ignore"
435
+ });
436
+ const raw = (0,external_node_child_process_.execFileSync)("git", [
437
+ "diff",
438
+ "--name-only",
439
+ "--diff-filter=ACMR",
440
+ `${tag}..HEAD`
441
+ ], {
442
+ cwd: process.cwd(),
443
+ encoding: "utf8",
444
+ stdio: [
445
+ "ignore",
446
+ "pipe",
447
+ "ignore"
448
+ ]
449
+ });
450
+ void currentVersion;
451
+ return raw.split(/\r?\n/).map((line)=>line.trim()).filter(Boolean).map((file)=>file.replace(/\\/g, "/"));
452
+ } catch {
453
+ return [];
454
+ }
455
+ }
456
+ function filesMatching(files, patterns) {
457
+ return files.filter((file)=>patterns.some((pattern)=>pattern.test(file)));
458
+ }
459
+ function item(id, label, reason, input, output, validation, files, action) {
460
+ if (files.length === 0) return null;
461
+ return {
462
+ id,
463
+ label,
464
+ input,
465
+ output,
466
+ validation,
467
+ status: "pending",
468
+ reason,
469
+ affected_files: files.slice(0, 12),
470
+ action
471
+ };
472
+ }
473
+ function changesetChecklist(previousVersion, range) {
474
+ const summary = summarizeChangesets(range.entries);
475
+ const toolRefs = summary.toolNames.map((name)=>`tool:${name}`);
476
+ const promptRefs = summary.promptIds.map((id)=>`prompt:${id}`);
477
+ const removed = summary.removedTools.length > 0 ? ` Removed tools: ${summary.removedTools.join(", ")}.` : "";
478
+ const items = [];
479
+ const surfaceItem = (entry)=>{
480
+ const { refs, ...rest } = entry;
481
+ return {
482
+ ...rest,
483
+ status: "pending",
484
+ affected_files: refs.slice(0, 12)
485
+ };
486
+ };
487
+ if (summary.toolNames.length > 0) {
488
+ items.push(surfaceItem({
489
+ id: "adapt-settings",
490
+ label: "Adapt agent settings to tool changes",
491
+ reason: `${summary.toolNames.length} built-in tool(s) changed description or schema since ${previousVersion}.${removed}`,
492
+ input: "Release changeset tool deltas, every agent's configuration from read_agent_config (tool allowlist and delegate targets), and the live catalog from list_tools.",
493
+ output: "Per agent: proposed settings edits for allowlists that reference removed tools or should include changed tools the user relies on, or an explicit no-change finding.",
494
+ validation: "After approved edits, re-read each agent with read_agent_config and confirm every allowlisted tool name exists in list_tools; name every agent checked.",
495
+ action: "review_permissions",
496
+ refs: toolRefs
497
+ }));
498
+ }
499
+ if (summary.toolNames.length > 0 || summary.promptIds.length > 0) {
500
+ items.push(surfaceItem({
501
+ id: "adapt-task-prompts",
502
+ label: "Adapt scheduled task and watcher prompts",
503
+ reason: "Long-lived task and watcher prompts can reference changed tools or parameters, or repeat built-in guidance that changed.",
504
+ input: "Release changeset tool and prompt deltas, plus every prompt returned by list_scheduled_tasks and list_watchers.",
505
+ output: "For each affected task or watcher: current prompt, proposed prompt, and the changeset delta that motivates it; unaffected ones listed as checked.",
506
+ validation: "After approved update_scheduled_task / update_watcher calls, re-list and confirm each stored prompt equals the approved text and names only tools present in list_tools.",
507
+ action: "review_schedule",
508
+ refs: [
509
+ ...toolRefs,
510
+ ...promptRefs
511
+ ]
512
+ }));
513
+ items.push(surfaceItem({
514
+ id: "adapt-instructions-skills",
515
+ label: "Adapt agent instructions and skills",
516
+ reason: "Agent instructions and user skills can reference changed tools or parameters, or duplicate or contradict changed built-in prompt guidance.",
517
+ input: "Release changeset prompt and tool deltas, each agent's instructions from read_agent_instruction, and user skills from list_skills / read_skill.",
518
+ output: "For each affected instruction or skill: before and after text and the changeset delta that motivates it; unaffected ones listed as checked.",
519
+ validation: "After approved update_agent_instruction / write_skill calls, re-read each artifact and confirm the stored text matches and names only tools and parameters present in list_tools and the changed schemas.",
520
+ action: "read_skill",
521
+ refs: [
522
+ ...promptRefs,
523
+ ...toolRefs
524
+ ]
525
+ }));
526
+ }
527
+ if (summary.hints.length > 0) {
528
+ items.push(surfaceItem({
529
+ id: "release-hints",
530
+ label: "Apply release adoption hints",
531
+ reason: `The release notes include ${summary.hints.length} adoption hint(s) from the maintainers.`,
532
+ input: `Adoption hints: ${summary.hints.join(" | ")}`,
533
+ output: "Each hint applied to the user's setup, or a finding that it does not apply.",
534
+ validation: "For each hint, cite the artifact or setting checked and re-read anything changed.",
535
+ action: "review_release",
536
+ refs: []
537
+ }));
538
+ }
539
+ if (!range.complete) {
540
+ items.push(surfaceItem({
541
+ id: "version-diff",
542
+ label: "Review changes not covered by changesets",
543
+ reason: `Bundled changesets do not fully cover ${previousVersion} → current; older releases predate changesets.`,
544
+ input: "The available changesets and the changelog for the uncovered versions.",
545
+ output: "Findings for uncovered versions and any required adoption actions.",
546
+ validation: "State which versions were covered by changesets and which only by the changelog.",
547
+ action: "review_release",
548
+ refs: []
549
+ }));
550
+ }
551
+ if (items.length === 0) {
552
+ items.push(surfaceItem({
553
+ id: "version-diff",
554
+ label: "Review version changes",
555
+ reason: "Release changesets report no prompt or tool description/schema changes; user prompts, skills, and settings need no adaptation.",
556
+ input: "Release changesets for the version range.",
557
+ output: "Confirmation that no adaptation is required.",
558
+ validation: "Confirm each changeset in the range lists no tool or prompt changes and no adoption hints.",
559
+ action: "review_release",
560
+ refs: []
561
+ }));
562
+ items[0].status = "skipped";
563
+ }
564
+ return items;
565
+ }
566
+ function computeAdoptionPlan(previousVersion, currentVersion) {
567
+ if (!previousVersion) {
568
+ return {
569
+ items: DEFAULT_CHECKLIST.map((entry)=>({
570
+ ...entry
571
+ })),
572
+ source: "none",
573
+ range: null
574
+ };
575
+ }
576
+ const range = changesetsBetween(previousVersion, currentVersion);
577
+ if (range.entries.length > 0) {
578
+ return {
579
+ items: changesetChecklist(previousVersion, range),
580
+ source: "changeset",
581
+ range
582
+ };
583
+ }
584
+ const files = changedFiles(previousVersion, currentVersion);
585
+ return {
586
+ items: gitChecklist(files),
587
+ source: files.length > 0 ? "git" : "none",
588
+ range: null
589
+ };
590
+ }
591
+ function buildChecklist(previousVersion, currentVersion) {
592
+ return computeAdoptionPlan(previousVersion, currentVersion).items;
593
+ }
594
+ function gitChecklist(files) {
595
+ const dynamic = [
596
+ item("permissions", "Review permissions and tool access", "Tool registration, category, package, or permission files changed since the last adopted version.", "Changed tool registration and permission files.", "Validated findings about capability exposure and any required permission changes.", "Inspect each affected file, trace the permission path, and run relevant tool/permission tests.", filesMatching(files, [
597
+ /^lib\/tools\//,
598
+ /^packages\/[^/]+-langchain\//,
599
+ /^lib\/stores\/agent-configs\./,
600
+ /^lib\/stores\/builtin-tools\./
601
+ ]), "review_permissions"),
602
+ item("skills-instructions", "Review changed skills and instructions", "Agent instructions, skill files, or harness prompts changed and may affect behavior.", "Changed instruction, skill, and harness files plus their loading paths.", "Validated behavior impact and any required instruction or skill updates.", "Read each affected file and verify changes against the prompt/skill loading path.", filesMatching(files, [
603
+ /^\.github\/skills\//,
604
+ /^\.github\/instructions\//,
605
+ /^\.github\/copilot-instructions\.md$/,
606
+ /^lib\/skills\//,
607
+ /^lib\/agents\/harness\//
608
+ ]), "read_skill"),
609
+ item("scheduled-work", "Review scheduled tasks and watchers", "Scheduler, trigger, or watcher behavior changed and long-lived prompts may need review.", "Changed scheduler, trigger, watcher, and long-lived prompt files.", "Validated findings and any required scheduled-work prompt updates.", "Inspect each affected scheduling path and run its focused tests when available.", filesMatching(files, [
610
+ /^lib\/scheduler\//,
611
+ /^lib\/triggers\//,
612
+ /^lib\/tools\/(schedule|watcher)\.ts$/
613
+ ]), "review_schedule"),
614
+ item("stale-prompts", "Check stale prompt risks", "Agent prompt assembly or runtime policy changed since the last adopted version.", "Changed prompt assembly, harness, and runtime-policy files.", "Validated stale-prompt risks and specific corrective actions.", "Trace changed prompt code into the assembled prompt and test the affected behavior.", filesMatching(files, [
615
+ /^lib\/agents\//,
616
+ /^lib\/agents\/prepare\/system-prompt\.ts$/
617
+ ]), "read_instructions"),
618
+ item("api-persistence", "Review API and persistence contracts", "API, database, or store changes can require migrations, docs, or client updates.", "Changed API schemas, database migrations, stores, and their clients.", "Validated contract impact and any required migration, client, or documentation actions.", "Check schema and migration compatibility, then run focused contract and persistence tests.", filesMatching(files, [
619
+ /^app\/api\//,
620
+ /^api\//,
621
+ /^lib\/api\//,
622
+ /^lib\/db\//,
623
+ /^lib\/stores\//
624
+ ]), "review_api"),
625
+ item("release-notes", "Review release notes and package metadata", "Release metadata changed and should describe user-visible behavior.", "Changed changelog, package metadata, and release configuration.", "Validated release notes and package/version metadata.", "Compare release notes with the actual diff and verify package metadata consistency.", filesMatching(files, [
626
+ /^CHANGELOG\.md$/,
627
+ /^package\.json$/,
628
+ /^package-lock\.json$/,
629
+ /^packages\/[^/]+\/package\.json$/,
630
+ /^packages\/[^/]+\/CHANGELOG\.md$/
631
+ ]), "review_release")
632
+ ].filter((entry)=>entry !== null);
633
+ if (dynamic.length === 0) {
634
+ return [
635
+ {
636
+ id: "version-diff",
637
+ label: "Review version changes",
638
+ input: "System-computed changed-file list and available changelog.",
639
+ output: "Findings for unclassified changes and any required adoption actions.",
640
+ validation: "Compare findings with the available changed-file list and changelog; state explicitly if either is unavailable.",
641
+ status: files.length === 0 ? "skipped" : "pending",
642
+ reason: files.length === 0 ? "No git diff was available for the stored version; use the changelog as the fallback briefing." : "Changed files did not match a known ripple surface; review the changelog for user-visible behavior.",
643
+ affected_files: files.slice(0, 12),
644
+ action: "review_release"
645
+ }
646
+ ];
647
+ }
648
+ return dynamic;
649
+ }
650
+ function phase1Checklist() {
651
+ return PHASE_1_CHECKLIST.map((entry)=>({
652
+ ...entry
653
+ }));
654
+ }
655
+ // `fetch-changes` never needs an agent tool call: the changeset read or git
656
+ // diff it reports on already ran synchronously in createState() (via
657
+ // computeAdoptionPlan), so the item starts pre-completed with the
658
+ // deterministic result baked into its reason. Only `build-todo-list` is left
659
+ // for the agent to actually do.
660
+ function resolvedPhase1Checklist(plan, isFirst) {
661
+ const [fetchChanges, ...rest] = phase1Checklist();
662
+ const adoptionChecklist = plan.items;
663
+ const affectedCount = adoptionChecklist.reduce((n, entry)=>n + entry.affected_files.length, 0);
664
+ const changesetVersions = plan.range?.entries.map((entry)=>entry.version).join(", ") ?? "";
665
+ const evidence = isFirst ? "System confirmed that this is the first adoption and no prior baseline exists." : plan.source === "changeset" ? `System read bundled release changesets for ${changesetVersions}${plan.range?.complete ? "" : " (partial coverage)"}; ${affectedCount} changed prompt/tool surface reference(s) were counted.` : `System computed the changed-file surface against the prior version; ${affectedCount} affected file(s) were counted.`;
666
+ const reason = isFirst ? "First adoption — no previously adopted version to diff against." : plan.source === "changeset" ? `Read deterministically from the bundled release changesets (prompt and tool description/schema deltas): ${affectedCount} surface reference(s) across ${adoptionChecklist.length} area(s).` : `Computed deterministically via git diff against the previously adopted version: ${affectedCount} affected file(s) across ${adoptionChecklist.length} area(s).`;
667
+ return [
668
+ {
669
+ ...fetchChanges,
670
+ status: "done",
671
+ validation_evidence: evidence,
672
+ reason
673
+ },
674
+ ...rest
675
+ ];
676
+ }
677
+ function stalePromptRisks(checklist) {
678
+ return checklist.filter((item)=>item.id === "skills-instructions" || item.id === "scheduled-work" || item.id === "stale-prompts" || item.id === "permissions" || item.id === "adapt-settings" || item.id === "adapt-task-prompts" || item.id === "adapt-instructions-skills").map((item)=>item.label);
679
+ }
680
+ function buildSummary(state, checklist) {
681
+ if (state.is_first_adoption) {
682
+ return `Current version ${state.current_version} baseline is ready; review current guidance before relying on long-lived prompts.`;
683
+ }
684
+ return `Version ${state.current_version} has ${checklist.length} adoption check${checklist.length === 1 ? "" : "s"} from ${state.previous_version}.`;
685
+ }
686
+ function buildAdoptionPrompt(state) {
687
+ const phaseLabel = state.is_first_adoption ? `current-version baseline ${state.current_version}` : `upgrade from ${state.previous_version} to ${state.current_version}`;
688
+ const plan = computeAdoptionPlan(state.previous_version, state.current_version);
689
+ const changesetSection = plan.source === "changeset" && plan.range ? [
690
+ "",
691
+ `Release changesets — model-facing prompt and tool description/schema changes from ${state.previous_version} to ${state.current_version}${plan.range.complete ? "" : " (partial: older versions predate changesets)"}:`,
692
+ formatChangesetsForPrompt(plan.range.entries)
693
+ ] : [];
694
+ return [
695
+ `Run Jarela version adoption for ${phaseLabel}.`,
696
+ "",
697
+ "Phase 1 — impact radius analysis:",
698
+ plan.source === "changeset" ? "- The change surface (`fetch-changes`) was already read deterministically by the system from the bundled release changesets: prompt text and built-in tool description/schema deltas between the previously adopted version and this one. They are listed under \"Release changesets\" below. Do not independently fetch or guess at what changed; that item is already marked done in the UI." : "- The changed-file surface (`fetch-changes`) was already computed deterministically by the system via git diff against the previously adopted version — see each Phase 2 checklist item below with its affected_files. Do not independently fetch or guess at what changed; that item is already marked done in the UI.",
699
+ "- Every checklist item provides its input, expected output, and validation criteria. Work from the stated inputs, validate the output using those criteria, and report observed evidence before marking the item done.",
700
+ "- Prefer executable checks for code-verifiable behavior. If a check cannot run, say why and leave the result unverified or mark the item needs_attention.",
701
+ "- Call `workflow_progress` with `workflow_id: \"version_adoption\"`, `phase: \"impact_radius\"`, `item_id: \"build-todo-list\"`, and `status: \"checking\"`.",
702
+ "- Build the Phase 2 todo list from the adoption checklist below, deciding which items are actionable, skipped, or need attention.",
703
+ "- Then call `workflow_progress` for `item_id: \"build-todo-list\"` with `status: \"done\"` and `validation_evidence` containing the observed coverage check.",
704
+ "",
705
+ "Phase 2 — adoption:",
706
+ "- Start Phase 2 by calling `workflow_progress` with `workflow_id: \"version_adoption\"` and `phase: \"adoption\"`; the UI will swap from the Phase 1 checklist to the generated adoption todo list.",
707
+ "- Before each Phase 2 checklist item, call `workflow_progress` with that `item_id` and `status: \"checking\"`.",
708
+ "- If Phase 1 finds actionable adoption work, complete safe local updates directly when your available tools allow it.",
709
+ "- For `adapt-*` items, compare each user artifact (agent settings, instructions, skills, scheduled task and watcher prompts) with the release changesets: removed tools, added, removed, or newly required parameters, changed tool descriptions, and built-in prompt guidance the artifact now duplicates or contradicts. Show the before and after text, apply an edit only after the user approves it, then re-read the artifact to validate.",
710
+ "- For risky or external side effects, propose an approval flow instead of acting silently.",
711
+ "- If Phase 1 finds no adoption work, explicitly say that Phase 2 is skipped and why.",
712
+ "- After each Phase 2 item, call `workflow_progress` with `status: \"done\"` and observed `validation_evidence`, or `status: \"skipped\"` / `status: \"needs_attention\"` as appropriate. Add `needs_user: true` only when the user must decide or act; other unfinished or failed steps are retried automatically, up to 3 attempts per step.",
713
+ "- Before your final response, call `workflow_progress` with `workflow_id: \"version_adoption\"`, `phase: \"complete\"`, and a concise `summary`.",
714
+ "",
715
+ "Constraints:",
716
+ "- Do not create external issues, PRs, scheduled tasks, watcher updates, or credential changes unless the user explicitly approves.",
717
+ "- Keep the response concise: what changed, what you checked, what was adopted, what was skipped, and any approval needed.",
718
+ "",
719
+ `Summary: ${state.summary}`,
720
+ "Phase 1 checklist:",
721
+ ...PHASE_1_CHECKLIST.map((item)=>`- ${item.id}: ${item.label} — Input: ${item.input} Output: ${item.output} Validation: ${item.validation} Reason: ${item.reason}`),
722
+ "Phase 2 adoption checklist:",
723
+ ...plan.items.map((item)=>`- ${item.id}: ${item.label}: Input: ${item.input} Output: ${item.output} Validation: ${item.validation} Reason: ${item.reason}${item.affected_files.length > 0 ? ` Affected: ${item.affected_files.join(", ")}.` : ""}`),
724
+ state.stale_prompt_risks.length > 0 ? `Stale-prompt risks: ${state.stale_prompt_risks.join(", ")}.` : "Stale-prompt risks: none detected in the checklist.",
725
+ ...changesetSection
726
+ ].join("\n");
727
+ }
728
+ function buildAdoptionStepRetryPrompt(state, phase, entry) {
729
+ const phaseLabel = state.is_first_adoption ? `current-version baseline ${state.current_version}` : `upgrade from ${state.previous_version} to ${state.current_version}`;
730
+ const plan = computeAdoptionPlan(state.previous_version, state.current_version);
731
+ const changesetSection = phase === "adoption" && plan.source === "changeset" && plan.range ? [
732
+ "",
733
+ "Release changesets:",
734
+ formatChangesetsForPrompt(plan.range.entries)
735
+ ] : [];
736
+ return [
737
+ `Retry one Jarela version adoption step for ${phaseLabel}. The user asked to redo only this step; leave every other checklist item unchanged.`,
738
+ "",
739
+ `Step: ${entry.id} — ${entry.label}`,
740
+ `Input: ${entry.input}`,
741
+ `Output: ${entry.output}`,
742
+ `Validation: ${entry.validation}`,
743
+ `Reason: ${entry.reason}`,
744
+ ...entry.affected_files.length > 0 ? [
745
+ `Affected: ${entry.affected_files.join(", ")}.`
746
+ ] : [],
747
+ "",
748
+ `- Call \`workflow_progress\` with \`workflow_id: "version_adoption"\`, \`phase: "${phase}"\`, \`item_id: "${entry.id}"\`, and \`status: "checking"\`.`,
749
+ "- Redo the step from its stated input. Prefer executable checks for code-verifiable behavior, and do not reuse earlier evidence: run the validation again.",
750
+ `- Then call \`workflow_progress\` for \`item_id: "${entry.id}"\` with \`status: "done"\` and newly observed \`validation_evidence\`, or \`status: "needs_attention"\` with the reason.`,
751
+ "- For `adapt-*` steps, show the before and after text and apply an edit only after the user approves it, then re-read the artifact.",
752
+ "- Do not create external issues, PRs, scheduled tasks, watcher updates, or credential changes unless the user explicitly approves.",
753
+ "- Keep the response concise: what you rechecked, the observed result, and any approval needed.",
754
+ ...changesetSection
755
+ ].join("\n");
756
+ }
757
+ function retryAdoptionItem(state, checklist, itemId, t) {
758
+ const index = checklist.findIndex((entry)=>entry.id === itemId);
759
+ if (index === -1) throw new VersionAdoptionRequestError(`Unknown adoption checklist item: ${itemId}`);
760
+ if (itemId === "fetch-changes") {
761
+ throw new VersionAdoptionRequestError("fetch-changes is computed by the system and cannot be retried by the agent.");
762
+ }
763
+ if (!state.default_agent_id) {
764
+ return {
765
+ ...state,
766
+ status: "blocked_no_default_agent",
767
+ phase: null,
768
+ error: "No default agent is configured."
769
+ };
770
+ }
771
+ const phase = PHASE_1_CHECKLIST.some((entry)=>entry.id === itemId) ? "impact_radius" : "adoption";
772
+ const { validation_evidence: _previousEvidence, ...rest } = checklist[index];
773
+ checklist[index] = {
774
+ ...rest,
775
+ status: "checking",
776
+ attempts: (rest.attempts ?? 0) + 1
777
+ };
778
+ const thread = (0,threads/* getOrCreateAgentThread */.xH)(state.default_agent_id);
779
+ return {
780
+ ...state,
781
+ status: "running",
782
+ phase,
783
+ started_at: state.started_at ?? t,
784
+ completed_at: null,
785
+ dismissed_at: null,
786
+ checklist,
787
+ adoption_thread_id: thread.thread_id,
788
+ adoption_prompt: buildAdoptionStepRetryPrompt(state, phase, checklist[index]),
789
+ error: null
790
+ };
791
+ }
792
+ function createState(currentVersion, previousVersion) {
793
+ const defaultAgent = (0,agent_configs/* getDefaultAgentConfig */.vU)();
794
+ const isFirst = previousVersion === null;
795
+ const plan = computeAdoptionPlan(previousVersion, currentVersion);
796
+ const adoptionChecklist = plan.items;
797
+ const summaryInput = {
798
+ current_version: currentVersion,
799
+ previous_version: previousVersion,
800
+ is_first_adoption: isFirst
801
+ };
802
+ return {
803
+ current_version: currentVersion,
804
+ previous_version: previousVersion,
805
+ is_first_adoption: isFirst,
806
+ status: defaultAgent ? "pending" : "blocked_no_default_agent",
807
+ phase: null,
808
+ default_agent_id: defaultAgent?.id ?? null,
809
+ default_agent_name: defaultAgent?.name ?? null,
810
+ adoption_thread_id: null,
811
+ adoption_prompt: null,
812
+ started_at: null,
813
+ completed_at: null,
814
+ dismissed_at: null,
815
+ checklist: resolvedPhase1Checklist(plan, isFirst),
816
+ stale_prompt_risks: stalePromptRisks(adoptionChecklist),
817
+ summary: buildSummary(summaryInput, adoptionChecklist),
818
+ error: defaultAgent ? null : "No default agent is configured.",
819
+ last_adopted_version: previousVersion
820
+ };
821
+ }
822
+ function getVersionAdoptionState(currentVersion = getCurrentVersion()) {
823
+ const stored = parseStored();
824
+ if (!stored) return persist(createState(currentVersion, null));
825
+ if (stored.current_version === currentVersion) {
826
+ if (stored.status === "blocked_no_default_agent" && (0,agent_configs/* getDefaultAgentConfig */.vU)()) {
827
+ return persist(createState(currentVersion, stored.previous_version));
828
+ }
829
+ return publicState(stored);
830
+ }
831
+ const previousVersion = stored.last_adopted_version ?? stored.current_version;
832
+ return persist(createState(currentVersion, previousVersion));
833
+ }
834
+ function updateVersionAdoptionState(action, currentVersion = getCurrentVersion(), itemId) {
835
+ const existing = parseStored();
836
+ const state = existing && existing.current_version === currentVersion ? existing : createState(currentVersion, existing?.last_adopted_version ?? existing?.current_version ?? null);
837
+ const t = now();
838
+ const nextChecklist = state.checklist.map((entry)=>({
839
+ ...entry
840
+ }));
841
+ if (action === "retry" && itemId) {
842
+ return persist(retryAdoptionItem(state, nextChecklist, itemId, t));
843
+ }
844
+ if (action === "start" || action === "retry") {
845
+ if (!state.default_agent_id) {
846
+ return persist({
847
+ ...state,
848
+ status: "blocked_no_default_agent",
849
+ phase: null,
850
+ error: "No default agent is configured."
851
+ });
852
+ }
853
+ const thread = (0,threads/* getOrCreateAgentThread */.xH)(state.default_agent_id);
854
+ // fetch-changes is pre-completed at createState() time; mark the next
855
+ // still-open item (normally build-todo-list) as checking instead of
856
+ // hardcoding index 0, which would otherwise clobber that done status.
857
+ const firstOpen = nextChecklist.findIndex((entry)=>entry.status !== "done" && entry.status !== "skipped");
858
+ if (firstOpen !== -1) {
859
+ const entry = nextChecklist[firstOpen];
860
+ if (entry.status !== "checking") entry.attempts = (entry.attempts ?? 0) + 1;
861
+ entry.status = "checking";
862
+ }
863
+ const running = {
864
+ ...state,
865
+ status: "running",
866
+ phase: "impact_radius",
867
+ started_at: state.started_at ?? t,
868
+ completed_at: null,
869
+ dismissed_at: null,
870
+ checklist: nextChecklist,
871
+ adoption_thread_id: thread.thread_id,
872
+ error: null
873
+ };
874
+ return persist({
875
+ ...running,
876
+ adoption_prompt: buildAdoptionPrompt(running)
877
+ });
878
+ }
879
+ if (action === "mark_done") {
880
+ const completed = completeWorkflow({
881
+ ...state,
882
+ checklist: nextChecklist
883
+ }, "complete", "The user explicitly confirmed completion through the adoption checklist.");
884
+ return persist({
885
+ ...completed,
886
+ status: "done",
887
+ completed_at: t,
888
+ dismissed_at: null,
889
+ adoption_prompt: null,
890
+ error: null,
891
+ last_adopted_version: currentVersion
892
+ });
893
+ }
894
+ return persist({
895
+ ...state,
896
+ status: "dismissed",
897
+ phase: "complete",
898
+ completed_at: state.completed_at ?? t,
899
+ dismissed_at: t,
900
+ adoption_prompt: null,
901
+ error: null,
902
+ last_adopted_version: currentVersion
903
+ });
904
+ }
905
+ function recordVersionAdoptionWorkflowProgress(update, currentVersion = getCurrentVersion()) {
906
+ const existing = parseStored();
907
+ const state = existing && existing.current_version === currentVersion ? existing : createState(currentVersion, existing?.last_adopted_version ?? existing?.current_version ?? null);
908
+ const enteringAdoption = update.phase === "adoption" && state.phase !== "adoption";
909
+ const baseState = enteringAdoption ? {
910
+ ...state,
911
+ phase: "adoption",
912
+ checklist: buildChecklist(state.previous_version, currentVersion)
913
+ } : state;
914
+ const result = mergeWorkflowProgress(baseState, update);
915
+ if (result.state.phase === "complete" && result.state.checklist.some((entry)=>entry.status !== "done" && entry.status !== "skipped" || entry.status === "done" && !entry.validation_evidence)) {
916
+ throw new Error("Version adoption cannot be completed until every checklist item is validated or skipped.");
917
+ }
918
+ const completedPhase1Todo = result.state.phase === "impact_radius" && update.item_id === "build-todo-list" && update.status === "done";
919
+ const progressed = completedPhase1Todo ? {
920
+ ...result.state,
921
+ phase: "adoption",
922
+ checklist: buildChecklist(state.previous_version, currentVersion)
923
+ } : result.state;
924
+ const nextStatus = result.state.phase === "complete" ? "done" : state.status === "done" || state.status === "dismissed" ? state.status : "running";
925
+ const next = persist({
926
+ ...progressed,
927
+ status: nextStatus,
928
+ started_at: state.started_at ?? now(),
929
+ completed_at: progressed.phase === "complete" ? state.completed_at ?? now() : null,
930
+ dismissed_at: null,
931
+ adoption_prompt: progressed.phase === "complete" ? null : progressed.adoption_prompt,
932
+ error: update.error !== undefined ? update.error : progressed.error,
933
+ last_adopted_version: progressed.phase === "complete" ? currentVersion : state.last_adopted_version
934
+ });
935
+ return {
936
+ state: next,
937
+ updated_item_id: result.updated_item_id
938
+ };
939
+ }
940
+
941
+
942
+ /***/ })
943
+
944
+ };
945
+ ;
946
+ //# sourceMappingURL=4189.js.map