@oh-my-pi/pi-coding-agent 15.10.10 → 15.10.12
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 +142 -7
- package/dist/cli.js +23108 -0
- package/dist/tokenizers.linux-x64-gnu-xcjh3jwk.node +0 -0
- package/dist/types/async/job-manager.d.ts +18 -0
- package/dist/types/cli/args.d.ts +2 -1
- package/dist/types/cli/dry-balance-cli.d.ts +1 -1
- package/dist/types/cli/gallery-cli.d.ts +1 -1
- package/dist/types/cli/gallery-fixtures/types.d.ts +1 -1
- package/dist/types/cli/usage-cli.d.ts +72 -0
- package/dist/types/cli-commands.d.ts +12 -0
- package/dist/types/commands/launch.d.ts +5 -1
- package/dist/types/commands/read.d.ts +1 -1
- package/dist/types/commands/usage.d.ts +25 -0
- package/dist/types/config/api-key-resolver.d.ts +3 -0
- package/dist/types/config/append-only-context-mode.d.ts +2 -1
- package/dist/types/config/model-discovery.d.ts +55 -0
- package/dist/types/config/model-registry.d.ts +8 -219
- package/dist/types/config/model-resolver.d.ts +34 -10
- package/dist/types/config/model-roles.d.ts +28 -0
- package/dist/types/config/models-config-schema.d.ts +523 -42
- package/dist/types/config/models-config.d.ts +385 -0
- package/dist/types/config/settings-schema.d.ts +41 -8
- package/dist/types/config/settings.d.ts +8 -1
- package/dist/types/debug/log-viewer.d.ts +1 -1
- package/dist/types/debug/raw-sse.d.ts +1 -1
- package/dist/types/edit/hashline/noop-loop-guard.d.ts +72 -0
- package/dist/types/eval/backend.d.ts +0 -2
- package/dist/types/eval/idle-timeout.d.ts +0 -4
- package/dist/types/eval/js/shared/rewrite-imports.d.ts +6 -6
- package/dist/types/eval/py/executor.d.ts +5 -0
- package/dist/types/eval/py/kernel.d.ts +6 -1
- package/dist/types/eval/py/runtime.d.ts +9 -0
- package/dist/types/exec/bash-executor.d.ts +2 -0
- package/dist/types/export/html/template.generated.d.ts +1 -1
- package/dist/types/extensibility/extensions/runner.d.ts +3 -2
- package/dist/types/extensibility/extensions/types.d.ts +6 -3
- package/dist/types/hindsight/mental-models.d.ts +17 -8
- package/dist/types/internal-urls/artifact-protocol.d.ts +2 -2
- package/dist/types/internal-urls/types.d.ts +1 -1
- package/dist/types/lsp/edits.d.ts +9 -0
- package/dist/types/lsp/index.d.ts +2 -2
- package/dist/types/lsp/types.d.ts +2 -0
- package/dist/types/lsp/utils.d.ts +3 -0
- package/dist/types/mcp/json-rpc.d.ts +5 -0
- package/dist/types/memory-backend/index.d.ts +1 -0
- package/dist/types/memory-backend/runtime.d.ts +4 -0
- package/dist/types/memory-backend/types.d.ts +66 -1
- package/dist/types/mnemopi/state.d.ts +11 -1
- package/dist/types/modes/components/agent-dashboard.d.ts +1 -1
- package/dist/types/modes/components/assistant-message.d.ts +3 -1
- package/dist/types/modes/components/bash-execution.d.ts +1 -1
- package/dist/types/modes/components/copy-selector.d.ts +1 -1
- package/dist/types/modes/components/dynamic-border.d.ts +1 -1
- package/dist/types/modes/components/extensions/extension-dashboard.d.ts +1 -1
- package/dist/types/modes/components/extensions/extension-list.d.ts +1 -1
- package/dist/types/modes/components/extensions/inspector-panel.d.ts +1 -1
- package/dist/types/modes/components/footer.d.ts +1 -1
- package/dist/types/modes/components/hook-editor.d.ts +5 -0
- package/dist/types/modes/components/hook-input.d.ts +4 -0
- package/dist/types/modes/components/hook-selector.d.ts +1 -1
- package/dist/types/modes/components/model-selector.d.ts +1 -1
- package/dist/types/modes/components/plan-review-overlay.d.ts +1 -1
- package/dist/types/modes/components/session-observer-overlay.d.ts +1 -1
- package/dist/types/modes/components/session-selector.d.ts +1 -1
- package/dist/types/modes/components/status-line/component.d.ts +1 -1
- package/dist/types/modes/components/tiny-title-download-progress.d.ts +1 -1
- package/dist/types/modes/components/transcript-container.d.ts +25 -6
- package/dist/types/modes/components/tree-selector.d.ts +1 -1
- package/dist/types/modes/components/user-message-selector.d.ts +1 -1
- package/dist/types/modes/components/user-message.d.ts +2 -1
- package/dist/types/modes/components/visual-truncate.d.ts +1 -1
- package/dist/types/modes/components/welcome.d.ts +19 -3
- package/dist/types/modes/controllers/mcp-command-controller.d.ts +1 -1
- package/dist/types/modes/controllers/streaming-reveal.d.ts +1 -1
- package/dist/types/modes/index.d.ts +3 -3
- package/dist/types/modes/interactive-mode.d.ts +8 -3
- package/dist/types/modes/oauth-manual-input.d.ts +7 -0
- package/dist/types/modes/rpc/rpc-client.d.ts +39 -2
- package/dist/types/modes/rpc/rpc-mode.d.ts +31 -2
- package/dist/types/modes/rpc/rpc-subagents.d.ts +24 -0
- package/dist/types/modes/rpc/rpc-types.d.ts +75 -1
- package/dist/types/modes/setup-wizard/index.d.ts +5 -1
- package/dist/types/modes/setup-wizard/lazy.d.ts +2 -0
- package/dist/types/modes/setup-wizard/scenes/sign-in.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/wizard-overlay.d.ts +1 -1
- package/dist/types/modes/types.d.ts +4 -1
- package/dist/types/secrets/index.d.ts +1 -1
- package/dist/types/secrets/obfuscator.d.ts +8 -2
- package/dist/types/session/agent-session.d.ts +15 -3
- package/dist/types/session/auth-broker-config.d.ts +4 -0
- package/dist/types/session/session-manager.d.ts +1 -1
- package/dist/types/session/streaming-output.d.ts +23 -0
- package/dist/types/slash-commands/acp-builtins.d.ts +16 -0
- package/dist/types/slash-commands/builtin-registry.d.ts +1 -0
- package/dist/types/slash-commands/helpers/stats-dashboard.d.ts +13 -0
- package/dist/types/slash-commands/types.d.ts +1 -1
- package/dist/types/ssh/connection-manager.d.ts +8 -0
- package/dist/types/system-prompt.d.ts +2 -0
- package/dist/types/task/executor.d.ts +1 -0
- package/dist/types/task/index.d.ts +2 -2
- package/dist/types/task/parallel.d.ts +2 -2
- package/dist/types/task/types.d.ts +8 -0
- package/dist/types/task/worktree.d.ts +2 -0
- package/dist/types/thinking.d.ts +4 -0
- package/dist/types/tiny/title-client.d.ts +11 -0
- package/dist/types/tiny/title-protocol.d.ts +1 -0
- package/dist/types/tools/ask.d.ts +4 -0
- package/dist/types/tools/conflict-detect.d.ts +16 -0
- package/dist/types/tools/github-cache.d.ts +7 -0
- package/dist/types/tools/index.d.ts +6 -0
- package/dist/types/tools/sqlite-reader.d.ts +3 -0
- package/dist/types/tui/output-block.d.ts +3 -3
- package/dist/types/utils/changelog.d.ts +8 -0
- package/dist/types/utils/git.d.ts +15 -2
- package/dist/types/utils/title-generator.d.ts +3 -2
- package/dist/types/web/scrapers/readthedocs.d.ts +3 -0
- package/dist/types/web/scrapers/types.d.ts +12 -0
- package/dist/types/web/search/providers/codex.d.ts +1 -1
- package/dist/types/web/search/providers/gemini.d.ts +1 -1
- package/examples/extensions/tools.ts +5 -4
- package/package.json +14 -11
- package/scripts/build-binary.ts +18 -23
- package/scripts/bundle-dist.ts +81 -0
- package/scripts/{dev-launch → omp} +1 -1
- package/scripts/{dev-launch-preload.ts → omp.ts} +1 -1
- package/src/async/job-manager.ts +57 -3
- package/src/auto-thinking/classifier.ts +1 -0
- package/src/autoresearch/dashboard.ts +1 -1
- package/src/autoresearch/prompt-setup.md +6 -6
- package/src/autoresearch/prompt.md +6 -6
- package/src/capability/fs.ts +10 -0
- package/src/cli/args.ts +4 -1
- package/src/cli/auth-gateway-cli.ts +1 -3
- package/src/cli/dry-balance-cli.ts +1 -1
- package/src/cli/gallery-cli.ts +1 -1
- package/src/cli/gallery-fixtures/fs.ts +1 -1
- package/src/cli/gallery-fixtures/types.ts +5 -1
- package/src/cli/list-models.ts +2 -1
- package/src/cli/usage-cli.ts +603 -0
- package/src/cli-commands.ts +30 -0
- package/src/cli.ts +76 -13
- package/src/commands/complete.ts +1 -1
- package/src/commands/launch.ts +5 -1
- package/src/commands/read.ts +6 -3
- package/src/commands/usage.ts +35 -0
- package/src/commit/agentic/agent.ts +1 -1
- package/src/commit/model-selection.ts +4 -3
- package/src/config/api-key-resolver.ts +8 -6
- package/src/config/append-only-context-mode.ts +6 -12
- package/src/config/model-discovery.ts +554 -0
- package/src/config/model-registry.ts +320 -1041
- package/src/config/model-resolver.ts +173 -156
- package/src/config/model-roles.ts +74 -0
- package/src/config/models-config-schema.ts +57 -8
- package/src/config/models-config.ts +129 -0
- package/src/config/settings-schema.ts +61 -19
- package/src/config/settings.ts +98 -4
- package/src/dap/client.ts +124 -37
- package/src/dap/session.ts +259 -158
- package/src/debug/log-viewer.ts +1 -1
- package/src/debug/raw-sse.ts +1 -1
- package/src/edit/diff.ts +47 -3
- package/src/edit/hashline/block-resolver.ts +20 -1
- package/src/edit/hashline/diff.ts +36 -1
- package/src/edit/hashline/execute.ts +47 -4
- package/src/edit/hashline/noop-loop-guard.ts +99 -0
- package/src/edit/index.ts +16 -1
- package/src/edit/modes/patch.ts +52 -0
- package/src/edit/modes/replace.ts +56 -22
- package/src/edit/notebook.ts +22 -2
- package/src/edit/renderer.ts +36 -10
- package/src/eval/__tests__/completion-bridge.test.ts +1 -1
- package/src/eval/backend.ts +0 -2
- package/src/eval/completion-bridge.ts +3 -1
- package/src/eval/idle-timeout.ts +2 -9
- package/src/eval/js/context-manager.ts +6 -8
- package/src/eval/js/executor.ts +6 -2
- package/src/eval/js/index.ts +0 -2
- package/src/eval/js/shared/helpers.ts +5 -6
- package/src/eval/js/shared/local-module-loader.ts +1 -1
- package/src/eval/js/shared/prelude.txt +62 -1
- package/src/eval/js/shared/rewrite-imports.ts +40 -22
- package/src/eval/js/shared/runtime.ts +1 -1
- package/src/eval/py/executor.ts +29 -7
- package/src/eval/py/index.ts +6 -3
- package/src/eval/py/kernel.ts +43 -4
- package/src/eval/py/runner.py +107 -3
- package/src/eval/py/runtime.ts +37 -0
- package/src/exec/bash-executor.ts +85 -4
- package/src/export/html/template.generated.ts +1 -1
- package/src/export/html/template.js +3 -1
- package/src/extensibility/extensions/get-commands-handler.ts +2 -1
- package/src/extensibility/extensions/runner.ts +6 -1
- package/src/extensibility/extensions/types.ts +6 -2
- package/src/extensibility/plugins/legacy-pi-compat.ts +20 -3
- package/src/hindsight/bank.ts +17 -2
- package/src/hindsight/mental-models.ts +59 -12
- package/src/hindsight/state.ts +6 -1
- package/src/internal-urls/artifact-protocol.ts +11 -2
- package/src/internal-urls/docs-index.generated.ts +11 -11
- package/src/internal-urls/issue-pr-protocol.ts +12 -5
- package/src/internal-urls/router.ts +1 -1
- package/src/internal-urls/types.ts +1 -1
- package/src/lib/xai-http.ts +1 -1
- package/src/lsp/client.ts +118 -38
- package/src/lsp/clients/biome-client.ts +101 -39
- package/src/lsp/edits.ts +143 -95
- package/src/lsp/index.ts +31 -22
- package/src/lsp/render.ts +1 -1
- package/src/lsp/types.ts +2 -0
- package/src/lsp/utils.ts +28 -10
- package/src/main.ts +183 -23
- package/src/mcp/json-rpc.ts +35 -5
- package/src/mcp/transports/stdio.ts +7 -1
- package/src/memories/index.ts +4 -1
- package/src/memory-backend/index.ts +1 -0
- package/src/memory-backend/local-backend.ts +9 -0
- package/src/memory-backend/off-backend.ts +9 -0
- package/src/memory-backend/runtime.ts +66 -0
- package/src/memory-backend/types.ts +81 -1
- package/src/mnemopi/backend.ts +176 -7
- package/src/mnemopi/state.ts +38 -2
- package/src/modes/acp/acp-agent.ts +119 -11
- package/src/modes/components/agent-dashboard.ts +10 -7
- package/src/modes/components/assistant-message.ts +32 -28
- package/src/modes/components/bash-execution.ts +1 -1
- package/src/modes/components/copy-selector.ts +1 -1
- package/src/modes/components/diff.ts +13 -2
- package/src/modes/components/dynamic-border.ts +12 -3
- package/src/modes/components/extensions/extension-dashboard.ts +8 -5
- package/src/modes/components/extensions/extension-list.ts +1 -1
- package/src/modes/components/extensions/inspector-panel.ts +1 -1
- package/src/modes/components/footer.ts +4 -2
- package/src/modes/components/history-search.ts +1 -1
- package/src/modes/components/hook-editor.ts +8 -0
- package/src/modes/components/hook-input.ts +8 -0
- package/src/modes/components/hook-selector.ts +2 -2
- package/src/modes/components/model-selector.ts +4 -2
- package/src/modes/components/plan-review-overlay.ts +1 -1
- package/src/modes/components/session-observer-overlay.ts +2 -2
- package/src/modes/components/session-selector.ts +1 -1
- package/src/modes/components/settings-selector.ts +5 -1
- package/src/modes/components/status-line/component.ts +119 -35
- package/src/modes/components/tiny-title-download-progress.ts +1 -1
- package/src/modes/components/transcript-container.ts +258 -53
- package/src/modes/components/tree-selector.ts +3 -3
- package/src/modes/components/user-message-selector.ts +1 -1
- package/src/modes/components/user-message.ts +17 -5
- package/src/modes/components/visual-truncate.ts +1 -1
- package/src/modes/components/welcome.ts +108 -26
- package/src/modes/controllers/command-controller.ts +11 -4
- package/src/modes/controllers/event-controller.ts +73 -4
- package/src/modes/controllers/input-controller.ts +2 -1
- package/src/modes/controllers/mcp-command-controller.ts +39 -4
- package/src/modes/controllers/selector-controller.ts +1 -1
- package/src/modes/controllers/streaming-reveal.ts +85 -18
- package/src/modes/index.ts +3 -21
- package/src/modes/interactive-mode.ts +42 -18
- package/src/modes/oauth-manual-input.ts +30 -3
- package/src/modes/rpc/rpc-client.ts +154 -3
- package/src/modes/rpc/rpc-mode.ts +97 -12
- package/src/modes/rpc/rpc-subagents.ts +265 -0
- package/src/modes/rpc/rpc-types.ts +81 -1
- package/src/modes/setup-wizard/index.ts +12 -2
- package/src/modes/setup-wizard/lazy.ts +16 -0
- package/src/modes/setup-wizard/scenes/glyph.ts +1 -1
- package/src/modes/setup-wizard/scenes/providers.ts +1 -1
- package/src/modes/setup-wizard/scenes/sign-in.ts +1 -1
- package/src/modes/setup-wizard/scenes/theme.ts +1 -1
- package/src/modes/setup-wizard/scenes/types.ts +1 -1
- package/src/modes/setup-wizard/scenes/web-search.ts +1 -1
- package/src/modes/setup-wizard/wizard-overlay.ts +1 -1
- package/src/modes/types.ts +4 -1
- package/src/prompts/agents/explore.md +2 -2
- package/src/prompts/agents/librarian.md +1 -2
- package/src/prompts/agents/oracle.md +1 -1
- package/src/prompts/agents/plan.md +5 -5
- package/src/prompts/agents/task.md +5 -5
- package/src/prompts/ci-green-request.md +5 -7
- package/src/prompts/goals/goal-budget-limit.md +2 -2
- package/src/prompts/goals/goal-continuation.md +4 -4
- package/src/prompts/goals/goal-mode-active.md +1 -1
- package/src/prompts/memories/read-path.md +1 -1
- package/src/prompts/memories/stage_one_system.md +2 -2
- package/src/prompts/review-custom-request.md +1 -1
- package/src/prompts/system/agent-creation-architect.md +2 -2
- package/src/prompts/system/auto-continue.md +1 -1
- package/src/prompts/system/background-tan-dispatch.md +1 -1
- package/src/prompts/system/btw-user.md +2 -2
- package/src/prompts/system/commit-message-system.md +13 -1
- package/src/prompts/system/custom-system-prompt.md +1 -1
- package/src/prompts/system/eager-todo.md +2 -2
- package/src/prompts/system/irc-incoming.md +1 -1
- package/src/prompts/system/manual-continue.md +1 -1
- package/src/prompts/system/omfg-user.md +3 -4
- package/src/prompts/system/orchestrate-notice.md +9 -9
- package/src/prompts/system/plan-mode-active.md +4 -4
- package/src/prompts/system/plan-mode-subagent.md +4 -5
- package/src/prompts/system/plan-mode-tool-decision-reminder.md +1 -1
- package/src/prompts/system/project-prompt.md +2 -2
- package/src/prompts/system/subagent-system-prompt.md +4 -4
- package/src/prompts/system/system-prompt.md +13 -24
- package/src/prompts/system/title-system.md +2 -2
- package/src/prompts/system/ttsr-tool-reminder.md +1 -1
- package/src/prompts/system/workflow-notice.md +1 -1
- package/src/prompts/tools/ast-edit.md +1 -1
- package/src/prompts/tools/ast-grep.md +2 -2
- package/src/prompts/tools/bash.md +5 -7
- package/src/prompts/tools/browser.md +7 -7
- package/src/prompts/tools/debug.md +1 -1
- package/src/prompts/tools/eval.md +3 -3
- package/src/prompts/tools/find.md +0 -1
- package/src/prompts/tools/github.md +8 -7
- package/src/prompts/tools/goal.md +1 -1
- package/src/prompts/tools/image-gen.md +1 -1
- package/src/prompts/tools/inspect-image-system.md +1 -1
- package/src/prompts/tools/irc.md +15 -15
- package/src/prompts/tools/lsp.md +2 -2
- package/src/prompts/tools/patch.md +2 -2
- package/src/prompts/tools/read.md +3 -4
- package/src/prompts/tools/recall.md +1 -1
- package/src/prompts/tools/reflect.md +1 -1
- package/src/prompts/tools/render-mermaid.md +2 -2
- package/src/prompts/tools/replace.md +4 -10
- package/src/prompts/tools/rewind.md +2 -2
- package/src/prompts/tools/search-tool-bm25.md +1 -9
- package/src/prompts/tools/search.md +0 -1
- package/src/prompts/tools/ssh.md +0 -4
- package/src/prompts/tools/task.md +2 -3
- package/src/prompts/tools/todo.md +1 -1
- package/src/sdk.ts +31 -11
- package/src/secrets/index.ts +8 -1
- package/src/secrets/obfuscator.ts +39 -18
- package/src/session/agent-session.ts +223 -64
- package/src/session/auth-broker-config.ts +30 -1
- package/src/session/session-manager.ts +2 -2
- package/src/session/streaming-output.ts +188 -11
- package/src/slash-commands/acp-builtins.ts +24 -0
- package/src/slash-commands/builtin-registry.ts +40 -0
- package/src/slash-commands/helpers/stats-dashboard.ts +85 -0
- package/src/slash-commands/types.ts +1 -1
- package/src/ssh/connection-manager.ts +27 -0
- package/src/system-prompt.ts +14 -0
- package/src/task/commands.ts +2 -1
- package/src/task/executor.ts +74 -65
- package/src/task/index.ts +146 -68
- package/src/task/parallel.ts +3 -3
- package/src/task/render.ts +20 -5
- package/src/task/types.ts +9 -0
- package/src/task/worktree.ts +64 -56
- package/src/thinking.ts +9 -1
- package/src/tiny/title-client.ts +60 -16
- package/src/tiny/title-protocol.ts +1 -1
- package/src/tiny/worker.ts +6 -4
- package/src/tools/archive-reader.ts +30 -2
- package/src/tools/ask.ts +104 -21
- package/src/tools/ast-edit.ts +25 -5
- package/src/tools/auto-generated-guard.ts +20 -3
- package/src/tools/bash-interactive.ts +27 -7
- package/src/tools/bash.ts +100 -18
- package/src/tools/browser/launch.ts +11 -2
- package/src/tools/browser/readable.ts +19 -2
- package/src/tools/browser/registry.ts +4 -1
- package/src/tools/browser/render.ts +2 -2
- package/src/tools/browser/tab-supervisor.ts +55 -16
- package/src/tools/conflict-detect.ts +50 -4
- package/src/tools/debug.ts +1 -1
- package/src/tools/eval-render.ts +5 -5
- package/src/tools/eval.ts +0 -2
- package/src/tools/fetch.ts +33 -10
- package/src/tools/gh-cache-invalidation.ts +63 -8
- package/src/tools/gh-renderer.ts +1 -1
- package/src/tools/gh.ts +172 -29
- package/src/tools/github-cache.ts +70 -6
- package/src/tools/image-gen.ts +14 -13
- package/src/tools/index.ts +13 -1
- package/src/tools/inspect-image.ts +1 -0
- package/src/tools/irc.ts +5 -1
- package/src/tools/job.ts +1 -1
- package/src/tools/read.ts +202 -61
- package/src/tools/render-utils.ts +3 -3
- package/src/tools/resolve.ts +1 -1
- package/src/tools/search.ts +92 -29
- package/src/tools/sqlite-reader.ts +17 -5
- package/src/tools/ssh.ts +8 -8
- package/src/tools/todo.ts +38 -8
- package/src/tools/write.ts +118 -18
- package/src/tui/output-block.ts +4 -4
- package/src/utils/changelog.ts +27 -1
- package/src/utils/commit-message-generator.ts +1 -0
- package/src/utils/file-mentions.ts +2 -1
- package/src/utils/git.ts +267 -13
- package/src/utils/title-generator.ts +24 -5
- package/src/web/scrapers/arxiv.ts +1 -1
- package/src/web/scrapers/go-pkg.ts +1 -1
- package/src/web/scrapers/iacr.ts +1 -1
- package/src/web/scrapers/readthedocs.ts +1 -1
- package/src/web/scrapers/twitter.ts +2 -1
- package/src/web/scrapers/types.ts +87 -8
- package/src/web/scrapers/wikipedia.ts +1 -1
- package/src/web/scrapers/youtube.ts +6 -1
- package/src/web/search/index.ts +1 -1
- package/src/web/search/providers/codex.ts +2 -1
- package/src/web/search/providers/gemini.ts +2 -3
- package/src/web/search/render.ts +8 -6
- package/dist/types/config/model-equivalence.d.ts +0 -24
- package/dist/types/config/model-id-affixes.d.ts +0 -12
- package/dist/types/config/model-provider-priority.d.ts +0 -1
- package/dist/types/exec/idle-timeout-watchdog.d.ts +0 -18
- package/src/config/model-equivalence.ts +0 -875
- package/src/config/model-id-affixes.ts +0 -81
- package/src/config/model-provider-priority.ts +0 -56
- package/src/exec/idle-timeout-watchdog.ts +0 -126
|
@@ -2,6 +2,7 @@ import type { BuiltinSlashCommand, ParsedSlashCommand, SlashCommandResult, Slash
|
|
|
2
2
|
export type { BuiltinSlashCommand, SubcommandDef } from "./types";
|
|
3
3
|
/** TUI-specific runtime accepted by `executeBuiltinSlashCommand`. */
|
|
4
4
|
export type BuiltinSlashCommandRuntime = TuiSlashCommandRuntime;
|
|
5
|
+
export declare const BUILTIN_SLASH_COMMAND_RESERVED_NAMES: ReadonlySet<string>;
|
|
5
6
|
/** Builtin command metadata used for slash-command autocomplete and help text. */
|
|
6
7
|
export declare const BUILTIN_SLASH_COMMAND_DEFS: ReadonlyArray<BuiltinSlashCommand>;
|
|
7
8
|
/**
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const DEFAULT_STATS_DASHBOARD_PORT = 3847;
|
|
2
|
+
export interface StatsDashboardArgs {
|
|
3
|
+
port: number;
|
|
4
|
+
}
|
|
5
|
+
export interface StatsDashboardLaunchResult {
|
|
6
|
+
url: string;
|
|
7
|
+
message: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function parseStatsDashboardArgs(args: string): StatsDashboardArgs | {
|
|
10
|
+
error: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function launchStatsDashboard(args: StatsDashboardArgs): Promise<StatsDashboardLaunchResult>;
|
|
13
|
+
export declare function stopStatsDashboard(): void;
|
|
@@ -12,6 +12,7 @@ export interface SubcommandDef {
|
|
|
12
12
|
/** Declarative builtin slash command metadata used by autocomplete and help UI. */
|
|
13
13
|
export interface BuiltinSlashCommand {
|
|
14
14
|
name: string;
|
|
15
|
+
aliases?: string[];
|
|
15
16
|
description: string;
|
|
16
17
|
/** Subcommands for dropdown completion (e.g. /mcp add, /mcp list). */
|
|
17
18
|
subcommands?: SubcommandDef[];
|
|
@@ -79,7 +80,6 @@ export interface TuiSlashCommandRuntime {
|
|
|
79
80
|
}
|
|
80
81
|
/** Unified slash-command spec consumed by both TUI and ACP dispatchers. */
|
|
81
82
|
export interface SlashCommandSpec extends BuiltinSlashCommand {
|
|
82
|
-
aliases?: string[];
|
|
83
83
|
/** When false, the dispatcher refuses to handle invocations that include arguments. */
|
|
84
84
|
allowArgs?: boolean;
|
|
85
85
|
/**
|
|
@@ -22,6 +22,14 @@ interface SSHArgsOptions {
|
|
|
22
22
|
}
|
|
23
23
|
export declare function getHostInfo(hostName: string): Promise<SSHHostInfo | undefined>;
|
|
24
24
|
export declare function getHostInfoForHost(host: SSHConnectionTarget): Promise<SSHHostInfo | undefined>;
|
|
25
|
+
/**
|
|
26
|
+
* Synchronous, probe-free host info lookup for startup paths.
|
|
27
|
+
*
|
|
28
|
+
* Checks the in-memory cache, then falls back to a synchronous read of the
|
|
29
|
+
* persisted host-info cache file. Never opens a connection or probes the
|
|
30
|
+
* remote host — callers get `undefined` when nothing is cached yet.
|
|
31
|
+
*/
|
|
32
|
+
export declare function getCachedHostInfoSync(host: SSHConnectionTarget): SSHHostInfo | undefined;
|
|
25
33
|
export declare function ensureHostInfo(host: SSHConnectionTarget): Promise<SSHHostInfo>;
|
|
26
34
|
export declare function buildRemoteCommand(host: SSHConnectionTarget, command: string, options?: SSHArgsOptions): Promise<string[]>;
|
|
27
35
|
export declare function ensureConnection(host: SSHConnectionTarget): Promise<void>;
|
|
@@ -10,6 +10,8 @@ interface AlwaysApplyRule {
|
|
|
10
10
|
content: string;
|
|
11
11
|
path: string;
|
|
12
12
|
}
|
|
13
|
+
/** Discover TITLE_SYSTEM.md file for automatic session-title prompt overrides */
|
|
14
|
+
export declare function discoverTitleSystemPromptFile(cwd?: string): string | undefined;
|
|
13
15
|
/** Resolve input as file path or literal string */
|
|
14
16
|
export declare function resolvePromptInput(input: string | undefined, description: string): Promise<string | undefined>;
|
|
15
17
|
export interface LoadContextFilesOptions {
|
|
@@ -8,7 +8,7 @@ export { loadBundledAgents as BUNDLED_AGENTS } from "./agents";
|
|
|
8
8
|
export { discoverCommands, expandCommand, getCommand } from "./commands";
|
|
9
9
|
export { discoverAgents, getAgent } from "./discovery";
|
|
10
10
|
export { AgentOutputManager } from "./output-manager";
|
|
11
|
-
export type { AgentDefinition, AgentProgress, SingleResult, SubagentLifecyclePayload, SubagentProgressPayload, TaskParams, TaskToolDetails, } from "./types";
|
|
11
|
+
export type { AgentDefinition, AgentProgress, SingleResult, SubagentEventPayload, SubagentLifecyclePayload, SubagentProgressPayload, TaskParams, TaskToolDetails, } from "./types";
|
|
12
12
|
export { TASK_SUBAGENT_EVENT_CHANNEL, TASK_SUBAGENT_LIFECYCLE_CHANNEL, TASK_SUBAGENT_PROGRESS_CHANNEL, taskSchema, } from "./types";
|
|
13
13
|
export declare const READ_ONLY_TOOL_NAMES: ReadonlySet<string>;
|
|
14
14
|
export declare function isReadOnlyAgent(agent: AgentDefinition): boolean;
|
|
@@ -39,5 +39,5 @@ export declare class TaskTool implements AgentTool<TaskToolSchemaInstance, TaskT
|
|
|
39
39
|
* Create a TaskTool instance with async agent discovery.
|
|
40
40
|
*/
|
|
41
41
|
static create(session: ToolSession): Promise<TaskTool>;
|
|
42
|
-
execute(
|
|
42
|
+
execute(toolCallId: string, rawParams: unknown, signal?: AbortSignal, onUpdate?: AgentToolUpdateCallback<TaskToolDetails>): Promise<AgentToolResult<TaskToolDetails>>;
|
|
43
43
|
}
|
|
@@ -19,10 +19,10 @@ export interface ParallelResult<R> {
|
|
|
19
19
|
*
|
|
20
20
|
* @param items - Items to process
|
|
21
21
|
* @param concurrency - Maximum concurrent operations
|
|
22
|
-
* @param fn - Async function to execute for each item
|
|
22
|
+
* @param fn - Async function to execute for each item; receives a worker signal that fires on abort or fail-fast so in-flight siblings can cancel
|
|
23
23
|
* @param signal - Optional abort signal to stop scheduling new work
|
|
24
24
|
*/
|
|
25
|
-
export declare function mapWithConcurrencyLimit<T, R>(items: T[], concurrency: number, fn: (item: T, index: number) => Promise<R>, signal?: AbortSignal): Promise<ParallelResult<R>>;
|
|
25
|
+
export declare function mapWithConcurrencyLimit<T, R>(items: T[], concurrency: number, fn: (item: T, index: number, signal: AbortSignal) => Promise<R>, signal?: AbortSignal): Promise<ParallelResult<R>>;
|
|
26
26
|
/**
|
|
27
27
|
* Simple counting semaphore for limiting concurrency across independently-scheduled async work.
|
|
28
28
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
|
|
2
2
|
import type { Usage } from "@oh-my-pi/pi-ai";
|
|
3
3
|
import * as z from "zod/v4";
|
|
4
|
+
import type { AgentSessionEvent } from "../session/agent-session";
|
|
4
5
|
import { type TaskSimpleMode } from "./simple-mode";
|
|
5
6
|
import type { NestedRepoPatch } from "./worktree";
|
|
6
7
|
/** Source of an agent definition */
|
|
@@ -21,10 +22,16 @@ export interface SubagentProgressPayload {
|
|
|
21
22
|
agent: string;
|
|
22
23
|
agentSource: AgentSource;
|
|
23
24
|
task: string;
|
|
25
|
+
parentToolCallId?: string;
|
|
24
26
|
assignment?: string;
|
|
25
27
|
progress: AgentProgress;
|
|
26
28
|
sessionFile?: string;
|
|
27
29
|
}
|
|
30
|
+
/** Payload emitted on TASK_SUBAGENT_EVENT_CHANNEL */
|
|
31
|
+
export interface SubagentEventPayload {
|
|
32
|
+
id: string;
|
|
33
|
+
event: AgentSessionEvent;
|
|
34
|
+
}
|
|
28
35
|
/** Payload emitted on TASK_SUBAGENT_LIFECYCLE_CHANNEL */
|
|
29
36
|
export interface SubagentLifecyclePayload {
|
|
30
37
|
id: string;
|
|
@@ -33,6 +40,7 @@ export interface SubagentLifecyclePayload {
|
|
|
33
40
|
description?: string;
|
|
34
41
|
status: "started" | "completed" | "failed" | "aborted";
|
|
35
42
|
sessionFile?: string;
|
|
43
|
+
parentToolCallId?: string;
|
|
36
44
|
index: number;
|
|
37
45
|
}
|
|
38
46
|
/** Single task item for parallel execution (default shape with context enabled). */
|
|
@@ -78,6 +78,8 @@ export interface MergeBranchResult {
|
|
|
78
78
|
merged: string[];
|
|
79
79
|
failed: string[];
|
|
80
80
|
conflict?: string;
|
|
81
|
+
/** Set when cherry-picks landed on HEAD but restoring the stashed working tree failed. */
|
|
82
|
+
stashConflict?: string;
|
|
81
83
|
}
|
|
82
84
|
/**
|
|
83
85
|
* Cherry-pick task branch commits sequentially onto HEAD.
|
package/dist/types/thinking.d.ts
CHANGED
|
@@ -24,6 +24,10 @@ export declare function getThinkingLevelMetadata(level: ThinkingLevel): Thinking
|
|
|
24
24
|
* Converts an agent-local selector into the effort sent to providers.
|
|
25
25
|
*/
|
|
26
26
|
export declare function toReasoningEffort(level: ThinkingLevel | undefined): Effort | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* True when a selector explicitly requests provider-side reasoning disablement.
|
|
29
|
+
*/
|
|
30
|
+
export declare function shouldDisableReasoning(level: ThinkingLevel | undefined): boolean;
|
|
27
31
|
/**
|
|
28
32
|
* Resolves a selector against the current model while preserving explicit "off".
|
|
29
33
|
*/
|
|
@@ -18,6 +18,16 @@ export interface TinyTitleDownloadOptions {
|
|
|
18
18
|
signal?: AbortSignal;
|
|
19
19
|
onProgress?: (event: TinyTitleProgressEvent) => void;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Per-request controls for {@link TinyTitleClient.generate}.
|
|
23
|
+
*
|
|
24
|
+
* Carries the optional abort signal and title-system-prompt override used by
|
|
25
|
+
* callers that customize automatic session-title generation.
|
|
26
|
+
*/
|
|
27
|
+
export interface TinyTitleGenerateOptions {
|
|
28
|
+
signal?: AbortSignal;
|
|
29
|
+
systemPrompt?: string;
|
|
30
|
+
}
|
|
21
31
|
/**
|
|
22
32
|
* Hidden subcommand on the main CLI that boots the tiny-model worker in the
|
|
23
33
|
* spawned subprocess. Kept in sync with the dispatch in `cli.ts`.
|
|
@@ -56,6 +66,7 @@ export declare class TinyTitleClient {
|
|
|
56
66
|
constructor(spawnWorker?: () => WorkerHandle);
|
|
57
67
|
onProgress(listener: (event: TinyTitleProgressEvent) => void): () => void;
|
|
58
68
|
generate(modelKey: string, message: string, signal?: AbortSignal): Promise<string | null>;
|
|
69
|
+
generate(modelKey: string, message: string, options?: TinyTitleGenerateOptions): Promise<string | null>;
|
|
59
70
|
complete(modelKey: string, prompt: string, options?: {
|
|
60
71
|
maxTokens?: number;
|
|
61
72
|
signal?: AbortSignal;
|
|
@@ -41,6 +41,8 @@ export interface QuestionResult {
|
|
|
41
41
|
multi: boolean;
|
|
42
42
|
selectedOptions: string[];
|
|
43
43
|
customInput?: string;
|
|
44
|
+
/** True when the answer was auto-selected because the dialog timed out. */
|
|
45
|
+
timedOut?: boolean;
|
|
44
46
|
}
|
|
45
47
|
export interface AskToolDetails {
|
|
46
48
|
question?: string;
|
|
@@ -48,6 +50,8 @@ export interface AskToolDetails {
|
|
|
48
50
|
multi?: boolean;
|
|
49
51
|
selectedOptions?: string[];
|
|
50
52
|
customInput?: string;
|
|
53
|
+
/** True when the answer was auto-selected because the dialog timed out. */
|
|
54
|
+
timedOut?: boolean;
|
|
51
55
|
/** Multi-part question mode */
|
|
52
56
|
results?: QuestionResult[];
|
|
53
57
|
}
|
|
@@ -128,6 +128,22 @@ export declare function parseConflictUri(raw: string): ParsedConflictUri | null;
|
|
|
128
128
|
* has actually been altered or removed.
|
|
129
129
|
*/
|
|
130
130
|
export declare function spliceConflict(originalText: string, entry: ConflictEntry, replacement: string): string;
|
|
131
|
+
/**
|
|
132
|
+
* True when two registered blocks record the same marker-block content
|
|
133
|
+
* (labels and all sides). Out-of-band edits can shift a block's line
|
|
134
|
+
* numbers between reads, registering a fresh id while the stale one
|
|
135
|
+
* persists; callers use content identity to treat a locate-miss for the
|
|
136
|
+
* stale twin as "already resolved" instead of a hard failure.
|
|
137
|
+
*/
|
|
138
|
+
export declare function conflictRegionsEqual(a: ConflictBlock, b: ConflictBlock): boolean;
|
|
139
|
+
/**
|
|
140
|
+
* True when the entry's recorded marker block still occurs in `content`
|
|
141
|
+
* (LF-normalized — recorded sections are stored LF). Distinguishes a stale
|
|
142
|
+
* re-registration of a just-resolved region (no longer present) from a
|
|
143
|
+
* DISTINCT conflict block that happens to be byte-identical (still present
|
|
144
|
+
* elsewhere in the file and must stay addressable).
|
|
145
|
+
*/
|
|
146
|
+
export declare function conflictRegionPresent(content: string, entry: ConflictBlock): boolean;
|
|
131
147
|
/**
|
|
132
148
|
* Expand `@ours` / `@theirs` / `@base` / `@both` line tokens against the
|
|
133
149
|
* recorded sections of `entry`. A token only triggers when it is the
|
|
@@ -69,6 +69,13 @@ export declare function invalidate(repo: string, kind: CacheKind, number: number
|
|
|
69
69
|
export declare function invalidateAllForNumber(number: number, repo?: string): void;
|
|
70
70
|
/** Drop every cached row. Test helper. */
|
|
71
71
|
export declare function clearAll(): void;
|
|
72
|
+
/**
|
|
73
|
+
* Drop every cached row for a repo, or all rows when the repo is unknown.
|
|
74
|
+
* Fallback for current-branch `gh pr merge`/`gh pr close`-style mutations
|
|
75
|
+
* where the bash command names no PR number or URL, so the target row cannot
|
|
76
|
+
* be identified. Over-invalidation is deliberate (see module header).
|
|
77
|
+
*/
|
|
78
|
+
export declare function invalidateAllForRepo(repo?: string): void;
|
|
72
79
|
/**
|
|
73
80
|
* Test/maintenance helper. Closes and forgets the cached connection so the
|
|
74
81
|
* next access reopens against (possibly) a different DB path.
|
|
@@ -279,6 +279,12 @@ export interface ToolSession {
|
|
|
279
279
|
/** Per-session ledger of post-edit LSP diagnostics already surfaced to the
|
|
280
280
|
* model for each file. Lazily initialized by `getDiagnosticsLedger`. */
|
|
281
281
|
diagnosticsLedger?: import("../lsp/diagnostics-ledger").DiagnosticsLedger;
|
|
282
|
+
/** Per-session ledger of consecutive byte-identical no-op edits, keyed by
|
|
283
|
+
* canonical file path. The hashline executor escalates a soft no-op hint
|
|
284
|
+
* to a thrown error once the same payload no-ops `NOOP_HARD_LIMIT` times,
|
|
285
|
+
* breaking subagent loops that ignore the textual hint (issue #2081).
|
|
286
|
+
* Lazily initialized by `getNoopLoopGuard`. */
|
|
287
|
+
noopLoopGuard?: import("../edit/hashline/noop-loop-guard").NoopLoopGuard;
|
|
282
288
|
/** Queue a hidden message to be injected at the next agent turn. */
|
|
283
289
|
queueDeferredMessage?(message: CustomMessage): void;
|
|
284
290
|
/** Queue late LSP diagnostics (arrived after an edit/write returned) to be shown
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { Database } from "bun:sqlite";
|
|
2
2
|
export declare function looksLikeSqlite(bytes: Uint8Array): boolean;
|
|
3
|
+
/** Row cap for raw `?q=` SQL — protects against `SELECT *` on multi-million-row tables. */
|
|
4
|
+
export declare const MAX_RAW_QUERY_ROWS = 1000;
|
|
3
5
|
export interface SqlitePathCandidate {
|
|
4
6
|
sqlitePath: string;
|
|
5
7
|
subPath: string;
|
|
@@ -84,6 +86,7 @@ export declare function getRowByRowId(db: Database, table: string, key: string):
|
|
|
84
86
|
export declare function executeReadQuery(db: Database, sql: string): {
|
|
85
87
|
columns: string[];
|
|
86
88
|
rows: Record<string, unknown>[];
|
|
89
|
+
truncated: boolean;
|
|
87
90
|
};
|
|
88
91
|
export declare function insertRow(db: Database, table: string, data: Record<string, unknown>): void;
|
|
89
92
|
export declare function updateRowByKey(db: Database, table: string, pk: {
|
|
@@ -10,7 +10,7 @@ export interface OutputBlockOptions {
|
|
|
10
10
|
state?: State;
|
|
11
11
|
sections?: Array<{
|
|
12
12
|
label?: string;
|
|
13
|
-
lines: string[];
|
|
13
|
+
lines: readonly string[];
|
|
14
14
|
separator?: boolean;
|
|
15
15
|
}>;
|
|
16
16
|
width: number;
|
|
@@ -36,8 +36,8 @@ export declare function renderOutputBlock(options: OutputBlockOptions, theme: Th
|
|
|
36
36
|
*/
|
|
37
37
|
export declare class CachedOutputBlock {
|
|
38
38
|
#private;
|
|
39
|
-
/** Render with caching. Returns cached
|
|
40
|
-
render(options: OutputBlockOptions, theme: Theme): string[];
|
|
39
|
+
/** Render with caching. Returns the cached (shared, caller-immutable) lines if options haven't changed. */
|
|
40
|
+
render(options: OutputBlockOptions, theme: Theme): readonly string[];
|
|
41
41
|
/** Invalidate the cache, forcing a rebuild on next render. */
|
|
42
42
|
invalidate(): void;
|
|
43
43
|
}
|
|
@@ -23,3 +23,11 @@ export declare function compareVersions(v1: ChangelogEntry, v2: ChangelogEntry):
|
|
|
23
23
|
*/
|
|
24
24
|
export declare function getNewEntries(entries: ChangelogEntry[], lastVersion: string): ChangelogEntry[];
|
|
25
25
|
export { getChangelogPath } from "../config";
|
|
26
|
+
/**
|
|
27
|
+
* Last omp version whose changelog the user has seen. Stored as a plain-text
|
|
28
|
+
* marker file (`~/.omp/agent/last-changelog-version`) rather than in
|
|
29
|
+
* `config.yml`, so version bumps never dirty user-tracked config files.
|
|
30
|
+
*/
|
|
31
|
+
export declare function readLastChangelogVersion(agentDir?: string): Promise<string | undefined>;
|
|
32
|
+
/** Persist the last-seen changelog version marker. Best-effort: failures are logged, never thrown. */
|
|
33
|
+
export declare function writeLastChangelogVersion(version: string, agentDir?: string): Promise<void>;
|
|
@@ -10,6 +10,7 @@ export interface GitRepository {
|
|
|
10
10
|
gitEntryPath: string;
|
|
11
11
|
headPath: string;
|
|
12
12
|
repoRoot: string;
|
|
13
|
+
isReftable?: boolean;
|
|
13
14
|
}
|
|
14
15
|
export interface GitStatusSummary {
|
|
15
16
|
staged: number;
|
|
@@ -327,7 +328,7 @@ export declare const ls: {
|
|
|
327
328
|
};
|
|
328
329
|
export declare const head: {
|
|
329
330
|
/** Full HEAD state (branch, commit, repo info). */
|
|
330
|
-
resolve(cwd: string): Promise<GitHeadState | null>;
|
|
331
|
+
resolve(cwd: string, signal?: AbortSignal): Promise<GitHeadState | null>;
|
|
331
332
|
/** Full HEAD state (synchronous). */
|
|
332
333
|
resolveSync(cwd: string): GitHeadState | null;
|
|
333
334
|
/** Current HEAD commit SHA. */
|
|
@@ -338,12 +339,24 @@ export declare const head: {
|
|
|
338
339
|
export declare const repo: {
|
|
339
340
|
/** Resolve the repository root (may be a worktree root). */
|
|
340
341
|
root(cwd: string, signal?: AbortSignal): Promise<string | null>;
|
|
341
|
-
/** Resolve the primary
|
|
342
|
+
/** Resolve the primary checkout root, or the shared common dir for bare-repo worktrees. */
|
|
342
343
|
primaryRoot(cwd: string, signal?: AbortSignal): Promise<string | null>;
|
|
344
|
+
/**
|
|
345
|
+
* Sync sibling of {@link primaryRoot}. Resolves only via on-disk `.git`/
|
|
346
|
+
* `commondir` walking — no subprocess fallback — so it stays usable from
|
|
347
|
+
* paths where async I/O is impractical (e.g. `computeBankScope`). Returns
|
|
348
|
+
* `null` when `cwd` is outside a repository. Bare-repo worktrees resolve to
|
|
349
|
+
* the shared common dir (`foo.git`) because they have no primary checkout.
|
|
350
|
+
*/
|
|
351
|
+
primaryRootSync(cwd: string): string | null;
|
|
343
352
|
/** Full GitRepository metadata (sync). */
|
|
344
353
|
resolveSync(cwd: string): GitRepository | null;
|
|
345
354
|
/** Full GitRepository metadata. */
|
|
346
355
|
resolve(cwd: string): Promise<GitRepository | null>;
|
|
356
|
+
/** Check if the repository uses the reftable reference storage format (sync). */
|
|
357
|
+
isReftableSync(repository: GitRepository): boolean;
|
|
358
|
+
/** Check if the repository uses the reftable reference storage format. */
|
|
359
|
+
isReftable(repository: GitRepository): Promise<boolean>;
|
|
347
360
|
};
|
|
348
361
|
export interface GhCommandResult {
|
|
349
362
|
exitCode: number;
|
|
@@ -15,9 +15,10 @@ export declare function raceFirstNonNull<T>(primary: Promise<T | null>, startFal
|
|
|
15
15
|
* to produce request metadata (e.g. user_id for session attribution). Using a
|
|
16
16
|
* resolver instead of a pre-evaluated value ensures the metadata's account_uuid
|
|
17
17
|
* reflects the credential actually selected for this request.
|
|
18
|
+
* @param customSystemPrompt Optional title-specific system prompt override
|
|
18
19
|
*/
|
|
19
|
-
export declare function generateSessionTitle(firstMessage: string, registry: ModelRegistry, settings: Settings, sessionId?: string, currentModel?: Model<Api>, metadataResolver?: (provider: string) => Record<string, unknown> | undefined): Promise<string | null>;
|
|
20
|
-
export declare function generateTitleOnline(firstMessage: string, registry: ModelRegistry, settings: Settings, sessionId?: string, currentModel?: Model<Api>, metadataResolver?: (provider: string) => Record<string, unknown> | undefined, signal?: AbortSignal): Promise<string | null>;
|
|
20
|
+
export declare function generateSessionTitle(firstMessage: string, registry: ModelRegistry, settings: Settings, sessionId?: string, currentModel?: Model<Api>, metadataResolver?: (provider: string) => Record<string, unknown> | undefined, customSystemPrompt?: string): Promise<string | null>;
|
|
21
|
+
export declare function generateTitleOnline(firstMessage: string, registry: ModelRegistry, settings: Settings, sessionId?: string, currentModel?: Model<Api>, metadataResolver?: (provider: string) => Record<string, unknown> | undefined, signal?: AbortSignal, customSystemPrompt?: string): Promise<string | null>;
|
|
21
22
|
export declare function formatSessionTerminalTitle(sessionName: string | undefined, cwd?: string): string;
|
|
22
23
|
/**
|
|
23
24
|
* Set the terminal title using OSC 0 (sets both tab and window title). Unsupported terminals ignore it.
|
|
@@ -27,6 +27,12 @@ export interface LoadPageOptions {
|
|
|
27
27
|
body?: string;
|
|
28
28
|
maxBytes?: number;
|
|
29
29
|
signal?: AbortSignal;
|
|
30
|
+
/**
|
|
31
|
+
* Return true to skip reading the response body for this content type
|
|
32
|
+
* (lowercased mime, no params). The caller is expected to re-fetch the
|
|
33
|
+
* payload as binary; this avoids streaming + decoding huge binaries twice.
|
|
34
|
+
*/
|
|
35
|
+
skipBodyForContentType?: (contentType: string) => boolean;
|
|
30
36
|
}
|
|
31
37
|
export interface LoadPageResult {
|
|
32
38
|
content: string;
|
|
@@ -34,6 +40,12 @@ export interface LoadPageResult {
|
|
|
34
40
|
finalUrl: string;
|
|
35
41
|
ok: boolean;
|
|
36
42
|
status?: number;
|
|
43
|
+
/** True when the body was cut mid-stream at maxBytes. */
|
|
44
|
+
truncated?: boolean;
|
|
45
|
+
/** Last transport-level error message when ok is false. */
|
|
46
|
+
error?: string;
|
|
47
|
+
/** True when the body read was skipped via skipBodyForContentType. */
|
|
48
|
+
bodySkipped?: boolean;
|
|
37
49
|
}
|
|
38
50
|
/**
|
|
39
51
|
* Fetch a page with timeout and size limit
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { AuthStorage, FetchImpl } from "@oh-my-pi/pi-ai";
|
|
2
2
|
import type { SearchResponse } from "../../../web/search/types";
|
|
3
3
|
import type { SearchParams } from "./base";
|
|
4
4
|
import { SearchProvider } from "./base";
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* sibling SQLite store and never POSTs the broker sentinel to a Google token
|
|
9
9
|
* endpoint.
|
|
10
10
|
*/
|
|
11
|
-
import {
|
|
11
|
+
import type { AuthStorage, FetchImpl } from "@oh-my-pi/pi-ai";
|
|
12
12
|
import type { SearchResponse } from "../../../web/search/types";
|
|
13
13
|
import type { SearchParams } from "./base";
|
|
14
14
|
import { SearchProvider } from "./base";
|
|
@@ -68,7 +68,7 @@ export default function toolsExtension(pi: ExtensionAPI) {
|
|
|
68
68
|
// Refresh tool list
|
|
69
69
|
allTools = pi.getAllTools();
|
|
70
70
|
|
|
71
|
-
await ctx.ui.custom((tui, theme, done) => {
|
|
71
|
+
await ctx.ui.custom((tui, theme, _keybindings, done) => {
|
|
72
72
|
// Build settings items for each tool
|
|
73
73
|
const items: SettingItem[] = allTools.map(tool => ({
|
|
74
74
|
id: tool,
|
|
@@ -78,10 +78,11 @@ export default function toolsExtension(pi: ExtensionAPI) {
|
|
|
78
78
|
}));
|
|
79
79
|
|
|
80
80
|
const container = new Container();
|
|
81
|
+
const header: readonly string[] = [theme.fg("accent", theme.bold("Tool Configuration")), ""];
|
|
81
82
|
container.addChild(
|
|
82
83
|
new (class {
|
|
83
|
-
render(_width: number) {
|
|
84
|
-
return
|
|
84
|
+
render(_width: number): readonly string[] {
|
|
85
|
+
return header;
|
|
85
86
|
}
|
|
86
87
|
invalidate() {}
|
|
87
88
|
})(),
|
|
@@ -110,7 +111,7 @@ export default function toolsExtension(pi: ExtensionAPI) {
|
|
|
110
111
|
container.addChild(settingsList);
|
|
111
112
|
|
|
112
113
|
const component = {
|
|
113
|
-
render(width: number) {
|
|
114
|
+
render(width: number): readonly string[] {
|
|
114
115
|
return container.render(width);
|
|
115
116
|
},
|
|
116
117
|
invalidate() {
|
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": "15.10.
|
|
4
|
+
"version": "15.10.12",
|
|
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",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"main": "./src/index.ts",
|
|
29
29
|
"types": "./dist/types/index.d.ts",
|
|
30
30
|
"bin": {
|
|
31
|
-
"omp": "
|
|
31
|
+
"omp": "dist/cli.js"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"build": "bun scripts/build-binary.ts",
|
|
@@ -40,21 +40,22 @@
|
|
|
40
40
|
"fmt": "biome format --write . && bun run format-prompts",
|
|
41
41
|
"format-prompts": "bun scripts/format-prompts.ts",
|
|
42
42
|
"generate-docs-index": "bun scripts/generate-docs-index.ts",
|
|
43
|
-
"prepack": "bun scripts/generate-docs-index.ts",
|
|
43
|
+
"prepack": "bun scripts/generate-docs-index.ts && bun scripts/bundle-dist.ts",
|
|
44
44
|
"generate-template": "bun scripts/generate-template.ts"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@agentclientprotocol/sdk": "0.22.1",
|
|
48
48
|
"@babel/parser": "^7.29.7",
|
|
49
49
|
"@mozilla/readability": "^0.6.0",
|
|
50
|
-
"@oh-my-pi/hashline": "15.10.
|
|
51
|
-
"@oh-my-pi/omp-stats": "15.10.
|
|
52
|
-
"@oh-my-pi/pi-agent-core": "15.10.
|
|
53
|
-
"@oh-my-pi/pi-ai": "15.10.
|
|
54
|
-
"@oh-my-pi/pi-
|
|
55
|
-
"@oh-my-pi/pi-
|
|
56
|
-
"@oh-my-pi/pi-
|
|
57
|
-
"@oh-my-pi/pi-
|
|
50
|
+
"@oh-my-pi/hashline": "15.10.12",
|
|
51
|
+
"@oh-my-pi/omp-stats": "15.10.12",
|
|
52
|
+
"@oh-my-pi/pi-agent-core": "15.10.12",
|
|
53
|
+
"@oh-my-pi/pi-ai": "15.10.12",
|
|
54
|
+
"@oh-my-pi/pi-catalog": "15.10.12",
|
|
55
|
+
"@oh-my-pi/pi-mnemopi": "15.10.12",
|
|
56
|
+
"@oh-my-pi/pi-natives": "15.10.12",
|
|
57
|
+
"@oh-my-pi/pi-tui": "15.10.12",
|
|
58
|
+
"@oh-my-pi/pi-utils": "15.10.12",
|
|
58
59
|
"@opentelemetry/api": "^1.9.1",
|
|
59
60
|
"@opentelemetry/context-async-hooks": "^2.7.1",
|
|
60
61
|
"@opentelemetry/exporter-trace-otlp-proto": "^0.218.0",
|
|
@@ -87,6 +88,8 @@
|
|
|
87
88
|
},
|
|
88
89
|
"files": [
|
|
89
90
|
"src",
|
|
91
|
+
"dist/cli.js",
|
|
92
|
+
"dist/*.node",
|
|
90
93
|
"scripts",
|
|
91
94
|
"examples",
|
|
92
95
|
"README.md",
|
package/scripts/build-binary.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { createRequire } from "node:module";
|
|
|
4
4
|
import * as path from "node:path";
|
|
5
5
|
|
|
6
6
|
const packageDir = path.join(import.meta.dir, "..");
|
|
7
|
+
const repoRoot = path.join(packageDir, "..", "..");
|
|
7
8
|
const outputPath = path.join(packageDir, "dist", "omp");
|
|
8
9
|
|
|
9
10
|
// Transformers.js is an optional, native-heavy dependency that is never bundled
|
|
@@ -19,9 +20,13 @@ function shouldAdhocSignDarwinBinary(): boolean {
|
|
|
19
20
|
return process.platform === "darwin";
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
async function runCommand(
|
|
23
|
+
async function runCommand(
|
|
24
|
+
command: string[],
|
|
25
|
+
env: NodeJS.ProcessEnv = Bun.env,
|
|
26
|
+
cwd: string = packageDir,
|
|
27
|
+
): Promise<void> {
|
|
23
28
|
const proc = Bun.spawn(command, {
|
|
24
|
-
cwd
|
|
29
|
+
cwd,
|
|
25
30
|
env,
|
|
26
31
|
stdout: "inherit",
|
|
27
32
|
stderr: "inherit",
|
|
@@ -55,19 +60,8 @@ async function main(): Promise<void> {
|
|
|
55
60
|
"--external",
|
|
56
61
|
"mupdf",
|
|
57
62
|
"--root",
|
|
58
|
-
"
|
|
59
|
-
"./src/cli.ts",
|
|
60
|
-
// Worker entrypoints. Bun's `--compile` discovers the literal in
|
|
61
|
-
// `new Worker("…", …)` at each spawn site, but only actually
|
|
62
|
-
// emits the worker into the bunfs root when it is listed here as
|
|
63
|
-
// an explicit additional entry. Paths are relative to this
|
|
64
|
-
// script's cwd (packages/coding-agent) and the `--root` above
|
|
65
|
-
// (../..) makes them appear inside the binary at
|
|
66
|
-
// `/$bunfs/root/packages/<pkg>/src/<worker>.js`, which is
|
|
67
|
-
// exactly what the literals at the spawn sites resolve to.
|
|
68
|
-
"../stats/src/sync-worker.ts",
|
|
69
|
-
"./src/tools/browser/tab-worker-entry.ts",
|
|
70
|
-
"./src/eval/js/worker-entry.ts",
|
|
63
|
+
".",
|
|
64
|
+
"./packages/coding-agent/src/cli.ts",
|
|
71
65
|
// Legacy pi-* extension compat entrypoints served by
|
|
72
66
|
// `legacy-pi-compat.ts`. These are reached via computed bunfs paths
|
|
73
67
|
// (which `--compile`'s static analyzer cannot trace), so each must be
|
|
@@ -77,17 +71,18 @@ async function main(): Promise<void> {
|
|
|
77
71
|
// breaks the CLI entry when the same package's barrel appears as an
|
|
78
72
|
// extra entrypoint (issue #1474), so legacy `pi-coding-agent` imports
|
|
79
73
|
// resolve through `legacy-pi-coding-agent-shim.ts` instead.
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"./src/extensibility/typebox.ts",
|
|
85
|
-
"./src/extensibility/legacy-pi-ai-shim.ts",
|
|
86
|
-
"./src/extensibility/legacy-pi-coding-agent-shim.ts",
|
|
74
|
+
"./packages/agent/src/index.ts",
|
|
75
|
+
"./packages/natives/native/index.js",
|
|
76
|
+
"./packages/tui/src/index.ts",
|
|
77
|
+
"./packages/utils/src/index.ts",
|
|
78
|
+
"./packages/coding-agent/src/extensibility/typebox.ts",
|
|
79
|
+
"./packages/coding-agent/src/extensibility/legacy-pi-ai-shim.ts",
|
|
80
|
+
"./packages/coding-agent/src/extensibility/legacy-pi-coding-agent-shim.ts",
|
|
87
81
|
"--outfile",
|
|
88
|
-
"dist/omp",
|
|
82
|
+
"packages/coding-agent/dist/omp",
|
|
89
83
|
],
|
|
90
84
|
buildEnv,
|
|
85
|
+
repoRoot,
|
|
91
86
|
);
|
|
92
87
|
|
|
93
88
|
// Bun 1.3.12 emits a truncated Mach-O signature on darwin builds.
|