@selesai/code 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +198 -0
- package/dist/agents/architect.md +216 -0
- package/dist/agents/builder.md +119 -0
- package/dist/agents/commentator.md +128 -0
- package/dist/agents/explorer.md +51 -0
- package/dist/agents/recapper.md +24 -0
- package/dist/bun/cli.d.ts +3 -0
- package/dist/bun/cli.d.ts.map +1 -0
- package/dist/bun/cli.js +9 -0
- package/dist/bun/cli.js.map +1 -0
- package/dist/bun/register-bedrock.d.ts +2 -0
- package/dist/bun/register-bedrock.d.ts.map +1 -0
- package/dist/bun/register-bedrock.js +4 -0
- package/dist/bun/register-bedrock.js.map +1 -0
- package/dist/bun/restore-sandbox-env.d.ts +17 -0
- package/dist/bun/restore-sandbox-env.d.ts.map +1 -0
- package/dist/bun/restore-sandbox-env.js +36 -0
- package/dist/bun/restore-sandbox-env.js.map +1 -0
- package/dist/cli/args.d.ts +57 -0
- package/dist/cli/args.d.ts.map +1 -0
- package/dist/cli/args.js +379 -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 +82 -0
- package/dist/cli/file-processor.js.map +1 -0
- package/dist/cli/initial-message.d.ts +18 -0
- package/dist/cli/initial-message.d.ts.map +1 -0
- package/dist/cli/initial-message.js +22 -0
- package/dist/cli/initial-message.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 +98 -0
- package/dist/cli/list-models.js.map +1 -0
- package/dist/cli/project-trust.d.ts +10 -0
- package/dist/cli/project-trust.d.ts.map +1 -0
- package/dist/cli/project-trust.js +48 -0
- package/dist/cli/project-trust.js.map +1 -0
- package/dist/cli/session-picker.d.ts +10 -0
- package/dist/cli/session-picker.d.ts.map +1 -0
- package/dist/cli/session-picker.js +36 -0
- package/dist/cli/session-picker.js.map +1 -0
- package/dist/cli/startup-ui.d.ts +23 -0
- package/dist/cli/startup-ui.d.ts.map +1 -0
- package/dist/cli/startup-ui.js +172 -0
- package/dist/cli/startup-ui.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +18 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +154 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +579 -0
- package/dist/config.js.map +1 -0
- package/dist/core/agent-session-runtime.d.ts +119 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -0
- package/dist/core/agent-session-runtime.js +303 -0
- package/dist/core/agent-session-runtime.js.map +1 -0
- package/dist/core/agent-session-services.d.ts +88 -0
- package/dist/core/agent-session-services.d.ts.map +1 -0
- package/dist/core/agent-session-services.js +119 -0
- package/dist/core/agent-session-services.js.map +1 -0
- package/dist/core/agent-session.d.ts +607 -0
- package/dist/core/agent-session.d.ts.map +1 -0
- package/dist/core/agent-session.js +2552 -0
- package/dist/core/agent-session.js.map +1 -0
- package/dist/core/agents.d.ts +53 -0
- package/dist/core/agents.d.ts.map +1 -0
- package/dist/core/agents.js +238 -0
- package/dist/core/agents.js.map +1 -0
- package/dist/core/auth-guidance.d.ts +5 -0
- package/dist/core/auth-guidance.d.ts.map +1 -0
- package/dist/core/auth-guidance.js +21 -0
- package/dist/core/auth-guidance.js.map +1 -0
- package/dist/core/auth-storage.d.ts +140 -0
- package/dist/core/auth-storage.d.ts.map +1 -0
- package/dist/core/auth-storage.js +434 -0
- package/dist/core/auth-storage.js.map +1 -0
- package/dist/core/bash-executor.d.ts +32 -0
- package/dist/core/bash-executor.d.ts.map +1 -0
- package/dist/core/bash-executor.js +111 -0
- package/dist/core/bash-executor.js.map +1 -0
- package/dist/core/compaction/branch-summarization.d.ts +92 -0
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -0
- package/dist/core/compaction/branch-summarization.js +249 -0
- package/dist/core/compaction/branch-summarization.js.map +1 -0
- package/dist/core/compaction/compaction.d.ts +122 -0
- package/dist/core/compaction/compaction.d.ts.map +1 -0
- package/dist/core/compaction/compaction.js +625 -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 +38 -0
- package/dist/core/compaction/utils.d.ts.map +1 -0
- package/dist/core/compaction/utils.js +153 -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 +75 -0
- package/dist/core/exec.js.map +1 -0
- package/dist/core/experimental.d.ts +2 -0
- package/dist/core/experimental.d.ts.map +1 -0
- package/dist/core/experimental.js +4 -0
- package/dist/core/experimental.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 +37 -0
- package/dist/core/export-html/index.d.ts.map +1 -0
- package/dist/core/export-html/index.js +226 -0
- package/dist/core/export-html/index.js.map +1 -0
- package/dist/core/export-html/template.css +1066 -0
- package/dist/core/export-html/template.html +55 -0
- package/dist/core/export-html/template.js +1864 -0
- package/dist/core/export-html/tool-renderer.d.ts +34 -0
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -0
- package/dist/core/export-html/tool-renderer.js +108 -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 +78 -0
- package/dist/core/extensions/index.d.ts +12 -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 +23 -0
- package/dist/core/extensions/loader.d.ts.map +1 -0
- package/dist/core/extensions/loader.js +531 -0
- package/dist/core/extensions/loader.js.map +1 -0
- package/dist/core/extensions/runner.d.ts +166 -0
- package/dist/core/extensions/runner.d.ts.map +1 -0
- package/dist/core/extensions/runner.js +876 -0
- package/dist/core/extensions/runner.js.map +1 -0
- package/dist/core/extensions/types.d.ts +1209 -0
- package/dist/core/extensions/types.d.ts.map +1 -0
- package/dist/core/extensions/types.js +45 -0
- package/dist/core/extensions/types.js.map +1 -0
- package/dist/core/extensions/wrapper.d.ts +20 -0
- package/dist/core/extensions/wrapper.d.ts.map +1 -0
- package/dist/core/extensions/wrapper.js +22 -0
- package/dist/core/extensions/wrapper.js.map +1 -0
- package/dist/core/footer-data-provider.d.ts +54 -0
- package/dist/core/footer-data-provider.d.ts.map +1 -0
- package/dist/core/footer-data-provider.js +338 -0
- package/dist/core/footer-data-provider.js.map +1 -0
- package/dist/core/http-dispatcher.d.ts +22 -0
- package/dist/core/http-dispatcher.d.ts.map +1 -0
- package/dist/core/http-dispatcher.js +64 -0
- package/dist/core/http-dispatcher.js.map +1 -0
- package/dist/core/index.d.ts +13 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +13 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/keybindings.d.ts +353 -0
- package/dist/core/keybindings.d.ts.map +1 -0
- package/dist/core/keybindings.js +295 -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 +151 -0
- package/dist/core/model-registry.d.ts.map +1 -0
- package/dist/core/model-registry.js +750 -0
- package/dist/core/model-registry.js.map +1 -0
- package/dist/core/model-resolver.d.ts +111 -0
- package/dist/core/model-resolver.d.ts.map +1 -0
- package/dist/core/model-resolver.js +534 -0
- package/dist/core/model-resolver.js.map +1 -0
- package/dist/core/output-guard.d.ts +7 -0
- package/dist/core/output-guard.d.ts.map +1 -0
- package/dist/core/output-guard.js +89 -0
- package/dist/core/output-guard.js.map +1 -0
- package/dist/core/package-manager.d.ts +207 -0
- package/dist/core/package-manager.d.ts.map +1 -0
- package/dist/core/package-manager.js +2088 -0
- package/dist/core/package-manager.js.map +1 -0
- package/dist/core/project-trust.d.ts +15 -0
- package/dist/core/project-trust.d.ts.map +1 -0
- package/dist/core/project-trust.js +59 -0
- package/dist/core/project-trust.js.map +1 -0
- package/dist/core/prompt-templates.d.ts +53 -0
- package/dist/core/prompt-templates.d.ts.map +1 -0
- package/dist/core/prompt-templates.js +236 -0
- package/dist/core/prompt-templates.js.map +1 -0
- package/dist/core/provider-attribution.d.ts +4 -0
- package/dist/core/provider-attribution.d.ts.map +1 -0
- package/dist/core/provider-attribution.js +82 -0
- package/dist/core/provider-attribution.js.map +1 -0
- package/dist/core/provider-display-names.d.ts +2 -0
- package/dist/core/provider-display-names.d.ts.map +1 -0
- package/dist/core/provider-display-names.js +36 -0
- package/dist/core/provider-display-names.js.map +1 -0
- package/dist/core/resolve-config-value.d.ts +30 -0
- package/dist/core/resolve-config-value.d.ts.map +1 -0
- package/dist/core/resolve-config-value.js +247 -0
- package/dist/core/resolve-config-value.js.map +1 -0
- package/dist/core/resource-loader.d.ts +230 -0
- package/dist/core/resource-loader.d.ts.map +1 -0
- package/dist/core/resource-loader.js +861 -0
- package/dist/core/resource-loader.js.map +1 -0
- package/dist/core/sdk.d.ts +109 -0
- package/dist/core/sdk.d.ts.map +1 -0
- package/dist/core/sdk.js +267 -0
- package/dist/core/sdk.js.map +1 -0
- package/dist/core/session-cwd.d.ts +19 -0
- package/dist/core/session-cwd.d.ts.map +1 -0
- package/dist/core/session-cwd.js +38 -0
- package/dist/core/session-cwd.js.map +1 -0
- package/dist/core/session-manager.d.ts +332 -0
- package/dist/core/session-manager.d.ts.map +1 -0
- package/dist/core/session-manager.js +1230 -0
- package/dist/core/session-manager.js.map +1 -0
- package/dist/core/settings-manager.d.ts +286 -0
- package/dist/core/settings-manager.d.ts.map +1 -0
- package/dist/core/settings-manager.js +874 -0
- package/dist/core/settings-manager.js.map +1 -0
- package/dist/core/skills.d.ts +69 -0
- package/dist/core/skills.d.ts.map +1 -0
- package/dist/core/skills.js +387 -0
- package/dist/core/skills.js.map +1 -0
- package/dist/core/slash-commands.d.ts +14 -0
- package/dist/core/slash-commands.d.ts.map +1 -0
- package/dist/core/slash-commands.js +26 -0
- package/dist/core/slash-commands.js.map +1 -0
- package/dist/core/source-info.d.ts +18 -0
- package/dist/core/source-info.d.ts.map +1 -0
- package/dist/core/source-info.js +19 -0
- package/dist/core/source-info.js.map +1 -0
- package/dist/core/system-prompt.d.ts +31 -0
- package/dist/core/system-prompt.d.ts.map +1 -0
- package/dist/core/system-prompt.js +128 -0
- package/dist/core/system-prompt.js.map +1 -0
- package/dist/core/telemetry.d.ts +3 -0
- package/dist/core/telemetry.d.ts.map +1 -0
- package/dist/core/telemetry.js +9 -0
- package/dist/core/telemetry.js.map +1 -0
- package/dist/core/timings.d.ts +8 -0
- package/dist/core/timings.d.ts.map +1 -0
- package/dist/core/timings.js +31 -0
- package/dist/core/timings.js.map +1 -0
- package/dist/core/tools/bash.d.ts +68 -0
- package/dist/core/tools/bash.d.ts.map +1 -0
- package/dist/core/tools/bash.js +346 -0
- package/dist/core/tools/bash.js.map +1 -0
- package/dist/core/tools/edit-diff.d.ts +106 -0
- package/dist/core/tools/edit-diff.d.ts.map +1 -0
- package/dist/core/tools/edit-diff.js +424 -0
- package/dist/core/tools/edit-diff.js.map +1 -0
- package/dist/core/tools/edit.d.ts +51 -0
- package/dist/core/tools/edit.d.ts.map +1 -0
- package/dist/core/tools/edit.js +284 -0
- package/dist/core/tools/edit.js.map +1 -0
- package/dist/core/tools/file-mutation-queue.d.ts +6 -0
- package/dist/core/tools/file-mutation-queue.d.ts.map +1 -0
- package/dist/core/tools/file-mutation-queue.js +52 -0
- package/dist/core/tools/file-mutation-queue.js.map +1 -0
- package/dist/core/tools/find.d.ts +35 -0
- package/dist/core/tools/find.d.ts.map +1 -0
- package/dist/core/tools/find.js +305 -0
- package/dist/core/tools/find.js.map +1 -0
- package/dist/core/tools/grep.d.ts +37 -0
- package/dist/core/tools/grep.d.ts.map +1 -0
- package/dist/core/tools/grep.js +304 -0
- package/dist/core/tools/grep.js.map +1 -0
- package/dist/core/tools/index.d.ts +40 -0
- package/dist/core/tools/index.d.ts.map +1 -0
- package/dist/core/tools/index.js +112 -0
- package/dist/core/tools/index.js.map +1 -0
- package/dist/core/tools/ls.d.ts +37 -0
- package/dist/core/tools/ls.d.ts.map +1 -0
- package/dist/core/tools/ls.js +167 -0
- package/dist/core/tools/ls.js.map +1 -0
- package/dist/core/tools/output-accumulator.d.ts +52 -0
- package/dist/core/tools/output-accumulator.d.ts.map +1 -0
- package/dist/core/tools/output-accumulator.js +184 -0
- package/dist/core/tools/output-accumulator.js.map +1 -0
- package/dist/core/tools/path-utils.d.ts +10 -0
- package/dist/core/tools/path-utils.d.ts.map +1 -0
- package/dist/core/tools/path-utils.js +99 -0
- package/dist/core/tools/path-utils.js.map +1 -0
- package/dist/core/tools/read.d.ts +35 -0
- package/dist/core/tools/read.d.ts.map +1 -0
- package/dist/core/tools/read.js +289 -0
- package/dist/core/tools/read.js.map +1 -0
- package/dist/core/tools/render-utils.d.ts +24 -0
- package/dist/core/tools/render-utils.d.ts.map +1 -0
- package/dist/core/tools/render-utils.js +65 -0
- package/dist/core/tools/render-utils.js.map +1 -0
- package/dist/core/tools/tool-definition-wrapper.d.ts +14 -0
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -0
- package/dist/core/tools/tool-definition-wrapper.js +34 -0
- package/dist/core/tools/tool-definition-wrapper.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 +215 -0
- package/dist/core/tools/truncate.js.map +1 -0
- package/dist/core/tools/write.d.ts +26 -0
- package/dist/core/tools/write.d.ts.map +1 -0
- package/dist/core/tools/write.js +197 -0
- package/dist/core/tools/write.js.map +1 -0
- package/dist/core/trust-manager.d.ts +36 -0
- package/dist/core/trust-manager.d.ts.map +1 -0
- package/dist/core/trust-manager.js +202 -0
- package/dist/core/trust-manager.js.map +1 -0
- package/dist/defaults/models.json +3 -0
- package/dist/defaults/settings.json +68 -0
- package/dist/extensions/copy-turn.ts +125 -0
- package/dist/extensions/gitignore-guard.ts +132 -0
- package/dist/extensions/hooks/claude-codex-hooks.json +44 -0
- package/dist/extensions/hooks/copilot-hooks.json +21 -0
- package/dist/extensions/hooks/ponytail-activate.js +91 -0
- package/dist/extensions/hooks/ponytail-config.js +122 -0
- package/dist/extensions/hooks/ponytail-instructions.js +94 -0
- package/dist/extensions/hooks/ponytail-mode-tracker.js +55 -0
- package/dist/extensions/hooks/ponytail-runtime.js +68 -0
- package/dist/extensions/hooks/ponytail-statusline.ps1 +21 -0
- package/dist/extensions/hooks/ponytail-statusline.sh +12 -0
- package/dist/extensions/hooks/ponytail-subagent.js +22 -0
- package/dist/extensions/package.json +19 -0
- package/dist/extensions/pi-extension/index.js +189 -0
- package/dist/extensions/pi-extension/package.json +8 -0
- package/dist/extensions/pi-extension/test/extension.test.js +167 -0
- package/dist/extensions/pi-extension/test/helpers.test.js +92 -0
- package/dist/extensions/pi-powerline-footer/CHANGELOG.md +516 -0
- package/dist/extensions/pi-powerline-footer/README.md +382 -0
- package/dist/extensions/pi-powerline-footer/banner.png +0 -0
- package/dist/extensions/pi-powerline-footer/bash-mode/completion.ts +556 -0
- package/dist/extensions/pi-powerline-footer/bash-mode/editor.ts +397 -0
- package/dist/extensions/pi-powerline-footer/bash-mode/history.ts +151 -0
- package/dist/extensions/pi-powerline-footer/bash-mode/shell-session.ts +286 -0
- package/dist/extensions/pi-powerline-footer/bash-mode/transcript.ts +108 -0
- package/dist/extensions/pi-powerline-footer/bash-mode/types.ts +59 -0
- package/dist/extensions/pi-powerline-footer/colors.ts +69 -0
- package/dist/extensions/pi-powerline-footer/context-usage.ts +41 -0
- package/dist/extensions/pi-powerline-footer/fixed-editor/cluster.ts +113 -0
- package/dist/extensions/pi-powerline-footer/fixed-editor/terminal-split.ts +1077 -0
- package/dist/extensions/pi-powerline-footer/git-status.ts +212 -0
- package/dist/extensions/pi-powerline-footer/icons.ts +181 -0
- package/dist/extensions/pi-powerline-footer/index.ts +2817 -0
- package/dist/extensions/pi-powerline-footer/package.json +46 -0
- package/dist/extensions/pi-powerline-footer/powerline-config.ts +182 -0
- package/dist/extensions/pi-powerline-footer/presets.ts +121 -0
- package/dist/extensions/pi-powerline-footer/render-scheduler.ts +24 -0
- package/dist/extensions/pi-powerline-footer/segments.ts +566 -0
- package/dist/extensions/pi-powerline-footer/separators.ts +57 -0
- package/dist/extensions/pi-powerline-footer/shortcuts.ts +47 -0
- package/dist/extensions/pi-powerline-footer/tests/bash-mode.test.ts +1503 -0
- package/dist/extensions/pi-powerline-footer/tests/context-usage.test.ts +38 -0
- package/dist/extensions/pi-powerline-footer/tests/custom-items.test.ts +135 -0
- package/dist/extensions/pi-powerline-footer/tests/editor-responsiveness.test.ts +180 -0
- package/dist/extensions/pi-powerline-footer/tests/fixed-editor.test.ts +1416 -0
- package/dist/extensions/pi-powerline-footer/tests/jump-shortcuts.test.ts +213 -0
- package/dist/extensions/pi-powerline-footer/tests/stash-shortcut.test.ts +32 -0
- package/dist/extensions/pi-powerline-footer/tests/thinking-segment.test.ts +61 -0
- package/dist/extensions/pi-powerline-footer/tests/working-vibes.test.ts +226 -0
- package/dist/extensions/pi-powerline-footer/theme.example.json +24 -0
- package/dist/extensions/pi-powerline-footer/theme.json +12 -0
- package/dist/extensions/pi-powerline-footer/theme.ts +227 -0
- package/dist/extensions/pi-powerline-footer/types.ts +191 -0
- package/dist/extensions/pi-powerline-footer/welcome-dismiss.ts +34 -0
- package/dist/extensions/pi-powerline-footer/welcome.ts +611 -0
- package/dist/extensions/pi-powerline-footer/working-vibes.ts +695 -0
- package/dist/extensions/prototype.ts +713 -0
- package/dist/extensions/question.ts +350 -0
- package/dist/extensions/rtk.ts +81 -0
- package/dist/extensions/tps-tracker.ts +280 -0
- package/dist/extensions/undo.ts +292 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +46 -0
- package/dist/index.js.map +1 -0
- package/dist/main.d.ts +12 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +700 -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 +281 -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/assets/clankolas.png +0 -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 +20 -0
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/assistant-message.js +121 -0
- package/dist/modes/interactive/components/assistant-message.js.map +1 -0
- package/dist/modes/interactive/components/bash-execution.d.ts +34 -0
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -0
- package/dist/modes/interactive/components/bash-execution.js +175 -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 +54 -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 +506 -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/earendil-announcement.d.ts +5 -0
- package/dist/modes/interactive/components/earendil-announcement.d.ts.map +1 -0
- package/dist/modes/interactive/components/earendil-announcement.js +40 -0
- package/dist/modes/interactive/components/earendil-announcement.js.map +1 -0
- package/dist/modes/interactive/components/extension-editor.d.ts +20 -0
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -0
- package/dist/modes/interactive/components/extension-editor.js +119 -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 +26 -0
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/extension-selector.js +83 -0
- package/dist/modes/interactive/components/extension-selector.js.map +1 -0
- package/dist/modes/interactive/components/first-time-setup.d.ts +25 -0
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -0
- package/dist/modes/interactive/components/first-time-setup.js +103 -0
- package/dist/modes/interactive/components/first-time-setup.js.map +1 -0
- package/dist/modes/interactive/components/footer.d.ts +28 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -0
- package/dist/modes/interactive/components/footer.js +221 -0
- package/dist/modes/interactive/components/footer.js.map +1 -0
- package/dist/modes/interactive/components/index.d.ts +34 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -0
- package/dist/modes/interactive/components/index.js +35 -0
- package/dist/modes/interactive/components/index.js.map +1 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts +13 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -0
- package/dist/modes/interactive/components/keybinding-hints.js +36 -0
- package/dist/modes/interactive/components/keybinding-hints.js.map +1 -0
- package/dist/modes/interactive/components/login-dialog.d.ts +52 -0
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -0
- package/dist/modes/interactive/components/login-dialog.js +179 -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 +279 -0
- package/dist/modes/interactive/components/model-selector.js.map +1 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts +31 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/oauth-selector.js +165 -0
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +42 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/scoped-models-selector.js +293 -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 +867 -0
- package/dist/modes/interactive/components/session-selector.js.map +1 -0
- package/dist/modes/interactive/components/settings-selector.d.ts +73 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/settings-selector.js +570 -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 +39 -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 +50 -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 +51 -0
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -0
- package/dist/modes/interactive/components/tool-execution.d.ts +63 -0
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -0
- package/dist/modes/interactive/components/tool-execution.js +317 -0
- package/dist/modes/interactive/components/tool-execution.js.map +1 -0
- package/dist/modes/interactive/components/tree-selector.d.ts +89 -0
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/tree-selector.js +1208 -0
- package/dist/modes/interactive/components/tree-selector.js.map +1 -0
- package/dist/modes/interactive/components/trust-selector.d.ts +23 -0
- package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/trust-selector.js +91 -0
- package/dist/modes/interactive/components/trust-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 +114 -0
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -0
- package/dist/modes/interactive/components/user-message.d.ts +10 -0
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/user-message.js +29 -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 +381 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-mode.js +4802 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -0
- package/dist/modes/interactive/model-search.d.ts +12 -0
- package/dist/modes/interactive/model-search.d.ts.map +1 -0
- package/dist/modes/interactive/model-search.js +15 -0
- package/dist/modes/interactive/model-search.js.map +1 -0
- package/dist/modes/interactive/theme/dark.json +86 -0
- package/dist/modes/interactive/theme/light.json +85 -0
- package/dist/modes/interactive/theme/theme-controller.d.ts +29 -0
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme-controller.js +102 -0
- package/dist/modes/interactive/theme/theme-controller.js.map +1 -0
- package/dist/modes/interactive/theme/theme-schema.json +336 -0
- package/dist/modes/interactive/theme/theme.d.ts +119 -0
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme.js +1056 -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 +132 -0
- package/dist/modes/print-mode.js.map +1 -0
- package/dist/modes/rpc/jsonl.d.ts +17 -0
- package/dist/modes/rpc/jsonl.d.ts.map +1 -0
- package/dist/modes/rpc/jsonl.js +49 -0
- package/dist/modes/rpc/jsonl.js.map +1 -0
- package/dist/modes/rpc/rpc-client.d.ts +227 -0
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-client.js +467 -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 +637 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -0
- package/dist/modes/rpc/rpc-types.d.ts +428 -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/package-manager-cli.d.ts +8 -0
- package/dist/package-manager-cli.d.ts.map +1 -0
- package/dist/package-manager-cli.js +659 -0
- package/dist/package-manager-cli.js.map +1 -0
- package/dist/skills/grill-me/SKILL.md +10 -0
- package/dist/skills/handoff/SKILL.md +15 -0
- package/dist/skills/implanger/SKILL.md +68 -0
- package/dist/skills/improve-codebase/REFERENCE.md +78 -0
- package/dist/skills/improve-codebase/SKILL.md +178 -0
- package/dist/skills/planger/SKILL.md +165 -0
- package/dist/skills/ponytail/SKILL.md +117 -0
- package/dist/skills/ponytail-audit/SKILL.md +41 -0
- package/dist/skills/ponytail-debt/SKILL.md +44 -0
- package/dist/skills/ponytail-gain/SKILL.md +50 -0
- package/dist/skills/ponytail-help/SKILL.md +69 -0
- package/dist/skills/ponytail-review/SKILL.md +57 -0
- package/dist/skills/selesai-default/SKILL.md +16 -0
- package/dist/themes/powerline-footer/theme.json +33 -0
- package/dist/utils/ansi.d.ts +2 -0
- package/dist/utils/ansi.d.ts.map +1 -0
- package/dist/utils/ansi.js +52 -0
- package/dist/utils/ansi.js.map +1 -0
- package/dist/utils/changelog.d.ts +22 -0
- package/dist/utils/changelog.d.ts.map +1 -0
- package/dist/utils/changelog.js +165 -0
- package/dist/utils/changelog.js.map +1 -0
- package/dist/utils/child-process.d.ts +18 -0
- package/dist/utils/child-process.d.ts.map +1 -0
- package/dist/utils/child-process.js +106 -0
- package/dist/utils/child-process.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 +245 -0
- package/dist/utils/clipboard-image.js.map +1 -0
- package/dist/utils/clipboard-native.d.ts +10 -0
- package/dist/utils/clipboard-native.d.ts.map +1 -0
- package/dist/utils/clipboard-native.js +20 -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 +117 -0
- package/dist/utils/clipboard.js.map +1 -0
- package/dist/utils/deprecation.d.ts +4 -0
- package/dist/utils/deprecation.d.ts.map +1 -0
- package/dist/utils/deprecation.js +13 -0
- package/dist/utils/deprecation.js.map +1 -0
- package/dist/utils/exif-orientation.d.ts +5 -0
- package/dist/utils/exif-orientation.d.ts.map +1 -0
- package/dist/utils/exif-orientation.js +158 -0
- package/dist/utils/exif-orientation.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/fs-watch.d.ts +5 -0
- package/dist/utils/fs-watch.d.ts.map +1 -0
- package/dist/utils/fs-watch.js +25 -0
- package/dist/utils/fs-watch.js.map +1 -0
- package/dist/utils/git.d.ts +26 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +195 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/html.d.ts +7 -0
- package/dist/utils/html.d.ts.map +1 -0
- package/dist/utils/html.js +40 -0
- package/dist/utils/html.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 +39 -0
- package/dist/utils/image-convert.js.map +1 -0
- package/dist/utils/image-resize-core.d.ts +30 -0
- package/dist/utils/image-resize-core.d.ts.map +1 -0
- package/dist/utils/image-resize-core.js +124 -0
- package/dist/utils/image-resize-core.js.map +1 -0
- package/dist/utils/image-resize-worker.d.ts +2 -0
- package/dist/utils/image-resize-worker.d.ts.map +1 -0
- package/dist/utils/image-resize-worker.js +31 -0
- package/dist/utils/image-resize-worker.js.map +1 -0
- package/dist/utils/image-resize.d.ts +16 -0
- package/dist/utils/image-resize.d.ts.map +1 -0
- package/dist/utils/image-resize.js +97 -0
- package/dist/utils/image-resize.js.map +1 -0
- package/dist/utils/json.d.ts +3 -0
- package/dist/utils/json.d.ts.map +1 -0
- package/dist/utils/json.js +7 -0
- package/dist/utils/json.js.map +1 -0
- package/dist/utils/mime.d.ts +3 -0
- package/dist/utils/mime.d.ts.map +1 -0
- package/dist/utils/mime.js +69 -0
- package/dist/utils/mime.js.map +1 -0
- package/dist/utils/open-browser.d.ts +9 -0
- package/dist/utils/open-browser.d.ts.map +1 -0
- package/dist/utils/open-browser.js +22 -0
- package/dist/utils/open-browser.js.map +1 -0
- package/dist/utils/paths.d.ts +31 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +92 -0
- package/dist/utils/paths.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/pi-user-agent.d.ts +2 -0
- package/dist/utils/pi-user-agent.d.ts.map +1 -0
- package/dist/utils/pi-user-agent.js +5 -0
- package/dist/utils/pi-user-agent.js.map +1 -0
- package/dist/utils/shell.d.ts +31 -0
- package/dist/utils/shell.d.ts.map +1 -0
- package/dist/utils/shell.js +202 -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/syntax-highlight.d.ts +12 -0
- package/dist/utils/syntax-highlight.d.ts.map +1 -0
- package/dist/utils/syntax-highlight.js +118 -0
- package/dist/utils/syntax-highlight.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 +328 -0
- package/dist/utils/tools-manager.js.map +1 -0
- package/dist/utils/version-check.d.ts +15 -0
- package/dist/utils/version-check.d.ts.map +1 -0
- package/dist/utils/version-check.js +52 -0
- package/dist/utils/version-check.js.map +1 -0
- package/dist/utils/windows-self-update.d.ts +3 -0
- package/dist/utils/windows-self-update.d.ts.map +1 -0
- package/dist/utils/windows-self-update.js +77 -0
- package/dist/utils/windows-self-update.js.map +1 -0
- package/docs/compaction.md +396 -0
- package/docs/containerization.md +111 -0
- package/docs/custom-provider.md +737 -0
- package/docs/development.md +71 -0
- package/docs/docs.json +156 -0
- package/docs/extensions.md +2681 -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/index.md +82 -0
- package/docs/json.md +82 -0
- package/docs/keybindings.md +197 -0
- package/docs/models.md +495 -0
- package/docs/packages.md +227 -0
- package/docs/prompt-templates.md +95 -0
- package/docs/providers.md +274 -0
- package/docs/quickstart.md +165 -0
- package/docs/rpc.md +1412 -0
- package/docs/sdk.md +1143 -0
- package/docs/security.md +59 -0
- package/docs/session-format.md +412 -0
- package/docs/sessions.md +145 -0
- package/docs/settings.md +308 -0
- package/docs/shell-aliases.md +13 -0
- package/docs/skills.md +231 -0
- package/docs/terminal-setup.md +142 -0
- package/docs/termux.md +127 -0
- package/docs/themes.md +295 -0
- package/docs/tmux.md +63 -0
- package/docs/tui.md +927 -0
- package/docs/usage.md +308 -0
- package/docs/windows.md +17 -0
- package/examples/README.md +25 -0
- package/examples/extensions/README.md +211 -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/border-status-editor.ts +150 -0
- package/examples/extensions/built-in-tool-renderer.ts +249 -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 +127 -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 +404 -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/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/dynamic-tools.ts +74 -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/git-merge-and-resolve.ts +115 -0
- package/examples/extensions/github-issue-autocomplete.ts +185 -0
- package/examples/extensions/gondolin/index.ts +531 -0
- package/examples/extensions/gondolin/package-lock.json +185 -0
- package/examples/extensions/gondolin/package.json +19 -0
- package/examples/extensions/handoff.ts +191 -0
- package/examples/extensions/hello.ts +26 -0
- package/examples/extensions/hidden-thinking-label.ts +53 -0
- package/examples/extensions/inline-bash.ts +94 -0
- package/examples/extensions/input-transform-streaming.ts +39 -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 +1450 -0
- package/examples/extensions/overlay-test.ts +153 -0
- package/examples/extensions/permission-gate.ts +34 -0
- package/examples/extensions/pirate.ts +47 -0
- package/examples/extensions/plan-mode/README.md +66 -0
- package/examples/extensions/plan-mode/index.ts +390 -0
- package/examples/extensions/plan-mode/utils.ts +168 -0
- package/examples/extensions/preset.ts +436 -0
- package/examples/extensions/project-trust.ts +64 -0
- package/examples/extensions/prompt-customizer.ts +97 -0
- package/examples/extensions/protected-paths.ts +30 -0
- package/examples/extensions/provider-payload.ts +18 -0
- package/examples/extensions/qna.ts +122 -0
- package/examples/extensions/question.ts +285 -0
- package/examples/extensions/questionnaire.ts +448 -0
- package/examples/extensions/rainbow-editor.ts +88 -0
- package/examples/extensions/reload-runtime.ts +37 -0
- package/examples/extensions/rpc-demo.ts +118 -0
- package/examples/extensions/sandbox/index.ts +321 -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 +32 -0
- package/examples/extensions/structured-output.ts +65 -0
- package/examples/extensions/subagent/README.md +175 -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 +126 -0
- package/examples/extensions/subagent/index.ts +1015 -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 +206 -0
- package/examples/extensions/system-prompt-header.ts +17 -0
- package/examples/extensions/tic-tac-toe.ts +1008 -0
- package/examples/extensions/timed-confirm.ts +70 -0
- package/examples/extensions/titlebar-spinner.ts +58 -0
- package/examples/extensions/todo.ts +297 -0
- package/examples/extensions/tool-override.ts +144 -0
- package/examples/extensions/tools.ts +146 -0
- package/examples/extensions/trigger-compact.ts +50 -0
- package/examples/extensions/truncated-tool.ts +195 -0
- package/examples/extensions/widget-placement.ts +9 -0
- package/examples/extensions/with-deps/index.ts +32 -0
- package/examples/extensions/with-deps/package-lock.json +31 -0
- package/examples/extensions/with-deps/package.json +22 -0
- package/examples/extensions/working-indicator.ts +123 -0
- package/examples/extensions/working-message-test.ts +25 -0
- package/examples/rpc-extension-ui.ts +632 -0
- package/examples/sdk/01-minimal.ts +26 -0
- package/examples/sdk/02-custom-model.ts +53 -0
- package/examples/sdk/03-custom-prompt.ts +75 -0
- package/examples/sdk/04-skills.ts +55 -0
- package/examples/sdk/05-tools.ts +48 -0
- package/examples/sdk/06-extensions.ts +99 -0
- package/examples/sdk/07-context-files.ts +47 -0
- package/examples/sdk/08-prompt-templates.ts +51 -0
- package/examples/sdk/09-api-keys-and-oauth.ts +52 -0
- package/examples/sdk/10-settings.ts +53 -0
- package/examples/sdk/11-sessions.ts +52 -0
- package/examples/sdk/12-full-control.ts +77 -0
- package/examples/sdk/13-session-runtime.ts +67 -0
- package/examples/sdk/README.md +144 -0
- package/package.json +65 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// ponytail — Claude Code SubagentStart hook
|
|
3
|
+
//
|
|
4
|
+
// SessionStart context is parent-thread only and never reaches subagents, so
|
|
5
|
+
// without this every Task-spawned agent runs ponytail-unaware (issue #252).
|
|
6
|
+
// When ponytail mode is active, inject the same ruleset into each subagent.
|
|
7
|
+
|
|
8
|
+
const { getPonytailInstructions } = require('./ponytail-instructions');
|
|
9
|
+
const { readMode, writeHookOutput } = require('./ponytail-runtime');
|
|
10
|
+
|
|
11
|
+
const mode = readMode();
|
|
12
|
+
|
|
13
|
+
// Absent flag or off → ponytail isn't active; inject nothing.
|
|
14
|
+
if (!mode || mode === 'off') {
|
|
15
|
+
process.exit(0);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
try {
|
|
19
|
+
writeHookOutput('SubagentStart', mode, getPonytailInstructions(mode));
|
|
20
|
+
} catch (e) {
|
|
21
|
+
// Silent fail — a stdout error at hook exit must not surface as a hook failure.
|
|
22
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@selesai/bundled-extensions",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"description": "Built-in extensions shipped with @selesai/code, loaded via additionalExtensionPaths at boot.",
|
|
6
|
+
"pi": {
|
|
7
|
+
"extensions": [
|
|
8
|
+
"./copy-turn.ts",
|
|
9
|
+
"./gitignore-guard.ts",
|
|
10
|
+
"./question.ts",
|
|
11
|
+
"./rtk.ts",
|
|
12
|
+
"./tps-tracker.ts",
|
|
13
|
+
"./undo.ts",
|
|
14
|
+
"./prototype.ts",
|
|
15
|
+
"./pi-powerline-footer",
|
|
16
|
+
"./pi-extension"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
|
|
3
|
+
const require = createRequire(import.meta.url);
|
|
4
|
+
const {
|
|
5
|
+
DEFAULT_MODE,
|
|
6
|
+
getDefaultMode,
|
|
7
|
+
normalizeMode,
|
|
8
|
+
normalizeConfigMode,
|
|
9
|
+
normalizePersistedMode,
|
|
10
|
+
isDeactivationCommand,
|
|
11
|
+
writeDefaultMode,
|
|
12
|
+
} = require("../hooks/ponytail-config.js");
|
|
13
|
+
const { getPonytailInstructions, filterSkillBodyForMode } = require("../hooks/ponytail-instructions.js");
|
|
14
|
+
|
|
15
|
+
export { filterSkillBodyForMode };
|
|
16
|
+
export const readDefaultMode = getDefaultMode;
|
|
17
|
+
|
|
18
|
+
export function resolveSessionMode(entries, fallbackMode = DEFAULT_MODE) {
|
|
19
|
+
const fallback = normalizePersistedMode(fallbackMode) || DEFAULT_MODE;
|
|
20
|
+
if (!Array.isArray(entries)) return fallback;
|
|
21
|
+
|
|
22
|
+
for (let i = entries.length - 1; i >= 0; i -= 1) {
|
|
23
|
+
const entry = entries[i];
|
|
24
|
+
if (entry?.type !== "custom" || entry?.customType !== "ponytail-mode") continue;
|
|
25
|
+
|
|
26
|
+
const mode = normalizePersistedMode(entry?.data?.mode);
|
|
27
|
+
if (mode) return mode;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return fallback;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function parsePonytailCommand(text, defaultMode = DEFAULT_MODE) {
|
|
34
|
+
const fallback = normalizePersistedMode(defaultMode) || DEFAULT_MODE;
|
|
35
|
+
const normalizedText = String(text || "").trim().toLowerCase();
|
|
36
|
+
|
|
37
|
+
if (!normalizedText) {
|
|
38
|
+
return { type: "set-mode", mode: fallback === "off" ? "full" : fallback };
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const [primary, secondary] = normalizedText.split(/\s+/);
|
|
42
|
+
|
|
43
|
+
if (primary === "status") return { type: "status" };
|
|
44
|
+
|
|
45
|
+
if (primary === "default") {
|
|
46
|
+
const mode = normalizeConfigMode(secondary);
|
|
47
|
+
return mode ? { type: "set-default", mode } : { type: "invalid", reason: "invalid-default-mode" };
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const mode = normalizeMode(primary);
|
|
51
|
+
return mode ? { type: "set-mode", mode } : { type: "invalid", reason: "invalid-mode", mode: primary };
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { writeDefaultMode };
|
|
55
|
+
|
|
56
|
+
export default function ponytailExtension(pi) {
|
|
57
|
+
let currentMode = DEFAULT_MODE;
|
|
58
|
+
let configuredDefaultMode = getDefaultMode();
|
|
59
|
+
let isActive = false;
|
|
60
|
+
let lastCtx = null;
|
|
61
|
+
|
|
62
|
+
// -- Status bar --
|
|
63
|
+
function syncStatus(ctx) {
|
|
64
|
+
if (ctx) lastCtx = ctx;
|
|
65
|
+
const c = ctx || lastCtx;
|
|
66
|
+
if (!c?.ui?.setStatus || !c.ui.theme?.fg) return;
|
|
67
|
+
const theme = c.ui.theme;
|
|
68
|
+
if (currentMode === "off") {
|
|
69
|
+
c.ui.setStatus("ponytail", "");
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const levelIcons = { lite: "🌿", full: "⚡", ultra: "🔥" };
|
|
73
|
+
const icon = levelIcons[currentMode] || "";
|
|
74
|
+
const label = currentMode.toUpperCase();
|
|
75
|
+
const indicator = isActive ? theme.fg("accent", "●") : theme.fg("dim", "○");
|
|
76
|
+
c.ui.setStatus("ponytail", indicator + " 🐴 " + theme.fg("muted", "ponytail: ") + theme.fg("text", icon + " " + label));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const setMode = (mode, ctx) => {
|
|
80
|
+
const normalized = normalizePersistedMode(mode);
|
|
81
|
+
if (!normalized) return;
|
|
82
|
+
|
|
83
|
+
currentMode = normalized;
|
|
84
|
+
pi.appendEntry("ponytail-mode", { mode: normalized });
|
|
85
|
+
syncStatus(ctx);
|
|
86
|
+
ctx?.ui?.notify?.(`Ponytail mode set to ${normalized}.`, "info");
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
const sendAlias = (skillName, args, ctx) => {
|
|
90
|
+
const normalized = String(args || "").trim();
|
|
91
|
+
const message = normalized ? `${skillName} ${normalized}` : skillName;
|
|
92
|
+
|
|
93
|
+
if (ctx?.isIdle?.() === false) {
|
|
94
|
+
pi.sendUserMessage(message, { deliverAs: "followUp" });
|
|
95
|
+
ctx?.ui?.notify?.(`${skillName} queued as follow-up.`, "info");
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
pi.sendUserMessage(message);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
pi.registerCommand("ponytail", {
|
|
103
|
+
description: "Set or report Ponytail mode",
|
|
104
|
+
handler: async (args, ctx) => {
|
|
105
|
+
const parsed = parsePonytailCommand(args, configuredDefaultMode);
|
|
106
|
+
|
|
107
|
+
if (parsed.type === "status") {
|
|
108
|
+
ctx?.ui?.notify?.(`Ponytail: current ${currentMode} • default ${configuredDefaultMode}`, "info");
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (parsed.type === "set-default") {
|
|
113
|
+
const written = writeDefaultMode(parsed.mode);
|
|
114
|
+
if (written) {
|
|
115
|
+
configuredDefaultMode = getDefaultMode();
|
|
116
|
+
const message = configuredDefaultMode === written
|
|
117
|
+
? `Default Ponytail mode set to ${written}.`
|
|
118
|
+
: `Saved default ${written}, but env override keeps default at ${configuredDefaultMode}.`;
|
|
119
|
+
ctx?.ui?.notify?.(message, "info");
|
|
120
|
+
}
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (parsed.type === "set-mode") {
|
|
125
|
+
setMode(parsed.mode, ctx);
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
ctx?.ui?.notify?.("Unknown or unsupported /ponytail mode.", "warning");
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
pi.registerCommand("ponytail-review", {
|
|
134
|
+
description: "Run /skill:ponytail-review",
|
|
135
|
+
handler: (_args, ctx) => sendAlias("/skill:ponytail-review", "", ctx),
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
pi.registerCommand("ponytail-audit", {
|
|
139
|
+
description: "Run /skill:ponytail-audit",
|
|
140
|
+
handler: (_args, ctx) => sendAlias("/skill:ponytail-audit", "", ctx),
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
pi.registerCommand("ponytail-gain", {
|
|
144
|
+
description: "Run /skill:ponytail-gain",
|
|
145
|
+
handler: (_args, ctx) => sendAlias("/skill:ponytail-gain", "", ctx),
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
pi.registerCommand("ponytail-debt", {
|
|
149
|
+
description: "Run /skill:ponytail-debt",
|
|
150
|
+
handler: (_args, ctx) => sendAlias("/skill:ponytail-debt", "", ctx),
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
pi.registerCommand("ponytail-help", {
|
|
154
|
+
description: "Run /skill:ponytail-help",
|
|
155
|
+
handler: (_args, ctx) => sendAlias("/skill:ponytail-help", "", ctx),
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
pi.on("input", async (event) => {
|
|
159
|
+
if (event?.source === "extension") return;
|
|
160
|
+
|
|
161
|
+
const text = String(event?.text || "");
|
|
162
|
+
if (currentMode !== "off" && isDeactivationCommand(text)) {
|
|
163
|
+
setMode("off");
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
pi.on("session_start", async (_event, ctx) => {
|
|
168
|
+
const entries = ctx?.sessionManager?.getBranch?.() || ctx?.sessionManager?.getEntries?.() || [];
|
|
169
|
+
configuredDefaultMode = getDefaultMode();
|
|
170
|
+
currentMode = resolveSessionMode(entries, configuredDefaultMode);
|
|
171
|
+
syncStatus(ctx);
|
|
172
|
+
ctx?.ui?.notify?.(`Ponytail loaded: ${currentMode}`, "info");
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
pi.on("agent_start", async (_event, ctx) => {
|
|
176
|
+
isActive = true;
|
|
177
|
+
syncStatus(ctx);
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
pi.on("agent_end", async (_event, ctx) => {
|
|
181
|
+
isActive = false;
|
|
182
|
+
syncStatus(ctx);
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
pi.on("before_agent_start", async (event) => {
|
|
186
|
+
if (!currentMode || currentMode === "off") return;
|
|
187
|
+
return { systemPrompt: `${event.systemPrompt}\n\n${getPonytailInstructions(currentMode)}` };
|
|
188
|
+
});
|
|
189
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { mkdtempSync, rmSync } from "node:fs";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import test from "node:test";
|
|
6
|
+
|
|
7
|
+
import ponytailExtension from "../index.js";
|
|
8
|
+
|
|
9
|
+
function createPiHarness() {
|
|
10
|
+
const events = new Map();
|
|
11
|
+
const commands = new Map();
|
|
12
|
+
const appendedEntries = [];
|
|
13
|
+
const sentUserMessages = [];
|
|
14
|
+
|
|
15
|
+
const pi = {
|
|
16
|
+
on(eventName, handler) {
|
|
17
|
+
events.set(eventName, handler);
|
|
18
|
+
},
|
|
19
|
+
registerCommand(name, options) {
|
|
20
|
+
commands.set(name, options);
|
|
21
|
+
},
|
|
22
|
+
appendEntry(customType, data) {
|
|
23
|
+
appendedEntries.push({ customType, data });
|
|
24
|
+
},
|
|
25
|
+
sendUserMessage(text, options) {
|
|
26
|
+
sentUserMessages.push({ text, options });
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
ponytailExtension(pi);
|
|
31
|
+
return { events, commands, appendedEntries, sentUserMessages };
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function createCommandContext(overrides = {}) {
|
|
35
|
+
return {
|
|
36
|
+
isIdle: () => true,
|
|
37
|
+
sessionManager: { getEntries: () => [] },
|
|
38
|
+
ui: { notify() {} },
|
|
39
|
+
...overrides,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function withTempConfig(fn) {
|
|
44
|
+
const tempConfigHome = mkdtempSync(join(tmpdir(), "ponytail-test-"));
|
|
45
|
+
const previousXdg = process.env.XDG_CONFIG_HOME;
|
|
46
|
+
process.env.XDG_CONFIG_HOME = tempConfigHome;
|
|
47
|
+
|
|
48
|
+
return Promise.resolve()
|
|
49
|
+
.then(fn)
|
|
50
|
+
.finally(() => {
|
|
51
|
+
if (previousXdg === undefined) delete process.env.XDG_CONFIG_HOME;
|
|
52
|
+
else process.env.XDG_CONFIG_HOME = previousXdg;
|
|
53
|
+
rmSync(tempConfigHome, { recursive: true, force: true });
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
test("extension registers Ponytail commands", () => {
|
|
58
|
+
const { commands } = createPiHarness();
|
|
59
|
+
|
|
60
|
+
assert.deepEqual([...commands.keys()].sort(), ["ponytail", "ponytail-audit", "ponytail-debt", "ponytail-gain", "ponytail-help", "ponytail-review"]);
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
test("/ponytail updates session mode and injects instructions", async () => withTempConfig(async () => {
|
|
64
|
+
const { commands, events, appendedEntries } = createPiHarness();
|
|
65
|
+
const ctx = createCommandContext();
|
|
66
|
+
|
|
67
|
+
await events.get("session_start")({ reason: "startup" }, ctx);
|
|
68
|
+
await commands.get("ponytail").handler("ultra", ctx);
|
|
69
|
+
|
|
70
|
+
assert.deepEqual(appendedEntries.at(-1), {
|
|
71
|
+
customType: "ponytail-mode",
|
|
72
|
+
data: { mode: "ultra" },
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
const result = await events.get("before_agent_start")({ systemPrompt: "BASE" }, ctx);
|
|
76
|
+
assert.ok(result.systemPrompt.includes("PONYTAIL MODE ACTIVE"));
|
|
77
|
+
assert.ok(result.systemPrompt.includes("ultra"));
|
|
78
|
+
}));
|
|
79
|
+
|
|
80
|
+
test("session_start restores latest persisted mode", async () => withTempConfig(async () => {
|
|
81
|
+
const { events } = createPiHarness();
|
|
82
|
+
const ctx = createCommandContext({
|
|
83
|
+
sessionManager: {
|
|
84
|
+
getEntries: () => [
|
|
85
|
+
{ type: "custom", customType: "ponytail-mode", data: { mode: "lite" } },
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
await events.get("session_start")({ reason: "resume" }, ctx);
|
|
91
|
+
const result = await events.get("before_agent_start")({ systemPrompt: "BASE" }, ctx);
|
|
92
|
+
|
|
93
|
+
assert.ok(result.systemPrompt.includes("lite"));
|
|
94
|
+
}));
|
|
95
|
+
|
|
96
|
+
test("skill alias commands delegate to Pi skill commands", async () => {
|
|
97
|
+
const { commands, sentUserMessages } = createPiHarness();
|
|
98
|
+
const ctx = createCommandContext();
|
|
99
|
+
|
|
100
|
+
await commands.get("ponytail-review").handler("", ctx);
|
|
101
|
+
await commands.get("ponytail-audit").handler("", ctx);
|
|
102
|
+
await commands.get("ponytail-debt").handler("", ctx);
|
|
103
|
+
await commands.get("ponytail-gain").handler("", ctx);
|
|
104
|
+
await commands.get("ponytail-help").handler("", ctx);
|
|
105
|
+
|
|
106
|
+
assert.deepEqual(sentUserMessages.map((entry) => entry.text), [
|
|
107
|
+
"/skill:ponytail-review",
|
|
108
|
+
"/skill:ponytail-audit",
|
|
109
|
+
"/skill:ponytail-debt",
|
|
110
|
+
"/skill:ponytail-gain",
|
|
111
|
+
"/skill:ponytail-help",
|
|
112
|
+
]);
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
test("normal mode disables persistent instructions", async () => withTempConfig(async () => {
|
|
116
|
+
const { commands, events } = createPiHarness();
|
|
117
|
+
const ctx = createCommandContext();
|
|
118
|
+
|
|
119
|
+
await events.get("session_start")({ reason: "startup" }, ctx);
|
|
120
|
+
await commands.get("ponytail").handler("ultra", ctx);
|
|
121
|
+
await events.get("input")({ text: "normal mode", source: "interactive" }, ctx);
|
|
122
|
+
|
|
123
|
+
const disabled = await events.get("before_agent_start")({ systemPrompt: "BASE" }, ctx);
|
|
124
|
+
assert.equal(disabled, undefined);
|
|
125
|
+
}));
|
|
126
|
+
|
|
127
|
+
test("a request mentioning normal mode stays active", async () => withTempConfig(async () => {
|
|
128
|
+
const { commands, events } = createPiHarness();
|
|
129
|
+
const ctx = createCommandContext();
|
|
130
|
+
|
|
131
|
+
await events.get("session_start")({ reason: "startup" }, ctx);
|
|
132
|
+
await commands.get("ponytail").handler("ultra", ctx);
|
|
133
|
+
await events.get("input")({ text: "add a normal mode toggle next to dark mode", source: "interactive" }, ctx);
|
|
134
|
+
|
|
135
|
+
const result = await events.get("before_agent_start")({ systemPrompt: "BASE" }, ctx);
|
|
136
|
+
assert.match(result.systemPrompt, /PONYTAIL MODE ACTIVE/);
|
|
137
|
+
}));
|
|
138
|
+
|
|
139
|
+
test("status bar renders the mode and flips active on agent_start", async () => withTempConfig(async () => {
|
|
140
|
+
const { events } = createPiHarness();
|
|
141
|
+
const statusWrites = [];
|
|
142
|
+
const ctx = createCommandContext({
|
|
143
|
+
sessionManager: { getEntries: () => [{ type: "custom", customType: "ponytail-mode", data: { mode: "ultra" } }] },
|
|
144
|
+
ui: { notify() {}, setStatus: (key, text) => statusWrites.push({ key, text }), theme: { fg: (_color, text) => text } },
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
await events.get("session_start")({ reason: "resume" }, ctx);
|
|
148
|
+
await events.get("agent_start")({}, ctx);
|
|
149
|
+
|
|
150
|
+
assert.equal(statusWrites.at(-2).key, "ponytail");
|
|
151
|
+
assert.match(statusWrites.at(-2).text, /○.*ULTRA/);
|
|
152
|
+
assert.match(statusWrites.at(-1).text, /●.*ULTRA/);
|
|
153
|
+
}));
|
|
154
|
+
|
|
155
|
+
test("status bar stays silent when ui lacks a theme", async () => withTempConfig(async () => {
|
|
156
|
+
const { events } = createPiHarness();
|
|
157
|
+
const calls = [];
|
|
158
|
+
const ctx = createCommandContext({
|
|
159
|
+
sessionManager: { getEntries: () => [{ type: "custom", customType: "ponytail-mode", data: { mode: "ultra" } }] },
|
|
160
|
+
ui: { notify() {}, setStatus: (_key, text) => calls.push(text) }, // setStatus present, theme absent
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
await events.get("session_start")({ reason: "resume" }, ctx);
|
|
164
|
+
await events.get("agent_start")({}, ctx);
|
|
165
|
+
|
|
166
|
+
assert.deepEqual(calls, []);
|
|
167
|
+
}));
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { existsSync, mkdtempSync, readFileSync, rmSync } from "node:fs";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import test from "node:test";
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
filterSkillBodyForMode,
|
|
9
|
+
parsePonytailCommand,
|
|
10
|
+
readDefaultMode,
|
|
11
|
+
resolveSessionMode,
|
|
12
|
+
writeDefaultMode,
|
|
13
|
+
} from "../index.js";
|
|
14
|
+
|
|
15
|
+
test("parsePonytailCommand falls back to full when invoked bare and default is off", () => {
|
|
16
|
+
assert.deepEqual(parsePonytailCommand("", "off"), { type: "set-mode", mode: "full" });
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
test("parsePonytailCommand parses modes, status, and default subcommand", () => {
|
|
20
|
+
assert.deepEqual(parsePonytailCommand("ultra", "full"), { type: "set-mode", mode: "ultra" });
|
|
21
|
+
assert.deepEqual(parsePonytailCommand("status", "full"), { type: "status" });
|
|
22
|
+
assert.deepEqual(parsePonytailCommand("default lite", "full"), { type: "set-default", mode: "lite" });
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
test("resolveSessionMode prefers latest persisted session mode", () => {
|
|
26
|
+
const entries = [
|
|
27
|
+
{ type: "custom", customType: "ponytail-mode", data: { mode: "lite" } },
|
|
28
|
+
{ type: "custom", customType: "ponytail-mode", data: { mode: "ultra" } },
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
assert.equal(resolveSessionMode(entries, "full"), "ultra");
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
test("resolveSessionMode returns fallback when entries is not an array", () => {
|
|
35
|
+
assert.equal(resolveSessionMode(null, "ultra"), "ultra");
|
|
36
|
+
assert.equal(resolveSessionMode(undefined, "lite"), "lite");
|
|
37
|
+
assert.equal(resolveSessionMode({}, "full"), "full");
|
|
38
|
+
assert.equal(resolveSessionMode("not an array"), "full"); // DEFAULT_MODE fallback
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
test("readDefaultMode and writeDefaultMode use XDG config path", () => {
|
|
42
|
+
const tempDir = mkdtempSync(join(tmpdir(), "ponytail-config-"));
|
|
43
|
+
const previousXdg = process.env.XDG_CONFIG_HOME;
|
|
44
|
+
const previousDefault = process.env.PONYTAIL_DEFAULT_MODE;
|
|
45
|
+
const configPath = join(tempDir, "ponytail", "config.json");
|
|
46
|
+
process.env.XDG_CONFIG_HOME = tempDir;
|
|
47
|
+
delete process.env.PONYTAIL_DEFAULT_MODE;
|
|
48
|
+
|
|
49
|
+
try {
|
|
50
|
+
assert.equal(readDefaultMode(), "full");
|
|
51
|
+
assert.equal(writeDefaultMode("ultra"), "ultra");
|
|
52
|
+
assert.equal(readDefaultMode(), "ultra");
|
|
53
|
+
assert.ok(existsSync(configPath));
|
|
54
|
+
assert.deepEqual(JSON.parse(readFileSync(configPath, "utf8")), { defaultMode: "ultra" });
|
|
55
|
+
} finally {
|
|
56
|
+
if (previousXdg === undefined) delete process.env.XDG_CONFIG_HOME;
|
|
57
|
+
else process.env.XDG_CONFIG_HOME = previousXdg;
|
|
58
|
+
if (previousDefault === undefined) delete process.env.PONYTAIL_DEFAULT_MODE;
|
|
59
|
+
else process.env.PONYTAIL_DEFAULT_MODE = previousDefault;
|
|
60
|
+
rmSync(tempDir, { recursive: true, force: true });
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
test("filterSkillBodyForMode keeps only requested intensity examples and rows", () => {
|
|
65
|
+
const body = `---\nname: ponytail\n---\n| **lite** | keep lite |\n| **full** | keep full |\n| **ultra** | keep ultra |\n- lite: Lite example\n- full: Full example\n- ultra: Ultra example\nOther line`;
|
|
66
|
+
|
|
67
|
+
const filtered = filterSkillBodyForMode(body, "ultra");
|
|
68
|
+
|
|
69
|
+
assert.ok(!filtered.includes("keep lite"));
|
|
70
|
+
assert.ok(!filtered.includes("keep full"));
|
|
71
|
+
assert.ok(filtered.includes("keep ultra"));
|
|
72
|
+
assert.ok(!filtered.includes("Lite example"));
|
|
73
|
+
assert.ok(filtered.includes("Ultra example"));
|
|
74
|
+
assert.ok(filtered.includes("Other line"));
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
test("filterSkillBodyForMode keeps rule bullets that contain a colon", () => {
|
|
78
|
+
// Regression: rule bullets outside the Intensity section (e.g. the
|
|
79
|
+
// "No unrequested abstractions:" rule or the `ponytail:` comment convention)
|
|
80
|
+
// contain a colon and must not be mistaken for mode-example lines.
|
|
81
|
+
const skillPath = new URL("../../skills/ponytail/SKILL.md", import.meta.url);
|
|
82
|
+
const body = readFileSync(skillPath, "utf8");
|
|
83
|
+
|
|
84
|
+
const filtered = filterSkillBodyForMode(body, "full");
|
|
85
|
+
|
|
86
|
+
assert.ok(filtered.includes("No unrequested abstractions"));
|
|
87
|
+
assert.ok(filtered.includes("Mark deliberate simplifications"));
|
|
88
|
+
// The Intensity examples are still filtered down to the active mode.
|
|
89
|
+
assert.ok(filtered.includes('full: "`@lru_cache'));
|
|
90
|
+
assert.ok(!filtered.includes('lite: "Done'));
|
|
91
|
+
assert.ok(!filtered.includes('ultra: "No cache'));
|
|
92
|
+
});
|