@caupulican/pi-adaptative 0.80.17 → 0.80.19
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 +39 -24
- package/README.md +1 -1
- package/dist/bun/register-bedrock.d.ts.map +1 -1
- package/dist/bun/register-bedrock.js +2 -2
- package/dist/bun/register-bedrock.js.map +1 -1
- package/dist/cli/args.d.ts +1 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js +1 -1
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/file-processor.d.ts +1 -1
- package/dist/cli/file-processor.d.ts.map +1 -1
- package/dist/cli/file-processor.js.map +1 -1
- package/dist/cli/initial-message.d.ts +1 -1
- package/dist/cli/initial-message.d.ts.map +1 -1
- package/dist/cli/initial-message.js.map +1 -1
- package/dist/cli/list-models.d.ts.map +1 -1
- package/dist/cli/list-models.js +1 -1
- package/dist/cli/list-models.js.map +1 -1
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js +1 -1
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -1
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +2 -2
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +2 -2
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +1 -1
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts +2 -2
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +2 -2
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts +2 -2
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +1 -1
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +2 -2
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +1 -1
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/utils.d.ts +2 -2
- package/dist/core/compaction/utils.d.ts.map +1 -1
- package/dist/core/compaction/utils.js.map +1 -1
- package/dist/core/defaults.d.ts +1 -1
- package/dist/core/defaults.d.ts.map +1 -1
- package/dist/core/defaults.js.map +1 -1
- package/dist/core/export-html/index.d.ts +1 -1
- package/dist/core/export-html/index.d.ts.map +1 -1
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +61 -19
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +3 -3
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +5 -5
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/extensions/wrapper.d.ts +1 -1
- package/dist/core/extensions/wrapper.d.ts.map +1 -1
- package/dist/core/extensions/wrapper.js.map +1 -1
- package/dist/core/keybindings.d.ts +2 -2
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +1 -1
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/messages.d.ts +3 -3
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-registry.d.ts +1 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +2 -2
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts +2 -2
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +1 -1
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +1 -1
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/sdk.d.ts +3 -3
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +3 -3
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts +2 -2
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +1 -1
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +1 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/tools/bash.d.ts +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +1 -1
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit.d.ts +2 -2
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +1 -1
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +1 -1
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +1 -1
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/index.d.ts +1 -1
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/ls.d.ts +1 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +1 -1
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/read.d.ts +1 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +1 -1
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts +1 -1
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +1 -1
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts +1 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
- package/dist/core/tools/write.d.ts +1 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +1 -1
- package/dist/core/tools/write.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +2 -2
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/armin.d.ts +1 -1
- package/dist/modes/interactive/components/armin.d.ts.map +1 -1
- package/dist/modes/interactive/components/armin.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +2 -2
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +1 -1
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +1 -1
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts +1 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.js +1 -1
- package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +1 -1
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.d.ts +1 -1
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -1
- package/dist/modes/interactive/components/countdown-timer.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +1 -1
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +1 -1
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/daxnuts.d.ts +1 -1
- package/dist/modes/interactive/components/daxnuts.d.ts.map +1 -1
- package/dist/modes/interactive/components/daxnuts.js.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.d.ts +1 -1
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -1
- package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.d.ts +1 -1
- package/dist/modes/interactive/components/earendil-announcement.d.ts.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.js +1 -1
- package/dist/modes/interactive/components/earendil-announcement.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +1 -1
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/extension-input.d.ts +1 -1
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-input.js +1 -1
- package/dist/modes/interactive/components/extension-input.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js +1 -1
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +1 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +1 -1
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts +1 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -1
- package/dist/modes/interactive/components/keybinding-hints.js +1 -1
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +2 -2
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +2 -2
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +2 -2
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +2 -2
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +1 -1
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +2 -2
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.js +1 -1
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +1 -1
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +3 -3
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +1 -1
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/show-images-selector.d.ts +1 -1
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/show-images-selector.js +1 -1
- package/dist/modes/interactive/components/show-images-selector.js.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/dist/modes/interactive/components/theme-selector.d.ts +1 -1
- package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/theme-selector.js +1 -1
- package/dist/modes/interactive/components/theme-selector.js.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts +2 -2
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +1 -1
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +1 -1
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tool-group.d.ts +1 -1
- package/dist/modes/interactive/components/tool-group.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-group.js +1 -1
- package/dist/modes/interactive/components/tool-group.js.map +1 -1
- package/dist/modes/interactive/components/tool-title.d.ts +1 -1
- package/dist/modes/interactive/components/tool-title.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-title.js +1 -1
- package/dist/modes/interactive/components/tool-title.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js +1 -1
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/components/trust-selector.d.ts +1 -1
- package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/trust-selector.js +1 -1
- package/dist/modes/interactive/components/trust-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts +1 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.js +1 -1
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts +1 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +1 -1
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.js +1 -1
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +19 -26
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +2 -2
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/print-mode.d.ts +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +2 -2
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +2 -2
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +1 -1
- package/dist/package-manager-cli.js.map +1 -1
- package/docs/compaction.md +2 -2
- package/docs/custom-provider.md +4 -4
- package/docs/extensions.md +28 -28
- package/docs/index.md +3 -3
- package/docs/packages.md +1 -1
- package/docs/quickstart.md +5 -5
- package/docs/rpc.md +1 -1
- package/docs/sdk.md +25 -25
- package/docs/session-format.md +1 -1
- package/docs/termux.md +1 -1
- package/docs/tui.md +22 -22
- package/examples/extensions/README.md +2 -2
- package/examples/extensions/auto-commit-on-exit.ts +1 -1
- package/examples/extensions/bash-spawn-hook.ts +2 -2
- package/examples/extensions/bookmark.ts +1 -1
- package/examples/extensions/border-status-editor.ts +3 -3
- package/examples/extensions/built-in-tool-renderer.ts +3 -3
- package/examples/extensions/claude-rules.ts +1 -1
- package/examples/extensions/commands.ts +1 -1
- package/examples/extensions/confirm-destructive.ts +1 -1
- package/examples/extensions/custom-compaction.ts +3 -3
- package/examples/extensions/custom-footer.ts +3 -3
- package/examples/extensions/custom-header.ts +2 -2
- package/examples/extensions/custom-provider-anthropic/index.ts +2 -2
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/index.ts +2 -2
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/test.ts +1 -1
- package/examples/extensions/dirty-repo-guard.ts +1 -1
- package/examples/extensions/doom-overlay/doom-component.ts +2 -2
- package/examples/extensions/doom-overlay/doom-keys.ts +1 -1
- package/examples/extensions/doom-overlay/index.ts +1 -1
- package/examples/extensions/dynamic-resources/index.ts +1 -1
- package/examples/extensions/dynamic-tools.ts +1 -1
- package/examples/extensions/event-bus.ts +1 -1
- package/examples/extensions/file-trigger.ts +1 -1
- package/examples/extensions/git-checkpoint.ts +1 -1
- package/examples/extensions/git-merge-and-resolve.ts +1 -1
- package/examples/extensions/github-issue-autocomplete.ts +2 -2
- package/examples/extensions/handoff.ts +4 -4
- package/examples/extensions/hello.ts +2 -2
- package/examples/extensions/hidden-thinking-label.ts +1 -1
- package/examples/extensions/inline-bash.ts +1 -1
- package/examples/extensions/input-transform-streaming.ts +1 -1
- package/examples/extensions/input-transform.ts +1 -1
- package/examples/extensions/interactive-shell.ts +1 -1
- package/examples/extensions/mac-system-theme.ts +1 -1
- package/examples/extensions/message-renderer.ts +2 -2
- package/examples/extensions/minimal-mode.ts +3 -3
- package/examples/extensions/modal-editor.ts +2 -2
- package/examples/extensions/model-status.ts +1 -1
- package/examples/extensions/notify.ts +1 -1
- package/examples/extensions/overlay-qa-tests.ts +3 -3
- package/examples/extensions/overlay-test.ts +2 -2
- package/examples/extensions/permission-gate.ts +1 -1
- package/examples/extensions/pirate.ts +1 -1
- package/examples/extensions/plan-mode/index.ts +4 -4
- package/examples/extensions/preset.ts +4 -4
- package/examples/extensions/prompt-customizer.ts +1 -1
- package/examples/extensions/protected-paths.ts +1 -1
- package/examples/extensions/provider-payload.ts +1 -1
- package/examples/extensions/qna.ts +3 -3
- package/examples/extensions/question.ts +2 -2
- package/examples/extensions/questionnaire.ts +2 -2
- package/examples/extensions/rainbow-editor.ts +1 -1
- package/examples/extensions/reload-runtime.ts +1 -1
- package/examples/extensions/rpc-demo.ts +1 -1
- package/examples/extensions/sandbox/index.ts +2 -2
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/send-user-message.ts +1 -1
- package/examples/extensions/session-name.ts +1 -1
- package/examples/extensions/shutdown-command.ts +1 -1
- package/examples/extensions/snake.ts +2 -2
- package/examples/extensions/space-invaders.ts +2 -2
- package/examples/extensions/ssh.ts +2 -2
- package/examples/extensions/status-line.ts +1 -1
- package/examples/extensions/structured-output.ts +2 -2
- package/examples/extensions/subagent/agents.ts +1 -1
- package/examples/extensions/subagent/index.ts +5 -5
- package/examples/extensions/summarize.ts +4 -4
- package/examples/extensions/system-prompt-header.ts +1 -1
- package/examples/extensions/tic-tac-toe.ts +3 -3
- package/examples/extensions/timed-confirm.ts +1 -1
- package/examples/extensions/titlebar-spinner.ts +1 -1
- package/examples/extensions/todo.ts +3 -3
- package/examples/extensions/tool-override.ts +2 -2
- package/examples/extensions/tools.ts +3 -3
- package/examples/extensions/trigger-compact.ts +1 -1
- package/examples/extensions/truncated-tool.ts +3 -3
- package/examples/extensions/widget-placement.ts +1 -1
- package/examples/extensions/with-deps/index.ts +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/extensions/working-indicator.ts +1 -1
- package/examples/extensions/working-message-test.ts +1 -1
- package/examples/rpc-extension-ui.ts +1 -1
- package/examples/sdk/01-minimal.ts +1 -1
- package/examples/sdk/02-custom-model.ts +2 -2
- package/examples/sdk/03-custom-prompt.ts +1 -6
- package/examples/sdk/04-skills.ts +1 -1
- package/examples/sdk/05-tools.ts +1 -1
- package/examples/sdk/06-extensions.ts +2 -7
- package/examples/sdk/07-context-files.ts +1 -6
- package/examples/sdk/08-prompt-templates.ts +1 -1
- package/examples/sdk/09-api-keys-and-oauth.ts +1 -1
- package/examples/sdk/10-settings.ts +1 -1
- package/examples/sdk/11-sessions.ts +1 -1
- package/examples/sdk/12-full-control.ts +2 -2
- package/examples/sdk/13-session-runtime.ts +1 -1
- package/examples/sdk/README.md +2 -2
- package/npm-shrinkwrap.json +15 -15
- package/package.json +4 -4
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* This demonstrates that overlays can handle real-time game rendering at 35 FPS.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import type { ExtensionAPI } from "@
|
|
12
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
13
13
|
import { DoomOverlayComponent } from "./doom-component.ts";
|
|
14
14
|
import { DoomEngine } from "./doom-engine.ts";
|
|
15
15
|
import { ensureWadFile } from "./wad-finder.ts";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { dirname, join } from "node:path";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
-
import type { ExtensionAPI } from "@
|
|
3
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
4
4
|
|
|
5
5
|
const baseDir = dirname(fileURLToPath(import.meta.url));
|
|
6
6
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* - Registers additional tools at runtime via /add-echo-tool <name>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type { ExtensionAPI } from "@
|
|
10
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
11
11
|
import { Type } from "typebox";
|
|
12
12
|
|
|
13
13
|
const ECHO_PARAMS = Type.Object({
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Usage: /emit [event-name] [data] - emit an event on the bus
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type { ExtensionAPI, ExtensionContext } from "@
|
|
10
|
+
import type { ExtensionAPI, ExtensionContext } from "@caupulican/pi-adaptative";
|
|
11
11
|
|
|
12
12
|
export default function (pi: ExtensionAPI) {
|
|
13
13
|
// Store ctx for use in event handler
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import * as fs from "node:fs";
|
|
12
|
-
import type { ExtensionAPI } from "@
|
|
12
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
13
13
|
|
|
14
14
|
export default function (pi: ExtensionAPI) {
|
|
15
15
|
pi.on("session_start", async (_event, ctx) => {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* When forking, offers to restore code to that point in history.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { ExtensionAPI } from "@
|
|
8
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
9
9
|
|
|
10
10
|
export default function (pi: ExtensionAPI) {
|
|
11
11
|
const checkpoints = new Map<string, string>();
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
import { createReadStream } from "node:fs";
|
|
15
15
|
import { join } from "node:path";
|
|
16
16
|
import { createInterface } from "node:readline";
|
|
17
|
-
import type { ExtensionAPI } from "@
|
|
17
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
18
18
|
|
|
19
19
|
interface ConflictBlock {
|
|
20
20
|
file: string;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// Requires GitHub CLI (`gh`) and a GitHub repository checkout.
|
|
2
2
|
// Preloads the latest open issues once per session, then filters them locally for fast `#...` completion.
|
|
3
3
|
|
|
4
|
-
import type { ExtensionAPI } from "@
|
|
4
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
5
5
|
import {
|
|
6
6
|
type AutocompleteItem,
|
|
7
7
|
type AutocompleteProvider,
|
|
8
8
|
type AutocompleteSuggestions,
|
|
9
9
|
fuzzyFilter,
|
|
10
|
-
} from "@
|
|
10
|
+
} from "@caupulican/pi-tui";
|
|
11
11
|
|
|
12
12
|
type GitHubIssue = {
|
|
13
13
|
number: number;
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
* The generated prompt appears as a draft in the editor for review/editing.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import type {
|
|
16
|
-
import {
|
|
17
|
-
import type {
|
|
18
|
-
import {
|
|
15
|
+
import type { ExtensionAPI, SessionEntry } from "@caupulican/pi-adaptative";
|
|
16
|
+
import { BorderedLoader, convertToLlm, serializeConversation } from "@caupulican/pi-adaptative";
|
|
17
|
+
import type { AgentMessage } from "@caupulican/pi-agent-core";
|
|
18
|
+
import { complete, type Message } from "@caupulican/pi-ai";
|
|
19
19
|
|
|
20
20
|
const SYSTEM_PROMPT = `You are a context transfer assistant. Given a conversation history and the user's goal for a new thread, generate a focused prompt that:
|
|
21
21
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Hello Tool - Minimal custom tool example
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { defineTool, type ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
6
|
+
import { Type } from "@caupulican/pi-ai";
|
|
7
7
|
|
|
8
8
|
const helloTool = defineTool({
|
|
9
9
|
name: "hello",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* /thinking-label Reset to the default label
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
import type { ExtensionAPI, ExtensionContext } from "@
|
|
21
|
+
import type { ExtensionAPI, ExtensionContext } from "@caupulican/pi-adaptative";
|
|
22
22
|
|
|
23
23
|
const DEFAULT_LABEL = "Pondering...";
|
|
24
24
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* Note: Regular !command syntax (whole-line bash) is preserved and works as before.
|
|
16
16
|
*/
|
|
17
|
-
import type { ExtensionAPI } from "@
|
|
17
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
18
18
|
|
|
19
19
|
export default function (pi: ExtensionAPI) {
|
|
20
20
|
const PATTERN = /!\{([^}]+)\}/g;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* Start pi with this extension:
|
|
12
12
|
* pi -e ./examples/extensions/input-transform-streaming.ts
|
|
13
13
|
*/
|
|
14
|
-
import type { ExtensionAPI } from "@
|
|
14
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
15
15
|
|
|
16
16
|
const TRIGGER = /\b(changes?|diff|modified)\b/i;
|
|
17
17
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* ping → "pong" (instant, no LLM)
|
|
10
10
|
* time → current time (instant, no LLM)
|
|
11
11
|
*/
|
|
12
|
-
import type { ExtensionAPI } from "@
|
|
12
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
13
13
|
|
|
14
14
|
export default function (pi: ExtensionAPI) {
|
|
15
15
|
pi.on("input", async (event, ctx) => {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
23
|
import { spawnSync } from "node:child_process";
|
|
24
|
-
import type { ExtensionAPI } from "@
|
|
24
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
25
25
|
|
|
26
26
|
// Default interactive commands - editors, pagers, git ops, TUIs
|
|
27
27
|
const DEFAULT_INTERACTIVE_COMMANDS = [
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { exec } from "node:child_process";
|
|
9
9
|
import { promisify } from "node:util";
|
|
10
|
-
import type { ExtensionAPI } from "@
|
|
10
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
11
11
|
|
|
12
12
|
const execAsync = promisify(exec);
|
|
13
13
|
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* Usage: /status [message] - sends a status message with custom rendering
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type { ExtensionAPI } from "@
|
|
11
|
-
import { Box, Text } from "@
|
|
10
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
11
|
+
import { Box, Text } from "@caupulican/pi-tui";
|
|
12
12
|
|
|
13
13
|
export default function (pi: ExtensionAPI) {
|
|
14
14
|
// Register custom renderer for "status-update" messages
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* Then use ctrl+o to toggle between minimal (collapsed) and full (expanded) views.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import type { ExtensionAPI } from "@
|
|
19
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
20
20
|
import {
|
|
21
21
|
createBashTool,
|
|
22
22
|
createEditTool,
|
|
@@ -25,8 +25,8 @@ import {
|
|
|
25
25
|
createLsTool,
|
|
26
26
|
createReadTool,
|
|
27
27
|
createWriteTool,
|
|
28
|
-
} from "@
|
|
29
|
-
import { Text } from "@
|
|
28
|
+
} from "@caupulican/pi-adaptative";
|
|
29
|
+
import { Text } from "@caupulican/pi-tui";
|
|
30
30
|
import { homedir } from "os";
|
|
31
31
|
|
|
32
32
|
/**
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* - ctrl+c, ctrl+d, etc. work in both modes
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import { CustomEditor, type ExtensionAPI } from "@
|
|
13
|
-
import { matchesKey, truncateToWidth, visibleWidth } from "@
|
|
12
|
+
import { CustomEditor, type ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
13
|
+
import { matchesKey, truncateToWidth, visibleWidth } from "@caupulican/pi-tui";
|
|
14
14
|
|
|
15
15
|
// Normal mode key mappings: key -> escape sequence (or null for mode switch)
|
|
16
16
|
const NORMAL_KEYS: Record<string, string | null> = {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Usage: pi -e ./model-status.ts
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type { ExtensionAPI } from "@
|
|
10
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
11
11
|
|
|
12
12
|
export default function (pi: ExtensionAPI) {
|
|
13
13
|
pi.on("model_select", async (event, ctx) => {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - Windows toast: Windows Terminal (WSL)
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import type { ExtensionAPI } from "@
|
|
11
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
12
12
|
|
|
13
13
|
function windowsToastScript(title: string, body: string): string {
|
|
14
14
|
const type = "Windows.UI.Notifications";
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
* /overlay-streaming - Multiple input panels with simulated streaming (Tab to cycle focus)
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
import type { ExtensionAPI, ExtensionCommandContext, Theme } from "@
|
|
23
|
-
import type { Component, OverlayAnchor, OverlayHandle, OverlayOptions, TUI } from "@
|
|
24
|
-
import { matchesKey, truncateToWidth, visibleWidth } from "@
|
|
22
|
+
import type { ExtensionAPI, ExtensionCommandContext, Theme } from "@caupulican/pi-adaptative";
|
|
23
|
+
import type { Component, OverlayAnchor, OverlayHandle, OverlayOptions, TUI } from "@caupulican/pi-tui";
|
|
24
|
+
import { matchesKey, truncateToWidth, visibleWidth } from "@caupulican/pi-tui";
|
|
25
25
|
import { spawn } from "child_process";
|
|
26
26
|
|
|
27
27
|
// Global handle for toggle demo (in real code, use a more elegant pattern)
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* - Edge case tests (wide chars, styled text, emoji)
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import type { ExtensionAPI, ExtensionCommandContext, Theme } from "@
|
|
12
|
-
import { CURSOR_MARKER, type Focusable, matchesKey, visibleWidth } from "@
|
|
11
|
+
import type { ExtensionAPI, ExtensionCommandContext, Theme } from "@caupulican/pi-adaptative";
|
|
12
|
+
import { CURSOR_MARKER, type Focusable, matchesKey, visibleWidth } from "@caupulican/pi-tui";
|
|
13
13
|
|
|
14
14
|
export default function (pi: ExtensionAPI) {
|
|
15
15
|
pi.registerCommand("overlay-test", {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Patterns checked: rm -rf, sudo, chmod/chown 777
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { ExtensionAPI } from "@
|
|
8
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
9
9
|
|
|
10
10
|
export default function (pi: ExtensionAPI) {
|
|
11
11
|
const dangerousPatterns = [/\brm\s+(-rf?|--recursive)/i, /\bsudo\b/i, /\b(chmod|chown)\b.*777/i];
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* 3. When enabled, the agent will respond like a pirate
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import type { ExtensionAPI } from "@
|
|
13
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
14
14
|
|
|
15
15
|
export default function pirateExtension(pi: ExtensionAPI) {
|
|
16
16
|
let pirateMode = false;
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
* - Progress tracking widget during execution
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import type {
|
|
16
|
-
import type {
|
|
17
|
-
import type {
|
|
18
|
-
import { Key } from "@
|
|
15
|
+
import type { ExtensionAPI, ExtensionContext } from "@caupulican/pi-adaptative";
|
|
16
|
+
import type { AgentMessage } from "@caupulican/pi-agent-core";
|
|
17
|
+
import type { AssistantMessage, TextContent } from "@caupulican/pi-ai";
|
|
18
|
+
import { Key } from "@caupulican/pi-tui";
|
|
19
19
|
import { extractTodoItems, isSafeCommand, markCompletedSteps, type TodoItem } from "./utils.ts";
|
|
20
20
|
|
|
21
21
|
// Tools
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
|
|
41
41
|
import { existsSync, readFileSync } from "node:fs";
|
|
42
42
|
import { join } from "node:path";
|
|
43
|
-
import type {
|
|
44
|
-
import
|
|
45
|
-
import {
|
|
46
|
-
import { Container, Key, type SelectItem, SelectList, Text } from "@
|
|
43
|
+
import type { ExtensionAPI, ExtensionContext } from "@caupulican/pi-adaptative";
|
|
44
|
+
import { DynamicBorder, getAgentDir } from "@caupulican/pi-adaptative";
|
|
45
|
+
import type { Api, Model } from "@caupulican/pi-ai";
|
|
46
|
+
import { Container, Key, type SelectItem, SelectList, Text } from "@caupulican/pi-tui";
|
|
47
47
|
|
|
48
48
|
// Preset configuration
|
|
49
49
|
interface Preset {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* 2. Use the extension — it automatically adapts to your active tools and skills
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import type { BuildSystemPromptOptions, ExtensionAPI } from "@
|
|
15
|
+
import type { BuildSystemPromptOptions, ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Adds tool-specific guidance that adapts to the active tool set.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Useful for preventing accidental modifications to sensitive files.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { ExtensionAPI } from "@
|
|
8
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
9
9
|
|
|
10
10
|
export default function (pi: ExtensionAPI) {
|
|
11
11
|
const protectedPaths = [".env", ".git/", "node_modules/"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { appendFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
import type { ExtensionAPI } from "@
|
|
3
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
4
4
|
|
|
5
5
|
export default function (pi: ExtensionAPI) {
|
|
6
6
|
const logFile = join(process.cwd(), ".pi", "provider-payload.log");
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* 3. Loads the result into the editor for user to fill in answers
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
10
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
11
|
+
import { BorderedLoader } from "@caupulican/pi-adaptative";
|
|
12
|
+
import { complete, type UserMessage } from "@caupulican/pi-ai";
|
|
13
13
|
|
|
14
14
|
const SYSTEM_PROMPT = `You are a question extractor. Given text from a conversation, extract any questions that need answering and format them for the user to fill in.
|
|
15
15
|
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Escape in editor returns to options, Escape in options cancels
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import type { ExtensionAPI } from "@
|
|
8
|
-
import { Editor, type EditorTheme, Key, matchesKey, Text, truncateToWidth } from "@
|
|
7
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
8
|
+
import { Editor, type EditorTheme, Key, matchesKey, Text, truncateToWidth } from "@caupulican/pi-tui";
|
|
9
9
|
import { Type } from "typebox";
|
|
10
10
|
|
|
11
11
|
interface OptionWithDesc {
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* Multiple questions: tab bar navigation between questions
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { ExtensionAPI } from "@
|
|
9
|
-
import { Editor, type EditorTheme, Key, matchesKey, Text, truncateToWidth } from "@
|
|
8
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
9
|
+
import { Editor, type EditorTheme, Key, matchesKey, Text, truncateToWidth } from "@caupulican/pi-tui";
|
|
10
10
|
import { Type } from "typebox";
|
|
11
11
|
|
|
12
12
|
// Types
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Usage: pi --extension ./examples/extensions/rainbow-editor.ts
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { CustomEditor, type ExtensionAPI } from "@
|
|
7
|
+
import { CustomEditor, type ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
8
8
|
|
|
9
9
|
// Base colors (coral → yellow → green → teal → blue → purple → pink)
|
|
10
10
|
const COLORS: [number, number, number][] = [
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* active run sees the refreshed tool definitions.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import type { ExtensionAPI } from "@
|
|
9
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
10
10
|
import { Type } from "typebox";
|
|
11
11
|
|
|
12
12
|
export default function (pi: ExtensionAPI) {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* - setEditorText() - via /rpc-prefill command
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
import type { ExtensionAPI } from "@
|
|
20
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
21
21
|
|
|
22
22
|
export default function (pi: ExtensionAPI) {
|
|
23
23
|
let turnCount = 0;
|
|
@@ -45,8 +45,8 @@ import { spawn } from "node:child_process";
|
|
|
45
45
|
import { existsSync, readFileSync } from "node:fs";
|
|
46
46
|
import { join } from "node:path";
|
|
47
47
|
import { SandboxManager, type SandboxRuntimeConfig } from "@anthropic-ai/sandbox-runtime";
|
|
48
|
-
import type { ExtensionAPI } from "@
|
|
49
|
-
import { type BashOperations, createBashTool, getAgentDir } from "@
|
|
48
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
49
|
+
import { type BashOperations, createBashTool, getAgentDir } from "@caupulican/pi-adaptative";
|
|
50
50
|
|
|
51
51
|
interface SandboxConfig extends SandboxRuntimeConfig {
|
|
52
52
|
enabled?: boolean;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-sandbox",
|
|
3
|
-
"version": "0.80.
|
|
3
|
+
"version": "0.80.17",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-sandbox",
|
|
9
|
-
"version": "0.80.
|
|
9
|
+
"version": "0.80.17",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sandbox-runtime": "^0.0.26"
|
|
12
12
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* /followup And then? - Sends while streaming with followUp delivery
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import type { ExtensionAPI } from "@
|
|
14
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
15
15
|
|
|
16
16
|
export default function (pi: ExtensionAPI) {
|
|
17
17
|
// Simple command that sends a user message
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Usage: /session-name [name] - set or show session name
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type { ExtensionAPI } from "@
|
|
10
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
11
11
|
|
|
12
12
|
export default function (pi: ExtensionAPI) {
|
|
13
13
|
pi.registerCommand("session-name", {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Demonstrates how extensions can use ctx.shutdown() to exit pi cleanly.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { ExtensionAPI } from "@
|
|
8
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
9
9
|
import { Type } from "typebox";
|
|
10
10
|
|
|
11
11
|
export default function (pi: ExtensionAPI) {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Snake game extension - play snake with /snake command
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import type { ExtensionAPI } from "@
|
|
6
|
-
import { matchesKey, visibleWidth } from "@
|
|
5
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
6
|
+
import { matchesKey, visibleWidth } from "@caupulican/pi-tui";
|
|
7
7
|
|
|
8
8
|
const GAME_WIDTH = 40;
|
|
9
9
|
const GAME_HEIGHT = 15;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Uses Kitty keyboard protocol for smooth movement (press/release detection)
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type { ExtensionAPI } from "@
|
|
7
|
-
import { isKeyRelease, Key, matchesKey, visibleWidth } from "@
|
|
6
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
7
|
+
import { isKeyRelease, Key, matchesKey, visibleWidth } from "@caupulican/pi-tui";
|
|
8
8
|
|
|
9
9
|
const GAME_WIDTH = 60;
|
|
10
10
|
const GAME_HEIGHT = 24;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
import { spawn } from "node:child_process";
|
|
17
|
-
import type { ExtensionAPI } from "@
|
|
17
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
18
18
|
import {
|
|
19
19
|
type BashOperations,
|
|
20
20
|
createBashTool,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
type EditOperations,
|
|
25
25
|
type ReadOperations,
|
|
26
26
|
type WriteOperations,
|
|
27
|
-
} from "@
|
|
27
|
+
} from "@caupulican/pi-adaptative";
|
|
28
28
|
|
|
29
29
|
function sshExec(remote: string, command: string): Promise<Buffer> {
|
|
30
30
|
return new Promise((resolve, reject) => {
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* without paying for an extra follow-up LLM turn.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { defineTool, type ExtensionAPI } from "@
|
|
9
|
-
import { Text } from "@
|
|
8
|
+
import { defineTool, type ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
9
|
+
import { Text } from "@caupulican/pi-tui";
|
|
10
10
|
import { Type } from "typebox";
|
|
11
11
|
|
|
12
12
|
interface StructuredOutputDetails {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as fs from "node:fs";
|
|
6
6
|
import * as path from "node:path";
|
|
7
|
-
import { getAgentDir, parseFrontmatter } from "@
|
|
7
|
+
import { getAgentDir, parseFrontmatter } from "@caupulican/pi-adaptative";
|
|
8
8
|
|
|
9
9
|
export type AgentScope = "user" | "project" | "both";
|
|
10
10
|
|
|
@@ -16,11 +16,11 @@ import { spawn } from "node:child_process";
|
|
|
16
16
|
import * as fs from "node:fs";
|
|
17
17
|
import * as os from "node:os";
|
|
18
18
|
import * as path from "node:path";
|
|
19
|
-
import type
|
|
20
|
-
import type {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { Container, Markdown, Spacer, Text } from "@
|
|
19
|
+
import { type ExtensionAPI, getMarkdownTheme, withFileMutationQueue } from "@caupulican/pi-adaptative";
|
|
20
|
+
import type { AgentToolResult } from "@caupulican/pi-agent-core";
|
|
21
|
+
import type { Message } from "@caupulican/pi-ai";
|
|
22
|
+
import { StringEnum } from "@caupulican/pi-ai";
|
|
23
|
+
import { Container, Markdown, Spacer, Text } from "@caupulican/pi-tui";
|
|
24
24
|
import { Type } from "typebox";
|
|
25
25
|
import { type AgentConfig, type AgentScope, discoverAgents } from "./agents.ts";
|
|
26
26
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { Container, Markdown, matchesKey, Text } from "@
|
|
1
|
+
import type { ExtensionAPI, ExtensionCommandContext } from "@caupulican/pi-adaptative";
|
|
2
|
+
import { DynamicBorder, getMarkdownTheme } from "@caupulican/pi-adaptative";
|
|
3
|
+
import { complete, getModel } from "@caupulican/pi-ai";
|
|
4
|
+
import { Container, Markdown, matchesKey, Text } from "@caupulican/pi-tui";
|
|
5
5
|
|
|
6
6
|
type ContentBlock = {
|
|
7
7
|
type?: string;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Demonstrates ctx.getSystemPrompt() for accessing the effective system prompt.
|
|
5
5
|
*/
|
|
6
|
-
import type { ExtensionAPI } from "@
|
|
6
|
+
import type { ExtensionAPI } from "@caupulican/pi-adaptative";
|
|
7
7
|
|
|
8
8
|
export default function (pi: ExtensionAPI) {
|
|
9
9
|
pi.on("agent_start", (_event, ctx) => {
|