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
|
@@ -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';
|
|
@@ -29,6 +29,8 @@ const _providerEventBuffers = new Map();
|
|
|
29
29
|
const _localReleases = new LocalReleaseTracker();
|
|
30
30
|
let _initialized = false;
|
|
31
31
|
let _claimHeartbeat = null;
|
|
32
|
+
let _renewing = false;
|
|
33
|
+
let _retryClaimsAt = 0;
|
|
32
34
|
let _suspended = false;
|
|
33
35
|
let _suspendedClaims = new Map();
|
|
34
36
|
let _reconcilePromise = null;
|
|
@@ -118,6 +120,7 @@ function trimLatestRuns() {
|
|
|
118
120
|
}
|
|
119
121
|
|
|
120
122
|
async function claim(run) {
|
|
123
|
+
if (Date.now() < _retryClaimsAt) return false;
|
|
121
124
|
const claimToken = _claimToken;
|
|
122
125
|
const claimEpoch = _claimEpoch;
|
|
123
126
|
try {
|
|
@@ -126,7 +129,10 @@ async function claim(run) {
|
|
|
126
129
|
headers: { 'Content-Type': 'application/json' },
|
|
127
130
|
body: JSON.stringify({ windowId: _windowId, claimToken }),
|
|
128
131
|
});
|
|
129
|
-
if (!response.ok)
|
|
132
|
+
if (!response.ok) {
|
|
133
|
+
if (response.status === 503) _retryClaimsAt = Date.now() + 2000;
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
130
136
|
if (_suspended || claimEpoch !== _claimEpoch || claimToken !== _claimToken) {
|
|
131
137
|
fetch(`/api/sidepanel-runs/${encodeURIComponent(run.runId)}/release`, {
|
|
132
138
|
method: 'POST',
|
|
@@ -138,7 +144,7 @@ async function claim(run) {
|
|
|
138
144
|
}
|
|
139
145
|
const data = await response.json();
|
|
140
146
|
const claimedRun = data?.run || run;
|
|
141
|
-
_ownedClaims.set(run.runId, { provider: run.provider, status: claimedRun.status });
|
|
147
|
+
_ownedClaims.set(run.runId, { provider: run.provider, status: claimedRun.status, renewedAt: Date.now() });
|
|
142
148
|
recordLatestRun(claimedRun);
|
|
143
149
|
return claimedRun;
|
|
144
150
|
} catch {
|
|
@@ -272,6 +278,7 @@ async function routeLatest(runId) {
|
|
|
272
278
|
return false;
|
|
273
279
|
}
|
|
274
280
|
if (result?.ok) {
|
|
281
|
+
if (owned) owned.attachedVersion = run.version;
|
|
275
282
|
_attached.set(run.runId, {
|
|
276
283
|
provider: run.provider,
|
|
277
284
|
iteration: run.currentIteration,
|
|
@@ -359,18 +366,26 @@ async function reconcileRuns() {
|
|
|
359
366
|
if (!response.ok) return;
|
|
360
367
|
const data = await response.json();
|
|
361
368
|
const cutoff = Date.now() - 24 * 60 * 60 * 1000;
|
|
369
|
+
// Older servers moved updatedAt on a claim or release. A renewed lease
|
|
370
|
+
// does not make a finished conversation recent again.
|
|
371
|
+
const activityAt = (run) => run.completedAt || run.updatedAt || run.startedAt || '';
|
|
362
372
|
const newestFirst = (data.runs || [])
|
|
363
373
|
.filter(hasIdentity)
|
|
364
|
-
.sort((a, b) =>
|
|
374
|
+
.sort((a, b) => activityAt(b).localeCompare(activityAt(a)));
|
|
365
375
|
const activeRuns = newestFirst.filter((run) => LIVE_STATUSES.has(run.status));
|
|
366
376
|
const terminalRuns = newestFirst.filter((run) => {
|
|
367
377
|
if (!TERMINAL_STATUSES.has(run.status)) return false;
|
|
368
|
-
if (
|
|
378
|
+
if (!(Date.parse(activityAt(run)) >= cutoff)) return false;
|
|
369
379
|
const claimAge = run.claimedAt ? Date.now() - new Date(run.claimedAt).getTime() : Infinity;
|
|
370
380
|
return !run.claimedBy || run.claimedBy === _windowId || claimAge > CLAIM_TTL_MS;
|
|
371
381
|
}).slice(0, TERMINAL_RESTORE_LIMIT);
|
|
372
|
-
|
|
373
|
-
|
|
382
|
+
const restore = async (run) => {
|
|
383
|
+
const owned = _ownedClaims.get(run.runId);
|
|
384
|
+
if (run.claimedBy === _windowId && owned && Number.isFinite(run.version) && owned.attachedVersion === run.version) return;
|
|
385
|
+
await routeNativeLoopRun(run, { focus: false, retry: true });
|
|
386
|
+
};
|
|
387
|
+
for (const run of activeRuns) await restore(run);
|
|
388
|
+
for (const run of terminalRuns) await restore(run);
|
|
374
389
|
} catch {}
|
|
375
390
|
}
|
|
376
391
|
|
|
@@ -388,7 +403,7 @@ export function initNativeLoopRouter() {
|
|
|
388
403
|
on('sync:sidepanel:run-created', route);
|
|
389
404
|
on('sync:sidepanel:run-updated', (message) => {
|
|
390
405
|
const run = descriptorFrom(message);
|
|
391
|
-
if (message?.reason === 'claim-released' && run?.runId && _localReleases.consume(run.runId)) {
|
|
406
|
+
if (message?.reason === 'claim-released' && run?.runId && (_localReleases.consume(run.runId) || TERMINAL_STATUSES.has(run.status))) {
|
|
392
407
|
recordLatestRun(run);
|
|
393
408
|
return;
|
|
394
409
|
}
|
|
@@ -500,19 +515,33 @@ export function initNativeLoopRouter() {
|
|
|
500
515
|
|
|
501
516
|
function startClaimHeartbeat() {
|
|
502
517
|
if (_claimHeartbeat) return;
|
|
503
|
-
_claimHeartbeat = setInterval(() => {
|
|
504
|
-
if (_suspended) return;
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
518
|
+
_claimHeartbeat = setInterval(async () => {
|
|
519
|
+
if (_suspended || _renewing) return;
|
|
520
|
+
_renewing = true;
|
|
521
|
+
const epoch = _claimEpoch;
|
|
522
|
+
try {
|
|
523
|
+
for (const [runId, owned] of [..._ownedClaims]) {
|
|
524
|
+
if (_suspended || epoch !== _claimEpoch) return;
|
|
525
|
+
if (_ownedClaims.get(runId) !== owned) continue;
|
|
526
|
+
let response;
|
|
527
|
+
if (Date.now() >= _retryClaimsAt) {
|
|
528
|
+
try {
|
|
529
|
+
response = await fetch(`/api/sidepanel-runs/${encodeURIComponent(runId)}/claim`, {
|
|
530
|
+
method: 'POST',
|
|
531
|
+
headers: { 'Content-Type': 'application/json' },
|
|
532
|
+
body: JSON.stringify({ windowId: _windowId, claimToken: _claimToken }),
|
|
533
|
+
signal: AbortSignal.timeout(8000),
|
|
534
|
+
});
|
|
535
|
+
} catch { /* retry at the next heartbeat while the lease is valid */ }
|
|
536
|
+
if (_ownedClaims.get(runId) !== owned || epoch !== _claimEpoch) continue;
|
|
537
|
+
if (!response || response.status === 503) _retryClaimsAt = Date.now() + 2000;
|
|
513
538
|
}
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
539
|
+
if (response?.ok) owned.renewedAt = Date.now();
|
|
540
|
+
else if ((response && response.status !== 503) || Date.now() - owned.renewedAt >= CLAIM_TTL_MS) {
|
|
541
|
+
await loseClaim(runId, owned.provider);
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
if (_claimEpoch === epoch && Date.now() >= _retryClaimsAt) scheduleReconcile();
|
|
545
|
+
} finally { _renewing = false; }
|
|
517
546
|
}, 30_000);
|
|
518
547
|
}
|
|
@@ -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');
|
|
@@ -5,12 +5,9 @@
|
|
|
5
5
|
// When the server cannot identify the program calling it (macOS, lib/peer-identity.js: netstat or ps missing,
|
|
6
6
|
// denied, slow past their cap), it pauses the owner's actions (503 PEER_UNAVAILABLE). This banner says so, with the
|
|
7
7
|
// reason and Reload to retry, in the update toast's glass at the top centre of the page (styles.css .owner-authority-notice):
|
|
8
|
-
// non-modal, nothing behind it is blocked.
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
// • a request of the page got 503 PEER_UNAVAILABLE (public/shared/page-session.js dispatches
|
|
12
|
-
// `synabun:peer-unavailable` on the window).
|
|
13
|
-
// While it shows, /api/health is asked again now and then, and the banner goes once the state is ok again (the
|
|
8
|
+
// non-modal, nothing behind it is blocked. Only GET /api/health can report a degraded verifier. The page checks
|
|
9
|
+
// at startup, on sync reconnect and when any request gets 503 PEER_UNAVAILABLE (including socket-specific failures).
|
|
10
|
+
// While verification is pending or the banner shows, the page rechecks health. The banner goes on recovery (the
|
|
14
11
|
// page's next write then gets this boot's page secret by itself). Dismiss hides it until another reason comes. Never
|
|
15
12
|
// on an invite guest's page (the owner's authority is not a guest's concern). What it says is
|
|
16
13
|
// owner-authority-view.js (DOM-free, tested under node).
|
|
@@ -19,11 +16,11 @@ import { on } from './state.js';
|
|
|
19
16
|
import { t } from './i18n.js';
|
|
20
17
|
import { isGuest } from './ui-sync.js';
|
|
21
18
|
import { PEER_UNAVAILABLE_EVENT } from './page-session.js';
|
|
22
|
-
import { ownerAuthorityNoticeView, readOwnerAuthority
|
|
19
|
+
import { ownerAuthorityNoticeView, readOwnerAuthority } from './owner-authority-view.js';
|
|
23
20
|
|
|
24
21
|
const HEALTH_URL = '/api/health';
|
|
25
22
|
const NOTICE_ID = 'owner-authority-notice';
|
|
26
|
-
/** How often
|
|
23
|
+
/** How often to check pending verification or a visible outage. */
|
|
27
24
|
export const RECHECK_MS = 15_000;
|
|
28
25
|
|
|
29
26
|
const translate = (key, params) => t(`ownerAuthorityNotice.${key}`, params);
|
|
@@ -31,6 +28,8 @@ const translate = (key, params) => t(`ownerAuthorityNotice.${key}`, params);
|
|
|
31
28
|
let _wired = false;
|
|
32
29
|
let _guest = false;
|
|
33
30
|
let _asking = null;
|
|
31
|
+
let _checkAgain = false;
|
|
32
|
+
let _loadingWatch = null;
|
|
34
33
|
let _current = null; // { key, el }
|
|
35
34
|
let _dismissed = null; // the key this page dismissed
|
|
36
35
|
let _recheck = null;
|
|
@@ -52,6 +51,8 @@ function startRecheck() {
|
|
|
52
51
|
|
|
53
52
|
function hide() {
|
|
54
53
|
stopRecheck();
|
|
54
|
+
_loadingWatch?.disconnect();
|
|
55
|
+
_loadingWatch = null;
|
|
55
56
|
const current = _current;
|
|
56
57
|
_current = null;
|
|
57
58
|
if (!current) return;
|
|
@@ -66,9 +67,11 @@ function whenPageShown(run) {
|
|
|
66
67
|
const watch = new MutationObserver(() => {
|
|
67
68
|
if (!overlay.classList.contains('hidden')) return;
|
|
68
69
|
watch.disconnect();
|
|
70
|
+
_loadingWatch = null;
|
|
69
71
|
run();
|
|
70
72
|
});
|
|
71
73
|
watch.observe(overlay, { attributes: true, attributeFilter: ['class'] });
|
|
74
|
+
_loadingWatch = watch;
|
|
72
75
|
}
|
|
73
76
|
|
|
74
77
|
function draw(view) {
|
|
@@ -98,9 +101,8 @@ function draw(view) {
|
|
|
98
101
|
});
|
|
99
102
|
});
|
|
100
103
|
document.body.appendChild(el);
|
|
101
|
-
requestAnimationFrame(() => el.classList.add('show'));
|
|
102
104
|
_current = { key: view.key, el };
|
|
103
|
-
|
|
105
|
+
requestAnimationFrame(() => { if (_current?.el === el) el.classList.add('show'); });
|
|
104
106
|
}
|
|
105
107
|
|
|
106
108
|
/** Reload to retry: the page asks for everything again, the page secret included (a lookup that works hands it out). */
|
|
@@ -116,10 +118,18 @@ function dismiss(key) {
|
|
|
116
118
|
/** Show the banner for this owner authority (or none): never on a guest's page, never one this page dismissed. */
|
|
117
119
|
export function presentOwnerAuthority(authority) {
|
|
118
120
|
const view = ownerAuthorityNoticeView(authority, { t: translate });
|
|
119
|
-
if (!view || guestPage()) {
|
|
121
|
+
if (!view || guestPage()) {
|
|
122
|
+
hide();
|
|
123
|
+
if (!view) _dismissed = null;
|
|
124
|
+
if (authority?.state === 'pending' && !guestPage()) startRecheck();
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
120
127
|
// A banner something else took off the page is drawn again.
|
|
121
128
|
if (_current && !_current.el.isConnected) _current = null;
|
|
122
|
-
if (_dismissed === view.key) return null;
|
|
129
|
+
if (_dismissed === view.key) { hide(); return null; }
|
|
130
|
+
_loadingWatch?.disconnect();
|
|
131
|
+
_loadingWatch = null;
|
|
132
|
+
startRecheck();
|
|
123
133
|
if (_current?.key === view.key) return view;
|
|
124
134
|
whenPageShown(() => {
|
|
125
135
|
if (guestPage() || _dismissed === view.key || _current?.key === view.key) return;
|
|
@@ -129,19 +139,30 @@ export function presentOwnerAuthority(authority) {
|
|
|
129
139
|
}
|
|
130
140
|
|
|
131
141
|
/** Ask GET /api/health; an older server (no `ownerAuthority`) or a failed request changes nothing. */
|
|
132
|
-
export function checkOwnerAuthority() {
|
|
142
|
+
export function checkOwnerAuthority({ fresh = false } = {}) {
|
|
133
143
|
if (guestPage()) return Promise.resolve(null);
|
|
134
|
-
if (_asking)
|
|
144
|
+
if (_asking) {
|
|
145
|
+
if (fresh) _checkAgain = true;
|
|
146
|
+
return _asking;
|
|
147
|
+
}
|
|
135
148
|
_asking = (async () => {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
149
|
+
let authority;
|
|
150
|
+
let previousState;
|
|
151
|
+
do {
|
|
152
|
+
_checkAgain = false;
|
|
153
|
+
authority = null;
|
|
154
|
+
try {
|
|
155
|
+
const res = await fetch(HEALTH_URL, { headers: { Accept: 'application/json' }, cache: 'no-store' });
|
|
156
|
+
if (res.ok) authority = readOwnerAuthority(await res.json());
|
|
157
|
+
} catch { /* keep the last confirmed state */ }
|
|
158
|
+
// A refusal or reconnect during this read merits a fresh sample. Two matching
|
|
159
|
+
// samples can already be shown, even if refusals arrive faster than health replies.
|
|
160
|
+
if (authority && !guestPage() && (!_checkAgain || authority.state === previousState)) {
|
|
161
|
+
presentOwnerAuthority(authority);
|
|
162
|
+
}
|
|
163
|
+
previousState = authority?.state;
|
|
164
|
+
} while (_checkAgain && !guestPage());
|
|
165
|
+
return authority;
|
|
145
166
|
})().finally(() => { _asking = null; });
|
|
146
167
|
return _asking;
|
|
147
168
|
}
|
|
@@ -153,10 +174,12 @@ export function initOwnerAuthorityNotice() {
|
|
|
153
174
|
on('session:info', (info) => {
|
|
154
175
|
_guest = !!info?.isGuest;
|
|
155
176
|
if (_guest) hide();
|
|
156
|
-
else checkOwnerAuthority();
|
|
177
|
+
else checkOwnerAuthority({ fresh: true });
|
|
157
178
|
});
|
|
158
179
|
if (typeof window !== 'undefined' && typeof window.addEventListener === 'function') {
|
|
159
|
-
window.addEventListener(PEER_UNAVAILABLE_EVENT, (event) => {
|
|
180
|
+
window.addEventListener(PEER_UNAVAILABLE_EVENT, (event) => {
|
|
181
|
+
if (event?.detail?.url !== HEALTH_URL) checkOwnerAuthority({ fresh: true });
|
|
182
|
+
});
|
|
160
183
|
}
|
|
161
184
|
checkOwnerAuthority();
|
|
162
185
|
}
|
|
@@ -12,7 +12,7 @@ import { t, tp, getLocale } from './i18n.js';
|
|
|
12
12
|
import { KEYS } from './constants.js';
|
|
13
13
|
import { isGuest, hasPermission, showGuestToast } from './ui-sync.js';
|
|
14
14
|
import { registerLaunchPrefetch } from './launch-prefetch.js';
|
|
15
|
-
import { sendToPanel } from './
|
|
15
|
+
import { sendToPanel } from './claude-panel-lazy.js';
|
|
16
16
|
import { openAntigravityWithPrompt } from './ui-antigravity-panel.js';
|
|
17
17
|
import { getProviderMeta } from './provider-icons.js';
|
|
18
18
|
import { fetchAutomationApprovals, openApprovalDialog } from './ui-automation-approval.js';
|
|
@@ -2241,7 +2241,7 @@ async function saveScheduleFromEditor() {
|
|
|
2241
2241
|
if (timezone !== shownZone) payload.timezone = timezone;
|
|
2242
2242
|
if (stableJson(dayThemes) !== stableJson(original.dayThemes || {})) payload.dayThemes = dayThemes;
|
|
2243
2243
|
for (const key of LAUNCH_FIELDS) if (!sameValue(launch[key], original[key])) payload[key] = launch[key];
|
|
2244
|
-
// The MoreLogin profile: sent when it changed (null goes back to the default
|
|
2244
|
+
// The MoreLogin profile: sent when it changed (null goes back to the default AI browser).
|
|
2245
2245
|
if (!sameValue(moreloginEnvId, original.moreloginEnvId)) {
|
|
2246
2246
|
payload.moreloginEnvId = moreloginEnvId;
|
|
2247
2247
|
payload.moreloginEnvName = moreloginEnvName;
|
|
@@ -3131,7 +3131,7 @@ async function createQuickTimerFromForm(runNow) {
|
|
|
3131
3131
|
const tools = strictToolHost(profile) ? readToolPicker($('sched-qt-mcp')) : null;
|
|
3132
3132
|
const codexAccountId = profile === 'codex' ? ($('sched-qt-account')?.value || _launchAccount || 'default') : undefined;
|
|
3133
3133
|
const usesBrowser = _qtUsesBrowser !== null ? _qtUsesBrowser : !!template?.usesBrowser;
|
|
3134
|
-
// The MoreLogin profile of this one run (none: the default
|
|
3134
|
+
// The MoreLogin profile of this one run (none: the default AI browser).
|
|
3135
3135
|
_qtMoreLogin = readMoreLoginField('sched-qt-mlprofile') || _qtMoreLogin;
|
|
3136
3136
|
const moreloginEnvId = _qtMoreLogin.moreloginEnvId || undefined;
|
|
3137
3137
|
const moreloginEnvName = moreloginEnvId ? (_qtMoreLogin.moreloginEnvName || undefined) : undefined;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
const DEFAULT_THRESHOLD_PX = 48;
|
|
2
|
+
// A side panel that is closed (ui-sidepanel-windows.js keeps data-sp-visible on every registered panel).
|
|
3
|
+
const HOST_VISIBLE_ATTR = 'data-sp-visible';
|
|
4
|
+
const CLOSED_HOST = `.sp-sidepanel[${HOST_VISIBLE_ATTR}="false"]`;
|
|
2
5
|
|
|
3
6
|
const controllers = new WeakMap();
|
|
4
7
|
|
|
@@ -59,10 +62,45 @@ export function createStickyScrollController(container, options = {}) {
|
|
|
59
62
|
lastScrollTop = container.scrollTop;
|
|
60
63
|
};
|
|
61
64
|
|
|
65
|
+
// A transcript inside a closed side panel is not drawn (ui-sidepanel-windows.js: data-sp-visible="false",
|
|
66
|
+
// content-visibility: hidden). Scrolling it reads its height, which makes the engine lay the whole hidden
|
|
67
|
+
// panel out: once per frame for as long as a session streams there. The follow is kept instead and the
|
|
68
|
+
// scroll is made when the panel is shown: the attribute changes inside the task that opens it, the
|
|
69
|
+
// observer answers right after that task and the frame that draws the panel is already at the bottom.
|
|
70
|
+
let waitingHost = null;
|
|
71
|
+
let hostObserver = null;
|
|
72
|
+
const stopWaitingForHost = () => {
|
|
73
|
+
try { hostObserver?.disconnect(); } catch { /* already gone */ }
|
|
74
|
+
hostObserver = null;
|
|
75
|
+
waitingHost = null;
|
|
76
|
+
};
|
|
77
|
+
const closedHost = () => (typeof container.closest === 'function' ? container.closest(CLOSED_HOST) : null);
|
|
78
|
+
const waitForHost = (host) => {
|
|
79
|
+
if (waitingHost === host) return true;
|
|
80
|
+
const HostObserver = view.MutationObserver || globalThis.MutationObserver;
|
|
81
|
+
if (typeof HostObserver !== 'function') return false;
|
|
82
|
+
stopWaitingForHost();
|
|
83
|
+
waitingHost = host;
|
|
84
|
+
hostObserver = new HostObserver(() => {
|
|
85
|
+
if (disposed) { stopWaitingForHost(); return; }
|
|
86
|
+
if (host.getAttribute(HOST_VISIBLE_ATTR) === 'false' && host.contains(container)) return;
|
|
87
|
+
stopWaitingForHost();
|
|
88
|
+
scrollToBottom();
|
|
89
|
+
});
|
|
90
|
+
hostObserver.observe(host, { attributes: true, attributeFilter: [HOST_VISIBLE_ATTR] });
|
|
91
|
+
return true;
|
|
92
|
+
};
|
|
93
|
+
|
|
62
94
|
const scrollToBottom = ({ force = false, immediate = false } = {}) => {
|
|
63
95
|
if (disposed) return false;
|
|
64
96
|
if (force) setFollowing(true);
|
|
65
97
|
if (!following || !active) return false;
|
|
98
|
+
const host = closedHost();
|
|
99
|
+
if (host && waitForHost(host)) {
|
|
100
|
+
cancelScheduled();
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
if (!host && waitingHost) stopWaitingForHost(); // moved out of the closed panel (a detached window)
|
|
66
104
|
if (immediate) {
|
|
67
105
|
cancelScheduled();
|
|
68
106
|
writeBottom();
|
|
@@ -185,6 +223,7 @@ export function createStickyScrollController(container, options = {}) {
|
|
|
185
223
|
if (disposed) return;
|
|
186
224
|
disposed = true;
|
|
187
225
|
cancelScheduled();
|
|
226
|
+
stopWaitingForHost();
|
|
188
227
|
resizeObserver?.disconnect();
|
|
189
228
|
observedChildren.clear();
|
|
190
229
|
mutationObserver?.disconnect();
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
import { emit, on } from './state.js';
|
|
12
12
|
import { getSynabunUpdateData, openSynabunUpdateModal, syncSynabunUpdateData, synabunUpdateMeta } from './ui-update.js';
|
|
13
13
|
import { getToolUpdateData, runToolUpdate, TOOL_LABELS } from './ui-tool-updates.js';
|
|
14
|
-
import { openSettingsModal } from './ui-settings.js';
|
|
14
|
+
import { openSettingsModal } from './ui-settings-entry.js';
|
|
15
15
|
import { getProviderMeta } from './provider-icons.js';
|
|
16
|
-
import { sendToPanel as sendToClaudePanel, isClaudePanelOpen } from './
|
|
17
|
-
import { toggleCodexPanel, isCodexPanelOpen } from './
|
|
16
|
+
import { sendToPanel as sendToClaudePanel, isClaudePanelOpen } from './claude-panel-lazy.js';
|
|
17
|
+
import { toggleCodexPanel, isCodexPanelOpen } from './ui-codex-panel.js';
|
|
18
18
|
import { openOpencodeWithPrompt } from './ui-opencode-panel-v2.js';
|
|
19
19
|
import { openAntigravityWithPrompt } from './ui-antigravity-panel.js';
|
|
20
20
|
import { dropdownHTML, wireDropdowns } from './cc-dropdown.js';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// SynaBun — the Settings window's entry: everything the page needs from Settings before it is opened.
|
|
2
|
+
//
|
|
3
|
+
// ui-settings.js, with what it imports, is about 2 MB of modules. The boot used to load it before the first frame;
|
|
4
|
+
// now the window loads on its first open, or in idle time after the page is shown (its search index is a launch
|
|
5
|
+
// step, launch-prefetch.js, which loads it), whichever comes first. What must work before that is wired here, as
|
|
6
|
+
// ui-settings.js's initSettings did: the three Settings buttons, the `open-settings` shortcut, reopening after a
|
|
7
|
+
// language change, the launch prefetches and the listeners that keep Settings' data current. The interface config
|
|
8
|
+
// and the skin are iface-config.js.
|
|
9
|
+
|
|
10
|
+
import { on } from './state.js';
|
|
11
|
+
import { registerAction } from './ui-keybinds.js';
|
|
12
|
+
import { registerLaunchPrefetch } from './launch-prefetch.js';
|
|
13
|
+
import { prefetchSettingsData, refreshSettingsData } from './settings/settings-data.js';
|
|
14
|
+
import { createLazyModule } from './lazy-module.js';
|
|
15
|
+
|
|
16
|
+
export const settingsModule = createLazyModule(() => import('./ui-settings.js'), { name: 'Settings' });
|
|
17
|
+
|
|
18
|
+
/** Open Settings (`{ tab, expand, scrollTo }`, ui-settings.js), loading the window first when it has not loaded. */
|
|
19
|
+
export const openSettingsModal = settingsModule.asyncExport('openSettingsModal');
|
|
20
|
+
|
|
21
|
+
/** ui-settings.js's SETTINGS_REOPEN_KEY: the page a language change asked Settings to reopen on. */
|
|
22
|
+
export const SETTINGS_REOPEN_KEY = 'synabun-settings-reopen';
|
|
23
|
+
|
|
24
|
+
function reopenWanted() {
|
|
25
|
+
try { return !!globalThis.sessionStorage?.getItem(SETTINGS_REOPEN_KEY); } catch { return false; }
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
let _initialized = false;
|
|
29
|
+
export function initSettings() {
|
|
30
|
+
if (_initialized) return;
|
|
31
|
+
_initialized = true;
|
|
32
|
+
const settingsBtn = document.getElementById('settings-btn');
|
|
33
|
+
if (settingsBtn) settingsBtn.addEventListener('click', () => openSettingsModal());
|
|
34
|
+
|
|
35
|
+
const titlebarBtn = document.getElementById('titlebar-settings-btn');
|
|
36
|
+
if (titlebarBtn) titlebarBtn.addEventListener('click', () => openSettingsModal());
|
|
37
|
+
|
|
38
|
+
const menubarBtn = document.getElementById('menubar-settings-btn');
|
|
39
|
+
if (menubarBtn) menubarBtn.addEventListener('click', () => openSettingsModal());
|
|
40
|
+
|
|
41
|
+
registerAction('open-settings', openSettingsModal);
|
|
42
|
+
|
|
43
|
+
// A language change reloaded the app: open Settings again where the user was, once the rest of the app has started.
|
|
44
|
+
if (reopenWanted()) setTimeout(() => { settingsModule.call('reopenSettingsAfterReload', []); }, 0);
|
|
45
|
+
|
|
46
|
+
// Launch: what Settings is built from, and its search index (the English names too), read and made once the
|
|
47
|
+
// page has painted, so the first open and the first search wait for nothing. The index needs the window's module:
|
|
48
|
+
// this step is what loads it in idle time.
|
|
49
|
+
registerLaunchPrefetch('settings-data', () => prefetchSettingsData(), { order: 60, owner: true });
|
|
50
|
+
registerLaunchPrefetch('settings-search-index', () => settingsModule.call('prebuildSettingsSearchIndex', []), { order: 62 });
|
|
51
|
+
// Changes other windows announce: the next open shows them.
|
|
52
|
+
on('sync:skin:changed', () => refreshSettingsData(['skins']));
|
|
53
|
+
on('sync:greeting:changed', () => refreshSettingsData(['greeting']));
|
|
54
|
+
on('sync:assistant:user-context-changed', () => refreshSettingsData(['userContext']));
|
|
55
|
+
}
|