synabun 2.3.1 → 2.4.1
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 +41 -0
- package/README.md +1 -1
- package/browser-extension/content.js +189 -0
- package/browser-extension/engine.js +508 -0
- package/browser-extension/icons/icon-128.png +0 -0
- package/browser-extension/icons/icon-16.png +0 -0
- package/browser-extension/icons/icon-32.png +0 -0
- package/browser-extension/icons/icon-48.png +0 -0
- package/browser-extension/icons/status-off-16.png +0 -0
- package/browser-extension/icons/status-off-32.png +0 -0
- package/browser-extension/icons/status-off-48.png +0 -0
- package/browser-extension/icons/status-on-16.png +0 -0
- package/browser-extension/icons/status-on-32.png +0 -0
- package/browser-extension/icons/status-on-48.png +0 -0
- package/browser-extension/manifest.json +56 -0
- package/browser-extension/popup-strings.js +250 -0
- package/browser-extension/popup-view.js +151 -0
- package/browser-extension/popup.css +166 -0
- package/browser-extension/popup.html +108 -0
- package/browser-extension/popup.js +359 -0
- package/browser-extension/protocol.js +232 -0
- package/browser-extension/service-worker.js +275 -0
- package/browser-extension/setup-content.js +36 -0
- package/browser-extension/tokens.css +326 -0
- package/docs/browser-extension-bridge.md +84 -0
- package/docs/whatsapp.md +1 -1
- package/lib/data-home-files.js +45 -0
- package/lib/data-home-migration.js +34 -58
- package/mcp-server/dist/http.d.ts +2 -0
- package/mcp-server/dist/http.d.ts.map +1 -1
- package/mcp-server/dist/http.js +9 -1
- package/mcp-server/dist/http.js.map +1 -1
- package/mcp-server/dist/index.d.ts +11 -0
- package/mcp-server/dist/index.d.ts.map +1 -1
- package/mcp-server/dist/index.js +38 -3
- package/mcp-server/dist/index.js.map +1 -1
- package/mcp-server/dist/services/browser-route-flow.d.ts +6 -2
- package/mcp-server/dist/services/browser-route-flow.d.ts.map +1 -1
- package/mcp-server/dist/services/browser-route-flow.js +10 -3
- package/mcp-server/dist/services/browser-route-flow.js.map +1 -1
- package/mcp-server/dist/services/codex-config-heal.d.ts.map +1 -1
- package/mcp-server/dist/services/codex-config-heal.js +7 -0
- package/mcp-server/dist/services/codex-config-heal.js.map +1 -1
- package/mcp-server/dist/services/neural-interface.d.ts +95 -3
- package/mcp-server/dist/services/neural-interface.d.ts.map +1 -1
- package/mcp-server/dist/services/neural-interface.js +168 -23
- package/mcp-server/dist/services/neural-interface.js.map +1 -1
- package/mcp-server/dist/services/team-context.d.ts +18 -0
- package/mcp-server/dist/services/team-context.d.ts.map +1 -0
- package/mcp-server/dist/services/team-context.js +29 -0
- package/mcp-server/dist/services/team-context.js.map +1 -0
- package/mcp-server/dist/services/tool-catalog.d.ts +5 -2
- package/mcp-server/dist/services/tool-catalog.d.ts.map +1 -1
- package/mcp-server/dist/services/tool-catalog.js +22 -6
- package/mcp-server/dist/services/tool-catalog.js.map +1 -1
- package/mcp-server/dist/services/tool-list.d.ts.map +1 -1
- package/mcp-server/dist/services/tool-list.js +4 -0
- package/mcp-server/dist/services/tool-list.js.map +1 -1
- package/mcp-server/dist/services/tool-runtime.d.ts +8 -1
- package/mcp-server/dist/services/tool-runtime.d.ts.map +1 -1
- package/mcp-server/dist/services/tool-runtime.js +18 -1
- package/mcp-server/dist/services/tool-runtime.js.map +1 -1
- package/mcp-server/dist/tools/agent-definition.d.ts +133 -0
- package/mcp-server/dist/tools/agent-definition.d.ts.map +1 -0
- package/mcp-server/dist/tools/agent-definition.js +483 -0
- package/mcp-server/dist/tools/agent-definition.js.map +1 -0
- package/mcp-server/dist/tools/agents.d.ts +92 -9
- package/mcp-server/dist/tools/agents.d.ts.map +1 -1
- package/mcp-server/dist/tools/agents.js +163 -20
- package/mcp-server/dist/tools/agents.js.map +1 -1
- package/mcp-server/dist/tools/browser-advanced.d.ts +8 -1
- package/mcp-server/dist/tools/browser-advanced.d.ts.map +1 -1
- package/mcp-server/dist/tools/browser-advanced.js +70 -6
- package/mcp-server/dist/tools/browser-advanced.js.map +1 -1
- package/mcp-server/dist/tools/git-tools.d.ts +4 -2
- package/mcp-server/dist/tools/git-tools.d.ts.map +1 -1
- package/mcp-server/dist/tools/git-tools.js +283 -2
- package/mcp-server/dist/tools/git-tools.js.map +1 -1
- package/mcp-server/dist/tools/morelogin.d.ts +8 -2
- package/mcp-server/dist/tools/morelogin.d.ts.map +1 -1
- package/mcp-server/dist/tools/morelogin.js +22 -5
- package/mcp-server/dist/tools/morelogin.js.map +1 -1
- package/mcp-server/dist/tools/team.d.ts +32 -0
- package/mcp-server/dist/tools/team.d.ts.map +1 -0
- package/mcp-server/dist/tools/team.js +87 -0
- package/mcp-server/dist/tools/team.js.map +1 -0
- package/mcp-server/package-lock.json +2 -2
- package/mcp-server/package.json +1 -1
- package/mcp-server/src/http.ts +9 -1
- package/mcp-server/src/index.ts +34 -4
- package/mcp-server/src/services/browser-route-flow.ts +12 -5
- package/mcp-server/src/services/codex-config-heal.ts +7 -0
- package/mcp-server/src/services/neural-interface.ts +191 -29
- package/mcp-server/src/services/team-context.ts +27 -0
- package/mcp-server/src/services/tool-catalog.ts +26 -8
- package/mcp-server/src/services/tool-list.ts +4 -0
- package/mcp-server/src/services/tool-runtime.ts +21 -2
- package/mcp-server/src/tools/agent-definition.ts +458 -0
- package/mcp-server/src/tools/agents.ts +177 -19
- package/mcp-server/src/tools/browser-advanced.ts +60 -6
- package/mcp-server/src/tools/git-tools.ts +249 -3
- package/mcp-server/src/tools/morelogin.ts +20 -5
- package/mcp-server/src/tools/team.ts +97 -0
- package/neural-interface/i18n/en.json +1119 -47
- package/neural-interface/i18n/pt-BR.json +1119 -47
- package/neural-interface/lib/account-usage.js +1 -1
- package/neural-interface/lib/agents/builtins.json +207 -0
- package/neural-interface/lib/agents/density.js +101 -0
- package/neural-interface/lib/agents/forge-host.js +223 -0
- package/neural-interface/lib/agents/native-export-targets.js +190 -0
- package/neural-interface/lib/agents/native-export.js +365 -0
- package/neural-interface/lib/agents/registry.js +885 -0
- package/neural-interface/lib/agents/resolve.js +603 -0
- package/neural-interface/lib/agents/schema.js +642 -0
- package/neural-interface/lib/agents/split.js +37 -0
- package/neural-interface/lib/agents-studio-api.js +591 -0
- package/neural-interface/lib/assistant-api.js +76 -7
- package/neural-interface/lib/assistant-brains/opencode.js +60 -11
- package/neural-interface/lib/assistant-catalog.js +2 -0
- package/neural-interface/lib/assistant-continuity.js +49 -0
- package/neural-interface/lib/assistant-dispatch.js +351 -121
- package/neural-interface/lib/assistant-persona.js +105 -8
- package/neural-interface/lib/assistant-route-gate.js +24 -9
- package/neural-interface/lib/assistant-router.js +432 -47
- package/neural-interface/lib/assistant-run-tail.js +151 -0
- package/neural-interface/lib/assistant-run-wait.js +183 -0
- package/neural-interface/lib/assistant-runtime.js +449 -94
- package/neural-interface/lib/assistant-task-prompt.js +11 -2
- package/neural-interface/lib/assistant-usage.js +3 -2
- package/neural-interface/lib/automation-approval.js +2 -2
- package/neural-interface/lib/backup-service.js +64 -105
- package/neural-interface/lib/browser-close-evidence.js +80 -0
- package/neural-interface/lib/browser-default.js +210 -0
- package/neural-interface/lib/browser-extension-adapter.js +264 -0
- package/neural-interface/lib/browser-extension-bridge.js +441 -0
- package/neural-interface/lib/browser-extension-folder.js +116 -0
- package/neural-interface/lib/browser-extension-setup.js +140 -0
- package/neural-interface/lib/browser-profile-choices.js +3 -3
- package/neural-interface/lib/browser-tool-policy.js +1 -1
- package/neural-interface/lib/claude-account-links.js +301 -0
- package/neural-interface/lib/claude-accounts.js +45 -20
- package/neural-interface/lib/claude-agent-bridge.js +142 -10
- package/neural-interface/lib/claude-model-catalog.js +6 -0
- package/neural-interface/lib/claude-panel-session.js +33 -0
- package/neural-interface/lib/codex-accounts.js +67 -24
- package/neural-interface/lib/coordination/README.md +384 -0
- package/neural-interface/lib/coordination/service.js +563 -0
- package/neural-interface/lib/coordination/store.js +1138 -0
- package/neural-interface/lib/db.js +22 -1
- package/neural-interface/lib/effort-levels.js +10 -1
- package/neural-interface/lib/memory-list-page.js +49 -0
- package/neural-interface/lib/memory-list-stamp.js +60 -0
- package/neural-interface/lib/morelogin-outside-close.js +186 -0
- package/neural-interface/lib/morelogin-profile-failures.js +206 -0
- package/neural-interface/lib/morelogin-start-cooldown.js +160 -0
- package/neural-interface/lib/morelogin.js +194 -8
- package/neural-interface/lib/native-loop-runtime.js +26 -7
- package/neural-interface/lib/opencode-build-preflight.js +28 -8
- package/neural-interface/lib/opencode-native-boundary.js +83 -13
- package/neural-interface/lib/opencode-serve-records.js +14 -9
- package/neural-interface/lib/page-session.js +1 -1
- package/neural-interface/lib/peer-identity.js +73 -29
- package/neural-interface/lib/process-identity.js +68 -7
- package/neural-interface/lib/request-gate.js +3 -0
- package/neural-interface/lib/screenshot-location.js +33 -0
- package/neural-interface/lib/session-cache-builder.js +41 -3
- package/neural-interface/lib/skills/creation.js +1 -1
- package/neural-interface/lib/skills/known-bridge-digests.json +40 -0
- package/neural-interface/lib/studio-attention.js +56 -0
- package/neural-interface/lib/teams/README.md +382 -0
- package/neural-interface/lib/teams/api.js +287 -0
- package/neural-interface/lib/teams/brief.js +185 -0
- package/neural-interface/lib/teams/claims.js +315 -0
- package/neural-interface/lib/teams/git.js +293 -0
- package/neural-interface/lib/teams/index.js +122 -0
- package/neural-interface/lib/teams/integration.js +580 -0
- package/neural-interface/lib/teams/landing.js +184 -0
- package/neural-interface/lib/teams/recovery.js +256 -0
- package/neural-interface/lib/teams/scheduler.js +1474 -0
- package/neural-interface/lib/teams/schema.js +559 -0
- package/neural-interface/lib/teams/state.js +181 -0
- package/neural-interface/lib/teams/test-runner.js +86 -0
- package/neural-interface/lib/teams/test-sandbox.js +99 -0
- package/neural-interface/lib/teams/worktrees.js +757 -0
- package/neural-interface/lib/tool-permission-choices.js +226 -0
- package/neural-interface/lib/whatsapp/cards.js +24 -10
- package/neural-interface/lib/worker-confinement.js +206 -6
- package/neural-interface/package-lock.json +2 -2
- package/neural-interface/package.json +1 -1
- package/neural-interface/public/extension-setup.html +107 -0
- package/neural-interface/public/index.html +103 -12
- package/neural-interface/public/offline.html +4 -3
- package/neural-interface/public/shared/agent-runtime-options.js +3 -1
- package/neural-interface/public/shared/agents/studio/ax-agent-view.js +614 -0
- package/neural-interface/public/shared/agents/studio/ax-api.js +198 -0
- package/neural-interface/public/shared/agents/studio/ax-create-view.js +221 -0
- package/neural-interface/public/shared/agents/studio/ax-diff.js +143 -0
- package/neural-interface/public/shared/agents/studio/ax-editor-view.js +392 -0
- package/neural-interface/public/shared/agents/studio/ax-export-view.js +94 -0
- package/neural-interface/public/shared/agents/studio/ax-form.js +191 -0
- package/neural-interface/public/shared/agents/studio/ax-icons.js +87 -0
- package/neural-interface/public/shared/agents/studio/ax-library-view.js +158 -0
- package/neural-interface/public/shared/agents/studio/ax-library.js +162 -0
- package/neural-interface/public/shared/agents/studio/ax-main.js +712 -0
- package/neural-interface/public/shared/agents/studio/ax-native-export.js +35 -0
- package/neural-interface/public/shared/agents/studio/ax-options.js +198 -0
- package/neural-interface/public/shared/agents/studio/ax-review-view.js +175 -0
- package/neural-interface/public/shared/agents/studio/ax-revisions-view.js +189 -0
- package/neural-interface/public/shared/agents/studio/ax-runs-view.js +202 -0
- package/neural-interface/public/shared/agents/studio/ax-runs.js +82 -0
- package/neural-interface/public/shared/agents/studio/ax-teams-view.js +256 -0
- package/neural-interface/public/shared/agents/studio/ax-teams.js +200 -0
- package/neural-interface/public/shared/agents/studio/ax-templates.js +50 -0
- package/neural-interface/public/shared/agents/studio/ax-ui.js +194 -0
- package/neural-interface/public/shared/agents/studio/ax-views.js +170 -0
- package/neural-interface/public/shared/agy/agy-panel.js +142 -28
- package/neural-interface/public/shared/agy/agy-styles.js +25 -5
- package/neural-interface/public/shared/api.js +2 -1
- package/neural-interface/public/shared/assistant/asst-account-menu.js +13 -13
- package/neural-interface/public/shared/assistant/asst-ask-styles.js +2 -3
- package/neural-interface/public/shared/assistant/asst-brain-picker.js +91 -9
- package/neural-interface/public/shared/assistant/asst-control.js +3 -0
- package/neural-interface/public/shared/assistant/asst-interaction-hold.js +99 -0
- package/neural-interface/public/shared/assistant/asst-limit-dismissals.js +111 -0
- package/neural-interface/public/shared/assistant/asst-limit-dock.js +37 -3
- package/neural-interface/public/shared/assistant/asst-limit-wait.js +30 -7
- package/neural-interface/public/shared/assistant/asst-panel.js +177 -30
- package/neural-interface/public/shared/assistant/asst-rack-styles.js +15 -8
- package/neural-interface/public/shared/assistant/asst-render.js +37 -6
- package/neural-interface/public/shared/assistant/asst-route.js +80 -12
- package/neural-interface/public/shared/assistant/asst-routes-editor.js +148 -70
- package/neural-interface/public/shared/assistant/asst-roving.js +17 -1
- package/neural-interface/public/shared/assistant/asst-scene-styles.js +7 -2
- package/neural-interface/public/shared/assistant/asst-scenes.js +12 -1
- package/neural-interface/public/shared/assistant/asst-sidepanel.js +12 -2
- package/neural-interface/public/shared/assistant/asst-state.js +66 -1
- package/neural-interface/public/shared/assistant/asst-styles.js +98 -44
- package/neural-interface/public/shared/assistant/route-identity.js +16 -0
- package/neural-interface/public/shared/cc-dropdown.js +21 -15
- package/neural-interface/public/shared/cdx/cdx-output.js +10 -0
- package/neural-interface/public/shared/cdx/cdx-panel.js +18 -16
- package/neural-interface/public/shared/cdx/cdx-plan.js +3 -2
- package/neural-interface/public/shared/cdx/cdx-render.js +122 -45
- package/neural-interface/public/shared/cdx/cdx-requests.js +4 -4
- package/neural-interface/public/shared/cdx/cdx-styles.js +8 -36
- package/neural-interface/public/shared/cdx/cdx-tabs.js +110 -42
- package/neural-interface/public/shared/claude-panel-lazy.js +12 -0
- package/neural-interface/public/shared/code-copy.js +120 -0
- package/neural-interface/public/shared/constants.js +7 -0
- package/neural-interface/public/shared/context-menu-model.js +1 -0
- package/neural-interface/public/shared/cp/cp-markdown.js +7 -2
- package/neural-interface/public/shared/cp/cp-session-model.js +86 -5
- package/neural-interface/public/shared/cp/cp-session-settings.js +58 -30
- package/neural-interface/public/shared/cp/cp-styles.js +9 -0
- package/neural-interface/public/shared/dom-change-flag.js +66 -0
- package/neural-interface/public/shared/dom-morph.js +124 -0
- package/neural-interface/public/shared/extension-setup/es-page.css +134 -0
- package/neural-interface/public/shared/extension-setup/es-page.js +120 -0
- package/neural-interface/public/shared/extension-setup/es-view.js +100 -0
- package/neural-interface/public/shared/html-shell.js +34 -4
- package/neural-interface/public/shared/i18n.js +14 -1
- package/neural-interface/public/shared/idle-queue.js +78 -0
- package/neural-interface/public/shared/iface-config.js +227 -0
- package/neural-interface/public/shared/lazy-module.js +108 -0
- package/neural-interface/public/shared/memory-list.js +117 -0
- package/neural-interface/public/shared/morelogin-profile-choices.js +1 -1
- package/neural-interface/public/shared/morelogin-profile-field.js +3 -3
- package/neural-interface/public/shared/mtc/mtc-panel.js +3 -1
- package/neural-interface/public/shared/mtc/mtc-styles.js +4 -1
- package/neural-interface/public/shared/ocp-v2/ocp-v2-manager.js +35 -15
- package/neural-interface/public/shared/ocp-v2/ocp-v2-panel.js +77 -23
- package/neural-interface/public/shared/ocp-v2/ocp-v2-projectbar.js +3 -6
- package/neural-interface/public/shared/ocp-v2/ocp-v2-render.js +24 -21
- package/neural-interface/public/shared/ocp-v2/ocp-v2-send-logic.js +16 -5
- package/neural-interface/public/shared/ocp-v2/ocp-v2-sessions-logic.js +16 -2
- package/neural-interface/public/shared/ocp-v2/ocp-v2-styles.js +27 -43
- package/neural-interface/public/shared/ocp-v2/ocp-v2-ws.js +73 -9
- package/neural-interface/public/shared/owner-authority-view.js +4 -10
- package/neural-interface/public/shared/page-session.js +1 -1
- package/neural-interface/public/shared/schedules-view.js +2 -2
- package/neural-interface/public/shared/session-project-items.js +11 -0
- package/neural-interface/public/shared/settings/settings-ai-browser.js +119 -0
- package/neural-interface/public/shared/settings/settings-browser-extension.js +446 -0
- package/neural-interface/public/shared/settings/settings-ia.js +4 -2
- package/neural-interface/public/shared/settings/settings-morelogin-cooldown.js +63 -0
- package/neural-interface/public/shared/settings/settings-tool-permissions.js +70 -0
- package/neural-interface/public/shared/sidepanel-lazy.js +40 -0
- package/neural-interface/public/shared/sidepanel-session-status.js +8 -14
- package/neural-interface/public/shared/sidepanel-shown.js +73 -0
- package/neural-interface/public/shared/start-bridge.js +2 -2
- package/neural-interface/public/shared/storage.js +6 -1
- package/neural-interface/public/shared/studio-attention.js +83 -0
- package/neural-interface/public/shared/styles.css +694 -50
- package/neural-interface/public/shared/term-browser-tabs.js +34 -0
- package/neural-interface/public/shared/transcript-rows.js +334 -0
- package/neural-interface/public/shared/tray-auto-close.js +106 -0
- package/neural-interface/public/shared/ui-agents.js +97 -0
- package/neural-interface/public/shared/ui-antigravity-panel.js +16 -14
- package/neural-interface/public/shared/ui-automation-studio.js +3 -3
- package/neural-interface/public/shared/ui-claude-panel.js +162 -95
- package/neural-interface/public/shared/ui-code-copy.js +256 -0
- package/neural-interface/public/shared/ui-codex-panel.js +14 -10
- package/neural-interface/public/shared/ui-context-menu.js +1 -1
- package/neural-interface/public/shared/ui-file-explorer.js +2 -3
- package/neural-interface/public/shared/ui-games.js +1 -1
- package/neural-interface/public/shared/ui-loading.js +83 -19
- package/neural-interface/public/shared/ui-maritaca-panel.js +12 -11
- package/neural-interface/public/shared/ui-menubar.js +23 -0
- package/neural-interface/public/shared/ui-native-loop-router.js +50 -21
- package/neural-interface/public/shared/ui-navbar.js +15 -9
- package/neural-interface/public/shared/ui-opencode-panel-v2.js +13 -11
- package/neural-interface/public/shared/ui-owner-authority.js +48 -25
- package/neural-interface/public/shared/ui-schedules-studio.js +3 -3
- package/neural-interface/public/shared/ui-scroll-follow.js +39 -0
- package/neural-interface/public/shared/ui-sessions.js +3 -3
- package/neural-interface/public/shared/ui-settings-entry.js +55 -0
- package/neural-interface/public/shared/ui-settings.js +363 -400
- package/neural-interface/public/shared/ui-sidepanel-layout.js +44 -25
- package/neural-interface/public/shared/ui-sidepanel-session-entry.js +22 -9
- package/neural-interface/public/shared/ui-sidepanel-sessions.js +10 -2
- package/neural-interface/public/shared/ui-sidepanel-tray.js +36 -41
- package/neural-interface/public/shared/ui-sidepanel-windows.js +14 -1
- package/neural-interface/public/shared/ui-styleguide.js +10 -2
- package/neural-interface/public/shared/ui-sync.js +6 -0
- package/neural-interface/public/shared/ui-terminal.js +13 -9
- package/neural-interface/public/shared/ui-tooltip.js +28 -7
- package/neural-interface/public/shared/ui-topright-overflow.js +26 -4
- package/neural-interface/public/shared/ui-tray-columns.js +375 -0
- package/neural-interface/public/shared/ui-whiteboard.js +51 -6
- package/neural-interface/public/shared/ui-worker-end.js +28 -1
- package/neural-interface/public/shared/ui-workspaces.js +13 -0
- package/neural-interface/public/shared/window-keys.js +71 -0
- package/neural-interface/public/sw.js +4 -3
- package/neural-interface/public/variant/2d/main.js +2 -0
- package/neural-interface/public/variant/3d/app.js +620 -0
- package/neural-interface/public/variant/3d/boot-reveal.js +47 -0
- package/neural-interface/public/variant/3d/main.js +30 -544
- package/neural-interface/public/variant/3d/map-controls.js +4 -2
- package/neural-interface/public/vendor/fonts/fonts.css +508 -0
- package/neural-interface/public/vendor/fonts/inter-OFL.txt +93 -0
- package/neural-interface/public/vendor/fonts/inter-cyrillic-ext.woff2 +0 -0
- package/neural-interface/public/vendor/fonts/inter-cyrillic.woff2 +0 -0
- package/neural-interface/public/vendor/fonts/inter-greek-ext.woff2 +0 -0
- package/neural-interface/public/vendor/fonts/inter-greek.woff2 +0 -0
- package/neural-interface/public/vendor/fonts/inter-latin-ext.woff2 +0 -0
- package/neural-interface/public/vendor/fonts/inter-latin.woff2 +0 -0
- package/neural-interface/public/vendor/fonts/inter-vietnamese.woff2 +0 -0
- package/neural-interface/public/vendor/fonts/jetbrains-mono-OFL.txt +93 -0
- package/neural-interface/public/vendor/fonts/jetbrains-mono-cyrillic-ext.woff2 +0 -0
- package/neural-interface/public/vendor/fonts/jetbrains-mono-cyrillic.woff2 +0 -0
- package/neural-interface/public/vendor/fonts/jetbrains-mono-greek.woff2 +0 -0
- package/neural-interface/public/vendor/fonts/jetbrains-mono-latin-ext.woff2 +0 -0
- package/neural-interface/public/vendor/fonts/jetbrains-mono-latin.woff2 +0 -0
- package/neural-interface/public/vendor/fonts/jetbrains-mono-vietnamese.woff2 +0 -0
- package/neural-interface/public/vendor/fonts/manifest.json +142 -0
- package/neural-interface/public/vendor/fonts/space-grotesk-OFL.txt +93 -0
- package/neural-interface/public/vendor/fonts/space-grotesk-latin-ext.woff2 +0 -0
- package/neural-interface/public/vendor/fonts/space-grotesk-latin.woff2 +0 -0
- package/neural-interface/public/vendor/fonts/space-grotesk-vietnamese.woff2 +0 -0
- package/neural-interface/scripts/boot-graph.mjs +270 -0
- package/neural-interface/scripts/vendor-fonts.mjs +124 -0
- package/neural-interface/server.js +1083 -164
- package/npm-shrinkwrap.json +2 -2
- package/package.json +4 -1
- package/skills/agent-forge/SKILL.md +182 -0
- package/skills/agent-forge/evals/evals.json +56 -0
- package/skills/agent-forge/references/definition-fields.md +61 -0
- package/skills/agent-forge/references/examples.md +105 -0
- package/skills/agent-forge/references/instructions.md +51 -0
- package/skills/agent-forge/references/review-and-export.md +84 -0
|
@@ -27,45 +27,64 @@ function px(value) {
|
|
|
27
27
|
return `${Math.max(0, Math.round(Number(value) || 0))}px`;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
function setVarPair(primary, legacy, value) {
|
|
31
|
-
const rootStyle = document.documentElement.style;
|
|
32
|
-
rootStyle.setProperty(primary, value);
|
|
33
|
-
rootStyle.setProperty(legacy, value);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
30
|
function ownerCssVar(owner) {
|
|
37
31
|
return String(owner || '').replace(/[^a-zA-Z0-9_-]/g, '_');
|
|
38
32
|
}
|
|
39
33
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function applyStackedReservation() {
|
|
49
|
-
const rootStyle = document.documentElement.style;
|
|
34
|
+
/**
|
|
35
|
+
* The variables <html> must carry for these reservations (insertion order = stack order), by name.
|
|
36
|
+
* Pure: `applyStackedReservation` writes the difference between this and what <html> has.
|
|
37
|
+
*/
|
|
38
|
+
export function stackedReservationVars(reservations) {
|
|
39
|
+
const vars = new Map();
|
|
50
40
|
let totalWidth = 0;
|
|
51
41
|
let maxGap = 0;
|
|
52
|
-
|
|
53
|
-
for (const entry of _reservations.values()) {
|
|
42
|
+
for (const entry of reservations.values()) {
|
|
54
43
|
totalWidth += entry.reservedWidth || 0;
|
|
55
44
|
if ((entry.gap || 0) > maxGap) maxGap = entry.gap || 0;
|
|
56
45
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
46
|
+
vars.set(RESERVED_WIDTH_VAR, px(totalWidth));
|
|
47
|
+
vars.set(LEGACY_WIDTH_VAR, px(totalWidth));
|
|
48
|
+
vars.set(RESERVED_GAP_VAR, px(maxGap));
|
|
49
|
+
vars.set(LEGACY_GAP_VAR, px(maxGap));
|
|
61
50
|
// Per-owner offset = sum of widths of panels to its RIGHT
|
|
62
51
|
// (= panels inserted BEFORE this one in the Map).
|
|
63
|
-
clearAllOffsetVars();
|
|
64
52
|
let offset = 0;
|
|
65
|
-
for (const [owner, entry] of
|
|
66
|
-
|
|
53
|
+
for (const [owner, entry] of reservations) {
|
|
54
|
+
vars.set(`${OFFSET_VAR_PREFIX}${ownerCssVar(owner)}`, px(offset));
|
|
67
55
|
offset += entry.reservedWidth || 0;
|
|
68
56
|
}
|
|
57
|
+
return vars;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Bring an inline style in line with `vars`: write only what differs, remove only the offset variables
|
|
62
|
+
* that are no longer wanted. Returns how many declarations it touched.
|
|
63
|
+
*
|
|
64
|
+
* A custom property written on <html> restyles every element of the page, and a layout read after it
|
|
65
|
+
* (the next panel's measurement, a window clamp) pays for that at once. The reservation is asked for
|
|
66
|
+
* again and again with nothing new (every panel on every window resize, twice per panel show or hide):
|
|
67
|
+
* taking the offsets out and putting the same ones back made each of those a whole-page restyle.
|
|
68
|
+
*/
|
|
69
|
+
export function syncReservationVars(style, vars) {
|
|
70
|
+
let touched = 0;
|
|
71
|
+
for (let i = style.length - 1; i >= 0; i--) {
|
|
72
|
+
const name = style[i];
|
|
73
|
+
if (name && name.startsWith(OFFSET_VAR_PREFIX) && !vars.has(name)) {
|
|
74
|
+
style.removeProperty(name);
|
|
75
|
+
touched += 1;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
for (const [name, value] of vars) {
|
|
79
|
+
if (style.getPropertyValue(name).trim() === value) continue;
|
|
80
|
+
style.setProperty(name, value);
|
|
81
|
+
touched += 1;
|
|
82
|
+
}
|
|
83
|
+
return touched;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function applyStackedReservation() {
|
|
87
|
+
syncReservationVars(document.documentElement.style, stackedReservationVars(_reservations));
|
|
69
88
|
}
|
|
70
89
|
|
|
71
90
|
export function measureRightPanelReservation(panel, outerGap = 20) {
|
|
@@ -2,10 +2,29 @@ import { hostedSidepanelId, sidepanelHost } from './ui-sidepanel-runtime.js';
|
|
|
2
2
|
import { emit } from './state.js';
|
|
3
3
|
import { sessionWindowStatus } from './sidepanel-session-status.js';
|
|
4
4
|
|
|
5
|
+
export function observeSessionWindowStatus(tray, reportStatus) {
|
|
6
|
+
let sentStatus = '';
|
|
7
|
+
const syncStatus = () => {
|
|
8
|
+
const pills = Array.from(tray?.querySelectorAll('.term-minimized-pill') || [], (pill) => ({
|
|
9
|
+
classes: pill.classList,
|
|
10
|
+
status: pill.dataset.status,
|
|
11
|
+
badgeStatus: pill.querySelector('.cli-status-badge')?.dataset.status,
|
|
12
|
+
}));
|
|
13
|
+
const status = sessionWindowStatus(pills);
|
|
14
|
+
if (status === sentStatus) return;
|
|
15
|
+
sentStatus = status;
|
|
16
|
+
reportStatus(status);
|
|
17
|
+
};
|
|
18
|
+
if (tray) new MutationObserver(syncStatus).observe(tray, {
|
|
19
|
+
childList: true, subtree: true, attributes: true, attributeFilter: ['class', 'data-status'],
|
|
20
|
+
});
|
|
21
|
+
syncStatus();
|
|
22
|
+
}
|
|
23
|
+
|
|
5
24
|
const host = sidepanelHost();
|
|
6
|
-
const provider = new URLSearchParams(location.search).get('provider');
|
|
7
25
|
if (hostedSidepanelId && host) {
|
|
8
26
|
try {
|
|
27
|
+
const provider = new URLSearchParams(location.search).get('provider');
|
|
9
28
|
let receivePath, end, defaults;
|
|
10
29
|
if (provider === 'claude') {
|
|
11
30
|
const panel = await import('./ui-claude-panel.js');
|
|
@@ -49,15 +68,9 @@ if (hostedSidepanelId && host) {
|
|
|
49
68
|
// What its sessions do, for this window's pill in the main window: read from this document's own tray
|
|
50
69
|
// pills, which the panel paints from its sessions' state, and sent when it changes.
|
|
51
70
|
const tray = document.getElementById('term-minimized-tray');
|
|
52
|
-
|
|
53
|
-
const syncStatus = () => {
|
|
54
|
-
const status = sessionWindowStatus([...(tray?.querySelectorAll('.term-minimized-pill') || [])].map((pill) => [...pill.classList]));
|
|
55
|
-
if (status === sentStatus) return;
|
|
56
|
-
sentStatus = status;
|
|
71
|
+
observeSessionWindowStatus(tray, (status) => {
|
|
57
72
|
host.status?.(hostedSidepanelId, status);
|
|
58
|
-
};
|
|
59
|
-
if (tray) new MutationObserver(syncStatus).observe(tray, { childList: true, subtree: true, attributes: true, attributeFilter: ['class'] });
|
|
60
|
-
syncStatus();
|
|
73
|
+
});
|
|
61
74
|
host.ready(hostedSidepanelId, { focus, defaults, end, receive(kind, data) {
|
|
62
75
|
if (kind === 'path') return receivePath(data);
|
|
63
76
|
emit(kind === 'image' ? 'wb:send-to-panel' : kind, data);
|
|
@@ -154,7 +154,9 @@ async function end(entry) {
|
|
|
154
154
|
// A restored, unopened window may still own a server-side turn.
|
|
155
155
|
const raw = storage.getItem(`synabun-${entry.provider}-panel-tabs-${entry.id}`);
|
|
156
156
|
const sessions = entry.provider === 'opencode'
|
|
157
|
-
? JSON.parse(storage.getItem(`opencode-v2-tabs-${entry.id}`) || '[]')
|
|
157
|
+
? JSON.parse(storage.getItem(`opencode-v2-tabs-${entry.id}`) || '[]')
|
|
158
|
+
.map(tab => typeof tab === 'string' ? { sessionId: tab } : tab)
|
|
159
|
+
.filter(tab => typeof tab?.sessionId === 'string' && tab.sessionId)
|
|
158
160
|
: JSON.parse(raw || '{"tabs":[]}').tabs;
|
|
159
161
|
for (const session of sessions) {
|
|
160
162
|
await fetch('/api/sidepanel/kill-session', { method: 'POST', headers: { 'Content-Type': 'application/json' },
|
|
@@ -221,7 +223,13 @@ export function initDetachedAgentSessions() {
|
|
|
221
223
|
if (entry.title === next) return;
|
|
222
224
|
entry.title = next; if (entry.label) entry.label.textContent = next; renderPill(entry); save();
|
|
223
225
|
},
|
|
224
|
-
fail
|
|
226
|
+
fail(id, error) {
|
|
227
|
+
const entry = entries.get(id);
|
|
228
|
+
if (!entry) return;
|
|
229
|
+
showError(entry, error);
|
|
230
|
+
entry.status = 'idle';
|
|
231
|
+
renderPill(entry);
|
|
232
|
+
},
|
|
225
233
|
// What the window's sessions do, sent by the window when it changes (sidepanel-session-status.js).
|
|
226
234
|
status(id, status) {
|
|
227
235
|
const entry = entries.get(id);
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
// SynaBun sidepanel tray placeholders.
|
|
2
2
|
// Renders minimized pills for persisted sidepanel tabs before a panel is booted.
|
|
3
|
-
// A
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
// places. Panels whose saved tabs were all idle stay lazy.
|
|
3
|
+
// A turn or prompt can outlive the page on the server. A provider can boot
|
|
4
|
+
// hidden to check and replace its placeholders with live pills. Panels whose
|
|
5
|
+
// saved tabs were all idle stay lazy.
|
|
7
6
|
|
|
8
7
|
import { storage } from './storage.js';
|
|
9
8
|
import { emit } from './state.js';
|
|
10
9
|
import { getProviderMeta } from './provider-icons.js';
|
|
11
|
-
import { toggleClaudePanel, isClaudePanelOpen, bootClaudePanel } from './
|
|
10
|
+
import { toggleClaudePanel, isClaudePanelOpen, bootClaudePanel } from './claude-panel-lazy.js';
|
|
12
11
|
import { toggleCodexPanel, isCodexPanelOpen, bootCodexPanel } from './ui-codex-panel.js';
|
|
13
12
|
import { toggleOpencodePanel, isOpencodePanelOpen, bootOpencodePanel } from './ui-opencode-panel-v2.js';
|
|
14
13
|
import { toggleAntigravityPanel, isAntigravityPanelOpen, bootAntigravityPanel } from './ui-antigravity-panel.js';
|
|
@@ -39,8 +38,8 @@ const PROVIDERS = {
|
|
|
39
38
|
opencode: {
|
|
40
39
|
providerId: 'opencode',
|
|
41
40
|
windowKey: 'ocp-window-id',
|
|
42
|
-
// OCP v2
|
|
43
|
-
//
|
|
41
|
+
// OCP v2 scopes the tab list per window so a claimed automation cannot
|
|
42
|
+
// become an editable tab in another window.
|
|
44
43
|
tabsKeyPrefix: 'opencode-v2-tabs',
|
|
45
44
|
automationKeyPrefix: 'opencode-v2-automations',
|
|
46
45
|
v2Plain: true,
|
|
@@ -49,9 +48,8 @@ const PROVIDERS = {
|
|
|
49
48
|
busyKeyPrefix: 'opencode-v2-busy',
|
|
50
49
|
legacyV1Prefix: 'synabun-ocp-tabs',
|
|
51
50
|
legacyV1CleanupFlag: 'opencode-v1-cleanup-done',
|
|
52
|
-
// The v2 panel's own pill (the v1 panel and its ocp-session-pill styles are gone), so a
|
|
53
|
-
// working placeholder wears ocpv2-pill-running like the real one.
|
|
54
51
|
pillClass: 'ocpv2-session-pill',
|
|
52
|
+
attentionClass: 'ocpv2-pill-waiting',
|
|
55
53
|
eventName: 'opencode-panel:show',
|
|
56
54
|
},
|
|
57
55
|
antigravity: {
|
|
@@ -160,7 +158,7 @@ function hasCodexState(tab) {
|
|
|
160
158
|
}
|
|
161
159
|
|
|
162
160
|
function hasOpenCodeState(tab) {
|
|
163
|
-
//
|
|
161
|
+
// A saved session ID is enough for a placeholder.
|
|
164
162
|
if (tab.sessionId) return true;
|
|
165
163
|
const label = normalizeLabel(tab.sessionTitle);
|
|
166
164
|
const draft = normalizeLabel(tab.draft);
|
|
@@ -228,10 +226,9 @@ function isRunning(tab) {
|
|
|
228
226
|
return !!(tab.running || tab.startingThread || Number(tab.backgroundWork) > 0);
|
|
229
227
|
}
|
|
230
228
|
|
|
231
|
-
//
|
|
232
|
-
// working, and the panel boots to ask, as for a working tab (the reattach brings the card back).
|
|
229
|
+
// A saved prompt takes precedence over a running turn. Reattaching the panel can recover the prompt.
|
|
233
230
|
function needsYou(tab) {
|
|
234
|
-
return tab
|
|
231
|
+
return tab?.needsYou === true;
|
|
235
232
|
}
|
|
236
233
|
|
|
237
234
|
function isForeignActiveAutomation(tab) {
|
|
@@ -255,21 +252,25 @@ function readPayload(key, meta = null) {
|
|
|
255
252
|
? parseJson(storage.getItem(`${meta.busyKeyPrefix}-${windowId}`), [])
|
|
256
253
|
: [];
|
|
257
254
|
const busy = new Set(Array.isArray(busyRows) ? busyRows : []);
|
|
258
|
-
const
|
|
259
|
-
|
|
260
|
-
.
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
255
|
+
const savedTabs = arr.filter((tab) => {
|
|
256
|
+
const id = typeof tab === 'string' ? tab : tab?.sessionId;
|
|
257
|
+
return typeof id === 'string' && id.length > 0;
|
|
258
|
+
});
|
|
259
|
+
if (!savedTabs.length) return null;
|
|
260
|
+
const tabs = savedTabs.map((tab) => {
|
|
261
|
+
const sid = typeof tab === 'string' ? tab : tab.sessionId;
|
|
262
|
+
const automation = automationBySession.get(sid);
|
|
263
|
+
return {
|
|
264
|
+
sessionId: sid,
|
|
265
|
+
needsYou: needsYou(tab),
|
|
266
|
+
automationRunId: automation?.runId || null,
|
|
267
|
+
automationActive: !!automation?.running,
|
|
268
|
+
automationOwnerId: automation?.ownerId || null,
|
|
269
|
+
// An automation's pill follows its turn: a warm worker saved between turns ('idle') rests.
|
|
270
|
+
running: (!!automation?.running && automation.turn !== 'idle') || busy.has(sid),
|
|
271
|
+
};
|
|
272
|
+
});
|
|
273
|
+
return { key, activeIdx: 0, tabs, savedTabs, v2Plain: true };
|
|
273
274
|
}
|
|
274
275
|
return null;
|
|
275
276
|
}
|
|
@@ -295,8 +296,7 @@ function providerPayloads(provider) {
|
|
|
295
296
|
const predicate = statePredicate(provider);
|
|
296
297
|
|
|
297
298
|
if (meta.v2Plain) {
|
|
298
|
-
//
|
|
299
|
-
// can never resurface as phantom placeholder pills next to the real ones.
|
|
299
|
+
// Wipe legacy v1 entries once so they can't resurface next to the real pills.
|
|
300
300
|
cleanupLegacyV1Once(meta);
|
|
301
301
|
}
|
|
302
302
|
|
|
@@ -441,15 +441,10 @@ function writeProviderPayload(provider, payload, removeIndex) {
|
|
|
441
441
|
}
|
|
442
442
|
|
|
443
443
|
if (payload.v2Plain) {
|
|
444
|
-
//
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
.filter((_, index) => index !== removeIndex)
|
|
449
|
-
.map((t) => t.sessionId)
|
|
450
|
-
.filter(Boolean);
|
|
451
|
-
if (!ids.length) storage.removeItem(payload.key);
|
|
452
|
-
else storage.setItem(payload.key, JSON.stringify(ids));
|
|
444
|
+
// Preserve saved tab records, including the waiting state of other sessions.
|
|
445
|
+
const remainingTabs = payload.savedTabs.filter((_, index) => index !== removeIndex);
|
|
446
|
+
if (!remainingTabs.length) storage.removeItem(payload.key);
|
|
447
|
+
else storage.setItem(payload.key, JSON.stringify(remainingTabs));
|
|
453
448
|
const meta = PROVIDERS[provider];
|
|
454
449
|
const windowId = windowIdFromKey(meta, payload.key);
|
|
455
450
|
if (windowId && meta?.automationKeyPrefix) {
|
|
@@ -625,7 +620,7 @@ function createPlaceholder(provider, payload, tab, index) {
|
|
|
625
620
|
/**
|
|
626
621
|
* Whether a provider's panel should boot, hidden, to ask after its tabs: one of this window's own
|
|
627
622
|
* saved tabs (the ones its restore brings back; never another window's, which a click migrates)
|
|
628
|
-
* was working when it was saved.
|
|
623
|
+
* was working or waiting when it was saved. `pills` is meaningfulPills(), `currentKey` this window's key.
|
|
629
624
|
*/
|
|
630
625
|
export function placeholdersNeedBoot(pills, currentKey) {
|
|
631
626
|
return (Array.isArray(pills) ? pills : [])
|
|
@@ -641,7 +636,7 @@ export function savedTabsStatus(provider, windowId) {
|
|
|
641
636
|
const meta = PROVIDERS[provider];
|
|
642
637
|
if (!meta || !windowId) return 'idle';
|
|
643
638
|
const tabs = readPayload(`${meta.tabsKeyPrefix}-${windowId}`, meta)?.tabs || [];
|
|
644
|
-
if (tabs.some(
|
|
639
|
+
if (tabs.some(needsYou)) return 'action';
|
|
645
640
|
return tabs.some((tab) => isRunning(tab)) ? 'working' : 'idle';
|
|
646
641
|
}
|
|
647
642
|
|
|
@@ -53,7 +53,20 @@ function injectStyles() {
|
|
|
53
53
|
style.id = 'sidepanel-window-styles';
|
|
54
54
|
style.textContent = `
|
|
55
55
|
html .sp-sidepanel { z-index: var(--sp-window-layer, 11000) !important; }
|
|
56
|
-
|
|
56
|
+
/* A closed panel stays in the page with its transcripts (thousands of elements each). content-visibility
|
|
57
|
+
takes what is inside it out of style and layout as well as paint until it is shown again: every restyle
|
|
58
|
+
of the whole page (a variable on <html>, a class on <body>, each frame of a drag) used to walk all of
|
|
59
|
+
them, and a session streaming in a closed panel was laid out every frame. The panel's own box is sized by
|
|
60
|
+
its position and width, never by what it holds, so nothing moves; engines without the property keep
|
|
61
|
+
visibility: hidden alone.
|
|
62
|
+
Its glass goes with it: a panel nobody sees must not keep a blurred surface the size of the panel for
|
|
63
|
+
the compositor to carry (five panels, each 28px of blur over hundreds of thousands of pixels). The same
|
|
64
|
+
rule that hides it takes the filter, and showing it gives it back in the same frame, so the glass of a
|
|
65
|
+
panel on screen is what it always was, on every platform (Windows included: tests/windows-visuals.test.mjs). */
|
|
66
|
+
html .sp-sidepanel[data-sp-visible="false"] {
|
|
67
|
+
visibility: hidden; pointer-events: none; content-visibility: hidden;
|
|
68
|
+
backdrop-filter: none; -webkit-backdrop-filter: none;
|
|
69
|
+
}
|
|
57
70
|
html .sp-sidepanel.sp-floating {
|
|
58
71
|
right: auto; bottom: auto; min-width: 0; max-width: none; min-height: 0;
|
|
59
72
|
transform: none !important; transition: opacity .15s ease;
|
|
@@ -2,10 +2,16 @@
|
|
|
2
2
|
import { on } from './state.js';
|
|
3
3
|
import { initI18n, isReady, t } from './i18n.js';
|
|
4
4
|
import { isGuest, hasPermission, showGuestToast } from './ui-sync.js';
|
|
5
|
-
import { createPanel } from './styleguide/sg-panel.js';
|
|
6
5
|
import { centeredInFrame } from './app-frame.js';
|
|
6
|
+
import { registerLaunchPrefetch } from './launch-prefetch.js';
|
|
7
|
+
// The window (styleguide/, about twenty modules) loads when it is opened, or in idle time after the page is shown
|
|
8
|
+
// (a launch step), not before the first frame. Nothing in it runs at load: it only defines the window.
|
|
9
|
+
const loadPanel = () => import('./styleguide/sg-panel.js');
|
|
7
10
|
let current = null, opening = false;
|
|
8
|
-
export function initStyleGuide() {
|
|
11
|
+
export function initStyleGuide() {
|
|
12
|
+
on('styleguide:open', options => openPanel(options));
|
|
13
|
+
registerLaunchPrefetch('style-guide-module', () => loadPanel(), { order: 78 });
|
|
14
|
+
}
|
|
9
15
|
async function openPanel(options = {}) {
|
|
10
16
|
if (opening)
|
|
11
17
|
return;
|
|
@@ -21,6 +27,8 @@ async function openPanel(options = {}) {
|
|
|
21
27
|
showGuestToast(t('styleguide.permissionDenied'));
|
|
22
28
|
return;
|
|
23
29
|
}
|
|
30
|
+
// Before the backdrop: the backdrop and the window still appear together.
|
|
31
|
+
const { createPanel } = await loadPanel();
|
|
24
32
|
const backdrop = document.createElement('div');
|
|
25
33
|
backdrop.className = 'studio-backdrop open';
|
|
26
34
|
document.body.append(backdrop);
|
|
@@ -142,6 +142,11 @@ const SYNC_HANDLERS = {
|
|
|
142
142
|
// Skills Service (lib/skills/service.js): a skill, a revision, a review or an installation changed (owner only) —
|
|
143
143
|
// the Studio reads its library again, Settings its chips, the Codex panel its skill hints
|
|
144
144
|
'skills:changed': (msg) => emit('sync:skills:changed', msg),
|
|
145
|
+
// Agents (agents-p5): an agent definition changed (lib/agents/registry.js through server.js) or a team did (the
|
|
146
|
+
// team scheduler): Agents Studio reads its library, its Review queue and its teams again (ui-agents.js)
|
|
147
|
+
'assistant:automation-records-changed': (msg) => emit('sync:assistant:automation-records-changed', msg),
|
|
148
|
+
'assistant:agents-changed': (msg) => emit('sync:assistant:agents-changed', msg),
|
|
149
|
+
'assistant:team-changed': (msg) => emit('sync:assistant:team-changed', msg),
|
|
145
150
|
|
|
146
151
|
// WhatsApp Link — states and counters only (never a QR, code, number or text); Settings → WhatsApp re-reads /api/whatsapp/status
|
|
147
152
|
'whatsapp:status': (msg) => emit('sync:whatsapp:status', msg),
|
|
@@ -278,6 +283,7 @@ function connect() {
|
|
|
278
283
|
_ws.onclose = () => {
|
|
279
284
|
console.log('[sync-ws] Disconnected, will reconnect in 5s');
|
|
280
285
|
_ws = null;
|
|
286
|
+
emit('sync:disconnected');
|
|
281
287
|
if (!_reconnectTimer) {
|
|
282
288
|
_reconnectTimer = setInterval(connect, RECONNECT_INTERVAL);
|
|
283
289
|
}
|
|
@@ -19,6 +19,7 @@ import { frameRect, onFrameChange, clampBox, clampBoxLoose } from './app-frame.j
|
|
|
19
19
|
import { notify, NOTIF_TYPE } from './ui-notifications.js';
|
|
20
20
|
import { getProviderMeta } from './provider-icons.js';
|
|
21
21
|
import { readinessKind, typeWhenReady } from './term-ready.js';
|
|
22
|
+
import { closeBrowserTabs } from './term-browser-tabs.js';
|
|
22
23
|
import { initRendererManager, acquireRenderer, disposeRenderer, hasWebgl, noteFocus, adoptRenderer, rendererState, rendererStats } from './term-renderer.js';
|
|
23
24
|
import { mountAssistant } from './assistant/asst-panel.js';
|
|
24
25
|
import { getAssistantSession } from './assistant/asst-api.js';
|
|
@@ -1742,6 +1743,9 @@ function pickProject(profile) {
|
|
|
1742
1743
|
// Cancel on outside click or Escape
|
|
1743
1744
|
overlay.addEventListener('click', (e) => { if (e.target === overlay) { overlay.remove(); resolve(undefined); } });
|
|
1744
1745
|
document.addEventListener('keydown', function onEsc(e) {
|
|
1746
|
+
// The picker closed some other way (a project picked, a click outside): this listener goes with it,
|
|
1747
|
+
// instead of one more staying on the document after every launch.
|
|
1748
|
+
if (!overlay.isConnected) { document.removeEventListener('keydown', onEsc); return; }
|
|
1745
1749
|
if (e.key === 'Escape') { overlay.remove(); document.removeEventListener('keydown', onEsc); resolve(undefined); }
|
|
1746
1750
|
});
|
|
1747
1751
|
|
|
@@ -2918,20 +2922,20 @@ async function openBrowserSession(url, fresh, _unused, force) {
|
|
|
2918
2922
|
|
|
2919
2923
|
// fresh=true: close ALL existing browser sessions so MCP tools auto-select ours
|
|
2920
2924
|
if (fresh) {
|
|
2925
|
+
// The server's sessions: a request that fails must not stop the fresh one from opening, and is said.
|
|
2926
|
+
const endedIds = [];
|
|
2921
2927
|
try {
|
|
2922
2928
|
const existing = await fetchBrowserSessions();
|
|
2923
2929
|
const sessions = existing?.sessions || [];
|
|
2924
2930
|
for (const s of sessions) {
|
|
2925
|
-
await deleteBrowserSession(s.id).
|
|
2931
|
+
await deleteBrowserSession(s.id).then(() => { endedIds.push(s.id); }, () => {});
|
|
2926
2932
|
}
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
}
|
|
2934
|
-
} catch (e) { /* ignore cleanup errors */ }
|
|
2933
|
+
} catch (e) {
|
|
2934
|
+
console.warn('[browser] could not end the old browser sessions:', e);
|
|
2935
|
+
}
|
|
2936
|
+
// Their tabs in the panel (term-browser-tabs.js). Outside the catch above on purpose: it once hid a call
|
|
2937
|
+
// to a function that did not exist, and the old tabs stayed for good.
|
|
2938
|
+
if (!_streamOff) closeBrowserTabs(_sessions, closeSession, { deletedIds: endedIds });
|
|
2935
2939
|
}
|
|
2936
2940
|
|
|
2937
2941
|
const startUrl = url || 'https://www.google.com';
|
|
@@ -6,6 +6,17 @@
|
|
|
6
6
|
import { boundsForPoint, frameRect } from './app-frame.js';
|
|
7
7
|
import { isWindowsPlatform } from './desktop-bridge.js';
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Whether a scroll of `scroller` (a scroll event's target) can move `control`: the document's own scroll moves
|
|
11
|
+
* everything, an element's scroll moves what is inside it. Anything that is not an element counts as the page.
|
|
12
|
+
*/
|
|
13
|
+
export function scrollCanMove(scroller, control) {
|
|
14
|
+
if (!control) return false;
|
|
15
|
+
if (!scroller || scroller.nodeType !== 1) return true;
|
|
16
|
+
if (scroller === control) return true;
|
|
17
|
+
try { return scroller.contains(control); } catch { return true; }
|
|
18
|
+
}
|
|
19
|
+
|
|
9
20
|
/**
|
|
10
21
|
* Initialize the tooltip system.
|
|
11
22
|
* Creates a body-appended tooltip element and delegates
|
|
@@ -27,6 +38,7 @@ export function initTooltip() {
|
|
|
27
38
|
let showTimer = null;
|
|
28
39
|
let hideTimer = null;
|
|
29
40
|
let currentTarget = null;
|
|
41
|
+
let pendingTarget = null; // the control whose tooltip is due (showTimer)
|
|
30
42
|
let repositionRunHandler = null;
|
|
31
43
|
let repositionEndHandler = null;
|
|
32
44
|
let repositionRafId = 0;
|
|
@@ -227,6 +239,7 @@ export function initTooltip() {
|
|
|
227
239
|
clearTimeout(showTimer);
|
|
228
240
|
clearTimeout(hideTimer);
|
|
229
241
|
showTimer = null;
|
|
242
|
+
pendingTarget = null;
|
|
230
243
|
if (repositionRafId) {
|
|
231
244
|
cancelAnimationFrame(repositionRafId);
|
|
232
245
|
repositionRafId = 0;
|
|
@@ -253,12 +266,10 @@ export function initTooltip() {
|
|
|
253
266
|
if (el === currentTarget) { clearTimeout(hideTimer); return; }
|
|
254
267
|
clearTimeout(showTimer);
|
|
255
268
|
clearTimeout(hideTimer);
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
showTimer = setTimeout(() => show(el), 20);
|
|
261
|
-
}
|
|
269
|
+
const delay = currentTarget ? 16 : 20;
|
|
270
|
+
if (currentTarget) hide();
|
|
271
|
+
pendingTarget = el;
|
|
272
|
+
showTimer = setTimeout(() => { pendingTarget = null; show(el); }, delay);
|
|
262
273
|
});
|
|
263
274
|
|
|
264
275
|
document.addEventListener('mouseout', (e) => {
|
|
@@ -270,7 +281,17 @@ export function initTooltip() {
|
|
|
270
281
|
hide();
|
|
271
282
|
});
|
|
272
283
|
|
|
273
|
-
|
|
284
|
+
// A scroll takes the tooltip away when it can move the control the tooltip is for: the page itself, or a
|
|
285
|
+
// scroller that holds the control. Any other scroller leaves the control where it is. Hiding on every scroll
|
|
286
|
+
// of the document meant that a transcript following a streaming session (one scroll per frame, in any open
|
|
287
|
+
// panel) cancelled each tooltip before its 20 ms delay ran out: a session pill hovered meanwhile showed its
|
|
288
|
+
// name late, in flashes or not at all. With nothing shown or due, there is nothing to do.
|
|
289
|
+
document.addEventListener('scroll', (e) => {
|
|
290
|
+
const target = currentTarget || pendingTarget;
|
|
291
|
+
if (!target) return;
|
|
292
|
+
if (!scrollCanMove(e.target, target)) return;
|
|
293
|
+
hide();
|
|
294
|
+
}, true);
|
|
274
295
|
document.addEventListener('pointerdown', hide, true);
|
|
275
296
|
|
|
276
297
|
// Keyboard focus shows the tooltip too, but only inside the Assistant
|
|
@@ -83,15 +83,37 @@ export function initToprightOverflow() {
|
|
|
83
83
|
// The dock's dividers: the 2px margins and gaps they free are not counted above, so the row only gets narrower.
|
|
84
84
|
tidyDividers();
|
|
85
85
|
if (controls.classList.contains('has-overflow') !== hidden.length > 0) controls.classList.toggle('has-overflow', hidden.length > 0);
|
|
86
|
+
lastAmbient = ambientKey();
|
|
86
87
|
if (!hidden.length && open) close();
|
|
87
88
|
else if (open) render();
|
|
88
89
|
};
|
|
89
90
|
|
|
91
|
+
// What a class or a style on <html> / <body> can change for the row: its band (max-width), its gaps, and
|
|
92
|
+
// which rules apply (the class lists). A pass puts every button back in the row, measures it and takes the
|
|
93
|
+
// overflowed ones out again: two layouts. <html> and <body> change all the time for other reasons (a
|
|
94
|
+
// variable written on each frame of a drag, the cursor and user-select of every drag, the same class set
|
|
95
|
+
// again), and none of that moves the row: when those were the only wake-ups and this key is what it was
|
|
96
|
+
// after the last pass, there is nothing to fit. A size change of the row or of a button always fits.
|
|
97
|
+
let lastAmbient = null;
|
|
98
|
+
const ambientKey = () => [
|
|
99
|
+
document.documentElement.className, document.body.className,
|
|
100
|
+
getComputedStyle(controls).maxWidth, getComputedStyle(controls).columnGap,
|
|
101
|
+
getComputedStyle(inner).columnGap, getComputedStyle(group).columnGap,
|
|
102
|
+
].join('|');
|
|
103
|
+
|
|
90
104
|
let frame = 0;
|
|
91
|
-
|
|
105
|
+
let ambientOnly = true; // every wake-up since the last pass was a class or a style of <html> / <body>
|
|
106
|
+
const schedule = (ambient) => {
|
|
107
|
+
if (ambient !== true) ambientOnly = false;
|
|
92
108
|
if (frame) return;
|
|
93
|
-
frame = requestAnimationFrame(() => {
|
|
109
|
+
frame = requestAnimationFrame(() => {
|
|
110
|
+
frame = 0;
|
|
111
|
+
const nothingMoved = ambientOnly && lastAmbient !== null && ambientKey() === lastAmbient;
|
|
112
|
+
ambientOnly = true;
|
|
113
|
+
if (!nothingMoved) fit();
|
|
114
|
+
});
|
|
94
115
|
};
|
|
116
|
+
const scheduleAmbient = () => schedule(true);
|
|
95
117
|
|
|
96
118
|
const render = () => {
|
|
97
119
|
menu.textContent = '';
|
|
@@ -192,8 +214,8 @@ export function initToprightOverflow() {
|
|
|
192
214
|
ro.observe(controls);
|
|
193
215
|
for (const e of entries) ro.observe(e.item);
|
|
194
216
|
ro.observe(inner.querySelector('#workspace-overlay') || inner);
|
|
195
|
-
new MutationObserver(
|
|
196
|
-
new MutationObserver(
|
|
217
|
+
new MutationObserver(scheduleAmbient).observe(document.documentElement, { attributes: true, attributeFilter: ['style', 'class'] });
|
|
218
|
+
new MutationObserver(scheduleAmbient).observe(document.body, { attributes: true, attributeFilter: ['style', 'class'] });
|
|
197
219
|
new MutationObserver(schedule).observe(controls, { attributes: true, attributeFilter: ['class'] });
|
|
198
220
|
for (const e of entries) new MutationObserver(schedule).observe(e.item, { attributes: true, attributeFilter: ['style'] });
|
|
199
221
|
const bg = $('static-bg');
|