synabun 2.2.1 → 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.
- package/CHANGELOG.md +53 -0
- package/README.md +1 -1
- package/docs/whatsapp.md +52 -20
- package/hooks/claude-code/pre-websearch.mjs +4 -1
- package/hooks/claude-code/prompt-submit.mjs +7 -0
- package/lib/mcp-build.js +519 -0
- package/lib/mcp-dist.js +10 -4
- package/lib/release-scan.mjs +23 -10
- package/lib/server-supervisor.js +7 -1
- package/lib/virustotal.mjs +146 -40
- package/mcp-server/dist/http.d.ts +57 -0
- package/mcp-server/dist/http.d.ts.map +1 -1
- package/mcp-server/dist/http.js +128 -18
- package/mcp-server/dist/http.js.map +1 -1
- package/mcp-server/dist/index.d.ts.map +1 -1
- package/mcp-server/dist/index.js +14 -9
- package/mcp-server/dist/index.js.map +1 -1
- package/mcp-server/dist/services/browser-route-flow.d.ts +119 -0
- package/mcp-server/dist/services/browser-route-flow.d.ts.map +1 -0
- package/mcp-server/dist/services/browser-route-flow.js +340 -0
- package/mcp-server/dist/services/browser-route-flow.js.map +1 -0
- package/mcp-server/dist/services/desktop-client.js +2 -2
- package/mcp-server/dist/services/desktop-client.js.map +1 -1
- package/mcp-server/dist/services/embedding-service.d.ts.map +1 -1
- package/mcp-server/dist/services/embedding-service.js +2 -1
- package/mcp-server/dist/services/embedding-service.js.map +1 -1
- package/mcp-server/dist/services/identity.d.ts +66 -3
- package/mcp-server/dist/services/identity.d.ts.map +1 -1
- package/mcp-server/dist/services/identity.js +61 -4
- package/mcp-server/dist/services/identity.js.map +1 -1
- package/mcp-server/dist/services/neural-interface.d.ts +133 -1
- package/mcp-server/dist/services/neural-interface.d.ts.map +1 -1
- package/mcp-server/dist/services/neural-interface.js +630 -64
- package/mcp-server/dist/services/neural-interface.js.map +1 -1
- package/mcp-server/dist/services/tool-catalog.js +2 -2
- package/mcp-server/dist/services/tool-catalog.js.map +1 -1
- package/mcp-server/dist/tools/agents.d.ts +3 -2
- package/mcp-server/dist/tools/agents.d.ts.map +1 -1
- package/mcp-server/dist/tools/agents.js +6 -4
- package/mcp-server/dist/tools/agents.js.map +1 -1
- package/mcp-server/dist/tools/bluesky.d.ts +20 -7
- package/mcp-server/dist/tools/bluesky.d.ts.map +1 -1
- package/mcp-server/dist/tools/bluesky.js +147 -45
- package/mcp-server/dist/tools/bluesky.js.map +1 -1
- package/mcp-server/dist/tools/browser-advanced.d.ts +13 -2
- package/mcp-server/dist/tools/browser-advanced.d.ts.map +1 -1
- package/mcp-server/dist/tools/browser-advanced.js +153 -18
- package/mcp-server/dist/tools/browser-advanced.js.map +1 -1
- package/mcp-server/dist/tools/browser-cheatsheet.d.ts +2 -0
- package/mcp-server/dist/tools/browser-cheatsheet.d.ts.map +1 -1
- package/mcp-server/dist/tools/browser-cheatsheet.js +3 -0
- package/mcp-server/dist/tools/browser-cheatsheet.js.map +1 -1
- package/mcp-server/dist/tools/browser-navigate.d.ts +3 -3
- package/mcp-server/dist/tools/browser-navigate.d.ts.map +1 -1
- package/mcp-server/dist/tools/browser-navigate.js +19 -16
- package/mcp-server/dist/tools/browser-navigate.js.map +1 -1
- package/mcp-server/dist/tools/browser-observe.d.ts +2 -1
- package/mcp-server/dist/tools/browser-observe.d.ts.map +1 -1
- package/mcp-server/dist/tools/browser-observe.js +61 -20
- package/mcp-server/dist/tools/browser-observe.js.map +1 -1
- package/mcp-server/dist/tools/morelogin.d.ts +13 -3
- package/mcp-server/dist/tools/morelogin.d.ts.map +1 -1
- package/mcp-server/dist/tools/morelogin.js +82 -19
- package/mcp-server/dist/tools/morelogin.js.map +1 -1
- package/mcp-server/dist/tools/skill-tools.d.ts +4 -4
- package/mcp-server/dist/tools/youtube/helpers.d.ts +1 -0
- package/mcp-server/dist/tools/youtube/helpers.d.ts.map +1 -1
- package/mcp-server/dist/tools/youtube/helpers.js +1 -1
- package/mcp-server/dist/tools/youtube/helpers.js.map +1 -1
- package/mcp-server/dist/tools/youtube/upload.d.ts.map +1 -1
- package/mcp-server/dist/tools/youtube/upload.js +225 -88
- package/mcp-server/dist/tools/youtube/upload.js.map +1 -1
- package/mcp-server/package-lock.json +2 -2
- package/mcp-server/package.json +1 -1
- package/mcp-server/src/http.ts +135 -17
- package/mcp-server/src/index.ts +15 -9
- package/mcp-server/src/services/browser-route-flow.ts +403 -0
- package/mcp-server/src/services/desktop-client.ts +2 -2
- package/mcp-server/src/services/embedding-service.ts +2 -1
- package/mcp-server/src/services/identity.ts +80 -4
- package/mcp-server/src/services/neural-interface.ts +648 -73
- package/mcp-server/src/services/tool-catalog.ts +2 -2
- package/mcp-server/src/tools/agents.ts +8 -4
- package/mcp-server/src/tools/bluesky.ts +164 -51
- package/mcp-server/src/tools/browser-advanced.ts +142 -17
- package/mcp-server/src/tools/browser-cheatsheet.ts +3 -0
- package/mcp-server/src/tools/browser-navigate.ts +19 -16
- package/mcp-server/src/tools/browser-observe.ts +62 -20
- package/mcp-server/src/tools/morelogin.ts +82 -19
- package/mcp-server/src/tools/youtube/helpers.ts +2 -2
- package/mcp-server/src/tools/youtube/upload.ts +218 -99
- package/neural-interface/i18n/en.json +655 -123
- package/neural-interface/i18n/pt-BR.json +542 -10
- package/neural-interface/lib/assistant-api.js +90 -23
- package/neural-interface/lib/assistant-brains/claude.js +5 -0
- package/neural-interface/lib/assistant-catalog.js +134 -3
- package/neural-interface/lib/assistant-dispatch.js +97 -1
- package/neural-interface/lib/assistant-persona.js +15 -7
- package/neural-interface/lib/assistant-router.js +6 -4
- package/neural-interface/lib/assistant-runtime.js +18 -1
- package/neural-interface/lib/assistant-task-prompt.js +5 -0
- package/neural-interface/lib/assistant-tools.js +10 -1
- package/neural-interface/lib/automation-approval.js +249 -0
- package/neural-interface/lib/automation-browser-owner-access.js +82 -0
- package/neural-interface/lib/backup-service.js +16 -1
- package/neural-interface/lib/browser-automation-routes.js +84 -0
- package/neural-interface/lib/browser-background-tab.js +72 -3
- package/neural-interface/lib/browser-execution.js +16 -3
- package/neural-interface/lib/browser-extraction.js +106 -45
- package/neural-interface/lib/browser-owner.js +48 -0
- package/neural-interface/lib/browser-profile-choices.js +143 -0
- package/neural-interface/lib/browser-profiles.js +142 -0
- package/neural-interface/lib/browser-session-close.js +84 -0
- package/neural-interface/lib/browser-start-handoff.js +202 -0
- package/neural-interface/lib/browser-tab-recovery.js +153 -0
- package/neural-interface/lib/browser-tool-policy.js +23 -4
- package/neural-interface/lib/browser-wedge-retire.js +64 -0
- package/neural-interface/lib/chromium-on-device-model.js +67 -0
- package/neural-interface/lib/claude-agent-bridge.js +43 -5
- package/neural-interface/lib/claude-background-hold.js +239 -0
- package/neural-interface/lib/claude-model-catalog.js +12 -0
- package/neural-interface/lib/effort-levels.js +28 -2
- package/neural-interface/lib/exec-loop-command.js +8 -0
- package/neural-interface/lib/http-guards.js +11 -6
- package/neural-interface/lib/local-profile-proxy.js +362 -0
- package/neural-interface/lib/local-profiles.js +929 -0
- package/neural-interface/lib/loop-logger.js +31 -5
- package/neural-interface/lib/maritaca/api.js +179 -0
- package/neural-interface/lib/maritaca/attachments.js +44 -0
- package/neural-interface/lib/maritaca/client.js +362 -0
- package/neural-interface/lib/maritaca/key-store.js +122 -0
- package/neural-interface/lib/maritaca/models.js +181 -0
- package/neural-interface/lib/maritaca/modes.js +39 -0
- package/neural-interface/lib/maritaca/opencode-proxy.js +236 -0
- package/neural-interface/lib/maritaca/opencode-stream.js +345 -0
- package/neural-interface/lib/maritaca/opencode.js +218 -0
- package/neural-interface/lib/maritaca/panel-bridge.js +273 -0
- package/neural-interface/lib/maritaca/sessions.js +198 -0
- package/neural-interface/lib/mcp-external-servers.js +37 -10
- package/neural-interface/lib/morelogin-agent-profiles.js +149 -0
- package/neural-interface/lib/morelogin.js +278 -14
- package/neural-interface/lib/native-loop-providers.js +124 -11
- package/neural-interface/lib/native-loop-runtime.js +112 -11
- package/neural-interface/lib/owner-authority.js +137 -43
- package/neural-interface/lib/page-session.js +111 -27
- package/neural-interface/lib/peer-identity.js +263 -43
- package/neural-interface/lib/provider-panel-api-key-auth.js +7 -2
- package/neural-interface/lib/pty-host/core.js +36 -0
- package/neural-interface/lib/pty-host/protocol.js +2 -0
- package/neural-interface/lib/request-gate.js +2 -0
- package/neural-interface/lib/skills/api-v2.js +13 -2
- package/neural-interface/lib/skills/creation-api.js +3 -1
- package/neural-interface/lib/skills/evals-api.js +5 -1
- package/neural-interface/lib/social-write-pacing.js +151 -0
- package/neural-interface/lib/system-activity.js +1 -1
- package/neural-interface/lib/terminal-token-redaction.js +293 -0
- package/neural-interface/lib/terminal-tokens.js +436 -0
- package/neural-interface/lib/worker-mcp-channel.js +45 -10
- package/neural-interface/package-lock.json +3 -2
- package/neural-interface/package.json +2 -1
- package/neural-interface/public/assets/mascot/README.md +11 -0
- package/neural-interface/public/assets/mascot/ask.gif +0 -0
- package/neural-interface/public/assets/mascot/ask.png +0 -0
- package/neural-interface/public/assets/mascot/blocked.gif +0 -0
- package/neural-interface/public/assets/mascot/blocked.png +0 -0
- package/neural-interface/public/assets/mascot/budget.gif +0 -0
- package/neural-interface/public/assets/mascot/budget.png +0 -0
- package/neural-interface/public/assets/mascot/computer.gif +0 -0
- package/neural-interface/public/assets/mascot/computer.png +0 -0
- package/neural-interface/public/assets/mascot/edit.gif +0 -0
- package/neural-interface/public/assets/mascot/edit.png +0 -0
- package/neural-interface/public/assets/mascot/error.gif +0 -0
- package/neural-interface/public/assets/mascot/error.png +0 -0
- package/neural-interface/public/assets/mascot/hover-attention.gif +0 -0
- package/neural-interface/public/assets/mascot/hover-attention.png +0 -0
- package/neural-interface/public/assets/mascot/idle-hero.gif +0 -0
- package/neural-interface/public/assets/mascot/idle-hero.png +0 -0
- package/neural-interface/public/assets/mascot/idle.gif +0 -0
- package/neural-interface/public/assets/mascot/idle.png +0 -0
- package/neural-interface/public/assets/mascot/manifest.json +254 -0
- package/neural-interface/public/assets/mascot/mcp.gif +0 -0
- package/neural-interface/public/assets/mascot/mcp.png +0 -0
- package/neural-interface/public/assets/mascot/memory.gif +0 -0
- package/neural-interface/public/assets/mascot/memory.png +0 -0
- package/neural-interface/public/assets/mascot/offline.gif +0 -0
- package/neural-interface/public/assets/mascot/offline.png +0 -0
- package/neural-interface/public/assets/mascot/pick.gif +0 -0
- package/neural-interface/public/assets/mascot/pick.png +0 -0
- package/neural-interface/public/assets/mascot/plan.gif +0 -0
- package/neural-interface/public/assets/mascot/plan.png +0 -0
- package/neural-interface/public/assets/mascot/present.gif +0 -0
- package/neural-interface/public/assets/mascot/present.png +0 -0
- package/neural-interface/public/assets/mascot/project.gif +0 -0
- package/neural-interface/public/assets/mascot/project.png +0 -0
- package/neural-interface/public/assets/mascot/read.gif +0 -0
- package/neural-interface/public/assets/mascot/read.png +0 -0
- package/neural-interface/public/assets/mascot/runs.gif +0 -0
- package/neural-interface/public/assets/mascot/runs.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/automation.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/automation.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/browser.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/browser.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/code.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/code.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/complex.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/complex.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/computer.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/computer.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/design.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/design.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/edit.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/edit.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/generic.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/generic.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/image_gen.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/image_gen.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/manifest.json +173 -0
- package/neural-interface/public/assets/mascot/scenes/memory.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/memory.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/quick.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/quick.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/read.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/read.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/research.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/research.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/review.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/review.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/search.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/search.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/shell.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/shell.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/thinking.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/thinking.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/video_gen.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/video_gen.png +0 -0
- package/neural-interface/public/assets/mascot/scenes/web.gif +0 -0
- package/neural-interface/public/assets/mascot/scenes/web.png +0 -0
- package/neural-interface/public/assets/mascot/search.gif +0 -0
- package/neural-interface/public/assets/mascot/search.png +0 -0
- package/neural-interface/public/assets/mascot/shell.gif +0 -0
- package/neural-interface/public/assets/mascot/shell.png +0 -0
- package/neural-interface/public/assets/mascot/skill.gif +0 -0
- package/neural-interface/public/assets/mascot/skill.png +0 -0
- package/neural-interface/public/assets/mascot/sleep.gif +0 -0
- package/neural-interface/public/assets/mascot/sleep.png +0 -0
- package/neural-interface/public/assets/mascot/subagent.gif +0 -0
- package/neural-interface/public/assets/mascot/subagent.png +0 -0
- package/neural-interface/public/assets/mascot/success.gif +0 -0
- package/neural-interface/public/assets/mascot/success.png +0 -0
- package/neural-interface/public/assets/mascot/think.gif +0 -0
- package/neural-interface/public/assets/mascot/think.png +0 -0
- package/neural-interface/public/assets/mascot/wait.gif +0 -0
- package/neural-interface/public/assets/mascot/wait.png +0 -0
- package/neural-interface/public/assets/mascot/watch.gif +0 -0
- package/neural-interface/public/assets/mascot/watch.png +0 -0
- package/neural-interface/public/assets/mascot/web.gif +0 -0
- package/neural-interface/public/assets/mascot/web.png +0 -0
- package/neural-interface/public/onboarding.html +14 -1
- package/neural-interface/public/shared/agent-runtime-options.js +49 -8
- package/neural-interface/public/shared/agy/agy-panel.js +2 -2
- package/neural-interface/public/shared/agy/agy-render.js +41 -1
- package/neural-interface/public/shared/agy/agy-styles.js +5 -0
- package/neural-interface/public/shared/api.js +5 -4
- package/neural-interface/public/shared/assistant/asst-ask-styles.js +8 -8
- package/neural-interface/public/shared/assistant/asst-ask.js +1 -1
- package/neural-interface/public/shared/assistant/asst-brain-picker.js +99 -9
- package/neural-interface/public/shared/assistant/asst-computer.js +47 -2
- package/neural-interface/public/shared/assistant/asst-control.js +1 -1
- package/neural-interface/public/shared/assistant/asst-limit-wait.js +7 -5
- package/neural-interface/public/shared/assistant/asst-panel.js +13 -5
- package/neural-interface/public/shared/assistant/asst-rack-styles.js +4 -4
- package/neural-interface/public/shared/assistant/asst-render.js +16 -10
- package/neural-interface/public/shared/assistant/asst-route-models.js +64 -4
- package/neural-interface/public/shared/assistant/asst-route.js +24 -7
- package/neural-interface/public/shared/assistant/asst-routes-editor.js +154 -39
- package/neural-interface/public/shared/assistant/asst-run-stage.js +3 -3
- package/neural-interface/public/shared/assistant/asst-scene-styles.js +8 -111
- package/neural-interface/public/shared/assistant/asst-scenes.js +46 -318
- package/neural-interface/public/shared/assistant/asst-sidepanel.js +2 -2
- package/neural-interface/public/shared/assistant/asst-state.js +72 -2
- package/neural-interface/public/shared/assistant/asst-styles.js +60 -15
- package/neural-interface/public/shared/automation-approval-view.js +75 -0
- package/neural-interface/public/shared/cdx/cdx-panel.js +2 -2
- package/neural-interface/public/shared/cdx/cdx-render.js +73 -7
- package/neural-interface/public/shared/cdx/cdx-tabs.js +3 -3
- package/neural-interface/public/shared/context-menu-model.js +2 -0
- package/neural-interface/public/shared/cp/cp-agents.js +8 -0
- package/neural-interface/public/shared/cp/cp-permissions.js +6 -2
- package/neural-interface/public/shared/cp/cp-rehydrate.js +25 -1
- package/neural-interface/public/shared/cp/cp-tasks-model.js +33 -0
- package/neural-interface/public/shared/editor/editor-panel-logic.js +10 -0
- package/neural-interface/public/shared/editor/editor-panel.js +10 -2
- package/neural-interface/public/shared/html-shell.js +30 -22
- package/neural-interface/public/shared/judgments-log-origins.js +29 -0
- package/neural-interface/public/shared/morelogin-profile-choices.js +107 -0
- package/neural-interface/public/shared/morelogin-profile-field.js +186 -0
- package/neural-interface/public/shared/mtc/mtc-client.js +181 -0
- package/neural-interface/public/shared/mtc/mtc-compose.js +40 -0
- package/neural-interface/public/shared/mtc/mtc-copy.js +253 -0
- package/neural-interface/public/shared/mtc/mtc-logic.js +478 -0
- package/neural-interface/public/shared/mtc/mtc-panel.js +1354 -0
- package/neural-interface/public/shared/mtc/mtc-render.js +172 -0
- package/neural-interface/public/shared/mtc/mtc-styles.js +437 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-automation-ownership.js +23 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-events.js +13 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-icons.js +3 -1
- package/neural-interface/public/shared/ocp-v2/ocp-v2-panel.js +10 -4
- package/neural-interface/public/shared/ocp-v2/ocp-v2-render.js +6 -86
- package/neural-interface/public/shared/ocp-v2/ocp-v2-ws.js +5 -2
- package/neural-interface/public/shared/owner-access.js +134 -0
- package/neural-interface/public/shared/owner-authority-view.js +92 -0
- package/neural-interface/public/shared/page-session.js +143 -14
- package/neural-interface/public/shared/poll-backoff.js +59 -0
- package/neural-interface/public/shared/provider-icons.js +3 -0
- package/neural-interface/public/shared/schedules-view.js +7 -0
- package/neural-interface/public/shared/server-back.js +50 -0
- package/neural-interface/public/shared/settings/settings-browser-owner-access.js +72 -0
- package/neural-interface/public/shared/settings/settings-data.js +7 -1
- package/neural-interface/public/shared/settings/settings-ia.js +3 -1
- package/neural-interface/public/shared/settings/settings-kit.js +11 -3
- package/neural-interface/public/shared/settings/settings-local-profiles.js +153 -0
- package/neural-interface/public/shared/settings/settings-maritaca-opencode.js +105 -0
- package/neural-interface/public/shared/settings/settings-shell.js +7 -0
- package/neural-interface/public/shared/shown-children.js +72 -0
- package/neural-interface/public/shared/sidepanel-session-status.js +16 -2
- package/neural-interface/public/shared/state.js +1 -1
- package/neural-interface/public/shared/static-bg-state.js +22 -0
- package/neural-interface/public/shared/styles.css +457 -164
- package/neural-interface/public/shared/synabun-mascot-assets.js +67 -0
- package/neural-interface/public/shared/synabun-mascot.js +136 -12
- package/neural-interface/public/shared/synabun-ticker.js +3 -0
- package/neural-interface/public/shared/synabun-tools.js +173 -0
- package/neural-interface/public/shared/tool-heartbeat.js +43 -0
- package/neural-interface/public/shared/tool-list-picker.js +3 -1
- package/neural-interface/public/shared/tool-list-view.js +23 -4
- package/neural-interface/public/shared/topright-overflow-logic.js +1 -0
- package/neural-interface/public/shared/ui-automation-approval.js +188 -0
- package/neural-interface/public/shared/ui-automation-studio.js +138 -91
- package/neural-interface/public/shared/ui-claude-panel.js +209 -31
- package/neural-interface/public/shared/ui-judgments.js +37 -10
- package/neural-interface/public/shared/ui-maritaca-panel.js +15 -0
- package/neural-interface/public/shared/ui-navbar.js +23 -0
- package/neural-interface/public/shared/ui-owner-access.js +191 -0
- package/neural-interface/public/shared/ui-owner-authority.js +162 -0
- package/neural-interface/public/shared/ui-panels.js +3 -1
- package/neural-interface/public/shared/ui-schedules-studio.js +118 -17
- package/neural-interface/public/shared/ui-scroll-follow.js +3 -0
- package/neural-interface/public/shared/ui-sessions.js +45 -16
- package/neural-interface/public/shared/ui-settings.js +676 -42
- package/neural-interface/public/shared/ui-sidepanel-session-entry.js +8 -2
- package/neural-interface/public/shared/ui-sidepanel-sessions.js +3 -3
- package/neural-interface/public/shared/ui-sidepanel-tray.js +24 -0
- package/neural-interface/public/shared/ui-sidepanel-windows.js +1 -1
- package/neural-interface/public/shared/ui-terminal.js +15 -7
- package/neural-interface/public/shared/ui-tutorial-preview.js +4 -0
- package/neural-interface/public/shared/ui-update.js +3 -0
- package/neural-interface/public/shared/ui-whiteboard.js +4 -0
- package/neural-interface/public/shared/window-keys.js +38 -0
- package/neural-interface/scripts/build-mascot-assets.mjs +30 -0
- package/neural-interface/server.js +2903 -359
- package/npm-shrinkwrap.json +5 -17
- package/package.json +5 -6
- package/postinstall.js +38 -39
- package/setup.js +33 -31
- package/skills/synabun/modules/changelog.md +14 -0
|
@@ -61,8 +61,11 @@ export const CODEX_FALLBACK_MODELS = [
|
|
|
61
61
|
export const CODEX_DEFAULT_MODEL_IDS = CODEX_FALLBACK_MODELS.map(m => m.id);
|
|
62
62
|
|
|
63
63
|
export const EFFORT_LEVELS_BY_PROFILE = {
|
|
64
|
+
// `off` is Auto: no --effort, the model's own default. Off (thinking disabled) is the id `none`
|
|
65
|
+
// (lib/effort-levels.js EFFORT_OFF), which every Claude Code runner starts with thinking disabled.
|
|
64
66
|
'claude-code': [
|
|
65
|
-
{ id: 'off', label: '
|
|
67
|
+
{ id: 'off', label: 'Auto', desc: 'Model default' },
|
|
68
|
+
{ id: 'none', label: 'Off', desc: 'No thinking' },
|
|
66
69
|
{ id: 'low', label: 'Low', desc: 'Minimal' },
|
|
67
70
|
{ id: 'medium', label: 'Med', desc: 'Balanced', tier: 'default' },
|
|
68
71
|
{ id: 'high', label: 'High', desc: 'Deep' },
|
|
@@ -145,7 +148,7 @@ export function modelEffortIds(model) {
|
|
|
145
148
|
return source ? sortEfforts(source) : null;
|
|
146
149
|
}
|
|
147
150
|
|
|
148
|
-
/** `effort` clamped into `ids`: kept, else the highest id below it, else the lowest. null for auto
|
|
151
|
+
/** `effort` clamped into `ids`: kept, else the highest id below it, else the lowest (never `none`). null for auto. */
|
|
149
152
|
export function clampEffortId(effort, ids) {
|
|
150
153
|
const want = String(effort ?? '').trim();
|
|
151
154
|
if (!want || AUTO_EFFORTS.has(want.toLowerCase()) || !ids?.length) return null;
|
|
@@ -153,7 +156,9 @@ export function clampEffortId(effort, ids) {
|
|
|
153
156
|
if (same) return same;
|
|
154
157
|
const rank = effortRank(want);
|
|
155
158
|
if (rank < 0) return null;
|
|
156
|
-
|
|
159
|
+
// `none` (thinking off) is a choice, never where a correction lands (lib/effort-levels.js clampEffort).
|
|
160
|
+
const ranked = ids.filter(id => effortRank(id) >= 0 && id.toLowerCase() !== 'none');
|
|
161
|
+
if (!ranked.length) return ids.find(id => id.toLowerCase() !== 'none') || null;
|
|
157
162
|
const below = ranked.filter(id => effortRank(id) < rank);
|
|
158
163
|
return below.length ? below[below.length - 1] : (ranked[0] || ids[0]);
|
|
159
164
|
}
|
|
@@ -679,11 +684,29 @@ export function getEffortLevelsForProfile(profileId) {
|
|
|
679
684
|
return EFFORT_LEVELS_BY_PROFILE[profileId] || [];
|
|
680
685
|
}
|
|
681
686
|
|
|
687
|
+
// Off: thinking disabled. One id across providers (lib/effort-levels.js EFFORT_OFF).
|
|
688
|
+
export const EFFORT_OFF = 'none';
|
|
689
|
+
const EFFORT_OFF_CHOICE = Object.freeze({ id: EFFORT_OFF, label: 'Off', desc: 'No thinking' });
|
|
690
|
+
|
|
691
|
+
/**
|
|
692
|
+
* Can this model run with thinking off? Mirrors lib/effort-levels.js supportsEffortOff: Claude Code
|
|
693
|
+
* whenever the model thinks at all (Haiku lists no level: no; a model nothing is known about: yes,
|
|
694
|
+
* the SDK and `--thinking disabled` work for any), Codex and OpenCode only when the model lists
|
|
695
|
+
* `none`, Antigravity never.
|
|
696
|
+
*/
|
|
697
|
+
export function modelSupportsEffortOff(profileId, model) {
|
|
698
|
+
const ids = modelEffortIds(model);
|
|
699
|
+
if (profileId === 'claude-code') return ids ? ids.some(id => id.toLowerCase() !== EFFORT_OFF) : true;
|
|
700
|
+
if (profileId === 'antigravity') return false;
|
|
701
|
+
return !!ids?.some(id => id.toLowerCase() === EFFORT_OFF);
|
|
702
|
+
}
|
|
703
|
+
|
|
682
704
|
// Effort levels a specific model actually supports, led by `off` (the model's
|
|
683
|
-
// default
|
|
684
|
-
//
|
|
685
|
-
//
|
|
686
|
-
//
|
|
705
|
+
// default, "Auto" for Claude Code), then Off (`none`, thinking disabled) where
|
|
706
|
+
// the model can run it, then its levels. Every provider advertises them per
|
|
707
|
+
// model (see modelEffortIds), and some models support none at all — Haiku has
|
|
708
|
+
// no thinking, so passing --effort to it is meaningless. The provider list is
|
|
709
|
+
// only the fallback for a model nothing is known about.
|
|
687
710
|
export function getEffortLevelsForModel(profileId, model) {
|
|
688
711
|
const profileLevels = getEffortLevelsForProfile(profileId);
|
|
689
712
|
const advertised = modelEffortIds(model);
|
|
@@ -691,7 +714,9 @@ export function getEffortLevelsForModel(profileId, model) {
|
|
|
691
714
|
const off = profileLevels.find(e => e.id === 'off') || { id: 'off', label: 'Default', desc: 'Model default' };
|
|
692
715
|
if (!advertised.length) return [off];
|
|
693
716
|
const byId = new Map(profileLevels.map(e => [e.id, e]));
|
|
694
|
-
|
|
717
|
+
const levels = advertised.filter(id => id.toLowerCase() !== EFFORT_OFF)
|
|
718
|
+
.map(id => byId.get(id) || { id, label: effortLabel(id), desc: '' });
|
|
719
|
+
return [off, ...(modelSupportsEffortOff(profileId, model) ? [EFFORT_OFF_CHOICE] : []), ...levels];
|
|
695
720
|
}
|
|
696
721
|
|
|
697
722
|
// Does this model support any thinking at all? Used to disable the Think toggle.
|
|
@@ -702,13 +727,29 @@ export function modelSupportsEffort(model) {
|
|
|
702
727
|
return model.supportsEffort !== false;
|
|
703
728
|
}
|
|
704
729
|
|
|
730
|
+
/**
|
|
731
|
+
* A profile's effort list for a form that knows no model, keeping a saved Off (`none`) the list
|
|
732
|
+
* does not show (Codex: only some models list it), so redrawing the form never drops it to Auto.
|
|
733
|
+
*/
|
|
734
|
+
export function getEffortLevelsKeeping(profileId, selected) {
|
|
735
|
+
const levels = getEffortLevelsForProfile(profileId);
|
|
736
|
+
const value = String(selected || '').trim().toLowerCase();
|
|
737
|
+
if (value !== EFFORT_OFF || levels.some(e => e.id === EFFORT_OFF) || !normalizeEffortForProfile(profileId, value)) return levels;
|
|
738
|
+
const [first, ...rest] = levels;
|
|
739
|
+
return first?.id === 'off' ? [first, EFFORT_OFF_CHOICE, ...rest] : [EFFORT_OFF_CHOICE, ...levels];
|
|
740
|
+
}
|
|
741
|
+
|
|
705
742
|
export function profileSupportsEffort(profileId) {
|
|
706
743
|
return getEffortLevelsForProfile(profileId).some(e => e.id !== 'off');
|
|
707
744
|
}
|
|
708
745
|
|
|
746
|
+
// What a launch sends: `off` (Auto) is nothing; Off (`none`) is kept for every CLI that can switch
|
|
747
|
+
// thinking off (Codex takes `model_reasoning_effort=none` whatever the fallback list says), so a
|
|
748
|
+
// saved Off never turns into the model's default or a level on the way to the server.
|
|
709
749
|
export function normalizeEffortForProfile(profileId, effort) {
|
|
710
750
|
const value = String(effort || '').trim();
|
|
711
751
|
if (!value || value === 'off') return null;
|
|
752
|
+
if (value.toLowerCase() === EFFORT_OFF) return profileId === 'claude-code' || profileId === 'codex' ? EFFORT_OFF : null;
|
|
712
753
|
const levels = getEffortLevelsForProfile(profileId);
|
|
713
754
|
return levels.some(e => e.id === value) ? value : null;
|
|
714
755
|
}
|
|
@@ -51,7 +51,7 @@ import { setCliInstallTranslator } from '../cli-install-view.js';
|
|
|
51
51
|
import { workerRestart } from '../worker-restart.js';
|
|
52
52
|
import { endWorkerRunOnClose, forgetWorkerEnd, trackWorkerEnd } from '../ui-worker-end.js';
|
|
53
53
|
import { nativeLoopWindowId } from '../ui-native-window-id.js';
|
|
54
|
-
import { runAwaitsAnswer } from '../sidepanel-session-status.js';
|
|
54
|
+
import { runAwaitsAnswer, runTurnLive } from '../sidepanel-session-status.js';
|
|
55
55
|
import { wireFileLinks } from '../ui-file-links.js';
|
|
56
56
|
import { notify, NOTIF_TYPE } from '../ui-notifications.js';
|
|
57
57
|
import { forgetGreeting, mountGreeting } from '../greeting/greeting-card.js';
|
|
@@ -2482,7 +2482,7 @@ export async function attachAntigravityAutomation(run, { focus = !!run?.focus, i
|
|
|
2482
2482
|
tab.automationActive = !!restart?.active || running;
|
|
2483
2483
|
tab.automationOwnerId = nativeLoopWindowId;
|
|
2484
2484
|
tab.automationAwaits = runAwaitsAnswer(run);
|
|
2485
|
-
tab.running =
|
|
2485
|
+
tab.running = runTurnLive(run);
|
|
2486
2486
|
const rt = runtimeOf(tab);
|
|
2487
2487
|
syncWorkerQuestions(tab, run, {
|
|
2488
2488
|
open: (id, pending) => rt.elicitations.set(id, { ...pending.input, ...(pending.questions?.length ? { message: pending.questions.map((q) => q.header || q.question).join(' · ') } : {}), requestId: id, state: 'open', errors: {} }),
|
|
@@ -17,6 +17,7 @@ import { diffView, DIFF_LIMITS } from './agy-diff.js';
|
|
|
17
17
|
import { durationLabel, toolSummary, usageParts, compactNumber } from './agy-events.js';
|
|
18
18
|
import { relativeToProject } from './agy-commands.js';
|
|
19
19
|
import { elicitationFields, elicitationUrl } from './agy-options.js';
|
|
20
|
+
import { synabunToolKey, synabunToolLabel, synabunToolSummary } from '../synabun-tools.js';
|
|
20
21
|
|
|
21
22
|
const HTML_ESCAPES = { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''', '`': '`' };
|
|
22
23
|
export const esc = (value) => String(value ?? '').replace(/[&<>"'`]/g, (c) => HTML_ESCAPES[c]);
|
|
@@ -46,6 +47,29 @@ export const ICONS = Object.freeze({
|
|
|
46
47
|
cross: svg('<path d="M6 6l12 12M18 6 6 18"/>', { size: 12, width: 2.5 }),
|
|
47
48
|
});
|
|
48
49
|
|
|
50
|
+
// SynaBun's own tools wear its logo, as in every other panel.
|
|
51
|
+
export const SYNABUN_LOGO = '<img class="agy-synabun-logo" src="logoHD.png" alt="" aria-hidden="true">';
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* A SynaBun MCP call of a tool row: { key, args } ('bluesky_post' and the call's own arguments), else null.
|
|
55
|
+
* Antigravity calls an MCP tool through call_mcp_tool { ServerName, ToolName, Arguments }; a name in
|
|
56
|
+
* the prefixed spelling (mcp__SynaBun__x, SynaBun_x) counts too.
|
|
57
|
+
*/
|
|
58
|
+
export function synabunCallOf(row) {
|
|
59
|
+
const input = row?.rawInput && typeof row.rawInput === 'object' && !Array.isArray(row.rawInput) ? row.rawInput : {};
|
|
60
|
+
const server = typeof (input.ServerName ?? input.serverName ?? input.server) === 'string' ? (input.ServerName ?? input.serverName ?? input.server) : '';
|
|
61
|
+
const tool = typeof (input.ToolName ?? input.toolName ?? input.tool) === 'string' ? (input.ToolName ?? input.toolName ?? input.tool) : '';
|
|
62
|
+
if (server.trim() && tool.trim()) {
|
|
63
|
+
const key = synabunToolKey(tool, server);
|
|
64
|
+
if (key == null) return null;
|
|
65
|
+
let args = input.Arguments ?? input.arguments ?? {};
|
|
66
|
+
if (typeof args === 'string') { try { args = JSON.parse(args); } catch { args = {}; } }
|
|
67
|
+
return { key, args: args && typeof args === 'object' && !Array.isArray(args) ? args : {} };
|
|
68
|
+
}
|
|
69
|
+
const named = synabunToolKey(row?.name) ?? (/^mcp__/i.test(String(row?.title || '')) ? synabunToolKey(row.title) : null);
|
|
70
|
+
return named != null ? { key: named, args: input } : null;
|
|
71
|
+
}
|
|
72
|
+
|
|
49
73
|
const KIND_ICON = { read: 'read', edit: 'edit', delete: 'delete', move: 'move', search: 'search', execute: 'execute', think: 'think', fetch: 'fetch', switch_mode: 'switch_mode' };
|
|
50
74
|
|
|
51
75
|
const STATUS_TONE = { pending: 'running', in_progress: 'running', completed: 'success', failed: 'error' };
|
|
@@ -152,9 +176,25 @@ export function toolHtml(row, { T, cwd = '', detail = 'standard', opened, closed
|
|
|
152
176
|
if (row.rawOutput !== null && row.rawOutput !== undefined) parts.push(`<div class="agy-raw"><div class="agy-raw-label">${esc(T('rawOutput'))}</div>${jsonBlock(row.rawOutput, T)}</div>`);
|
|
153
177
|
}
|
|
154
178
|
const body = parts.filter(Boolean).join('');
|
|
179
|
+
const duration = durationLabel(row.startedAt, row.endedAt);
|
|
180
|
+
const statusWordOf = () => (row.status === 'completed' ? T('toolDone') : row.status === 'failed' ? T('toolFailed') : row.status === 'in_progress' ? T('toolRunning') : T('toolPending'));
|
|
181
|
+
// A SynaBun tool: the logo, its friendly name ('Bluesky · Post') and what the call is about.
|
|
182
|
+
const sb = synabunCallOf(row);
|
|
183
|
+
if (sb) {
|
|
184
|
+
return cardHtml({
|
|
185
|
+
cls: `agy-tool agy-tool-synabun status-${esc(row.status)}`,
|
|
186
|
+
icon: SYNABUN_LOGO,
|
|
187
|
+
title: esc(synabunToolLabel(sb.key)),
|
|
188
|
+
titleAttr: `SynaBun · ${sb.key}`,
|
|
189
|
+
subtitle: esc([synabunToolSummary(sb.key, sb.args), duration].filter(Boolean).join(' · ')),
|
|
190
|
+
status: statusPill(statusWordOf(), STATUS_TONE[row.status] === 'success' ? '' : STATUS_TONE[row.status] || ''),
|
|
191
|
+
body,
|
|
192
|
+
open: toolOpen(row, { detail, opened, closed }),
|
|
193
|
+
attrs: ` data-tool="${esc(row.toolCallId)}"`,
|
|
194
|
+
});
|
|
195
|
+
}
|
|
155
196
|
const summary = toolSummary(row);
|
|
156
197
|
const shown = row.toolKind === 'execute' ? summary : relativeToProject(cwd, summary);
|
|
157
|
-
const duration = durationLabel(row.startedAt, row.endedAt);
|
|
158
198
|
const kindWord = T(`kind_${KIND_ICON[row.toolKind] ? row.toolKind : 'other'}`);
|
|
159
199
|
const subtitle = esc([kindWord, row.name && row.name !== kindWord ? row.name : '', duration].filter(Boolean).join(' · '));
|
|
160
200
|
const statusWord = row.status === 'completed' ? T('toolDone') : row.status === 'failed' ? T('toolFailed') : row.status === 'in_progress' ? T('toolRunning') : T('toolPending');
|
|
@@ -39,6 +39,7 @@ export function injectAntigravityStyles() {
|
|
|
39
39
|
--agy-link: #9dc3ff;
|
|
40
40
|
--agy-focus: rgba(255,255,255,0.7);
|
|
41
41
|
--agy-brand: #669DF6;
|
|
42
|
+
--agy-synabun: #ffd700; /* the style guide accent: SynaBun tools */
|
|
42
43
|
--agy-radius-sm: 4px;
|
|
43
44
|
--agy-radius-md: 8px;
|
|
44
45
|
--agy-radius-lg: 12px;
|
|
@@ -272,6 +273,10 @@ export function injectAntigravityStyles() {
|
|
|
272
273
|
.agy-request { box-shadow: inset 2px 0 0 var(--agy-warning); }
|
|
273
274
|
.agy-request .agy-card-title { white-space: normal; overflow-wrap: anywhere; }
|
|
274
275
|
.agy-request.agy-request-done { box-shadow: none; opacity: 0.7; }
|
|
276
|
+
/* SynaBun tools: the logo and a thin accent at the edge, as in the Codex panel (not a filled box). */
|
|
277
|
+
.agy-tool-synabun { box-shadow: inset 2px 0 0 var(--agy-synabun); }
|
|
278
|
+
.agy-tool-synabun > .agy-card-head > .agy-card-titles > .agy-card-title { color: var(--agy-synabun); }
|
|
279
|
+
.agy-synabun-logo { width: 14px; height: 14px; object-fit: contain; display: block; }
|
|
275
280
|
.agy-tool-image { max-width: 100%; max-height: 220px; border-radius: var(--agy-radius-sm); object-fit: contain; align-self: flex-start; }
|
|
276
281
|
|
|
277
282
|
/* Buttons inside cards and the setup card: solid for the one primary action, hairline for the rest, red text for denial. */
|
|
@@ -775,6 +775,7 @@ export async function stopTunnel() {
|
|
|
775
775
|
|
|
776
776
|
// ─── Last Session (resume after restart) ──
|
|
777
777
|
|
|
778
|
+
/** The sessions to offer for resume: `{ sessions: [] , reason }` when there are none (an older server answered 404). */
|
|
778
779
|
export async function fetchLastSession() {
|
|
779
780
|
const r = await fetch('/api/last-session');
|
|
780
781
|
if (!r.ok) return null;
|
|
@@ -1459,10 +1460,10 @@ export async function fetchScheduleTimers() {
|
|
|
1459
1460
|
|
|
1460
1461
|
// ── Quick Timers ──
|
|
1461
1462
|
|
|
1462
|
-
export async function createQuickTimer(templateId, minutes, { profile, model, contextMode, effort, tools, usesBrowser, codexAccountId } = {}) {
|
|
1463
|
+
export async function createQuickTimer(templateId, minutes, { profile, model, contextMode, effort, tools, usesBrowser, codexAccountId, moreloginEnvId, moreloginEnvName } = {}) {
|
|
1463
1464
|
return jsonFetch('/api/quick-timer', {
|
|
1464
1465
|
method: 'POST',
|
|
1465
|
-
...jsonBody({ templateId, minutes, profile, model, contextMode, effort, tools, usesBrowser, codexAccountId }),
|
|
1466
|
+
...jsonBody({ templateId, minutes, profile, model, contextMode, effort, tools, usesBrowser, codexAccountId, moreloginEnvId, moreloginEnvName }),
|
|
1466
1467
|
});
|
|
1467
1468
|
}
|
|
1468
1469
|
|
|
@@ -1477,13 +1478,13 @@ export async function cancelQuickTimer(id) {
|
|
|
1477
1478
|
}
|
|
1478
1479
|
|
|
1479
1480
|
export async function triggerQuickTimerNow(templateId, {
|
|
1480
|
-
profile, model, contextMode, effort, tools, usesBrowser, codexAccountId,
|
|
1481
|
+
profile, model, contextMode, effort, tools, usesBrowser, codexAccountId, moreloginEnvId, moreloginEnvName,
|
|
1481
1482
|
sidepanelWindowId, sidepanelClaimToken,
|
|
1482
1483
|
} = {}) {
|
|
1483
1484
|
return jsonFetch('/api/quick-timer/now', {
|
|
1484
1485
|
method: 'POST',
|
|
1485
1486
|
...jsonBody({
|
|
1486
|
-
templateId, profile, model, contextMode, effort, tools, usesBrowser, codexAccountId,
|
|
1487
|
+
templateId, profile, model, contextMode, effort, tools, usesBrowser, codexAccountId, moreloginEnvId, moreloginEnvName,
|
|
1487
1488
|
sidepanelWindowId, sidepanelClaimToken,
|
|
1488
1489
|
}),
|
|
1489
1490
|
});
|
|
@@ -17,9 +17,9 @@ export const ASK_STYLE_ID = 'asst-ask-styles';
|
|
|
17
17
|
|
|
18
18
|
export const ASK_CSS = `
|
|
19
19
|
.asst-ask {
|
|
20
|
-
--ask-face-col:
|
|
21
|
-
--ask-face-w:
|
|
22
|
-
--ask-face-h:
|
|
20
|
+
--ask-face-col: 124px;
|
|
21
|
+
--ask-face-w: 120px;
|
|
22
|
+
--ask-face-h: 60px;
|
|
23
23
|
--ask-ring: var(--asst-line);
|
|
24
24
|
}
|
|
25
25
|
.asst-ask-face { display: flex; flex: 0 0 var(--ask-face-col); justify-content: center; align-self: flex-start; min-width: 0; padding-top: 2px; color: var(--asst-text); line-height: 0; }
|
|
@@ -178,9 +178,9 @@ export const ASK_CSS = `
|
|
|
178
178
|
.asst-followups.asst-ask[data-style="question"] { --ask-ring: color-mix(in srgb, var(--asst-info) 30%, transparent); }
|
|
179
179
|
.asst-ask-receipt { display: none; }
|
|
180
180
|
.asst-followups.asst-ask:not([data-state="open"]):not([data-phase="sending"]) {
|
|
181
|
-
--ask-face-col:
|
|
182
|
-
--ask-face-w:
|
|
183
|
-
--ask-face-h:
|
|
181
|
+
--ask-face-col: 48px;
|
|
182
|
+
--ask-face-w: 48px;
|
|
183
|
+
--ask-face-h: 24px;
|
|
184
184
|
flex-direction: row;
|
|
185
185
|
align-items: center;
|
|
186
186
|
gap: 8px;
|
|
@@ -243,12 +243,12 @@ export const ASK_CSS = `
|
|
|
243
243
|
|
|
244
244
|
/* Narrow panels: a smaller mascot in a narrower column; at 320px the keys line goes. */
|
|
245
245
|
@container asst (max-width: 400px) {
|
|
246
|
-
.asst-ask { --ask-face-col:
|
|
246
|
+
.asst-ask { --ask-face-col: 100px; --ask-face-w: 96px; --ask-face-h: 48px; }
|
|
247
247
|
.asst-followups.asst-ask, .asst-control.asst-ask { padding: 10px; }
|
|
248
248
|
.asst-ask .asst-ask-option { min-height: 40px; }
|
|
249
249
|
}
|
|
250
250
|
@container asst (max-width: 320px) {
|
|
251
|
-
.asst-ask { --ask-face-col:
|
|
251
|
+
.asst-ask { --ask-face-col: 84px; --ask-face-w: 80px; --ask-face-h: 40px; }
|
|
252
252
|
.asst-ask .asst-ask-option { gap: 8px; padding: 6px 8px; }
|
|
253
253
|
.asst-ask:focus-within .asst-ask-keys { display: none; }
|
|
254
254
|
}
|
|
@@ -34,7 +34,7 @@ import { injectAskStyles } from './asst-ask-styles.js';
|
|
|
34
34
|
export { injectAskStyles };
|
|
35
35
|
|
|
36
36
|
/** The presenter's SVG, before the sheet's container queries shrink it. */
|
|
37
|
-
export const PRESENTER_SIZE = Object.freeze({ width:
|
|
37
|
+
export const PRESENTER_SIZE = Object.freeze({ width: 120, height: 60 });
|
|
38
38
|
const HOP_MS = 320; // the hop (300 ms) and a frame to land on
|
|
39
39
|
const WATCH_IDLE_MS = 1500; // a field nobody typed in for this long: back to the card's own pose
|
|
40
40
|
const WATCH_EVERY_MS = 120; // the caret is looked at no more often than this
|
|
@@ -43,7 +43,9 @@ import { modelChipForms, modelChipName, modelChipTag } from './asst-model-chip.j
|
|
|
43
43
|
import {
|
|
44
44
|
ACCOUNT_PROVIDERS,
|
|
45
45
|
BRAIN_PROVIDERS,
|
|
46
|
+
brainEffortChoices,
|
|
46
47
|
brainRequiresSwitch,
|
|
48
|
+
isAutoBrainEffort,
|
|
47
49
|
emptyProjectView,
|
|
48
50
|
modelShortName,
|
|
49
51
|
normalizeBrain,
|
|
@@ -157,7 +159,9 @@ export function fmtModelPrice(price) {
|
|
|
157
159
|
const a = trimNumber(price.input);
|
|
158
160
|
const b = trimNumber(price.output);
|
|
159
161
|
if (!a && !b) return '';
|
|
160
|
-
|
|
162
|
+
// Maritaca's rows are priced in BRL (per million tokens), never converted.
|
|
163
|
+
const c = price.unit === 'brl_per_mtok' ? 'R$' : '$';
|
|
164
|
+
return b ? `${c}${a || '?'}/${c}${b}` : `${c}${a}`;
|
|
161
165
|
}
|
|
162
166
|
|
|
163
167
|
function normalizeCatalogModel(m, extra = {}) {
|
|
@@ -297,6 +301,57 @@ function catalogSaysNone(remote, provider, local) {
|
|
|
297
301
|
return !(source === 'fallback' && local.length > 0 && !local.some(m => m.catalogSource === 'fallback'));
|
|
298
302
|
}
|
|
299
303
|
|
|
304
|
+
/** The OpenCode provider id Maritaca is registered under: its OpenCode rows are `maritaca/<id>`. */
|
|
305
|
+
export const MARITACA_PREFIX = 'maritaca/';
|
|
306
|
+
export function isMaritacaOpenCodeId(id) { return String(id || '').toLowerCase().startsWith(MARITACA_PREFIX); }
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Picker groups that list another provider's rows: the Maritaca group shows OpenCode's `maritaca/<id>` rows
|
|
310
|
+
* (`via: 'opencode'`), so a pick, a saved route and a dispatch keep the runnable spec
|
|
311
|
+
* { provider: 'opencode', model: 'maritaca/<id>' }. The menus place a group right after the provider it runs on.
|
|
312
|
+
*/
|
|
313
|
+
export const VIA_GROUPS = Object.freeze({ maritaca: 'opencode' });
|
|
314
|
+
|
|
315
|
+
/** The provider a row of `group` runs on (`maritaca` → `opencode`; a plain provider is itself). */
|
|
316
|
+
export function runnableProvider(group, row = null) { return row?.via || VIA_GROUPS[group] || group; }
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* The Maritaca group's rows: OpenCode's `maritaca/<id>` rows as this window merged them (hidden ones already out),
|
|
320
|
+
* ordered and labelled by the server's group (`remoteGroup`: catalog.routeGroups.maritaca, the Maritaca panel's
|
|
321
|
+
* order, BRL prices). While OpenCode lists no Maritaca model, the group's own rows come back `status: 'unavailable'`
|
|
322
|
+
* with their hint, so the group never vanishes. An older server (no group) gets the OpenCode rows as they are.
|
|
323
|
+
*/
|
|
324
|
+
export function maritacaGroupRows(opencodeRows, remoteGroup = null) {
|
|
325
|
+
const own = (Array.isArray(opencodeRows) ? opencodeRows : []).filter(m => isMaritacaOpenCodeId(m?.id));
|
|
326
|
+
const remote = Array.isArray(remoteGroup?.models) ? remoteGroup.models : [];
|
|
327
|
+
const deco = (m, r) => ({
|
|
328
|
+
...m, via: 'opencode', group: 'maritaca',
|
|
329
|
+
label: r?.label || m.label, tier: r?.tier || m.tier || null, price: r?.price || m.price || null,
|
|
330
|
+
isDefault: r ? r.isDefault === true : m.isDefault === true,
|
|
331
|
+
});
|
|
332
|
+
if (!own.length) {
|
|
333
|
+
if (remoteGroup && remoteGroup.available === false) {
|
|
334
|
+
return remote.map(r => ({
|
|
335
|
+
id: String(r.id), label: String(r.label || r.model || r.id), desc: '', tier: r.tier || null, price: r.price || null,
|
|
336
|
+
efforts: Array.isArray(r.efforts) ? r.efforts : null, contextWindow: r.contextWindow ?? null, vision: false,
|
|
337
|
+
outputs: { image: false, video: false }, via: 'opencode', group: 'maritaca', status: 'unavailable',
|
|
338
|
+
hint: r.hint || remoteGroup.hint || null, selector: String(r.id),
|
|
339
|
+
}));
|
|
340
|
+
}
|
|
341
|
+
return [];
|
|
342
|
+
}
|
|
343
|
+
const byId = new Map(own.map(m => [String(m.id).toLowerCase(), m]));
|
|
344
|
+
const out = [];
|
|
345
|
+
for (const r of remote) {
|
|
346
|
+
const m = byId.get(String(r?.id || '').toLowerCase());
|
|
347
|
+
if (!m) continue;
|
|
348
|
+
byId.delete(String(r.id).toLowerCase());
|
|
349
|
+
out.push(deco(m, r));
|
|
350
|
+
}
|
|
351
|
+
for (const m of own) if (byId.has(String(m.id).toLowerCase())) out.push(deco(m, null));
|
|
352
|
+
return out;
|
|
353
|
+
}
|
|
354
|
+
|
|
300
355
|
/**
|
|
301
356
|
* { 'claude-code': [...], codex: [...], opencode: [...], antigravity: [...] }: the models of every
|
|
302
357
|
* Assistant model menu and of the Routes editor, from GET /api/assistant/catalog
|
|
@@ -327,6 +382,13 @@ export async function loadModelCatalog({ force = false } = {}) {
|
|
|
327
382
|
? []
|
|
328
383
|
: mergeProviderModels(provider, remote?.models?.[provider], local, { sets, remoteSource: remote?.sources?.[provider] || null });
|
|
329
384
|
}
|
|
385
|
+
// The Maritaca group (its rows stay in `opencode` too, for every lookup by the runnable spec; menus list them once).
|
|
386
|
+
out.maritaca = maritacaGroupRows(out.opencode, remote?.routeGroups?.maritaca || null);
|
|
387
|
+
// A lookup by the runnable spec (a saved route's label) reads the same row the group shows.
|
|
388
|
+
if (out.maritaca.length && out.maritaca[0].status !== 'unavailable') {
|
|
389
|
+
const shown = new Map(out.maritaca.map(m => [m.id, m]));
|
|
390
|
+
out.opencode = out.opencode.map(m => shown.get(m.id) || m);
|
|
391
|
+
}
|
|
330
392
|
_catalog = out;
|
|
331
393
|
// Not kept when built without the server's catalog, or when the lists changed
|
|
332
394
|
// while it loaded: the next open asks again.
|
|
@@ -580,17 +642,28 @@ export async function openModelMenu(anchor, opts = {}) {
|
|
|
580
642
|
}
|
|
581
643
|
// Without `providers` the menu is a brain's (the toolbar's model field, the WhatsApp brain): every provider the
|
|
582
644
|
// Assistant can run on (BRAIN_PROVIDERS, Antigravity included); a route or a dispatch names its own providers.
|
|
583
|
-
const list = Array.isArray(providers) && providers.length ? PROVIDERS.filter(p => providers.includes(p)) : BRAIN_PROVIDERS;
|
|
645
|
+
const list = withViaGroups(Array.isArray(providers) && providers.length ? PROVIDERS.filter(p => providers.includes(p)) : BRAIN_PROVIDERS);
|
|
584
646
|
let listed = 0;
|
|
585
647
|
for (const provider of list) {
|
|
586
|
-
const
|
|
648
|
+
const run = runnableProvider(provider);
|
|
649
|
+
// A row listed in a group (Maritaca) is shown there only, never twice.
|
|
650
|
+
const rows = (catalog[provider] || []).filter(m => !(provider === 'opencode' && Array.isArray(catalog.maritaca) && isMaritacaOpenCodeId(m?.id)));
|
|
651
|
+
const models = rows.filter(m => m.status === 'unavailable' || typeof accept !== 'function' || accept(run, m));
|
|
652
|
+
if (provider !== run && !models.length) continue;
|
|
587
653
|
if (!models.length && !opts.routingEditor) continue;
|
|
588
654
|
listed += models.length;
|
|
589
655
|
const meta = providerMeta(provider);
|
|
590
656
|
const hiddenCount = metadata.hiddenCounts[provider] || 0;
|
|
591
|
-
const note = opts.routingEditor ? tr('assistant.routes.menu.hiddenCount', '{count} hidden in Models', { count: hiddenCount }) : warnSwitch &&
|
|
657
|
+
const note = opts.routingEditor && provider === run ? tr('assistant.routes.menu.hiddenCount', '{count} hidden in Models', { count: hiddenCount }) : warnSwitch && run !== b.provider ? tr('assistant.brain.newConversation', 'starts a new conversation') : '';
|
|
592
658
|
items.push({ kind: 'header', label: meta.label, icon: meta.icon, color: meta.color, note });
|
|
659
|
+
const unavailable = models.filter(m => m.status === 'unavailable');
|
|
660
|
+
if (unavailable.length) items.push({ kind: 'info', label: tr('assistant.routes.menu.maritacaUnavailable', 'Register Maritaca under Settings → OpenCode → Providers') });
|
|
593
661
|
for (const m of models) {
|
|
662
|
+
if (m.status === 'unavailable') {
|
|
663
|
+
items.push({ id: `${provider}:${m.id}`, label: m.label, desc: modelDesc(m, tr, false), tag: tierTag(m, tr), keywords: `${meta.label} ${m.id}`, disabled: true, title: m.hint || '' });
|
|
664
|
+
continue;
|
|
665
|
+
}
|
|
666
|
+
const target = runnableProvider(provider, m);
|
|
594
667
|
items.push({
|
|
595
668
|
kind: 'radio',
|
|
596
669
|
id: `${provider}:${m.id}`,
|
|
@@ -599,8 +672,8 @@ export async function openModelMenu(anchor, opts = {}) {
|
|
|
599
672
|
title: `${m.label || m.id} · ${m.id}`,
|
|
600
673
|
tag: tierTag(m, tr),
|
|
601
674
|
keywords: `${meta.label} ${m.id}`,
|
|
602
|
-
selected: !!current && current.provider ===
|
|
603
|
-
onSelect: () => onSelect?.({ provider, model: m.id, label: m.label, tier: m.tier || null, vision: m.vision ?? null, outputs: m.outputs || null, efforts: m.efforts || null, price: m.price || null }),
|
|
675
|
+
selected: !!current && current.provider === target && sameModel(current.model, m),
|
|
676
|
+
onSelect: () => onSelect?.({ provider: target, model: m.id, label: m.label, tier: m.tier || null, vision: m.vision ?? null, outputs: m.outputs || null, efforts: m.efforts || null, price: m.price || null }),
|
|
604
677
|
});
|
|
605
678
|
}
|
|
606
679
|
if (opts.routingEditor && !models.length) items.push({ kind: 'info', label: typeof accept === 'function' ? tr('assistant.routes.menu.noCompatible', 'No compatible models shown for this provider.') : tr('assistant.routes.menu.providerEmpty', 'No models shown for this provider.') });
|
|
@@ -663,6 +736,16 @@ export async function openModelMenu(anchor, opts = {}) {
|
|
|
663
736
|
}
|
|
664
737
|
}
|
|
665
738
|
|
|
739
|
+
/** `list` with each via-group placed right after the provider it runs on (opencode → opencode, maritaca). */
|
|
740
|
+
export function withViaGroups(list) {
|
|
741
|
+
const out = [];
|
|
742
|
+
for (const p of list) {
|
|
743
|
+
out.push(p);
|
|
744
|
+
for (const [group, via] of Object.entries(VIA_GROUPS)) if (via === p && !list.includes(group)) out.push(group);
|
|
745
|
+
}
|
|
746
|
+
return out;
|
|
747
|
+
}
|
|
748
|
+
|
|
666
749
|
/** What a model menu lists, for telling a fresher read from the one on screen. */
|
|
667
750
|
function menuItemsSignature(items) {
|
|
668
751
|
return JSON.stringify((items || []).map((item) => [item.kind || '', item.id ?? '', item.label || '', item.desc || '', item.tag || '', item.note || '', !!item.selected]));
|
|
@@ -770,9 +853,13 @@ export function createBrainPicker(host, hooks = {}) {
|
|
|
770
853
|
|
|
771
854
|
// Per model, from the catalog row (which also covers "[1m]" / "[extended]" ids);
|
|
772
855
|
// the provider list only for a model nothing is known about. OpenCode: variants.
|
|
856
|
+
// Claude Code: Auto (the model's default) and Off (`none`, no thinking) where the model thinks, then
|
|
857
|
+
// its levels (asst-state.js brainEffortChoices); their words here.
|
|
773
858
|
function effortsFor(brain) {
|
|
774
859
|
const model = catalogModelRow(brain.provider, brain.model) || modelOf(brain);
|
|
775
|
-
return getEffortLevelsForModel(brain.provider, model)
|
|
860
|
+
return brainEffortChoices(brain.provider, getEffortLevelsForModel(brain.provider, model)).map((e) => (e.key === 'auto'
|
|
861
|
+
? { ...e, label: t('assistant.brain.effortAuto', e.label), desc: t('assistant.brain.effortAutoDesc', e.desc) }
|
|
862
|
+
: e.key === 'none' ? { ...e, label: t('assistant.brain.effortNone', e.label), desc: t('assistant.brain.effortNoneDesc', e.desc) } : e));
|
|
776
863
|
}
|
|
777
864
|
|
|
778
865
|
function accountOf(brain) {
|
|
@@ -831,7 +918,9 @@ export function createBrainPicker(host, hooks = {}) {
|
|
|
831
918
|
function values(brain = currentBrain()) {
|
|
832
919
|
const meta = getProviderMeta(brain.provider);
|
|
833
920
|
const efforts = effortsFor(brain);
|
|
834
|
-
|
|
921
|
+
// Claude's Auto row stands for no effort and for the `off` a server writes when it resets a level.
|
|
922
|
+
const level = efforts.find(e => e.id === brain.effort)
|
|
923
|
+
|| (brain.provider === 'claude-code' && isAutoBrainEffort(brain.effort) ? efforts.find(e => e.key === 'auto') : null);
|
|
835
924
|
const hasEfforts = efforts.some(e => e.id !== 'off');
|
|
836
925
|
const toolCatalog = getCachedToolCatalog();
|
|
837
926
|
return {
|
|
@@ -1246,7 +1335,8 @@ export function createBrainPicker(host, hooks = {}) {
|
|
|
1246
1335
|
const efforts = effortsFor(brain);
|
|
1247
1336
|
menu(t('assistant.brain.effort', 'Thinking effort'), efforts.map((e) => ({
|
|
1248
1337
|
kind: 'radio', id: e.id, label: e.label, desc: e.desc || '',
|
|
1249
|
-
|
|
1338
|
+
// Auto (`off`) is stored as no effort; Off is `none` and is kept on every turn.
|
|
1339
|
+
selected: (e.id === 'off' ? isAutoBrainEffort(brain.effort) : e.id === brain.effort),
|
|
1250
1340
|
onSelect: () => commit({ effort: e.id === 'off' ? null : e.id }, 'effort'),
|
|
1251
1341
|
})));
|
|
1252
1342
|
return;
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
// /api/desktop/frames/<id>/thumb.jpg; `assistant:desktop` activity events.
|
|
14
14
|
|
|
15
15
|
import { desktopSetup, getDesktopStatus, resumeDesktop, stopDesktop } from './asst-api.js';
|
|
16
|
+
import { createPollGate } from '../poll-backoff.js';
|
|
17
|
+
import { refusalOfError } from '../owner-access.js';
|
|
18
|
+
import { OWNER_ACCESS_RESTORED_EVENT } from '../page-session.js';
|
|
16
19
|
|
|
17
20
|
// ── Pure helpers ────────────────────────────────────────────────────────────
|
|
18
21
|
|
|
@@ -291,6 +294,47 @@ const ICON_COMPUTER = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor
|
|
|
291
294
|
const ICON_X = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>';
|
|
292
295
|
const POLL_MS = 3000;
|
|
293
296
|
|
|
297
|
+
// ── The status poll, shared by every tray of the page ──
|
|
298
|
+
// Each Assistant tab has its own tray and timer; through one gate (poll-backoff.js) they send at most one GET
|
|
299
|
+
// /api/desktop/status at a time and one per POLL_MS, wait longer after every failure (exponential, capped at five
|
|
300
|
+
// minutes), and stop altogether on a refusal of the owner's access (403 WORKER_BROWSER and the like: SynaBun's
|
|
301
|
+
// automation browser opened the page) until the page gets the owner's page secret again or becomes visible again.
|
|
302
|
+
// Before 2026-11-05 every tray asked every 3 s whatever the answer: five per 3 s on a refused page.
|
|
303
|
+
export const desktopStatusGate = createPollGate({ baseMs: POLL_MS });
|
|
304
|
+
let _statusInFlight = null;
|
|
305
|
+
let _gateWired = false;
|
|
306
|
+
|
|
307
|
+
function wireStatusGate() {
|
|
308
|
+
if (_gateWired) return;
|
|
309
|
+
_gateWired = true;
|
|
310
|
+
if (typeof window !== 'undefined' && typeof window.addEventListener === 'function') {
|
|
311
|
+
window.addEventListener(OWNER_ACCESS_RESTORED_EVENT, () => desktopStatusGate.resume());
|
|
312
|
+
}
|
|
313
|
+
if (typeof document !== 'undefined' && typeof document.addEventListener === 'function') {
|
|
314
|
+
document.addEventListener('visibilitychange', () => { if (!document.hidden && desktopStatusGate.snapshot().halted) desktopStatusGate.resume(); });
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* GET /api/desktop/status once for every tray and probe that asks at the same time; the answer counts on the shared
|
|
320
|
+
* gate (an answer resets it, a failure backs it off, a refusal of the owner's access halts the timers' polling).
|
|
321
|
+
*/
|
|
322
|
+
export function requestDesktopStatus(request = getDesktopStatus) {
|
|
323
|
+
if (_statusInFlight) return _statusInFlight;
|
|
324
|
+
wireStatusGate();
|
|
325
|
+
desktopStatusGate.begin();
|
|
326
|
+
let sent;
|
|
327
|
+
try { sent = Promise.resolve(request()); } catch (err) { sent = Promise.reject(err); }
|
|
328
|
+
const run = sent.then(
|
|
329
|
+
(status) => { desktopStatusGate.succeed(); return status; },
|
|
330
|
+
(err) => { desktopStatusGate.fail(refusalOfError(err)); throw err; },
|
|
331
|
+
);
|
|
332
|
+
_statusInFlight = run;
|
|
333
|
+
const clear = () => { if (_statusInFlight === run) _statusInFlight = null; };
|
|
334
|
+
run.then(clear, clear);
|
|
335
|
+
return run;
|
|
336
|
+
}
|
|
337
|
+
|
|
294
338
|
/** What a failed status check was: { kind: 'forbidden' | 'timeout' | 'error', message }. */
|
|
295
339
|
export function computerCheckFailure(err) {
|
|
296
340
|
const message = str(err?.message) || 'The status check failed';
|
|
@@ -704,7 +748,7 @@ export function createComputerPanel(hostEl, hooks = {}) {
|
|
|
704
748
|
|
|
705
749
|
async function refresh() {
|
|
706
750
|
try {
|
|
707
|
-
const status = await
|
|
751
|
+
const status = await requestDesktopStatus();
|
|
708
752
|
if (!state.destroyed) applyStatus(status);
|
|
709
753
|
return status;
|
|
710
754
|
} catch (err) {
|
|
@@ -719,7 +763,8 @@ export function createComputerPanel(hostEl, hooks = {}) {
|
|
|
719
763
|
const need = state.view === 'tray' && !state.destroyed;
|
|
720
764
|
if (need && !state.pollTimer) {
|
|
721
765
|
state.pollTimer = setInterval(() => {
|
|
722
|
-
|
|
766
|
+
// The shared gate decides: one request at a time for every tray, a wait after a failure, none on a refusal.
|
|
767
|
+
if (document.hidden || !desktopStatusGate.due()) return;
|
|
723
768
|
refresh().catch(() => {});
|
|
724
769
|
}, POLL_MS);
|
|
725
770
|
} else if (!need && state.pollTimer) {
|
|
@@ -967,7 +967,7 @@ export function decorateControlHead(head, kindEl) {
|
|
|
967
967
|
const face = el('span', 'asst-control-face');
|
|
968
968
|
face.setAttribute('aria-hidden', 'true');
|
|
969
969
|
try {
|
|
970
|
-
face.innerHTML = mascotSvg({ width:
|
|
970
|
+
face.innerHTML = mascotSvg({ width: 56, height: 28, className: 'synabun-mascot asst-still' });
|
|
971
971
|
if (face.firstElementChild) paintMascot(face.firstElementChild, stillFrame('blocked'));
|
|
972
972
|
} catch { /* no SVG here (a test DOM): the capsule says it */ }
|
|
973
973
|
if (typeof head.insertBefore === 'function') head.insertBefore(face, kindEl);
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
import * as mascotLib from '../synabun-mascot.js';
|
|
20
20
|
import { isReducedMotion, subscribe } from '../synabun-ticker.js';
|
|
21
|
+
import { syncEmpty } from '../shown-children.js';
|
|
21
22
|
import { limitCountdown, resetMs } from './asst-limit.js';
|
|
22
23
|
|
|
23
24
|
const RING_R = 24;
|
|
@@ -134,13 +135,13 @@ export function createLimitWait(opts = {}) {
|
|
|
134
135
|
if (reducedMotion()) {
|
|
135
136
|
try { rig?.destroy(); } catch { /* gone */ }
|
|
136
137
|
rig = null;
|
|
137
|
-
face.innerHTML = mascotLib.mascotSvg({ width:
|
|
138
|
+
face.innerHTML = mascotLib.mascotSvg({ width: 72, height: 36, className: 'synabun-mascot asst-still' });
|
|
138
139
|
try { mascotLib.paintMascot(face.firstElementChild, mascotLib.stillFrame(next)); } catch { /* the plain face */ }
|
|
139
140
|
return;
|
|
140
141
|
}
|
|
141
142
|
if (!rig) {
|
|
142
143
|
face.textContent = '';
|
|
143
|
-
try { rig = mascotLib.createMascot(face, { width:
|
|
144
|
+
try { rig = mascotLib.createMascot(face, { width: 72, height: 36, pose: next }); return; } catch { rig = null; }
|
|
144
145
|
}
|
|
145
146
|
try { rig?.setPose(next, next === 'success' ? { then: 'idle' } : undefined); } catch { /* keeps its pose */ }
|
|
146
147
|
}
|
|
@@ -179,6 +180,7 @@ export function createLimitWait(opts = {}) {
|
|
|
179
180
|
retryBtn.textContent = label;
|
|
180
181
|
}
|
|
181
182
|
if (switchBtn) switchBtn.hidden = !(next === 'waiting' || next === 'unknown');
|
|
183
|
+
syncEmpty(actions); // the row goes when none of its buttons shows (data-empty, not a :has())
|
|
182
184
|
if (next === 'waiting') { setPose('sleep'); setRing(limitCountdown({ resetsAt, since }, now).progress || 0); }
|
|
183
185
|
else if (next === 'unknown') { setPose('wait'); setRing(0.18, true); }
|
|
184
186
|
else if (next === 'restored') { setPose(was === 'waiting' ? 'success' : 'idle'); setRing(1); }
|
|
@@ -293,7 +295,7 @@ const CSS = `
|
|
|
293
295
|
.asst-limit-wait.is-indeterminate .asst-limit-ring-fill { stroke-dasharray: 18 82; animation: asst-limit-orbit 2.6s linear infinite; }
|
|
294
296
|
@keyframes asst-limit-orbit { to { transform: rotate(360deg); } }
|
|
295
297
|
.asst-limit-wait-face { position: absolute; inset: 0; display: grid; place-items: center; color: var(--lw-tone); line-height: 0; }
|
|
296
|
-
.asst-limit-wait-face svg { display: block; width:
|
|
298
|
+
.asst-limit-wait-face svg { display: block; width: 72px; height: 36px; }
|
|
297
299
|
.asst-limit-wait-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
|
|
298
300
|
.asst-limit-wait-title { color: var(--asst-text-2); font-size: 12px; font-weight: 500; }
|
|
299
301
|
.asst-limit-wait[data-state="restored"] .asst-limit-wait-title { color: var(--asst-brand); }
|
|
@@ -301,14 +303,14 @@ const CSS = `
|
|
|
301
303
|
.asst-limit-wait-clock.is-text { font-family: inherit; font-size: 13px; color: var(--asst-text-2); letter-spacing: 0; }
|
|
302
304
|
.asst-limit-wait-meta { color: var(--asst-text-3); font-size: 11.5px; overflow-wrap: anywhere; }
|
|
303
305
|
.asst-limit-wait-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
|
|
304
|
-
.asst-limit-wait-actions
|
|
306
|
+
.asst-limit-wait-actions[data-empty] { display: none; }
|
|
305
307
|
.asst-limit-wait-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
306
308
|
.asst-limit-row .asst-msg-content { width: 100%; }
|
|
307
309
|
.asst-run .asst-limit-wait { grid-column: 2 / span 2; margin-top: 8px; padding: 10px 12px; }
|
|
308
310
|
@container asst (max-width: 320px) {
|
|
309
311
|
.asst-limit-wait { grid-template-columns: 44px minmax(0, 1fr); gap: 10px; padding: 10px; }
|
|
310
312
|
.asst-limit-wait-stage, .asst-limit-ring { width: 44px; height: 44px; }
|
|
311
|
-
.asst-limit-wait-face svg { width:
|
|
313
|
+
.asst-limit-wait-face svg { width: 56px; height: 28px; }
|
|
312
314
|
.asst-limit-wait-clock { font-size: 17px; }
|
|
313
315
|
}
|
|
314
316
|
body.ui-interacting .asst-limit-ring-fill { animation-play-state: paused !important; }
|