@selesai/code 0.10.2 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/dist/cli/credential-print.js +4 -4
- package/dist/cli/startup-ui.js +2 -1
- package/dist/cli.js +0 -0
- package/dist/core/agent-session.d.ts +12 -1
- package/dist/core/agent-session.js +77 -9
- package/dist/core/compaction/branch-summarization.js +34 -33
- package/dist/core/compaction/compaction.d.ts +5 -0
- package/dist/core/compaction/compaction.js +100 -85
- package/dist/core/compaction/utils.js +2 -2
- package/dist/core/export-html/template.css +1066 -1066
- package/dist/core/export-html/template.html +55 -55
- package/dist/core/export-html/template.js +1864 -1864
- package/dist/core/export-html/vendor/highlight.min.js +1212 -1212
- package/dist/core/export-html/vendor/marked.min.js +78 -78
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/runner.d.ts +5 -0
- package/dist/core/extensions/runner.js +48 -1
- package/dist/core/extensions/types.d.ts +18 -1
- package/dist/core/llama/client.d.ts +6 -0
- package/dist/core/llama/client.js +7 -0
- package/dist/core/llama/provider.d.ts +3 -1
- package/dist/core/llama/provider.js +28 -6
- package/dist/core/messages.js +7 -7
- package/dist/core/session-manager.js +4 -2
- package/dist/core/settings-manager.d.ts +8 -1
- package/dist/core/settings-manager.js +17 -0
- package/dist/defaults/models.json +32 -9
- package/dist/defaults/settings.json +0 -3
- package/dist/extensions/auto-session-name.test.ts +157 -0
- package/dist/extensions/auto-session-name.ts +96 -0
- package/dist/extensions/context-compaction-reminder.test.ts +82 -82
- package/dist/extensions/context-compaction-reminder.ts +28 -28
- package/dist/extensions/cost-reconcile.test.ts +76 -0
- package/dist/extensions/cost-reconcile.ts +278 -0
- package/dist/extensions/enable-readonly-tools.test.ts +11 -0
- package/dist/extensions/enable-readonly-tools.ts +7 -3
- package/dist/extensions/package.json +3 -0
- package/dist/extensions/pi-intercom/LICENSE +21 -21
- package/dist/extensions/pi-intercom/broker/client.test.ts +83 -83
- package/dist/extensions/pi-intercom/broker/framing.test.ts +114 -114
- package/dist/extensions/pi-intercom/broker/paths.ts +134 -134
- package/dist/extensions/pi-intercom/broker/runtime-claim.test.ts +34 -34
- package/dist/extensions/pi-intercom/broker/runtime-claim.ts +21 -21
- package/dist/extensions/pi-intercom/cwd.test.ts +40 -40
- package/dist/extensions/pi-intercom/cwd.ts +31 -31
- package/dist/extensions/pi-intercom/format-context.test.ts +31 -31
- package/dist/extensions/pi-intercom/format-context.ts +32 -32
- package/dist/extensions/pi-intercom/test/overlay-width.test.ts +66 -66
- package/dist/extensions/pi-intercom/ui/compose.ts +143 -143
- package/dist/extensions/pi-intercom/ui/session-list.ts +166 -166
- package/dist/extensions/pi-rewind-hook/README.md +245 -245
- package/dist/extensions/pi-rewind-hook/index.ts +1445 -1445
- package/dist/extensions/pi-rewind-hook/package.json +29 -29
- package/dist/extensions/pi-subagents/install.mjs +0 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/bun/cli.d.ts +3 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/bun/register-bedrock.d.ts +2 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/bun/restore-sandbox-env.d.ts +17 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/cli/args.d.ts +57 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/cli/config-selector.d.ts +16 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/cli/file-processor.d.ts +15 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/cli/initial-message.d.ts +18 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/cli/list-models.d.ts +9 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/cli/project-trust.d.ts +10 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/cli/session-picker.d.ts +10 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/cli/startup-ui.d.ts +20 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/cli.d.ts +3 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/config.d.ts +96 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/agent-session-runtime.d.ts +119 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/agent-session-services.d.ts +85 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/agent-session.d.ts +620 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/auth-guidance.d.ts +5 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/auth-storage.d.ts +56 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/bash-executor.d.ts +32 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/cache-stats.d.ts +49 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/compaction/branch-summarization.d.ts +93 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/compaction/compaction.d.ts +128 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/compaction/index.d.ts +7 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/compaction/utils.d.ts +38 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/defaults.d.ts +3 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/diagnostics.d.ts +15 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/event-bus.d.ts +9 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/exec.d.ts +29 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/experimental.d.ts +2 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/export-html/ansi-to-html.d.ts +22 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/export-html/index.d.ts +37 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/export-html/tool-renderer.d.ts +34 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/extensions/index.d.ts +12 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/extensions/loader.d.ts +23 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/extensions/runner.d.ts +171 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/extensions/types.d.ts +1261 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/extensions/wrapper.d.ts +20 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/footer-data-provider.d.ts +54 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/http-dispatcher.d.ts +22 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/index.d.ts +13 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/keybindings.d.ts +358 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/messages.d.ts +77 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/model-config.d.ts +512 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/model-registry.d.ts +43 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/model-resolver.d.ts +121 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/model-runtime.d.ts +82 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/models-store.d.ts +17 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/output-guard.d.ts +7 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/package-manager.d.ts +210 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/project-trust.d.ts +15 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/prompt-templates.d.ts +54 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/provider-attribution.d.ts +4 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/provider-composer.d.ts +55 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/radius.d.ts +2 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/remote-catalog-provider.d.ts +5 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/resolve-config-value.d.ts +30 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/resource-loader.d.ts +206 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/runtime-credentials.d.ts +15 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/sdk.d.ts +106 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/session-cwd.d.ts +19 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/session-manager.d.ts +356 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/settings-manager.d.ts +297 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/skills.d.ts +60 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/slash-commands.d.ts +15 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/source-info.d.ts +18 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/system-prompt.d.ts +28 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/telemetry.d.ts +3 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/timings.d.ts +10 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/bash.d.ts +68 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/edit-diff.d.ts +106 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/edit.d.ts +51 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/file-mutation-queue.d.ts +6 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/find.d.ts +35 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/grep.d.ts +37 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/index.d.ts +40 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/ls.d.ts +37 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/output-accumulator.d.ts +52 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/path-utils.d.ts +10 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/read.d.ts +35 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/render-utils.d.ts +24 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/tool-definition-wrapper.d.ts +14 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/truncate.d.ts +70 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/tools/write.d.ts +26 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/trust-manager.d.ts +36 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/core/usage-totals.d.ts +19 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/extensions/index.d.ts +3 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/extensions/llama/client.d.ts +61 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/extensions/llama/huggingface.d.ts +23 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/extensions/llama/index.d.ts +3 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/extensions/llama/provider.d.ts +10 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/extensions/llama/ui.d.ts +42 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/index.d.ts +35 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/main.d.ts +12 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/migrations.d.ts +33 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/index.d.ts +9 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/armin.d.ts +34 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/assistant-message.d.ts +22 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/bash-execution.d.ts +34 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/bordered-loader.d.ts +16 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/branch-summary-message.d.ts +16 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/compaction-summary-message.d.ts +16 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/config-selector.d.ts +102 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/countdown-timer.d.ts +14 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/custom-editor.d.ts +21 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/custom-entry.d.ts +19 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/custom-message.d.ts +20 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/daxnuts.d.ts +23 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/diff.d.ts +12 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/dynamic-border.d.ts +15 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/earendil-announcement.d.ts +5 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/extension-editor.d.ts +22 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/extension-input.d.ts +23 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/extension-selector.d.ts +26 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/first-time-setup.d.ts +25 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/footer.d.ts +32 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/index.d.ts +34 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/keybinding-hints.d.ts +13 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/login-dialog.d.ts +52 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/model-selector.d.ts +54 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/oauth-selector.d.ts +33 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/scoped-models-selector.d.ts +42 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/session-selector-search.d.ts +23 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/session-selector.d.ts +95 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/settings-selector.d.ts +77 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/show-images-selector.d.ts +10 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/skill-invocation-message.d.ts +17 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/status-indicator.d.ts +28 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/theme-selector.d.ts +11 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/thinking-selector.d.ts +11 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/tool-execution.d.ts +63 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/tree-selector.d.ts +94 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/trust-selector.d.ts +23 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/user-message-selector.d.ts +30 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/user-message.d.ts +14 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/components/visual-truncate.d.ts +24 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/interactive-mode.d.ts +394 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/model-search.d.ts +12 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/theme/theme-controller.d.ts +29 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/interactive/theme/theme.d.ts +120 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/print-mode.d.ts +28 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/rpc/jsonl.d.ts +17 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/rpc/rpc-client.d.ts +246 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/rpc/rpc-mode.d.ts +20 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/modes/rpc/rpc-types.d.ts +457 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/package-manager-cli.d.ts +8 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/rpc-entry.d.ts +3 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/ansi.d.ts +2 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/changelog.d.ts +22 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/child-process.d.ts +18 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/clipboard-image.d.ts +11 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/clipboard-native.d.ts +11 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/clipboard.d.ts +4 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/deprecation.d.ts +4 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/exif-orientation.d.ts +5 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/frontmatter.d.ts +8 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/fs-watch.d.ts +5 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/git.d.ts +26 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/html.d.ts +7 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/image-convert.d.ts +10 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/image-process.d.ts +18 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/image-resize-core.d.ts +30 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/image-resize-worker.d.ts +2 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/image-resize.d.ts +16 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/json.d.ts +3 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/mime.d.ts +3 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/open-browser.d.ts +9 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/paths.d.ts +31 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/photon.d.ts +21 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/pi-user-agent.d.ts +2 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/shell.d.ts +31 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/sleep.d.ts +5 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/syntax-highlight.d.ts +12 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/tools-manager.d.ts +3 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/version-check.d.ts +15 -0
- package/dist/extensions/pi-subagents/test/fixtures/pi-coding-agent-shim/dist/utils/windows-self-update.d.ts +3 -0
- package/dist/extensions/pi-tool-display/CHANGELOG.md +329 -0
- package/dist/extensions/pi-tool-display/LICENSE +21 -0
- package/dist/extensions/pi-tool-display/README.md +417 -0
- package/dist/extensions/pi-tool-display/config/config.example.json +40 -0
- package/dist/extensions/pi-tool-display/index.ts +3 -0
- package/dist/extensions/pi-tool-display/package-lock.json +2555 -0
- package/dist/extensions/pi-tool-display/package.json +86 -0
- package/dist/extensions/pi-tool-display/src/agent-dir.ts +35 -0
- package/dist/extensions/pi-tool-display/src/ansi-utils.ts +116 -0
- package/dist/extensions/pi-tool-display/src/bash-display.ts +213 -0
- package/dist/extensions/pi-tool-display/src/capabilities.ts +88 -0
- package/dist/extensions/pi-tool-display/src/config-modal.ts +541 -0
- package/dist/extensions/pi-tool-display/src/config-store.ts +304 -0
- package/dist/extensions/pi-tool-display/src/debug-logger.ts +150 -0
- package/dist/extensions/pi-tool-display/src/diff-presentation.ts +72 -0
- package/dist/extensions/pi-tool-display/src/diff-renderer.ts +2517 -0
- package/dist/extensions/pi-tool-display/src/disposable.ts +34 -0
- package/dist/extensions/pi-tool-display/src/extension-lifecycle.ts +14 -0
- package/dist/extensions/pi-tool-display/src/index.ts +109 -0
- package/dist/extensions/pi-tool-display/src/line-width-safety.ts +93 -0
- package/dist/extensions/pi-tool-display/src/modal-icons.ts +57 -0
- package/dist/extensions/pi-tool-display/src/pending-diff-preview.ts +370 -0
- package/dist/extensions/pi-tool-display/src/presets.ts +117 -0
- package/dist/extensions/pi-tool-display/src/render-utils.ts +186 -0
- package/dist/extensions/pi-tool-display/src/settings-inspector-modal.ts +475 -0
- package/dist/extensions/pi-tool-display/src/thinking-label.ts +343 -0
- package/dist/extensions/pi-tool-display/src/tool-call-box.ts +181 -0
- package/dist/extensions/pi-tool-display/src/tool-metadata.ts +139 -0
- package/dist/extensions/pi-tool-display/src/tool-overrides.ts +2168 -0
- package/dist/extensions/pi-tool-display/src/types.ts +109 -0
- package/dist/extensions/pi-tool-display/src/user-message-box-markdown.ts +64 -0
- package/dist/extensions/pi-tool-display/src/user-message-box-native.ts +66 -0
- package/dist/extensions/pi-tool-display/src/user-message-box-patch.ts +72 -0
- package/dist/extensions/pi-tool-display/src/user-message-box-renderer.ts +419 -0
- package/dist/extensions/pi-tool-display/src/user-message-box-utils.ts +106 -0
- package/dist/extensions/pi-tool-display/src/write-display-utils.ts +31 -0
- package/dist/extensions/pi-tool-display/src/zellij-modal.ts +1027 -0
- package/dist/extensions/pi-tool-display/tests/active-backlog-red.test.ts +65 -0
- package/dist/extensions/pi-tool-display/tests/ansi-utils.test.ts +345 -0
- package/dist/extensions/pi-tool-display/tests/bash-display.test.ts +442 -0
- package/dist/extensions/pi-tool-display/tests/capabilities-edge.test.ts +360 -0
- package/dist/extensions/pi-tool-display/tests/capabilities.test.ts +54 -0
- package/dist/extensions/pi-tool-display/tests/config-modal.test.ts +360 -0
- package/dist/extensions/pi-tool-display/tests/config-store.test.ts +87 -0
- package/dist/extensions/pi-tool-display/tests/custom-tool-overrides.test.ts +415 -0
- package/dist/extensions/pi-tool-display/tests/debug-logger-edge.test.ts +630 -0
- package/dist/extensions/pi-tool-display/tests/debug-logger.test.ts +62 -0
- package/dist/extensions/pi-tool-display/tests/diff-renderer-ansi.test.ts +55 -0
- package/dist/extensions/pi-tool-display/tests/diff-renderer-edge.test.ts +886 -0
- package/dist/extensions/pi-tool-display/tests/diff-renderer-numbering.test.ts +135 -0
- package/dist/extensions/pi-tool-display/tests/diff-renderer-width.test.ts +454 -0
- package/dist/extensions/pi-tool-display/tests/diff-renderer-wrap.test.ts +169 -0
- package/dist/extensions/pi-tool-display/tests/index-integration.test.ts +354 -0
- package/dist/extensions/pi-tool-display/tests/pending-diff-preview.test.ts +79 -0
- package/dist/extensions/pi-tool-display/tests/presets-edge.test.ts +229 -0
- package/dist/extensions/pi-tool-display/tests/presets.test.ts +26 -0
- package/dist/extensions/pi-tool-display/tests/reload-behavior.test.ts +1241 -0
- package/dist/extensions/pi-tool-display/tests/render-utils.test.ts +710 -0
- package/dist/extensions/pi-tool-display/tests/settings-inspector.test.ts +450 -0
- package/dist/extensions/pi-tool-display/tests/thinking-label-edge.test.ts +904 -0
- package/dist/extensions/pi-tool-display/tests/thinking-label.test.ts +72 -0
- package/dist/extensions/pi-tool-display/tests/tool-call-box.test.ts +105 -0
- package/dist/extensions/pi-tool-display/tests/tool-overrides-config.test.ts +613 -0
- package/dist/extensions/pi-tool-display/tests/tool-overrides-mcp.test.ts +499 -0
- package/dist/extensions/pi-tool-display/tests/tool-overrides-registration.test.ts +315 -0
- package/dist/extensions/pi-tool-display/tests/tool-overrides-write-meta.test.ts +68 -0
- package/dist/extensions/pi-tool-display/tests/tool-ui-utils.test.ts +413 -0
- package/dist/extensions/pi-tool-display/tests/user-message-box-performance-red.test.ts +176 -0
- package/dist/extensions/pi-tool-display/tests/user-message-box.test.ts +908 -0
- package/dist/extensions/pi-tool-display/tests/zellij-modal.test.ts +848 -0
- package/dist/extensions/pi-tool-display/tool-display-api-consumer.d.ts +30 -0
- package/dist/extensions/pi-tool-display/tool-display-api-consumer.js +40 -0
- package/dist/extensions/pi-web-agent/package.json +31 -31
- package/dist/extensions/pi-web-agent/src/backends/config.ts +205 -205
- package/dist/extensions/pi-web-agent/src/backends/doctor.ts +136 -136
- package/dist/extensions/pi-web-agent/src/backends/factory.ts +152 -152
- package/dist/extensions/pi-web-agent/src/backends/settings-reader.ts +25 -25
- package/dist/extensions/pi-web-agent/src/cache/ttl-cache.ts +28 -28
- package/dist/extensions/pi-web-agent/src/changelog-notice.ts +136 -136
- package/dist/extensions/pi-web-agent/src/commands/web-agent-config.ts +946 -946
- package/dist/extensions/pi-web-agent/src/extension.ts +126 -126
- package/dist/extensions/pi-web-agent/src/extract/readability.ts +118 -118
- package/dist/extensions/pi-web-agent/src/fetch/browser-resolution.ts +199 -199
- package/dist/extensions/pi-web-agent/src/fetch/firecrawl-fetch.ts +100 -100
- package/dist/extensions/pi-web-agent/src/fetch/headless-fetch.ts +117 -117
- package/dist/extensions/pi-web-agent/src/fetch/http-fetch.ts +67 -67
- package/dist/extensions/pi-web-agent/src/orchestration/answer-synthesizer.ts +60 -60
- package/dist/extensions/pi-web-agent/src/orchestration/candidate-selector.ts +50 -50
- package/dist/extensions/pi-web-agent/src/orchestration/direct-url.ts +52 -52
- package/dist/extensions/pi-web-agent/src/orchestration/evidence-quality.ts +105 -105
- package/dist/extensions/pi-web-agent/src/orchestration/evidence-ranker.ts +45 -45
- package/dist/extensions/pi-web-agent/src/orchestration/index.ts +28 -28
- package/dist/extensions/pi-web-agent/src/orchestration/query-planner.ts +47 -47
- package/dist/extensions/pi-web-agent/src/orchestration/research-orchestrator.ts +376 -376
- package/dist/extensions/pi-web-agent/src/orchestration/research-types.ts +64 -64
- package/dist/extensions/pi-web-agent/src/orchestration/research-worker.ts +181 -181
- package/dist/extensions/pi-web-agent/src/orchestration/source-profile.ts +101 -101
- package/dist/extensions/pi-web-agent/src/orchestration/stop-decider.ts +81 -81
- package/dist/extensions/pi-web-agent/src/presentation/config-store.ts +210 -210
- package/dist/extensions/pi-web-agent/src/presentation/config.ts +75 -75
- package/dist/extensions/pi-web-agent/src/presentation/explore-presentation.ts +61 -61
- package/dist/extensions/pi-web-agent/src/presentation/fetch-presentation.ts +54 -54
- package/dist/extensions/pi-web-agent/src/presentation/search-presentation.ts +41 -41
- package/dist/extensions/pi-web-agent/src/presentation/select-view.ts +20 -20
- package/dist/extensions/pi-web-agent/src/presentation/types.ts +63 -63
- package/dist/extensions/pi-web-agent/src/search/brave.ts +114 -114
- package/dist/extensions/pi-web-agent/src/search/duckduckgo.ts +72 -72
- package/dist/extensions/pi-web-agent/src/search/searxng.ts +96 -96
- package/dist/extensions/pi-web-agent/src/tools/web-explore.ts +71 -71
- package/dist/extensions/pi-web-agent/src/tools/web-fetch-headless.ts +31 -31
- package/dist/extensions/pi-web-agent/src/tools/web-fetch.ts +31 -31
- package/dist/extensions/pi-web-agent/src/tools/web-search.ts +157 -157
- package/dist/extensions/pi-web-agent/src/types.ts +88 -88
- package/dist/extensions/pi-zentui/extensions/zentui/format.ts +46 -1
- package/dist/extensions/pi-zentui/extensions/zentui/index.ts +10 -0
- package/dist/extensions/pi-zentui/extensions/zentui/user-message-styles.ts +1 -1
- package/dist/extensions/pi-zentui/test/extension-compliance.test.ts +3 -3
- package/dist/extensions/pi-zentui/test/format.test.ts +50 -2
- package/dist/extensions/ponytail/package.json +8 -8
- package/dist/extensions/question/constants.ts +30 -30
- package/dist/extensions/question/helpers.ts +58 -58
- package/dist/extensions/question/navigation.ts +14 -14
- package/dist/extensions/question/package.json +19 -19
- package/dist/extensions/question/selection-mode.ts +46 -46
- package/dist/extensions/question/shortcuts.ts +44 -44
- package/dist/extensions/question/types.ts +132 -132
- package/dist/extensions/test-resolve-hook-impl.mjs +6 -6
- package/dist/extensions/test-resolve-hook.mjs +6 -6
- package/dist/extensions/tokenin-onboarding.ts +112 -2
- package/dist/extensions/web-agent-onboarding.ts +222 -222
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -0
- package/dist/main.js +2 -0
- package/dist/modes/interactive/components/settings-selector.d.ts +2 -0
- package/dist/modes/interactive/components/settings-selector.js +10 -0
- package/dist/modes/interactive/interactive-mode.d.ts +4 -0
- package/dist/modes/interactive/interactive-mode.js +72 -42
- package/dist/modes/rpc/rpc-client.d.ts +7 -0
- package/dist/modes/rpc/rpc-client.js +7 -0
- package/dist/modes/rpc/rpc-mode.js +3 -0
- package/dist/modes/rpc/rpc-types.d.ts +12 -0
- package/dist/package-manager-cli.js +71 -71
- package/dist/rpc-entry.js +0 -0
- package/dist/skills/improve-codebase/REFERENCE.md +78 -78
- package/dist/utils/shell.js +6 -4
- package/docs/compaction.md +396 -396
- package/docs/containerization.md +111 -111
- package/docs/development.md +71 -71
- package/docs/docs.json +164 -164
- package/docs/environment-variables.md +86 -86
- package/docs/index.md +83 -83
- package/docs/json.md +82 -82
- package/docs/models.md +502 -502
- package/docs/packages.md +227 -227
- package/docs/plans/subagent-delegation/phase-0-correctness.md +264 -264
- package/docs/plans/subagent-delegation/phase-1-behavioral-contract.md +485 -485
- package/docs/plans/subagent-delegation/phase-2-context-controls.md +281 -281
- package/docs/plans/subagent-delegation/phase-3-advisory-routing.md +361 -361
- package/docs/plans/subagent-delegation/phase-4-optional-enforcement.md +380 -380
- package/docs/prompt-templates.md +95 -95
- package/docs/providers.md +293 -293
- package/docs/security.md +59 -59
- package/docs/session-format.md +414 -414
- package/docs/sessions.md +145 -145
- package/docs/settings.md +4 -0
- package/docs/shared-host-extensions.md +109 -109
- package/docs/shell-aliases.md +13 -13
- package/docs/skills.md +231 -231
- package/docs/terminal-setup.md +142 -142
- package/docs/termux.md +127 -127
- package/docs/themes.md +295 -295
- package/docs/tmux.md +63 -63
- package/docs/tui.md +927 -927
- package/docs/windows.md +17 -17
- package/examples/README.md +25 -25
- package/examples/extensions/README.md +211 -211
- package/examples/extensions/auto-commit-on-exit.ts +49 -49
- package/examples/extensions/bash-spawn-hook.ts +30 -30
- package/examples/extensions/bookmark.ts +50 -50
- package/examples/extensions/border-status-editor.ts +150 -150
- package/examples/extensions/built-in-tool-renderer.ts +249 -249
- package/examples/extensions/claude-rules.ts +86 -86
- package/examples/extensions/commands.ts +72 -72
- package/examples/extensions/confirm-destructive.ts +59 -59
- package/examples/extensions/custom-compaction.ts +130 -130
- package/examples/extensions/custom-footer.ts +64 -64
- package/examples/extensions/custom-header.ts +73 -73
- package/examples/extensions/custom-provider-anthropic/index.ts +610 -610
- package/examples/extensions/custom-provider-anthropic/package-lock.json +24 -24
- package/examples/extensions/custom-provider-anthropic/package.json +19 -19
- package/examples/extensions/custom-provider-gitlab-duo/index.ts +404 -404
- package/examples/extensions/custom-provider-gitlab-duo/package.json +16 -16
- package/examples/extensions/custom-provider-gitlab-duo/test.ts +82 -82
- package/examples/extensions/dirty-repo-guard.ts +56 -56
- package/examples/extensions/doom-overlay/README.md +46 -46
- package/examples/extensions/doom-overlay/doom/build/doom.js +21 -21
- package/examples/extensions/doom-overlay/doom/build/doom.wasm +0 -0
- package/examples/extensions/doom-overlay/doom/build.sh +152 -152
- package/examples/extensions/doom-overlay/doom/doomgeneric_pi.c +72 -72
- package/examples/extensions/doom-overlay/doom-component.ts +132 -132
- package/examples/extensions/doom-overlay/doom-engine.ts +173 -173
- package/examples/extensions/doom-overlay/doom-keys.ts +104 -104
- package/examples/extensions/doom-overlay/index.ts +74 -74
- package/examples/extensions/doom-overlay/wad-finder.ts +51 -51
- package/examples/extensions/dynamic-resources/SKILL.md +8 -8
- package/examples/extensions/dynamic-resources/dynamic.json +79 -79
- package/examples/extensions/dynamic-resources/dynamic.md +5 -5
- package/examples/extensions/dynamic-resources/index.ts +15 -15
- package/examples/extensions/dynamic-tools.ts +74 -74
- package/examples/extensions/event-bus.ts +43 -43
- package/examples/extensions/file-trigger.ts +41 -41
- package/examples/extensions/git-checkpoint.ts +53 -53
- package/examples/extensions/git-merge-and-resolve.ts +115 -115
- package/examples/extensions/github-issue-autocomplete.ts +185 -185
- package/examples/extensions/gondolin/index.ts +531 -531
- package/examples/extensions/gondolin/package-lock.json +185 -185
- package/examples/extensions/gondolin/package.json +19 -19
- package/examples/extensions/handoff.ts +199 -199
- package/examples/extensions/hello.ts +26 -26
- package/examples/extensions/hidden-thinking-label.ts +53 -53
- package/examples/extensions/inline-bash.ts +94 -94
- package/examples/extensions/input-transform-streaming.ts +39 -39
- package/examples/extensions/input-transform.ts +43 -43
- package/examples/extensions/interactive-shell.ts +196 -196
- package/examples/extensions/mac-system-theme.ts +47 -47
- package/examples/extensions/message-renderer.ts +59 -59
- package/examples/extensions/minimal-mode.ts +426 -426
- package/examples/extensions/modal-editor.ts +85 -85
- package/examples/extensions/model-status.ts +31 -31
- package/examples/extensions/notify.ts +55 -55
- package/examples/extensions/overlay-qa-tests.ts +1450 -1450
- package/examples/extensions/overlay-test.ts +153 -153
- package/examples/extensions/permission-gate.ts +34 -34
- package/examples/extensions/pirate.ts +47 -47
- package/examples/extensions/plan-mode/README.md +66 -66
- package/examples/extensions/plan-mode/index.ts +390 -390
- package/examples/extensions/plan-mode/utils.ts +168 -168
- package/examples/extensions/preset.ts +436 -436
- package/examples/extensions/project-trust.ts +64 -64
- package/examples/extensions/prompt-customizer.ts +97 -97
- package/examples/extensions/protected-paths.ts +30 -30
- package/examples/extensions/provider-payload.ts +18 -18
- package/examples/extensions/qna.ts +122 -122
- package/examples/extensions/question.ts +285 -285
- package/examples/extensions/questionnaire.ts +448 -448
- package/examples/extensions/rainbow-editor.ts +88 -88
- package/examples/extensions/reload-runtime.ts +37 -37
- package/examples/extensions/rpc-demo.ts +118 -118
- package/examples/extensions/sandbox/index.ts +321 -321
- package/examples/extensions/sandbox/package-lock.json +92 -92
- package/examples/extensions/sandbox/package.json +19 -19
- package/examples/extensions/send-user-message.ts +97 -97
- package/examples/extensions/session-name.ts +27 -27
- package/examples/extensions/shutdown-command.ts +63 -63
- package/examples/extensions/snake.ts +343 -343
- package/examples/extensions/space-invaders.ts +560 -560
- package/examples/extensions/ssh.ts +220 -220
- package/examples/extensions/status-line.ts +32 -32
- package/examples/extensions/structured-output.ts +65 -65
- package/examples/extensions/subagent/README.md +175 -175
- package/examples/extensions/subagent/agents/planner.md +37 -37
- package/examples/extensions/subagent/agents/reviewer.md +35 -35
- package/examples/extensions/subagent/agents/scout.md +50 -50
- package/examples/extensions/subagent/agents/worker.md +24 -24
- package/examples/extensions/subagent/agents.ts +126 -126
- package/examples/extensions/subagent/index.ts +1015 -1015
- package/examples/extensions/subagent/prompts/implement-and-review.md +10 -10
- package/examples/extensions/subagent/prompts/implement.md +10 -10
- package/examples/extensions/subagent/prompts/scout-and-plan.md +9 -9
- package/examples/extensions/summarize.ts +209 -209
- package/examples/extensions/system-prompt-header.ts +17 -17
- package/examples/extensions/tic-tac-toe.ts +1008 -1008
- package/examples/extensions/timed-confirm.ts +70 -70
- package/examples/extensions/titlebar-spinner.ts +58 -58
- package/examples/extensions/todo.ts +297 -297
- package/examples/extensions/tool-override.ts +144 -144
- package/examples/extensions/tools.ts +146 -146
- package/examples/extensions/trigger-compact.ts +50 -50
- package/examples/extensions/truncated-tool.ts +195 -195
- package/examples/extensions/widget-placement.ts +9 -9
- package/examples/extensions/with-deps/index.ts +32 -32
- package/examples/extensions/with-deps/package-lock.json +31 -31
- package/examples/extensions/with-deps/package.json +22 -22
- package/examples/extensions/working-indicator.ts +123 -123
- package/examples/extensions/working-message-test.ts +25 -25
- package/examples/rpc-extension-ui.ts +632 -632
- package/examples/sdk/01-minimal.ts +26 -26
- package/examples/sdk/02-custom-model.ts +53 -53
- package/examples/sdk/03-custom-prompt.ts +75 -75
- package/examples/sdk/04-skills.ts +55 -55
- package/examples/sdk/05-tools.ts +48 -48
- package/examples/sdk/06-extensions.ts +99 -99
- package/examples/sdk/07-context-files.ts +47 -47
- package/examples/sdk/08-prompt-templates.ts +51 -51
- package/examples/sdk/09-api-keys-and-oauth.ts +52 -52
- package/examples/sdk/10-settings.ts +53 -53
- package/examples/sdk/11-sessions.ts +52 -52
- package/examples/sdk/12-full-control.ts +79 -79
- package/examples/sdk/13-session-runtime.ts +67 -67
- package/examples/sdk/README.md +144 -144
- package/package.json +6 -6
|
@@ -6,7 +6,7 @@ import * as fs from "node:fs";
|
|
|
6
6
|
import * as os from "node:os";
|
|
7
7
|
import * as path from "node:path";
|
|
8
8
|
import * as TuiLayouts from "@earendil-works/pi-tui";
|
|
9
|
-
import { CombinedAutocompleteProvider, Container, fuzzyFilter, Markdown, matchesKey, ProcessTerminal, Spacer, setKeybindings, Text, TruncatedText, TuiAltScreen, TuiMainScreen, visibleWidth, } from "@earendil-works/pi-tui";
|
|
9
|
+
import { CombinedAutocompleteProvider, Container, fuzzyFilter, Markdown, matchesKey, ProcessTerminal, Spacer, setCapabilityOverrides, setKeybindings, Text, TruncatedText, TuiAltScreen, TuiMainScreen, visibleWidth, } from "@earendil-works/pi-tui";
|
|
10
10
|
import chalk from "chalk";
|
|
11
11
|
import { spawn, spawnSync } from "child_process";
|
|
12
12
|
import { APP_NAME, APP_TITLE, CONFIG_DIR_NAME, getAgentDir, getAuthPath, getBundledDefaultsDir, getDebugLogPath, getDocsPath, getShareViewerUrl, getUpdateInstruction, PACKAGE_NAME, VERSION, } from "../../config.js";
|
|
@@ -107,8 +107,22 @@ const SELESAI_LOGO = [
|
|
|
107
107
|
" \\/_\\__ \\\\ \\ _\\L\\ \\ \\ __\\ \\ _\\L\\/_\\__ \\\\ \\ __ \\ \\ \\ \\",
|
|
108
108
|
" /\\ \\L\\ \\ \\ \\L\\ \\ \\ \\L\\ \\\\ \\ \\L\\ \\/\\ \\L\\ \\ \\ \\/\\ \\ \\_\\ \\__",
|
|
109
109
|
" \\ `\\____\\ \\____/\\ \\____/ \\ \\____/\\ `\\____\\ \\_\\ \\_\\/\\_____\\",
|
|
110
|
-
" \\/_____/\\/___/ \\/___/ \\/___/ \\/_____/\\/_
|
|
111
|
-
]
|
|
110
|
+
" \\/_____/\\/___/ \\/___/ \\/___/ \\/_____/\\/_\\/\\/_\\/\\/_____\\",
|
|
111
|
+
];
|
|
112
|
+
// Vertical gradient across logo lines: top #ff6b2c → bottom #fb923c.
|
|
113
|
+
function gradientLogo(lines, from, to) {
|
|
114
|
+
const a = [0xff, 0x6b, 0x2c];
|
|
115
|
+
const b = [0xfb, 0x92, 0x3c];
|
|
116
|
+
return lines
|
|
117
|
+
.map((line, i) => {
|
|
118
|
+
const t = lines.length === 1 ? 0 : i / (lines.length - 1);
|
|
119
|
+
const r = Math.round(a[0] + (b[0] - a[0]) * t);
|
|
120
|
+
const g = Math.round(a[1] + (b[1] - a[1]) * t);
|
|
121
|
+
const bl = Math.round(a[2] + (b[2] - a[2]) * t);
|
|
122
|
+
return chalk.hex(`#${((r << 16) | (g << 8) | bl).toString(16).padStart(6, "0")}`).bold(line);
|
|
123
|
+
})
|
|
124
|
+
.join("\n");
|
|
125
|
+
}
|
|
112
126
|
function isAnthropicSubscriptionAuthKey(apiKey) {
|
|
113
127
|
return typeof apiKey === "string" && apiKey.startsWith("sk-ant-oat");
|
|
114
128
|
}
|
|
@@ -185,6 +199,7 @@ export function createInteractiveTui(options) {
|
|
|
185
199
|
searchCurrentMatchStyle: (text) => theme.bold(theme.inverse(styleSearchMatch(text))),
|
|
186
200
|
openUrl: openBrowser,
|
|
187
201
|
onRightClickPaste: options.onRightClickPaste,
|
|
202
|
+
copyOnSelect: options.fullscreenCopyOnSelect,
|
|
188
203
|
copySelection: async (text) => {
|
|
189
204
|
try {
|
|
190
205
|
await copyToClipboard(text);
|
|
@@ -345,6 +360,7 @@ export class InteractiveMode {
|
|
|
345
360
|
}
|
|
346
361
|
constructor(runtimeHost, options = {}) {
|
|
347
362
|
this.runtimeHost = runtimeHost;
|
|
363
|
+
setCapabilityOverrides(this.settingsManager.getTerminalCapabilityOverrides());
|
|
348
364
|
const tuiMode = options.tuiMode ?? this.settingsManager.getTuiMode();
|
|
349
365
|
this.options = { ...options, tuiMode };
|
|
350
366
|
this.autoTrustOnReloadCwd = options.autoTrustOnReloadCwd;
|
|
@@ -360,6 +376,7 @@ export class InteractiveMode {
|
|
|
360
376
|
showHardwareCursor: this.settingsManager.getShowHardwareCursor(),
|
|
361
377
|
logDirectory: getAgentDir(),
|
|
362
378
|
onRightClickPaste: this.onRightClickPaste,
|
|
379
|
+
fullscreenCopyOnSelect: this.settingsManager.getFullscreenCopyOnSelect(),
|
|
363
380
|
});
|
|
364
381
|
this.ui = createInteractiveTuiReference(() => this.renderer);
|
|
365
382
|
this.ui.setClearOnShrink(this.settingsManager.getClearOnShrink());
|
|
@@ -596,6 +613,7 @@ export class InteractiveMode {
|
|
|
596
613
|
logDirectory: getAgentDir(),
|
|
597
614
|
terminal,
|
|
598
615
|
onRightClickPaste: this.onRightClickPaste,
|
|
616
|
+
fullscreenCopyOnSelect: this.settingsManager.getFullscreenCopyOnSelect(),
|
|
599
617
|
});
|
|
600
618
|
nextUi.setClearOnShrink(clearOnShrink);
|
|
601
619
|
nextUi.onDebug = onDebug;
|
|
@@ -678,7 +696,7 @@ export class InteractiveMode {
|
|
|
678
696
|
this.isInitialized = true;
|
|
679
697
|
await this.themeController.applyFromSettings();
|
|
680
698
|
// Brand banner always appears; quiet startup only hides keybinding help.
|
|
681
|
-
const logo = `${
|
|
699
|
+
const logo = `${gradientLogo(SELESAI_LOGO, "#ff6b2c", "#fb923c")}\n${theme.fg("dim", ` ${APP_NAME} v${this.version} · /help for commands`)}`;
|
|
682
700
|
// Build startup instructions using keybinding hint helpers
|
|
683
701
|
const hint = (keybinding, description) => keyHint(keybinding, description);
|
|
684
702
|
const expandedInstructions = [
|
|
@@ -1410,7 +1428,11 @@ export class InteractiveMode {
|
|
|
1410
1428
|
this.showStartupNoticesIfNeeded();
|
|
1411
1429
|
}
|
|
1412
1430
|
applyRuntimeSettings() {
|
|
1431
|
+
setCapabilityOverrides(this.settingsManager.getTerminalCapabilityOverrides());
|
|
1413
1432
|
configureHttpDispatcher(this.settingsManager.getHttpIdleTimeoutMs());
|
|
1433
|
+
if (this.renderer instanceof TuiAltScreen) {
|
|
1434
|
+
this.renderer.setCopyOnSelect(this.settingsManager.getFullscreenCopyOnSelect());
|
|
1435
|
+
}
|
|
1414
1436
|
this.footer.setSession(this.session);
|
|
1415
1437
|
this.footer.setAutoCompactEnabled(this.session.autoCompactionEnabled);
|
|
1416
1438
|
this.footerDataProvider.setCwd(this.sessionManager.getCwd());
|
|
@@ -1557,6 +1579,9 @@ export class InteractiveMode {
|
|
|
1557
1579
|
this.statusContainer.addChild(this.idleStatus);
|
|
1558
1580
|
}
|
|
1559
1581
|
}
|
|
1582
|
+
showWorkingStatusIndicator() {
|
|
1583
|
+
this.showStatusIndicator(new WorkingStatusIndicator(this.ui, this.workingMessage ?? this.defaultWorkingMessage, this.workingIndicatorOptions));
|
|
1584
|
+
}
|
|
1560
1585
|
setWorkingVisible(visible) {
|
|
1561
1586
|
this.workingVisible = visible;
|
|
1562
1587
|
if (!visible) {
|
|
@@ -1565,7 +1590,7 @@ export class InteractiveMode {
|
|
|
1565
1590
|
return;
|
|
1566
1591
|
}
|
|
1567
1592
|
if (this.session.isStreaming && this.activeStatusIndicator?.kind !== "working") {
|
|
1568
|
-
this.
|
|
1593
|
+
this.showWorkingStatusIndicator();
|
|
1569
1594
|
}
|
|
1570
1595
|
this.ui.requestRender();
|
|
1571
1596
|
}
|
|
@@ -2177,7 +2202,7 @@ export class InteractiveMode {
|
|
|
2177
2202
|
this.defaultEditor.onAction("app.tools.expand", () => this.toggleToolOutputExpansion());
|
|
2178
2203
|
this.defaultEditor.onAction("app.thinking.toggle", () => this.toggleThinkingBlockVisibility());
|
|
2179
2204
|
this.defaultEditor.onAction("app.editor.external", () => void this.handleOpenExternalEditor());
|
|
2180
|
-
this.defaultEditor.onAction("app.message.copy", () => void this.handleCopyCommand());
|
|
2205
|
+
this.defaultEditor.onAction("app.message.copy", () => void this.handleCopyCommand({ flashConfirmation: true, preferSelection: true }));
|
|
2181
2206
|
this.defaultEditor.onAction("app.message.followUp", () => this.handleFollowUp());
|
|
2182
2207
|
this.defaultEditor.onAction("app.message.dequeue", () => this.handleDequeue());
|
|
2183
2208
|
this.defaultEditor.onAction("app.session.new", () => this.handleClearCommand());
|
|
@@ -2496,17 +2521,21 @@ export class InteractiveMode {
|
|
|
2496
2521
|
switch (event.type) {
|
|
2497
2522
|
case "agent_start":
|
|
2498
2523
|
this.pendingTools.clear();
|
|
2499
|
-
if (this.settingsManager.getShowTerminalProgress()) {
|
|
2500
|
-
this.ui.terminal.setProgress(true);
|
|
2501
|
-
}
|
|
2502
2524
|
// Restore main escape handler if retry handler is still active
|
|
2503
2525
|
// (retry success event fires later, but we need main handler now)
|
|
2504
2526
|
if (this.retryEscapeHandler) {
|
|
2505
2527
|
this.defaultEditor.onEscape = this.retryEscapeHandler;
|
|
2506
2528
|
this.retryEscapeHandler = undefined;
|
|
2507
2529
|
}
|
|
2530
|
+
break;
|
|
2531
|
+
case "turn_start":
|
|
2532
|
+
if (this.settingsManager.getShowTerminalProgress()) {
|
|
2533
|
+
this.ui.terminal.setProgress(true);
|
|
2534
|
+
}
|
|
2508
2535
|
if (this.workingVisible) {
|
|
2509
|
-
|
|
2536
|
+
if (this.activeStatusIndicator?.kind !== "working") {
|
|
2537
|
+
this.showWorkingStatusIndicator();
|
|
2538
|
+
}
|
|
2510
2539
|
}
|
|
2511
2540
|
else {
|
|
2512
2541
|
this.clearStatusIndicator();
|
|
@@ -3358,18 +3387,19 @@ export class InteractiveMode {
|
|
|
3358
3387
|
}
|
|
3359
3388
|
this.showStatus(`Tool output: ${expanded ? "expanded" : "collapsed"}`);
|
|
3360
3389
|
}
|
|
3390
|
+
/** Update rendered assistant messages without rebuilding live tool components. */
|
|
3391
|
+
updateThinkingBlockVisibility() {
|
|
3392
|
+
for (const child of this.chatContainer.children) {
|
|
3393
|
+
if (child instanceof AssistantMessageComponent) {
|
|
3394
|
+
child.setHideThinkingBlock(this.hideThinkingBlock);
|
|
3395
|
+
}
|
|
3396
|
+
}
|
|
3397
|
+
this.ui.requestRender();
|
|
3398
|
+
}
|
|
3361
3399
|
toggleThinkingBlockVisibility() {
|
|
3362
3400
|
this.hideThinkingBlock = !this.hideThinkingBlock;
|
|
3363
3401
|
this.settingsManager.setHideThinkingBlock(this.hideThinkingBlock);
|
|
3364
|
-
|
|
3365
|
-
this.chatContainer.clear();
|
|
3366
|
-
this.rebuildChatFromMessages();
|
|
3367
|
-
// If streaming, re-add the streaming component with updated visibility and re-render
|
|
3368
|
-
if (this.streamingComponent && this.streamingMessage) {
|
|
3369
|
-
this.streamingComponent.setHideThinkingBlock(this.hideThinkingBlock);
|
|
3370
|
-
this.streamingComponent.updateContent(this.streamingMessage);
|
|
3371
|
-
this.chatContainer.addChild(this.streamingComponent);
|
|
3372
|
-
}
|
|
3402
|
+
this.updateThinkingBlockVisibility();
|
|
3373
3403
|
this.showStatus(`Thinking blocks: ${this.hideThinkingBlock ? "hidden" : "visible"}`);
|
|
3374
3404
|
}
|
|
3375
3405
|
async handleOpenExternalEditor() {
|
|
@@ -3666,6 +3696,7 @@ export class InteractiveMode {
|
|
|
3666
3696
|
tuiMode: this.settingsManager.getTuiMode(),
|
|
3667
3697
|
fullscreenExitOutput: this.settingsManager.getFullscreenExitOutput(),
|
|
3668
3698
|
fullscreenScrollbar: this.settingsManager.getFullscreenScrollbar(),
|
|
3699
|
+
fullscreenCopyOnSelect: this.settingsManager.getFullscreenCopyOnSelect(),
|
|
3669
3700
|
warnings: this.settingsManager.getWarnings(),
|
|
3670
3701
|
skills: this.buildSkillToggleItems(),
|
|
3671
3702
|
}, {
|
|
@@ -3737,13 +3768,7 @@ export class InteractiveMode {
|
|
|
3737
3768
|
onHideThinkingBlockChange: (hidden) => {
|
|
3738
3769
|
this.hideThinkingBlock = hidden;
|
|
3739
3770
|
this.settingsManager.setHideThinkingBlock(hidden);
|
|
3740
|
-
|
|
3741
|
-
if (child instanceof AssistantMessageComponent) {
|
|
3742
|
-
child.setHideThinkingBlock(hidden);
|
|
3743
|
-
}
|
|
3744
|
-
}
|
|
3745
|
-
this.chatContainer.clear();
|
|
3746
|
-
this.rebuildChatFromMessages();
|
|
3771
|
+
this.updateThinkingBlockVisibility();
|
|
3747
3772
|
},
|
|
3748
3773
|
onShowCacheMissNoticesChange: (shown) => {
|
|
3749
3774
|
this.settingsManager.setShowCacheMissNotices(shown);
|
|
@@ -3833,6 +3858,11 @@ export class InteractiveMode {
|
|
|
3833
3858
|
this.transcriptScrollView?.setScrollbar(mode);
|
|
3834
3859
|
this.ui.requestRender();
|
|
3835
3860
|
},
|
|
3861
|
+
onFullscreenCopyOnSelectChange: (enabled) => {
|
|
3862
|
+
this.settingsManager.setFullscreenCopyOnSelect(enabled);
|
|
3863
|
+
if (this.renderer instanceof TuiAltScreen)
|
|
3864
|
+
this.renderer.setCopyOnSelect(enabled);
|
|
3865
|
+
},
|
|
3836
3866
|
onWarningsChange: (warnings) => {
|
|
3837
3867
|
this.settingsManager.setWarnings(warnings);
|
|
3838
3868
|
},
|
|
@@ -4043,6 +4073,7 @@ export class InteractiveMode {
|
|
|
4043
4073
|
return;
|
|
4044
4074
|
try {
|
|
4045
4075
|
await this.session.setModel(model);
|
|
4076
|
+
this.updateAvailableProviderCount();
|
|
4046
4077
|
this.footer.invalidate();
|
|
4047
4078
|
this.updateEditorBorderColor();
|
|
4048
4079
|
done();
|
|
@@ -4856,21 +4887,8 @@ export class InteractiveMode {
|
|
|
4856
4887
|
activeHeader.setExpanded(this.toolOutputExpanded);
|
|
4857
4888
|
}
|
|
4858
4889
|
setRegisteredThemes(this.session.resourceLoader.getThemes().themes);
|
|
4890
|
+
this.applyRuntimeSettings();
|
|
4859
4891
|
await this.themeController.applyFromSettings();
|
|
4860
|
-
const editorPaddingX = this.settingsManager.getEditorPaddingX();
|
|
4861
|
-
const autocompleteMaxVisible = this.settingsManager.getAutocompleteMaxVisible();
|
|
4862
|
-
this.defaultEditor.setPaddingX(editorPaddingX);
|
|
4863
|
-
this.defaultEditor.setAutocompleteMaxVisible(autocompleteMaxVisible);
|
|
4864
|
-
if (this.editor !== this.defaultEditor) {
|
|
4865
|
-
this.editor.setPaddingX?.(editorPaddingX);
|
|
4866
|
-
this.editor.setAutocompleteMaxVisible?.(autocompleteMaxVisible);
|
|
4867
|
-
}
|
|
4868
|
-
this.ui.setShowHardwareCursor(this.settingsManager.getShowHardwareCursor());
|
|
4869
|
-
const clearOnShrink = this.settingsManager.getClearOnShrink();
|
|
4870
|
-
this.ui.setClearOnShrink(clearOnShrink);
|
|
4871
|
-
if (!clearOnShrink && !this.activeStatusIndicator) {
|
|
4872
|
-
this.statusContainer.clear();
|
|
4873
|
-
}
|
|
4874
4892
|
this.setupAutocompleteProvider();
|
|
4875
4893
|
const runner = this.session.extensionRunner;
|
|
4876
4894
|
this.setupExtensionShortcuts(runner);
|
|
@@ -5068,7 +5086,14 @@ export class InteractiveMode {
|
|
|
5068
5086
|
}
|
|
5069
5087
|
}
|
|
5070
5088
|
}
|
|
5071
|
-
async handleCopyCommand() {
|
|
5089
|
+
async handleCopyCommand(options = {}) {
|
|
5090
|
+
if (options.preferSelection &&
|
|
5091
|
+
this.ui instanceof TuiAltScreen &&
|
|
5092
|
+
!this.ui.getCopyOnSelect() &&
|
|
5093
|
+
this.ui.hasActiveSelection()) {
|
|
5094
|
+
await this.ui.copyActiveSelectionToClipboard();
|
|
5095
|
+
return;
|
|
5096
|
+
}
|
|
5072
5097
|
const text = this.session.getLastAssistantText();
|
|
5073
5098
|
if (!text) {
|
|
5074
5099
|
this.showError("No agent messages to copy yet.");
|
|
@@ -5076,7 +5101,12 @@ export class InteractiveMode {
|
|
|
5076
5101
|
}
|
|
5077
5102
|
try {
|
|
5078
5103
|
await copyToClipboard(text);
|
|
5079
|
-
|
|
5104
|
+
if (options.flashConfirmation && this.ui instanceof TuiAltScreen) {
|
|
5105
|
+
this.ui.flash("Copied!");
|
|
5106
|
+
}
|
|
5107
|
+
else {
|
|
5108
|
+
this.showStatus("Copied last agent message to clipboard");
|
|
5109
|
+
}
|
|
5080
5110
|
}
|
|
5081
5111
|
catch (error) {
|
|
5082
5112
|
this.showError(error instanceof Error ? error.message : String(error));
|
|
@@ -75,6 +75,13 @@ export declare class RpcClient {
|
|
|
75
75
|
* Abort current operation.
|
|
76
76
|
*/
|
|
77
77
|
abort(): Promise<void>;
|
|
78
|
+
/**
|
|
79
|
+
* Clear queued steering and follow-up messages, returning their text.
|
|
80
|
+
*/
|
|
81
|
+
clearQueue(): Promise<{
|
|
82
|
+
steering: string[];
|
|
83
|
+
followUp: string[];
|
|
84
|
+
}>;
|
|
78
85
|
/**
|
|
79
86
|
* Start a new session, optionally with parent tracking.
|
|
80
87
|
* @param parentSession - Optional parent session path for lineage tracking
|
|
@@ -153,6 +153,13 @@ export class RpcClient {
|
|
|
153
153
|
async abort() {
|
|
154
154
|
await this.send({ type: "abort" });
|
|
155
155
|
}
|
|
156
|
+
/**
|
|
157
|
+
* Clear queued steering and follow-up messages, returning their text.
|
|
158
|
+
*/
|
|
159
|
+
async clearQueue() {
|
|
160
|
+
const response = await this.send({ type: "clear_queue" });
|
|
161
|
+
return this.getData(response);
|
|
162
|
+
}
|
|
156
163
|
/**
|
|
157
164
|
* Start a new session, optionally with parent tracking.
|
|
158
165
|
* @param parentSession - Optional parent session path for lineage tracking
|
|
@@ -331,6 +331,9 @@ export async function runRpcMode(runtimeHost) {
|
|
|
331
331
|
await session.abort();
|
|
332
332
|
return success(id, "abort");
|
|
333
333
|
}
|
|
334
|
+
case "clear_queue": {
|
|
335
|
+
return success(id, "clear_queue", session.clearQueue());
|
|
336
|
+
}
|
|
334
337
|
case "new_session": {
|
|
335
338
|
const options = command.parentSession ? { parentSession: command.parentSession } : undefined;
|
|
336
339
|
const result = await runtimeHost.newSession(options);
|
|
@@ -30,6 +30,9 @@ export type RpcCommand = {
|
|
|
30
30
|
} | {
|
|
31
31
|
id?: string;
|
|
32
32
|
type: "abort";
|
|
33
|
+
} | {
|
|
34
|
+
id?: string;
|
|
35
|
+
type: "clear_queue";
|
|
33
36
|
} | {
|
|
34
37
|
id?: string;
|
|
35
38
|
type: "new_session";
|
|
@@ -206,6 +209,15 @@ export type RpcResponse = {
|
|
|
206
209
|
type: "response";
|
|
207
210
|
command: "abort";
|
|
208
211
|
success: true;
|
|
212
|
+
} | {
|
|
213
|
+
id?: string;
|
|
214
|
+
type: "response";
|
|
215
|
+
command: "clear_queue";
|
|
216
|
+
success: true;
|
|
217
|
+
data: {
|
|
218
|
+
steering: string[];
|
|
219
|
+
followUp: string[];
|
|
220
|
+
};
|
|
209
221
|
} | {
|
|
210
222
|
id?: string;
|
|
211
223
|
type: "response";
|
|
@@ -52,91 +52,91 @@ function getPackageCommandUsage(command) {
|
|
|
52
52
|
}
|
|
53
53
|
const CONFIG_COMMAND_USAGE = `${APP_NAME} config [-l] [--approve|--no-approve]`;
|
|
54
54
|
function printConfigCommandHelp() {
|
|
55
|
-
console.log(`${chalk.bold("Usage:")}
|
|
56
|
-
${CONFIG_COMMAND_USAGE}
|
|
57
|
-
|
|
58
|
-
Open the resource configuration TUI to enable or disable package resources.
|
|
59
|
-
Without -l, starts in global settings (~/${CONFIG_DIR_NAME}/agent/settings.json).
|
|
60
|
-
Press Tab in the TUI to switch between global and project-local modes.
|
|
61
|
-
|
|
62
|
-
Options:
|
|
63
|
-
-l, --local Edit project overrides (${CONFIG_DIR_NAME}/settings.json)
|
|
64
|
-
-a, --approve Trust project-local files for this command with -l
|
|
65
|
-
-na, --no-approve Ignore project-local files for this command with -l
|
|
55
|
+
console.log(`${chalk.bold("Usage:")}
|
|
56
|
+
${CONFIG_COMMAND_USAGE}
|
|
57
|
+
|
|
58
|
+
Open the resource configuration TUI to enable or disable package resources.
|
|
59
|
+
Without -l, starts in global settings (~/${CONFIG_DIR_NAME}/agent/settings.json).
|
|
60
|
+
Press Tab in the TUI to switch between global and project-local modes.
|
|
61
|
+
|
|
62
|
+
Options:
|
|
63
|
+
-l, --local Edit project overrides (${CONFIG_DIR_NAME}/settings.json)
|
|
64
|
+
-a, --approve Trust project-local files for this command with -l
|
|
65
|
+
-na, --no-approve Ignore project-local files for this command with -l
|
|
66
66
|
`);
|
|
67
67
|
}
|
|
68
68
|
function printPackageCommandHelp(command) {
|
|
69
69
|
switch (command) {
|
|
70
70
|
case "install":
|
|
71
|
-
console.log(`${chalk.bold("Usage:")}
|
|
72
|
-
${getPackageCommandUsage("install")}
|
|
73
|
-
|
|
74
|
-
Install a package and add it to settings.
|
|
75
|
-
|
|
76
|
-
Options:
|
|
77
|
-
-l, --local Install project-locally (${CONFIG_DIR_NAME}/settings.json)
|
|
78
|
-
-a, --approve Trust project-local files for this command
|
|
79
|
-
-na, --no-approve Ignore project-local files for this command
|
|
80
|
-
|
|
81
|
-
Examples:
|
|
82
|
-
${APP_NAME} install npm:@foo/bar
|
|
83
|
-
${APP_NAME} install git:github.com/user/repo
|
|
84
|
-
${APP_NAME} install git:git@github.com:user/repo
|
|
85
|
-
${APP_NAME} install https://github.com/user/repo
|
|
86
|
-
${APP_NAME} install ssh://git@github.com/user/repo
|
|
87
|
-
${APP_NAME} install ./local/path
|
|
71
|
+
console.log(`${chalk.bold("Usage:")}
|
|
72
|
+
${getPackageCommandUsage("install")}
|
|
73
|
+
|
|
74
|
+
Install a package and add it to settings.
|
|
75
|
+
|
|
76
|
+
Options:
|
|
77
|
+
-l, --local Install project-locally (${CONFIG_DIR_NAME}/settings.json)
|
|
78
|
+
-a, --approve Trust project-local files for this command
|
|
79
|
+
-na, --no-approve Ignore project-local files for this command
|
|
80
|
+
|
|
81
|
+
Examples:
|
|
82
|
+
${APP_NAME} install npm:@foo/bar
|
|
83
|
+
${APP_NAME} install git:github.com/user/repo
|
|
84
|
+
${APP_NAME} install git:git@github.com:user/repo
|
|
85
|
+
${APP_NAME} install https://github.com/user/repo
|
|
86
|
+
${APP_NAME} install ssh://git@github.com/user/repo
|
|
87
|
+
${APP_NAME} install ./local/path
|
|
88
88
|
`);
|
|
89
89
|
return;
|
|
90
90
|
case "remove":
|
|
91
|
-
console.log(`${chalk.bold("Usage:")}
|
|
92
|
-
${getPackageCommandUsage("remove")}
|
|
93
|
-
|
|
94
|
-
Remove a package and its source from settings.
|
|
95
|
-
Alias: ${APP_NAME} uninstall <source> [-l]
|
|
96
|
-
|
|
97
|
-
Options:
|
|
98
|
-
-l, --local Remove from project settings (${CONFIG_DIR_NAME}/settings.json)
|
|
99
|
-
-a, --approve Trust project-local files for this command
|
|
100
|
-
-na, --no-approve Ignore project-local files for this command
|
|
101
|
-
|
|
102
|
-
Examples:
|
|
103
|
-
${APP_NAME} remove npm:@foo/bar
|
|
104
|
-
${APP_NAME} uninstall npm:@foo/bar
|
|
91
|
+
console.log(`${chalk.bold("Usage:")}
|
|
92
|
+
${getPackageCommandUsage("remove")}
|
|
93
|
+
|
|
94
|
+
Remove a package and its source from settings.
|
|
95
|
+
Alias: ${APP_NAME} uninstall <source> [-l]
|
|
96
|
+
|
|
97
|
+
Options:
|
|
98
|
+
-l, --local Remove from project settings (${CONFIG_DIR_NAME}/settings.json)
|
|
99
|
+
-a, --approve Trust project-local files for this command
|
|
100
|
+
-na, --no-approve Ignore project-local files for this command
|
|
101
|
+
|
|
102
|
+
Examples:
|
|
103
|
+
${APP_NAME} remove npm:@foo/bar
|
|
104
|
+
${APP_NAME} uninstall npm:@foo/bar
|
|
105
105
|
`);
|
|
106
106
|
return;
|
|
107
107
|
case "update":
|
|
108
|
-
console.log(`${chalk.bold("Usage:")}
|
|
109
|
-
${getPackageCommandUsage("update")}
|
|
110
|
-
|
|
111
|
-
Update pi, installed packages, or model catalogs.
|
|
112
|
-
|
|
113
|
-
Options:
|
|
114
|
-
--self Update pi only (default when no target is given)
|
|
115
|
-
--extensions Update installed packages only
|
|
116
|
-
--models Refresh model catalogs only
|
|
117
|
-
--all Update pi and installed packages
|
|
118
|
-
--extension <source> Update one package only
|
|
119
|
-
-a, --approve Trust project-local files for this command
|
|
120
|
-
-na, --no-approve Ignore project-local files for this command
|
|
121
|
-
--force Reinstall pi even if the current version is latest
|
|
122
|
-
|
|
123
|
-
Short forms:
|
|
124
|
-
${APP_NAME} update Update pi only
|
|
125
|
-
${APP_NAME} update --all Update pi and all extensions
|
|
126
|
-
${APP_NAME} update --models Refresh model catalogs only
|
|
127
|
-
${APP_NAME} update <source> Update one package
|
|
128
|
-
${APP_NAME} update pi Update pi only (self works as alias to pi)
|
|
108
|
+
console.log(`${chalk.bold("Usage:")}
|
|
109
|
+
${getPackageCommandUsage("update")}
|
|
110
|
+
|
|
111
|
+
Update pi, installed packages, or model catalogs.
|
|
112
|
+
|
|
113
|
+
Options:
|
|
114
|
+
--self Update pi only (default when no target is given)
|
|
115
|
+
--extensions Update installed packages only
|
|
116
|
+
--models Refresh model catalogs only
|
|
117
|
+
--all Update pi and installed packages
|
|
118
|
+
--extension <source> Update one package only
|
|
119
|
+
-a, --approve Trust project-local files for this command
|
|
120
|
+
-na, --no-approve Ignore project-local files for this command
|
|
121
|
+
--force Reinstall pi even if the current version is latest
|
|
122
|
+
|
|
123
|
+
Short forms:
|
|
124
|
+
${APP_NAME} update Update pi only
|
|
125
|
+
${APP_NAME} update --all Update pi and all extensions
|
|
126
|
+
${APP_NAME} update --models Refresh model catalogs only
|
|
127
|
+
${APP_NAME} update <source> Update one package
|
|
128
|
+
${APP_NAME} update pi Update pi only (self works as alias to pi)
|
|
129
129
|
`);
|
|
130
130
|
return;
|
|
131
131
|
case "list":
|
|
132
|
-
console.log(`${chalk.bold("Usage:")}
|
|
133
|
-
${getPackageCommandUsage("list")}
|
|
134
|
-
|
|
135
|
-
List installed packages from user and project settings.
|
|
136
|
-
|
|
137
|
-
Options:
|
|
138
|
-
-a, --approve Trust project-local files for this command
|
|
139
|
-
-na, --no-approve Ignore project-local files for this command
|
|
132
|
+
console.log(`${chalk.bold("Usage:")}
|
|
133
|
+
${getPackageCommandUsage("list")}
|
|
134
|
+
|
|
135
|
+
List installed packages from user and project settings.
|
|
136
|
+
|
|
137
|
+
Options:
|
|
138
|
+
-a, --approve Trust project-local files for this command
|
|
139
|
+
-na, --no-approve Ignore project-local files for this command
|
|
140
140
|
`);
|
|
141
141
|
return;
|
|
142
142
|
}
|
package/dist/rpc-entry.js
CHANGED
|
File without changes
|
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
# Reference
|
|
2
|
-
|
|
3
|
-
## Dependency Categories
|
|
4
|
-
|
|
5
|
-
When assessing a candidate for deepening, classify its dependencies:
|
|
6
|
-
|
|
7
|
-
### 1. In-process
|
|
8
|
-
|
|
9
|
-
Pure computation, in-memory state, no I/O. Always deepenable — just merge the modules and test directly.
|
|
10
|
-
|
|
11
|
-
### 2. Local-substitutable
|
|
12
|
-
|
|
13
|
-
Dependencies that have local test stand-ins (e.g., PGLite for Postgres, in-memory filesystem). Deepenable if the test substitute exists. The deepened module is tested with the local stand-in running in the test suite.
|
|
14
|
-
|
|
15
|
-
### 3. Remote but owned (Ports & Adapters)
|
|
16
|
-
|
|
17
|
-
Your own services across a network boundary (microservices, internal APIs). Define a port (interface) at the module boundary. The deep module owns the logic; the transport is injected. Tests use an in-memory adapter. Production uses the real HTTP/gRPC/queue adapter.
|
|
18
|
-
|
|
19
|
-
Recommendation shape: "Define a shared interface (port), implement an HTTP adapter for production and an in-memory adapter for testing, so the logic can be tested as one deep module even though it's deployed across a network boundary."
|
|
20
|
-
|
|
21
|
-
### 4. True external (Mock)
|
|
22
|
-
|
|
23
|
-
Third-party services (Stripe, Twilio, etc.) you don't control. Mock at the boundary. The deepened module takes the external dependency as an injected port, and tests provide a mock implementation.
|
|
24
|
-
|
|
25
|
-
## Testing Strategy
|
|
26
|
-
|
|
27
|
-
The core principle: **replace, don't layer.**
|
|
28
|
-
|
|
29
|
-
- Old unit tests on shallow modules are waste once boundary tests exist — delete them
|
|
30
|
-
- Write new tests at the deepened module's interface boundary
|
|
31
|
-
- Tests assert on observable outcomes through the public interface, not internal state
|
|
32
|
-
- Tests should survive internal refactors — they describe behavior, not implementation
|
|
33
|
-
|
|
34
|
-
## Issue Template
|
|
35
|
-
|
|
36
|
-
<issue-template>
|
|
37
|
-
|
|
38
|
-
## Problem
|
|
39
|
-
|
|
40
|
-
Describe the architectural friction:
|
|
41
|
-
|
|
42
|
-
- Which modules are shallow and tightly coupled
|
|
43
|
-
- What integration risk exists in the seams between them
|
|
44
|
-
- Why this makes the codebase harder to navigate and maintain
|
|
45
|
-
|
|
46
|
-
## Proposed Interface
|
|
47
|
-
|
|
48
|
-
The chosen interface design:
|
|
49
|
-
|
|
50
|
-
- Interface signature (types, methods, params)
|
|
51
|
-
- Usage example showing how callers use it
|
|
52
|
-
- What complexity it hides internally
|
|
53
|
-
|
|
54
|
-
## Dependency Strategy
|
|
55
|
-
|
|
56
|
-
Which category applies and how dependencies are handled:
|
|
57
|
-
|
|
58
|
-
- **In-process**: merged directly
|
|
59
|
-
- **Local-substitutable**: tested with [specific stand-in]
|
|
60
|
-
- **Ports & adapters**: port definition, production adapter, test adapter
|
|
61
|
-
- **Mock**: mock boundary for external services
|
|
62
|
-
|
|
63
|
-
## Testing Strategy
|
|
64
|
-
|
|
65
|
-
- **New boundary tests to write**: describe the behaviors to verify at the interface
|
|
66
|
-
- **Old tests to delete**: list the shallow module tests that become redundant
|
|
67
|
-
- **Test environment needs**: any local stand-ins or adapters required
|
|
68
|
-
|
|
69
|
-
## Implementation Recommendations
|
|
70
|
-
|
|
71
|
-
Durable architectural guidance that is NOT coupled to current file paths:
|
|
72
|
-
|
|
73
|
-
- What the module should own (responsibilities)
|
|
74
|
-
- What it should hide (implementation details)
|
|
75
|
-
- What it should expose (the interface contract)
|
|
76
|
-
- How callers should migrate to the new interface
|
|
77
|
-
|
|
78
|
-
</issue-template>
|
|
1
|
+
# Reference
|
|
2
|
+
|
|
3
|
+
## Dependency Categories
|
|
4
|
+
|
|
5
|
+
When assessing a candidate for deepening, classify its dependencies:
|
|
6
|
+
|
|
7
|
+
### 1. In-process
|
|
8
|
+
|
|
9
|
+
Pure computation, in-memory state, no I/O. Always deepenable — just merge the modules and test directly.
|
|
10
|
+
|
|
11
|
+
### 2. Local-substitutable
|
|
12
|
+
|
|
13
|
+
Dependencies that have local test stand-ins (e.g., PGLite for Postgres, in-memory filesystem). Deepenable if the test substitute exists. The deepened module is tested with the local stand-in running in the test suite.
|
|
14
|
+
|
|
15
|
+
### 3. Remote but owned (Ports & Adapters)
|
|
16
|
+
|
|
17
|
+
Your own services across a network boundary (microservices, internal APIs). Define a port (interface) at the module boundary. The deep module owns the logic; the transport is injected. Tests use an in-memory adapter. Production uses the real HTTP/gRPC/queue adapter.
|
|
18
|
+
|
|
19
|
+
Recommendation shape: "Define a shared interface (port), implement an HTTP adapter for production and an in-memory adapter for testing, so the logic can be tested as one deep module even though it's deployed across a network boundary."
|
|
20
|
+
|
|
21
|
+
### 4. True external (Mock)
|
|
22
|
+
|
|
23
|
+
Third-party services (Stripe, Twilio, etc.) you don't control. Mock at the boundary. The deepened module takes the external dependency as an injected port, and tests provide a mock implementation.
|
|
24
|
+
|
|
25
|
+
## Testing Strategy
|
|
26
|
+
|
|
27
|
+
The core principle: **replace, don't layer.**
|
|
28
|
+
|
|
29
|
+
- Old unit tests on shallow modules are waste once boundary tests exist — delete them
|
|
30
|
+
- Write new tests at the deepened module's interface boundary
|
|
31
|
+
- Tests assert on observable outcomes through the public interface, not internal state
|
|
32
|
+
- Tests should survive internal refactors — they describe behavior, not implementation
|
|
33
|
+
|
|
34
|
+
## Issue Template
|
|
35
|
+
|
|
36
|
+
<issue-template>
|
|
37
|
+
|
|
38
|
+
## Problem
|
|
39
|
+
|
|
40
|
+
Describe the architectural friction:
|
|
41
|
+
|
|
42
|
+
- Which modules are shallow and tightly coupled
|
|
43
|
+
- What integration risk exists in the seams between them
|
|
44
|
+
- Why this makes the codebase harder to navigate and maintain
|
|
45
|
+
|
|
46
|
+
## Proposed Interface
|
|
47
|
+
|
|
48
|
+
The chosen interface design:
|
|
49
|
+
|
|
50
|
+
- Interface signature (types, methods, params)
|
|
51
|
+
- Usage example showing how callers use it
|
|
52
|
+
- What complexity it hides internally
|
|
53
|
+
|
|
54
|
+
## Dependency Strategy
|
|
55
|
+
|
|
56
|
+
Which category applies and how dependencies are handled:
|
|
57
|
+
|
|
58
|
+
- **In-process**: merged directly
|
|
59
|
+
- **Local-substitutable**: tested with [specific stand-in]
|
|
60
|
+
- **Ports & adapters**: port definition, production adapter, test adapter
|
|
61
|
+
- **Mock**: mock boundary for external services
|
|
62
|
+
|
|
63
|
+
## Testing Strategy
|
|
64
|
+
|
|
65
|
+
- **New boundary tests to write**: describe the behaviors to verify at the interface
|
|
66
|
+
- **Old tests to delete**: list the shallow module tests that become redundant
|
|
67
|
+
- **Test environment needs**: any local stand-ins or adapters required
|
|
68
|
+
|
|
69
|
+
## Implementation Recommendations
|
|
70
|
+
|
|
71
|
+
Durable architectural guidance that is NOT coupled to current file paths:
|
|
72
|
+
|
|
73
|
+
- What the module should own (responsibilities)
|
|
74
|
+
- What it should hide (implementation details)
|
|
75
|
+
- What it should expose (the interface contract)
|
|
76
|
+
- How callers should migrate to the new interface
|
|
77
|
+
|
|
78
|
+
</issue-template>
|