scope-agent-workbench 0.0.0-stage → 0.2.3

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 (358) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/LICENSE +21 -0
  3. package/README.md +174 -2
  4. package/README.zh-CN.md +175 -0
  5. package/bin/scope.mjs +111 -0
  6. package/bridge/account-quotas.mjs +881 -0
  7. package/bridge/agent-email-relay.mjs +160 -0
  8. package/bridge/app-server-client.mjs +2522 -0
  9. package/bridge/app-server-websocket-transport.mjs +219 -0
  10. package/bridge/archive/routes.mjs +19 -0
  11. package/bridge/archive/service.mjs +130 -0
  12. package/bridge/archive/thread-lifecycle.mjs +52 -0
  13. package/bridge/attachment-store.mjs +184 -0
  14. package/bridge/auth-profile-failover.mjs +58 -0
  15. package/bridge/auth-profile-manager.mjs +215 -0
  16. package/bridge/capacity-recovery.mjs +90 -0
  17. package/bridge/codex-upgrade.mjs +150 -0
  18. package/bridge/deployment-profile.mjs +64 -0
  19. package/bridge/email-notifier.mjs +616 -0
  20. package/bridge/gpu-usage-history.mjs +322 -0
  21. package/bridge/host-session-restart.mjs +35 -0
  22. package/bridge/http.mjs +69 -0
  23. package/bridge/idle-sessions.mjs +185 -0
  24. package/bridge/inventory-scanner.mjs +517 -0
  25. package/bridge/local/dialogue.mjs +150 -0
  26. package/bridge/local/directories.mjs +40 -0
  27. package/bridge/local/executable.mjs +29 -0
  28. package/bridge/local/history.mjs +36 -0
  29. package/bridge/local/python-probe.mjs +35 -0
  30. package/bridge/local/runtime.mjs +188 -0
  31. package/bridge/local/transport.mjs +70 -0
  32. package/bridge/maintenance/install-command.mjs +141 -0
  33. package/bridge/maintenance/routes.mjs +21 -0
  34. package/bridge/maintenance/service.mjs +175 -0
  35. package/bridge/model-catalog.mjs +21 -0
  36. package/bridge/persistent-home-guard.mjs +6 -0
  37. package/bridge/plugins/aliyun-dlc/index.mjs +47 -0
  38. package/bridge/plugins/aliyun-dlc/manifest.mjs +12 -0
  39. package/bridge/plugins/aliyun-dlc/monitor.mjs +236 -0
  40. package/bridge/plugins/aliyun-dlc/probe.mjs +701 -0
  41. package/bridge/plugins/config-store.mjs +35 -0
  42. package/bridge/plugins/external.mjs +87 -0
  43. package/bridge/plugins/package.mjs +96 -0
  44. package/bridge/plugins/registry.mjs +37 -0
  45. package/bridge/plugins/routes.mjs +27 -0
  46. package/bridge/private-gateway.mjs +371 -0
  47. package/bridge/private-start.mjs +22 -0
  48. package/bridge/probes/app-server-handoff-probe.mjs +89 -0
  49. package/bridge/probes/app-server-writer-probe.mjs +72 -0
  50. package/bridge/probes/assistant-search-probe.mjs +323 -0
  51. package/bridge/probes/dialogue-probe.mjs +464 -0
  52. package/bridge/probes/history-probe.mjs +432 -0
  53. package/bridge/probes/index.mjs +15 -0
  54. package/bridge/probes/new-session-preflight.mjs +16 -0
  55. package/bridge/probes/profile-cancel-probe.mjs +19 -0
  56. package/bridge/probes/profile-delete-probe.mjs +28 -0
  57. package/bridge/probes/profile-list-probe.mjs +117 -0
  58. package/bridge/probes/profile-write-probe.mjs +111 -0
  59. package/bridge/probes/raw-context-probe.mjs +53 -0
  60. package/bridge/probes/remote-probe.mjs +637 -0
  61. package/bridge/probes/submission-probe.mjs +2 -0
  62. package/bridge/probes/takeover-probe.mjs +328 -0
  63. package/bridge/probes/vscode-open-preflight.mjs +23 -0
  64. package/bridge/profile-capacity-policy.mjs +14 -0
  65. package/bridge/providers/acp-forms.py +49 -0
  66. package/bridge/providers/antigravity-interactive.mjs +14 -0
  67. package/bridge/providers/antigravity-interactive.py +349 -0
  68. package/bridge/providers/claude-capabilities.py +52 -0
  69. package/bridge/providers/claude-interactive.mjs +14 -0
  70. package/bridge/providers/claude-interactive.py +463 -0
  71. package/bridge/providers/cli-command.mjs +103 -0
  72. package/bridge/providers/codex-workbench.mjs +164 -0
  73. package/bridge/providers/conversation-routes.mjs +28 -0
  74. package/bridge/providers/conversations.mjs +231 -0
  75. package/bridge/providers/native-commands.mjs +48 -0
  76. package/bridge/providers/native-commands.py +38 -0
  77. package/bridge/providers/native-models.mjs +129 -0
  78. package/bridge/providers/native-session-state.mjs +14 -0
  79. package/bridge/providers/native-session-state.py +96 -0
  80. package/bridge/providers/remote-cli.mjs +75 -0
  81. package/bridge/providers/remote-job.py +130 -0
  82. package/bridge/remote-app-server-command.mjs +203 -0
  83. package/bridge/remote-bootstrap/routes.mjs +51 -0
  84. package/bridge/remote-bootstrap/scope-protocol.mjs +125 -0
  85. package/bridge/remote-bootstrap/service.mjs +597 -0
  86. package/bridge/remote-bootstrap/tunnels.mjs +347 -0
  87. package/bridge/remote-directory-listing.mjs +148 -0
  88. package/bridge/remote-images.mjs +140 -0
  89. package/bridge/remote-profile-home.mjs +39 -0
  90. package/bridge/remote-rollout-locks.mjs +31 -0
  91. package/bridge/remote-videos.mjs +129 -0
  92. package/bridge/research/insights.mjs +522 -0
  93. package/bridge/research/scan-host.mjs +18 -0
  94. package/bridge/rollout-summary.mjs +177 -0
  95. package/bridge/routes/accounts.mjs +326 -0
  96. package/bridge/routes/dialogue.mjs +165 -0
  97. package/bridge/routes/email.mjs +50 -0
  98. package/bridge/routes/management.mjs +291 -0
  99. package/bridge/routes/models.mjs +312 -0
  100. package/bridge/routes/runtime.mjs +82 -0
  101. package/bridge/routes/session-commands.mjs +12 -0
  102. package/bridge/routes/session-delivery.mjs +328 -0
  103. package/bridge/routes/session-lifecycle.mjs +839 -0
  104. package/bridge/routes/system.mjs +289 -0
  105. package/bridge/server.mjs +3357 -0
  106. package/bridge/session-attachments.mjs +150 -0
  107. package/bridge/session-cache-archive.mjs +22 -0
  108. package/bridge/session-catalog/agy-history.py +388 -0
  109. package/bridge/session-catalog/catalog.mjs +110 -0
  110. package/bridge/session-catalog/probe.py +1207 -0
  111. package/bridge/session-catalog/routes.mjs +34 -0
  112. package/bridge/session-profiles.mjs +115 -0
  113. package/bridge/shared-start.mjs +22 -0
  114. package/bridge/start.mjs +205 -0
  115. package/bridge/state-persistence.mjs +405 -0
  116. package/bridge/submissions/settings.mjs +50 -0
  117. package/bridge/terminal-gateway.mjs +171 -0
  118. package/bridge/tmux-delivery.mjs +390 -0
  119. package/bridge/tmux-session-control.mjs +29 -0
  120. package/bridge/transport/ssh-command.mjs +119 -0
  121. package/bridge/ui-server.mjs +257 -0
  122. package/bridge/vscode-opener.mjs +157 -0
  123. package/bridge/web-terminal.mjs +52 -0
  124. package/bridge/workbench/conversation-routes.mjs +31 -0
  125. package/bridge/workbench/directory-probe.mjs +41 -0
  126. package/bridge/workbench/directory-routes.mjs +112 -0
  127. package/bridge/workbench/manager-context.mjs +51 -0
  128. package/bridge/workbench/routes.mjs +40 -0
  129. package/bridge/workbench/scheduler.mjs +131 -0
  130. package/bridge/workbench/service.mjs +301 -0
  131. package/bridge/workbench/store.mjs +64 -0
  132. package/bridge/workbench/task-archive.mjs +46 -0
  133. package/dist/client/.assetsignore +2 -0
  134. package/dist/client/.vite/manifest.json +366 -0
  135. package/dist/client/_headers +3 -0
  136. package/dist/client/agents/LICENSE.lobe-icons +21 -0
  137. package/dist/client/agents/README.md +14 -0
  138. package/dist/client/agents/antigravity.svg +39 -0
  139. package/dist/client/agents/claude.svg +1 -0
  140. package/dist/client/agents/codex.svg +1 -0
  141. package/dist/client/agents/dsh.svg +4 -0
  142. package/dist/client/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  143. package/dist/client/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  144. package/dist/client/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  145. package/dist/client/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  146. package/dist/client/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  147. package/dist/client/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  148. package/dist/client/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  149. package/dist/client/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  150. package/dist/client/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  151. package/dist/client/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  152. package/dist/client/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  153. package/dist/client/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  154. package/dist/client/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  155. package/dist/client/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  156. package/dist/client/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  157. package/dist/client/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  158. package/dist/client/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  159. package/dist/client/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  160. package/dist/client/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  161. package/dist/client/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  162. package/dist/client/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  163. package/dist/client/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  164. package/dist/client/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  165. package/dist/client/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  166. package/dist/client/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  167. package/dist/client/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  168. package/dist/client/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  169. package/dist/client/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  170. package/dist/client/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  171. package/dist/client/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  172. package/dist/client/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  173. package/dist/client/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  174. package/dist/client/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  175. package/dist/client/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  176. package/dist/client/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  177. package/dist/client/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  178. package/dist/client/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  179. package/dist/client/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  180. package/dist/client/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  181. package/dist/client/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  182. package/dist/client/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  183. package/dist/client/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  184. package/dist/client/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  185. package/dist/client/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  186. package/dist/client/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  187. package/dist/client/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  188. package/dist/client/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  189. package/dist/client/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  190. package/dist/client/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  191. package/dist/client/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  192. package/dist/client/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  193. package/dist/client/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  194. package/dist/client/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  195. package/dist/client/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  196. package/dist/client/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  197. package/dist/client/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  198. package/dist/client/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  199. package/dist/client/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  200. package/dist/client/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  201. package/dist/client/assets/_vinext_fonts/geist-8ac0455e797f/geist-001175b1.woff2 +0 -0
  202. package/dist/client/assets/_vinext_fonts/geist-8ac0455e797f/geist-52306abf.woff2 +0 -0
  203. package/dist/client/assets/_vinext_fonts/geist-8ac0455e797f/geist-875ccdd4.woff2 +0 -0
  204. package/dist/client/assets/_vinext_fonts/geist-8ac0455e797f/geist-98bbbccb.woff2 +0 -0
  205. package/dist/client/assets/_vinext_fonts/geist-8ac0455e797f/geist-ff2310f5.woff2 +0 -0
  206. package/dist/client/assets/_vinext_fonts/geist-mono-00e989178794/geist-mono-013b2f2f.woff2 +0 -0
  207. package/dist/client/assets/_vinext_fonts/geist-mono-00e989178794/geist-mono-0638449e.woff2 +0 -0
  208. package/dist/client/assets/_vinext_fonts/geist-mono-00e989178794/geist-mono-44745446.woff2 +0 -0
  209. package/dist/client/assets/_vinext_fonts/geist-mono-00e989178794/geist-mono-44e03052.woff2 +0 -0
  210. package/dist/client/assets/_vinext_fonts/geist-mono-00e989178794/geist-mono-971fb274.woff2 +0 -0
  211. package/dist/client/assets/_vinext_fonts/geist-mono-00e989178794/geist-mono-f6b33328.woff2 +0 -0
  212. package/dist/client/assets/addon-fit-BZbxZs2G.js +1 -0
  213. package/dist/client/assets/framework-CXnKph_e.js +9 -0
  214. package/dist/client/assets/index-BMior55c.js +3 -0
  215. package/dist/client/assets/index-CNnP2Ses.css +2 -0
  216. package/dist/client/assets/layout-segment-context-DjGudgXn.js +1 -0
  217. package/dist/client/assets/page-CJqXlhDs.js +551 -0
  218. package/dist/client/assets/page-LYzRz6_S.css +1 -0
  219. package/dist/client/assets/rolldown-runtime-S-ySWqyJ.js +1 -0
  220. package/dist/client/assets/xterm-BBgU7shl.js +36 -0
  221. package/dist/client/favicon.svg +6 -0
  222. package/dist/client/file.svg +1 -0
  223. package/dist/client/globe.svg +1 -0
  224. package/dist/client/og.png +0 -0
  225. package/dist/client/scope-logo.svg +11 -0
  226. package/dist/client/window.svg +1 -0
  227. package/dist/server/.vite/manifest.json +14 -0
  228. package/dist/server/__vite_rsc_assets_manifest.js +49 -0
  229. package/dist/server/assets/index-CNnP2Ses.css +2 -0
  230. package/dist/server/image-config.json +1 -0
  231. package/dist/server/index.js +15201 -0
  232. package/dist/server/ssr/__vite_rsc_assets_manifest.js +49 -0
  233. package/dist/server/ssr/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  234. package/dist/server/ssr/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  235. package/dist/server/ssr/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  236. package/dist/server/ssr/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  237. package/dist/server/ssr/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  238. package/dist/server/ssr/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  239. package/dist/server/ssr/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  240. package/dist/server/ssr/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  241. package/dist/server/ssr/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  242. package/dist/server/ssr/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  243. package/dist/server/ssr/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  244. package/dist/server/ssr/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  245. package/dist/server/ssr/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  246. package/dist/server/ssr/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  247. package/dist/server/ssr/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  248. package/dist/server/ssr/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  249. package/dist/server/ssr/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  250. package/dist/server/ssr/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  251. package/dist/server/ssr/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  252. package/dist/server/ssr/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  253. package/dist/server/ssr/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  254. package/dist/server/ssr/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  255. package/dist/server/ssr/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  256. package/dist/server/ssr/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  257. package/dist/server/ssr/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  258. package/dist/server/ssr/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  259. package/dist/server/ssr/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  260. package/dist/server/ssr/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  261. package/dist/server/ssr/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  262. package/dist/server/ssr/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  263. package/dist/server/ssr/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  264. package/dist/server/ssr/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  265. package/dist/server/ssr/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  266. package/dist/server/ssr/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  267. package/dist/server/ssr/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  268. package/dist/server/ssr/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  269. package/dist/server/ssr/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  270. package/dist/server/ssr/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  271. package/dist/server/ssr/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  272. package/dist/server/ssr/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  273. package/dist/server/ssr/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  274. package/dist/server/ssr/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  275. package/dist/server/ssr/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  276. package/dist/server/ssr/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  277. package/dist/server/ssr/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  278. package/dist/server/ssr/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  279. package/dist/server/ssr/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  280. package/dist/server/ssr/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  281. package/dist/server/ssr/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  282. package/dist/server/ssr/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  283. package/dist/server/ssr/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  284. package/dist/server/ssr/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  285. package/dist/server/ssr/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  286. package/dist/server/ssr/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  287. package/dist/server/ssr/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  288. package/dist/server/ssr/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  289. package/dist/server/ssr/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  290. package/dist/server/ssr/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  291. package/dist/server/ssr/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  292. package/dist/server/ssr/assets/addon-fit-C09Jj0_f.js +42 -0
  293. package/dist/server/ssr/assets/error-boundary-Dd2ZYXA8.js +277 -0
  294. package/dist/server/ssr/assets/layout-segment-context-HV_Mvyzf.js +37 -0
  295. package/dist/server/ssr/assets/page-BB9Dri2u.js +104686 -0
  296. package/dist/server/ssr/assets/page-LYzRz6_S.css +1 -0
  297. package/dist/server/ssr/assets/xterm-DgzE4ZZ1.js +10232 -0
  298. package/dist/server/ssr/index.js +11840 -0
  299. package/dist/server/ssr/vinext-server.json +1 -0
  300. package/dist/server/vinext-externals.json +1 -0
  301. package/dist/server/vinext-server.json +1 -0
  302. package/dist/server/wrangler.json +1 -0
  303. package/examples/agents/global-agreements.example.md +10 -0
  304. package/examples/agents/research-project.example.md +10 -0
  305. package/examples/agents-media-previews.md +22 -0
  306. package/examples/deployment.example.json +6 -0
  307. package/examples/leak-denylist.example.json +10 -0
  308. package/examples/plugins/hello/index.mjs +4 -0
  309. package/examples/plugins/hello/scope-plugin.json +13 -0
  310. package/examples/workbench.config.json +44 -0
  311. package/lib/account-quota.d.ts +42 -0
  312. package/lib/account-quota.js +121 -0
  313. package/lib/browser-snapshot-cache.js +61 -0
  314. package/lib/conversation-location.js +26 -0
  315. package/lib/conversation.js +62 -0
  316. package/lib/dialogue-refresh.js +14 -0
  317. package/lib/execution-host.js +22 -0
  318. package/lib/formula-preview.js +48 -0
  319. package/lib/i18n.tsx +81 -0
  320. package/lib/incremental-snapshot.js +324 -0
  321. package/lib/manager-plan.js +37 -0
  322. package/lib/markdown-images.js +22 -0
  323. package/lib/markdown-math.js +151 -0
  324. package/lib/markdown-url.js +13 -0
  325. package/lib/model-effort.js +13 -0
  326. package/lib/native-history.d.ts +32 -0
  327. package/lib/native-history.js +94 -0
  328. package/lib/overview-delta.js +41 -0
  329. package/lib/project-view.js +86 -0
  330. package/lib/projects.js +74 -0
  331. package/lib/remote-links.js +95 -0
  332. package/lib/runtime-config.js +70 -0
  333. package/lib/session-activity.js +34 -0
  334. package/lib/session-cache-guard.js +52 -0
  335. package/lib/session-filters.js +38 -0
  336. package/lib/ssh-config.js +26 -0
  337. package/lib/stable-order.js +39 -0
  338. package/lib/subagent-display-prefs.ts +130 -0
  339. package/lib/workbench-config.js +172 -0
  340. package/package.json +105 -4
  341. package/scripts/agent-email-relay.mjs +104 -0
  342. package/scripts/benchmark-bridge.mjs +38 -0
  343. package/scripts/cli-integration-smoke.mjs +64 -0
  344. package/scripts/email-notification-cli.mjs +28 -0
  345. package/scripts/enable-private-access.ps1 +109 -0
  346. package/scripts/export-opensource.mjs +112 -0
  347. package/scripts/fixtures/media/convergence.png +0 -0
  348. package/scripts/fixtures/media/rollout_demo.mp4 +0 -0
  349. package/scripts/fixtures/native-conversations.mjs +465 -0
  350. package/scripts/fixtures/workbench-conversations.mjs +475 -0
  351. package/scripts/install-remote-server.sh +67 -0
  352. package/scripts/lib/export-directory.mjs +38 -0
  353. package/scripts/lib/secret-scanner.mjs +139 -0
  354. package/scripts/plugin-cli.mjs +19 -0
  355. package/scripts/preview-workbench.mjs +669 -0
  356. package/scripts/probe-antigravity-acp.mjs +35 -0
  357. package/scripts/remote-bootstrap-cli.mjs +52 -0
  358. package/scripts/remote-email-tool.py +383 -0
