synabun 2.0.10 → 2.2.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 +207 -0
- package/README.md +25 -2
- package/THIRD-PARTY-LICENSES.md +22 -0
- package/bin/synabun.js +71 -24
- package/docs/whatsapp.md +13 -13
- package/hooks/claude-code/pre-websearch.mjs +12 -1
- package/hooks/claude-code/shared.mjs +5 -0
- package/hooks/claude-code/stop.mjs +1 -1
- package/lib/claude-hooks.js +172 -18
- package/lib/client-config-repair.js +30 -17
- package/lib/desktop-app.js +7 -1
- package/lib/external-tools.js +7 -6
- package/lib/first-launch-protection.js +57 -12
- package/lib/mcp-dist.js +176 -0
- package/lib/release-npm-ci.mjs +138 -0
- package/lib/release-publish.mjs +91 -0
- package/lib/release-scan.mjs +50 -0
- package/lib/server-crash-record.js +123 -0
- package/lib/server-exit.js +318 -0
- package/lib/server-supervisor.js +508 -0
- package/lib/start-launcher.js +37 -4
- package/lib/tools-cli.js +45 -0
- package/lib/update-snapshot.js +302 -0
- package/lib/virustotal.mjs +203 -0
- package/lib/windows-crash-event.js +269 -0
- package/mcp-server/dist/http.d.ts +20 -1
- package/mcp-server/dist/http.d.ts.map +1 -1
- package/mcp-server/dist/http.js +59 -12
- package/mcp-server/dist/http.js.map +1 -1
- package/mcp-server/dist/index.d.ts +33 -27
- package/mcp-server/dist/index.d.ts.map +1 -1
- package/mcp-server/dist/index.js +128 -143
- package/mcp-server/dist/index.js.map +1 -1
- package/mcp-server/dist/preload.js +1 -1
- package/mcp-server/dist/preload.js.map +1 -1
- package/mcp-server/dist/services/budget-judgments.d.ts +1 -1
- package/mcp-server/dist/services/budget-judgments.d.ts.map +1 -1
- package/mcp-server/dist/services/budget-judgments.js +5 -3
- package/mcp-server/dist/services/budget-judgments.js.map +1 -1
- package/mcp-server/dist/services/codex-config-heal.d.ts +6 -2
- package/mcp-server/dist/services/codex-config-heal.d.ts.map +1 -1
- package/mcp-server/dist/services/codex-config-heal.js +81 -28
- package/mcp-server/dist/services/codex-config-heal.js.map +1 -1
- package/mcp-server/dist/services/identity.d.ts +2 -2
- package/mcp-server/dist/services/identity.js +2 -2
- package/mcp-server/dist/services/memory-judge-backfill.d.ts +6 -0
- package/mcp-server/dist/services/memory-judge-backfill.d.ts.map +1 -1
- package/mcp-server/dist/services/memory-judge-backfill.js +7 -1
- package/mcp-server/dist/services/memory-judge-backfill.js.map +1 -1
- package/mcp-server/dist/services/memory-sessions.d.ts +1 -1
- package/mcp-server/dist/services/memory-sessions.d.ts.map +1 -1
- package/mcp-server/dist/services/memory-sessions.js +28 -2
- package/mcp-server/dist/services/memory-sessions.js.map +1 -1
- package/mcp-server/dist/services/neural-interface.d.ts +18 -11
- package/mcp-server/dist/services/neural-interface.d.ts.map +1 -1
- package/mcp-server/dist/services/neural-interface.js +67 -11
- package/mcp-server/dist/services/neural-interface.js.map +1 -1
- package/mcp-server/dist/services/server-instructions.d.ts +7 -2
- package/mcp-server/dist/services/server-instructions.d.ts.map +1 -1
- package/mcp-server/dist/services/server-instructions.js +22 -63
- package/mcp-server/dist/services/server-instructions.js.map +1 -1
- package/mcp-server/dist/services/tool-catalog.d.ts +120 -0
- package/mcp-server/dist/services/tool-catalog.d.ts.map +1 -0
- package/mcp-server/dist/services/tool-catalog.js +339 -0
- package/mcp-server/dist/services/tool-catalog.js.map +1 -0
- package/mcp-server/dist/services/tool-list-refresh-barrier.d.ts +12 -0
- package/mcp-server/dist/services/tool-list-refresh-barrier.d.ts.map +1 -0
- package/mcp-server/dist/services/tool-list-refresh-barrier.js +40 -0
- package/mcp-server/dist/services/tool-list-refresh-barrier.js.map +1 -0
- package/mcp-server/dist/services/tool-list.d.ts +108 -0
- package/mcp-server/dist/services/tool-list.d.ts.map +1 -0
- package/mcp-server/dist/services/tool-list.js +334 -0
- package/mcp-server/dist/services/tool-list.js.map +1 -0
- package/mcp-server/dist/services/tool-runtime.d.ts +161 -0
- package/mcp-server/dist/services/tool-runtime.d.ts.map +1 -0
- package/mcp-server/dist/services/tool-runtime.js +400 -0
- package/mcp-server/dist/services/tool-runtime.js.map +1 -0
- package/mcp-server/dist/services/typesafe-config.js +1 -1
- package/mcp-server/dist/services/typesafe-config.js.map +1 -1
- package/mcp-server/dist/services/whiteboard-geometry.d.ts +26 -2
- package/mcp-server/dist/services/whiteboard-geometry.d.ts.map +1 -1
- package/mcp-server/dist/services/whiteboard-geometry.js +91 -8
- package/mcp-server/dist/services/whiteboard-geometry.js.map +1 -1
- package/mcp-server/dist/tools/agents.d.ts +14 -14
- package/mcp-server/dist/tools/agents.d.ts.map +1 -1
- package/mcp-server/dist/tools/agents.js +29 -19
- package/mcp-server/dist/tools/agents.js.map +1 -1
- package/mcp-server/dist/tools/browser-batch.d.ts +3 -3
- package/mcp-server/dist/tools/choice.d.ts +6 -0
- package/mcp-server/dist/tools/choice.d.ts.map +1 -1
- package/mcp-server/dist/tools/choice.js +18 -13
- package/mcp-server/dist/tools/choice.js.map +1 -1
- package/mcp-server/dist/tools/git-tools.js +2 -2
- package/mcp-server/dist/tools/git-tools.js.map +1 -1
- package/mcp-server/dist/tools/image-tools.d.ts +1 -1
- package/mcp-server/dist/tools/image-tools.js +1 -1
- package/mcp-server/dist/tools/morelogin.d.ts.map +1 -1
- package/mcp-server/dist/tools/morelogin.js +9 -6
- package/mcp-server/dist/tools/morelogin.js.map +1 -1
- package/mcp-server/dist/tools/skill-tools.d.ts +505 -0
- package/mcp-server/dist/tools/skill-tools.d.ts.map +1 -0
- package/mcp-server/dist/tools/skill-tools.js +642 -0
- package/mcp-server/dist/tools/skill-tools.js.map +1 -0
- package/mcp-server/dist/tools/skill.d.ts +7 -0
- package/mcp-server/dist/tools/skill.d.ts.map +1 -0
- package/mcp-server/dist/tools/skill.js +11 -0
- package/mcp-server/dist/tools/skill.js.map +1 -0
- package/mcp-server/dist/tools/tool-groups.d.ts +68 -0
- package/mcp-server/dist/tools/tool-groups.d.ts.map +1 -0
- package/mcp-server/dist/tools/tool-groups.js +147 -0
- package/mcp-server/dist/tools/tool-groups.js.map +1 -0
- package/mcp-server/dist/tools/whiteboard-format.d.ts.map +1 -1
- package/mcp-server/dist/tools/whiteboard-format.js +7 -4
- package/mcp-server/dist/tools/whiteboard-format.js.map +1 -1
- package/mcp-server/dist/tools/whiteboard-tools.d.ts +64 -13
- package/mcp-server/dist/tools/whiteboard-tools.d.ts.map +1 -1
- package/mcp-server/dist/tools/whiteboard-tools.js +30 -5
- package/mcp-server/dist/tools/whiteboard-tools.js.map +1 -1
- package/mcp-server/package-lock.json +2 -2
- package/mcp-server/package.json +1 -1
- package/mcp-server/src/http.ts +75 -12
- package/mcp-server/src/index.ts +147 -154
- package/mcp-server/src/preload.ts +12 -12
- package/mcp-server/src/services/budget-judgments.ts +5 -3
- package/mcp-server/src/services/codex-config-heal.ts +80 -29
- package/mcp-server/src/services/identity.ts +2 -2
- package/mcp-server/src/services/memory-judge-backfill.ts +7 -1
- package/mcp-server/src/services/memory-sessions.ts +24 -3
- package/mcp-server/src/services/neural-interface.ts +81 -21
- package/mcp-server/src/services/server-instructions.ts +29 -64
- package/mcp-server/src/services/tool-catalog.ts +403 -0
- package/mcp-server/src/services/tool-list-refresh-barrier.ts +33 -0
- package/mcp-server/src/services/tool-list.ts +410 -0
- package/mcp-server/src/services/tool-runtime.ts +457 -0
- package/mcp-server/src/services/typesafe-config.ts +1 -1
- package/mcp-server/src/services/whiteboard-geometry.ts +94 -9
- package/mcp-server/src/tools/agents.ts +29 -20
- package/mcp-server/src/tools/choice.ts +17 -12
- package/mcp-server/src/tools/git-tools.ts +2 -2
- package/mcp-server/src/tools/image-tools.ts +1 -1
- package/mcp-server/src/tools/morelogin.ts +6 -4
- package/mcp-server/src/tools/skill-tools.ts +592 -0
- package/mcp-server/src/tools/skill.ts +13 -0
- package/mcp-server/src/tools/tool-groups.ts +164 -0
- package/mcp-server/src/tools/whiteboard-format.ts +9 -3
- package/mcp-server/src/tools/whiteboard-tools.ts +39 -5
- package/neural-interface/i18n/en.json +3953 -228
- package/neural-interface/i18n/pt-BR.json +3901 -179
- package/neural-interface/lib/agent-sandbox-elevation.js +6 -0
- package/neural-interface/lib/antigravity/acp-client-host.js +554 -0
- package/neural-interface/lib/antigravity/acp-connection.js +299 -0
- package/neural-interface/lib/antigravity/bypass.js +100 -0
- package/neural-interface/lib/antigravity/catalog.js +273 -0
- package/neural-interface/lib/antigravity/home.js +260 -0
- package/neural-interface/lib/antigravity/migrate-gemini.js +139 -0
- package/neural-interface/lib/antigravity/panel-bridge.js +1058 -0
- package/neural-interface/lib/antigravity/policy-hook.mjs +78 -0
- package/neural-interface/lib/antigravity/policy.js +74 -0
- package/neural-interface/lib/antigravity/tool-call.js +178 -0
- package/neural-interface/lib/antigravity/transcripts.js +252 -0
- package/neural-interface/lib/antigravity/usage.js +43 -0
- package/neural-interface/lib/assistant-api.js +128 -28
- package/neural-interface/lib/assistant-brains/antigravity.js +423 -0
- package/neural-interface/lib/assistant-brains/claude.js +4 -3
- package/neural-interface/lib/assistant-brains/codex-browser-policy-hook.mjs +12 -2
- package/neural-interface/lib/assistant-brains/codex-route-gate-hook.mjs +32 -9
- package/neural-interface/lib/assistant-brains/codex.js +9 -5
- package/neural-interface/lib/assistant-brains/opencode.js +120 -54
- package/neural-interface/lib/assistant-brains/opencode2-browser-policy/index.js +28 -13
- package/neural-interface/lib/assistant-brains/opencode2-route-gate/index.js +59 -19
- package/neural-interface/lib/assistant-budget-planner.js +7 -3
- package/neural-interface/lib/assistant-budget-split.js +42 -15
- package/neural-interface/lib/assistant-catalog.js +81 -15
- package/neural-interface/lib/assistant-config.js +6 -3
- package/neural-interface/lib/assistant-dispatch.js +1073 -200
- package/neural-interface/lib/assistant-envelope.js +156 -2
- package/neural-interface/lib/assistant-evidence.js +80 -0
- package/neural-interface/lib/assistant-hidden-models.js +7 -5
- package/neural-interface/lib/assistant-persona.js +93 -19
- package/neural-interface/lib/assistant-plan-permissions.js +25 -9
- package/neural-interface/lib/assistant-route-gate-codex.js +3 -0
- package/neural-interface/lib/assistant-route-gate.js +6 -4
- package/neural-interface/lib/assistant-router.js +245 -38
- package/neural-interface/lib/assistant-runtime.js +214 -30
- package/neural-interface/lib/assistant-task-prompt.js +87 -21
- package/neural-interface/lib/assistant-tools.js +51 -0
- package/neural-interface/lib/assistant-usage.js +29 -0
- package/neural-interface/lib/backup-service.js +626 -4
- package/neural-interface/lib/backup-zip-reader.js +10 -5
- package/neural-interface/lib/backup-zip-writer.js +257 -0
- package/neural-interface/lib/browser-execution.js +10 -2
- package/neural-interface/lib/browser-guard-cdp.js +84 -0
- package/neural-interface/lib/browser-network-guard.js +476 -0
- package/neural-interface/lib/browser-policy-roots.js +64 -0
- package/neural-interface/lib/browser-tool-policy.js +198 -38
- package/neural-interface/lib/claude-agent-bridge.js +11 -2
- package/neural-interface/lib/claude-history-cache.js +210 -0
- package/neural-interface/lib/claude-hooks-status.js +103 -0
- package/neural-interface/lib/claude-model-catalog.js +5 -1
- package/neural-interface/lib/claude-temporary.js +5 -11
- package/neural-interface/lib/cli-install-api.js +1 -1
- package/neural-interface/lib/cli-install.js +163 -154
- package/neural-interface/lib/cli-resolver.js +13 -3
- package/neural-interface/lib/cli-update-planner.js +52 -41
- package/neural-interface/lib/cloudflared/tunnel.js +42 -2
- package/neural-interface/lib/codex-mcp-approvals.js +11 -0
- package/neural-interface/lib/codex-rollout-reader.js +52 -0
- package/neural-interface/lib/codex-worker-app-server.js +191 -0
- package/neural-interface/lib/confined-fs.js +30 -3
- package/neural-interface/lib/crash-notice-api.js +98 -0
- package/neural-interface/lib/editor-completion-opencode.js +68 -68
- package/neural-interface/lib/editor-git-api.js +3 -20
- package/neural-interface/lib/exec-loop-command.js +13 -10
- package/neural-interface/lib/file-explorer-api.js +74 -40
- package/neural-interface/lib/file-explorer-watch.js +9 -3
- package/neural-interface/lib/git-bash/install.js +52 -6
- package/neural-interface/lib/git-bash/manager.js +59 -17
- package/neural-interface/lib/git-bash/pins.js +12 -0
- package/neural-interface/lib/git-read.js +2 -2
- package/neural-interface/lib/git-status-runner.js +390 -0
- package/neural-interface/lib/git-status-watchdog.js +40 -0
- package/neural-interface/lib/greeting/budgets.js +1 -0
- package/neural-interface/lib/greeting/engine.js +2 -2
- package/neural-interface/lib/greeting/sources.js +10 -12
- package/neural-interface/lib/greeting/writer.js +1 -1
- package/neural-interface/lib/http-guards.js +8 -2
- package/neural-interface/lib/install-details.js +4 -1
- package/neural-interface/lib/mcp-agent-servers.js +67 -0
- package/neural-interface/lib/mcp-client-config.js +35 -33
- package/neural-interface/lib/mcp-external-servers.js +332 -0
- package/neural-interface/lib/mcp-installer.js +2 -1
- package/neural-interface/lib/{mcp-profile-refresh-coordinator.js → mcp-tools-refresh-coordinator.js} +4 -4
- package/neural-interface/lib/memory-session-capture.js +17 -3
- package/neural-interface/lib/morelogin.js +177 -25
- package/neural-interface/lib/native-loop-providers.js +965 -66
- package/neural-interface/lib/native-loop-runtime.js +290 -42
- package/neural-interface/lib/opencode-config.js +557 -0
- package/neural-interface/lib/opencode-db-schema.js +17 -34
- package/neural-interface/lib/opencode-history.js +48 -218
- package/neural-interface/lib/opencode-mcp-ready.js +108 -0
- package/neural-interface/lib/opencode-native-boundary.js +53 -0
- package/neural-interface/lib/opencode-protocol.js +249 -112
- package/neural-interface/lib/opencode-runtime-config.js +32 -22
- package/neural-interface/lib/opencode-serve-records.js +39 -21
- package/neural-interface/lib/opencode-v2-client.js +48 -153
- package/neural-interface/lib/opencode-v2-ws-requests.js +36 -210
- package/neural-interface/lib/opencode-worker-data.js +27 -0
- package/neural-interface/lib/opencode2-client.js +73 -37
- package/neural-interface/lib/opencode2-proxy.js +23 -63
- package/neural-interface/lib/opencode2-translate.js +51 -2
- package/neural-interface/lib/owner-authority.js +249 -0
- package/neural-interface/lib/page-session.js +275 -0
- package/neural-interface/lib/path-confine.js +12 -9
- package/neural-interface/lib/peer-identity.js +793 -0
- package/neural-interface/lib/pty-host/core.js +28 -1
- package/neural-interface/lib/pty-host/lifetime.js +12 -0
- package/neural-interface/lib/pty-host/manager.js +12 -1
- package/neural-interface/lib/remote-policy.js +1 -1
- package/neural-interface/lib/request-gate.js +20 -2
- package/neural-interface/lib/rulesets/api.js +7 -6
- package/neural-interface/lib/rulesets/fs-safe.js +1 -1
- package/neural-interface/lib/rulesets/installer.js +180 -36
- package/neural-interface/lib/rulesets/json-edit.js +1 -1
- package/neural-interface/lib/rulesets/render.js +1 -1
- package/neural-interface/lib/session-cache-builder.js +81 -31
- package/neural-interface/lib/session-title-generator.js +58 -36
- package/neural-interface/lib/skills/api-v2.js +495 -0
- package/neural-interface/lib/skills/bundle.js +418 -0
- package/neural-interface/lib/skills/catalog.js +298 -0
- package/neural-interface/lib/skills/creation-api.js +191 -0
- package/neural-interface/lib/skills/creation-brief.js +247 -0
- package/neural-interface/lib/skills/creation-sources.js +285 -0
- package/neural-interface/lib/skills/creation.js +843 -0
- package/neural-interface/lib/skills/deploy.js +569 -0
- package/neural-interface/lib/skills/digest.js +119 -0
- package/neural-interface/lib/skills/discover.js +111 -0
- package/neural-interface/lib/skills/draft-confinement.js +216 -0
- package/neural-interface/lib/skills/eval-confinement.js +399 -0
- package/neural-interface/lib/skills/eval-sandbox.js +280 -0
- package/neural-interface/lib/skills/eval-trace.js +135 -0
- package/neural-interface/lib/skills/evals-api.js +212 -0
- package/neural-interface/lib/skills/evals.js +1573 -0
- package/neural-interface/lib/skills/export.js +203 -0
- package/neural-interface/lib/skills/frontmatter.js +64 -0
- package/neural-interface/lib/skills/health.js +75 -0
- package/neural-interface/lib/skills/json-edit.js +165 -0
- package/neural-interface/lib/skills/known-bridge-digests.json +441 -0
- package/neural-interface/lib/skills/known-bridges.js +96 -0
- package/neural-interface/lib/skills/library.js +823 -0
- package/neural-interface/lib/skills/local-store.js +21 -0
- package/neural-interface/lib/skills/migration.js +433 -0
- package/neural-interface/lib/skills/operations.js +45 -0
- package/neural-interface/lib/skills/ownership.js +427 -0
- package/neural-interface/lib/skills/packages.js +88 -0
- package/neural-interface/lib/skills/reviews.js +212 -0
- package/neural-interface/lib/skills/revision.js +80 -0
- package/neural-interface/lib/skills/roots.js +269 -0
- package/neural-interface/lib/skills/runtime-checks.js +358 -0
- package/neural-interface/lib/skills/scan-assets.js +252 -0
- package/neural-interface/lib/skills/scan-context.js +26 -0
- package/neural-interface/lib/skills/scan-shell.js +324 -0
- package/neural-interface/lib/skills/scan.js +364 -0
- package/neural-interface/lib/skills/scanners.js +54 -0
- package/neural-interface/lib/skills/service.js +530 -0
- package/neural-interface/lib/skills/telemetry.js +119 -0
- package/neural-interface/lib/sqlite-integrity-worker.js +22 -0
- package/neural-interface/lib/synabun-version.js +1 -1
- package/neural-interface/lib/system-activity.js +1 -1
- package/neural-interface/lib/tool-lists.js +124 -0
- package/neural-interface/lib/whatsapp/brain.js +7 -3
- package/neural-interface/lib/whatsapp/bridge.js +6 -3
- package/neural-interface/lib/whatsapp/cards.js +22 -9
- package/neural-interface/lib/whatsapp/config.js +1 -1
- package/neural-interface/lib/worker-confinement.js +1268 -0
- package/neural-interface/lib/worker-guard-setting.js +56 -0
- package/neural-interface/lib/worker-mcp-channel.js +175 -0
- package/neural-interface/lib/worker-question.js +74 -0
- package/neural-interface/lib/worker-relay-ports.js +227 -0
- package/neural-interface/lib/worker-resume.js +238 -0
- package/neural-interface/lib/worker-sandbox.js +329 -0
- package/neural-interface/package-lock.json +34 -12
- package/neural-interface/package.json +3 -2
- package/neural-interface/public/index.html +3 -1
- package/neural-interface/public/index2d.html +19 -11
- package/neural-interface/public/onboarding.html +3 -3
- package/neural-interface/public/shared/account-menu.js +8 -5
- package/neural-interface/public/shared/agent-runtime-options.js +125 -31
- package/neural-interface/public/shared/agy/agy-bypass.js +47 -0
- package/neural-interface/public/shared/agy/agy-client.js +266 -0
- package/neural-interface/public/shared/agy/agy-commands.js +120 -0
- package/neural-interface/public/shared/agy/agy-copy.js +326 -0
- package/neural-interface/public/shared/agy/agy-diff.js +161 -0
- package/neural-interface/public/shared/agy/agy-events.js +469 -0
- package/neural-interface/public/shared/agy/agy-greeting.js +26 -0
- package/neural-interface/public/shared/agy/agy-options.js +232 -0
- package/neural-interface/public/shared/agy/agy-panel.js +2543 -0
- package/neural-interface/public/shared/agy/agy-render.js +392 -0
- package/neural-interface/public/shared/agy/agy-setup.js +149 -0
- package/neural-interface/public/shared/agy/agy-styles.js +604 -0
- package/neural-interface/public/shared/agy/agy-tabs-logic.js +181 -0
- package/neural-interface/public/shared/api.js +1527 -1336
- package/neural-interface/public/shared/app-frame.js +192 -0
- package/neural-interface/public/shared/assistant/asst-agents-dock.js +36 -6
- package/neural-interface/public/shared/assistant/asst-api.js +1 -1
- package/neural-interface/public/shared/assistant/asst-ask-styles.js +270 -0
- package/neural-interface/public/shared/assistant/asst-ask-tail.js +118 -0
- package/neural-interface/public/shared/assistant/asst-ask.js +397 -0
- package/neural-interface/public/shared/assistant/asst-brain-picker.js +105 -44
- package/neural-interface/public/shared/assistant/asst-budget.js +5 -4
- package/neural-interface/public/shared/assistant/asst-control.js +205 -26
- package/neural-interface/public/shared/assistant/asst-followups-card.js +383 -0
- package/neural-interface/public/shared/assistant/asst-followups.js +417 -0
- package/neural-interface/public/shared/assistant/asst-hosts.js +16 -7
- package/neural-interface/public/shared/assistant/asst-limit-dock.js +45 -0
- package/neural-interface/public/shared/assistant/asst-limit-wait.js +327 -0
- package/neural-interface/public/shared/assistant/asst-limit.js +168 -0
- package/neural-interface/public/shared/assistant/asst-mascot.js +49 -12
- package/neural-interface/public/shared/assistant/asst-menu.js +7 -6
- package/neural-interface/public/shared/assistant/asst-panel.js +151 -19
- package/neural-interface/public/shared/assistant/asst-rack-styles.js +66 -49
- package/neural-interface/public/shared/assistant/asst-render.js +445 -82
- package/neural-interface/public/shared/assistant/asst-route.js +304 -53
- package/neural-interface/public/shared/assistant/asst-routes-editor.js +9 -8
- package/neural-interface/public/shared/assistant/asst-scenes.js +56 -1
- package/neural-interface/public/shared/assistant/asst-sidepanel.js +117 -10
- package/neural-interface/public/shared/assistant/asst-slash.js +17 -9
- package/neural-interface/public/shared/assistant/asst-state.js +87 -24
- package/neural-interface/public/shared/assistant/asst-stop.js +127 -0
- package/neural-interface/public/shared/assistant/asst-styles.js +93 -21
- package/neural-interface/public/shared/assistant/asst-tool-kinds.js +190 -23
- package/neural-interface/public/shared/assistant/asst-usage.js +2 -1
- package/neural-interface/public/shared/automation-context.js +5 -2
- package/neural-interface/public/shared/cc-dropdown.js +89 -19
- package/neural-interface/public/shared/cdx/cdx-context-menu.js +10 -9
- package/neural-interface/public/shared/cdx/cdx-copy.js +16 -0
- package/neural-interface/public/shared/cdx/cdx-output-model.js +22 -1
- package/neural-interface/public/shared/cdx/cdx-output.js +34 -10
- package/neural-interface/public/shared/cdx/cdx-panel.js +59 -151
- package/neural-interface/public/shared/cdx/cdx-preview.js +12 -0
- package/neural-interface/public/shared/cdx/cdx-protocol.js +39 -11
- package/neural-interface/public/shared/cdx/cdx-render.js +57 -38
- package/neural-interface/public/shared/cdx/cdx-requests.js +14 -4
- package/neural-interface/public/shared/cdx/cdx-skill-hints.js +54 -0
- package/neural-interface/public/shared/cdx/cdx-styles.js +15 -3
- package/neural-interface/public/shared/cdx/cdx-tabs.js +127 -44
- package/neural-interface/public/shared/cdx/cdx-ws.js +0 -1
- package/neural-interface/public/shared/cli-install-controller.js +218 -0
- package/neural-interface/public/shared/cli-install-view.js +11 -12
- package/neural-interface/public/shared/cli-status.js +11 -10
- package/neural-interface/public/shared/constants.js +5 -4
- package/neural-interface/public/shared/context-menu-areas.js +34 -0
- package/neural-interface/public/shared/context-menu-logic.js +243 -0
- package/neural-interface/public/shared/context-menu-model.js +367 -0
- package/neural-interface/public/shared/context-menu.js +372 -0
- package/neural-interface/public/shared/cp/cp-context-menu.js +10 -9
- package/neural-interface/public/shared/cp/cp-restore.js +162 -0
- package/neural-interface/public/shared/cp/cp-tool-cards.js +10 -3
- package/neural-interface/public/shared/crash-notice-view.js +168 -0
- package/neural-interface/public/shared/desktop-bridge.js +17 -0
- package/neural-interface/public/shared/desktop-titlebar-view.js +12 -0
- package/neural-interface/public/shared/desktop-titlebar.js +13 -4
- package/neural-interface/public/shared/desktop-update-view.js +21 -0
- package/neural-interface/public/shared/editor/editor-panel-logic.js +2 -2
- package/neural-interface/public/shared/explorer/fx-api.js +4 -4
- package/neural-interface/public/shared/explorer/fx-links.js +3 -3
- package/neural-interface/public/shared/explorer/fx-logic.js +1 -1
- package/neural-interface/public/shared/explorer/fx-main.js +48 -16
- package/neural-interface/public/shared/explorer/fx-tree.js +1 -0
- package/neural-interface/public/shared/greeting/greeting-card.js +2 -2
- package/neural-interface/public/shared/greeting/greeting-view.js +1 -0
- package/neural-interface/public/shared/html-shell.js +30 -15
- package/neural-interface/public/shared/i18n.js +2 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-approvals.js +7 -7
- package/neural-interface/public/shared/ocp-v2/ocp-v2-binding.js +4 -4
- package/neural-interface/public/shared/ocp-v2/ocp-v2-changes-logic.js +3 -101
- package/neural-interface/public/shared/ocp-v2/ocp-v2-childpanel.js +2 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-compact-button.js +1 -3
- package/neural-interface/public/shared/ocp-v2/ocp-v2-composer-logic.js +2 -6
- package/neural-interface/public/shared/ocp-v2/ocp-v2-context-menu.js +11 -11
- package/neural-interface/public/shared/ocp-v2/ocp-v2-context-model.js +0 -3
- package/neural-interface/public/shared/ocp-v2/ocp-v2-events.js +8 -4
- package/neural-interface/public/shared/ocp-v2/ocp-v2-manager.js +7 -7
- package/neural-interface/public/shared/ocp-v2/ocp-v2-outcome-notifications.js +16 -0
- package/neural-interface/public/shared/ocp-v2/ocp-v2-panel.js +74 -259
- package/neural-interface/public/shared/ocp-v2/ocp-v2-plan.js +1 -2
- package/neural-interface/public/shared/ocp-v2/ocp-v2-projectbar.js +95 -202
- package/neural-interface/public/shared/ocp-v2/ocp-v2-rehydrate.js +13 -4
- package/neural-interface/public/shared/ocp-v2/ocp-v2-render.js +13 -22
- package/neural-interface/public/shared/ocp-v2/ocp-v2-send.js +4 -4
- package/neural-interface/public/shared/ocp-v2/ocp-v2-session-actions.js +8 -61
- package/neural-interface/public/shared/ocp-v2/ocp-v2-sessions-logic.js +2 -91
- package/neural-interface/public/shared/ocp-v2/ocp-v2-slash-hints.js +16 -15
- package/neural-interface/public/shared/ocp-v2/ocp-v2-state.js +8 -21
- package/neural-interface/public/shared/ocp-v2/ocp-v2-status-logic.js +1 -99
- package/neural-interface/public/shared/ocp-v2/ocp-v2-status.js +5 -35
- package/neural-interface/public/shared/ocp-v2/ocp-v2-styles.js +17 -21
- package/neural-interface/public/shared/ocp-v2/{ocp-v2-profile-inheritance.js → ocp-v2-tools-inheritance.js} +16 -16
- package/neural-interface/public/shared/ocp-v2/ocp-v2-ws.js +60 -50
- package/neural-interface/public/shared/page-session.js +96 -0
- package/neural-interface/public/shared/provider-icons.js +4 -2
- package/neural-interface/public/shared/registry.js +5 -3
- package/neural-interface/public/shared/retired-2d.js +3 -0
- package/neural-interface/public/shared/schedules-view.js +195 -61
- package/neural-interface/public/shared/settings/settings-claude-hooks.js +135 -0
- package/neural-interface/public/shared/settings/settings-data.js +3 -1
- package/neural-interface/public/shared/settings/settings-ia.js +6 -6
- package/neural-interface/public/shared/settings/settings-opencode.js +89 -0
- package/neural-interface/public/shared/settings/settings-rules.js +2 -2
- package/neural-interface/public/shared/settings/settings-skill-folders-pane.js +265 -0
- package/neural-interface/public/shared/settings/settings-skill-folders.js +130 -0
- package/neural-interface/public/shared/settings/settings-worker-guard.js +72 -0
- package/neural-interface/public/shared/showcase-privacy.js +6 -1
- package/neural-interface/public/shared/sidepanel-session-status.js +3 -3
- package/neural-interface/public/shared/skills/ss-args.js +96 -0
- package/neural-interface/public/shared/skills/ss-creation.js +222 -0
- package/neural-interface/public/shared/skills/ss-dialog.js +133 -0
- package/neural-interface/public/shared/skills/ss-doc.js +173 -0
- package/neural-interface/public/shared/skills/ss-eval-adapters.js +269 -0
- package/neural-interface/public/shared/skills/ss-eval-grade.js +359 -0
- package/neural-interface/public/shared/skills/ss-eval-optimise.js +153 -0
- package/neural-interface/public/shared/skills/ss-eval-plan.js +315 -0
- package/neural-interface/public/shared/skills/ss-evals.js +417 -0
- package/neural-interface/public/shared/skills/ss-form.js +159 -0
- package/neural-interface/public/shared/skills/ss-frontmatter.js +376 -0
- package/neural-interface/public/shared/skills/ss-ids.js +32 -0
- package/neural-interface/public/shared/skills/ss-lint.js +149 -0
- package/neural-interface/public/shared/skills/ss-presets.js +117 -0
- package/neural-interface/public/shared/skills/ss-profiles.js +513 -0
- package/neural-interface/public/shared/skills/ss-resources.js +165 -0
- package/neural-interface/public/shared/skills/ss-review-view.js +190 -0
- package/neural-interface/public/shared/skills/ss-tabs.js +79 -0
- package/neural-interface/public/shared/skills/ss-unicode.js +135 -0
- package/neural-interface/public/shared/skills/studio/sx-actions.js +222 -0
- package/neural-interface/public/shared/skills/studio/sx-cm.js +101 -0
- package/neural-interface/public/shared/skills/studio/sx-create-ai-view.js +749 -0
- package/neural-interface/public/shared/skills/studio/sx-create-ai.js +237 -0
- package/neural-interface/public/shared/skills/studio/sx-create-view.js +254 -0
- package/neural-interface/public/shared/skills/studio/sx-create.js +126 -0
- package/neural-interface/public/shared/skills/studio/sx-diff-view.js +43 -0
- package/neural-interface/public/shared/skills/studio/sx-diff.js +133 -0
- package/neural-interface/public/shared/skills/studio/sx-docs.js +480 -0
- package/neural-interface/public/shared/skills/studio/sx-dom.js +230 -0
- package/neural-interface/public/shared/skills/studio/sx-edit-view.js +848 -0
- package/neural-interface/public/shared/skills/studio/sx-editor-model.js +193 -0
- package/neural-interface/public/shared/skills/studio/sx-errors.js +22 -0
- package/neural-interface/public/shared/skills/studio/sx-fixes-view.js +359 -0
- package/neural-interface/public/shared/skills/studio/sx-fixes.js +327 -0
- package/neural-interface/public/shared/skills/studio/sx-geometry.js +82 -0
- package/neural-interface/public/shared/skills/studio/sx-import.js +262 -0
- package/neural-interface/public/shared/skills/studio/sx-inspector.js +308 -0
- package/neural-interface/public/shared/skills/studio/sx-install-flow.js +282 -0
- package/neural-interface/public/shared/skills/studio/sx-install.js +313 -0
- package/neural-interface/public/shared/skills/studio/sx-library-view.js +748 -0
- package/neural-interface/public/shared/skills/studio/sx-library.js +479 -0
- package/neural-interface/public/shared/skills/studio/sx-main.js +690 -0
- package/neural-interface/public/shared/skills/studio/sx-operations-view.js +98 -0
- package/neural-interface/public/shared/skills/studio/sx-operations.js +11 -0
- package/neural-interface/public/shared/skills/studio/sx-plan.js +158 -0
- package/neural-interface/public/shared/skills/studio/sx-publish-view.js +621 -0
- package/neural-interface/public/shared/skills/studio/sx-review-view.js +369 -0
- package/neural-interface/public/shared/skills/studio/sx-review.js +148 -0
- package/neural-interface/public/shared/skills/studio/sx-scan.js +35 -0
- package/neural-interface/public/shared/skills/studio/sx-snippets.js +96 -0
- package/neural-interface/public/shared/skills/studio/sx-subject.js +249 -0
- package/neural-interface/public/shared/skills/studio/sx-test-view.js +994 -0
- package/neural-interface/public/shared/skills/studio/sx-test.js +328 -0
- package/neural-interface/public/shared/skills/studio/sx-versions-view.js +241 -0
- package/neural-interface/public/shared/skills/studio/sx-workspace-view.js +426 -0
- package/neural-interface/public/shared/state.js +1 -1
- package/neural-interface/public/shared/streaming-markdown.js +58 -0
- package/neural-interface/public/shared/styleguide/sg-panel.js +4 -2
- package/neural-interface/public/shared/styles.css +1822 -1756
- package/neural-interface/public/shared/synabun-mascot.js +1115 -9
- package/neural-interface/public/shared/text-cache.js +29 -0
- package/neural-interface/public/shared/tool-list-picker.js +55 -0
- package/neural-interface/public/shared/tool-list-storage.js +24 -0
- package/neural-interface/public/shared/tool-list-view.js +112 -0
- package/neural-interface/public/shared/topright-overflow-logic.js +54 -0
- package/neural-interface/public/shared/tour/tour-actor.js +268 -0
- package/neural-interface/public/shared/tour/tour-beats.js +336 -0
- package/neural-interface/public/shared/tour/tour-engine.js +884 -0
- package/neural-interface/public/shared/tour/tour-ink.js +390 -0
- package/neural-interface/public/shared/tour/tour-stage.js +440 -0
- package/neural-interface/public/shared/tour/tour-state.js +40 -0
- package/neural-interface/public/shared/tour/tour-tips.js +99 -0
- package/neural-interface/public/shared/tour/tour.css +144 -0
- package/neural-interface/public/shared/ui-antigravity-panel.js +19 -0
- package/neural-interface/public/shared/ui-assistant.js +2 -0
- package/neural-interface/public/shared/ui-automation-studio.js +111 -140
- package/neural-interface/public/shared/ui-claude-panel.js +376 -82
- package/neural-interface/public/shared/ui-cli-banner.js +23 -167
- package/neural-interface/public/shared/ui-command-runner.js +6 -3
- package/neural-interface/public/shared/ui-context-menu.js +295 -0
- package/neural-interface/public/shared/ui-cost-widget.js +57 -59
- package/neural-interface/public/shared/ui-crash-notice.js +187 -0
- package/neural-interface/public/shared/ui-detail.js +15 -3
- package/neural-interface/public/shared/ui-file-explorer.js +48 -6
- package/neural-interface/public/shared/ui-file-links.js +2 -2
- package/neural-interface/public/shared/ui-games.js +2 -2
- package/neural-interface/public/shared/ui-image-gallery.js +50 -47
- package/neural-interface/public/shared/ui-judgments.js +1 -1
- package/neural-interface/public/shared/ui-keybinds.js +33 -2
- package/neural-interface/public/shared/ui-link.js +3 -3
- package/neural-interface/public/shared/ui-menubar.js +10 -20
- package/neural-interface/public/shared/ui-native-loop-router-state.js +5 -0
- package/neural-interface/public/shared/ui-native-loop-router.js +11 -1
- package/neural-interface/public/shared/ui-navbar.js +49 -24
- package/neural-interface/public/shared/ui-notifications.js +1 -0
- package/neural-interface/public/shared/ui-panels.js +96 -65
- package/neural-interface/public/shared/ui-resume.js +9 -7
- package/neural-interface/public/shared/ui-schedules-studio.js +546 -431
- package/neural-interface/public/shared/ui-scroll-follow.js +16 -5
- package/neural-interface/public/shared/ui-sessions.js +27 -15
- package/neural-interface/public/shared/ui-settings.js +683 -526
- package/neural-interface/public/shared/ui-sidepanel-session-entry.js +9 -2
- package/neural-interface/public/shared/ui-sidepanel-sessions.js +4 -4
- package/neural-interface/public/shared/ui-sidepanel-state.js +23 -12
- package/neural-interface/public/shared/ui-sidepanel-tray.js +48 -7
- package/neural-interface/public/shared/ui-sidepanel-windows.js +18 -13
- package/neural-interface/public/shared/ui-skills.js +33 -2830
- package/neural-interface/public/shared/ui-styleguide.js +5 -2
- package/neural-interface/public/shared/ui-sync.js +15 -5
- package/neural-interface/public/shared/ui-terminal.js +270 -190
- package/neural-interface/public/shared/ui-tool-updates.js +6 -4
- package/neural-interface/public/shared/ui-tooltip.js +81 -51
- package/neural-interface/public/shared/ui-topright-overflow.js +233 -0
- package/neural-interface/public/shared/ui-trash.js +6 -4
- package/neural-interface/public/shared/ui-tutorial-layout.js +3 -117
- package/neural-interface/public/shared/ui-tutorial-preview.js +103 -0
- package/neural-interface/public/shared/ui-tutorial-steps.js +3 -65
- package/neural-interface/public/shared/ui-tutorial.css +47 -100
- package/neural-interface/public/shared/ui-tutorial.js +285 -509
- package/neural-interface/public/shared/ui-update.js +38 -2
- package/neural-interface/public/shared/ui-whiteboard.js +312 -59
- package/neural-interface/public/shared/ui-worker-end.js +5 -1
- package/neural-interface/public/shared/ui-workspaces.js +3 -2
- package/neural-interface/public/shared/view-variant.js +66 -0
- package/neural-interface/public/shared/whatsapp/wa-view.js +3 -3
- package/neural-interface/public/shared/whiteboard-list.js +172 -0
- package/neural-interface/public/shared/worker-end.js +10 -3
- package/neural-interface/public/shared/worker-questions.js +34 -0
- package/neural-interface/public/shared/worker-restart.js +12 -0
- package/neural-interface/public/sidepanel-session.html +2 -2
- package/neural-interface/public/variant/2d/background.js +2 -1
- package/neural-interface/public/variant/2d/context-menu.js +8 -2
- package/neural-interface/public/variant/2d/graph.js +42 -20
- package/neural-interface/public/variant/2d/hulls.js +14 -9
- package/neural-interface/public/variant/2d/lasso.js +11 -7
- package/neural-interface/public/variant/2d/main.js +32 -1
- package/neural-interface/public/variant/2d/minimap.js +11 -13
- package/neural-interface/public/variant/3d/main.js +69 -6
- package/neural-interface/public/variant/3d/map-controls.js +24 -9
- package/neural-interface/public/vendor/caveat/OFL.txt +93 -0
- package/neural-interface/public/vendor/caveat/caveat-latin-400-normal.woff2 +0 -0
- package/neural-interface/public/vendor/caveat/caveat-latin-700-normal.woff2 +0 -0
- package/neural-interface/public/vendor/caveat/caveat.css +17 -0
- package/neural-interface/public/vendor/caveat/manifest.json +12 -0
- package/neural-interface/public/vendor/yaml/LICENSE +13 -0
- package/neural-interface/public/vendor/yaml/manifest.json +4 -0
- package/neural-interface/public/vendor/yaml/yaml-2.9.1.min.js +137 -0
- package/neural-interface/scripts/build-vendor.mjs +32 -0
- package/neural-interface/server.js +4553 -2855
- package/neural-interface/templates/rulesets/README.md +1 -1
- package/neural-interface/templates/rulesets/core.md +1 -1
- package/neural-interface/templates/rulesets/legacy-hashes.json +23 -5
- package/neural-interface/templates/rulesets/manifest.json +8 -8
- package/npm-shrinkwrap.json +34 -12
- package/package.json +17 -3
- package/postinstall.js +9 -4
- package/preuninstall.js +1 -1
- package/setup.js +97 -322
- package/skills/skill-forge/SKILL.md +177 -0
- package/skills/skill-forge/evals/evals.json +54 -0
- package/skills/skill-forge/references/package.md +105 -0
- package/skills/skill-forge/references/review-and-recovery.md +63 -0
- package/skills/skill-forge/references/runtime-profiles.md +20 -0
- package/skills/skill-forge/references/sources-and-capabilities.md +51 -0
- package/skills/synabun/SKILL.md +10 -7
- package/skills/synabun/modules/audit.md +1 -5
- package/skills/synabun/modules/changelog.md +1 -5
- package/skills/synabun/modules/idea.md +1 -1
- package/skills/synabun/modules/memorize.md +6 -9
- package/skills/synabun/modules/schedule.md +6 -6
- package/mcp-server/dist/services/profiles.d.ts +0 -120
- package/mcp-server/dist/services/profiles.d.ts.map +0 -1
- package/mcp-server/dist/services/profiles.js +0 -387
- package/mcp-server/dist/services/profiles.js.map +0 -1
- package/mcp-server/dist/tools/leonardo-browser-tools.d.ts +0 -97
- package/mcp-server/dist/tools/leonardo-browser-tools.d.ts.map +0 -1
- package/mcp-server/dist/tools/leonardo-browser-tools.js +0 -228
- package/mcp-server/dist/tools/leonardo-browser-tools.js.map +0 -1
- package/mcp-server/dist/tools/leonardo.d.ts +0 -13
- package/mcp-server/dist/tools/leonardo.d.ts.map +0 -1
- package/mcp-server/dist/tools/leonardo.js +0 -21
- package/mcp-server/dist/tools/leonardo.js.map +0 -1
- package/mcp-server/dist/tools/profile.d.ts +0 -17
- package/mcp-server/dist/tools/profile.d.ts.map +0 -1
- package/mcp-server/dist/tools/profile.js +0 -114
- package/mcp-server/dist/tools/profile.js.map +0 -1
- package/mcp-server/src/services/profiles.ts +0 -428
- package/mcp-server/src/tools/leonardo-browser-tools.ts +0 -291
- package/mcp-server/src/tools/leonardo.ts +0 -30
- package/mcp-server/src/tools/profile.ts +0 -122
- package/neural-interface/lib/assistant-brains/opencode-browser-policy.js +0 -47
- package/neural-interface/lib/assistant-brains/opencode-route-gate.js +0 -62
- package/neural-interface/lib/mcp-profile-servers.js +0 -120
- package/neural-interface/public/shared/ui-tutorial-draw.js +0 -311
- package/skills/leonardo/SKILL.md +0 -168
- package/skills/leonardo/icon.svg +0 -1
- package/skills/leonardo/modules/browser-guide.md +0 -378
- package/skills/leonardo/modules/image-prompter.md +0 -283
- package/skills/leonardo/modules/model-advisor.md +0 -100
- package/skills/leonardo/modules/prompt-library.md +0 -110
- package/skills/leonardo/modules/style-guide.md +0 -186
- package/skills/leonardo/modules/video-prompter.md +0 -317
- /package/neural-interface/templates/rulesets/{gemini.md → antigravity.md} +0 -0
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { answerWorkerQuestion } from '../worker-questions.js';
|
|
2
|
+
import { cxpText, cxpSessionLabel } from './cdx-copy.js';
|
|
3
|
+
import { codexWantsRolloutPreview, rolloutPreviewApplies } from './cdx-preview.js';
|
|
1
4
|
import { mountCodexSettings } from './cdx-settings.js';
|
|
2
5
|
import { t } from '../i18n.js';
|
|
3
6
|
import { getCliState, isCliInstalling } from '../cli-status.js';
|
|
@@ -13,8 +16,8 @@ import { accountName, accountSummary, accountSwitchPlan, accountText, serverAcco
|
|
|
13
16
|
import { mountAccountMenu } from '../account-menu.js';
|
|
14
17
|
import '../account-i18n.js';
|
|
15
18
|
import { restoreMcpAppCards, teardownMcpApps, retireMcpAppNode, stripMcpAppRuntime } from './cdx-mcp-app-host.js';
|
|
16
|
-
import { renderTurnDiff, completeTurnOutputs } from './cdx-render.js';
|
|
17
|
-
import { hydrateOutputControls } from './cdx-output.js';
|
|
19
|
+
import { renderTurnDiff, completeTurnOutputs, clearMarkdownCache } from './cdx-render.js';
|
|
20
|
+
import { hydrateOutputControls, disposeOutputBlocks } from './cdx-output.js';
|
|
18
21
|
import { sanitizeStoredHtml } from '../assistant/asst-sanitize.js';
|
|
19
22
|
import {
|
|
20
23
|
beginPlanTurn, capturePlanItem, finishPlanTurn, getPlanMarkdown, syncPlanMirrors, recordPlanTurn,
|
|
@@ -31,6 +34,7 @@ import {
|
|
|
31
34
|
} from '../agent-runtime-options.js';
|
|
32
35
|
import { CodexModelCatalog, codexModelAccountKey, codexContextAvailability } from './cdx-model-catalog.js';
|
|
33
36
|
import { nativeLoopWindowId } from '../ui-native-window-id.js';
|
|
37
|
+
import { skillHintEntries, skillsForPrompt, skillsListRequest } from './cdx-skill-hints.js';
|
|
34
38
|
import { syncSidepanelLayout, focusSidepanel, isHostedSessionFocused } from '../ui-sidepanel-windows.js';
|
|
35
39
|
import { notify, NOTIF_TYPE } from '../ui-notifications.js';
|
|
36
40
|
import { createStickyScrollController } from '../ui-scroll-follow.js';
|
|
@@ -203,6 +207,13 @@ function autosizeInput() { _onAutosizeInput?.(); }
|
|
|
203
207
|
function emit(...args) { _onEmit?.(...args); }
|
|
204
208
|
|
|
205
209
|
function sendSocket(msg) {
|
|
210
|
+
if (_boundTab?.automationRunId && msg?.type === 'server_request_response') {
|
|
211
|
+
const tab = _boundTab;
|
|
212
|
+
answerWorkerQuestion(tab.automationRunId, msg.requestId, { behavior: msg.error || ['cancel', 'decline'].includes(msg.result?.action) || ['cancel', 'decline'].includes(msg.result?.decision) ? 'deny' : 'allow', result: msg.result, error: msg.error })
|
|
213
|
+
.then((result) => withTab(tab, () => handleServerRequestResponseResult({ responseToken: msg.responseToken, ok: true, status: result.stale ? 'stale' : 'answered' })),
|
|
214
|
+
(error) => withTab(tab, () => handleServerRequestResponseResult({ responseToken: msg.responseToken, ok: false, status: tab._workerQuestions?.has(String(msg.requestId)) ? 'delivery_failed' : 'stale', retryable: true, error: error.message })));
|
|
215
|
+
return true;
|
|
216
|
+
}
|
|
206
217
|
const packet = msg && _boundTab?.id
|
|
207
218
|
? {
|
|
208
219
|
...msg,
|
|
@@ -275,6 +286,16 @@ function closeAutomationHistorySocket(tab) {
|
|
|
275
286
|
}
|
|
276
287
|
}
|
|
277
288
|
|
|
289
|
+
// The rollout read before Codex's app-server is up (server.js sendEarlyCodexRolloutPreview): shown only for
|
|
290
|
+
// the thread this tab shows, and only while nothing else (a stored snapshot) is on screen. The real history
|
|
291
|
+
// replaces it.
|
|
292
|
+
function paintRolloutPreview(tab, msg) {
|
|
293
|
+
const shownThread = String(_boundTab?.threadId || _threadId || '');
|
|
294
|
+
if (!rolloutPreviewApplies(msg, shownThread, _transcriptSourceType)) return;
|
|
295
|
+
renderHistory(msg.thread, msg.fallbackItems || null);
|
|
296
|
+
placeWorkerEnd(tab);
|
|
297
|
+
}
|
|
298
|
+
|
|
278
299
|
function buildWsCallbacks(tab, options = {}) {
|
|
279
300
|
return {
|
|
280
301
|
onConnecting() {
|
|
@@ -298,7 +319,6 @@ function buildWsCallbacks(tab, options = {}) {
|
|
|
298
319
|
userVerification: true,
|
|
299
320
|
windowId: windowId,
|
|
300
321
|
accountId: _accountId || 'default',
|
|
301
|
-
mcpProfile: tab.mcpProfile || null,
|
|
302
322
|
...codexRuntimeSelection(tab),
|
|
303
323
|
});
|
|
304
324
|
} else {
|
|
@@ -308,9 +328,10 @@ function buildWsCallbacks(tab, options = {}) {
|
|
|
308
328
|
userVerification: true,
|
|
309
329
|
windowId: windowId,
|
|
310
330
|
threadId: _threadId || null,
|
|
331
|
+
// The early rollout preview only for the tab on screen (server.js sendEarlyCodexRolloutPreview).
|
|
332
|
+
preview: codexWantsRolloutPreview(tab, _boundTab, _threadId),
|
|
311
333
|
cwd: _project || null,
|
|
312
334
|
accountId: _accountId || 'default',
|
|
313
|
-
mcpProfile: tab.mcpProfile || null,
|
|
314
335
|
...codexRuntimeSelection(tab),
|
|
315
336
|
});
|
|
316
337
|
}
|
|
@@ -369,7 +390,6 @@ function buildWsCallbacks(tab, options = {}) {
|
|
|
369
390
|
_accountId = msg.accountId;
|
|
370
391
|
if (_boundTab) _boundTab.accountId = _accountId;
|
|
371
392
|
}
|
|
372
|
-
if (msg.mcpProfile && _boundTab) _boundTab.mcpProfile = msg.mcpProfile;
|
|
373
393
|
// A reattached app-server can still have a different process-active
|
|
374
394
|
// thread. Preserve the tab's displayed thread instead of adopting it.
|
|
375
395
|
_threadId = _threadId || msg.threadId || null;
|
|
@@ -395,7 +415,6 @@ function buildWsCallbacks(tab, options = {}) {
|
|
|
395
415
|
threadId: _threadId || null,
|
|
396
416
|
cwd: _project || null,
|
|
397
417
|
accountId: _accountId || 'default',
|
|
398
|
-
mcpProfile: tab.mcpProfile || null,
|
|
399
418
|
...codexRuntimeSelection(tab),
|
|
400
419
|
});
|
|
401
420
|
} else {
|
|
@@ -408,7 +427,6 @@ function buildWsCallbacks(tab, options = {}) {
|
|
|
408
427
|
threadId: _threadId || null,
|
|
409
428
|
cwd: _project || null,
|
|
410
429
|
accountId: _accountId || 'default',
|
|
411
|
-
mcpProfile: tab.mcpProfile || null,
|
|
412
430
|
...codexRuntimeSelection(tab),
|
|
413
431
|
});
|
|
414
432
|
}
|
|
@@ -426,10 +444,6 @@ function buildWsCallbacks(tab, options = {}) {
|
|
|
426
444
|
restoreMcpAppCards(_messagesEl, { tab: _boundTab, items: _items, request: requestSocketPayloadForTab, draft: setMcpAppDraft });
|
|
427
445
|
if (_boundTab) _boundTab.bootstrapped = true;
|
|
428
446
|
ensureCodexTerminalAuth(tab);
|
|
429
|
-
if (msg.mcpProfile && _boundTab) {
|
|
430
|
-
_boundTab.mcpProfile = msg.mcpProfile;
|
|
431
|
-
if (activeTab() === _boundTab) _onActiveTabChanged?.(_boundTab);
|
|
432
|
-
}
|
|
433
447
|
if (Object.prototype.hasOwnProperty.call(msg, 'threadId')) {
|
|
434
448
|
_threadId = msg.threadId || null;
|
|
435
449
|
if (_boundTab) _boundTab.threadId = _threadId;
|
|
@@ -457,6 +471,7 @@ function buildWsCallbacks(tab, options = {}) {
|
|
|
457
471
|
// which rebuilds the transcript: they go back onto it afterwards.
|
|
458
472
|
const heldRequests = heldServerRequests();
|
|
459
473
|
if (msg.thread) {
|
|
474
|
+
if (msg.preview) { paintRolloutPreview(tab, msg); return; }
|
|
460
475
|
if (_boundTab) {
|
|
461
476
|
_boundTab.expectedThreadId = null;
|
|
462
477
|
_boundTab.expectedThreadRequestId = null;
|
|
@@ -694,11 +709,6 @@ function buildWsCallbacks(tab, options = {}) {
|
|
|
694
709
|
}
|
|
695
710
|
renderStatusChrome();
|
|
696
711
|
}
|
|
697
|
-
if (msg.type === 'mcp_profile_changed' && msg.profile) {
|
|
698
|
-
if (_boundTab) _boundTab.mcpProfile = msg.profile;
|
|
699
|
-
if (activeTab() === _boundTab) _onActiveTabChanged?.(_boundTab);
|
|
700
|
-
saveTabs();
|
|
701
|
-
}
|
|
702
712
|
if (msg.type === 'mcp_approval_updated' && msg.name) {
|
|
703
713
|
const server = _mcpServers.get(msg.name);
|
|
704
714
|
if (server) {
|
|
@@ -769,6 +779,7 @@ let _projectThreads = parseStoredJson(STOR.projectThreads, {});
|
|
|
769
779
|
// async; getThreadSnapshot returns null pre-hydration and renderHistory falls
|
|
770
780
|
// back to SDK/JSONL items.
|
|
771
781
|
let _threadSnapshots = {};
|
|
782
|
+
let _threadSnapshotsHydrated = false;
|
|
772
783
|
const _threadSnapshotsReady = fetchBlobNamespace('codex-snapshots')
|
|
773
784
|
.then((map) => {
|
|
774
785
|
const valid = {};
|
|
@@ -784,7 +795,8 @@ const _threadSnapshotsReady = fetchBlobNamespace('codex-snapshots')
|
|
|
784
795
|
_threadSnapshots = { ...valid, ..._threadSnapshots };
|
|
785
796
|
try { if (storage.getItem(STOR.threadSnapshots)) storage.removeItem(STOR.threadSnapshots); } catch {}
|
|
786
797
|
})
|
|
787
|
-
.catch(() => {})
|
|
798
|
+
.catch(() => {})
|
|
799
|
+
.finally(() => { _threadSnapshotsHydrated = true; });
|
|
788
800
|
let _tabs = [];
|
|
789
801
|
let _activeTabIdx = -1;
|
|
790
802
|
let _boundTab = null;
|
|
@@ -848,6 +860,9 @@ let _interruptRetried = false;
|
|
|
848
860
|
let _prevInputTokens = 0;
|
|
849
861
|
let _skillsCache = null;
|
|
850
862
|
let _skillsPromise = null;
|
|
863
|
+
// A skills:changed arrived since the list was last read: the next skills_list asks the app-server to reload its skills
|
|
864
|
+
// (cdx-skill-hints.js skillsListRequest).
|
|
865
|
+
let _skillsChanged = false;
|
|
851
866
|
let _blockingServerRequests = new Map();
|
|
852
867
|
let _bufferedSocketMessages = [];
|
|
853
868
|
|
|
@@ -1861,14 +1876,19 @@ async function restoreCanonicalPlan(tab, thread) {
|
|
|
1861
1876
|
}
|
|
1862
1877
|
|
|
1863
1878
|
// ── Formatting & helpers (lines 1148-1421) ──
|
|
1879
|
+
function codexStatusText(status) {
|
|
1880
|
+
const known = {"pending": "pending", "completed": "completed", "complete": "complete", "inProgress": "in progress", "failed": "failed", "declined": "declined"};
|
|
1881
|
+
return Object.hasOwn(known, status) ? cxpText(`status_${status}`, known[status]) : status;
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1864
1884
|
export function formatStatus(status) {
|
|
1865
|
-
if (!status) return 'pending';
|
|
1866
|
-
if (typeof status === 'string') return status;
|
|
1885
|
+
if (!status) return codexStatusText('pending');
|
|
1886
|
+
if (typeof status === 'string') return codexStatusText(status);
|
|
1867
1887
|
if (typeof status === 'object') {
|
|
1868
1888
|
const [key, val] = Object.entries(status)[0] || [];
|
|
1869
|
-
if (!key) return 'pending';
|
|
1870
|
-
if (val && typeof val === 'object' && val.message) return `${key}: ${val.message}`;
|
|
1871
|
-
return key;
|
|
1889
|
+
if (!key) return codexStatusText('pending');
|
|
1890
|
+
if (val && typeof val === 'object' && val.message) return `${codexStatusText(key)}: ${val.message}`;
|
|
1891
|
+
return codexStatusText(key);
|
|
1872
1892
|
}
|
|
1873
1893
|
return String(status);
|
|
1874
1894
|
}
|
|
@@ -2457,10 +2477,10 @@ export function setSessionLabel(label, { persist = true } = {}) {
|
|
|
2457
2477
|
}
|
|
2458
2478
|
if (isActiveTab(_boundTab)) {
|
|
2459
2479
|
const labelEl = panelEl('#cxp-session-label');
|
|
2460
|
-
if (labelEl) labelEl.replaceChildren(document.createTextNode(_sessionLabel));
|
|
2480
|
+
if (labelEl) labelEl.replaceChildren(document.createTextNode(cxpSessionLabel(_sessionLabel)));
|
|
2461
2481
|
// The whole name, for when the header shows only part of it.
|
|
2462
2482
|
const sessionBtn = panelEl('#cxp-session-btn');
|
|
2463
|
-
if (sessionBtn) sessionBtn.title = _sessionLabel;
|
|
2483
|
+
if (sessionBtn) sessionBtn.title = cxpSessionLabel(_sessionLabel);
|
|
2464
2484
|
syncLegacyState();
|
|
2465
2485
|
}
|
|
2466
2486
|
updateTrayPillLabel();
|
|
@@ -2508,6 +2528,11 @@ function scheduleCodexTitleReassert(tab) {
|
|
|
2508
2528
|
|
|
2509
2529
|
function applyCodexProviderTitle(title) {
|
|
2510
2530
|
const tab = _boundTab;
|
|
2531
|
+
// Dispatch metadata owns the panel label; reading history must never rename the provider thread.
|
|
2532
|
+
if (tab?.automationRunId) {
|
|
2533
|
+
setSessionLabel(tab.automationTitle || tab.sessionLabel);
|
|
2534
|
+
return;
|
|
2535
|
+
}
|
|
2511
2536
|
const incoming = normalizeSessionLabel(title || '');
|
|
2512
2537
|
const desiredTitle = normalizeSessionLabel(tab?.pendingSessionLabel || tab?.sessionLabel || '');
|
|
2513
2538
|
const authoritative = tab
|
|
@@ -2630,6 +2655,9 @@ function disposeDiscardedTab(tab) {
|
|
|
2630
2655
|
clearTimeout(tab.snapshotTimer);
|
|
2631
2656
|
tab.snapshotTimer = null;
|
|
2632
2657
|
}
|
|
2658
|
+
tab.scrollController?.destroy();
|
|
2659
|
+
tab.scrollController = null;
|
|
2660
|
+
disposeOutputBlocks(tab.messagesEl);
|
|
2633
2661
|
tab.messagesEl?.remove();
|
|
2634
2662
|
tab.pillEl?.remove();
|
|
2635
2663
|
}
|
|
@@ -2718,9 +2746,37 @@ export function renderProjects() {
|
|
|
2718
2746
|
ddPopulate(projectDropdown, projectItemsForValue(_project), _project);
|
|
2719
2747
|
}
|
|
2720
2748
|
|
|
2749
|
+
function paintInitialThreadSnapshot(tab) {
|
|
2750
|
+
if (!tab || tab.closed || !tab.threadId || tab.transcriptSourceType || tab.automationRunId) return false;
|
|
2751
|
+
const expectedThreadId = String(tab.threadId);
|
|
2752
|
+
let painted = false;
|
|
2753
|
+
withTab(tab, () => {
|
|
2754
|
+
const snap = getThreadSnapshot(expectedThreadId);
|
|
2755
|
+
if (!snap) return;
|
|
2756
|
+
painted = renderStoredTranscript(snap, 'Continue this Codex thread or start a fresh one.');
|
|
2757
|
+
if (painted) {
|
|
2758
|
+
updateThreadTokenUsage(tab.threadTokenUsage || snap.threadTokenUsage || null);
|
|
2759
|
+
renderPostPlanActions(tab);
|
|
2760
|
+
renderPostCompactionActions(tab);
|
|
2761
|
+
placeWorkerEnd(tab);
|
|
2762
|
+
}
|
|
2763
|
+
});
|
|
2764
|
+
if (!painted && !_threadSnapshotsHydrated && !tab._pendingSnapshotPaint) {
|
|
2765
|
+
tab._pendingSnapshotPaint = true;
|
|
2766
|
+
_threadSnapshotsReady.finally(() => {
|
|
2767
|
+
tab._pendingSnapshotPaint = false;
|
|
2768
|
+
if (!tab.closed && tab.threadId === expectedThreadId && !tab.transcriptSourceType) {
|
|
2769
|
+
paintInitialThreadSnapshot(tab);
|
|
2770
|
+
}
|
|
2771
|
+
});
|
|
2772
|
+
}
|
|
2773
|
+
return painted;
|
|
2774
|
+
}
|
|
2775
|
+
|
|
2721
2776
|
export function updateActiveTabView() {
|
|
2722
2777
|
const tab = activeTab();
|
|
2723
2778
|
if (!_getPanelEl() || !tab) return;
|
|
2779
|
+
paintInitialThreadSnapshot(tab);
|
|
2724
2780
|
bindTabState(tab);
|
|
2725
2781
|
_onActiveTabChanged?.(tab);
|
|
2726
2782
|
_tabs.forEach((entry) => {
|
|
@@ -2788,7 +2844,6 @@ export function createTab(saved = {}, { autoSwitch = true } = {}) {
|
|
|
2788
2844
|
const inheritedAccountId = saved.accountId ?? activeTab()?.accountId ?? 'default';
|
|
2789
2845
|
const inheritedEffort = saved.effort ?? activeTab()?.effort ?? (storage.getItem(STOR.effort) || 'off');
|
|
2790
2846
|
const inheritedAutoAccept = codexNewTabAutoAccept(saved, activeTab(), storedAutoAccept());
|
|
2791
|
-
const inheritedMcpProfile = saved.mcpProfile ?? null;
|
|
2792
2847
|
const automationRunId = saved.automationRunId || null;
|
|
2793
2848
|
const inheritedPlanMode = automationRunId ? false : (saved.planMode ?? activeTab()?.planMode ?? false);
|
|
2794
2849
|
const hasExplicitTitle = !!title && !['new session', 'saved session', 'untitled session', 'codex'].includes(title.toLowerCase());
|
|
@@ -2816,7 +2871,6 @@ export function createTab(saved = {}, { autoSwitch = true } = {}) {
|
|
|
2816
2871
|
extendedContextVerificationArmed: false,
|
|
2817
2872
|
effort: inheritedEffort,
|
|
2818
2873
|
autoAccept: inheritedAutoAccept,
|
|
2819
|
-
mcpProfile: inheritedMcpProfile,
|
|
2820
2874
|
planMode: inheritedPlanMode,
|
|
2821
2875
|
sessionListRequest: null,
|
|
2822
2876
|
threadStartRequest: null,
|
|
@@ -2898,6 +2952,7 @@ export function createTab(saved = {}, { autoSwitch = true } = {}) {
|
|
|
2898
2952
|
isolationRejections: {},
|
|
2899
2953
|
ownedThreadIds: new Set(),
|
|
2900
2954
|
automationRunId,
|
|
2955
|
+
automationTitle: automationRunId ? (saved.automationTitle || title || '') : '',
|
|
2901
2956
|
automationActive: !!saved.automationActive,
|
|
2902
2957
|
automationAwaits: false, // the run's turn ended asking the user (runAwaitsAnswer, set by its attach): the pill needs you
|
|
2903
2958
|
automationOwnerId: saved.automationOwnerId || null,
|
|
@@ -2945,6 +3000,8 @@ export function closeTab(idx, { detachAutomation = false } = {}) {
|
|
|
2945
3000
|
tab.closed = true;
|
|
2946
3001
|
tab.titleRequestController?.abort();
|
|
2947
3002
|
tab.titleRequestController = null;
|
|
3003
|
+
tab.authView?.dispose();
|
|
3004
|
+
tab.terminalAuthView?.dispose();
|
|
2948
3005
|
if (tab.titleReassertTimer) clearTimeout(tab.titleReassertTimer);
|
|
2949
3006
|
flushThreadSnapshotSave(tab);
|
|
2950
3007
|
withTab(tab, () => {
|
|
@@ -2967,11 +3024,16 @@ export function closeTab(idx, { detachAutomation = false } = {}) {
|
|
|
2967
3024
|
}
|
|
2968
3025
|
tab.scrollController?.destroy();
|
|
2969
3026
|
tab.scrollController = null;
|
|
3027
|
+
disposeOutputBlocks(tab.messagesEl);
|
|
2970
3028
|
if (tab.messagesEl) retireMcpAppNode(tab.messagesEl, () => tab.messagesEl.remove());
|
|
2971
3029
|
tab.pillEl?.remove();
|
|
2972
3030
|
_tabs.splice(idx, 1);
|
|
2973
3031
|
if (!_tabs.length) {
|
|
2974
3032
|
_activeTabIdx = -1;
|
|
3033
|
+
// The module binding otherwise keeps the last closed transcript, its item
|
|
3034
|
+
// and request maps, and every closure on their DOM alive indefinitely.
|
|
3035
|
+
bindTabState(null);
|
|
3036
|
+
clearMarkdownCache();
|
|
2975
3037
|
saveTabs();
|
|
2976
3038
|
renderPills();
|
|
2977
3039
|
_setVisible(false);
|
|
@@ -3039,7 +3101,6 @@ export function saveTabs() {
|
|
|
3039
3101
|
contextMode: normalizeCodexContextMode(tab.contextMode),
|
|
3040
3102
|
effort: tab.effort || 'off',
|
|
3041
3103
|
autoAccept: !!tab.autoAccept,
|
|
3042
|
-
mcpProfile: tab.mcpProfile || null,
|
|
3043
3104
|
planMode: !!tab.planMode,
|
|
3044
3105
|
planFilePath: tab.planFilePath || '',
|
|
3045
3106
|
planContent: tab.planContent || '',
|
|
@@ -3062,6 +3123,7 @@ export function saveTabs() {
|
|
|
3062
3123
|
postCompactionPending: tab.postCompactionPromptSource === 'manual' && !!tab.postCompactionPending,
|
|
3063
3124
|
postCompactionPromptSource: tab.postCompactionPromptSource === 'manual' ? 'manual' : '',
|
|
3064
3125
|
automationRunId: tab.automationRunId || null,
|
|
3126
|
+
automationTitle: tab.automationTitle || '',
|
|
3065
3127
|
automationActive: !!tab.automationActive,
|
|
3066
3128
|
automationOwnerId: tab.automationOwnerId || null,
|
|
3067
3129
|
releasedRunId: tab.releasedRunId || null,
|
|
@@ -3165,7 +3227,13 @@ export function restoreTabs() {
|
|
|
3165
3227
|
if (tab && !tab.automationRunId && (saved.running || saved.startingThread || saved.needsYou)) wereWorking.push(tab);
|
|
3166
3228
|
}
|
|
3167
3229
|
if (!_tabs.length) throw new Error('No restorable Codex tabs');
|
|
3168
|
-
|
|
3230
|
+
const pendingTabId = globalThis.__synabunPendingTab?.provider === 'codex'
|
|
3231
|
+
? String(globalThis.__synabunPendingTab.tabId || '')
|
|
3232
|
+
: '';
|
|
3233
|
+
const pendingIdx = pendingTabId ? _tabs.findIndex((entry) => String(entry.id) === pendingTabId) : -1;
|
|
3234
|
+
_activeTabIdx = pendingIdx >= 0
|
|
3235
|
+
? pendingIdx
|
|
3236
|
+
: Math.min(Math.max(Number(data.activeIdx) || 0, 0), _tabs.length - 1);
|
|
3169
3237
|
pruneDiscardableTabs({ keepTab: activeTab(), persist: false });
|
|
3170
3238
|
if (!_tabs.length) throw new Error('No restorable Codex tabs');
|
|
3171
3239
|
updateActiveTabView();
|
|
@@ -3520,7 +3588,7 @@ export function setThread(thread) {
|
|
|
3520
3588
|
_freshThread = false;
|
|
3521
3589
|
// History and a new thread carry the provider's name or, without one, the
|
|
3522
3590
|
// first prompt. A name the user gave stays, and is sent to the provider again.
|
|
3523
|
-
if (_boundTab?.titleByUser && hasCustomSessionLabel(_boundTab)) {
|
|
3591
|
+
if (_boundTab?.automationRunId || (_boundTab?.titleByUser && hasCustomSessionLabel(_boundTab))) {
|
|
3524
3592
|
applyCodexProviderTitle(getThreadLabel(thread, _sessionLabel || 'New session'));
|
|
3525
3593
|
} else {
|
|
3526
3594
|
setSessionLabel(getThreadLabel(thread, 'New session'));
|
|
@@ -4597,6 +4665,7 @@ export function promptNameNewSession() {
|
|
|
4597
4665
|
try {
|
|
4598
4666
|
const statusResponse = await fetch(`/api/git/status?path=${encodeURIComponent(chosenProject)}`);
|
|
4599
4667
|
const status = statusResponse.ok ? await statusResponse.json() : null;
|
|
4668
|
+
if (!status?.ok || !status.isGit || status.partial || status.stale || status.timedOut) throw new Error(status?.error || 'Git status is incomplete. Refresh before switching branches.');
|
|
4600
4669
|
const shouldCheckout = !status?.changes?.length || window.confirm(
|
|
4601
4670
|
`Switch from ${branchOriginal} to ${chosenBranch} with ${status.changes.length} uncommitted change${status.changes.length === 1 ? '' : 's'}? Git will preserve them when possible.`,
|
|
4602
4671
|
);
|
|
@@ -5140,6 +5209,10 @@ export function dispatchPrompt(prompt, { tab = activeTab(), images = null, paths
|
|
|
5140
5209
|
};
|
|
5141
5210
|
if (tab?.model) msg.model = tab.model;
|
|
5142
5211
|
if (tab?.effort && tab.effort !== 'off') msg.effort = tab.effort;
|
|
5212
|
+
// A native skill picked from the hints (SK-050): sent as Codex's own skill input, once.
|
|
5213
|
+
const nativeSkills = skillsForPrompt(inputText, tab?.pendingSkill);
|
|
5214
|
+
if (nativeSkills.length) msg.skills = nativeSkills;
|
|
5215
|
+
if (tab) tab.pendingSkill = null;
|
|
5143
5216
|
// A person's own turn: the greeting engine keeps when they were last here. The greeting this
|
|
5144
5217
|
// tab opened with goes back once, with the first prompt of its new thread.
|
|
5145
5218
|
msg.human = true;
|
|
@@ -5968,7 +6041,7 @@ export function syncToolbarState() {
|
|
|
5968
6041
|
effortBtn.title = `Reasoning effort: ${selected?.label || effort}`;
|
|
5969
6042
|
effortBtn.classList.toggle('active', effort !== 'off');
|
|
5970
6043
|
const label = effortBtn.querySelector('.cxp-btn-label');
|
|
5971
|
-
if (label) label.textContent = effort === 'off' ? 'Effort' : (selected?.label || effort);
|
|
6044
|
+
if (label) label.textContent = effort === 'off' ? cxpText('effortLabel', 'Effort') : cxpText(`effort_${effort}`, selected?.label || effort);
|
|
5972
6045
|
const dots = effortBtn.querySelectorAll('.cxp-effort-dots i');
|
|
5973
6046
|
const litCount = Math.max(0, options.findIndex((option) => option.id === effort));
|
|
5974
6047
|
dots.forEach((d, i) => d.classList.toggle('lit', i < litCount));
|
|
@@ -5999,7 +6072,7 @@ export function syncToolbarState() {
|
|
|
5999
6072
|
contextBtn.disabled = !!(tab?.running || tab?.startingThread || tab?.compacting)
|
|
6000
6073
|
|| (mode !== 'extended' && !supportsExtended);
|
|
6001
6074
|
const label = contextBtn.querySelector('.cxp-btn-label');
|
|
6002
|
-
if (label) label.textContent = mode === 'extended' ? 'Extended' : 'Default';
|
|
6075
|
+
if (label) label.textContent = mode === 'extended' ? cxpText('extended', 'Extended') : cxpText('default', 'Default');
|
|
6003
6076
|
if (availability.reason) {
|
|
6004
6077
|
contextBtn.title = availability.reason;
|
|
6005
6078
|
} else if (mode !== 'extended') {
|
|
@@ -6547,8 +6620,9 @@ function setModelForTab(tab, model) {
|
|
|
6547
6620
|
function setEffortForTab(tab, effort) {
|
|
6548
6621
|
if (!tab) return false;
|
|
6549
6622
|
const normalized = String(effort || '').trim().toLowerCase();
|
|
6550
|
-
const nextEffort = normalized === 'default' || normalized === 'none' ? 'off' : normalized;
|
|
6551
6623
|
const supported = effortOptionsForTab(tab);
|
|
6624
|
+
// 'none' is a real level on models that advertise it; elsewhere it means the default.
|
|
6625
|
+
const nextEffort = normalized === 'default' || (normalized === 'none' && !supported.some((option) => option.id === 'none')) ? 'off' : normalized;
|
|
6552
6626
|
if (!supported.some((option) => option.id === nextEffort)) {
|
|
6553
6627
|
withTab(tab, () => appendSystem(`Unsupported reasoning effort for ${tab.model || 'this model'}: ${effort}. Use ${supported.map((option) => option.id).join(', ')}.`, 'error'));
|
|
6554
6628
|
return false;
|
|
@@ -7215,6 +7289,15 @@ export function renderImageStrip() {
|
|
|
7215
7289
|
// ── Whiteboard "Send to Panel" — receive image via event bus ──
|
|
7216
7290
|
// Any window or surface changed a Codex account (signed in or out, a key, its mode, renamed, added,
|
|
7217
7291
|
// removed): the menu re-reads the list, and the tabs on that account re-check sign-in.
|
|
7292
|
+
// A skill was installed, removed or changed (Skills Studio, Settings, an agent): the app-server is asked to reload its
|
|
7293
|
+
// skills at once (it does not watch the folders itself), so the hints and the thread's skills are current before the
|
|
7294
|
+
// next "/" is typed.
|
|
7295
|
+
appOn('sync:skills:changed', () => {
|
|
7296
|
+
_skillsCache = null; _skillsPromise = null; _skillsChanged = true;
|
|
7297
|
+
if (!activeTab()) return;
|
|
7298
|
+
_skillsPromise = loadSlashCommands().catch(() => {}).finally(() => { _skillsPromise = null; });
|
|
7299
|
+
});
|
|
7300
|
+
|
|
7218
7301
|
appOn('sync:codex:accounts-changed', (msg = {}) => {
|
|
7219
7302
|
refreshCodexAccounts().catch(() => {});
|
|
7220
7303
|
for (const tab of _tabs) if (!msg.accountId || serverAccountId(tab.accountId) === msg.accountId) void tab.terminalAuthView?.refresh();
|
|
@@ -7491,16 +7574,12 @@ export async function loadSlashCommands() {
|
|
|
7491
7574
|
if (!tab) return commands;
|
|
7492
7575
|
const capabilities = await getCodexCapabilities(tab);
|
|
7493
7576
|
commands = codexCommandHints(capabilities);
|
|
7494
|
-
const
|
|
7577
|
+
const reload = _skillsChanged;
|
|
7578
|
+
const data = await requestSocketPayloadForTab(tab, 'skills_list', skillsListRequest(tab, reload));
|
|
7579
|
+
if (reload) _skillsChanged = false;
|
|
7495
7580
|
const seen = new Set(BUILTIN_SLASH_COMMANDS.map((entry) => entry.cmd));
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
.map((skill) => ({
|
|
7499
|
-
cmd: '/' + String(skill.name || skill.dirName || '').trim(),
|
|
7500
|
-
desc: String(skill.description || '').trim(),
|
|
7501
|
-
}))
|
|
7502
|
-
.filter((skill) => skill.cmd !== '/' && !seen.has(skill.cmd))
|
|
7503
|
-
.sort((a, b) => a.cmd.localeCompare(b.cmd));
|
|
7581
|
+
// Each native skill keeps its SKILL.md path: picking it sends Codex's own skill input (cdx-skill-hints.js).
|
|
7582
|
+
const skillCommands = skillHintEntries(flattenNativeCatalog(data, 'skills'), seen);
|
|
7504
7583
|
_skillsCache = [...commands, ...skillCommands];
|
|
7505
7584
|
} catch {
|
|
7506
7585
|
_skillsCache = commands;
|
|
@@ -7563,15 +7642,19 @@ export function showSlashHints(text) {
|
|
|
7563
7642
|
descSpan.className = 'cxp-slash-hint-desc';
|
|
7564
7643
|
descSpan.textContent = c.desc;
|
|
7565
7644
|
item.append(cmdSpan, descSpan);
|
|
7566
|
-
item.
|
|
7645
|
+
item._hint = c;
|
|
7646
|
+
item.addEventListener('click', () => selectSlashHint(c.cmd, c));
|
|
7567
7647
|
hintsEl.appendChild(item);
|
|
7568
7648
|
});
|
|
7569
7649
|
}
|
|
7570
7650
|
|
|
7571
|
-
export function selectSlashHint(cmd) {
|
|
7651
|
+
export function selectSlashHint(cmd, hint = null) {
|
|
7572
7652
|
const input = panelEl('#cxp-input');
|
|
7573
7653
|
hideComposerHints();
|
|
7574
7654
|
if (!input) return;
|
|
7655
|
+
// A native skill picked here goes as Codex's own skill input with the prompt, while the prompt starts with it.
|
|
7656
|
+
const pickTab = activeTab();
|
|
7657
|
+
if (pickTab) pickTab.pendingSkill = hint?.skill ? { cmd: hint.cmd, name: hint.skill.name, path: hint.skill.path } : null;
|
|
7575
7658
|
const command = CODEX_COMMAND_BY_NAME.get(String(cmd).replace(/^\//, ''));
|
|
7576
7659
|
if (command?.name === 'model') {
|
|
7577
7660
|
panelEl('#cxp-model')?.classList.toggle('open');
|
|
@@ -7609,7 +7692,7 @@ export function confirmSlashHint() {
|
|
|
7609
7692
|
return true;
|
|
7610
7693
|
}
|
|
7611
7694
|
const cmdEl = items[_slashActiveIdx]?.querySelector('.cxp-slash-hint-cmd');
|
|
7612
|
-
if (cmdEl) selectSlashHint(cmdEl.textContent);
|
|
7695
|
+
if (cmdEl) selectSlashHint(cmdEl.textContent, items[_slashActiveIdx]._hint || null);
|
|
7613
7696
|
return true;
|
|
7614
7697
|
}
|
|
7615
7698
|
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
// ═══════════════════════════════════════════
|
|
2
|
+
// SynaBun Neural Interface — one CLI's install state, for a side panel (no DOM)
|
|
3
|
+
// ═══════════════════════════════════════════
|
|
4
|
+
//
|
|
5
|
+
// What a panel needs to show for its CLI and to act on it: the latest answer of
|
|
6
|
+
// /api/system/tool-versions (cli-status.js), an install this page started or
|
|
7
|
+
// follows (POST /api/cli/install/:tool, or one another window started), a
|
|
8
|
+
// "failed to start" a session reported, Add to PATH, Re-check. One controller
|
|
9
|
+
// per panel; `onChange(view)` hears every change, `view()` is
|
|
10
|
+
// cli-install-view.js cliBannerView() plus `checking` (a Re-check is under way)
|
|
11
|
+
// and `nudging` (a held-back send asked for attention a moment ago).
|
|
12
|
+
//
|
|
13
|
+
// ui-cli-banner.js paints it as the Claude, Codex and OpenCode panels' banner;
|
|
14
|
+
// the Antigravity panel paints it as its setup card (agy/agy-setup.js).
|
|
15
|
+
|
|
16
|
+
import { subscribeCliStatus, recheckCliStatus, getCliDocUrl, getCliInstallCommand, getCliLabel, installCli, followCliInstall, getCliInstallJobs, addCliToPath } from './cli-status.js';
|
|
17
|
+
import { cliBannerView, cliInstallText, cliStateOf, reduceInstallJob, INSTALLABLE_CLIS } from './cli-install-view.js';
|
|
18
|
+
|
|
19
|
+
/** How long the note about where an install put the CLI stays, when it has one. */
|
|
20
|
+
export const DONE_NOTICE_MS = 12000;
|
|
21
|
+
export const NUDGE_MS = 700;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @param {object} o
|
|
25
|
+
* @param {string} o.toolKey 'claude-code' | 'codex' | 'opencode' | 'antigravity'
|
|
26
|
+
* @param {(view: object) => void} [o.onChange]
|
|
27
|
+
* @param {number} [o.doneNoticeMs]
|
|
28
|
+
* @param {number} [o.nudgeMs]
|
|
29
|
+
*/
|
|
30
|
+
export function createCliInstallController({ toolKey, onChange = () => {}, doneNoticeMs = DONE_NOTICE_MS, nudgeMs = NUDGE_MS } = {}) {
|
|
31
|
+
let info = null; // this CLI in the latest answer of /api/system/tool-versions (null: none yet)
|
|
32
|
+
let forced = null; // { reason }: a session could not start it, and the server was not asked again yet
|
|
33
|
+
let job = null; // the install under way or just ended (cli-install-view.js reduceInstallJob)
|
|
34
|
+
let installing = false;
|
|
35
|
+
let addingPath = false;
|
|
36
|
+
let pathError = '';
|
|
37
|
+
let checking = false;
|
|
38
|
+
let looked = false; // asked whether the server is already installing it since it went missing
|
|
39
|
+
let doneTimer = null;
|
|
40
|
+
let nudgeTimer = null;
|
|
41
|
+
let destroyed = false;
|
|
42
|
+
|
|
43
|
+
const view = () => ({
|
|
44
|
+
...cliBannerView({
|
|
45
|
+
toolKey,
|
|
46
|
+
label: getCliLabel(toolKey),
|
|
47
|
+
info,
|
|
48
|
+
forced,
|
|
49
|
+
job,
|
|
50
|
+
addingPath, pathError,
|
|
51
|
+
guideUrl: getCliDocUrl(toolKey),
|
|
52
|
+
installCommand: getCliInstallCommand(toolKey),
|
|
53
|
+
}, { t: cliInstallText }),
|
|
54
|
+
checking,
|
|
55
|
+
nudging: !!nudgeTimer,
|
|
56
|
+
job,
|
|
57
|
+
info,
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
const changed = () => {
|
|
61
|
+
if (destroyed) return;
|
|
62
|
+
try { onChange(view()); } catch (error) { console.error('[cli-install] onChange:', error); }
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
function clearDone() {
|
|
66
|
+
clearTimeout(doneTimer);
|
|
67
|
+
doneTimer = null;
|
|
68
|
+
if (job?.phase === 'done') job = null;
|
|
69
|
+
changed();
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function apply(event) {
|
|
73
|
+
if (!job && event?.type !== 'start') job = reduceInstallJob(null, { type: 'start' });
|
|
74
|
+
job = reduceInstallJob(job, event);
|
|
75
|
+
if (event?.type === 'done' && event.ok && event.status && typeof event.status === 'object') {
|
|
76
|
+
info = event.status;
|
|
77
|
+
forced = null;
|
|
78
|
+
}
|
|
79
|
+
changed();
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function settle(final) {
|
|
83
|
+
if (job?.phase === 'running' && final) job = reduceInstallJob(job, final);
|
|
84
|
+
if (job?.phase === 'done') {
|
|
85
|
+
clearTimeout(doneTimer);
|
|
86
|
+
const where = job.path;
|
|
87
|
+
if (where && (where.onPath === false || where.added === true)) doneTimer = setTimeout(clearDone, doneNoticeMs);
|
|
88
|
+
else job = null;
|
|
89
|
+
}
|
|
90
|
+
changed();
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
async function install() {
|
|
94
|
+
if (installing || !INSTALLABLE_CLIS.includes(toolKey)) return null;
|
|
95
|
+
installing = true;
|
|
96
|
+
clearTimeout(doneTimer);
|
|
97
|
+
job = reduceInstallJob(null, { type: 'start' });
|
|
98
|
+
changed();
|
|
99
|
+
let final = null;
|
|
100
|
+
try {
|
|
101
|
+
final = await installCli(toolKey, { onEvent: apply });
|
|
102
|
+
} catch (error) {
|
|
103
|
+
final = { type: 'done', ok: false, code: 'internal', error: error?.message || null };
|
|
104
|
+
} finally {
|
|
105
|
+
installing = false;
|
|
106
|
+
settle(final);
|
|
107
|
+
}
|
|
108
|
+
return final;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
async function addPath() {
|
|
112
|
+
if (addingPath) return;
|
|
113
|
+
addingPath = true; pathError = ''; changed();
|
|
114
|
+
try {
|
|
115
|
+
const result = await addCliToPath(toolKey);
|
|
116
|
+
info = { ...info, pathStatus: { dir: result.dir, onPath: true, canAdd: false } };
|
|
117
|
+
job = reduceInstallJob(null, { type: 'done', ok: true, status: info, path: { ...result, added: true } });
|
|
118
|
+
settle();
|
|
119
|
+
} catch (error) { pathError = error.message; }
|
|
120
|
+
finally { addingPath = false; changed(); }
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// An install the server is already running (another window started it, or this page was reloaded during
|
|
124
|
+
// one): followed here as if this page had started it.
|
|
125
|
+
async function followRunning() {
|
|
126
|
+
if (installing) return;
|
|
127
|
+
const jobs = await getCliInstallJobs();
|
|
128
|
+
if (destroyed || installing || jobs?.[toolKey]?.state !== 'running') return;
|
|
129
|
+
installing = true;
|
|
130
|
+
job = reduceInstallJob(null, { type: 'start' });
|
|
131
|
+
changed();
|
|
132
|
+
let final = null;
|
|
133
|
+
try {
|
|
134
|
+
final = await followCliInstall(toolKey, { onEvent: apply });
|
|
135
|
+
} catch (error) {
|
|
136
|
+
final = { type: 'done', ok: false, code: 'connection', error: error?.message || null };
|
|
137
|
+
} finally {
|
|
138
|
+
installing = false;
|
|
139
|
+
settle(final);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
async function recheck() {
|
|
144
|
+
if (checking) return info;
|
|
145
|
+
checking = true;
|
|
146
|
+
// Asking again starts over: an earlier failure is not repeated over a fresh answer.
|
|
147
|
+
if (job?.phase === 'failed') job = null;
|
|
148
|
+
changed();
|
|
149
|
+
try {
|
|
150
|
+
const next = await recheckCliStatus(toolKey);
|
|
151
|
+
info = next || info;
|
|
152
|
+
if (cliStateOf(info) === 'installed' || cliStateOf(info) === 'broken') forced = null;
|
|
153
|
+
} catch { /* the view stays as it is */ }
|
|
154
|
+
finally {
|
|
155
|
+
checking = false;
|
|
156
|
+
changed();
|
|
157
|
+
}
|
|
158
|
+
return info;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
const unsubscribe = subscribeCliStatus(toolKey, (next) => {
|
|
162
|
+
info = next || null;
|
|
163
|
+
const state = cliStateOf(info);
|
|
164
|
+
if (state === 'installed') {
|
|
165
|
+
forced = null;
|
|
166
|
+
if (job?.phase === 'failed') job = null;
|
|
167
|
+
}
|
|
168
|
+
if (state === 'missing') {
|
|
169
|
+
if (!looked) { looked = true; followRunning().catch(() => {}); }
|
|
170
|
+
} else {
|
|
171
|
+
looked = false;
|
|
172
|
+
}
|
|
173
|
+
changed();
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
return {
|
|
177
|
+
view,
|
|
178
|
+
/** Tell `onChange` again (the panel was shown, or rebuilt). */
|
|
179
|
+
refresh: changed,
|
|
180
|
+
/** Sending is held back: the CLI is missing, broken, failed to install, or being installed. */
|
|
181
|
+
blocked: () => view().blocked,
|
|
182
|
+
/** A send was held back: `nudging` is true for a moment. */
|
|
183
|
+
nudge() {
|
|
184
|
+
if (!view().show) return;
|
|
185
|
+
clearTimeout(nudgeTimer);
|
|
186
|
+
nudgeTimer = setTimeout(() => { nudgeTimer = null; changed(); }, nudgeMs);
|
|
187
|
+
changed();
|
|
188
|
+
},
|
|
189
|
+
/**
|
|
190
|
+
* A session could not start the CLI ("CLI not found", a spawn error): "failed to start" with its words at
|
|
191
|
+
* once, then the server is asked again; its answer decides what stays.
|
|
192
|
+
*/
|
|
193
|
+
flagFailure(reason = null) {
|
|
194
|
+
forced = { reason: reason ? String(reason).slice(0, 300) : null };
|
|
195
|
+
changed();
|
|
196
|
+
recheckCliStatus(toolKey)
|
|
197
|
+
.then((next) => {
|
|
198
|
+
info = next || info;
|
|
199
|
+
const state = cliStateOf(info);
|
|
200
|
+
if (state === 'installed' || state === 'broken') forced = null;
|
|
201
|
+
changed();
|
|
202
|
+
})
|
|
203
|
+
.catch(() => {});
|
|
204
|
+
},
|
|
205
|
+
install,
|
|
206
|
+
recheck,
|
|
207
|
+
addPath,
|
|
208
|
+
clearDone,
|
|
209
|
+
/** Whether an install runs from this page now. */
|
|
210
|
+
installing: () => installing,
|
|
211
|
+
destroy() {
|
|
212
|
+
destroyed = true;
|
|
213
|
+
unsubscribe();
|
|
214
|
+
clearTimeout(doneTimer);
|
|
215
|
+
clearTimeout(nudgeTimer);
|
|
216
|
+
},
|
|
217
|
+
};
|
|
218
|
+
}
|