synabun 2.3.0 → 2.4.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 +38 -0
- package/README.md +1 -1
- package/browser-extension/content.js +169 -0
- package/browser-extension/engine.js +477 -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 +244 -0
- package/browser-extension/popup-view.js +151 -0
- package/browser-extension/popup.css +165 -0
- package/browser-extension/popup.html +105 -0
- package/browser-extension/popup.js +347 -0
- package/browser-extension/protocol.js +226 -0
- package/browser-extension/service-worker.js +267 -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/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 +94 -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 +91 -9
- package/mcp-server/dist/tools/agents.d.ts.map +1 -1
- package/mcp-server/dist/tools/agents.js +161 -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 +190 -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 +175 -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 +1174 -47
- package/neural-interface/i18n/pt-BR.json +1174 -47
- package/neural-interface/lib/account-usage.js +1 -1
- 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 +840 -0
- package/neural-interface/lib/agents/resolve.js +544 -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-catalog.js +2 -0
- package/neural-interface/lib/assistant-continuity.js +49 -0
- package/neural-interface/lib/assistant-dispatch.js +229 -102
- 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 +384 -42
- 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 +440 -93
- 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/browser-close-evidence.js +80 -0
- package/neural-interface/lib/browser-default.js +210 -0
- package/neural-interface/lib/browser-extension-adapter.js +255 -0
- package/neural-interface/lib/browser-extension-bridge.js +418 -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-profiles.js +1 -1
- 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/cli-install-api.js +23 -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/editor-completion-opencode.js +4 -3
- package/neural-interface/lib/effort-levels.js +10 -1
- package/neural-interface/lib/maritaca/opencode-proxy.js +7 -2
- package/neural-interface/lib/maritaca/opencode.js +35 -0
- 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 +219 -7
- package/neural-interface/lib/native-loop-runtime.js +24 -1
- package/neural-interface/lib/opencode-build-preflight.js +116 -0
- package/neural-interface/lib/opencode-launch-error.js +13 -0
- package/neural-interface/lib/opencode-native-boundary.js +800 -84
- package/neural-interface/lib/opencode-serve-probe.js +426 -0
- package/neural-interface/lib/opencode-serve-records.js +14 -9
- package/neural-interface/lib/opencode-serve-scan.js +108 -0
- package/neural-interface/lib/page-session.js +1 -1
- package/neural-interface/lib/peer-identity.js +60 -21
- package/neural-interface/lib/process-identity.js +235 -7
- package/neural-interface/lib/request-gate.js +3 -0
- package/neural-interface/lib/screenshot-location.js +33 -0
- 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/lib/worker-mcp-channel.js +38 -1
- package/neural-interface/package-lock.json +4 -2
- package/neural-interface/package.json +3 -1
- package/neural-interface/public/extension-setup.html +107 -0
- package/neural-interface/public/index.html +52 -12
- 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/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 +36 -6
- package/neural-interface/public/shared/assistant/asst-route.js +78 -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/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 +33 -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/opencode-verify-view.js +175 -0
- 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/storage.js +6 -1
- package/neural-interface/public/shared/studio-attention.js +83 -0
- package/neural-interface/public/shared/styles.css +713 -61
- 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 +12 -1
- 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 +1 -1
- 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-opencode-verify.js +120 -0
- 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 +372 -402
- 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 +5 -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/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 +21 -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 +1164 -157
- package/npm-shrinkwrap.json +2 -2
- package/package.json +3 -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
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
// ═══════════════════════════════════════════
|
|
2
|
+
// SynaBun Neural Interface — the Copy button of a code block: the page side
|
|
3
|
+
// ═══════════════════════════════════════════
|
|
4
|
+
//
|
|
5
|
+
// One Copy button on every block an agent shows for the user to copy, in the six side panels (Assistant, Claude
|
|
6
|
+
// Code, Codex, OpenCode, Antigravity, Maritaca), their detached windows and their worker and sub-agent views. What
|
|
7
|
+
// the button is, what a block copies and how it is copied are decided in code-copy.js; this module gives that the
|
|
8
|
+
// page:
|
|
9
|
+
//
|
|
10
|
+
// installCodeCopy(doc) the stylesheet and ONE click listener for the whole document (a panel's style
|
|
11
|
+
// injector calls it, so a detached window gets its own). A button needs nothing
|
|
12
|
+
// else: one in a stored transcript, drawn by a stream or put back by a re-render
|
|
13
|
+
// works the moment it is on the page.
|
|
14
|
+
// decorateCodeBlocks(root) the button on every <pre> under `root` that has none, for a block drawn without
|
|
15
|
+
// the Markdown renderers (a tool result, an older stored transcript); idempotent,
|
|
16
|
+
// and it replaces the panels' earlier buttons.
|
|
17
|
+
//
|
|
18
|
+
// The Markdown renderers write the button into their output (withCodeCopyButtons), so it survives every redraw
|
|
19
|
+
// without a timer or an observer. No imports but code-copy.js, and nothing runs at import: `node --test` loads it.
|
|
20
|
+
|
|
21
|
+
import {
|
|
22
|
+
ANY_CODE_COPY_SELECTOR, CODE_COPY_CLASS, CODE_COPY_FEEDBACK_MS,
|
|
23
|
+
codeBlockText, codeCopyText, setCodeCopyTranslator, writeClipboard,
|
|
24
|
+
} from './code-copy.js';
|
|
25
|
+
|
|
26
|
+
export const CODE_COPY_STYLE_ID = 'sb-code-copy-styles';
|
|
27
|
+
|
|
28
|
+
// The style guide's tokens (DESIGN.md): the app's text and surface variables with their dark values as fallbacks
|
|
29
|
+
// (a panel styles its own scope; a detached window may load styles.css late), JetBrains Mono, the 5px control
|
|
30
|
+
// radius, status.success / status.danger for the outcome. The icons are masks, coloured by `currentColor`.
|
|
31
|
+
const ICON_COPY = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linejoin='round'%3E%3Crect x='5.5' y='5.5' width='8' height='8' rx='1.5'/%3E%3Cpath d='M10.5 5.5V3.5a1 1 0 0 0-1-1h-6a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2'/%3E%3C/svg%3E\")";
|
|
32
|
+
const ICON_DONE = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 7.2 6 9.6l4.6-5.2' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\")";
|
|
33
|
+
const ICON_FAILED = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M7 3.5v4.2M7 10.2v.1' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E\")";
|
|
34
|
+
|
|
35
|
+
export const CODE_COPY_CSS = `
|
|
36
|
+
/* ── The Copy button of a code block (code-copy.js, ui-code-copy.js) ──
|
|
37
|
+
The block keeps a strip of its own above its first line for the button, so the button never covers code,
|
|
38
|
+
at any panel width. A block's code scrolls sideways inside it, so a long line never carries the button away.
|
|
39
|
+
!important: each panel sets its own padding on its <pre>, with selectors of every weight. */
|
|
40
|
+
pre:has(> .${CODE_COPY_CLASS}) { position: relative !important; padding-top: 28px !important; }
|
|
41
|
+
pre:has(> .${CODE_COPY_CLASS}) > code { display: block; overflow-x: auto; }
|
|
42
|
+
pre > button.${CODE_COPY_CLASS} {
|
|
43
|
+
position: absolute; top: 4px; right: 4px; z-index: 1;
|
|
44
|
+
display: inline-flex; align-items: center; gap: 4px;
|
|
45
|
+
box-sizing: border-box; height: 20px; min-width: 20px; margin: 0; padding: 0 6px;
|
|
46
|
+
border: 1px solid transparent; border-radius: 5px;
|
|
47
|
+
background: transparent; box-shadow: none;
|
|
48
|
+
color: var(--t-secondary, rgba(255,255,255,0.5));
|
|
49
|
+
font: 500 10px/1 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
50
|
+
letter-spacing: 0.02em; text-transform: none; white-space: nowrap;
|
|
51
|
+
cursor: pointer; user-select: none; -webkit-user-select: none;
|
|
52
|
+
opacity: 0.6;
|
|
53
|
+
transition: opacity 0.15s, color 0.15s, background-color 0.15s, border-color 0.15s;
|
|
54
|
+
}
|
|
55
|
+
pre > button.${CODE_COPY_CLASS}::before {
|
|
56
|
+
content: ''; flex: none; width: 11px; height: 11px; background: currentColor;
|
|
57
|
+
-webkit-mask: ${ICON_COPY} center / contain no-repeat; mask: ${ICON_COPY} center / contain no-repeat;
|
|
58
|
+
}
|
|
59
|
+
pre > button.${CODE_COPY_CLASS}::after { content: attr(data-label); }
|
|
60
|
+
pre:hover > button.${CODE_COPY_CLASS}, pre > button.${CODE_COPY_CLASS}:focus-visible,
|
|
61
|
+
pre > button.${CODE_COPY_CLASS}[data-state] { opacity: 1; }
|
|
62
|
+
pre > button.${CODE_COPY_CLASS}:hover {
|
|
63
|
+
color: var(--t-bright, rgba(255,255,255,0.9));
|
|
64
|
+
background: var(--s-hover, rgba(255,255,255,0.08)); border-color: var(--b-light, rgba(255,255,255,0.10));
|
|
65
|
+
}
|
|
66
|
+
pre > button.${CODE_COPY_CLASS}:focus-visible {
|
|
67
|
+
color: var(--t-bright, rgba(255,255,255,0.9));
|
|
68
|
+
outline: 1px solid var(--b-visible, rgba(255,255,255,0.22)); outline-offset: 1px;
|
|
69
|
+
}
|
|
70
|
+
pre > button.${CODE_COPY_CLASS}[data-state="copied"] { color: #86efac; }
|
|
71
|
+
pre > button.${CODE_COPY_CLASS}[data-state="copied"]::before { -webkit-mask-image: ${ICON_DONE}; mask-image: ${ICON_DONE}; }
|
|
72
|
+
pre > button.${CODE_COPY_CLASS}[data-state="failed"] { color: #fca5a5; }
|
|
73
|
+
pre > button.${CODE_COPY_CLASS}[data-state="failed"]::before { -webkit-mask-image: ${ICON_FAILED}; mask-image: ${ICON_FAILED}; }
|
|
74
|
+
/* A touch screen has no hover: the button is always shown there. */
|
|
75
|
+
@media (hover: none) { pre > button.${CODE_COPY_CLASS} { opacity: 1; } }
|
|
76
|
+
@media (prefers-reduced-motion: reduce) { pre > button.${CODE_COPY_CLASS} { transition: none; } }
|
|
77
|
+
`;
|
|
78
|
+
|
|
79
|
+
const installed = new WeakSet();
|
|
80
|
+
const timers = new WeakMap();
|
|
81
|
+
let askedI18n = false;
|
|
82
|
+
|
|
83
|
+
const tagOf = (node) => String(node?.localName || node?.nodeName || '').toLowerCase();
|
|
84
|
+
|
|
85
|
+
/** The shared stylesheet in `doc`, once. */
|
|
86
|
+
export function injectCodeCopyStyles(doc = globalThis.document) {
|
|
87
|
+
if (!doc?.createElement || !doc.head || doc.getElementById?.(CODE_COPY_STYLE_ID)) return;
|
|
88
|
+
const style = doc.createElement('style');
|
|
89
|
+
style.id = CODE_COPY_STYLE_ID;
|
|
90
|
+
style.textContent = CODE_COPY_CSS;
|
|
91
|
+
doc.head.appendChild(style);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// The app's locale, read where the app has one. Loaded on demand: i18n.js needs a page, and this module must not.
|
|
95
|
+
function askI18n() {
|
|
96
|
+
if (askedI18n || typeof window === 'undefined') return;
|
|
97
|
+
askedI18n = true;
|
|
98
|
+
import('./i18n.js')
|
|
99
|
+
.then(({ t }) => {
|
|
100
|
+
if (typeof t !== 'function') return;
|
|
101
|
+
setCodeCopyTranslator((key, params) => {
|
|
102
|
+
const id = `codeCopy.${key}`;
|
|
103
|
+
const text = t(id, params);
|
|
104
|
+
return text && text !== id ? text : '';
|
|
105
|
+
});
|
|
106
|
+
})
|
|
107
|
+
.catch(() => { /* no i18n here (a detached window before its bundle, a test page): the English */ });
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* The Copy buttons of code blocks work in `doc`: the stylesheet and one click listener (capture phase, so the
|
|
112
|
+
* click never reaches a card header or a link under the block). Safe to call any number of times.
|
|
113
|
+
* @returns {boolean} true the first time for this document
|
|
114
|
+
*/
|
|
115
|
+
export function installCodeCopy(doc = globalThis.document) {
|
|
116
|
+
if (!doc || typeof doc.addEventListener !== 'function' || installed.has(doc)) return false;
|
|
117
|
+
installed.add(doc);
|
|
118
|
+
injectCodeCopyStyles(doc);
|
|
119
|
+
doc.addEventListener('click', onDocumentClick, true);
|
|
120
|
+
askI18n();
|
|
121
|
+
return true;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function newButton(doc) {
|
|
125
|
+
const button = doc.createElement('button');
|
|
126
|
+
button.type = 'button';
|
|
127
|
+
button.className = CODE_COPY_CLASS;
|
|
128
|
+
button.setAttribute('data-label', codeCopyText('copy'));
|
|
129
|
+
button.setAttribute('aria-label', codeCopyText('label'));
|
|
130
|
+
return button;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function resetButton(button) {
|
|
134
|
+
const view = button.ownerDocument?.defaultView || globalThis;
|
|
135
|
+
const timer = timers.get(button);
|
|
136
|
+
if (timer) view.clearTimeout(timer);
|
|
137
|
+
timers.delete(button);
|
|
138
|
+
button.removeAttribute('data-state');
|
|
139
|
+
button.setAttribute('data-label', codeCopyText('copy'));
|
|
140
|
+
button.setAttribute('aria-label', codeCopyText('label'));
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function showOutcome(button, state) {
|
|
144
|
+
const view = button.ownerDocument?.defaultView || globalThis;
|
|
145
|
+
const timer = timers.get(button);
|
|
146
|
+
if (timer) view.clearTimeout(timer);
|
|
147
|
+
button.setAttribute('data-state', state);
|
|
148
|
+
button.setAttribute('data-label', codeCopyText(state));
|
|
149
|
+
button.setAttribute('aria-label', codeCopyText(state === 'copied' ? 'copiedLabel' : 'failedLabel'));
|
|
150
|
+
timers.set(button, view.setTimeout(() => resetButton(button), CODE_COPY_FEEDBACK_MS[state] || 1500));
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function skipped(pre, skip) {
|
|
154
|
+
if (pre.closest('[data-no-code-copy]')) return true;
|
|
155
|
+
if (typeof skip === 'function') return !!skip(pre);
|
|
156
|
+
return typeof skip === 'string' && skip ? !!pre.closest(skip) : false;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* One Copy button on every <pre> under `root` (and `root` itself when it is one): a block with none gets one, an
|
|
161
|
+
* earlier panel's button is replaced, a second one is removed, and a button a stored transcript kept in its
|
|
162
|
+
* "Copied" state shows "Copy" again. A block matched by `skip` (a selector of an ancestor, or a function of the
|
|
163
|
+
* <pre>) or inside `[data-no-code-copy]` has a copy control of its own and keeps no shared button.
|
|
164
|
+
* @returns {number} the buttons added
|
|
165
|
+
*/
|
|
166
|
+
export function decorateCodeBlocks(root, { skip = null } = {}) {
|
|
167
|
+
if (!root || typeof root.querySelectorAll !== 'function') return 0;
|
|
168
|
+
const doc = root.ownerDocument || globalThis.document;
|
|
169
|
+
const pres = tagOf(root) === 'pre' ? [root, ...root.querySelectorAll('pre')] : [...root.querySelectorAll('pre')];
|
|
170
|
+
let added = 0;
|
|
171
|
+
for (const pre of pres) {
|
|
172
|
+
const buttons = [...pre.children].filter((child) => child.matches?.(ANY_CODE_COPY_SELECTOR));
|
|
173
|
+
if (skipped(pre, skip)) { for (const button of buttons) button.remove(); continue; }
|
|
174
|
+
const keep = buttons.find((button) => button.classList.contains(CODE_COPY_CLASS)) || null;
|
|
175
|
+
for (const button of buttons) if (button !== keep) button.remove();
|
|
176
|
+
if (keep) {
|
|
177
|
+
if (keep.hasAttribute('data-state') && !timers.has(keep)) resetButton(keep);
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
pre.appendChild(newButton(doc));
|
|
181
|
+
added += 1;
|
|
182
|
+
}
|
|
183
|
+
return added;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// The block's text through a hidden textarea and execCommand('copy'): what copies where the Clipboard API is
|
|
187
|
+
// missing or refused. Focus goes back where it was (the button, for a keyboard user).
|
|
188
|
+
function execCopy(doc, text) {
|
|
189
|
+
if (typeof doc?.execCommand !== 'function' || !doc.body) return false;
|
|
190
|
+
const active = doc.activeElement;
|
|
191
|
+
const area = doc.createElement('textarea');
|
|
192
|
+
area.value = text;
|
|
193
|
+
area.setAttribute('readonly', '');
|
|
194
|
+
area.setAttribute('aria-hidden', 'true');
|
|
195
|
+
area.tabIndex = -1;
|
|
196
|
+
area.style.cssText = 'position:fixed;top:0;left:0;width:1px;height:1px;padding:0;border:0;margin:0;opacity:0;pointer-events:none;';
|
|
197
|
+
doc.body.appendChild(area);
|
|
198
|
+
let ok = false;
|
|
199
|
+
try {
|
|
200
|
+
area.focus({ preventScroll: true });
|
|
201
|
+
area.select();
|
|
202
|
+
area.setSelectionRange(0, text.length);
|
|
203
|
+
ok = doc.execCommand('copy') === true;
|
|
204
|
+
} catch { ok = false; }
|
|
205
|
+
area.remove();
|
|
206
|
+
try { active?.focus?.({ preventScroll: true }); } catch { /* the button left the page */ }
|
|
207
|
+
return ok;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// Nothing could copy: the block's text is selected, for the keyboard shortcut.
|
|
211
|
+
function selectBlock(pre) {
|
|
212
|
+
try {
|
|
213
|
+
const doc = pre.ownerDocument;
|
|
214
|
+
const range = doc.createRange();
|
|
215
|
+
range.selectNodeContents(pre.querySelector(':scope > code') || pre);
|
|
216
|
+
const selection = doc.getSelection();
|
|
217
|
+
selection.removeAllRanges();
|
|
218
|
+
selection.addRange(range);
|
|
219
|
+
} catch { /* no selection API */ }
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Copy the block a button belongs to, then say how it went on the button ("Copied", or "Not copied" with the
|
|
224
|
+
* code selected). `clipboard` / `fallback` stand in for the page's in a test.
|
|
225
|
+
* @returns {Promise<'clipboard' | 'fallback' | null>}
|
|
226
|
+
*/
|
|
227
|
+
export async function copyCodeBlock(button, { clipboard, fallback } = {}) {
|
|
228
|
+
const pre = button?.closest?.('pre');
|
|
229
|
+
if (!pre) return null;
|
|
230
|
+
const doc = button.ownerDocument || globalThis.document;
|
|
231
|
+
const view = doc.defaultView || globalThis;
|
|
232
|
+
const how = await writeClipboard(codeBlockText(pre), {
|
|
233
|
+
clipboard: clipboard === undefined ? view.navigator?.clipboard : clipboard,
|
|
234
|
+
fallback: fallback === undefined ? (text) => execCopy(doc, text) : fallback,
|
|
235
|
+
});
|
|
236
|
+
if (!button.isConnected) return how;
|
|
237
|
+
if (how) showOutcome(button, 'copied');
|
|
238
|
+
else { selectBlock(pre); showOutcome(button, 'failed'); }
|
|
239
|
+
return how;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
function onDocumentClick(event) {
|
|
243
|
+
const found = event.target?.closest?.(ANY_CODE_COPY_SELECTOR);
|
|
244
|
+
if (!found || tagOf(found.parentElement) !== 'pre') return;
|
|
245
|
+
event.preventDefault();
|
|
246
|
+
event.stopPropagation();
|
|
247
|
+
let button = found;
|
|
248
|
+
if (!found.classList.contains(CODE_COPY_CLASS)) {
|
|
249
|
+
// A button an earlier build stored with the transcript: the shared one takes its place, then copies.
|
|
250
|
+
const hadFocus = found.ownerDocument?.activeElement === found;
|
|
251
|
+
button = newButton(found.ownerDocument);
|
|
252
|
+
found.replaceWith(button);
|
|
253
|
+
if (hadFocus) button.focus({ preventScroll: true });
|
|
254
|
+
}
|
|
255
|
+
copyCodeBlock(button).catch(() => {});
|
|
256
|
+
}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
// ═══════════════════════════════════════════
|
|
2
|
-
// SynaBun — Codex Panel (
|
|
3
|
-
// Actual implementation in ./cdx/ directory
|
|
2
|
+
// SynaBun — Codex Panel (facade)
|
|
3
|
+
// Actual implementation in ./cdx/ directory, loaded on first use or in idle time after the page
|
|
4
|
+
// is shown (sidepanel-lazy.js). The names are the panel's own; a panel that has not loaded is
|
|
5
|
+
// not open.
|
|
4
6
|
// ═══════════════════════════════════════════
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
import { codexPanelModule as panel, codexTabsModule as tabs } from './sidepanel-lazy.js';
|
|
9
|
+
|
|
10
|
+
export const toggleCodexPanel = panel.asyncExport('toggleCodexPanel');
|
|
11
|
+
export const isCodexPanelOpen = panel.syncExport('isCodexPanelOpen', false);
|
|
12
|
+
export const bootCodexPanel = panel.deferredExport('bootCodexPanel');
|
|
13
|
+
export const attachCodexAutomation = panel.asyncExport('attachCodexAutomation');
|
|
14
|
+
export const detachCodexAutomation = panel.asyncExport('detachCodexAutomation');
|
|
15
|
+
export const handleCodexAutomationEvent = panel.deferredExport('handleCodexAutomationEvent');
|
|
16
|
+
// A path chip in the active Codex tab (the File Explorer's Send to, after the panel opened).
|
|
17
|
+
export const addPathChip = tabs.deferredExport('addPathChip');
|
|
@@ -32,7 +32,7 @@ import { t } from './i18n.js';
|
|
|
32
32
|
import { state, emit } from './state.js';
|
|
33
33
|
import { actionForKey, getShortcutLabel, hasAction, runAction } from './ui-keybinds.js';
|
|
34
34
|
import { isGuest, hasPermission } from './ui-sync.js';
|
|
35
|
-
import { sendToPanel } from './
|
|
35
|
+
import { sendToPanel } from './claude-panel-lazy.js';
|
|
36
36
|
import { closeMemoryCard, focusLinkedMemories, getOpenCardsSnapshot } from './ui-detail.js';
|
|
37
37
|
import { formatMemoryForCLI } from './ui-terminal.js';
|
|
38
38
|
import { fetchMemory } from './api.js';
|
|
@@ -16,11 +16,10 @@ import { sendToFocusedSession } from './ui-sidepanel-windows.js';
|
|
|
16
16
|
import { KEYS } from './constants.js';
|
|
17
17
|
import { registerAction } from './ui-keybinds.js';
|
|
18
18
|
import { storage } from './storage.js';
|
|
19
|
-
import { sendToPanel as sendToClaudePanel } from './
|
|
19
|
+
import { sendToPanel as sendToClaudePanel } from './claude-panel-lazy.js';
|
|
20
20
|
import { attachPathToOpencode } from './ui-opencode-panel-v2.js';
|
|
21
21
|
import { attachPathToAntigravity, isAntigravityPanelOpen, toggleAntigravityPanel } from './ui-antigravity-panel.js';
|
|
22
|
-
import { isCodexPanelOpen, toggleCodexPanel } from './
|
|
23
|
-
import { addPathChip as addCodexPathChip } from './cdx/cdx-tabs.js';
|
|
22
|
+
import { isCodexPanelOpen, toggleCodexPanel, addPathChip as addCodexPathChip } from './ui-codex-panel.js';
|
|
24
23
|
import { on, emit, state } from './state.js';
|
|
25
24
|
import {
|
|
26
25
|
closeEditorPanel, initEditorPanel, isEditorPanelOpen,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// ═══════════════════════════════════════════
|
|
4
4
|
|
|
5
5
|
import { emit, on } from './state.js';
|
|
6
|
-
import { loadIfaceConfig, applyIfaceConfig, saveIfaceConfig } from './
|
|
6
|
+
import { loadIfaceConfig, applyIfaceConfig, saveIfaceConfig } from './iface-config.js';
|
|
7
7
|
import { storage } from './storage.js';
|
|
8
8
|
import { KEYS } from './constants.js';
|
|
9
9
|
|
|
@@ -128,7 +128,18 @@ export function showLoadingError(title, sub, canStart, serverOffline) {
|
|
|
128
128
|
*/
|
|
129
129
|
export function hideLoading(delay = 400) {
|
|
130
130
|
const $overlay = $('loading-overlay');
|
|
131
|
-
if ($overlay) setTimeout(() => concealOverlay($overlay), delay);
|
|
131
|
+
if ($overlay) setTimeout(() => { markOnce(OVERLAY_HIDDEN_MARK); concealOverlay($overlay); }, delay);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/** The moment the overlay started to fade for the first time on this page (the time the user waited). */
|
|
135
|
+
export const OVERLAY_HIDDEN_MARK = 'synabun:overlay-hidden';
|
|
136
|
+
|
|
137
|
+
function markOnce(name) {
|
|
138
|
+
try {
|
|
139
|
+
if (typeof performance?.mark !== 'function') return;
|
|
140
|
+
if (performance.getEntriesByName?.(name, 'mark')?.length) return;
|
|
141
|
+
performance.mark(name);
|
|
142
|
+
} catch {}
|
|
132
143
|
}
|
|
133
144
|
|
|
134
145
|
/**
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
// ═══════════════════════════════════════════
|
|
2
|
-
// SynaBun — Maritaca Panel (
|
|
2
|
+
// SynaBun — Maritaca Panel (facade)
|
|
3
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
|
|
4
|
+
// session windows). Implementation lives in ./mtc/, loaded on first use or in idle time after the page is shown
|
|
5
|
+
// (sidepanel-lazy.js). A panel that has not loaded is not open.
|
|
5
6
|
// ═══════════════════════════════════════════
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
import { maritacaPanelModule as panel } from './sidepanel-lazy.js';
|
|
9
|
+
|
|
10
|
+
export const toggleMaritacaPanel = panel.asyncExport('toggleMaritacaPanel');
|
|
11
|
+
export const isMaritacaPanelOpen = panel.syncExport('isMaritacaPanelOpen', false);
|
|
12
|
+
export const bootMaritacaPanel = panel.deferredExport('bootMaritacaPanel');
|
|
13
|
+
export const openMaritacaWithPrompt = panel.asyncExport('openMaritacaWithPrompt');
|
|
14
|
+
export const maritacaPanelDefaults = panel.syncExport('maritacaPanelDefaults', () => ({ project: '' }));
|
|
15
|
+
export const endHostedMaritacaSessions = panel.syncExport('endHostedMaritacaSessions', undefined);
|
|
16
|
+
export const maritacaPanelDebug = panel.syncExport('maritacaPanelDebug', null);
|
|
@@ -140,6 +140,7 @@ export function initMenubar() {
|
|
|
140
140
|
wireViewMenu();
|
|
141
141
|
wireGraphMenu();
|
|
142
142
|
wireSkillsMenu();
|
|
143
|
+
wireAgentsMenu();
|
|
143
144
|
wireAutomationsMenu();
|
|
144
145
|
wireSchedulesButton();
|
|
145
146
|
wireTerminalMenu();
|
|
@@ -520,6 +521,28 @@ function wireSkillsMenu() {
|
|
|
520
521
|
registerAction('open-skills', () => emit('skills:open'));
|
|
521
522
|
}
|
|
522
523
|
|
|
524
|
+
// ── Agents Menu (agents-p5: Agents Studio, ui-agents.js answers agents:open) ──
|
|
525
|
+
|
|
526
|
+
function wireAgentsMenu() {
|
|
527
|
+
const items = {
|
|
528
|
+
'menu-open-agents-studio': () => emit('agents:open'),
|
|
529
|
+
'menu-agents-new': () => emit('agents:open', { view: 'create' }),
|
|
530
|
+
'menu-agents-review': () => emit('agents:open', { view: 'review' }),
|
|
531
|
+
'menu-agents-teams': () => emit('agents:open', { view: 'teams' }),
|
|
532
|
+
};
|
|
533
|
+
for (const [id, run] of Object.entries(items)) {
|
|
534
|
+
const item = $(id);
|
|
535
|
+
if (!item) continue;
|
|
536
|
+
item.addEventListener('click', () => {
|
|
537
|
+
closeAll();
|
|
538
|
+
run();
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
// Keyboard shortcut: open Agents Studio (via central keybinds)
|
|
543
|
+
registerAction('open-agents', () => emit('agents:open'));
|
|
544
|
+
}
|
|
545
|
+
|
|
523
546
|
// ── Automations Menu ──
|
|
524
547
|
|
|
525
548
|
function wireAutomationsMenu() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { on } from './state.js';
|
|
2
|
-
import { attachClaudeAutomation, detachClaudeAutomation, handleClaudeAutomationEvent } from './
|
|
2
|
+
import { attachClaudeAutomation, detachClaudeAutomation, handleClaudeAutomationEvent } from './claude-panel-lazy.js';
|
|
3
3
|
import { attachCodexAutomation, detachCodexAutomation, handleCodexAutomationEvent } from './ui-codex-panel.js';
|
|
4
4
|
import { attachOpenCodeAutomation, detachOpenCodeAutomation } from './ui-opencode-panel-v2.js';
|
|
5
5
|
import { attachAntigravityAutomation, detachAntigravityAutomation, handleAntigravityAutomationEvent } from './ui-antigravity-panel.js';
|
|
@@ -9,10 +9,10 @@ import { state, emit, on } from './state.js';
|
|
|
9
9
|
import { KEYS } from './constants.js';
|
|
10
10
|
import { storage } from './storage.js';
|
|
11
11
|
import { t } from './i18n.js';
|
|
12
|
-
import { loadIfaceConfig, saveIfaceConfig, applyIfaceConfig } from './
|
|
12
|
+
import { loadIfaceConfig, saveIfaceConfig, applyIfaceConfig } from './iface-config.js';
|
|
13
13
|
import { registerAction } from './ui-keybinds.js';
|
|
14
14
|
import { startTutorial } from './ui-tutorial.js';
|
|
15
|
-
import { toggleClaudePanel, isClaudePanelOpen } from './
|
|
15
|
+
import { toggleClaudePanel, isClaudePanelOpen } from './claude-panel-lazy.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';
|
|
@@ -30,6 +30,8 @@ import { initOwnerAccessNotice } from './ui-owner-access.js';
|
|
|
30
30
|
import { initSidepanelTrayPlaceholders } from './ui-sidepanel-tray.js';
|
|
31
31
|
import { initDesktopTitleBar } from './desktop-titlebar.js';
|
|
32
32
|
import { initToprightOverflow } from './ui-topright-overflow.js';
|
|
33
|
+
import { initTrayAutoClose } from './tray-auto-close.js';
|
|
34
|
+
import { initTrayColumns } from './ui-tray-columns.js';
|
|
33
35
|
|
|
34
36
|
const $ = (id) => document.getElementById(id);
|
|
35
37
|
|
|
@@ -164,7 +166,7 @@ export function initNavbar() {
|
|
|
164
166
|
}
|
|
165
167
|
|
|
166
168
|
// ── Settings ──
|
|
167
|
-
// Note: Settings button click is handled by initSettings() in ui-settings.js.
|
|
169
|
+
// Note: Settings button click is handled by initSettings() in ui-settings-entry.js (re-exported by ui-settings.js).
|
|
168
170
|
// Do NOT add a click handler here — it would cause duplicate openSettingsModal() calls.
|
|
169
171
|
|
|
170
172
|
// ── Trash ──
|
|
@@ -392,14 +394,18 @@ export function initNavbar() {
|
|
|
392
394
|
// ── One row, always: what does not fit the band goes into the ⋯ menu ──
|
|
393
395
|
initToprightOverflow();
|
|
394
396
|
|
|
395
|
-
//
|
|
396
|
-
// Laid out in a row, a pill keeps its width on hover (styles.css): widening, it would push the others onto another
|
|
397
|
-
// line under the pointer. A name cut short is read from the tooltip instead; a pill that brings a tooltip of its own
|
|
398
|
-
// (the Assistant's) keeps it.
|
|
397
|
+
// A pill keeps its width on hover. The tooltip shows its full name unless the producer supplies its own.
|
|
399
398
|
const tray = $('term-minimized-tray');
|
|
400
|
-
if (controls && tray
|
|
401
|
-
|
|
399
|
+
if (controls && tray?.parentElement === controls) {
|
|
400
|
+
initTrayColumns(tray, storage);
|
|
401
|
+
initTrayAutoClose(tray, $('topright-auto-close-btn'), storage, t);
|
|
402
|
+
const nameTips = (records) => {
|
|
403
|
+
if (records && !records.some(({ target }) => {
|
|
404
|
+
const element = target.nodeType === 1 ? target : target.parentElement;
|
|
405
|
+
return element && !element.closest('.tray-col-head');
|
|
406
|
+
})) return;
|
|
402
407
|
for (const pill of tray.children) {
|
|
408
|
+
if (pill.classList.contains('tray-col-head')) continue;
|
|
403
409
|
const name = pill.querySelector('.term-minimized-pill-label')?.textContent.trim() || '';
|
|
404
410
|
if (pill.hasAttribute('data-tooltip') && pill.dataset.tooltip !== pill.dataset.nameTip) {
|
|
405
411
|
delete pill.dataset.nameTip;
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
// ═══════════════════════════════════════════
|
|
2
|
-
// SynaBun — OpenCode V2 Panel (
|
|
2
|
+
// SynaBun — OpenCode V2 Panel (facade)
|
|
3
3
|
// The OpenCode panel's entry point: one stable surface (toggleOpencodePanel /
|
|
4
4
|
// isOpencodePanelOpen / openOpencodeWithPrompt / attachPathToOpencode and the
|
|
5
5
|
// automation attach pair) for the shared UI modules to bind to.
|
|
6
|
-
// Implementation lives in ./ocp-v2
|
|
6
|
+
// Implementation lives in ./ocp-v2/, loaded on first use or in idle time after
|
|
7
|
+
// the page is shown (sidepanel-lazy.js; its module-level `opencode-panel:*`
|
|
8
|
+
// listeners are kept working before that). The earlier panel (./ocp/ and its
|
|
7
9
|
// ./ui-opencode-panel.js barrel) was removed on 2026-10-04.
|
|
8
10
|
// ═══════════════════════════════════════════
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
import { opencodePanelModule as panel } from './sidepanel-lazy.js';
|
|
13
|
+
|
|
14
|
+
export const toggleOpencodePanel = panel.asyncExport('toggleOpencodePanel');
|
|
15
|
+
export const isOpencodePanelOpen = panel.syncExport('isOpencodePanelOpen', false);
|
|
16
|
+
export const bootOpencodePanel = panel.asyncExport('bootOpencodePanel');
|
|
17
|
+
export const openOpencodeWithPrompt = panel.asyncExport('openOpencodeWithPrompt');
|
|
18
|
+
export const attachPathToOpencode = panel.asyncExport('attachPathToOpencode');
|
|
19
|
+
export const attachOpenCodeAutomation = panel.asyncExport('attachOpenCodeAutomation');
|
|
20
|
+
export const detachOpenCodeAutomation = panel.asyncExport('detachOpenCodeAutomation');
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
// ═══════════════════════════════════════════
|
|
2
|
+
// SynaBun Neural Interface — the Verify OpenCode row of Settings
|
|
3
|
+
// ═══════════════════════════════════════════
|
|
4
|
+
//
|
|
5
|
+
// The page side of opencode-verify-view.js: the row of Settings → AI connections → Executable paths that shows each
|
|
6
|
+
// OpenCode serve SynaBun runs and the result of its runtime authentication check, with Verify again. It asks
|
|
7
|
+
// GET /api/cli/opencode-serves, follows a check under way (a few times a second, until the row has left the page),
|
|
8
|
+
// and posts Verify again with the guards of SynaBun's other local routes (a JSON body, X-SynaBun-UI). A server that
|
|
9
|
+
// has no such route (an older one) leaves the row hidden. It reuses the Executable paths rows' own classes.
|
|
10
|
+
|
|
11
|
+
import { opencodeVerifyText, opencodeVerifyView } from './opencode-verify-view.js';
|
|
12
|
+
|
|
13
|
+
const POST = Object.freeze({ method: 'POST', headers: { 'Content-Type': 'application/json', 'X-SynaBun-UI': '1' }, body: '{}' });
|
|
14
|
+
|
|
15
|
+
const ICON = '<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 2 4 5v6c0 5 3.4 9.4 8 11 4.6-1.6 8-6 8-11V5l-8-3zm-1.2 14.2-3.5-3.5 1.4-1.4 2.1 2.1 4.9-4.9 1.4 1.4-6.3 6.3z"/></svg>';
|
|
16
|
+
|
|
17
|
+
const escapeHtml = (value) => String(value ?? '').replace(/[&<>"']/g, (char) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[char]));
|
|
18
|
+
|
|
19
|
+
/** The row's markup: hidden until the server answers. */
|
|
20
|
+
export function opencodeVerifyRowHtml() {
|
|
21
|
+
return `
|
|
22
|
+
<div class="cli-path-row" id="cli-opencode-verify" data-opencode-verify hidden>
|
|
23
|
+
<div class="cli-path-icon" style="color:var(--t-secondary)">${ICON}</div>
|
|
24
|
+
<div class="cli-path-field">
|
|
25
|
+
<span class="cli-path-label" id="cli-opencode-verify-label">${escapeHtml(opencodeVerifyText('label'))}</span>
|
|
26
|
+
<div class="cli-path-input-row">
|
|
27
|
+
<span class="stg-help" data-opencode-verify-line role="status" aria-live="polite" aria-labelledby="cli-opencode-verify-label" style="flex:1;min-width:0;margin:0"></span>
|
|
28
|
+
<button type="button" class="cli-detect-btn" data-opencode-verify-run>${escapeHtml(opencodeVerifyText('verify'))}</button>
|
|
29
|
+
<span class="cli-path-status" data-opencode-verify-badge></span>
|
|
30
|
+
</div>
|
|
31
|
+
<div data-opencode-verify-serves></div>
|
|
32
|
+
<div class="stg-help" data-opencode-verify-exe hidden></div>
|
|
33
|
+
<div class="stg-help" data-opencode-verify-fix hidden>${escapeHtml(opencodeVerifyText('fix'))}</div>
|
|
34
|
+
<div class="stg-help" data-opencode-verify-fix-foreign hidden>${escapeHtml(opencodeVerifyText('fixForeign'))}</div>
|
|
35
|
+
<div class="stg-help">${escapeHtml(opencodeVerifyText('help'))}</div>
|
|
36
|
+
</div>
|
|
37
|
+
</div>`;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Fill the row and keep it current. `fetchImpl`, `schedule` and `cancel` are the page's own unless a test gives
|
|
42
|
+
* others. Returns `{ refresh, stop }`.
|
|
43
|
+
*/
|
|
44
|
+
export function wireOpencodeVerifyRow(row, { fetchImpl = (...args) => fetch(...args), pollMs = 1000, schedule = (fn, ms) => setTimeout(fn, ms), cancel = (id) => clearTimeout(id) } = {}) {
|
|
45
|
+
if (!row) return { refresh: async () => null, stop: () => {} };
|
|
46
|
+
const badge = row.querySelector('[data-opencode-verify-badge]');
|
|
47
|
+
const line = row.querySelector('[data-opencode-verify-line]');
|
|
48
|
+
const list = row.querySelector('[data-opencode-verify-serves]');
|
|
49
|
+
const exe = row.querySelector('[data-opencode-verify-exe]');
|
|
50
|
+
const fix = row.querySelector('[data-opencode-verify-fix]');
|
|
51
|
+
const fixForeign = row.querySelector('[data-opencode-verify-fix-foreign]');
|
|
52
|
+
const run = row.querySelector('[data-opencode-verify-run]');
|
|
53
|
+
let timer = null;
|
|
54
|
+
let stopped = false;
|
|
55
|
+
|
|
56
|
+
const clearPoll = () => { if (timer !== null) { cancel(timer); timer = null; } };
|
|
57
|
+
const stop = () => { stopped = true; clearPoll(); };
|
|
58
|
+
|
|
59
|
+
function draw(status) {
|
|
60
|
+
const view = opencodeVerifyView(status);
|
|
61
|
+
row.hidden = !view.visible;
|
|
62
|
+
clearPoll();
|
|
63
|
+
if (!view.visible) return view;
|
|
64
|
+
if (badge) {
|
|
65
|
+
badge.textContent = view.badge?.text || '';
|
|
66
|
+
badge.className = `cli-path-status${view.badge?.tone ? ` ${view.badge.tone}` : ''}`;
|
|
67
|
+
}
|
|
68
|
+
if (line) line.textContent = view.line;
|
|
69
|
+
if (list) {
|
|
70
|
+
// One block per serve: its state in words and by the block's edge colour (data-state), the file it runs, its checks.
|
|
71
|
+
list.innerHTML = view.serves.map((serve) => `
|
|
72
|
+
<div class="opencode-verify-serve" data-state="${serve.tone}" data-own="${serve.own ? '1' : '0'}">
|
|
73
|
+
<div class="stg-help opencode-verify-serve-line">${escapeHtml(serve.text)}</div>${serve.path ? `
|
|
74
|
+
<div class="stg-help opencode-verify-path">${escapeHtml(serve.path)}</div>` : ''}${serve.checks.length ? `
|
|
75
|
+
<div class="stg-help">${serve.checks.map(escapeHtml).join(' · ')}</div>` : ''}
|
|
76
|
+
</div>`).join('');
|
|
77
|
+
}
|
|
78
|
+
if (exe) { exe.textContent = view.executable || ''; exe.hidden = !view.executable; }
|
|
79
|
+
if (fix) fix.hidden = !view.fix;
|
|
80
|
+
if (fixForeign) fixForeign.hidden = !view.fixForeign;
|
|
81
|
+
if (run) { run.disabled = false; run.textContent = opencodeVerifyText('verify'); }
|
|
82
|
+
if (view.busy && !stopped) {
|
|
83
|
+
timer = schedule(() => {
|
|
84
|
+
timer = null;
|
|
85
|
+
if (row.isConnected === false) { stop(); return; }
|
|
86
|
+
refresh();
|
|
87
|
+
}, pollMs);
|
|
88
|
+
}
|
|
89
|
+
return view;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
async function ask(path, init) {
|
|
93
|
+
const res = await fetchImpl(path, init);
|
|
94
|
+
let body = null;
|
|
95
|
+
try { body = await res.json(); } catch { body = null; }
|
|
96
|
+
if (!res.ok || !body || body.ok !== true) throw new Error(body?.error || body?.code || `HTTP ${res.status}`);
|
|
97
|
+
return body;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
async function refresh() {
|
|
101
|
+
try { return draw(await ask('/api/cli/opencode-serves')); } catch {
|
|
102
|
+
// An older server, or none: there is no row to show.
|
|
103
|
+
row.hidden = true;
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
run?.addEventListener('click', async () => {
|
|
109
|
+
run.disabled = true;
|
|
110
|
+
run.textContent = opencodeVerifyText('checking');
|
|
111
|
+
try { draw(await ask('/api/cli/opencode-serves/verify', POST)); } catch (error) {
|
|
112
|
+
if (line) line.textContent = opencodeVerifyText('errorRequest', { message: error?.message || String(error) });
|
|
113
|
+
run.disabled = false;
|
|
114
|
+
run.textContent = opencodeVerifyText('verify');
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
refresh();
|
|
119
|
+
return { refresh, stop };
|
|
120
|
+
}
|