@astralyn/pi 0.83.0 → 0.84.1
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 +66 -0
- package/dist/bun/cli.d.ts.map +1 -1
- package/dist/bun/cli.js.map +1 -1
- package/dist/bun/register-bedrock.d.ts.map +1 -1
- package/dist/bun/restore-sandbox-env.d.ts.map +1 -1
- package/dist/bun/restore-sandbox-env.js.map +1 -1
- package/dist/cli/args.d.ts +2 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +22 -3
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/auth-check.d.ts +19 -0
- package/dist/cli/auth-check.d.ts.map +1 -0
- package/dist/cli/auth-check.js +50 -0
- package/dist/cli/auth-check.js.map +1 -0
- package/dist/cli/auth-command.d.ts +24 -0
- package/dist/cli/auth-command.d.ts.map +1 -0
- package/dist/cli/auth-command.js +104 -0
- package/dist/cli/auth-command.js.map +1 -0
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js +2 -2
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/credential-print.d.ts +5 -15
- package/dist/cli/credential-print.d.ts.map +1 -1
- package/dist/cli/credential-print.js +42 -82
- package/dist/cli/credential-print.js.map +1 -1
- package/dist/cli/experimental/auth.d.ts +16 -0
- package/dist/cli/experimental/auth.d.ts.map +1 -0
- package/dist/cli/experimental/auth.js +13 -0
- package/dist/cli/experimental/auth.js.map +1 -0
- package/dist/cli/experimental/cli.d.ts +6 -0
- package/dist/cli/experimental/cli.d.ts.map +1 -0
- package/dist/cli/experimental/cli.js +5 -0
- package/dist/cli/experimental/cli.js.map +1 -0
- package/dist/cli/experimental/command-options.d.ts +17 -0
- package/dist/cli/experimental/command-options.d.ts.map +1 -0
- package/dist/cli/experimental/command-options.js +35 -0
- package/dist/cli/experimental/command-options.js.map +1 -0
- package/dist/cli/experimental/command.d.ts +63 -0
- package/dist/cli/experimental/command.d.ts.map +1 -0
- package/dist/cli/experimental/command.js +127 -0
- package/dist/cli/experimental/command.js.map +1 -0
- package/dist/cli/experimental/commands/client.d.ts +13 -0
- package/dist/cli/experimental/commands/client.d.ts.map +1 -0
- package/dist/cli/experimental/commands/client.js +25 -0
- package/dist/cli/experimental/commands/client.js.map +1 -0
- package/dist/cli/experimental/commands/pi.d.ts +15 -0
- package/dist/cli/experimental/commands/pi.d.ts.map +1 -0
- package/dist/cli/experimental/commands/pi.js +28 -0
- package/dist/cli/experimental/commands/pi.js.map +1 -0
- package/dist/cli/experimental/commands/server.d.ts +13 -0
- package/dist/cli/experimental/commands/server.d.ts.map +1 -0
- package/dist/cli/experimental/commands/server.js +25 -0
- package/dist/cli/experimental/commands/server.js.map +1 -0
- package/dist/cli/experimental/transport-address.d.ts +10 -0
- package/dist/cli/experimental/transport-address.d.ts.map +1 -0
- package/dist/cli/experimental/transport-address.js +38 -0
- package/dist/cli/experimental/transport-address.js.map +1 -0
- package/dist/cli/file-processor.d.ts.map +1 -1
- package/dist/cli/file-processor.js.map +1 -1
- package/dist/cli/initial-message.d.ts +1 -1
- package/dist/cli/initial-message.d.ts.map +1 -1
- package/dist/cli/initial-message.js.map +1 -1
- package/dist/cli/list-models.d.ts +1 -1
- package/dist/cli/list-models.d.ts.map +1 -1
- package/dist/cli/list-models.js +2 -2
- package/dist/cli/list-models.js.map +1 -1
- package/dist/cli/project-trust.d.ts.map +1 -1
- package/dist/cli/project-trust.js.map +1 -1
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/cli/startup-ui.d.ts +1 -1
- package/dist/cli/startup-ui.d.ts.map +1 -1
- package/dist/cli/startup-ui.js +2 -2
- package/dist/cli/startup-ui.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -0
- package/dist/cli.js.map +1 -1
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +3 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/remote-session.d.ts +53 -0
- package/dist/client/remote-session.d.ts.map +1 -0
- package/dist/client/remote-session.js +340 -0
- package/dist/client/remote-session.js.map +1 -0
- package/dist/client/transcript.d.ts +12 -0
- package/dist/client/transcript.d.ts.map +1 -0
- package/dist/client/transcript.js +98 -0
- package/dist/client/transcript.js.map +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +0 -8
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +1 -0
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +1 -0
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +30 -10
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +177 -187
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-guidance.d.ts.map +1 -1
- package/dist/core/auth-guidance.js.map +1 -1
- package/dist/core/auth-storage.d.ts +25 -9
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +235 -42
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/cache-stats.d.ts.map +1 -1
- package/dist/core/cache-stats.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/index.d.ts.map +1 -1
- package/dist/core/compaction/utils.d.ts.map +1 -1
- package/dist/core/compaction/utils.js.map +1 -1
- package/dist/core/defaults.d.ts.map +1 -1
- package/dist/core/diagnostics.d.ts.map +1 -1
- package/dist/core/event-bus.d.ts.map +1 -1
- package/dist/core/event-bus.js.map +1 -1
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js.map +1 -1
- package/dist/core/experimental.d.ts.map +1 -1
- package/dist/core/experimental.js.map +1 -1
- package/dist/core/export-html/ansi-to-html.d.ts.map +1 -1
- package/dist/core/export-html/ansi-to-html.js.map +1 -1
- package/dist/core/export-html/index.d.ts.map +1 -1
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +43 -20
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +2 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +25 -29
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +26 -3
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/extensions/wrapper.d.ts.map +1 -1
- package/dist/core/extensions/wrapper.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +17 -18
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/http-dispatcher.d.ts.map +1 -1
- package/dist/core/http-dispatcher.js +5 -0
- package/dist/core/http-dispatcher.js.map +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/keybindings.d.ts +165 -125
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +0 -1
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-config.d.ts +37 -13
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +4 -2
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-registry.d.ts +5 -3
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +13 -11
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts +4 -3
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +42 -10
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts +30 -13
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +241 -91
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/models-store.d.ts +12 -7
- package/dist/core/models-store.d.ts.map +1 -1
- package/dist/core/models-store.js +84 -16
- package/dist/core/models-store.js.map +1 -1
- package/dist/core/output-guard.d.ts.map +1 -1
- package/dist/core/output-guard.js.map +1 -1
- package/dist/core/package-manager.d.ts +4 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +63 -42
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/pi-manifest.d.ts +8 -0
- package/dist/core/pi-manifest.d.ts.map +1 -0
- package/dist/core/pi-manifest.js +25 -0
- package/dist/core/pi-manifest.js.map +1 -0
- package/dist/core/project-trust.d.ts.map +1 -1
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/provider-attribution.d.ts.map +1 -1
- package/dist/core/provider-attribution.js.map +1 -1
- package/dist/core/provider-composer.d.ts +4 -1
- package/dist/core/provider-composer.d.ts.map +1 -1
- package/dist/core/provider-composer.js +36 -15
- package/dist/core/provider-composer.js.map +1 -1
- package/dist/core/radius.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +73 -67
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/resolve-config-value.d.ts.map +1 -1
- package/dist/core/resolve-config-value.js.map +1 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +2 -46
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/runtime-credentials.d.ts +5 -5
- package/dist/core/runtime-credentials.d.ts.map +1 -1
- package/dist/core/runtime-credentials.js +12 -10
- package/dist/core/runtime-credentials.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-cwd.d.ts.map +1 -1
- package/dist/core/session-cwd.js +0 -1
- package/dist/core/session-cwd.js.map +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +10 -12
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +12 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +47 -33
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/source-info.d.ts.map +1 -1
- package/dist/core/source-info.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/telemetry.d.ts.map +1 -1
- package/dist/core/telemetry.js.map +1 -1
- package/dist/core/timings.d.ts.map +1 -1
- package/dist/core/timings.js.map +1 -1
- package/dist/core/tools/bash.d.ts +4 -0
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +18 -14
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit-diff.d.ts.map +1 -1
- package/dist/core/tools/edit-diff.js.map +1 -1
- package/dist/core/tools/edit.d.ts +4 -0
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +15 -10
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/file-mutation-queue.d.ts.map +1 -1
- package/dist/core/tools/file-mutation-queue.js.map +1 -1
- package/dist/core/tools/find.d.ts +7 -0
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +18 -17
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts +4 -0
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +5 -1
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/ls.d.ts +4 -0
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +5 -1
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +12 -18
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/path-utils.d.ts.map +1 -1
- package/dist/core/tools/path-utils.js.map +1 -1
- package/dist/core/tools/read.d.ts +4 -0
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +7 -3
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
- package/dist/core/tools/truncate.d.ts.map +1 -1
- package/dist/core/tools/truncate.js.map +1 -1
- package/dist/core/tools/write.d.ts +4 -0
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +6 -3
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/trust-manager.d.ts.map +1 -1
- package/dist/core/trust-manager.js +0 -1
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/core/usage-totals.d.ts.map +1 -1
- package/dist/core/usage-totals.js.map +1 -1
- package/dist/extensions/biu/index.d.ts +19 -0
- package/dist/extensions/biu/index.d.ts.map +1 -0
- package/dist/extensions/biu/index.js +350 -0
- package/dist/extensions/biu/index.js.map +1 -0
- package/dist/extensions/biu/prompts.d.ts +26 -0
- package/dist/extensions/biu/prompts.d.ts.map +1 -0
- package/dist/extensions/biu/prompts.js +260 -0
- package/dist/extensions/biu/prompts.js.map +1 -0
- package/dist/extensions/biu/workspace.d.ts +122 -0
- package/dist/extensions/biu/workspace.d.ts.map +1 -0
- package/dist/extensions/biu/workspace.js +404 -0
- package/dist/extensions/biu/workspace.js.map +1 -0
- package/dist/extensions/deepwiki/client.d.ts.map +1 -1
- package/dist/extensions/deepwiki/client.js.map +1 -1
- package/dist/extensions/deepwiki/constants.d.ts.map +1 -1
- package/dist/extensions/deepwiki/constants.js.map +1 -1
- package/dist/extensions/deepwiki/contents.d.ts.map +1 -1
- package/dist/extensions/deepwiki/contents.js.map +1 -1
- package/dist/extensions/deepwiki/execute.d.ts.map +1 -1
- package/dist/extensions/deepwiki/execute.js.map +1 -1
- package/dist/extensions/deepwiki/http.d.ts.map +1 -1
- package/dist/extensions/deepwiki/http.js.map +1 -1
- package/dist/extensions/deepwiki/index.d.ts.map +1 -1
- package/dist/extensions/deepwiki/index.js.map +1 -1
- package/dist/extensions/deepwiki/render.d.ts.map +1 -1
- package/dist/extensions/deepwiki/render.js.map +1 -1
- package/dist/extensions/deepwiki/schema.d.ts +1 -1
- package/dist/extensions/deepwiki/schema.d.ts.map +1 -1
- package/dist/extensions/deepwiki/schema.js.map +1 -1
- package/dist/extensions/index.d.ts.map +1 -1
- package/dist/extensions/index.js +2 -0
- package/dist/extensions/index.js.map +1 -1
- package/dist/extensions/llama/client.d.ts.map +1 -1
- package/dist/extensions/llama/client.js +0 -2
- package/dist/extensions/llama/client.js.map +1 -1
- package/dist/extensions/llama/huggingface.d.ts.map +1 -1
- package/dist/extensions/llama/huggingface.js +0 -2
- package/dist/extensions/llama/huggingface.js.map +1 -1
- package/dist/extensions/llama/index.d.ts.map +1 -1
- package/dist/extensions/llama/index.js +11 -2
- package/dist/extensions/llama/index.js.map +1 -1
- package/dist/extensions/llama/provider.d.ts.map +1 -1
- package/dist/extensions/llama/provider.js +21 -7
- package/dist/extensions/llama/provider.js.map +1 -1
- package/dist/extensions/llama/ui.d.ts.map +1 -1
- package/dist/extensions/llama/ui.js +12 -28
- package/dist/extensions/llama/ui.js.map +1 -1
- package/dist/extensions/question/constants.d.ts.map +1 -1
- package/dist/extensions/question/constants.js.map +1 -1
- package/dist/extensions/question/dialog-primitives.d.ts.map +1 -1
- package/dist/extensions/question/dialog-primitives.js.map +1 -1
- package/dist/extensions/question/dialog.d.ts.map +1 -1
- package/dist/extensions/question/dialog.js.map +1 -1
- package/dist/extensions/question/index.d.ts.map +1 -1
- package/dist/extensions/question/index.js.map +1 -1
- package/dist/extensions/question/limits.d.ts.map +1 -1
- package/dist/extensions/question/render-cache.d.ts.map +1 -1
- package/dist/extensions/question/render-cache.js +3 -4
- package/dist/extensions/question/render-cache.js.map +1 -1
- package/dist/extensions/question/render.d.ts.map +1 -1
- package/dist/extensions/question/render.js.map +1 -1
- package/dist/extensions/question/results.d.ts.map +1 -1
- package/dist/extensions/question/results.js.map +1 -1
- package/dist/extensions/question/schema.d.ts.map +1 -1
- package/dist/extensions/question/schema.js.map +1 -1
- package/dist/extensions/question/state.d.ts.map +1 -1
- package/dist/extensions/question/state.js.map +1 -1
- package/dist/extensions/question/types.d.ts.map +1 -1
- package/dist/extensions/rewind/anchor.d.ts.map +1 -1
- package/dist/extensions/rewind/anchor.js.map +1 -1
- package/dist/extensions/rewind/config.d.ts.map +1 -1
- package/dist/extensions/rewind/config.js.map +1 -1
- package/dist/extensions/rewind/engine.d.ts.map +1 -1
- package/dist/extensions/rewind/engine.js.map +1 -1
- package/dist/extensions/rewind/gc.d.ts.map +1 -1
- package/dist/extensions/rewind/gc.js.map +1 -1
- package/dist/extensions/rewind/index.d.ts.map +1 -1
- package/dist/extensions/rewind/index.js.map +1 -1
- package/dist/extensions/rewind/menu.d.ts.map +1 -1
- package/dist/extensions/rewind/menu.js.map +1 -1
- package/dist/extensions/rewind/paths.d.ts.map +1 -1
- package/dist/extensions/rewind/paths.js.map +1 -1
- package/dist/extensions/rewind/restore.d.ts.map +1 -1
- package/dist/extensions/rewind/restore.js.map +1 -1
- package/dist/extensions/rewind/snapshot.d.ts.map +1 -1
- package/dist/extensions/rewind/snapshot.js.map +1 -1
- package/dist/extensions/rewind/storage.d.ts.map +1 -1
- package/dist/extensions/rewind/storage.js.map +1 -1
- package/dist/extensions/rewind/text.d.ts.map +1 -1
- package/dist/extensions/rewind/text.js.map +1 -1
- package/dist/extensions/rewind/tool-path.d.ts.map +1 -1
- package/dist/extensions/rewind/tool-path.js.map +1 -1
- package/dist/extensions/router/constants.d.ts +3 -0
- package/dist/extensions/router/constants.d.ts.map +1 -1
- package/dist/extensions/router/constants.js +3 -0
- package/dist/extensions/router/constants.js.map +1 -1
- package/dist/extensions/router/dialog.d.ts +14 -7
- package/dist/extensions/router/dialog.d.ts.map +1 -1
- package/dist/extensions/router/dialog.js +70 -132
- package/dist/extensions/router/dialog.js.map +1 -1
- package/dist/extensions/router/index.d.ts.map +1 -1
- package/dist/extensions/router/index.js.map +1 -1
- package/dist/extensions/router/presets.d.ts +8 -3
- package/dist/extensions/router/presets.d.ts.map +1 -1
- package/dist/extensions/router/presets.js +33 -17
- package/dist/extensions/router/presets.js.map +1 -1
- package/dist/extensions/router/probe.d.ts.map +1 -1
- package/dist/extensions/router/probe.js.map +1 -1
- package/dist/extensions/router/register.d.ts +3 -3
- package/dist/extensions/router/register.d.ts.map +1 -1
- package/dist/extensions/router/register.js.map +1 -1
- package/dist/extensions/router/store.d.ts.map +1 -1
- package/dist/extensions/router/store.js.map +1 -1
- package/dist/extensions/router/stream.d.ts.map +1 -1
- package/dist/extensions/router/stream.js.map +1 -1
- package/dist/extensions/router/types.d.ts.map +1 -1
- package/dist/extensions/router/ui.d.ts +11 -2
- package/dist/extensions/router/ui.d.ts.map +1 -1
- package/dist/extensions/router/ui.js +316 -171
- package/dist/extensions/router/ui.js.map +1 -1
- package/dist/extensions/statusline/index.d.ts.map +1 -1
- package/dist/extensions/statusline/index.js +17 -9
- package/dist/extensions/statusline/index.js.map +1 -1
- package/dist/extensions/subagent/activity.d.ts.map +1 -1
- package/dist/extensions/subagent/activity.js.map +1 -1
- package/dist/extensions/subagent/agents.d.ts.map +1 -1
- package/dist/extensions/subagent/agents.js.map +1 -1
- package/dist/extensions/subagent/constants.d.ts.map +1 -1
- package/dist/extensions/subagent/index.d.ts +3 -0
- package/dist/extensions/subagent/index.d.ts.map +1 -1
- package/dist/extensions/subagent/index.js +83 -12
- package/dist/extensions/subagent/index.js.map +1 -1
- package/dist/extensions/subagent/picker.d.ts.map +1 -1
- package/dist/extensions/subagent/picker.js +2 -9
- package/dist/extensions/subagent/picker.js.map +1 -1
- package/dist/extensions/subagent/render.d.ts.map +1 -1
- package/dist/extensions/subagent/render.js +33 -9
- package/dist/extensions/subagent/render.js.map +1 -1
- package/dist/extensions/subagent/resolve.d.ts.map +1 -1
- package/dist/extensions/subagent/resolve.js.map +1 -1
- package/dist/extensions/subagent/retry.d.ts.map +1 -1
- package/dist/extensions/subagent/retry.js.map +1 -1
- package/dist/extensions/subagent/runner.d.ts +2 -1
- package/dist/extensions/subagent/runner.d.ts.map +1 -1
- package/dist/extensions/subagent/runner.js +10 -12
- package/dist/extensions/subagent/runner.js.map +1 -1
- package/dist/extensions/subagent/schema.d.ts.map +1 -1
- package/dist/extensions/subagent/schema.js.map +1 -1
- package/dist/extensions/subagent/sdk-runner.d.ts.map +1 -1
- package/dist/extensions/subagent/sdk-runner.js +41 -1
- package/dist/extensions/subagent/sdk-runner.js.map +1 -1
- package/dist/extensions/subagent/settings.d.ts.map +1 -1
- package/dist/extensions/subagent/settings.js +46 -36
- package/dist/extensions/subagent/settings.js.map +1 -1
- package/dist/extensions/subagent/types.d.ts +0 -1
- package/dist/extensions/subagent/types.d.ts.map +1 -1
- package/dist/extensions/subagent/types.js.map +1 -1
- package/dist/extensions/todo/constants.d.ts.map +1 -1
- package/dist/extensions/todo/constants.js.map +1 -1
- package/dist/extensions/todo/index.d.ts.map +1 -1
- package/dist/extensions/todo/index.js.map +1 -1
- package/dist/extensions/todo/overlay.d.ts.map +1 -1
- package/dist/extensions/todo/overlay.js +6 -10
- package/dist/extensions/todo/overlay.js.map +1 -1
- package/dist/extensions/todo/schema.d.ts +2 -2
- package/dist/extensions/todo/schema.d.ts.map +1 -1
- package/dist/extensions/todo/state.d.ts.map +1 -1
- package/dist/extensions/todo/state.js.map +1 -1
- package/dist/extensions/todo/view.d.ts.map +1 -1
- package/dist/extensions/todo/view.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +70 -25
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js.map +1 -1
- package/dist/modes/index.d.ts +1 -0
- package/dist/modes/index.d.ts.map +1 -1
- package/dist/modes/index.js.map +1 -1
- package/dist/modes/interactive/components/armin.d.ts.map +1 -1
- package/dist/modes/interactive/components/armin.js +6 -10
- package/dist/modes/interactive/components/armin.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +5 -2
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +13 -11
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +4 -10
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.js +0 -3
- package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js +1 -3
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +1 -3
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +5 -22
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.js +1 -7
- package/dist/modes/interactive/components/countdown-timer.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +8 -8
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-entry.js +1 -4
- package/dist/modes/interactive/components/custom-entry.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +1 -7
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/daxnuts.d.ts.map +1 -1
- package/dist/modes/interactive/components/daxnuts.js +6 -8
- package/dist/modes/interactive/components/daxnuts.js.map +1 -1
- package/dist/modes/interactive/components/diff.d.ts.map +1 -1
- package/dist/modes/interactive/components/diff.js.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.js +0 -1
- package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.d.ts.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +1 -7
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-input.js +2 -8
- package/dist/modes/interactive/components/extension-input.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js +1 -9
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.js +2 -4
- package/dist/modes/interactive/components/first-time-setup.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +2 -4
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +3 -9
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/markdown-transform.d.ts +3 -0
- package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -0
- package/dist/modes/interactive/components/markdown-transform.js +19 -0
- package/dist/modes/interactive/components/markdown-transform.js.map +1 -0
- package/dist/modes/interactive/components/mermaid.d.ts +11 -0
- package/dist/modes/interactive/components/mermaid.d.ts.map +1 -0
- package/dist/modes/interactive/components/mermaid.js +75 -0
- package/dist/modes/interactive/components/mermaid.js.map +1 -0
- package/dist/modes/interactive/components/model-selector.d.ts +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +28 -29
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +3 -11
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +4 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +34 -13
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +35 -60
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +8 -2
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +30 -14
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/show-images-selector.js +0 -1
- package/dist/modes/interactive/components/show-images-selector.js.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +1 -3
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
- package/dist/modes/interactive/components/status-indicator.js +0 -2
- package/dist/modes/interactive/components/status-indicator.js.map +1 -1
- package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/theme-selector.js +0 -2
- package/dist/modes/interactive/components/theme-selector.js.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +0 -1
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +18 -36
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tool-group.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-group.js +2 -3
- package/dist/modes/interactive/components/tool-group.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js +19 -39
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/trust-selector.js +0 -6
- package/dist/modes/interactive/components/trust-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.js +3 -6
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts +3 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +8 -5
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
- package/dist/modes/interactive/external-editor.d.ts.map +1 -1
- package/dist/modes/interactive/external-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +46 -5
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +538 -282
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/model-search.d.ts.map +1 -1
- package/dist/modes/interactive/model-search.js.map +1 -1
- package/dist/modes/interactive/theme/dark.json +1 -0
- package/dist/modes/interactive/theme/light.json +1 -0
- package/dist/modes/interactive/theme/theme-controller.d.ts +3 -0
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-controller.js +11 -8
- package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
- package/dist/modes/interactive/theme/theme-schema.json +5 -1
- package/dist/modes/interactive/theme/theme.d.ts +4 -4
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +24 -12
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/json-event.d.ts +28 -0
- package/dist/modes/json-event.d.ts.map +1 -0
- package/dist/modes/json-event.js +12 -0
- package/dist/modes/json-event.js.map +1 -0
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +12 -2
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/jsonl.d.ts.map +1 -1
- package/dist/modes/rpc/jsonl.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +5 -4
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +7 -8
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +4 -3
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +11 -9
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/rpc-entry.d.ts.map +1 -1
- package/dist/rpc-entry.js +1 -0
- package/dist/rpc-entry.js.map +1 -1
- package/dist/server/create-harness.d.ts +26 -0
- package/dist/server/create-harness.d.ts.map +1 -0
- package/dist/server/create-harness.js +104 -0
- package/dist/server/create-harness.js.map +1 -0
- package/dist/utils/abort.d.ts +5 -0
- package/dist/utils/abort.d.ts.map +1 -0
- package/dist/utils/abort.js +48 -0
- package/dist/utils/abort.js.map +1 -0
- package/dist/utils/ansi.d.ts.map +1 -1
- package/dist/utils/ansi.js.map +1 -1
- package/dist/utils/changelog.d.ts.map +1 -1
- package/dist/utils/changelog.js.map +1 -1
- package/dist/utils/child-process.d.ts.map +1 -1
- package/dist/utils/child-process.js.map +1 -1
- package/dist/utils/clipboard-image.d.ts.map +1 -1
- package/dist/utils/clipboard-image.js.map +1 -1
- package/dist/utils/clipboard-native.d.ts.map +1 -1
- package/dist/utils/clipboard-native.js.map +1 -1
- package/dist/utils/clipboard.d.ts +1 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +22 -2
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/coalescing-terminal.d.ts +20 -4
- package/dist/utils/coalescing-terminal.d.ts.map +1 -1
- package/dist/utils/coalescing-terminal.js +48 -12
- package/dist/utils/coalescing-terminal.js.map +1 -1
- package/dist/utils/deprecation.d.ts.map +1 -1
- package/dist/utils/deprecation.js.map +1 -1
- package/dist/utils/exif-orientation.d.ts.map +1 -1
- package/dist/utils/exif-orientation.js.map +1 -1
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js.map +1 -1
- package/dist/utils/fs-watch.d.ts.map +1 -1
- package/dist/utils/fs-watch.js.map +1 -1
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/html.d.ts.map +1 -1
- package/dist/utils/html.js.map +1 -1
- package/dist/utils/image-convert.d.ts.map +1 -1
- package/dist/utils/image-convert.js.map +1 -1
- package/dist/utils/image-process.d.ts.map +1 -1
- package/dist/utils/image-process.js.map +1 -1
- package/dist/utils/image-resize-core.d.ts.map +1 -1
- package/dist/utils/image-resize-core.js.map +1 -1
- package/dist/utils/image-resize-worker.d.ts.map +1 -1
- package/dist/utils/image-resize-worker.js.map +1 -1
- package/dist/utils/image-resize.d.ts.map +1 -1
- package/dist/utils/image-resize.js.map +1 -1
- package/dist/utils/json.d.ts.map +1 -1
- package/dist/utils/json.js.map +1 -1
- package/dist/utils/management-http.d.ts +23 -0
- package/dist/utils/management-http.d.ts.map +1 -0
- package/dist/utils/management-http.js +50 -0
- package/dist/utils/management-http.js.map +1 -0
- package/dist/utils/mime.d.ts.map +1 -1
- package/dist/utils/mime.js.map +1 -1
- package/dist/utils/open-browser.d.ts.map +1 -1
- package/dist/utils/open-browser.js.map +1 -1
- package/dist/utils/paths.d.ts +3 -0
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +23 -1
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/photon.d.ts.map +1 -1
- package/dist/utils/photon.js.map +1 -1
- package/dist/utils/pi-user-agent.d.ts.map +1 -1
- package/dist/utils/pi-user-agent.js.map +1 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/sleep.d.ts.map +1 -1
- package/dist/utils/sleep.js.map +1 -1
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/dist/utils/tool-result-images.d.ts +19 -0
- package/dist/utils/tool-result-images.d.ts.map +1 -0
- package/dist/utils/tool-result-images.js +45 -0
- package/dist/utils/tool-result-images.js.map +1 -0
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +4 -6
- package/dist/utils/tools-manager.js.map +1 -1
- package/dist/utils/version-check.d.ts +4 -0
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js +20 -2
- package/dist/utils/version-check.js.map +1 -1
- package/dist/utils/windows-self-update.d.ts.map +1 -1
- package/dist/utils/windows-self-update.js.map +1 -1
- package/docs/bundled/README.md +1 -0
- package/docs/bundled/extensions/biu.md +63 -0
- package/docs/bundled/extensions/router.md +20 -14
- package/docs/bundled/extensions/statusline.md +7 -5
- package/docs/custom-provider.md +123 -2
- package/docs/development.md +83 -0
- package/docs/docs.json +8 -4
- package/docs/extensions.md +30 -5
- package/docs/json.md +21 -2
- package/docs/keybindings.md +46 -14
- package/docs/models.md +21 -3
- package/docs/providers.md +9 -1
- package/docs/quickstart.md +2 -0
- package/docs/rpc.md +12 -11
- package/docs/sdk.md +46 -0
- package/docs/security.md +1 -1
- package/docs/settings.md +4 -1
- package/docs/themes.md +7 -5
- package/docs/usage.md +8 -0
- package/examples/extensions/custom-compaction.ts +1 -16
- package/examples/extensions/custom-provider-anthropic/index.ts +2 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +5 -5
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/index.ts +2 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/doom-overlay/wad-finder.ts +7 -3
- package/examples/extensions/dynamic-resources/dynamic.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/handoff.ts +2 -11
- package/examples/extensions/qna.ts +3 -7
- package/examples/extensions/sandbox/package-lock.json +3 -3
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/summarize.ts +8 -18
- package/examples/extensions/with-deps/package-lock.json +4 -4
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/rpc-extension-ui.ts +11 -2
- package/examples/sdk/02-custom-model.ts +1 -2
- package/examples/sdk/09-api-keys-and-oauth.ts +1 -1
- package/examples/sdk/12-full-control.ts +1 -1
- package/examples/sdk/README.md +1 -0
- package/npm-shrinkwrap.json +193 -264
- package/package.json +15 -8
|
@@ -22,23 +22,24 @@ Providers are registered at extension load via `pi.registerProvider` (config for
|
|
|
22
22
|
```
|
|
23
23
|
API relays ← relays first; add / reload at bottom
|
|
24
24
|
└─ Relay · {id} ← models · base URL · API key · remove
|
|
25
|
-
└─ Models ←
|
|
26
|
-
└─ {model id} ← display name · thinking levels
|
|
25
|
+
└─ Models ← searchable model list + fetch / manual add
|
|
26
|
+
└─ {model id} ← display name · thinking levels · remove
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
Edits **auto-save** to `router.json` and re-register the provider. There is no
|
|
29
|
+
Edits **auto-save** to `router.json` and re-register the provider. Text fields save when confirmed; model and thinking toggles save immediately. There is no Save or Apply step, and Back never discards a completed change.
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
Model search follows Pi's `/model` behavior: the search field is always visible, typing fuzzy-filters results, arrows wrap around the list, Enter opens the highlighted item, and Esc goes back. Catalog checkboxes use Space to toggle live; Enter or Esc returns to the model list. The model currently used by the session is protected and must be changed with `/model` before it can be disabled or removed.
|
|
32
32
|
|
|
33
33
|
### Add flow
|
|
34
34
|
|
|
35
35
|
1. **Name** — provider id (e.g. `my-relay`); appears as `my-relay/gpt-5.6-sol` in `/model`
|
|
36
36
|
2. **Base URL** — usually ends with `/v1`
|
|
37
37
|
3. **API key** — literal `sk-…` or `$ENV_VAR`
|
|
38
|
-
4.
|
|
39
|
-
5. **
|
|
38
|
+
4. The relay connection is written immediately, even before models are fetched.
|
|
39
|
+
5. **Fetch models** — `GET {baseUrl}/models`
|
|
40
|
+
6. **Select** — Space toggles each model immediately. If fetching fails, retry or add model ids manually.
|
|
40
41
|
|
|
41
|
-
Each selected model gets these defaults:
|
|
42
|
+
A failed or cancelled catalog fetch does not lose the relay. Each selected model gets these defaults:
|
|
42
43
|
|
|
43
44
|
| Field | Default |
|
|
44
45
|
|:-:|:-:|
|
|
@@ -47,14 +48,15 @@ Each selected model gets these defaults:
|
|
|
47
48
|
| `input` | `text` + `image` |
|
|
48
49
|
| `contextWindow` | 272000 |
|
|
49
50
|
| `maxTokens` | 128000 |
|
|
50
|
-
| `thinkingLevelMap` | off
|
|
51
|
+
| `thinkingLevelMap` | `off` / `minimal` hidden; `low` / `medium` / `high` / `xhigh` / `max` enabled |
|
|
51
52
|
|
|
52
53
|
### Customize models
|
|
53
54
|
|
|
54
55
|
Relay → **Models** → pick a model:
|
|
55
56
|
|
|
56
|
-
- **Display name** — optional label (e.g. `Luna`). Leave empty to show the id. Saved on
|
|
57
|
-
- **Thinking levels** —
|
|
57
|
+
- **Display name** — optional label (e.g. `Luna`). Leave empty to show the id. Saved on input confirmation.
|
|
58
|
+
- **Thinking levels** — router models expose only `low`, `medium`, `high`, `xhigh`, and `max`. All five start enabled; toggle any one to hide or re-enable it. `off` and `minimal` are never shown.
|
|
59
|
+
- **Remove model** — confirms and immediately removes the model from the relay. The model currently used by the session must be changed with `/model` first.
|
|
58
60
|
|
|
59
61
|
---
|
|
60
62
|
|
|
@@ -78,8 +80,8 @@ Relay → **Models** → pick a model:
|
|
|
78
80
|
"thinkingLevelMap": {
|
|
79
81
|
"off": null,
|
|
80
82
|
"minimal": null,
|
|
81
|
-
"low":
|
|
82
|
-
"medium":
|
|
83
|
+
"low": "low",
|
|
84
|
+
"medium": "medium",
|
|
83
85
|
"high": "high",
|
|
84
86
|
"xhigh": "xhigh",
|
|
85
87
|
"max": "max"
|
|
@@ -99,7 +101,7 @@ Relay → **Models** → pick a model:
|
|
|
99
101
|
}
|
|
100
102
|
```
|
|
101
103
|
|
|
102
|
-
There is **no migration** from any older models-manager config
|
|
104
|
+
There is **no migration** from any older models-manager config, and Pi updates do not overwrite `~/.pi/agent/router.json`. Existing router thinking maps are not automatically rewritten. At runtime, omitted thinking levels are filled from the five-level GPT Gateway defaults while explicit `null` values remain hidden. Legacy `off` / `minimal` entries are ignored at runtime and remain hidden; newly added models use the same five-level defaults.
|
|
103
105
|
|
|
104
106
|
---
|
|
105
107
|
|
|
@@ -112,7 +114,11 @@ There is **no migration** from any older models-manager config. Add relays with
|
|
|
112
114
|
- Replayed optional top-level `ResponseItem.id` identity fields are omitted from stateless requests, matching Codex CLI 0.145's default `store: false` wire behavior. Required semantic references such as `item_reference.id`, plus `call_id` and encrypted reasoning content, remain intact.
|
|
113
115
|
- Same relay + same model: tool/reasoning multi-turn matches Codex-style Responses. Switching model or provider mid-session may normalize tool-call ids more strictly (upstream allow-list); this is not worked around here.
|
|
114
116
|
- Interactive `/router` requires a TUI (`ctx.hasUI`); otherwise a warning is shown and no dialog opens.
|
|
115
|
-
-
|
|
117
|
+
- Router models are GPT Gateway models: only `low`, `medium`, `high`, `xhigh`, and `max` are exposed. `off` and `minimal` are disabled.
|
|
118
|
+
- Catalog selection and thinking changes are live and auto-saved; Esc only returns to the previous screen.
|
|
119
|
+
- The active model and its provider cannot be disabled or removed; switch with `/model` first.
|
|
120
|
+
- If a catalog does not return an already configured model, the model remains listed as unavailable instead of being silently removed.
|
|
121
|
+
- A catalog probe does not send an unresolved environment or command-based key anonymously; it explains the local key problem and offers manual model entry.
|
|
116
122
|
|
|
117
123
|
## Implementation notes
|
|
118
124
|
|
|
@@ -48,13 +48,15 @@ CTX 2.1%/1.0M ↑13k ↓13k R440k CH99.4% $0.074
|
|
|
48
48
|
|
|
49
49
|
**Middle (optional)**
|
|
50
50
|
|
|
51
|
-
- Extension status text from `ctx.ui.setStatus()` is sorted by key and
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
- Extension status text from `ctx.ui.setStatus()` is sorted by key and pinned
|
|
52
|
+
to the center of the line — anchored to the absolute line center so it does
|
|
53
|
+
not drift as the usage cluster grows, falling back to balancing the free
|
|
54
|
+
space when the side zones collide with the center anchor. When space runs
|
|
55
|
+
out it is dropped so CTX and usage stay readable. Plain text is muted;
|
|
56
|
+
strings that already carry ANSI color are left unchanged.
|
|
55
57
|
|
|
56
58
|
Zero-value usage fields are omitted. Before the first assistant response, the
|
|
57
|
-
right side of line 2 is empty
|
|
59
|
+
right side of line 2 is empty; extension status stays centered either way.
|
|
58
60
|
|
|
59
61
|
## Narrow-width drop order
|
|
60
62
|
|
package/docs/custom-provider.md
CHANGED
|
@@ -228,8 +228,8 @@ async function login(callbacks: OAuthLoginCallbacks): Promise<OAuthCredentials>
|
|
|
228
228
|
return exchangeAuthorizationCode(code, callbacks.signal);
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
async function refreshToken(credentials: OAuthCredentials): Promise<OAuthCredentials> {
|
|
232
|
-
return refreshAuthorization(credentials.refresh);
|
|
231
|
+
async function refreshToken(credentials: OAuthCredentials, signal: AbortSignal): Promise<OAuthCredentials> {
|
|
232
|
+
return refreshAuthorization(credentials.refresh, signal);
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
export default function (pi: ExtensionAPI) {
|
|
@@ -479,3 +479,124 @@ At minimum, cover:
|
|
|
479
479
|
- one interactive request with the selected provider, including a tool call if the provider claims tool support.
|
|
480
480
|
|
|
481
481
|
The two example extensions above cover the two main test seams: direct custom event production and delegation to Pi AI's public streaming APIs.
|
|
482
|
+
|
|
483
|
+
## Config Reference
|
|
484
|
+
|
|
485
|
+
```typescript
|
|
486
|
+
interface ProviderConfig {
|
|
487
|
+
/** Display name for the provider in UI such as /login. */
|
|
488
|
+
name?: string;
|
|
489
|
+
|
|
490
|
+
/** API endpoint URL. Required when defining models. */
|
|
491
|
+
baseUrl?: string;
|
|
492
|
+
|
|
493
|
+
/** API key literal, env interpolation ($ENV_VAR or ${ENV_VAR}), or !command. Required when defining models (unless oauth). */
|
|
494
|
+
apiKey?: string;
|
|
495
|
+
|
|
496
|
+
/** API type for streaming. Required at provider or model level when defining models. */
|
|
497
|
+
api?: Api;
|
|
498
|
+
|
|
499
|
+
/** Custom streaming implementation for non-standard APIs. */
|
|
500
|
+
streamSimple?: (
|
|
501
|
+
model: Model<Api>,
|
|
502
|
+
context: Context,
|
|
503
|
+
options?: SimpleStreamOptions
|
|
504
|
+
) => AssistantMessageEventStream;
|
|
505
|
+
|
|
506
|
+
/** Custom headers to include in requests. Values use the same resolution syntax as apiKey. */
|
|
507
|
+
headers?: Record<string, string>;
|
|
508
|
+
|
|
509
|
+
/** If true, adds Authorization: Bearer header with the resolved API key. */
|
|
510
|
+
authHeader?: boolean;
|
|
511
|
+
|
|
512
|
+
/** Models to register. If provided, replaces all existing models for this provider. */
|
|
513
|
+
models?: ProviderModelConfig[];
|
|
514
|
+
|
|
515
|
+
/** OAuth provider for /login support. */
|
|
516
|
+
oauth?: {
|
|
517
|
+
name: string;
|
|
518
|
+
login(callbacks: OAuthLoginCallbacks): Promise<OAuthCredentials>;
|
|
519
|
+
refreshToken(credentials: OAuthCredentials, signal: AbortSignal): Promise<OAuthCredentials>;
|
|
520
|
+
getApiKey(credentials: OAuthCredentials): string;
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
## Model Definition Reference
|
|
526
|
+
|
|
527
|
+
```typescript
|
|
528
|
+
interface ProviderModelConfig {
|
|
529
|
+
/** Model ID (e.g., "claude-sonnet-4-20250514"). */
|
|
530
|
+
id: string;
|
|
531
|
+
|
|
532
|
+
/** Display name (e.g., "Claude 4 Sonnet"). */
|
|
533
|
+
name: string;
|
|
534
|
+
|
|
535
|
+
/** API type override for this specific model. */
|
|
536
|
+
api?: Api;
|
|
537
|
+
|
|
538
|
+
/** API endpoint URL override for this specific model. */
|
|
539
|
+
baseUrl?: string;
|
|
540
|
+
|
|
541
|
+
/** Whether the model supports extended thinking. */
|
|
542
|
+
reasoning: boolean;
|
|
543
|
+
|
|
544
|
+
/** Maps pi thinking levels to provider/model-specific values; null marks a level unsupported. */
|
|
545
|
+
thinkingLevelMap?: Partial<Record<"off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", string | null>>;
|
|
546
|
+
|
|
547
|
+
/** Supported input types. */
|
|
548
|
+
input: ("text" | "image")[];
|
|
549
|
+
|
|
550
|
+
/** Cost per million tokens (for usage tracking). */
|
|
551
|
+
cost: {
|
|
552
|
+
input: number;
|
|
553
|
+
output: number;
|
|
554
|
+
cacheRead: number;
|
|
555
|
+
cacheWrite: number;
|
|
556
|
+
};
|
|
557
|
+
|
|
558
|
+
/** Maximum context window size in tokens. */
|
|
559
|
+
contextWindow: number;
|
|
560
|
+
|
|
561
|
+
/** Maximum output tokens. */
|
|
562
|
+
maxTokens: number;
|
|
563
|
+
|
|
564
|
+
/** Custom headers for this specific model. */
|
|
565
|
+
headers?: Record<string, string>;
|
|
566
|
+
|
|
567
|
+
/** Compatibility settings for the selected API. */
|
|
568
|
+
compat?: {
|
|
569
|
+
// openai-completions
|
|
570
|
+
supportsStore?: boolean;
|
|
571
|
+
supportsDeveloperRole?: boolean;
|
|
572
|
+
supportsReasoningEffort?: boolean;
|
|
573
|
+
supportsUsageInStreaming?: boolean;
|
|
574
|
+
supportsFinishReason?: boolean;
|
|
575
|
+
supportsStrictMode?: boolean;
|
|
576
|
+
supportsOpenAIGrammarTools?: boolean; // openai-completions/openai-responses; false falls back to normal function tools
|
|
577
|
+
maxTokensField?: "max_completion_tokens" | "max_tokens";
|
|
578
|
+
requiresToolResultName?: boolean;
|
|
579
|
+
requiresAssistantAfterToolResult?: boolean;
|
|
580
|
+
requiresThinkingAsText?: boolean;
|
|
581
|
+
requiresReasoningContentOnAssistantMessages?: boolean;
|
|
582
|
+
thinkingFormat?: "openai" | "openrouter" | "deepseek" | "together" | "baseten" | "zai" | "qwen" | "chat-template" | "qwen-chat-template" | "string-thinking" | "ant-ling";
|
|
583
|
+
chatTemplateKwargs?: Record<string, string | number | boolean | null | { "$var": "thinking.enabled" | "thinking.effort"; omitWhenOff?: boolean }>;
|
|
584
|
+
chatTemplateArgs?: Record<string, string | number | boolean | null | { "$var": "thinking.enabled" | "thinking.effort"; omitWhenOff?: boolean }>;
|
|
585
|
+
cacheControlFormat?: "anthropic";
|
|
586
|
+
sessionAffinityFormat?: "openai" | "openai-nosession" | "openrouter";
|
|
587
|
+
sendSessionAffinityHeaders?: boolean;
|
|
588
|
+
|
|
589
|
+
// anthropic-messages
|
|
590
|
+
supportsEagerToolInputStreaming?: boolean;
|
|
591
|
+
supportsLongCacheRetention?: boolean;
|
|
592
|
+
sendSessionAffinityHeaders?: boolean;
|
|
593
|
+
supportsCacheControlOnTools?: boolean;
|
|
594
|
+
forceAdaptiveThinking?: boolean;
|
|
595
|
+
allowEmptySignature?: boolean;
|
|
596
|
+
supportsStrictTools?: boolean;
|
|
597
|
+
};
|
|
598
|
+
}
|
|
599
|
+
```
|
|
600
|
+
|
|
601
|
+
`openrouter` sends `reasoning: { effort }`. `deepseek` sends `thinking: { type: "enabled" | "disabled" }` and `reasoning_effort` when enabled. `together` sends `reasoning: { enabled }` and also `reasoning_effort` when `supportsReasoningEffort` is enabled. `qwen` is for DashScope-style top-level `enable_thinking`. Use `qwen-chat-template` for local Qwen-compatible servers that read `chat_template_kwargs.enable_thinking` and need `preserve_thinking`. Use `chat-template` for configurable `chat_template_kwargs`, for example DeepSeek V3.x behind vLLM with `chatTemplateKwargs: { "thinking": { "$var": "thinking.enabled" } }`. Use `thinkingFormat: "baseten"` with `chatTemplateArgs` when the provider expects toggle values under `chat_template_args` and optionally supports top-level `reasoning_effort`.
|
|
602
|
+
`cacheControlFormat: "anthropic"` applies Anthropic-style `cache_control` markers to the system prompt, last tool definition, and last user, assistant, or tool-result text content.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Development
|
|
2
|
+
|
|
3
|
+
This repository is the standalone distribution of `@astralyn/pi`. It publishes one package and the `pi` executable; runtime source lives under `src/**`.
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
- Node.js `>=22.19`
|
|
8
|
+
- npm
|
|
9
|
+
|
|
10
|
+
The package consumes the published `@earendil-works/pi-ai`, `@earendil-works/pi-agent-core`, and `@earendil-works/pi-tui` dependencies. It does not recreate the upstream monorepo or vendor those packages.
|
|
11
|
+
|
|
12
|
+
## Install and run
|
|
13
|
+
|
|
14
|
+
Install dependencies without running lifecycle scripts:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install --ignore-scripts
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Run the CLI directly from TypeScript source:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm run dev
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
To run without provider credentials from the current environment:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm run dev -- --no-env
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Build the distributable package and assets:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm run build
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The compiled CLI is `dist/cli.js`. The package's executable is `pi`.
|
|
39
|
+
|
|
40
|
+
## Verification
|
|
41
|
+
|
|
42
|
+
Run the repository checks after code changes:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npm run check
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
This runs Biome, dependency and import checks, documentation-link validation, and TypeScript checks for source and examples.
|
|
49
|
+
|
|
50
|
+
Run focused tests for changed behavior:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npx vitest run test/<changed-file>.test.ts
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Run all tests in an isolated home and configuration directory:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
npm run test:isolated
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Validate the exact upstream release baseline and local deviations:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npm run diff:upstream -- --check
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
For interactive changes, also test in a real TTY, including pending and settled tool output, collapsed and expanded states, and relevant `/reload` or `/tree` flows.
|
|
69
|
+
|
|
70
|
+
## Repository layout
|
|
71
|
+
|
|
72
|
+
- `src/**` - runtime source
|
|
73
|
+
- `src/extensions/**` - bundled extensions using the public Extension API
|
|
74
|
+
- `test/**` - focused Vitest tests and fixtures
|
|
75
|
+
- `docs/**` - published user and API documentation
|
|
76
|
+
- `maintainers/**` - repository-only maintainer runbooks
|
|
77
|
+
- `scripts/**` - development, verification, and release helpers
|
|
78
|
+
|
|
79
|
+
## Boundaries
|
|
80
|
+
|
|
81
|
+
Keep the upstream runtime contracts intact. Do not vendor or patch the AI, Agent core, or TUI dependencies. Preserve tool schemas, execution protocols, and result structures when changing display-only behavior. Keep direct dependencies pinned and regenerate `npm-shrinkwrap.json` intentionally when dependency metadata changes.
|
|
82
|
+
|
|
83
|
+
Read the repository contract in `AGENTS.md` and the maintainer architecture and release guidance in `maintainers/README.md` before making changes.
|
package/docs/docs.json
CHANGED
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
"title": "Keybindings",
|
|
40
40
|
"path": "keybindings.md"
|
|
41
41
|
},
|
|
42
|
-
{
|
|
43
|
-
"title": "Sessions",
|
|
44
|
-
"path": "sessions.md"
|
|
45
|
-
},
|
|
46
42
|
{
|
|
47
43
|
"title": "Compaction",
|
|
48
44
|
"path": "compaction.md"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"title": "Development",
|
|
48
|
+
"path": "development.md"
|
|
49
49
|
}
|
|
50
50
|
]
|
|
51
51
|
},
|
|
@@ -56,6 +56,10 @@
|
|
|
56
56
|
"title": "Overview",
|
|
57
57
|
"path": "bundled/README.md"
|
|
58
58
|
},
|
|
59
|
+
{
|
|
60
|
+
"title": "Biu",
|
|
61
|
+
"path": "bundled/extensions/biu.md"
|
|
62
|
+
},
|
|
59
63
|
{
|
|
60
64
|
"title": "DeepWiki",
|
|
61
65
|
"path": "bundled/extensions/deepwiki.md"
|
package/docs/extensions.md
CHANGED
|
@@ -778,7 +778,8 @@ Behavior guarantees:
|
|
|
778
778
|
- Mutations to `event.input` affect the actual tool execution
|
|
779
779
|
- Later `tool_call` handlers see mutations made by earlier handlers
|
|
780
780
|
- No re-validation is performed after your mutation
|
|
781
|
-
- Return values from `tool_call`
|
|
781
|
+
- Return values from `tool_call` control blocking via `{ block: true, reason?: string, terminate?: boolean }`
|
|
782
|
+
- `terminate` only applies to a blocked call; the agent stops early only when every finalized result in the batch is terminating
|
|
782
783
|
|
|
783
784
|
```typescript
|
|
784
785
|
import { isToolCallEventType } from "@astralyn/pi";
|
|
@@ -794,7 +795,7 @@ pi.on("tool_call", async (event, ctx) => {
|
|
|
794
795
|
event.input.command = `source ~/.profile\n${event.input.command}`;
|
|
795
796
|
|
|
796
797
|
if (event.input.command.includes("rm -rf")) {
|
|
797
|
-
return { block: true, reason: "Dangerous command" };
|
|
798
|
+
return { block: true, reason: "Dangerous command", terminate: true };
|
|
798
799
|
}
|
|
799
800
|
}
|
|
800
801
|
|
|
@@ -1584,6 +1585,27 @@ mode and would not execute if sent via `prompt`.
|
|
|
1584
1585
|
|
|
1585
1586
|
Register a custom TUI renderer for custom messages with your `customType`. Custom messages are created with `pi.sendMessage()` and participate in LLM context. See [Custom UI](#custom-ui).
|
|
1586
1587
|
|
|
1588
|
+
### pi.registerMarkdownTransformer(transformer)
|
|
1589
|
+
|
|
1590
|
+
Register a transformer for the Markdown in normal user text, assistant text, and thinking blocks. Transformers run in extension load order, and each transformer receives the Markdown returned by the previous transformer. After the chain finishes, Pi renders the transformed content with its built-in renderer.
|
|
1591
|
+
|
|
1592
|
+
The transformer receives the Markdown string and a context with:
|
|
1593
|
+
|
|
1594
|
+
- `messageType` — `"user"`, `"assistant"`, or `"assistant-thinking"`
|
|
1595
|
+
- `isStreaming` — `true` for partial assistant updates; `false` for user, finalized assistant, and restored messages
|
|
1596
|
+
- `availableWidth` — exact terminal columns available for the transformed Markdown content
|
|
1597
|
+
|
|
1598
|
+
Return the transformed Markdown:
|
|
1599
|
+
|
|
1600
|
+
```typescript
|
|
1601
|
+
pi.registerMarkdownTransformer((markdown, { messageType, isStreaming }) => {
|
|
1602
|
+
if (isStreaming || messageType === "assistant-thinking") return markdown;
|
|
1603
|
+
return markdown.replaceAll("-->", "→");
|
|
1604
|
+
});
|
|
1605
|
+
```
|
|
1606
|
+
|
|
1607
|
+
If a transformer throws, Pi keeps the Markdown produced so far and continues with the next transformer. The hook is display-only: the original message remains unchanged in the session and model context. It runs for new user messages, assistant streaming updates, restored session messages, and terminal width changes, so transformers should remain synchronous and inexpensive.
|
|
1608
|
+
|
|
1587
1609
|
### pi.registerEntryRenderer(customType, renderer)
|
|
1588
1610
|
|
|
1589
1611
|
Register a custom TUI renderer for custom entries with your `customType`. Custom entries are created with `pi.appendEntry()` and do not participate in LLM context.
|
|
@@ -1708,7 +1730,9 @@ Register or override a model provider dynamically. Useful for proxies, custom en
|
|
|
1708
1730
|
|
|
1709
1731
|
Calls made during the extension factory function are queued and applied once the runner initialises. Calls made after that — for example from a command handler following a user setup flow — take effect immediately without requiring a `/reload`.
|
|
1710
1732
|
|
|
1711
|
-
Dynamic providers can implement `refreshModels`. Pi calls it during model refresh, publishes the returned list synchronously through the provider, and passes the canonical credential/
|
|
1733
|
+
Dynamic providers can implement `refreshModels`. Pi calls it during model refresh, publishes the returned list synchronously through the provider, and passes the canonical credential/stored-catalog/network/signal context. The extension decides whether to persist catalog metadata through generation-checked `context.publish({ persist: entry })`; live servers such as llama.cpp can return models without persisting them.
|
|
1734
|
+
|
|
1735
|
+
`context.signal` is always a concrete signal and provider callbacks must pass it to blocking I/O. Public `ModelRuntime.refresh()` and `ModelRegistry.refresh()` calls accept an optional signal and are unbounded when it is omitted; extensions and applications choose their own deadlines. Cancellation stops the caller waiting even if a provider ignores the signal, but cooperation is still required to stop the underlying work.
|
|
1712
1736
|
|
|
1713
1737
|
Extensions that need native provider auth, filtering, refresh, or stream behavior can register a complete `Provider` from `@earendil-works/pi-ai`. The provider becomes the composition base and `models.json` overrides still apply above it.
|
|
1714
1738
|
|
|
@@ -1798,7 +1822,8 @@ pi.registerProvider("corporate-ai", {
|
|
|
1798
1822
|
const code = await callbacks.onPrompt({ message: "Enter code:" });
|
|
1799
1823
|
return { refresh: code, access: code, expires: Date.now() + 3600000 };
|
|
1800
1824
|
},
|
|
1801
|
-
async refreshToken(credentials) {
|
|
1825
|
+
async refreshToken(credentials, signal) {
|
|
1826
|
+
signal.throwIfAborted();
|
|
1802
1827
|
// Refresh logic
|
|
1803
1828
|
return credentials;
|
|
1804
1829
|
},
|
|
@@ -1819,7 +1844,7 @@ The object form accepts a complete pi-ai `Provider`, including native `auth`, `g
|
|
|
1819
1844
|
- `headers` - Custom headers to include in requests.
|
|
1820
1845
|
- `authHeader` - If true, adds `Authorization: Bearer` header automatically.
|
|
1821
1846
|
- `models` - Array of model definitions. If provided, replaces all existing models for this provider. Model definitions can set `baseUrl` to override the provider endpoint for that model.
|
|
1822
|
-
- `refreshModels` - Async dynamic discovery callback. Its returned models replace extension-provided models.
|
|
1847
|
+
- `refreshModels` - Async dynamic discovery callback. Its returned models replace extension-provided models. `context.stored` contains the persisted provider snapshot; use generation-checked `context.publish({ persist: entry })` only when updated catalog data should persist. Use `persist: null` to delete that snapshot.
|
|
1823
1848
|
- `oauth` - OAuth provider config for `/login` support. When provided, the provider appears in the login menu.
|
|
1824
1849
|
- `streamSimple` - Custom streaming implementation for non-standard APIs.
|
|
1825
1850
|
|
package/docs/json.md
CHANGED
|
@@ -8,7 +8,20 @@ Outputs all session events as JSON lines to stdout. Useful for integrating pi in
|
|
|
8
8
|
|
|
9
9
|
## Event Types
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Wire events use `JsonAgentSessionEvent`, exported from [`@astralyn/pi`](https://www.npmjs.com/package/@astralyn/pi). It matches `AgentSessionEvent` except that streaming message updates omit cumulative snapshots:
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
type WithoutPartial<T> = T extends { partial: unknown } ? Omit<T, "partial"> : T;
|
|
15
|
+
|
|
16
|
+
type JsonAgentSessionEvent =
|
|
17
|
+
| Exclude<AgentSessionEvent, { type: "message_update" }>
|
|
18
|
+
| {
|
|
19
|
+
type: "message_update";
|
|
20
|
+
assistantMessageEvent: WithoutPartial<AssistantMessageEvent>;
|
|
21
|
+
};
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Session events are defined by `AgentSessionEvent`:
|
|
12
25
|
|
|
13
26
|
```typescript
|
|
14
27
|
type AgentSessionEvent =
|
|
@@ -29,6 +42,7 @@ type AgentSessionEvent =
|
|
|
29
42
|
| { type: "summarization_retry_finished" }
|
|
30
43
|
| { type: "bash_execution_update"; id?: string; delta: string };
|
|
31
44
|
```
|
|
45
|
+
```
|
|
32
46
|
|
|
33
47
|
`queue_update` emits the full pending steering and follow-up queues whenever they change. `compaction_start` and `compaction_end` cover both manual and automatic compaction.
|
|
34
48
|
|
|
@@ -79,12 +93,17 @@ Followed by events as they occur:
|
|
|
79
93
|
{"type":"agent_start"}
|
|
80
94
|
{"type":"turn_start"}
|
|
81
95
|
{"type":"message_start","message":{"role":"assistant","content":[],...}}
|
|
82
|
-
{"type":"message_update","
|
|
96
|
+
{"type":"message_update","assistantMessageEvent":{"type":"text_delta","contentIndex":0,"delta":"Hello"}}
|
|
83
97
|
{"type":"message_end","message":{...}}
|
|
84
98
|
{"type":"turn_end","message":{...},"toolResults":[]}
|
|
85
99
|
{"type":"agent_end","messages":[...],"willRetry":false}
|
|
86
100
|
```
|
|
87
101
|
|
|
102
|
+
`message_update` records are delta-only. They omit both the cumulative `message` field and
|
|
103
|
+
`assistantMessageEvent.partial` to keep stream size linear. Use `contentIndex` and `delta`
|
|
104
|
+
to assemble live text, thinking, or tool-call arguments if needed. `message_end` contains
|
|
105
|
+
the final authoritative message.
|
|
106
|
+
|
|
88
107
|
## Example
|
|
89
108
|
|
|
90
109
|
```bash
|
package/docs/keybindings.md
CHANGED
|
@@ -10,7 +10,7 @@ After editing `keybindings.json`, run `/reload` in pi to apply the changes witho
|
|
|
10
10
|
|
|
11
11
|
## Key Format
|
|
12
12
|
|
|
13
|
-
`modifier+key` where modifiers are `ctrl`, `shift`, `alt` (combinable) and keys are:
|
|
13
|
+
`modifier+key` where modifiers are `ctrl`, `shift`, `alt`, `super` (combinable) and keys are:
|
|
14
14
|
|
|
15
15
|
- **Letters:** `a-z`
|
|
16
16
|
- **Digits:** `0-9`
|
|
@@ -18,7 +18,9 @@ After editing `keybindings.json`, run `/reload` in pi to apply the changes witho
|
|
|
18
18
|
- **Function:** `f1`-`f12`
|
|
19
19
|
- **Symbols:** `` ` ``, `-`, `=`, `[`, `]`, `\`, `;`, `'`, `,`, `.`, `/`, `!`, `@`, `#`, `$`, `%`, `^`, `&`, `*`, `(`, `)`, `_`, `+`, `|`, `~`, `{`, `}`, `:`, `<`, `>`, `?`
|
|
20
20
|
|
|
21
|
-
Modifier combinations: `ctrl+shift+x`, `alt+ctrl+x`, `ctrl+shift+alt+x`, `ctrl+1`, etc.
|
|
21
|
+
Modifier combinations: `ctrl+shift+x`, `alt+ctrl+x`, `ctrl+shift+alt+x`, `super+k`, `ctrl+super+k`, `ctrl+1`, etc.
|
|
22
|
+
|
|
23
|
+
`super` bindings require a terminal that reports the modifier separately, typically through the Kitty keyboard protocol. They may not work in terminals without that support.
|
|
22
24
|
|
|
23
25
|
## All Actions
|
|
24
26
|
|
|
@@ -26,18 +28,22 @@ Modifier combinations: `ctrl+shift+x`, `alt+ctrl+x`, `ctrl+shift+alt+x`, `ctrl+1
|
|
|
26
28
|
|
|
27
29
|
| Keybinding id | Default | Description |
|
|
28
30
|
|--------|---------|-------------|
|
|
29
|
-
| `tui.editor.cursorUp` | `up` | Move cursor up |
|
|
30
|
-
| `tui.editor.cursorDown` | `down` | Move cursor down |
|
|
31
|
+
| `tui.editor.cursorUp` | `up` | Move cursor up, browsing older history at the top |
|
|
32
|
+
| `tui.editor.cursorDown` | `down` | Move cursor down, browsing newer history at the bottom |
|
|
33
|
+
| `tui.editor.historyPrevious` | *(none)* | Select the previous prompt history entry |
|
|
34
|
+
| `tui.editor.historyNext` | *(none)* | Select the next prompt history entry |
|
|
31
35
|
| `tui.editor.cursorLeft` | `left`, `ctrl+b` | Move cursor left |
|
|
32
36
|
| `tui.editor.cursorRight` | `right`, `ctrl+f` | Move cursor right |
|
|
33
37
|
| `tui.editor.cursorWordLeft` | `alt+left`, `ctrl+left`, `alt+b` | Move cursor word left |
|
|
34
38
|
| `tui.editor.cursorWordRight` | `alt+right`, `ctrl+right`, `alt+f` | Move cursor word right |
|
|
35
|
-
| `tui.editor.cursorLineStart` | `home`, `ctrl+a` | Move to line start |
|
|
36
|
-
| `tui.editor.cursorLineEnd` | `end`, `ctrl+e` | Move to line end |
|
|
39
|
+
| `tui.editor.cursorLineStart` | `home`, `ctrl+home`, `ctrl+a` | Move to line start |
|
|
40
|
+
| `tui.editor.cursorLineEnd` | `end`, `ctrl+end`, `ctrl+e` | Move to line end |
|
|
37
41
|
| `tui.editor.jumpForward` | `ctrl+]` | Jump forward to character |
|
|
38
42
|
| `tui.editor.jumpBackward` | `ctrl+alt+]` | Jump backward to character |
|
|
39
|
-
| `tui.editor.pageUp` | `pageUp` | Scroll up by page |
|
|
40
|
-
| `tui.editor.pageDown` | `pageDown` | Scroll down by page |
|
|
43
|
+
| `tui.editor.pageUp` | `pageUp`, `ctrl+pageUp` | Scroll up by page |
|
|
44
|
+
| `tui.editor.pageDown` | `pageDown`, `ctrl+pageDown` | Scroll down by page |
|
|
45
|
+
|
|
46
|
+
The dedicated history actions always change history entries, regardless of the cursor position in a multiline prompt. Explicit history bindings take precedence over application actions while the main editor is focused, so binding `tui.editor.historyPrevious` to `ctrl+p` overrides model cycling in that context without changing `Ctrl+P` in selectors.
|
|
41
47
|
|
|
42
48
|
### TUI Editor Deletion
|
|
43
49
|
|
|
@@ -78,16 +84,42 @@ Modifier combinations: `ctrl+shift+x`, `alt+ctrl+x`, `ctrl+shift+alt+x`, `ctrl+1
|
|
|
78
84
|
| `tui.select.confirm` | `enter` | Confirm selection |
|
|
79
85
|
| `tui.select.cancel` | `escape`, `ctrl+c` | Cancel selection |
|
|
80
86
|
|
|
87
|
+
### TUI Fullscreen Viewport
|
|
88
|
+
|
|
89
|
+
These actions apply when interactive mode uses `--tui-mode fullscreen` and target the primary transcript scroll region. Two-finger trackpad and mouse-wheel input scroll the region under the pointer, falling back to the transcript over the fixed editor/status/footer dock. Clicking an OSC 8 hyperlink opens it in the default handler. Dragging with the primary mouse button selects text and copies it to the clipboard; holding at the transcript's top or bottom edge auto-scrolls into off-screen content.
|
|
90
|
+
|
|
91
|
+
Fullscreen transcript bindings take precedence over editor bindings. The default unmodified navigation keys therefore control the transcript in fullscreen mode, while their `ctrl` variants continue to control the editor. Outside fullscreen mode, both variants control the editor.
|
|
92
|
+
|
|
93
|
+
| Key | Default mode | Fullscreen mode |
|
|
94
|
+
|-----|--------------|-----------------|
|
|
95
|
+
| `home`, `end` | Editor | Transcript |
|
|
96
|
+
| `ctrl+home`, `ctrl+end` | Editor | Editor |
|
|
97
|
+
| `pageUp`, `pageDown` | Editor | Transcript |
|
|
98
|
+
| `ctrl+pageUp`, `ctrl+pageDown` | Editor | Editor |
|
|
99
|
+
|
|
100
|
+
This routing remains configurable through the ordinary action bindings. For example, `"tui.altScreen.pageUp": "ctrl+pageUp"` makes `pageUp` control the editor and `ctrl+pageUp` control the transcript in fullscreen mode. Bind `tui.altScreen.halfPageUp` and `tui.altScreen.halfPageDown` for smaller transcript steps while keeping the full-page bindings. Setting `"tui.altScreen.pageUp": []` disables that transcript shortcut entirely. User bindings replace the defaults for that action.
|
|
101
|
+
|
|
102
|
+
| Keybinding id | Default | Description |
|
|
103
|
+
|--------|---------|-------------|
|
|
104
|
+
| `tui.altScreen.pageUp` | `pageUp` | Scroll the transcript up by one page |
|
|
105
|
+
| `tui.altScreen.pageDown` | `pageDown` | Scroll the transcript down by one page |
|
|
106
|
+
| `tui.altScreen.halfPageUp` | *(none)* | Scroll the transcript up by half a page |
|
|
107
|
+
| `tui.altScreen.halfPageDown` | *(none)* | Scroll the transcript down by half a page |
|
|
108
|
+
| `tui.altScreen.previousPrompt` | `ctrl+shift+up` | Jump to the previous marked message |
|
|
109
|
+
| `tui.altScreen.nextPrompt` | `ctrl+shift+down` | Jump to the next marked message |
|
|
110
|
+
| `tui.altScreen.top` | `home` | Scroll to the beginning of the transcript |
|
|
111
|
+
| `tui.altScreen.bottom` | `end` | Scroll to the transcript end and follow new output |
|
|
112
|
+
|
|
81
113
|
### Application
|
|
82
114
|
|
|
83
115
|
| Keybinding id | Default | Description |
|
|
84
116
|
|--------|---------|-------------|
|
|
85
117
|
| `app.interrupt` | `escape` | Cancel / abort |
|
|
86
|
-
| `app.clear` | `ctrl+c` | Clear editor |
|
|
118
|
+
| `app.clear` | `ctrl+c` | Clear editor (first) / exit (second) |
|
|
87
119
|
| `app.exit` | `ctrl+d` | Exit (when editor empty) |
|
|
88
120
|
| `app.suspend` | `ctrl+z` (none on Windows) | Suspend to background |
|
|
89
121
|
| `app.editor.external` | `ctrl+g` | Open in external editor (`externalEditor`, `$VISUAL`, `$EDITOR`, Notepad on Windows, or `nano` elsewhere) |
|
|
90
|
-
| `app.clipboard.pasteImage` | `ctrl+v` (`alt+v` on Windows) | Paste image from clipboard |
|
|
122
|
+
| `app.clipboard.pasteImage` | `ctrl+v` (`alt+v` on Windows) | Paste image or text from clipboard |
|
|
91
123
|
|
|
92
124
|
### Sessions
|
|
93
125
|
|
|
@@ -158,8 +190,8 @@ Create `~/.pi/agent/keybindings.json`:
|
|
|
158
190
|
|
|
159
191
|
```json
|
|
160
192
|
{
|
|
161
|
-
"tui.editor.
|
|
162
|
-
"tui.editor.
|
|
193
|
+
"tui.editor.historyPrevious": "ctrl+p",
|
|
194
|
+
"tui.editor.historyNext": "ctrl+n",
|
|
163
195
|
"tui.editor.deleteWordBackward": ["ctrl+w", "alt+backspace"]
|
|
164
196
|
}
|
|
165
197
|
```
|
|
@@ -172,8 +204,8 @@ On native Windows, `app.suspend` has no default binding because Windows terminal
|
|
|
172
204
|
|
|
173
205
|
```json
|
|
174
206
|
{
|
|
175
|
-
"tui.editor.
|
|
176
|
-
"tui.editor.
|
|
207
|
+
"tui.editor.historyPrevious": "ctrl+p",
|
|
208
|
+
"tui.editor.historyNext": "ctrl+n",
|
|
177
209
|
"tui.editor.cursorLeft": ["left", "ctrl+b"],
|
|
178
210
|
"tui.editor.cursorRight": ["right", "ctrl+f"],
|
|
179
211
|
"tui.editor.cursorWordLeft": ["alt+left", "alt+b"],
|