synabun 2.3.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 (356) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +1 -1
  3. package/browser-extension/content.js +169 -0
  4. package/browser-extension/engine.js +477 -0
  5. package/browser-extension/icons/icon-128.png +0 -0
  6. package/browser-extension/icons/icon-16.png +0 -0
  7. package/browser-extension/icons/icon-32.png +0 -0
  8. package/browser-extension/icons/icon-48.png +0 -0
  9. package/browser-extension/icons/status-off-16.png +0 -0
  10. package/browser-extension/icons/status-off-32.png +0 -0
  11. package/browser-extension/icons/status-off-48.png +0 -0
  12. package/browser-extension/icons/status-on-16.png +0 -0
  13. package/browser-extension/icons/status-on-32.png +0 -0
  14. package/browser-extension/icons/status-on-48.png +0 -0
  15. package/browser-extension/manifest.json +56 -0
  16. package/browser-extension/popup-strings.js +244 -0
  17. package/browser-extension/popup-view.js +151 -0
  18. package/browser-extension/popup.css +165 -0
  19. package/browser-extension/popup.html +105 -0
  20. package/browser-extension/popup.js +347 -0
  21. package/browser-extension/protocol.js +226 -0
  22. package/browser-extension/service-worker.js +267 -0
  23. package/browser-extension/setup-content.js +36 -0
  24. package/browser-extension/tokens.css +326 -0
  25. package/docs/browser-extension-bridge.md +84 -0
  26. package/docs/whatsapp.md +1 -1
  27. package/mcp-server/dist/http.d.ts +2 -0
  28. package/mcp-server/dist/http.d.ts.map +1 -1
  29. package/mcp-server/dist/http.js +9 -1
  30. package/mcp-server/dist/http.js.map +1 -1
  31. package/mcp-server/dist/index.d.ts +11 -0
  32. package/mcp-server/dist/index.d.ts.map +1 -1
  33. package/mcp-server/dist/index.js +38 -3
  34. package/mcp-server/dist/index.js.map +1 -1
  35. package/mcp-server/dist/services/browser-route-flow.d.ts +6 -2
  36. package/mcp-server/dist/services/browser-route-flow.d.ts.map +1 -1
  37. package/mcp-server/dist/services/browser-route-flow.js +10 -3
  38. package/mcp-server/dist/services/browser-route-flow.js.map +1 -1
  39. package/mcp-server/dist/services/codex-config-heal.d.ts.map +1 -1
  40. package/mcp-server/dist/services/codex-config-heal.js +7 -0
  41. package/mcp-server/dist/services/codex-config-heal.js.map +1 -1
  42. package/mcp-server/dist/services/neural-interface.d.ts +94 -3
  43. package/mcp-server/dist/services/neural-interface.d.ts.map +1 -1
  44. package/mcp-server/dist/services/neural-interface.js +168 -23
  45. package/mcp-server/dist/services/neural-interface.js.map +1 -1
  46. package/mcp-server/dist/services/team-context.d.ts +18 -0
  47. package/mcp-server/dist/services/team-context.d.ts.map +1 -0
  48. package/mcp-server/dist/services/team-context.js +29 -0
  49. package/mcp-server/dist/services/team-context.js.map +1 -0
  50. package/mcp-server/dist/services/tool-catalog.d.ts +5 -2
  51. package/mcp-server/dist/services/tool-catalog.d.ts.map +1 -1
  52. package/mcp-server/dist/services/tool-catalog.js +22 -6
  53. package/mcp-server/dist/services/tool-catalog.js.map +1 -1
  54. package/mcp-server/dist/services/tool-list.d.ts.map +1 -1
  55. package/mcp-server/dist/services/tool-list.js +4 -0
  56. package/mcp-server/dist/services/tool-list.js.map +1 -1
  57. package/mcp-server/dist/services/tool-runtime.d.ts +8 -1
  58. package/mcp-server/dist/services/tool-runtime.d.ts.map +1 -1
  59. package/mcp-server/dist/services/tool-runtime.js +18 -1
  60. package/mcp-server/dist/services/tool-runtime.js.map +1 -1
  61. package/mcp-server/dist/tools/agent-definition.d.ts +133 -0
  62. package/mcp-server/dist/tools/agent-definition.d.ts.map +1 -0
  63. package/mcp-server/dist/tools/agent-definition.js +483 -0
  64. package/mcp-server/dist/tools/agent-definition.js.map +1 -0
  65. package/mcp-server/dist/tools/agents.d.ts +91 -9
  66. package/mcp-server/dist/tools/agents.d.ts.map +1 -1
  67. package/mcp-server/dist/tools/agents.js +161 -20
  68. package/mcp-server/dist/tools/agents.js.map +1 -1
  69. package/mcp-server/dist/tools/browser-advanced.d.ts +8 -1
  70. package/mcp-server/dist/tools/browser-advanced.d.ts.map +1 -1
  71. package/mcp-server/dist/tools/browser-advanced.js +70 -6
  72. package/mcp-server/dist/tools/browser-advanced.js.map +1 -1
  73. package/mcp-server/dist/tools/git-tools.d.ts +4 -2
  74. package/mcp-server/dist/tools/git-tools.d.ts.map +1 -1
  75. package/mcp-server/dist/tools/git-tools.js +283 -2
  76. package/mcp-server/dist/tools/git-tools.js.map +1 -1
  77. package/mcp-server/dist/tools/morelogin.d.ts +8 -2
  78. package/mcp-server/dist/tools/morelogin.d.ts.map +1 -1
  79. package/mcp-server/dist/tools/morelogin.js +22 -5
  80. package/mcp-server/dist/tools/morelogin.js.map +1 -1
  81. package/mcp-server/dist/tools/team.d.ts +32 -0
  82. package/mcp-server/dist/tools/team.d.ts.map +1 -0
  83. package/mcp-server/dist/tools/team.js +87 -0
  84. package/mcp-server/dist/tools/team.js.map +1 -0
  85. package/mcp-server/package-lock.json +2 -2
  86. package/mcp-server/package.json +1 -1
  87. package/mcp-server/src/http.ts +9 -1
  88. package/mcp-server/src/index.ts +34 -4
  89. package/mcp-server/src/services/browser-route-flow.ts +12 -5
  90. package/mcp-server/src/services/codex-config-heal.ts +7 -0
  91. package/mcp-server/src/services/neural-interface.ts +190 -29
  92. package/mcp-server/src/services/team-context.ts +27 -0
  93. package/mcp-server/src/services/tool-catalog.ts +26 -8
  94. package/mcp-server/src/services/tool-list.ts +4 -0
  95. package/mcp-server/src/services/tool-runtime.ts +21 -2
  96. package/mcp-server/src/tools/agent-definition.ts +458 -0
  97. package/mcp-server/src/tools/agents.ts +175 -19
  98. package/mcp-server/src/tools/browser-advanced.ts +60 -6
  99. package/mcp-server/src/tools/git-tools.ts +249 -3
  100. package/mcp-server/src/tools/morelogin.ts +20 -5
  101. package/mcp-server/src/tools/team.ts +97 -0
  102. package/neural-interface/i18n/en.json +1117 -47
  103. package/neural-interface/i18n/pt-BR.json +1117 -47
  104. package/neural-interface/lib/account-usage.js +1 -1
  105. package/neural-interface/lib/agents/density.js +101 -0
  106. package/neural-interface/lib/agents/forge-host.js +223 -0
  107. package/neural-interface/lib/agents/native-export-targets.js +190 -0
  108. package/neural-interface/lib/agents/native-export.js +365 -0
  109. package/neural-interface/lib/agents/registry.js +840 -0
  110. package/neural-interface/lib/agents/resolve.js +544 -0
  111. package/neural-interface/lib/agents/schema.js +642 -0
  112. package/neural-interface/lib/agents/split.js +37 -0
  113. package/neural-interface/lib/agents-studio-api.js +591 -0
  114. package/neural-interface/lib/assistant-api.js +76 -7
  115. package/neural-interface/lib/assistant-catalog.js +2 -0
  116. package/neural-interface/lib/assistant-continuity.js +49 -0
  117. package/neural-interface/lib/assistant-dispatch.js +229 -102
  118. package/neural-interface/lib/assistant-persona.js +105 -8
  119. package/neural-interface/lib/assistant-route-gate.js +24 -9
  120. package/neural-interface/lib/assistant-router.js +384 -42
  121. package/neural-interface/lib/assistant-run-tail.js +151 -0
  122. package/neural-interface/lib/assistant-run-wait.js +183 -0
  123. package/neural-interface/lib/assistant-runtime.js +440 -93
  124. package/neural-interface/lib/assistant-task-prompt.js +11 -2
  125. package/neural-interface/lib/assistant-usage.js +3 -2
  126. package/neural-interface/lib/automation-approval.js +2 -2
  127. package/neural-interface/lib/browser-close-evidence.js +80 -0
  128. package/neural-interface/lib/browser-default.js +210 -0
  129. package/neural-interface/lib/browser-extension-adapter.js +255 -0
  130. package/neural-interface/lib/browser-extension-bridge.js +418 -0
  131. package/neural-interface/lib/browser-extension-folder.js +116 -0
  132. package/neural-interface/lib/browser-extension-setup.js +140 -0
  133. package/neural-interface/lib/browser-profile-choices.js +3 -3
  134. package/neural-interface/lib/browser-tool-policy.js +1 -1
  135. package/neural-interface/lib/claude-account-links.js +301 -0
  136. package/neural-interface/lib/claude-accounts.js +45 -20
  137. package/neural-interface/lib/claude-agent-bridge.js +142 -10
  138. package/neural-interface/lib/claude-model-catalog.js +6 -0
  139. package/neural-interface/lib/claude-panel-session.js +33 -0
  140. package/neural-interface/lib/codex-accounts.js +67 -24
  141. package/neural-interface/lib/coordination/README.md +384 -0
  142. package/neural-interface/lib/coordination/service.js +563 -0
  143. package/neural-interface/lib/coordination/store.js +1138 -0
  144. package/neural-interface/lib/db.js +22 -1
  145. package/neural-interface/lib/effort-levels.js +10 -1
  146. package/neural-interface/lib/memory-list-page.js +49 -0
  147. package/neural-interface/lib/memory-list-stamp.js +60 -0
  148. package/neural-interface/lib/morelogin-outside-close.js +186 -0
  149. package/neural-interface/lib/morelogin-profile-failures.js +206 -0
  150. package/neural-interface/lib/morelogin-start-cooldown.js +160 -0
  151. package/neural-interface/lib/morelogin.js +194 -8
  152. package/neural-interface/lib/native-loop-runtime.js +20 -0
  153. package/neural-interface/lib/opencode-build-preflight.js +16 -1
  154. package/neural-interface/lib/opencode-native-boundary.js +83 -13
  155. package/neural-interface/lib/opencode-serve-records.js +14 -9
  156. package/neural-interface/lib/page-session.js +1 -1
  157. package/neural-interface/lib/peer-identity.js +60 -21
  158. package/neural-interface/lib/process-identity.js +68 -7
  159. package/neural-interface/lib/request-gate.js +3 -0
  160. package/neural-interface/lib/screenshot-location.js +33 -0
  161. package/neural-interface/lib/skills/creation.js +1 -1
  162. package/neural-interface/lib/skills/known-bridge-digests.json +40 -0
  163. package/neural-interface/lib/studio-attention.js +56 -0
  164. package/neural-interface/lib/teams/README.md +382 -0
  165. package/neural-interface/lib/teams/api.js +287 -0
  166. package/neural-interface/lib/teams/brief.js +185 -0
  167. package/neural-interface/lib/teams/claims.js +315 -0
  168. package/neural-interface/lib/teams/git.js +293 -0
  169. package/neural-interface/lib/teams/index.js +122 -0
  170. package/neural-interface/lib/teams/integration.js +580 -0
  171. package/neural-interface/lib/teams/landing.js +184 -0
  172. package/neural-interface/lib/teams/recovery.js +256 -0
  173. package/neural-interface/lib/teams/scheduler.js +1474 -0
  174. package/neural-interface/lib/teams/schema.js +559 -0
  175. package/neural-interface/lib/teams/state.js +181 -0
  176. package/neural-interface/lib/teams/test-runner.js +86 -0
  177. package/neural-interface/lib/teams/test-sandbox.js +99 -0
  178. package/neural-interface/lib/teams/worktrees.js +757 -0
  179. package/neural-interface/lib/tool-permission-choices.js +226 -0
  180. package/neural-interface/lib/whatsapp/cards.js +24 -10
  181. package/neural-interface/lib/worker-confinement.js +206 -6
  182. package/neural-interface/package-lock.json +2 -2
  183. package/neural-interface/package.json +1 -1
  184. package/neural-interface/public/extension-setup.html +107 -0
  185. package/neural-interface/public/index.html +52 -12
  186. package/neural-interface/public/shared/agent-runtime-options.js +3 -1
  187. package/neural-interface/public/shared/agents/studio/ax-agent-view.js +614 -0
  188. package/neural-interface/public/shared/agents/studio/ax-api.js +198 -0
  189. package/neural-interface/public/shared/agents/studio/ax-create-view.js +221 -0
  190. package/neural-interface/public/shared/agents/studio/ax-diff.js +143 -0
  191. package/neural-interface/public/shared/agents/studio/ax-editor-view.js +392 -0
  192. package/neural-interface/public/shared/agents/studio/ax-export-view.js +94 -0
  193. package/neural-interface/public/shared/agents/studio/ax-form.js +191 -0
  194. package/neural-interface/public/shared/agents/studio/ax-icons.js +87 -0
  195. package/neural-interface/public/shared/agents/studio/ax-library-view.js +158 -0
  196. package/neural-interface/public/shared/agents/studio/ax-library.js +162 -0
  197. package/neural-interface/public/shared/agents/studio/ax-main.js +712 -0
  198. package/neural-interface/public/shared/agents/studio/ax-native-export.js +35 -0
  199. package/neural-interface/public/shared/agents/studio/ax-options.js +198 -0
  200. package/neural-interface/public/shared/agents/studio/ax-review-view.js +175 -0
  201. package/neural-interface/public/shared/agents/studio/ax-revisions-view.js +189 -0
  202. package/neural-interface/public/shared/agents/studio/ax-runs-view.js +202 -0
  203. package/neural-interface/public/shared/agents/studio/ax-runs.js +82 -0
  204. package/neural-interface/public/shared/agents/studio/ax-teams-view.js +256 -0
  205. package/neural-interface/public/shared/agents/studio/ax-teams.js +200 -0
  206. package/neural-interface/public/shared/agents/studio/ax-templates.js +50 -0
  207. package/neural-interface/public/shared/agents/studio/ax-ui.js +194 -0
  208. package/neural-interface/public/shared/agents/studio/ax-views.js +170 -0
  209. package/neural-interface/public/shared/agy/agy-panel.js +142 -28
  210. package/neural-interface/public/shared/agy/agy-styles.js +25 -5
  211. package/neural-interface/public/shared/assistant/asst-account-menu.js +13 -13
  212. package/neural-interface/public/shared/assistant/asst-ask-styles.js +2 -3
  213. package/neural-interface/public/shared/assistant/asst-brain-picker.js +91 -9
  214. package/neural-interface/public/shared/assistant/asst-control.js +3 -0
  215. package/neural-interface/public/shared/assistant/asst-interaction-hold.js +99 -0
  216. package/neural-interface/public/shared/assistant/asst-limit-dismissals.js +111 -0
  217. package/neural-interface/public/shared/assistant/asst-limit-dock.js +37 -3
  218. package/neural-interface/public/shared/assistant/asst-limit-wait.js +30 -7
  219. package/neural-interface/public/shared/assistant/asst-panel.js +177 -30
  220. package/neural-interface/public/shared/assistant/asst-rack-styles.js +15 -8
  221. package/neural-interface/public/shared/assistant/asst-render.js +36 -6
  222. package/neural-interface/public/shared/assistant/asst-route.js +78 -12
  223. package/neural-interface/public/shared/assistant/asst-routes-editor.js +148 -70
  224. package/neural-interface/public/shared/assistant/asst-roving.js +17 -1
  225. package/neural-interface/public/shared/assistant/asst-scene-styles.js +7 -2
  226. package/neural-interface/public/shared/assistant/asst-scenes.js +12 -1
  227. package/neural-interface/public/shared/assistant/asst-sidepanel.js +12 -2
  228. package/neural-interface/public/shared/assistant/asst-state.js +66 -1
  229. package/neural-interface/public/shared/assistant/asst-styles.js +98 -44
  230. package/neural-interface/public/shared/assistant/route-identity.js +16 -0
  231. package/neural-interface/public/shared/cdx/cdx-output.js +10 -0
  232. package/neural-interface/public/shared/cdx/cdx-panel.js +18 -16
  233. package/neural-interface/public/shared/cdx/cdx-plan.js +3 -2
  234. package/neural-interface/public/shared/cdx/cdx-render.js +122 -45
  235. package/neural-interface/public/shared/cdx/cdx-requests.js +4 -4
  236. package/neural-interface/public/shared/cdx/cdx-styles.js +8 -36
  237. package/neural-interface/public/shared/cdx/cdx-tabs.js +110 -42
  238. package/neural-interface/public/shared/claude-panel-lazy.js +12 -0
  239. package/neural-interface/public/shared/code-copy.js +120 -0
  240. package/neural-interface/public/shared/constants.js +7 -0
  241. package/neural-interface/public/shared/context-menu-model.js +1 -0
  242. package/neural-interface/public/shared/cp/cp-markdown.js +7 -2
  243. package/neural-interface/public/shared/cp/cp-session-model.js +86 -5
  244. package/neural-interface/public/shared/cp/cp-session-settings.js +58 -30
  245. package/neural-interface/public/shared/cp/cp-styles.js +9 -0
  246. package/neural-interface/public/shared/dom-change-flag.js +66 -0
  247. package/neural-interface/public/shared/dom-morph.js +124 -0
  248. package/neural-interface/public/shared/extension-setup/es-page.css +134 -0
  249. package/neural-interface/public/shared/extension-setup/es-page.js +120 -0
  250. package/neural-interface/public/shared/extension-setup/es-view.js +100 -0
  251. package/neural-interface/public/shared/html-shell.js +33 -4
  252. package/neural-interface/public/shared/i18n.js +14 -1
  253. package/neural-interface/public/shared/idle-queue.js +78 -0
  254. package/neural-interface/public/shared/iface-config.js +227 -0
  255. package/neural-interface/public/shared/lazy-module.js +108 -0
  256. package/neural-interface/public/shared/memory-list.js +117 -0
  257. package/neural-interface/public/shared/morelogin-profile-choices.js +1 -1
  258. package/neural-interface/public/shared/morelogin-profile-field.js +3 -3
  259. package/neural-interface/public/shared/mtc/mtc-panel.js +3 -1
  260. package/neural-interface/public/shared/mtc/mtc-styles.js +4 -1
  261. package/neural-interface/public/shared/ocp-v2/ocp-v2-manager.js +35 -15
  262. package/neural-interface/public/shared/ocp-v2/ocp-v2-panel.js +77 -23
  263. package/neural-interface/public/shared/ocp-v2/ocp-v2-projectbar.js +3 -6
  264. package/neural-interface/public/shared/ocp-v2/ocp-v2-render.js +24 -21
  265. package/neural-interface/public/shared/ocp-v2/ocp-v2-send-logic.js +16 -5
  266. package/neural-interface/public/shared/ocp-v2/ocp-v2-sessions-logic.js +16 -2
  267. package/neural-interface/public/shared/ocp-v2/ocp-v2-styles.js +27 -43
  268. package/neural-interface/public/shared/ocp-v2/ocp-v2-ws.js +73 -9
  269. package/neural-interface/public/shared/schedules-view.js +2 -2
  270. package/neural-interface/public/shared/session-project-items.js +11 -0
  271. package/neural-interface/public/shared/settings/settings-ai-browser.js +119 -0
  272. package/neural-interface/public/shared/settings/settings-browser-extension.js +446 -0
  273. package/neural-interface/public/shared/settings/settings-ia.js +4 -2
  274. package/neural-interface/public/shared/settings/settings-morelogin-cooldown.js +63 -0
  275. package/neural-interface/public/shared/settings/settings-tool-permissions.js +70 -0
  276. package/neural-interface/public/shared/sidepanel-lazy.js +40 -0
  277. package/neural-interface/public/shared/sidepanel-session-status.js +8 -14
  278. package/neural-interface/public/shared/sidepanel-shown.js +73 -0
  279. package/neural-interface/public/shared/storage.js +6 -1
  280. package/neural-interface/public/shared/studio-attention.js +83 -0
  281. package/neural-interface/public/shared/styles.css +682 -50
  282. package/neural-interface/public/shared/term-browser-tabs.js +34 -0
  283. package/neural-interface/public/shared/transcript-rows.js +334 -0
  284. package/neural-interface/public/shared/tray-auto-close.js +106 -0
  285. package/neural-interface/public/shared/ui-agents.js +97 -0
  286. package/neural-interface/public/shared/ui-antigravity-panel.js +16 -14
  287. package/neural-interface/public/shared/ui-automation-studio.js +3 -3
  288. package/neural-interface/public/shared/ui-claude-panel.js +162 -95
  289. package/neural-interface/public/shared/ui-code-copy.js +256 -0
  290. package/neural-interface/public/shared/ui-codex-panel.js +14 -10
  291. package/neural-interface/public/shared/ui-context-menu.js +1 -1
  292. package/neural-interface/public/shared/ui-file-explorer.js +2 -3
  293. package/neural-interface/public/shared/ui-games.js +1 -1
  294. package/neural-interface/public/shared/ui-loading.js +12 -1
  295. package/neural-interface/public/shared/ui-maritaca-panel.js +12 -11
  296. package/neural-interface/public/shared/ui-menubar.js +23 -0
  297. package/neural-interface/public/shared/ui-native-loop-router.js +1 -1
  298. package/neural-interface/public/shared/ui-navbar.js +15 -9
  299. package/neural-interface/public/shared/ui-opencode-panel-v2.js +13 -11
  300. package/neural-interface/public/shared/ui-schedules-studio.js +3 -3
  301. package/neural-interface/public/shared/ui-scroll-follow.js +39 -0
  302. package/neural-interface/public/shared/ui-sessions.js +3 -3
  303. package/neural-interface/public/shared/ui-settings-entry.js +55 -0
  304. package/neural-interface/public/shared/ui-settings.js +355 -400
  305. package/neural-interface/public/shared/ui-sidepanel-layout.js +44 -25
  306. package/neural-interface/public/shared/ui-sidepanel-session-entry.js +22 -9
  307. package/neural-interface/public/shared/ui-sidepanel-sessions.js +10 -2
  308. package/neural-interface/public/shared/ui-sidepanel-tray.js +36 -41
  309. package/neural-interface/public/shared/ui-sidepanel-windows.js +14 -1
  310. package/neural-interface/public/shared/ui-styleguide.js +10 -2
  311. package/neural-interface/public/shared/ui-sync.js +5 -0
  312. package/neural-interface/public/shared/ui-terminal.js +13 -9
  313. package/neural-interface/public/shared/ui-tooltip.js +28 -7
  314. package/neural-interface/public/shared/ui-topright-overflow.js +26 -4
  315. package/neural-interface/public/shared/ui-tray-columns.js +375 -0
  316. package/neural-interface/public/shared/ui-whiteboard.js +51 -6
  317. package/neural-interface/public/shared/ui-worker-end.js +28 -1
  318. package/neural-interface/public/shared/ui-workspaces.js +13 -0
  319. package/neural-interface/public/shared/window-keys.js +71 -0
  320. package/neural-interface/public/variant/2d/main.js +2 -0
  321. package/neural-interface/public/variant/3d/app.js +620 -0
  322. package/neural-interface/public/variant/3d/boot-reveal.js +47 -0
  323. package/neural-interface/public/variant/3d/main.js +21 -544
  324. package/neural-interface/public/variant/3d/map-controls.js +4 -2
  325. package/neural-interface/public/vendor/fonts/fonts.css +508 -0
  326. package/neural-interface/public/vendor/fonts/inter-OFL.txt +93 -0
  327. package/neural-interface/public/vendor/fonts/inter-cyrillic-ext.woff2 +0 -0
  328. package/neural-interface/public/vendor/fonts/inter-cyrillic.woff2 +0 -0
  329. package/neural-interface/public/vendor/fonts/inter-greek-ext.woff2 +0 -0
  330. package/neural-interface/public/vendor/fonts/inter-greek.woff2 +0 -0
  331. package/neural-interface/public/vendor/fonts/inter-latin-ext.woff2 +0 -0
  332. package/neural-interface/public/vendor/fonts/inter-latin.woff2 +0 -0
  333. package/neural-interface/public/vendor/fonts/inter-vietnamese.woff2 +0 -0
  334. package/neural-interface/public/vendor/fonts/jetbrains-mono-OFL.txt +93 -0
  335. package/neural-interface/public/vendor/fonts/jetbrains-mono-cyrillic-ext.woff2 +0 -0
  336. package/neural-interface/public/vendor/fonts/jetbrains-mono-cyrillic.woff2 +0 -0
  337. package/neural-interface/public/vendor/fonts/jetbrains-mono-greek.woff2 +0 -0
  338. package/neural-interface/public/vendor/fonts/jetbrains-mono-latin-ext.woff2 +0 -0
  339. package/neural-interface/public/vendor/fonts/jetbrains-mono-latin.woff2 +0 -0
  340. package/neural-interface/public/vendor/fonts/jetbrains-mono-vietnamese.woff2 +0 -0
  341. package/neural-interface/public/vendor/fonts/manifest.json +142 -0
  342. package/neural-interface/public/vendor/fonts/space-grotesk-OFL.txt +93 -0
  343. package/neural-interface/public/vendor/fonts/space-grotesk-latin-ext.woff2 +0 -0
  344. package/neural-interface/public/vendor/fonts/space-grotesk-latin.woff2 +0 -0
  345. package/neural-interface/public/vendor/fonts/space-grotesk-vietnamese.woff2 +0 -0
  346. package/neural-interface/scripts/boot-graph.mjs +270 -0
  347. package/neural-interface/scripts/vendor-fonts.mjs +124 -0
  348. package/neural-interface/server.js +1050 -140
  349. package/npm-shrinkwrap.json +2 -2
  350. package/package.json +3 -1
  351. package/skills/agent-forge/SKILL.md +182 -0
  352. package/skills/agent-forge/evals/evals.json +56 -0
  353. package/skills/agent-forge/references/definition-fields.md +61 -0
  354. package/skills/agent-forge/references/examples.md +105 -0
  355. package/skills/agent-forge/references/instructions.md +51 -0
  356. package/skills/agent-forge/references/review-and-export.md +84 -0
