synabun 2.3.1 → 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 +24 -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 +1117 -47
- package/neural-interface/i18n/pt-BR.json +1117 -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-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 +20 -0
- package/neural-interface/lib/opencode-build-preflight.js +16 -1
- 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 +60 -21
- 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/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 +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/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 +682 -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 +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-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 +355 -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 +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 +1050 -140
- 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
|
@@ -98,6 +98,7 @@ export const DEFAULT_BRAIN = Object.freeze({
|
|
|
98
98
|
project: null,
|
|
99
99
|
tools: Object.freeze(['all']),
|
|
100
100
|
accountId: null,
|
|
101
|
+
accountPolicy: 'manual',
|
|
101
102
|
permissionMode: 'default',
|
|
102
103
|
planMode: false,
|
|
103
104
|
});
|
|
@@ -183,6 +184,7 @@ export function normalizeBrain(raw, fallback = DEFAULT_BRAIN) {
|
|
|
183
184
|
project: str(src.project ?? src.cwd) || null,
|
|
184
185
|
tools: provider === 'opencode' ? (Array.isArray(src.tools) ? [...src.tools] : null) : ['all'],
|
|
185
186
|
accountId: ACCOUNT_PROVIDERS.has(provider) ? (str(src.accountId) || null) : null,
|
|
187
|
+
accountPolicy: ACCOUNT_PROVIDERS.has(provider) && (src.accountId === 'auto' || src.accountPolicy === 'auto') ? 'auto' : 'manual',
|
|
186
188
|
permissionMode: modes.some(m => m.id === mode) ? mode : 'default',
|
|
187
189
|
planMode: PLAN_MODE_PROVIDERS.has(provider) && (src.planMode === true || legacyPlan),
|
|
188
190
|
};
|
|
@@ -516,6 +518,28 @@ export function sessionStatus(own, workers = {}) {
|
|
|
516
518
|
return own === 'done' ? 'done' : 'idle';
|
|
517
519
|
}
|
|
518
520
|
|
|
521
|
+
// Statuses of a session record in which nothing is going on.
|
|
522
|
+
const QUIET_STATUSES = new Set(['', 'idle', 'done', 'ended']);
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* May a tab's conversation be read and drawn later (in the page's idle time, or when the tab is shown)
|
|
526
|
+
* instead of as the tab is made?
|
|
527
|
+
*
|
|
528
|
+
* Only for a tab nobody is looking at whose session is known and known to be quiet. On screen: now. No
|
|
529
|
+
* record of the session (a new one, a host that passes none): now, as before. At work, waiting on an answer,
|
|
530
|
+
* or in a state this page does not know: now, so its pill and its agents say at once what it does.
|
|
531
|
+
*
|
|
532
|
+
* @param {{ visible: boolean, session?: object | null }} tab
|
|
533
|
+
*/
|
|
534
|
+
export function conversationCanWait({ visible, session } = {}) {
|
|
535
|
+
if (visible !== false) return false;
|
|
536
|
+
if (!session || typeof session !== 'object') return false;
|
|
537
|
+
if (session.running || session.busy || session.pending) return false;
|
|
538
|
+
if (Number(session.activeRuns) > 0 || Number(session.waiting) > 0) return false;
|
|
539
|
+
const status = session.status == null ? '' : String(session.status);
|
|
540
|
+
return QUIET_STATUSES.has(status);
|
|
541
|
+
}
|
|
542
|
+
|
|
519
543
|
function toMs(value) {
|
|
520
544
|
if (value == null || value === '') return 0;
|
|
521
545
|
if (typeof value === 'number') return Number.isFinite(value) ? value : 0;
|
|
@@ -606,6 +630,29 @@ export function testDensityBars(level) {
|
|
|
606
630
|
return TEST_DENSITIES.indexOf(normalizeTestDensity(level));
|
|
607
631
|
}
|
|
608
632
|
|
|
633
|
+
// agents-p4: Agent density: how many workers ONE task may get (server: lib/agents/density.js; the numbers and the
|
|
634
|
+
// default are copies, tests/agents-density-wiring.test.mjs fails when one drifts). `null` means "server default"
|
|
635
|
+
// in a tab's own state; a missing or unknown value reads as the default level, Solo.
|
|
636
|
+
export const AGENT_DENSITIES = ['solo', 'pair', 'team', 'swarm'];
|
|
637
|
+
export const DEFAULT_AGENT_DENSITY = 'solo';
|
|
638
|
+
export const AGENT_DENSITY_WORKERS = { solo: 1, pair: 2, team: 4, swarm: 6 };
|
|
639
|
+
|
|
640
|
+
/** A known level, else `fallback` (the default level; pass null to tell "not set" apart). */
|
|
641
|
+
export function normalizeAgentDensity(value, fallback = DEFAULT_AGENT_DENSITY) {
|
|
642
|
+
const key = str(value).toLowerCase();
|
|
643
|
+
return AGENT_DENSITIES.includes(key) ? key : fallback;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
/** The most workers one task gets at a level: solo 1 · pair 2 · team 4 · swarm 6. */
|
|
647
|
+
export function agentDensityWorkers(level) {
|
|
648
|
+
return AGENT_DENSITY_WORKERS[normalizeAgentDensity(level)];
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
/** Figures of the composer's glyph that are drawn at full strength at a level: solo 1 · pair 2 · team 3 · swarm 4. */
|
|
652
|
+
export function agentDensityFigures(level) {
|
|
653
|
+
return AGENT_DENSITIES.indexOf(normalizeAgentDensity(level)) + 1;
|
|
654
|
+
}
|
|
655
|
+
|
|
609
656
|
const COMPUTER_ON = new Set(['on', 'true', '1', 'yes', 'enable', 'enabled']);
|
|
610
657
|
const COMPUTER_OFF = new Set(['off', 'false', '0', 'no', 'disable', 'disabled']);
|
|
611
658
|
|
|
@@ -634,7 +681,22 @@ export function routeTargetLabel(target, { effort = false } = {}) {
|
|
|
634
681
|
const label = str(target.label) || modelShortName(target.model) || providerShortLabel(provider);
|
|
635
682
|
if (!effort) return label;
|
|
636
683
|
const level = str(target.effort);
|
|
637
|
-
|
|
684
|
+
if (!level || level === 'off') return label;
|
|
685
|
+
// A router label of a worker already ends in its effort ("Claude Code · Sonnet 5 · high", "… · thinking off"): once.
|
|
686
|
+
return routeLabelEffortWord(label, level) ? label : `${label} · ${routeEffortWord(level)}`;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
/**
|
|
690
|
+
* The effort word `label` ends in (" · high", " · off", or the router's " · thinking off" for `none`),
|
|
691
|
+
* as written there, else ''. No effort, or the auto "off": ''.
|
|
692
|
+
*/
|
|
693
|
+
export function routeLabelEffortWord(label, effort) {
|
|
694
|
+
const level = str(effort);
|
|
695
|
+
if (!level || level === 'off') return '';
|
|
696
|
+
const text = str(label).toLowerCase();
|
|
697
|
+
const words = level.toLowerCase() === ROUTE_EFFORT_OFF ? ['thinking off', routeEffortWord(level)] : [routeEffortWord(level)];
|
|
698
|
+
const word = words.find((w) => text.endsWith(` · ${w.toLowerCase()}`)) || '';
|
|
699
|
+
return word ? str(label).slice(-word.length) : '';
|
|
638
700
|
}
|
|
639
701
|
|
|
640
702
|
/** Off for a route is the effort id `none` (no thinking); shown as "off". Other ids as they are. */
|
|
@@ -877,6 +939,7 @@ export function createTabState(sessionId, brain, extra = {}) {
|
|
|
877
939
|
routeMode: null, // explicit per-session route mode; null = server default
|
|
878
940
|
computerUse: null, // explicit per-session computer use; null = server default
|
|
879
941
|
testDensity: null, // explicit per-session test density; null = server default
|
|
942
|
+
agentDensity: null, // agents-p4: explicit per-session Agent density; null = server default (Solo)
|
|
880
943
|
usageView: null,
|
|
881
944
|
limit: null, // the provider's usage limit notice (applyLimit); never persisted, the server re-sends it on attach
|
|
882
945
|
...extra,
|
|
@@ -898,6 +961,7 @@ export function serializeTabState(state) {
|
|
|
898
961
|
routeMode: normalizeRouteMode(state.routeMode, null),
|
|
899
962
|
computerUse: normalizeComputerMode(state.computerUse, null),
|
|
900
963
|
testDensity: normalizeTestDensity(state.testDensity, null),
|
|
964
|
+
agentDensity: normalizeAgentDensity(state.agentDensity, null), // agents-p4
|
|
901
965
|
usageView: compactUsageView(state.usageView),
|
|
902
966
|
updatedAt: Date.now(),
|
|
903
967
|
};
|
|
@@ -921,6 +985,7 @@ export function deserializeTabState(raw) {
|
|
|
921
985
|
routeMode: normalizeRouteMode(data.routeMode, null),
|
|
922
986
|
computerUse: normalizeComputerMode(data.computerUse, null),
|
|
923
987
|
testDensity: normalizeTestDensity(data.testDensity, null),
|
|
988
|
+
agentDensity: normalizeAgentDensity(data.agentDensity, null), // agents-p4: an older payload reads as the server default
|
|
924
989
|
usageView: compactUsageView(data.usageView),
|
|
925
990
|
};
|
|
926
991
|
}
|
|
@@ -15,7 +15,11 @@
|
|
|
15
15
|
// Infinite animations pause during drags (body.ui-interacting) and stop under
|
|
16
16
|
// prefers-reduced-motion.
|
|
17
17
|
|
|
18
|
+
import { installCodeCopy } from '../ui-code-copy.js';
|
|
19
|
+
|
|
18
20
|
export function injectAssistantStyles() {
|
|
21
|
+
// The Copy button of every code block: its stylesheet and its one click listener, in this document.
|
|
22
|
+
installCodeCopy(document);
|
|
19
23
|
if (document.getElementById('assistant-panel-styles')) return;
|
|
20
24
|
const style = document.createElement('style');
|
|
21
25
|
style.id = 'assistant-panel-styles';
|
|
@@ -545,7 +549,7 @@ export function injectAssistantStyles() {
|
|
|
545
549
|
cursor: zoom-in;
|
|
546
550
|
}
|
|
547
551
|
.asst-computer-frame:hover { box-shadow: 0 0 0 1px var(--asst-line-2); }
|
|
548
|
-
.asst-computer-frame img { display: block; width: 100%; height: 100%; object-fit:
|
|
552
|
+
.asst-computer-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
|
|
549
553
|
.asst-computer-frame.failed { display: none; }
|
|
550
554
|
.asst-computer-frame.compact {
|
|
551
555
|
display: inline-flex;
|
|
@@ -614,8 +618,8 @@ export function injectAssistantStyles() {
|
|
|
614
618
|
}
|
|
615
619
|
|
|
616
620
|
/* ── Route lines ────────────────────────────────────────────────────
|
|
617
|
-
One line at any width,
|
|
618
|
-
hang): the glyph, arrow, kind and mark hold; the rest (model ·
|
|
621
|
+
One line at any width, spanning the column like the rack and the
|
|
622
|
+
ask cards (no hang): the glyph, arrow, kind and mark hold; the rest (model ·
|
|
619
623
|
account · usage, or the state) takes only the room left (flex-basis 0)
|
|
620
624
|
and ellipsizes first; the class gives way once the rest is down to
|
|
621
625
|
its "…". The head's title carries the whole text. */
|
|
@@ -625,8 +629,7 @@ export function injectAssistantStyles() {
|
|
|
625
629
|
display: flex;
|
|
626
630
|
align-items: center;
|
|
627
631
|
gap: 6px;
|
|
628
|
-
width:
|
|
629
|
-
max-width: min(100%, 560px);
|
|
632
|
+
width: 100%;
|
|
630
633
|
min-width: 0;
|
|
631
634
|
min-height: 26px;
|
|
632
635
|
padding: 3px 8px;
|
|
@@ -759,7 +762,7 @@ export function injectAssistantStyles() {
|
|
|
759
762
|
.asst-run-media { grid-column: 2 / span 2; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
|
|
760
763
|
.asst-run-media-thumb { display: block; width: 88px; height: 88px; padding: 0; border: 0; border-radius: var(--asst-r-field); overflow: hidden; background: var(--asst-field); box-shadow: 0 0 0 1px var(--asst-line); cursor: zoom-in; }
|
|
761
764
|
.asst-run-media-thumb:hover { box-shadow: 0 0 0 1px var(--asst-line-2); }
|
|
762
|
-
.asst-run-media-thumb img { display: block; width: 100%; height: 100%; object-fit:
|
|
765
|
+
.asst-run-media-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
|
|
763
766
|
.asst-run-media-thumb.failed { display: none; }
|
|
764
767
|
.asst-run-media-video { display: block; width: min(100%, 320px); max-height: 220px; border-radius: var(--asst-r-field); background: #000; box-shadow: 0 0 0 1px var(--asst-line); }
|
|
765
768
|
.asst-run-escalate { grid-column: 2 / span 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
|
|
@@ -1112,7 +1115,7 @@ export function injectAssistantStyles() {
|
|
|
1112
1115
|
box-shadow: 0 0 0 1px var(--asst-line);
|
|
1113
1116
|
cursor: zoom-in;
|
|
1114
1117
|
}
|
|
1115
|
-
.asst-computer-thumb img { display: block; width: 100%; height: 100%; object-fit:
|
|
1118
|
+
.asst-computer-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
|
|
1116
1119
|
.asst-computer-activity-text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
|
|
1117
1120
|
.asst-computer-activity-title, .asst-computer-activity-sub { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
|
|
1118
1121
|
.asst-computer-activity-title { color: var(--asst-text); font-size: 12.5px; font-weight: 500; }
|
|
@@ -1818,7 +1821,18 @@ export function injectAssistantStyles() {
|
|
|
1818
1821
|
/* Model routes editor: Settings density on a desktop pointer. Scoped here
|
|
1819
1822
|
so route cards, the model manager and other Assistant menus keep their UI. */
|
|
1820
1823
|
.asst-routes-overlay { font-family: var(--stg-font, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Inter, sans-serif); }
|
|
1821
|
-
.asst-routes-overlay .asst-routes-modal {
|
|
1824
|
+
.asst-routes-overlay .asst-routes-modal {
|
|
1825
|
+
--asst-routes-max-height: calc(100dvh - 48px);
|
|
1826
|
+
width: min(660px, 100%);
|
|
1827
|
+
height: var(--asst-routes-collapsed-height, auto);
|
|
1828
|
+
max-height: var(--asst-routes-max-height);
|
|
1829
|
+
border-radius: var(--asst-r-card);
|
|
1830
|
+
line-height: 1.4;
|
|
1831
|
+
}
|
|
1832
|
+
.asst-routes-overlay .asst-routes-modal:has(.asst-routes-assignments[data-opening], .asst-routes-confirm:not([hidden])) { height: auto; }
|
|
1833
|
+
.asst-routes-overlay .asst-routes-modal[data-measure-collapsed] { height: auto; max-height: none; }
|
|
1834
|
+
.asst-routes-modal[data-measure-collapsed] :is(.asst-routes-row > .asst-routes-reveal, .asst-routes-scroll-cue) { position: absolute; }
|
|
1835
|
+
.asst-routes-modal[data-measure-collapsed] .asst-routes-assignments[data-opening] { max-height: none !important; }
|
|
1822
1836
|
.asst-routes-modal :is(.asst-btn, .asst-dd, .asst-iconbtn) { --cap-h: var(--asst-pill-h-sm); --cap-r: var(--asst-pill-r-xs); --cap-px: var(--asst-pill-px-sm); --cap-icon: 12px; --cap-gap: 4px; }
|
|
1823
1837
|
.asst-routes-modal .asst-modal-head { min-height: 36px; padding: 6px 12px 6px 18px; font-size: 13px; }
|
|
1824
1838
|
.asst-routes-modal .asst-modal-head .asst-icon { color: var(--asst-text-2); }
|
|
@@ -1908,7 +1922,7 @@ export function injectAssistantStyles() {
|
|
|
1908
1922
|
}
|
|
1909
1923
|
@media (max-width: 600px) {
|
|
1910
1924
|
.asst-routes-overlay { padding: 8px; }
|
|
1911
|
-
.asst-routes-overlay .asst-routes-modal { max-height: calc(100dvh -
|
|
1925
|
+
.asst-routes-overlay .asst-routes-modal { --asst-routes-max-height: calc(100dvh - 32px); }
|
|
1912
1926
|
.asst-routes-modal .asst-modal-body { padding: 14px; gap: 16px; }
|
|
1913
1927
|
.asst-routes-modal .asst-modal-head { padding-inline: 14px 8px; }
|
|
1914
1928
|
.asst-routes-modal .asst-routes-modes { grid-template-columns: 1fr; }
|
|
@@ -1931,38 +1945,77 @@ export function injectAssistantStyles() {
|
|
|
1931
1945
|
.asst-routes-confirm { padding: 10px 14px; }
|
|
1932
1946
|
}
|
|
1933
1947
|
|
|
1934
|
-
/*
|
|
1935
|
-
.asst-
|
|
1936
|
-
.asst-routes-
|
|
1937
|
-
.asst-routes-
|
|
1938
|
-
|
|
1939
|
-
.asst-routes-
|
|
1940
|
-
.asst-routes-
|
|
1941
|
-
.asst-routes-
|
|
1942
|
-
.asst-routes-
|
|
1943
|
-
.asst-routes-
|
|
1948
|
+
/* The Models manager shares the base modal. The routing layout belongs to its overlay. */
|
|
1949
|
+
.asst-models-modal .asst-routes-row { display: block; padding: 0; }
|
|
1950
|
+
.asst-models-modal .asst-routes-row-main { padding: 0 4px; }
|
|
1951
|
+
.asst-models-modal .asst-routes-row-main > :not([hidden]) { white-space: normal; margin: 0 0 8px; line-height: 1.45; }
|
|
1952
|
+
|
|
1953
|
+
.asst-routes-overlay .asst-modal-body { gap: 8px; padding: 12px 16px; }
|
|
1954
|
+
.asst-routes-overlay .asst-routes-ask { gap: 8px; padding-bottom: 8px; }
|
|
1955
|
+
.asst-routes-overlay .asst-routes-ask-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
|
|
1956
|
+
.asst-routes-overlay .asst-routes-ask-head .asst-routes-modes { grid-template-columns: repeat(3, auto); max-width: none; }
|
|
1957
|
+
.asst-routes-overlay .asst-routes-mode { height: auto; min-height: var(--asst-pill-h-sm); }
|
|
1958
|
+
.asst-routes-overlay .asst-routes-mode-label { white-space: normal; text-align: center; overflow-wrap: anywhere; line-height: 1.35; }
|
|
1959
|
+
.asst-routes-overlay :is(.asst-routes-mode-desc, .asst-routes-session-note) { white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
|
|
1960
|
+
.asst-routes-session-note { border-inline-start: 2px solid var(--asst-line-2); padding-inline-start: 8px; }
|
|
1961
|
+
.asst-routes-task-head { border-top: 1px solid var(--asst-line-2); padding-top: 8px; }
|
|
1962
|
+
.asst-routes-disclosure { display: flex; align-items: center; gap: 8px; min-height: 28px; padding: 0 4px; background: transparent; border: 0; border-radius: var(--asst-pill-r-xs); color: inherit; font: inherit; text-align: start; cursor: pointer; }
|
|
1963
|
+
.asst-routes-disclosure:hover { background: var(--asst-fill-1); }
|
|
1964
|
+
.asst-routes-choice-count { font-size: 12px; font-weight: 400; color: var(--asst-text-2); }
|
|
1965
|
+
.asst-routes-chevron { display: inline-flex; justify-content: center; align-items: center; color: var(--asst-text-2); transform: rotate(-90deg); }
|
|
1966
|
+
[dir="rtl"] .asst-routes-chevron { transform: rotate(90deg); }
|
|
1967
|
+
.asst-routes-chevron svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
|
|
1968
|
+
.asst-routes-overlay [aria-expanded="true"] > .asst-routes-chevron { transform: none; }
|
|
1969
|
+
.asst-routes-validation { margin: 0; font-size: 12px; color: var(--asst-warn); }
|
|
1970
|
+
.asst-routes-overlay .asst-routes-list { display: block; background: var(--asst-field); border: 1px solid var(--asst-line-2); border-radius: var(--asst-r-field); padding: 0; }
|
|
1971
|
+
.asst-routes-group { display: grid; grid-template-columns: 96px minmax(0, 1fr); min-width: 0; padding: 4px 8px; column-gap: 8px; }
|
|
1972
|
+
.asst-routes-group + .asst-routes-group { border-top: 1px solid var(--asst-line-2); }
|
|
1973
|
+
.asst-routes-group > h3 { grid-area: 1 / 1; margin: 0; padding: 7px 4px; font-size: 12px; line-height: 1.45; font-weight: 600; color: var(--asst-text-2); overflow-wrap: anywhere; }
|
|
1974
|
+
.asst-routes-overlay .asst-routes-row { display: block; padding: 0; grid-column: 2; border: 0; }
|
|
1975
|
+
.asst-routes-overlay .asst-routes-row + .asst-routes-row { border-top: 1px solid var(--asst-line); }
|
|
1976
|
+
.asst-routes-toggle { display: grid; grid-template-columns: minmax(0, 37%) minmax(0, 1fr) auto 12px; align-items: center; gap: 6px; width: 100%; min-height: 30px; padding: 4px 6px; border: 0; border-radius: var(--asst-pill-r-xs); background: transparent; color: var(--asst-text); text-align: start; font: inherit; cursor: pointer; }
|
|
1977
|
+
.asst-routes-toggle .asst-routes-chevron { grid-column: 4; }
|
|
1978
|
+
.asst-routes-toggle:hover, .asst-routes-toggle[aria-expanded="true"] { background: var(--asst-fill-2); }
|
|
1979
|
+
.asst-routes-overlay :is(.asst-routes-toggle, .asst-routes-disclosure):focus-visible { outline: 2px solid var(--asst-focus); outline-offset: -2px; }
|
|
1980
|
+
.asst-routes-overlay .asst-routes-summary-name { white-space: normal; overflow-wrap: anywhere; }
|
|
1981
|
+
.asst-routes-summary-value { display: flex; min-width: 0; align-items: center; gap: 6px; font-size: 12px; }
|
|
1944
1982
|
.asst-routes-summary-model { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
|
|
1945
|
-
.asst-routes-summary-value:not(:has(.asst-icon)) .asst-routes-summary-
|
|
1946
|
-
.asst-routes-summary-
|
|
1947
|
-
.asst-routes-summary-status { font-size: 11px; color: var(--asst-text-2); max-width: 64px; }
|
|
1983
|
+
.asst-routes-summary-value:not(:has(.asst-icon)), .asst-routes-summary-status { color: var(--asst-text-2); }
|
|
1984
|
+
.asst-routes-summary-status { max-width: 12ch; overflow-wrap: anywhere; font-size: 12px; }
|
|
1948
1985
|
.asst-routes-row[data-issue="true"] .asst-routes-summary-status { color: var(--asst-warn); }
|
|
1949
|
-
.asst-routes-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
.asst-routes-details
|
|
1958
|
-
.asst-routes-details .asst-routes-
|
|
1959
|
-
.asst-routes-
|
|
1960
|
-
.asst-routes-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1986
|
+
.asst-routes-reveal { display: flow-root; flex-shrink: 0; }
|
|
1987
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
1988
|
+
.asst-routes-reveal[data-opening] { overflow: clip; animation: asst-routes-reveal var(--asst-dur-base) var(--asst-ease-standard); }
|
|
1989
|
+
}
|
|
1990
|
+
@keyframes asst-routes-reveal {
|
|
1991
|
+
from { max-height: 0; }
|
|
1992
|
+
to { max-height: var(--asst-routes-reveal-height); }
|
|
1993
|
+
}
|
|
1994
|
+
.asst-routes-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; gap: 8px 12px; padding: 8px 12px 12px; margin-block: 2px 8px; border-inline-start: 2px solid var(--asst-line-2); background: var(--asst-fill-1); }
|
|
1995
|
+
.asst-routes-details .asst-routes-row-main { grid-column: 1 / -1; }
|
|
1996
|
+
.asst-routes-details .asst-routes-row-main > :not([hidden]) { white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
|
|
1997
|
+
.asst-routes-details .asst-routes-cell { flex-direction: column; gap: 4px; }
|
|
1998
|
+
.asst-routes-details .asst-routes-cell-label { display: block; font-size: 12px; color: var(--asst-text-2); }
|
|
1999
|
+
.asst-routes-details .asst-routes-model-cell { grid-column: 1 / -1; }
|
|
2000
|
+
.asst-routes-details .asst-routes-reset-cell { grid-column: 3; grid-row: 4; align-self: end; }
|
|
2001
|
+
.asst-routes-details .asst-routes-run-cell { grid-column: 2 / -1; }
|
|
2002
|
+
.asst-routes-details .asst-routes-account-cell { grid-column: 1 / 3; }
|
|
2003
|
+
.asst-routes-details .asst-dd { height: auto; padding-block: 3px; }
|
|
2004
|
+
.asst-routes-details .asst-dd .asst-dd-label { white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
|
|
2005
|
+
.asst-routes-overlay[hidden] { display: none; }
|
|
2006
|
+
@media (pointer: coarse), (max-width: 600px) {
|
|
2007
|
+
.asst-routes-overlay :is(.asst-routes-mode, .asst-routes-toggle, .asst-routes-disclosure, .asst-routes-list-actions .asst-btn) { min-height: 44px; }
|
|
2008
|
+
}
|
|
2009
|
+
@media (max-width: 600px) {
|
|
2010
|
+
.asst-routes-overlay .asst-modal-body { padding: 12px; }
|
|
2011
|
+
.asst-routes-overlay .asst-routes-ask-head { grid-template-columns: minmax(0, 1fr); }
|
|
2012
|
+
.asst-routes-group { display: block; }
|
|
2013
|
+
.asst-routes-group > h3 { padding-bottom: 0; }
|
|
2014
|
+
.asst-routes-toggle { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) 12px; gap: 2px 8px; }
|
|
2015
|
+
.asst-routes-summary-status { grid-column: 2; max-width: none; }
|
|
2016
|
+
.asst-routes-toggle .asst-routes-chevron { grid-area: 1 / 3; }
|
|
2017
|
+
.asst-routes-overlay .asst-routes-details .asst-routes-account-cell { grid-column: 1 / 3; }
|
|
2018
|
+
.asst-routes-task-head { gap: 0 8px; }
|
|
1966
2019
|
}
|
|
1967
2020
|
|
|
1968
2021
|
/* ── Frame lightbox ─────────────────────────────────────────────── */
|
|
@@ -2041,8 +2094,9 @@ export function injectAssistantStyles() {
|
|
|
2041
2094
|
/* ── Narrow / short containers (the tab or float window) ──────────
|
|
2042
2095
|
Toolbar priority, highest first: route mode · Computer · project ·
|
|
2043
2096
|
MCP. The composer row (attach · model · effort · permission mode ·
|
|
2044
|
-
test density · account) keeps model; account hides
|
|
2045
|
-
|
|
2097
|
+
test density · agent density · account) keeps model; account hides
|
|
2098
|
+
≤720px, where test density and agent density are their glyphs alone
|
|
2099
|
+
(agents-p4). A capsule that runs out of
|
|
2046
2100
|
room drops its label half first and stays a glyph (its words remain in
|
|
2047
2101
|
aria-label and the tooltip): route mode and Computer ≤960px, the mode
|
|
2048
2102
|
≤540px, every composer field but the model ≤440px, where the model
|
|
@@ -2064,9 +2118,9 @@ export function injectAssistantStyles() {
|
|
|
2064
2118
|
}
|
|
2065
2119
|
@container asst (max-width: 720px) {
|
|
2066
2120
|
:is(.asst-dd-mcp, .asst-dd-account, .asst-dd-project, .asst-bar-group[data-group="context"]) { display: none !important; }
|
|
2067
|
-
.asst-composer-brain .asst-dd.asst-dd-tests { display: grid; place-content: center; place-items: center; padding: 0; }
|
|
2068
|
-
.asst-composer-brain .asst-dd.asst-dd-tests > :is(.asst-dd-label, .asst-dd-caret) { display: none; }
|
|
2069
|
-
.asst-composer-brain .asst-dd.asst-dd-tests > .asst-icon:not([hidden]) { margin: 0; padding: 0 var(--cap-glyph-pad); box-shadow: none; }
|
|
2121
|
+
.asst-composer-brain .asst-dd:is(.asst-dd-tests, .asst-dd-agents) { display: grid; place-content: center; place-items: center; padding: 0; }
|
|
2122
|
+
.asst-composer-brain .asst-dd:is(.asst-dd-tests, .asst-dd-agents) > :is(.asst-dd-label, .asst-dd-caret) { display: none; }
|
|
2123
|
+
.asst-composer-brain .asst-dd:is(.asst-dd-tests, .asst-dd-agents) > .asst-icon:not([hidden]) { margin: 0; padding: 0 var(--cap-glyph-pad); box-shadow: none; }
|
|
2070
2124
|
.asst-route-keys { display: none; }
|
|
2071
2125
|
}
|
|
2072
2126
|
@container asst (max-width: 540px) {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// The runtime's request identity, shared by the router and the panel. Wording is never identity.
|
|
2
|
+
export function routeTaskIdentity(route) {
|
|
3
|
+
if (!route?.taskId) return null; // Old transcripts predate task identities.
|
|
4
|
+
return JSON.stringify([route.sessionId || '', route.taskId, route.taskKey || '']);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
// Control packets and transcript events can arrive in either order on attach/reconnect.
|
|
8
|
+
export function createRouteReplayGuard() {
|
|
9
|
+
const seen = new Set();
|
|
10
|
+
const keys = route => [route?.routeId, routeTaskIdentity(route)].filter(Boolean);
|
|
11
|
+
return {
|
|
12
|
+
has: route => keys(route).some(key => seen.has(key)),
|
|
13
|
+
record: route => { for (const key of keys(route)) seen.add(key); },
|
|
14
|
+
clear: () => seen.clear(),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -57,7 +57,17 @@ function releaseMeasurements(root) {
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
// A closed side panel is not drawn (ui-sidepanel-windows.js: data-sp-visible="false", content-visibility: hidden).
|
|
61
|
+
// A block in it cannot be judged now: checkVisibility() says no for everything in there, and reading its height
|
|
62
|
+
// would make the engine lay the whole closed panel out. The note stays as it is and the block is measured when it
|
|
63
|
+
// is next on screen (the observer that builds the diffs lazily): when the panel is shown, or when it scrolls near.
|
|
64
|
+
const CLOSED_PANEL = '.sp-sidepanel[data-sp-visible="false"]';
|
|
65
|
+
|
|
60
66
|
export function updateOverflowNote(block, note) {
|
|
67
|
+
if (observer && block.closest?.(CLOSED_PANEL)) {
|
|
68
|
+
if (!pending.has(block)) { pending.set(block, () => queueMeasurement(block)); observer.observe(block); }
|
|
69
|
+
return !note.hidden;
|
|
70
|
+
}
|
|
61
71
|
const clipped = outputOverflows(block.scrollHeight, block.clientHeight) && block.checkVisibility?.() !== false;
|
|
62
72
|
if (note.hidden !== !clipped) note.hidden = !clipped;
|
|
63
73
|
const ids = (block.getAttribute('aria-describedby') || '').split(/\s+/).filter(id => id && id !== note.id);
|
|
@@ -86,7 +86,6 @@ let _freshThread = false;
|
|
|
86
86
|
let _threadId = null;
|
|
87
87
|
let _project = '';
|
|
88
88
|
let _boundTab = null;
|
|
89
|
-
let _tabs = [];
|
|
90
89
|
let _activeTabIdx = -1;
|
|
91
90
|
let _sessionLabel = 'New session';
|
|
92
91
|
let _items = new Map();
|
|
@@ -154,7 +153,6 @@ export function syncBoundState(s) {
|
|
|
154
153
|
_threadId = s.threadId ?? _threadId;
|
|
155
154
|
_project = s.project ?? _project;
|
|
156
155
|
_boundTab = s.boundTab ?? _boundTab;
|
|
157
|
-
_tabs = s.tabs ?? _tabs;
|
|
158
156
|
_activeTabIdx = s.activeTabIdx ?? _activeTabIdx;
|
|
159
157
|
_sessionLabel = s.sessionLabel ?? _sessionLabel;
|
|
160
158
|
_items = s.items ?? _items;
|
|
@@ -518,7 +516,9 @@ function applyVisibility(nextVisible) {
|
|
|
518
516
|
if (_visible) {
|
|
519
517
|
window.addEventListener('keydown', _cdxPanelEscHandler, { capture: true });
|
|
520
518
|
document.addEventListener('keydown', _cdxDocEscHandler, { capture: true });
|
|
521
|
-
|
|
519
|
+
// The tabs are cdx-tabs.js's own (allTabs()), never a copy kept here: a copy that nothing kept up to date
|
|
520
|
+
// read as empty, and every show made a blank tab and put it in front of the one a pill had just chosen.
|
|
521
|
+
if (!allTabs().length) createTab({ project: storage.getItem(STOR.project) || '' });
|
|
522
522
|
state.lastActivePanel = 'codex';
|
|
523
523
|
updateActiveTabView();
|
|
524
524
|
loadRecallProfile();
|
|
@@ -535,22 +535,22 @@ function applyVisibility(nextVisible) {
|
|
|
535
535
|
// loadBranches — Fetch git branches for project
|
|
536
536
|
// ═══════════════════════════════════════════
|
|
537
537
|
|
|
538
|
+
let _branchRequest = 0;
|
|
538
539
|
async function loadBranches(path) {
|
|
540
|
+
const request = ++_branchRequest;
|
|
539
541
|
const $branch = panelEl('#cxp-branch');
|
|
540
542
|
if (!$branch) return;
|
|
541
|
-
|
|
543
|
+
$branch.dataset.current = '';
|
|
544
|
+
ddPopulate($branch, [], '');
|
|
545
|
+
if (!path) return;
|
|
542
546
|
try {
|
|
543
547
|
const res = await fetch(`/api/terminal/branches?path=${encodeURIComponent(path)}`).then(r => r.json());
|
|
548
|
+
if (request !== _branchRequest || activeTab()?.project !== path) return;
|
|
544
549
|
$branch.dataset.current = res.current || '';
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
ddPopulate($branch, items, res.current || '');
|
|
550
|
-
} else {
|
|
551
|
-
ddPopulate($branch, [], '');
|
|
552
|
-
}
|
|
553
|
-
} catch {}
|
|
550
|
+
activeTab().branch = res.current || '';
|
|
551
|
+
const items = (Array.isArray(res.branches) ? res.branches : []).map(b => ({ value: b, label: b }));
|
|
552
|
+
ddPopulate($branch, items, res.current || '');
|
|
553
|
+
} catch { /* keep the cleared selector */ }
|
|
554
554
|
}
|
|
555
555
|
|
|
556
556
|
// ═══════════════════════════════════════════
|
|
@@ -826,7 +826,7 @@ function wireEvents() {
|
|
|
826
826
|
const result = await response.json().catch(() => ({}));
|
|
827
827
|
if (!response.ok || !result.ok) throw new Error(result.error || 'Branch checkout failed');
|
|
828
828
|
branchDd.dataset.current = result.branch || branch;
|
|
829
|
-
for (const entry of
|
|
829
|
+
for (const entry of allTabs()) {
|
|
830
830
|
if (entry.project === project) entry.branch = result.branch || branch;
|
|
831
831
|
}
|
|
832
832
|
hideComposerHints();
|
|
@@ -931,7 +931,7 @@ function wireEvents() {
|
|
|
931
931
|
|
|
932
932
|
on('codex-panel:show', async (data) => {
|
|
933
933
|
if (data?.tabId) {
|
|
934
|
-
const idx =
|
|
934
|
+
const idx = allTabs().findIndex((entry) => entry.id === data.tabId);
|
|
935
935
|
if (idx >= 0) switchTab(idx);
|
|
936
936
|
}
|
|
937
937
|
setVisible(true);
|
|
@@ -940,7 +940,7 @@ function wireEvents() {
|
|
|
940
940
|
|
|
941
941
|
const findPlanEditorTab = ({ source, tabId, planId, accountId, threadId } = {}) => {
|
|
942
942
|
if (source !== 'codex' || !tabId || !planId || !accountId || !threadId) return null;
|
|
943
|
-
return
|
|
943
|
+
return allTabs().find((entry) => entry.id === tabId
|
|
944
944
|
&& entry.planDocument?.id === planId
|
|
945
945
|
&& entry.planDocument?.accountId === accountId
|
|
946
946
|
&& entry.planDocument?.threadId === threadId) || null;
|
|
@@ -1162,6 +1162,7 @@ export async function attachCodexAutomation(run, {
|
|
|
1162
1162
|
tab.automationAwaits = runAwaitsAnswer(run);
|
|
1163
1163
|
tab.automationOwnerId = nativeLoopWindowId;
|
|
1164
1164
|
tab.threadId = threadId;
|
|
1165
|
+
const projectChanged = !!run.cwd && run.cwd !== tab.project;
|
|
1165
1166
|
tab.project = run.cwd || tab.project;
|
|
1166
1167
|
tab.automationTitle = run.title || tab.automationTitle || tab.sessionLabel || 'Automation';
|
|
1167
1168
|
tab.sessionLabel = tab.automationTitle;
|
|
@@ -1208,6 +1209,7 @@ export async function attachCodexAutomation(run, {
|
|
|
1208
1209
|
const idx = allTabs().indexOf(tab);
|
|
1209
1210
|
if (idx >= 0) switchTab(idx);
|
|
1210
1211
|
}
|
|
1212
|
+
if (projectChanged && isActiveTab(tab)) updateActiveTabView();
|
|
1211
1213
|
if (!restart.active && isActiveTab(tab) && _visible) connectTab(tab);
|
|
1212
1214
|
return { ok: true, tabId: tab.id };
|
|
1213
1215
|
}
|
|
@@ -76,8 +76,8 @@ export function syncPlanMirrors(tab) {
|
|
|
76
76
|
const document = planBelongsToTab(tab?.planDocument, tab) ? tab.planDocument : null;
|
|
77
77
|
tab.planContent = document?.markdown || '';
|
|
78
78
|
tab.editedPlanContent = document?.source === 'editor' ? document.markdown : '';
|
|
79
|
-
tab.planApprovalPending = !!document && document.status === 'complete' && document.approvedRevision !== document.revision;
|
|
80
|
-
tab.showPostPlanActions = tab.planApprovalPending
|
|
79
|
+
tab.planApprovalPending = !tab.planTurnActive && !!document && document.status === 'complete' && document.approvedRevision !== document.revision;
|
|
80
|
+
tab.showPostPlanActions = tab.planApprovalPending;
|
|
81
81
|
return document;
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -87,6 +87,7 @@ export function beginPlanTurn(tab, turnId = '') {
|
|
|
87
87
|
tab.lastPlanTurnId = turnId;
|
|
88
88
|
recordPlanTurn(tab, turnId);
|
|
89
89
|
tab.planCandidate = null;
|
|
90
|
+
tab.planApprovalPending = false;
|
|
90
91
|
tab.showPostPlanActions = false;
|
|
91
92
|
// A failed revision must leave the previous reviewable document intact.
|
|
92
93
|
}
|