@oh-my-pi/pi-coding-agent 16.3.5 → 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 +78 -0
- package/dist/cli.js +3625 -3596
- 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/file-snapshot-store.d.ts +4 -2
- 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 -16
- 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 +13 -11
- 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 +12 -5
- 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 +17 -12
- package/dist/types/modes/components/background-tan-message.d.ts +2 -2
- package/dist/types/modes/components/bash-execution.d.ts +7 -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 +7 -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 +4 -14
- package/dist/types/modes/components/transcript-container.d.ts +26 -28
- 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 +25 -8
- 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 +57 -41
- 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 -6
- 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 +14 -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 -5
- 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 -22
- 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 -7
- 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 +8 -8
- 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/file-snapshot-store.ts +5 -2
- 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 -35
- 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/custom-tools/types.ts +2 -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/extensibility/shared-events.ts +9 -1
- 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/assistant-message.ts +134 -82
- package/src/modes/components/bash-execution.ts +9 -0
- package/src/modes/components/chat-transcript-builder.ts +15 -7
- package/src/modes/components/copy-selector.ts +16 -4
- package/src/modes/components/eval-execution.ts +9 -0
- 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 +12 -53
- package/src/modes/components/transcript-container.ts +82 -432
- package/src/modes/components/tree-selector.ts +9 -3
- package/src/modes/controllers/command-controller.ts +10 -3
- package/src/modes/controllers/event-controller.ts +78 -17
- package/src/modes/controllers/extension-ui-controller.test.ts +58 -0
- package/src/modes/controllers/extension-ui-controller.ts +12 -7
- package/src/modes/controllers/input-controller.ts +12 -10
- 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 +66 -36
- 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 +54 -13
- package/src/modes/utils/ui-helpers.ts +17 -8
- 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 +113 -12
- package/src/session/agent-session.ts +350 -61
- package/src/session/messages.ts +102 -2
- package/src/session/session-context.ts +67 -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 -17
- package/src/tools/browser/render.ts +6 -4
- package/src/tools/browser/tab-supervisor.ts +47 -3
- package/src/tools/eval-render.ts +0 -20
- 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 +76 -28
- package/src/tools/render-utils.ts +4 -1
- package/src/tools/renderers.ts +0 -20
- package/src/tools/ssh.ts +0 -16
- package/src/tools/write.ts +22 -13
- 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
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Tree-based rendering with collapsed/expanded states for web search results.
|
|
5
5
|
*/
|
|
6
6
|
import type { Component } from "@oh-my-pi/pi-tui";
|
|
7
|
-
import type { RenderResultOptions } from "../../extensibility/custom-tools/types";
|
|
8
|
-
import { type Theme } from "../../modes/theme/theme";
|
|
9
|
-
import type { SearchResponse } from "./types";
|
|
7
|
+
import type { RenderResultOptions } from "../../extensibility/custom-tools/types.js";
|
|
8
|
+
import { type Theme } from "../../modes/theme/theme.js";
|
|
9
|
+
import type { SearchResponse } from "./types.js";
|
|
10
10
|
export interface SearchRenderDetails {
|
|
11
11
|
response: SearchResponse;
|
|
12
12
|
error?: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-coding-agent",
|
|
4
|
-
"version": "16.3.
|
|
4
|
+
"version": "16.3.7",
|
|
5
5
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -56,17 +56,17 @@
|
|
|
56
56
|
"@agentclientprotocol/sdk": "0.25.0",
|
|
57
57
|
"@babel/parser": "^7.29.7",
|
|
58
58
|
"@mozilla/readability": "^0.6.0",
|
|
59
|
-
"@oh-my-pi/hashline": "16.3.
|
|
60
|
-
"@oh-my-pi/omp-stats": "16.3.
|
|
61
|
-
"@oh-my-pi/pi-agent-core": "16.3.
|
|
62
|
-
"@oh-my-pi/pi-ai": "16.3.
|
|
63
|
-
"@oh-my-pi/pi-catalog": "16.3.
|
|
64
|
-
"@oh-my-pi/pi-mnemopi": "16.3.
|
|
65
|
-
"@oh-my-pi/pi-natives": "16.3.
|
|
66
|
-
"@oh-my-pi/pi-tui": "16.3.
|
|
67
|
-
"@oh-my-pi/pi-utils": "16.3.
|
|
68
|
-
"@oh-my-pi/pi-wire": "16.3.
|
|
69
|
-
"@oh-my-pi/snapcompact": "16.3.
|
|
59
|
+
"@oh-my-pi/hashline": "16.3.7",
|
|
60
|
+
"@oh-my-pi/omp-stats": "16.3.7",
|
|
61
|
+
"@oh-my-pi/pi-agent-core": "16.3.7",
|
|
62
|
+
"@oh-my-pi/pi-ai": "16.3.7",
|
|
63
|
+
"@oh-my-pi/pi-catalog": "16.3.7",
|
|
64
|
+
"@oh-my-pi/pi-mnemopi": "16.3.7",
|
|
65
|
+
"@oh-my-pi/pi-natives": "16.3.7",
|
|
66
|
+
"@oh-my-pi/pi-tui": "16.3.7",
|
|
67
|
+
"@oh-my-pi/pi-utils": "16.3.7",
|
|
68
|
+
"@oh-my-pi/pi-wire": "16.3.7",
|
|
69
|
+
"@oh-my-pi/snapcompact": "16.3.7",
|
|
70
70
|
"@opentelemetry/api": "^1.9.1",
|
|
71
71
|
"@opentelemetry/context-async-hooks": "^2.7.1",
|
|
72
72
|
"@opentelemetry/exporter-trace-otlp-proto": "^0.218.0",
|
|
@@ -164,6 +164,65 @@ describe("advisor", () => {
|
|
|
164
164
|
expect(md).toContain("[irc]");
|
|
165
165
|
expect(md).not.toContain("<primary-context");
|
|
166
166
|
});
|
|
167
|
+
|
|
168
|
+
it("omits hidden non-primary custom messages while keeping visible custom messages", () => {
|
|
169
|
+
const hiddenPrelude = {
|
|
170
|
+
role: "custom",
|
|
171
|
+
customType: "eager-todo-prelude",
|
|
172
|
+
content: "<system-reminder>Task delegation is enabled",
|
|
173
|
+
display: false,
|
|
174
|
+
timestamp: 1,
|
|
175
|
+
} as AgentMessage;
|
|
176
|
+
const hiddenHookMessage = {
|
|
177
|
+
role: "hookMessage",
|
|
178
|
+
customType: "hidden-hook-reminder",
|
|
179
|
+
content: "Hidden hook reminder should never reach advisor history",
|
|
180
|
+
display: false,
|
|
181
|
+
timestamp: 2,
|
|
182
|
+
} as AgentMessage;
|
|
183
|
+
const visibleCustom = {
|
|
184
|
+
role: "custom",
|
|
185
|
+
customType: "visible-status",
|
|
186
|
+
content: "Visible custom update",
|
|
187
|
+
display: true,
|
|
188
|
+
timestamp: 3,
|
|
189
|
+
} as AgentMessage;
|
|
190
|
+
|
|
191
|
+
const md = formatSessionHistoryMarkdown([hiddenPrelude, hiddenHookMessage, visibleCustom], {
|
|
192
|
+
expandPrimaryContext: true,
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
expect(md).toContain("[visible-status] Visible custom update");
|
|
196
|
+
expect(md).not.toContain("eager-todo-prelude");
|
|
197
|
+
expect(md).not.toContain("system-reminder");
|
|
198
|
+
expect(md).not.toContain("Task delegation");
|
|
199
|
+
expect(md).not.toContain("hidden-hook-reminder");
|
|
200
|
+
expect(md).not.toContain("Hidden hook reminder");
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
it("keeps hidden image descriptions because they are the text transcript for attached images", () => {
|
|
204
|
+
const imageDescription = {
|
|
205
|
+
role: "custom",
|
|
206
|
+
customType: "image-attachment-description",
|
|
207
|
+
content: [{ type: "text", text: '<image path="local://session/cat.png">cat on a keyboard</image>' }],
|
|
208
|
+
display: false,
|
|
209
|
+
timestamp: 1,
|
|
210
|
+
} as AgentMessage;
|
|
211
|
+
const hiddenPrelude = {
|
|
212
|
+
role: "custom",
|
|
213
|
+
customType: "eager-todo-prelude",
|
|
214
|
+
content: "<system-reminder>Task delegation is enabled",
|
|
215
|
+
display: false,
|
|
216
|
+
timestamp: 2,
|
|
217
|
+
} as AgentMessage;
|
|
218
|
+
|
|
219
|
+
const md = formatSessionHistoryMarkdown([imageDescription, hiddenPrelude], { expandPrimaryContext: true });
|
|
220
|
+
|
|
221
|
+
expect(md).toContain("[image-attachment-description]");
|
|
222
|
+
expect(md).toContain("cat on a keyboard");
|
|
223
|
+
expect(md).not.toContain("eager-todo-prelude");
|
|
224
|
+
expect(md).not.toContain("Task delegation");
|
|
225
|
+
});
|
|
167
226
|
});
|
|
168
227
|
|
|
169
228
|
describe("formatSessionHistoryMarkdown expandEditDiffs", () => {
|
|
@@ -35,13 +35,14 @@ const DIFFICULTY_SYSTEM_PROMPT = prompt.render(difficultySystemPrompt);
|
|
|
35
35
|
const MAX_INPUT_CHARS = 6000;
|
|
36
36
|
const HEAD_CHARS = 4000;
|
|
37
37
|
const TAIL_CHARS = 2000;
|
|
38
|
-
/** The online answer is a single word; keep budgets tiny for non-reasoning backends. */
|
|
39
|
-
const ANSWER_MAX_TOKENS = 8;
|
|
40
38
|
/** Local classifiers occasionally need more room for chat-template boilerplate. */
|
|
41
39
|
const LOCAL_ANSWER_MAX_TOKENS = 16;
|
|
42
40
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
41
|
+
* Online classifier budget. Sized to survive backends that ignore
|
|
42
|
+
* `disableReasoning` (e.g. Qwen3 via llama.cpp catalogued `reasoning: false`
|
|
43
|
+
* but still emitting thinking): the classifier keyword needs to land after any
|
|
44
|
+
* unavoidable thinking preamble. `maxTokens` is a hard cap — non-thinking
|
|
45
|
+
* completions still return in a handful of tokens (issue #4355).
|
|
45
46
|
*/
|
|
46
47
|
const REASONING_SAFE_MAX_TOKENS = 1024;
|
|
47
48
|
|
|
@@ -85,7 +86,7 @@ async function classifyOnline(input: string, deps: ClassifyDifficultyDeps): Prom
|
|
|
85
86
|
}
|
|
86
87
|
// Resolve metadata after getApiKey so the session-sticky credential is recorded first.
|
|
87
88
|
const metadata = deps.metadataResolver?.(model.provider);
|
|
88
|
-
const maxTokens =
|
|
89
|
+
const maxTokens = REASONING_SAFE_MAX_TOKENS;
|
|
89
90
|
|
|
90
91
|
const response = await completeSimple(
|
|
91
92
|
model,
|
|
@@ -21,6 +21,9 @@ const BACKOFF_BASE_MS = 1_000;
|
|
|
21
21
|
const BACKOFF_MAX_MS = 30_000;
|
|
22
22
|
/** Max enveloped frames buffered while a reconnect is pending; overflow is dropped. */
|
|
23
23
|
const MAX_PENDING_SENDS = 256;
|
|
24
|
+
const WS_BACKPRESSURE_THRESHOLD = 64 * 1024;
|
|
25
|
+
const WS_BACKPRESSURE_DRAIN_THRESHOLD = 32 * 1024;
|
|
26
|
+
const WS_BACKPRESSURE_DRAIN_RETRY_MS = 25;
|
|
24
27
|
|
|
25
28
|
export interface CollabSocketOptions {
|
|
26
29
|
/** wss://host[:port]/r/<roomId> — no query string. */
|
|
@@ -40,6 +43,7 @@ export class CollabSocket {
|
|
|
40
43
|
readonly #opts: CollabSocketOptions;
|
|
41
44
|
#ws: WebSocket | null = null;
|
|
42
45
|
#retryTimer: NodeJS.Timeout | undefined;
|
|
46
|
+
#backpressureDrainTimer: NodeJS.Timeout | undefined;
|
|
43
47
|
#attempt = 0;
|
|
44
48
|
/** Terminal state: intentional close or fatal failure. Cleared by connect(). */
|
|
45
49
|
#closed = false;
|
|
@@ -72,28 +76,84 @@ export class CollabSocket {
|
|
|
72
76
|
logger.debug("collab: dropping frame, socket closed", { t: frame.t });
|
|
73
77
|
return;
|
|
74
78
|
}
|
|
79
|
+
const openWs = this.#ws;
|
|
80
|
+
if (openWs && openWs.readyState === WebSocket.OPEN) this.#drainPendingSends(openWs);
|
|
75
81
|
const sealed = await seal(this.#opts.key, frame);
|
|
76
82
|
const envelope = packEnvelope(targetPeer, sealed);
|
|
77
83
|
const ws = this.#ws;
|
|
78
84
|
if (ws && ws.readyState === WebSocket.OPEN) {
|
|
85
|
+
if (this.#pendingSends.length > 0) {
|
|
86
|
+
this.#enqueuePendingSend(envelope, frame.t);
|
|
87
|
+
if (ws.bufferedAmount < WS_BACKPRESSURE_DRAIN_THRESHOLD) {
|
|
88
|
+
this.#drainPendingSends(ws);
|
|
89
|
+
} else {
|
|
90
|
+
this.#scheduleBackpressureDrain(ws);
|
|
91
|
+
}
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
if (ws.bufferedAmount >= WS_BACKPRESSURE_THRESHOLD) {
|
|
95
|
+
this.#enqueuePendingSend(envelope, frame.t);
|
|
96
|
+
this.#scheduleBackpressureDrain(ws);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
79
99
|
ws.send(envelope);
|
|
80
100
|
return;
|
|
81
101
|
}
|
|
82
|
-
|
|
83
|
-
logger.debug("collab: dropping frame, reconnect buffer full", { t: frame.t });
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
this.#pendingSends.push(envelope);
|
|
102
|
+
this.#enqueuePendingSend(envelope, frame.t);
|
|
87
103
|
})
|
|
88
104
|
.catch((err: unknown) => {
|
|
89
105
|
logger.debug("collab: send failed", { error: String(err) });
|
|
90
106
|
});
|
|
91
107
|
}
|
|
92
108
|
|
|
109
|
+
#enqueuePendingSend(envelope: Uint8Array, frameType: CollabFrame["t"]): void {
|
|
110
|
+
if (this.#pendingSends.length >= MAX_PENDING_SENDS) {
|
|
111
|
+
logger.debug("collab: dropping frame, reconnect buffer full", { t: frameType });
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
this.#pendingSends.push(envelope);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
#drainPendingSends(ws: WebSocket): void {
|
|
118
|
+
while (
|
|
119
|
+
this.#pendingSends.length > 0 &&
|
|
120
|
+
ws.readyState === WebSocket.OPEN &&
|
|
121
|
+
ws.bufferedAmount < WS_BACKPRESSURE_DRAIN_THRESHOLD
|
|
122
|
+
) {
|
|
123
|
+
const envelope = this.#pendingSends.shift();
|
|
124
|
+
if (!envelope) return;
|
|
125
|
+
ws.send(envelope);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
#scheduleBackpressureDrain(ws: WebSocket): void {
|
|
130
|
+
if (this.#backpressureDrainTimer !== undefined) return;
|
|
131
|
+
this.#backpressureDrainTimer = setTimeout(() => {
|
|
132
|
+
this.#backpressureDrainTimer = undefined;
|
|
133
|
+
this.#sendChain = this.#sendChain
|
|
134
|
+
.then(async () => {
|
|
135
|
+
if (this.#closed || this.#ws !== ws || ws.readyState !== WebSocket.OPEN) return;
|
|
136
|
+
this.#drainPendingSends(ws);
|
|
137
|
+
if (this.#pendingSends.length > 0) this.#scheduleBackpressureDrain(ws);
|
|
138
|
+
})
|
|
139
|
+
.catch((err: unknown) => {
|
|
140
|
+
logger.debug("collab: backpressure drain failed", { error: String(err) });
|
|
141
|
+
});
|
|
142
|
+
}, WS_BACKPRESSURE_DRAIN_RETRY_MS);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
#clearBackpressureDrain(): void {
|
|
146
|
+
if (this.#backpressureDrainTimer !== undefined) {
|
|
147
|
+
clearTimeout(this.#backpressureDrainTimer);
|
|
148
|
+
this.#backpressureDrainTimer = undefined;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
93
152
|
/** Intentional close: clears any retry timer, suppresses reconnect. A later connect() starts fresh. */
|
|
94
153
|
close(): void {
|
|
95
154
|
const hadActivity = this.#ws !== null || this.#retryTimer !== undefined;
|
|
96
155
|
this.#clearRetry();
|
|
156
|
+
this.#clearBackpressureDrain();
|
|
97
157
|
const wasClosed = this.#closed;
|
|
98
158
|
this.#closed = true;
|
|
99
159
|
this.#pendingSends.length = 0;
|
|
@@ -110,14 +170,17 @@ export class CollabSocket {
|
|
|
110
170
|
}
|
|
111
171
|
|
|
112
172
|
#openSocket(): void {
|
|
173
|
+
this.#clearBackpressureDrain();
|
|
113
174
|
const ws = new WebSocket(`${this.#opts.wsUrl}?role=${this.#opts.role}`);
|
|
114
175
|
ws.binaryType = "arraybuffer";
|
|
115
176
|
this.#ws = ws;
|
|
116
177
|
ws.onopen = () => {
|
|
117
178
|
if (this.#ws !== ws) return;
|
|
118
179
|
this.#attempt = 0;
|
|
119
|
-
|
|
120
|
-
|
|
180
|
+
if (this.#pendingSends.length > 0) {
|
|
181
|
+
this.#drainPendingSends(ws);
|
|
182
|
+
if (this.#pendingSends.length > 0) this.#scheduleBackpressureDrain(ws);
|
|
183
|
+
}
|
|
121
184
|
this.onOpen?.();
|
|
122
185
|
};
|
|
123
186
|
ws.onmessage = (event: MessageEvent) => {
|
|
@@ -129,6 +192,7 @@ export class CollabSocket {
|
|
|
129
192
|
};
|
|
130
193
|
ws.onclose = (event: CloseEvent) => {
|
|
131
194
|
if (this.#ws !== ws) return;
|
|
195
|
+
this.#clearBackpressureDrain();
|
|
132
196
|
this.#ws = null;
|
|
133
197
|
this.#handleClose(event.code, event.reason);
|
|
134
198
|
};
|
|
@@ -167,6 +231,7 @@ export class CollabSocket {
|
|
|
167
231
|
|
|
168
232
|
#handleClose(code: number, reason: string): void {
|
|
169
233
|
if (this.#closed) return;
|
|
234
|
+
this.#clearBackpressureDrain();
|
|
170
235
|
const fatalReason = FATAL_CLOSE_REASONS[code];
|
|
171
236
|
if (fatalReason !== undefined) {
|
|
172
237
|
this.#closed = true;
|
|
@@ -186,6 +251,7 @@ export class CollabSocket {
|
|
|
186
251
|
this.#pendingSends.length = 0;
|
|
187
252
|
const ws = this.#ws;
|
|
188
253
|
this.#ws = null;
|
|
254
|
+
this.#clearBackpressureDrain();
|
|
189
255
|
if (ws) {
|
|
190
256
|
try {
|
|
191
257
|
ws.close(1000);
|
|
@@ -48,6 +48,13 @@ const STARTUP_MODEL_CACHE_PROVIDER_IDS: readonly string[] = [
|
|
|
48
48
|
// packages/ai/src/registry/lm-studio.ts, and packages/ai/src/registry/vllm.ts.
|
|
49
49
|
const LOCAL_PROVIDER_PLACEHOLDERS = new Set<string>(["llama-cpp-local", "lm-studio-local", "vllm-local"]);
|
|
50
50
|
|
|
51
|
+
/**
|
|
52
|
+
* Hard bound for extension-provided fetchDynamicModels to prevent indefinite hangs
|
|
53
|
+
* during runtime provider discovery. Uses a cancellable manual timer (not AbortSignal.timeout)
|
|
54
|
+
* so a successful fast path does not leave an armed timeout signal for concurrent GC.
|
|
55
|
+
*/
|
|
56
|
+
const RUNTIME_DYNAMIC_MODEL_FETCH_TIMEOUT_MS = 15_000;
|
|
57
|
+
|
|
51
58
|
import type { ApiKeyResolver, FetchImpl } from "@oh-my-pi/pi-ai";
|
|
52
59
|
import { registerOAuthProvider, unregisterOAuthProviders } from "@oh-my-pi/pi-ai/oauth";
|
|
53
60
|
import type { OAuthCredentials, OAuthLoginCallbacks } from "@oh-my-pi/pi-ai/oauth/types";
|
|
@@ -81,6 +88,24 @@ function isDiscoveryBearerApiKey(apiKey: string | undefined | null): apiKey is s
|
|
|
81
88
|
return isAuthenticated(apiKey) && !LOCAL_PROVIDER_PLACEHOLDERS.has(apiKey);
|
|
82
89
|
}
|
|
83
90
|
|
|
91
|
+
/**
|
|
92
|
+
* Wraps an extension-provided fetchDynamicModels call with a hard timeout.
|
|
93
|
+
* Uses a cancellable manual timer (not AbortSignal.timeout) so that a fast
|
|
94
|
+
* successful path does not leave an armed timeout signal for concurrent GC.
|
|
95
|
+
* The inner fetcher does not receive a signal (extension contract has none).
|
|
96
|
+
*/
|
|
97
|
+
async function withRuntimeDynamicModelsTimeout<T>(timeoutMs: number, run: () => Promise<T>): Promise<T> {
|
|
98
|
+
const { promise: timeoutPromise, reject: timeoutReject } = Promise.withResolvers<never>();
|
|
99
|
+
const timer = setTimeout(() => {
|
|
100
|
+
timeoutReject(new Error(`fetchDynamicModels timed out after ${timeoutMs}ms`));
|
|
101
|
+
}, timeoutMs);
|
|
102
|
+
try {
|
|
103
|
+
return await Promise.race([run(), timeoutPromise]);
|
|
104
|
+
} finally {
|
|
105
|
+
clearTimeout(timer);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
84
109
|
/** Provider override config (baseUrl, headers, apiKey, compat, transport) without custom models */
|
|
85
110
|
interface ProviderOverride {
|
|
86
111
|
baseUrl?: string;
|
|
@@ -240,6 +265,13 @@ interface CustomModelsResult {
|
|
|
240
265
|
}
|
|
241
266
|
|
|
242
267
|
const commandValueCache = new Map<string, string>();
|
|
268
|
+
// Failed `!command` resolutions (non-zero exit, empty stdout) are negative-cached
|
|
269
|
+
// with a TTL instead of forever: a transient failure (locked password manager,
|
|
270
|
+
// network hiccup) must not disable the key until process restart, but re-running
|
|
271
|
+
// the command on every resolution would restore the execSync storm this cache
|
|
272
|
+
// exists to prevent. One probe per TTL window bounds both.
|
|
273
|
+
const COMMAND_FAILURE_RETRY_MS = 30_000;
|
|
274
|
+
const commandFailureRetryAt = new Map<string, number>();
|
|
243
275
|
|
|
244
276
|
function isCommandConfigValue(valueConfig: string | undefined): valueConfig is string {
|
|
245
277
|
return valueConfig?.startsWith("!") === true;
|
|
@@ -248,13 +280,20 @@ function isCommandConfigValue(valueConfig: string | undefined): valueConfig is s
|
|
|
248
280
|
function resolveCommandConfig(command: string): string | undefined {
|
|
249
281
|
const cached = commandValueCache.get(command);
|
|
250
282
|
if (cached !== undefined) return cached;
|
|
283
|
+
const retryAt = commandFailureRetryAt.get(command);
|
|
284
|
+
if (retryAt !== undefined && Date.now() < retryAt) return undefined;
|
|
251
285
|
try {
|
|
252
286
|
const stdout = execSync(command, { encoding: "utf8", timeout: 10_000, windowsHide: true });
|
|
253
287
|
const trimmed = stdout.trim();
|
|
254
|
-
if (trimmed.length === 0)
|
|
288
|
+
if (trimmed.length === 0) {
|
|
289
|
+
commandFailureRetryAt.set(command, Date.now() + COMMAND_FAILURE_RETRY_MS);
|
|
290
|
+
return undefined;
|
|
291
|
+
}
|
|
292
|
+
commandFailureRetryAt.delete(command);
|
|
255
293
|
commandValueCache.set(command, trimmed);
|
|
256
294
|
return trimmed;
|
|
257
295
|
} catch {
|
|
296
|
+
commandFailureRetryAt.set(command, Date.now() + COMMAND_FAILURE_RETRY_MS);
|
|
258
297
|
return undefined;
|
|
259
298
|
}
|
|
260
299
|
}
|
|
@@ -2134,7 +2173,9 @@ export class ModelRegistry {
|
|
|
2134
2173
|
fetchDynamicModels: async () => {
|
|
2135
2174
|
const apiKey = await this.#peekApiKeyForProvider(providerName);
|
|
2136
2175
|
const resolvedKey = isAuthenticated(apiKey) ? apiKey : undefined;
|
|
2137
|
-
const modelDefs = await
|
|
2176
|
+
const modelDefs = await withRuntimeDynamicModelsTimeout(RUNTIME_DYNAMIC_MODEL_FETCH_TIMEOUT_MS, () =>
|
|
2177
|
+
fetcher(resolvedKey),
|
|
2178
|
+
);
|
|
2138
2179
|
const results: Model<Api>[] = [];
|
|
2139
2180
|
for (const modelDef of modelDefs) {
|
|
2140
2181
|
const overlay = buildCustomModelOverlay(
|
|
@@ -864,7 +864,7 @@ function getModelRoleAlias(value: string): ModelRole | undefined {
|
|
|
864
864
|
|
|
865
865
|
function normalizeModelPatternList(value: string | string[] | undefined): string[] {
|
|
866
866
|
if (!value) return [];
|
|
867
|
-
const patterns = Array.isArray(value) ? value : value.split(",");
|
|
867
|
+
const patterns = Array.isArray(value) ? value.flatMap(pattern => pattern.split(",")) : value.split(",");
|
|
868
868
|
return patterns.map(pattern => pattern.trim()).filter(Boolean);
|
|
869
869
|
}
|
|
870
870
|
|
|
@@ -2268,6 +2268,11 @@ export const SETTINGS_SCHEMA = {
|
|
|
2268
2268
|
description:
|
|
2269
2269
|
"8x13 glyphs on an 11x16 cell — extra letter spacing so characters don't merge. Default for Anthropic.",
|
|
2270
2270
|
},
|
|
2271
|
+
{
|
|
2272
|
+
value: "silver16-bw",
|
|
2273
|
+
label: "Silver 16, CJK",
|
|
2274
|
+
description: "Embedded Silver TrueType font on a 16px grid for CJK and other non-Latin text.",
|
|
2275
|
+
},
|
|
2271
2276
|
{
|
|
2272
2277
|
value: "doc-8on16-bw",
|
|
2273
2278
|
label: "Doc 8on16, black",
|
|
@@ -3166,18 +3171,6 @@ export const SETTINGS_SCHEMA = {
|
|
|
3166
3171
|
},
|
|
3167
3172
|
"bashInterceptor.patterns": { type: "array", default: DEFAULT_BASH_INTERCEPTOR_RULES },
|
|
3168
3173
|
|
|
3169
|
-
"bash.stripTrailingHeadTail": {
|
|
3170
|
-
type: "boolean",
|
|
3171
|
-
default: true,
|
|
3172
|
-
ui: {
|
|
3173
|
-
tab: "shell",
|
|
3174
|
-
group: "Bash",
|
|
3175
|
-
label: "Strip head/tail Pipes",
|
|
3176
|
-
description:
|
|
3177
|
-
"Silently drop trailing `| head`/`| tail` pipes from single-line bash commands. Output is already truncated automatically.",
|
|
3178
|
-
},
|
|
3179
|
-
},
|
|
3180
|
-
|
|
3181
3174
|
// Shell output minimizer
|
|
3182
3175
|
"shellMinimizer.enabled": {
|
|
3183
3176
|
type: "boolean",
|
package/src/config/settings.ts
CHANGED
|
@@ -172,6 +172,14 @@ function isRecord(value: unknown): value is Record<string, unknown> {
|
|
|
172
172
|
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
+
function modelRoleValueFromUnknown(value: unknown): string | undefined {
|
|
176
|
+
if (typeof value === "string") return value;
|
|
177
|
+
if (!Array.isArray(value)) return undefined;
|
|
178
|
+
|
|
179
|
+
const entries = stringArrayFromUnknown(value);
|
|
180
|
+
return entries.length === value.length ? entries.join(",") : undefined;
|
|
181
|
+
}
|
|
182
|
+
|
|
175
183
|
type EditVariantEntry = {
|
|
176
184
|
patternLower: string;
|
|
177
185
|
mode: EditMode;
|
|
@@ -580,8 +588,8 @@ export class Settings {
|
|
|
580
588
|
const roles: Record<string, string> = {};
|
|
581
589
|
for (const role in value) {
|
|
582
590
|
if (!Object.hasOwn(value, role)) continue;
|
|
583
|
-
const modelId = value[role];
|
|
584
|
-
if (
|
|
591
|
+
const modelId = modelRoleValueFromUnknown(value[role]);
|
|
592
|
+
if (modelId !== undefined) {
|
|
585
593
|
roles[role] = modelId;
|
|
586
594
|
}
|
|
587
595
|
}
|
|
@@ -614,15 +622,27 @@ export class Settings {
|
|
|
614
622
|
* Get a model role (helper for modelRoles record).
|
|
615
623
|
*/
|
|
616
624
|
getModelRole(role: ModelRole | string): string | undefined {
|
|
617
|
-
const roles = this.get("modelRoles");
|
|
618
|
-
return
|
|
625
|
+
const roles: unknown = this.get("modelRoles");
|
|
626
|
+
if (!isRecord(roles)) return undefined;
|
|
627
|
+
return modelRoleValueFromUnknown(roles[role]);
|
|
619
628
|
}
|
|
620
629
|
|
|
621
630
|
/**
|
|
622
631
|
* Get all model roles (helper for modelRoles record).
|
|
623
632
|
*/
|
|
624
633
|
getModelRoles(): ReadOnlyDict<string> {
|
|
625
|
-
|
|
634
|
+
const roles: unknown = this.get("modelRoles");
|
|
635
|
+
if (!isRecord(roles)) return {};
|
|
636
|
+
|
|
637
|
+
const normalized: Record<string, string> = {};
|
|
638
|
+
for (const role in roles) {
|
|
639
|
+
if (!Object.hasOwn(roles, role)) continue;
|
|
640
|
+
const modelId = modelRoleValueFromUnknown(roles[role]);
|
|
641
|
+
if (modelId !== undefined) {
|
|
642
|
+
normalized[role] = modelId;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
return normalized;
|
|
626
646
|
}
|
|
627
647
|
|
|
628
648
|
/*
|
|
@@ -74,17 +74,20 @@ export function canonicalSnapshotKey(absolutePath: string): string {
|
|
|
74
74
|
* Producers that only displayed a slice of the file (range reads, search hits)
|
|
75
75
|
* use this to mint a whole-file tag: the displayed lines stay partial, but the
|
|
76
76
|
* tag fingerprints the entire file so a follow-up edit anchored at any line
|
|
77
|
-
* validates whenever the live file is byte-identical to what was read.
|
|
77
|
+
* validates whenever the live file is byte-identical to what was read. Raw
|
|
78
|
+
* reads pass `seenLines` even though they do not emit a header, letting a prior
|
|
79
|
+
* or later same-content hashline tag inherit the raw range's provenance.
|
|
78
80
|
*/
|
|
79
81
|
export async function recordFileSnapshot(
|
|
80
82
|
session: FileSnapshotStoreOwner,
|
|
81
83
|
absolutePath: string,
|
|
84
|
+
seenLines?: Iterable<number>,
|
|
82
85
|
): Promise<string | undefined> {
|
|
83
86
|
try {
|
|
84
87
|
const file = Bun.file(absolutePath);
|
|
85
88
|
if (file.size > SNAPSHOT_MAX_BYTES) return undefined;
|
|
86
89
|
const normalized = normalizeToLF(await file.text());
|
|
87
|
-
return getFileSnapshotStore(session).record(canonicalSnapshotKey(absolutePath), normalized);
|
|
90
|
+
return getFileSnapshotStore(session).record(canonicalSnapshotKey(absolutePath), normalized, seenLines);
|
|
88
91
|
} catch {
|
|
89
92
|
return undefined;
|
|
90
93
|
}
|
|
@@ -21,6 +21,7 @@ import * as path from "node:path";
|
|
|
21
21
|
import { Filesystem, NotFoundError, type PreflightWriteOptions, type WriteResult } from "@oh-my-pi/hashline";
|
|
22
22
|
import { isEnoent } from "@oh-my-pi/pi-utils";
|
|
23
23
|
import type { FileDiagnosticsResult, WritethroughCallback, WritethroughDeferredHandle } from "../../lsp";
|
|
24
|
+
import { FileChangeType, notifyWorkspaceWatchedFiles } from "../../lsp/client";
|
|
24
25
|
import type { ToolSession } from "../../tools";
|
|
25
26
|
import { routeWriteThroughBridge } from "../../tools/acp-bridge";
|
|
26
27
|
import { assertEditableFileContent } from "../../tools/auto-generated-guard";
|
|
@@ -157,6 +158,13 @@ export class HashlineFilesystem extends Filesystem {
|
|
|
157
158
|
if (isEnoent(error)) throw new NotFoundError(relativePath, error);
|
|
158
159
|
throw error;
|
|
159
160
|
}
|
|
161
|
+
if (this.session.enableLsp ?? true) {
|
|
162
|
+
await notifyWorkspaceWatchedFiles(
|
|
163
|
+
this.session.cwd,
|
|
164
|
+
[{ filePath: absolutePath, type: FileChangeType.Deleted }],
|
|
165
|
+
this.#signal,
|
|
166
|
+
);
|
|
167
|
+
}
|
|
160
168
|
invalidateFsScanAfterWrite(absolutePath);
|
|
161
169
|
}
|
|
162
170
|
|
|
@@ -170,6 +178,16 @@ export class HashlineFilesystem extends Filesystem {
|
|
|
170
178
|
} else {
|
|
171
179
|
await fs.rename(fromAbsolute, toAbsolute);
|
|
172
180
|
}
|
|
181
|
+
if (this.session.enableLsp ?? true) {
|
|
182
|
+
await notifyWorkspaceWatchedFiles(
|
|
183
|
+
this.session.cwd,
|
|
184
|
+
[
|
|
185
|
+
{ filePath: fromAbsolute, type: FileChangeType.Deleted },
|
|
186
|
+
{ filePath: toAbsolute, type: FileChangeType.Created },
|
|
187
|
+
],
|
|
188
|
+
this.#signal,
|
|
189
|
+
);
|
|
190
|
+
}
|
|
173
191
|
invalidateFsScanAfterWrite(fromAbsolute);
|
|
174
192
|
invalidateFsScanAfterWrite(toAbsolute);
|
|
175
193
|
}
|
|
@@ -180,7 +198,7 @@ export class HashlineFilesystem extends Filesystem {
|
|
|
180
198
|
const finalContent = await serializeEditFileText(absolutePath, relativePath, content);
|
|
181
199
|
|
|
182
200
|
// Route through ACP bridge when available; skips internal artifacts.
|
|
183
|
-
if (await routeWriteThroughBridge(this.session, relativePath, absolutePath, finalContent)) {
|
|
201
|
+
if (await routeWriteThroughBridge(this.session, relativePath, absolutePath, finalContent, this.#signal)) {
|
|
184
202
|
this.#diagnosticsByPath.set(relativePath, undefined);
|
|
185
203
|
return { text: finalContent };
|
|
186
204
|
}
|
package/src/edit/modes/patch.ts
CHANGED
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
type WritethroughCallback,
|
|
17
17
|
type WritethroughDeferredHandle,
|
|
18
18
|
} from "../../lsp";
|
|
19
|
+
import { FileChangeType, notifyWorkspaceWatchedFiles } from "../../lsp/client";
|
|
19
20
|
import type { ToolSession } from "../../tools";
|
|
20
21
|
import { routeWriteThroughBridge } from "../../tools/acp-bridge";
|
|
21
22
|
import { assertEditableFile } from "../../tools/auto-generated-guard";
|
|
@@ -1732,7 +1733,7 @@ class LspFileSystem implements FileSystem {
|
|
|
1732
1733
|
const finalContent = await serializeEditFileText(path, path, content);
|
|
1733
1734
|
|
|
1734
1735
|
// Route through ACP bridge when available; skips internal artifacts and local:// paths.
|
|
1735
|
-
if (await routeWriteThroughBridge(this.session, this.requestedPath, path, finalContent)) {
|
|
1736
|
+
if (await routeWriteThroughBridge(this.session, this.requestedPath, path, finalContent, this.signal)) {
|
|
1736
1737
|
return;
|
|
1737
1738
|
}
|
|
1738
1739
|
|
|
@@ -1753,6 +1754,13 @@ class LspFileSystem implements FileSystem {
|
|
|
1753
1754
|
|
|
1754
1755
|
async delete(path: string): Promise<void> {
|
|
1755
1756
|
await this.#getFile(path).unlink();
|
|
1757
|
+
if (this.session.enableLsp ?? true) {
|
|
1758
|
+
await notifyWorkspaceWatchedFiles(
|
|
1759
|
+
this.session.cwd,
|
|
1760
|
+
[{ filePath: path, type: FileChangeType.Deleted }],
|
|
1761
|
+
this.signal,
|
|
1762
|
+
);
|
|
1763
|
+
}
|
|
1756
1764
|
}
|
|
1757
1765
|
|
|
1758
1766
|
async mkdir(path: string): Promise<void> {
|
|
@@ -1103,7 +1103,7 @@ export async function executeReplaceSingle(
|
|
|
1103
1103
|
|
|
1104
1104
|
// Route through ACP bridge when available; skips internal artifacts.
|
|
1105
1105
|
let diagnostics: FileDiagnosticsResult | undefined;
|
|
1106
|
-
if (await routeWriteThroughBridge(session, path, absolutePath, finalContent)) {
|
|
1106
|
+
if (await routeWriteThroughBridge(session, path, absolutePath, finalContent, signal)) {
|
|
1107
1107
|
// bridge handled the write; diagnostics not available via writethrough
|
|
1108
1108
|
} else {
|
|
1109
1109
|
diagnostics = await writethrough(absolutePath, finalContent, signal, Bun.file(absolutePath), batchRequest, dst =>
|