@jawcode-dev/coding-agent 1.1.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 +376 -0
- package/README.md +37 -0
- package/dist/types/async/index.d.ts +2 -0
- package/dist/types/async/job-manager.d.ts +294 -0
- package/dist/types/async/support.d.ts +2 -0
- package/dist/types/autoresearch/dashboard.d.ts +4 -0
- package/dist/types/autoresearch/git.d.ts +36 -0
- package/dist/types/autoresearch/helpers.d.ts +24 -0
- package/dist/types/autoresearch/index.d.ts +2 -0
- package/dist/types/autoresearch/state.d.ts +17 -0
- package/dist/types/autoresearch/storage.d.ts +142 -0
- package/dist/types/autoresearch/tools/init-experiment.d.ts +31 -0
- package/dist/types/autoresearch/tools/log-experiment.d.ts +23 -0
- package/dist/types/autoresearch/tools/run-experiment.d.ts +8 -0
- package/dist/types/autoresearch/tools/update-notes.d.ts +12 -0
- package/dist/types/autoresearch/types.d.ts +154 -0
- package/dist/types/capability/context-file.d.ts +17 -0
- package/dist/types/capability/extension-module.d.ts +15 -0
- package/dist/types/capability/extension.d.ts +28 -0
- package/dist/types/capability/fs.d.ts +20 -0
- package/dist/types/capability/hook.d.ts +19 -0
- package/dist/types/capability/index.d.ts +80 -0
- package/dist/types/capability/instruction.d.ts +17 -0
- package/dist/types/capability/mcp.d.ts +45 -0
- package/dist/types/capability/prompt.d.ts +15 -0
- package/dist/types/capability/rule.d.ts +61 -0
- package/dist/types/capability/settings.d.ts +15 -0
- package/dist/types/capability/skill.d.ts +36 -0
- package/dist/types/capability/slash-command.d.ts +17 -0
- package/dist/types/capability/ssh.d.ts +23 -0
- package/dist/types/capability/system-prompt.d.ts +15 -0
- package/dist/types/capability/tool.d.ts +19 -0
- package/dist/types/capability/types.d.ts +154 -0
- package/dist/types/cli/agents-cli.d.ts +12 -0
- package/dist/types/cli/args.d.ts +56 -0
- package/dist/types/cli/auth-broker-cli.d.ts +25 -0
- package/dist/types/cli/auth-gateway-cli.d.ts +18 -0
- package/dist/types/cli/classify-install-target.d.ts +18 -0
- package/dist/types/cli/commands/init-xdg.d.ts +1 -0
- package/dist/types/cli/config-cli.d.ts +22 -0
- package/dist/types/cli/fast-help.d.ts +1 -0
- package/dist/types/cli/file-processor.d.ts +11 -0
- package/dist/types/cli/grep-cli.d.ts +17 -0
- package/dist/types/cli/initial-message.d.ts +17 -0
- package/dist/types/cli/list-models.d.ts +30 -0
- package/dist/types/cli/notify-cli.d.ts +29 -0
- package/dist/types/cli/plugin-cli.d.ts +32 -0
- package/dist/types/cli/read-cli.d.ts +4 -0
- package/dist/types/cli/session-picker.d.ts +3 -0
- package/dist/types/cli/setup-cli.d.ts +45 -0
- package/dist/types/cli/shell-cli.d.ts +8 -0
- package/dist/types/cli/skills-cli.d.ts +9 -0
- package/dist/types/cli/ssh-cli.d.ts +21 -0
- package/dist/types/cli/stats-cli.d.ts +17 -0
- package/dist/types/cli/update-cli.d.ts +41 -0
- package/dist/types/cli/web-search-cli.d.ts +20 -0
- package/dist/types/cli/worktree-cli.d.ts +26 -0
- package/dist/types/cli.d.ts +4 -0
- package/dist/types/commands/acp.d.ts +12 -0
- package/dist/types/commands/agents.d.ts +34 -0
- package/dist/types/commands/auth-broker.d.ts +54 -0
- package/dist/types/commands/auth-gateway.d.ts +32 -0
- package/dist/types/commands/chat.d.ts +18 -0
- package/dist/types/commands/codex-native-hook.d.ts +6 -0
- package/dist/types/commands/commit.d.ts +27 -0
- package/dist/types/commands/config.d.ts +30 -0
- package/dist/types/commands/contribution-prep.d.ts +18 -0
- package/dist/types/commands/coordinator.d.ts +19 -0
- package/dist/types/commands/goal.d.ts +31 -0
- package/dist/types/commands/grep.d.ts +42 -0
- package/dist/types/commands/harness.d.ts +50 -0
- package/dist/types/commands/interview.d.ts +51 -0
- package/dist/types/commands/launch.d.ts +127 -0
- package/dist/types/commands/mcp-serve.d.ts +24 -0
- package/dist/types/commands/memory.d.ts +19 -0
- package/dist/types/commands/notify.d.ts +30 -0
- package/dist/types/commands/orchestrate.d.ts +48 -0
- package/dist/types/commands/planphase.d.ts +7 -0
- package/dist/types/commands/plugin.d.ts +52 -0
- package/dist/types/commands/ralplan.d.ts +7 -0
- package/dist/types/commands/read.d.ts +15 -0
- package/dist/types/commands/session.d.ts +24 -0
- package/dist/types/commands/setup.d.ts +95 -0
- package/dist/types/commands/shell.d.ts +21 -0
- package/dist/types/commands/skills.d.ts +26 -0
- package/dist/types/commands/ssh.d.ts +48 -0
- package/dist/types/commands/state.d.ts +7 -0
- package/dist/types/commands/stats.d.ts +25 -0
- package/dist/types/commands/team.d.ts +24 -0
- package/dist/types/commands/ultragoal.d.ts +8 -0
- package/dist/types/commands/update.d.ts +20 -0
- package/dist/types/commands/web-search.d.ts +33 -0
- package/dist/types/commands/worktree.d.ts +31 -0
- package/dist/types/commit/agentic/agent.d.ts +31 -0
- package/dist/types/commit/agentic/fallback.d.ts +5 -0
- package/dist/types/commit/agentic/index.d.ts +2 -0
- package/dist/types/commit/agentic/state.d.ts +58 -0
- package/dist/types/commit/agentic/tools/analyze-file.d.ts +19 -0
- package/dist/types/commit/agentic/tools/git-file-diff.d.ts +10 -0
- package/dist/types/commit/agentic/tools/git-hunk.d.ts +9 -0
- package/dist/types/commit/agentic/tools/git-overview.d.ts +9 -0
- package/dist/types/commit/agentic/tools/index.d.ts +16 -0
- package/dist/types/commit/agentic/tools/propose-changelog.d.ts +28 -0
- package/dist/types/commit/agentic/tools/propose-commit.d.ts +36 -0
- package/dist/types/commit/agentic/tools/recent-commits.d.ts +7 -0
- package/dist/types/commit/agentic/tools/schemas.d.ts +27 -0
- package/dist/types/commit/agentic/tools/split-commit.d.ts +53 -0
- package/dist/types/commit/agentic/topo-sort.d.ts +4 -0
- package/dist/types/commit/agentic/trivial.d.ts +7 -0
- package/dist/types/commit/agentic/validation.d.ts +20 -0
- package/dist/types/commit/analysis/conventional.d.ts +22 -0
- package/dist/types/commit/analysis/index.d.ts +4 -0
- package/dist/types/commit/analysis/scope.d.ts +6 -0
- package/dist/types/commit/analysis/summary.d.ts +19 -0
- package/dist/types/commit/analysis/validation.d.ts +8 -0
- package/dist/types/commit/changelog/detect.d.ts +2 -0
- package/dist/types/commit/changelog/generate.d.ts +30 -0
- package/dist/types/commit/changelog/index.d.ts +30 -0
- package/dist/types/commit/changelog/parse.d.ts +2 -0
- package/dist/types/commit/cli.d.ts +3 -0
- package/dist/types/commit/git/diff.d.ts +5 -0
- package/dist/types/commit/index.d.ts +4 -0
- package/dist/types/commit/map-reduce/index.d.ts +28 -0
- package/dist/types/commit/map-reduce/map-phase.d.ts +17 -0
- package/dist/types/commit/map-reduce/reduce-phase.d.ts +13 -0
- package/dist/types/commit/map-reduce/utils.d.ts +2 -0
- package/dist/types/commit/message.d.ts +2 -0
- package/dist/types/commit/model-selection.d.ts +15 -0
- package/dist/types/commit/pipeline.d.ts +5 -0
- package/dist/types/commit/shared-llm.d.ts +54 -0
- package/dist/types/commit/types.d.ts +78 -0
- package/dist/types/commit/utils/exclusions.d.ts +4 -0
- package/dist/types/commit/utils.d.ts +20 -0
- package/dist/types/config/config-file.d.ts +58 -0
- package/dist/types/config/file-lock.d.ts +6 -0
- package/dist/types/config/keybindings.d.ts +359 -0
- package/dist/types/config/model-equivalence.d.ts +24 -0
- package/dist/types/config/model-profile-activation.d.ts +36 -0
- package/dist/types/config/model-profiles.d.ts +19 -0
- package/dist/types/config/model-registry.d.ts +445 -0
- package/dist/types/config/model-resolver.d.ts +217 -0
- package/dist/types/config/models-config-schema.d.ts +652 -0
- package/dist/types/config/oauth-provider-aliases.d.ts +1 -0
- package/dist/types/config/prompt-templates.d.ts +32 -0
- package/dist/types/config/resolve-config-value.d.ts +17 -0
- package/dist/types/config/settings-schema.d.ts +3683 -0
- package/dist/types/config/settings.d.ts +134 -0
- package/dist/types/config/skill-settings-defaults.d.ts +21 -0
- package/dist/types/config.d.ts +66 -0
- package/dist/types/coordinator/contract.d.ts +4 -0
- package/dist/types/coordinator-mcp/policy.d.ts +24 -0
- package/dist/types/coordinator-mcp/safety.d.ts +26 -0
- package/dist/types/coordinator-mcp/server.d.ts +52 -0
- package/dist/types/cursor.d.ts +24 -0
- package/dist/types/dap/client.d.ts +38 -0
- package/dist/types/dap/config.d.ts +6 -0
- package/dist/types/dap/index.d.ts +4 -0
- package/dist/types/dap/session.d.ts +108 -0
- package/dist/types/dap/types.d.ts +524 -0
- package/dist/types/debug/crash-diagnostics.d.ts +45 -0
- package/dist/types/debug/index.d.ts +15 -0
- package/dist/types/debug/log-formatting.d.ts +4 -0
- package/dist/types/debug/log-viewer.d.ts +68 -0
- package/dist/types/debug/profiler.d.ts +24 -0
- package/dist/types/debug/raw-sse-buffer.d.ts +44 -0
- package/dist/types/debug/raw-sse.d.ts +16 -0
- package/dist/types/debug/report-bundle.d.ts +55 -0
- package/dist/types/debug/runtime-gauges.d.ts +6 -0
- package/dist/types/debug/system-info.d.ts +26 -0
- package/dist/types/defaults/jwc-defaults.d.ts +69 -0
- package/dist/types/discovery/agents-md.d.ts +1 -0
- package/dist/types/discovery/agents.d.ts +12 -0
- package/dist/types/discovery/builtin.d.ts +1 -0
- package/dist/types/discovery/claude-plugins.d.ts +1 -0
- package/dist/types/discovery/claude.d.ts +1 -0
- package/dist/types/discovery/cli-jaw.d.ts +1 -0
- package/dist/types/discovery/cline.d.ts +1 -0
- package/dist/types/discovery/codex.d.ts +1 -0
- package/dist/types/discovery/cursor.d.ts +16 -0
- package/dist/types/discovery/gemini.d.ts +1 -0
- package/dist/types/discovery/github.d.ts +1 -0
- package/dist/types/discovery/helpers.d.ts +278 -0
- package/dist/types/discovery/index.d.ts +49 -0
- package/dist/types/discovery/mcp-json.d.ts +1 -0
- package/dist/types/discovery/opencode.d.ts +1 -0
- package/dist/types/discovery/plugin-dir-roots.d.ts +15 -0
- package/dist/types/discovery/ssh.d.ts +1 -0
- package/dist/types/discovery/substitute-plugin-root.d.ts +5 -0
- package/dist/types/discovery/vscode.d.ts +1 -0
- package/dist/types/discovery/windsurf.d.ts +13 -0
- package/dist/types/edit/apply-patch/index.d.ts +35 -0
- package/dist/types/edit/apply-patch/parser.d.ts +34 -0
- package/dist/types/edit/diff.d.ts +75 -0
- package/dist/types/edit/file-read-cache.d.ts +25 -0
- package/dist/types/edit/index.d.ts +58 -0
- package/dist/types/edit/modes/apply-patch.d.ts +24 -0
- package/dist/types/edit/modes/patch.d.ts +99 -0
- package/dist/types/edit/modes/replace.d.ts +149 -0
- package/dist/types/edit/normalize.d.ts +43 -0
- package/dist/types/edit/notebook.d.ts +23 -0
- package/dist/types/edit/read-file.d.ts +2 -0
- package/dist/types/edit/renderer.d.ts +110 -0
- package/dist/types/edit/streaming.d.ts +66 -0
- package/dist/types/eval/backend.d.ts +40 -0
- package/dist/types/eval/index.d.ts +4 -0
- package/dist/types/eval/js/context-manager.d.ts +24 -0
- package/dist/types/eval/js/executor.d.ts +28 -0
- package/dist/types/eval/js/index.d.ts +10 -0
- package/dist/types/eval/js/shared/helpers.d.ts +38 -0
- package/dist/types/eval/js/shared/indirect-eval.d.ts +14 -0
- package/dist/types/eval/js/shared/prelude.d.ts +1 -0
- package/dist/types/eval/js/shared/rewrite-imports.d.ts +6 -0
- package/dist/types/eval/js/shared/runtime.d.ts +47 -0
- package/dist/types/eval/js/shared/types.d.ts +24 -0
- package/dist/types/eval/js/tool-bridge.d.ts +18 -0
- package/dist/types/eval/js/worker-core.d.ts +5 -0
- package/dist/types/eval/js/worker-entry.d.ts +1 -0
- package/dist/types/eval/js/worker-protocol.d.ts +77 -0
- package/dist/types/eval/py/display.d.ts +25 -0
- package/dist/types/eval/py/executor.d.ts +85 -0
- package/dist/types/eval/py/index.d.ts +10 -0
- package/dist/types/eval/py/kernel.d.ts +63 -0
- package/dist/types/eval/py/prelude.d.ts +1 -0
- package/dist/types/eval/py/runtime.d.ts +21 -0
- package/dist/types/eval/py/tool-bridge.d.ts +20 -0
- package/dist/types/eval/types.d.ts +52 -0
- package/dist/types/exa/factory.d.ts +13 -0
- package/dist/types/exa/index.d.ts +20 -0
- package/dist/types/exa/mcp-client.d.ts +45 -0
- package/dist/types/exa/render.d.ts +19 -0
- package/dist/types/exa/researcher.d.ts +9 -0
- package/dist/types/exa/search.d.ts +9 -0
- package/dist/types/exa/types.d.ts +155 -0
- package/dist/types/exa/websets.d.ts +9 -0
- package/dist/types/exec/bash-executor.d.ts +58 -0
- package/dist/types/exec/exec.d.ts +25 -0
- package/dist/types/exec/idle-timeout-watchdog.d.ts +18 -0
- package/dist/types/exec/non-interactive-env.d.ts +4 -0
- package/dist/types/export/custom-share.d.ts +20 -0
- package/dist/types/export/html/index.d.ts +10 -0
- package/dist/types/export/html/template.generated.d.ts +1 -0
- package/dist/types/export/html/template.macro.d.ts +5 -0
- package/dist/types/export/ttsr.d.ts +44 -0
- package/dist/types/extensibility/custom-commands/bundled/ci-green/index.d.ts +9 -0
- package/dist/types/extensibility/custom-commands/bundled/review/index.d.ts +10 -0
- package/dist/types/extensibility/custom-commands/index.d.ts +2 -0
- package/dist/types/extensibility/custom-commands/loader.d.ts +29 -0
- package/dist/types/extensibility/custom-commands/types.d.ts +106 -0
- package/dist/types/extensibility/custom-tools/index.d.ts +6 -0
- package/dist/types/extensibility/custom-tools/loader.d.ts +69 -0
- package/dist/types/extensibility/custom-tools/types.d.ts +227 -0
- package/dist/types/extensibility/custom-tools/wrapper.d.ts +23 -0
- package/dist/types/extensibility/extensions/compact-handler.d.ts +26 -0
- package/dist/types/extensibility/extensions/get-commands-handler.d.ts +29 -0
- package/dist/types/extensibility/extensions/index.d.ts +8 -0
- package/dist/types/extensibility/extensions/loader.d.ts +43 -0
- package/dist/types/extensibility/extensions/runner.d.ts +134 -0
- package/dist/types/extensibility/extensions/types.d.ts +916 -0
- package/dist/types/extensibility/extensions/wrapper.d.ts +54 -0
- package/dist/types/extensibility/hooks/index.d.ts +5 -0
- package/dist/types/extensibility/hooks/loader.d.ts +89 -0
- package/dist/types/extensibility/hooks/runner.d.ts +126 -0
- package/dist/types/extensibility/hooks/tool-wrapper.d.ts +25 -0
- package/dist/types/extensibility/hooks/types.d.ts +431 -0
- package/dist/types/extensibility/jwc-plugins/activation.d.ts +14 -0
- package/dist/types/extensibility/jwc-plugins/index.d.ts +9 -0
- package/dist/types/extensibility/jwc-plugins/injection.d.ts +31 -0
- package/dist/types/extensibility/jwc-plugins/loader.d.ts +3 -0
- package/dist/types/extensibility/jwc-plugins/paths.d.ts +8 -0
- package/dist/types/extensibility/jwc-plugins/schema.d.ts +3 -0
- package/dist/types/extensibility/jwc-plugins/state.d.ts +9 -0
- package/dist/types/extensibility/jwc-plugins/tools.d.ts +8 -0
- package/dist/types/extensibility/jwc-plugins/types.d.ts +64 -0
- package/dist/types/extensibility/jwc-plugins/validation.d.ts +4 -0
- package/dist/types/extensibility/plugins/doctor.d.ts +3 -0
- package/dist/types/extensibility/plugins/git-url.d.ts +34 -0
- package/dist/types/extensibility/plugins/index.d.ts +7 -0
- package/dist/types/extensibility/plugins/installer.d.ts +5 -0
- package/dist/types/extensibility/plugins/legacy-pi-compat.d.ts +2 -0
- package/dist/types/extensibility/plugins/loader.d.ts +31 -0
- package/dist/types/extensibility/plugins/manager.d.ts +65 -0
- package/dist/types/extensibility/plugins/marketplace/cache.d.ts +41 -0
- package/dist/types/extensibility/plugins/marketplace/fetcher.d.ts +48 -0
- package/dist/types/extensibility/plugins/marketplace/index.d.ts +6 -0
- package/dist/types/extensibility/plugins/marketplace/manager.d.ts +57 -0
- package/dist/types/extensibility/plugins/marketplace/registry.d.ts +34 -0
- package/dist/types/extensibility/plugins/marketplace/source-resolver.d.ts +28 -0
- package/dist/types/extensibility/plugins/marketplace/types.d.ts +130 -0
- package/dist/types/extensibility/plugins/parser.d.ts +52 -0
- package/dist/types/extensibility/plugins/types.d.ts +149 -0
- package/dist/types/extensibility/shared-events.d.ts +280 -0
- package/dist/types/extensibility/skills.d.ts +82 -0
- package/dist/types/extensibility/slash-commands.d.ts +49 -0
- package/dist/types/extensibility/tool-proxy.d.ts +4 -0
- package/dist/types/extensibility/typebox.d.ts +155 -0
- package/dist/types/extensibility/utils.d.ts +12 -0
- package/dist/types/goals/goal-planning-start.d.ts +7 -0
- package/dist/types/goals/index.d.ts +3 -0
- package/dist/types/goals/runtime.d.ts +62 -0
- package/dist/types/goals/state.d.ts +40 -0
- package/dist/types/goals/tools/goal-tool.d.ts +62 -0
- package/dist/types/harness-control-plane/classifier.d.ts +13 -0
- package/dist/types/harness-control-plane/control-endpoint.d.ts +31 -0
- package/dist/types/harness-control-plane/finalize.d.ts +55 -0
- package/dist/types/harness-control-plane/operate.d.ts +35 -0
- package/dist/types/harness-control-plane/owner.d.ts +46 -0
- package/dist/types/harness-control-plane/phase-rollup.d.ts +23 -0
- package/dist/types/harness-control-plane/preserve.d.ts +19 -0
- package/dist/types/harness-control-plane/receipt-ingest.d.ts +19 -0
- package/dist/types/harness-control-plane/receipt-spool.d.ts +26 -0
- package/dist/types/harness-control-plane/receipts.d.ts +132 -0
- package/dist/types/harness-control-plane/rpc-adapter.d.ts +66 -0
- package/dist/types/harness-control-plane/seams.d.ts +21 -0
- package/dist/types/harness-control-plane/session-lease.d.ts +65 -0
- package/dist/types/harness-control-plane/state-machine.d.ts +24 -0
- package/dist/types/harness-control-plane/storage.d.ts +60 -0
- package/dist/types/harness-control-plane/types.d.ts +179 -0
- package/dist/types/hashline/anchors.d.ts +20 -0
- package/dist/types/hashline/apply.d.ts +14 -0
- package/dist/types/hashline/constants.d.ts +19 -0
- package/dist/types/hashline/diff-preview.d.ts +2 -0
- package/dist/types/hashline/diff.d.ts +17 -0
- package/dist/types/hashline/execute.d.ts +4 -0
- package/dist/types/hashline/hash.d.ts +123 -0
- package/dist/types/hashline/index.d.ts +13 -0
- package/dist/types/hashline/input.d.ts +11 -0
- package/dist/types/hashline/parser.d.ts +7 -0
- package/dist/types/hashline/prefixes.d.ts +7 -0
- package/dist/types/hashline/recovery.d.ts +27 -0
- package/dist/types/hashline/stream.d.ts +2 -0
- package/dist/types/hashline/types.d.ts +77 -0
- package/dist/types/hindsight/backend.d.ts +13 -0
- package/dist/types/hindsight/bank.d.ts +54 -0
- package/dist/types/hindsight/client.d.ts +224 -0
- package/dist/types/hindsight/config.d.ts +51 -0
- package/dist/types/hindsight/content.d.ts +71 -0
- package/dist/types/hindsight/index.d.ts +8 -0
- package/dist/types/hindsight/mental-models.d.ts +125 -0
- package/dist/types/hindsight/state.d.ts +99 -0
- package/dist/types/hindsight/transcript.d.ts +28 -0
- package/dist/types/hooks/codex-native-hooks-config.d.ts +29 -0
- package/dist/types/hooks/native-skill-hook.d.ts +16 -0
- package/dist/types/hooks/skill-keywords.d.ts +18 -0
- package/dist/types/hooks/skill-state.d.ts +88 -0
- package/dist/types/index.d.ts +33 -0
- package/dist/types/internal-urls/agent-protocol.d.ts +12 -0
- package/dist/types/internal-urls/artifact-protocol.d.ts +6 -0
- package/dist/types/internal-urls/docs-index.generated.d.ts +2 -0
- package/dist/types/internal-urls/index.d.ts +20 -0
- package/dist/types/internal-urls/issue-pr-protocol.d.ts +17 -0
- package/dist/types/internal-urls/json-query.d.ts +30 -0
- package/dist/types/internal-urls/jwc-protocol.d.ts +19 -0
- package/dist/types/internal-urls/local-protocol.d.ts +39 -0
- package/dist/types/internal-urls/mcp-protocol.d.ts +12 -0
- package/dist/types/internal-urls/memory-protocol.d.ts +23 -0
- package/dist/types/internal-urls/parse.d.ts +19 -0
- package/dist/types/internal-urls/registry-helpers.d.ts +11 -0
- package/dist/types/internal-urls/router.d.ts +14 -0
- package/dist/types/internal-urls/rule-protocol.d.ts +6 -0
- package/dist/types/internal-urls/skill-protocol.d.ts +13 -0
- package/dist/types/internal-urls/types.d.ts +109 -0
- package/dist/types/jaw-interview/structured-renderer.d.ts +20 -0
- package/dist/types/jwc-runtime/actor-registry.d.ts +76 -0
- package/dist/types/jwc-runtime/agent-identity.d.ts +6 -0
- package/dist/types/jwc-runtime/cli-jaw-home.d.ts +1 -0
- package/dist/types/jwc-runtime/cli-jaw-vocab.d.ts +15 -0
- package/dist/types/jwc-runtime/cli-write-receipt.d.ts +24 -0
- package/dist/types/jwc-runtime/goal-cli.d.ts +7 -0
- package/dist/types/jwc-runtime/goal-engine.d.ts +193 -0
- package/dist/types/jwc-runtime/goal-guard.d.ts +26 -0
- package/dist/types/jwc-runtime/goal-mode-request.d.ts +78 -0
- package/dist/types/jwc-runtime/jaw-interview-runtime.d.ts +41 -0
- package/dist/types/jwc-runtime/launch-tmux.d.ts +70 -0
- package/dist/types/jwc-runtime/launch-worktree.d.ts +46 -0
- package/dist/types/jwc-runtime/legacy-storage.d.ts +19 -0
- package/dist/types/jwc-runtime/memory-runtime.d.ts +16 -0
- package/dist/types/jwc-runtime/orchestrate-runtime.d.ts +12 -0
- package/dist/types/jwc-runtime/orchestrate-state.d.ts +246 -0
- package/dist/types/jwc-runtime/plan-writer.d.ts +26 -0
- package/dist/types/jwc-runtime/restricted-role-agent-bash.d.ts +2 -0
- package/dist/types/jwc-runtime/session-state-sidecar.d.ts +17 -0
- package/dist/types/jwc-runtime/stage-skill-map.d.ts +7 -0
- package/dist/types/jwc-runtime/state-graph.d.ts +4 -0
- package/dist/types/jwc-runtime/state-migrations.d.ts +34 -0
- package/dist/types/jwc-runtime/state-renderer.d.ts +65 -0
- package/dist/types/jwc-runtime/state-runtime.d.ts +37 -0
- package/dist/types/jwc-runtime/state-schema.d.ts +324 -0
- package/dist/types/jwc-runtime/state-validation.d.ts +6 -0
- package/dist/types/jwc-runtime/state-writer.d.ts +147 -0
- package/dist/types/jwc-runtime/team-runtime.d.ts +349 -0
- package/dist/types/jwc-runtime/tmux-common.d.ts +49 -0
- package/dist/types/jwc-runtime/tmux-sessions.d.ts +17 -0
- package/dist/types/jwc-runtime/workflow-command-ref.d.ts +43 -0
- package/dist/types/jwc-runtime/workflow-manifest.d.ts +54 -0
- package/dist/types/lsp/client.d.ts +66 -0
- package/dist/types/lsp/clients/biome-client.d.ts +16 -0
- package/dist/types/lsp/clients/index.d.ts +19 -0
- package/dist/types/lsp/clients/lsp-linter-client.d.ts +16 -0
- package/dist/types/lsp/clients/swiftlint-client.d.ts +20 -0
- package/dist/types/lsp/config.d.ts +65 -0
- package/dist/types/lsp/edits.d.ts +23 -0
- package/dist/types/lsp/index.d.ts +130 -0
- package/dist/types/lsp/lspmux.d.ts +58 -0
- package/dist/types/lsp/render.d.ts +32 -0
- package/dist/types/lsp/startup-events.d.ts +11 -0
- package/dist/types/lsp/types.d.ts +302 -0
- package/dist/types/lsp/utils.d.ts +108 -0
- package/dist/types/main.d.ts +72 -0
- package/dist/types/mem0/backend.d.ts +2 -0
- package/dist/types/mem0/client.d.ts +49 -0
- package/dist/types/mem0/config.d.ts +24 -0
- package/dist/types/mem0/index.d.ts +5 -0
- package/dist/types/mem0/scope.d.ts +12 -0
- package/dist/types/mem0/state.d.ts +36 -0
- package/dist/types/memories/index.d.ts +28 -0
- package/dist/types/memories/local-query.d.ts +112 -0
- package/dist/types/memories/memory-config.d.ts +46 -0
- package/dist/types/memories/memory-fts.d.ts +51 -0
- package/dist/types/memories/memory-model-resolution.d.ts +20 -0
- package/dist/types/memories/memory-quality.d.ts +27 -0
- package/dist/types/memories/storage.d.ts +110 -0
- package/dist/types/memory-backend/index.d.ts +4 -0
- package/dist/types/memory-backend/local-backend.d.ts +9 -0
- package/dist/types/memory-backend/off-backend.d.ts +7 -0
- package/dist/types/memory-backend/resolve.d.ts +16 -0
- package/dist/types/memory-backend/types.d.ts +64 -0
- package/dist/types/migrate-config-dir-startup.d.ts +1 -0
- package/dist/types/migrate-config-dir.d.ts +22 -0
- package/dist/types/modes/acp/acp-agent.d.ts +61 -0
- package/dist/types/modes/acp/acp-client-bridge.d.ts +9 -0
- package/dist/types/modes/acp/acp-event-mapper.d.ts +34 -0
- package/dist/types/modes/acp/acp-mode.d.ts +5 -0
- package/dist/types/modes/acp/index.d.ts +2 -0
- package/dist/types/modes/acp/terminal-auth.d.ts +6 -0
- package/dist/types/modes/background-row-model.d.ts +3 -0
- package/dist/types/modes/bridge/auth.d.ts +12 -0
- package/dist/types/modes/bridge/bridge-client-bridge.d.ts +9 -0
- package/dist/types/modes/bridge/bridge-mode.d.ts +46 -0
- package/dist/types/modes/bridge/bridge-ui-context.d.ts +88 -0
- package/dist/types/modes/bridge/event-stream.d.ts +8 -0
- package/dist/types/modes/components/_cli-jaw-entry.d.ts +31 -0
- package/dist/types/modes/components/agent-dashboard.d.ts +21 -0
- package/dist/types/modes/components/assistant-message.d.ts +33 -0
- package/dist/types/modes/components/background-footer-detail.d.ts +6 -0
- package/dist/types/modes/components/background-footer-panel-model.d.ts +18 -0
- package/dist/types/modes/components/background-footer-panel.d.ts +19 -0
- package/dist/types/modes/components/bash-execution.d.ts +37 -0
- package/dist/types/modes/components/bordered-loader.d.ts +11 -0
- package/dist/types/modes/components/branch-summary-message.d.ts +15 -0
- package/dist/types/modes/components/btw-panel.d.ts +16 -0
- package/dist/types/modes/components/compaction-summary-message.d.ts +15 -0
- package/dist/types/modes/components/composer-chrome.d.ts +7 -0
- package/dist/types/modes/components/composer-footer.d.ts +43 -0
- package/dist/types/modes/components/countdown-timer.d.ts +14 -0
- package/dist/types/modes/components/custom-editor.d.ts +80 -0
- package/dist/types/modes/components/custom-message.d.ts +17 -0
- package/dist/types/modes/components/custom-provider-wizard.d.ts +10 -0
- package/dist/types/modes/components/diff.d.ts +11 -0
- package/dist/types/modes/components/dynamic-border.d.ts +14 -0
- package/dist/types/modes/components/eval-execution.d.ts +31 -0
- package/dist/types/modes/components/execution-shared.d.ts +46 -0
- package/dist/types/modes/components/extensions/extension-dashboard.d.ts +26 -0
- package/dist/types/modes/components/extensions/extension-list.d.ts +39 -0
- package/dist/types/modes/components/extensions/index.d.ts +8 -0
- package/dist/types/modes/components/extensions/inspector-panel.d.ts +8 -0
- package/dist/types/modes/components/extensions/state-manager.d.ts +50 -0
- package/dist/types/modes/components/extensions/types.d.ts +151 -0
- package/dist/types/modes/components/footer.d.ts +30 -0
- package/dist/types/modes/components/full-transcript-overlay.d.ts +21 -0
- package/dist/types/modes/components/help-selector.d.ts +38 -0
- package/dist/types/modes/components/history-search.d.ts +7 -0
- package/dist/types/modes/components/hook-editor.d.ts +18 -0
- package/dist/types/modes/components/hook-input.d.ts +15 -0
- package/dist/types/modes/components/hook-message.d.ts +15 -0
- package/dist/types/modes/components/hook-selector.d.ts +64 -0
- package/dist/types/modes/components/index.d.ts +35 -0
- package/dist/types/modes/components/jobs-overlay-model.d.ts +31 -0
- package/dist/types/modes/components/jobs-overlay.d.ts +30 -0
- package/dist/types/modes/components/keybinding-hints.d.ts +40 -0
- package/dist/types/modes/components/login-dialog.d.ts +32 -0
- package/dist/types/modes/components/message-frame.d.ts +42 -0
- package/dist/types/modes/components/model-selector.d.ts +53 -0
- package/dist/types/modes/components/oauth-selector.d.ts +14 -0
- package/dist/types/modes/components/pabcd-border.d.ts +8 -0
- package/dist/types/modes/components/plugin-selector.d.ts +26 -0
- package/dist/types/modes/components/plugin-settings.d.ts +66 -0
- package/dist/types/modes/components/provider-onboarding-selector.d.ts +7 -0
- package/dist/types/modes/components/queue-mode-selector.d.ts +9 -0
- package/dist/types/modes/components/quota-panel.d.ts +21 -0
- package/dist/types/modes/components/read-tool-group.d.ts +34 -0
- package/dist/types/modes/components/runtime-mcp-add-wizard.d.ts +25 -0
- package/dist/types/modes/components/session-observer-overlay.d.ts +11 -0
- package/dist/types/modes/components/session-selector.d.ts +30 -0
- package/dist/types/modes/components/settings-defs.d.ts +50 -0
- package/dist/types/modes/components/settings-selector.d.ts +56 -0
- package/dist/types/modes/components/show-images-selector.d.ts +9 -0
- package/dist/types/modes/components/skill-hud/render.d.ts +2 -0
- package/dist/types/modes/components/skill-message.d.ts +11 -0
- package/dist/types/modes/components/status-line/context-thresholds.d.ts +4 -0
- package/dist/types/modes/components/status-line/git-utils.d.ts +22 -0
- package/dist/types/modes/components/status-line/index.d.ts +4 -0
- package/dist/types/modes/components/status-line/presets.d.ts +3 -0
- package/dist/types/modes/components/status-line/segments.d.ts +5 -0
- package/dist/types/modes/components/status-line/separators.d.ts +3 -0
- package/dist/types/modes/components/status-line/token-rate.d.ts +10 -0
- package/dist/types/modes/components/status-line/types.d.ts +92 -0
- package/dist/types/modes/components/status-line/workflow-readers.d.ts +21 -0
- package/dist/types/modes/components/status-line.d.ts +82 -0
- package/dist/types/modes/components/theme-selector.d.ts +10 -0
- package/dist/types/modes/components/thinking-selector.d.ts +10 -0
- package/dist/types/modes/components/todo-reminder.d.ts +13 -0
- package/dist/types/modes/components/tool-execution.d.ts +69 -0
- package/dist/types/modes/components/tool-transcript-overlay.d.ts +18 -0
- package/dist/types/modes/components/tree-selector.d.ts +31 -0
- package/dist/types/modes/components/ttsr-notification.d.ts +15 -0
- package/dist/types/modes/components/user-message-selector.d.ts +28 -0
- package/dist/types/modes/components/user-message.d.ts +8 -0
- package/dist/types/modes/components/visual-truncate.d.ts +19 -0
- package/dist/types/modes/components/welcome.d.ts +42 -0
- package/dist/types/modes/controllers/btw-controller.d.ts +10 -0
- package/dist/types/modes/controllers/command-controller-shared.d.ts +47 -0
- package/dist/types/modes/controllers/command-controller.d.ts +39 -0
- package/dist/types/modes/controllers/event-controller.d.ts +12 -0
- package/dist/types/modes/controllers/extension-ui-controller.d.ts +80 -0
- package/dist/types/modes/controllers/input-controller.d.ts +49 -0
- package/dist/types/modes/controllers/runtime-mcp-command-controller.d.ts +10 -0
- package/dist/types/modes/controllers/selector-controller.d.ts +78 -0
- package/dist/types/modes/controllers/ssh-command-controller.d.ts +10 -0
- package/dist/types/modes/controllers/todo-command-controller.d.ts +7 -0
- package/dist/types/modes/emoji-autocomplete.d.ts +16 -0
- package/dist/types/modes/index.d.ts +10 -0
- package/dist/types/modes/interactive-mode.d.ts +295 -0
- package/dist/types/modes/jobs-observer.d.ts +67 -0
- package/dist/types/modes/oauth-manual-input.d.ts +8 -0
- package/dist/types/modes/print-mode.d.ts +27 -0
- package/dist/types/modes/prompt-action-autocomplete.d.ts +46 -0
- package/dist/types/modes/rpc/host-tools.d.ts +1 -0
- package/dist/types/modes/rpc/host-uris.d.ts +1 -0
- package/dist/types/modes/rpc/rpc-client.d.ts +267 -0
- package/dist/types/modes/rpc/rpc-mode.d.ts +67 -0
- package/dist/types/modes/rpc/rpc-types.d.ts +765 -0
- package/dist/types/modes/runtime-init.d.ts +21 -0
- package/dist/types/modes/session-observer-registry.d.ts +26 -0
- package/dist/types/modes/shared/agent-wire/approval-gate.d.ts +57 -0
- package/dist/types/modes/shared/agent-wire/command-contract.d.ts +18 -0
- package/dist/types/modes/shared/agent-wire/command-dispatch.d.ts +35 -0
- package/dist/types/modes/shared/agent-wire/command-validation.d.ts +2 -0
- package/dist/types/modes/shared/agent-wire/event-contract.d.ts +84 -0
- package/dist/types/modes/shared/agent-wire/event-envelope.d.ts +38 -0
- package/dist/types/modes/shared/agent-wire/event-observation.d.ts +37 -0
- package/dist/types/modes/shared/agent-wire/handshake.d.ts +56 -0
- package/dist/types/modes/shared/agent-wire/host-tool-bridge.d.ts +16 -0
- package/dist/types/modes/shared/agent-wire/host-uri-bridge.d.ts +17 -0
- package/dist/types/modes/shared/agent-wire/jaw-interview-gate.d.ts +58 -0
- package/dist/types/modes/shared/agent-wire/protocol.d.ts +25 -0
- package/dist/types/modes/shared/agent-wire/responses.d.ts +4 -0
- package/dist/types/modes/shared/agent-wire/scopes.d.ts +18 -0
- package/dist/types/modes/shared/agent-wire/session-registry.d.ts +25 -0
- package/dist/types/modes/shared/agent-wire/ui-request-broker.d.ts +42 -0
- package/dist/types/modes/shared/agent-wire/ui-result.d.ts +27 -0
- package/dist/types/modes/shared/agent-wire/unattended-action-policy.d.ts +27 -0
- package/dist/types/modes/shared/agent-wire/unattended-audit.d.ts +68 -0
- package/dist/types/modes/shared/agent-wire/unattended-run-controller.d.ts +161 -0
- package/dist/types/modes/shared/agent-wire/unattended-session.d.ts +61 -0
- package/dist/types/modes/shared/agent-wire/workflow-gate-broker.d.ts +114 -0
- package/dist/types/modes/shared/agent-wire/workflow-gate-schema.d.ts +39 -0
- package/dist/types/modes/shared.d.ts +15 -0
- package/dist/types/modes/theme/defaults/index.d.ts +499 -0
- package/dist/types/modes/theme/mermaid-cache.d.ts +9 -0
- package/dist/types/modes/theme/shimmer.d.ts +38 -0
- package/dist/types/modes/theme/theme.d.ts +274 -0
- package/dist/types/modes/types.d.ts +311 -0
- package/dist/types/modes/utils/abort-message.d.ts +4 -0
- package/dist/types/modes/utils/compaction-progress.d.ts +20 -0
- package/dist/types/modes/utils/context-usage.d.ts +53 -0
- package/dist/types/modes/utils/help-markdown.d.ts +17 -0
- package/dist/types/modes/utils/hotkeys-markdown.d.ts +5 -0
- package/dist/types/modes/utils/keybinding-matchers.d.ts +10 -0
- package/dist/types/modes/utils/session-transcript-replay.d.ts +24 -0
- package/dist/types/modes/utils/tools-markdown.d.ts +5 -0
- package/dist/types/modes/utils/ui-helpers.d.ts +77 -0
- package/dist/types/notifications/ask-bridge.d.ts +36 -0
- package/dist/types/notifications/config-command-parser.d.ts +27 -0
- package/dist/types/notifications/config.d.ts +37 -0
- package/dist/types/notifications/daemon-control.d.ts +29 -0
- package/dist/types/notifications/daemon-engine.d.ts +64 -0
- package/dist/types/notifications/daemon-inbound.d.ts +93 -0
- package/dist/types/notifications/daemon-loop.d.ts +28 -0
- package/dist/types/notifications/daemon-owner.d.ts +25 -0
- package/dist/types/notifications/daemon-runtime.d.ts +32 -0
- package/dist/types/notifications/discovery.d.ts +45 -0
- package/dist/types/notifications/index.d.ts +34 -0
- package/dist/types/notifications/lifecycle-audit.d.ts +60 -0
- package/dist/types/notifications/lifecycle-command-parser.d.ts +19 -0
- package/dist/types/notifications/lifecycle-control-runtime.d.ts +45 -0
- package/dist/types/notifications/notification-redaction.d.ts +36 -0
- package/dist/types/notifications/protocol.d.ts +43 -0
- package/dist/types/notifications/remote-answer.d.ts +78 -0
- package/dist/types/notifications/reply-bridge.d.ts +21 -0
- package/dist/types/notifications/server.d.ts +38 -0
- package/dist/types/notifications/session-lifecycle.d.ts +22 -0
- package/dist/types/notifications/session-registry.d.ts +31 -0
- package/dist/types/notifications/telegram-api.d.ts +93 -0
- package/dist/types/notifications/telegram-ask-keyboard.d.ts +57 -0
- package/dist/types/notifications/telegram-callback-ingest.d.ts +49 -0
- package/dist/types/notifications/telegram-inbound-router.d.ts +57 -0
- package/dist/types/notifications/telegram-media-policy.d.ts +27 -0
- package/dist/types/notifications/telegram-media-render.d.ts +29 -0
- package/dist/types/notifications/telegram-message-ingest.d.ts +54 -0
- package/dist/types/notifications/telegram-pairing.d.ts +21 -0
- package/dist/types/notifications/threaded-lifecycle.d.ts +23 -0
- package/dist/types/notifications/threaded-shutdown.d.ts +19 -0
- package/dist/types/notifications/threaded-surface.d.ts +71 -0
- package/dist/types/notifications/transport-shell.d.ts +47 -0
- package/dist/types/notifications/transport-state.d.ts +44 -0
- package/dist/types/notifications/workspace-path-confinement.d.ts +12 -0
- package/dist/types/plan-mode/approved-plan.d.ts +49 -0
- package/dist/types/plan-mode/state.d.ts +6 -0
- package/dist/types/registry/agent-registry.d.ts +62 -0
- package/dist/types/reminders/star-reminder.d.ts +115 -0
- package/dist/types/runtime-mcp/client.d.ts +74 -0
- package/dist/types/runtime-mcp/config-writer.d.ts +53 -0
- package/dist/types/runtime-mcp/config.d.ts +75 -0
- package/dist/types/runtime-mcp/discoverable-tool-metadata.d.ts +7 -0
- package/dist/types/runtime-mcp/index.d.ts +18 -0
- package/dist/types/runtime-mcp/json-rpc.d.ts +22 -0
- package/dist/types/runtime-mcp/loader.d.ts +43 -0
- package/dist/types/runtime-mcp/manager.d.ts +193 -0
- package/dist/types/runtime-mcp/oauth-discovery.d.ts +40 -0
- package/dist/types/runtime-mcp/oauth-flow.d.ts +59 -0
- package/dist/types/runtime-mcp/render.d.ts +25 -0
- package/dist/types/runtime-mcp/smithery-auth.d.ts +16 -0
- package/dist/types/runtime-mcp/smithery-connect.d.ts +38 -0
- package/dist/types/runtime-mcp/smithery-registry.d.ts +51 -0
- package/dist/types/runtime-mcp/tool-bridge.d.ts +86 -0
- package/dist/types/runtime-mcp/tool-cache.d.ts +8 -0
- package/dist/types/runtime-mcp/transports/http.d.ts +36 -0
- package/dist/types/runtime-mcp/transports/index.d.ts +5 -0
- package/dist/types/runtime-mcp/transports/stdio.d.ts +28 -0
- package/dist/types/runtime-mcp/types.d.ts +333 -0
- package/dist/types/sdk.d.ts +234 -0
- package/dist/types/secrets/index.d.ts +10 -0
- package/dist/types/secrets/obfuscator.d.ts +23 -0
- package/dist/types/secrets/regex.d.ts +2 -0
- package/dist/types/session/agent-session.d.ts +1052 -0
- package/dist/types/session/agent-storage.d.ts +100 -0
- package/dist/types/session/artifacts.d.ts +61 -0
- package/dist/types/session/auth-broker-config.d.ts +13 -0
- package/dist/types/session/auth-storage.d.ts +6 -0
- package/dist/types/session/blob-store.d.ts +112 -0
- package/dist/types/session/client-bridge.d.ts +88 -0
- package/dist/types/session/contribution-prep.d.ts +47 -0
- package/dist/types/session/history-storage.d.ts +16 -0
- package/dist/types/session/messages.d.ts +165 -0
- package/dist/types/session/pabcd-stage-header.d.ts +18 -0
- package/dist/types/session/session-dump-format.d.ts +22 -0
- package/dist/types/session/session-manager.d.ts +571 -0
- package/dist/types/session/session-storage.d.ts +88 -0
- package/dist/types/session/streaming-output.d.ts +196 -0
- package/dist/types/session/tool-choice-queue.d.ts +78 -0
- package/dist/types/session/yield-queue.d.ts +24 -0
- package/dist/types/setup/hermes-setup.d.ts +71 -0
- package/dist/types/setup/model-onboarding-guidance.d.ts +9 -0
- package/dist/types/setup/provider-onboarding.d.ts +52 -0
- package/dist/types/skill-state/active-state.d.ts +115 -0
- package/dist/types/skill-state/initial-phase.d.ts +12 -0
- package/dist/types/skill-state/jaw-interview-mutation-guard.d.ts +33 -0
- package/dist/types/skill-state/workflow-hud.d.ts +76 -0
- package/dist/types/skill-state/workflow-state-contract.d.ts +60 -0
- package/dist/types/skill-state/workflow-state-version.d.ts +3 -0
- package/dist/types/slash-commands/acp-builtins.d.ts +18 -0
- package/dist/types/slash-commands/builtin-registry.d.ts +24 -0
- package/dist/types/slash-commands/helpers/context-report.d.ts +7 -0
- package/dist/types/slash-commands/helpers/format.d.ts +10 -0
- package/dist/types/slash-commands/helpers/mcp.d.ts +3 -0
- package/dist/types/slash-commands/helpers/parse.d.ts +33 -0
- package/dist/types/slash-commands/helpers/ssh.d.ts +3 -0
- package/dist/types/slash-commands/helpers/todo.d.ts +3 -0
- package/dist/types/slash-commands/helpers/usage-report.d.ts +11 -0
- package/dist/types/slash-commands/types.d.ts +120 -0
- package/dist/types/ssh/config-writer.d.ts +49 -0
- package/dist/types/ssh/connection-manager.d.ts +33 -0
- package/dist/types/ssh/ssh-executor.d.ts +37 -0
- package/dist/types/ssh/sshfs-mount.d.ts +6 -0
- package/dist/types/ssh/utils.d.ts +2 -0
- package/dist/types/stt/downloader.d.ts +9 -0
- package/dist/types/stt/index.d.ts +3 -0
- package/dist/types/stt/recorder.d.ts +13 -0
- package/dist/types/stt/setup.d.ts +18 -0
- package/dist/types/stt/stt-controller.d.ts +16 -0
- package/dist/types/stt/transcriber.d.ts +16 -0
- package/dist/types/system-prompt.d.ts +100 -0
- package/dist/types/task/agents.d.ts +28 -0
- package/dist/types/task/commands.d.ts +35 -0
- package/dist/types/task/discovery.d.ts +19 -0
- package/dist/types/task/executor.d.ts +113 -0
- package/dist/types/task/fork-context-advisory.d.ts +13 -0
- package/dist/types/task/id.d.ts +7 -0
- package/dist/types/task/index.d.ts +43 -0
- package/dist/types/task/jwc-command.d.ts +7 -0
- package/dist/types/task/model-presets.d.ts +17 -0
- package/dist/types/task/name-generator.d.ts +16 -0
- package/dist/types/task/output-manager.d.ts +36 -0
- package/dist/types/task/parallel.d.ts +34 -0
- package/dist/types/task/receipt.d.ts +86 -0
- package/dist/types/task/render.d.ts +28 -0
- package/dist/types/task/roi-reconciliation.d.ts +27 -0
- package/dist/types/task/simple-mode.d.ts +8 -0
- package/dist/types/task/spawn-gate.d.ts +38 -0
- package/dist/types/task/subprocess-tool-registry.d.ts +72 -0
- package/dist/types/task/types.d.ts +506 -0
- package/dist/types/task/worktree.d.ts +94 -0
- package/dist/types/thinking.d.ts +31 -0
- package/dist/types/tool-discovery/tool-index.d.ts +113 -0
- package/dist/types/tools/archive-reader.d.ts +40 -0
- package/dist/types/tools/ask.d.ts +152 -0
- package/dist/types/tools/ast-edit.d.ts +77 -0
- package/dist/types/tools/ast-grep.d.ts +69 -0
- package/dist/types/tools/auto-generated-guard.d.ts +17 -0
- package/dist/types/tools/background.d.ts +124 -0
- package/dist/types/tools/bash-allowed-prefixes.d.ts +5 -0
- package/dist/types/tools/bash-command-fixup.d.ts +11 -0
- package/dist/types/tools/bash-interactive.d.ts +16 -0
- package/dist/types/tools/bash-interceptor.d.ts +24 -0
- package/dist/types/tools/bash-pty-selection.d.ts +7 -0
- package/dist/types/tools/bash-skill-urls.d.ts +31 -0
- package/dist/types/tools/bash.d.ts +156 -0
- package/dist/types/tools/browser/actions.d.ts +54 -0
- package/dist/types/tools/browser/attach.d.ts +34 -0
- package/dist/types/tools/browser/launch.d.ts +62 -0
- package/dist/types/tools/browser/readable.d.ts +17 -0
- package/dist/types/tools/browser/registry.d.ts +42 -0
- package/dist/types/tools/browser/render.d.ts +50 -0
- package/dist/types/tools/browser/tab-protocol.d.ts +144 -0
- package/dist/types/tools/browser/tab-supervisor.d.ts +63 -0
- package/dist/types/tools/browser/tab-worker-entry.d.ts +1 -0
- package/dist/types/tools/browser/tab-worker.d.ts +19 -0
- package/dist/types/tools/browser.d.ts +194 -0
- package/dist/types/tools/calculator.d.ts +76 -0
- package/dist/types/tools/checkpoint.d.ts +63 -0
- package/dist/types/tools/computer-use-backend.d.ts +6 -0
- package/dist/types/tools/computer-use.d.ts +100 -0
- package/dist/types/tools/conflict-detect.d.ts +205 -0
- package/dist/types/tools/context.d.ts +19 -0
- package/dist/types/tools/cron.d.ts +116 -0
- package/dist/types/tools/debug.d.ts +209 -0
- package/dist/types/tools/eval.d.ts +108 -0
- package/dist/types/tools/fetch.d.ts +61 -0
- package/dist/types/tools/file-recorder.d.ts +13 -0
- package/dist/types/tools/find.d.ts +95 -0
- package/dist/types/tools/fs-cache-invalidation.d.ts +15 -0
- package/dist/types/tools/gh-format.d.ts +6 -0
- package/dist/types/tools/gh-renderer.d.ts +25 -0
- package/dist/types/tools/gh.d.ts +356 -0
- package/dist/types/tools/github-cache.d.ts +103 -0
- package/dist/types/tools/grouped-file-output.d.ts +36 -0
- package/dist/types/tools/hindsight-recall.d.ts +21 -0
- package/dist/types/tools/hindsight-reflect.d.ts +23 -0
- package/dist/types/tools/hindsight-retain.d.ts +27 -0
- package/dist/types/tools/image-gen.d.ts +79 -0
- package/dist/types/tools/index.d.ts +281 -0
- package/dist/types/tools/inspect-image-renderer.d.ts +26 -0
- package/dist/types/tools/inspect-image.d.ts +31 -0
- package/dist/types/tools/irc.d.ts +79 -0
- package/dist/types/tools/job.d.ts +65 -0
- package/dist/types/tools/json-tree.d.ts +23 -0
- package/dist/types/tools/jtd-to-json-schema.d.ts +29 -0
- package/dist/types/tools/jtd-to-typescript.d.ts +26 -0
- package/dist/types/tools/jtd-utils.d.ts +42 -0
- package/dist/types/tools/list-limit.d.ts +12 -0
- package/dist/types/tools/match-line-format.d.ts +11 -0
- package/dist/types/tools/monitor.d.ts +65 -0
- package/dist/types/tools/output-meta.d.ts +204 -0
- package/dist/types/tools/path-utils.d.ts +147 -0
- package/dist/types/tools/plan-mode-guard.d.ts +18 -0
- package/dist/types/tools/read.d.ts +85 -0
- package/dist/types/tools/recipe/index.d.ts +45 -0
- package/dist/types/tools/recipe/render.d.ts +36 -0
- package/dist/types/tools/recipe/runner.d.ts +60 -0
- package/dist/types/tools/recipe/runners/cargo.d.ts +16 -0
- package/dist/types/tools/recipe/runners/index.d.ts +2 -0
- package/dist/types/tools/recipe/runners/just.d.ts +2 -0
- package/dist/types/tools/recipe/runners/make.d.ts +2 -0
- package/dist/types/tools/recipe/runners/pkg.d.ts +2 -0
- package/dist/types/tools/recipe/runners/task.d.ts +2 -0
- package/dist/types/tools/render-mermaid.d.ts +37 -0
- package/dist/types/tools/render-utils.d.ts +158 -0
- package/dist/types/tools/renderers.d.ts +26 -0
- package/dist/types/tools/resolve.d.ts +90 -0
- package/dist/types/tools/review.d.ts +63 -0
- package/dist/types/tools/search-tool-bm25.d.ts +65 -0
- package/dist/types/tools/search.d.ts +93 -0
- package/dist/types/tools/skill.d.ts +47 -0
- package/dist/types/tools/sqlite-reader.d.ts +93 -0
- package/dist/types/tools/ssh.d.ts +67 -0
- package/dist/types/tools/subagent-render.d.ts +25 -0
- package/dist/types/tools/subagent.d.ts +87 -0
- package/dist/types/tools/telegram-send.d.ts +53 -0
- package/dist/types/tools/todo-write.d.ts +120 -0
- package/dist/types/tools/tool-errors.d.ts +33 -0
- package/dist/types/tools/tool-result.d.ts +30 -0
- package/dist/types/tools/tool-timeouts.d.ts +51 -0
- package/dist/types/tools/vim.d.ts +58 -0
- package/dist/types/tools/write.d.ts +59 -0
- package/dist/types/tools/yield.d.ts +25 -0
- package/dist/types/tui/code-cell.d.ts +32 -0
- package/dist/types/tui/file-list.d.ts +22 -0
- package/dist/types/tui/hyperlink.d.ts +42 -0
- package/dist/types/tui/index.d.ts +11 -0
- package/dist/types/tui/output-block.d.ts +28 -0
- package/dist/types/tui/status-line.d.ts +18 -0
- package/dist/types/tui/tree-list.d.ts +19 -0
- package/dist/types/tui/types.d.ts +13 -0
- package/dist/types/tui/utils.d.ts +36 -0
- package/dist/types/utils/changelog.d.ts +36 -0
- package/dist/types/utils/clipboard.d.ts +22 -0
- package/dist/types/utils/command-args.d.ts +9 -0
- package/dist/types/utils/commit-message-generator.d.ts +7 -0
- package/dist/types/utils/edit-mode.d.ts +13 -0
- package/dist/types/utils/event-bus.d.ts +6 -0
- package/dist/types/utils/external-editor.d.ts +17 -0
- package/dist/types/utils/file-display-mode.d.ts +27 -0
- package/dist/types/utils/file-mentions.d.ts +11 -0
- package/dist/types/utils/git.d.ts +361 -0
- package/dist/types/utils/image-loading.d.ts +26 -0
- package/dist/types/utils/image-resize.d.ts +39 -0
- package/dist/types/utils/lang-from-path.d.ts +8 -0
- package/dist/types/utils/markit.d.ts +7 -0
- package/dist/types/utils/open.d.ts +2 -0
- package/dist/types/utils/session-color.d.ts +10 -0
- package/dist/types/utils/shell-snapshot.d.ts +5 -0
- package/dist/types/utils/sixel.d.ts +21 -0
- package/dist/types/utils/title-generator.d.ts +31 -0
- package/dist/types/utils/tokenizer-download.d.ts +4 -0
- package/dist/types/utils/tokenizer-encoding.d.ts +7 -0
- package/dist/types/utils/tool-choice.d.ts +20 -0
- package/dist/types/utils/tools-manager.d.ts +9 -0
- package/dist/types/vim/buffer.d.ts +41 -0
- package/dist/types/vim/commands.d.ts +6 -0
- package/dist/types/vim/engine.d.ts +47 -0
- package/dist/types/vim/parser.d.ts +3 -0
- package/dist/types/vim/render.d.ts +25 -0
- package/dist/types/vim/types.d.ts +182 -0
- package/dist/types/web/kagi.d.ts +23 -0
- package/dist/types/web/parallel.d.ts +58 -0
- package/dist/types/web/public-fetch-url.d.ts +1 -0
- package/dist/types/web/scrapers/artifacthub.d.ts +6 -0
- package/dist/types/web/scrapers/arxiv.d.ts +5 -0
- package/dist/types/web/scrapers/aur.d.ts +5 -0
- package/dist/types/web/scrapers/biorxiv.d.ts +5 -0
- package/dist/types/web/scrapers/bluesky.d.ts +5 -0
- package/dist/types/web/scrapers/brew.d.ts +5 -0
- package/dist/types/web/scrapers/cheatsh.d.ts +8 -0
- package/dist/types/web/scrapers/chocolatey.d.ts +5 -0
- package/dist/types/web/scrapers/choosealicense.d.ts +2 -0
- package/dist/types/web/scrapers/cisa-kev.d.ts +5 -0
- package/dist/types/web/scrapers/clojars.d.ts +5 -0
- package/dist/types/web/scrapers/coingecko.d.ts +5 -0
- package/dist/types/web/scrapers/crates-io.d.ts +5 -0
- package/dist/types/web/scrapers/crossref.d.ts +2 -0
- package/dist/types/web/scrapers/devto.d.ts +5 -0
- package/dist/types/web/scrapers/discogs.d.ts +8 -0
- package/dist/types/web/scrapers/discourse.d.ts +5 -0
- package/dist/types/web/scrapers/dockerhub.d.ts +5 -0
- package/dist/types/web/scrapers/docs-rs.d.ts +2 -0
- package/dist/types/web/scrapers/fdroid.d.ts +5 -0
- package/dist/types/web/scrapers/firefox-addons.d.ts +2 -0
- package/dist/types/web/scrapers/flathub.d.ts +2 -0
- package/dist/types/web/scrapers/github-gist.d.ts +5 -0
- package/dist/types/web/scrapers/github.d.ts +12 -0
- package/dist/types/web/scrapers/gitlab.d.ts +5 -0
- package/dist/types/web/scrapers/go-pkg.d.ts +5 -0
- package/dist/types/web/scrapers/hackage.d.ts +5 -0
- package/dist/types/web/scrapers/hackernews.d.ts +2 -0
- package/dist/types/web/scrapers/hex.d.ts +5 -0
- package/dist/types/web/scrapers/huggingface.d.ts +2 -0
- package/dist/types/web/scrapers/iacr.d.ts +5 -0
- package/dist/types/web/scrapers/index.d.ts +84 -0
- package/dist/types/web/scrapers/jetbrains-marketplace.d.ts +2 -0
- package/dist/types/web/scrapers/lemmy.d.ts +2 -0
- package/dist/types/web/scrapers/lobsters.d.ts +5 -0
- package/dist/types/web/scrapers/mastodon.d.ts +5 -0
- package/dist/types/web/scrapers/maven.d.ts +6 -0
- package/dist/types/web/scrapers/mdn.d.ts +2 -0
- package/dist/types/web/scrapers/metacpan.d.ts +5 -0
- package/dist/types/web/scrapers/musicbrainz.d.ts +5 -0
- package/dist/types/web/scrapers/npm.d.ts +5 -0
- package/dist/types/web/scrapers/nuget.d.ts +5 -0
- package/dist/types/web/scrapers/nvd.d.ts +5 -0
- package/dist/types/web/scrapers/ollama.d.ts +2 -0
- package/dist/types/web/scrapers/open-vsx.d.ts +5 -0
- package/dist/types/web/scrapers/opencorporates.d.ts +5 -0
- package/dist/types/web/scrapers/openlibrary.d.ts +5 -0
- package/dist/types/web/scrapers/orcid.d.ts +5 -0
- package/dist/types/web/scrapers/osv.d.ts +5 -0
- package/dist/types/web/scrapers/packagist.d.ts +5 -0
- package/dist/types/web/scrapers/pub-dev.d.ts +5 -0
- package/dist/types/web/scrapers/pubmed.d.ts +5 -0
- package/dist/types/web/scrapers/pypi.d.ts +5 -0
- package/dist/types/web/scrapers/rawg.d.ts +2 -0
- package/dist/types/web/scrapers/readthedocs.d.ts +2 -0
- package/dist/types/web/scrapers/reddit.d.ts +5 -0
- package/dist/types/web/scrapers/repology.d.ts +5 -0
- package/dist/types/web/scrapers/rfc.d.ts +5 -0
- package/dist/types/web/scrapers/rubygems.d.ts +5 -0
- package/dist/types/web/scrapers/searchcode.d.ts +2 -0
- package/dist/types/web/scrapers/sec-edgar.d.ts +5 -0
- package/dist/types/web/scrapers/semantic-scholar.d.ts +2 -0
- package/dist/types/web/scrapers/snapcraft.d.ts +2 -0
- package/dist/types/web/scrapers/sourcegraph.d.ts +2 -0
- package/dist/types/web/scrapers/spdx.d.ts +5 -0
- package/dist/types/web/scrapers/spotify.d.ts +8 -0
- package/dist/types/web/scrapers/stackoverflow.d.ts +6 -0
- package/dist/types/web/scrapers/terraform.d.ts +5 -0
- package/dist/types/web/scrapers/tldr.d.ts +7 -0
- package/dist/types/web/scrapers/twitter.d.ts +5 -0
- package/dist/types/web/scrapers/types.d.ts +78 -0
- package/dist/types/web/scrapers/utils.d.ts +26 -0
- package/dist/types/web/scrapers/vimeo.d.ts +5 -0
- package/dist/types/web/scrapers/vscode-marketplace.d.ts +5 -0
- package/dist/types/web/scrapers/w3c.d.ts +2 -0
- package/dist/types/web/scrapers/wikidata.d.ts +5 -0
- package/dist/types/web/scrapers/wikipedia.d.ts +5 -0
- package/dist/types/web/scrapers/youtube.d.ts +5 -0
- package/dist/types/web/search/index.d.ts +95 -0
- package/dist/types/web/search/provider.d.ts +35 -0
- package/dist/types/web/search/providers/anthropic.d.ts +32 -0
- package/dist/types/web/search/providers/base.d.ts +90 -0
- package/dist/types/web/search/providers/brave.d.ts +27 -0
- package/dist/types/web/search/providers/codex.d.ts +35 -0
- package/dist/types/web/search/providers/duckduckgo.d.ts +57 -0
- package/dist/types/web/search/providers/exa.d.ts +52 -0
- package/dist/types/web/search/providers/gemini.d.ts +59 -0
- package/dist/types/web/search/providers/jina.d.ts +26 -0
- package/dist/types/web/search/providers/kagi.d.ts +24 -0
- package/dist/types/web/search/providers/kimi.d.ts +27 -0
- package/dist/types/web/search/providers/parallel.d.ts +15 -0
- package/dist/types/web/search/providers/perplexity.d.ts +38 -0
- package/dist/types/web/search/providers/searxng.d.ts +44 -0
- package/dist/types/web/search/providers/synthetic.d.ts +21 -0
- package/dist/types/web/search/providers/tavily.d.ts +29 -0
- package/dist/types/web/search/providers/utils.d.ts +52 -0
- package/dist/types/web/search/providers/xai.d.ts +62 -0
- package/dist/types/web/search/providers/zai.d.ts +28 -0
- package/dist/types/web/search/render.d.ts +35 -0
- package/dist/types/web/search/types.d.ts +348 -0
- package/dist/types/web/search/utils.d.ts +4 -0
- package/dist/types/workspace-tree.d.ts +42 -0
- package/examples/README.md +21 -0
- package/examples/custom-tools/README.md +104 -0
- package/examples/custom-tools/hello/index.ts +20 -0
- package/examples/extensions/README.md +120 -0
- package/examples/extensions/api-demo.ts +79 -0
- package/examples/extensions/chalk-logger.ts +25 -0
- package/examples/extensions/hello.ts +31 -0
- package/examples/extensions/pirate.ts +43 -0
- package/examples/extensions/plan-mode.ts +549 -0
- package/examples/extensions/reload-runtime.ts +38 -0
- package/examples/extensions/tools.ts +144 -0
- package/examples/extensions/with-deps/index.ts +36 -0
- package/examples/extensions/with-deps/package-lock.json +31 -0
- package/examples/extensions/with-deps/package.json +16 -0
- package/examples/hooks/README.md +56 -0
- package/examples/hooks/auto-commit-on-exit.ts +48 -0
- package/examples/hooks/confirm-destructive.ts +58 -0
- package/examples/hooks/custom-compaction.ts +115 -0
- package/examples/hooks/dirty-repo-guard.ts +51 -0
- package/examples/hooks/file-trigger.ts +40 -0
- package/examples/hooks/git-checkpoint.ts +52 -0
- package/examples/hooks/handoff.ts +149 -0
- package/examples/hooks/permission-gate.ts +33 -0
- package/examples/hooks/protected-paths.ts +29 -0
- package/examples/hooks/qna.ts +118 -0
- package/examples/hooks/status-line.ts +39 -0
- package/examples/sdk/01-minimal.ts +21 -0
- package/examples/sdk/02-custom-model.ts +49 -0
- package/examples/sdk/03-custom-prompt.ts +46 -0
- package/examples/sdk/04-skills.ts +43 -0
- package/examples/sdk/06-extensions.ts +82 -0
- package/examples/sdk/06-hooks.ts +61 -0
- package/examples/sdk/07-context-files.ts +35 -0
- package/examples/sdk/08-prompt-templates.ts +41 -0
- package/examples/sdk/08-slash-commands.ts +46 -0
- package/examples/sdk/09-api-keys-and-oauth.ts +54 -0
- package/examples/sdk/11-sessions.ts +47 -0
- package/examples/sdk/README.md +172 -0
- package/package.json +539 -0
- package/scripts/build-binary.ts +84 -0
- package/scripts/format-prompts.ts +68 -0
- package/scripts/generate-docs-index.ts +71 -0
- package/scripts/generate-template.ts +33 -0
- package/src/async/index.ts +2 -0
- package/src/async/job-manager.ts +1299 -0
- package/src/async/support.ts +6 -0
- package/src/autoresearch/command-resume.md +14 -0
- package/src/autoresearch/dashboard.ts +446 -0
- package/src/autoresearch/git.ts +319 -0
- package/src/autoresearch/helpers.ts +218 -0
- package/src/autoresearch/index.ts +536 -0
- package/src/autoresearch/prompt-setup.md +43 -0
- package/src/autoresearch/prompt.md +103 -0
- package/src/autoresearch/resume-message.md +10 -0
- package/src/autoresearch/state.ts +273 -0
- package/src/autoresearch/storage.ts +699 -0
- package/src/autoresearch/tools/init-experiment.ts +272 -0
- package/src/autoresearch/tools/log-experiment.ts +524 -0
- package/src/autoresearch/tools/run-experiment.ts +475 -0
- package/src/autoresearch/tools/update-notes.ts +109 -0
- package/src/autoresearch/types.ts +168 -0
- package/src/bun-imports.d.ts +28 -0
- package/src/capability/context-file.ts +44 -0
- package/src/capability/extension-module.ts +34 -0
- package/src/capability/extension.ts +47 -0
- package/src/capability/fs.ts +107 -0
- package/src/capability/hook.ts +40 -0
- package/src/capability/index.ts +436 -0
- package/src/capability/instruction.ts +37 -0
- package/src/capability/mcp.ts +74 -0
- package/src/capability/prompt.ts +35 -0
- package/src/capability/rule.ts +244 -0
- package/src/capability/settings.ts +34 -0
- package/src/capability/skill.ts +56 -0
- package/src/capability/slash-command.ts +40 -0
- package/src/capability/ssh.ts +41 -0
- package/src/capability/system-prompt.ts +34 -0
- package/src/capability/tool.ts +38 -0
- package/src/capability/types.ts +168 -0
- package/src/cli/agents-cli.ts +141 -0
- package/src/cli/args.ts +309 -0
- package/src/cli/auth-broker-cli.ts +747 -0
- package/src/cli/auth-gateway-cli.ts +411 -0
- package/src/cli/classify-install-target.ts +50 -0
- package/src/cli/commands/init-xdg.ts +27 -0
- package/src/cli/config-cli.ts +426 -0
- package/src/cli/fast-help.ts +80 -0
- package/src/cli/file-processor.ts +123 -0
- package/src/cli/grep-cli.ts +160 -0
- package/src/cli/initial-message.ts +58 -0
- package/src/cli/list-models.ts +194 -0
- package/src/cli/notify-cli.ts +135 -0
- package/src/cli/plugin-cli.ts +942 -0
- package/src/cli/read-cli.ts +57 -0
- package/src/cli/session-picker.ts +52 -0
- package/src/cli/setup-cli.ts +537 -0
- package/src/cli/shell-cli.ts +176 -0
- package/src/cli/skills-cli.ts +88 -0
- package/src/cli/ssh-cli.ts +179 -0
- package/src/cli/stats-cli.ts +238 -0
- package/src/cli/update-cli.ts +468 -0
- package/src/cli/web-search-cli.ts +133 -0
- package/src/cli/worktree-cli.ts +291 -0
- package/src/cli.ts +150 -0
- package/src/commands/acp.ts +24 -0
- package/src/commands/agents.ts +57 -0
- package/src/commands/auth-broker.ts +96 -0
- package/src/commands/auth-gateway.ts +63 -0
- package/src/commands/chat.ts +25 -0
- package/src/commands/codex-native-hook.ts +12 -0
- package/src/commands/commit.ts +46 -0
- package/src/commands/config.ts +51 -0
- package/src/commands/contribution-prep.ts +41 -0
- package/src/commands/coordinator.ts +71 -0
- package/src/commands/goal.ts +37 -0
- package/src/commands/grep.ts +48 -0
- package/src/commands/harness.ts +1137 -0
- package/src/commands/interview.ts +42 -0
- package/src/commands/launch.ts +178 -0
- package/src/commands/mcp-serve.ts +63 -0
- package/src/commands/memory.ts +34 -0
- package/src/commands/notify.ts +45 -0
- package/src/commands/orchestrate.ts +55 -0
- package/src/commands/planphase.ts +19 -0
- package/src/commands/plugin.ts +78 -0
- package/src/commands/ralplan.ts +25 -0
- package/src/commands/read.ts +35 -0
- package/src/commands/session.ts +151 -0
- package/src/commands/setup.ts +85 -0
- package/src/commands/shell.ts +29 -0
- package/src/commands/skills.ts +49 -0
- package/src/commands/ssh.ts +60 -0
- package/src/commands/state.ts +25 -0
- package/src/commands/stats.ts +29 -0
- package/src/commands/team.ts +217 -0
- package/src/commands/ultragoal.ts +40 -0
- package/src/commands/update.ts +21 -0
- package/src/commands/web-search.ts +42 -0
- package/src/commands/worktree.ts +57 -0
- package/src/commit/agentic/agent.ts +316 -0
- package/src/commit/agentic/fallback.ts +96 -0
- package/src/commit/agentic/index.ts +356 -0
- package/src/commit/agentic/prompts/analyze-file.md +22 -0
- package/src/commit/agentic/prompts/session-user.md +25 -0
- package/src/commit/agentic/prompts/split-confirm.md +1 -0
- package/src/commit/agentic/prompts/system.md +38 -0
- package/src/commit/agentic/state.ts +60 -0
- package/src/commit/agentic/tools/analyze-file.ts +127 -0
- package/src/commit/agentic/tools/git-file-diff.ts +191 -0
- package/src/commit/agentic/tools/git-hunk.ts +50 -0
- package/src/commit/agentic/tools/git-overview.ts +81 -0
- package/src/commit/agentic/tools/index.ts +54 -0
- package/src/commit/agentic/tools/propose-changelog.ts +144 -0
- package/src/commit/agentic/tools/propose-commit.ts +109 -0
- package/src/commit/agentic/tools/recent-commits.ts +81 -0
- package/src/commit/agentic/tools/schemas.ts +23 -0
- package/src/commit/agentic/tools/split-commit.ts +238 -0
- package/src/commit/agentic/topo-sort.ts +44 -0
- package/src/commit/agentic/trivial.ts +51 -0
- package/src/commit/agentic/validation.ts +183 -0
- package/src/commit/analysis/conventional.ts +64 -0
- package/src/commit/analysis/index.ts +4 -0
- package/src/commit/analysis/scope.ts +242 -0
- package/src/commit/analysis/summary.ts +105 -0
- package/src/commit/analysis/validation.ts +66 -0
- package/src/commit/changelog/detect.ts +40 -0
- package/src/commit/changelog/generate.ts +97 -0
- package/src/commit/changelog/index.ts +234 -0
- package/src/commit/changelog/parse.ts +44 -0
- package/src/commit/cli.ts +85 -0
- package/src/commit/git/diff.ts +148 -0
- package/src/commit/index.ts +5 -0
- package/src/commit/map-reduce/index.ts +69 -0
- package/src/commit/map-reduce/map-phase.ts +193 -0
- package/src/commit/map-reduce/reduce-phase.ts +49 -0
- package/src/commit/map-reduce/utils.ts +9 -0
- package/src/commit/message.ts +11 -0
- package/src/commit/model-selection.ts +51 -0
- package/src/commit/pipeline.ts +244 -0
- package/src/commit/prompts/analysis-system.md +148 -0
- package/src/commit/prompts/analysis-user.md +38 -0
- package/src/commit/prompts/changelog-system.md +50 -0
- package/src/commit/prompts/changelog-user.md +18 -0
- package/src/commit/prompts/file-observer-system.md +24 -0
- package/src/commit/prompts/file-observer-user.md +8 -0
- package/src/commit/prompts/reduce-system.md +50 -0
- package/src/commit/prompts/reduce-user.md +17 -0
- package/src/commit/prompts/summary-retry.md +3 -0
- package/src/commit/prompts/summary-system.md +38 -0
- package/src/commit/prompts/summary-user.md +13 -0
- package/src/commit/prompts/types-description.md +2 -0
- package/src/commit/shared-llm.ts +77 -0
- package/src/commit/types.ts +118 -0
- package/src/commit/utils/exclusions.ts +42 -0
- package/src/commit/utils.ts +58 -0
- package/src/config/config-file.ts +232 -0
- package/src/config/file-lock.ts +121 -0
- package/src/config/keybindings.ts +553 -0
- package/src/config/mcp-schema.json +230 -0
- package/src/config/model-equivalence.ts +816 -0
- package/src/config/model-profile-activation.ts +165 -0
- package/src/config/model-profiles.ts +188 -0
- package/src/config/model-registry.ts +2751 -0
- package/src/config/model-resolver.ts +1355 -0
- package/src/config/models-config-schema.ts +254 -0
- package/src/config/oauth-provider-aliases.ts +49 -0
- package/src/config/prompt-templates.ts +310 -0
- package/src/config/resolve-config-value.ts +94 -0
- package/src/config/settings-schema.ts +3235 -0
- package/src/config/settings.ts +979 -0
- package/src/config/skill-settings-defaults.ts +35 -0
- package/src/config.ts +212 -0
- package/src/coordinator/contract.ts +20 -0
- package/src/coordinator-mcp/policy.ts +174 -0
- package/src/coordinator-mcp/safety.ts +80 -0
- package/src/coordinator-mcp/server.ts +1319 -0
- package/src/cursor.ts +372 -0
- package/src/dap/client.ts +689 -0
- package/src/dap/config.ts +150 -0
- package/src/dap/defaults.json +211 -0
- package/src/dap/index.ts +4 -0
- package/src/dap/session.ts +1306 -0
- package/src/dap/types.ts +600 -0
- package/src/debug/crash-diagnostics.ts +223 -0
- package/src/debug/index.ts +459 -0
- package/src/debug/log-formatting.ts +58 -0
- package/src/debug/log-viewer.ts +908 -0
- package/src/debug/profiler.ts +162 -0
- package/src/debug/raw-sse-buffer.ts +270 -0
- package/src/debug/raw-sse.ts +213 -0
- package/src/debug/report-bundle.ts +365 -0
- package/src/debug/runtime-gauges.ts +20 -0
- package/src/debug/system-info.ts +111 -0
- package/src/defaults/jwc/mcp-defaults.json +8 -0
- package/src/defaults/jwc/skill-fragments/browse/web-ai.md +130 -0
- package/src/defaults/jwc/skills/browse/SKILL.md +113 -0
- package/src/defaults/jwc/skills/goal/SKILL.md +323 -0
- package/src/defaults/jwc/skills/goal/ai-slop-cleaner.md +61 -0
- package/src/defaults/jwc/skills/jaw-interview/SKILL.md +891 -0
- package/src/defaults/jwc/skills/jaw-interview/auto-answer-uncertain.md +37 -0
- package/src/defaults/jwc/skills/jaw-interview/auto-research-greenfield.md +42 -0
- package/src/defaults/jwc/skills/plan/SKILL.md +201 -0
- package/src/defaults/jwc/skills/search/SKILL.md +120 -0
- package/src/defaults/jwc/skills/team/SKILL.md +441 -0
- package/src/defaults/jwc-defaults.ts +316 -0
- package/src/discovery/agents-md.ts +67 -0
- package/src/discovery/agents.ts +230 -0
- package/src/discovery/builtin.ts +932 -0
- package/src/discovery/claude-plugins.ts +407 -0
- package/src/discovery/claude.ts +313 -0
- package/src/discovery/cli-jaw.ts +36 -0
- package/src/discovery/cline.ts +83 -0
- package/src/discovery/codex.ts +330 -0
- package/src/discovery/cursor.ts +220 -0
- package/src/discovery/gemini.ts +383 -0
- package/src/discovery/github.ts +118 -0
- package/src/discovery/helpers.ts +1010 -0
- package/src/discovery/index.ts +77 -0
- package/src/discovery/mcp-json.ts +171 -0
- package/src/discovery/opencode.ts +398 -0
- package/src/discovery/plugin-dir-roots.ts +28 -0
- package/src/discovery/ssh.ts +153 -0
- package/src/discovery/substitute-plugin-root.ts +29 -0
- package/src/discovery/vscode.ts +105 -0
- package/src/discovery/windsurf.ts +147 -0
- package/src/edit/apply-patch/index.ts +87 -0
- package/src/edit/apply-patch/parser.ts +174 -0
- package/src/edit/diff.ts +873 -0
- package/src/edit/file-read-cache.ts +95 -0
- package/src/edit/index.ts +528 -0
- package/src/edit/modes/apply-patch.lark +19 -0
- package/src/edit/modes/apply-patch.ts +53 -0
- package/src/edit/modes/patch.ts +1835 -0
- package/src/edit/modes/replace.ts +1161 -0
- package/src/edit/normalize.ts +375 -0
- package/src/edit/notebook.ts +222 -0
- package/src/edit/read-file.ts +25 -0
- package/src/edit/renderer.ts +683 -0
- package/src/edit/streaming.ts +561 -0
- package/src/eval/backend.ts +43 -0
- package/src/eval/index.ts +4 -0
- package/src/eval/js/context-manager.ts +414 -0
- package/src/eval/js/executor.ts +134 -0
- package/src/eval/js/index.ts +46 -0
- package/src/eval/js/shared/helpers.ts +237 -0
- package/src/eval/js/shared/indirect-eval.ts +30 -0
- package/src/eval/js/shared/prelude.ts +2 -0
- package/src/eval/js/shared/prelude.txt +70 -0
- package/src/eval/js/shared/rewrite-imports.ts +415 -0
- package/src/eval/js/shared/runtime.ts +301 -0
- package/src/eval/js/shared/types.ts +18 -0
- package/src/eval/js/tool-bridge.ts +144 -0
- package/src/eval/js/worker-core.ts +146 -0
- package/src/eval/js/worker-entry.ts +24 -0
- package/src/eval/js/worker-protocol.ts +41 -0
- package/src/eval/py/display.ts +71 -0
- package/src/eval/py/executor.ts +622 -0
- package/src/eval/py/index.ts +58 -0
- package/src/eval/py/kernel.ts +683 -0
- package/src/eval/py/prelude.py +462 -0
- package/src/eval/py/prelude.ts +3 -0
- package/src/eval/py/runner.py +910 -0
- package/src/eval/py/runtime.ts +210 -0
- package/src/eval/py/tool-bridge.ts +137 -0
- package/src/eval/types.ts +48 -0
- package/src/exa/factory.ts +60 -0
- package/src/exa/index.ts +27 -0
- package/src/exa/mcp-client.ts +364 -0
- package/src/exa/render.ts +244 -0
- package/src/exa/researcher.ts +36 -0
- package/src/exa/search.ts +47 -0
- package/src/exa/types.ts +166 -0
- package/src/exa/websets.ts +248 -0
- package/src/exec/bash-executor.ts +362 -0
- package/src/exec/exec.ts +53 -0
- package/src/exec/idle-timeout-watchdog.ts +126 -0
- package/src/exec/non-interactive-env.ts +73 -0
- package/src/export/custom-share.ts +65 -0
- package/src/export/html/index.ts +168 -0
- package/src/export/html/template.css +1060 -0
- package/src/export/html/template.generated.ts +2 -0
- package/src/export/html/template.html +47 -0
- package/src/export/html/template.js +2268 -0
- package/src/export/html/template.macro.ts +25 -0
- package/src/export/html/vendor/highlight.min.js +1213 -0
- package/src/export/html/vendor/marked.min.js +6 -0
- package/src/export/ttsr.ts +444 -0
- package/src/extensibility/custom-commands/bundled/ci-green/index.ts +25 -0
- package/src/extensibility/custom-commands/bundled/review/index.ts +456 -0
- package/src/extensibility/custom-commands/index.ts +2 -0
- package/src/extensibility/custom-commands/loader.ts +238 -0
- package/src/extensibility/custom-commands/types.ts +113 -0
- package/src/extensibility/custom-tools/index.ts +7 -0
- package/src/extensibility/custom-tools/loader.ts +245 -0
- package/src/extensibility/custom-tools/types.ts +255 -0
- package/src/extensibility/custom-tools/wrapper.ts +47 -0
- package/src/extensibility/extensions/compact-handler.ts +40 -0
- package/src/extensibility/extensions/get-commands-handler.ts +80 -0
- package/src/extensibility/extensions/index.ts +15 -0
- package/src/extensibility/extensions/loader.ts +555 -0
- package/src/extensibility/extensions/runner.ts +900 -0
- package/src/extensibility/extensions/types.ts +1314 -0
- package/src/extensibility/extensions/wrapper.ts +189 -0
- package/src/extensibility/hooks/index.ts +5 -0
- package/src/extensibility/hooks/loader.ts +257 -0
- package/src/extensibility/hooks/runner.ts +425 -0
- package/src/extensibility/hooks/tool-wrapper.ts +107 -0
- package/src/extensibility/hooks/types.ts +599 -0
- package/src/extensibility/jwc-plugins/activation.ts +87 -0
- package/src/extensibility/jwc-plugins/index.ts +9 -0
- package/src/extensibility/jwc-plugins/injection.ts +114 -0
- package/src/extensibility/jwc-plugins/loader.ts +131 -0
- package/src/extensibility/jwc-plugins/paths.ts +66 -0
- package/src/extensibility/jwc-plugins/schema.ts +79 -0
- package/src/extensibility/jwc-plugins/state.ts +29 -0
- package/src/extensibility/jwc-plugins/tools.ts +47 -0
- package/src/extensibility/jwc-plugins/types.ts +97 -0
- package/src/extensibility/jwc-plugins/validation.ts +76 -0
- package/src/extensibility/plugins/doctor.ts +66 -0
- package/src/extensibility/plugins/git-url.ts +281 -0
- package/src/extensibility/plugins/index.ts +9 -0
- package/src/extensibility/plugins/installer.ts +192 -0
- package/src/extensibility/plugins/legacy-pi-compat.ts +336 -0
- package/src/extensibility/plugins/loader.ts +288 -0
- package/src/extensibility/plugins/manager.ts +739 -0
- package/src/extensibility/plugins/marketplace/cache.ts +136 -0
- package/src/extensibility/plugins/marketplace/fetcher.ts +317 -0
- package/src/extensibility/plugins/marketplace/index.ts +6 -0
- package/src/extensibility/plugins/marketplace/manager.ts +770 -0
- package/src/extensibility/plugins/marketplace/registry.ts +196 -0
- package/src/extensibility/plugins/marketplace/source-resolver.ts +147 -0
- package/src/extensibility/plugins/marketplace/types.ts +191 -0
- package/src/extensibility/plugins/parser.ts +105 -0
- package/src/extensibility/plugins/types.ts +194 -0
- package/src/extensibility/shared-events.ts +344 -0
- package/src/extensibility/skills.ts +449 -0
- package/src/extensibility/slash-commands.ts +249 -0
- package/src/extensibility/tool-proxy.ts +25 -0
- package/src/extensibility/typebox.ts +418 -0
- package/src/extensibility/utils.ts +44 -0
- package/src/goals/goal-planning-start.ts +21 -0
- package/src/goals/index.ts +3 -0
- package/src/goals/runtime.ts +418 -0
- package/src/goals/state.ts +70 -0
- package/src/goals/tools/goal-tool.ts +230 -0
- package/src/harness-control-plane/classifier.ts +128 -0
- package/src/harness-control-plane/control-endpoint.ts +148 -0
- package/src/harness-control-plane/finalize.ts +306 -0
- package/src/harness-control-plane/operate.ts +225 -0
- package/src/harness-control-plane/owner.ts +664 -0
- package/src/harness-control-plane/phase-rollup.ts +96 -0
- package/src/harness-control-plane/preserve.ts +102 -0
- package/src/harness-control-plane/receipt-ingest.ts +127 -0
- package/src/harness-control-plane/receipt-spool.ts +147 -0
- package/src/harness-control-plane/receipts.ts +320 -0
- package/src/harness-control-plane/rpc-adapter.ts +282 -0
- package/src/harness-control-plane/seams.ts +39 -0
- package/src/harness-control-plane/session-lease.ts +388 -0
- package/src/harness-control-plane/state-machine.ts +119 -0
- package/src/harness-control-plane/storage.ts +423 -0
- package/src/harness-control-plane/types.ts +240 -0
- package/src/hashline/anchors.ts +113 -0
- package/src/hashline/apply.ts +737 -0
- package/src/hashline/bigrams.json +649 -0
- package/src/hashline/constants.ts +25 -0
- package/src/hashline/diff-preview.ts +43 -0
- package/src/hashline/diff.ts +56 -0
- package/src/hashline/execute.ts +267 -0
- package/src/hashline/grammar.lark +21 -0
- package/src/hashline/hash.ts +196 -0
- package/src/hashline/index.ts +13 -0
- package/src/hashline/input.ts +130 -0
- package/src/hashline/parser.ts +246 -0
- package/src/hashline/prefixes.ts +101 -0
- package/src/hashline/recovery.ts +113 -0
- package/src/hashline/stream.ts +123 -0
- package/src/hashline/types.ts +68 -0
- package/src/hindsight/backend.ts +205 -0
- package/src/hindsight/bank.ts +131 -0
- package/src/hindsight/client.ts +598 -0
- package/src/hindsight/config.ts +175 -0
- package/src/hindsight/content.ts +211 -0
- package/src/hindsight/index.ts +8 -0
- package/src/hindsight/mental-models.ts +382 -0
- package/src/hindsight/seeds.json +32 -0
- package/src/hindsight/state.ts +469 -0
- package/src/hindsight/transcript.ts +71 -0
- package/src/hooks/codex-native-hooks-config.ts +143 -0
- package/src/hooks/native-skill-hook.ts +305 -0
- package/src/hooks/skill-keywords.ts +95 -0
- package/src/hooks/skill-state.ts +654 -0
- package/src/index.ts +56 -0
- package/src/internal-urls/agent-protocol.ts +176 -0
- package/src/internal-urls/artifact-protocol.ts +75 -0
- package/src/internal-urls/docs-index.generated.ts +92 -0
- package/src/internal-urls/index.ts +21 -0
- package/src/internal-urls/issue-pr-protocol.ts +577 -0
- package/src/internal-urls/json-query.ts +126 -0
- package/src/internal-urls/jwc-protocol.ts +91 -0
- package/src/internal-urls/local-protocol.ts +249 -0
- package/src/internal-urls/mcp-protocol.ts +151 -0
- package/src/internal-urls/memory-protocol.ts +165 -0
- package/src/internal-urls/parse.ts +72 -0
- package/src/internal-urls/registry-helpers.ts +28 -0
- package/src/internal-urls/router.ts +79 -0
- package/src/internal-urls/rule-protocol.ts +38 -0
- package/src/internal-urls/skill-protocol.ts +103 -0
- package/src/internal-urls/types.ts +114 -0
- package/src/jaw-interview/structured-renderer.ts +83 -0
- package/src/jwc-runtime/actor-registry.ts +365 -0
- package/src/jwc-runtime/agent-identity.ts +16 -0
- package/src/jwc-runtime/cli-jaw-home.ts +14 -0
- package/src/jwc-runtime/cli-jaw-vocab.ts +69 -0
- package/src/jwc-runtime/cli-write-receipt.ts +31 -0
- package/src/jwc-runtime/goal-cli.ts +428 -0
- package/src/jwc-runtime/goal-engine.ts +2214 -0
- package/src/jwc-runtime/goal-guard.ts +300 -0
- package/src/jwc-runtime/goal-mode-request.ts +331 -0
- package/src/jwc-runtime/jaw-interview-runtime.ts +809 -0
- package/src/jwc-runtime/launch-tmux.ts +296 -0
- package/src/jwc-runtime/launch-worktree.ts +291 -0
- package/src/jwc-runtime/legacy-storage.ts +132 -0
- package/src/jwc-runtime/memory-runtime.ts +434 -0
- package/src/jwc-runtime/orchestrate-runtime.ts +612 -0
- package/src/jwc-runtime/orchestrate-state.ts +395 -0
- package/src/jwc-runtime/plan-writer.ts +661 -0
- package/src/jwc-runtime/restricted-role-agent-bash.ts +5 -0
- package/src/jwc-runtime/session-state-sidecar.ts +89 -0
- package/src/jwc-runtime/stage-skill-map.ts +48 -0
- package/src/jwc-runtime/state-graph.ts +86 -0
- package/src/jwc-runtime/state-migrations.ts +183 -0
- package/src/jwc-runtime/state-renderer.ts +340 -0
- package/src/jwc-runtime/state-runtime.ts +1978 -0
- package/src/jwc-runtime/state-schema.ts +218 -0
- package/src/jwc-runtime/state-validation.ts +50 -0
- package/src/jwc-runtime/state-writer.ts +765 -0
- package/src/jwc-runtime/team-runtime.ts +4181 -0
- package/src/jwc-runtime/tmux-common.ts +130 -0
- package/src/jwc-runtime/tmux-sessions.ts +169 -0
- package/src/jwc-runtime/workflow-command-ref.ts +240 -0
- package/src/jwc-runtime/workflow-manifest.generated.json +1606 -0
- package/src/jwc-runtime/workflow-manifest.ts +427 -0
- package/src/lsp/client.ts +974 -0
- package/src/lsp/clients/biome-client.ts +202 -0
- package/src/lsp/clients/index.ts +50 -0
- package/src/lsp/clients/lsp-linter-client.ts +93 -0
- package/src/lsp/clients/swiftlint-client.ts +120 -0
- package/src/lsp/config.ts +492 -0
- package/src/lsp/defaults.json +493 -0
- package/src/lsp/edits.ts +166 -0
- package/src/lsp/index.ts +2282 -0
- package/src/lsp/lspmux.ts +233 -0
- package/src/lsp/render.ts +692 -0
- package/src/lsp/startup-events.ts +13 -0
- package/src/lsp/types.ts +443 -0
- package/src/lsp/utils.ts +678 -0
- package/src/main.ts +1159 -0
- package/src/mem0/backend.ts +75 -0
- package/src/mem0/client.ts +122 -0
- package/src/mem0/config.ts +82 -0
- package/src/mem0/index.ts +5 -0
- package/src/mem0/scope.ts +54 -0
- package/src/mem0/state.ts +142 -0
- package/src/memories/index.ts +1111 -0
- package/src/memories/local-query.ts +699 -0
- package/src/memories/memory-config.ts +175 -0
- package/src/memories/memory-fts.ts +179 -0
- package/src/memories/memory-model-resolution.ts +84 -0
- package/src/memories/memory-quality.ts +163 -0
- package/src/memories/storage.ts +588 -0
- package/src/memory-backend/index.ts +4 -0
- package/src/memory-backend/local-backend.ts +50 -0
- package/src/memory-backend/off-backend.ts +16 -0
- package/src/memory-backend/resolve.ts +27 -0
- package/src/memory-backend/types.ts +82 -0
- package/src/migrate-config-dir-startup.ts +15 -0
- package/src/migrate-config-dir.ts +80 -0
- package/src/modes/acp/acp-agent.ts +2218 -0
- package/src/modes/acp/acp-client-bridge.ts +154 -0
- package/src/modes/acp/acp-event-mapper.ts +912 -0
- package/src/modes/acp/acp-mode.ts +23 -0
- package/src/modes/acp/index.ts +2 -0
- package/src/modes/acp/terminal-auth.ts +37 -0
- package/src/modes/background-row-model.ts +17 -0
- package/src/modes/bridge/auth.ts +41 -0
- package/src/modes/bridge/bridge-client-bridge.ts +47 -0
- package/src/modes/bridge/bridge-mode.ts +644 -0
- package/src/modes/bridge/bridge-ui-context.ts +200 -0
- package/src/modes/bridge/event-stream.ts +70 -0
- package/src/modes/components/_cli-jaw-entry.ts +36 -0
- package/src/modes/components/agent-dashboard.ts +1120 -0
- package/src/modes/components/assistant-message.ts +361 -0
- package/src/modes/components/background-footer-detail.ts +27 -0
- package/src/modes/components/background-footer-panel-model.ts +96 -0
- package/src/modes/components/background-footer-panel.ts +89 -0
- package/src/modes/components/bash-execution.ts +261 -0
- package/src/modes/components/bordered-loader.ts +41 -0
- package/src/modes/components/branch-summary-message.ts +65 -0
- package/src/modes/components/btw-panel.ts +104 -0
- package/src/modes/components/compaction-summary-message.ts +71 -0
- package/src/modes/components/composer-chrome.ts +42 -0
- package/src/modes/components/composer-footer.ts +113 -0
- package/src/modes/components/countdown-timer.ts +75 -0
- package/src/modes/components/custom-editor.ts +515 -0
- package/src/modes/components/custom-message.ts +85 -0
- package/src/modes/components/custom-provider-wizard.ts +318 -0
- package/src/modes/components/diff.ts +363 -0
- package/src/modes/components/dynamic-border.ts +25 -0
- package/src/modes/components/eval-execution.ts +196 -0
- package/src/modes/components/execution-shared.ts +112 -0
- package/src/modes/components/extensions/extension-dashboard.ts +350 -0
- package/src/modes/components/extensions/extension-list.ts +492 -0
- package/src/modes/components/extensions/index.ts +9 -0
- package/src/modes/components/extensions/inspector-panel.ts +317 -0
- package/src/modes/components/extensions/state-manager.ts +628 -0
- package/src/modes/components/extensions/types.ts +191 -0
- package/src/modes/components/footer.ts +270 -0
- package/src/modes/components/full-transcript-overlay.ts +133 -0
- package/src/modes/components/help-selector.ts +274 -0
- package/src/modes/components/history-search.ts +158 -0
- package/src/modes/components/hook-editor.ts +151 -0
- package/src/modes/components/hook-input.ts +79 -0
- package/src/modes/components/hook-message.ts +68 -0
- package/src/modes/components/hook-selector.ts +873 -0
- package/src/modes/components/index.ts +36 -0
- package/src/modes/components/jobs-overlay-model.ts +109 -0
- package/src/modes/components/jobs-overlay.ts +172 -0
- package/src/modes/components/keybinding-hints.ts +65 -0
- package/src/modes/components/login-dialog.ts +164 -0
- package/src/modes/components/message-frame.ts +88 -0
- package/src/modes/components/model-selector.ts +1653 -0
- package/src/modes/components/oauth-selector.ts +248 -0
- package/src/modes/components/pabcd-border.ts +98 -0
- package/src/modes/components/plugin-selector.ts +95 -0
- package/src/modes/components/plugin-settings.ts +489 -0
- package/src/modes/components/provider-onboarding-selector.ts +94 -0
- package/src/modes/components/queue-mode-selector.ts +56 -0
- package/src/modes/components/quota-panel.ts +101 -0
- package/src/modes/components/read-tool-group.ts +295 -0
- package/src/modes/components/runtime-mcp-add-wizard.ts +1341 -0
- package/src/modes/components/session-observer-overlay.ts +839 -0
- package/src/modes/components/session-selector.ts +343 -0
- package/src/modes/components/settings-defs.ts +175 -0
- package/src/modes/components/settings-selector.ts +644 -0
- package/src/modes/components/show-images-selector.ts +45 -0
- package/src/modes/components/skill-hud/render.ts +93 -0
- package/src/modes/components/skill-message.ts +110 -0
- package/src/modes/components/status-line/context-thresholds.ts +68 -0
- package/src/modes/components/status-line/git-utils.ts +42 -0
- package/src/modes/components/status-line/index.ts +4 -0
- package/src/modes/components/status-line/presets.ts +107 -0
- package/src/modes/components/status-line/segments.ts +657 -0
- package/src/modes/components/status-line/separators.ts +55 -0
- package/src/modes/components/status-line/token-rate.ts +66 -0
- package/src/modes/components/status-line/types.ts +102 -0
- package/src/modes/components/status-line/workflow-readers.ts +97 -0
- package/src/modes/components/status-line.ts +917 -0
- package/src/modes/components/theme-selector.ts +63 -0
- package/src/modes/components/thinking-selector.ts +52 -0
- package/src/modes/components/todo-reminder.ts +40 -0
- package/src/modes/components/tool-execution.ts +990 -0
- package/src/modes/components/tool-transcript-overlay.ts +81 -0
- package/src/modes/components/tree-selector.ts +930 -0
- package/src/modes/components/ttsr-notification.ts +100 -0
- package/src/modes/components/user-message-selector.ts +141 -0
- package/src/modes/components/user-message.ts +53 -0
- package/src/modes/components/visual-truncate.ts +63 -0
- package/src/modes/components/welcome.ts +522 -0
- package/src/modes/controllers/btw-controller.ts +105 -0
- package/src/modes/controllers/command-controller-shared.ts +108 -0
- package/src/modes/controllers/command-controller.ts +1703 -0
- package/src/modes/controllers/event-controller.ts +1054 -0
- package/src/modes/controllers/extension-ui-controller.ts +1010 -0
- package/src/modes/controllers/input-controller.ts +1422 -0
- package/src/modes/controllers/runtime-mcp-command-controller.ts +1934 -0
- package/src/modes/controllers/selector-controller.ts +1605 -0
- package/src/modes/controllers/ssh-command-controller.ts +384 -0
- package/src/modes/controllers/todo-command-controller.ts +485 -0
- package/src/modes/data/emojis.json +1 -0
- package/src/modes/emoji-autocomplete.ts +285 -0
- package/src/modes/index.ts +35 -0
- package/src/modes/interactive-mode.ts +2938 -0
- package/src/modes/jobs-observer.ts +352 -0
- package/src/modes/oauth-manual-input.ts +42 -0
- package/src/modes/print-mode.ts +121 -0
- package/src/modes/prompt-action-autocomplete.ts +409 -0
- package/src/modes/rpc/host-tools.ts +1 -0
- package/src/modes/rpc/host-uris.ts +1 -0
- package/src/modes/rpc/rpc-client.ts +914 -0
- package/src/modes/rpc/rpc-mode.ts +784 -0
- package/src/modes/rpc/rpc-types.ts +601 -0
- package/src/modes/runtime-init.ts +116 -0
- package/src/modes/session-observer-registry.ts +146 -0
- package/src/modes/shared/agent-wire/approval-gate.ts +151 -0
- package/src/modes/shared/agent-wire/command-contract.ts +18 -0
- package/src/modes/shared/agent-wire/command-dispatch.ts +438 -0
- package/src/modes/shared/agent-wire/command-validation.ts +164 -0
- package/src/modes/shared/agent-wire/event-contract.ts +148 -0
- package/src/modes/shared/agent-wire/event-envelope.ts +141 -0
- package/src/modes/shared/agent-wire/event-observation.ts +424 -0
- package/src/modes/shared/agent-wire/handshake.ts +157 -0
- package/src/modes/shared/agent-wire/host-tool-bridge.ts +194 -0
- package/src/modes/shared/agent-wire/host-uri-bridge.ts +236 -0
- package/src/modes/shared/agent-wire/jaw-interview-gate.ts +253 -0
- package/src/modes/shared/agent-wire/protocol.ts +46 -0
- package/src/modes/shared/agent-wire/responses.ts +17 -0
- package/src/modes/shared/agent-wire/scopes.ts +91 -0
- package/src/modes/shared/agent-wire/session-registry.ts +109 -0
- package/src/modes/shared/agent-wire/ui-request-broker.ts +150 -0
- package/src/modes/shared/agent-wire/ui-result.ts +48 -0
- package/src/modes/shared/agent-wire/unattended-action-policy.ts +341 -0
- package/src/modes/shared/agent-wire/unattended-audit.ts +175 -0
- package/src/modes/shared/agent-wire/unattended-run-controller.ts +406 -0
- package/src/modes/shared/agent-wire/unattended-session.ts +180 -0
- package/src/modes/shared/agent-wire/workflow-gate-broker.ts +324 -0
- package/src/modes/shared/agent-wire/workflow-gate-schema.ts +331 -0
- package/src/modes/shared.ts +55 -0
- package/src/modes/theme/defaults/abyss-bite-light.json +124 -0
- package/src/modes/theme/defaults/abyss-bite.json +124 -0
- package/src/modes/theme/defaults/blue-crab.json +126 -0
- package/src/modes/theme/defaults/index.ts +11 -0
- package/src/modes/theme/defaults/red-claw.json +123 -0
- package/src/modes/theme/mermaid-cache.ts +29 -0
- package/src/modes/theme/shimmer.ts +219 -0
- package/src/modes/theme/theme-schema.json +429 -0
- package/src/modes/theme/theme.ts +2472 -0
- package/src/modes/types.ts +343 -0
- package/src/modes/utils/abort-message.ts +41 -0
- package/src/modes/utils/compaction-progress.ts +174 -0
- package/src/modes/utils/context-usage.ts +398 -0
- package/src/modes/utils/help-markdown.ts +50 -0
- package/src/modes/utils/hotkeys-markdown.ts +61 -0
- package/src/modes/utils/keybinding-matchers.ts +30 -0
- package/src/modes/utils/session-transcript-replay.ts +520 -0
- package/src/modes/utils/tools-markdown.ts +27 -0
- package/src/modes/utils/ui-helpers.ts +846 -0
- package/src/notifications/ask-bridge.ts +74 -0
- package/src/notifications/config-command-parser.ts +76 -0
- package/src/notifications/config.ts +102 -0
- package/src/notifications/daemon-control.ts +73 -0
- package/src/notifications/daemon-engine.ts +165 -0
- package/src/notifications/daemon-inbound.ts +220 -0
- package/src/notifications/daemon-loop.ts +60 -0
- package/src/notifications/daemon-owner.ts +53 -0
- package/src/notifications/daemon-runtime.ts +84 -0
- package/src/notifications/discovery.ts +119 -0
- package/src/notifications/index.ts +34 -0
- package/src/notifications/lifecycle-audit.ts +94 -0
- package/src/notifications/lifecycle-command-parser.ts +51 -0
- package/src/notifications/lifecycle-control-runtime.ts +127 -0
- package/src/notifications/notification-redaction.ts +57 -0
- package/src/notifications/protocol.ts +61 -0
- package/src/notifications/remote-answer.ts +241 -0
- package/src/notifications/reply-bridge.ts +85 -0
- package/src/notifications/server.ts +280 -0
- package/src/notifications/session-lifecycle.ts +46 -0
- package/src/notifications/session-registry.ts +164 -0
- package/src/notifications/telegram-api.ts +259 -0
- package/src/notifications/telegram-ask-keyboard.ts +137 -0
- package/src/notifications/telegram-callback-ingest.ts +126 -0
- package/src/notifications/telegram-inbound-router.ts +166 -0
- package/src/notifications/telegram-media-policy.ts +50 -0
- package/src/notifications/telegram-media-render.ts +40 -0
- package/src/notifications/telegram-message-ingest.ts +121 -0
- package/src/notifications/telegram-pairing.ts +69 -0
- package/src/notifications/threaded-lifecycle.ts +27 -0
- package/src/notifications/threaded-shutdown.ts +37 -0
- package/src/notifications/threaded-surface.ts +187 -0
- package/src/notifications/transport-shell.ts +152 -0
- package/src/notifications/transport-state.ts +161 -0
- package/src/notifications/workspace-path-confinement.ts +65 -0
- package/src/plan-mode/approved-plan.ts +163 -0
- package/src/plan-mode/state.ts +6 -0
- package/src/prompts/agents/architect.md +95 -0
- package/src/prompts/agents/critic.md +68 -0
- package/src/prompts/agents/executor.md +64 -0
- package/src/prompts/agents/explore.md +58 -0
- package/src/prompts/agents/frontmatter.md +14 -0
- package/src/prompts/agents/init.md +34 -0
- package/src/prompts/agents/plan.md +49 -0
- package/src/prompts/agents/planner.md +63 -0
- package/src/prompts/agents/reviewer.md +141 -0
- package/src/prompts/agents/task.md +16 -0
- package/src/prompts/ci-green-request.md +36 -0
- package/src/prompts/goals/goal-continuation.md +33 -0
- package/src/prompts/goals/goal-mode-active.md +23 -0
- package/src/prompts/jaw/orchestrate-a.md +20 -0
- package/src/prompts/jaw/orchestrate-audit-architect.md +17 -0
- package/src/prompts/jaw/orchestrate-audit-planner.md +17 -0
- package/src/prompts/jaw/orchestrate-b.md +17 -0
- package/src/prompts/jaw/orchestrate-c.md +18 -0
- package/src/prompts/jaw/orchestrate-d.md +32 -0
- package/src/prompts/jaw/orchestrate-i.md +17 -0
- package/src/prompts/jaw/orchestrate-p.md +23 -0
- package/src/prompts/memories/consolidation.md +30 -0
- package/src/prompts/memories/read-path.md +10 -0
- package/src/prompts/memories/stage_one_input.md +6 -0
- package/src/prompts/memories/stage_one_system.md +21 -0
- package/src/prompts/memories/unavailable.md +9 -0
- package/src/prompts/review-request.md +70 -0
- package/src/prompts/system/agent-creation-architect.md +75 -0
- package/src/prompts/system/agent-creation-user.md +6 -0
- package/src/prompts/system/auto-continue.md +1 -0
- package/src/prompts/system/btw-user.md +8 -0
- package/src/prompts/system/commit-message-system.md +2 -0
- package/src/prompts/system/custom-system-prompt.md +64 -0
- package/src/prompts/system/eager-todo.md +13 -0
- package/src/prompts/system/executor-self-fork.md +3 -0
- package/src/prompts/system/irc-incoming.md +8 -0
- package/src/prompts/system/plan-mode-active.md +116 -0
- package/src/prompts/system/plan-mode-approved.md +28 -0
- package/src/prompts/system/plan-mode-compact-instructions.md +16 -0
- package/src/prompts/system/plan-mode-reference.md +14 -0
- package/src/prompts/system/plan-mode-subagent.md +34 -0
- package/src/prompts/system/plan-mode-tool-decision-reminder.md +9 -0
- package/src/prompts/system/project-prompt.md +46 -0
- package/src/prompts/system/subagent-system-prompt.md +89 -0
- package/src/prompts/system/subagent-user-prompt.md +3 -0
- package/src/prompts/system/subagent-yield-reminder.md +12 -0
- package/src/prompts/system/system-prompt.md +409 -0
- package/src/prompts/system/title-system.md +2 -0
- package/src/prompts/system/ttsr-interrupt.md +7 -0
- package/src/prompts/system/ttsr-tool-reminder.md +5 -0
- package/src/prompts/system/web-search.md +25 -0
- package/src/prompts/tools/apply-patch.md +65 -0
- package/src/prompts/tools/ask.md +29 -0
- package/src/prompts/tools/ast-edit.md +39 -0
- package/src/prompts/tools/ast-grep.md +42 -0
- package/src/prompts/tools/async-result.md +8 -0
- package/src/prompts/tools/background.md +19 -0
- package/src/prompts/tools/bash.md +50 -0
- package/src/prompts/tools/browser.md +14 -0
- package/src/prompts/tools/calculator.md +10 -0
- package/src/prompts/tools/checkpoint.md +16 -0
- package/src/prompts/tools/computer-use.md +15 -0
- package/src/prompts/tools/cron.md +25 -0
- package/src/prompts/tools/debug.md +33 -0
- package/src/prompts/tools/eval.md +75 -0
- package/src/prompts/tools/find.md +34 -0
- package/src/prompts/tools/github.md +20 -0
- package/src/prompts/tools/goal.md +20 -0
- package/src/prompts/tools/hashline.md +130 -0
- package/src/prompts/tools/image-gen.md +7 -0
- package/src/prompts/tools/inspect-image-system.md +20 -0
- package/src/prompts/tools/inspect-image.md +32 -0
- package/src/prompts/tools/irc.md +49 -0
- package/src/prompts/tools/job.md +22 -0
- package/src/prompts/tools/lsp.md +42 -0
- package/src/prompts/tools/monitor.md +32 -0
- package/src/prompts/tools/patch.md +70 -0
- package/src/prompts/tools/read.md +82 -0
- package/src/prompts/tools/recall.md +6 -0
- package/src/prompts/tools/recipe.md +16 -0
- package/src/prompts/tools/reflect.md +6 -0
- package/src/prompts/tools/render-mermaid.md +9 -0
- package/src/prompts/tools/replace.md +36 -0
- package/src/prompts/tools/resolve.md +9 -0
- package/src/prompts/tools/retain.md +7 -0
- package/src/prompts/tools/rewind.md +13 -0
- package/src/prompts/tools/search-tool-bm25.md +37 -0
- package/src/prompts/tools/search.md +25 -0
- package/src/prompts/tools/skill.md +28 -0
- package/src/prompts/tools/ssh.md +35 -0
- package/src/prompts/tools/subagent.md +56 -0
- package/src/prompts/tools/task-summary.md +22 -0
- package/src/prompts/tools/task.md +106 -0
- package/src/prompts/tools/todo-write.md +50 -0
- package/src/prompts/tools/vim.md +98 -0
- package/src/prompts/tools/web-search.md +10 -0
- package/src/prompts/tools/write.md +14 -0
- package/src/registry/agent-registry.ts +140 -0
- package/src/reminders/star-reminder.ts +422 -0
- package/src/runtime-mcp/client.ts +485 -0
- package/src/runtime-mcp/config-writer.ts +225 -0
- package/src/runtime-mcp/config.ts +365 -0
- package/src/runtime-mcp/discoverable-tool-metadata.ts +25 -0
- package/src/runtime-mcp/index.ts +29 -0
- package/src/runtime-mcp/json-rpc.ts +84 -0
- package/src/runtime-mcp/loader.ts +124 -0
- package/src/runtime-mcp/manager.ts +1211 -0
- package/src/runtime-mcp/oauth-discovery.ts +349 -0
- package/src/runtime-mcp/oauth-flow.ts +409 -0
- package/src/runtime-mcp/render.ts +123 -0
- package/src/runtime-mcp/smithery-auth.ts +104 -0
- package/src/runtime-mcp/smithery-connect.ts +145 -0
- package/src/runtime-mcp/smithery-registry.ts +477 -0
- package/src/runtime-mcp/tool-bridge.ts +416 -0
- package/src/runtime-mcp/tool-cache.ts +117 -0
- package/src/runtime-mcp/transports/http.ts +503 -0
- package/src/runtime-mcp/transports/index.ts +6 -0
- package/src/runtime-mcp/transports/stdio.ts +326 -0
- package/src/runtime-mcp/types.ts +423 -0
- package/src/sdk.ts +2248 -0
- package/src/secrets/index.ts +120 -0
- package/src/secrets/obfuscator.ts +352 -0
- package/src/secrets/regex.ts +21 -0
- package/src/session/agent-session.ts +10343 -0
- package/src/session/agent-storage.ts +466 -0
- package/src/session/artifacts.ts +135 -0
- package/src/session/auth-broker-config.ts +102 -0
- package/src/session/auth-storage.ts +23 -0
- package/src/session/blob-store.ts +372 -0
- package/src/session/client-bridge.ts +85 -0
- package/src/session/contribution-prep.ts +320 -0
- package/src/session/history-storage.ts +311 -0
- package/src/session/messages.ts +406 -0
- package/src/session/pabcd-stage-header.ts +77 -0
- package/src/session/session-dump-format.ts +209 -0
- package/src/session/session-manager.ts +3914 -0
- package/src/session/session-storage.ts +415 -0
- package/src/session/streaming-output.ts +1114 -0
- package/src/session/tool-choice-queue.ts +213 -0
- package/src/session/yield-queue.ts +155 -0
- package/src/setup/hermes/templates/operator-instructions.v1.md +29 -0
- package/src/setup/hermes-setup.ts +429 -0
- package/src/setup/model-onboarding-guidance.ts +41 -0
- package/src/setup/provider-onboarding.ts +358 -0
- package/src/skill-state/active-state.ts +788 -0
- package/src/skill-state/initial-phase.ts +21 -0
- package/src/skill-state/jaw-interview-mutation-guard.ts +490 -0
- package/src/skill-state/workflow-hud.ts +208 -0
- package/src/skill-state/workflow-state-contract.ts +167 -0
- package/src/skill-state/workflow-state-version.ts +3 -0
- package/src/slash-commands/acp-builtins.ts +55 -0
- package/src/slash-commands/builtin-registry.ts +1879 -0
- package/src/slash-commands/helpers/context-report.ts +149 -0
- package/src/slash-commands/helpers/format.ts +46 -0
- package/src/slash-commands/helpers/mcp.ts +532 -0
- package/src/slash-commands/helpers/parse.ts +85 -0
- package/src/slash-commands/helpers/ssh.ts +195 -0
- package/src/slash-commands/helpers/todo.ts +279 -0
- package/src/slash-commands/helpers/usage-report.ts +105 -0
- package/src/slash-commands/types.ts +127 -0
- package/src/ssh/config-writer.ts +183 -0
- package/src/ssh/connection-manager.ts +482 -0
- package/src/ssh/ssh-executor.ts +133 -0
- package/src/ssh/sshfs-mount.ts +140 -0
- package/src/ssh/utils.ts +8 -0
- package/src/stt/downloader.ts +71 -0
- package/src/stt/index.ts +3 -0
- package/src/stt/recorder.ts +351 -0
- package/src/stt/setup.ts +52 -0
- package/src/stt/stt-controller.ts +160 -0
- package/src/stt/transcribe.py +70 -0
- package/src/stt/transcriber.ts +91 -0
- package/src/system-prompt.ts +661 -0
- package/src/task/agents.ts +189 -0
- package/src/task/commands.ts +131 -0
- package/src/task/discovery.ts +136 -0
- package/src/task/executor.ts +1664 -0
- package/src/task/fork-context-advisory.ts +99 -0
- package/src/task/id.ts +33 -0
- package/src/task/index.ts +2173 -0
- package/src/task/jwc-command.ts +26 -0
- package/src/task/model-presets.ts +53 -0
- package/src/task/name-generator.ts +1577 -0
- package/src/task/output-manager.ts +108 -0
- package/src/task/parallel.ts +116 -0
- package/src/task/receipt.ts +304 -0
- package/src/task/render.ts +1075 -0
- package/src/task/roi-reconciliation.ts +90 -0
- package/src/task/simple-mode.ts +27 -0
- package/src/task/spawn-gate.ts +132 -0
- package/src/task/subprocess-tool-registry.ts +88 -0
- package/src/task/types.ts +433 -0
- package/src/task/worktree.ts +506 -0
- package/src/thinking.ts +93 -0
- package/src/tool-discovery/tool-index.ts +408 -0
- package/src/tools/archive-reader.ts +321 -0
- package/src/tools/ask.ts +1011 -0
- package/src/tools/ast-edit.ts +555 -0
- package/src/tools/ast-grep.ts +424 -0
- package/src/tools/auto-generated-guard.ts +305 -0
- package/src/tools/background.ts +500 -0
- package/src/tools/bash-allowed-prefixes.ts +169 -0
- package/src/tools/bash-command-fixup.ts +37 -0
- package/src/tools/bash-interactive.ts +388 -0
- package/src/tools/bash-interceptor.ts +67 -0
- package/src/tools/bash-pty-selection.ts +15 -0
- package/src/tools/bash-skill-urls.ts +248 -0
- package/src/tools/bash.ts +1242 -0
- package/src/tools/browser/actions.ts +189 -0
- package/src/tools/browser/attach.ts +175 -0
- package/src/tools/browser/launch.ts +651 -0
- package/src/tools/browser/readable.ts +95 -0
- package/src/tools/browser/registry.ts +194 -0
- package/src/tools/browser/render.ts +212 -0
- package/src/tools/browser/tab-protocol.ts +105 -0
- package/src/tools/browser/tab-supervisor.ts +577 -0
- package/src/tools/browser/tab-worker-entry.ts +21 -0
- package/src/tools/browser/tab-worker.ts +1054 -0
- package/src/tools/browser.ts +380 -0
- package/src/tools/calculator.ts +540 -0
- package/src/tools/checkpoint.ts +134 -0
- package/src/tools/computer-use-backend.ts +75 -0
- package/src/tools/computer-use.ts +228 -0
- package/src/tools/conflict-detect.ts +672 -0
- package/src/tools/context.ts +39 -0
- package/src/tools/cron.ts +713 -0
- package/src/tools/debug.ts +1014 -0
- package/src/tools/eval.ts +1101 -0
- package/src/tools/fetch.ts +1485 -0
- package/src/tools/file-recorder.ts +35 -0
- package/src/tools/find.ts +543 -0
- package/src/tools/fs-cache-invalidation.ts +28 -0
- package/src/tools/gh-format.ts +12 -0
- package/src/tools/gh-renderer.ts +428 -0
- package/src/tools/gh.ts +3737 -0
- package/src/tools/github-cache.ts +548 -0
- package/src/tools/grouped-file-output.ts +96 -0
- package/src/tools/hindsight-recall.ts +66 -0
- package/src/tools/hindsight-reflect.ts +55 -0
- package/src/tools/hindsight-retain.ts +54 -0
- package/src/tools/image-gen.ts +1284 -0
- package/src/tools/index.ts +580 -0
- package/src/tools/inspect-image-renderer.ts +103 -0
- package/src/tools/inspect-image.ts +167 -0
- package/src/tools/irc.ts +239 -0
- package/src/tools/job.ts +530 -0
- package/src/tools/json-tree.ts +243 -0
- package/src/tools/jtd-to-json-schema.ts +219 -0
- package/src/tools/jtd-to-typescript.ts +136 -0
- package/src/tools/jtd-utils.ts +102 -0
- package/src/tools/list-limit.ts +40 -0
- package/src/tools/match-line-format.ts +22 -0
- package/src/tools/monitor.ts +255 -0
- package/src/tools/output-meta.ts +754 -0
- package/src/tools/path-utils.ts +741 -0
- package/src/tools/plan-mode-guard.ts +68 -0
- package/src/tools/puppeteer/00_stealth_tampering.txt +63 -0
- package/src/tools/puppeteer/01_stealth_activity.txt +20 -0
- package/src/tools/puppeteer/02_stealth_hairline.txt +11 -0
- package/src/tools/puppeteer/03_stealth_botd.txt +384 -0
- package/src/tools/puppeteer/04_stealth_iframe.txt +81 -0
- package/src/tools/puppeteer/05_stealth_webgl.txt +75 -0
- package/src/tools/puppeteer/06_stealth_screen.txt +72 -0
- package/src/tools/puppeteer/07_stealth_fonts.txt +97 -0
- package/src/tools/puppeteer/08_stealth_audio.txt +51 -0
- package/src/tools/puppeteer/09_stealth_locale.txt +46 -0
- package/src/tools/puppeteer/10_stealth_plugins.txt +206 -0
- package/src/tools/puppeteer/11_stealth_hardware.txt +8 -0
- package/src/tools/puppeteer/12_stealth_codecs.txt +40 -0
- package/src/tools/puppeteer/13_stealth_worker.txt +74 -0
- package/src/tools/read.ts +2333 -0
- package/src/tools/recipe/index.ts +80 -0
- package/src/tools/recipe/render.ts +19 -0
- package/src/tools/recipe/runner.ts +219 -0
- package/src/tools/recipe/runners/cargo.ts +131 -0
- package/src/tools/recipe/runners/index.ts +8 -0
- package/src/tools/recipe/runners/just.ts +73 -0
- package/src/tools/recipe/runners/make.ts +101 -0
- package/src/tools/recipe/runners/pkg.ts +167 -0
- package/src/tools/recipe/runners/task.ts +72 -0
- package/src/tools/render-mermaid.ts +68 -0
- package/src/tools/render-utils.ts +774 -0
- package/src/tools/renderers.ts +79 -0
- package/src/tools/resolve.ts +258 -0
- package/src/tools/review.ts +252 -0
- package/src/tools/search-tool-bm25.ts +364 -0
- package/src/tools/search.ts +787 -0
- package/src/tools/skill.ts +170 -0
- package/src/tools/sqlite-reader.ts +736 -0
- package/src/tools/ssh.ts +310 -0
- package/src/tools/subagent-render.ts +160 -0
- package/src/tools/subagent.ts +698 -0
- package/src/tools/telegram-send.ts +178 -0
- package/src/tools/todo-write.ts +695 -0
- package/src/tools/tool-errors.ts +62 -0
- package/src/tools/tool-result.ts +86 -0
- package/src/tools/tool-timeouts.ts +30 -0
- package/src/tools/vim.ts +949 -0
- package/src/tools/write.ts +953 -0
- package/src/tools/yield.ts +268 -0
- package/src/tui/code-cell.ts +201 -0
- package/src/tui/file-list.ts +55 -0
- package/src/tui/hyperlink.ts +126 -0
- package/src/tui/index.ts +12 -0
- package/src/tui/output-block.ts +150 -0
- package/src/tui/status-line.ts +39 -0
- package/src/tui/tree-list.ts +84 -0
- package/src/tui/types.ts +15 -0
- package/src/tui/utils.ts +103 -0
- package/src/utils/changelog.ts +121 -0
- package/src/utils/clipboard.ts +156 -0
- package/src/utils/command-args.ts +76 -0
- package/src/utils/commit-message-generator.ts +135 -0
- package/src/utils/edit-mode.ts +42 -0
- package/src/utils/event-bus.ts +33 -0
- package/src/utils/external-editor.ts +65 -0
- package/src/utils/file-display-mode.ts +45 -0
- package/src/utils/file-mentions.ts +376 -0
- package/src/utils/git.ts +1536 -0
- package/src/utils/image-loading.ts +102 -0
- package/src/utils/image-resize.ts +309 -0
- package/src/utils/lang-from-path.ts +239 -0
- package/src/utils/markit.ts +89 -0
- package/src/utils/open.ts +20 -0
- package/src/utils/session-color.ts +43 -0
- package/src/utils/shell-snapshot.ts +187 -0
- package/src/utils/sixel.ts +69 -0
- package/src/utils/title-generator.ts +237 -0
- package/src/utils/tokenizer-download.ts +106 -0
- package/src/utils/tokenizer-encoding.ts +29 -0
- package/src/utils/tool-choice.ts +62 -0
- package/src/utils/tools-manager.ts +363 -0
- package/src/vim/buffer.ts +309 -0
- package/src/vim/commands.ts +382 -0
- package/src/vim/engine.ts +2409 -0
- package/src/vim/parser.ts +134 -0
- package/src/vim/render.ts +252 -0
- package/src/vim/types.ts +197 -0
- package/src/web/kagi.ts +183 -0
- package/src/web/parallel.ts +349 -0
- package/src/web/public-fetch-url.ts +74 -0
- package/src/web/scrapers/artifacthub.ts +207 -0
- package/src/web/scrapers/arxiv.ts +83 -0
- package/src/web/scrapers/aur.ts +162 -0
- package/src/web/scrapers/biorxiv.ts +133 -0
- package/src/web/scrapers/bluesky.ts +262 -0
- package/src/web/scrapers/brew.ts +172 -0
- package/src/web/scrapers/cheatsh.ts +68 -0
- package/src/web/scrapers/chocolatey.ts +196 -0
- package/src/web/scrapers/choosealicense.ts +95 -0
- package/src/web/scrapers/cisa-kev.ts +87 -0
- package/src/web/scrapers/clojars.ts +154 -0
- package/src/web/scrapers/coingecko.ts +177 -0
- package/src/web/scrapers/crates-io.ts +97 -0
- package/src/web/scrapers/crossref.ts +136 -0
- package/src/web/scrapers/devto.ts +147 -0
- package/src/web/scrapers/discogs.ts +306 -0
- package/src/web/scrapers/discourse.ts +197 -0
- package/src/web/scrapers/dockerhub.ts +138 -0
- package/src/web/scrapers/docs-rs.ts +653 -0
- package/src/web/scrapers/fdroid.ts +134 -0
- package/src/web/scrapers/firefox-addons.ts +191 -0
- package/src/web/scrapers/flathub.ts +223 -0
- package/src/web/scrapers/github-gist.ts +58 -0
- package/src/web/scrapers/github.ts +452 -0
- package/src/web/scrapers/gitlab.ts +401 -0
- package/src/web/scrapers/go-pkg.ts +266 -0
- package/src/web/scrapers/hackage.ts +140 -0
- package/src/web/scrapers/hackernews.ts +189 -0
- package/src/web/scrapers/hex.ts +105 -0
- package/src/web/scrapers/huggingface.ts +321 -0
- package/src/web/scrapers/iacr.ts +89 -0
- package/src/web/scrapers/index.ts +252 -0
- package/src/web/scrapers/jetbrains-marketplace.ts +159 -0
- package/src/web/scrapers/lemmy.ts +203 -0
- package/src/web/scrapers/lobsters.ts +175 -0
- package/src/web/scrapers/mastodon.ts +292 -0
- package/src/web/scrapers/maven.ts +138 -0
- package/src/web/scrapers/mdn.ts +173 -0
- package/src/web/scrapers/metacpan.ts +222 -0
- package/src/web/scrapers/musicbrainz.ts +250 -0
- package/src/web/scrapers/npm.ts +98 -0
- package/src/web/scrapers/nuget.ts +183 -0
- package/src/web/scrapers/nvd.ts +222 -0
- package/src/web/scrapers/ollama.ts +239 -0
- package/src/web/scrapers/open-vsx.ts +106 -0
- package/src/web/scrapers/opencorporates.ts +292 -0
- package/src/web/scrapers/openlibrary.ts +336 -0
- package/src/web/scrapers/orcid.ts +286 -0
- package/src/web/scrapers/osv.ts +176 -0
- package/src/web/scrapers/packagist.ts +160 -0
- package/src/web/scrapers/pub-dev.ts +143 -0
- package/src/web/scrapers/pubmed.ts +211 -0
- package/src/web/scrapers/pypi.ts +112 -0
- package/src/web/scrapers/rawg.ts +110 -0
- package/src/web/scrapers/readthedocs.ts +120 -0
- package/src/web/scrapers/reddit.ts +95 -0
- package/src/web/scrapers/repology.ts +251 -0
- package/src/web/scrapers/rfc.ts +201 -0
- package/src/web/scrapers/rubygems.ts +103 -0
- package/src/web/scrapers/searchcode.ts +189 -0
- package/src/web/scrapers/sec-edgar.ts +261 -0
- package/src/web/scrapers/semantic-scholar.ts +171 -0
- package/src/web/scrapers/snapcraft.ts +187 -0
- package/src/web/scrapers/sourcegraph.ts +336 -0
- package/src/web/scrapers/spdx.ts +108 -0
- package/src/web/scrapers/spotify.ts +198 -0
- package/src/web/scrapers/stackoverflow.ts +120 -0
- package/src/web/scrapers/terraform.ts +277 -0
- package/src/web/scrapers/tldr.ts +47 -0
- package/src/web/scrapers/twitter.ts +93 -0
- package/src/web/scrapers/types.ts +358 -0
- package/src/web/scrapers/utils.ts +133 -0
- package/src/web/scrapers/vimeo.ts +133 -0
- package/src/web/scrapers/vscode-marketplace.ts +187 -0
- package/src/web/scrapers/w3c.ts +156 -0
- package/src/web/scrapers/wikidata.ts +344 -0
- package/src/web/scrapers/wikipedia.ts +84 -0
- package/src/web/scrapers/youtube.ts +319 -0
- package/src/web/search/index.ts +416 -0
- package/src/web/search/provider.ts +236 -0
- package/src/web/search/providers/anthropic.ts +319 -0
- package/src/web/search/providers/base.ts +102 -0
- package/src/web/search/providers/brave.ts +149 -0
- package/src/web/search/providers/codex.ts +598 -0
- package/src/web/search/providers/duckduckgo.ts +279 -0
- package/src/web/search/providers/exa.ts +193 -0
- package/src/web/search/providers/gemini.ts +462 -0
- package/src/web/search/providers/jina.ts +101 -0
- package/src/web/search/providers/kagi.ts +75 -0
- package/src/web/search/providers/kimi.ts +171 -0
- package/src/web/search/providers/parallel.ts +210 -0
- package/src/web/search/providers/perplexity.ts +575 -0
- package/src/web/search/providers/searxng.ts +309 -0
- package/src/web/search/providers/synthetic.ts +108 -0
- package/src/web/search/providers/tavily.ts +173 -0
- package/src/web/search/providers/utils.ts +128 -0
- package/src/web/search/providers/xai.ts +174 -0
- package/src/web/search/providers/zai.ts +320 -0
- package/src/web/search/render.ts +299 -0
- package/src/web/search/types.ts +445 -0
- package/src/web/search/utils.ts +17 -0
- package/src/workspace-tree.ts +286 -0
|
@@ -0,0 +1,1605 @@
|
|
|
1
|
+
import { ThinkingLevel } from "@jawcode-dev/agent-core";
|
|
2
|
+
import { getOAuthProviders } from "@jawcode-dev/ai/utils/oauth";
|
|
3
|
+
import type { OAuthProvider } from "@jawcode-dev/ai/utils/oauth/types";
|
|
4
|
+
import type { Component, OverlayHandle, SelectItem } from "@jawcode-dev/tui";
|
|
5
|
+
import { Container, Input, Loader, SelectList, Spacer, Text } from "@jawcode-dev/tui";
|
|
6
|
+
import { APP_NAME, getAgentDbPath, getProjectDir } from "@jawcode-dev/utils";
|
|
7
|
+
import { activateModelProfile } from "../../config/model-profile-activation";
|
|
8
|
+
import { resolveOAuthProviderId } from "../../config/oauth-provider-aliases";
|
|
9
|
+
import { settings } from "../../config/settings";
|
|
10
|
+
import { DebugSelectorComponent } from "../../debug";
|
|
11
|
+
import { disableProvider, enableProvider } from "../../discovery";
|
|
12
|
+
import { clearPluginRootsAndCaches, resolveActiveProjectRegistryPath } from "../../discovery/helpers";
|
|
13
|
+
import {
|
|
14
|
+
getInstalledPluginsRegistryPath,
|
|
15
|
+
getMarketplacesCacheDir,
|
|
16
|
+
getMarketplacesRegistryPath,
|
|
17
|
+
getPluginsCacheDir,
|
|
18
|
+
MarketplaceManager,
|
|
19
|
+
} from "../../extensibility/plugins/marketplace";
|
|
20
|
+
import { DynamicBorder } from "../../modes/components/dynamic-border";
|
|
21
|
+
import { type HelpCatalogEntry, HelpSelectorComponent } from "../../modes/components/help-selector";
|
|
22
|
+
import { QuotaPanelComponent } from "../../modes/components/quota-panel";
|
|
23
|
+
import {
|
|
24
|
+
getAvailableThemes,
|
|
25
|
+
getCurrentThemeName,
|
|
26
|
+
getDetectedThemeSettingsPath,
|
|
27
|
+
getSelectListTheme,
|
|
28
|
+
getSymbolTheme,
|
|
29
|
+
previewTheme,
|
|
30
|
+
restoreThemePreview,
|
|
31
|
+
setColorBlindMode,
|
|
32
|
+
setSymbolPreset,
|
|
33
|
+
setTheme,
|
|
34
|
+
theme,
|
|
35
|
+
} from "../../modes/theme/theme";
|
|
36
|
+
import type { InteractiveModeContext } from "../../modes/types";
|
|
37
|
+
import { resolveResumableSession, type SessionInfo, SessionManager } from "../../session/session-manager";
|
|
38
|
+
import { FileSessionStorage } from "../../session/session-storage";
|
|
39
|
+
import {
|
|
40
|
+
MODEL_ONBOARDING_API_PROVIDER_COMMAND,
|
|
41
|
+
MODEL_ONBOARDING_PROVIDER_PRESET_COMMAND,
|
|
42
|
+
MODEL_ONBOARDING_SETUP_COMMAND,
|
|
43
|
+
} from "../../setup/model-onboarding-guidance";
|
|
44
|
+
import { addApiCompatibleProvider, formatProviderSetupResult } from "../../setup/provider-onboarding";
|
|
45
|
+
import { BUILTIN_SLASH_COMMANDS_INTERNAL } from "../../slash-commands/builtin-registry";
|
|
46
|
+
import { isSearchProviderPreference, setPreferredImageProvider, setPreferredSearchProvider } from "../../tools";
|
|
47
|
+
import { setSessionTerminalTitle } from "../../utils/title-generator";
|
|
48
|
+
import type { SearchProviderId } from "../../web/search/types";
|
|
49
|
+
import { AgentDashboard } from "../components/agent-dashboard";
|
|
50
|
+
import { AssistantMessageComponent } from "../components/assistant-message";
|
|
51
|
+
import { CustomProviderWizardComponent, type CustomProviderWizardSubmit } from "../components/custom-provider-wizard";
|
|
52
|
+
import { ExtensionDashboard } from "../components/extensions";
|
|
53
|
+
import { HistorySearchComponent } from "../components/history-search";
|
|
54
|
+
import { JobsOverlayComponent } from "../components/jobs-overlay";
|
|
55
|
+
import { ModelSelectorComponent, type ModelSelectorSelection } from "../components/model-selector";
|
|
56
|
+
import { OAuthSelectorComponent } from "../components/oauth-selector";
|
|
57
|
+
import { PluginSelectorComponent } from "../components/plugin-selector";
|
|
58
|
+
import {
|
|
59
|
+
type ProviderOnboardingAction,
|
|
60
|
+
ProviderOnboardingSelectorComponent,
|
|
61
|
+
} from "../components/provider-onboarding-selector";
|
|
62
|
+
import { SessionObserverOverlayComponent } from "../components/session-observer-overlay";
|
|
63
|
+
import { SessionSelectorComponent } from "../components/session-selector";
|
|
64
|
+
import { SettingsSelectorComponent } from "../components/settings-selector";
|
|
65
|
+
import { ThemeSelectorComponent } from "../components/theme-selector";
|
|
66
|
+
import { ToolExecutionComponent } from "../components/tool-execution";
|
|
67
|
+
import { TreeSelectorComponent } from "../components/tree-selector";
|
|
68
|
+
import { UserMessageSelectorComponent } from "../components/user-message-selector";
|
|
69
|
+
import type { JobsObserver } from "../jobs-observer";
|
|
70
|
+
import type { SessionObserverRegistry } from "../session-observer-registry";
|
|
71
|
+
|
|
72
|
+
const CALLBACK_SERVER_PROVIDERS = new Set<string>([
|
|
73
|
+
"anthropic",
|
|
74
|
+
"openai-codex",
|
|
75
|
+
"gitlab-duo",
|
|
76
|
+
"google-gemini-cli",
|
|
77
|
+
"google-antigravity",
|
|
78
|
+
"xai",
|
|
79
|
+
]);
|
|
80
|
+
|
|
81
|
+
const MANUAL_LOGIN_TIP = "Tip: You can complete pairing with /login <redirect URL>.";
|
|
82
|
+
|
|
83
|
+
function isThemePreviewSuperseded(result: { success: boolean; error?: string }): boolean {
|
|
84
|
+
return !result.success && result.error?.includes("superseded by a newer request") === true;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function formatProviderOnboardingCommandGuide(): string {
|
|
88
|
+
return [
|
|
89
|
+
"Provider preset setup:",
|
|
90
|
+
MODEL_ONBOARDING_PROVIDER_PRESET_COMMAND,
|
|
91
|
+
"Custom API-compatible provider setup:",
|
|
92
|
+
MODEL_ONBOARDING_API_PROVIDER_COMMAND,
|
|
93
|
+
MODEL_ONBOARDING_SETUP_COMMAND,
|
|
94
|
+
].join("\n");
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export class SelectorController {
|
|
98
|
+
constructor(private ctx: InteractiveModeContext) {}
|
|
99
|
+
|
|
100
|
+
async #refreshOAuthProviderAuthState(): Promise<void> {
|
|
101
|
+
const oauthProviders = getOAuthProviders();
|
|
102
|
+
await Promise.all(
|
|
103
|
+
oauthProviders.map(provider =>
|
|
104
|
+
this.ctx.session.modelRegistry
|
|
105
|
+
.getApiKeyForProvider(provider.id, this.ctx.session.sessionId)
|
|
106
|
+
.catch(() => undefined),
|
|
107
|
+
),
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Shows a selector component in place of the editor.
|
|
112
|
+
* @param create Factory that receives a `done` callback and returns the component and focus target
|
|
113
|
+
*/
|
|
114
|
+
showSelector(create: (done: () => void) => { component: Component; focus: Component }): void {
|
|
115
|
+
const done = () => {
|
|
116
|
+
this.ctx.editorContainer.clear();
|
|
117
|
+
this.ctx.editorContainer.addChild(this.ctx.editor);
|
|
118
|
+
this.ctx.ui.setFocus(this.ctx.editor);
|
|
119
|
+
};
|
|
120
|
+
const { component, focus } = create(done);
|
|
121
|
+
this.ctx.editorContainer.clear();
|
|
122
|
+
this.ctx.editorContainer.addChild(component);
|
|
123
|
+
this.ctx.ui.setFocus(focus);
|
|
124
|
+
this.ctx.ui.requestRender();
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
showProviderOnboarding(): void {
|
|
128
|
+
this.showSelector(done => {
|
|
129
|
+
const selector = new ProviderOnboardingSelectorComponent(
|
|
130
|
+
(action: ProviderOnboardingAction) => {
|
|
131
|
+
done();
|
|
132
|
+
if (action === "custom-provider-wizard") {
|
|
133
|
+
this.showCustomProviderWizard();
|
|
134
|
+
} else if (action === "oauth-login") {
|
|
135
|
+
void this.showOAuthSelector("login");
|
|
136
|
+
} else {
|
|
137
|
+
this.ctx.showStatus(formatProviderOnboardingCommandGuide());
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
() => {
|
|
141
|
+
done();
|
|
142
|
+
this.ctx.ui.requestRender();
|
|
143
|
+
},
|
|
144
|
+
);
|
|
145
|
+
return { component: selector, focus: selector };
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
showCustomProviderWizard(): void {
|
|
150
|
+
this.showSelector(done => {
|
|
151
|
+
let wizard: CustomProviderWizardComponent;
|
|
152
|
+
const submit = async (input: CustomProviderWizardSubmit): Promise<void> => {
|
|
153
|
+
try {
|
|
154
|
+
const result = await addApiCompatibleProvider(input);
|
|
155
|
+
await this.ctx.session.modelRegistry.refresh("offline");
|
|
156
|
+
await this.ctx.notifyConfigChanged?.();
|
|
157
|
+
this.ctx.showStatus(formatProviderSetupResult(result));
|
|
158
|
+
done();
|
|
159
|
+
this.ctx.ui.requestRender();
|
|
160
|
+
} catch (err) {
|
|
161
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
162
|
+
wizard.setSubmitError(`Provider setup failed: ${message}`);
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
wizard = new CustomProviderWizardComponent(
|
|
166
|
+
input => {
|
|
167
|
+
void submit(input);
|
|
168
|
+
},
|
|
169
|
+
() => {
|
|
170
|
+
done();
|
|
171
|
+
this.ctx.ui.requestRender();
|
|
172
|
+
},
|
|
173
|
+
() => this.ctx.ui.requestRender(),
|
|
174
|
+
);
|
|
175
|
+
return { component: wizard, focus: wizard };
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
showSettingsSelector(): void {
|
|
180
|
+
getAvailableThemes().then(availableThemes => {
|
|
181
|
+
this.showSelector(done => {
|
|
182
|
+
const selector = new SettingsSelectorComponent(
|
|
183
|
+
{
|
|
184
|
+
availableThinkingLevels: [...this.ctx.session.getAvailableThinkingLevels()],
|
|
185
|
+
thinkingLevel: this.ctx.session.thinkingLevel,
|
|
186
|
+
availableThemes,
|
|
187
|
+
cwd: getProjectDir(),
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
onChange: (id, value) => this.handleSettingChange(id, value),
|
|
191
|
+
onThemePreview: themeName => {
|
|
192
|
+
return previewTheme(themeName).then(result => {
|
|
193
|
+
if (!result.success && result.error && !isThemePreviewSuperseded(result)) {
|
|
194
|
+
this.ctx.showError(`Failed to preview theme: ${result.error}`);
|
|
195
|
+
}
|
|
196
|
+
this.#refreshThemeUi();
|
|
197
|
+
});
|
|
198
|
+
},
|
|
199
|
+
onThemePreviewCancel: themeName => {
|
|
200
|
+
return restoreThemePreview(themeName).then(result => {
|
|
201
|
+
if (!result.success && result.error && !isThemePreviewSuperseded(result)) {
|
|
202
|
+
this.ctx.showError(`Failed to restore theme preview: ${result.error}`);
|
|
203
|
+
}
|
|
204
|
+
this.#refreshThemeUi();
|
|
205
|
+
});
|
|
206
|
+
},
|
|
207
|
+
onStatusLinePreview: previewSettings => {
|
|
208
|
+
// Update status line with preview settings
|
|
209
|
+
this.ctx.statusLine.updateSettings({
|
|
210
|
+
preset: settings.get("statusLine.preset"),
|
|
211
|
+
leftSegments: settings.get("statusLine.leftSegments"),
|
|
212
|
+
rightSegments: settings.get("statusLine.rightSegments"),
|
|
213
|
+
separator: settings.get("statusLine.separator"),
|
|
214
|
+
showHookStatus: settings.get("statusLine.showHookStatus"),
|
|
215
|
+
sessionAccent: settings.get("statusLine.sessionAccent"),
|
|
216
|
+
...previewSettings,
|
|
217
|
+
});
|
|
218
|
+
this.ctx.updateEditorTopBorder();
|
|
219
|
+
this.ctx.ui.requestRender();
|
|
220
|
+
},
|
|
221
|
+
getStatusLinePreview: () => {
|
|
222
|
+
// Return the rendered status line for inline preview
|
|
223
|
+
const availableWidth = this.ctx.editor.getTopBorderAvailableWidth(this.ctx.ui.terminal.columns);
|
|
224
|
+
return this.ctx.statusLine.getTopBorder(availableWidth).content;
|
|
225
|
+
},
|
|
226
|
+
onPluginsChanged: () => {
|
|
227
|
+
this.ctx.ui.requestRender();
|
|
228
|
+
},
|
|
229
|
+
onCancel: () => {
|
|
230
|
+
done();
|
|
231
|
+
// Restore status line to saved settings
|
|
232
|
+
this.ctx.statusLine.updateSettings({
|
|
233
|
+
preset: settings.get("statusLine.preset"),
|
|
234
|
+
leftSegments: settings.get("statusLine.leftSegments"),
|
|
235
|
+
rightSegments: settings.get("statusLine.rightSegments"),
|
|
236
|
+
separator: settings.get("statusLine.separator"),
|
|
237
|
+
showHookStatus: settings.get("statusLine.showHookStatus"),
|
|
238
|
+
sessionAccent: settings.get("statusLine.sessionAccent"),
|
|
239
|
+
});
|
|
240
|
+
this.ctx.updateEditorTopBorder();
|
|
241
|
+
this.ctx.ui.requestRender();
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
);
|
|
245
|
+
return { component: selector, focus: selector };
|
|
246
|
+
});
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
#refreshThemeUi(): void {
|
|
251
|
+
this.ctx.statusLine.invalidate();
|
|
252
|
+
this.ctx.updateEditorTopBorder();
|
|
253
|
+
this.ctx.ui.requestRender();
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/** 083.4: dropdown for /effort — pick a reasoning effort (thinking level). */
|
|
257
|
+
showEffortSelector(): void {
|
|
258
|
+
const levels: SelectItem[] = [
|
|
259
|
+
{ value: "off", label: "off", description: "No reasoning" },
|
|
260
|
+
{ value: "min", label: "minimal", description: "Very brief reasoning (~1k tokens)" },
|
|
261
|
+
{ value: "low", label: "low", description: "Light reasoning (~2k tokens)" },
|
|
262
|
+
{ value: "medium", label: "medium", description: "Moderate reasoning (~8k tokens)" },
|
|
263
|
+
{ value: "high", label: "high", description: "Deep reasoning (~16k tokens)" },
|
|
264
|
+
{ value: "xhigh", label: "xhigh", description: "Maximum reasoning (~32k tokens)" },
|
|
265
|
+
{ value: "max", label: "max", description: "Unrestricted reasoning" },
|
|
266
|
+
];
|
|
267
|
+
this.showSelector(done => {
|
|
268
|
+
const container = new Container();
|
|
269
|
+
container.addChild(new DynamicBorder());
|
|
270
|
+
container.addChild(new Text(theme.fg("accent", " Reasoning effort"), 1, 0));
|
|
271
|
+
const list = new SelectList(levels, 8, getSelectListTheme());
|
|
272
|
+
const current = this.ctx.session.thinkingLevel;
|
|
273
|
+
const currentIndex = levels.findIndex(item => item.value === current);
|
|
274
|
+
if (currentIndex >= 0) list.setSelectedIndex(currentIndex);
|
|
275
|
+
list.onSelect = item => {
|
|
276
|
+
done();
|
|
277
|
+
this.ctx.session.setThinkingLevel(item.value as ThinkingLevel);
|
|
278
|
+
this.ctx.statusLine.invalidate();
|
|
279
|
+
this.ctx.showStatus(`Reasoning effort set to ${this.ctx.session.thinkingLevel ?? "off"}.`);
|
|
280
|
+
this.ctx.ui.requestRender();
|
|
281
|
+
};
|
|
282
|
+
list.onCancel = () => {
|
|
283
|
+
done();
|
|
284
|
+
this.ctx.ui.requestRender();
|
|
285
|
+
};
|
|
286
|
+
container.addChild(list);
|
|
287
|
+
container.addChild(new DynamicBorder());
|
|
288
|
+
return { component: container, focus: list };
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/** 2-pane dropdown for /searchengine — provider list + settings form (space to toggle, 080). */
|
|
293
|
+
showSearchEngineSelector(): void {
|
|
294
|
+
const engines: SelectItem[] = [
|
|
295
|
+
{ value: "auto", label: "auto", description: "Active model's native search, DuckDuckGo fallback" },
|
|
296
|
+
{ value: "codex", label: "chatgpt", description: "ChatGPT/OpenAI native search (codex)" },
|
|
297
|
+
{ value: "anthropic", label: "claude", description: "Anthropic native search" },
|
|
298
|
+
{ value: "gemini", label: "gemini", description: "Google Gemini native search" },
|
|
299
|
+
{ value: "xai", label: "grok", description: "xAI Grok unified web + X search" },
|
|
300
|
+
{ value: "duckduckgo", label: "duckduckgo", description: "Keyless DuckDuckGo (always available)" },
|
|
301
|
+
{ value: "perplexity", label: "perplexity", description: "Perplexity search" },
|
|
302
|
+
{ value: "exa", label: "exa", description: "Exa keyed search API" },
|
|
303
|
+
{ value: "brave", label: "brave", description: "Brave keyed search API" },
|
|
304
|
+
{ value: "tavily", label: "tavily", description: "Tavily keyed search API" },
|
|
305
|
+
];
|
|
306
|
+
|
|
307
|
+
// Settings form options
|
|
308
|
+
const ctx = this.ctx; // capture for closure (wrapper is a plain object, not a class method)
|
|
309
|
+
const DEPTHS = ["fast", "deep"] as const;
|
|
310
|
+
const EFFORTS = ["none", "low", "medium", "high"] as const;
|
|
311
|
+
const CONTEXTS = ["low", "medium", "high"] as const;
|
|
312
|
+
|
|
313
|
+
this.showSelector(done => {
|
|
314
|
+
let pane: "providers" | "settings" = "providers";
|
|
315
|
+
let settingsRow = 0; // 0=depth, 1=reasoning, 2=contextSize
|
|
316
|
+
|
|
317
|
+
// Read current settings
|
|
318
|
+
let depth = (ctx.settings.get("web_search.depth") as string) ?? "fast";
|
|
319
|
+
let effort = (ctx.settings.get("web_search.reasoningEffort") as string) ?? "none";
|
|
320
|
+
let ctxSize = (ctx.settings.get("web_search.contextSize") as string) ?? "high";
|
|
321
|
+
const selectedProvider = () => (ctx.settings.get("providers.webSearch") as string) ?? "auto";
|
|
322
|
+
const isCodexProvider = () => ["codex", "auto"].includes(selectedProvider());
|
|
323
|
+
const maxRow = () => (isCodexProvider() ? 2 : 1); // hide contextSize for non-codex
|
|
324
|
+
|
|
325
|
+
// Provider list (pane 0)
|
|
326
|
+
const list = new SelectList(engines, 10, getSelectListTheme());
|
|
327
|
+
const currentIndex = engines.findIndex(item => item.value === ctx.settings.get("providers.webSearch"));
|
|
328
|
+
if (currentIndex >= 0) list.setSelectedIndex(currentIndex);
|
|
329
|
+
list.onSelect = item => {
|
|
330
|
+
done();
|
|
331
|
+
const next = item.value as SearchProviderId | "auto";
|
|
332
|
+
ctx.settings.set("providers.webSearch", next);
|
|
333
|
+
setPreferredSearchProvider(next);
|
|
334
|
+
void ctx.notifyConfigChanged?.();
|
|
335
|
+
ctx.statusLine.invalidate();
|
|
336
|
+
ctx.showStatus(`Search engine set to ${next}. Fallback remains DuckDuckGo.`);
|
|
337
|
+
ctx.ui.requestRender();
|
|
338
|
+
};
|
|
339
|
+
list.onCancel = () => {
|
|
340
|
+
done();
|
|
341
|
+
ctx.ui.requestRender();
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
// 2-pane wrapper component
|
|
345
|
+
const wrapper: Component = {
|
|
346
|
+
render(width: number): string[] {
|
|
347
|
+
if (pane === "providers") {
|
|
348
|
+
const header = theme.fg("accent", " Web search engine") + theme.fg("dim", " · space for settings");
|
|
349
|
+
return [
|
|
350
|
+
...new DynamicBorder().render(width),
|
|
351
|
+
header,
|
|
352
|
+
...list.render(width),
|
|
353
|
+
...new DynamicBorder().render(width),
|
|
354
|
+
];
|
|
355
|
+
}
|
|
356
|
+
// Settings pane
|
|
357
|
+
const rows: string[] = [];
|
|
358
|
+
const label = (text: string, active: boolean) =>
|
|
359
|
+
active ? theme.fg("accent", `▸ ${text}`) : ` ${text}`;
|
|
360
|
+
const seg = <T extends string>(options: readonly T[], current: string, active: boolean) =>
|
|
361
|
+
options
|
|
362
|
+
.map(o => {
|
|
363
|
+
const selected = o === current;
|
|
364
|
+
if (selected && active) return theme.fg("accent", `[${o}]`);
|
|
365
|
+
if (selected) return `[${o}]`;
|
|
366
|
+
return theme.fg("dim", ` ${o} `);
|
|
367
|
+
})
|
|
368
|
+
.join(" ");
|
|
369
|
+
|
|
370
|
+
rows.push(
|
|
371
|
+
theme.fg("accent", " Search settings") +
|
|
372
|
+
theme.fg("dim", ` · provider: ${selectedProvider()} · space for providers`),
|
|
373
|
+
);
|
|
374
|
+
rows.push("");
|
|
375
|
+
rows.push(`${label("Depth", settingsRow === 0)} ${seg(DEPTHS, depth, settingsRow === 0)}`);
|
|
376
|
+
rows.push(`${label("Reasoning", settingsRow === 1)} ${seg(EFFORTS, effort, settingsRow === 1)}`);
|
|
377
|
+
if (isCodexProvider()) {
|
|
378
|
+
rows.push(`${label("Context", settingsRow === 2)} ${seg(CONTEXTS, ctxSize, settingsRow === 2)}`);
|
|
379
|
+
}
|
|
380
|
+
rows.push("");
|
|
381
|
+
rows.push(theme.fg("dim", " ←/→ change · ↑/↓ move · ⏎ apply · esc back · space providers"));
|
|
382
|
+
return [...new DynamicBorder().render(width), ...rows, ...new DynamicBorder().render(width)];
|
|
383
|
+
},
|
|
384
|
+
|
|
385
|
+
handleInput(data: string) {
|
|
386
|
+
// Space toggles pane (model-selector pattern)
|
|
387
|
+
if (data === " ") {
|
|
388
|
+
pane = pane === "providers" ? "settings" : "providers";
|
|
389
|
+
wrapper.invalidate?.();
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
if (pane === "providers") {
|
|
394
|
+
list.handleInput(data);
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
// Settings pane key handling (080 §7: ↑/↓ row, ←/→ value, Enter apply)
|
|
399
|
+
if (data === "\x1b[A" || data === "\x1bOA") {
|
|
400
|
+
// up
|
|
401
|
+
settingsRow = Math.max(0, settingsRow - 1);
|
|
402
|
+
} else if (data === "\x1b[B" || data === "\x1bOB") {
|
|
403
|
+
// down
|
|
404
|
+
settingsRow = Math.min(maxRow(), settingsRow + 1);
|
|
405
|
+
} else if (data === "\x1b[D" || data === "\x1bOD") {
|
|
406
|
+
// left
|
|
407
|
+
if (settingsRow === 0)
|
|
408
|
+
depth = DEPTHS[Math.max(0, DEPTHS.indexOf(depth as (typeof DEPTHS)[number]) - 1)] ?? depth;
|
|
409
|
+
else if (settingsRow === 1)
|
|
410
|
+
effort = EFFORTS[Math.max(0, EFFORTS.indexOf(effort as (typeof EFFORTS)[number]) - 1)] ?? effort;
|
|
411
|
+
else if (settingsRow === 2)
|
|
412
|
+
ctxSize =
|
|
413
|
+
CONTEXTS[Math.max(0, CONTEXTS.indexOf(ctxSize as (typeof CONTEXTS)[number]) - 1)] ?? ctxSize;
|
|
414
|
+
} else if (data === "\x1b[C" || data === "\x1bOC") {
|
|
415
|
+
// right
|
|
416
|
+
if (settingsRow === 0)
|
|
417
|
+
depth =
|
|
418
|
+
DEPTHS[Math.min(DEPTHS.length - 1, DEPTHS.indexOf(depth as (typeof DEPTHS)[number]) + 1)] ??
|
|
419
|
+
depth;
|
|
420
|
+
else if (settingsRow === 1)
|
|
421
|
+
effort =
|
|
422
|
+
EFFORTS[
|
|
423
|
+
Math.min(EFFORTS.length - 1, EFFORTS.indexOf(effort as (typeof EFFORTS)[number]) + 1)
|
|
424
|
+
] ?? effort;
|
|
425
|
+
else if (settingsRow === 2)
|
|
426
|
+
ctxSize =
|
|
427
|
+
CONTEXTS[
|
|
428
|
+
Math.min(CONTEXTS.length - 1, CONTEXTS.indexOf(ctxSize as (typeof CONTEXTS)[number]) + 1)
|
|
429
|
+
] ?? ctxSize;
|
|
430
|
+
} else if (data === "\r" || data === "\n") {
|
|
431
|
+
// Enter = apply
|
|
432
|
+
ctx.settings.set("web_search.depth", depth);
|
|
433
|
+
ctx.settings.set("web_search.reasoningEffort", effort);
|
|
434
|
+
ctx.settings.set("web_search.contextSize", ctxSize);
|
|
435
|
+
void ctx.notifyConfigChanged?.();
|
|
436
|
+
done();
|
|
437
|
+
ctx.showStatus(`Search: depth=${depth} reasoning=${effort} context=${ctxSize}`);
|
|
438
|
+
ctx.ui.requestRender();
|
|
439
|
+
return;
|
|
440
|
+
} else if (data === "\x1b" || data === "\x1b\x1b") {
|
|
441
|
+
// Esc = back to providers
|
|
442
|
+
pane = "providers";
|
|
443
|
+
}
|
|
444
|
+
wrapper.invalidate?.();
|
|
445
|
+
},
|
|
446
|
+
|
|
447
|
+
invalidate() {
|
|
448
|
+
// no-op — TUI re-renders on requestRender
|
|
449
|
+
},
|
|
450
|
+
};
|
|
451
|
+
|
|
452
|
+
return { component: wrapper, focus: wrapper };
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Docked usage/quota report panel — renders on the editor surface like the
|
|
458
|
+
* settings selector instead of inserting into the chat transcript. `load`
|
|
459
|
+
* resolves to a width-aware line renderer on success or a status message
|
|
460
|
+
* string (e.g. "No quota data available") on empty/soft-failure.
|
|
461
|
+
*/
|
|
462
|
+
showUsageReportPanel(title: string, load: () => Promise<((width: number) => string[]) | string>): void {
|
|
463
|
+
this.showSelector(done => {
|
|
464
|
+
const container = new Container();
|
|
465
|
+
container.addChild(new DynamicBorder());
|
|
466
|
+
const panel = new QuotaPanelComponent(title, {
|
|
467
|
+
close: () => {
|
|
468
|
+
done();
|
|
469
|
+
this.ctx.ui.requestRender();
|
|
470
|
+
},
|
|
471
|
+
requestRender: () => this.ctx.ui.requestRender(),
|
|
472
|
+
});
|
|
473
|
+
container.addChild(panel);
|
|
474
|
+
container.addChild(new DynamicBorder());
|
|
475
|
+
void load()
|
|
476
|
+
.then(result => {
|
|
477
|
+
if (typeof result === "string") panel.setMessage(result);
|
|
478
|
+
else panel.setContent(result);
|
|
479
|
+
})
|
|
480
|
+
.catch(error => {
|
|
481
|
+
panel.setMessage(
|
|
482
|
+
`Failed to fetch usage data: ${error instanceof Error ? error.message : String(error)}`,
|
|
483
|
+
);
|
|
484
|
+
});
|
|
485
|
+
return { component: container, focus: panel };
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* 99.20.08 (나): docked /help catalog — model-selector grammar (tab bar
|
|
491
|
+
* Built-in/Skills/Custom + search + list). Enter inserts the command into
|
|
492
|
+
* the editor; the transcript stays untouched (99.20.07 read-once).
|
|
493
|
+
*/
|
|
494
|
+
showHelpSelector(): void {
|
|
495
|
+
const builtinSpecs = new Map(BUILTIN_SLASH_COMMANDS_INTERNAL.map(spec => [spec.name, spec]));
|
|
496
|
+
const seen = new Set<string>();
|
|
497
|
+
const entries: HelpCatalogEntry[] = [];
|
|
498
|
+
for (const command of this.ctx.allSlashCommands) {
|
|
499
|
+
if (seen.has(command.name)) continue;
|
|
500
|
+
seen.add(command.name);
|
|
501
|
+
const spec = builtinSpecs.get(command.name);
|
|
502
|
+
const skill = this.ctx.skillCommands.get(command.name);
|
|
503
|
+
entries.push({
|
|
504
|
+
name: command.name,
|
|
505
|
+
description: command.description,
|
|
506
|
+
origin: spec ? "builtin" : skill ? "skill" : "custom",
|
|
507
|
+
aliases: spec?.aliases,
|
|
508
|
+
inlineHint: spec?.inlineHint,
|
|
509
|
+
subcommands: spec?.subcommands,
|
|
510
|
+
sourceLabel: skill ? `source: ${skill.source}` : undefined,
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
this.showSelector(done => {
|
|
514
|
+
const selector = new HelpSelectorComponent(
|
|
515
|
+
entries,
|
|
516
|
+
commandName => {
|
|
517
|
+
done();
|
|
518
|
+
this.ctx.editor.setText(`/${commandName} `);
|
|
519
|
+
this.ctx.ui.requestRender();
|
|
520
|
+
},
|
|
521
|
+
() => {
|
|
522
|
+
done();
|
|
523
|
+
this.ctx.ui.requestRender();
|
|
524
|
+
},
|
|
525
|
+
);
|
|
526
|
+
return { component: selector, focus: selector };
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/** 094.4: dropdown for /quota — pick an OAuth provider to show usage. */
|
|
531
|
+
showQuotaSelector(): void {
|
|
532
|
+
const oauthProviders = getOAuthProviders().filter(provider =>
|
|
533
|
+
this.ctx.session.modelRegistry.authStorage.hasOAuth(provider.id),
|
|
534
|
+
);
|
|
535
|
+
if (oauthProviders.length === 0) {
|
|
536
|
+
this.ctx.showStatus("No OAuth credentials found. Use /login to authenticate with a provider first.");
|
|
537
|
+
return;
|
|
538
|
+
}
|
|
539
|
+
if (oauthProviders.length === 1) {
|
|
540
|
+
void this.ctx.handleQuotaForProvider(oauthProviders[0].id);
|
|
541
|
+
return;
|
|
542
|
+
}
|
|
543
|
+
const items: SelectItem[] = oauthProviders.map(provider => ({
|
|
544
|
+
value: provider.id,
|
|
545
|
+
label: provider.name,
|
|
546
|
+
description: provider.id,
|
|
547
|
+
}));
|
|
548
|
+
this.showSelector(done => {
|
|
549
|
+
const container = new Container();
|
|
550
|
+
container.addChild(new DynamicBorder());
|
|
551
|
+
container.addChild(new Text(theme.fg("accent", " Provider quota"), 1, 0));
|
|
552
|
+
const list = new SelectList(items, 8, getSelectListTheme());
|
|
553
|
+
list.onSelect = item => {
|
|
554
|
+
done();
|
|
555
|
+
void this.ctx.handleQuotaForProvider(item.value);
|
|
556
|
+
};
|
|
557
|
+
list.onCancel = () => {
|
|
558
|
+
done();
|
|
559
|
+
this.ctx.ui.requestRender();
|
|
560
|
+
};
|
|
561
|
+
container.addChild(list);
|
|
562
|
+
container.addChild(new DynamicBorder());
|
|
563
|
+
return { component: container, focus: list };
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
showThemeSelector(): void {
|
|
568
|
+
getAvailableThemes().then(availableThemes => {
|
|
569
|
+
const initialTheme = getCurrentThemeName() ?? "red-claw";
|
|
570
|
+
this.showSelector(done => {
|
|
571
|
+
const selector = new ThemeSelectorComponent(
|
|
572
|
+
initialTheme,
|
|
573
|
+
availableThemes,
|
|
574
|
+
themeName => {
|
|
575
|
+
const settingPath = getDetectedThemeSettingsPath();
|
|
576
|
+
settings.set(settingPath, themeName);
|
|
577
|
+
this.#refreshThemeUi();
|
|
578
|
+
done();
|
|
579
|
+
},
|
|
580
|
+
() => {
|
|
581
|
+
void restoreThemePreview(initialTheme).then(result => {
|
|
582
|
+
if (!result.success && result.error) {
|
|
583
|
+
this.ctx.showError(`Failed to restore theme preview: ${result.error}`);
|
|
584
|
+
}
|
|
585
|
+
this.#refreshThemeUi();
|
|
586
|
+
});
|
|
587
|
+
done();
|
|
588
|
+
},
|
|
589
|
+
themeName => {
|
|
590
|
+
void previewTheme(themeName).then(result => {
|
|
591
|
+
if (!result.success && result.error) {
|
|
592
|
+
this.ctx.showError(`Failed to preview theme: ${result.error}`);
|
|
593
|
+
}
|
|
594
|
+
this.#refreshThemeUi();
|
|
595
|
+
});
|
|
596
|
+
},
|
|
597
|
+
);
|
|
598
|
+
return { component: selector, focus: selector.getSelectList() };
|
|
599
|
+
});
|
|
600
|
+
});
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
showHistorySearch(): void {
|
|
604
|
+
const historyStorage = this.ctx.historyStorage;
|
|
605
|
+
if (!historyStorage) return;
|
|
606
|
+
|
|
607
|
+
this.showSelector(done => {
|
|
608
|
+
const component = new HistorySearchComponent(
|
|
609
|
+
historyStorage,
|
|
610
|
+
prompt => {
|
|
611
|
+
done();
|
|
612
|
+
this.ctx.editor.setText(prompt);
|
|
613
|
+
this.ctx.ui.requestRender();
|
|
614
|
+
},
|
|
615
|
+
() => {
|
|
616
|
+
done();
|
|
617
|
+
this.ctx.ui.requestRender();
|
|
618
|
+
},
|
|
619
|
+
);
|
|
620
|
+
return { component, focus: component };
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* Show the Extension Control Center dashboard.
|
|
626
|
+
* Replaces /status with a unified view of all providers and extensions.
|
|
627
|
+
*/
|
|
628
|
+
async showExtensionsDashboard(): Promise<void> {
|
|
629
|
+
const dashboard = await ExtensionDashboard.create(getProjectDir(), this.ctx.settings, this.ctx.ui.terminal.rows);
|
|
630
|
+
this.showSelector(done => {
|
|
631
|
+
dashboard.onClose = () => {
|
|
632
|
+
done();
|
|
633
|
+
this.ctx.ui.requestRender();
|
|
634
|
+
};
|
|
635
|
+
dashboard.onRequestRender = () => {
|
|
636
|
+
this.ctx.ui.requestRender();
|
|
637
|
+
};
|
|
638
|
+
return { component: dashboard, focus: dashboard };
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* Show the Agent Control Center dashboard.
|
|
644
|
+
*/
|
|
645
|
+
async showAgentsDashboard(): Promise<void> {
|
|
646
|
+
const activeModel = this.ctx.session.model;
|
|
647
|
+
const activeModelPattern = activeModel ? `${activeModel.provider}/${activeModel.id}` : undefined;
|
|
648
|
+
const defaultModelPattern = this.ctx.settings.getModelRole("default");
|
|
649
|
+
const dashboard = await AgentDashboard.create(getProjectDir(), this.ctx.settings, this.ctx.ui.terminal.rows, {
|
|
650
|
+
modelRegistry: this.ctx.session.modelRegistry,
|
|
651
|
+
activeModelPattern,
|
|
652
|
+
defaultModelPattern,
|
|
653
|
+
});
|
|
654
|
+
this.showSelector(done => {
|
|
655
|
+
dashboard.onClose = () => {
|
|
656
|
+
done();
|
|
657
|
+
this.ctx.ui.requestRender();
|
|
658
|
+
};
|
|
659
|
+
dashboard.onRequestRender = () => {
|
|
660
|
+
this.ctx.ui.requestRender();
|
|
661
|
+
};
|
|
662
|
+
return { component: dashboard, focus: dashboard };
|
|
663
|
+
});
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
* Handle setting changes from the settings selector.
|
|
668
|
+
* Most settings are saved directly via SettingsManager in the definitions.
|
|
669
|
+
* This handles side effects and session-specific settings.
|
|
670
|
+
*/
|
|
671
|
+
handleSettingChange(id: string, value: unknown): void {
|
|
672
|
+
// Discovery provider toggles
|
|
673
|
+
if (id.startsWith("discovery.")) {
|
|
674
|
+
const providerId = id.replace("discovery.", "");
|
|
675
|
+
if (value) {
|
|
676
|
+
enableProvider(providerId);
|
|
677
|
+
} else {
|
|
678
|
+
disableProvider(providerId);
|
|
679
|
+
}
|
|
680
|
+
return;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
switch (id) {
|
|
684
|
+
// Session-managed settings (not in SettingsManager)
|
|
685
|
+
case "autoCompact":
|
|
686
|
+
this.ctx.session.setAutoCompactionEnabled(value as boolean);
|
|
687
|
+
this.ctx.statusLine.setAutoCompactEnabled(value as boolean);
|
|
688
|
+
break;
|
|
689
|
+
case "steeringMode":
|
|
690
|
+
this.ctx.session.setSteeringMode(value as "all" | "one-at-a-time");
|
|
691
|
+
break;
|
|
692
|
+
case "followUpMode":
|
|
693
|
+
this.ctx.session.setFollowUpMode(value as "all" | "one-at-a-time");
|
|
694
|
+
break;
|
|
695
|
+
case "interruptMode":
|
|
696
|
+
this.ctx.session.setInterruptMode(value as "immediate" | "wait");
|
|
697
|
+
break;
|
|
698
|
+
case "thinkingLevel":
|
|
699
|
+
case "defaultThinkingLevel":
|
|
700
|
+
this.ctx.session.setThinkingLevel(value as ThinkingLevel, true);
|
|
701
|
+
this.ctx.statusLine.invalidate();
|
|
702
|
+
this.ctx.updateEditorBorderColor();
|
|
703
|
+
break;
|
|
704
|
+
|
|
705
|
+
case "clearOnShrink":
|
|
706
|
+
this.ctx.ui.setClearOnShrink(value as boolean);
|
|
707
|
+
break;
|
|
708
|
+
|
|
709
|
+
case "autocompleteMaxVisible":
|
|
710
|
+
this.ctx.editor.setAutocompleteMaxVisible(typeof value === "number" ? value : Number(value));
|
|
711
|
+
break;
|
|
712
|
+
|
|
713
|
+
// Settings with UI side effects
|
|
714
|
+
case "showImages":
|
|
715
|
+
for (const child of this.ctx.chatContainer.children) {
|
|
716
|
+
if (child instanceof ToolExecutionComponent) {
|
|
717
|
+
child.setShowImages(value as boolean);
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
break;
|
|
721
|
+
case "hideThinking":
|
|
722
|
+
this.ctx.hideThinkingBlock = value as boolean;
|
|
723
|
+
this.ctx.session.agent.hideThinkingSummary = value as boolean;
|
|
724
|
+
for (const child of this.ctx.chatContainer.children) {
|
|
725
|
+
if (child instanceof AssistantMessageComponent) {
|
|
726
|
+
child.setHideThinkingBlock(value as boolean);
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
this.ctx.chatContainer.clear();
|
|
730
|
+
this.ctx.rebuildChatFromMessages();
|
|
731
|
+
break;
|
|
732
|
+
case "theme": {
|
|
733
|
+
setTheme(value as string, true).then(result => {
|
|
734
|
+
this.ctx.statusLine.invalidate();
|
|
735
|
+
this.ctx.updateEditorTopBorder();
|
|
736
|
+
this.ctx.ui.invalidate();
|
|
737
|
+
if (!result.success) {
|
|
738
|
+
this.ctx.showError(`Failed to load theme "${value}": ${result.error}\nFell back to dark theme.`);
|
|
739
|
+
}
|
|
740
|
+
});
|
|
741
|
+
break;
|
|
742
|
+
}
|
|
743
|
+
case "symbolPreset": {
|
|
744
|
+
setSymbolPreset(value as "unicode" | "nerd" | "ascii").then(() => {
|
|
745
|
+
this.ctx.statusLine.invalidate();
|
|
746
|
+
this.ctx.updateEditorTopBorder();
|
|
747
|
+
this.ctx.ui.invalidate();
|
|
748
|
+
});
|
|
749
|
+
break;
|
|
750
|
+
}
|
|
751
|
+
case "colorBlindMode": {
|
|
752
|
+
setColorBlindMode(value === "true" || value === true).then(() => {
|
|
753
|
+
this.ctx.ui.invalidate();
|
|
754
|
+
});
|
|
755
|
+
break;
|
|
756
|
+
}
|
|
757
|
+
case "temperature": {
|
|
758
|
+
const temp = typeof value === "number" ? value : Number(value);
|
|
759
|
+
this.ctx.session.agent.temperature = temp >= 0 ? temp : undefined;
|
|
760
|
+
break;
|
|
761
|
+
}
|
|
762
|
+
case "topP": {
|
|
763
|
+
const topP = typeof value === "number" ? value : Number(value);
|
|
764
|
+
this.ctx.session.agent.topP = topP >= 0 ? topP : undefined;
|
|
765
|
+
break;
|
|
766
|
+
}
|
|
767
|
+
case "topK": {
|
|
768
|
+
const topK = typeof value === "number" ? value : Number(value);
|
|
769
|
+
this.ctx.session.agent.topK = topK >= 0 ? topK : undefined;
|
|
770
|
+
break;
|
|
771
|
+
}
|
|
772
|
+
case "minP": {
|
|
773
|
+
const minP = typeof value === "number" ? value : Number(value);
|
|
774
|
+
this.ctx.session.agent.minP = minP >= 0 ? minP : undefined;
|
|
775
|
+
break;
|
|
776
|
+
}
|
|
777
|
+
case "presencePenalty": {
|
|
778
|
+
const presencePenalty = typeof value === "number" ? value : Number(value);
|
|
779
|
+
this.ctx.session.agent.presencePenalty = presencePenalty >= 0 ? presencePenalty : undefined;
|
|
780
|
+
break;
|
|
781
|
+
}
|
|
782
|
+
case "repetitionPenalty": {
|
|
783
|
+
const repetitionPenalty = typeof value === "number" ? value : Number(value);
|
|
784
|
+
this.ctx.session.agent.repetitionPenalty = repetitionPenalty >= 0 ? repetitionPenalty : undefined;
|
|
785
|
+
break;
|
|
786
|
+
}
|
|
787
|
+
case "statusLinePreset":
|
|
788
|
+
case "statusLine.preset":
|
|
789
|
+
case "statusLineSeparator":
|
|
790
|
+
case "statusLine.separator":
|
|
791
|
+
case "statusLineShowHooks":
|
|
792
|
+
case "statusLine.showHookStatus":
|
|
793
|
+
case "statusLine.sessionAccent":
|
|
794
|
+
case "statusLineSegments":
|
|
795
|
+
case "statusLineModelThinking":
|
|
796
|
+
case "statusLinePathAbbreviate":
|
|
797
|
+
case "statusLinePathMaxLength":
|
|
798
|
+
case "statusLinePathStripWorkPrefix":
|
|
799
|
+
case "statusLineGitShowBranch":
|
|
800
|
+
case "statusLineGitShowStaged":
|
|
801
|
+
case "statusLineGitShowUnstaged":
|
|
802
|
+
case "statusLineGitShowUntracked":
|
|
803
|
+
case "statusLineTimeFormat":
|
|
804
|
+
case "statusLineTimeShowSeconds": {
|
|
805
|
+
const statusLineSettings = {
|
|
806
|
+
preset: settings.get("statusLine.preset"),
|
|
807
|
+
leftSegments: settings.get("statusLine.leftSegments"),
|
|
808
|
+
rightSegments: settings.get("statusLine.rightSegments"),
|
|
809
|
+
separator: settings.get("statusLine.separator"),
|
|
810
|
+
showHookStatus: settings.get("statusLine.showHookStatus"),
|
|
811
|
+
sessionAccent: settings.get("statusLine.sessionAccent"),
|
|
812
|
+
segmentOptions: settings.get("statusLine.segmentOptions"),
|
|
813
|
+
};
|
|
814
|
+
this.ctx.statusLine.updateSettings(statusLineSettings);
|
|
815
|
+
this.ctx.updateEditorTopBorder();
|
|
816
|
+
this.ctx.ui.requestRender();
|
|
817
|
+
break;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
// Provider settings - update runtime preferences
|
|
821
|
+
case "providers.webSearch":
|
|
822
|
+
if (typeof value === "string" && isSearchProviderPreference(value)) {
|
|
823
|
+
setPreferredSearchProvider(value);
|
|
824
|
+
}
|
|
825
|
+
break;
|
|
826
|
+
case "providers.image":
|
|
827
|
+
if (
|
|
828
|
+
value === "auto" ||
|
|
829
|
+
value === "openai" ||
|
|
830
|
+
value === "gemini" ||
|
|
831
|
+
value === "openrouter" ||
|
|
832
|
+
value === "antigravity"
|
|
833
|
+
) {
|
|
834
|
+
setPreferredImageProvider(value);
|
|
835
|
+
}
|
|
836
|
+
break;
|
|
837
|
+
|
|
838
|
+
// MCP update injection - live subscribe/unsubscribe
|
|
839
|
+
case "mcp.notifications":
|
|
840
|
+
this.ctx.mcpManager?.setNotificationsEnabled(value as boolean);
|
|
841
|
+
break;
|
|
842
|
+
|
|
843
|
+
// All other settings are handled by the definitions (get/set on SettingsManager)
|
|
844
|
+
// No additional side effects needed
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
showModelSelector(options?: { temporaryOnly?: boolean }): void {
|
|
849
|
+
this.showSelector(done => {
|
|
850
|
+
let modelSelector: ModelSelectorComponent;
|
|
851
|
+
modelSelector = new ModelSelectorComponent(
|
|
852
|
+
this.ctx.ui,
|
|
853
|
+
this.ctx.session.model,
|
|
854
|
+
this.ctx.settings,
|
|
855
|
+
this.ctx.session.modelRegistry,
|
|
856
|
+
this.ctx.session.scopedModels,
|
|
857
|
+
async selection => {
|
|
858
|
+
try {
|
|
859
|
+
if (selection.kind === "preset") {
|
|
860
|
+
await this.#applyModelAssignmentPreset(selection);
|
|
861
|
+
modelSelector.refreshFromSettings();
|
|
862
|
+
this.ctx.ui.requestRender();
|
|
863
|
+
return;
|
|
864
|
+
}
|
|
865
|
+
if (selection.kind === "profile") {
|
|
866
|
+
await activateModelProfile(
|
|
867
|
+
{
|
|
868
|
+
session: this.ctx.session,
|
|
869
|
+
modelRegistry: this.ctx.session.modelRegistry,
|
|
870
|
+
settings: this.ctx.settings,
|
|
871
|
+
profileName: selection.profileName,
|
|
872
|
+
},
|
|
873
|
+
{ persistDefault: selection.setDefault },
|
|
874
|
+
);
|
|
875
|
+
modelSelector.refreshFromSettings({ currentProfileName: selection.profileName });
|
|
876
|
+
this.ctx.statusLine.invalidate();
|
|
877
|
+
this.ctx.updateEditorBorderColor();
|
|
878
|
+
this.ctx.showStatus(
|
|
879
|
+
selection.setDefault
|
|
880
|
+
? `Default model profile: ${selection.profileName}`
|
|
881
|
+
: `Model profile: ${selection.profileName}`,
|
|
882
|
+
);
|
|
883
|
+
this.ctx.ui.requestRender();
|
|
884
|
+
return;
|
|
885
|
+
}
|
|
886
|
+
const { model, role, thinkingLevel, selector: selectedSelector } = selection;
|
|
887
|
+
if (role === null) {
|
|
888
|
+
// Temporary: update agent state but don't persist to settings
|
|
889
|
+
await this.ctx.session.setModelTemporary(model, thinkingLevel);
|
|
890
|
+
this.ctx.statusLine.invalidate();
|
|
891
|
+
this.ctx.updateEditorBorderColor();
|
|
892
|
+
this.ctx.showStatus(`Temporary model: ${selectedSelector ?? model.id}`);
|
|
893
|
+
done();
|
|
894
|
+
this.ctx.ui.requestRender();
|
|
895
|
+
} else if (role === "default") {
|
|
896
|
+
// Default: update agent state and persist as the active default model.
|
|
897
|
+
await this.ctx.session.setModel(model, role, {
|
|
898
|
+
selector: selectedSelector,
|
|
899
|
+
thinkingLevel,
|
|
900
|
+
});
|
|
901
|
+
if (thinkingLevel && thinkingLevel !== ThinkingLevel.Inherit) {
|
|
902
|
+
this.ctx.session.setThinkingLevel(thinkingLevel);
|
|
903
|
+
}
|
|
904
|
+
modelSelector.refreshFromSettings();
|
|
905
|
+
this.ctx.statusLine.invalidate();
|
|
906
|
+
this.ctx.updateEditorBorderColor();
|
|
907
|
+
this.ctx.showStatus(`Default model: ${selectedSelector ?? model.id}`);
|
|
908
|
+
this.ctx.ui.requestRender();
|
|
909
|
+
} else {
|
|
910
|
+
// Role-agent assignments configure Task dispatch and must not switch the active chat model.
|
|
911
|
+
const apiKey = await this.ctx.session.modelRegistry.getApiKey(model, this.ctx.session.sessionId);
|
|
912
|
+
if (!apiKey) {
|
|
913
|
+
throw new Error(`No API key for ${model.provider}/${model.id}`);
|
|
914
|
+
}
|
|
915
|
+
const overrides = this.ctx.settings.get("task.agentModelOverrides");
|
|
916
|
+
const value = selectedSelector ?? `${model.provider}/${model.id}`;
|
|
917
|
+
const nextOverrides = { ...overrides, [role]: value };
|
|
918
|
+
if (role === "executor_ext") delete nextOverrides.executor;
|
|
919
|
+
this.ctx.settings.set("task.agentModelOverrides", nextOverrides);
|
|
920
|
+
this.ctx.settings.override("task.agentModelOverrides", nextOverrides);
|
|
921
|
+
this.ctx.settings.getStorage()?.recordModelUsage(`${model.provider}/${model.id}`);
|
|
922
|
+
modelSelector.refreshFromSettings();
|
|
923
|
+
this.ctx.showStatus(`${role} agent model: ${value}`);
|
|
924
|
+
this.ctx.ui.requestRender();
|
|
925
|
+
}
|
|
926
|
+
} catch (error) {
|
|
927
|
+
modelSelector.refreshFromSettings({
|
|
928
|
+
currentProfileName:
|
|
929
|
+
this.ctx.session.getActiveModelProfile?.() ?? this.ctx.settings.get("modelProfile.default"),
|
|
930
|
+
});
|
|
931
|
+
this.ctx.ui.requestRender();
|
|
932
|
+
this.ctx.showError(error instanceof Error ? error.message : String(error));
|
|
933
|
+
}
|
|
934
|
+
},
|
|
935
|
+
() => {
|
|
936
|
+
done();
|
|
937
|
+
this.ctx.ui.requestRender();
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
...options,
|
|
941
|
+
currentProfileName:
|
|
942
|
+
this.ctx.session.getActiveModelProfile?.() ?? this.ctx.settings.get("modelProfile.default"),
|
|
943
|
+
},
|
|
944
|
+
);
|
|
945
|
+
return { component: modelSelector, focus: modelSelector };
|
|
946
|
+
});
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
async #applyModelAssignmentPreset(selection: Extract<ModelSelectorSelection, { kind: "preset" }>): Promise<void> {
|
|
950
|
+
const { assignments, model, preset, selector } = selection;
|
|
951
|
+
const apiKey = await this.ctx.session.modelRegistry.getApiKey(model, this.ctx.session.sessionId);
|
|
952
|
+
if (!apiKey) {
|
|
953
|
+
throw new Error(`No API key for ${model.provider}/${model.id}`);
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
const defaultThinkingLevel = assignments.default;
|
|
957
|
+
await this.ctx.session.setModel(model, "default", {
|
|
958
|
+
selector,
|
|
959
|
+
thinkingLevel: defaultThinkingLevel,
|
|
960
|
+
});
|
|
961
|
+
if (defaultThinkingLevel && defaultThinkingLevel !== ThinkingLevel.Inherit) {
|
|
962
|
+
this.ctx.session.setThinkingLevel(defaultThinkingLevel);
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
const overrides = this.ctx.settings.get("task.agentModelOverrides");
|
|
966
|
+
const nextOverrides = { ...overrides };
|
|
967
|
+
for (const [targetRole, presetThinkingLevel] of Object.entries(assignments) as [
|
|
968
|
+
keyof Extract<ModelSelectorSelection, { kind: "preset" }>["assignments"],
|
|
969
|
+
ThinkingLevel,
|
|
970
|
+
][]) {
|
|
971
|
+
if (!targetRole || targetRole === "default") continue;
|
|
972
|
+
nextOverrides[targetRole] =
|
|
973
|
+
presetThinkingLevel === ThinkingLevel.Inherit ? selector : `${selector}:${presetThinkingLevel}`;
|
|
974
|
+
if (targetRole === "executor_ext") delete nextOverrides.executor;
|
|
975
|
+
}
|
|
976
|
+
this.ctx.settings.set("task.agentModelOverrides", nextOverrides);
|
|
977
|
+
this.ctx.settings.override("task.agentModelOverrides", nextOverrides);
|
|
978
|
+
this.ctx.settings.getStorage()?.recordModelUsage(`${model.provider}/${model.id}`);
|
|
979
|
+
this.ctx.statusLine.invalidate();
|
|
980
|
+
this.ctx.updateEditorBorderColor();
|
|
981
|
+
this.ctx.showStatus(`${preset.label}: ${selector}`);
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
async showPluginSelector(mode: "install" | "uninstall" = "install"): Promise<void> {
|
|
985
|
+
const mgr = new MarketplaceManager({
|
|
986
|
+
marketplacesRegistryPath: getMarketplacesRegistryPath(),
|
|
987
|
+
installedRegistryPath: getInstalledPluginsRegistryPath(),
|
|
988
|
+
projectInstalledRegistryPath: (await resolveActiveProjectRegistryPath(getProjectDir())) ?? undefined,
|
|
989
|
+
marketplacesCacheDir: getMarketplacesCacheDir(),
|
|
990
|
+
pluginsCacheDir: getPluginsCacheDir(),
|
|
991
|
+
clearPluginRootsCache: clearPluginRootsAndCaches,
|
|
992
|
+
});
|
|
993
|
+
|
|
994
|
+
const [marketplaces, installed] = await Promise.all([mgr.listMarketplaces(), mgr.listInstalledPlugins()]);
|
|
995
|
+
const installedIds = new Set(installed.map(p => p.id));
|
|
996
|
+
|
|
997
|
+
if (mode === "uninstall") {
|
|
998
|
+
// Show only installed plugins for uninstall
|
|
999
|
+
const items = installed.map(p => {
|
|
1000
|
+
const entry = p.entries[0];
|
|
1001
|
+
const atIdx = p.id.lastIndexOf("@");
|
|
1002
|
+
const pluginName = atIdx > 0 ? p.id.slice(0, atIdx) : p.id;
|
|
1003
|
+
const mkt = atIdx > 0 ? p.id.slice(atIdx + 1) : "unknown";
|
|
1004
|
+
return {
|
|
1005
|
+
plugin: { name: pluginName, version: entry?.version, description: undefined as string | undefined },
|
|
1006
|
+
marketplace: mkt,
|
|
1007
|
+
scope: p.scope,
|
|
1008
|
+
};
|
|
1009
|
+
});
|
|
1010
|
+
this.showSelector(done => {
|
|
1011
|
+
const selector = new PluginSelectorComponent(marketplaces.length, items, new Set(), {
|
|
1012
|
+
onSelect: async (name, marketplace, scope) => {
|
|
1013
|
+
done();
|
|
1014
|
+
const pluginId = `${name}@${marketplace}`;
|
|
1015
|
+
this.ctx.showStatus(`Uninstalling ${pluginId}...`);
|
|
1016
|
+
this.ctx.ui.requestRender();
|
|
1017
|
+
try {
|
|
1018
|
+
await mgr.uninstallPlugin(pluginId, scope);
|
|
1019
|
+
this.ctx.showStatus(`Uninstalled ${pluginId}`);
|
|
1020
|
+
} catch (err) {
|
|
1021
|
+
this.ctx.showStatus(`Uninstall failed: ${err}`);
|
|
1022
|
+
}
|
|
1023
|
+
this.ctx.ui.requestRender();
|
|
1024
|
+
},
|
|
1025
|
+
onCancel: () => {
|
|
1026
|
+
done();
|
|
1027
|
+
this.ctx.ui.requestRender();
|
|
1028
|
+
},
|
|
1029
|
+
});
|
|
1030
|
+
return { component: selector, focus: selector.getSelectList() };
|
|
1031
|
+
});
|
|
1032
|
+
return;
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
// Install mode: show all available plugins from all marketplaces
|
|
1036
|
+
const allPlugins: Array<{
|
|
1037
|
+
plugin: { name: string; version?: string; description?: string };
|
|
1038
|
+
marketplace: string;
|
|
1039
|
+
}> = [];
|
|
1040
|
+
for (const mkt of marketplaces) {
|
|
1041
|
+
const plugins = await mgr.listAvailablePlugins(mkt.name);
|
|
1042
|
+
for (const plugin of plugins) {
|
|
1043
|
+
allPlugins.push({ plugin, marketplace: mkt.name });
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
this.showSelector(done => {
|
|
1048
|
+
const selector = new PluginSelectorComponent(marketplaces.length, allPlugins, installedIds, {
|
|
1049
|
+
onSelect: async (name, marketplace) => {
|
|
1050
|
+
done();
|
|
1051
|
+
this.ctx.showStatus(`Installing ${name} from ${marketplace}...`);
|
|
1052
|
+
this.ctx.ui.requestRender();
|
|
1053
|
+
try {
|
|
1054
|
+
const force = installedIds.has(`${name}@${marketplace}`);
|
|
1055
|
+
await mgr.installPlugin(name, marketplace, { force });
|
|
1056
|
+
this.ctx.showStatus(`Installed ${name} from ${marketplace}`);
|
|
1057
|
+
} catch (err) {
|
|
1058
|
+
this.ctx.showStatus(`Install failed: ${err}`);
|
|
1059
|
+
}
|
|
1060
|
+
this.ctx.ui.requestRender();
|
|
1061
|
+
},
|
|
1062
|
+
onCancel: () => {
|
|
1063
|
+
done();
|
|
1064
|
+
this.ctx.ui.requestRender();
|
|
1065
|
+
},
|
|
1066
|
+
});
|
|
1067
|
+
return { component: selector, focus: selector.getSelectList() };
|
|
1068
|
+
});
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
showUserMessageSelector(): void {
|
|
1072
|
+
const userMessages = this.ctx.session.getUserMessagesForBranching();
|
|
1073
|
+
|
|
1074
|
+
if (userMessages.length === 0) {
|
|
1075
|
+
this.ctx.showStatus("No messages to branch from");
|
|
1076
|
+
return;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
this.showSelector(done => {
|
|
1080
|
+
const selector = new UserMessageSelectorComponent(
|
|
1081
|
+
userMessages.map(m => ({ id: m.entryId, text: m.text })),
|
|
1082
|
+
async entryId => {
|
|
1083
|
+
const result = await this.ctx.session.branch(entryId);
|
|
1084
|
+
if (result.cancelled) {
|
|
1085
|
+
// Hook cancelled the branch
|
|
1086
|
+
done();
|
|
1087
|
+
this.ctx.ui.requestRender();
|
|
1088
|
+
return;
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
this.ctx.chatContainer.clear();
|
|
1092
|
+
this.ctx.renderInitialMessages();
|
|
1093
|
+
this.ctx.editor.setText(result.selectedText);
|
|
1094
|
+
done();
|
|
1095
|
+
this.ctx.showStatus("Branched to new session");
|
|
1096
|
+
},
|
|
1097
|
+
() => {
|
|
1098
|
+
done();
|
|
1099
|
+
this.ctx.ui.requestRender();
|
|
1100
|
+
},
|
|
1101
|
+
);
|
|
1102
|
+
return { component: selector, focus: selector.getMessageList() };
|
|
1103
|
+
});
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
showTreeSelector(): void {
|
|
1107
|
+
const tree = this.ctx.sessionManager.getTree();
|
|
1108
|
+
const realLeafId = this.ctx.sessionManager.getLeafId();
|
|
1109
|
+
|
|
1110
|
+
if (tree.length === 0) {
|
|
1111
|
+
this.ctx.showStatus("No entries in session");
|
|
1112
|
+
return;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
this.showSelector(done => {
|
|
1116
|
+
const selector = new TreeSelectorComponent(
|
|
1117
|
+
tree,
|
|
1118
|
+
realLeafId,
|
|
1119
|
+
this.ctx.ui.terminal.rows,
|
|
1120
|
+
async entryId => {
|
|
1121
|
+
// Selecting the current leaf is a no-op (already there)
|
|
1122
|
+
if (entryId === realLeafId) {
|
|
1123
|
+
done();
|
|
1124
|
+
this.ctx.showStatus("Already at this point");
|
|
1125
|
+
return;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
// Ask about summarization
|
|
1129
|
+
done(); // Close selector first
|
|
1130
|
+
|
|
1131
|
+
// Loop until user makes a complete choice or cancels to tree
|
|
1132
|
+
let wantsSummary = false;
|
|
1133
|
+
let customInstructions: string | undefined;
|
|
1134
|
+
|
|
1135
|
+
const branchSummariesEnabled = settings.get("branchSummary.enabled");
|
|
1136
|
+
|
|
1137
|
+
while (branchSummariesEnabled) {
|
|
1138
|
+
const summaryChoice = await this.ctx.showHookSelector("Summarize branch?", [
|
|
1139
|
+
"No summary",
|
|
1140
|
+
"Summarize",
|
|
1141
|
+
"Summarize with custom prompt",
|
|
1142
|
+
]);
|
|
1143
|
+
|
|
1144
|
+
if (summaryChoice === undefined) {
|
|
1145
|
+
// User pressed escape - re-show tree selector
|
|
1146
|
+
this.showTreeSelector();
|
|
1147
|
+
return;
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
wantsSummary = summaryChoice !== "No summary";
|
|
1151
|
+
|
|
1152
|
+
if (summaryChoice === "Summarize with custom prompt") {
|
|
1153
|
+
customInstructions = await this.ctx.showHookEditor("Custom summarization instructions");
|
|
1154
|
+
if (customInstructions === undefined) {
|
|
1155
|
+
// User cancelled - loop back to summary selector
|
|
1156
|
+
continue;
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
// User made a complete choice
|
|
1161
|
+
break;
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
// Set up escape handler and loader if summarizing
|
|
1165
|
+
let summaryLoader: Loader | undefined;
|
|
1166
|
+
const originalOnEscape = this.ctx.editor.onEscape;
|
|
1167
|
+
|
|
1168
|
+
if (wantsSummary) {
|
|
1169
|
+
this.ctx.editor.onEscape = () => {
|
|
1170
|
+
this.ctx.session.abortBranchSummary();
|
|
1171
|
+
};
|
|
1172
|
+
this.ctx.chatContainer.addChild(new Spacer(1));
|
|
1173
|
+
summaryLoader = new Loader(
|
|
1174
|
+
this.ctx.ui,
|
|
1175
|
+
spinner => theme.fg("accent", spinner),
|
|
1176
|
+
text => theme.fg("muted", text),
|
|
1177
|
+
"Summarizing branch... (esc to cancel)",
|
|
1178
|
+
getSymbolTheme().spinnerFrames,
|
|
1179
|
+
);
|
|
1180
|
+
this.ctx.statusContainer.addChild(summaryLoader);
|
|
1181
|
+
this.ctx.ui.requestRender();
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
try {
|
|
1185
|
+
const result = await this.ctx.session.navigateTree(entryId, {
|
|
1186
|
+
summarize: wantsSummary,
|
|
1187
|
+
customInstructions,
|
|
1188
|
+
});
|
|
1189
|
+
|
|
1190
|
+
if (result.aborted) {
|
|
1191
|
+
// Summarization aborted - re-show tree selector
|
|
1192
|
+
this.ctx.showStatus("Branch summarization cancelled");
|
|
1193
|
+
this.showTreeSelector();
|
|
1194
|
+
return;
|
|
1195
|
+
}
|
|
1196
|
+
if (result.cancelled) {
|
|
1197
|
+
this.ctx.showStatus("Navigation cancelled");
|
|
1198
|
+
return;
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
// Update UI — pass the context built by navigateTree to skip a second O(N) walk.
|
|
1202
|
+
this.ctx.chatContainer.clear();
|
|
1203
|
+
this.ctx.renderInitialMessages(result.sessionContext);
|
|
1204
|
+
await this.ctx.reloadTodos();
|
|
1205
|
+
if (result.editorText && !this.ctx.editor.getText().trim()) {
|
|
1206
|
+
this.ctx.editor.setText(result.editorText);
|
|
1207
|
+
}
|
|
1208
|
+
this.ctx.showStatus("Navigated to selected point");
|
|
1209
|
+
} catch (error) {
|
|
1210
|
+
this.ctx.showError(error instanceof Error ? error.message : String(error));
|
|
1211
|
+
} finally {
|
|
1212
|
+
if (summaryLoader) {
|
|
1213
|
+
summaryLoader.stop();
|
|
1214
|
+
this.ctx.statusContainer.clear();
|
|
1215
|
+
}
|
|
1216
|
+
this.ctx.editor.onEscape = originalOnEscape;
|
|
1217
|
+
}
|
|
1218
|
+
},
|
|
1219
|
+
() => {
|
|
1220
|
+
done();
|
|
1221
|
+
this.ctx.ui.requestRender();
|
|
1222
|
+
},
|
|
1223
|
+
(entryId, label) => {
|
|
1224
|
+
this.ctx.sessionManager.appendLabelChange(entryId, label);
|
|
1225
|
+
this.ctx.ui.requestRender();
|
|
1226
|
+
},
|
|
1227
|
+
settings.get("treeFilterMode"),
|
|
1228
|
+
);
|
|
1229
|
+
return { component: selector, focus: selector };
|
|
1230
|
+
});
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
async showSessionSelector(): Promise<void> {
|
|
1234
|
+
const sessions = await SessionManager.list(
|
|
1235
|
+
this.ctx.sessionManager.getCwd(),
|
|
1236
|
+
this.ctx.sessionManager.getSessionDir(),
|
|
1237
|
+
);
|
|
1238
|
+
this.showSelector(done => {
|
|
1239
|
+
const selector = new SessionSelectorComponent(
|
|
1240
|
+
sessions,
|
|
1241
|
+
async sessionPath => {
|
|
1242
|
+
done();
|
|
1243
|
+
await this.handleResumeSession(sessionPath);
|
|
1244
|
+
},
|
|
1245
|
+
() => {
|
|
1246
|
+
done();
|
|
1247
|
+
this.ctx.ui.requestRender();
|
|
1248
|
+
},
|
|
1249
|
+
() => {
|
|
1250
|
+
void this.ctx.shutdown();
|
|
1251
|
+
},
|
|
1252
|
+
async (session: SessionInfo) => {
|
|
1253
|
+
if (!(await this.#detachActiveSessionBeforeDeletion(session.path))) {
|
|
1254
|
+
return false;
|
|
1255
|
+
}
|
|
1256
|
+
const storage = new FileSessionStorage();
|
|
1257
|
+
try {
|
|
1258
|
+
await storage.deleteSessionWithArtifacts(session.path);
|
|
1259
|
+
return true;
|
|
1260
|
+
} catch (err) {
|
|
1261
|
+
throw new Error(`Failed to delete session: ${err instanceof Error ? err.message : String(err)}`, {
|
|
1262
|
+
cause: err,
|
|
1263
|
+
});
|
|
1264
|
+
}
|
|
1265
|
+
},
|
|
1266
|
+
);
|
|
1267
|
+
selector.setOnRequestRender(() => this.ctx.ui.requestRender());
|
|
1268
|
+
return { component: selector, focus: selector };
|
|
1269
|
+
});
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
#clearTransientSessionUi(): void {
|
|
1273
|
+
if (this.ctx.loadingAnimation) {
|
|
1274
|
+
this.ctx.loadingAnimation.stop();
|
|
1275
|
+
this.ctx.loadingAnimation = undefined;
|
|
1276
|
+
}
|
|
1277
|
+
this.ctx.statusContainer.clear();
|
|
1278
|
+
this.ctx.pendingMessagesContainer.clear();
|
|
1279
|
+
this.ctx.compactionQueuedMessages = [];
|
|
1280
|
+
this.ctx.streamingComponent = undefined;
|
|
1281
|
+
this.ctx.streamingMessage = undefined;
|
|
1282
|
+
this.ctx.pendingTools.clear();
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
#refreshSessionTerminalTitle(): void {
|
|
1286
|
+
const sessionManager = this.ctx.sessionManager as {
|
|
1287
|
+
getSessionName?: () => string | undefined;
|
|
1288
|
+
getCwd: () => string;
|
|
1289
|
+
titleSource?: "auto" | "user" | undefined;
|
|
1290
|
+
};
|
|
1291
|
+
setSessionTerminalTitle(sessionManager.getSessionName?.(), sessionManager.getCwd());
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
async #detachActiveSessionBeforeDeletion(sessionPath: string): Promise<boolean> {
|
|
1295
|
+
const currentSessionFile = this.ctx.sessionManager.getSessionFile();
|
|
1296
|
+
if (currentSessionFile !== sessionPath) {
|
|
1297
|
+
return true;
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
const detached = await this.ctx.session.newSession();
|
|
1301
|
+
if (!detached) {
|
|
1302
|
+
return false;
|
|
1303
|
+
}
|
|
1304
|
+
this.#refreshSessionTerminalTitle();
|
|
1305
|
+
|
|
1306
|
+
this.#clearTransientSessionUi();
|
|
1307
|
+
this.ctx.statusLine.invalidate();
|
|
1308
|
+
this.ctx.statusLine.setSessionStartTime(Date.now());
|
|
1309
|
+
this.ctx.updateEditorTopBorder();
|
|
1310
|
+
this.ctx.updateEditorBorderColor();
|
|
1311
|
+
this.ctx.renderInitialMessages();
|
|
1312
|
+
await this.ctx.reloadTodos();
|
|
1313
|
+
this.ctx.ui.requestRender();
|
|
1314
|
+
return true;
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
async handleResumeByIdCommand(sessionArg: string): Promise<void> {
|
|
1318
|
+
const match = await resolveResumableSession(
|
|
1319
|
+
sessionArg,
|
|
1320
|
+
this.ctx.sessionManager.getCwd(),
|
|
1321
|
+
this.ctx.sessionManager.getSessionDir(),
|
|
1322
|
+
);
|
|
1323
|
+
if (!match) {
|
|
1324
|
+
this.ctx.showError(`No session matching "${sessionArg}". Use /resume to open the selector.`);
|
|
1325
|
+
return;
|
|
1326
|
+
}
|
|
1327
|
+
if (match.session.cwd !== this.ctx.sessionManager.getCwd()) {
|
|
1328
|
+
this.ctx.showError(
|
|
1329
|
+
`Session ${sessionArg} belongs to a different project (${match.session.cwd}). Run \`${APP_NAME} -r ${sessionArg}\` there.`,
|
|
1330
|
+
);
|
|
1331
|
+
return;
|
|
1332
|
+
}
|
|
1333
|
+
// Route through the interactive-mode wrapper so btw disposal and observer reset run.
|
|
1334
|
+
await this.ctx.handleResumeSession(match.session.path);
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
async handleResumeSession(sessionPath: string): Promise<void> {
|
|
1338
|
+
this.#clearTransientSessionUi();
|
|
1339
|
+
|
|
1340
|
+
// Switch session via AgentSession (emits hook and tool session events)
|
|
1341
|
+
await this.ctx.session.switchSession(sessionPath);
|
|
1342
|
+
this.#refreshSessionTerminalTitle();
|
|
1343
|
+
this.ctx.updateEditorBorderColor();
|
|
1344
|
+
|
|
1345
|
+
// Clear and re-render the chat
|
|
1346
|
+
this.ctx.chatContainer.clear();
|
|
1347
|
+
this.ctx.renderInitialMessages();
|
|
1348
|
+
await this.ctx.reloadTodos();
|
|
1349
|
+
this.ctx.showStatus("Resumed session");
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
async handleSessionDeleteCommand(): Promise<void> {
|
|
1353
|
+
const sessionFile = this.ctx.sessionManager.getSessionFile();
|
|
1354
|
+
if (!sessionFile) {
|
|
1355
|
+
this.ctx.showError("No session file to delete (in-memory session)");
|
|
1356
|
+
return;
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
// Check if session file exists (may not exist for brand new sessions)
|
|
1360
|
+
const storage = new FileSessionStorage();
|
|
1361
|
+
const fileExists = await storage.exists(sessionFile);
|
|
1362
|
+
if (!fileExists) {
|
|
1363
|
+
this.ctx.showError("Session has not been saved yet");
|
|
1364
|
+
return;
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
const confirmed = await this.ctx.showHookConfirm(
|
|
1368
|
+
"Delete Session",
|
|
1369
|
+
"This will permanently delete the current session.\nYou will be returned to the session selector.",
|
|
1370
|
+
);
|
|
1371
|
+
|
|
1372
|
+
if (!confirmed) {
|
|
1373
|
+
this.ctx.showStatus("Delete cancelled");
|
|
1374
|
+
return;
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
if (!(await this.#detachActiveSessionBeforeDeletion(sessionFile))) {
|
|
1378
|
+
this.ctx.showStatus("Delete cancelled");
|
|
1379
|
+
return;
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
// Delete the session file and artifacts directory
|
|
1383
|
+
await storage.deleteSessionWithArtifacts(sessionFile);
|
|
1384
|
+
|
|
1385
|
+
// Show session selector
|
|
1386
|
+
this.ctx.showStatus("Session deleted");
|
|
1387
|
+
await this.showSessionSelector();
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
async #handleOAuthLogin(providerId: string, opts?: { importLocal?: boolean }): Promise<void> {
|
|
1391
|
+
this.ctx.showStatus(`Logging in to ${providerId}…`);
|
|
1392
|
+
const manualInput = this.ctx.oauthManualInput;
|
|
1393
|
+
const useManualInput = CALLBACK_SERVER_PROVIDERS.has(providerId as OAuthProvider);
|
|
1394
|
+
try {
|
|
1395
|
+
await this.ctx.session.modelRegistry.authStorage.login(
|
|
1396
|
+
providerId as OAuthProvider,
|
|
1397
|
+
{
|
|
1398
|
+
onAuth: (info: { url: string; instructions?: string }) => {
|
|
1399
|
+
this.ctx.chatContainer.addChild(new Spacer(1));
|
|
1400
|
+
this.ctx.chatContainer.addChild(new Text(theme.fg("dim", info.url), 1, 0));
|
|
1401
|
+
const hyperlink = `\x1b]8;;${info.url}\x07Click here to login\x1b]8;;\x07`;
|
|
1402
|
+
this.ctx.chatContainer.addChild(new Text(theme.fg("accent", hyperlink), 1, 0));
|
|
1403
|
+
if (info.instructions) {
|
|
1404
|
+
this.ctx.chatContainer.addChild(new Spacer(1));
|
|
1405
|
+
this.ctx.chatContainer.addChild(new Text(theme.fg("warning", info.instructions), 1, 0));
|
|
1406
|
+
}
|
|
1407
|
+
if (useManualInput) {
|
|
1408
|
+
this.ctx.chatContainer.addChild(new Spacer(1));
|
|
1409
|
+
this.ctx.chatContainer.addChild(new Text(theme.fg("dim", MANUAL_LOGIN_TIP), 1, 0));
|
|
1410
|
+
}
|
|
1411
|
+
this.ctx.ui.requestRender();
|
|
1412
|
+
this.ctx.openInBrowser(info.url);
|
|
1413
|
+
},
|
|
1414
|
+
onPrompt: async (prompt: { message: string; placeholder?: string }) => {
|
|
1415
|
+
this.ctx.chatContainer.addChild(new Spacer(1));
|
|
1416
|
+
this.ctx.chatContainer.addChild(new Text(theme.fg("warning", prompt.message), 1, 0));
|
|
1417
|
+
if (prompt.placeholder) {
|
|
1418
|
+
this.ctx.chatContainer.addChild(new Text(theme.fg("dim", prompt.placeholder), 1, 0));
|
|
1419
|
+
}
|
|
1420
|
+
this.ctx.ui.requestRender();
|
|
1421
|
+
const { promise, resolve } = Promise.withResolvers<string>();
|
|
1422
|
+
const codeInput = new Input();
|
|
1423
|
+
codeInput.onSubmit = () => {
|
|
1424
|
+
const code = codeInput.getValue();
|
|
1425
|
+
this.ctx.editorContainer.clear();
|
|
1426
|
+
this.ctx.editorContainer.addChild(this.ctx.editor);
|
|
1427
|
+
this.ctx.ui.setFocus(this.ctx.editor);
|
|
1428
|
+
resolve(code);
|
|
1429
|
+
};
|
|
1430
|
+
this.ctx.editorContainer.clear();
|
|
1431
|
+
this.ctx.editorContainer.addChild(codeInput);
|
|
1432
|
+
this.ctx.ui.setFocus(codeInput);
|
|
1433
|
+
this.ctx.ui.requestRender();
|
|
1434
|
+
return promise;
|
|
1435
|
+
},
|
|
1436
|
+
onProgress: (message: string) => {
|
|
1437
|
+
this.ctx.chatContainer.addChild(new Text(theme.fg("dim", message), 1, 0));
|
|
1438
|
+
this.ctx.ui.requestRender();
|
|
1439
|
+
},
|
|
1440
|
+
onManualCodeInput: useManualInput ? () => manualInput.waitForInput(providerId) : undefined,
|
|
1441
|
+
},
|
|
1442
|
+
opts,
|
|
1443
|
+
);
|
|
1444
|
+
await this.ctx.session.modelRegistry.refresh();
|
|
1445
|
+
this.ctx.chatContainer.addChild(new Spacer(1));
|
|
1446
|
+
this.ctx.chatContainer.addChild(
|
|
1447
|
+
new Text(theme.fg("success", `${theme.status.success} Successfully logged in to ${providerId}`), 1, 0),
|
|
1448
|
+
);
|
|
1449
|
+
this.ctx.chatContainer.addChild(new Text(theme.fg("dim", `Credentials saved to ${getAgentDbPath()}`), 1, 0));
|
|
1450
|
+
this.ctx.ui.requestRender();
|
|
1451
|
+
} catch (error: unknown) {
|
|
1452
|
+
this.ctx.showError(`Login failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
1453
|
+
} finally {
|
|
1454
|
+
if (useManualInput) {
|
|
1455
|
+
manualInput.clear(`Manual OAuth input cleared for ${providerId}`);
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
async #handleOAuthLogout(providerId: string): Promise<void> {
|
|
1461
|
+
try {
|
|
1462
|
+
await this.ctx.session.modelRegistry.authStorage.logout(providerId);
|
|
1463
|
+
await this.ctx.session.modelRegistry.refresh();
|
|
1464
|
+
this.ctx.chatContainer.addChild(new Spacer(1));
|
|
1465
|
+
this.ctx.chatContainer.addChild(
|
|
1466
|
+
new Text(theme.fg("success", `${theme.status.success} Successfully logged out of ${providerId}`), 1, 0),
|
|
1467
|
+
);
|
|
1468
|
+
this.ctx.chatContainer.addChild(
|
|
1469
|
+
new Text(theme.fg("dim", `Credentials removed from ${getAgentDbPath()}`), 1, 0),
|
|
1470
|
+
);
|
|
1471
|
+
this.ctx.ui.requestRender();
|
|
1472
|
+
} catch (error: unknown) {
|
|
1473
|
+
this.ctx.showError(`Logout failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
async showOAuthSelector(
|
|
1478
|
+
mode: "login" | "logout",
|
|
1479
|
+
providerId?: string,
|
|
1480
|
+
opts?: { importLocal?: boolean },
|
|
1481
|
+
): Promise<void> {
|
|
1482
|
+
if (providerId) {
|
|
1483
|
+
const resolvedProviderId = resolveOAuthProviderId(providerId);
|
|
1484
|
+
if (!resolvedProviderId) {
|
|
1485
|
+
this.ctx.showError(`Unknown OAuth provider: ${providerId}`);
|
|
1486
|
+
return;
|
|
1487
|
+
}
|
|
1488
|
+
if (mode === "login") {
|
|
1489
|
+
await this.#handleOAuthLogin(resolvedProviderId, opts);
|
|
1490
|
+
} else {
|
|
1491
|
+
await this.#handleOAuthLogout(resolvedProviderId);
|
|
1492
|
+
}
|
|
1493
|
+
return;
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
if (mode === "logout") {
|
|
1497
|
+
await this.#refreshOAuthProviderAuthState();
|
|
1498
|
+
const oauthProviders = getOAuthProviders();
|
|
1499
|
+
const loggedInProviders = oauthProviders.filter(provider =>
|
|
1500
|
+
this.ctx.session.modelRegistry.authStorage.hasAuth(provider.id),
|
|
1501
|
+
);
|
|
1502
|
+
if (loggedInProviders.length === 0) {
|
|
1503
|
+
this.ctx.showStatus("No OAuth providers logged in. Use /login first.");
|
|
1504
|
+
return;
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1508
|
+
this.showSelector(done => {
|
|
1509
|
+
let selector: OAuthSelectorComponent;
|
|
1510
|
+
selector = new OAuthSelectorComponent(
|
|
1511
|
+
mode,
|
|
1512
|
+
this.ctx.session.modelRegistry.authStorage,
|
|
1513
|
+
async (selectedProviderId: string) => {
|
|
1514
|
+
selector.stopValidation();
|
|
1515
|
+
done();
|
|
1516
|
+
if (mode === "login") {
|
|
1517
|
+
await this.#handleOAuthLogin(selectedProviderId);
|
|
1518
|
+
} else {
|
|
1519
|
+
await this.#handleOAuthLogout(selectedProviderId);
|
|
1520
|
+
}
|
|
1521
|
+
},
|
|
1522
|
+
() => {
|
|
1523
|
+
selector.stopValidation();
|
|
1524
|
+
done();
|
|
1525
|
+
this.ctx.ui.requestRender();
|
|
1526
|
+
},
|
|
1527
|
+
{
|
|
1528
|
+
validateAuth: async (selectedProviderId: string) => {
|
|
1529
|
+
const apiKey = await this.ctx.session.modelRegistry.getApiKeyForProvider(
|
|
1530
|
+
selectedProviderId,
|
|
1531
|
+
this.ctx.session.sessionId,
|
|
1532
|
+
);
|
|
1533
|
+
return !!apiKey;
|
|
1534
|
+
},
|
|
1535
|
+
requestRender: () => {
|
|
1536
|
+
this.ctx.ui.requestRender();
|
|
1537
|
+
},
|
|
1538
|
+
},
|
|
1539
|
+
);
|
|
1540
|
+
return { component: selector, focus: selector };
|
|
1541
|
+
});
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
showDebugSelector(): void {
|
|
1545
|
+
this.showSelector(done => {
|
|
1546
|
+
const selector = new DebugSelectorComponent(this.ctx, done);
|
|
1547
|
+
return { component: selector, focus: selector };
|
|
1548
|
+
});
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
showSessionObserver(registry: SessionObserverRegistry): void {
|
|
1552
|
+
const observeKeys = this.ctx.keybindings.getKeys("app.session.observe");
|
|
1553
|
+
let cleanup: (() => void) | undefined;
|
|
1554
|
+
let overlayHandle: OverlayHandle | undefined;
|
|
1555
|
+
|
|
1556
|
+
const done = () => {
|
|
1557
|
+
cleanup?.();
|
|
1558
|
+
overlayHandle?.hide();
|
|
1559
|
+
this.ctx.ui.requestRender();
|
|
1560
|
+
};
|
|
1561
|
+
|
|
1562
|
+
const selector = new SessionObserverOverlayComponent(registry, done, observeKeys);
|
|
1563
|
+
|
|
1564
|
+
cleanup = registry.onChange(() => {
|
|
1565
|
+
selector.refreshFromRegistry();
|
|
1566
|
+
this.ctx.ui.requestRender();
|
|
1567
|
+
});
|
|
1568
|
+
|
|
1569
|
+
overlayHandle = this.ctx.ui.showOverlay(selector, {
|
|
1570
|
+
anchor: "bottom-center",
|
|
1571
|
+
width: "100%",
|
|
1572
|
+
maxHeight: "100%",
|
|
1573
|
+
margin: 0,
|
|
1574
|
+
});
|
|
1575
|
+
this.ctx.ui.setFocus(selector);
|
|
1576
|
+
this.ctx.ui.requestRender();
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1579
|
+
/**
|
|
1580
|
+
* Jobs overlay: navigate ongoing monitor + cron jobs (Monitors then Crons,
|
|
1581
|
+
* newest-first), drill into per-type detail, and cancel/delete with a y/N
|
|
1582
|
+
* confirm. Built from nested SelectLists (list -> detail -> confirm) so focus
|
|
1583
|
+
* stays on the active SelectList.
|
|
1584
|
+
*/
|
|
1585
|
+
showJobsOverlay(observer: JobsObserver): void {
|
|
1586
|
+
let overlay: JobsOverlayComponent | undefined;
|
|
1587
|
+
const close = () => {
|
|
1588
|
+
this.ctx.editorContainer.clear();
|
|
1589
|
+
this.ctx.editorContainer.addChild(this.ctx.editor);
|
|
1590
|
+
this.ctx.ui.setFocus(this.ctx.editor);
|
|
1591
|
+
this.ctx.ui.requestRender();
|
|
1592
|
+
};
|
|
1593
|
+
overlay = new JobsOverlayComponent(observer, {
|
|
1594
|
+
close,
|
|
1595
|
+
requestRender: () => {
|
|
1596
|
+
if (overlay) this.ctx.ui.setFocus(overlay.getFocus());
|
|
1597
|
+
this.ctx.ui.requestRender();
|
|
1598
|
+
},
|
|
1599
|
+
});
|
|
1600
|
+
this.ctx.editorContainer.clear();
|
|
1601
|
+
this.ctx.editorContainer.addChild(overlay);
|
|
1602
|
+
this.ctx.ui.setFocus(overlay.getFocus());
|
|
1603
|
+
this.ctx.ui.requestRender();
|
|
1604
|
+
}
|
|
1605
|
+
}
|