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
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import { getVariant } from './registry.js';
|
|
7
7
|
import { t } from './i18n.js';
|
|
8
|
+
import { FRAMED_CLASS } from './app-frame.js';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* The File Explorer's editor panel (slides from the file explorer's right edge).
|
|
@@ -86,6 +87,10 @@ export function getSharedHTML() {
|
|
|
86
87
|
const is3D = variant === '3d';
|
|
87
88
|
|
|
88
89
|
return `
|
|
90
|
+
<!-- App frame (styles.css APP FRAME): the card's interior under the graph, its border and gutter over the windows -->
|
|
91
|
+
<div id="app-frame-surface" aria-hidden="true"></div>
|
|
92
|
+
<div id="app-frame" aria-hidden="true"></div>
|
|
93
|
+
|
|
89
94
|
<!-- Loading Overlay -->
|
|
90
95
|
<div id="loading-overlay">
|
|
91
96
|
<div id="loading-mascot" data-state="asleep">
|
|
@@ -148,12 +153,6 @@ export function getSharedHTML() {
|
|
|
148
153
|
<div class="bar-left">
|
|
149
154
|
<img src="synabun.png?v=2" alt="SynaBun" id="titlebar-logo" style="height:24px;width:auto;cursor:pointer;" data-tooltip="${t('tooltip.toggleExplorer')}">
|
|
150
155
|
<div class="bar-sep"></div>
|
|
151
|
-
<div class="view-toggle">
|
|
152
|
-
<a class="view-toggle-btn${is3D ? '' : ' active'}" href="${is3D ? '/index2d.html' : '#'}" id="nav-2d-link">${t('nav.toggle2d')}</a>
|
|
153
|
-
<a class="view-toggle-btn${is3D ? ' active' : ''}" href="${is3D ? '#' : '/'}" id="nav-3d-link">${t('nav.toggle3d')}</a>
|
|
154
|
-
<span class="view-toggle-sep"></span>
|
|
155
|
-
</div>
|
|
156
|
-
<div class="bar-sep"></div>
|
|
157
156
|
|
|
158
157
|
<!-- OS-style menubar -->
|
|
159
158
|
<div class="menubar">
|
|
@@ -178,10 +177,10 @@ export function getSharedHTML() {
|
|
|
178
177
|
<span class="menu-text"><span class="menu-icon"><svg viewBox="0 0 24 24" fill="currentColor"><path d="M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z"/></svg></span> ${t('menu.apps.codexCli')} <span class="count-badge count-badge--green menu-update-badge" id="codex-menu-update-badge"></span></span>
|
|
179
178
|
<span class="menu-shortcut" data-keybind-for="launch-codex"></span>
|
|
180
179
|
</div>
|
|
181
|
-
<div class="menu-item" id="menu-terminal-
|
|
180
|
+
<div class="menu-item" id="menu-terminal-antigravity">
|
|
182
181
|
<span class="menu-check"></span>
|
|
183
|
-
<span class="menu-text"><span class="menu-icon"><svg viewBox="0 0 24 24" fill="
|
|
184
|
-
<span class="menu-shortcut" data-keybind-for="launch-
|
|
182
|
+
<span class="menu-text"><span class="menu-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4.5 20 12 4l7.5 16"/><path d="M8.2 20a3.8 3.8 0 0 1 7.6 0"/></svg></span> ${t('menu.apps.antigravityCli')} <span class="count-badge count-badge--green menu-update-badge" id="antigravity-menu-update-badge"></span></span>
|
|
183
|
+
<span class="menu-shortcut" data-keybind-for="launch-antigravity"></span>
|
|
185
184
|
</div>
|
|
186
185
|
<div class="menu-item" id="menu-terminal-opencode">
|
|
187
186
|
<span class="menu-check"></span>
|
|
@@ -227,10 +226,6 @@ export function getSharedHTML() {
|
|
|
227
226
|
<span class="menu-check"></span>
|
|
228
227
|
<span class="menu-text"><span class="menu-icon"><svg viewBox="0 0 24 24" fill="currentColor"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"/></svg></span> WhatsApp</span>
|
|
229
228
|
</div>
|
|
230
|
-
<div class="menu-item" id="menu-app-leonardo" hidden>
|
|
231
|
-
<span class="menu-check"></span>
|
|
232
|
-
<span class="menu-text"><span class="menu-icon"><svg viewBox="0 0 24 24" fill="currentColor"><path d="M9.5 2l1.5 3.5L14.5 7l-3.5 1.5L9.5 12l-1.5-3.5L4.5 7l3.5-1.5L9.5 2zM19 10l1 2 2 1-2 1-1 2-1-2-2-1 2-1 1-2zM5 17l1 2 2 1-2 1-1 2-1-2-2-1 2-1 1-2z"/></svg></span> Leonardo.AI</span>
|
|
233
|
-
</div>
|
|
234
229
|
</div>
|
|
235
230
|
<div class="menu-sep"></div>
|
|
236
231
|
<div class="menu-item" id="menu-command-runner">
|
|
@@ -248,7 +243,7 @@ export function getSharedHTML() {
|
|
|
248
243
|
</div>
|
|
249
244
|
<div class="menu-sep"></div>
|
|
250
245
|
${is3D ? ` <!-- Map (3D memory map) -->
|
|
251
|
-
<div class="menu-item menu-submenu-parent" id="menu-map-label" data-submenu="map" aria-haspopup="menu" aria-expanded="false">
|
|
246
|
+
<div class="menu-item menu-submenu-parent" id="menu-map-label" data-menu="graph" data-submenu="map" aria-haspopup="menu" aria-expanded="false">
|
|
252
247
|
<span class="menu-check"></span>
|
|
253
248
|
<span class="menu-text"><span class="menu-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6"/><line x1="8" y1="2" x2="8" y2="18"/><line x1="16" y1="6" x2="16" y2="22"/></svg></span> ${t('nav.map')}</span>
|
|
254
249
|
<span class="menu-submenu-arrow" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"/></svg></span>
|
|
@@ -500,7 +495,8 @@ ${is3D ? '' : `
|
|
|
500
495
|
</div>
|
|
501
496
|
|
|
502
497
|
<!-- Top-Right Controls: one row. The glass dock (workspace switcher, then the tools), then #topright-buttons: the
|
|
503
|
-
|
|
498
|
+
⋯ (#topright-overflow-btn: what does not fit the band, ui-topright-overflow.js), the tools toggle
|
|
499
|
+
(#topright-tools-btn, shows and hides the dock) and the agent side panels. Always one row, never wrapped.
|
|
504
500
|
Snap to grid and Tile terminals are on the whiteboard rail (#wb-toolbar) and in View. The session pills
|
|
505
501
|
(#term-minimized-tray) are a row under the bar, right-aligned with it (styles.css: "Fit"). -->
|
|
506
502
|
<div id="topright-controls">
|
|
@@ -574,6 +570,10 @@ ${is3D ? '' : `
|
|
|
574
570
|
</button>
|
|
575
571
|
</div>
|
|
576
572
|
<div id="topright-buttons">
|
|
573
|
+
<button id="topright-overflow-btn" class="topright-icon-btn" type="button" aria-haspopup="menu" aria-expanded="false" aria-controls="topright-overflow-menu" aria-label="${t('toolbar.more')}" data-tooltip="${t('toolbar.more')}">
|
|
574
|
+
<svg viewBox="0 0 24 24"><circle cx="5" cy="12" r="1.4" fill="currentColor" stroke="none"/><circle cx="12" cy="12" r="1.4" fill="currentColor" stroke="none"/><circle cx="19" cy="12" r="1.4" fill="currentColor" stroke="none"/></svg>
|
|
575
|
+
</button>
|
|
576
|
+
<div id="topright-overflow-menu" role="menu" aria-label="${t('toolbar.more')}" hidden></div>
|
|
577
577
|
<button id="topright-tools-btn" class="topright-icon-btn" type="button" aria-expanded="true" aria-controls="topright-inner" aria-label="${t('toolbar.hideTools')}" data-tooltip="${t('toolbar.hideTools')}">
|
|
578
578
|
<svg viewBox="0 0 24 24"><path d="M13 17l5-5-5-5"/><path d="M6 17l5-5-5-5"/></svg>
|
|
579
579
|
<span class="topright-tools-dot" aria-hidden="true"></span>
|
|
@@ -593,9 +593,16 @@ ${is3D ? '' : `
|
|
|
593
593
|
<svg viewBox="0 0 24 30" fill="currentColor"><path d="M18 6H6V24H18V6ZM24 30H0V0H24V30Z"/></svg>
|
|
594
594
|
<span class="count-badge count-badge--green" id="opencode-update-badge"></span>
|
|
595
595
|
</button>
|
|
596
|
+
<button id="topright-antigravity-panel-btn" class="topright-icon-btn" data-tooltip="${t('antigravityPanel.toolbar')}">
|
|
597
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4.5 20 12 4l7.5 16"/><path d="M8.2 20a3.8 3.8 0 0 1 7.6 0"/></svg>
|
|
598
|
+
<span class="count-badge count-badge--green" id="antigravity-update-badge"></span>
|
|
599
|
+
</button>
|
|
596
600
|
</div>
|
|
597
601
|
<div id="term-minimized-tray"></div>
|
|
598
602
|
</div>
|
|
603
|
+
<button id="toolbar-show-btn" type="button" aria-pressed="true" aria-controls="wb-toolbar" aria-label="${t('toolbar.showWhiteboardToolbar')}" data-tooltip="${t('toolbar.showWhiteboardToolbar')}" hidden>
|
|
604
|
+
<img src="logo-synabun.png" alt="" draggable="false">
|
|
605
|
+
</button>
|
|
599
606
|
|
|
600
607
|
<!-- Help Modal -->
|
|
601
608
|
<div id="help-overlay">
|
|
@@ -706,6 +713,7 @@ ${is3D ? '' : `
|
|
|
706
713
|
<span class="fe-branch-btn-name" id="fe-branch-btn-name"></span>
|
|
707
714
|
<span class="fe-branch-btn-badge" id="fe-branch-btn-badge"></span>
|
|
708
715
|
</button>
|
|
716
|
+
<span class="fe-git-scan-live" id="fe-git-scan-live" role="status" aria-live="polite"></span>
|
|
709
717
|
</div>
|
|
710
718
|
<div class="fe-filter">
|
|
711
719
|
<svg class="fe-filter-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 5h18l-7 8v6l-4-2v-4z"/></svg>
|
|
@@ -826,6 +834,10 @@ ${getEditorPanelHTML()}
|
|
|
826
834
|
<button class="wb-tool wb-tool-sm" id="wb-toggle-logo" data-tooltip="Toggle logo">
|
|
827
835
|
<img src="logo-synabun.png" alt="" style="width:18px;height:auto;opacity:0.6;">
|
|
828
836
|
</button>
|
|
837
|
+
<div class="wb-tool-sep"></div>
|
|
838
|
+
<button class="wb-tool" id="wb-hide-btn" type="button" aria-pressed="false" aria-controls="wb-toolbar" aria-label="${t('toolbar.hideWhiteboardToolbar')}" data-tooltip="${t('toolbar.hideWhiteboardToolbar')}">
|
|
839
|
+
<svg viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M15 6l-6 6 6 6"/></svg>
|
|
840
|
+
</button>
|
|
829
841
|
</div>
|
|
830
842
|
|
|
831
843
|
<div id="wb-canvas">
|
|
@@ -862,5 +874,8 @@ ${getEditorPanelHTML()}
|
|
|
862
874
|
* Call this once at the start of variant main.js, BEFORE any DOM queries.
|
|
863
875
|
*/
|
|
864
876
|
export function injectSharedHTML() {
|
|
877
|
+
// The workspace sits in the inset rounded frame (app-frame.js): set before the shell lands, so nothing is laid
|
|
878
|
+
// out once without it.
|
|
879
|
+
document.documentElement.classList.add(FRAMED_CLASS);
|
|
865
880
|
document.body.insertAdjacentHTML('afterbegin', getSharedHTML());
|
|
866
881
|
}
|
|
@@ -246,6 +246,8 @@ export function setLocaleChoice(choice) {
|
|
|
246
246
|
const value = choice === SYSTEM_LOCALE ? SYSTEM_LOCALE : (SUPPORTED_LOCALES.includes(choice) ? choice : null);
|
|
247
247
|
if (!value) return false;
|
|
248
248
|
storage.setItem(LOCALE_STORAGE_KEY, value);
|
|
249
|
+
// Windows that open again after the reload (the Schedules window) note it now, while they are open.
|
|
250
|
+
try { globalThis.window?.dispatchEvent?.(new CustomEvent('synabun:locale-change', { detail: { choice: value } })); } catch { /* nobody listens */ }
|
|
249
251
|
// The store writes to the server after a pause; the reload must read the new choice.
|
|
250
252
|
// (A write still pending when the page unloads goes out as a beacon, so a slow server only delays the reload.)
|
|
251
253
|
const written = Promise.resolve().then(() => storageModule.flushStorage?.()).catch(() => {});
|
|
@@ -200,14 +200,14 @@ export async function setAutoAccept(store, api, enabled, { cwd, isDescendant } =
|
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
/**
|
|
203
|
-
* How
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
*
|
|
203
|
+
* How far an "Always allow" reaches, for the card. OpenCode 2 saves the answer
|
|
204
|
+
* for the session's project: after an "always" reply on 2.1.4,
|
|
205
|
+
* `GET /api/permission/saved` lists `{ projectID, action, resource }` with the
|
|
206
|
+
* card's pattern (checked against a live serve), so it holds in every session
|
|
207
|
+
* of that project and outlives the serve. The panel shows no list of saved
|
|
208
|
+
* answers; OpenCode's own saved permissions are where one is taken back.
|
|
209
209
|
*/
|
|
210
|
-
export const ALWAYS_ALLOW_SCOPE = '
|
|
210
|
+
export const ALWAYS_ALLOW_SCOPE = 'in every session of this project: OpenCode saves the answer';
|
|
211
211
|
|
|
212
212
|
// ── Questions ───────────────────────────────────────────────────────────────
|
|
213
213
|
// The answer path of a question card, whatever built the card: a request in
|
|
@@ -63,7 +63,7 @@ function frozenCopy(value, seen = new Map()) {
|
|
|
63
63
|
* isCurrent() an extra veto, e.g. "this child panel is still the open one"
|
|
64
64
|
* Returns a frozen token:
|
|
65
65
|
* binding, sessionId, cwd, directory (cwd, else the session's directory),
|
|
66
|
-
* model, variant, agent, mode,
|
|
66
|
+
* model, variant, agent, mode, tools, sessionInfo (model and
|
|
67
67
|
* sessionInfo are frozen copies, nested objects included)
|
|
68
68
|
* isCurrent() the store is still on this binding
|
|
69
69
|
* isStale() the opposite
|
|
@@ -90,7 +90,7 @@ export function captureBinding(store, { sessionId, isCurrent } = {}) {
|
|
|
90
90
|
variant: s.variant || null,
|
|
91
91
|
agent: s.agent || null,
|
|
92
92
|
mode: s.mode || null,
|
|
93
|
-
|
|
93
|
+
tools: s.tools ? frozenCopy(s.tools) : null,
|
|
94
94
|
sessionInfo: s.sessionInfo ? frozenCopy(s.sessionInfo) : null,
|
|
95
95
|
isCurrent: current,
|
|
96
96
|
isStale: () => !current(),
|
|
@@ -218,8 +218,8 @@ export function boundReader(store) {
|
|
|
218
218
|
// another tab after it. Both were started on the same binding.
|
|
219
219
|
//
|
|
220
220
|
// So where the panel goes has an identity of its own. Every choice of the user
|
|
221
|
-
// (a tab, a session in the menu, New session, another project
|
|
222
|
-
//
|
|
221
|
+
// (a tab, a session in the menu, New session, another project) begins an
|
|
222
|
+
// intent, and a navigation binds the panel only while its intent is
|
|
223
223
|
// the latest one: after every wait it checks `isCurrent()`, and it binds
|
|
224
224
|
// through `apply()`. A later choice always wins over an older one that is
|
|
225
225
|
// still in flight. A rebinding nobody announced (the active tab was closed)
|
|
@@ -59,113 +59,15 @@ export function changesTabs(supports = () => false) {
|
|
|
59
59
|
return tabs;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
// ── Worktrees ───────────────────────────────────────────────────────────────
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Watch one worktree creation from request to ready.
|
|
66
|
-
*
|
|
67
|
-
* Subscribe before asking OpenCode to create the worktree (worktree.ready can
|
|
68
|
-
* beat the reply), then call `identify(name)` with the name the reply carries.
|
|
69
|
-
* Until then events are kept, not acted on: `worktree.ready` names its
|
|
70
|
-
* worktree, so only the one for `name` counts, and another window's or
|
|
71
|
-
* project's creation finishing first changes nothing.
|
|
72
|
-
*
|
|
73
|
-
* The outcome is decided by that ready event and nothing else. `worktree.failed`
|
|
74
|
-
* carries a message and no name (1.18.34: `{ message }`), so a failure cannot
|
|
75
|
-
* be told apart from the failure of another creation on the same serve
|
|
76
|
-
* (another window, another project). It therefore never ends this creation:
|
|
77
|
-
* the message is kept, the wait goes on, and a ready for `name` still wins. If
|
|
78
|
-
* no ready arrives before `timeoutMs`, the last resort, the result says so and
|
|
79
|
-
* quotes the failure that was seen, as what it is: possibly this creation's,
|
|
80
|
-
* possibly not. What this costs: a creation that really failed is reported
|
|
81
|
-
* after the timeout instead of at once.
|
|
82
|
-
*
|
|
83
|
-
* subscribe(listener) raw event subscription, returns unsubscribe
|
|
84
|
-
* returns { result, identify(name), cancel(error?) }
|
|
85
|
-
* result resolves { ok: true } or { ok: false, error, failureSeen? }
|
|
86
|
-
*/
|
|
87
|
-
export function watchWorktree(subscribe, {
|
|
88
|
-
timeoutMs = 60_000, setTimer = setTimeout, clearTimer = clearTimeout,
|
|
89
|
-
} = {}) {
|
|
90
|
-
let name = '';
|
|
91
|
-
let done = false;
|
|
92
|
-
let unsubscribe = () => {};
|
|
93
|
-
let timer = null;
|
|
94
|
-
let failure = ''; // the last unattributable worktree.failed message
|
|
95
|
-
const readyNames = new Set(); // worktree.ready seen before identify()
|
|
96
|
-
let resolveResult;
|
|
97
|
-
const result = new Promise((resolve) => { resolveResult = resolve; });
|
|
98
|
-
|
|
99
|
-
const finish = (outcome) => {
|
|
100
|
-
if (done) return;
|
|
101
|
-
done = true;
|
|
102
|
-
if (timer) clearTimer(timer);
|
|
103
|
-
try { unsubscribe(); } catch { /* already gone */ }
|
|
104
|
-
resolveResult(outcome);
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
unsubscribe = subscribe((eventType, ev) => {
|
|
108
|
-
if (done) return;
|
|
109
|
-
if (eventType === 'worktree.ready') {
|
|
110
|
-
const readyName = typeof ev?.name === 'string' ? ev.name : '';
|
|
111
|
-
if (!readyName) return;
|
|
112
|
-
if (!name) readyNames.add(readyName);
|
|
113
|
-
else if (readyName === name) finish({ ok: true });
|
|
114
|
-
} else if (eventType === 'worktree.failed') {
|
|
115
|
-
failure = ev?.message || 'OpenCode could not prepare a worktree.';
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
timer = setTimer(() => finish(worktreeTimeoutOutcome(failure)), timeoutMs);
|
|
119
|
-
|
|
120
|
-
return {
|
|
121
|
-
result,
|
|
122
|
-
/** The create reply named the worktree: act on what was seen so far. */
|
|
123
|
-
identify(worktreeName) {
|
|
124
|
-
if (done || name) return;
|
|
125
|
-
name = String(worktreeName || '');
|
|
126
|
-
if (!name) { finish({ ok: false, error: 'OpenCode did not name the new worktree.' }); return; }
|
|
127
|
-
if (readyNames.has(name)) finish({ ok: true });
|
|
128
|
-
},
|
|
129
|
-
cancel(error = 'Worktree creation was cancelled.') { finish({ ok: false, error }); },
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/** What the wait reports when no ready event for the worktree came in time. */
|
|
134
|
-
export function worktreeTimeoutOutcome(failure) {
|
|
135
|
-
if (!failure) return { ok: false, error: 'The worktree was not ready in time.' };
|
|
136
|
-
return {
|
|
137
|
-
ok: false,
|
|
138
|
-
failureSeen: failure,
|
|
139
|
-
error: `The worktree was not ready in time. OpenCode reported a worktree failure meanwhile, which may or may not be this one (the report names no worktree): ${failure}`,
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Wait for the worktree called `name` (already known) to be ready.
|
|
145
|
-
* Resolves { ok: true } on its worktree.ready, { ok: false, error } on a
|
|
146
|
-
* failure or after `timeoutMs`.
|
|
147
|
-
*/
|
|
148
|
-
export function waitForWorktree(subscribe, name, options = {}) {
|
|
149
|
-
const watch = watchWorktree(subscribe, options);
|
|
150
|
-
watch.identify(name);
|
|
151
|
-
return watch.result;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
62
|
// ── New-session dialog ──────────────────────────────────────────────────────
|
|
155
63
|
|
|
156
64
|
/**
|
|
157
65
|
* What "Save" in the new-session dialog does.
|
|
158
|
-
* { project, branch, currentBranch,
|
|
159
|
-
* → { worktree, checkout, projectChanged }
|
|
160
|
-
* A session in a new worktree never touches the project's own checkout: the
|
|
161
|
-
* worktree is created from what the project has checked out now (OpenCode's
|
|
162
|
-
* worktree.create takes no base), so no branch is switched for it.
|
|
66
|
+
* { project, branch, currentBranch, cwd } → { checkout, projectChanged }
|
|
163
67
|
*/
|
|
164
|
-
export function newSessionPlan({ project = '', branch = '', currentBranch = '',
|
|
165
|
-
const
|
|
166
|
-
const switchBranch = !worktree && !!project && !!branch && !!currentBranch && branch !== currentBranch;
|
|
68
|
+
export function newSessionPlan({ project = '', branch = '', currentBranch = '', cwd = '' } = {}) {
|
|
69
|
+
const switchBranch = !!project && !!branch && !!currentBranch && branch !== currentBranch;
|
|
167
70
|
return {
|
|
168
|
-
worktree,
|
|
169
71
|
checkout: switchBranch ? { path: project, branch } : null,
|
|
170
72
|
projectChanged: !!project && project !== (cwd || ''),
|
|
171
73
|
};
|
|
@@ -20,6 +20,7 @@ import { state, emit } from '../state.js';
|
|
|
20
20
|
import { injectStyles } from './ocp-v2-styles.js';
|
|
21
21
|
import { getDefaultStore } from './ocp-v2-state.js';
|
|
22
22
|
import { wireFileLinks } from '../ui-file-links.js';
|
|
23
|
+
import { frameRect } from '../app-frame.js';
|
|
23
24
|
import { mountRenderer } from './ocp-v2-render.js';
|
|
24
25
|
import { mountCompose } from './ocp-v2-send.js';
|
|
25
26
|
import { trackContextGauge } from './ocp-v2-context-gauge.js';
|
|
@@ -205,6 +206,7 @@ export function createChildPanel({
|
|
|
205
206
|
_contextGauge = trackContextGauge(store);
|
|
206
207
|
_compactControl = createCompactControl(store);
|
|
207
208
|
_contextMenu = mountContextMenu(actions, panel, store, {
|
|
209
|
+
bounds: frameRect, // the popover stays in the app frame
|
|
208
210
|
compact: _compactControl,
|
|
209
211
|
agent: () => _taskInfo?.subagentType || '',
|
|
210
212
|
});
|
|
@@ -40,9 +40,7 @@ export function createCompactControl(store = getDefaultStore()) {
|
|
|
40
40
|
const res = await api.compact({
|
|
41
41
|
sessionId: at.sessionId,
|
|
42
42
|
cwd: s.cwd || undefined,
|
|
43
|
-
|
|
44
|
-
// OpenCode 1.18 compacts through session.summarize, which needs a model.
|
|
45
|
-
model: s.model || undefined,
|
|
43
|
+
tools: s.tools || undefined,
|
|
46
44
|
});
|
|
47
45
|
if (at.isCurrent() && (res?.error || res?.ok === false)) {
|
|
48
46
|
const msg = res?.error || res?.data?.error || 'Compact failed';
|
|
@@ -20,8 +20,6 @@ export const LOCAL_SLASH_COMMANDS = Object.freeze([
|
|
|
20
20
|
{ name: 'compact', description: 'Compact context', action: 'compact', aliases: ['summarize'] },
|
|
21
21
|
{ name: 'undo', description: 'Undo the last prompt', action: 'undo', needs: ['session:revert'] },
|
|
22
22
|
{ name: 'redo', description: 'Restore what was undone', action: 'redo', needs: ['session:unrevert'] },
|
|
23
|
-
{ name: 'share', description: 'Share this session (public link)', action: 'share', needs: ['session:share', 'session:unshare'] },
|
|
24
|
-
{ name: 'unshare', description: 'Stop sharing this session', action: 'unshare', needs: ['session:share', 'session:unshare'] },
|
|
25
23
|
{ name: 'export', description: 'Export the transcript as JSON', action: 'export' },
|
|
26
24
|
{ name: 'fork', description: 'Fork this session', action: 'fork', needs: ['session:fork'] },
|
|
27
25
|
{ name: 'models', description: 'Pick a model', action: 'models' },
|
|
@@ -49,9 +47,8 @@ const SERVER_SOURCES = new Set(['command', 'skill', 'mcp']);
|
|
|
49
47
|
* legacy { skills, userCommands } from the pre-SDK REST lists, used
|
|
50
48
|
* only when serverCommands is null
|
|
51
49
|
* supports(type) capability check
|
|
52
|
-
* sharePolicy OpenCode's `share` setting; 'disabled' removes /share and /unshare
|
|
53
50
|
*/
|
|
54
|
-
export function buildSlashCatalog({ serverCommands = null, legacy = null, supports = () => false
|
|
51
|
+
export function buildSlashCatalog({ serverCommands = null, legacy = null, supports = () => false } = {}) {
|
|
55
52
|
const out = [];
|
|
56
53
|
const seen = new Set();
|
|
57
54
|
const add = (entry) => {
|
|
@@ -62,7 +59,6 @@ export function buildSlashCatalog({ serverCommands = null, legacy = null, suppor
|
|
|
62
59
|
};
|
|
63
60
|
for (const cmd of LOCAL_SLASH_COMMANDS) {
|
|
64
61
|
if ((cmd.needs || []).some((type) => !supports(type))) continue;
|
|
65
|
-
if (sharePolicy === 'disabled' && (cmd.action === 'share' || cmd.action === 'unshare')) continue;
|
|
66
62
|
add({ name: cmd.name, description: cmd.description, aliases: cmd.aliases || [], source: 'builtin', kind: 'local', action: cmd.action });
|
|
67
63
|
}
|
|
68
64
|
const canRun = supports('command:run');
|
|
@@ -153,7 +149,7 @@ export function helpCardView({ catalog = [], supports = () => false, canAct = tr
|
|
|
153
149
|
name: 'Enter',
|
|
154
150
|
text: 'While a turn runs, Enter queues the prompt. The queue is listed above the box and sent in order when the turn ends; after a failed turn it waits for Resume.',
|
|
155
151
|
}] });
|
|
156
|
-
const mine = ['Copy', canAct && supports('session:revert') && 'Undo to here', canAct && supports('session:fork') && 'Fork from here'
|
|
152
|
+
const mine = ['Copy', canAct && supports('session:revert') && 'Undo to here', canAct && supports('session:fork') && 'Fork from here'].filter(Boolean);
|
|
157
153
|
const replies = ['Copy', canAct && supports('session:revert') && 'Retry'].filter(Boolean);
|
|
158
154
|
sections.push({ title: 'Message actions', rows: [
|
|
159
155
|
{ name: 'Your prompts', text: `Hover one: ${mine.join(', ')}.` },
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// every render reads the store again.
|
|
13
13
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
14
14
|
|
|
15
|
-
import { api, supports, onEvent
|
|
15
|
+
import { api, supports, onEvent } from './ocp-v2-ws.js';
|
|
16
16
|
import { getDefaultStore } from './ocp-v2-state.js';
|
|
17
17
|
import { replyFailed, replyError } from './ocp-v2-caps.js';
|
|
18
18
|
import { boundReader, onRebind } from './ocp-v2-binding.js';
|
|
@@ -199,6 +199,7 @@ function turnsOf(s) {
|
|
|
199
199
|
* opts.onManage() opens the MCP manager; without it there is no "Manage"
|
|
200
200
|
* opts.onOpen() the popover is about to open (the panel closes its other menus)
|
|
201
201
|
* opts.agent() the agent this panel's session runs as, when the panel knows better than the store
|
|
202
|
+
* opts.bounds() the area the popover stays in ({ left, top, right, bottom }: the app frame); the window without it
|
|
202
203
|
* Returns { element, open(), close({ focus }), isOpen(), sync(), destroy() }.
|
|
203
204
|
*/
|
|
204
205
|
export function mountContextMenu(actionsEl, panelEl, store = getDefaultStore(), opts = {}) {
|
|
@@ -244,7 +245,6 @@ export function mountContextMenu(actionsEl, panelEl, store = getDefaultStore(),
|
|
|
244
245
|
// A sub-agent's store hears the version only on a status change; the
|
|
245
246
|
// main one has it from init, and there is one OpenCode behind both.
|
|
246
247
|
serverVersion: s.serverVersion || getDefaultStore().getState().serverVersion || '',
|
|
247
|
-
sdkVersion: sdkVersion(),
|
|
248
248
|
updateAvailable: updateAvailableVersion(),
|
|
249
249
|
sessionId: s.sessionId || '',
|
|
250
250
|
folder: s.cwd || s.sessionInfo?.directory || '',
|
|
@@ -278,23 +278,23 @@ export function mountContextMenu(actionsEl, panelEl, store = getDefaultStore(),
|
|
|
278
278
|
}
|
|
279
279
|
|
|
280
280
|
// Below the cog, its right edge on the cog's; above it when there is more room
|
|
281
|
-
// there; always inside the
|
|
281
|
+
// there; always inside the app frame, scrolling inside when it is taller.
|
|
282
282
|
function place() {
|
|
283
283
|
if (!open || !pop) return;
|
|
284
284
|
const r = cog.getBoundingClientRect();
|
|
285
|
-
|
|
286
|
-
const
|
|
287
|
-
const width = Math.max(0, Math.min(WIDTH,
|
|
285
|
+
// Inside the area the panel names (the app frame), else the window
|
|
286
|
+
const f = opts.bounds?.() || { left: 0, top: 0, right: window.innerWidth, bottom: window.innerHeight, width: window.innerWidth };
|
|
287
|
+
const width = Math.max(0, Math.min(WIDTH, f.width - MARGIN * 2));
|
|
288
288
|
pop.style.width = `${width}px`;
|
|
289
|
-
const below =
|
|
290
|
-
const above = r.top - GAP - MARGIN;
|
|
289
|
+
const below = f.bottom - r.bottom - GAP - MARGIN;
|
|
290
|
+
const above = r.top - f.top - GAP - MARGIN;
|
|
291
291
|
const up = below < 220 && above > below;
|
|
292
292
|
pop.style.maxHeight = `${Math.max(120, up ? above : below)}px`;
|
|
293
293
|
const height = pop.offsetHeight;
|
|
294
|
-
const left = Math.max(MARGIN, Math.min(r.right - width,
|
|
294
|
+
const left = Math.max(f.left + MARGIN, Math.min(r.right - width, f.right - width - MARGIN));
|
|
295
295
|
const top = up
|
|
296
|
-
? Math.max(MARGIN, r.top - GAP - height)
|
|
297
|
-
: Math.max(MARGIN, Math.min(r.bottom + GAP,
|
|
296
|
+
? Math.max(f.top + MARGIN, r.top - GAP - height)
|
|
297
|
+
: Math.max(f.top + MARGIN, Math.min(r.bottom + GAP, f.bottom - MARGIN - height));
|
|
298
298
|
pop.style.left = `${Math.round(left)}px`;
|
|
299
299
|
pop.style.top = `${Math.round(top)}px`;
|
|
300
300
|
// Once it has its width: only now is a cut value known.
|
|
@@ -143,9 +143,6 @@ export function contextMenuModel(d = {}) {
|
|
|
143
143
|
const notice = updateNoticeText(d.updateAvailable, d.serverVersion);
|
|
144
144
|
const versions = [['OpenCode', d.serverVersion ? String(d.serverVersion) : NOT_REPORTED]];
|
|
145
145
|
if (notice) versions.push(['Update', `${String(d.updateAvailable).replace(/^v/i, '')} available`, notice]);
|
|
146
|
-
versions.push(d.sdkVersion
|
|
147
|
-
? ['OpenCode SDK', String(d.sdkVersion), '@opencode-ai/sdk, the client SynaBun talks to OpenCode through']
|
|
148
|
-
: ['OpenCode SDK', NOT_REPORTED, d.serverVersion ? 'Restart SynaBun to see the SDK version here.' : '']);
|
|
149
146
|
|
|
150
147
|
const sessionId = d.sessionId ? String(d.sessionId) : '';
|
|
151
148
|
const sessionRows = [
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { toolWord } from '../tool-list-picker.js';
|
|
1
2
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
2
3
|
// OpenCode V2 — events → store (no DOM, no socket)
|
|
3
4
|
// One function per concern so node:test can drive them with a real store:
|
|
@@ -188,12 +189,15 @@ export function applyEvent(store, eventType, ev = {}, hooks = {}) {
|
|
|
188
189
|
case 'session.diff':
|
|
189
190
|
store.setSessionDiff(ev.diff);
|
|
190
191
|
break;
|
|
191
|
-
case 'mcp.
|
|
192
|
-
store.
|
|
192
|
+
case 'synabun.mcp.status':
|
|
193
|
+
if (ev.text) store.pushError({ message: ev.text, notice: true });
|
|
193
194
|
break;
|
|
194
|
-
case 'mcp.
|
|
195
|
+
case 'mcp.tools.changed':
|
|
196
|
+
store.setTools(ev.tools ?? null);
|
|
197
|
+
break;
|
|
198
|
+
case 'mcp.tools.refresh.failed':
|
|
195
199
|
store.pushError({
|
|
196
|
-
message: ev.error ||
|
|
200
|
+
message: ev.error || toolWord('reloadFailed'),
|
|
197
201
|
raw: ev,
|
|
198
202
|
});
|
|
199
203
|
break;
|
|
@@ -28,7 +28,7 @@ import { on } from '../state.js';
|
|
|
28
28
|
import { setSidepanelVisible } from '../ui-sidepanel-windows.js';
|
|
29
29
|
import { createPanelStore } from './ocp-v2-state.js';
|
|
30
30
|
import { createChildPanel } from './ocp-v2-childpanel.js';
|
|
31
|
-
import {
|
|
31
|
+
import { inheritChildPanelTools } from './ocp-v2-tools-inheritance.js';
|
|
32
32
|
import { notify as uiNotify, NOTIF_TYPE } from '../ui-notifications.js';
|
|
33
33
|
import {
|
|
34
34
|
isAutomationSession, onAutomationSessionRegistered, shouldMaterializeChildPanel,
|
|
@@ -513,12 +513,12 @@ function parentTitleFor(reg, parentSid) {
|
|
|
513
513
|
} catch { return 'parent'; }
|
|
514
514
|
}
|
|
515
515
|
|
|
516
|
-
// The tool
|
|
516
|
+
// The tool list the user chose for a session (the project bar saves it
|
|
517
517
|
// under this key): what a sub-agent of a session that is not on screen inherits.
|
|
518
|
-
const
|
|
519
|
-
function
|
|
518
|
+
const MCP_SESSION_TOOLS_KEY = 'synabun-opencode-session-tools';
|
|
519
|
+
function savedSessionTools(sessionId) {
|
|
520
520
|
try {
|
|
521
|
-
const parsed = JSON.parse(storage.getItem(
|
|
521
|
+
const parsed = JSON.parse(storage.getItem(MCP_SESSION_TOOLS_KEY) || '{}');
|
|
522
522
|
return (parsed && typeof parsed === 'object' && parsed[sessionId]) || null;
|
|
523
523
|
} catch { return null; }
|
|
524
524
|
}
|
|
@@ -529,8 +529,8 @@ function spawnChildPanel({ childSessionId, childInfo, parentPanelId, parentSessi
|
|
|
529
529
|
store.setSession(childSessionId, childInfo || null);
|
|
530
530
|
store.setParentSession(parentSessionId, parentPanelId);
|
|
531
531
|
// The parent's profile: the primary store's only while it is bound to that
|
|
532
|
-
// parent (see
|
|
533
|
-
|
|
532
|
+
// parent (see inheritChildPanelTools).
|
|
533
|
+
inheritChildPanelTools(store, _primary?.store, childInfo, { parentSessionId, savedTools: savedSessionTools });
|
|
534
534
|
|
|
535
535
|
const wsUnsub = subscribeSession(childSessionId, store);
|
|
536
536
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Running is a display hint: tool activity, replay and automation reattachment
|
|
2
|
+
// can all set it. Only a new prompt gives completion notifications a new owner.
|
|
3
|
+
export function createOutcomeNotifications() {
|
|
4
|
+
const outcomes = new Map();
|
|
5
|
+
return {
|
|
6
|
+
take(state, type) {
|
|
7
|
+
const prompt = [...(state.messageOrder || [])].reverse().find(id => state.messages?.get(id)?.role === 'user');
|
|
8
|
+
const key = `${state.sessionId || ''}:${prompt || ''}`;
|
|
9
|
+
const last = outcomes.get(key);
|
|
10
|
+
if (last === type || (last === 'error' && type === 'done')) return false;
|
|
11
|
+
outcomes.set(key, type);
|
|
12
|
+
if (outcomes.size > 200) outcomes.delete(outcomes.keys().next().value);
|
|
13
|
+
return true;
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
}
|