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
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
//
|
|
14
14
|
// DOM-free on purpose (node:test, tests/assistant-worker-stage.test.mjs):
|
|
15
15
|
// the phases, the scene a run shows, its step line and its accessible name,
|
|
16
|
-
// and
|
|
17
|
-
//
|
|
18
|
-
// carries data-live. Decorative SVG only: the stage is named by stageLabel().
|
|
16
|
+
// and allowlisted scene artwork. GIF playback follows data-live; inactive
|
|
17
|
+
// and reduced-motion scenes use PNGs. The stage is named by stageLabel().
|
|
19
18
|
|
|
19
|
+
import { sceneAsset, SCENE_ASSET_KEYS } from '../synabun-mascot-assets.js';
|
|
20
20
|
import { isRunIdle, isTerminalRunStatus, runNeedsAttention, runStatusFromState, runTone } from './asst-state.js';
|
|
21
21
|
import { kindOf, parseToolName, sayCall, tFallback, verbText } from './asst-tool-kinds.js';
|
|
22
22
|
import { redactSecrets, safeStepInput } from './asst-redact.js';
|
|
@@ -44,6 +44,12 @@ export const SCENE_SPECS = Object.freeze({
|
|
|
44
44
|
generic: { label: ['assistant.stage.scene.generic', 'Working'], pose: 'think' },
|
|
45
45
|
});
|
|
46
46
|
|
|
47
|
+
// Activity artwork shares the matching class's translated label and pose.
|
|
48
|
+
export const ACTIVITY_SCENE_SPECS = Object.freeze(Object.fromEntries(
|
|
49
|
+
Object.entries({ edit: 'design', shell: 'code', read: 'review', search: 'research', web: 'browser', memory: 'research', thinking: 'complex' })
|
|
50
|
+
.map(([id, cls]) => [id, { ...SCENE_SPECS[cls], pose: id === 'thinking' ? 'think' : id }]),
|
|
51
|
+
));
|
|
52
|
+
|
|
47
53
|
/** Phases a stage is open and moving (or waiting on you) in; the rest settle it. */
|
|
48
54
|
export const LIVE_PHASES = Object.freeze(['queued', 'starting', 'working', 'waiting']);
|
|
49
55
|
const LIVE = new Set(LIVE_PHASES);
|
|
@@ -287,13 +293,8 @@ function obj(v) {
|
|
|
287
293
|
/** The scene a tool call implies on its own, or null (the class decides). */
|
|
288
294
|
export function activityScene(activity, taskClass = '') {
|
|
289
295
|
if (!activity?.kind) return null;
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
const tool = parseToolName(activity.name).tool;
|
|
293
|
-
if (tool.startsWith('browser_')) return 'browser';
|
|
294
|
-
// A page read or a web search reads as research, unless the run already browses or researches.
|
|
295
|
-
const cls = sceneOfClass(taskClass);
|
|
296
|
-
return cls === 'browser' || cls === 'research' ? null : 'research';
|
|
296
|
+
const id = activity.kind === 'think' ? 'thinking' : activity.kind;
|
|
297
|
+
return SCENE_ASSET_KEYS.includes(id) ? id : null;
|
|
297
298
|
}
|
|
298
299
|
|
|
299
300
|
/** The activity while it still speaks for the worker (at most ACTIVITY_FRESH_MS old), else null. */
|
|
@@ -355,7 +356,7 @@ export function stepLine(activity, t = tFallback, now = Date.now()) {
|
|
|
355
356
|
|
|
356
357
|
/** A scene's words ("Coding"), localized. */
|
|
357
358
|
export function sceneLabel(scene, t = tFallback) {
|
|
358
|
-
const [key, fallback] = (SCENE_SPECS[scene] || SCENE_SPECS.generic).label;
|
|
359
|
+
const [key, fallback] = (SCENE_SPECS[scene] || ACTIVITY_SCENE_SPECS[scene] || SCENE_SPECS.generic).label;
|
|
359
360
|
return t(key, fallback);
|
|
360
361
|
}
|
|
361
362
|
|
|
@@ -415,315 +416,42 @@ export function stageLabel({ scene = 'generic', phase = 'working', title = '', m
|
|
|
415
416
|
// beat share a layer (the image's tiles); a part that stood above a moving
|
|
416
417
|
// one stays above it in a still layer of its own (`.sc-top`: the playhead).
|
|
417
418
|
|
|
418
|
-
/**
|
|
419
|
-
export const
|
|
420
|
-
export const CODE_STEP = 6; // one line, in viewBox units
|
|
421
|
-
/** The code scene's scrolling window and the video scene's film window (full) and the mini film's: [x, y, w, h]. */
|
|
422
|
-
export const CODE_WINDOW = Object.freeze([4, 4, 112, 32]);
|
|
423
|
-
export const FILM_WINDOW = Object.freeze([4, 4, 112, 32]);
|
|
424
|
-
export const FILM_MINI_WINDOW = Object.freeze([2, 2, 36, 16]);
|
|
425
|
-
|
|
426
|
-
/** The viewBox of a full scene and of a mini, in units. */
|
|
427
|
-
export const SCENE_BOX = Object.freeze({ full: Object.freeze({ w: 120, h: 40 }), mini: Object.freeze({ w: 40, h: 20 }) });
|
|
428
|
-
|
|
429
|
-
const r1 = (v) => Math.round(v * 100) / 100;
|
|
430
|
-
const r3 = (v) => Math.round(v * 1000) / 1000;
|
|
431
|
-
|
|
432
|
-
/** A length in viewBox units as a percentage of the box's width or height: boxPct(14, 120) → '11.667%'. */
|
|
433
|
-
export function boxPct(v, of) {
|
|
434
|
-
return `${r3((Number(v) / of) * 100)}%`;
|
|
435
|
-
}
|
|
419
|
+
/** Scene art retains its 3:1 ratio in both full and compact placements. */
|
|
420
|
+
export const SCENE_BOX = Object.freeze({ full: Object.freeze({ w: 120, h: 40 }), mini: Object.freeze({ w: 40, h: 40 / 3 }) });
|
|
436
421
|
|
|
437
|
-
/**
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
const
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
}
|
|
459
|
-
if (
|
|
460
|
-
else if (cmd === 'm') { x += num(); y += num(); sx = x; sy = y; cmd = 'l'; }
|
|
461
|
-
else if (cmd === 'L') { x = num(); y = num(); }
|
|
462
|
-
else if (cmd === 'l') { x += num(); y += num(); }
|
|
463
|
-
else if (cmd === 'H') x = num();
|
|
464
|
-
else if (cmd === 'h') x += num();
|
|
465
|
-
else if (cmd === 'V') y = num();
|
|
466
|
-
else if (cmd === 'v') y += num();
|
|
467
|
-
else { i += 1; continue; }
|
|
468
|
-
xs.push(x);
|
|
469
|
-
ys.push(y);
|
|
470
|
-
}
|
|
471
|
-
if (!xs.length) return [0, 0];
|
|
472
|
-
return [r3((Math.min(...xs) + Math.max(...xs)) / 2), r3((Math.min(...ys) + Math.max(...ys)) / 2)];
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
/** A gear outline: n trapezoid teeth between radius r and R round (cx, cy). */
|
|
476
|
-
export function gearPath(cx, cy, r, R, n) {
|
|
477
|
-
const pts = [];
|
|
478
|
-
const step = (Math.PI * 2) / n;
|
|
479
|
-
for (let i = 0; i < n; i += 1) {
|
|
480
|
-
const a = i * step;
|
|
481
|
-
for (const [rad, off] of [[r, -0.32], [R, -0.18], [R, 0.18], [r, 0.32]]) {
|
|
482
|
-
pts.push(`${r1(cx + rad * Math.cos(a + off * step))},${r1(cy + rad * Math.sin(a + off * step))}`);
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
return `M${pts.join('L')}Z`;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
/** Where the code scene's caret sits after step `s` (the newest line at the bottom slot): its x. */
|
|
489
|
-
export function codeCaretX(s) {
|
|
490
|
-
const [indent, key, rest] = CODE_LINES[(4 + s) % CODE_LINES.length];
|
|
491
|
-
return 4 + indent + key + 3 + rest + 2;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
const SVG_ATTRS = 'fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" focusable="false"';
|
|
495
|
-
const svgOf = (viewBox, body) => `<svg viewBox="${viewBox}" ${SVG_ATTRS}>${body}</svg>`;
|
|
496
|
-
|
|
497
|
-
/** Everything of a scene that stands still: one SVG under the layers. */
|
|
498
|
-
function base(box, body) {
|
|
499
|
-
return `<svg class="sc-base" viewBox="0 0 ${box.w} ${box.h}" width="${box.w}" height="${box.h}" ${SVG_ATTRS}>${body}</svg>`;
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
/**
|
|
503
|
-
* One moving part's layer, over the whole box (or over a window: clipOf).
|
|
504
|
-
* `cls` names its motion (the CSS animates it); `body` is the part's SVG
|
|
505
|
-
* markup in the box's units, or `html` another layer inside it (a caret that
|
|
506
|
-
* blinks inside a caret that steps). `origin` [x, y]: what rotation and scale
|
|
507
|
-
* turn round (the old fill-box centre, or a view-box point); `still` [x, y,
|
|
508
|
-
* more]: the resting transform of a part drawn at 0,0; `i`: its beat.
|
|
509
|
-
*/
|
|
510
|
-
function layerOf(box, cls, body, { origin = null, still = null, i = null, html = null } = {}) {
|
|
511
|
-
const style = [];
|
|
512
|
-
if (i != null) style.push(`--i:${i}`);
|
|
513
|
-
if (origin) style.push(`transform-origin:${boxPct(origin[0], box.w)} ${boxPct(origin[1], box.h)}`);
|
|
514
|
-
if (still) style.push(`transform:translate(${boxPct(still[0], box.w)},${boxPct(still[1], box.h)})${still[2] ? ` ${still[2]}` : ''}`);
|
|
515
|
-
const inner = html != null ? html : svgOf(`0 0 ${box.w} ${box.h}`, body);
|
|
516
|
-
return `<span class="sc-layer${cls ? ` ${cls}` : ''}"${style.length ? ` style="${style.join(';')}"` : ''}>${inner}</span>`;
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
/** A still part that stood above a moving one: it stays above it. */
|
|
520
|
-
const topOf = (box, body) => layerOf(box, 'sc-top', body);
|
|
521
|
-
|
|
522
|
-
/** A clipped window of the scene ([x, y, w, h] in units): what scrolls inside it is cut at its edges. */
|
|
523
|
-
function clipOf(box, [x, y, w, h], inner) {
|
|
524
|
-
return `<span class="sc-clip" style="left:${boxPct(x, box.w)};top:${boxPct(y, box.h)};width:${boxPct(w, box.w)};height:${boxPct(h, box.h)}">${inner}</span>`;
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
/** Parts that share a beat (`--i`) share one layer: [{ i, body }] → one layer per beat, in first-seen order. */
|
|
528
|
-
function beatLayers(box, cls, parts) {
|
|
529
|
-
const beats = new Map();
|
|
530
|
-
for (const { i, body } of parts) beats.set(i, (beats.get(i) || '') + body);
|
|
531
|
-
return [...beats].map(([i, body]) => layerOf(box, cls, body, { i })).join('');
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
function codeFull(box) {
|
|
535
|
-
let lines = '';
|
|
536
|
-
for (let i = 0; i < CODE_LINES.length * 2; i += 1) {
|
|
537
|
-
const [indent, key, rest] = CODE_LINES[i % CODE_LINES.length];
|
|
538
|
-
const y = 5 + CODE_STEP * i;
|
|
539
|
-
lines += `<path class="sc-mid" d="M${indent} ${y}h${key}"/><path class="sc-dim" d="M${indent + key + 3} ${y}h${rest}"/>`;
|
|
422
|
+
/** Decorative art only; status, step and progress remain in the owning stage. */
|
|
423
|
+
export function sceneSvg(scene, { mini = false, live = false, className = '' } = {}) {
|
|
424
|
+
const id = SCENE_ASSET_KEYS.includes(scene) ? scene : 'generic';
|
|
425
|
+
const safeClass = String(className).replace(/[^a-zA-Z0-9_ -]/g, '');
|
|
426
|
+
return `<span class="asst-scene${mini ? ' is-mini' : ''}${safeClass ? ` ${safeClass}` : ''}" data-scene="${id}"${live ? ' data-live=""' : ''} aria-hidden="true"><img class="asst-scene-art" src="${sceneAsset(id)}" width="480" height="160" alt="" decoding="async"></span>`;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
// One observer shares the existing data-live/offscreen lifecycle across rack,
|
|
430
|
+
// run stages and tray. Static markup (including history) starts with a PNG.
|
|
431
|
+
const sceneVisibility = new WeakMap();
|
|
432
|
+
const observedScenes = new Set();
|
|
433
|
+
let sceneIntersection = null;
|
|
434
|
+
export function syncSceneArt(root = document) {
|
|
435
|
+
const reduced = globalThis.matchMedia?.('(prefers-reduced-motion: reduce)').matches;
|
|
436
|
+
for (const el of observedScenes) if (!el.isConnected) { sceneIntersection?.unobserve(el); observedScenes.delete(el); }
|
|
437
|
+
for (const el of root.querySelectorAll('.asst-scene')) {
|
|
438
|
+
if (sceneIntersection && !observedScenes.has(el)) { observedScenes.add(el); sceneIntersection.observe(el); }
|
|
439
|
+
const animated = el.hasAttribute('data-live') && !reduced && !document.hidden
|
|
440
|
+
&& !el.closest('[data-offscreen], .ui-interacting, .app-hidden')
|
|
441
|
+
&& sceneVisibility.get(el) !== false && el.getClientRects().length > 0;
|
|
442
|
+
const img = el.querySelector('.asst-scene-art');
|
|
443
|
+
const src = sceneAsset(el.dataset.scene, { animated });
|
|
444
|
+
if (img && img.getAttribute('src') !== src) img.setAttribute('src', src);
|
|
540
445
|
}
|
|
541
|
-
const [, , w, h] = CODE_WINDOW;
|
|
542
|
-
const caret = layerOf(box, 'sc-caret', '<rect class="sc-gold sc-fill" x="0" y="30.5" width="2" height="5" rx="1"/>');
|
|
543
|
-
return base(box, '<rect class="sc-dim" x="1" y="1.5" width="118" height="37" rx="5"/>')
|
|
544
|
-
+ clipOf(box, CODE_WINDOW, layerOf({ w, h }, 'sc-code-scroll', lines))
|
|
545
|
-
+ layerOf(box, 'sc-code-caret', null, { still: [codeCaretX(0), 0], html: caret });
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
const GEAR_BIG = gearPath(66, 20, 9, 12.5, 8);
|
|
549
|
-
const GEAR_SMALL = gearPath(86.5, 12.5, 5.5, 8, 6);
|
|
550
|
-
|
|
551
|
-
function complexFull(box) {
|
|
552
|
-
return base(box, '<path class="sc-dim" d="M14 7h13l5 5v21H14z"/><path class="sc-mid" d="M8 11h13l5 5v21H8zM21 11v5h5M12 23h9M12 28h11"/><path class="sc-dim" d="M98 30h14M102 25h10"/>')
|
|
553
|
-
+ layerOf(box, 'sc-gear-big', `<path class="sc-mid" d="${GEAR_BIG}"/><circle class="sc-dim" cx="66" cy="20" r="3.2"/>`, { origin: [66, 20] })
|
|
554
|
-
+ layerOf(box, 'sc-gear-small', `<path class="sc-gold" d="${GEAR_SMALL}"/><circle class="sc-gold" cx="86.5" cy="12.5" r="2"/>`, { origin: [86.5, 12.5] });
|
|
555
446
|
}
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
function reviewFull(box) {
|
|
563
|
-
const rows = [[9, '+', 52], [16, '-', 64], [23, '+', 40], [30, '+', 58]];
|
|
564
|
-
let still = '<rect class="sc-dim" x="1" y="1.5" width="118" height="37" rx="5"/>';
|
|
565
|
-
let ticks = '';
|
|
566
|
-
rows.forEach(([y, sign, len], i) => {
|
|
567
|
-
still += sign === '+' ? `<path class="sc-mid" d="M6 ${y}h4M8 ${y - 2}v4"/>` : `<path class="sc-mid" d="M6 ${y}h4"/>`;
|
|
568
|
-
still += `<path class="sc-dim" d="M15 ${y}h${len}"/>`;
|
|
569
|
-
ticks += tickLayer(box, `M95 ${y}l2.2 2.2 4.4-4.6`, i);
|
|
447
|
+
if (typeof document !== 'undefined' && typeof MutationObserver !== 'undefined') {
|
|
448
|
+
if (typeof IntersectionObserver !== 'undefined') sceneIntersection = new IntersectionObserver(entries => {
|
|
449
|
+
for (const entry of entries) sceneVisibility.set(entry.target, entry.isIntersecting);
|
|
450
|
+
syncSceneArt();
|
|
570
451
|
});
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
return base(box, page(8) + page(56))
|
|
577
|
-
+ layerOf(box, 'sc-lens', '<circle class="sc-gold" cx="24" cy="17" r="7"/><path class="sc-gold" d="M29.2 22.2l5 5"/>');
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
const POINTER = 'M0 0v10.5l2.8-2.6 2 4.4 2-.9-2-4.3h3.9z';
|
|
581
|
-
|
|
582
|
-
/** A click's ring (a layer that starts invisible: .sc-ring) and the pointer that clicks there (drawn at 0,0, placed by its layer). */
|
|
583
|
-
function pointerLayers(box, kind, [cx, cy], r) {
|
|
584
|
-
return layerOf(box, `sc-ring sc-ripple-${kind}`, `<circle class="sc-gold" cx="${cx}" cy="${cy}" r="${r}"/>`, { origin: [cx, cy] })
|
|
585
|
-
+ layerOf(box, `sc-point-${kind}`, `<path class="sc-gold sc-fill" d="${POINTER}"/>`, { still: [cx, cy] });
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
function browserFull(box) {
|
|
589
|
-
return base(box, '<rect class="sc-dim" x="1" y="1.5" width="118" height="37" rx="5"/><path class="sc-dim" d="M1 9.5h118"/>'
|
|
590
|
-
+ '<circle class="sc-mid sc-fill" cx="6" cy="5.5" r="1"/><circle class="sc-mid sc-fill" cx="10" cy="5.5" r="1"/><circle class="sc-mid sc-fill" cx="14" cy="5.5" r="1"/>'
|
|
591
|
-
+ '<rect class="sc-dim" x="22" y="3.5" width="56" height="4" rx="2"/>'
|
|
592
|
-
+ '<path class="sc-mid" d="M8 16h36"/><path class="sc-dim" d="M8 22h54M8 27h44M8 32h30"/><rect class="sc-mid" x="78" y="25" width="28" height="8" rx="2"/>')
|
|
593
|
-
+ pointerLayers(box, 'browser', [92, 29], 5);
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
function computerFull(box) {
|
|
597
|
-
return base(box, '<rect class="sc-dim" x="10" y="1.5" width="100" height="30" rx="3"/><path class="sc-dim" d="M60 31.5v4M48 37.5h24"/>'
|
|
598
|
-
+ '<rect class="sc-mid sc-shade" x="16" y="6" width="44" height="20" rx="2"/><path class="sc-dim" d="M16 10h44M21 15h20M21 20h28"/>'
|
|
599
|
-
+ '<rect class="sc-mid sc-shade" x="52" y="11" width="50" height="17" rx="2"/><path class="sc-dim" d="M52 15h50"/><rect class="sc-mid" x="84" y="20" width="13" height="5" rx="1.5"/>')
|
|
600
|
-
+ pointerLayers(box, 'computer', [90, 22.5], 4.5);
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
function automationFull(box) {
|
|
604
|
-
// The hub dot sits in the still SVG: hand and dot are the same gold, so which is on top shows nowhere.
|
|
605
|
-
return base(box, '<circle class="sc-mid" cx="18" cy="20" r="13"/><path class="sc-dim" d="M18 9v2M18 29v2M7 20h2M27 20h2"/>'
|
|
606
|
-
+ '<path class="sc-mid" d="M18 20l5-4"/><circle class="sc-gold sc-fill" cx="18" cy="20" r="1.6"/>'
|
|
607
|
-
+ '<path class="sc-dim" d="M52 24h14M76 24h14"/><rect class="sc-mid" x="44" y="20" width="8" height="8" rx="2"/><rect class="sc-mid" x="66" y="20" width="10" height="8" rx="2"/><rect class="sc-mid" x="90" y="20" width="8" height="8" rx="2"/>'
|
|
608
|
-
+ '<path class="sc-dim" d="M94 17c0-9-46-9-46 0M48 17l-2.5-3M48 17l3-2"/>')
|
|
609
|
-
+ layerOf(box, 'sc-hand', '<path class="sc-gold" d="M18 20v-9"/>', { origin: [18, 20] })
|
|
610
|
-
+ layerOf(box, 'sc-run-dot', '<circle class="sc-gold sc-fill" cx="48" cy="24" r="2.2"/>');
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
const TRIANGLE = 'M86 28l9-16 9 16z';
|
|
614
|
-
|
|
615
|
-
function designFull(box) {
|
|
616
|
-
return base(box, '<rect class="sc-gold sc-fill sc-swatch" x="4" y="5" width="9" height="9" rx="2"/><rect class="sc-mid sc-fill sc-swatch-b" x="4" y="16" width="9" height="9" rx="2"/><rect class="sc-dim sc-fill sc-swatch-c" x="4" y="27" width="9" height="9" rx="2"/>'
|
|
617
|
-
+ '<rect class="sc-dim" x="20" y="2.5" width="96" height="35" rx="4"/>')
|
|
618
|
-
+ layerOf(box, 'sc-shape', '<circle class="sc-mid" cx="40" cy="20" r="8"/>', { origin: [40, 20], i: 0 })
|
|
619
|
-
+ layerOf(box, 'sc-shape', '<rect class="sc-mid" x="58" y="12" width="16" height="16" rx="3"/>', { origin: [66, 20], i: 1 })
|
|
620
|
-
+ layerOf(box, 'sc-shape', `<path class="sc-mid" d="${TRIANGLE}"/>`, { origin: pathCentre(TRIANGLE), i: 2 })
|
|
621
|
-
+ layerOf(box, 'sc-pen', '<path class="sc-gold" d="M0 0l6-6M6-6l2.5 2.5M0 0l-1.2 3.7L2.5 2.5z"/>', { still: [40, 20] });
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
const SPARKLE = 'M104 6l1.6 4.4L110 12l-4.4 1.6L104 18l-1.6-4.4L98 12l4.4-1.6z';
|
|
625
|
-
|
|
626
|
-
function imageFull(box) {
|
|
627
|
-
const tiles = [];
|
|
628
|
-
for (let row = 0; row < 3; row += 1) {
|
|
629
|
-
for (let col = 0; col < 4; col += 1) {
|
|
630
|
-
const gold = (row === 1 && col === 2) || (row === 2 && col === 0);
|
|
631
|
-
tiles.push({ i: row + col, body: `<rect class="${gold ? 'sc-gold' : 'sc-mid'} sc-fill" x="${34 + col * 13.5}" y="${6 + row * 10}" width="11.5" height="8" rx="1.5"/>` });
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
return base(box, '<rect class="sc-dim" x="30" y="2.5" width="61" height="35" rx="3"/><path class="sc-dim" d="M100 26h12M100 31h8"/>')
|
|
635
|
-
+ beatLayers(box, 'sc-tile', tiles)
|
|
636
|
-
+ layerOf(box, 'sc-sparkle', `<path class="sc-gold sc-fill" d="${SPARKLE}"/>`, { origin: pathCentre(SPARKLE) });
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
function filmFrames(width, y, h, frameW, count) {
|
|
640
|
-
let out = `<rect class="sc-dim" x="0" y="${y}" width="${width}" height="${h}" rx="2"/>`;
|
|
641
|
-
for (let i = 0; i < count; i += 1) out += `<rect class="sc-mid" x="${i * frameW + 3}" y="${y + 5}" width="${frameW - 6}" height="${h - 10}" rx="1.5"/>`;
|
|
642
|
-
for (let x = 2; x < width; x += 6) out += `<rect class="sc-dim sc-fill" x="${x}" y="${y + 1.5}" width="2.4" height="2" rx=".6"/><rect class="sc-dim sc-fill" x="${x}" y="${y + h - 3.5}" width="2.4" height="2" rx=".6"/>`;
|
|
643
|
-
return out;
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
function videoFull(box) {
|
|
647
|
-
const [, , w, h] = FILM_WINDOW;
|
|
648
|
-
return base(box, '')
|
|
649
|
-
+ clipOf(box, FILM_WINDOW, layerOf({ w, h }, 'sc-film', filmFrames(160, 2, 28, 24, 7)))
|
|
650
|
-
+ topOf(box, '<path class="sc-gold" d="M58 2v36M55 2h6l-3 3z"/>');
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
/** An open-end wrench, horizontal, its jaw round (0, 0): place it with translate(bolt) rotate(a) translate(3.5 0). */
|
|
654
|
-
const WRENCH = 'M-4.6 -3.86L-1 -2V2L-4.6 3.86A6 6 0 0 0 5.5 2.4H24A2.4 2.4 0 0 0 24 -2.4H5.5A6 6 0 0 0 -4.6 -3.86Z';
|
|
655
|
-
const hexagon = (cx, cy, r) => `M${[0, 1, 2, 3, 4, 5].map(i => `${r1(cx + r * Math.cos(i * Math.PI / 3))} ${r1(cy + r * Math.sin(i * Math.PI / 3))}`).join('L')}Z`;
|
|
656
|
-
const ZAP = 'M92 5l-8 15h7l-3 14 11-18h-7.5z';
|
|
657
|
-
|
|
658
|
-
/** Sparks off the bolt: one layer each (they flash one after another). */
|
|
659
|
-
const sparkLayers = (box, ds) => ds.map((d, i) => layerOf(box, 'sc-spark', `<path class="sc-gold" d="${d}"/>`, { i })).join('');
|
|
660
|
-
|
|
661
|
-
function quickFull(box) {
|
|
662
|
-
return base(box, `<path class="sc-mid" d="${hexagon(38, 24, 3.4)}"/>`)
|
|
663
|
-
+ layerOf(box, 'sc-wrench', `<path class="sc-gold" transform="translate(38 24) rotate(-32) translate(3.5 0)" d="${WRENCH}"/>`, { origin: [38, 24] })
|
|
664
|
-
+ sparkLayers(box, ['M30.5 19.5l-3-2', 'M29.5 24.5h-3.5', 'M30.5 29.5l-3 2'])
|
|
665
|
-
+ layerOf(box, 'sc-zap', `<path class="sc-gold" d="${ZAP}"/>`, { origin: pathCentre(ZAP) });
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
function genericFull(box) {
|
|
669
|
-
return base(box, '<path class="sc-dim" d="M14 20h92"/><circle class="sc-mid" cx="14" cy="20" r="3"/><circle class="sc-mid" cx="60" cy="20" r="3"/><circle class="sc-mid" cx="106" cy="20" r="3"/>')
|
|
670
|
-
+ layerOf(box, 'sc-slide', '<rect class="sc-gold sc-fill" x="14" y="18.5" width="24" height="3" rx="1.5"/>');
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
const MINI_TRIANGLE = 'M29 15l4.5-8 4.5 8z';
|
|
674
|
-
|
|
675
|
-
// Minis (40×20, the tray at 32×16): one gesture each.
|
|
676
|
-
const MINI = {
|
|
677
|
-
code: box => base(box, '<path class="sc-mid" d="M5 5h20M9 10h24M5 15h14"/>')
|
|
678
|
-
+ layerOf(box, 'sc-caret', '<rect class="sc-gold sc-fill" x="21.5" y="12.5" width="1.8" height="5" rx=".9"/>'),
|
|
679
|
-
complex: box => base(box, '')
|
|
680
|
-
+ layerOf(box, 'sc-gear-big', `<path class="sc-mid" d="${gearPath(14, 11, 4.5, 6.6, 6)}"/>`, { origin: [14, 11] })
|
|
681
|
-
+ layerOf(box, 'sc-gear-small', `<path class="sc-gold" d="${gearPath(26.5, 7.5, 3, 4.6, 6)}"/>`, { origin: [26.5, 7.5] }),
|
|
682
|
-
review: box => base(box, '<path class="sc-dim" d="M4 5h20M4 10h24M4 15h18"/>')
|
|
683
|
-
+ tickLayer(box, 'M30 5l1.6 1.6 3.2-3.4', 0) + tickLayer(box, 'M32 10l1.6 1.6 3.2-3.4', 1),
|
|
684
|
-
research: box => base(box, '<rect class="sc-dim" x="3" y="2.5" width="26" height="15" rx="2"/><path class="sc-dim" d="M7 7h16M7 11h12M7 15h14"/>')
|
|
685
|
-
+ layerOf(box, 'sc-lens-mini', '<circle class="sc-gold" cx="12" cy="9" r="3.8"/><path class="sc-gold" d="M14.8 11.8l2.8 2.8"/>'),
|
|
686
|
-
browser: box => base(box, '<rect class="sc-dim" x="2" y="2" width="36" height="16" rx="2.5"/><path class="sc-dim" d="M2 6h36"/><rect class="sc-mid" x="24" y="11" width="10" height="4" rx="1.2"/>')
|
|
687
|
-
+ layerOf(box, 'sc-point-mini', `<path class="sc-gold sc-fill" d="${POINTER}"/>`, { still: [29, 13, 'scale(.6)'] }),
|
|
688
|
-
computer: box => base(box, '<rect class="sc-dim" x="5" y="1.5" width="30" height="14" rx="2"/><path class="sc-dim" d="M20 15.5v2M15 18.5h10"/><rect class="sc-mid" x="8" y="4.5" width="13" height="8" rx="1"/>')
|
|
689
|
-
+ layerOf(box, 'sc-point-mini', `<path class="sc-gold sc-fill" d="${POINTER}"/>`, { still: [29, 13, 'scale(.6)'] }),
|
|
690
|
-
automation: box => base(box, '<circle class="sc-mid" cx="11" cy="10" r="7.5"/><path class="sc-dim" d="M11 10l3-2.5"/><path class="sc-mid" d="M33.5 10a5 5 0 1 1-1.5-3.6M32 3.6v2.8h-2.8"/>')
|
|
691
|
-
+ layerOf(box, 'sc-hand', '<path class="sc-gold" d="M11 10V4.5"/>', { origin: [11, 10] }),
|
|
692
|
-
design: box => base(box, '<rect class="sc-mid sc-fill" x="3" y="3" width="6" height="6" rx="1.5"/><rect class="sc-dim sc-fill" x="3" y="11" width="6" height="6" rx="1.5"/>')
|
|
693
|
-
+ layerOf(box, 'sc-shape', '<circle class="sc-gold" cx="21" cy="10" r="5"/>', { origin: [21, 10], i: 0 })
|
|
694
|
-
+ layerOf(box, 'sc-shape', `<path class="sc-mid" d="${MINI_TRIANGLE}"/>`, { origin: pathCentre(MINI_TRIANGLE), i: 1 }),
|
|
695
|
-
image_gen: (box) => {
|
|
696
|
-
const tiles = [];
|
|
697
|
-
for (let row = 0; row < 2; row += 1) for (let col = 0; col < 3; col += 1) tiles.push({ i: row + col, body: `<rect class="${row === 1 && col === 2 ? 'sc-gold' : 'sc-mid'} sc-fill" x="${11 + col * 6.4}" y="${5 + row * 5.6}" width="5" height="4.2" rx="1"/>` });
|
|
698
|
-
return base(box, '<rect class="sc-dim" x="9" y="2.5" width="22" height="15" rx="2"/>') + beatLayers(box, 'sc-tile', tiles);
|
|
699
|
-
},
|
|
700
|
-
video_gen: (box) => {
|
|
701
|
-
const [, , w, h] = FILM_MINI_WINDOW;
|
|
702
|
-
return base(box, '')
|
|
703
|
-
+ clipOf(box, FILM_MINI_WINDOW, layerOf({ w, h }, 'sc-film-mini', filmFrames(60, 1, 14, 12, 5)))
|
|
704
|
-
+ topOf(box, '<path class="sc-gold" d="M20 1v18"/>');
|
|
705
|
-
},
|
|
706
|
-
quick: box => base(box, `<path class="sc-mid" d="${hexagon(11, 11, 2.6)}"/>`)
|
|
707
|
-
+ layerOf(box, 'sc-wrench', `<path class="sc-gold" stroke-width="2.4" transform="translate(11 11) rotate(-32) scale(.62) translate(3.5 0)" d="${WRENCH}"/>`, { origin: [11, 11] })
|
|
708
|
-
+ sparkLayers(box, ['M5.5 7.5l-2-1.3', 'M5 11.5H2.6']),
|
|
709
|
-
generic: box => base(box, '')
|
|
710
|
-
+ [11, 20, 29].map((cx, i) => layerOf(box, 'sc-dot', `<circle class="sc-gold sc-fill" cx="${cx}" cy="10" r="2.4"/>`, { i })).join(''),
|
|
711
|
-
};
|
|
712
|
-
|
|
713
|
-
const FULL = {
|
|
714
|
-
quick: quickFull, code: codeFull, complex: complexFull, review: reviewFull, research: researchFull, browser: browserFull,
|
|
715
|
-
computer: computerFull, automation: automationFull, design: designFull, image_gen: imageFull, video_gen: videoFull, generic: genericFull,
|
|
716
|
-
};
|
|
717
|
-
|
|
718
|
-
/**
|
|
719
|
-
* A scene's markup (decorative: aria-hidden): an HTML box with its still SVG
|
|
720
|
-
* and one layer per moving part (see above). `mini` draws the tray's 40×20
|
|
721
|
-
* version. `live` starts it moving (the stage and tray set data-live
|
|
722
|
-
* themselves later; this is only the first state).
|
|
723
|
-
*/
|
|
724
|
-
export function sceneSvg(scene, { mini = false, live = false, className = '' } = {}) {
|
|
725
|
-
const id = Object.hasOwn(FULL, scene) ? scene : 'generic';
|
|
726
|
-
const box = mini ? SCENE_BOX.mini : SCENE_BOX.full;
|
|
727
|
-
const body = (mini ? MINI[id] : FULL[id])(box);
|
|
728
|
-
return `<span class="asst-scene${mini ? ' is-mini' : ''}${className ? ` ${className}` : ''}" data-scene="${id}"${live ? ' data-live=""' : ''} aria-hidden="true">${body}</span>`;
|
|
452
|
+
const observer = new MutationObserver(() => syncSceneArt());
|
|
453
|
+
observer.observe(document.documentElement, { subtree: true, childList: true, attributes: true,
|
|
454
|
+
attributeFilter: ['data-live', 'data-offscreen', 'class'] });
|
|
455
|
+
document.addEventListener('visibilitychange', () => syncSceneArt());
|
|
456
|
+
globalThis.matchMedia?.('(prefers-reduced-motion: reduce)').addEventListener('change', () => syncSceneArt());
|
|
729
457
|
}
|
|
@@ -223,7 +223,7 @@ function renderPlaceholder(kind) {
|
|
|
223
223
|
if (kind === 'starting') {
|
|
224
224
|
node.setAttribute('role', 'status');
|
|
225
225
|
node.innerHTML = `<div class="asst-empty-mascot" aria-hidden="true"></div><span class="asp-placeholder-text">${esc(tr('assistant.panel.starting', 'Starting SynaBun…'))}</span><span class="asp-placeholder-track" aria-hidden="true"></span>`;
|
|
226
|
-
try { _placeholderMascot = createMascot(node.querySelector('.asst-empty-mascot'), { width:
|
|
226
|
+
try { _placeholderMascot = createMascot(node.querySelector('.asst-empty-mascot'), { width: 280, height: 140, idleVariant: 'hero' }); } catch { _placeholderMascot = null; }
|
|
227
227
|
return;
|
|
228
228
|
}
|
|
229
229
|
node.removeAttribute('role');
|
|
@@ -652,7 +652,7 @@ export function beginAssistantTour({ onPreviewSend = () => {} } = {}) {
|
|
|
652
652
|
const wasVisible = _visible;
|
|
653
653
|
const previousPanel = state.lastActivePanel;
|
|
654
654
|
const previousSidepanel = state.lastActiveSidepanel;
|
|
655
|
-
const peers = ['#topright-claude-panel-btn', '#topright-codex-panel-btn', '#topright-opencode-panel-btn', '#topright-antigravity-panel-btn']
|
|
655
|
+
const peers = ['#topright-claude-panel-btn', '#topright-codex-panel-btn', '#topright-opencode-panel-btn', '#topright-antigravity-panel-btn', '#topright-maritaca-panel-btn']
|
|
656
656
|
.map(s => document.querySelector(s)).filter(b => b?.classList.contains('active'));
|
|
657
657
|
_tourPresenting = true;
|
|
658
658
|
const tab = activeTab();
|
|
@@ -137,6 +137,15 @@ export function providerLabel(provider) {
|
|
|
137
137
|
return PROVIDER_LABELS[provider] || String(provider || '');
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
+
/**
|
|
141
|
+
* The picker group a runnable spec is shown under: OpenCode's `maritaca/<id>` rows are the Maritaca group
|
|
142
|
+
* (they run through OpenCode, the spec stays { provider: 'opencode', model: 'maritaca/<id>' }); any other spec is its provider.
|
|
143
|
+
*/
|
|
144
|
+
export function displayProvider(pref) {
|
|
145
|
+
const provider = pref?.provider || '';
|
|
146
|
+
return provider === 'opencode' && String(pref?.model || '').toLowerCase().startsWith('maritaca/') ? 'maritaca' : provider;
|
|
147
|
+
}
|
|
148
|
+
|
|
140
149
|
/**
|
|
141
150
|
* The icon, colour and name of a provider (provider-icons.js). A provider that file does not know
|
|
142
151
|
* yet keeps its own name and shows no icon, never another provider's (getProviderMeta falls back to
|
|
@@ -233,7 +242,8 @@ export function resolveBrainDefaults(brain, catalog = {}) {
|
|
|
233
242
|
?? (effortSource ? effortSource.map(e => (typeof e === 'string' ? e : e?.id)).filter(id => id && id !== 'off') : null);
|
|
234
243
|
if (ids) {
|
|
235
244
|
if (!ids.length) b.effort = null;
|
|
236
|
-
|
|
245
|
+
// Off (`none`, no thinking) is kept wherever the model can run it, though Claude lists no `none`.
|
|
246
|
+
else if (b.effort && !ids.includes(b.effort) && !(b.effort === ROUTE_EFFORT_OFF && supportsBrainEffortOff(b.provider, ids))) {
|
|
237
247
|
const fallback = row?.defaultEffort || row?.defaultReasoningEffort || pickDefault(effortSource)?.id || null;
|
|
238
248
|
b.effort = fallback && ids.includes(fallback) ? fallback : null;
|
|
239
249
|
}
|
|
@@ -624,7 +634,67 @@ export function routeTargetLabel(target, { effort = false } = {}) {
|
|
|
624
634
|
const label = str(target.label) || modelShortName(target.model) || providerShortLabel(provider);
|
|
625
635
|
if (!effort) return label;
|
|
626
636
|
const level = str(target.effort);
|
|
627
|
-
return level && level !== 'off' ? `${label} · ${level}` : label;
|
|
637
|
+
return level && level !== 'off' ? `${label} · ${routeEffortWord(level)}` : label;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
/** Off for a route is the effort id `none` (no thinking); shown as "off". Other ids as they are. */
|
|
641
|
+
export const ROUTE_EFFORT_OFF = 'none';
|
|
642
|
+
export function routeEffortWord(level) {
|
|
643
|
+
const value = str(level);
|
|
644
|
+
return value.toLowerCase() === ROUTE_EFFORT_OFF ? 'off' : value;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
// ── The brain's own thinking effort (the brain picker) ────────────────────
|
|
648
|
+
// The picker's Auto row keeps the id `off` and stores no effort (the model's default); a server
|
|
649
|
+
// that reset a level it could not run stores `off` with the same meaning. Off (no thinking) is the
|
|
650
|
+
// effort id `none`, the same as a route's Off (lib/effort-levels.js EFFORT_OFF): the Claude brain is
|
|
651
|
+
// started with thinking disabled and keeps it on every turn until another level is picked.
|
|
652
|
+
export const BRAIN_EFFORT_AUTO = 'off';
|
|
653
|
+
const AUTO_BRAIN_EFFORTS = new Set(['', 'off', 'auto', 'default']);
|
|
654
|
+
|
|
655
|
+
/** No effort of its own: the model's default (null, '', off, auto, default). */
|
|
656
|
+
export function isAutoBrainEffort(effort) {
|
|
657
|
+
return AUTO_BRAIN_EFFORTS.has(str(effort).toLowerCase());
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* Can this brain run with thinking off, given the model's effort ids? Mirrors lib/effort-levels.js
|
|
662
|
+
* supportsEffortOff: Claude Code whenever the model thinks at all (Haiku lists none: no), Codex and
|
|
663
|
+
* OpenCode only when the model lists `none`, Antigravity never.
|
|
664
|
+
*/
|
|
665
|
+
export function supportsBrainEffortOff(provider, ids) {
|
|
666
|
+
if (!Array.isArray(ids)) return provider === 'claude-code';
|
|
667
|
+
const list = ids.map((id) => str(typeof id === 'string' ? id : id?.id).toLowerCase()).filter((id) => id && id !== BRAIN_EFFORT_AUTO);
|
|
668
|
+
if (provider === 'claude-code') return list.some((id) => id !== ROUTE_EFFORT_OFF);
|
|
669
|
+
if (provider === 'antigravity') return false;
|
|
670
|
+
return list.includes(ROUTE_EFFORT_OFF);
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
/**
|
|
674
|
+
* The brain picker's effort rows, from the model's list (getEffortLevelsForModel: led by `off`).
|
|
675
|
+
* Claude Code: Auto (`off`, the model's default, stored as no effort), Off (`none`, no thinking) when
|
|
676
|
+
* the model thinks at all, then its levels. `key` names the row's words (assistant.brain.effortAuto /
|
|
677
|
+
* effortNone). Every other provider: its list as it is.
|
|
678
|
+
*/
|
|
679
|
+
export function brainEffortChoices(provider, levels) {
|
|
680
|
+
const list = Array.isArray(levels) ? levels.filter((e) => e && str(e.id)) : [];
|
|
681
|
+
if (provider !== 'claude-code') return list;
|
|
682
|
+
const rest = list.filter((e) => e.id !== BRAIN_EFFORT_AUTO && str(e.id).toLowerCase() !== ROUTE_EFFORT_OFF);
|
|
683
|
+
const auto = { id: BRAIN_EFFORT_AUTO, label: 'Auto', desc: 'Model default', key: 'auto' };
|
|
684
|
+
return rest.length ? [auto, { id: ROUTE_EFFORT_OFF, label: 'Off', desc: 'No thinking', key: 'none' }, ...rest] : [auto];
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
/**
|
|
688
|
+
* The effort a typed `/model <model> <effort>` stores. Claude Code: off / none / no / disabled is Off
|
|
689
|
+
* (`none`: no thinking, as the picker's Off) and auto / default is the model's default (null); a level
|
|
690
|
+
* the model lacks is the server's to correct. Other providers: off / auto / default is the default.
|
|
691
|
+
*/
|
|
692
|
+
export function slashBrainEffort(provider, word) {
|
|
693
|
+
const value = str(word);
|
|
694
|
+
if (!value) return null;
|
|
695
|
+
const lower = value.toLowerCase();
|
|
696
|
+
if (provider === 'claude-code' && ['off', 'none', 'no', 'disabled'].includes(lower)) return ROUTE_EFFORT_OFF;
|
|
697
|
+
return isAutoBrainEffort(lower) ? null : value;
|
|
628
698
|
}
|
|
629
699
|
|
|
630
700
|
export const ROUTE_KIND_LABELS = { direct: 'here', dispatch: 'dispatch', computer: 'computer' };
|