@vandeepunk/pi-coding-agent 0.0.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 +2564 -0
- package/README.md +555 -0
- package/dist/cli/args.d.ts +47 -0
- package/dist/cli/args.d.ts.map +1 -0
- package/dist/cli/args.js +286 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/config-selector.d.ts +14 -0
- package/dist/cli/config-selector.d.ts.map +1 -0
- package/dist/cli/config-selector.js +31 -0
- package/dist/cli/config-selector.js.map +1 -0
- package/dist/cli/file-processor.d.ts +15 -0
- package/dist/cli/file-processor.d.ts.map +1 -0
- package/dist/cli/file-processor.js +79 -0
- package/dist/cli/file-processor.js.map +1 -0
- package/dist/cli/list-models.d.ts +9 -0
- package/dist/cli/list-models.d.ts.map +1 -0
- package/dist/cli/list-models.js +92 -0
- package/dist/cli/list-models.js.map +1 -0
- package/dist/cli/session-picker.d.ts +9 -0
- package/dist/cli/session-picker.d.ts.map +1 -0
- package/dist/cli/session-picker.js +34 -0
- package/dist/cli/session-picker.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +11 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +68 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +203 -0
- package/dist/config.js.map +1 -0
- package/dist/core/agent-session.d.ts +574 -0
- package/dist/core/agent-session.d.ts.map +1 -0
- package/dist/core/agent-session.js +2260 -0
- package/dist/core/agent-session.js.map +1 -0
- package/dist/core/auth-storage.d.ts +102 -0
- package/dist/core/auth-storage.d.ts.map +1 -0
- package/dist/core/auth-storage.js +282 -0
- package/dist/core/auth-storage.js.map +1 -0
- package/dist/core/bash-executor.d.ts +47 -0
- package/dist/core/bash-executor.d.ts.map +1 -0
- package/dist/core/bash-executor.js +212 -0
- package/dist/core/bash-executor.js.map +1 -0
- package/dist/core/compaction/branch-summarization.d.ts +86 -0
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -0
- package/dist/core/compaction/branch-summarization.js +242 -0
- package/dist/core/compaction/branch-summarization.js.map +1 -0
- package/dist/core/compaction/compaction.d.ts +121 -0
- package/dist/core/compaction/compaction.d.ts.map +1 -0
- package/dist/core/compaction/compaction.js +607 -0
- package/dist/core/compaction/compaction.js.map +1 -0
- package/dist/core/compaction/index.d.ts +7 -0
- package/dist/core/compaction/index.d.ts.map +1 -0
- package/dist/core/compaction/index.js +7 -0
- package/dist/core/compaction/index.js.map +1 -0
- package/dist/core/compaction/utils.d.ts +35 -0
- package/dist/core/compaction/utils.d.ts.map +1 -0
- package/dist/core/compaction/utils.js +138 -0
- package/dist/core/compaction/utils.js.map +1 -0
- package/dist/core/defaults.d.ts +3 -0
- package/dist/core/defaults.d.ts.map +1 -0
- package/dist/core/defaults.js +2 -0
- package/dist/core/defaults.js.map +1 -0
- package/dist/core/diagnostics.d.ts +15 -0
- package/dist/core/diagnostics.d.ts.map +1 -0
- package/dist/core/diagnostics.js +2 -0
- package/dist/core/diagnostics.js.map +1 -0
- package/dist/core/event-bus.d.ts +9 -0
- package/dist/core/event-bus.d.ts.map +1 -0
- package/dist/core/event-bus.js +25 -0
- package/dist/core/event-bus.js.map +1 -0
- package/dist/core/exec.d.ts +29 -0
- package/dist/core/exec.d.ts.map +1 -0
- package/dist/core/exec.js +71 -0
- package/dist/core/exec.js.map +1 -0
- package/dist/core/export-html/ansi-to-html.d.ts +22 -0
- package/dist/core/export-html/ansi-to-html.d.ts.map +1 -0
- package/dist/core/export-html/ansi-to-html.js +249 -0
- package/dist/core/export-html/ansi-to-html.js.map +1 -0
- package/dist/core/export-html/index.d.ts +34 -0
- package/dist/core/export-html/index.d.ts.map +1 -0
- package/dist/core/export-html/index.js +222 -0
- package/dist/core/export-html/index.js.map +1 -0
- package/dist/core/export-html/template.css +909 -0
- package/dist/core/export-html/template.html +54 -0
- package/dist/core/export-html/template.js +1549 -0
- package/dist/core/export-html/tool-renderer.d.ts +35 -0
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -0
- package/dist/core/export-html/tool-renderer.js +57 -0
- package/dist/core/export-html/tool-renderer.js.map +1 -0
- package/dist/core/export-html/vendor/highlight.min.js +1213 -0
- package/dist/core/export-html/vendor/marked.min.js +6 -0
- package/dist/core/extensions/index.d.ts +11 -0
- package/dist/core/extensions/index.d.ts.map +1 -0
- package/dist/core/extensions/index.js +9 -0
- package/dist/core/extensions/index.js.map +1 -0
- package/dist/core/extensions/loader.d.ts +25 -0
- package/dist/core/extensions/loader.d.ts.map +1 -0
- package/dist/core/extensions/loader.js +400 -0
- package/dist/core/extensions/loader.js.map +1 -0
- package/dist/core/extensions/runner.d.ts +129 -0
- package/dist/core/extensions/runner.d.ts.map +1 -0
- package/dist/core/extensions/runner.js +576 -0
- package/dist/core/extensions/runner.js.map +1 -0
- package/dist/core/extensions/types.d.ts +928 -0
- package/dist/core/extensions/types.d.ts.map +1 -0
- package/dist/core/extensions/types.js +35 -0
- package/dist/core/extensions/types.js.map +1 -0
- package/dist/core/extensions/wrapper.d.ts +27 -0
- package/dist/core/extensions/wrapper.d.ts.map +1 -0
- package/dist/core/extensions/wrapper.js +102 -0
- package/dist/core/extensions/wrapper.js.map +1 -0
- package/dist/core/footer-data-provider.d.ts +32 -0
- package/dist/core/footer-data-provider.d.ts.map +1 -0
- package/dist/core/footer-data-provider.js +134 -0
- package/dist/core/footer-data-provider.js.map +1 -0
- package/dist/core/index.d.ts +9 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +9 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/keybindings.d.ts +55 -0
- package/dist/core/keybindings.d.ts.map +1 -0
- package/dist/core/keybindings.js +153 -0
- package/dist/core/keybindings.js.map +1 -0
- package/dist/core/messages.d.ts +77 -0
- package/dist/core/messages.d.ts.map +1 -0
- package/dist/core/messages.js +123 -0
- package/dist/core/messages.js.map +1 -0
- package/dist/core/model-registry.d.ts +100 -0
- package/dist/core/model-registry.d.ts.map +1 -0
- package/dist/core/model-registry.js +419 -0
- package/dist/core/model-registry.js.map +1 -0
- package/dist/core/model-resolver.d.ts +76 -0
- package/dist/core/model-resolver.d.ts.map +1 -0
- package/dist/core/model-resolver.js +313 -0
- package/dist/core/model-resolver.js.map +1 -0
- package/dist/core/package-manager.d.ts +131 -0
- package/dist/core/package-manager.d.ts.map +1 -0
- package/dist/core/package-manager.js +1290 -0
- package/dist/core/package-manager.js.map +1 -0
- package/dist/core/prompt-templates.d.ts +50 -0
- package/dist/core/prompt-templates.d.ts.map +1 -0
- package/dist/core/prompt-templates.js +251 -0
- package/dist/core/prompt-templates.js.map +1 -0
- package/dist/core/resolve-config-value.d.ts +17 -0
- package/dist/core/resolve-config-value.d.ts.map +1 -0
- package/dist/core/resolve-config-value.js +59 -0
- package/dist/core/resolve-config-value.js.map +1 -0
- package/dist/core/resource-loader.d.ts +184 -0
- package/dist/core/resource-loader.d.ts.map +1 -0
- package/dist/core/resource-loader.js +673 -0
- package/dist/core/resource-loader.js.map +1 -0
- package/dist/core/sdk.d.ts +90 -0
- package/dist/core/sdk.d.ts.map +1 -0
- package/dist/core/sdk.js +234 -0
- package/dist/core/sdk.js.map +1 -0
- package/dist/core/session-manager.d.ts +323 -0
- package/dist/core/session-manager.d.ts.map +1 -0
- package/dist/core/session-manager.js +1091 -0
- package/dist/core/session-manager.js.map +1 -0
- package/dist/core/settings-manager.d.ts +187 -0
- package/dist/core/settings-manager.d.ts.map +1 -0
- package/dist/core/settings-manager.js +552 -0
- package/dist/core/settings-manager.js.map +1 -0
- package/dist/core/skills.d.ts +58 -0
- package/dist/core/skills.d.ts.map +1 -0
- package/dist/core/skills.js +310 -0
- package/dist/core/skills.js.map +1 -0
- package/dist/core/slash-commands.d.ts +15 -0
- package/dist/core/slash-commands.d.ts.map +1 -0
- package/dist/core/slash-commands.js +21 -0
- package/dist/core/slash-commands.js.map +1 -0
- package/dist/core/system-prompt.d.ts +24 -0
- package/dist/core/system-prompt.d.ts.map +1 -0
- package/dist/core/system-prompt.js +137 -0
- package/dist/core/system-prompt.js.map +1 -0
- package/dist/core/timings.d.ts +7 -0
- package/dist/core/timings.d.ts.map +1 -0
- package/dist/core/timings.js +25 -0
- package/dist/core/timings.js.map +1 -0
- package/dist/core/tools/bash.d.ts +55 -0
- package/dist/core/tools/bash.d.ts.map +1 -0
- package/dist/core/tools/bash.js +242 -0
- package/dist/core/tools/bash.js.map +1 -0
- package/dist/core/tools/edit-diff.d.ts +63 -0
- package/dist/core/tools/edit-diff.d.ts.map +1 -0
- package/dist/core/tools/edit-diff.js +243 -0
- package/dist/core/tools/edit-diff.js.map +1 -0
- package/dist/core/tools/edit.d.ts +39 -0
- package/dist/core/tools/edit.d.ts.map +1 -0
- package/dist/core/tools/edit.js +146 -0
- package/dist/core/tools/edit.js.map +1 -0
- package/dist/core/tools/find.d.ts +39 -0
- package/dist/core/tools/find.d.ts.map +1 -0
- package/dist/core/tools/find.js +206 -0
- package/dist/core/tools/find.js.map +1 -0
- package/dist/core/tools/grep.d.ts +45 -0
- package/dist/core/tools/grep.d.ts.map +1 -0
- package/dist/core/tools/grep.js +239 -0
- package/dist/core/tools/grep.js.map +1 -0
- package/dist/core/tools/index.d.ts +73 -0
- package/dist/core/tools/index.d.ts.map +1 -0
- package/dist/core/tools/index.js +61 -0
- package/dist/core/tools/index.js.map +1 -0
- package/dist/core/tools/ls.d.ts +40 -0
- package/dist/core/tools/ls.d.ts.map +1 -0
- package/dist/core/tools/ls.js +118 -0
- package/dist/core/tools/ls.js.map +1 -0
- package/dist/core/tools/path-utils.d.ts +8 -0
- package/dist/core/tools/path-utils.d.ts.map +1 -0
- package/dist/core/tools/path-utils.js +81 -0
- package/dist/core/tools/path-utils.js.map +1 -0
- package/dist/core/tools/read.d.ts +39 -0
- package/dist/core/tools/read.d.ts.map +1 -0
- package/dist/core/tools/read.js +166 -0
- package/dist/core/tools/read.js.map +1 -0
- package/dist/core/tools/truncate.d.ts +70 -0
- package/dist/core/tools/truncate.d.ts.map +1 -0
- package/dist/core/tools/truncate.js +205 -0
- package/dist/core/tools/truncate.js.map +1 -0
- package/dist/core/tools/write.d.ts +29 -0
- package/dist/core/tools/write.d.ts.map +1 -0
- package/dist/core/tools/write.js +78 -0
- package/dist/core/tools/write.js.map +1 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +42 -0
- package/dist/index.js.map +1 -0
- package/dist/main.d.ts +8 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +623 -0
- package/dist/main.js.map +1 -0
- package/dist/migrations.d.ts +33 -0
- package/dist/migrations.d.ts.map +1 -0
- package/dist/migrations.js +261 -0
- package/dist/migrations.js.map +1 -0
- package/dist/modes/index.d.ts +9 -0
- package/dist/modes/index.d.ts.map +1 -0
- package/dist/modes/index.js +8 -0
- package/dist/modes/index.js.map +1 -0
- package/dist/modes/interactive/components/armin.d.ts +34 -0
- package/dist/modes/interactive/components/armin.d.ts.map +1 -0
- package/dist/modes/interactive/components/armin.js +333 -0
- package/dist/modes/interactive/components/armin.js.map +1 -0
- package/dist/modes/interactive/components/assistant-message.d.ts +16 -0
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/assistant-message.js +91 -0
- package/dist/modes/interactive/components/assistant-message.js.map +1 -0
- package/dist/modes/interactive/components/bash-execution.d.ts +35 -0
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -0
- package/dist/modes/interactive/components/bash-execution.js +162 -0
- package/dist/modes/interactive/components/bash-execution.js.map +1 -0
- package/dist/modes/interactive/components/bordered-loader.d.ts +16 -0
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -0
- package/dist/modes/interactive/components/bordered-loader.js +51 -0
- package/dist/modes/interactive/components/bordered-loader.js.map +1 -0
- package/dist/modes/interactive/components/branch-summary-message.d.ts +16 -0
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/branch-summary-message.js +44 -0
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -0
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +16 -0
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/compaction-summary-message.js +45 -0
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -0
- package/dist/modes/interactive/components/config-selector.d.ts +71 -0
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/config-selector.js +479 -0
- package/dist/modes/interactive/components/config-selector.js.map +1 -0
- package/dist/modes/interactive/components/countdown-timer.d.ts +14 -0
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -0
- package/dist/modes/interactive/components/countdown-timer.js +33 -0
- package/dist/modes/interactive/components/countdown-timer.js.map +1 -0
- package/dist/modes/interactive/components/custom-editor.d.ts +21 -0
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -0
- package/dist/modes/interactive/components/custom-editor.js +70 -0
- package/dist/modes/interactive/components/custom-editor.js.map +1 -0
- package/dist/modes/interactive/components/custom-message.d.ts +20 -0
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/custom-message.js +79 -0
- package/dist/modes/interactive/components/custom-message.js.map +1 -0
- package/dist/modes/interactive/components/daxnuts.d.ts +23 -0
- package/dist/modes/interactive/components/daxnuts.d.ts.map +1 -0
- package/dist/modes/interactive/components/daxnuts.js +140 -0
- package/dist/modes/interactive/components/daxnuts.js.map +1 -0
- package/dist/modes/interactive/components/diff.d.ts +12 -0
- package/dist/modes/interactive/components/diff.d.ts.map +1 -0
- package/dist/modes/interactive/components/diff.js +133 -0
- package/dist/modes/interactive/components/diff.js.map +1 -0
- package/dist/modes/interactive/components/dynamic-border.d.ts +15 -0
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -0
- package/dist/modes/interactive/components/dynamic-border.js +21 -0
- package/dist/modes/interactive/components/dynamic-border.js.map +1 -0
- package/dist/modes/interactive/components/extension-editor.d.ts +17 -0
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -0
- package/dist/modes/interactive/components/extension-editor.js +102 -0
- package/dist/modes/interactive/components/extension-editor.js.map +1 -0
- package/dist/modes/interactive/components/extension-input.d.ts +23 -0
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -0
- package/dist/modes/interactive/components/extension-input.js +61 -0
- package/dist/modes/interactive/components/extension-input.js.map +1 -0
- package/dist/modes/interactive/components/extension-selector.d.ts +24 -0
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/extension-selector.js +78 -0
- package/dist/modes/interactive/components/extension-selector.js.map +1 -0
- package/dist/modes/interactive/components/footer.d.ts +26 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -0
- package/dist/modes/interactive/components/footer.js +220 -0
- package/dist/modes/interactive/components/footer.js.map +1 -0
- package/dist/modes/interactive/components/index.d.ts +32 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -0
- package/dist/modes/interactive/components/index.js +33 -0
- package/dist/modes/interactive/components/index.js.map +1 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts +41 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -0
- package/dist/modes/interactive/components/keybinding-hints.js +61 -0
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -0
- package/dist/modes/interactive/components/login-dialog.d.ts +42 -0
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -0
- package/dist/modes/interactive/components/login-dialog.js +145 -0
- package/dist/modes/interactive/components/login-dialog.js.map +1 -0
- package/dist/modes/interactive/components/model-selector.d.ts +47 -0
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/model-selector.js +266 -0
- package/dist/modes/interactive/components/model-selector.js.map +1 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts +19 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/oauth-selector.js +97 -0
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +49 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/scoped-models-selector.js +270 -0
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -0
- package/dist/modes/interactive/components/session-selector-search.d.ts +23 -0
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -0
- package/dist/modes/interactive/components/session-selector-search.js +155 -0
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -0
- package/dist/modes/interactive/components/session-selector.d.ts +95 -0
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/session-selector.js +851 -0
- package/dist/modes/interactive/components/session-selector.js.map +1 -0
- package/dist/modes/interactive/components/settings-selector.d.ts +53 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/settings-selector.js +277 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -0
- package/dist/modes/interactive/components/show-images-selector.d.ts +10 -0
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/show-images-selector.js +35 -0
- package/dist/modes/interactive/components/show-images-selector.js.map +1 -0
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +17 -0
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/skill-invocation-message.js +47 -0
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -0
- package/dist/modes/interactive/components/theme-selector.d.ts +11 -0
- package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/theme-selector.js +46 -0
- package/dist/modes/interactive/components/theme-selector.js.map +1 -0
- package/dist/modes/interactive/components/thinking-selector.d.ts +11 -0
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/thinking-selector.js +47 -0
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -0
- package/dist/modes/interactive/components/tool-execution.d.ts +70 -0
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -0
- package/dist/modes/interactive/components/tool-execution.js +621 -0
- package/dist/modes/interactive/components/tool-execution.js.map +1 -0
- package/dist/modes/interactive/components/tree-selector.d.ts +68 -0
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/tree-selector.js +934 -0
- package/dist/modes/interactive/components/tree-selector.js.map +1 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts +30 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/user-message-selector.js +113 -0
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -0
- package/dist/modes/interactive/components/user-message.d.ts +8 -0
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/user-message.js +16 -0
- package/dist/modes/interactive/components/user-message.js.map +1 -0
- package/dist/modes/interactive/components/visual-truncate.d.ts +24 -0
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -0
- package/dist/modes/interactive/components/visual-truncate.js +33 -0
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts +313 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-mode.js +3664 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -0
- package/dist/modes/interactive/theme/dark.json +85 -0
- package/dist/modes/interactive/theme/light.json +84 -0
- package/dist/modes/interactive/theme/theme-schema.json +335 -0
- package/dist/modes/interactive/theme/theme.d.ts +78 -0
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme.js +944 -0
- package/dist/modes/interactive/theme/theme.js.map +1 -0
- package/dist/modes/print-mode.d.ts +28 -0
- package/dist/modes/print-mode.d.ts.map +1 -0
- package/dist/modes/print-mode.js +98 -0
- package/dist/modes/print-mode.js.map +1 -0
- package/dist/modes/rpc/rpc-client.d.ts +217 -0
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-client.js +405 -0
- package/dist/modes/rpc/rpc-client.js.map +1 -0
- package/dist/modes/rpc/rpc-mode.d.ts +20 -0
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-mode.js +500 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -0
- package/dist/modes/rpc/rpc-types.d.ts +409 -0
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-types.js +8 -0
- package/dist/modes/rpc/rpc-types.js.map +1 -0
- package/dist/utils/changelog.d.ts +21 -0
- package/dist/utils/changelog.d.ts.map +1 -0
- package/dist/utils/changelog.js +87 -0
- package/dist/utils/changelog.js.map +1 -0
- package/dist/utils/clipboard-image.d.ts +11 -0
- package/dist/utils/clipboard-image.d.ts.map +1 -0
- package/dist/utils/clipboard-image.js +162 -0
- package/dist/utils/clipboard-image.js.map +1 -0
- package/dist/utils/clipboard-native.d.ts +7 -0
- package/dist/utils/clipboard-native.d.ts.map +1 -0
- package/dist/utils/clipboard-native.js +14 -0
- package/dist/utils/clipboard-native.js.map +1 -0
- package/dist/utils/clipboard.d.ts +2 -0
- package/dist/utils/clipboard.d.ts.map +1 -0
- package/dist/utils/clipboard.js +67 -0
- package/dist/utils/clipboard.js.map +1 -0
- package/dist/utils/frontmatter.d.ts +8 -0
- package/dist/utils/frontmatter.d.ts.map +1 -0
- package/dist/utils/frontmatter.js +26 -0
- package/dist/utils/frontmatter.js.map +1 -0
- package/dist/utils/git.d.ts +2 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +6 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/image-convert.d.ts +9 -0
- package/dist/utils/image-convert.d.ts.map +1 -0
- package/dist/utils/image-convert.js +35 -0
- package/dist/utils/image-convert.js.map +1 -0
- package/dist/utils/image-resize.d.ts +36 -0
- package/dist/utils/image-resize.d.ts.map +1 -0
- package/dist/utils/image-resize.js +181 -0
- package/dist/utils/image-resize.js.map +1 -0
- package/dist/utils/mime.d.ts +2 -0
- package/dist/utils/mime.d.ts.map +1 -0
- package/dist/utils/mime.js +26 -0
- package/dist/utils/mime.js.map +1 -0
- package/dist/utils/photon.d.ts +21 -0
- package/dist/utils/photon.d.ts.map +1 -0
- package/dist/utils/photon.js +121 -0
- package/dist/utils/photon.js.map +1 -0
- package/dist/utils/shell.d.ts +26 -0
- package/dist/utils/shell.d.ts.map +1 -0
- package/dist/utils/shell.js +186 -0
- package/dist/utils/shell.js.map +1 -0
- package/dist/utils/sleep.d.ts +5 -0
- package/dist/utils/sleep.d.ts.map +1 -0
- package/dist/utils/sleep.js +17 -0
- package/dist/utils/sleep.js.map +1 -0
- package/dist/utils/tools-manager.d.ts +3 -0
- package/dist/utils/tools-manager.d.ts.map +1 -0
- package/dist/utils/tools-manager.js +201 -0
- package/dist/utils/tools-manager.js.map +1 -0
- package/docs/compaction.md +390 -0
- package/docs/custom-provider.md +539 -0
- package/docs/development.md +69 -0
- package/docs/extensions.md +1827 -0
- package/docs/images/doom-extension.png +0 -0
- package/docs/images/exy.png +0 -0
- package/docs/images/interactive-mode.png +0 -0
- package/docs/images/tree-view.png +0 -0
- package/docs/json.md +79 -0
- package/docs/keybindings.md +174 -0
- package/docs/models.md +254 -0
- package/docs/packages.md +191 -0
- package/docs/prompt-templates.md +67 -0
- package/docs/providers.md +168 -0
- package/docs/rpc.md +1311 -0
- package/docs/sdk.md +957 -0
- package/docs/session.md +412 -0
- package/docs/settings.md +221 -0
- package/docs/shell-aliases.md +13 -0
- package/docs/skills.md +227 -0
- package/docs/terminal-setup.md +70 -0
- package/docs/termux.md +127 -0
- package/docs/themes.md +295 -0
- package/docs/tree.md +219 -0
- package/docs/tui.md +887 -0
- package/docs/windows.md +17 -0
- package/examples/README.md +25 -0
- package/examples/extensions/README.md +202 -0
- package/examples/extensions/antigravity-image-gen.ts +413 -0
- package/examples/extensions/auto-commit-on-exit.ts +49 -0
- package/examples/extensions/bash-spawn-hook.ts +30 -0
- package/examples/extensions/bookmark.ts +50 -0
- package/examples/extensions/claude-rules.ts +86 -0
- package/examples/extensions/commands.ts +72 -0
- package/examples/extensions/confirm-destructive.ts +59 -0
- package/examples/extensions/custom-compaction.ts +114 -0
- package/examples/extensions/custom-footer.ts +64 -0
- package/examples/extensions/custom-header.ts +73 -0
- package/examples/extensions/custom-provider-anthropic/index.ts +604 -0
- package/examples/extensions/custom-provider-anthropic/package-lock.json +24 -0
- package/examples/extensions/custom-provider-anthropic/package.json +19 -0
- package/examples/extensions/custom-provider-gitlab-duo/index.ts +349 -0
- package/examples/extensions/custom-provider-gitlab-duo/package.json +16 -0
- package/examples/extensions/custom-provider-gitlab-duo/test.ts +82 -0
- package/examples/extensions/custom-provider-qwen-cli/index.ts +345 -0
- package/examples/extensions/custom-provider-qwen-cli/package.json +16 -0
- package/examples/extensions/dirty-repo-guard.ts +56 -0
- package/examples/extensions/doom-overlay/README.md +46 -0
- package/examples/extensions/doom-overlay/doom/build/doom.js +21 -0
- package/examples/extensions/doom-overlay/doom/build/doom.wasm +0 -0
- package/examples/extensions/doom-overlay/doom/build.sh +152 -0
- package/examples/extensions/doom-overlay/doom/doomgeneric_pi.c +72 -0
- package/examples/extensions/doom-overlay/doom-component.ts +132 -0
- package/examples/extensions/doom-overlay/doom-engine.ts +173 -0
- package/examples/extensions/doom-overlay/doom-keys.ts +104 -0
- package/examples/extensions/doom-overlay/index.ts +74 -0
- package/examples/extensions/doom-overlay/wad-finder.ts +51 -0
- package/examples/extensions/dynamic-resources/SKILL.md +8 -0
- package/examples/extensions/dynamic-resources/dynamic.json +79 -0
- package/examples/extensions/dynamic-resources/dynamic.md +5 -0
- package/examples/extensions/dynamic-resources/index.ts +15 -0
- package/examples/extensions/event-bus.ts +43 -0
- package/examples/extensions/file-trigger.ts +41 -0
- package/examples/extensions/git-checkpoint.ts +53 -0
- package/examples/extensions/handoff.ts +150 -0
- package/examples/extensions/hello.ts +25 -0
- package/examples/extensions/inline-bash.ts +94 -0
- package/examples/extensions/input-transform.ts +43 -0
- package/examples/extensions/interactive-shell.ts +196 -0
- package/examples/extensions/mac-system-theme.ts +47 -0
- package/examples/extensions/message-renderer.ts +59 -0
- package/examples/extensions/minimal-mode.ts +426 -0
- package/examples/extensions/modal-editor.ts +85 -0
- package/examples/extensions/model-status.ts +31 -0
- package/examples/extensions/notify.ts +55 -0
- package/examples/extensions/overlay-qa-tests.ts +881 -0
- package/examples/extensions/overlay-test.ts +150 -0
- package/examples/extensions/permission-gate.ts +34 -0
- package/examples/extensions/pirate.ts +47 -0
- package/examples/extensions/plan-mode/README.md +65 -0
- package/examples/extensions/plan-mode/index.ts +340 -0
- package/examples/extensions/plan-mode/utils.ts +168 -0
- package/examples/extensions/preset.ts +398 -0
- package/examples/extensions/protected-paths.ts +30 -0
- package/examples/extensions/qna.ts +119 -0
- package/examples/extensions/question.ts +264 -0
- package/examples/extensions/questionnaire.ts +427 -0
- package/examples/extensions/rainbow-editor.ts +88 -0
- package/examples/extensions/rpc-demo.ts +124 -0
- package/examples/extensions/sandbox/index.ts +318 -0
- package/examples/extensions/sandbox/package-lock.json +92 -0
- package/examples/extensions/sandbox/package.json +19 -0
- package/examples/extensions/send-user-message.ts +97 -0
- package/examples/extensions/session-name.ts +27 -0
- package/examples/extensions/shutdown-command.ts +63 -0
- package/examples/extensions/snake.ts +343 -0
- package/examples/extensions/space-invaders.ts +560 -0
- package/examples/extensions/ssh.ts +220 -0
- package/examples/extensions/status-line.ts +40 -0
- package/examples/extensions/subagent/README.md +172 -0
- package/examples/extensions/subagent/agents/planner.md +37 -0
- package/examples/extensions/subagent/agents/reviewer.md +35 -0
- package/examples/extensions/subagent/agents/scout.md +50 -0
- package/examples/extensions/subagent/agents/worker.md +24 -0
- package/examples/extensions/subagent/agents.ts +127 -0
- package/examples/extensions/subagent/index.ts +963 -0
- package/examples/extensions/subagent/prompts/implement-and-review.md +10 -0
- package/examples/extensions/subagent/prompts/implement.md +10 -0
- package/examples/extensions/subagent/prompts/scout-and-plan.md +9 -0
- package/examples/extensions/summarize.ts +195 -0
- package/examples/extensions/system-prompt-header.ts +17 -0
- package/examples/extensions/timed-confirm.ts +70 -0
- package/examples/extensions/titlebar-spinner.ts +58 -0
- package/examples/extensions/todo.ts +299 -0
- package/examples/extensions/tool-override.ts +143 -0
- package/examples/extensions/tools.ts +146 -0
- package/examples/extensions/trigger-compact.ts +40 -0
- package/examples/extensions/truncated-tool.ts +192 -0
- package/examples/extensions/widget-placement.ts +17 -0
- package/examples/extensions/with-deps/index.ts +36 -0
- package/examples/extensions/with-deps/package-lock.json +31 -0
- package/examples/extensions/with-deps/package.json +22 -0
- package/examples/rpc-extension-ui.ts +632 -0
- package/examples/sdk/01-minimal.ts +22 -0
- package/examples/sdk/02-custom-model.ts +49 -0
- package/examples/sdk/03-custom-prompt.ts +55 -0
- package/examples/sdk/04-skills.ts +46 -0
- package/examples/sdk/05-tools.ts +56 -0
- package/examples/sdk/06-extensions.ts +88 -0
- package/examples/sdk/07-context-files.ts +40 -0
- package/examples/sdk/08-prompt-templates.ts +47 -0
- package/examples/sdk/09-api-keys-and-oauth.ts +48 -0
- package/examples/sdk/10-settings.ts +38 -0
- package/examples/sdk/11-sessions.ts +48 -0
- package/examples/sdk/12-full-control.ts +82 -0
- package/examples/sdk/README.md +144 -0
- package/package.json +97 -0
package/docs/skills.md
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
> pi can create skills. Ask it to build one for your use case.
|
|
2
|
+
|
|
3
|
+
# Skills
|
|
4
|
+
|
|
5
|
+
Skills are self-contained capability packages that the agent loads on-demand. A skill provides specialized workflows, setup instructions, helper scripts, and reference documentation for specific tasks.
|
|
6
|
+
|
|
7
|
+
Pi implements the [Agent Skills standard](https://agentskills.io/specification), warning about violations but remaining lenient.
|
|
8
|
+
|
|
9
|
+
## Table of Contents
|
|
10
|
+
|
|
11
|
+
- [Locations](#locations)
|
|
12
|
+
- [How Skills Work](#how-skills-work)
|
|
13
|
+
- [Skill Commands](#skill-commands)
|
|
14
|
+
- [Skill Structure](#skill-structure)
|
|
15
|
+
- [Frontmatter](#frontmatter)
|
|
16
|
+
- [Validation](#validation)
|
|
17
|
+
- [Example](#example)
|
|
18
|
+
- [Skill Repositories](#skill-repositories)
|
|
19
|
+
|
|
20
|
+
## Locations
|
|
21
|
+
|
|
22
|
+
> **Security:** Skills can instruct the model to perform any action and may include executable code the model invokes. Review skill content before use.
|
|
23
|
+
|
|
24
|
+
Pi loads skills from:
|
|
25
|
+
|
|
26
|
+
- Global: `~/.pi/agent/skills/`
|
|
27
|
+
- Project: `.pi/skills/`
|
|
28
|
+
- Packages: `skills/` directories or `pi.skills` entries in `package.json`
|
|
29
|
+
- Settings: `skills` array with files or directories
|
|
30
|
+
- CLI: `--skill <path>` (repeatable, additive even with `--no-skills`)
|
|
31
|
+
|
|
32
|
+
Discovery rules:
|
|
33
|
+
- Direct `.md` files in the skills directory root
|
|
34
|
+
- Recursive `SKILL.md` files under subdirectories
|
|
35
|
+
|
|
36
|
+
Disable discovery with `--no-skills` (explicit `--skill` paths still load).
|
|
37
|
+
|
|
38
|
+
### Using Skills from Other Harnesses
|
|
39
|
+
|
|
40
|
+
To use skills from Claude Code or OpenAI Codex, add their directories to settings:
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"skills": [
|
|
45
|
+
"~/.claude/skills",
|
|
46
|
+
"~/.codex/skills"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
For project-level Claude Code skills, add to `.pi/settings.json`:
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"skills": ["../.claude/skills"]
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## How Skills Work
|
|
60
|
+
|
|
61
|
+
1. At startup, pi scans skill locations and extracts names and descriptions
|
|
62
|
+
2. The system prompt includes available skills in XML format per the [specification](https://agentskills.io/integrate-skills)
|
|
63
|
+
3. When a task matches, the agent uses `read` to load the full SKILL.md (models don't always do this; use prompting or `/skill:name` to force it)
|
|
64
|
+
4. The agent follows the instructions, using relative paths to reference scripts and assets
|
|
65
|
+
|
|
66
|
+
This is progressive disclosure: only descriptions are always in context, full instructions load on-demand.
|
|
67
|
+
|
|
68
|
+
## Skill Commands
|
|
69
|
+
|
|
70
|
+
Skills register as `/skill:name` commands:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
/skill:brave-search # Load and execute the skill
|
|
74
|
+
/skill:pdf-tools extract # Load skill with arguments
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Arguments after the command are appended to the skill content as `User: <args>`.
|
|
78
|
+
|
|
79
|
+
Toggle skill commands via `/settings` in interactive mode or in `settings.json`:
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
{
|
|
83
|
+
"enableSkillCommands": true
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Skill Structure
|
|
88
|
+
|
|
89
|
+
A skill is a directory with a `SKILL.md` file. Everything else is freeform.
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
my-skill/
|
|
93
|
+
├── SKILL.md # Required: frontmatter + instructions
|
|
94
|
+
├── scripts/ # Helper scripts
|
|
95
|
+
│ └── process.sh
|
|
96
|
+
├── references/ # Detailed docs loaded on-demand
|
|
97
|
+
│ └── api-reference.md
|
|
98
|
+
└── assets/
|
|
99
|
+
└── template.json
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### SKILL.md Format
|
|
103
|
+
|
|
104
|
+
```markdown
|
|
105
|
+
---
|
|
106
|
+
name: my-skill
|
|
107
|
+
description: What this skill does and when to use it. Be specific.
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
# My Skill
|
|
111
|
+
|
|
112
|
+
## Setup
|
|
113
|
+
|
|
114
|
+
Run once before first use:
|
|
115
|
+
\`\`\`bash
|
|
116
|
+
cd /path/to/skill && npm install
|
|
117
|
+
\`\`\`
|
|
118
|
+
|
|
119
|
+
## Usage
|
|
120
|
+
|
|
121
|
+
\`\`\`bash
|
|
122
|
+
./scripts/process.sh <input>
|
|
123
|
+
\`\`\`
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Use relative paths from the skill directory:
|
|
127
|
+
|
|
128
|
+
```markdown
|
|
129
|
+
See [the reference guide](references/REFERENCE.md) for details.
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Frontmatter
|
|
133
|
+
|
|
134
|
+
Per the [Agent Skills specification](https://agentskills.io/specification#frontmatter-required):
|
|
135
|
+
|
|
136
|
+
| Field | Required | Description |
|
|
137
|
+
|-------|----------|-------------|
|
|
138
|
+
| `name` | Yes | Max 64 chars. Lowercase a-z, 0-9, hyphens. Must match parent directory. |
|
|
139
|
+
| `description` | Yes | Max 1024 chars. What the skill does and when to use it. |
|
|
140
|
+
| `license` | No | License name or reference to bundled file. |
|
|
141
|
+
| `compatibility` | No | Max 500 chars. Environment requirements. |
|
|
142
|
+
| `metadata` | No | Arbitrary key-value mapping. |
|
|
143
|
+
| `allowed-tools` | No | Space-delimited list of pre-approved tools (experimental). |
|
|
144
|
+
| `disable-model-invocation` | No | When `true`, skill is hidden from system prompt. Users must use `/skill:name`. |
|
|
145
|
+
|
|
146
|
+
### Name Rules
|
|
147
|
+
|
|
148
|
+
- 1-64 characters
|
|
149
|
+
- Lowercase letters, numbers, hyphens only
|
|
150
|
+
- No leading/trailing hyphens
|
|
151
|
+
- No consecutive hyphens
|
|
152
|
+
- Must match parent directory name
|
|
153
|
+
|
|
154
|
+
Valid: `pdf-processing`, `data-analysis`, `code-review`
|
|
155
|
+
Invalid: `PDF-Processing`, `-pdf`, `pdf--processing`
|
|
156
|
+
|
|
157
|
+
### Description Best Practices
|
|
158
|
+
|
|
159
|
+
The description determines when the agent loads the skill. Be specific.
|
|
160
|
+
|
|
161
|
+
Good:
|
|
162
|
+
```yaml
|
|
163
|
+
description: Extracts text and tables from PDF files, fills PDF forms, and merges multiple PDFs. Use when working with PDF documents.
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Poor:
|
|
167
|
+
```yaml
|
|
168
|
+
description: Helps with PDFs.
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## Validation
|
|
172
|
+
|
|
173
|
+
Pi validates skills against the Agent Skills standard. Most issues produce warnings but still load the skill:
|
|
174
|
+
|
|
175
|
+
- Name doesn't match parent directory
|
|
176
|
+
- Name exceeds 64 characters or contains invalid characters
|
|
177
|
+
- Name starts/ends with hyphen or has consecutive hyphens
|
|
178
|
+
- Description exceeds 1024 characters
|
|
179
|
+
|
|
180
|
+
Unknown frontmatter fields are ignored.
|
|
181
|
+
|
|
182
|
+
**Exception:** Skills with missing description are not loaded.
|
|
183
|
+
|
|
184
|
+
Name collisions (same name from different locations) warn and keep the first skill found.
|
|
185
|
+
|
|
186
|
+
## Example
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
brave-search/
|
|
190
|
+
├── SKILL.md
|
|
191
|
+
├── search.js
|
|
192
|
+
└── content.js
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
**SKILL.md:**
|
|
196
|
+
```markdown
|
|
197
|
+
---
|
|
198
|
+
name: brave-search
|
|
199
|
+
description: Web search and content extraction via Brave Search API. Use for searching documentation, facts, or any web content.
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
# Brave Search
|
|
203
|
+
|
|
204
|
+
## Setup
|
|
205
|
+
|
|
206
|
+
\`\`\`bash
|
|
207
|
+
cd /path/to/brave-search && npm install
|
|
208
|
+
\`\`\`
|
|
209
|
+
|
|
210
|
+
## Search
|
|
211
|
+
|
|
212
|
+
\`\`\`bash
|
|
213
|
+
./search.js "query" # Basic search
|
|
214
|
+
./search.js "query" --content # Include page content
|
|
215
|
+
\`\`\`
|
|
216
|
+
|
|
217
|
+
## Extract Page Content
|
|
218
|
+
|
|
219
|
+
\`\`\`bash
|
|
220
|
+
./content.js https://example.com
|
|
221
|
+
\`\`\`
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
## Skill Repositories
|
|
225
|
+
|
|
226
|
+
- [Anthropic Skills](https://github.com/anthropics/skills) - Document processing (docx, pdf, pptx, xlsx), web development
|
|
227
|
+
- [Pi Skills](https://github.com/badlogic/pi-skills) - Web search, browser automation, Google APIs, transcription
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Terminal Setup
|
|
2
|
+
|
|
3
|
+
Pi uses the [Kitty keyboard protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol/) for reliable modifier key detection. Most modern terminals support this protocol, but some require configuration.
|
|
4
|
+
|
|
5
|
+
## Kitty, iTerm2
|
|
6
|
+
|
|
7
|
+
Work out of the box.
|
|
8
|
+
|
|
9
|
+
## Ghostty
|
|
10
|
+
|
|
11
|
+
Add to your Ghostty config (`~/.config/ghostty/config`):
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
keybind = alt+backspace=text:\x1b\x7f
|
|
15
|
+
keybind = shift+enter=text:\n
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## WezTerm
|
|
19
|
+
|
|
20
|
+
Create `~/.wezterm.lua`:
|
|
21
|
+
|
|
22
|
+
```lua
|
|
23
|
+
local wezterm = require 'wezterm'
|
|
24
|
+
local config = wezterm.config_builder()
|
|
25
|
+
config.enable_kitty_keyboard = true
|
|
26
|
+
return config
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## VS Code (Integrated Terminal)
|
|
30
|
+
|
|
31
|
+
`keybindings.json` locations:
|
|
32
|
+
- macOS: `~/Library/Application Support/Code/User/keybindings.json`
|
|
33
|
+
- Linux: `~/.config/Code/User/keybindings.json`
|
|
34
|
+
- Windows: `%APPDATA%\\Code\\User\\keybindings.json`
|
|
35
|
+
|
|
36
|
+
Add to `keybindings.json` to enable `Shift+Enter` for multi-line input:
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"key": "shift+enter",
|
|
41
|
+
"command": "workbench.action.terminal.sendSequence",
|
|
42
|
+
"args": { "text": "\u001b[13;2u" },
|
|
43
|
+
"when": "terminalFocus"
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Windows Terminal
|
|
48
|
+
|
|
49
|
+
Add to `settings.json` (Ctrl+Shift+, or Settings → Open JSON file):
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"actions": [
|
|
54
|
+
{
|
|
55
|
+
"command": { "action": "sendInput", "input": "\u001b[13;2u" },
|
|
56
|
+
"keys": "shift+enter"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
If you already have an `actions` array, add the object to it.
|
|
63
|
+
|
|
64
|
+
## IntelliJ IDEA (Integrated Terminal)
|
|
65
|
+
|
|
66
|
+
The built-in terminal has limited escape sequence support. Shift+Enter cannot be distinguished from Enter in IntelliJ's terminal.
|
|
67
|
+
|
|
68
|
+
If you want the hardware cursor visible, set `PI_HARDWARE_CURSOR=1` before running pi (disabled by default for compatibility).
|
|
69
|
+
|
|
70
|
+
Consider using a dedicated terminal emulator for the best experience.
|
package/docs/termux.md
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Termux (Android) Setup
|
|
2
|
+
|
|
3
|
+
Pi runs on Android via [Termux](https://termux.dev/), a terminal emulator and Linux environment for Android.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
1. Install [Termux](https://github.com/termux/termux-app#installation) from GitHub or F-Droid (not Google Play, that version is deprecated)
|
|
8
|
+
2. Install [Termux:API](https://github.com/termux/termux-api#installation) from GitHub or F-Droid for clipboard and other device integrations
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# Update packages
|
|
14
|
+
pkg update && pkg upgrade
|
|
15
|
+
|
|
16
|
+
# Install dependencies
|
|
17
|
+
pkg install nodejs termux-api git
|
|
18
|
+
|
|
19
|
+
# Install pi
|
|
20
|
+
npm install -g @mariozechner/pi-coding-agent
|
|
21
|
+
|
|
22
|
+
# Create config directory
|
|
23
|
+
mkdir -p ~/.pi/agent
|
|
24
|
+
|
|
25
|
+
# Run pi
|
|
26
|
+
pi
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Clipboard Support
|
|
30
|
+
|
|
31
|
+
Clipboard operations use `termux-clipboard-set` and `termux-clipboard-get` when running in Termux. The Termux:API app must be installed for these to work.
|
|
32
|
+
|
|
33
|
+
Image clipboard is not supported on Termux (the `ctrl+v` image paste feature will not work).
|
|
34
|
+
|
|
35
|
+
## Example AGENTS.md for Termux
|
|
36
|
+
|
|
37
|
+
Create `~/.pi/agent/AGENTS.md` to help the agent understand the Termux environment:
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
40
|
+
# Agent Environment: Termux on Android
|
|
41
|
+
|
|
42
|
+
## Location
|
|
43
|
+
- **OS**: Android (Termux terminal emulator)
|
|
44
|
+
- **Home**: `/data/data/com.termux/files/home`
|
|
45
|
+
- **Prefix**: `/data/data/com.termux/files/usr`
|
|
46
|
+
- **Shared storage**: `/storage/emulated/0` (Downloads, Documents, etc.)
|
|
47
|
+
|
|
48
|
+
## Opening URLs
|
|
49
|
+
```bash
|
|
50
|
+
termux-open-url "https://example.com"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Opening Files
|
|
54
|
+
```bash
|
|
55
|
+
termux-open file.pdf # Opens with default app
|
|
56
|
+
termux-open -c image.jpg # Choose app
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Clipboard
|
|
60
|
+
```bash
|
|
61
|
+
termux-clipboard-set "text" # Copy
|
|
62
|
+
termux-clipboard-get # Paste
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Notifications
|
|
66
|
+
```bash
|
|
67
|
+
termux-notification -t "Title" -c "Content"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Device Info
|
|
71
|
+
```bash
|
|
72
|
+
termux-battery-status # Battery info
|
|
73
|
+
termux-wifi-connectioninfo # WiFi info
|
|
74
|
+
termux-telephony-deviceinfo # Device info
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Sharing
|
|
78
|
+
```bash
|
|
79
|
+
termux-share -a send file.txt # Share file
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Other Useful Commands
|
|
83
|
+
```bash
|
|
84
|
+
termux-toast "message" # Quick toast popup
|
|
85
|
+
termux-vibrate # Vibrate device
|
|
86
|
+
termux-tts-speak "hello" # Text to speech
|
|
87
|
+
termux-camera-photo out.jpg # Take photo
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Notes
|
|
91
|
+
- Termux:API app must be installed for `termux-*` commands
|
|
92
|
+
- Use `pkg install termux-api` for the command-line tools
|
|
93
|
+
- Storage permission needed for `/storage/emulated/0` access
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Limitations
|
|
97
|
+
|
|
98
|
+
- **No image clipboard**: Termux clipboard API only supports text
|
|
99
|
+
- **No native binaries**: Some optional native dependencies (like the clipboard module) are unavailable on Android ARM64 and are skipped during installation
|
|
100
|
+
- **Storage access**: To access files in `/storage/emulated/0` (Downloads, etc.), run `termux-setup-storage` once to grant permissions
|
|
101
|
+
|
|
102
|
+
## Troubleshooting
|
|
103
|
+
|
|
104
|
+
### Clipboard not working
|
|
105
|
+
|
|
106
|
+
Ensure both apps are installed:
|
|
107
|
+
1. Termux (from GitHub or F-Droid)
|
|
108
|
+
2. Termux:API (from GitHub or F-Droid)
|
|
109
|
+
|
|
110
|
+
Then install the CLI tools:
|
|
111
|
+
```bash
|
|
112
|
+
pkg install termux-api
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Permission denied for shared storage
|
|
116
|
+
|
|
117
|
+
Run once to grant storage permissions:
|
|
118
|
+
```bash
|
|
119
|
+
termux-setup-storage
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Node.js installation issues
|
|
123
|
+
|
|
124
|
+
If npm fails, try clearing the cache:
|
|
125
|
+
```bash
|
|
126
|
+
npm cache clean --force
|
|
127
|
+
```
|
package/docs/themes.md
ADDED
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
> pi can create themes. Ask it to build one for your setup.
|
|
2
|
+
|
|
3
|
+
# Themes
|
|
4
|
+
|
|
5
|
+
Themes are JSON files that define colors for the TUI.
|
|
6
|
+
|
|
7
|
+
## Table of Contents
|
|
8
|
+
|
|
9
|
+
- [Locations](#locations)
|
|
10
|
+
- [Selecting a Theme](#selecting-a-theme)
|
|
11
|
+
- [Creating a Custom Theme](#creating-a-custom-theme)
|
|
12
|
+
- [Theme Format](#theme-format)
|
|
13
|
+
- [Color Tokens](#color-tokens)
|
|
14
|
+
- [Color Values](#color-values)
|
|
15
|
+
- [Tips](#tips)
|
|
16
|
+
|
|
17
|
+
## Locations
|
|
18
|
+
|
|
19
|
+
Pi loads themes from:
|
|
20
|
+
|
|
21
|
+
- Built-in: `dark`, `light`
|
|
22
|
+
- Global: `~/.pi/agent/themes/*.json`
|
|
23
|
+
- Project: `.pi/themes/*.json`
|
|
24
|
+
- Packages: `themes/` directories or `pi.themes` entries in `package.json`
|
|
25
|
+
- Settings: `themes` array with files or directories
|
|
26
|
+
- CLI: `--theme <path>` (repeatable)
|
|
27
|
+
|
|
28
|
+
Disable discovery with `--no-themes`.
|
|
29
|
+
|
|
30
|
+
## Selecting a Theme
|
|
31
|
+
|
|
32
|
+
Select a theme via `/settings` or in `settings.json`:
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"theme": "my-theme"
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
On first run, pi detects your terminal background and defaults to `dark` or `light`.
|
|
41
|
+
|
|
42
|
+
## Creating a Custom Theme
|
|
43
|
+
|
|
44
|
+
1. Create a theme file:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
mkdir -p ~/.pi/agent/themes
|
|
48
|
+
vim ~/.pi/agent/themes/my-theme.json
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
2. Define the theme with all required colors (see [Color Tokens](#color-tokens)):
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"$schema": "https://raw.githubusercontent.com/badlogic/pi-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
56
|
+
"name": "my-theme",
|
|
57
|
+
"vars": {
|
|
58
|
+
"primary": "#00aaff",
|
|
59
|
+
"secondary": 242
|
|
60
|
+
},
|
|
61
|
+
"colors": {
|
|
62
|
+
"accent": "primary",
|
|
63
|
+
"border": "primary",
|
|
64
|
+
"borderAccent": "#00ffff",
|
|
65
|
+
"borderMuted": "secondary",
|
|
66
|
+
"success": "#00ff00",
|
|
67
|
+
"error": "#ff0000",
|
|
68
|
+
"warning": "#ffff00",
|
|
69
|
+
"muted": "secondary",
|
|
70
|
+
"dim": 240,
|
|
71
|
+
"text": "",
|
|
72
|
+
"thinkingText": "secondary",
|
|
73
|
+
"selectedBg": "#2d2d30",
|
|
74
|
+
"userMessageBg": "#2d2d30",
|
|
75
|
+
"userMessageText": "",
|
|
76
|
+
"customMessageBg": "#2d2d30",
|
|
77
|
+
"customMessageText": "",
|
|
78
|
+
"customMessageLabel": "primary",
|
|
79
|
+
"toolPendingBg": "#1e1e2e",
|
|
80
|
+
"toolSuccessBg": "#1e2e1e",
|
|
81
|
+
"toolErrorBg": "#2e1e1e",
|
|
82
|
+
"toolTitle": "primary",
|
|
83
|
+
"toolOutput": "",
|
|
84
|
+
"mdHeading": "#ffaa00",
|
|
85
|
+
"mdLink": "primary",
|
|
86
|
+
"mdLinkUrl": "secondary",
|
|
87
|
+
"mdCode": "#00ffff",
|
|
88
|
+
"mdCodeBlock": "",
|
|
89
|
+
"mdCodeBlockBorder": "secondary",
|
|
90
|
+
"mdQuote": "secondary",
|
|
91
|
+
"mdQuoteBorder": "secondary",
|
|
92
|
+
"mdHr": "secondary",
|
|
93
|
+
"mdListBullet": "#00ffff",
|
|
94
|
+
"toolDiffAdded": "#00ff00",
|
|
95
|
+
"toolDiffRemoved": "#ff0000",
|
|
96
|
+
"toolDiffContext": "secondary",
|
|
97
|
+
"syntaxComment": "secondary",
|
|
98
|
+
"syntaxKeyword": "primary",
|
|
99
|
+
"syntaxFunction": "#00aaff",
|
|
100
|
+
"syntaxVariable": "#ffaa00",
|
|
101
|
+
"syntaxString": "#00ff00",
|
|
102
|
+
"syntaxNumber": "#ff00ff",
|
|
103
|
+
"syntaxType": "#00aaff",
|
|
104
|
+
"syntaxOperator": "primary",
|
|
105
|
+
"syntaxPunctuation": "secondary",
|
|
106
|
+
"thinkingOff": "secondary",
|
|
107
|
+
"thinkingMinimal": "primary",
|
|
108
|
+
"thinkingLow": "#00aaff",
|
|
109
|
+
"thinkingMedium": "#00ffff",
|
|
110
|
+
"thinkingHigh": "#ff00ff",
|
|
111
|
+
"thinkingXhigh": "#ff0000",
|
|
112
|
+
"bashMode": "#ffaa00"
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
3. Select the theme via `/settings`.
|
|
118
|
+
|
|
119
|
+
**Hot reload:** When you edit the currently active custom theme file, pi reloads it automatically for immediate visual feedback.
|
|
120
|
+
|
|
121
|
+
## Theme Format
|
|
122
|
+
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"$schema": "https://raw.githubusercontent.com/badlogic/pi-mono/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
126
|
+
"name": "my-theme",
|
|
127
|
+
"vars": {
|
|
128
|
+
"blue": "#0066cc",
|
|
129
|
+
"gray": 242
|
|
130
|
+
},
|
|
131
|
+
"colors": {
|
|
132
|
+
"accent": "blue",
|
|
133
|
+
"muted": "gray",
|
|
134
|
+
"text": "",
|
|
135
|
+
...
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
- `name` is required and must be unique.
|
|
141
|
+
- `vars` is optional. Define reusable colors here, then reference them in `colors`.
|
|
142
|
+
- `colors` must define all 51 required tokens.
|
|
143
|
+
|
|
144
|
+
The `$schema` field enables editor auto-completion and validation.
|
|
145
|
+
|
|
146
|
+
## Color Tokens
|
|
147
|
+
|
|
148
|
+
Every theme must define all 51 color tokens. There are no optional colors.
|
|
149
|
+
|
|
150
|
+
### Core UI (11 colors)
|
|
151
|
+
|
|
152
|
+
| Token | Purpose |
|
|
153
|
+
|-------|---------|
|
|
154
|
+
| `accent` | Primary accent (logo, selected items, cursor) |
|
|
155
|
+
| `border` | Normal borders |
|
|
156
|
+
| `borderAccent` | Highlighted borders |
|
|
157
|
+
| `borderMuted` | Subtle borders (editor) |
|
|
158
|
+
| `success` | Success states |
|
|
159
|
+
| `error` | Error states |
|
|
160
|
+
| `warning` | Warning states |
|
|
161
|
+
| `muted` | Secondary text |
|
|
162
|
+
| `dim` | Tertiary text |
|
|
163
|
+
| `text` | Default text (usually `""`) |
|
|
164
|
+
| `thinkingText` | Thinking block text |
|
|
165
|
+
|
|
166
|
+
### Backgrounds & Content (11 colors)
|
|
167
|
+
|
|
168
|
+
| Token | Purpose |
|
|
169
|
+
|-------|---------|
|
|
170
|
+
| `selectedBg` | Selected line background |
|
|
171
|
+
| `userMessageBg` | User message background |
|
|
172
|
+
| `userMessageText` | User message text |
|
|
173
|
+
| `customMessageBg` | Extension message background |
|
|
174
|
+
| `customMessageText` | Extension message text |
|
|
175
|
+
| `customMessageLabel` | Extension message label |
|
|
176
|
+
| `toolPendingBg` | Tool box (pending) |
|
|
177
|
+
| `toolSuccessBg` | Tool box (success) |
|
|
178
|
+
| `toolErrorBg` | Tool box (error) |
|
|
179
|
+
| `toolTitle` | Tool title |
|
|
180
|
+
| `toolOutput` | Tool output text |
|
|
181
|
+
|
|
182
|
+
### Markdown (10 colors)
|
|
183
|
+
|
|
184
|
+
| Token | Purpose |
|
|
185
|
+
|-------|---------|
|
|
186
|
+
| `mdHeading` | Headings |
|
|
187
|
+
| `mdLink` | Link text |
|
|
188
|
+
| `mdLinkUrl` | Link URL |
|
|
189
|
+
| `mdCode` | Inline code |
|
|
190
|
+
| `mdCodeBlock` | Code block content |
|
|
191
|
+
| `mdCodeBlockBorder` | Code block fences |
|
|
192
|
+
| `mdQuote` | Blockquote text |
|
|
193
|
+
| `mdQuoteBorder` | Blockquote border |
|
|
194
|
+
| `mdHr` | Horizontal rule |
|
|
195
|
+
| `mdListBullet` | List bullets |
|
|
196
|
+
|
|
197
|
+
### Tool Diffs (3 colors)
|
|
198
|
+
|
|
199
|
+
| Token | Purpose |
|
|
200
|
+
|-------|---------|
|
|
201
|
+
| `toolDiffAdded` | Added lines |
|
|
202
|
+
| `toolDiffRemoved` | Removed lines |
|
|
203
|
+
| `toolDiffContext` | Context lines |
|
|
204
|
+
|
|
205
|
+
### Syntax Highlighting (9 colors)
|
|
206
|
+
|
|
207
|
+
| Token | Purpose |
|
|
208
|
+
|-------|---------|
|
|
209
|
+
| `syntaxComment` | Comments |
|
|
210
|
+
| `syntaxKeyword` | Keywords |
|
|
211
|
+
| `syntaxFunction` | Function names |
|
|
212
|
+
| `syntaxVariable` | Variables |
|
|
213
|
+
| `syntaxString` | Strings |
|
|
214
|
+
| `syntaxNumber` | Numbers |
|
|
215
|
+
| `syntaxType` | Types |
|
|
216
|
+
| `syntaxOperator` | Operators |
|
|
217
|
+
| `syntaxPunctuation` | Punctuation |
|
|
218
|
+
|
|
219
|
+
### Thinking Level Borders (6 colors)
|
|
220
|
+
|
|
221
|
+
Editor border colors indicating thinking level (visual hierarchy from subtle to prominent):
|
|
222
|
+
|
|
223
|
+
| Token | Purpose |
|
|
224
|
+
|-------|---------|
|
|
225
|
+
| `thinkingOff` | Thinking off |
|
|
226
|
+
| `thinkingMinimal` | Minimal thinking |
|
|
227
|
+
| `thinkingLow` | Low thinking |
|
|
228
|
+
| `thinkingMedium` | Medium thinking |
|
|
229
|
+
| `thinkingHigh` | High thinking |
|
|
230
|
+
| `thinkingXhigh` | Extra high thinking |
|
|
231
|
+
|
|
232
|
+
### Bash Mode (1 color)
|
|
233
|
+
|
|
234
|
+
| Token | Purpose |
|
|
235
|
+
|-------|---------|
|
|
236
|
+
| `bashMode` | Editor border in bash mode (`!` prefix) |
|
|
237
|
+
|
|
238
|
+
### HTML Export (optional)
|
|
239
|
+
|
|
240
|
+
The `export` section controls colors for `/export` HTML output. If omitted, colors are derived from `userMessageBg`.
|
|
241
|
+
|
|
242
|
+
```json
|
|
243
|
+
{
|
|
244
|
+
"export": {
|
|
245
|
+
"pageBg": "#18181e",
|
|
246
|
+
"cardBg": "#1e1e24",
|
|
247
|
+
"infoBg": "#3c3728"
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
## Color Values
|
|
253
|
+
|
|
254
|
+
Four formats are supported:
|
|
255
|
+
|
|
256
|
+
| Format | Example | Description |
|
|
257
|
+
|--------|---------|-------------|
|
|
258
|
+
| Hex | `"#ff0000"` | 6-digit hex RGB |
|
|
259
|
+
| 256-color | `39` | xterm 256-color palette index (0-255) |
|
|
260
|
+
| Variable | `"primary"` | Reference to a `vars` entry |
|
|
261
|
+
| Default | `""` | Terminal's default color |
|
|
262
|
+
|
|
263
|
+
### 256-Color Palette
|
|
264
|
+
|
|
265
|
+
- `0-15`: Basic ANSI colors (terminal-dependent)
|
|
266
|
+
- `16-231`: 6×6×6 RGB cube (`16 + 36×R + 6×G + B` where R,G,B are 0-5)
|
|
267
|
+
- `232-255`: Grayscale ramp
|
|
268
|
+
|
|
269
|
+
### Terminal Compatibility
|
|
270
|
+
|
|
271
|
+
Pi uses 24-bit RGB colors. Most modern terminals support this (iTerm2, Kitty, WezTerm, Windows Terminal, VS Code). For older terminals with only 256-color support, pi falls back to the nearest approximation.
|
|
272
|
+
|
|
273
|
+
Check truecolor support:
|
|
274
|
+
|
|
275
|
+
```bash
|
|
276
|
+
echo $COLORTERM # Should output "truecolor" or "24bit"
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
## Tips
|
|
280
|
+
|
|
281
|
+
**Dark terminals:** Use bright, saturated colors with higher contrast.
|
|
282
|
+
|
|
283
|
+
**Light terminals:** Use darker, muted colors with lower contrast.
|
|
284
|
+
|
|
285
|
+
**Color harmony:** Start with a base palette (Nord, Gruvbox, Tokyo Night), define it in `vars`, and reference consistently.
|
|
286
|
+
|
|
287
|
+
**Testing:** Check your theme with different message types, tool states, markdown content, and long wrapped text.
|
|
288
|
+
|
|
289
|
+
**VS Code:** Set `terminal.integrated.minimumContrastRatio` to `1` for accurate colors.
|
|
290
|
+
|
|
291
|
+
## Examples
|
|
292
|
+
|
|
293
|
+
See the built-in themes:
|
|
294
|
+
- [dark.json](../src/modes/interactive/theme/dark.json)
|
|
295
|
+
- [light.json](../src/modes/interactive/theme/light.json)
|