@@ -45,11 +45,13 @@ import { registerSidepanel, setSidepanelVisible, sidepanelAcceptsKeyboard, focus
45
45
  import { hostedSidepanelId } from '../ui-sidepanel-runtime.js';
46
46
  import { dropdownHTML, setDropdownDisabled, setDropdownItems, wireDropdowns, closeDropdowns } from '../cc-dropdown.js';
47
47
  import { renderMarkdown } from '../cp/cp-markdown.js';
48
+ import { createKeyedHtmlList } from '../dom-morph.js';
49
+ import { watchTranscriptRows } from '../transcript-rows.js';
48
50
  import { fetchProjects } from '../api.js';
49
51
  import { createCliInstallController } from '../cli-install-controller.js';
50
52
  import { setCliInstallTranslator } from '../cli-install-view.js';
51
53
  import { workerRestart } from '../worker-restart.js';
52
- import { endWorkerRunOnClose, forgetWorkerEnd, trackWorkerEnd } from '../ui-worker-end.js';
54
+ import { buildWorkerEndCard, endWorkerRunOnClose, forgetWorkerEnd, leaveWorkerTab, trackWorkerEnd } from '../ui-worker-end.js';
53
55
  import { nativeLoopWindowId } from '../ui-native-window-id.js';
54
56
  import { runAwaitsAnswer, runTurnLive } from '../sidepanel-session-status.js';
55
57
  import { wireFileLinks } from '../ui-file-links.js';
@@ -182,7 +184,9 @@ function ensureMarked() {
182
184
  function md(text) {
183
185
  const key = String(text ?? '');
184
186
  const hit = _mdCache.get(key);
185
- if (hit !== undefined) return hit;
187
+ // Used again: it goes to the back of the line. A stream adds one text per frame, and those, not the
188
+ // finished rows read on every pass, are the ones to forget first.
189
+ if (hit !== undefined) { _mdCache.delete(key); _mdCache.set(key, hit); return hit; }
186
190
  const html = renderMarkdown(key, { parse: _marked ? (src) => _marked.parse(src) : null });
187
191
  _mdCache.set(key, html);
188
192
  if (_mdCache.size > 400) _mdCache.delete(_mdCache.keys().next().value);
@@ -598,6 +602,9 @@ async function send({ text: given = null, staged: givenStaged = null, fromQueue
598
602
  tab.releasedRunId = releasedRunId;
599
603
  tab.automationRunId = null;
600
604
  tab.automationAwaits = false;
605
+ // The tab is the user's now: the run's end card goes, and nothing of the run draws it again.
606
+ forgetWorkerEnd(releasedRunId);
607
+ tab.workerEnd = null;
601
608
  rt.loaded = false;
602
609
  rt.openedInPanel = false;
603
610
  saveTabs();
@@ -1036,6 +1043,10 @@ function closeTab(idx, { closeSession = true } = {}) {
1036
1043
  function scheduleRender(tab = null, { follow = false } = {}) {
1037
1044
  if (tab && tab !== activeTab()) { renderPills(); return; }
1038
1045
  if (follow) { const rt = runtimeOf(activeTab()); if (rt) rt.scrolledUp = false; }
1046
+ // A closed panel draws nothing: a pass rebuilds the whole transcript and reads its layout, once per frame
1047
+ // for as long as a session streams there. Its pill says what the session does; showing the panel draws
1048
+ // everything (setVisible → renderAll), from the same state.
1049
+ if (!_visible) { renderPills(); return; }
1039
1050
  if (_renderQueued) return;
1040
1051
  _renderQueued = true;
1041
1052
  requestAnimationFrame(() => {
@@ -1262,12 +1273,28 @@ function renderQueue() {
1262
1273
  + queue.map((item, idx) => `<div class="agy-queue-item"><span class="agy-queue-text" title="${esc(item.text)}">${esc(item.text || item.staged.map((f) => f.name).join(', '))}</span><button type="button" class="agy-icon-btn" data-queue-edit="${idx}" title="${esc(T('queueEdit'))}" aria-label="${esc(T('queueEdit'))}">${SVG.edit}</button><button type="button" class="agy-icon-btn" data-queue-remove="${idx}" title="${esc(T('queueRemove'))}" aria-label="${esc(T('queueRemove'))}">&times;</button></div>`).join('');
1263
1274
  }
1264
1275
 
1265
- /** innerHTML, keeping the focused field, its selection and what was typed into question forms. */
1266
- function replaceKeepingFocus(box, html, rt) {
1276
+ // The transcript's rows as a keyed list (../dom-morph.js): a pass builds the markup of every row as it
1277
+ // always did, and only the rows whose markup changed are made again. A session that streams used to have
1278
+ // its whole transcript replaced on every frame; now it is the row being written.
1279
+ let _transcriptList = null;
1280
+ let _transcriptListBox = null;
1281
+ function transcriptList(box) {
1282
+ if (_transcriptListBox !== box) { _transcriptList = createKeyedHtmlList(box); _transcriptListBox = box; }
1283
+ return _transcriptList;
1284
+ }
1285
+
1286
+ /**
1287
+ * The transcript's pieces ([{ key, html }]) on screen, keeping the focused field, its selection and what was
1288
+ * typed into question forms. A piece that did not change keeps its nodes, so its field keeps all of that by
1289
+ * itself; what follows is for the pieces that were made again.
1290
+ */
1291
+ function replaceKeepingFocus(box, pieces, rt) {
1267
1292
  const active = document.activeElement;
1268
1293
  const keep = active && box.contains(active) && active.id ? { id: active.id, start: active.selectionStart, end: active.selectionEnd } : null;
1269
- box.innerHTML = html;
1294
+ const { built } = transcriptList(box).patch(pieces);
1270
1295
  for (const [requestId, values] of Object.entries(rt?.elicitDrafts || {})) {
1296
+ // A form that stayed holds what was typed, caret included: writing its values again would move the caret.
1297
+ if (![...built].some((key) => key.endsWith(`elicit:${requestId}`))) continue;
1271
1298
  const form = box.querySelector(`[data-elicit-form="${CSS.escape(requestId)}"]`);
1272
1299
  if (!form) continue;
1273
1300
  for (const [name, value] of Object.entries(values)) {
@@ -1277,7 +1304,8 @@ function replaceKeepingFocus(box, html, rt) {
1277
1304
  }
1278
1305
  }
1279
1306
  }
1280
- if (keep) {
1307
+ // The focused field was in a piece that was made again: focus and selection go to its new self.
1308
+ if (keep && !box.contains(active)) {
1281
1309
  const again = box.querySelector(`#${CSS.escape(keep.id)}`);
1282
1310
  if (again) { again.focus(); try { if (keep.start !== null && keep.start !== undefined) again.setSelectionRange(keep.start, keep.end); } catch { /* not a text field */ } }
1283
1311
  }
@@ -1288,7 +1316,7 @@ function renderTranscript() {
1288
1316
  if (!box) return;
1289
1317
  const tab = activeTab();
1290
1318
  const rt = runtimeOf(tab);
1291
- if (!tab || !rt) { box.innerHTML = ''; return; }
1319
+ if (!tab || !rt) { box.innerHTML = ''; transcriptList(box).forget(); return; }
1292
1320
  const nearBottom = box.scrollHeight - box.scrollTop - box.clientHeight < 60;
1293
1321
  const setup = currentSetup();
1294
1322
  const rows = rt.transcript.rows;
@@ -1298,29 +1326,37 @@ function renderTranscript() {
1298
1326
  };
1299
1327
  const footers = turnFooters(rt.transcript);
1300
1328
  const lastTurnId = rt.transcript.turns.length ? rt.transcript.turns[rt.transcript.turns.length - 1].id : null;
1329
+ // The same markup, in the same order, as one string used to hold; each piece under a key of its own (the
1330
+ // tab's id first: another tab's rows are never taken for these).
1301
1331
  const parts = [];
1332
+ const piece = (key, html) => { if (html) parts.push({ key: `${tab.id}:${key}`, html }); };
1302
1333
  for (const row of rows) {
1303
- parts.push(rowHtml(row, ctx));
1334
+ piece(`row:${row.id}`, rowHtml(row, ctx));
1304
1335
  const turn = footers.get(row.id);
1305
- if (turn && !(tab.running && turn.id === lastTurnId)) parts.push(turnFooterHtml(turn, { T, last: turn.id === lastTurnId && !tab.running && !tab.automationRunId, answer: answerOfTurn(rt.transcript, turn.id) }));
1306
- }
1307
- for (const [requestId, entry] of rt.permissions) if (entry.state !== 'gone') parts.push(permissionHtml(requestId, entry, { T, cwd: tab.project }));
1308
- for (const [requestId, entry] of rt.elicitations) parts.push(elicitationHtml(requestId, entry, { T }));
1309
- if (tab.running && _prefs.detail === 'compact' && !rows.some((row) => row.kind === 'thought' && !row.closed)) parts.push(`<div class="agy-system working">${esc(T('working'))}</div>`);
1310
- if (rt.notice) parts.push(`<div class="agy-system${rt.notice.severity === 'error' ? ' error' : rt.notice.severity === 'warning' ? ' warning' : ''}">${esc(rt.notice.text)}</div>`);
1311
- const body = parts.filter(Boolean).join('');
1312
- const setupBlock = setup.show ? setupHtml({ ...setup, logOpen: _setup.logOpen }, { T, centered: !body }) : '';
1313
- if (!body && !setupBlock) {
1336
+ if (turn && !(tab.running && turn.id === lastTurnId)) piece(`foot:${row.id}`, turnFooterHtml(turn, { T, last: turn.id === lastTurnId && !tab.running && !tab.automationRunId, answer: answerOfTurn(rt.transcript, turn.id) }));
1337
+ }
1338
+ for (const [requestId, entry] of rt.permissions) if (entry.state !== 'gone') piece(`perm:${requestId}`, permissionHtml(requestId, entry, { T, cwd: tab.project }));
1339
+ for (const [requestId, entry] of rt.elicitations) piece(`elicit:${requestId}`, elicitationHtml(requestId, entry, { T }));
1340
+ if (tab.running && _prefs.detail === 'compact' && !rows.some((row) => row.kind === 'thought' && !row.closed)) piece('working', `<div class="agy-system working">${esc(T('working'))}</div>`);
1341
+ if (rt.notice) piece('notice', `<div class="agy-system${rt.notice.severity === 'error' ? ' error' : rt.notice.severity === 'warning' ? ' warning' : ''}">${esc(rt.notice.text)}</div>`);
1342
+ // The end of a dispatched worker: an empty slot keyed by what the card says, the card mounted in it (placeWorkerEnd).
1343
+ if (tab.workerEnd && tab.automationRunId) piece(`worker-end:${tab.workerEnd.sig || ''}`, '<div class="agy-worker-end-slot"></div>');
1344
+ const hasBody = parts.length > 0;
1345
+ const setupBlock = setup.show ? setupHtml({ ...setup, logOpen: _setup.logOpen }, { T, centered: !hasBody }) : '';
1346
+ if (!hasBody && !setupBlock) {
1314
1347
  // Drawn again only when it changes: the greeting card mounted in it stays (and keeps its disclosure).
1315
1348
  const empty = emptyHtml({ T, project: tab.project });
1316
1349
  const key = `${tab.id}\n${empty}`;
1317
- if (box._agyEmpty !== key || !box.querySelector(':scope > .agy-empty')) { box.innerHTML = empty; box._agyEmpty = key; }
1350
+ if (box._agyEmpty !== key || !box.querySelector(':scope > .agy-empty')) { box.innerHTML = empty; box._agyEmpty = key; transcriptList(box).forget(); }
1318
1351
  offerGreeting(tab, box.querySelector(':scope > .agy-empty'));
1319
1352
  return;
1320
1353
  }
1321
1354
  box._agyEmpty = null;
1322
- replaceKeepingFocus(box, setupBlock + body, rt);
1323
- if (_setup.nudge) { box.querySelector('.agy-setup')?.classList.add('agy-nudge'); }
1355
+ if (setupBlock) parts.unshift({ key: `${tab.id}:setup`, html: setupBlock });
1356
+ replaceKeepingFocus(box, parts, rt);
1357
+ placeWorkerEnd(box, tab);
1358
+ // A kept setup block keeps its classes: the nudge is set to what it is now, not only added.
1359
+ box.querySelector('.agy-setup')?.classList.toggle('agy-nudge', !!_setup.nudge);
1324
1360
  if (nearBottom || !rt.scrolledUp) box.scrollTop = box.scrollHeight;
1325
1361
  const jump = $('.agy-jump');
1326
1362
  if (jump) jump.hidden = !rt.scrolledUp;
@@ -1392,7 +1428,8 @@ function renderBanner() {
1392
1428
  } else if (_conn.phase === 'retrying' || _conn.phase === 'offline') {
1393
1429
  tone = 'warn';
1394
1430
  html = `<span class="agy-banner-text">${esc(T(_conn.phase === 'offline' ? 'connOffline' : 'disconnected'))}</span><button type="button" class="agy-action" data-conn="retry">${esc(T('connRetryNow'))}</button>`;
1395
- } else if (tab?.automationRunId) {
1431
+ } else if (tab?.automationRunId && !(tab.workerEnd && !tab.automationActive)) {
1432
+ // A dispatched worker's end card says how the run ended; the banner says it only for a run without one.
1396
1433
  tone = '';
1397
1434
  html = `<span class="agy-banner-text">${esc(tab.automationActive ? T('automationBanner') : T('automationEnded'))}</span>`;
1398
1435
  }
@@ -1540,8 +1577,14 @@ function renderPills() {
1540
1577
  const openIt = () => {
1541
1578
  const idx = _tabs.indexOf(tab);
1542
1579
  if (idx < 0) return;
1543
- if (!_visible) setVisible(true);
1544
- switchTab(idx);
1580
+ // A closed panel goes to this tab first and is shown after: showing it first drew, and loaded the
1581
+ // session of, the tab it was left on before the one that was clicked.
1582
+ if (!_visible) {
1583
+ switchTab(idx);
1584
+ setVisible(true);
1585
+ } else {
1586
+ switchTab(idx);
1587
+ }
1545
1588
  try { focusSidepanel(PANEL_OWNER); } catch { /* not hosted */ }
1546
1589
  };
1547
1590
  pill.addEventListener('click', openIt);
@@ -2226,6 +2269,9 @@ function wire() {
2226
2269
  });
2227
2270
  const transcript = $('.agy-transcript');
2228
2271
  wireFileLinks(transcript, { cwd: () => activeTab()?.project || '' });
2272
+ // Rows far from the screen are skipped by the engine, at their exact size (transcript-rows.js). The rows
2273
+ // stay the same nodes from one pass to the next now (transcriptList), so what is known of them holds.
2274
+ watchTranscriptRows(transcript);
2229
2275
  transcript.addEventListener('scroll', () => {
2230
2276
  const rt = runtimeOf(activeTab());
2231
2277
  if (!rt) return;
@@ -2366,6 +2412,7 @@ function ensurePanel() {
2366
2412
  wire();
2367
2413
  setupController();
2368
2414
  renderAll();
2415
+ for (const tab of _tabs) if (tab.automationRunId) settleRestoredAutomation(tab);
2369
2416
  on('antigravity-panel:show', ({ tabId } = {}) => {
2370
2417
  const idx = _tabs.findIndex((tab) => tab.id === tabId);
2371
2418
  if (!_visible) setVisible(true);
@@ -2478,6 +2525,9 @@ export async function attachAntigravityAutomation(run, { focus = !!run?.focus, i
2478
2525
  if (run.providerSessionId && tab.sessionId !== run.providerSessionId) tab.sessionId = run.providerSessionId;
2479
2526
  if (geminiDir) tab.geminiDir = geminiDir;
2480
2527
  }
2528
+ const projectChanged = !!run.cwd && run.cwd !== tab.project;
2529
+ tab.project = run.cwd || tab.project;
2530
+ if (projectChanged && tab === activeTab()) renderProjectBar();
2481
2531
  const restart = workerRestart(run);
2482
2532
  tab.automationActive = !!restart?.active || running;
2483
2533
  tab.automationOwnerId = nativeLoopWindowId;
@@ -2489,13 +2539,13 @@ export async function attachAntigravityAutomation(run, { focus = !!run?.focus, i
2489
2539
  close: (id) => { rt.elicitations.delete(id); delete rt.elicitDrafts[id]; },
2490
2540
  });
2491
2541
  refreshNeedsYou(tab);
2542
+ tab.automationAttached = true; // the router has it: a restored tab's own check (settleRestoredAutomation) steps aside
2492
2543
  try {
2493
- trackWorkerEnd(run, {
2494
- apply: (view) => {
2495
- if (view) { tab.automationActive = false; tab.running = false; const rt = runtimeOf(tab); rt.notice = { text: T('automationEnded'), severity: 'info' }; scheduleRender(tab); renderTabs(); renderBanner(); renderComposer(); }
2496
- },
2497
- });
2544
+ trackWorkerEnd(run, { apply: (view) => showWorkerEnd(tab, view) });
2498
2545
  } catch { /* the end card is optional */ }
2546
+ // The router attaches again on every change of the run; a card drawn earlier (unchanged, so not applied again)
2547
+ // still says the run is over for this tab, whatever the run's own status reads (a warm worker stays `running`).
2548
+ if (tab.workerEnd) { tab.automationActive = false; tab.automationAwaits = false; tab.running = false; }
2499
2549
  saveTabs();
2500
2550
  if (focus) { setVisible(true); switchTab(_tabs.indexOf(tab)); }
2501
2551
  scheduleRender(tab);
@@ -2503,6 +2553,70 @@ export async function attachAntigravityAutomation(run, { focus = !!run?.focus, i
2503
2553
  return { ok: true, tabId: tab.id };
2504
2554
  }
2505
2555
 
2556
+ /**
2557
+ * The end of a worker the Assistant dispatched (ui-worker-end.js), as `tab.workerEnd` says it (never saved: the
2558
+ * router's attach, or a restored tab's check, brings it back). A card means the run is over for this tab: it is no
2559
+ * longer held, and the composer takes a message (which lets the run go and the card with it).
2560
+ */
2561
+ function showWorkerEnd(tab, view) {
2562
+ if (!view && !tab.workerEnd) return;
2563
+ tab.workerEnd = view || null;
2564
+ if (view) { tab.automationActive = false; tab.automationAwaits = false; tab.running = false; }
2565
+ if (!_tabs.includes(tab)) return;
2566
+ saveTabs();
2567
+ scheduleRender(tab);
2568
+ renderTabs();
2569
+ renderBanner();
2570
+ renderComposer();
2571
+ }
2572
+
2573
+ /**
2574
+ * The card in its slot, the transcript's last piece: made again only when what it says changes (the slot's key).
2575
+ * Its button closes the tab with the X's own close (a warm worker that finished its task is completed, one still at
2576
+ * work is stopped; its record stays for the Assistant; the panel hides with its last tab, at once) and then shows the
2577
+ * Assistant session that dispatched the run.
2578
+ */
2579
+ function placeWorkerEnd(box, tab) {
2580
+ const slot = box.querySelector(':scope > .agy-worker-end-slot');
2581
+ const view = tab?.workerEnd;
2582
+ if (!slot || !view || slot.firstChild) return;
2583
+ slot.appendChild(buildWorkerEndCard(view, {
2584
+ classes: { card: 'agy-worker-end', title: 'agy-card-title', detail: 'agy-card-text', actions: 'agy-card-actions', button: 'agy-action agy-btn-primary' },
2585
+ onBack: () => leaveWorkerTab(view, () => {
2586
+ const idx = _tabs.indexOf(tab);
2587
+ if (idx >= 0) closeTab(idx);
2588
+ }),
2589
+ }));
2590
+ }
2591
+
2592
+ /**
2593
+ * A tab restored from storage that a dispatched run held: the router re-attaches live runs and recent ended ones;
2594
+ * one that ended while no window had it (or that the server no longer knows) is let go here, with its end card when
2595
+ * the dispatcher has one, so the tab never stays "held by a dispatched run" for a run that is over.
2596
+ */
2597
+ async function settleRestoredAutomation(tab) {
2598
+ const runId = tab?.automationRunId;
2599
+ if (!runId || typeof fetch !== 'function') return;
2600
+ let run = null;
2601
+ try {
2602
+ const response = await fetch(`/api/sidepanel-runs/${encodeURIComponent(runId)}`);
2603
+ if (response.status === 404) run = { runId, missing: true };
2604
+ else if (response.ok) run = (await response.json())?.run || null;
2605
+ } catch { /* the router's own reconcile is the other way back */ }
2606
+ if (!run || !_tabs.includes(tab) || tab.automationRunId !== runId || tab.automationAttached) return;
2607
+ if (!run.missing && (run.status === 'starting' || run.status === 'running' || run.status === 'suspended')) return;
2608
+ tab.automationActive = false;
2609
+ tab.automationAwaits = false;
2610
+ tab.running = false;
2611
+ if (!run.missing) {
2612
+ try { trackWorkerEnd(run, { apply: (view) => showWorkerEnd(tab, view) }); } catch { /* the end card is optional */ }
2613
+ }
2614
+ saveTabs();
2615
+ renderTabs();
2616
+ renderBanner();
2617
+ renderComposer();
2618
+ }
2619
+
2506
2620
  function applyAutomationEvent(tab, payload) {
2507
2621
  const rt = runtimeOf(tab);
2508
2622
  const action = automationEvent(payload);
@@ -7,7 +7,11 @@
7
7
  // value to the block first. The tokens are declared on everything the panel puts outside itself too (popovers,
8
8
  // the tray pill).
9
9
 
10
+ import { installCodeCopy } from '../ui-code-copy.js';
11
+
10
12
  export function injectAntigravityStyles() {
13
+ // The Copy button of every code block: its stylesheet and its one click listener, in this document.
14
+ installCodeCopy(document);
11
15
  if (document.getElementById('antigravity-panel-styles')) return;
12
16
  const style = document.createElement('style');
13
17
  style.id = 'antigravity-panel-styles';
@@ -94,10 +98,6 @@ export function injectAntigravityStyles() {
94
98
  color: var(--agy-text);
95
99
  }
96
100
  .agy-panel.open { transform: translateX(0); opacity: 1; overflow: visible; }
97
- /* Windows: the shell is 92% opaque, so the blur behind it barely shows, yet Chromium recomputes it on every
98
- repaint inside the panel (a transcript rendering, a stream). There it goes; the colour stays. */
99
- html.platform-win32 .agy-panel,
100
- html.desktop-titlebar--win32 .agy-panel { backdrop-filter: none; -webkit-backdrop-filter: none; }
101
101
  .agy-panel:has(.cc-dropdown.open) { z-index: 99999; }
102
102
  .agy-panel :is(a, button, input, textarea, summary, [tabindex]):focus-visible,
103
103
  .agy-pop :is(a, button, input, textarea, summary, [tabindex]):focus-visible,
@@ -225,7 +225,7 @@ export function injectAntigravityStyles() {
225
225
  .agy-md table { border-collapse: collapse; display: block; overflow-x: auto; }
226
226
  .agy-md :is(th, td) { border: 1px solid var(--agy-border); padding: 3px 8px; text-align: left; }
227
227
  .agy-attach-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
228
- .agy-msg-image { display: block; width: min(220px, 100%); max-height: 180px; object-fit: cover; border-radius: var(--agy-radius-sm); }
228
+ .agy-msg-image { display: block; width: auto; height: auto; max-width: min(220px, 100%); max-height: 180px; object-fit: contain; border-radius: var(--agy-radius-sm); }
229
229
  .agy-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 220px; padding: 2px 6px; border-radius: var(--agy-radius-sm); background: var(--agy-surface-2); color: var(--agy-text-2); font-size: var(--agy-fs-sm); }
230
230
  .agy-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
231
231
  .agy-chip img { width: 18px; height: 18px; object-fit: cover; border-radius: 3px; }
@@ -271,6 +271,26 @@ export function injectAntigravityStyles() {
271
271
  .agy-status-pill[data-tone="error"] { color: var(--agy-danger); }
272
272
  .agy-status-pill[data-tone="success"] { color: var(--agy-success); }
273
273
  .agy-request { box-shadow: inset 2px 0 0 var(--agy-warning); }
274
+ /* A dispatched worker's end (ui-worker-end.js): the card's frame in the tone's colour (complete is green, the other
275
+ ends the panel's amber, red or neutral); the title says the state in words. */
276
+ .agy-worker-end-slot { flex-shrink: 0; min-width: 0; }
277
+ .agy-worker-end {
278
+ display: flex; flex-direction: column; gap: var(--agy-space-2); min-width: 0; margin: var(--agy-space-2); padding: var(--agy-space-3);
279
+ border: 1px solid var(--agy-border-strong); border-radius: var(--agy-radius-md); background: var(--agy-surface-1); font-family: var(--agy-font);
280
+ }
281
+ .agy-worker-end .agy-card-title { white-space: normal; overflow-wrap: anywhere; }
282
+ .agy-worker-end .agy-card-text { overflow-wrap: anywhere; }
283
+ .agy-worker-end .worker-end-meta { font-family: var(--agy-mono); font-size: var(--agy-fs-xs); color: var(--agy-text-3); }
284
+ .agy-worker-end .worker-end-note { font-size: var(--agy-fs-sm); line-height: var(--agy-lh-tight); color: var(--agy-text-3); }
285
+ .agy-worker-end[data-tone="ok"] { border-color: color-mix(in srgb, var(--agy-success) 40%, transparent); background: color-mix(in srgb, var(--agy-success) 6%, transparent); }
286
+ .agy-worker-end[data-tone="ok"] .agy-card-title { color: var(--agy-success); }
287
+ .agy-worker-end[data-tone="ok"] .agy-btn-primary { background: color-mix(in srgb, var(--agy-success) 24%, transparent); border-color: color-mix(in srgb, var(--agy-success) 55%, transparent); color: var(--agy-text); }
288
+ .agy-worker-end[data-tone="ok"] .agy-btn-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--agy-success) 34%, transparent); border-color: color-mix(in srgb, var(--agy-success) 75%, transparent); }
289
+ .agy-worker-end[data-tone="warn"] { border-color: color-mix(in srgb, var(--agy-warning) 35%, transparent); background: color-mix(in srgb, var(--agy-warning) 5%, transparent); }
290
+ .agy-worker-end[data-tone="warn"] .agy-card-title { color: var(--agy-warning); }
291
+ .agy-worker-end[data-tone="err"] { border-color: color-mix(in srgb, var(--agy-danger) 35%, transparent); background: color-mix(in srgb, var(--agy-danger) 5%, transparent); }
292
+ .agy-worker-end[data-tone="err"] .agy-card-title { color: var(--agy-danger); }
293
+ .agy-worker-end[data-tone="off"] .agy-card-title { color: var(--agy-text-2); }
274
294
  .agy-request .agy-card-title { white-space: normal; overflow-wrap: anywhere; }
275
295
  .agy-request.agy-request-done { box-shadow: none; opacity: 0.7; }
276
296
  /* SynaBun tools: the logo and a thin accent at the edge, as in the Codex panel (not a filled box). */
@@ -131,20 +131,20 @@ function drawChoice(btn, label, checked) {
131
131
 
132
132
  /**
133
133
  * The account choices as menu items (this menu and the composer's Model menu): Auto, every account
134
- * once, and the note that another account starts a new conversation. rows: accountMenuRow()s;
135
- * onAuto(), onPick(id) (never for the current account), onSignIn(id) (a signed-out account is its sign-in).
134
+ * once, and the note that switching preserves this chat. rows: accountMenuRow()s;
135
+ * onAuto(), onPick(id) (also pins the Auto-selected account), onSignIn(id) (a signed-out account is its sign-in).
136
136
  */
137
- export function accountChoiceItems({ t = null, rows = [], currentId = null, onAuto, onPick, onSignIn } = {}) {
137
+ export function accountChoiceItems({ t = null, rows = [], currentId = null, accountPolicy = 'manual', onAuto, onPick, onSignIn } = {}) {
138
138
  const tr = tf(t);
139
- const newConversation = tr('assistant.brain.newConversation', 'starts a new conversation');
139
+ const newConversation = tr('assistant.accountMenu.switchNote', 'Switching accounts preserves this chat.');
140
140
  const items = [{
141
- kind: 'radio', id: 'auto', label: autoAccountLabel(t), selected: currentId === 'auto',
142
- title: tr('assistant.accountUsage.composerHint', 'Pick the subscription with most usage left and start a new conversation.'),
143
- render: (btn, { checked }) => drawAuto(btn, autoAccountLabel(t), checked),
141
+ kind: 'radio', id: 'auto', label: autoAccountLabel(t), selected: currentId === 'auto' || accountPolicy === 'auto',
142
+ title: tr('assistant.accountUsage.composerHint', 'Use the subscription with most usage left. Keep it until limited; preserve this chat.'),
143
+ render: (btn, { checked }) => drawAuto(btn, [autoAccountLabel(t), accountPolicy === 'auto' ? rows.find(r => r.id === currentId)?.name : ''].filter(Boolean).join(' · '), checked),
144
144
  onSelect: () => onAuto?.(),
145
145
  }];
146
146
  for (const r of rows) {
147
- const current = r.id === currentId;
147
+ const current = r.id === currentId && accountPolicy !== 'auto';
148
148
  // A signed-out account is listed with its way back in: choosing it opens its sign-in.
149
149
  const words = rowWords(r, [!current && !r.signedOut ? newConversation : '']);
150
150
  items.push({
@@ -154,7 +154,7 @@ export function accountChoiceItems({ t = null, rows = [], currentId = null, onAu
154
154
  onSelect: () => (r.signedOut ? onSignIn?.(r.id) : current ? null : onPick?.(r.id)),
155
155
  });
156
156
  }
157
- items.push({ kind: 'info', className: 'asst-acct-note', label: tr('assistant.accountMenu.switchNote', 'Another account starts a new conversation.') });
157
+ items.push({ kind: 'info', className: 'asst-acct-note', label: tr('assistant.accountMenu.switchNote', 'Switching accounts preserves this chat.') });
158
158
  return items;
159
159
  }
160
160
 
@@ -167,7 +167,7 @@ export function accountModeItem({ provider = 'claude', t = null, account = null,
167
167
  const modes = modeChoices(account, p);
168
168
  if (!modes.length) return null;
169
169
  const tr = tf(t);
170
- const newConversation = tr('assistant.brain.newConversation', 'starts a new conversation');
170
+ const newConversation = tr('assistant.accountMenu.switchNote', 'Switching accounts preserves this chat.');
171
171
  const name = accountName(account, p);
172
172
  return {
173
173
  kind: 'buttons', id: 'uses', label: tr('assistant.accountMenu.uses', '{label} uses', { label: name }), ariaLabel: accountText('usesGroup', { label: name }, p),
@@ -197,7 +197,7 @@ export function accountManageItem({ t = null, onAdd, onManage } = {}) {
197
197
 
198
198
  /**
199
199
  * Open the menu from `anchor`. ctx: { provider: 'claude' | 'codex', t, placement, bounds,
200
- * read() → { accounts, currentId, workerId, running },
200
+ * read() → { accounts, currentId, accountPolicy, workerId, running },
201
201
  * onAuto(), onPick(id), onSetWorker(id) → Promise, onSetMode(id, mode), onAdd(), onManage(id?), onError(err),
202
202
  * now, locale (the clock and language of the reset times; default: now and the page's) }
203
203
  * Returns the asst-menu handle (or null).
@@ -214,11 +214,11 @@ export function openAccountMenu(anchor, ctx = {}) {
214
214
  const s = ctx.read?.() || {};
215
215
  const accounts = Array.isArray(s.accounts) ? s.accounts : [];
216
216
  const rows = accounts.map((a) => accountMenuRow(a, { provider: p, t: ctx.t, now: ctx.now, locale: ctx.locale }));
217
- return { accounts, rows, currentId: s.currentId || null, workerId: s.workerId || 'default', running: s.running === true };
217
+ return { accounts, rows, currentId: s.currentId || null, accountPolicy: s.accountPolicy || 'manual', workerId: s.workerId || 'default', running: s.running === true };
218
218
  };
219
219
 
220
220
  function mainItems(s) {
221
- return accountChoiceItems({ t: ctx.t, rows: s.rows, currentId: s.currentId, onAuto: () => ctx.onAuto?.(), onPick: (id) => ctx.onPick?.(id), onSignIn: (id) => ctx.onManage?.(id) });
221
+ return accountChoiceItems({ t: ctx.t, rows: s.rows, currentId: s.currentId, accountPolicy: s.accountPolicy, onAuto: () => ctx.onAuto?.(), onPick: (id) => ctx.onPick?.(id), onSignIn: (id) => ctx.onManage?.(id) });
222
222
  }
223
223
 
224
224
  function mainFooter(s) {
@@ -165,7 +165,7 @@ export const ASK_CSS = `
165
165
  display: flex;
166
166
  flex-direction: column;
167
167
  gap: 8px;
168
- max-width: 560px;
168
+ width: 100%;
169
169
  min-width: 0;
170
170
  margin-top: 10px;
171
171
  padding: 12px 14px;
@@ -184,8 +184,7 @@ export const ASK_CSS = `
184
184
  flex-direction: row;
185
185
  align-items: center;
186
186
  gap: 8px;
187
- width: fit-content;
188
- max-width: min(100%, 560px);
187
+ width: 100%;
189
188
  min-height: var(--asst-pill-h-md);
190
189
  padding: 4px 10px 4px 8px;
191
190
  border-radius: var(--asst-pill-r-md);