@@ -0,0 +1,112 @@
1
+ import { execFileSync } from "node:child_process";
2
+ import { cp, mkdir, readFile, stat } from "node:fs/promises";
3
+ import path from "node:path";
4
+ import { prepareExportDirectory } from "./lib/export-directory.mjs";
5
+ import {
6
+ compileDenylistRegex,
7
+ loadDenylistPatterns,
8
+ scanContentForLeaks,
9
+ } from "./lib/secret-scanner.mjs";
10
+
11
+ const args = process.argv.slice(2);
12
+ const checkOnly = args.includes("--check");
13
+ const outIndex = args.indexOf("--out");
14
+ if (outIndex >= 0 && (!args[outIndex + 1] || args[outIndex + 1].startsWith("--"))) {
15
+ throw new Error("--out requires an output directory");
16
+ }
17
+ const defaultExportDir = path.join(
18
+ ".scope",
19
+ "opensource-export",
20
+ new Date().toISOString().replace(/[:.]/g, "-"),
21
+ );
22
+ const outDir = path.resolve(
23
+ outIndex >= 0 && args[outIndex + 1]
24
+ ? args[outIndex + 1]
25
+ : defaultExportDir,
26
+ );
27
+
28
+ const BINARY_EXTENSIONS = new Set([
29
+ ".png",
30
+ ".jpg",
31
+ ".jpeg",
32
+ ".gif",
33
+ ".webp",
34
+ ".ico",
35
+ ".woff",
36
+ ".woff2",
37
+ ".ttf",
38
+ ".mp4",
39
+ ".docx",
40
+ ".pdf",
41
+ ]);
42
+
43
+ function gitList(gitArgs) {
44
+ return execFileSync("git", gitArgs, { encoding: "utf8" })
45
+ .split(/\r?\n/)
46
+ .map((line) => line.trim())
47
+ .filter(Boolean);
48
+ }
49
+
50
+ const tracked = gitList(["ls-files"]);
51
+ const untracked = gitList(["ls-files", "--others", "--exclude-standard"]);
52
+ const files = [...new Set([...tracked, ...untracked])];
53
+
54
+ const denylistPath =
55
+ process.env.SCOPE_EXPORT_DENYLIST || path.join(".scope", "leak-denylist.json");
56
+ const customPatterns = await loadDenylistPatterns(denylistPath);
57
+ const customDenylistRegex = compileDenylistRegex(customPatterns);
58
+
59
+ const violations = [];
60
+ let scanned = 0;
61
+
62
+ for (const relativePath of files) {
63
+ if (relativePath === "package-lock.json") continue;
64
+ let info;
65
+ try {
66
+ info = await stat(relativePath);
67
+ } catch {
68
+ continue; // Deleted from working tree prior to commit.
69
+ }
70
+ if (!info.isFile()) continue;
71
+ const extension = path.extname(relativePath).toLowerCase();
72
+ if (BINARY_EXTENSIONS.has(extension)) continue;
73
+
74
+ const content = await readFile(relativePath, "utf8");
75
+ scanned++;
76
+ violations.push(...scanContentForLeaks(content, relativePath, customDenylistRegex));
77
+ }
78
+
79
+ if (violations.length > 0) {
80
+ console.error(`[scope-export] Found ${violations.length} potential leak(s):`);
81
+ for (const v of violations.slice(0, 50)) {
82
+ console.error(` ${v.file}:${v.line}: [${v.rule}] ${v.token}`);
83
+ }
84
+ process.exit(1);
85
+ }
86
+
87
+ console.log(
88
+ `[scope-export] Scanned ${scanned} text files` +
89
+ `${customPatterns.length ? ` (+ ${customPatterns.length} local denylist rules)` : ""}` +
90
+ ": no forbidden patterns or secret signatures detected.",
91
+ );
92
+ console.log("[scope-export] This check does not audit Git history or binary files.");
93
+
94
+ if (!checkOnly) {
95
+ await prepareExportDirectory(outDir);
96
+ let exported = 0;
97
+ for (const relativePath of files) {
98
+ let info;
99
+ try {
100
+ info = await stat(relativePath);
101
+ } catch {
102
+ continue;
103
+ }
104
+ if (!info.isFile()) continue;
105
+ const destination = path.join(outDir, relativePath);
106
+ await mkdir(path.dirname(destination), { recursive: true });
107
+ await cp(relativePath, destination, { force: false, errorOnExist: true });
108
+ exported++;
109
+ }
110
+ console.log(`[scope-export] Exported ${exported} files to ${outDir}`);
111
+ console.log("[scope-export] Review the exported files and initialize a new repository there before publishing; no Git history was exported.");
112
+ }
@@ -0,0 +1,465 @@
1
+ /** Native composer fixture: no remote hosts, credentials, or model calls. */
2
+ const isEn = process.env.SCOPE_PREVIEW_LOCALE === "en";
3
+ const now = Date.now();
4
+ const claudeSubagents = [
5
+ {
6
+ id: "agent-sub-lit-1",
7
+ agentId: "agent-sub-lit-1",
8
+ role: "Literature & Baseline Auditor",
9
+ typeName: "Explore",
10
+ model: "claude-sonnet",
11
+ spawnDepth: 1,
12
+ background: true,
13
+ status: "working",
14
+ lastAction: "Grep: tab:zeroshot-pixels",
15
+ hasWorkflow: true,
16
+ updatedAt: now - 4000,
17
+ },
18
+ {
19
+ id: "agent-sub-eval-2",
20
+ agentId: "agent-sub-eval-2",
21
+ role: "Checkpoint Metrics Collector",
22
+ typeName: "general-purpose",
23
+ model: "claude-opus",
24
+ spawnDepth: 1,
25
+ background: true,
26
+ status: "completed",
27
+ lastAction: "SubagentHandback",
28
+ hasWorkflow: true,
29
+ updatedAt: now - 1500,
30
+ },
31
+ ];
32
+
33
+ const claudeSubagentWorkflows = {
34
+ "agent-sub-lit-1": {
35
+ found: true,
36
+ provider: "claude",
37
+ subagentId: "agent-sub-lit-1",
38
+ role: "Literature & Baseline Auditor",
39
+ typeName: "Explore",
40
+ model: "claude-sonnet",
41
+ spawnDepth: 1,
42
+ status: "working",
43
+ version: "preview-wf-1",
44
+ truncated: false,
45
+ totalSteps: 4,
46
+ steps: [
47
+ {
48
+ id: "wf1-prompt",
49
+ kind: "prompt",
50
+ text: isEn
51
+ ? "Cross-check all four visual manipulation baselines in `paper/sections/experiments.tex` against `eval_metrics.py` and verify every citation label."
52
+ : "核对 `paper/sections/experiments.tex` 中四组视觉操作基线与 `eval_metrics.py` 的统计口径,并检查所有引用标签。",
53
+ timestamp: new Date(now - 24000).toISOString(),
54
+ },
55
+ {
56
+ id: "wf1-think",
57
+ kind: "thinking",
58
+ durationMs: 1850,
59
+ text: isEn
60
+ ? "First locate `tab:zeroshot-pixels` in the LaTeX source, then compare the reported success rates and VRAM numbers with the evaluation script output."
61
+ : "先在 LaTeX 源码中定位 `tab:zeroshot-pixels`,再逐项比对评测脚本导出的成功率与显存峰值。",
62
+ timestamp: new Date(now - 21000).toISOString(),
63
+ },
64
+ {
65
+ id: "wf1-tool-1",
66
+ kind: "tool",
67
+ toolName: "Grep",
68
+ summary: "tab:zeroshot-pixels",
69
+ inputPreview: JSON.stringify({ pattern: "tab:zeroshot-pixels", path: "paper/sections" }, null, 2),
70
+ output: "paper/sections/experiments.tex:48: \\label{tab:zeroshot-pixels}\npaper/sections/experiments.tex:61: Baseline & 66.2 & 41.8 \\\\\npaper/sections/experiments.tex:63: \\method{} & \\textbf{92.8} & \\textbf{27.6} \\\\",
71
+ status: "completed",
72
+ timestamp: new Date(now - 15000).toISOString(),
73
+ },
74
+ {
75
+ id: "wf1-tool-2",
76
+ kind: "tool",
77
+ toolName: "Read",
78
+ summary: "/workspace/research/eval_metrics.py",
79
+ inputPreview: JSON.stringify({ file_path: "/workspace/research/eval_metrics.py", offset: 18, limit: 30 }, null, 2),
80
+ output: "18: def aggregate_seeds(runs):\n19: # Mean over all 5 evaluation seeds (0..4)\n20: return mean(r.success_rate for r in runs)",
81
+ status: "running",
82
+ timestamp: new Date(now - 4000).toISOString(),
83
+ },
84
+ ],
85
+ },
86
+ "agent-sub-eval-2": {
87
+ found: true,
88
+ provider: "claude",
89
+ subagentId: "agent-sub-eval-2",
90
+ role: "Checkpoint Metrics Collector",
91
+ typeName: "general-purpose",
92
+ model: "claude-opus",
93
+ spawnDepth: 1,
94
+ status: "completed",
95
+ version: "preview-wf-2",
96
+ truncated: false,
97
+ totalSteps: 4,
98
+ steps: [
99
+ {
100
+ id: "wf2-prompt",
101
+ kind: "prompt",
102
+ text: isEn
103
+ ? "Run `eval_metrics.py --summary` across the 4× A100 checkpoints and hand back a verified comparison table."
104
+ : "在 4× A100 最新 checkpoint 上运行 `eval_metrics.py --summary` 并回传核对后的对比表格。",
105
+ timestamp: new Date(now - 42000).toISOString(),
106
+ },
107
+ {
108
+ id: "wf2-tool-1",
109
+ kind: "tool",
110
+ toolName: "Bash",
111
+ summary: "python3 eval_metrics.py --summary --seeds 0,1,2,3,4",
112
+ command: "python3 eval_metrics.py --summary --seeds 0,1,2,3,4",
113
+ output: "Loaded 5 seeds from /workspace/research/runs/latest\nBaseline: 66.2% (peak 41.8 GB)\nCosine LR: 79.5% (peak 38.2 GB)\nSCOPE Policy: 92.8% (peak 27.6 GB, -34.0% VRAM)",
114
+ status: "completed",
115
+ timestamp: new Date(now - 26000).toISOString(),
116
+ },
117
+ {
118
+ id: "wf2-handback",
119
+ kind: "tool",
120
+ toolName: "SubagentHandback",
121
+ summary: isEn ? "Verified 5-seed metrics & 34% VRAM reduction" : "已核实 5 个随机种子指标及 34% 显存下降",
122
+ inputPreview: JSON.stringify({
123
+ summary: isEn
124
+ ? "All 5 seeds match [eval_metrics.py](file:///workspace/research/eval_metrics.py#L18-L45):\n\n| Variant | Success (%) | Peak VRAM (GB) |\n| --- | ---: | ---: |\n| Baseline | 66.2 | 41.8 |\n| **SCOPE Policy** | **92.8** | **27.6** |\n\nVerified reduction: $\\Delta_{\\text{VRAM}} = (41.8 - 27.6) / 41.8 = 34.0\\%$."
125
+ : "5 组随机种子结果已与 [eval_metrics.py](file:///workspace/research/eval_metrics.py#L18-L45) 一致:\n\n| 实验方案 | 成功率 (%) | 显存峰值 (GB) |\n| --- | ---: | ---: |\n| Baseline | 66.2 | 41.8 |\n| **SCOPE Policy** | **92.8** | **27.6** |\n\n显存降幅验证:$\\Delta_{\\text{VRAM}} = (41.8 - 27.6) / 41.8 = 34.0\\%$。",
126
+ }),
127
+ status: "completed",
128
+ timestamp: new Date(now - 5000).toISOString(),
129
+ },
130
+ ],
131
+ },
132
+ };
133
+ const agySubagents = [
134
+ {
135
+ id: "agy-sub-1",
136
+ role: "Ablation Matrix Checker",
137
+ typeName: "research",
138
+ background: true,
139
+ status: "completed",
140
+ lastAction: isEn ? "Done" : "已完成",
141
+ updatedAt: now - 45000,
142
+ },
143
+ ];
144
+
145
+ const entries = [
146
+ {
147
+ key: JSON.stringify(["lab-gpu", "claude", "preview-claude"]),
148
+ host: "lab-gpu",
149
+ provider: "claude",
150
+ sessionId: "preview-claude",
151
+ cwd: "/workspace/research",
152
+ title: isEn ? "Claude Paper Revision & Audit" : "Claude 论文修改与审稿核对",
153
+ model: "claude-opus",
154
+ updatedAt: now - 12000,
155
+ managed: true,
156
+ activeSubagents: 2,
157
+ },
158
+ {
159
+ key: JSON.stringify(["lab-gpu", "antigravity", "preview-antigravity"]),
160
+ host: "lab-gpu",
161
+ provider: "antigravity",
162
+ sessionId: "preview-antigravity",
163
+ cwd: "/workspace/research",
164
+ title: isEn ? "AGY Multi-GPU Ablation Tracker" : "AGY 多卡消融实验追踪",
165
+ model: "gemini-2.5-pro-high",
166
+ updatedAt: now - 30000,
167
+ managed: true,
168
+ activeSubagents: 0,
169
+ },
170
+ ];
171
+
172
+ const states = new Map(
173
+ entries.map((entry) => [
174
+ entry.key,
175
+ {
176
+ ...entry,
177
+ turns: [],
178
+ interactive: true,
179
+ status: "waiting_permission",
180
+ permissionMode: "default",
181
+ controlResults: [],
182
+ subagents: entry.provider === "claude" ? claudeSubagents : agySubagents,
183
+ permissions: [
184
+ entry.provider === "claude"
185
+ ? {
186
+ id: "preview-question",
187
+ tool: "AskUserQuestion",
188
+ input: {
189
+ questions: isEn
190
+ ? [
191
+ {
192
+ question: "Which experimental figures and tables should we finalize first?",
193
+ multiSelect: true,
194
+ options: [
195
+ { label: "Convergence curves", description: "Merge 4-GPU training logs with std shading" },
196
+ { label: "Ablation summary", description: "Cross-check baseline scores in Table 2" },
197
+ { label: "VRAM & throughput", description: "Add A100 throughput and peak memory stats" },
198
+ ],
199
+ },
200
+ {
201
+ question: "Preferred report format?",
202
+ options: [{ label: "Concise summary" }, { label: "Detailed Markdown report" }],
203
+ },
204
+ ]
205
+ : [
206
+ {
207
+ question: "希望优先完善哪些实验图表与结论?",
208
+ multiSelect: true,
209
+ options: [
210
+ { label: "收敛曲线对比", description: "合并 4 卡训练日志并绘制标准差阴影" },
211
+ { label: "消融实验汇总", description: "核对 Table 2 中各基线指标" },
212
+ { label: "显存与吞吐统计", description: "补充 A100 训练吞吐与显存峰值" },
213
+ ],
214
+ },
215
+ {
216
+ question: "希望以什么形式汇报?",
217
+ options: [{ label: "简短结论" }, { label: "详细 Markdown 报告" }],
218
+ },
219
+ ],
220
+ },
221
+ }
222
+ : {
223
+ id: "preview-form",
224
+ kind: "acp-form",
225
+ tool: isEn ? "Question" : "提问",
226
+ input: {},
227
+ description: isEn
228
+ ? "Select which ablation targets to validate in this sweep."
229
+ : "请选择本轮消融评测需要验证的选项。",
230
+ fields: [
231
+ {
232
+ name: "targets",
233
+ title: isEn ? "Which modules should be verified?" : "需要验证哪些模块?",
234
+ type: "array",
235
+ required: true,
236
+ minItems: 1,
237
+ options: isEn
238
+ ? [
239
+ { value: "1", label: "Data augmentation pipeline" },
240
+ { value: "2", label: "Cosine LR schedule" },
241
+ { value: "3", label: "Distributed gradient sync" },
242
+ ]
243
+ : [
244
+ { value: "1", label: "数据增强流水线" },
245
+ { value: "2", label: "学习率余弦退火" },
246
+ { value: "3", label: "分布式梯度同步" },
247
+ ],
248
+ },
249
+ ],
250
+ },
251
+ ],
252
+ },
253
+ ]),
254
+ );
255
+
256
+ export function nativeConversationFixture(request, response, url, json) {
257
+ if (url.pathname === "/api/session-catalog") {
258
+ json(response, 200, { entries, scans: [], scanning: false });
259
+ return true;
260
+ }
261
+ if (url.pathname === "/api/cli-conversations") {
262
+ const entry = entries.find((item) => item.key === url.searchParams.get("key"));
263
+ json(response, 200, entry ? states.get(entry.key) : { entries: [...states.values()] });
264
+ return true;
265
+ }
266
+ if (
267
+ url.pathname === "/api/cli-conversations/commands" ||
268
+ url.pathname === "/api/session/commands"
269
+ ) {
270
+ json(response, 200, {
271
+ commands: [
272
+ { name: "compact", description: "压缩当前会话上下文" },
273
+ { name: "review", description: "检查项目中的代码变更" },
274
+ { name: "project:check", description: "运行当前项目的校验技能" },
275
+ ],
276
+ });
277
+ return true;
278
+ }
279
+ if (url.pathname === "/api/cli-conversations/control") {
280
+ let body = "";
281
+ request.on("data", (chunk) => (body += chunk));
282
+ request.on("end", () => {
283
+ const input = JSON.parse(body);
284
+ const state = states.get(input.key);
285
+ state.controlResults.push({ id: input.id, status: "accepted" });
286
+ state.permissions = [];
287
+ state.status = "completed";
288
+ state.turns = [
289
+ {
290
+ id: "preview-reply",
291
+ prompt: "提交回答",
292
+ status: "completed",
293
+ text: `已收到确认:${JSON.stringify(input.answers || input.content || input.decision)}`,
294
+ },
295
+ ];
296
+ json(response, 202, { status: "queued", controlId: input.id });
297
+ });
298
+ return true;
299
+ }
300
+ if (url.pathname === "/api/cli-conversations/models") {
301
+ const agy = url.searchParams.get("provider") === "antigravity";
302
+ json(response, 200, {
303
+ models: agy
304
+ ? ["low", "medium", "high"].map((level) => ({
305
+ id: `gemini-2.5-pro-${level}`,
306
+ label: `Gemini 2.5 Pro (${level})`,
307
+ currentEffort: level,
308
+ efforts: ["low", "medium", "high"],
309
+ effortModels: {
310
+ low: "gemini-2.5-pro-low",
311
+ medium: "gemini-2.5-pro-medium",
312
+ high: "gemini-2.5-pro-high",
313
+ },
314
+ supportsAutoMode: false,
315
+ }))
316
+ : [
317
+ { id: "default", label: isEn ? "Host default" : "主机默认", efforts: ["low", "high"], supportsAutoMode: true },
318
+ { id: "opus", label: "Opus", efforts: ["low", "high"], supportsAutoMode: true },
319
+ ],
320
+ });
321
+ return true;
322
+ }
323
+ if (url.pathname === "/api/session-catalog/subagent-workflow") {
324
+ const subId = url.searchParams.get("subagentId") || "";
325
+ const workflow =
326
+ claudeSubagentWorkflows[subId] || Object.values(claudeSubagentWorkflows)[0];
327
+ if (!workflow) {
328
+ json(response, 404, { error: "Subagent workflow not found" });
329
+ return true;
330
+ }
331
+ json(response, 200, workflow);
332
+ return true;
333
+ }
334
+ if (url.pathname === "/api/session-catalog/dialogue") {
335
+ const isClaude = (url.searchParams.get("key") || "").includes('"claude"');
336
+ const isAgy = (url.searchParams.get("key") || "").includes('"antigravity"');
337
+ const messages = isAgy
338
+ ? isEn
339
+ ? [
340
+ {
341
+ id: "1",
342
+ role: "user",
343
+ text: "Summarize the 4-GPU ablation matrix with a comparison table, convergence plot, rollout video preview, and clickable script links.",
344
+ },
345
+ {
346
+ id: "2",
347
+ role: "assistant",
348
+ text: [
349
+ "Completed the 4× A100 ablation sweep (see [eval_metrics.py](file:///workspace/research/eval_metrics.py#L42-L68)).",
350
+ "",
351
+ "| Variant | Success (%) | Peak VRAM (GB) | Throughput (steps/s) |",
352
+ "| --- | ---: | ---: | ---: |",
353
+ "| Baseline | 66.2 | 41.8 | 11.4 |",
354
+ "| Cosine LR | 79.5 | 38.2 | 13.1 |",
355
+ "| **Ours (SCOPE Policy)** | **92.8** | **27.6** | **16.9** |",
356
+ "",
357
+ "Advantage objective: $$\\mathcal{L}(\\theta) = \\mathbb{E}_{(s,a)}\\!\\left[\\big(\\widehat{J}_\\theta(s,a) - J^\\beta(s,a)\\big)^2\\right]$$",
358
+ "",
359
+ "![Benchmark Convergence Curve](file:///workspace/research/plots/convergence.png)",
360
+ "",
361
+ "![Policy Rollout Video Preview](file:///workspace/research/videos/rollout_demo.mp4)",
362
+ ].join("\n"),
363
+ },
364
+ ]
365
+ : [
366
+ {
367
+ id: "1",
368
+ role: "user",
369
+ text: "汇总 4 卡消融实验结果,用标准表格对比指标,附上收敛曲线图、策略仿真视频预览和脚本跳转链接。",
370
+ },
371
+ {
372
+ id: "2",
373
+ role: "assistant",
374
+ text: [
375
+ "已完成 4× A100 消融评测汇总(详见 [eval_metrics.py](file:///workspace/research/eval_metrics.py#L42-L68)):",
376
+ "",
377
+ "| 实验方案 | 成功率 (%) | 显存峰值 (GB) | 吞吐 (steps/s) |",
378
+ "| --- | ---: | ---: | ---: |",
379
+ "| Baseline | 66.2 | 41.8 | 11.4 |",
380
+ "| Cosine LR | 79.5 | 38.2 | 13.1 |",
381
+ "| **Ours (SCOPE Policy)** | **92.8** | **27.6** | **16.9** |",
382
+ "",
383
+ "核心目标函数:$$\\mathcal{L}(\\theta) = \\mathbb{E}_{(s,a)}\\!\\left[\\big(\\widehat{J}_\\theta(s,a) - J^\\beta(s,a)\\big)^2\\right]$$",
384
+ "",
385
+ "![实验收敛曲线预览](file:///workspace/research/plots/convergence.png)",
386
+ "",
387
+ "![策略仿真视频预览](file:///workspace/research/videos/rollout_demo.mp4)",
388
+ ].join("\n"),
389
+ },
390
+ ]
391
+ : isEn
392
+ ? [
393
+ {
394
+ id: "1",
395
+ role: "user",
396
+ text: "Audit the four visual baseline benchmarks, preserve formulas and citations, and spawn background subagents to verify the latest checkpoints.",
397
+ },
398
+ {
399
+ id: "subgrp-1",
400
+ role: "subagent_group",
401
+ text: "",
402
+ taskTitle: "Audit visual baselines & checkpoints",
403
+ turnIndex: 1,
404
+ subagents: claudeSubagents,
405
+ },
406
+ {
407
+ id: "handback-1",
408
+ role: "agent_interaction",
409
+ direction: "inbound",
410
+ interactionKind: "handback",
411
+ peerId: "agent-sub-eval-2",
412
+ peerName: "Checkpoint Metrics Collector",
413
+ subagentId: "agent-sub-eval-2",
414
+ summary: "Verified 5-seed metrics & 34% VRAM reduction across all 4 benchmarks",
415
+ text: "Verified 5-seed checkpoints: **SCOPE Policy** reaches **92.8%** success rate with **27.6 GB** peak VRAM (-34.0% vs baseline).",
416
+ },
417
+ {
418
+ id: "2",
419
+ role: "assistant",
420
+ text: "Updated the results narrative and delegated **2 background subagents** to audit baselines and eval scripts in parallel (see [eval_metrics.py](file:///workspace/research/eval_metrics.py#L18-L45)).\n\n**Proposed wording**:\n\n`Without training an actor, \\method{} achieves the highest success rate across all four visual manipulation benchmarks, while reducing GPU memory footprint by 34% (\\cref{tab:zeroshot-pixels}).`\n\n**Key equation**: `e(\\va)=\\widehat{J}(\\va)-J^\\beta(\\va)`\n\nPlease confirm below which charts you'd like prioritized first.",
421
+ },
422
+ ]
423
+ : [
424
+ {
425
+ id: "1",
426
+ role: "user",
427
+ text: "核对四组视觉基线评测指标,保留公式和原始引用,并并行启动后台子代理检查最新 checkpoint。",
428
+ },
429
+ {
430
+ id: "subgrp-1",
431
+ role: "subagent_group",
432
+ text: "",
433
+ taskTitle: "核对视觉基线指标与最新 checkpoint",
434
+ turnIndex: 1,
435
+ subagents: claudeSubagents,
436
+ },
437
+ {
438
+ id: "handback-1",
439
+ role: "agent_interaction",
440
+ direction: "inbound",
441
+ interactionKind: "handback",
442
+ peerId: "agent-sub-eval-2",
443
+ peerName: "Checkpoint Metrics Collector",
444
+ subagentId: "agent-sub-eval-2",
445
+ summary: "已核实 5 个随机种子指标,显存峰值较基线下降 34%",
446
+ text: "已完成 5 组随机种子核验:**SCOPE Policy** 成功率 **92.8%**,峰值显存 **27.6 GB**(较基线下降 34.0%)。",
447
+ },
448
+ {
449
+ id: "2",
450
+ role: "assistant",
451
+ text: "已整理实验描述,并委派 **2 个后台子代理** 同步核查基线与评测脚本(详见 [eval_metrics.py](file:///workspace/research/eval_metrics.py#L18-L45))。\n\n**新增表述**:\n\n`Without training an actor, \\method{} achieves the highest success rate across all four visual manipulation benchmarks, while reducing GPU memory footprint by 34% (\\cref{tab:zeroshot-pixels}).`\n\n**关键公式**:`e(\\va)=\\widehat{J}(\\va)-J^\\beta(\\va)`\n\n等待下方确认你希望优先汇总的图表项。",
452
+ },
453
+ ];
454
+ json(response, 200, {
455
+ version: "preview-v1",
456
+ subagents: isClaude ? claudeSubagents : agySubagents,
457
+ messages,
458
+ summaryOnly: false,
459
+ limited: false,
460
+ nextBefore: null,
461
+ });
462
+ return true;
463
+ }
464
+ return false;
465
+ }