synabun 2.2.2 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (276) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +1 -1
  3. package/docs/whatsapp.md +52 -20
  4. package/lib/mcp-build.js +519 -0
  5. package/lib/mcp-dist.js +10 -4
  6. package/lib/server-supervisor.js +7 -1
  7. package/lib/virustotal.mjs +4 -2
  8. package/mcp-server/dist/http.d.ts +38 -0
  9. package/mcp-server/dist/http.d.ts.map +1 -1
  10. package/mcp-server/dist/http.js +75 -7
  11. package/mcp-server/dist/http.js.map +1 -1
  12. package/mcp-server/dist/services/browser-route-flow.d.ts +3 -2
  13. package/mcp-server/dist/services/browser-route-flow.d.ts.map +1 -1
  14. package/mcp-server/dist/services/browser-route-flow.js +4 -3
  15. package/mcp-server/dist/services/browser-route-flow.js.map +1 -1
  16. package/mcp-server/dist/services/embedding-service.d.ts.map +1 -1
  17. package/mcp-server/dist/services/embedding-service.js +2 -1
  18. package/mcp-server/dist/services/embedding-service.js.map +1 -1
  19. package/mcp-server/dist/services/neural-interface.d.ts +21 -0
  20. package/mcp-server/dist/services/neural-interface.d.ts.map +1 -1
  21. package/mcp-server/dist/services/neural-interface.js +76 -4
  22. package/mcp-server/dist/services/neural-interface.js.map +1 -1
  23. package/mcp-server/dist/services/tool-catalog.js +2 -2
  24. package/mcp-server/dist/services/tool-catalog.js.map +1 -1
  25. package/mcp-server/dist/tools/agents.d.ts +3 -2
  26. package/mcp-server/dist/tools/agents.d.ts.map +1 -1
  27. package/mcp-server/dist/tools/agents.js +6 -4
  28. package/mcp-server/dist/tools/agents.js.map +1 -1
  29. package/mcp-server/dist/tools/browser-advanced.d.ts +3 -1
  30. package/mcp-server/dist/tools/browser-advanced.d.ts.map +1 -1
  31. package/mcp-server/dist/tools/browser-advanced.js +30 -8
  32. package/mcp-server/dist/tools/browser-advanced.js.map +1 -1
  33. package/mcp-server/dist/tools/browser-navigate.d.ts +3 -3
  34. package/mcp-server/dist/tools/browser-navigate.d.ts.map +1 -1
  35. package/mcp-server/dist/tools/browser-navigate.js +19 -16
  36. package/mcp-server/dist/tools/browser-navigate.js.map +1 -1
  37. package/mcp-server/dist/tools/browser-observe.d.ts +2 -1
  38. package/mcp-server/dist/tools/browser-observe.d.ts.map +1 -1
  39. package/mcp-server/dist/tools/browser-observe.js +61 -20
  40. package/mcp-server/dist/tools/browser-observe.js.map +1 -1
  41. package/mcp-server/dist/tools/morelogin.d.ts +13 -3
  42. package/mcp-server/dist/tools/morelogin.d.ts.map +1 -1
  43. package/mcp-server/dist/tools/morelogin.js +81 -20
  44. package/mcp-server/dist/tools/morelogin.js.map +1 -1
  45. package/mcp-server/dist/tools/youtube/upload.d.ts.map +1 -1
  46. package/mcp-server/dist/tools/youtube/upload.js +225 -88
  47. package/mcp-server/dist/tools/youtube/upload.js.map +1 -1
  48. package/mcp-server/package-lock.json +2 -2
  49. package/mcp-server/package.json +1 -1
  50. package/mcp-server/src/http.ts +79 -7
  51. package/mcp-server/src/services/browser-route-flow.ts +4 -3
  52. package/mcp-server/src/services/embedding-service.ts +2 -1
  53. package/mcp-server/src/services/neural-interface.ts +77 -4
  54. package/mcp-server/src/services/tool-catalog.ts +2 -2
  55. package/mcp-server/src/tools/agents.ts +8 -4
  56. package/mcp-server/src/tools/browser-advanced.ts +29 -8
  57. package/mcp-server/src/tools/browser-navigate.ts +19 -16
  58. package/mcp-server/src/tools/browser-observe.ts +62 -20
  59. package/mcp-server/src/tools/morelogin.ts +81 -20
  60. package/mcp-server/src/tools/youtube/upload.ts +218 -99
  61. package/neural-interface/i18n/en.json +631 -123
  62. package/neural-interface/i18n/pt-BR.json +518 -10
  63. package/neural-interface/lib/assistant-api.js +26 -0
  64. package/neural-interface/lib/assistant-brains/claude.js +5 -0
  65. package/neural-interface/lib/assistant-catalog.js +114 -1
  66. package/neural-interface/lib/assistant-dispatch.js +71 -1
  67. package/neural-interface/lib/assistant-persona.js +14 -7
  68. package/neural-interface/lib/assistant-router.js +6 -4
  69. package/neural-interface/lib/assistant-runtime.js +3 -0
  70. package/neural-interface/lib/assistant-task-prompt.js +5 -0
  71. package/neural-interface/lib/automation-approval.js +249 -0
  72. package/neural-interface/lib/automation-browser-owner-access.js +82 -0
  73. package/neural-interface/lib/backup-service.js +16 -1
  74. package/neural-interface/lib/browser-background-tab.js +72 -3
  75. package/neural-interface/lib/browser-extraction.js +106 -45
  76. package/neural-interface/lib/browser-profile-choices.js +143 -0
  77. package/neural-interface/lib/browser-profiles.js +142 -0
  78. package/neural-interface/lib/browser-tab-recovery.js +153 -0
  79. package/neural-interface/lib/browser-tool-policy.js +2 -0
  80. package/neural-interface/lib/chromium-on-device-model.js +67 -0
  81. package/neural-interface/lib/claude-agent-bridge.js +7 -4
  82. package/neural-interface/lib/claude-model-catalog.js +12 -0
  83. package/neural-interface/lib/effort-levels.js +28 -2
  84. package/neural-interface/lib/local-profile-proxy.js +362 -0
  85. package/neural-interface/lib/local-profiles.js +929 -0
  86. package/neural-interface/lib/loop-logger.js +25 -4
  87. package/neural-interface/lib/maritaca/api.js +179 -0
  88. package/neural-interface/lib/maritaca/attachments.js +44 -0
  89. package/neural-interface/lib/maritaca/client.js +362 -0
  90. package/neural-interface/lib/maritaca/key-store.js +122 -0
  91. package/neural-interface/lib/maritaca/models.js +181 -0
  92. package/neural-interface/lib/maritaca/modes.js +39 -0
  93. package/neural-interface/lib/maritaca/opencode-proxy.js +236 -0
  94. package/neural-interface/lib/maritaca/opencode-stream.js +345 -0
  95. package/neural-interface/lib/maritaca/opencode.js +218 -0
  96. package/neural-interface/lib/maritaca/panel-bridge.js +273 -0
  97. package/neural-interface/lib/maritaca/sessions.js +198 -0
  98. package/neural-interface/lib/morelogin-agent-profiles.js +149 -0
  99. package/neural-interface/lib/morelogin.js +278 -14
  100. package/neural-interface/lib/native-loop-providers.js +3 -1
  101. package/neural-interface/lib/owner-authority.js +30 -12
  102. package/neural-interface/lib/page-session.js +43 -17
  103. package/neural-interface/lib/request-gate.js +2 -0
  104. package/neural-interface/lib/system-activity.js +1 -1
  105. package/neural-interface/lib/terminal-tokens.js +82 -5
  106. package/neural-interface/package-lock.json +3 -2
  107. package/neural-interface/package.json +2 -1
  108. package/neural-interface/public/assets/mascot/README.md +11 -0
  109. package/neural-interface/public/assets/mascot/ask.gif +0 -0
  110. package/neural-interface/public/assets/mascot/ask.png +0 -0
  111. package/neural-interface/public/assets/mascot/blocked.gif +0 -0
  112. package/neural-interface/public/assets/mascot/blocked.png +0 -0
  113. package/neural-interface/public/assets/mascot/budget.gif +0 -0
  114. package/neural-interface/public/assets/mascot/budget.png +0 -0
  115. package/neural-interface/public/assets/mascot/computer.gif +0 -0
  116. package/neural-interface/public/assets/mascot/computer.png +0 -0
  117. package/neural-interface/public/assets/mascot/edit.gif +0 -0
  118. package/neural-interface/public/assets/mascot/edit.png +0 -0
  119. package/neural-interface/public/assets/mascot/error.gif +0 -0
  120. package/neural-interface/public/assets/mascot/error.png +0 -0
  121. package/neural-interface/public/assets/mascot/hover-attention.gif +0 -0
  122. package/neural-interface/public/assets/mascot/hover-attention.png +0 -0
  123. package/neural-interface/public/assets/mascot/idle-hero.gif +0 -0
  124. package/neural-interface/public/assets/mascot/idle-hero.png +0 -0
  125. package/neural-interface/public/assets/mascot/idle.gif +0 -0
  126. package/neural-interface/public/assets/mascot/idle.png +0 -0
  127. package/neural-interface/public/assets/mascot/manifest.json +254 -0
  128. package/neural-interface/public/assets/mascot/mcp.gif +0 -0
  129. package/neural-interface/public/assets/mascot/mcp.png +0 -0
  130. package/neural-interface/public/assets/mascot/memory.gif +0 -0
  131. package/neural-interface/public/assets/mascot/memory.png +0 -0
  132. package/neural-interface/public/assets/mascot/offline.gif +0 -0
  133. package/neural-interface/public/assets/mascot/offline.png +0 -0
  134. package/neural-interface/public/assets/mascot/pick.gif +0 -0
  135. package/neural-interface/public/assets/mascot/pick.png +0 -0
  136. package/neural-interface/public/assets/mascot/plan.gif +0 -0
  137. package/neural-interface/public/assets/mascot/plan.png +0 -0
  138. package/neural-interface/public/assets/mascot/present.gif +0 -0
  139. package/neural-interface/public/assets/mascot/present.png +0 -0
  140. package/neural-interface/public/assets/mascot/project.gif +0 -0
  141. package/neural-interface/public/assets/mascot/project.png +0 -0
  142. package/neural-interface/public/assets/mascot/read.gif +0 -0
  143. package/neural-interface/public/assets/mascot/read.png +0 -0
  144. package/neural-interface/public/assets/mascot/runs.gif +0 -0
  145. package/neural-interface/public/assets/mascot/runs.png +0 -0
  146. package/neural-interface/public/assets/mascot/scenes/automation.gif +0 -0
  147. package/neural-interface/public/assets/mascot/scenes/automation.png +0 -0
  148. package/neural-interface/public/assets/mascot/scenes/browser.gif +0 -0
  149. package/neural-interface/public/assets/mascot/scenes/browser.png +0 -0
  150. package/neural-interface/public/assets/mascot/scenes/code.gif +0 -0
  151. package/neural-interface/public/assets/mascot/scenes/code.png +0 -0
  152. package/neural-interface/public/assets/mascot/scenes/complex.gif +0 -0
  153. package/neural-interface/public/assets/mascot/scenes/complex.png +0 -0
  154. package/neural-interface/public/assets/mascot/scenes/computer.gif +0 -0
  155. package/neural-interface/public/assets/mascot/scenes/computer.png +0 -0
  156. package/neural-interface/public/assets/mascot/scenes/design.gif +0 -0
  157. package/neural-interface/public/assets/mascot/scenes/design.png +0 -0
  158. package/neural-interface/public/assets/mascot/scenes/edit.gif +0 -0
  159. package/neural-interface/public/assets/mascot/scenes/edit.png +0 -0
  160. package/neural-interface/public/assets/mascot/scenes/generic.gif +0 -0
  161. package/neural-interface/public/assets/mascot/scenes/generic.png +0 -0
  162. package/neural-interface/public/assets/mascot/scenes/image_gen.gif +0 -0
  163. package/neural-interface/public/assets/mascot/scenes/image_gen.png +0 -0
  164. package/neural-interface/public/assets/mascot/scenes/manifest.json +173 -0
  165. package/neural-interface/public/assets/mascot/scenes/memory.gif +0 -0
  166. package/neural-interface/public/assets/mascot/scenes/memory.png +0 -0
  167. package/neural-interface/public/assets/mascot/scenes/quick.gif +0 -0
  168. package/neural-interface/public/assets/mascot/scenes/quick.png +0 -0
  169. package/neural-interface/public/assets/mascot/scenes/read.gif +0 -0
  170. package/neural-interface/public/assets/mascot/scenes/read.png +0 -0
  171. package/neural-interface/public/assets/mascot/scenes/research.gif +0 -0
  172. package/neural-interface/public/assets/mascot/scenes/research.png +0 -0
  173. package/neural-interface/public/assets/mascot/scenes/review.gif +0 -0
  174. package/neural-interface/public/assets/mascot/scenes/review.png +0 -0
  175. package/neural-interface/public/assets/mascot/scenes/search.gif +0 -0
  176. package/neural-interface/public/assets/mascot/scenes/search.png +0 -0
  177. package/neural-interface/public/assets/mascot/scenes/shell.gif +0 -0
  178. package/neural-interface/public/assets/mascot/scenes/shell.png +0 -0
  179. package/neural-interface/public/assets/mascot/scenes/thinking.gif +0 -0
  180. package/neural-interface/public/assets/mascot/scenes/thinking.png +0 -0
  181. package/neural-interface/public/assets/mascot/scenes/video_gen.gif +0 -0
  182. package/neural-interface/public/assets/mascot/scenes/video_gen.png +0 -0
  183. package/neural-interface/public/assets/mascot/scenes/web.gif +0 -0
  184. package/neural-interface/public/assets/mascot/scenes/web.png +0 -0
  185. package/neural-interface/public/assets/mascot/search.gif +0 -0
  186. package/neural-interface/public/assets/mascot/search.png +0 -0
  187. package/neural-interface/public/assets/mascot/shell.gif +0 -0
  188. package/neural-interface/public/assets/mascot/shell.png +0 -0
  189. package/neural-interface/public/assets/mascot/skill.gif +0 -0
  190. package/neural-interface/public/assets/mascot/skill.png +0 -0
  191. package/neural-interface/public/assets/mascot/sleep.gif +0 -0
  192. package/neural-interface/public/assets/mascot/sleep.png +0 -0
  193. package/neural-interface/public/assets/mascot/subagent.gif +0 -0
  194. package/neural-interface/public/assets/mascot/subagent.png +0 -0
  195. package/neural-interface/public/assets/mascot/success.gif +0 -0
  196. package/neural-interface/public/assets/mascot/success.png +0 -0
  197. package/neural-interface/public/assets/mascot/think.gif +0 -0
  198. package/neural-interface/public/assets/mascot/think.png +0 -0
  199. package/neural-interface/public/assets/mascot/wait.gif +0 -0
  200. package/neural-interface/public/assets/mascot/wait.png +0 -0
  201. package/neural-interface/public/assets/mascot/watch.gif +0 -0
  202. package/neural-interface/public/assets/mascot/watch.png +0 -0
  203. package/neural-interface/public/assets/mascot/web.gif +0 -0
  204. package/neural-interface/public/assets/mascot/web.png +0 -0
  205. package/neural-interface/public/onboarding.html +14 -1
  206. package/neural-interface/public/shared/agent-runtime-options.js +49 -8
  207. package/neural-interface/public/shared/agy/agy-panel.js +2 -2
  208. package/neural-interface/public/shared/api.js +4 -4
  209. package/neural-interface/public/shared/assistant/asst-ask-styles.js +8 -8
  210. package/neural-interface/public/shared/assistant/asst-ask.js +1 -1
  211. package/neural-interface/public/shared/assistant/asst-brain-picker.js +99 -9
  212. package/neural-interface/public/shared/assistant/asst-control.js +1 -1
  213. package/neural-interface/public/shared/assistant/asst-limit-wait.js +4 -4
  214. package/neural-interface/public/shared/assistant/asst-panel.js +6 -2
  215. package/neural-interface/public/shared/assistant/asst-rack-styles.js +4 -4
  216. package/neural-interface/public/shared/assistant/asst-render.js +6 -6
  217. package/neural-interface/public/shared/assistant/asst-route-models.js +64 -4
  218. package/neural-interface/public/shared/assistant/asst-route.js +24 -7
  219. package/neural-interface/public/shared/assistant/asst-routes-editor.js +154 -39
  220. package/neural-interface/public/shared/assistant/asst-run-stage.js +3 -3
  221. package/neural-interface/public/shared/assistant/asst-scene-styles.js +8 -111
  222. package/neural-interface/public/shared/assistant/asst-scenes.js +46 -318
  223. package/neural-interface/public/shared/assistant/asst-sidepanel.js +2 -2
  224. package/neural-interface/public/shared/assistant/asst-state.js +72 -2
  225. package/neural-interface/public/shared/assistant/asst-styles.js +58 -14
  226. package/neural-interface/public/shared/automation-approval-view.js +75 -0
  227. package/neural-interface/public/shared/cdx/cdx-panel.js +2 -2
  228. package/neural-interface/public/shared/context-menu-model.js +2 -0
  229. package/neural-interface/public/shared/editor/editor-panel-logic.js +10 -0
  230. package/neural-interface/public/shared/editor/editor-panel.js +10 -2
  231. package/neural-interface/public/shared/html-shell.js +30 -22
  232. package/neural-interface/public/shared/morelogin-profile-choices.js +107 -0
  233. package/neural-interface/public/shared/morelogin-profile-field.js +186 -0
  234. package/neural-interface/public/shared/mtc/mtc-client.js +181 -0
  235. package/neural-interface/public/shared/mtc/mtc-compose.js +40 -0
  236. package/neural-interface/public/shared/mtc/mtc-copy.js +253 -0
  237. package/neural-interface/public/shared/mtc/mtc-logic.js +478 -0
  238. package/neural-interface/public/shared/mtc/mtc-panel.js +1354 -0
  239. package/neural-interface/public/shared/mtc/mtc-render.js +172 -0
  240. package/neural-interface/public/shared/mtc/mtc-styles.js +437 -0
  241. package/neural-interface/public/shared/ocp-v2/ocp-v2-panel.js +6 -2
  242. package/neural-interface/public/shared/provider-icons.js +3 -0
  243. package/neural-interface/public/shared/schedules-view.js +7 -0
  244. package/neural-interface/public/shared/server-back.js +50 -0
  245. package/neural-interface/public/shared/settings/settings-browser-owner-access.js +72 -0
  246. package/neural-interface/public/shared/settings/settings-data.js +1 -0
  247. package/neural-interface/public/shared/settings/settings-ia.js +3 -1
  248. package/neural-interface/public/shared/settings/settings-local-profiles.js +153 -0
  249. package/neural-interface/public/shared/settings/settings-maritaca-opencode.js +105 -0
  250. package/neural-interface/public/shared/sidepanel-session-status.js +16 -2
  251. package/neural-interface/public/shared/state.js +1 -1
  252. package/neural-interface/public/shared/styles.css +356 -157
  253. package/neural-interface/public/shared/synabun-mascot-assets.js +67 -0
  254. package/neural-interface/public/shared/synabun-mascot.js +136 -12
  255. package/neural-interface/public/shared/synabun-ticker.js +3 -0
  256. package/neural-interface/public/shared/topright-overflow-logic.js +1 -0
  257. package/neural-interface/public/shared/ui-automation-approval.js +188 -0
  258. package/neural-interface/public/shared/ui-automation-studio.js +130 -90
  259. package/neural-interface/public/shared/ui-claude-panel.js +50 -2
  260. package/neural-interface/public/shared/ui-maritaca-panel.js +15 -0
  261. package/neural-interface/public/shared/ui-navbar.js +17 -0
  262. package/neural-interface/public/shared/ui-panels.js +3 -1
  263. package/neural-interface/public/shared/ui-schedules-studio.js +118 -17
  264. package/neural-interface/public/shared/ui-scroll-follow.js +3 -0
  265. package/neural-interface/public/shared/ui-settings.js +590 -27
  266. package/neural-interface/public/shared/ui-sidepanel-session-entry.js +8 -2
  267. package/neural-interface/public/shared/ui-sidepanel-sessions.js +3 -3
  268. package/neural-interface/public/shared/ui-sidepanel-tray.js +24 -0
  269. package/neural-interface/public/shared/ui-sidepanel-windows.js +1 -1
  270. package/neural-interface/scripts/build-mascot-assets.mjs +30 -0
  271. package/neural-interface/server.js +1784 -195
  272. package/npm-shrinkwrap.json +5 -17
  273. package/package.json +5 -6
  274. package/postinstall.js +38 -39
  275. package/setup.js +33 -31
  276. package/skills/synabun/modules/changelog.md +14 -0
