@oh-my-pi/pi-coding-agent 16.3.6 → 16.3.7
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 +60 -0
- package/dist/cli.js +3052 -3037
- package/dist/types/advisor/index.d.ts +6 -6
- package/dist/types/advisor/runtime.d.ts +1 -1
- package/dist/types/advisor/watchdog.d.ts +1 -1
- package/dist/types/async/index.d.ts +1 -1
- package/dist/types/auto-thinking/classifier.d.ts +2 -2
- package/dist/types/autolearn/controller.d.ts +2 -2
- package/dist/types/autoresearch/dashboard.d.ts +2 -2
- package/dist/types/autoresearch/git.d.ts +1 -1
- package/dist/types/autoresearch/helpers.d.ts +1 -1
- package/dist/types/autoresearch/index.d.ts +1 -1
- package/dist/types/autoresearch/state.d.ts +3 -3
- package/dist/types/autoresearch/storage.d.ts +1 -1
- package/dist/types/autoresearch/tools/init-experiment.d.ts +2 -2
- package/dist/types/autoresearch/tools/log-experiment.d.ts +2 -2
- package/dist/types/autoresearch/tools/run-experiment.d.ts +2 -2
- package/dist/types/autoresearch/tools/update-notes.d.ts +2 -2
- package/dist/types/autoresearch/types.d.ts +3 -3
- package/dist/types/capability/context-file.d.ts +2 -2
- package/dist/types/capability/extension-module.d.ts +2 -2
- package/dist/types/capability/extension.d.ts +3 -3
- package/dist/types/capability/hook.d.ts +2 -2
- package/dist/types/capability/index.d.ts +3 -3
- package/dist/types/capability/instruction.d.ts +2 -2
- package/dist/types/capability/mcp.d.ts +2 -2
- package/dist/types/capability/prompt.d.ts +2 -2
- package/dist/types/capability/rule-buckets.d.ts +2 -2
- package/dist/types/capability/rule.d.ts +2 -2
- package/dist/types/capability/settings.d.ts +2 -2
- package/dist/types/capability/skill.d.ts +2 -2
- package/dist/types/capability/slash-command.d.ts +2 -2
- package/dist/types/capability/ssh.d.ts +2 -2
- package/dist/types/capability/system-prompt.d.ts +2 -2
- package/dist/types/capability/tool.d.ts +2 -2
- package/dist/types/cli/args.d.ts +1 -1
- package/dist/types/cli/bench-cli.d.ts +2 -2
- package/dist/types/cli/dry-balance-cli.d.ts +1 -1
- package/dist/types/cli/extension-flags.d.ts +1 -1
- package/dist/types/cli/flag-tables.d.ts +2 -2
- package/dist/types/cli/gallery-cli.d.ts +1 -1
- package/dist/types/cli/gallery-fixtures/agentic.d.ts +1 -1
- package/dist/types/cli/gallery-fixtures/codeintel.d.ts +1 -1
- package/dist/types/cli/gallery-fixtures/edit.d.ts +1 -1
- package/dist/types/cli/gallery-fixtures/fs.d.ts +1 -1
- package/dist/types/cli/gallery-fixtures/index.d.ts +2 -2
- package/dist/types/cli/gallery-fixtures/interaction.d.ts +1 -1
- package/dist/types/cli/gallery-fixtures/memory.d.ts +1 -1
- package/dist/types/cli/gallery-fixtures/misc.d.ts +1 -1
- package/dist/types/cli/gallery-fixtures/search.d.ts +1 -1
- package/dist/types/cli/gallery-fixtures/shell.d.ts +1 -1
- package/dist/types/cli/gallery-fixtures/types.d.ts +1 -1
- package/dist/types/cli/gallery-fixtures/web.d.ts +1 -1
- package/dist/types/cli/gallery-screenshot.d.ts +1 -1
- package/dist/types/cli/initial-message.d.ts +1 -1
- package/dist/types/cli/models-cli.d.ts +1 -1
- package/dist/types/cli/plugin-cli.d.ts +1 -1
- package/dist/types/cli/session-picker.d.ts +1 -1
- package/dist/types/cli/startup-cwd.d.ts +1 -1
- package/dist/types/cli/tiny-models-cli.d.ts +1 -1
- package/dist/types/cli/web-search-cli.d.ts +1 -1
- package/dist/types/collab/crypto.d.ts +1 -1
- package/dist/types/collab/display-name.d.ts +1 -1
- package/dist/types/collab/guest.d.ts +4 -4
- package/dist/types/collab/host.d.ts +2 -2
- package/dist/types/collab/protocol.d.ts +3 -3
- package/dist/types/collab/relay-client.d.ts +1 -1
- package/dist/types/commands/auth-broker.d.ts +1 -1
- package/dist/types/commands/auth-gateway.d.ts +1 -1
- package/dist/types/commands/config.d.ts +1 -1
- package/dist/types/commands/plugin.d.ts +1 -1
- package/dist/types/commands/setup.d.ts +2 -2
- package/dist/types/commands/ssh.d.ts +1 -1
- package/dist/types/commands/tiny-models.d.ts +1 -1
- package/dist/types/commands/ttsr.d.ts +2 -2
- package/dist/types/commit/agentic/agent.d.ts +4 -4
- package/dist/types/commit/agentic/fallback.d.ts +2 -2
- package/dist/types/commit/agentic/index.d.ts +1 -1
- package/dist/types/commit/agentic/state.d.ts +1 -1
- package/dist/types/commit/agentic/tools/analyze-file.d.ts +5 -5
- package/dist/types/commit/agentic/tools/git-file-diff.d.ts +2 -2
- package/dist/types/commit/agentic/tools/git-hunk.d.ts +1 -1
- package/dist/types/commit/agentic/tools/git-overview.d.ts +2 -2
- package/dist/types/commit/agentic/tools/index.d.ts +5 -5
- package/dist/types/commit/agentic/tools/propose-changelog.d.ts +2 -2
- package/dist/types/commit/agentic/tools/propose-commit.d.ts +2 -2
- package/dist/types/commit/agentic/tools/recent-commits.d.ts +1 -1
- package/dist/types/commit/agentic/tools/split-commit.d.ts +2 -2
- package/dist/types/commit/agentic/topo-sort.d.ts +1 -1
- package/dist/types/commit/agentic/trivial.d.ts +1 -1
- package/dist/types/commit/agentic/validation.d.ts +1 -1
- package/dist/types/commit/analysis/conventional.d.ts +1 -1
- package/dist/types/commit/analysis/index.d.ts +4 -4
- package/dist/types/commit/analysis/scope.d.ts +1 -1
- package/dist/types/commit/analysis/summary.d.ts +1 -1
- package/dist/types/commit/analysis/validation.d.ts +1 -1
- package/dist/types/commit/changelog/detect.d.ts +1 -1
- package/dist/types/commit/changelog/generate.d.ts +1 -1
- package/dist/types/commit/changelog/parse.d.ts +1 -1
- package/dist/types/commit/cli.d.ts +1 -1
- package/dist/types/commit/git/diff.d.ts +1 -1
- package/dist/types/commit/index.d.ts +1 -1
- package/dist/types/commit/map-reduce/index.d.ts +1 -1
- package/dist/types/commit/map-reduce/map-phase.d.ts +1 -1
- package/dist/types/commit/map-reduce/reduce-phase.d.ts +1 -1
- package/dist/types/commit/message.d.ts +1 -1
- package/dist/types/commit/model-selection.d.ts +3 -3
- package/dist/types/commit/pipeline.d.ts +1 -1
- package/dist/types/commit/shared-llm.d.ts +1 -1
- package/dist/types/commit/utils.d.ts +1 -1
- package/dist/types/config/model-discovery.d.ts +1 -1
- package/dist/types/config/model-registry.d.ts +3 -3
- package/dist/types/config/model-resolver.d.ts +4 -4
- package/dist/types/config/model-roles.d.ts +2 -2
- package/dist/types/config/models-config.d.ts +2 -2
- package/dist/types/config/service-tier.d.ts +1 -1
- package/dist/types/config/settings-schema.d.ts +7 -13
- package/dist/types/config/settings.d.ts +7 -7
- package/dist/types/config.d.ts +1 -1
- package/dist/types/dap/client.d.ts +1 -1
- package/dist/types/dap/config.d.ts +1 -1
- package/dist/types/dap/index.d.ts +4 -4
- package/dist/types/dap/session.d.ts +3 -3
- package/dist/types/debug/index.d.ts +1 -1
- package/dist/types/debug/log-viewer.d.ts +1 -1
- package/dist/types/debug/raw-sse.d.ts +1 -1
- package/dist/types/debug/report-bundle.d.ts +1 -1
- package/dist/types/discovery/agents.d.ts +1 -1
- package/dist/types/discovery/helpers.d.ts +4 -4
- package/dist/types/discovery/index.d.ts +47 -47
- package/dist/types/discovery/omp-extension-roots.d.ts +1 -1
- package/dist/types/edit/apply-patch/index.d.ts +2 -2
- package/dist/types/edit/apply-patch/parser.d.ts +1 -1
- package/dist/types/edit/diff.d.ts +1 -1
- package/dist/types/edit/hashline/execute.d.ts +4 -4
- package/dist/types/edit/hashline/filesystem.d.ts +3 -3
- package/dist/types/edit/hashline/index.d.ts +5 -5
- package/dist/types/edit/index.d.ts +19 -19
- package/dist/types/edit/modes/apply-patch.d.ts +1 -1
- package/dist/types/edit/modes/patch.d.ts +3 -3
- package/dist/types/edit/modes/replace.d.ts +3 -3
- package/dist/types/edit/renderer.d.ts +15 -15
- package/dist/types/edit/snapshot-details.d.ts +1 -1
- package/dist/types/edit/streaming.d.ts +2 -2
- package/dist/types/eval/agent-bridge.d.ts +4 -4
- package/dist/types/eval/backend-helpers.d.ts +3 -3
- package/dist/types/eval/backend.d.ts +2 -2
- package/dist/types/eval/bridge-timeout.d.ts +1 -1
- package/dist/types/eval/budget-bridge.d.ts +2 -2
- package/dist/types/eval/completion-bridge.d.ts +2 -2
- package/dist/types/eval/concurrency-bridge.d.ts +2 -2
- package/dist/types/eval/executor-base.d.ts +3 -3
- package/dist/types/eval/index.d.ts +6 -6
- package/dist/types/eval/jl/executor.d.ts +4 -4
- package/dist/types/eval/jl/index.d.ts +2 -2
- package/dist/types/eval/jl/kernel.d.ts +5 -5
- package/dist/types/eval/js/context-manager.d.ts +4 -4
- package/dist/types/eval/js/executor.d.ts +3 -3
- package/dist/types/eval/js/index.d.ts +2 -2
- package/dist/types/eval/js/shared/helpers.d.ts +1 -1
- package/dist/types/eval/js/shared/runtime.d.ts +2 -2
- package/dist/types/eval/js/tool-bridge.d.ts +5 -5
- package/dist/types/eval/js/worker-core.d.ts +1 -1
- package/dist/types/eval/js/worker-protocol.d.ts +2 -2
- package/dist/types/eval/kernel-base.d.ts +1 -1
- package/dist/types/eval/py/executor.d.ts +3 -3
- package/dist/types/eval/py/index.d.ts +2 -2
- package/dist/types/eval/py/kernel.d.ts +5 -5
- package/dist/types/eval/py/tool-bridge.d.ts +2 -2
- package/dist/types/eval/rb/executor.d.ts +3 -3
- package/dist/types/eval/rb/index.d.ts +2 -2
- package/dist/types/eval/rb/kernel.d.ts +6 -6
- package/dist/types/eval/session-id.d.ts +1 -1
- package/dist/types/eval/types.d.ts +1 -1
- package/dist/types/exa/index.d.ts +2 -2
- package/dist/types/exa/mcp-client.d.ts +3 -3
- package/dist/types/exec/bash-executor.d.ts +1 -1
- package/dist/types/export/html/index.d.ts +2 -2
- package/dist/types/export/share.d.ts +3 -3
- package/dist/types/export/ttsr.d.ts +2 -2
- package/dist/types/extensibility/custom-commands/bundled/ci-green/index.d.ts +2 -2
- package/dist/types/extensibility/custom-commands/bundled/review/index.d.ts +2 -2
- package/dist/types/extensibility/custom-commands/index.d.ts +2 -2
- package/dist/types/extensibility/custom-commands/loader.d.ts +1 -1
- package/dist/types/extensibility/custom-commands/types.d.ts +3 -3
- package/dist/types/extensibility/custom-tools/index.d.ts +3 -3
- package/dist/types/extensibility/custom-tools/loader.d.ts +3 -3
- package/dist/types/extensibility/custom-tools/types.d.ts +12 -12
- package/dist/types/extensibility/custom-tools/wrapper.d.ts +2 -2
- package/dist/types/extensibility/extensions/compact-handler.d.ts +1 -1
- package/dist/types/extensibility/extensions/get-commands-handler.d.ts +5 -5
- package/dist/types/extensibility/extensions/index.d.ts +5 -5
- package/dist/types/extensibility/extensions/loader.d.ts +2 -2
- package/dist/types/extensibility/extensions/model-api.d.ts +3 -3
- package/dist/types/extensibility/extensions/runner.d.ts +6 -6
- package/dist/types/extensibility/extensions/types.d.ts +43 -31
- package/dist/types/extensibility/extensions/wrapper.d.ts +2 -2
- package/dist/types/extensibility/hooks/index.d.ts +6 -6
- package/dist/types/extensibility/hooks/loader.d.ts +4 -4
- package/dist/types/extensibility/hooks/runner.d.ts +5 -5
- package/dist/types/extensibility/hooks/tool-wrapper.d.ts +1 -1
- package/dist/types/extensibility/hooks/types.d.ts +18 -18
- package/dist/types/extensibility/legacy-pi-ai-shim.d.ts +12 -4
- package/dist/types/extensibility/legacy-pi-coding-agent-shim.d.ts +194 -5
- package/dist/types/extensibility/plugins/doctor.d.ts +1 -1
- package/dist/types/extensibility/plugins/index.d.ts +7 -7
- package/dist/types/extensibility/plugins/installer.d.ts +1 -1
- package/dist/types/extensibility/plugins/legacy-pi-compat.d.ts +1 -1
- package/dist/types/extensibility/plugins/loader.d.ts +1 -1
- package/dist/types/extensibility/plugins/manager.d.ts +1 -1
- package/dist/types/extensibility/plugins/marketplace/fetcher.d.ts +1 -1
- package/dist/types/extensibility/plugins/marketplace/index.d.ts +6 -6
- package/dist/types/extensibility/plugins/marketplace/manager.d.ts +1 -1
- package/dist/types/extensibility/plugins/marketplace/registry.d.ts +1 -1
- package/dist/types/extensibility/plugins/marketplace/source-resolver.d.ts +1 -1
- package/dist/types/extensibility/plugins/runtime-config.d.ts +1 -1
- package/dist/types/extensibility/session-handler-types.d.ts +1 -1
- package/dist/types/extensibility/shared-events.d.ts +4 -4
- package/dist/types/extensibility/skills.d.ts +3 -3
- package/dist/types/extensibility/slash-commands.d.ts +1 -1
- package/dist/types/extensibility/typebox.d.ts +1 -1
- package/dist/types/extensibility/utils.d.ts +1 -1
- package/dist/types/goals/guided-setup.d.ts +1 -1
- package/dist/types/goals/index.d.ts +3 -3
- package/dist/types/goals/runtime.d.ts +1 -1
- package/dist/types/goals/state.d.ts +1 -1
- package/dist/types/goals/tools/goal-tool.d.ts +4 -4
- package/dist/types/hindsight/backend.d.ts +2 -2
- package/dist/types/hindsight/bank.d.ts +2 -2
- package/dist/types/hindsight/client.d.ts +1 -1
- package/dist/types/hindsight/config.d.ts +1 -1
- package/dist/types/hindsight/index.d.ts +8 -8
- package/dist/types/hindsight/mental-models.d.ts +3 -3
- package/dist/types/hindsight/state.d.ts +5 -5
- package/dist/types/hindsight/transcript.d.ts +2 -2
- package/dist/types/index.d.ts +38 -38
- package/dist/types/internal-urls/agent-protocol.d.ts +1 -1
- package/dist/types/internal-urls/artifact-protocol.d.ts +1 -1
- package/dist/types/internal-urls/filesystem-resource.d.ts +1 -1
- package/dist/types/internal-urls/history-protocol.d.ts +1 -1
- package/dist/types/internal-urls/index.d.ts +16 -16
- package/dist/types/internal-urls/issue-pr-protocol.d.ts +1 -1
- package/dist/types/internal-urls/local-protocol.d.ts +1 -1
- package/dist/types/internal-urls/mcp-protocol.d.ts +1 -1
- package/dist/types/internal-urls/memory-protocol.d.ts +1 -1
- package/dist/types/internal-urls/omp-protocol.d.ts +1 -1
- package/dist/types/internal-urls/parse.d.ts +1 -1
- package/dist/types/internal-urls/router.d.ts +1 -1
- package/dist/types/internal-urls/rule-protocol.d.ts +1 -1
- package/dist/types/internal-urls/skill-protocol.d.ts +1 -1
- package/dist/types/internal-urls/ssh-protocol.d.ts +1 -1
- package/dist/types/internal-urls/types.d.ts +2 -2
- package/dist/types/internal-urls/vault-protocol.d.ts +1 -1
- package/dist/types/irc/bus.d.ts +2 -2
- package/dist/types/lib/xai-http.d.ts +1 -1
- package/dist/types/lsp/client.d.ts +23 -1
- package/dist/types/lsp/clients/biome-client.d.ts +1 -1
- package/dist/types/lsp/clients/index.d.ts +4 -4
- package/dist/types/lsp/clients/lsp-linter-client.d.ts +1 -1
- package/dist/types/lsp/clients/swiftlint-client.d.ts +1 -1
- package/dist/types/lsp/config.d.ts +1 -1
- package/dist/types/lsp/diagnostics-ledger.d.ts +1 -1
- package/dist/types/lsp/edits.d.ts +1 -1
- package/dist/types/lsp/index.d.ts +6 -6
- package/dist/types/lsp/render.d.ts +2 -2
- package/dist/types/lsp/startup-events.d.ts +1 -1
- package/dist/types/lsp/utils.d.ts +2 -2
- package/dist/types/main.d.ts +12 -12
- package/dist/types/markit/converters/docx.d.ts +1 -1
- package/dist/types/markit/converters/epub.d.ts +1 -1
- package/dist/types/markit/converters/pdf/columns.d.ts +1 -1
- package/dist/types/markit/converters/pdf/extract.d.ts +1 -1
- package/dist/types/markit/converters/pdf/grid.d.ts +1 -1
- package/dist/types/markit/converters/pdf/headers.d.ts +1 -1
- package/dist/types/markit/converters/pdf/index.d.ts +1 -1
- package/dist/types/markit/converters/pdf/render.d.ts +1 -1
- package/dist/types/markit/converters/pptx.d.ts +1 -1
- package/dist/types/markit/converters/xlsx.d.ts +1 -1
- package/dist/types/markit/index.d.ts +2 -2
- package/dist/types/markit/registry.d.ts +1 -1
- package/dist/types/mcp/client.d.ts +1 -1
- package/dist/types/mcp/config-writer.d.ts +1 -1
- package/dist/types/mcp/config.d.ts +2 -2
- package/dist/types/mcp/index.d.ts +12 -12
- package/dist/types/mcp/loader.d.ts +5 -5
- package/dist/types/mcp/manager.d.ts +7 -7
- package/dist/types/mcp/oauth-credentials.d.ts +3 -3
- package/dist/types/mcp/oauth-flow.d.ts +1 -1
- package/dist/types/mcp/render.d.ts +3 -3
- package/dist/types/mcp/smithery-registry.d.ts +1 -1
- package/dist/types/mcp/tool-bridge.d.ts +5 -5
- package/dist/types/mcp/tool-cache.d.ts +2 -2
- package/dist/types/mcp/transports/http.d.ts +1 -1
- package/dist/types/mcp/transports/index.d.ts +3 -3
- package/dist/types/mcp/transports/sse.d.ts +1 -1
- package/dist/types/mcp/transports/stdio.d.ts +1 -1
- package/dist/types/mcp/types.d.ts +1 -1
- package/dist/types/memories/index.d.ts +4 -4
- package/dist/types/memory-backend/index.d.ts +7 -7
- package/dist/types/memory-backend/local-backend.d.ts +1 -1
- package/dist/types/memory-backend/off-backend.d.ts +1 -1
- package/dist/types/memory-backend/resolve.d.ts +2 -2
- package/dist/types/memory-backend/runtime.d.ts +2 -2
- package/dist/types/memory-backend/types.d.ts +5 -5
- package/dist/types/mnemopi/backend.d.ts +2 -2
- package/dist/types/mnemopi/config.d.ts +1 -1
- package/dist/types/mnemopi/embed-client.d.ts +2 -2
- package/dist/types/mnemopi/embed-worker.d.ts +1 -1
- package/dist/types/mnemopi/index.d.ts +3 -3
- package/dist/types/mnemopi/state.d.ts +38 -2
- package/dist/types/modes/acp/acp-agent.d.ts +2 -2
- package/dist/types/modes/acp/acp-client-bridge.d.ts +1 -1
- package/dist/types/modes/acp/acp-event-mapper.d.ts +1 -1
- package/dist/types/modes/acp/acp-mode.d.ts +1 -1
- package/dist/types/modes/acp/index.d.ts +2 -2
- package/dist/types/modes/components/advisor-config.d.ts +3 -3
- package/dist/types/modes/components/advisor-message.d.ts +2 -2
- package/dist/types/modes/components/agent-dashboard.d.ts +2 -2
- package/dist/types/modes/components/agent-hub.d.ts +11 -9
- package/dist/types/modes/components/agent-transcript-viewer.d.ts +6 -6
- package/dist/types/modes/components/assistant-message.d.ts +2 -2
- package/dist/types/modes/components/background-tan-message.d.ts +2 -2
- package/dist/types/modes/components/bash-execution.d.ts +1 -1
- package/dist/types/modes/components/bordered-loader.d.ts +1 -1
- package/dist/types/modes/components/chat-transcript-builder.d.ts +3 -3
- package/dist/types/modes/components/collab-prompt-message.d.ts +2 -2
- package/dist/types/modes/components/compaction-summary-message.d.ts +1 -1
- package/dist/types/modes/components/copy-selector.d.ts +1 -1
- package/dist/types/modes/components/custom-editor.d.ts +1 -1
- package/dist/types/modes/components/custom-message.d.ts +2 -2
- package/dist/types/modes/components/eval-execution.d.ts +1 -1
- package/dist/types/modes/components/execution-shared.d.ts +1 -1
- package/dist/types/modes/components/extensions/extension-dashboard.d.ts +2 -2
- package/dist/types/modes/components/extensions/extension-list.d.ts +1 -1
- package/dist/types/modes/components/extensions/index.d.ts +5 -5
- package/dist/types/modes/components/extensions/inspector-panel.d.ts +1 -1
- package/dist/types/modes/components/extensions/state-manager.d.ts +1 -1
- package/dist/types/modes/components/extensions/types.d.ts +1 -1
- package/dist/types/modes/components/footer.d.ts +1 -1
- package/dist/types/modes/components/history-search.d.ts +1 -1
- package/dist/types/modes/components/hook-message.d.ts +2 -2
- package/dist/types/modes/components/index.d.ts +38 -38
- package/dist/types/modes/components/keybinding-hints.d.ts +1 -1
- package/dist/types/modes/components/logout-account-selector.d.ts +1 -1
- package/dist/types/modes/components/mcp-add-wizard.d.ts +1 -1
- package/dist/types/modes/components/message-frame.d.ts +1 -1
- package/dist/types/modes/components/model-selector.d.ts +3 -3
- package/dist/types/modes/components/oauth-selector.d.ts +1 -1
- package/dist/types/modes/components/plan-review-overlay.d.ts +1 -1
- package/dist/types/modes/components/plugin-settings.d.ts +3 -3
- package/dist/types/modes/components/read-tool-group.d.ts +1 -1
- package/dist/types/modes/components/reset-usage-selector.d.ts +1 -1
- package/dist/types/modes/components/segment-track.d.ts +1 -1
- package/dist/types/modes/components/session-selector.d.ts +1 -1
- package/dist/types/modes/components/settings-defs.d.ts +1 -1
- package/dist/types/modes/components/settings-selector.d.ts +2 -2
- package/dist/types/modes/components/skill-message.d.ts +1 -1
- package/dist/types/modes/components/status-line/component.d.ts +2 -2
- package/dist/types/modes/components/status-line/context-thresholds.d.ts +1 -1
- package/dist/types/modes/components/status-line/index.d.ts +5 -5
- package/dist/types/modes/components/status-line/presets.d.ts +1 -1
- package/dist/types/modes/components/status-line/segments.d.ts +2 -2
- package/dist/types/modes/components/status-line/separators.d.ts +2 -2
- package/dist/types/modes/components/status-line/types.d.ts +8 -4
- package/dist/types/modes/components/tiny-title-download-progress.d.ts +2 -2
- package/dist/types/modes/components/todo-reminder.d.ts +1 -1
- package/dist/types/modes/components/tool-execution.d.ts +1 -1
- package/dist/types/modes/components/tree-selector.d.ts +2 -2
- package/dist/types/modes/components/ttsr-notification.d.ts +1 -1
- package/dist/types/modes/controllers/btw-controller.d.ts +1 -1
- package/dist/types/modes/controllers/command-controller-shared.d.ts +2 -2
- package/dist/types/modes/controllers/command-controller.d.ts +7 -7
- package/dist/types/modes/controllers/event-controller.d.ts +3 -3
- package/dist/types/modes/controllers/extension-ui-controller.d.ts +5 -5
- package/dist/types/modes/controllers/extension-ui-controller.test.d.ts +1 -0
- package/dist/types/modes/controllers/input-controller.d.ts +2 -2
- package/dist/types/modes/controllers/mcp-command-controller.d.ts +1 -1
- package/dist/types/modes/controllers/omfg-controller.d.ts +1 -1
- package/dist/types/modes/controllers/omfg-rule.d.ts +1 -1
- package/dist/types/modes/controllers/selector-controller.d.ts +2 -2
- package/dist/types/modes/controllers/session-focus-controller.d.ts +4 -4
- package/dist/types/modes/controllers/ssh-command-controller.d.ts +1 -1
- package/dist/types/modes/controllers/streaming-reveal.d.ts +11 -3
- package/dist/types/modes/controllers/tan-command-controller.d.ts +1 -1
- package/dist/types/modes/controllers/todo-command-controller.d.ts +1 -1
- package/dist/types/modes/controllers/tool-args-reveal.d.ts +6 -2
- package/dist/types/modes/image-references.d.ts +1 -1
- package/dist/types/modes/index.d.ts +3 -3
- package/dist/types/modes/interactive-mode.d.ts +34 -34
- package/dist/types/modes/orchestrate.d.ts +1 -1
- package/dist/types/modes/print-mode.d.ts +1 -1
- package/dist/types/modes/prompt-action-autocomplete.d.ts +1 -1
- package/dist/types/modes/rpc/host-tools.d.ts +1 -1
- package/dist/types/modes/rpc/host-uris.d.ts +3 -3
- package/dist/types/modes/rpc/rpc-client.d.ts +3 -3
- package/dist/types/modes/rpc/rpc-mode.d.ts +6 -6
- package/dist/types/modes/rpc/rpc-subagents.d.ts +3 -3
- package/dist/types/modes/rpc/rpc-types.d.ts +7 -7
- package/dist/types/modes/running-subagent-badge.d.ts +1 -1
- package/dist/types/modes/runtime-init.d.ts +2 -2
- package/dist/types/modes/session-observer-registry.d.ts +2 -2
- package/dist/types/modes/setup-wizard/index.d.ts +6 -6
- package/dist/types/modes/setup-wizard/lazy.d.ts +1 -1
- package/dist/types/modes/setup-wizard/scenes/glyph.d.ts +1 -1
- package/dist/types/modes/setup-wizard/scenes/providers.d.ts +1 -1
- package/dist/types/modes/setup-wizard/scenes/sign-in.d.ts +1 -1
- package/dist/types/modes/setup-wizard/scenes/theme.d.ts +1 -1
- package/dist/types/modes/setup-wizard/scenes/types.d.ts +1 -1
- package/dist/types/modes/setup-wizard/scenes/web-search.d.ts +1 -1
- package/dist/types/modes/setup-wizard/startup-splash.d.ts +1 -1
- package/dist/types/modes/setup-wizard/wizard-overlay.d.ts +2 -2
- package/dist/types/modes/shared.d.ts +1 -1
- package/dist/types/modes/skill-command.d.ts +2 -2
- package/dist/types/modes/theme/shimmer.d.ts +1 -1
- package/dist/types/modes/theme/theme.d.ts +1 -1
- package/dist/types/modes/types.d.ts +31 -31
- package/dist/types/modes/ultrathink.d.ts +1 -1
- package/dist/types/modes/utils/context-usage.d.ts +5 -5
- package/dist/types/modes/utils/hotkeys-markdown.d.ts +1 -1
- package/dist/types/modes/utils/interactive-context-helpers.d.ts +2 -2
- package/dist/types/modes/utils/tools-markdown.d.ts +1 -1
- package/dist/types/modes/utils/transcript-render-helpers.d.ts +10 -2
- package/dist/types/modes/utils/transcript-render-helpers.test.d.ts +1 -0
- package/dist/types/modes/utils/ui-helpers.d.ts +2 -2
- package/dist/types/modes/workflow.d.ts +1 -1
- package/dist/types/plan-mode/plan-handoff.d.ts +1 -1
- package/dist/types/registry/agent-lifecycle.d.ts +2 -2
- package/dist/types/registry/agent-registry.d.ts +1 -1
- package/dist/types/sdk.d.ts +40 -36
- package/dist/types/secrets/index.d.ts +2 -2
- package/dist/types/secrets/obfuscator.d.ts +1 -1
- package/dist/types/session/agent-session.d.ts +56 -42
- package/dist/types/session/agent-storage.d.ts +1 -1
- package/dist/types/session/auth-broker-config.d.ts +1 -1
- package/dist/types/session/codex-auto-reset.d.ts +1 -1
- package/dist/types/session/exit-diagnostics.d.ts +1 -1
- package/dist/types/session/indexed-session-storage.d.ts +2 -2
- package/dist/types/session/messages.d.ts +22 -3
- package/dist/types/session/redis-session-storage.d.ts +1 -1
- package/dist/types/session/session-context.d.ts +1 -1
- package/dist/types/session/session-entries.d.ts +4 -0
- package/dist/types/session/session-listing.d.ts +1 -1
- package/dist/types/session/session-loader.d.ts +4 -4
- package/dist/types/session/session-manager.d.ts +9 -8
- package/dist/types/session/session-migrations.d.ts +1 -1
- package/dist/types/session/session-paths.d.ts +1 -1
- package/dist/types/session/session-persistence.d.ts +2 -2
- package/dist/types/session/session-storage.d.ts +1 -1
- package/dist/types/session/session-title-slot.d.ts +1 -1
- package/dist/types/session/settings-stream-fn.d.ts +1 -1
- package/dist/types/session/sql-session-storage.d.ts +1 -1
- package/dist/types/session/unexpected-stop-classifier.d.ts +2 -2
- package/dist/types/slash-commands/acp-builtins.d.ts +2 -2
- package/dist/types/slash-commands/available-commands.d.ts +5 -5
- package/dist/types/slash-commands/builtin-registry.d.ts +2 -2
- package/dist/types/slash-commands/helpers/active-oauth-account.d.ts +1 -1
- package/dist/types/slash-commands/helpers/context-report.d.ts +1 -1
- package/dist/types/slash-commands/helpers/format.d.ts +1 -1
- package/dist/types/slash-commands/helpers/logout.d.ts +1 -1
- package/dist/types/slash-commands/helpers/marketplace-manager.d.ts +2 -2
- package/dist/types/slash-commands/helpers/mcp.d.ts +1 -1
- package/dist/types/slash-commands/helpers/parse.d.ts +1 -1
- package/dist/types/slash-commands/helpers/reset-usage.d.ts +1 -1
- package/dist/types/slash-commands/helpers/ssh.d.ts +1 -1
- package/dist/types/slash-commands/helpers/todo.d.ts +1 -1
- package/dist/types/slash-commands/helpers/usage-report.d.ts +1 -1
- package/dist/types/slash-commands/types.d.ts +6 -4
- package/dist/types/ssh/file-transfer.d.ts +1 -1
- package/dist/types/ssh/ssh-executor.d.ts +1 -1
- package/dist/types/ssh/sshfs-mount.d.ts +1 -1
- package/dist/types/stt/asr-client.d.ts +3 -3
- package/dist/types/stt/asr-protocol.d.ts +1 -1
- package/dist/types/stt/asr-worker.d.ts +1 -1
- package/dist/types/stt/downloader.d.ts +1 -1
- package/dist/types/stt/index.d.ts +8 -8
- package/dist/types/stt/models.d.ts +1 -1
- package/dist/types/system-prompt.d.ts +4 -4
- package/dist/types/task/agents.d.ts +1 -1
- package/dist/types/task/discovery.d.ts +1 -1
- package/dist/types/task/executor.d.ts +20 -20
- package/dist/types/task/index.d.ts +11 -11
- package/dist/types/task/isolation-runner.d.ts +7 -6
- package/dist/types/task/persisted-revive.d.ts +5 -5
- package/dist/types/task/provider-concurrency.d.ts +2 -2
- package/dist/types/task/render.d.ts +3 -3
- package/dist/types/task/renderer.d.ts +1 -1
- package/dist/types/task/repair-args.d.ts +1 -1
- package/dist/types/task/subprocess-tool-registry.d.ts +1 -1
- package/dist/types/task/types.d.ts +2 -2
- package/dist/types/task/yield-assembly.d.ts +1 -1
- package/dist/types/tiny/title-client.d.ts +2 -2
- package/dist/types/tiny/title-protocol.d.ts +1 -1
- package/dist/types/tiny/worker.d.ts +1 -1
- package/dist/types/tool-discovery/mode.d.ts +2 -2
- package/dist/types/tools/__tests__/glob.test.d.ts +1 -0
- package/dist/types/tools/acp-bridge.d.ts +2 -2
- package/dist/types/tools/ask.d.ts +3 -3
- package/dist/types/tools/ast-edit.d.ts +4 -4
- package/dist/types/tools/ast-grep.d.ts +4 -4
- package/dist/types/tools/bash-command-fixup.d.ts +3 -11
- package/dist/types/tools/bash-interactive.d.ts +1 -1
- package/dist/types/tools/bash-interceptor.d.ts +1 -1
- package/dist/types/tools/bash-skill-urls.d.ts +3 -3
- package/dist/types/tools/bash.d.ts +4 -4
- package/dist/types/tools/browser/cmux/cmux-tab.d.ts +6 -6
- package/dist/types/tools/browser/cmux/rpc.d.ts +1 -1
- package/dist/types/tools/browser/registry.d.ts +3 -3
- package/dist/types/tools/browser/render.d.ts +3 -3
- package/dist/types/tools/browser/tab-supervisor.d.ts +4 -4
- package/dist/types/tools/browser/tab-worker.d.ts +1 -1
- package/dist/types/tools/browser.d.ts +9 -9
- package/dist/types/tools/checkpoint.d.ts +2 -2
- package/dist/types/tools/conflict-detect.d.ts +1 -1
- package/dist/types/tools/context.d.ts +2 -2
- package/dist/types/tools/debug.d.ts +4 -4
- package/dist/types/tools/eval-backends.d.ts +1 -1
- package/dist/types/tools/eval-render.d.ts +3 -3
- package/dist/types/tools/eval.d.ts +3 -3
- package/dist/types/tools/fetch.d.ts +7 -7
- package/dist/types/tools/gh-renderer.d.ts +3 -3
- package/dist/types/tools/gh.d.ts +5 -5
- package/dist/types/tools/github-cache.d.ts +1 -1
- package/dist/types/tools/glob.d.ts +7 -5
- package/dist/types/tools/grep.d.ts +5 -5
- package/dist/types/tools/image-gen.d.ts +2 -2
- package/dist/types/tools/index.d.ts +70 -70
- package/dist/types/tools/inspect-image-renderer.d.ts +2 -2
- package/dist/types/tools/inspect-image.d.ts +2 -2
- package/dist/types/tools/irc.d.ts +5 -5
- package/dist/types/tools/job.d.ts +3 -3
- package/dist/types/tools/json-tree.d.ts +1 -1
- package/dist/types/tools/learn.d.ts +1 -1
- package/dist/types/tools/list-limit.d.ts +1 -1
- package/dist/types/tools/manage-skill.d.ts +1 -1
- package/dist/types/tools/memory-edit.d.ts +1 -1
- package/dist/types/tools/memory-recall.d.ts +1 -1
- package/dist/types/tools/memory-reflect.d.ts +1 -1
- package/dist/types/tools/memory-render.d.ts +2 -2
- package/dist/types/tools/memory-retain.d.ts +1 -1
- package/dist/types/tools/output-meta.d.ts +3 -3
- package/dist/types/tools/path-utils.d.ts +2 -2
- package/dist/types/tools/plan-mode-guard.d.ts +1 -1
- package/dist/types/tools/read.d.ts +7 -7
- package/dist/types/tools/render-utils.d.ts +3 -3
- package/dist/types/tools/renderers.d.ts +2 -2
- package/dist/types/tools/report-tool-issue.d.ts +2 -2
- package/dist/types/tools/resolve.d.ts +3 -3
- package/dist/types/tools/review.d.ts +2 -2
- package/dist/types/tools/search-tool-bm25.d.ts +4 -4
- package/dist/types/tools/ssh.d.ts +5 -5
- package/dist/types/tools/todo.d.ts +4 -4
- package/dist/types/tools/tool-result.d.ts +2 -2
- package/dist/types/tools/tts.d.ts +1 -1
- package/dist/types/tools/write.d.ts +7 -7
- package/dist/types/tools/yield.d.ts +1 -1
- package/dist/types/tts/index.d.ts +10 -10
- package/dist/types/tts/models.d.ts +1 -1
- package/dist/types/tts/speech-enhancer.d.ts +2 -2
- package/dist/types/tts/streaming-player.d.ts +1 -1
- package/dist/types/tts/tts-client.d.ts +2 -2
- package/dist/types/tts/tts-protocol.d.ts +1 -1
- package/dist/types/tts/tts-worker.d.ts +1 -1
- package/dist/types/tts/vocalizer.d.ts +7 -1
- package/dist/types/tui/code-cell.d.ts +1 -1
- package/dist/types/tui/file-list.d.ts +1 -1
- package/dist/types/tui/index.d.ts +9 -9
- package/dist/types/tui/output-block.d.ts +2 -2
- package/dist/types/tui/status-line.d.ts +2 -2
- package/dist/types/tui/tree-list.d.ts +2 -2
- package/dist/types/tui/types.d.ts +1 -1
- package/dist/types/tui/utils.d.ts +2 -2
- package/dist/types/utils/changelog.d.ts +1 -1
- package/dist/types/utils/commit-message-generator.d.ts +2 -2
- package/dist/types/utils/git.d.ts +1 -1
- package/dist/types/utils/image-loading.d.ts +1 -1
- package/dist/types/utils/image-vision-fallback.d.ts +3 -3
- package/dist/types/utils/markit.d.ts +1 -1
- package/dist/types/utils/title-generator.d.ts +2 -2
- package/dist/types/web/parallel.d.ts +1 -1
- package/dist/types/web/scrapers/artifacthub.d.ts +1 -1
- package/dist/types/web/scrapers/arxiv.d.ts +1 -1
- package/dist/types/web/scrapers/aur.d.ts +1 -1
- package/dist/types/web/scrapers/biorxiv.d.ts +1 -1
- package/dist/types/web/scrapers/bluesky.d.ts +1 -1
- package/dist/types/web/scrapers/brew.d.ts +1 -1
- package/dist/types/web/scrapers/cheatsh.d.ts +1 -1
- package/dist/types/web/scrapers/chocolatey.d.ts +1 -1
- package/dist/types/web/scrapers/choosealicense.d.ts +1 -1
- package/dist/types/web/scrapers/cisa-kev.d.ts +1 -1
- package/dist/types/web/scrapers/clojars.d.ts +1 -1
- package/dist/types/web/scrapers/coingecko.d.ts +1 -1
- package/dist/types/web/scrapers/crates-io.d.ts +1 -1
- package/dist/types/web/scrapers/crossref.d.ts +1 -1
- package/dist/types/web/scrapers/devto.d.ts +1 -1
- package/dist/types/web/scrapers/discogs.d.ts +1 -1
- package/dist/types/web/scrapers/discourse.d.ts +1 -1
- package/dist/types/web/scrapers/dockerhub.d.ts +1 -1
- package/dist/types/web/scrapers/docs-rs.d.ts +8 -1
- package/dist/types/web/scrapers/fdroid.d.ts +1 -1
- package/dist/types/web/scrapers/firefox-addons.d.ts +1 -1
- package/dist/types/web/scrapers/flathub.d.ts +1 -1
- package/dist/types/web/scrapers/github-gist.d.ts +1 -1
- package/dist/types/web/scrapers/github.d.ts +1 -1
- package/dist/types/web/scrapers/gitlab.d.ts +1 -1
- package/dist/types/web/scrapers/go-pkg.d.ts +1 -1
- package/dist/types/web/scrapers/hackage.d.ts +1 -1
- package/dist/types/web/scrapers/hackernews.d.ts +1 -1
- package/dist/types/web/scrapers/hex.d.ts +1 -1
- package/dist/types/web/scrapers/huggingface.d.ts +1 -1
- package/dist/types/web/scrapers/iacr.d.ts +1 -1
- package/dist/types/web/scrapers/index.d.ts +77 -77
- package/dist/types/web/scrapers/jetbrains-marketplace.d.ts +1 -1
- package/dist/types/web/scrapers/lemmy.d.ts +1 -1
- package/dist/types/web/scrapers/lobsters.d.ts +1 -1
- package/dist/types/web/scrapers/mastodon.d.ts +1 -1
- package/dist/types/web/scrapers/maven.d.ts +1 -1
- package/dist/types/web/scrapers/mdn.d.ts +1 -1
- package/dist/types/web/scrapers/metacpan.d.ts +1 -1
- package/dist/types/web/scrapers/musicbrainz.d.ts +1 -1
- package/dist/types/web/scrapers/npm.d.ts +1 -1
- package/dist/types/web/scrapers/nuget.d.ts +1 -1
- package/dist/types/web/scrapers/nvd.d.ts +1 -1
- package/dist/types/web/scrapers/ollama.d.ts +1 -1
- package/dist/types/web/scrapers/open-vsx.d.ts +1 -1
- package/dist/types/web/scrapers/opencorporates.d.ts +1 -1
- package/dist/types/web/scrapers/openlibrary.d.ts +1 -1
- package/dist/types/web/scrapers/orcid.d.ts +1 -1
- package/dist/types/web/scrapers/osv.d.ts +1 -1
- package/dist/types/web/scrapers/packagist.d.ts +1 -1
- package/dist/types/web/scrapers/pub-dev.d.ts +1 -1
- package/dist/types/web/scrapers/pubmed.d.ts +1 -1
- package/dist/types/web/scrapers/pypi.d.ts +1 -1
- package/dist/types/web/scrapers/rawg.d.ts +1 -1
- package/dist/types/web/scrapers/readthedocs.d.ts +1 -1
- package/dist/types/web/scrapers/reddit.d.ts +1 -1
- package/dist/types/web/scrapers/repology.d.ts +1 -1
- package/dist/types/web/scrapers/rfc.d.ts +1 -1
- package/dist/types/web/scrapers/rubygems.d.ts +1 -1
- package/dist/types/web/scrapers/searchcode.d.ts +1 -1
- package/dist/types/web/scrapers/sec-edgar.d.ts +1 -1
- package/dist/types/web/scrapers/semantic-scholar.d.ts +1 -1
- package/dist/types/web/scrapers/snapcraft.d.ts +1 -1
- package/dist/types/web/scrapers/sourcegraph.d.ts +1 -1
- package/dist/types/web/scrapers/spdx.d.ts +1 -1
- package/dist/types/web/scrapers/spotify.d.ts +1 -1
- package/dist/types/web/scrapers/stackoverflow.d.ts +1 -1
- package/dist/types/web/scrapers/terraform.d.ts +1 -1
- package/dist/types/web/scrapers/tldr.d.ts +1 -1
- package/dist/types/web/scrapers/twitter.d.ts +1 -1
- package/dist/types/web/scrapers/types.d.ts +1 -1
- package/dist/types/web/scrapers/vimeo.d.ts +1 -1
- package/dist/types/web/scrapers/vscode-marketplace.d.ts +1 -1
- package/dist/types/web/scrapers/w3c.d.ts +1 -1
- package/dist/types/web/scrapers/wikidata.d.ts +1 -1
- package/dist/types/web/scrapers/wikipedia.d.ts +1 -1
- package/dist/types/web/scrapers/youtube.d.ts +1 -1
- package/dist/types/web/search/index.d.ts +7 -7
- package/dist/types/web/search/provider.d.ts +5 -5
- package/dist/types/web/search/providers/anthropic.d.ts +3 -3
- package/dist/types/web/search/providers/base.d.ts +1 -1
- package/dist/types/web/search/providers/brave.d.ts +3 -3
- package/dist/types/web/search/providers/codex.d.ts +3 -3
- package/dist/types/web/search/providers/duckduckgo.d.ts +3 -3
- package/dist/types/web/search/providers/exa.d.ts +3 -3
- package/dist/types/web/search/providers/firecrawl.d.ts +3 -3
- package/dist/types/web/search/providers/gemini.d.ts +3 -3
- package/dist/types/web/search/providers/jina.d.ts +3 -3
- package/dist/types/web/search/providers/kagi.d.ts +3 -3
- package/dist/types/web/search/providers/kimi.d.ts +3 -3
- package/dist/types/web/search/providers/parallel.d.ts +3 -3
- package/dist/types/web/search/providers/perplexity.d.ts +3 -3
- package/dist/types/web/search/providers/searxng.d.ts +3 -3
- package/dist/types/web/search/providers/synthetic.d.ts +3 -3
- package/dist/types/web/search/providers/tavily.d.ts +3 -3
- package/dist/types/web/search/providers/tinyfish.d.ts +3 -3
- package/dist/types/web/search/providers/utils.d.ts +2 -2
- package/dist/types/web/search/providers/xai.d.ts +3 -3
- package/dist/types/web/search/providers/zai.d.ts +3 -3
- package/dist/types/web/search/render.d.ts +3 -3
- package/package.json +12 -12
- package/src/advisor/__tests__/advisor.test.ts +59 -0
- package/src/auto-thinking/classifier.ts +6 -5
- package/src/collab/relay-client.ts +73 -7
- package/src/config/model-registry.ts +43 -2
- package/src/config/model-resolver.ts +1 -1
- package/src/config/settings-schema.ts +5 -12
- package/src/config/settings.ts +25 -5
- package/src/edit/hashline/filesystem.ts +19 -1
- package/src/edit/modes/patch.ts +9 -1
- package/src/edit/modes/replace.ts +1 -1
- package/src/edit/renderer.ts +42 -30
- package/src/eval/__tests__/agent-bridge.test.ts +19 -0
- package/src/eval/__tests__/budget-bridge.test.ts +12 -1
- package/src/eval/agent-bridge.ts +27 -19
- package/src/eval/js/context-manager.ts +3 -0
- package/src/export/ttsr.ts +10 -0
- package/src/extensibility/extensions/loader.ts +2 -2
- package/src/extensibility/extensions/types.ts +16 -4
- package/src/extensibility/hooks/loader.ts +3 -3
- package/src/extensibility/hooks/types.ts +4 -4
- package/src/extensibility/legacy-pi-ai-shim.ts +17 -4
- package/src/extensibility/legacy-pi-coding-agent-shim.ts +554 -2
- package/src/extensibility/plugins/legacy-pi-compat.ts +190 -58
- package/src/internal-urls/docs-index.generated.txt +1 -1
- package/src/internal-urls/memory-protocol.ts +105 -3
- package/src/lsp/client.ts +70 -0
- package/src/lsp/index.ts +65 -12
- package/src/main.ts +5 -3
- package/src/markit/converters/pdf/extract.ts +26 -2
- package/src/mnemopi/state.ts +76 -0
- package/src/modes/acp/acp-agent.ts +5 -1
- package/src/modes/components/agent-hub.ts +27 -9
- package/src/modes/components/chat-transcript-builder.ts +7 -3
- package/src/modes/components/copy-selector.ts +16 -4
- package/src/modes/components/model-selector.ts +17 -17
- package/src/modes/components/session-selector.ts +12 -4
- package/src/modes/components/status-line/component.ts +4 -0
- package/src/modes/components/status-line/segments.ts +6 -5
- package/src/modes/components/status-line/types.ts +4 -0
- package/src/modes/components/tool-execution.ts +8 -3
- package/src/modes/controllers/command-controller.ts +10 -0
- package/src/modes/controllers/event-controller.ts +4 -3
- package/src/modes/controllers/extension-ui-controller.test.ts +58 -0
- package/src/modes/controllers/extension-ui-controller.ts +12 -6
- package/src/modes/controllers/input-controller.ts +8 -0
- package/src/modes/controllers/selector-controller.ts +18 -9
- package/src/modes/controllers/streaming-reveal.ts +12 -5
- package/src/modes/controllers/tool-args-reveal.ts +13 -6
- package/src/modes/interactive-mode.ts +54 -28
- package/src/modes/prompt-action-autocomplete.ts +18 -0
- package/src/modes/theme/shimmer.ts +37 -1
- package/src/modes/utils/transcript-render-helpers.test.ts +38 -0
- package/src/modes/utils/transcript-render-helpers.ts +14 -0
- package/src/modes/utils/ui-helpers.ts +5 -1
- package/src/prompts/system/workflow-notice.md +1 -1
- package/src/prompts/tools/bash.md +9 -7
- package/src/prompts/tools/grep.md +1 -1
- package/src/prompts/tools/memory-edit.md +2 -0
- package/src/prompts/tools/recall.md +2 -0
- package/src/sdk.ts +112 -12
- package/src/session/agent-session.ts +203 -61
- package/src/session/messages.ts +102 -2
- package/src/session/session-context.ts +60 -10
- package/src/session/session-entries.ts +4 -0
- package/src/session/session-history-format.ts +12 -0
- package/src/session/session-manager.ts +129 -10
- package/src/session/settings-stream-fn.ts +1 -0
- package/src/session/unexpected-stop-classifier.ts +6 -3
- package/src/slash-commands/builtin-registry.ts +7 -4
- package/src/slash-commands/helpers/usage-report.ts +3 -0
- package/src/slash-commands/types.ts +2 -0
- package/src/task/executor.ts +23 -3
- package/src/task/isolation-runner.ts +38 -9
- package/src/tools/__tests__/glob.test.ts +37 -0
- package/src/tools/acp-bridge.ts +11 -1
- package/src/tools/bash-command-fixup.ts +3 -36
- package/src/tools/bash.ts +4 -13
- package/src/tools/browser/render.ts +6 -4
- package/src/tools/glob.ts +11 -1
- package/src/tools/index.ts +1 -1
- package/src/tools/inspect-image-renderer.ts +5 -4
- package/src/tools/read.ts +13 -8
- package/src/tools/render-utils.ts +4 -1
- package/src/tools/write.ts +9 -7
- package/src/tts/speech-enhancer.ts +7 -5
- package/src/tts/vocalizer.ts +9 -0
- package/src/utils/commit-message-generator.ts +7 -5
- package/src/utils/shell-snapshot.ts +10 -0
- package/src/utils/title-generator.ts +12 -7
- package/src/web/scrapers/docs-rs.ts +12 -1
- package/src/web/search/providers/xai.ts +43 -47
package/src/task/executor.ts
CHANGED
|
@@ -215,7 +215,12 @@ function renderIrcPeerRoster(selfId: string): string {
|
|
|
215
215
|
return lines.join("\n");
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
function withAbortTimeout<T>(
|
|
218
|
+
function withAbortTimeout<T>(
|
|
219
|
+
promise: Promise<T>,
|
|
220
|
+
timeoutMs: number,
|
|
221
|
+
signal?: AbortSignal,
|
|
222
|
+
timeoutController?: AbortController,
|
|
223
|
+
): Promise<T> {
|
|
219
224
|
if (signal?.aborted) {
|
|
220
225
|
return Promise.reject(new ToolAbortError());
|
|
221
226
|
}
|
|
@@ -225,6 +230,7 @@ function withAbortTimeout<T>(promise: Promise<T>, timeoutMs: number, signal?: Ab
|
|
|
225
230
|
const timeoutId = setTimeout(() => {
|
|
226
231
|
if (settled) return;
|
|
227
232
|
settled = true;
|
|
233
|
+
timeoutController?.abort(new DOMException(`MCP tool call timed out after ${timeoutMs}ms`, "TimeoutError"));
|
|
228
234
|
reject(new Error(`MCP tool call timed out after ${timeoutMs}ms`));
|
|
229
235
|
}, timeoutMs);
|
|
230
236
|
|
|
@@ -232,6 +238,7 @@ function withAbortTimeout<T>(promise: Promise<T>, timeoutMs: number, signal?: Ab
|
|
|
232
238
|
if (settled) return;
|
|
233
239
|
settled = true;
|
|
234
240
|
clearTimeout(timeoutId);
|
|
241
|
+
timeoutController?.abort();
|
|
235
242
|
reject(new ToolAbortError());
|
|
236
243
|
};
|
|
237
244
|
|
|
@@ -708,13 +715,21 @@ export function createMCPProxyTools(mcpManager: MCPManager): CustomTool[] {
|
|
|
708
715
|
const serverName = mcpTool.mcpServerName ?? "";
|
|
709
716
|
const mcpToolName = mcpTool.mcpToolName ?? "";
|
|
710
717
|
try {
|
|
718
|
+
const timeoutController = new AbortController();
|
|
719
|
+
const timeoutSignal = timeoutController.signal;
|
|
720
|
+
const combinedSignal = signal ? AbortSignal.any([signal, timeoutSignal]) : timeoutSignal;
|
|
711
721
|
const result = await withAbortTimeout(
|
|
712
722
|
(async () => {
|
|
713
|
-
const connection = await
|
|
714
|
-
|
|
723
|
+
const connection = await untilAborted(combinedSignal, () =>
|
|
724
|
+
mcpManager.waitForConnection(serverName),
|
|
725
|
+
);
|
|
726
|
+
return callTool(connection, mcpToolName, params as Record<string, unknown>, {
|
|
727
|
+
signal: combinedSignal,
|
|
728
|
+
});
|
|
715
729
|
})(),
|
|
716
730
|
MCP_CALL_TIMEOUT_MS,
|
|
717
731
|
signal,
|
|
732
|
+
timeoutController,
|
|
718
733
|
);
|
|
719
734
|
return {
|
|
720
735
|
content: (result.content ?? []).map(item =>
|
|
@@ -2161,6 +2176,11 @@ export async function runSubprocess(options: ExecutorOptions): Promise<SingleRes
|
|
|
2161
2176
|
modelRegistry,
|
|
2162
2177
|
settings: subagentSettings,
|
|
2163
2178
|
model,
|
|
2179
|
+
modelPattern: model || modelOverride === undefined ? undefined : modelPatterns,
|
|
2180
|
+
modelPatternAuthFallback:
|
|
2181
|
+
model || modelOverride === undefined ? undefined : options.parentActiveModelPattern,
|
|
2182
|
+
modelPatternFallbackRole:
|
|
2183
|
+
model || modelOverride === undefined ? undefined : `${SUBAGENT_RETRY_FALLBACK_ROLE_PREFIX}${id}`,
|
|
2164
2184
|
thinkingLevel: effectiveThinkingLevel,
|
|
2165
2185
|
toolNames,
|
|
2166
2186
|
outputSchema,
|
|
@@ -37,6 +37,7 @@ import {
|
|
|
37
37
|
getRepoRoot,
|
|
38
38
|
type IsolationHandle,
|
|
39
39
|
mergeTaskBranches,
|
|
40
|
+
type NestedRepoPatch,
|
|
40
41
|
type WorktreeBaseline,
|
|
41
42
|
} from "./worktree";
|
|
42
43
|
|
|
@@ -100,7 +101,7 @@ export interface IsolatedRunOptions {
|
|
|
100
101
|
agentId: string;
|
|
101
102
|
/** Merge mode driving how changes are captured ("branch" commits, "patch" diffs). */
|
|
102
103
|
mergeMode: "patch" | "branch";
|
|
103
|
-
/** Output dir for `${agentId}.patch` artifacts (patch mode). */
|
|
104
|
+
/** Output dir for `${agentId}.patch` artifacts (patch mode and branch-mode commit failures). */
|
|
104
105
|
artifactsDir: string;
|
|
105
106
|
/** Human description carried onto the branch commit (branch mode). */
|
|
106
107
|
description?: string;
|
|
@@ -114,12 +115,25 @@ export interface IsolatedRunOptions {
|
|
|
114
115
|
buildFailureResult: (err: unknown) => SingleResult;
|
|
115
116
|
}
|
|
116
117
|
|
|
118
|
+
async function writeIsolationPatch(
|
|
119
|
+
isolationDir: string,
|
|
120
|
+
baseline: WorktreeBaseline,
|
|
121
|
+
artifactsDir: string,
|
|
122
|
+
agentId: string,
|
|
123
|
+
): Promise<{ patchPath: string; nestedPatches: NestedRepoPatch[] }> {
|
|
124
|
+
const delta = await captureDeltaPatch(isolationDir, baseline);
|
|
125
|
+
const patchPath = path.join(artifactsDir, `${agentId}.patch`);
|
|
126
|
+
await Bun.write(patchPath, delta.rootPatch);
|
|
127
|
+
return { patchPath, nestedPatches: delta.nestedPatches };
|
|
128
|
+
}
|
|
129
|
+
|
|
117
130
|
/**
|
|
118
131
|
* Run a subagent inside an isolation worktree and capture its changes.
|
|
119
132
|
*
|
|
120
133
|
* Branch mode: on success, commits the diff onto `omp/task/${agentId}` and
|
|
121
134
|
* returns `branchName` + `nestedPatches`. On commit failure the branch is
|
|
122
|
-
* deleted
|
|
135
|
+
* deleted, the still-live isolation diff is written to `${artifactsDir}/${agentId}.patch`,
|
|
136
|
+
* and `result.error` carries the merge-failure message.
|
|
123
137
|
*
|
|
124
138
|
* Patch mode: on success, writes `${artifactsDir}/${agentId}.patch` and
|
|
125
139
|
* returns `patchPath` + `nestedPatches`.
|
|
@@ -162,18 +176,32 @@ export async function runIsolatedSubprocess(opts: IsolatedRunOptions): Promise<S
|
|
|
162
176
|
const branchName = `omp/task/${opts.agentId}`;
|
|
163
177
|
await git.branch.tryDelete(opts.context.repoRoot, branchName);
|
|
164
178
|
const msg = mergeErr instanceof Error ? mergeErr.message : String(mergeErr);
|
|
165
|
-
|
|
179
|
+
try {
|
|
180
|
+
const patchResult = await writeIsolationPatch(
|
|
181
|
+
isolationDir,
|
|
182
|
+
taskBaseline,
|
|
183
|
+
opts.artifactsDir,
|
|
184
|
+
opts.agentId,
|
|
185
|
+
);
|
|
186
|
+
return {
|
|
187
|
+
...result,
|
|
188
|
+
patchPath: patchResult.patchPath,
|
|
189
|
+
nestedPatches: patchResult.nestedPatches,
|
|
190
|
+
error: `Merge failed: ${msg}`,
|
|
191
|
+
};
|
|
192
|
+
} catch (patchErr) {
|
|
193
|
+
const patchMsg = patchErr instanceof Error ? patchErr.message : String(patchErr);
|
|
194
|
+
return { ...result, error: `Merge failed: ${msg}; patch capture failed: ${patchMsg}` };
|
|
195
|
+
}
|
|
166
196
|
}
|
|
167
197
|
}
|
|
168
198
|
if (result.exitCode === 0) {
|
|
169
199
|
try {
|
|
170
|
-
const
|
|
171
|
-
const patchPath = path.join(opts.artifactsDir, `${opts.agentId}.patch`);
|
|
172
|
-
await Bun.write(patchPath, delta.rootPatch);
|
|
200
|
+
const patchResult = await writeIsolationPatch(isolationDir, taskBaseline, opts.artifactsDir, opts.agentId);
|
|
173
201
|
return {
|
|
174
202
|
...result,
|
|
175
|
-
patchPath,
|
|
176
|
-
nestedPatches:
|
|
203
|
+
patchPath: patchResult.patchPath,
|
|
204
|
+
nestedPatches: patchResult.nestedPatches,
|
|
177
205
|
};
|
|
178
206
|
} catch (patchErr) {
|
|
179
207
|
const msg = patchErr instanceof Error ? patchErr.message : String(patchErr);
|
|
@@ -224,8 +252,9 @@ export async function mergeIsolatedChanges(opts: IsolationMergeOptions): Promise
|
|
|
224
252
|
try {
|
|
225
253
|
if (mergeMode === "branch") {
|
|
226
254
|
if (!result.branchName && result.exitCode === 0 && !result.aborted && result.error) {
|
|
255
|
+
const patchList = result.patchPath ? `\nPatch artifact:\n- ${result.patchPath}` : "";
|
|
227
256
|
return {
|
|
228
|
-
summary: `\n\n<system-notification>Branch merge failed before a task branch could be created: ${result.error}\nTask outputs are preserved but changes were not applied
|
|
257
|
+
summary: `\n\n<system-notification>Branch merge failed before a task branch could be created: ${result.error}\nTask outputs are preserved but changes were not applied.${patchList}</system-notification>`,
|
|
229
258
|
changesApplied: false,
|
|
230
259
|
hadAnyChanges: false,
|
|
231
260
|
mergedBranchForNestedPatches: false,
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { describe, expect, test } from "bun:test";
|
|
2
|
+
import { Settings } from "../../config/settings";
|
|
3
|
+
import type { ToolSession } from "..";
|
|
4
|
+
import { GlobTool } from "../glob";
|
|
5
|
+
import { ToolError } from "../tool-errors";
|
|
6
|
+
|
|
7
|
+
const ROOT_SEARCH_ERROR = "Searching from root directory '/' is not allowed";
|
|
8
|
+
|
|
9
|
+
async function expectRootSearchRejected(searchPath: string): Promise<void> {
|
|
10
|
+
const session: ToolSession = {
|
|
11
|
+
cwd: process.cwd(),
|
|
12
|
+
hasUI: false,
|
|
13
|
+
settings: Settings.isolated({}),
|
|
14
|
+
getSessionFile: () => null,
|
|
15
|
+
getSessionSpawns: () => null,
|
|
16
|
+
};
|
|
17
|
+
const tool = new GlobTool(session);
|
|
18
|
+
let thrown: unknown;
|
|
19
|
+
try {
|
|
20
|
+
await tool.execute("glob-root-regression", { path: searchPath });
|
|
21
|
+
} catch (error) {
|
|
22
|
+
thrown = error;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (!(thrown instanceof Error)) {
|
|
26
|
+
throw new Error(`Expected glob path ${JSON.stringify(searchPath)} to reject`);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
expect(thrown).toBeInstanceOf(ToolError);
|
|
30
|
+
expect(thrown.message).toBe(ROOT_SEARCH_ERROR);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
describe("GlobTool.execute", () => {
|
|
34
|
+
test.each(["/", "//"])("rejects bare root search path %s", async searchPath => {
|
|
35
|
+
await expectRootSearchRejected(searchPath);
|
|
36
|
+
});
|
|
37
|
+
});
|
package/src/tools/acp-bridge.ts
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
* URLs) are always written directly to disk — those are OMP-owned and should
|
|
8
8
|
* never be pushed into the editor.
|
|
9
9
|
*/
|
|
10
|
+
|
|
11
|
+
import { FileChangeType, notifyWorkspaceWatchedFiles } from "../lsp/client";
|
|
10
12
|
import type { ToolSession } from ".";
|
|
11
13
|
import { invalidateFsScanAfterWrite } from "./fs-cache-invalidation";
|
|
12
14
|
import { isInternalUrlPath } from "./path-utils";
|
|
@@ -53,18 +55,26 @@ export async function routeWriteThroughBridge(
|
|
|
53
55
|
requestedPath: string,
|
|
54
56
|
absolutePath: string,
|
|
55
57
|
content: string,
|
|
58
|
+
signal?: AbortSignal,
|
|
56
59
|
): Promise<boolean> {
|
|
57
60
|
if (!shouldRouteWriteThroughBridge(session, requestedPath, absolutePath)) return false;
|
|
58
61
|
|
|
59
62
|
const bridge = session.getClientBridge?.();
|
|
60
63
|
if (!bridge?.capabilities.writeTextFile || !bridge.writeTextFile) return false;
|
|
61
64
|
|
|
65
|
+
const changeType = (await Bun.file(absolutePath).exists()) ? FileChangeType.Changed : FileChangeType.Created;
|
|
66
|
+
// The ACP protocol has no cancellation for fs writes; the most we can do is
|
|
67
|
+
// refuse to start one after the tool was aborted. Racing the promise would
|
|
68
|
+
// report failure while the editor still applies the write.
|
|
69
|
+
signal?.throwIfAborted();
|
|
62
70
|
try {
|
|
63
71
|
await bridge.writeTextFile({ path: absolutePath, content });
|
|
64
72
|
} catch (error) {
|
|
65
73
|
throw new ToolError(error instanceof Error ? error.message : String(error));
|
|
66
74
|
}
|
|
67
|
-
|
|
75
|
+
if (session.enableLsp ?? true) {
|
|
76
|
+
await notifyWorkspaceWatchedFiles(session.cwd, [{ filePath: absolutePath, type: changeType }], signal);
|
|
77
|
+
}
|
|
68
78
|
invalidateFsScanAfterWrite(absolutePath);
|
|
69
79
|
session.bumpFileMutationVersion?.(absolutePath);
|
|
70
80
|
return true;
|
|
@@ -1,37 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Conservative transforms applied to a bash command before execution.
|
|
3
|
-
*
|
|
4
|
-
* Two fixups are applied, each anchored to the end of a top-level segment
|
|
5
|
-
* (segments split on `;`, `&&`, `||`, and background `&`):
|
|
6
|
-
*
|
|
7
|
-
* 1. Trailing `| head [args]` / `| tail [args]` (and the `|&` variant) — these
|
|
8
|
-
* pipes exist purely to limit output length. The harness already truncates
|
|
9
|
-
* bash output and exposes the full result via an artifact, so they only
|
|
10
|
-
* hide content the agent wanted.
|
|
11
|
-
*
|
|
12
|
-
* 2. A redundant trailing `2>&1` left on a segment that has no remaining pipe
|
|
13
|
-
* or other redirect. The harness already merges stderr into stdout, so the
|
|
14
|
-
* duplication is purely cosmetic — and often a leftover after fixup (1)
|
|
15
|
-
* drops a downstream pipe.
|
|
16
|
-
*
|
|
17
|
-
* The heavy lifting (tokenization, quoting, heredoc handling, command
|
|
18
|
-
* substitution, nested compound commands) lives in Rust under
|
|
19
|
-
* `pi_shell::fixup`, driven by the real `brush-parser` AST. This module is a
|
|
20
|
-
* thin sync wrapper plus user-facing notice formatting.
|
|
21
|
-
*/
|
|
22
|
-
import { applyBashFixups as nativeApplyBashFixups } from "@oh-my-pi/pi-natives";
|
|
1
|
+
/** Compatibility shim for extensions importing the historical bash fixup helper. */
|
|
23
2
|
|
|
24
|
-
export
|
|
25
|
-
|
|
26
|
-
command: string;
|
|
27
|
-
/** Substrings that were stripped, in the order they were removed. */
|
|
28
|
-
stripped: string[];
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Apply both fixups to a bash command. On any parse failure, multi-line input,
|
|
33
|
-
* or no-op transform, returns the input verbatim with `stripped: []`.
|
|
34
|
-
*/
|
|
35
|
-
export function applyBashFixups(command: string): BashFixupResult {
|
|
36
|
-
return nativeApplyBashFixups(command);
|
|
37
|
-
}
|
|
3
|
+
export type { BashFixupResult } from "@oh-my-pi/pi-natives";
|
|
4
|
+
export { applyBashFixups } from "@oh-my-pi/pi-natives";
|
package/src/tools/bash.ts
CHANGED
|
@@ -23,7 +23,6 @@ import { CachedOutputBlock, markFramedBlockComponent, outputBlockContentWidth }
|
|
|
23
23
|
import { getSixelLineMask } from "../utils/sixel";
|
|
24
24
|
import type { ToolSession } from ".";
|
|
25
25
|
import { truncateForPrompt } from "./approval";
|
|
26
|
-
import { applyBashFixups } from "./bash-command-fixup";
|
|
27
26
|
import { type BashInteractiveResult, runInteractiveBashPty } from "./bash-interactive";
|
|
28
27
|
import { checkBashInterception } from "./bash-interceptor";
|
|
29
28
|
import { canUseInteractiveBashPty } from "./bash-pty-selection";
|
|
@@ -132,10 +131,12 @@ async function saveBashOriginalArtifact(session: ToolSession, originalText: stri
|
|
|
132
131
|
}
|
|
133
132
|
}
|
|
134
133
|
|
|
134
|
+
const BASH_TIMEOUT_DESCRIPTION = `timeout in seconds; clamped to ${TOOL_TIMEOUTS.bash.min}-${TOOL_TIMEOUTS.bash.max}`;
|
|
135
|
+
|
|
135
136
|
const bashSchemaBase = type({
|
|
136
137
|
command: type("string").describe("command to execute"),
|
|
137
138
|
"env?": type({ "[string]": "string" }).describe("extra env vars"),
|
|
138
|
-
"timeout?": type("number").describe(
|
|
139
|
+
"timeout?": type("number").describe(BASH_TIMEOUT_DESCRIPTION),
|
|
139
140
|
"cwd?": type("string").describe("working directory"),
|
|
140
141
|
"pty?": type("boolean").describe("run in pty mode"),
|
|
141
142
|
});
|
|
@@ -143,7 +144,7 @@ const bashSchemaBase = type({
|
|
|
143
144
|
const bashSchemaWithAsync = type({
|
|
144
145
|
command: "string",
|
|
145
146
|
"env?": { "[string]": "string" },
|
|
146
|
-
"timeout?": "number",
|
|
147
|
+
"timeout?": type("number").describe(BASH_TIMEOUT_DESCRIPTION),
|
|
147
148
|
"cwd?": "string",
|
|
148
149
|
"pty?": "boolean",
|
|
149
150
|
"async?": type("boolean").describe("run in background"),
|
|
@@ -684,16 +685,6 @@ export class BashTool implements AgentTool<typeof bashSchemaBase | typeof bashSc
|
|
|
684
685
|
let command = rawCommand;
|
|
685
686
|
const env = normalizeBashEnv(rawEnv);
|
|
686
687
|
|
|
687
|
-
// Apply conservative bash fixups (strip trailing `| head|tail` and redundant
|
|
688
|
-
// `2>&1`). The helper is single-line only and refuses anything that could
|
|
689
|
-
// change semantics.
|
|
690
|
-
if (this.session.settings.get("bash.stripTrailingHeadTail")) {
|
|
691
|
-
const fixup = applyBashFixups(command);
|
|
692
|
-
if (fixup.stripped.length > 0) {
|
|
693
|
-
command = fixup.command;
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
|
|
697
688
|
// Extract leading `cd <path> && ...` into cwd when the model ignores the cwd parameter.
|
|
698
689
|
// Constrained to a single line so a `&&` that sits on a later line of a multiline
|
|
699
690
|
// script can't pull the entire script into the "cwd" capture.
|
|
@@ -34,8 +34,10 @@ interface BrowserRenderContext {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
function describeBrowser(args: BrowserRenderArgs, details: BrowserToolDetails | undefined): string | undefined {
|
|
37
|
-
|
|
38
|
-
if (
|
|
37
|
+
const cdpUrl = typeof args.app?.cdp_url === "string" ? args.app.cdp_url : "";
|
|
38
|
+
if (cdpUrl) return `connected ${cdpUrl}`;
|
|
39
|
+
const appPath = typeof args.app?.path === "string" ? args.app.path : "";
|
|
40
|
+
if (appPath) return `spawned ${shortenPath(appPath)}`;
|
|
39
41
|
if (args.app?.cmux !== false && (args.app?.cmux === true || args.app?.surface)) {
|
|
40
42
|
return args.app.surface ? `cmux ${args.app.surface}` : "cmux";
|
|
41
43
|
}
|
|
@@ -92,7 +94,7 @@ function renderRunCell(
|
|
|
92
94
|
const status = cellStatus(options.isPartial, isError);
|
|
93
95
|
|
|
94
96
|
const titleParts: string[] = [tabLabel(args, details)];
|
|
95
|
-
const url = details?.url
|
|
97
|
+
const url = typeof details?.url === "string" ? details.url : typeof args.url === "string" ? args.url : "";
|
|
96
98
|
if (url) titleParts.push(shortenPath(url));
|
|
97
99
|
const browserDesc = describeBrowser(args, details);
|
|
98
100
|
if (browserDesc) titleParts.push(browserDesc);
|
|
@@ -165,7 +167,7 @@ function renderOpenOrCloseLine(
|
|
|
165
167
|
const meta: string[] = [];
|
|
166
168
|
const browserDesc = describeBrowser(args, details);
|
|
167
169
|
if (browserDesc) meta.push(browserDesc);
|
|
168
|
-
const url = details?.url
|
|
170
|
+
const url = typeof details?.url === "string" ? details.url : typeof args.url === "string" ? args.url : "";
|
|
169
171
|
if (url) meta.push(shortenPath(url));
|
|
170
172
|
|
|
171
173
|
const header =
|
package/src/tools/glob.ts
CHANGED
|
@@ -90,6 +90,8 @@ export interface GlobOperations {
|
|
|
90
90
|
export interface GlobToolOptions {
|
|
91
91
|
/** Custom operations for find. Default: local filesystem + rg */
|
|
92
92
|
operations?: GlobOperations;
|
|
93
|
+
/** Remap slash-only paths to the session cwd before root-search validation. */
|
|
94
|
+
rootPathAlias?: boolean;
|
|
93
95
|
}
|
|
94
96
|
|
|
95
97
|
interface GlobTarget {
|
|
@@ -127,12 +129,14 @@ export class GlobTool implements AgentTool<typeof findSchema, GlobToolDetails> {
|
|
|
127
129
|
readonly strict = true;
|
|
128
130
|
|
|
129
131
|
readonly #customOps?: GlobOperations;
|
|
132
|
+
readonly #rootPathAlias: boolean;
|
|
130
133
|
|
|
131
134
|
constructor(
|
|
132
135
|
private readonly session: ToolSession,
|
|
133
136
|
options?: GlobToolOptions,
|
|
134
137
|
) {
|
|
135
138
|
this.#customOps = options?.operations;
|
|
139
|
+
this.#rootPathAlias = options?.rootPathAlias === true;
|
|
136
140
|
this.description = prompt.render(globDescription);
|
|
137
141
|
}
|
|
138
142
|
|
|
@@ -153,9 +157,15 @@ export class GlobTool implements AgentTool<typeof findSchema, GlobToolDetails> {
|
|
|
153
157
|
? effectivePaths
|
|
154
158
|
: await expandDelimitedPathEntries(effectivePaths, this.session.cwd, { splitter: parseFindPattern });
|
|
155
159
|
const rawPatterns = rawPatternInputs.map(input => normalizePathLikeInput(input).replace(/\\/g, "/"));
|
|
160
|
+
const aliasResolvedPatterns = this.#rootPathAlias
|
|
161
|
+
? rawPatterns.map(pattern => (/^\/+$/.test(pattern) ? "." : pattern))
|
|
162
|
+
: rawPatterns;
|
|
163
|
+
if (aliasResolvedPatterns.some(pattern => /^\/+$/.test(pattern))) {
|
|
164
|
+
throw new ToolError("Searching from root directory '/' is not allowed");
|
|
165
|
+
}
|
|
156
166
|
const internalRouter = InternalUrlRouter.instance();
|
|
157
167
|
const normalizedPatterns: string[] = [];
|
|
158
|
-
for (const rawPattern of
|
|
168
|
+
for (const rawPattern of aliasResolvedPatterns) {
|
|
159
169
|
if (!internalRouter.canHandle(rawPattern)) {
|
|
160
170
|
normalizedPatterns.push(rawPattern);
|
|
161
171
|
continue;
|
package/src/tools/index.ts
CHANGED
|
@@ -451,7 +451,7 @@ export const BUILTIN_TOOLS: Record<BuiltinToolName, ToolFactory> = {
|
|
|
451
451
|
eval: s => new EvalTool(s),
|
|
452
452
|
ssh: loadSshTool,
|
|
453
453
|
github: GithubTool.createIf,
|
|
454
|
-
glob: s => new GlobTool(s),
|
|
454
|
+
glob: s => new GlobTool(s, { rootPathAlias: true }),
|
|
455
455
|
grep: s => new GrepTool(s),
|
|
456
456
|
lsp: LspTool.createIf,
|
|
457
457
|
inspect_image: s => new InspectImageTool(s),
|
|
@@ -33,10 +33,10 @@ function questionLine(question: string, uiTheme: Theme): string {
|
|
|
33
33
|
|
|
34
34
|
export const inspectImageToolRenderer = {
|
|
35
35
|
renderCall(args: InspectImageRenderArgs, _options: RenderResultOptions, uiTheme: Theme): Component {
|
|
36
|
-
const rawPath = args.path
|
|
36
|
+
const rawPath = typeof args.path === "string" ? args.path : "";
|
|
37
37
|
const pathDisplay = rawPath ? shortenPath(rawPath) : "…";
|
|
38
38
|
const header = renderStatusLine({ icon: "pending", title: "Inspect", description: pathDisplay }, uiTheme);
|
|
39
|
-
const question = args.question
|
|
39
|
+
const question = typeof args.question === "string" ? args.question.trim() : "";
|
|
40
40
|
// Call is at most a status line plus a one-line question — too small to box.
|
|
41
41
|
// The container renders a lone Text cleanly with no chrome.
|
|
42
42
|
if (!question) return new Text(header, 0, 0);
|
|
@@ -51,7 +51,8 @@ export const inspectImageToolRenderer = {
|
|
|
51
51
|
args?: InspectImageRenderArgs,
|
|
52
52
|
): Component {
|
|
53
53
|
const details = result.details;
|
|
54
|
-
const rawPath =
|
|
54
|
+
const rawPath =
|
|
55
|
+
typeof details?.imagePath === "string" ? details.imagePath : typeof args?.path === "string" ? args.path : "";
|
|
55
56
|
const pathDisplay = rawPath ? shortenPath(rawPath) : "image";
|
|
56
57
|
const success = !result.isError;
|
|
57
58
|
const header = renderStatusLine(
|
|
@@ -69,7 +70,7 @@ export const inspectImageToolRenderer = {
|
|
|
69
70
|
uiTheme,
|
|
70
71
|
);
|
|
71
72
|
|
|
72
|
-
const question = args?.question
|
|
73
|
+
const question = typeof args?.question === "string" ? args.question.trim() : "";
|
|
73
74
|
const outputText = result.content.find(content => content.type === "text")?.text?.trimEnd() ?? "";
|
|
74
75
|
|
|
75
76
|
if (result.isError) {
|
package/src/tools/read.ts
CHANGED
|
@@ -3254,8 +3254,8 @@ export class ReadTool implements AgentTool<typeof readSchema, ReadToolDetails> {
|
|
|
3254
3254
|
// =============================================================================
|
|
3255
3255
|
|
|
3256
3256
|
interface ReadRenderArgs {
|
|
3257
|
-
path?:
|
|
3258
|
-
file_path?:
|
|
3257
|
+
path?: unknown;
|
|
3258
|
+
file_path?: unknown;
|
|
3259
3259
|
sel?: string;
|
|
3260
3260
|
// Legacy fields from old schema — tolerated for in-flight tool calls during transition
|
|
3261
3261
|
offset?: number;
|
|
@@ -3320,11 +3320,12 @@ function formatReadPathLink(
|
|
|
3320
3320
|
|
|
3321
3321
|
export const readToolRenderer = {
|
|
3322
3322
|
renderCall(args: ReadRenderArgs, _options: RenderResultOptions, uiTheme: Theme): Component {
|
|
3323
|
-
|
|
3324
|
-
|
|
3323
|
+
const rawPath =
|
|
3324
|
+
typeof args.file_path === "string" ? args.file_path : typeof args.path === "string" ? args.path : "";
|
|
3325
|
+
if (isReadableUrlPath(rawPath)) {
|
|
3326
|
+
return renderReadUrlCall({ path: rawPath, raw: args.raw }, _options, uiTheme);
|
|
3325
3327
|
}
|
|
3326
3328
|
|
|
3327
|
-
const rawPath = args.file_path || args.path || "";
|
|
3328
3329
|
const offset = args.offset;
|
|
3329
3330
|
const limit = args.limit;
|
|
3330
3331
|
|
|
@@ -3346,7 +3347,9 @@ export const readToolRenderer = {
|
|
|
3346
3347
|
args?: ReadRenderArgs,
|
|
3347
3348
|
): Component {
|
|
3348
3349
|
const urlDetails = result.details as ReadUrlToolDetails | undefined;
|
|
3349
|
-
|
|
3350
|
+
const rawPathForKind =
|
|
3351
|
+
typeof args?.file_path === "string" ? args.file_path : typeof args?.path === "string" ? args.path : "";
|
|
3352
|
+
if (urlDetails?.kind === "url" || isReadableUrlPath(rawPathForKind)) {
|
|
3350
3353
|
return renderReadUrlResult(
|
|
3351
3354
|
result as {
|
|
3352
3355
|
content: Array<{ type: string; text?: string }>;
|
|
@@ -3361,7 +3364,8 @@ export const readToolRenderer = {
|
|
|
3361
3364
|
if (result.isError) {
|
|
3362
3365
|
const rawErrorText = result.content?.find(c => c.type === "text")?.text ?? "";
|
|
3363
3366
|
const errorText = (rawErrorText || "Unknown error").replace(/^Error:\s*/, "");
|
|
3364
|
-
const rawPath =
|
|
3367
|
+
const rawPath =
|
|
3368
|
+
typeof args?.file_path === "string" ? args.file_path : typeof args?.path === "string" ? args.path : "";
|
|
3365
3369
|
const filePath =
|
|
3366
3370
|
formatReadPathLink(rawPath, { offset: args?.offset, sourcePath: readSourceFsPath(result.details) }) ||
|
|
3367
3371
|
shortenPath(rawPath);
|
|
@@ -3388,7 +3392,8 @@ export const readToolRenderer = {
|
|
|
3388
3392
|
// echo next to the styled warning line below.
|
|
3389
3393
|
const contentText = details?.displayContent?.text ?? stripOutputNotice(rawText, details?.meta);
|
|
3390
3394
|
const imageContent = result.content?.find(c => c.type === "image");
|
|
3391
|
-
const rawPath =
|
|
3395
|
+
const rawPath =
|
|
3396
|
+
typeof args?.file_path === "string" ? args.file_path : typeof args?.path === "string" ? args.path : "";
|
|
3392
3397
|
const renderPath = splitReadRenderPath(rawPath);
|
|
3393
3398
|
const lang = getLanguageFromPath(renderPath.path);
|
|
3394
3399
|
|
|
@@ -669,7 +669,10 @@ export function truncateDiffByHunk(
|
|
|
669
669
|
// Path Utilities
|
|
670
670
|
// =============================================================================
|
|
671
671
|
|
|
672
|
-
export function shortenPath(filePath:
|
|
672
|
+
export function shortenPath(filePath: unknown, homeDir?: string): string {
|
|
673
|
+
if (typeof filePath !== "string") {
|
|
674
|
+
return "";
|
|
675
|
+
}
|
|
673
676
|
const home = homeDir ?? os.homedir();
|
|
674
677
|
if (home && filePath.startsWith(home)) {
|
|
675
678
|
const suffix = filePath.slice(home.length);
|
package/src/tools/write.ts
CHANGED
|
@@ -914,7 +914,7 @@ export class WriteTool implements AgentTool<typeof writeSchema, WriteToolDetails
|
|
|
914
914
|
|
|
915
915
|
// Try ACP bridge first for editor-visible filesystem paths. Internal
|
|
916
916
|
// artifacts such as local:// plans are owned by OMP, not the editor.
|
|
917
|
-
if (await routeWriteThroughBridge(this.session, path, absolutePath, cleanContent)) {
|
|
917
|
+
if (await routeWriteThroughBridge(this.session, path, absolutePath, cleanContent, signal)) {
|
|
918
918
|
const madeExecutable = await maybeMarkExecutableForShebang(absolutePath, cleanContent);
|
|
919
919
|
const header = maybeWriteSnapshotHeader(this.session, absolutePath, cleanContent);
|
|
920
920
|
const writeLine = `Successfully wrote ${cleanContent.length} bytes to ${displayPath}`;
|
|
@@ -972,8 +972,8 @@ export class WriteTool implements AgentTool<typeof writeSchema, WriteToolDetails
|
|
|
972
972
|
// =============================================================================
|
|
973
973
|
|
|
974
974
|
interface WriteRenderArgs {
|
|
975
|
-
path?:
|
|
976
|
-
file_path?:
|
|
975
|
+
path?: unknown;
|
|
976
|
+
file_path?: unknown;
|
|
977
977
|
content?: unknown;
|
|
978
978
|
}
|
|
979
979
|
|
|
@@ -1088,9 +1088,10 @@ function renderContentPreview(
|
|
|
1088
1088
|
|
|
1089
1089
|
export const writeToolRenderer = {
|
|
1090
1090
|
renderCall(args: WriteRenderArgs, options: RenderResultOptions, uiTheme: Theme): Component {
|
|
1091
|
-
const rawPath =
|
|
1091
|
+
const rawPath =
|
|
1092
|
+
typeof args.file_path === "string" ? args.file_path : typeof args.path === "string" ? args.path : "";
|
|
1092
1093
|
const filePath = shortenPath(rawPath);
|
|
1093
|
-
const lang = getLanguageFromPath(rawPath) ?? "text";
|
|
1094
|
+
const lang = rawPath ? (getLanguageFromPath(rawPath) ?? "text") : "text";
|
|
1094
1095
|
const langIcon = uiTheme.fg("muted", uiTheme.getLangIcon(lang));
|
|
1095
1096
|
const pathDisplay = filePath ? uiTheme.fg("accent", filePath) : uiTheme.fg("toolOutput", "…");
|
|
1096
1097
|
// No status icon on the head row: it's the head of the framed block, and
|
|
@@ -1135,10 +1136,11 @@ export const writeToolRenderer = {
|
|
|
1135
1136
|
uiTheme: Theme,
|
|
1136
1137
|
args?: WriteRenderArgs,
|
|
1137
1138
|
): Component {
|
|
1138
|
-
const rawPath =
|
|
1139
|
+
const rawPath =
|
|
1140
|
+
typeof args?.file_path === "string" ? args.file_path : typeof args?.path === "string" ? args.path : "";
|
|
1139
1141
|
const filePath = shortenPath(rawPath);
|
|
1140
1142
|
const fileContent = normalizeDisplayText(args?.content);
|
|
1141
|
-
const lang = getLanguageFromPath(rawPath);
|
|
1143
|
+
const lang = rawPath ? getLanguageFromPath(rawPath) : undefined;
|
|
1142
1144
|
const langIcon = uiTheme.fg("muted", uiTheme.getLangIcon(lang));
|
|
1143
1145
|
// The header shows the cwd-relative path but links to the absolute path the
|
|
1144
1146
|
// write resolved to (args.path may be relative, which would yield a broken
|
|
@@ -23,10 +23,12 @@ import type { Settings } from "../config/settings";
|
|
|
23
23
|
import speechRewritePrompt from "../prompts/system/speech-rewrite.md" with { type: "text" };
|
|
24
24
|
|
|
25
25
|
const SYSTEM_PROMPT = prompt.render(speechRewritePrompt);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
// Rewrite budget: a paragraph in, a spoken paragraph (usually shorter) out.
|
|
27
|
+
// Always reserve enough room to survive backends that ignore `disableReasoning`
|
|
28
|
+
// (e.g. Qwen3 via llama.cpp catalogued `reasoning: false` but still emitting
|
|
29
|
+
// thinking). `maxTokens` is a hard cap — non-thinking completions still return
|
|
30
|
+
// in a normal spoken-paragraph budget (issue #4355).
|
|
31
|
+
const ANSWER_MAX_TOKENS = 1536;
|
|
30
32
|
/** Per-block completion deadline before falling back to mechanical cleanup. */
|
|
31
33
|
const REWRITE_TIMEOUT_MS = 6000;
|
|
32
34
|
/** Bound block characters sent to the model (huge diffs/code dumps get elided). */
|
|
@@ -89,7 +91,7 @@ export class SpeechEnhancer {
|
|
|
89
91
|
},
|
|
90
92
|
{
|
|
91
93
|
apiKey: registry.resolver(model, sessionId),
|
|
92
|
-
maxTokens:
|
|
94
|
+
maxTokens: ANSWER_MAX_TOKENS,
|
|
93
95
|
disableReasoning: true,
|
|
94
96
|
metadata,
|
|
95
97
|
signal: signal ? AbortSignal.any([signal, timeout]) : timeout,
|
package/src/tts/vocalizer.ts
CHANGED
|
@@ -195,6 +195,15 @@ export class Vocalizer {
|
|
|
195
195
|
this.#livePlayers.clear();
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
+
/**
|
|
199
|
+
* True while any utterance is still audible or synthesizing — a live
|
|
200
|
+
* player, an unfinished stream handle, or an in-flight rewrite is enough.
|
|
201
|
+
* Callers (Esc handler) treat this as the "silence me" signal.
|
|
202
|
+
*/
|
|
203
|
+
isSpeaking(): boolean {
|
|
204
|
+
return this.#livePlayers.size > 0 || this.#liveAborts.size > 0 || this.#handle !== null;
|
|
205
|
+
}
|
|
206
|
+
|
|
198
207
|
/** Lower the volume while the user is speaking (push-to-talk), so speech doesn't drown them out. */
|
|
199
208
|
duck(): void {
|
|
200
209
|
this.#ducked = true;
|
|
@@ -16,8 +16,12 @@ import { concreteThinkingLevel, toReasoningEffort } from "../thinking";
|
|
|
16
16
|
|
|
17
17
|
const COMMIT_SYSTEM_PROMPT = prompt.render(commitSystemPrompt);
|
|
18
18
|
const MAX_DIFF_CHARS = 4000;
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
// Cover the "backend ignores `disableReasoning`" case unconditionally: the
|
|
20
|
+
// static `model.reasoning` catalog flag can't distinguish a thinking model
|
|
21
|
+
// declared `reasoning: false` (e.g. Qwen3 served locally via llama.cpp) from
|
|
22
|
+
// one that never emits thinking. `maxTokens` is a hard cap — non-thinking
|
|
23
|
+
// completions still return in a handful of tokens (issue #4355).
|
|
24
|
+
const COMMIT_MAX_TOKENS = 1024;
|
|
21
25
|
|
|
22
26
|
/** File patterns that should be excluded from commit message generation diffs. */
|
|
23
27
|
const NOISE_SUFFIXES = [".lock", ".lockb", "-lock.json", "-lock.yaml"];
|
|
@@ -101,9 +105,7 @@ export async function generateCommitMessage(
|
|
|
101
105
|
if (!apiKey) continue;
|
|
102
106
|
|
|
103
107
|
try {
|
|
104
|
-
const maxTokens =
|
|
105
|
-
? Math.max(COMMIT_MAX_TOKENS, REASONING_SAFE_MAX_TOKENS)
|
|
106
|
-
: COMMIT_MAX_TOKENS;
|
|
108
|
+
const maxTokens = COMMIT_MAX_TOKENS;
|
|
107
109
|
const response = await completeSimple(
|
|
108
110
|
candidate.model,
|
|
109
111
|
{
|
|
@@ -260,6 +260,7 @@ export async function getOrCreateSnapshot(
|
|
|
260
260
|
// Generate and execute snapshot script
|
|
261
261
|
const script = generateSnapshotScript(shell, snapshotPath, rcFile);
|
|
262
262
|
|
|
263
|
+
let succeeded = false;
|
|
263
264
|
try {
|
|
264
265
|
const snapshotEnv = sanitizeSnapshotEnv(env);
|
|
265
266
|
const spawnEnv: Record<string, string> = {};
|
|
@@ -289,10 +290,19 @@ export async function getOrCreateSnapshot(
|
|
|
289
290
|
}
|
|
290
291
|
scrubSnapshotInPlace(snapshotPath);
|
|
291
292
|
cachedSnapshotPaths.set(cacheKey, snapshotPath);
|
|
293
|
+
succeeded = true;
|
|
292
294
|
return snapshotPath;
|
|
293
295
|
}
|
|
294
296
|
} catch {
|
|
295
297
|
// Snapshot creation failed, proceed without it
|
|
298
|
+
} finally {
|
|
299
|
+
if (!succeeded) {
|
|
300
|
+
try {
|
|
301
|
+
fs.rmSync(snapshotPath, { force: true });
|
|
302
|
+
} catch {
|
|
303
|
+
// best-effort cleanup; force: true ignores ENOENT
|
|
304
|
+
}
|
|
305
|
+
}
|
|
296
306
|
}
|
|
297
307
|
|
|
298
308
|
return null;
|