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
|
@@ -17,6 +17,7 @@ import { state, emit, on } from './state.js';
|
|
|
17
17
|
import { forgetGreeting, mountGreeting } from './greeting/greeting-card.js';
|
|
18
18
|
import { fetchClaudeSessions, fetchBrowserSessions, searchSessions } from './api.js';
|
|
19
19
|
import { createFrameRenderer } from './utils.js';
|
|
20
|
+
import { refreshPageSession } from './page-session.js';
|
|
20
21
|
import { notify, NOTIF_TYPE } from './ui-notifications.js';
|
|
21
22
|
import { registerSidepanel, setSidepanelVisible, syncSidepanelLayout, focusSidepanel, openAnotherSidepanelSession, isHostedSessionFocused } from './ui-sidepanel-windows.js';
|
|
22
23
|
import { mountCliBanner } from './ui-cli-banner.js';
|
|
@@ -26,7 +27,7 @@ import { requestGeneratedSessionTitle } from './session-title.js';
|
|
|
26
27
|
import { wireFileLinks } from './ui-file-links.js';
|
|
27
28
|
import { WORKER_END_CLASS, backToAssistant, buildWorkerEndCard, endWorkerRunOnClose, forgetWorkerEnd, trackWorkerEnd, updateWorkerEndBusy } from './ui-worker-end.js';
|
|
28
29
|
import { isDispatchedRun, isEndOfRunAbort, workerEndView } from './worker-end.js';
|
|
29
|
-
import { runAwaitsAnswer } from './sidepanel-session-status.js';
|
|
30
|
+
import { runAwaitsAnswer, runTurnLive } from './sidepanel-session-status.js';
|
|
30
31
|
// ── cp/ feature modules (SDK-engine CLI parity: diffs, agents, bash, perms, statusline) ──
|
|
31
32
|
import { setCpCtx } from './cp/cp-ctx.js';
|
|
32
33
|
import { buildDiffCard, buildDiffPreviewEl, finalizeDiffCard } from './cp/cp-diff.js';
|
|
@@ -36,7 +37,7 @@ import { buildAgentCard, ensureAgentScope, noteAgentActivity, updateAgentTodoBad
|
|
|
36
37
|
import { renderPermissionCard, renderPlanApprovalCard, renderElicitationCard, decorateAskCard, askAnnotations, markAskAnswered, PERMISSION_MODES, MODE_LABELS } from './cp/cp-permissions.js';
|
|
37
38
|
import { normalizeSession, changedStartSettings, sessionFlags, sessionRows, fastModeSupported, fastModeReason, mergeSessionModels, parseMcpServerLines, formatMcpServerLines } from './cp/cp-session-model.js';
|
|
38
39
|
import { renderSessionSettingsCard } from './cp/cp-session-settings.js';
|
|
39
|
-
import { describeOrigin, reconcileTasks, adoptLiveTasks, describeHistorySystemRow, workEndedByRestart, isTaskRunning } from './cp/cp-tasks-model.js';
|
|
40
|
+
import { describeOrigin, reconcileTasks, adoptLiveTasks, describeHistorySystemRow, workEndedByRestart, isTaskRunning, endRunningTasks, backgroundWaitLine } from './cp/cp-tasks-model.js';
|
|
40
41
|
import { renderTasksCard } from './cp/cp-tasks.js';
|
|
41
42
|
import { sessionListLabel, collectTags, tagSession as tagClaudeSession, sessionActionsAvailable, sessionOpsSupported, labelledSessionIds, mergeSessionSearch, writeSessionTitle, forkSession as forkClaudeSession, deleteSession as deleteClaudeSession, fetchSubagentMessages, forkTitle, entryBefore, promptText, removeFrom, sessionRowParts, fillSelectOptions } from './cp/cp-sessions.js';
|
|
42
43
|
import { contextCard, usageCard, mcpRows, rewindPreviewText, rewindResultText } from './cp/cp-usage-model.js';
|
|
@@ -50,6 +51,8 @@ import { CP_STYLES } from './cp/cp-styles.js';
|
|
|
50
51
|
import { TEMPORARY_CAPABILITY, keepsNothing, chooseTemporary, applyTemporary, temporaryRefusal, endTemporary, leaveTemporary, tabAfterTemporary, persistableTabs, temporaryBlocks, reattaches } from './cp/cp-temporary.js';
|
|
51
52
|
import { paintTemporary } from './cp/cp-temporary-view.js';
|
|
52
53
|
import { renderMarkdown } from './cp/cp-markdown.js';
|
|
54
|
+
import { synabunToolKey, synabunToolLabel, synabunToolSummary, synabunToolGroup } from './synabun-tools.js';
|
|
55
|
+
import { normalizeToolHeartbeat } from './tool-heartbeat.js';
|
|
53
56
|
import { sanitizeStoredHtml } from './assistant/asst-sanitize.js';
|
|
54
57
|
import { escapeHtml, classToken } from './cp/cp-markdown.js';
|
|
55
58
|
import { rehydrateStoredTranscript } from './cp/cp-rehydrate.js';
|
|
@@ -85,9 +88,12 @@ const ICON_CHECK = '<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" s
|
|
|
85
88
|
const ICON_X = '<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 4l8 8M12 4l-8 8"/></svg>';
|
|
86
89
|
|
|
87
90
|
// ── SynaBun MCP tool registry ──
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
+
// Which call is SynaBun's, and the name and summary of one this registry does not
|
|
92
|
+
// list, come from synabun-tools.js (every panel's): `mcp__SynaBun__x` in any letter
|
|
93
|
+
// case, a plugin's copy of the server, OpenCode's `SynaBun_x`. Every SynaBun tool
|
|
94
|
+
// gets the branded card; the registry only adds an icon and a summary of its own.
|
|
95
|
+
function isSynaBunTool(name) { return synabunToolKey(name) != null; }
|
|
96
|
+
function synaBunToolKey(name) { return synabunToolKey(name) || ''; }
|
|
91
97
|
|
|
92
98
|
const SB_ICON_RECALL = '<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><path d="M8 2C5.2 2 3 4.2 3 7c0 1.8 1 3.4 2.4 4.2V13h5.2v-1.8C12 10.4 13 8.8 13 7c0-2.8-2.2-5-5-5z"/><path d="M6 13.5h4M6.5 15h3"/><circle cx="11.5" cy="4" r="2.5"/><path d="M10.5 4h2M11.5 3v2"/></svg>';
|
|
93
99
|
const SB_ICON_REMEMBER = '<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><path d="M8 2C5.2 2 3 4.2 3 7c0 1.8 1 3.4 2.4 4.2V13h5.2v-1.8C12 10.4 13 8.8 13 7c0-2.8-2.2-5-5-5z"/><path d="M6 13.5h4M6.5 15h3"/><path d="M7 6.5h2M8 5.5v2"/></svg>';
|
|
@@ -118,25 +124,17 @@ const SYNABUN_TOOLS = {
|
|
|
118
124
|
loop: { label: 'Loop', group: 'system', icon: SB_ICON_LOOP, detailFn: i => i.action || '' },
|
|
119
125
|
tictactoe: { label: 'Tic-Tac-Toe', group: 'fun', icon: SB_ICON_TICTACTOE, detailFn: i => i.action || '' },
|
|
120
126
|
};
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
discord: { label: 'Discord', group: 'discord', icon: SB_ICON_DISCORD, detailFn: i => i.action || i.channel_id || '' },
|
|
124
|
-
whiteboard: { label: 'Whiteboard', group: 'whiteboard', icon: SB_ICON_WHITEBOARD, detailFn: i => i.id || '' },
|
|
125
|
-
card: { label: 'Card', group: 'card', icon: SB_ICON_CARD, detailFn: i => i.card_id || '' },
|
|
126
|
-
browser_extract: { label: 'Extract', group: 'browser', icon: SB_ICON_BROWSER, detailFn: i => i.url || i.selector || '' },
|
|
127
|
-
};
|
|
127
|
+
// The icon of a SynaBun tool the registry does not list, by its group (the logo otherwise).
|
|
128
|
+
const SYNABUN_GROUP_ICONS = { browser: SB_ICON_BROWSER, discord: SB_ICON_DISCORD, whiteboard: SB_ICON_WHITEBOARD, card: SB_ICON_CARD, memory: SB_ICON_MEMORIES };
|
|
128
129
|
|
|
130
|
+
/** The card of a SynaBun tool: { label, group, icon, detailFn }; null only for a call that is not SynaBun's. */
|
|
129
131
|
function getSynaBunMeta(name) {
|
|
130
|
-
const
|
|
132
|
+
const raw = synabunToolKey(name);
|
|
133
|
+
if (raw == null) return null;
|
|
134
|
+
const key = raw.toLowerCase();
|
|
131
135
|
if (Object.prototype.hasOwnProperty.call(SYNABUN_TOOLS, key)) return SYNABUN_TOOLS[key];
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
const action = key.slice(prefix.length + 1) || '';
|
|
135
|
-
const actionLabel = action.replace(/_/g, ' ').replace(/\b\w/g, c => c.toUpperCase());
|
|
136
|
-
return { ...meta, label: actionLabel ? `${meta.label}: ${actionLabel}` : meta.label };
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
return null;
|
|
136
|
+
const group = synabunToolGroup(key);
|
|
137
|
+
return { label: synabunToolLabel(key), group, icon: SYNABUN_GROUP_ICONS[group] || SYNABUN_LOGO_ICON, detailFn: i => synabunToolSummary(key, i) };
|
|
140
138
|
}
|
|
141
139
|
|
|
142
140
|
function toolIconSvg(name) {
|
|
@@ -1880,7 +1878,9 @@ function injectStyles() {
|
|
|
1880
1878
|
.cp-messages pre code[class*="diff"] {
|
|
1881
1879
|
display: block; white-space: pre;
|
|
1882
1880
|
}
|
|
1883
|
-
|
|
1881
|
+
/* A diff block, as addCopyButtons() found it (data-diff-wrapped, set once). Not :has(code[class*="diff"]): a
|
|
1882
|
+
class test inside :has() re-checked the page on every class change anywhere (css-has-performance test). */
|
|
1883
|
+
.cp-messages pre:has(code[data-diff-wrapped]) {
|
|
1884
1884
|
background: rgba(0,0,0,0.4);
|
|
1885
1885
|
border-color: rgba(140,160,200,0.15);
|
|
1886
1886
|
}
|
|
@@ -1893,6 +1893,7 @@ function injectStyles() {
|
|
|
1893
1893
|
|
|
1894
1894
|
/* ── MCP collapse markers ── */
|
|
1895
1895
|
.tool-mcp-badge {
|
|
1896
|
+
border: none; cursor: pointer; line-height: 1.4;
|
|
1896
1897
|
margin-left: 6px; padding: 1px 6px; border-radius: 4px;
|
|
1897
1898
|
background: rgba(255,195,0,0.14); color: rgba(255,210,60,0.9);
|
|
1898
1899
|
font-size: 9px; font-family: 'JetBrains Mono', monospace; font-weight: 600;
|
|
@@ -3489,6 +3490,31 @@ function _loadHistoryIfWorking(tab, saved) {
|
|
|
3489
3490
|
loadSessionHistory(tab.sessionId, tab.messagesEl);
|
|
3490
3491
|
}
|
|
3491
3492
|
|
|
3493
|
+
// A tab restored as owned by a live run: the run may have ended while this window was away, and the router
|
|
3494
|
+
// brings back only recent ended runs (ui-native-loop-router.js reconcileRuns: the last day, ten at most), so
|
|
3495
|
+
// such a tab would say "owned by a running automation" for good. The run's own record decides: an ended run
|
|
3496
|
+
// (or one the server no longer keeps) frees the tab (not working, not owned, its pill at rest) and gets its
|
|
3497
|
+
// end card; a live one is the router's, whose attach does the same when the run ends.
|
|
3498
|
+
async function _settleRestoredAutomation(tab) {
|
|
3499
|
+
const runId = tab?.automationRunId;
|
|
3500
|
+
if (!runId) return;
|
|
3501
|
+
let run = null;
|
|
3502
|
+
try {
|
|
3503
|
+
const response = await fetch(`/api/sidepanel-runs/${encodeURIComponent(runId)}`);
|
|
3504
|
+
if (response.status === 404) run = { runId, missing: true };
|
|
3505
|
+
else if (response.ok) run = (await response.json())?.run || null;
|
|
3506
|
+
} catch {}
|
|
3507
|
+
if (!run || tab.closed || tab.automationRunId !== runId || tab._automationHydrated) return;
|
|
3508
|
+
if (!run.missing && (run.status === 'starting' || run.status === 'running' || run.status === 'suspended')) return;
|
|
3509
|
+
tab.automationActive = false;
|
|
3510
|
+
tab.automationAwaits = false;
|
|
3511
|
+
if (tab.running) finishTab(tab, true); else updatePillRunning(tab);
|
|
3512
|
+
if (!run.missing) trackWorkerEnd(run, { apply: (view) => showWorkerEnd(tab, view) });
|
|
3513
|
+
if (tab === activeTab()) populateModeDropdown(_panel?.querySelector('#cp-mode'), tab);
|
|
3514
|
+
renderPills();
|
|
3515
|
+
saveTabs();
|
|
3516
|
+
}
|
|
3517
|
+
|
|
3492
3518
|
function restoreTabs() {
|
|
3493
3519
|
_cleanStaleWindows();
|
|
3494
3520
|
const pickRestoredTabIdx = (activeIdx) => {
|
|
@@ -3529,6 +3555,7 @@ function restoreTabs() {
|
|
|
3529
3555
|
if (t && saved.automationRunId) t.automationOwnerId = saved.automationOwnerId || null;
|
|
3530
3556
|
if (t && saved.releasedRunId && !saved.automationRunId) t.releasedRunId = saved.releasedRunId;
|
|
3531
3557
|
if (t) _loadHistoryIfWorking(t, saved);
|
|
3558
|
+
if (t && saved.automationRunId && saved.automationActive) _settleRestoredAutomation(t);
|
|
3532
3559
|
}
|
|
3533
3560
|
if (_tabs.length) {
|
|
3534
3561
|
switchTab(pickRestoredTabIdx(data.activeIdx));
|
|
@@ -4746,6 +4773,28 @@ function _renderHistoryRow(tab, $msgs, m) {
|
|
|
4746
4773
|
return;
|
|
4747
4774
|
}
|
|
4748
4775
|
if (m.role === 'assistant') {
|
|
4776
|
+
// Only calls, right after an assistant row (its words, or the calls before them): the same
|
|
4777
|
+
// row, as the live path shows a run of calls (toolRunRow).
|
|
4778
|
+
const onlyCalls = !m.text && !m.thinking && Array.isArray(m.tools) && m.tools.length > 0
|
|
4779
|
+
&& m.tools.every(t => t && typeof t === 'object' && t.name && t.name !== 'AskUserQuestion' && t.name !== 'ExitPlanMode');
|
|
4780
|
+
const runRow = onlyCalls ? toolRunRowIn($msgs, live ? tab.thinkingEl : null, { afterWords: true }) : null;
|
|
4781
|
+
if (runRow) {
|
|
4782
|
+
const runWrap = runRow.querySelector(':scope > .msg-content');
|
|
4783
|
+
for (const t of m.tools) {
|
|
4784
|
+
const card = buildTool(t, tab);
|
|
4785
|
+
if (!card) continue;
|
|
4786
|
+
if (t.id && $msgs._replayCards instanceof Map) $msgs._replayCards.set(String(t.id), card);
|
|
4787
|
+
runWrap.appendChild(card);
|
|
4788
|
+
}
|
|
4789
|
+
if (m.uuid) runRow.dataset.uuids = [runRow.dataset.uuids, m.uuid].filter(Boolean).join(' ');
|
|
4790
|
+
if (live && tab._pendingResults instanceof Map && tab._pendingResults.size) {
|
|
4791
|
+
for (const t of m.tools) {
|
|
4792
|
+
const ev = t?.id ? takePendingResult(tab, t.id) : null;
|
|
4793
|
+
if (ev) { try { updateToolResult(tab, ev); } catch {} }
|
|
4794
|
+
}
|
|
4795
|
+
}
|
|
4796
|
+
return;
|
|
4797
|
+
}
|
|
4749
4798
|
const el = document.createElement('div'); el.className = 'msg msg-assistant';
|
|
4750
4799
|
if (m.uuid) el.dataset.uuids = m.uuid;
|
|
4751
4800
|
const avatar = document.createElement('div'); avatar.className = 'msg-avatar';
|
|
@@ -4988,6 +5037,8 @@ function loadSessionHistory(sid, $msgs) {
|
|
|
4988
5037
|
if (!ownerTab) return;
|
|
4989
5038
|
ownerTab._historyHold = Math.max(0, (ownerTab._historyHold || 1) - 1);
|
|
4990
5039
|
if (!ownerTab._historyHold && ownerTab._msgBuffer?.length && !ownerTab.closed) _flushMsgBuffer(ownerTab);
|
|
5040
|
+
// The transcript was drawn again: the end card of a dispatched worker (the last row) goes back under it.
|
|
5041
|
+
if (!ownerTab._historyHold) placeWorkerEnd(ownerTab);
|
|
4991
5042
|
});
|
|
4992
5043
|
}
|
|
4993
5044
|
|
|
@@ -5788,6 +5839,10 @@ function _processTabMsg(tab, msg) {
|
|
|
5788
5839
|
|
|
5789
5840
|
function handleTabEvent(tab, ev) {
|
|
5790
5841
|
if (!ev?.type) return;
|
|
5842
|
+
// A call running past 30 s gets a heartbeat whose parent_tool_use_id is the call
|
|
5843
|
+
// itself, not a subagent: it is progress of that call, never a subagent's card
|
|
5844
|
+
// (tool-heartbeat.js).
|
|
5845
|
+
ev = normalizeToolHeartbeat(ev);
|
|
5791
5846
|
|
|
5792
5847
|
// ── Subagent scope routing (SDK engine) ──
|
|
5793
5848
|
// Messages emitted by a Task subagent carry parent_tool_use_id; route them to
|
|
@@ -6281,6 +6336,13 @@ function handleStreamDelta(tab, apiEvent) {
|
|
|
6281
6336
|
// (with full input) when the complete message arrives. No buildTool side
|
|
6282
6337
|
// effects fire for ghosts.
|
|
6283
6338
|
if (tab._stream.blockType === 'tool_use' && apiEvent.content_block?.id && apiEvent.content_block?.name !== 'AskUserQuestion') {
|
|
6339
|
+
// A message that opens with a tool call, right after a row of tool calls: the same row.
|
|
6340
|
+
const joined = !tab._stream.el ? toolRunRow(tab) : null;
|
|
6341
|
+
if (joined) {
|
|
6342
|
+
tab._stream.el = joined;
|
|
6343
|
+
tab._stream.joined = true;
|
|
6344
|
+
if (tab._stream.msgId) { tab.currentMsgId = tab._stream.msgId; tab.currentMsgEl = joined; tab._joinedMsgId = tab._stream.msgId; }
|
|
6345
|
+
}
|
|
6284
6346
|
if (!tab._stream.el) {
|
|
6285
6347
|
const el = document.createElement('div');
|
|
6286
6348
|
el.className = 'msg msg-assistant';
|
|
@@ -6304,7 +6366,11 @@ function handleStreamDelta(tab, apiEvent) {
|
|
|
6304
6366
|
ghost.className = 'tool-card tool-streaming';
|
|
6305
6367
|
ghost.dataset.toolId = cb.id;
|
|
6306
6368
|
ghost.dataset.toolName = cb.name || '';
|
|
6307
|
-
|
|
6369
|
+
const sbMeta = getSynaBunMeta(cb.name);
|
|
6370
|
+
if (sbMeta) ghost.classList.add('synabun-card');
|
|
6371
|
+
ghost.innerHTML = sbMeta
|
|
6372
|
+
? `<div class="tool-hdr synabun-hdr"><span class="tool-icon synabun-icon">${SYNABUN_LOGO_ICON}</span><span class="tool-name synabun-name">${esc(sbMeta.label)}</span><span class="tool-detail">…</span></div>`
|
|
6373
|
+
: `<div class="tool-hdr"><span class="tool-icon">${toolIconSvg(cb.name)}</span><span class="tool-name">${esc(cb.name || 'tool')}</span><span class="tool-detail">…</span></div>`;
|
|
6308
6374
|
wrapEl.appendChild(ghost);
|
|
6309
6375
|
try { if (!tab._agentScope) setActivity(tab, cpActivityVerb(cb.name, {})); } catch {}
|
|
6310
6376
|
if (tab === activeTab()) scrollEnd();
|
|
@@ -6378,6 +6444,7 @@ function handleStreamDelta(tab, apiEvent) {
|
|
|
6378
6444
|
// Lazy-create row + body on first visible text. Keeps empty/whitespace-only
|
|
6379
6445
|
// text blocks from leaving a blank row next to the avatar.
|
|
6380
6446
|
if (!tab._stream.bodyEl && tab._stream.textBuf.trim()) {
|
|
6447
|
+
if (tab._stream.joined) { tab._stream.el = null; tab._stream.joined = false; tab._joinedMsgId = null; }
|
|
6381
6448
|
if (!tab._stream.el) {
|
|
6382
6449
|
const el = document.createElement('div');
|
|
6383
6450
|
el.className = 'msg msg-assistant';
|
|
@@ -6693,6 +6760,25 @@ function _cleanupEmptyAssistantRow(el) {
|
|
|
6693
6760
|
return false;
|
|
6694
6761
|
}
|
|
6695
6762
|
|
|
6763
|
+
/**
|
|
6764
|
+
* The assistant row a message of tool calls alone continues: the last row of the
|
|
6765
|
+
* transcript (the thinking indicator aside), with an avatar, ending on a tool card.
|
|
6766
|
+
* Anything after it (a note, a permission or question card, a turn footer, a status
|
|
6767
|
+
* line, the user's prompt) ends the run. null when there is none.
|
|
6768
|
+
*/
|
|
6769
|
+
function toolRunRowIn($msgs, skip = null, { afterWords = false } = {}) {
|
|
6770
|
+
if (!$msgs) return null;
|
|
6771
|
+
let prev = $msgs.lastElementChild;
|
|
6772
|
+
if (prev && skip && prev === skip) prev = prev.previousElementSibling;
|
|
6773
|
+
if (!prev?.classList?.contains('msg-assistant') || prev.dataset.workerQuestionId) return null;
|
|
6774
|
+
if (!prev.querySelector(':scope > .msg-avatar')) return null;
|
|
6775
|
+
const last = prev.querySelector(':scope > .msg-content')?.lastElementChild;
|
|
6776
|
+
if (last?.classList?.contains('tool-card')) return prev;
|
|
6777
|
+
// (History: a transcript keeps the words and the calls of one message on two lines.)
|
|
6778
|
+
return afterWords && last?.classList?.contains('msg-body') ? prev : null;
|
|
6779
|
+
}
|
|
6780
|
+
function toolRunRow(tab) { return toolRunRowIn(tab?.messagesEl, tab?.thinkingEl); }
|
|
6781
|
+
|
|
6696
6782
|
function renderAssistant(tab, msg) {
|
|
6697
6783
|
const $msgs = tab.messagesEl;
|
|
6698
6784
|
if (!$msgs) return;
|
|
@@ -6735,6 +6821,14 @@ function renderAssistant(tab, msg) {
|
|
|
6735
6821
|
saveTabs();
|
|
6736
6822
|
}
|
|
6737
6823
|
|
|
6824
|
+
// A message whose cards joined the row before it (toolRunRow) and that now carries words or
|
|
6825
|
+
// thinking: those go in a row of their own, below; its cards stay where they are.
|
|
6826
|
+
let ownRow = false;
|
|
6827
|
+
if (msgId && msgId === tab._joinedMsgId && msgId === tab.currentMsgId && tab.currentMsgEl
|
|
6828
|
+
&& (texts.some(b => (b.text || '').trim()) || thinks.some(b => (b.thinking || '').trim()))) {
|
|
6829
|
+
tab.currentMsgEl = null; tab.currentMsgId = null; tab._joinedMsgId = null; ownRow = true;
|
|
6830
|
+
}
|
|
6831
|
+
|
|
6738
6832
|
// Partial message dedup
|
|
6739
6833
|
if (msgId && msgId === tab.currentMsgId && tab.currentMsgEl) {
|
|
6740
6834
|
const wrap = tab.currentMsgEl.querySelector('.msg-content');
|
|
@@ -6786,7 +6880,10 @@ function renderAssistant(tab, msg) {
|
|
|
6786
6880
|
const existingToolIds = new Set([...wrap.querySelectorAll('.tool-card, .plan-card')].map(c => c.dataset.toolId));
|
|
6787
6881
|
for (const t of regularTools) {
|
|
6788
6882
|
if (!existingToolIds.has(t.id || '')) {
|
|
6789
|
-
|
|
6883
|
+
// (Already shown in another row: the cards of a message split by toolRunRow.)
|
|
6884
|
+
const elsewhere = t.id ? $msgs.querySelector(`.tool-card[data-tool-id="${CSS.escape(t.id)}"], .plan-card[data-tool-id="${CSS.escape(t.id)}"]`) : null;
|
|
6885
|
+
if (!elsewhere) wrap.appendChild(buildTool(t, tab));
|
|
6886
|
+
else if (elsewhere.classList.contains('tool-streaming')) elsewhere.replaceWith(buildTool(t, tab));
|
|
6790
6887
|
} else {
|
|
6791
6888
|
// Backfill streaming ghost stubs with the real card now that full input arrived
|
|
6792
6889
|
const ghost = wrap.querySelector(`.tool-card.tool-streaming[data-tool-id="${CSS.escape(t.id || '')}"]`);
|
|
@@ -6815,7 +6912,23 @@ function renderAssistant(tab, msg) {
|
|
|
6815
6912
|
return;
|
|
6816
6913
|
}
|
|
6817
6914
|
|
|
6818
|
-
// New assistant message
|
|
6915
|
+
// New assistant message. One that is only tool calls, right after a row whose last item is a
|
|
6916
|
+
// tool card, is the same stretch of work: its cards join that row (one avatar for the run of
|
|
6917
|
+
// calls, the way parallel calls share one), instead of a row per call.
|
|
6918
|
+
const shownTools = ownRow ? regularTools.filter(t => !t.id || !$msgs.querySelector(`.tool-card[data-tool-id="${CSS.escape(t.id)}"]`)) : regularTools;
|
|
6919
|
+
const joined = !ownRow && !thinks.length && !texts.some(b => (b.text || '').trim()) && !askTools.length && !extras.any && shownTools.length
|
|
6920
|
+
? toolRunRow(tab) : null;
|
|
6921
|
+
if (joined) {
|
|
6922
|
+
const joinedWrap = joined.querySelector(':scope > .msg-content');
|
|
6923
|
+
for (const t of shownTools) joinedWrap.appendChild(buildTool(t, tab));
|
|
6924
|
+
if (msgId) { tab.currentMsgId = msgId; tab.currentMsgEl = joined; tab._joinedMsgId = msgId; }
|
|
6925
|
+
const postPlanJ = $msgs.querySelector('.post-plan-card')?.closest('.msg');
|
|
6926
|
+
if (postPlanJ && postPlanJ !== $msgs.lastElementChild) $msgs.appendChild(postPlanJ);
|
|
6927
|
+
if (tab.thinkingEl && tab.thinkingEl.parentNode === $msgs && tab.thinkingEl !== $msgs.lastElementChild) $msgs.appendChild(tab.thinkingEl);
|
|
6928
|
+
if (tab === activeTab()) scrollEnd();
|
|
6929
|
+
scheduleSessionSnapshotSave(tab);
|
|
6930
|
+
return;
|
|
6931
|
+
}
|
|
6819
6932
|
const el = document.createElement('div');
|
|
6820
6933
|
el.className = 'msg msg-assistant';
|
|
6821
6934
|
const avatar = document.createElement('div');
|
|
@@ -6847,7 +6960,7 @@ function renderAssistant(tab, msg) {
|
|
|
6847
6960
|
wrap.appendChild(body);
|
|
6848
6961
|
}
|
|
6849
6962
|
}
|
|
6850
|
-
for (const t of
|
|
6963
|
+
for (const t of shownTools) wrap.appendChild(buildTool(t, tab));
|
|
6851
6964
|
for (const t of askTools) wrap.appendChild(buildAskFromToolUse(tab, t));
|
|
6852
6965
|
el.appendChild(wrap);
|
|
6853
6966
|
$msgs.appendChild(el);
|
|
@@ -10121,7 +10234,9 @@ function showBrowserEmbed(sessionId, url) {
|
|
|
10121
10234
|
if (!_cpWsReconnAttempted) {
|
|
10122
10235
|
_cpWsReconnAttempted = true;
|
|
10123
10236
|
console.log('[claude-panel] Browser WS closed, retrying once for', sessionId);
|
|
10124
|
-
setTimeout(() => {
|
|
10237
|
+
setTimeout(async () => {
|
|
10238
|
+
// A socket refused for an earlier boot's page secret never says why: ask for this boot's first.
|
|
10239
|
+
await refreshPageSession(window);
|
|
10125
10240
|
if (_browserEmbed?.sessionId !== sessionId) return;
|
|
10126
10241
|
const proto2 = location.protocol === 'https:' ? 'wss:' : 'ws:';
|
|
10127
10242
|
const ws2 = new WebSocket(`${proto2}//${location.host}/ws/browser/${sessionId}`);
|
|
@@ -10536,6 +10651,16 @@ function _onMessagesClick(e) {
|
|
|
10536
10651
|
});
|
|
10537
10652
|
return;
|
|
10538
10653
|
}
|
|
10654
|
+
// A run of repeated MCP calls: its badge shows or folds the calls after the first.
|
|
10655
|
+
const mcpBadge = e.target.closest('.tool-mcp-badge');
|
|
10656
|
+
if (mcpBadge) {
|
|
10657
|
+
const first = mcpBadge.closest('.tool-card');
|
|
10658
|
+
if (first) {
|
|
10659
|
+
first.dataset.mcpOpen = first.dataset.mcpOpen === '1' ? '0' : '1';
|
|
10660
|
+
try { collapseAdjacentMcpTools(first.parentElement); } catch {}
|
|
10661
|
+
}
|
|
10662
|
+
return;
|
|
10663
|
+
}
|
|
10539
10664
|
// File links (a.file-link, and the links of a message's Markdown) are taken by _fileLinkOptions below.
|
|
10540
10665
|
const hdr = e.target.closest('.tool-hdr');
|
|
10541
10666
|
if (hdr && !e.target.closest('button, a, input, select, textarea')) {
|
|
@@ -10695,7 +10820,14 @@ export async function attachClaudeAutomation(run, { focus = !!run?.focus, isCanc
|
|
|
10695
10820
|
tab.effort = run.effort || tab.effort;
|
|
10696
10821
|
// A warm worker whose turn ended on a question needs you, like one with a card up (setRunning repaints).
|
|
10697
10822
|
tab.automationAwaits = runAwaitsAnswer(run);
|
|
10698
|
-
|
|
10823
|
+
// Whether a turn is in progress is the run's word (runTurnLive): a warm worker between turns is alive, not
|
|
10824
|
+
// working, and a run that ended works no more. A tab still showing a turn the run says is over ends it here
|
|
10825
|
+
// (finishTab: the spinner, the thinking row, the stream, the statusline), whether or not that turn's result
|
|
10826
|
+
// event ever reached this window; the run's own events keep it at work only while the run says so.
|
|
10827
|
+
const working = runTurnLive(run);
|
|
10828
|
+
if (working) setRunning(tab, true);
|
|
10829
|
+
else if (tab.running) finishTab(tab, true);
|
|
10830
|
+
else setRunning(tab, false);
|
|
10699
10831
|
updatePillLabel(tab);
|
|
10700
10832
|
tab._automationIteration = run.currentIteration;
|
|
10701
10833
|
// Resumed after a server restart: what the run did while this window was away (the continuation prompt, its first
|
|
@@ -10717,6 +10849,8 @@ export async function attachClaudeAutomation(run, { focus = !!run?.focus, isCanc
|
|
|
10717
10849
|
tab._automationResumes = Math.max(tab._automationResumes || 0, resumes);
|
|
10718
10850
|
if (suspended) _showRunSuspended(tab, run);
|
|
10719
10851
|
else tab._automationSuspendedAt = null;
|
|
10852
|
+
// An ended run's CLI is gone, and every background shell or Monitor with it.
|
|
10853
|
+
if (!running && !suspended) _endRunBackgroundWork(tab);
|
|
10720
10854
|
// (A dispatched worker's failure, with its reason, is on its end card.)
|
|
10721
10855
|
if (run.status === 'failed' && run.error && !isDispatchedRun(run) && tab._automationLifecycleError !== run.error) {
|
|
10722
10856
|
tab._automationLifecycleError = run.error;
|
|
@@ -10736,6 +10870,8 @@ export async function attachClaudeAutomation(run, { focus = !!run?.focus, isCanc
|
|
|
10736
10870
|
},
|
|
10737
10871
|
});
|
|
10738
10872
|
trackWorkerEnd(run, { apply: (view) => showWorkerEnd(tab, view), busy: hasLiveBackgroundWork(tab) });
|
|
10873
|
+
// (The card is drawn only when what it says changes: a transcript read again meanwhile gets it back.)
|
|
10874
|
+
placeWorkerEnd(tab);
|
|
10739
10875
|
// The mode control is hidden while the run is active and back when it ended.
|
|
10740
10876
|
if (tab === activeTab()) populateModeDropdown(_panel?.querySelector('#cp-mode'), tab);
|
|
10741
10877
|
const idx = _tabs.indexOf(tab);
|
|
@@ -10768,6 +10904,13 @@ export function handleClaudeAutomationEvent(runId, payload) {
|
|
|
10768
10904
|
appendError(tab, event.message || 'Claude Code automation failed');
|
|
10769
10905
|
return true;
|
|
10770
10906
|
}
|
|
10907
|
+
// The run's turn waits for its own background work (lib/claude-background-hold.js): say so once per change.
|
|
10908
|
+
if (event.type === 'synabun.background_wait') {
|
|
10909
|
+
const line = backgroundWaitLine(event);
|
|
10910
|
+
if (line && line !== tab._backgroundWaitLine) appendStatus(tab, line);
|
|
10911
|
+
tab._backgroundWaitLine = line || null;
|
|
10912
|
+
return true;
|
|
10913
|
+
}
|
|
10771
10914
|
handleTabMsg(tab, { type: 'event', event, fromRun: true });
|
|
10772
10915
|
// Background agents still running keep a warm worker's "Task complete" away.
|
|
10773
10916
|
if (event.type === 'system' || event.type === 'result') updateWorkerEndBusy(runId, hasLiveBackgroundWork(tab));
|
|
@@ -10839,6 +10982,23 @@ function _closeCutOffTools(tab) {
|
|
|
10839
10982
|
_setBackgroundWork(tab, []);
|
|
10840
10983
|
}
|
|
10841
10984
|
|
|
10985
|
+
// A run that ended (completed, stopped, failed): its CLI process is gone, so nothing it ran in the background runs
|
|
10986
|
+
// any more. The tasks it never reported the end of (the run closed its query first) are ended here, or the
|
|
10987
|
+
// Background work card shows them running forever.
|
|
10988
|
+
function _endRunBackgroundWork(tab) {
|
|
10989
|
+
let changed = false;
|
|
10990
|
+
try { changed = endRunningTasks(tab.tasks) > 0; } catch {}
|
|
10991
|
+
let shells = false;
|
|
10992
|
+
for (const task of tab.bgTasks?.values?.() || []) {
|
|
10993
|
+
if (task?.status === 'running') { task.status = 'stopped'; shells = true; }
|
|
10994
|
+
}
|
|
10995
|
+
if (shells) { try { renderBgTray(tab); } catch {} }
|
|
10996
|
+
if ((tab.backgroundWork || []).length) _setBackgroundWork(tab, []);
|
|
10997
|
+
else if (changed || shells) updatePillRunning(tab);
|
|
10998
|
+
// An open tasks card follows along.
|
|
10999
|
+
if ((changed || shells) && tab.messagesEl?.querySelector('.cp-tasks-card')) { try { _openTasks(tab); } catch {} }
|
|
11000
|
+
}
|
|
11001
|
+
|
|
10842
11002
|
// The end of a worker the Assistant dispatched (ui-worker-end.js): one card,
|
|
10843
11003
|
// the last row of its transcript. Its button closes this tab the way the X
|
|
10844
11004
|
// does (a warm worker that finished its task is completed, one still at work
|
|
@@ -10861,6 +11021,17 @@ function showWorkerEnd(tab, view) {
|
|
|
10861
11021
|
if (tab === activeTab()) scrollEnd(true);
|
|
10862
11022
|
}
|
|
10863
11023
|
|
|
11024
|
+
// The card is drawn once per change of what it says (ui-worker-end.js), and a transcript read again
|
|
11025
|
+
// meanwhile (a reconnect, a resume after a server restart) drops it with the rest: put it back, as the last
|
|
11026
|
+
// row, from what the tab keeps of it. Nothing happens for a tab without a card or with its card in place.
|
|
11027
|
+
function placeWorkerEnd(tab) {
|
|
11028
|
+
const view = tab?._workerEnd;
|
|
11029
|
+
const $msgs = tab?.messagesEl;
|
|
11030
|
+
if (!view || !$msgs || tab.closed) return;
|
|
11031
|
+
if ($msgs.querySelector(`.${WORKER_END_CLASS}`)) return;
|
|
11032
|
+
showWorkerEnd(tab, view);
|
|
11033
|
+
}
|
|
11034
|
+
|
|
10864
11035
|
// The user sends a message of their own in the tab of a run that ended (Codex's
|
|
10865
11036
|
// releaseAutomationForManualUse): the run's end card goes, the tab stops following
|
|
10866
11037
|
// the run, and the router leaves the run alone, so nothing of it comes back here.
|
|
@@ -11563,11 +11734,18 @@ function collapseAdjacentMcpTools($msgs) {
|
|
|
11563
11734
|
const flush = () => {
|
|
11564
11735
|
if (group.length < 2) { group = []; return; }
|
|
11565
11736
|
const first = group[0];
|
|
11566
|
-
|
|
11737
|
+
// The badge shows the calls it folds away and folds them again (_onMessagesClick):
|
|
11738
|
+
// what each of them did stays one click away.
|
|
11739
|
+
const open = first.dataset.mcpOpen === '1';
|
|
11740
|
+
const badge = document.createElement('button');
|
|
11741
|
+
badge.type = 'button';
|
|
11567
11742
|
badge.className = 'tool-mcp-badge';
|
|
11568
11743
|
badge.textContent = `×${group.length}`;
|
|
11569
|
-
|
|
11570
|
-
|
|
11744
|
+
badge.setAttribute('aria-expanded', open ? 'true' : 'false');
|
|
11745
|
+
badge.title = open ? 'Fold the repeated calls' : `Show all ${group.length} calls`;
|
|
11746
|
+
const hdr = first.querySelector('.tool-hdr');
|
|
11747
|
+
if (hdr) hdr.insertBefore(badge, hdr.querySelector(':scope > .tool-chevron'));
|
|
11748
|
+
if (!open) for (let i = 1; i < group.length; i++) group[i].classList.add('cp-mcp-collapsed');
|
|
11571
11749
|
group = [];
|
|
11572
11750
|
};
|
|
11573
11751
|
// True if `c` is the next tool-card sibling after `prev` (same parent, only
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
import { escapeHtml, debounce } from './utils.js';
|
|
21
21
|
import { storage } from './storage.js';
|
|
22
22
|
import * as kit from './settings/settings-kit.js';
|
|
23
|
+
import { logOriginFilter } from './judgments-log-origins.js';
|
|
24
|
+
import { markNoAccess, noteOwnerAccessRefusal, ownerAccessSay, refusalOfError } from './ui-owner-access.js';
|
|
23
25
|
|
|
24
26
|
// Mirrors ui-settings.js (module-local there; duplicated to avoid an import cycle).
|
|
25
27
|
const CHEVRON_ICON = '<svg class="cc-section-chevron" viewBox="0 0 24 24"><polyline points="9 18 15 12 9 6"/></svg>';
|
|
@@ -47,6 +49,19 @@ const PRE = 'margin:0;white-space:pre-wrap;font-size:11px;max-height:160px;overf
|
|
|
47
49
|
const LINK = 'color:var(--accent);text-decoration:underline dotted;text-underline-offset:2px;cursor:pointer';
|
|
48
50
|
/** A server new enough to attribute log rows to sessions and count from the log. Older ones get the per-process view. */
|
|
49
51
|
const serverV2 = (cfg) => Boolean(cfg && (Array.isArray(cfg.origins) || (cfg.logStats && typeof cfg.logStats === 'object')));
|
|
52
|
+
/** The log's origin options for a config answer (judgments-log-origins.js decides which): the server's own list, with
|
|
53
|
+
* the note on "live" in its tooltip (a select is as wide as its longest option), or an older server's three. */
|
|
54
|
+
function logOriginOptions(cfg) {
|
|
55
|
+
const { listed, values } = logOriginFilter(cfg);
|
|
56
|
+
const all = '<option value="">' + kit.te('settings.redesign.judgments.allOrigins') + '</option>';
|
|
57
|
+
if (!listed) {
|
|
58
|
+
const label = { live: kit.te('settings.redesign.judgments.live'), backfill: kit.te('settings.redesign.judgments.backfill'), bench: kit.te('settings.redesign.judgments.bench') };
|
|
59
|
+
return all + values.map(o => `<option value="${attr(o)}">${label[o] ?? escapeHtml(o)}</option>`).join('');
|
|
60
|
+
}
|
|
61
|
+
return all + values.map(o => o === 'live'
|
|
62
|
+
? '<option value="live" title="' + kit.te('settings.redesign.judgments.everyOriginExceptBackfillAndBench') + '">' + kit.te('settings.redesign.judgments.liveRealTime') + '</option>'
|
|
63
|
+
: `<option value="${attr(o)}">${escapeHtml(o)}</option>`).join('');
|
|
64
|
+
}
|
|
50
65
|
const fin = (v) => v != null && v !== '' && Number.isFinite(Number(v));
|
|
51
66
|
const shortId = (id) => String(id ?? '').slice(0, 8);
|
|
52
67
|
const memLink = (id) => (id == null || id === '') ? '' : `<a href="#" class="jv-entity" data-entity="${attr(id)}" title="${attr(id)}${kit.te('settings.redesign.judgments.showEveryJudgmentAboutThisMemory')}" style="${LINK};font-family:monospace">${escapeHtml(shortId(id))}</a>`;
|
|
@@ -280,7 +295,7 @@ export function buildJudgmentsTab() {
|
|
|
280
295
|
${section({ id: 'jv-sec-log', title: kit.tx('settings.redesign.judgments.judgmentLog'), badgeId: 'jv-log-badge', body: `
|
|
281
296
|
<div class="settings-key-row" style="display:flex;gap:6px;align-items:center;flex-wrap:wrap">
|
|
282
297
|
<select id="jv-log-surface" style="${smallInput};width:auto"><option value="">${kit.te('settings.redesign.judgments.allSurfaces')}</option></select>
|
|
283
|
-
<select id="jv-log-origin" style="${smallInput};width:auto"
|
|
298
|
+
<select id="jv-log-origin" style="${smallInput};width:auto">${logOriginOptions(null)}</select>
|
|
284
299
|
<input type="text" id="jv-log-session" placeholder="${kit.te('settings.redesign.judgments.sessionId')}" title="${kit.te('settings.redesign.judgments.rowsFromOneClaudeCodeSession')}" autocomplete="off" spellcheck="false" style="${smallInput};width:110px;display:none">
|
|
285
300
|
<input type="text" id="jv-log-entity" placeholder="${kit.te('settings.redesign.judgments.memoryId')}" title="${kit.te('settings.redesign.judgments.rowsAboutOneMemory')}" autocomplete="off" spellcheck="false" style="${smallInput};width:110px">
|
|
286
301
|
<input type="text" id="jv-log-project" placeholder="${kit.te('settings.redesign.judgments.project')}" title="${kit.te('settings.redesign.judgments.rowsFromOneProject')}" autocomplete="off" spellcheck="false" style="${smallInput};width:100px;display:none">
|
|
@@ -343,7 +358,7 @@ export function wireJudgmentsTab(overlay, { toast = () => {}, initial = null } =
|
|
|
343
358
|
const text = await res.text();
|
|
344
359
|
let json;
|
|
345
360
|
try { json = JSON.parse(text); } catch { json = { ok: false, error: text.slice(0, 120) || `HTTP ${res.status}` }; }
|
|
346
|
-
if (!res.ok && json.ok !== false) json = { ok: false, error: json.error || `HTTP ${res.status}`, status: res.status };
|
|
361
|
+
if (!res.ok && json.ok !== false) json = { ok: false, error: json.error || `HTTP ${res.status}`, status: res.status, ...(typeof json.code === 'string' ? { code: json.code } : {}) };
|
|
347
362
|
if (json.status === undefined) json.status = res.status;
|
|
348
363
|
return json;
|
|
349
364
|
};
|
|
@@ -389,6 +404,18 @@ export function wireJudgmentsTab(overlay, { toast = () => {}, initial = null } =
|
|
|
389
404
|
// ── Renderers ──
|
|
390
405
|
function setHeader(cfg) {
|
|
391
406
|
const dot = $('jv-status-dot'), line = $('jv-status-line');
|
|
407
|
+
// No owner access (SynaBun's automation browser opened this page): "No access", the pane's controls off and no more
|
|
408
|
+
// polling, never "Off" (ui-owner-access.js).
|
|
409
|
+
const refusal = refusalOfError(cfg);
|
|
410
|
+
if (refusal) {
|
|
411
|
+
dot.className = 'settings-status-dot disconnected';
|
|
412
|
+
line.textContent = ownerAccessSay('panelTitle');
|
|
413
|
+
setNavStatus('refused');
|
|
414
|
+
noteOwnerAccessRefusal(refusal);
|
|
415
|
+
markNoAccess(tabBody);
|
|
416
|
+
stopAll();
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
392
419
|
if (!cfg || cfg.ok === false) {
|
|
393
420
|
dot.className = 'settings-status-dot disconnected';
|
|
394
421
|
line.textContent = cfg?.status === 404 ? kit.tx('settings.redesign.judgments.typesafeSettingsUnavailableTheServerIs') : kit.tx('settings.redesign.judgments.typesafeSettingsUnavailable', { error: cfg?.error || kit.tx('settings.redesign.judgments.noResponse') });
|
|
@@ -901,15 +928,15 @@ export function wireJudgmentsTab(overlay, { toast = () => {}, initial = null } =
|
|
|
901
928
|
const v2 = serverV2(cfg);
|
|
902
929
|
for (const id of ['jv-log-session', 'jv-log-project']) $(id).style.display = v2 ? '' : 'none';
|
|
903
930
|
const origin = $('jv-log-origin');
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
931
|
+
if (document.activeElement === origin) return;
|
|
932
|
+
// The list follows this answer both ways: the tab may have opened from a kept answer of a server that listed
|
|
933
|
+
// more (settings-data.js), and a filter this server cannot apply is not offered.
|
|
934
|
+
const filter = logOriginFilter(cfg);
|
|
935
|
+
if ((origin.dataset.origins || logOriginFilter(null).key) === filter.key) return;
|
|
907
936
|
const value = origin.value;
|
|
908
|
-
|
|
909
|
-
origin.
|
|
910
|
-
|
|
911
|
-
: `<option value="${attr(o)}">${escapeHtml(o)}</option>`).join('');
|
|
912
|
-
origin.value = want.includes(value) ? value : '';
|
|
937
|
+
origin.innerHTML = logOriginOptions(cfg);
|
|
938
|
+
origin.dataset.origins = filter.key;
|
|
939
|
+
origin.value = filter.values.includes(value) ? value : '';
|
|
913
940
|
}
|
|
914
941
|
/** Point the log at one memory or one session, clearing the other filters, and bring it into view. */
|
|
915
942
|
function filterLogBy({ entity = '', session = '' }) {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// ═══════════════════════════════════════════
|
|
2
|
+
// SynaBun — Maritaca Panel (barrel re-export)
|
|
3
|
+
// The Maritaca side panel's entry point: one stable surface for the shared UI modules (navbar, tray, detached
|
|
4
|
+
// session windows). Implementation lives in ./mtc/.
|
|
5
|
+
// ═══════════════════════════════════════════
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
toggleMaritacaPanel,
|
|
9
|
+
isMaritacaPanelOpen,
|
|
10
|
+
bootMaritacaPanel,
|
|
11
|
+
openMaritacaWithPrompt,
|
|
12
|
+
maritacaPanelDefaults,
|
|
13
|
+
endHostedMaritacaSessions,
|
|
14
|
+
maritacaPanelDebug,
|
|
15
|
+
} from './mtc/mtc-panel.js';
|
|
@@ -16,6 +16,7 @@ import { toggleClaudePanel, isClaudePanelOpen } from './ui-claude-panel.js';
|
|
|
16
16
|
import { toggleCodexPanel, isCodexPanelOpen } from './ui-codex-panel.js';
|
|
17
17
|
import { toggleOpencodePanel, isOpencodePanelOpen } from './ui-opencode-panel-v2.js';
|
|
18
18
|
import { toggleAntigravityPanel, isAntigravityPanelOpen } from './ui-antigravity-panel.js';
|
|
19
|
+
import { toggleMaritacaPanel, isMaritacaPanelOpen } from './ui-maritaca-panel.js';
|
|
19
20
|
import { toggleAssistantPanel, isAssistantPanelOpen, initAssistantPanel } from './ui-assistant-panel.js';
|
|
20
21
|
import { initAssistant } from './ui-assistant.js';
|
|
21
22
|
import { toggleSessionMonitor, fetchLoopsForBadge, fetchNotificationsForBadge } from './ui-sessions.js';
|
|
@@ -24,6 +25,8 @@ import { toggleScheduleQueue } from './ui-schedule-queue.js';
|
|
|
24
25
|
import { initUpdate } from './ui-update.js';
|
|
25
26
|
import { initToolUpdates } from './ui-tool-updates.js';
|
|
26
27
|
import { initCrashNotice } from './ui-crash-notice.js';
|
|
28
|
+
import { initOwnerAuthorityNotice } from './ui-owner-authority.js';
|
|
29
|
+
import { initOwnerAccessNotice } from './ui-owner-access.js';
|
|
27
30
|
import { initSidepanelTrayPlaceholders } from './ui-sidepanel-tray.js';
|
|
28
31
|
import { initDesktopTitleBar } from './desktop-titlebar.js';
|
|
29
32
|
import { initToprightOverflow } from './ui-topright-overflow.js';
|
|
@@ -38,6 +41,7 @@ export function initNavbar() {
|
|
|
38
41
|
const codexPanelBtn = $('topright-codex-panel-btn');
|
|
39
42
|
const opencodePanelBtn = $('topright-opencode-panel-btn');
|
|
40
43
|
const antigravityPanelBtn = $('topright-antigravity-panel-btn');
|
|
44
|
+
const maritacaPanelBtn = $('topright-maritaca-panel-btn');
|
|
41
45
|
initSidepanelTrayPlaceholders();
|
|
42
46
|
// The Assistant: shared host wiring (terminal tab + sidepanel), then the
|
|
43
47
|
// sidepanel host, which restores its saved tabs as tray pills.
|
|
@@ -70,6 +74,11 @@ export function initNavbar() {
|
|
|
70
74
|
toggle: toggleAntigravityPanel,
|
|
71
75
|
button: antigravityPanelBtn,
|
|
72
76
|
},
|
|
77
|
+
maritaca: {
|
|
78
|
+
isOpen: isMaritacaPanelOpen,
|
|
79
|
+
toggle: toggleMaritacaPanel,
|
|
80
|
+
button: maritacaPanelBtn,
|
|
81
|
+
},
|
|
73
82
|
};
|
|
74
83
|
|
|
75
84
|
function syncAgentPanelButtons() {
|
|
@@ -131,6 +140,16 @@ export function initNavbar() {
|
|
|
131
140
|
syncAgentPanelButtons();
|
|
132
141
|
});
|
|
133
142
|
}
|
|
143
|
+
if (maritacaPanelBtn) {
|
|
144
|
+
maritacaPanelBtn.addEventListener('click', async (e) => {
|
|
145
|
+
e.preventDefault();
|
|
146
|
+
await toggleAgentPanel('maritaca');
|
|
147
|
+
});
|
|
148
|
+
on('maritaca-panel:visibility', (visible) => {
|
|
149
|
+
maritacaPanelBtn.classList.toggle('active', !!visible);
|
|
150
|
+
syncAgentPanelButtons();
|
|
151
|
+
});
|
|
152
|
+
}
|
|
134
153
|
on('claude-panel:visibility', () => syncAgentPanelButtons());
|
|
135
154
|
on('opencode-child:visibility', () => syncAgentPanelButtons());
|
|
136
155
|
|
|
@@ -405,4 +424,8 @@ export function initNavbar() {
|
|
|
405
424
|
initToolUpdates();
|
|
406
425
|
// ── The notice after an automatic restart (the server crashed and its supervisor started it again) ──
|
|
407
426
|
initCrashNotice();
|
|
427
|
+
// ── The banner while the server cannot identify its callers (macOS: the owner's actions are paused, 503) ──
|
|
428
|
+
initOwnerAuthorityNotice();
|
|
429
|
+
// ── The banner on a page the server refuses the owner's access (SynaBun's automation browser opened it) ──
|
|
430
|
+
initOwnerAccessNotice();
|
|
408
431
|
}
|