@@ -488,7 +488,7 @@ export function injectAssistantStyles() {
488
488
  .asst-working { display: flex; align-items: center; gap: 10px; min-height: 28px; color: var(--asst-text-2); font-size: 12.5px; }
489
489
  .asst-working-face { display: inline-flex; flex-shrink: 0; color: var(--asst-text); line-height: 0; }
490
490
  .asst-working-face:empty { display: none; }
491
- .asst-working-face svg { display: block; width: 56px; height: 28px; }
491
+ .asst-working-face svg { display: block; width: 112px; height: 56px; }
492
492
  /* The hero's hand-off (asst-render.js settleHero): the face flies in from the empty state, over the prompt. */
493
493
  .asst-working.is-flip .asst-working-face { position: relative; z-index: 3; }
494
494
 
@@ -1266,7 +1266,7 @@ export function injectAssistantStyles() {
1266
1266
  .asst-control.resolved { --tone: var(--asst-text-3); --tone-line: var(--asst-line); opacity: .8; }
1267
1267
  .asst-control-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
1268
1268
  .asst-control-face { display: inline-flex; flex-shrink: 0; color: var(--asst-text-2); line-height: 0; }
1269
- .asst-control-face svg { display: block; width: 28px; height: 14px; }
1269
+ .asst-control-face svg { display: block; width: 56px; height: 28px; }
1270
1270
  .asst-control-kind {
1271
1271
  display: inline-flex;
1272
1272
  align-items: center;
@@ -1818,23 +1818,28 @@ export function injectAssistantStyles() {
1818
1818
  /* Model routes editor: Settings density on a desktop pointer. Scoped here
1819
1819
  so route cards, the model manager and other Assistant menus keep their UI. */
1820
1820
  .asst-routes-overlay { font-family: var(--stg-font, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Inter, sans-serif); }
1821
- .asst-routes-overlay .asst-routes-modal { width: min(1040px, 100%); max-height: calc(100dvh - 32px); border-radius: var(--asst-r-card); line-height: 1.4; }
1821
+ .asst-routes-overlay .asst-routes-modal { width: min(960px, 100%); max-height: calc(100dvh - 24px); border-radius: var(--asst-r-card); line-height: 1.4; }
1822
1822
  .asst-routes-modal :is(.asst-btn, .asst-dd, .asst-iconbtn) { --cap-h: var(--asst-pill-h-sm); --cap-r: var(--asst-pill-r-xs); --cap-px: var(--asst-pill-px-sm); --cap-icon: 12px; --cap-gap: 4px; }
1823
- .asst-routes-modal .asst-modal-head { min-height: 40px; padding: 8px 14px 8px 22px; font-size: 13px; }
1823
+ .asst-routes-modal .asst-modal-head { min-height: 36px; padding: 6px 12px 6px 18px; font-size: 13px; }
1824
1824
  .asst-routes-modal .asst-modal-head .asst-icon { color: var(--asst-text-2); }
1825
1825
  .asst-routes-modal .asst-modal-close { width: var(--cap-h); height: var(--cap-h); }
1826
- .asst-routes-modal .asst-modal-body { gap: 12px; padding: 12px 22px; scroll-padding: 28px 0; }
1827
- .asst-routes-modal .asst-modal-foot { padding: 10px 22px; }
1826
+ .asst-routes-modal .asst-modal-body { gap: 10px; padding: 10px 18px; scroll-padding: 24px 0; }
1827
+ .asst-routes-modal .asst-modal-foot { padding: 8px 18px; }
1828
1828
  .asst-routes-modal .asst-btn { height: var(--cap-h); min-height: var(--cap-h); padding: 0 10px; }
1829
- .asst-routes-modal .asst-routes-section { flex-shrink: 0; gap: 6px; margin: 0; min-width: 0; }
1829
+ .asst-routes-modal .asst-routes-section { flex-shrink: 0; gap: 5px; margin: 0; min-width: 0; }
1830
1830
  .asst-routes-modal .asst-routes-section-title { margin: 0; color: var(--asst-text); font-size: 13px; font-weight: 600; }
1831
+ /* When to ask: heading, segmented control and the conversation's own mode share one slim row. */
1832
+ .asst-routes-modal .asst-routes-ask-head { flex-wrap: wrap; justify-content: flex-start; gap: 4px 12px; }
1833
+ .asst-routes-modal .asst-routes-ask-head .asst-routes-section-title { flex: 0 0 auto; }
1834
+ .asst-routes-modal .asst-routes-ask-head .asst-routes-modes { flex: 1 1 330px; max-width: 480px; }
1835
+ .asst-routes-modal .asst-routes-ask-head .asst-routes-session-note { flex: 1 1 160px; text-align: end; }
1831
1836
  .asst-routes-modal .asst-routes-modes { gap: 0; padding: 0; border-radius: var(--asst-pill-r-xs); background: var(--asst-fill-1); }
1832
1837
  .asst-routes-modal .asst-routes-mode { position: relative; flex-direction: row; align-items: center; justify-content: center; height: var(--asst-pill-h-sm); padding: 0 8px; gap: 0; min-width: 0; border-radius: var(--asst-pill-r-xs); box-shadow: none; color: var(--asst-text-2); }
1833
1838
  .asst-routes-mode input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
1834
1839
  .asst-routes-modal .asst-routes-mode:has(input:checked) { background: var(--asst-fill-3); color: var(--asst-text); box-shadow: inset 0 0 0 1px var(--asst-line-2); }
1835
1840
  .asst-routes-modal .asst-routes-mode-label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; font-weight: 500; }
1836
- .asst-routes-modal .asst-routes-mode-desc, .asst-routes-session-note { margin: 0; color: var(--asst-text-2); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
1837
- .asst-routes-session-note { color: var(--asst-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
1841
+ .asst-routes-modal .asst-routes-mode-desc, .asst-routes-session-note { margin: 0; color: var(--asst-text-2); font-size: 12px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
1842
+ .asst-routes-session-note { color: var(--asst-text-3); }
1838
1843
  .asst-routes-mode:has(:focus-visible) { outline: 2px solid var(--asst-focus); outline-offset: 2px; z-index: 1; }
1839
1844
  .asst-routes-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
1840
1845
  .asst-routes-list-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@@ -1842,17 +1847,17 @@ export function injectAssistantStyles() {
1842
1847
  .asst-routes-modal .asst-routes-list-actions .asst-btn:hover:not(:disabled) { color: var(--asst-text); background: var(--asst-fill-1); }
1843
1848
  /* Reserve the widths the current model names, effort words and destinations
1844
1849
  need; give all remaining space to task descriptions instead of a share. */
1845
- .asst-routes-modal .asst-routes-columns, .asst-routes-modal .asst-routes-row { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(120px, 200px) 70px 116px minmax(120px, 190px) var(--asst-pill-h-sm); column-gap: 6px; }
1846
- .asst-routes-columns { position: sticky; top: -14px; z-index: 1; padding: 4px 8px; color: var(--asst-text-3); font-size: 11.5px; background: var(--asst-popover); }
1850
+ .asst-routes-modal .asst-routes-columns, .asst-routes-modal .asst-routes-row { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(120px, 188px) 70px 116px minmax(120px, 176px) var(--asst-pill-h-sm); column-gap: 6px; }
1851
+ .asst-routes-columns { position: sticky; top: -10px; z-index: 1; padding: 2px 8px; color: var(--asst-text-3); font-size: 11.5px; background: var(--asst-popover); }
1847
1852
  .asst-routes-columns span:last-child { visibility: hidden; }
1848
1853
  .asst-routes-modal .asst-routes-list { padding: 0 8px; border: 1px solid var(--asst-line); border-radius: var(--radius-group, 9px); background: var(--asst-field); }
1849
1854
  .asst-routes-modal .asst-routes-row { align-items: center; row-gap: 0; padding: 2px 0; border-top: 1px solid var(--asst-line); }
1850
1855
  .asst-routes-modal .asst-routes-row:first-child { border-top: 0; }
1851
1856
  .asst-routes-modal .asst-routes-row-main { min-width: 0; }
1852
- .asst-routes-modal .asst-routes-row-label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; font-weight: 400; line-height: 1.3; }
1853
- .asst-routes-modal :is(.asst-routes-row-desc, .asst-routes-row-note, .asst-routes-row-warning, .asst-routes-row-context) { margin: 0; padding: 0; border: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--asst-text-3); font-size: 11.5px; line-height: 1.3; }
1857
+ .asst-routes-modal .asst-routes-row-label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; font-weight: 400; line-height: 1.25; }
1858
+ /* Under the name: the description, or the one-line note, warning or context that stands in for it (whole in its title). */
1859
+ .asst-routes-modal :is(.asst-routes-row-desc, .asst-routes-row-note, .asst-routes-row-warning, .asst-routes-row-context) { margin: 0; padding: 0; border: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--asst-text-3); font-size: 11.5px; line-height: 1.25; }
1854
1860
  .asst-routes-modal :is(.asst-routes-row-note, .asst-routes-row-warning) { color: var(--asst-warn); }
1855
- .asst-routes-modal .asst-routes-row > :is(.asst-routes-row-note, .asst-routes-row-warning, .asst-routes-row-context) { grid-column: 1 / -1; white-space: normal; overflow: visible; overflow-wrap: anywhere; }
1856
1861
  .asst-routes-inactive { margin-inline-start: 6px; color: var(--asst-text-3); font-size: 11px; }
1857
1862
  .asst-routes-cell { display: flex; min-width: 0; }
1858
1863
  .asst-routes-cell-label { display: none; }
@@ -1907,6 +1912,9 @@ export function injectAssistantStyles() {
1907
1912
  .asst-routes-modal .asst-modal-body { padding: 14px; gap: 16px; }
1908
1913
  .asst-routes-modal .asst-modal-head { padding-inline: 14px 8px; }
1909
1914
  .asst-routes-modal .asst-routes-modes { grid-template-columns: 1fr; }
1915
+ .asst-routes-modal .asst-routes-ask-head .asst-routes-modes { flex-basis: 100%; max-width: none; }
1916
+ .asst-routes-modal .asst-routes-ask-head .asst-routes-session-note { text-align: start; }
1917
+ .asst-routes-modal :is(.asst-routes-mode-desc, .asst-routes-session-note, .asst-routes-row-note, .asst-routes-row-warning, .asst-routes-row-context) { white-space: normal; overflow-wrap: anywhere; }
1910
1918
  .asst-routes-modal .asst-routes-columns { display: none; }
1911
1919
  .asst-routes-modal .asst-routes-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; gap: 8px; padding: 12px 0; }
1912
1920
  .asst-routes-modal .asst-routes-row-main, .asst-routes-modal .asst-routes-model-cell, .asst-routes-modal .asst-routes-account-cell { grid-column: 1 / -1; }
@@ -1923,6 +1931,40 @@ export function injectAssistantStyles() {
1923
1931
  .asst-routes-confirm { padding: 10px 14px; }
1924
1932
  }
1925
1933
 
1934
+ /* Model routes: grouped summaries with a single task editor. */
1935
+ .asst-routes-modal .asst-routes-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; padding: 0; border: 0; background: transparent; }
1936
+ .asst-routes-group { min-width: 0; }
1937
+ .asst-routes-group > h3 { margin: 8px 0 4px; color: var(--asst-text-2); font-size: 12px; font-weight: 600; }
1938
+ .asst-routes-modal .asst-routes-row { display: block; padding: 0; border-top: 1px solid var(--asst-line); }
1939
+ .asst-routes-toggle { display: grid; grid-template-columns: minmax(90px, .8fr) minmax(0, 1.3fr) auto 12px; align-items: center; gap: 8px; width: 100%; min-height: 48px; padding: 8px 4px; border: 0; background: transparent; color: var(--asst-text); text-align: start; font: inherit; cursor: pointer; border-radius: var(--asst-pill-r-xs); }
1940
+ .asst-routes-toggle:hover, .asst-routes-toggle[aria-expanded="true"] { background: var(--asst-fill-1); }
1941
+ .asst-routes-toggle:focus-visible { outline: 2px solid var(--asst-focus); outline-offset: -2px; }
1942
+ .asst-routes-summary-name { font-size: 13px; overflow-wrap: anywhere; }
1943
+ .asst-routes-summary-value { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 2px 6px; font-size: 12px; }
1944
+ .asst-routes-summary-model { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
1945
+ .asst-routes-summary-value:not(:has(.asst-icon)) .asst-routes-summary-model { grid-column: 1 / -1; color: var(--asst-text-2); }
1946
+ .asst-routes-summary-meta { grid-column: 2; color: var(--asst-text-2); font-size: 11.5px; overflow-wrap: anywhere; }
1947
+ .asst-routes-summary-status { font-size: 11px; color: var(--asst-text-2); max-width: 64px; }
1948
+ .asst-routes-row[data-issue="true"] .asst-routes-summary-status { color: var(--asst-warn); }
1949
+ .asst-routes-chevron svg { width: 12px; height: 12px; }
1950
+ .asst-routes-toggle[aria-expanded="true"] .asst-routes-chevron { transform: rotate(180deg); }
1951
+ .asst-routes-modal .asst-routes-row-main { padding: 0 4px; }
1952
+ .asst-routes-modal .asst-routes-row-main > :not([hidden]) { white-space: normal; margin: 0 0 8px; line-height: 1.45; }
1953
+ .asst-routes-details { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 24px; gap: 12px 8px; padding: 8px; margin-bottom: 8px; border-radius: var(--asst-r-field); background: var(--asst-fill-1); }
1954
+ .asst-routes-details[hidden] { display: none; }
1955
+ .asst-routes-details .asst-routes-cell { flex-direction: column; gap: 4px; min-width: 0; }
1956
+ .asst-routes-details .asst-routes-cell-label { display: block; color: var(--asst-text-2); font-size: 12px; }
1957
+ .asst-routes-details .asst-routes-model-cell, .asst-routes-details .asst-routes-account-cell { grid-column: 1 / -1; }
1958
+ .asst-routes-details .asst-routes-reset-cell { align-self: end; }
1959
+ .asst-routes-modal .asst-routes-mode-desc, .asst-routes-modal .asst-routes-session-note { white-space: normal; }
1960
+ .asst-routes-modal .asst-routes-ask-head .asst-routes-session-note { flex-basis: 100%; text-align: start; }
1961
+ @media (max-width: 700px) {
1962
+ .asst-routes-modal .asst-routes-list { grid-template-columns: 1fr; gap: 12px; }
1963
+ .asst-routes-modal .asst-routes-details { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; }
1964
+ .asst-routes-modal .asst-routes-details :is(.asst-routes-effort-cell, .asst-routes-run-cell) { grid-column: auto; }
1965
+ .asst-routes-modal .asst-routes-summary-status { max-width: 54px; }
1966
+ }
1967
+
1926
1968
  /* ── Frame lightbox ─────────────────────────────────────────────── */
1927
1969
  .asst-lightbox { position: fixed; inset: 0; z-index: 100040; display: flex; align-items: center; justify-content: center; background: var(--asst-scrim-strong); }
1928
1970
  .asst-lightbox-figure { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 0; }
@@ -1978,6 +2020,8 @@ export function injectAssistantStyles() {
1978
2020
  A send hands it over to the "Thinking" row at once; with no such row it
1979
2021
  fades out where it stood (.asst-hero-dock, positioned by asst-render.js). */
1980
2022
  .asst-empty-mascot { display: flex; justify-content: center; margin-bottom: 2px; color: var(--asst-text); pointer-events: none; user-select: none; }
2023
+ /* Only the drawn hero itself takes a hover: it plays hover-attention once. */
2024
+ .asst-empty-mascot > svg { pointer-events: auto; }
1981
2025
  :is(.asst-empty-mascot, .asst-hero-dock) svg { display: block; }
1982
2026
  .asst-hero-dock { position: absolute; z-index: 4; display: flex; align-items: center; justify-content: center; color: var(--asst-text); pointer-events: none; user-select: none; }
1983
2027
 
@@ -0,0 +1,75 @@
1
+ // ── What the approval flag and dialog say (re-review of 2026-11-11, finding 3). DOM-free, no imports. ──
2
+ //
3
+ // The server decides (lib/automation-approval.js: the review, its digest, the case); this module only turns its
4
+ // answers into the words and the buttons the page shows, so the wording is unit-tested under Node
5
+ // (tests/automation-approval-view.test.mjs). `t(key, vars)` is the page's translator (i18n.js).
6
+
7
+ /** The account a run uses, in words: the profile by name (or id), or the default browser. */
8
+ export function accountText(account, t) {
9
+ if (!account) return t('automationApproval.account.unknown');
10
+ if (account.kind === 'morelogin') {
11
+ const profile = account.name ? `${account.name} (${account.envId})` : String(account.envId);
12
+ return account.source === 'group'
13
+ ? t('automationApproval.account.groupProfile', { profile, group: account.groupName || '' })
14
+ : t('automationApproval.account.ownProfile', { profile });
15
+ }
16
+ if (account.connectMode === 'morelogin' && account.envId) {
17
+ return t('automationApproval.account.defaultProfile', { profile: account.name ? `${account.name} (${account.envId})` : String(account.envId) });
18
+ }
19
+ return t('automationApproval.account.defaultBrowser');
20
+ }
21
+
22
+ /** The short profile name for the flag ("<profile>" in "needs your approval to run in <profile>"). */
23
+ export function profileLabel(account) {
24
+ if (!account || account.kind !== 'morelogin') return '';
25
+ return account.name || String(account.envId || '');
26
+ }
27
+
28
+ /** What marked it, in words: an agent, an import, a restore. */
29
+ export function sourceText(from, t) {
30
+ return t(from === 'import' ? 'automationApproval.from.import' : from === 'restore' ? 'automationApproval.from.restore' : 'automationApproval.from.agent');
31
+ }
32
+
33
+ /**
34
+ * The flag of a marked schedule (`summary`: an entry of GET /api/automation-approvals, or a review), or null.
35
+ * → { tone: 'warn'|'info', short, text }: `short` for a list row, `text` for the editor and the detail.
36
+ */
37
+ export function scheduleFlag(summary, t) {
38
+ if (!summary || !summary.marks || (!summary.marks.schedule && !summary.marks.template)) return null;
39
+ const who = summary.marks.schedule ? sourceText(summary.marks.scheduleFrom, t) : sourceText(summary.marks.templateFrom, t);
40
+ const what = summary.marks.schedule && summary.marks.template ? t('automationApproval.what.both')
41
+ : summary.marks.schedule ? t('automationApproval.what.schedule') : t('automationApproval.what.template');
42
+ const profile = profileLabel(summary.account);
43
+ if (summary.case === 'blocked') {
44
+ return { tone: 'warn', short: t('automationApproval.flag.blockedShort', { profile }), text: t('automationApproval.flag.blocked', { who, what, profile }) };
45
+ }
46
+ if (summary.case === 'on-list') {
47
+ return { tone: 'info', short: t('automationApproval.flag.onListShort'), text: t('automationApproval.flag.onList', { who, what, profile }) };
48
+ }
49
+ return { tone: 'info', short: t('automationApproval.flag.noProfileShort'), text: t('automationApproval.flag.noProfile', { who, what }) };
50
+ }
51
+
52
+ /** The flag of a marked template, or null. */
53
+ export function templateFlag(template, summary, t) {
54
+ const marked = template?.editedBy === 'agent' || summary?.marks?.template === true;
55
+ if (!marked) return null;
56
+ const who = sourceText(summary?.marks?.templateFrom || template?.unreviewedFrom || 'agent', t);
57
+ return { tone: 'warn', short: t('automationApproval.flag.templateShort'), text: t('automationApproval.flag.template', { who }) };
58
+ }
59
+
60
+ /** What the dialog says will happen after approval, from the review's `afterApproval`. */
61
+ export function afterApprovalText(review, t) {
62
+ if (!review) return '';
63
+ if (review.kind === 'template') return t('automationApproval.after.template');
64
+ if (review.afterApproval === 'list') return t('automationApproval.after.groupStillAgent', { group: review.account?.groupName || '' });
65
+ if (review.afterApproval === 'default') return t('automationApproval.after.default');
66
+ return t('automationApproval.after.owner', { profile: profileLabel(review.account) });
67
+ }
68
+
69
+ /** The weekday names the dialog shows for a review's day themes (0 = Sunday), through Intl in the page's locale. */
70
+ export function weekdayName(day, locale = 'en') {
71
+ try {
72
+ // 2024-01-07 was a Sunday.
73
+ return new Intl.DateTimeFormat(locale, { weekday: 'long', timeZone: 'UTC' }).format(new Date(Date.UTC(2024, 0, 7 + Number(day))));
74
+ } catch { return String(day); }
75
+ }
@@ -16,7 +16,7 @@ import { wireFileLinks } from '../ui-file-links.js';
16
16
  import { frameRect } from '../app-frame.js';
17
17
  import { trackWorkerEnd } from '../ui-worker-end.js';
18
18
  import { isDispatchedRun } from '../worker-end.js';
19
- import { runAwaitsAnswer } from '../sidepanel-session-status.js';
19
+ import { runAwaitsAnswer, runTurnLive } from '../sidepanel-session-status.js';
20
20
  import { injectStyles } from './cdx-styles.js';
21
21
  import { mountContextMenu } from './cdx-context-menu.js';
22
22
  import { teardownMcpApps } from './cdx-mcp-app-host.js';
@@ -1156,7 +1156,7 @@ export async function attachCodexAutomation(run, {
1156
1156
  if (!tab) return { ok: false, reason: 'tab_limit' };
1157
1157
  // A task-mode worker between turns (waiting for a follow-up) is alive, not working; one whose turn ended
1158
1158
  // on a question needs you, like one with an approval card up (setRunning and renderPills repaint).
1159
- const working = running && run.turnState !== 'idle' && run.turnState !== 'terminal';
1159
+ const working = runTurnLive(run);
1160
1160
  tab.automationRunId = run.runId;
1161
1161
  tab.automationActive = restart.active;
1162
1162
  tab.automationAwaits = runAwaitsAnswer(run);
@@ -91,6 +91,8 @@ export const OPEN_ENTRIES = [
91
91
  { id: 'open-codex-panel', key: 'codexPanel', press: 'topright-codex-panel-btn', active: 'topright-codex-panel-btn', appIcon: 'menu-terminal-codex', icon: 'panel' },
92
92
  { id: 'open-opencode-panel', key: 'opencodePanel', press: 'topright-opencode-panel-btn', active: 'topright-opencode-panel-btn', appIcon: 'menu-terminal-opencode', icon: 'panel' },
93
93
  { id: 'open-antigravity-panel', key: 'antigravityPanel', press: 'topright-antigravity-panel-btn', active: 'topright-antigravity-panel-btn', appIcon: 'menu-terminal-antigravity', icon: 'panel' },
94
+ // Maritaca has no terminal CLI, so no Apps-menu icon: the row wears the generic panel icon.
95
+ { id: 'open-maritaca-panel', key: 'maritacaPanel', press: 'topright-maritaca-panel-btn', active: 'topright-maritaca-panel-btn', icon: 'panel' },
94
96
  null,
95
97
  { id: 'open-terminal', key: 'terminal', event: ['terminal:open', { profile: 'shell' }], perm: 'terminal', appIcon: 'menu-terminal-shell', icon: 'terminal' },
96
98
  { id: 'open-claude-terminal', key: 'claudeTerminal', action: 'launch-claude', perm: 'terminal', icon: 'terminal' },
@@ -25,6 +25,16 @@ export function displayPath(path, projectRoot) {
25
25
  return rel.startsWith('/') ? rel.slice(1) : rel;
26
26
  }
27
27
 
28
+ /**
29
+ * The header's path in its two parts: the folders, with the separator that ends them, and the file's name. The
30
+ * header draws the name brighter than the folders; together they are still the one string displayPath gives.
31
+ */
32
+ export function splitDisplayPath(display) {
33
+ const text = String(display ?? '');
34
+ const at = Math.max(text.lastIndexOf('/'), text.lastIndexOf('\\'));
35
+ return at < 0 ? { dir: '', name: text } : { dir: text.slice(0, at + 1), name: text.slice(at + 1) };
36
+ }
37
+
28
38
  /** The name a plan's banner uses for the panel that opened it. */
29
39
  export function planSourceLabel(source) {
30
40
  if (source === 'codex') return 'Codex';
@@ -51,7 +51,7 @@ import { baseName, isMarkdownFile, languageLabel } from './editor-languages.js';
51
51
  import { renderMarkdown } from './editor-markdown.js';
52
52
  import {
53
53
  closeConfirm, controlsState, describeOpenFailure, displayPath, isSamePlan, isSamePlanOwner,
54
- matchesExpectedMarkdown, minimapShown, nextWhitespace, planEvent, planIdentityKey, planSourceLabel, viewMenuChange, viewMenuItems,
54
+ matchesExpectedMarkdown, minimapShown, nextWhitespace, planEvent, planIdentityKey, planSourceLabel, splitDisplayPath, viewMenuChange, viewMenuItems,
55
55
  } from './editor-panel-logic.js';
56
56
  import {
57
57
  activateTab, closeTab, closeTargets, createTabs, findTab, getTab, moveTab, neighborTab, normalizePath, openTab, pinTab,
@@ -420,7 +420,15 @@ function renderHeader(doc) {
420
420
  const pathEl = $('fe-editor-filepath');
421
421
  if (!pathEl) return;
422
422
  const path = doc ? (doc.file?.path || doc.path) : '';
423
- pathEl.textContent = displayPath(path, _host.projectRoot());
423
+ // The folders and the name are two spans (the name is drawn brighter) inside one left-to-right run: the box is
424
+ // right-to-left so that a long path is clipped at its start, and the run keeps a leading dot or a slash in place.
425
+ const { dir, name } = splitDisplayPath(displayPath(path, _host.projectRoot()));
426
+ const run = document.createElement('span');
427
+ run.className = 'fe-editor-pathtext';
428
+ const part = (className, text) => { const span = document.createElement('span'); span.className = className; span.textContent = text; return span; };
429
+ if (dir) run.append(part('fe-editor-filedir', dir));
430
+ run.append(part('fe-editor-filename', name));
431
+ pathEl.replaceChildren(run);
424
432
  pathEl.title = String(path || '');
425
433
  }
426
434
 
@@ -20,26 +20,29 @@ export function getEditorPanelHTML() {
20
20
  <button class="fe-editor-back" id="fe-editor-back" data-tooltip="${t('editor.header.close')}" aria-label="${t('editor.header.close')}">
21
21
  <svg viewBox="0 0 24 24"><polyline points="15 18 9 12 15 6"/></svg>
22
22
  </button>
23
- <span class="fe-editor-dot" id="fe-editor-dot"></span>
24
- <span class="fe-editor-filepath" id="fe-editor-filepath"></span>
25
- <div style="flex:1"></div>
26
- <button class="fe-editor-action" id="fe-editor-find-btn" data-tooltip="${t('editor.header.find')}" aria-label="${t('editor.header.find')}">
27
- <svg viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
28
- </button>
29
- <button class="fe-editor-action" id="fe-editor-word-wrap" data-tooltip="${t('editor.header.wordWrap')}" aria-label="${t('editor.header.wordWrap')}" aria-pressed="true">
30
- <svg viewBox="0 0 24 24"><path d="M3 6h18M3 12h15a3 3 0 1 1 0 6h-4"/><polyline points="16 16 14 18 16 20"/><path d="M3 18h7"/></svg>
31
- </button>
32
- <button class="fe-editor-action" id="fe-editor-view-btn" data-tooltip="${t('editor.header.view')}" aria-label="${t('editor.header.view')}" aria-haspopup="menu" aria-expanded="false">
33
- <svg viewBox="0 0 24 24"><path d="M4 7h2.5M11.5 7H20M4 17h8.5M17.5 17H20"/><circle cx="9" cy="7" r="2.5"/><circle cx="15" cy="17" r="2.5"/></svg>
34
- </button>
35
- <button class="fe-editor-action" id="fe-editor-diff-btn" data-tooltip="${t('editor.header.diff')}" aria-label="${t('editor.header.diff')}" aria-pressed="false" hidden>
36
- <svg viewBox="0 0 24 24"><path d="M12 3v10M7 8h10M7 19h10"/></svg>
37
- </button>
38
- <div class="fe-editor-help-wrap">
39
- <button class="fe-editor-action fe-editor-help-btn" id="fe-editor-help-btn" data-tooltip="${t('editor.header.shortcuts')}" aria-label="${t('editor.header.shortcuts')}" aria-expanded="false" aria-controls="fe-editor-keybinds">
40
- <svg viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>
23
+ <div class="fe-editor-title">
24
+ <span class="fe-editor-dot" id="fe-editor-dot"></span>
25
+ <span class="fe-editor-filepath" id="fe-editor-filepath"></span>
26
+ </div>
27
+ <div class="fe-editor-tools">
28
+ <button class="fe-editor-action" id="fe-editor-find-btn" data-tooltip="${t('editor.header.find')}" aria-label="${t('editor.header.find')}">
29
+ <svg viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
41
30
  </button>
42
- <div class="fe-editor-keybinds" id="fe-editor-keybinds"></div>
31
+ <button class="fe-editor-action" id="fe-editor-word-wrap" data-tooltip="${t('editor.header.wordWrap')}" aria-label="${t('editor.header.wordWrap')}" aria-pressed="true">
32
+ <svg viewBox="0 0 24 24"><path d="M3 6h18M3 12h15a3 3 0 1 1 0 6h-4"/><polyline points="16 16 14 18 16 20"/><path d="M3 18h7"/></svg>
33
+ </button>
34
+ <button class="fe-editor-action" id="fe-editor-view-btn" data-tooltip="${t('editor.header.view')}" aria-label="${t('editor.header.view')}" aria-haspopup="menu" aria-expanded="false">
35
+ <svg viewBox="0 0 24 24"><path d="M4 7h2.5M11.5 7H20M4 17h8.5M17.5 17H20"/><circle cx="9" cy="7" r="2.5"/><circle cx="15" cy="17" r="2.5"/></svg>
36
+ </button>
37
+ <button class="fe-editor-action" id="fe-editor-diff-btn" data-tooltip="${t('editor.header.diff')}" aria-label="${t('editor.header.diff')}" aria-pressed="false" hidden>
38
+ <svg viewBox="0 0 24 24"><path d="M12 3v10M7 8h10M7 19h10"/></svg>
39
+ </button>
40
+ <div class="fe-editor-help-wrap">
41
+ <button class="fe-editor-action fe-editor-help-btn" id="fe-editor-help-btn" data-tooltip="${t('editor.header.shortcuts')}" aria-label="${t('editor.header.shortcuts')}" aria-expanded="false" aria-controls="fe-editor-keybinds">
42
+ <svg viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>
43
+ </button>
44
+ <div class="fe-editor-keybinds" id="fe-editor-keybinds"></div>
45
+ </div>
43
46
  </div>
44
47
  <div class="fe-editor-sep"></div>
45
48
  <div class="fe-editor-view-toggle" id="fe-editor-view-toggle" style="display:none">
@@ -47,9 +50,11 @@ export function getEditorPanelHTML() {
47
50
  <button class="fe-editor-toggle-btn" data-mode="preview" aria-pressed="false">${t('editor.header.preview')}</button>
48
51
  </div>
49
52
  <div class="fe-editor-sep" id="fe-editor-sep-preview" style="display:none"></div>
50
- <button class="fe-editor-btn" id="fe-editor-discard" disabled>${t('editor.header.discard')}</button>
51
- <button class="fe-editor-btn fe-editor-save" id="fe-editor-save" disabled>${t('editor.header.save')}</button>
52
- <button class="fe-editor-btn" id="fe-editor-close">${t('editor.header.closeButton')}</button>
53
+ <div class="fe-editor-actions">
54
+ <button class="fe-editor-btn" id="fe-editor-discard" disabled>${t('editor.header.discard')}</button>
55
+ <button class="fe-editor-btn fe-editor-save" id="fe-editor-save" disabled>${t('editor.header.save')}</button>
56
+ <button class="fe-editor-btn" id="fe-editor-close">${t('editor.header.closeButton')}</button>
57
+ </div>
53
58
  </div>
54
59
  <div class="fe-editor-tabs" id="fe-editor-tabs" role="tablist" aria-label="${t('editor.tabs.label')}" hidden></div>
55
60
  <div class="fe-editor-bars" id="fe-editor-bars"></div>
@@ -597,6 +602,9 @@ ${is3D ? '' : `
597
602
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4.5 20 12 4l7.5 16"/><path d="M8.2 20a3.8 3.8 0 0 1 7.6 0"/></svg>
598
603
  <span class="count-badge count-badge--green" id="antigravity-update-badge"></span>
599
604
  </button>
605
+ <button id="topright-maritaca-panel-btn" class="topright-icon-btn" data-tooltip="${t('maritacaPanel.toolbar')}">
606
+ <svg viewBox="0 0 12.48 13.73" fill="currentColor"><path d="M10.11 11.01h1.9S7.21 5.97 5.72 4.4a.62.62 0 0 0-.93.04c-.48.59-.76 1.33-.81 2.1-.06 1.04.32 2.06 1.04 2.8l4.35 4.4h3.1l-2.37-2.72Z"/><path d="M5.69 11 4.52 9.82c-.86-.89-1.31-2.1-1.24-3.33s.67-2.38 1.62-3.16c.35.06.71-.02 1.01-.24-.07-.24-.16-.55-.22-.75-.02-.07.06-.13.12-.09l1.16.77c.3-.61.22-1.37-.26-1.9.1-.18.06-.44-.15-.57C6.07.26 5.36 0 4.41 0 2.76 0 0 1.5 0 5.18c0 2.12 1.36 4.57 3.86 5.47l-1.43 3.08h1.05L4.8 10.9c.29.05.58.09.89.1l-1.27 2.73h1.05l.94-2.01L5.7 11ZM4.84.67c.23 0 .42.19.42.42s-.19.42-.42.42-.42-.19-.42-.42.19-.42.42-.42"/></svg>
607
+ </button>
600
608
  </div>
601
609
  <div id="term-minimized-tray"></div>
602
610
  </div>
@@ -0,0 +1,107 @@
1
+ // What the "MoreLogin profile" field (morelogin-profile-field.js) decides, without the page: how an answer of
2
+ // GET /api/browser/morelogin-envs reads, which choices the popup offers and what the line under it says.
3
+ // No imports: `node --test` loads it (tests/morelogin-profile-choices.test.mjs).
4
+ //
5
+ // SynaBun drives a MoreLogin profile over the Chrome DevTools protocol, so only a Chrome-type profile can be chosen.
6
+ // The list says each profile's browser (`browser`: 'chromium' | 'firefox' | null = not known): a Firefox-type one is
7
+ // listed, said as such and cannot be picked; one a record already holds stays its selection with a warning, as a
8
+ // profile MoreLogin no longer lists does. A browser that is not known is offered: the run's start still checks.
9
+
10
+ //
11
+ // Local profiles (2026-11-11): the same list holds SynaBun's own profiles (`kind: 'local'`: a Chrome SynaBun runs
12
+ // itself, lib/local-profiles.js). They are in every answer, also while MoreLogin is closed, not installed or
13
+ // refusing, and show as "Name · local". A chosen local profile is judged by the local list alone: MoreLogin being
14
+ // closed is no warning for it, and one that is no longer listed is missing whatever MoreLogin does.
15
+
16
+ // What the field says under the popup, by what the profile is chosen for.
17
+ const HELP_KEY = { schedule: 'schedules.form.moreloginHelp', group: 'schedules.form.moreloginHelpGroup', run: 'schedules.form.moreloginHelpRun' };
18
+ const MISSING_KEY = { schedule: 'schedules.form.moreloginMissing', group: 'schedules.form.moreloginMissingGroup', run: 'schedules.form.moreloginMissingRun' };
19
+ const FIREFOX_KEY = { schedule: 'schedules.form.moreloginFirefox', group: 'schedules.form.moreloginFirefoxGroup', run: 'schedules.form.moreloginFirefoxRun' };
20
+
21
+ const opt = (value, label, selected = false) => ({ value: value ?? '', label: String(label ?? ''), selected: !!selected });
22
+
23
+ /** The browser a listed profile runs, as the server said it: 'chromium', 'firefox' or null (not known). */
24
+ export function moreLoginBrowserOf(env) {
25
+ return env?.browser === 'firefox' || env?.browser === 'chromium' ? env.browser : null;
26
+ }
27
+
28
+ /** Whether an id is a local profile's (lib/local-profiles.js: `lp-` and 12 hex characters). */
29
+ export function isLocalProfileId(id) {
30
+ return typeof id === 'string' && /^lp-[0-9a-f]{12}$/.test(id);
31
+ }
32
+
33
+ const envRow = (e) => ({ id: String(e.id), name: String(e.name ?? ''), status: e.status ? String(e.status) : '', browser: moreLoginBrowserOf(e), ...(e.kind === 'local' ? { kind: 'local' } : {}) });
34
+
35
+ /**
36
+ * What one answer of GET /api/browser/morelogin-envs means to the field.
37
+ * d the answer's body (null when it could not be read)
38
+ * ok whether the HTTP status was a success; `status` is shown when the body names no error
39
+ * `pending`: profiles whose browser the server is still asking MoreLogin for (an older server says none).
40
+ */
41
+ export function readMoreLoginProfiles(d, ok = true, status = 0) {
42
+ const failed = !d || d.ok === false || !ok;
43
+ return {
44
+ loading: false,
45
+ installed: !!d?.installed,
46
+ running: !!d?.running,
47
+ isDefault: d?.connectMode === 'morelogin',
48
+ listed: !failed && !!d.running,
49
+ // MoreLogin's profiles when its list was read; the local ones whenever the server sent them (a refused or closed
50
+ // MoreLogin does not hide them).
51
+ envs: Array.isArray(d?.envs)
52
+ ? d.envs.filter(e => e && (!failed || e.kind === 'local')).map(envRow)
53
+ : [],
54
+ // `local`: the server knows local profiles ({ count }); an older one sends none and `localListed` stays false.
55
+ localListed: !!d && typeof d.local === 'object' && d.local !== null && !d.local.error && Array.isArray(d.envs),
56
+ localCount: Array.isArray(d?.envs) ? d.envs.filter(e => e && e.kind === 'local').length : 0,
57
+ pending: !failed && Number(d.browsersPending) > 0 ? Number(d.browsersPending) : 0,
58
+ error: failed ? String(d?.error || status) : '',
59
+ };
60
+ }
61
+
62
+ /** Whether two readings show the same thing (the count still being looked up aside). */
63
+ export function sameMoreLoginProfiles(a, b) {
64
+ return JSON.stringify({ ...a, pending: 0 }) === JSON.stringify({ ...b, pending: 0 });
65
+ }
66
+
67
+ /**
68
+ * The popup's choices and the line under it.
69
+ * ml the list as readMoreLoginProfiles gives it (or the loading placeholder)
70
+ * chosenId the field's value ('' = the default); chosenName its display name
71
+ * context 'schedule' | 'group' | 'run'
72
+ * inheritLabel the first choice's label when an empty value is not the Browser settings default
73
+ * say (key, params) → text
74
+ * → { entries, helpKey, helpParams, warn, firefox, missing }; entries are cc-dropdown's ({ value, label, selected,
75
+ * disabled }). The chosen profile is always among them and selected, usable or not: it is never dropped quietly.
76
+ */
77
+ export function moreLoginChoices({ ml, chosenId = '', chosenName = '', context = 'schedule', inheritLabel = '', say }) {
78
+ const envs = Array.isArray(ml?.envs) ? ml.envs : [];
79
+ const listed = envs.find(e => e.id === chosenId) || null;
80
+ const known = !!listed;
81
+ // A local profile is missing when the local list does not hold it; a MoreLogin one when MoreLogin's does not.
82
+ const chosenLocal = isLocalProfileId(chosenId);
83
+ const missing = !!chosenId && !known && (chosenLocal ? !!ml?.localListed : !!ml?.listed);
84
+ const firefox = listed?.browser === 'firefox';
85
+ const label = (e) => `${e.kind === 'local' ? say('schedules.form.moreloginLocalOption', { name: e.name || e.id }) : (e.name || e.id)}${e.status ? ` (${e.status})` : ''}`;
86
+ // What MoreLogin named shows as it is (cc-dropdown escapes the labels).
87
+ const entries = [
88
+ opt('', inheritLabel || say('schedules.form.moreloginDefault'), !chosenId),
89
+ ...envs.map(e => (e.browser === 'firefox'
90
+ ? { ...opt(e.id, say('schedules.form.moreloginFirefoxOption', { name: e.name || e.id }), e.id === chosenId), disabled: true }
91
+ : opt(e.id, label(e), e.id === chosenId))),
92
+ ...(chosenId && !known
93
+ ? [opt(chosenId, missing ? say('schedules.form.moreloginMissingOption', { name: chosenName }) : say('schedules.launch.saved', { value: chosenName }), true)]
94
+ : []),
95
+ ];
96
+ let helpKey = HELP_KEY[context] || HELP_KEY.schedule;
97
+ let helpParams;
98
+ let warn = false;
99
+ if (missing) { helpKey = MISSING_KEY[context] || MISSING_KEY.schedule; helpParams = { name: chosenName }; warn = true; }
100
+ else if (firefox) { helpKey = FIREFOX_KEY[context] || FIREFOX_KEY.schedule; helpParams = { name: chosenName }; warn = true; }
101
+ else if (ml?.loading && !ml?.listed) helpKey = 'schedules.form.moreloginLoading';
102
+ // MoreLogin's own state is no news for a local profile that is listed, nor where there are only local profiles.
103
+ else if (chosenLocal && known) { /* the context's own help */ }
104
+ else if (ml?.error) { helpKey = 'schedules.form.moreloginError'; helpParams = { error: ml.error }; warn = true; }
105
+ else if (!ml?.running && !(ml?.localCount > 0 && !ml?.installed)) { helpKey = 'schedules.form.moreloginNotRunning'; warn = !!chosenId; }
106
+ return { entries, helpKey, helpParams, warn, firefox, missing };
107
+ }