@code-yeongyu/senpi 0.74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4225 -0
- package/README.md +654 -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 +13 -0
- package/dist/bun/restore-sandbox-env.d.ts.map +1 -0
- package/dist/bun/restore-sandbox-env.js +32 -0
- package/dist/bun/restore-sandbox-env.js.map +1 -0
- package/dist/cli/args.d.ts +53 -0
- package/dist/cli/args.d.ts.map +1 -0
- package/dist/cli/args.js +342 -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 +83 -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/session-picker.d.ts +9 -0
- package/dist/cli/session-picker.d.ts.map +1 -0
- package/dist/cli/session-picker.js +35 -0
- package/dist/cli/session-picker.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +20 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +92 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +399 -0
- package/dist/config.js.map +1 -0
- package/dist/core/agent-session-runtime.d.ts +117 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -0
- package/dist/core/agent-session-runtime.js +300 -0
- package/dist/core/agent-session-runtime.js.map +1 -0
- package/dist/core/agent-session-services.d.ts +93 -0
- package/dist/core/agent-session-services.d.ts.map +1 -0
- package/dist/core/agent-session-services.js +118 -0
- package/dist/core/agent-session-services.js.map +1 -0
- package/dist/core/agent-session.d.ts +643 -0
- package/dist/core/agent-session.d.ts.map +1 -0
- package/dist/core/agent-session.js +2702 -0
- package/dist/core/agent-session.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 +141 -0
- package/dist/core/auth-storage.d.ts.map +1 -0
- package/dist/core/auth-storage.js +441 -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 +93 -0
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -0
- package/dist/core/compaction/branch-summarization.js +285 -0
- package/dist/core/compaction/branch-summarization.js.map +1 -0
- package/dist/core/compaction/compaction.d.ts +129 -0
- package/dist/core/compaction/compaction.d.ts.map +1 -0
- package/dist/core/compaction/compaction.js +635 -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 +165 -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/dynamic-prompt/build.d.ts +15 -0
- package/dist/core/dynamic-prompt/build.d.ts.map +1 -0
- package/dist/core/dynamic-prompt/build.js +61 -0
- package/dist/core/dynamic-prompt/build.js.map +1 -0
- package/dist/core/dynamic-prompt/exploration.d.ts +2 -0
- package/dist/core/dynamic-prompt/exploration.d.ts.map +1 -0
- package/dist/core/dynamic-prompt/exploration.js +8 -0
- package/dist/core/dynamic-prompt/exploration.js.map +1 -0
- package/dist/core/dynamic-prompt/identity.d.ts +2 -0
- package/dist/core/dynamic-prompt/identity.d.ts.map +1 -0
- package/dist/core/dynamic-prompt/identity.js +4 -0
- package/dist/core/dynamic-prompt/identity.js.map +1 -0
- package/dist/core/dynamic-prompt/index.d.ts +13 -0
- package/dist/core/dynamic-prompt/index.d.ts.map +1 -0
- package/dist/core/dynamic-prompt/index.js +11 -0
- package/dist/core/dynamic-prompt/index.js.map +1 -0
- package/dist/core/dynamic-prompt/intent-gate.d.ts +5 -0
- package/dist/core/dynamic-prompt/intent-gate.d.ts.map +1 -0
- package/dist/core/dynamic-prompt/intent-gate.js +57 -0
- package/dist/core/dynamic-prompt/intent-gate.js.map +1 -0
- package/dist/core/dynamic-prompt/parallel-tools.d.ts +2 -0
- package/dist/core/dynamic-prompt/parallel-tools.d.ts.map +1 -0
- package/dist/core/dynamic-prompt/parallel-tools.js +10 -0
- package/dist/core/dynamic-prompt/parallel-tools.js.map +1 -0
- package/dist/core/dynamic-prompt/policies.d.ts +2 -0
- package/dist/core/dynamic-prompt/policies.d.ts.map +1 -0
- package/dist/core/dynamic-prompt/policies.js +14 -0
- package/dist/core/dynamic-prompt/policies.js.map +1 -0
- package/dist/core/dynamic-prompt/style.d.ts +2 -0
- package/dist/core/dynamic-prompt/style.d.ts.map +1 -0
- package/dist/core/dynamic-prompt/style.js +10 -0
- package/dist/core/dynamic-prompt/style.js.map +1 -0
- package/dist/core/dynamic-prompt/tool-categorization.d.ts +4 -0
- package/dist/core/dynamic-prompt/tool-categorization.d.ts.map +1 -0
- package/dist/core/dynamic-prompt/tool-categorization.js +26 -0
- package/dist/core/dynamic-prompt/tool-categorization.js.map +1 -0
- package/dist/core/dynamic-prompt/tool-section.d.ts +7 -0
- package/dist/core/dynamic-prompt/tool-section.d.ts.map +1 -0
- package/dist/core/dynamic-prompt/tool-section.js +46 -0
- package/dist/core/dynamic-prompt/tool-section.js.map +1 -0
- package/dist/core/dynamic-prompt/types.d.ts +5 -0
- package/dist/core/dynamic-prompt/types.d.ts.map +1 -0
- package/dist/core/dynamic-prompt/types.js +2 -0
- package/dist/core/dynamic-prompt/types.js.map +1 -0
- package/dist/core/dynamic-prompt/verification.d.ts +2 -0
- package/dist/core/dynamic-prompt/verification.d.ts.map +1 -0
- package/dist/core/dynamic-prompt/verification.js +12 -0
- package/dist/core/dynamic-prompt/verification.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/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 +224 -0
- package/dist/core/export-html/index.js.map +1 -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/extensions/builtin/agent-system/agent-types.d.ts +25 -0
- package/dist/core/extensions/builtin/agent-system/agent-types.d.ts.map +1 -0
- package/dist/core/extensions/builtin/agent-system/agent-types.js +38 -0
- package/dist/core/extensions/builtin/agent-system/agent-types.js.map +1 -0
- package/dist/core/extensions/builtin/agent-system/builtin-agents.d.ts +3 -0
- package/dist/core/extensions/builtin/agent-system/builtin-agents.d.ts.map +1 -0
- package/dist/core/extensions/builtin/agent-system/builtin-agents.js +32 -0
- package/dist/core/extensions/builtin/agent-system/builtin-agents.js.map +1 -0
- package/dist/core/extensions/builtin/agent-system/index.d.ts +3 -0
- package/dist/core/extensions/builtin/agent-system/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/agent-system/index.js +42 -0
- package/dist/core/extensions/builtin/agent-system/index.js.map +1 -0
- package/dist/core/extensions/builtin/agent-system/loader.d.ts +4 -0
- package/dist/core/extensions/builtin/agent-system/loader.d.ts.map +1 -0
- package/dist/core/extensions/builtin/agent-system/loader.js +59 -0
- package/dist/core/extensions/builtin/agent-system/loader.js.map +1 -0
- package/dist/core/extensions/builtin/agent-system/permission.d.ts +11 -0
- package/dist/core/extensions/builtin/agent-system/permission.d.ts.map +1 -0
- package/dist/core/extensions/builtin/agent-system/permission.js +24 -0
- package/dist/core/extensions/builtin/agent-system/permission.js.map +1 -0
- package/dist/core/extensions/builtin/agent-system/registry.d.ts +10 -0
- package/dist/core/extensions/builtin/agent-system/registry.d.ts.map +1 -0
- package/dist/core/extensions/builtin/agent-system/registry.js +50 -0
- package/dist/core/extensions/builtin/agent-system/registry.js.map +1 -0
- package/dist/core/extensions/builtin/agent-system/types.d.ts +9 -0
- package/dist/core/extensions/builtin/agent-system/types.d.ts.map +1 -0
- package/dist/core/extensions/builtin/agent-system/types.js +2 -0
- package/dist/core/extensions/builtin/agent-system/types.js.map +1 -0
- package/dist/core/extensions/builtin/agent-system/wildcard.d.ts +4 -0
- package/dist/core/extensions/builtin/agent-system/wildcard.d.ts.map +1 -0
- package/dist/core/extensions/builtin/agent-system/wildcard.js +58 -0
- package/dist/core/extensions/builtin/agent-system/wildcard.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-bash/index.d.ts +7 -0
- package/dist/core/extensions/builtin/anthropic-bash/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-bash/index.js +79 -0
- package/dist/core/extensions/builtin/anthropic-bash/index.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-code-execution/index.d.ts +7 -0
- package/dist/core/extensions/builtin/anthropic-code-execution/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-code-execution/index.js +79 -0
- package/dist/core/extensions/builtin/anthropic-code-execution/index.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-computer-use/index.d.ts +53 -0
- package/dist/core/extensions/builtin/anthropic-computer-use/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-computer-use/index.js +676 -0
- package/dist/core/extensions/builtin/anthropic-computer-use/index.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-text-editor/index.d.ts +25 -0
- package/dist/core/extensions/builtin/anthropic-text-editor/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-text-editor/index.js +244 -0
- package/dist/core/extensions/builtin/anthropic-text-editor/index.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-tool-search/index.d.ts +6 -0
- package/dist/core/extensions/builtin/anthropic-tool-search/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-tool-search/index.js +112 -0
- package/dist/core/extensions/builtin/anthropic-tool-search/index.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-web-fetch/index.d.ts +7 -0
- package/dist/core/extensions/builtin/anthropic-web-fetch/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-web-fetch/index.js +112 -0
- package/dist/core/extensions/builtin/anthropic-web-fetch/index.js.map +1 -0
- package/dist/core/extensions/builtin/anthropic-web-search/index.d.ts +7 -0
- package/dist/core/extensions/builtin/anthropic-web-search/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/anthropic-web-search/index.js +102 -0
- package/dist/core/extensions/builtin/anthropic-web-search/index.js.map +1 -0
- package/dist/core/extensions/builtin/background-task/cancel-tool.d.ts +10 -0
- package/dist/core/extensions/builtin/background-task/cancel-tool.d.ts.map +1 -0
- package/dist/core/extensions/builtin/background-task/cancel-tool.js +109 -0
- package/dist/core/extensions/builtin/background-task/cancel-tool.js.map +1 -0
- package/dist/core/extensions/builtin/background-task/index.d.ts +3 -0
- package/dist/core/extensions/builtin/background-task/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/background-task/index.js +207 -0
- package/dist/core/extensions/builtin/background-task/index.js.map +1 -0
- package/dist/core/extensions/builtin/background-task/manager.d.ts +17 -0
- package/dist/core/extensions/builtin/background-task/manager.d.ts.map +1 -0
- package/dist/core/extensions/builtin/background-task/manager.js +114 -0
- package/dist/core/extensions/builtin/background-task/manager.js.map +1 -0
- package/dist/core/extensions/builtin/background-task/notification.d.ts +22 -0
- package/dist/core/extensions/builtin/background-task/notification.d.ts.map +1 -0
- package/dist/core/extensions/builtin/background-task/notification.js +105 -0
- package/dist/core/extensions/builtin/background-task/notification.js.map +1 -0
- package/dist/core/extensions/builtin/background-task/output-tool.d.ts +11 -0
- package/dist/core/extensions/builtin/background-task/output-tool.d.ts.map +1 -0
- package/dist/core/extensions/builtin/background-task/output-tool.js +127 -0
- package/dist/core/extensions/builtin/background-task/output-tool.js.map +1 -0
- package/dist/core/extensions/builtin/background-task/spawner.d.ts +8 -0
- package/dist/core/extensions/builtin/background-task/spawner.d.ts.map +1 -0
- package/dist/core/extensions/builtin/background-task/spawner.js +207 -0
- package/dist/core/extensions/builtin/background-task/spawner.js.map +1 -0
- package/dist/core/extensions/builtin/background-task/task-tool.d.ts +20 -0
- package/dist/core/extensions/builtin/background-task/task-tool.d.ts.map +1 -0
- package/dist/core/extensions/builtin/background-task/task-tool.js +302 -0
- package/dist/core/extensions/builtin/background-task/task-tool.js.map +1 -0
- package/dist/core/extensions/builtin/background-task/types.d.ts +72 -0
- package/dist/core/extensions/builtin/background-task/types.d.ts.map +1 -0
- package/dist/core/extensions/builtin/background-task/types.js +32 -0
- package/dist/core/extensions/builtin/background-task/types.js.map +1 -0
- package/dist/core/extensions/builtin/bash-timeout/index.d.ts +5 -0
- package/dist/core/extensions/builtin/bash-timeout/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/bash-timeout/index.js +20 -0
- package/dist/core/extensions/builtin/bash-timeout/index.js.map +1 -0
- package/dist/core/extensions/builtin/bash-timeout/timeout.d.ts +17 -0
- package/dist/core/extensions/builtin/bash-timeout/timeout.d.ts.map +1 -0
- package/dist/core/extensions/builtin/bash-timeout/timeout.js +28 -0
- package/dist/core/extensions/builtin/bash-timeout/timeout.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/checkpoint-state.d.ts +46 -0
- package/dist/core/extensions/builtin/compaction/checkpoint-state.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/checkpoint-state.js +131 -0
- package/dist/core/extensions/builtin/compaction/checkpoint-state.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/circuit-breaker.d.ts +23 -0
- package/dist/core/extensions/builtin/compaction/circuit-breaker.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/circuit-breaker.js +36 -0
- package/dist/core/extensions/builtin/compaction/circuit-breaker.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/degradation-monitor.d.ts +67 -0
- package/dist/core/extensions/builtin/compaction/degradation-monitor.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/degradation-monitor.js +90 -0
- package/dist/core/extensions/builtin/compaction/degradation-monitor.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/index.d.ts +3 -0
- package/dist/core/extensions/builtin/compaction/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/index.js +199 -0
- package/dist/core/extensions/builtin/compaction/index.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/overflow-detection.d.ts +11 -0
- package/dist/core/extensions/builtin/compaction/overflow-detection.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/overflow-detection.js +40 -0
- package/dist/core/extensions/builtin/compaction/overflow-detection.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/per-turn-cap.d.ts +15 -0
- package/dist/core/extensions/builtin/compaction/per-turn-cap.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/per-turn-cap.js +26 -0
- package/dist/core/extensions/builtin/compaction/per-turn-cap.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/policy.d.ts +19 -0
- package/dist/core/extensions/builtin/compaction/policy.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/policy.js +96 -0
- package/dist/core/extensions/builtin/compaction/policy.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/prompts.d.ts +16 -0
- package/dist/core/extensions/builtin/compaction/prompts.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/prompts.js +252 -0
- package/dist/core/extensions/builtin/compaction/prompts.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/restoration-tracker.d.ts +57 -0
- package/dist/core/extensions/builtin/compaction/restoration-tracker.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/restoration-tracker.js +274 -0
- package/dist/core/extensions/builtin/compaction/restoration-tracker.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/speculative.d.ts +58 -0
- package/dist/core/extensions/builtin/compaction/speculative.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/speculative.js +230 -0
- package/dist/core/extensions/builtin/compaction/speculative.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/state.d.ts +17 -0
- package/dist/core/extensions/builtin/compaction/state.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/state.js +15 -0
- package/dist/core/extensions/builtin/compaction/state.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/todo-bridge.d.ts +25 -0
- package/dist/core/extensions/builtin/compaction/todo-bridge.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/todo-bridge.js +77 -0
- package/dist/core/extensions/builtin/compaction/todo-bridge.js.map +1 -0
- package/dist/core/extensions/builtin/compaction/tool-truncation.d.ts +4 -0
- package/dist/core/extensions/builtin/compaction/tool-truncation.d.ts.map +1 -0
- package/dist/core/extensions/builtin/compaction/tool-truncation.js +85 -0
- package/dist/core/extensions/builtin/compaction/tool-truncation.js.map +1 -0
- package/dist/core/extensions/builtin/diff.d.ts +9 -0
- package/dist/core/extensions/builtin/diff.d.ts.map +1 -0
- package/dist/core/extensions/builtin/diff.js +188 -0
- package/dist/core/extensions/builtin/diff.js.map +1 -0
- package/dist/core/extensions/builtin/files.d.ts +9 -0
- package/dist/core/extensions/builtin/files.d.ts.map +1 -0
- package/dist/core/extensions/builtin/files.js +186 -0
- package/dist/core/extensions/builtin/files.js.map +1 -0
- package/dist/core/extensions/builtin/google-code-execution/index.d.ts +7 -0
- package/dist/core/extensions/builtin/google-code-execution/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/google-code-execution/index.js +73 -0
- package/dist/core/extensions/builtin/google-code-execution/index.js.map +1 -0
- package/dist/core/extensions/builtin/google-google-search/index.d.ts +7 -0
- package/dist/core/extensions/builtin/google-google-search/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/google-google-search/index.js +83 -0
- package/dist/core/extensions/builtin/google-google-search/index.js.map +1 -0
- package/dist/core/extensions/builtin/google-url-context/index.d.ts +7 -0
- package/dist/core/extensions/builtin/google-url-context/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/google-url-context/index.js +82 -0
- package/dist/core/extensions/builtin/google-url-context/index.js.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/apply.d.ts +6 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/apply.d.ts.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/apply.js +159 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/apply.js.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/constants.d.ts +8 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/constants.d.ts.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/constants.js +29 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/constants.js.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/errors.d.ts +8 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/errors.d.ts.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/errors.js +14 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/errors.js.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/extension.d.ts +6 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/extension.d.ts.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/extension.js +54 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/extension.js.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/index.d.ts +12 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/index.js +11 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/index.js.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/params.d.ts +3 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/params.d.ts.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/params.js +13 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/params.js.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/parser.d.ts +3 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/parser.d.ts.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/parser.js +157 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/parser.js.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/patch-diff.d.ts +6 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/patch-diff.d.ts.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/patch-diff.js +36 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/patch-diff.js.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/patch-replace.d.ts +6 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/patch-replace.d.ts.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/patch-replace.js +50 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/patch-replace.js.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/preview-format.d.ts +13 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/preview-format.d.ts.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/preview-format.js +306 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/preview-format.js.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/preview.d.ts +7 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/preview.d.ts.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/preview.js +73 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/preview.js.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/seek-sequence.d.ts +6 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/seek-sequence.d.ts.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/seek-sequence.js +49 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/seek-sequence.js.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-parser.d.ts +23 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-parser.d.ts.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-parser.js +197 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-parser.js.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-render.d.ts +4 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-render.d.ts.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-render.js +76 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/streaming-render.js.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/text.d.ts +4 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/text.d.ts.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/text.js +16 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/text.js.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/tool.d.ts +3 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/tool.d.ts.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/tool.js +116 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/tool.js.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/types.d.ts +109 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/types.d.ts.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/types.js +2 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/types.js.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/workspace.d.ts +2 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/workspace.d.ts.map +1 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/workspace.js +5 -0
- package/dist/core/extensions/builtin/gpt-apply-patch/workspace.js.map +1 -0
- package/dist/core/extensions/builtin/index.d.ts +18 -0
- package/dist/core/extensions/builtin/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/index.js +58 -0
- package/dist/core/extensions/builtin/index.js.map +1 -0
- package/dist/core/extensions/builtin/openai-api-parallel-tool-calls/index.d.ts +6 -0
- package/dist/core/extensions/builtin/openai-api-parallel-tool-calls/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/openai-api-parallel-tool-calls/index.js +57 -0
- package/dist/core/extensions/builtin/openai-api-parallel-tool-calls/index.js.map +1 -0
- package/dist/core/extensions/builtin/openai-code-interpreter/index.d.ts +10 -0
- package/dist/core/extensions/builtin/openai-code-interpreter/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/openai-code-interpreter/index.js +95 -0
- package/dist/core/extensions/builtin/openai-code-interpreter/index.js.map +1 -0
- package/dist/core/extensions/builtin/openai-web-search/index.d.ts +7 -0
- package/dist/core/extensions/builtin/openai-web-search/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/openai-web-search/index.js +111 -0
- package/dist/core/extensions/builtin/openai-web-search/index.js.map +1 -0
- package/dist/core/extensions/builtin/permission-system/arity.d.ts +4 -0
- package/dist/core/extensions/builtin/permission-system/arity.d.ts.map +1 -0
- package/dist/core/extensions/builtin/permission-system/arity.js +168 -0
- package/dist/core/extensions/builtin/permission-system/arity.js.map +1 -0
- package/dist/core/extensions/builtin/permission-system/cli.d.ts +6 -0
- package/dist/core/extensions/builtin/permission-system/cli.d.ts.map +1 -0
- package/dist/core/extensions/builtin/permission-system/cli.js +33 -0
- package/dist/core/extensions/builtin/permission-system/cli.js.map +1 -0
- package/dist/core/extensions/builtin/permission-system/config.d.ts +7 -0
- package/dist/core/extensions/builtin/permission-system/config.d.ts.map +1 -0
- package/dist/core/extensions/builtin/permission-system/config.js +49 -0
- package/dist/core/extensions/builtin/permission-system/config.js.map +1 -0
- package/dist/core/extensions/builtin/permission-system/evaluate.d.ts +9 -0
- package/dist/core/extensions/builtin/permission-system/evaluate.d.ts.map +1 -0
- package/dist/core/extensions/builtin/permission-system/evaluate.js +14 -0
- package/dist/core/extensions/builtin/permission-system/evaluate.js.map +1 -0
- package/dist/core/extensions/builtin/permission-system/events.d.ts +67 -0
- package/dist/core/extensions/builtin/permission-system/events.d.ts.map +1 -0
- package/dist/core/extensions/builtin/permission-system/events.js +63 -0
- package/dist/core/extensions/builtin/permission-system/events.js.map +1 -0
- package/dist/core/extensions/builtin/permission-system/external-dir.d.ts +4 -0
- package/dist/core/extensions/builtin/permission-system/external-dir.d.ts.map +1 -0
- package/dist/core/extensions/builtin/permission-system/external-dir.js +138 -0
- package/dist/core/extensions/builtin/permission-system/external-dir.js.map +1 -0
- package/dist/core/extensions/builtin/permission-system/index.d.ts +3 -0
- package/dist/core/extensions/builtin/permission-system/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/permission-system/index.js +134 -0
- package/dist/core/extensions/builtin/permission-system/index.js.map +1 -0
- package/dist/core/extensions/builtin/permission-system/non-interactive.d.ts +9 -0
- package/dist/core/extensions/builtin/permission-system/non-interactive.d.ts.map +1 -0
- package/dist/core/extensions/builtin/permission-system/non-interactive.js +43 -0
- package/dist/core/extensions/builtin/permission-system/non-interactive.js.map +1 -0
- package/dist/core/extensions/builtin/permission-system/parsers.d.ts +16 -0
- package/dist/core/extensions/builtin/permission-system/parsers.d.ts.map +1 -0
- package/dist/core/extensions/builtin/permission-system/parsers.js +150 -0
- package/dist/core/extensions/builtin/permission-system/parsers.js.map +1 -0
- package/dist/core/extensions/builtin/permission-system/prompt.d.ts +4 -0
- package/dist/core/extensions/builtin/permission-system/prompt.d.ts.map +1 -0
- package/dist/core/extensions/builtin/permission-system/prompt.js +74 -0
- package/dist/core/extensions/builtin/permission-system/prompt.js.map +1 -0
- package/dist/core/extensions/builtin/permission-system/service.d.ts +27 -0
- package/dist/core/extensions/builtin/permission-system/service.d.ts.map +1 -0
- package/dist/core/extensions/builtin/permission-system/service.js +129 -0
- package/dist/core/extensions/builtin/permission-system/service.js.map +1 -0
- package/dist/core/extensions/builtin/permission-system/settings.d.ts +18 -0
- package/dist/core/extensions/builtin/permission-system/settings.d.ts.map +1 -0
- package/dist/core/extensions/builtin/permission-system/settings.js +23 -0
- package/dist/core/extensions/builtin/permission-system/settings.js.map +1 -0
- package/dist/core/extensions/builtin/permission-system/storage.d.ts +6 -0
- package/dist/core/extensions/builtin/permission-system/storage.d.ts.map +1 -0
- package/dist/core/extensions/builtin/permission-system/storage.js +58 -0
- package/dist/core/extensions/builtin/permission-system/storage.js.map +1 -0
- package/dist/core/extensions/builtin/permission-system/types.d.ts +61 -0
- package/dist/core/extensions/builtin/permission-system/types.d.ts.map +1 -0
- package/dist/core/extensions/builtin/permission-system/types.js +29 -0
- package/dist/core/extensions/builtin/permission-system/types.js.map +1 -0
- package/dist/core/extensions/builtin/permission-system/wildcard.d.ts +4 -0
- package/dist/core/extensions/builtin/permission-system/wildcard.d.ts.map +1 -0
- package/dist/core/extensions/builtin/permission-system/wildcard.js +58 -0
- package/dist/core/extensions/builtin/permission-system/wildcard.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-5.d.ts +3 -0
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-5.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-5.js +8 -0
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-5.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-6.d.ts +3 -0
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-6.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-6.js +8 -0
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-6.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-7.d.ts +3 -0
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-7.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-7.js +10 -0
- package/dist/core/extensions/builtin/prompt-preset/claude-opus-4-7.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/file-operations.d.ts +2 -0
- package/dist/core/extensions/builtin/prompt-preset/file-operations.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/file-operations.js +31 -0
- package/dist/core/extensions/builtin/prompt-preset/file-operations.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.2.d.ts +3 -0
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.2.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.2.js +17 -0
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.2.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.3-codex.d.ts +3 -0
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.3-codex.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.3-codex.js +15 -0
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.3-codex.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.4.d.ts +3 -0
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.4.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.4.js +15 -0
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.4.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.5.d.ts +3 -0
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.5.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.5.js +21 -0
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.5.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.d.ts +3 -0
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.js +13 -0
- package/dist/core/extensions/builtin/prompt-preset/gpt-5.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/index.d.ts +3 -0
- package/dist/core/extensions/builtin/prompt-preset/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/index.js +56 -0
- package/dist/core/extensions/builtin/prompt-preset/index.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/kimi-k2-6.d.ts +3 -0
- package/dist/core/extensions/builtin/prompt-preset/kimi-k2-6.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/kimi-k2-6.js +10 -0
- package/dist/core/extensions/builtin/prompt-preset/kimi-k2-6.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/presets.d.ts +12 -0
- package/dist/core/extensions/builtin/prompt-preset/presets.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/presets.js +101 -0
- package/dist/core/extensions/builtin/prompt-preset/presets.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/settings.d.ts +7 -0
- package/dist/core/extensions/builtin/prompt-preset/settings.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-preset/settings.js +26 -0
- package/dist/core/extensions/builtin/prompt-preset/settings.js.map +1 -0
- package/dist/core/extensions/builtin/prompt-url-widget.d.ts +3 -0
- package/dist/core/extensions/builtin/prompt-url-widget.d.ts.map +1 -0
- package/dist/core/extensions/builtin/prompt-url-widget.js +127 -0
- package/dist/core/extensions/builtin/prompt-url-widget.js.map +1 -0
- package/dist/core/extensions/builtin/redraws.d.ts +8 -0
- package/dist/core/extensions/builtin/redraws.d.ts.map +1 -0
- package/dist/core/extensions/builtin/redraws.js +23 -0
- package/dist/core/extensions/builtin/redraws.js.map +1 -0
- package/dist/core/extensions/builtin/service-tier.d.ts +6 -0
- package/dist/core/extensions/builtin/service-tier.d.ts.map +1 -0
- package/dist/core/extensions/builtin/service-tier.js +29 -0
- package/dist/core/extensions/builtin/service-tier.js.map +1 -0
- package/dist/core/extensions/builtin/system-messages.d.ts +47 -0
- package/dist/core/extensions/builtin/system-messages.d.ts.map +1 -0
- package/dist/core/extensions/builtin/system-messages.js +117 -0
- package/dist/core/extensions/builtin/system-messages.js.map +1 -0
- package/dist/core/extensions/builtin/todotools/continuation/config.d.ts +10 -0
- package/dist/core/extensions/builtin/todotools/continuation/config.d.ts.map +1 -0
- package/dist/core/extensions/builtin/todotools/continuation/config.js +33 -0
- package/dist/core/extensions/builtin/todotools/continuation/config.js.map +1 -0
- package/dist/core/extensions/builtin/todotools/continuation/index.d.ts +2 -0
- package/dist/core/extensions/builtin/todotools/continuation/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/todotools/continuation/index.js +2 -0
- package/dist/core/extensions/builtin/todotools/continuation/index.js.map +1 -0
- package/dist/core/extensions/builtin/todotools/continuation/prompt.d.ts +5 -0
- package/dist/core/extensions/builtin/todotools/continuation/prompt.d.ts.map +1 -0
- package/dist/core/extensions/builtin/todotools/continuation/prompt.js +34 -0
- package/dist/core/extensions/builtin/todotools/continuation/prompt.js.map +1 -0
- package/dist/core/extensions/builtin/todotools/continuation/runtime.d.ts +11 -0
- package/dist/core/extensions/builtin/todotools/continuation/runtime.d.ts.map +1 -0
- package/dist/core/extensions/builtin/todotools/continuation/runtime.js +204 -0
- package/dist/core/extensions/builtin/todotools/continuation/runtime.js.map +1 -0
- package/dist/core/extensions/builtin/todotools/index.d.ts +5 -0
- package/dist/core/extensions/builtin/todotools/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/todotools/index.js +39 -0
- package/dist/core/extensions/builtin/todotools/index.js.map +1 -0
- package/dist/core/extensions/builtin/todotools/prompt.d.ts +2 -0
- package/dist/core/extensions/builtin/todotools/prompt.d.ts.map +1 -0
- package/dist/core/extensions/builtin/todotools/prompt.js +164 -0
- package/dist/core/extensions/builtin/todotools/prompt.js.map +1 -0
- package/dist/core/extensions/builtin/todotools/state.d.ts +29 -0
- package/dist/core/extensions/builtin/todotools/state.d.ts.map +1 -0
- package/dist/core/extensions/builtin/todotools/state.js +74 -0
- package/dist/core/extensions/builtin/todotools/state.js.map +1 -0
- package/dist/core/extensions/builtin/todotools/tools/todoread.d.ts +4 -0
- package/dist/core/extensions/builtin/todotools/tools/todoread.d.ts.map +1 -0
- package/dist/core/extensions/builtin/todotools/tools/todoread.js +35 -0
- package/dist/core/extensions/builtin/todotools/tools/todoread.js.map +1 -0
- package/dist/core/extensions/builtin/todotools/tools/todowrite.d.ts +10 -0
- package/dist/core/extensions/builtin/todotools/tools/todowrite.d.ts.map +1 -0
- package/dist/core/extensions/builtin/todotools/tools/todowrite.js +92 -0
- package/dist/core/extensions/builtin/todotools/tools/todowrite.js.map +1 -0
- package/dist/core/extensions/builtin/tool-pair-guard/index.d.ts +4 -0
- package/dist/core/extensions/builtin/tool-pair-guard/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/tool-pair-guard/index.js +11 -0
- package/dist/core/extensions/builtin/tool-pair-guard/index.js.map +1 -0
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.d.ts +3 -0
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.d.ts.map +1 -0
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.js +75 -0
- package/dist/core/extensions/builtin/tool-pair-guard/sanitize-anthropic-payload.js.map +1 -0
- package/dist/core/extensions/builtin/tps.d.ts +3 -0
- package/dist/core/extensions/builtin/tps.d.ts.map +1 -0
- package/dist/core/extensions/builtin/tps.js +65 -0
- package/dist/core/extensions/builtin/tps.js.map +1 -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 +27 -0
- package/dist/core/extensions/loader.d.ts.map +1 -0
- package/dist/core/extensions/loader.js +505 -0
- package/dist/core/extensions/loader.js.map +1 -0
- package/dist/core/extensions/runner.d.ts +164 -0
- package/dist/core/extensions/runner.d.ts.map +1 -0
- package/dist/core/extensions/runner.js +900 -0
- package/dist/core/extensions/runner.js.map +1 -0
- package/dist/core/extensions/types.d.ts +1240 -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 +52 -0
- package/dist/core/footer-data-provider.d.ts.map +1 -0
- package/dist/core/footer-data-provider.js +310 -0
- package/dist/core/footer-data-provider.js.map +1 -0
- package/dist/core/index.d.ts +12 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +12 -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 +79 -0
- package/dist/core/messages.d.ts.map +1 -0
- package/dist/core/messages.js +138 -0
- package/dist/core/messages.js.map +1 -0
- package/dist/core/model-registry.d.ts +177 -0
- package/dist/core/model-registry.d.ts.map +1 -0
- package/dist/core/model-registry.js +853 -0
- package/dist/core/model-registry.js.map +1 -0
- package/dist/core/model-resolver.d.ts +116 -0
- package/dist/core/model-resolver.d.ts.map +1 -0
- package/dist/core/model-resolver.js +498 -0
- package/dist/core/model-resolver.js.map +1 -0
- package/dist/core/output-guard.d.ts +6 -0
- package/dist/core/output-guard.d.ts.map +1 -0
- package/dist/core/output-guard.js +59 -0
- package/dist/core/output-guard.js.map +1 -0
- package/dist/core/package-manager.d.ts +198 -0
- package/dist/core/package-manager.d.ts.map +1 -0
- package/dist/core/package-manager.js +1995 -0
- package/dist/core/package-manager.js.map +1 -0
- package/dist/core/prompt-templates.d.ts +52 -0
- package/dist/core/prompt-templates.d.ts.map +1 -0
- package/dist/core/prompt-templates.js +250 -0
- package/dist/core/prompt-templates.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 +33 -0
- package/dist/core/provider-display-names.js.map +1 -0
- package/dist/core/resolve-config-value.d.ts +23 -0
- package/dist/core/resolve-config-value.d.ts.map +1 -0
- package/dist/core/resolve-config-value.js +126 -0
- package/dist/core/resolve-config-value.js.map +1 -0
- package/dist/core/resource-loader.d.ts +184 -0
- package/dist/core/resource-loader.d.ts.map +1 -0
- package/dist/core/resource-loader.js +771 -0
- package/dist/core/resource-loader.js.map +1 -0
- package/dist/core/sdk.d.ts +129 -0
- package/dist/core/sdk.d.ts.map +1 -0
- package/dist/core/sdk.js +339 -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 +333 -0
- package/dist/core/session-manager.d.ts.map +1 -0
- package/dist/core/session-manager.js +1128 -0
- package/dist/core/session-manager.js.map +1 -0
- package/dist/core/settings-manager.d.ts +294 -0
- package/dist/core/settings-manager.d.ts.map +1 -0
- package/dist/core/settings-manager.js +810 -0
- package/dist/core/settings-manager.js.map +1 -0
- package/dist/core/skills.d.ts +60 -0
- package/dist/core/skills.d.ts.map +1 -0
- package/dist/core/skills.js +404 -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 +25 -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 +28 -0
- package/dist/core/system-prompt.d.ts.map +1 -0
- package/dist/core/system-prompt.js +120 -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 +335 -0
- package/dist/core/tools/bash.js.map +1 -0
- package/dist/core/tools/edit-diff.d.ts +85 -0
- package/dist/core/tools/edit-diff.d.ts.map +1 -0
- package/dist/core/tools/edit-diff.js +338 -0
- package/dist/core/tools/edit-diff.js.map +1 -0
- package/dist/core/tools/edit.d.ts +49 -0
- package/dist/core/tools/edit.d.ts.map +1 -0
- package/dist/core/tools/edit.js +324 -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 +37 -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 +298 -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 +169 -0
- package/dist/core/tools/ls.js.map +1 -0
- package/dist/core/tools/output-accumulator.d.ts +50 -0
- package/dist/core/tools/output-accumulator.d.ts.map +1 -0
- package/dist/core/tools/output-accumulator.js +178 -0
- package/dist/core/tools/output-accumulator.js.map +1 -0
- package/dist/core/tools/path-utils.d.ts +8 -0
- package/dist/core/tools/path-utils.d.ts.map +1 -0
- package/dist/core/tools/path-utils.js +81 -0
- package/dist/core/tools/path-utils.js.map +1 -0
- package/dist/core/tools/read.d.ts +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 +21 -0
- package/dist/core/tools/render-utils.d.ts.map +1 -0
- package/dist/core/tools/render-utils.js +49 -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 +36 -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 +205 -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 +213 -0
- package/dist/core/tools/write.js.map +1 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +41 -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 +603 -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 +311 -0
- package/dist/migrations.js.map +1 -0
- package/dist/modes/index.d.ts +9 -0
- package/dist/modes/index.d.ts.map +1 -0
- package/dist/modes/index.js +8 -0
- package/dist/modes/index.js.map +1 -0
- package/dist/modes/interactive/components/armin.d.ts +34 -0
- package/dist/modes/interactive/components/armin.d.ts.map +1 -0
- package/dist/modes/interactive/components/armin.js +333 -0
- package/dist/modes/interactive/components/armin.js.map +1 -0
- package/dist/modes/interactive/components/assistant-message.d.ts +32 -0
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -0
- package/dist/modes/interactive/components/assistant-message.js +209 -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 +503 -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 +111 -0
- package/dist/modes/interactive/components/extension-editor.js.map +1 -0
- package/dist/modes/interactive/components/extension-input.d.ts +23 -0
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -0
- package/dist/modes/interactive/components/extension-input.js +61 -0
- package/dist/modes/interactive/components/extension-input.js.map +1 -0
- package/dist/modes/interactive/components/extension-selector.d.ts +24 -0
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/extension-selector.js +78 -0
- package/dist/modes/interactive/components/extension-selector.js.map +1 -0
- package/dist/modes/interactive/components/favorite-models-selector.d.ts +42 -0
- package/dist/modes/interactive/components/favorite-models-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/favorite-models-selector.js +302 -0
- package/dist/modes/interactive/components/favorite-models-selector.js.map +1 -0
- package/dist/modes/interactive/components/footer.d.ts +27 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -0
- package/dist/modes/interactive/components/footer.js +193 -0
- package/dist/modes/interactive/components/footer.js.map +1 -0
- package/dist/modes/interactive/components/index.d.ts +32 -0
- package/dist/modes/interactive/components/index.d.ts.map +1 -0
- package/dist/modes/interactive/components/index.js +33 -0
- package/dist/modes/interactive/components/index.js.map +1 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts +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 +46 -0
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -0
- package/dist/modes/interactive/components/login-dialog.js +160 -0
- package/dist/modes/interactive/components/login-dialog.js.map +1 -0
- package/dist/modes/interactive/components/model-selector.d.ts +48 -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/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 +96 -0
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/session-selector.js +861 -0
- package/dist/modes/interactive/components/session-selector.js.map +1 -0
- package/dist/modes/interactive/components/settings-selector.d.ts +67 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/settings-selector.js +376 -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 +52 -0
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -0
- package/dist/modes/interactive/components/tool-execution.d.ts +66 -0
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -0
- package/dist/modes/interactive/components/tool-execution.js +339 -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 +1102 -0
- package/dist/modes/interactive/components/tree-selector.js.map +1 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts +30 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -0
- package/dist/modes/interactive/components/user-message-selector.js +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 +360 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-mode.js +4615 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -0
- package/dist/modes/interactive/startup-tools.d.ts +8 -0
- package/dist/modes/interactive/startup-tools.d.ts.map +1 -0
- package/dist/modes/interactive/startup-tools.js +6 -0
- package/dist/modes/interactive/startup-tools.js.map +1 -0
- package/dist/modes/interactive/theme/theme.d.ts +81 -0
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme.js +973 -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 +144 -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 +224 -0
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-client.js +410 -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 +601 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -0
- package/dist/modes/rpc/rpc-types.d.ts +419 -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 +4 -0
- package/dist/package-manager-cli.d.ts.map +1 -0
- package/dist/package-manager-cli.js +460 -0
- package/dist/package-manager-cli.js.map +1 -0
- package/dist/senpi +20 -0
- package/dist/utils/changelog.d.ts +21 -0
- package/dist/utils/changelog.d.ts.map +1 -0
- package/dist/utils/changelog.js +87 -0
- package/dist/utils/changelog.js.map +1 -0
- package/dist/utils/child-process.d.ts +12 -0
- package/dist/utils/child-process.d.ts.map +1 -0
- package/dist/utils/child-process.js +86 -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 +8 -0
- package/dist/utils/clipboard-native.d.ts.map +1 -0
- package/dist/utils/clipboard-native.js +14 -0
- package/dist/utils/clipboard-native.js.map +1 -0
- package/dist/utils/clipboard.d.ts +2 -0
- package/dist/utils/clipboard.d.ts.map +1 -0
- package/dist/utils/clipboard.js +117 -0
- package/dist/utils/clipboard.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 +163 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/image-convert.d.ts +9 -0
- package/dist/utils/image-convert.d.ts.map +1 -0
- package/dist/utils/image-convert.js +39 -0
- package/dist/utils/image-convert.js.map +1 -0
- package/dist/utils/image-resize.d.ts +36 -0
- package/dist/utils/image-resize.d.ts.map +1 -0
- package/dist/utils/image-resize.js +137 -0
- package/dist/utils/image-resize.js.map +1 -0
- package/dist/utils/mime.d.ts +2 -0
- package/dist/utils/mime.d.ts.map +1 -0
- package/dist/utils/mime.js +26 -0
- package/dist/utils/mime.js.map +1 -0
- package/dist/utils/paths.d.ts +16 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +50 -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 +6 -0
- package/dist/utils/pi-user-agent.js.map +1 -0
- package/dist/utils/shell.d.ts +30 -0
- package/dist/utils/shell.d.ts.map +1 -0
- package/dist/utils/shell.js +190 -0
- package/dist/utils/shell.js.map +1 -0
- package/dist/utils/sleep.d.ts +5 -0
- package/dist/utils/sleep.d.ts.map +1 -0
- package/dist/utils/sleep.js +17 -0
- package/dist/utils/sleep.js.map +1 -0
- package/dist/utils/tools-manager.d.ts +3 -0
- package/dist/utils/tools-manager.d.ts.map +1 -0
- package/dist/utils/tools-manager.js +256 -0
- package/dist/utils/tools-manager.js.map +1 -0
- package/dist/utils/version-check.d.ts +14 -0
- package/dist/utils/version-check.d.ts.map +1 -0
- package/dist/utils/version-check.js +78 -0
- package/dist/utils/version-check.js.map +1 -0
- package/docs/agents.md +348 -0
- package/docs/compaction-guide.md +240 -0
- package/docs/compaction.md +394 -0
- package/docs/custom-provider.md +646 -0
- package/docs/development.md +80 -0
- package/docs/docs.json +148 -0
- package/docs/extensions.md +2596 -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 +66 -0
- package/docs/json.md +82 -0
- package/docs/keybindings.md +197 -0
- package/docs/models.md +474 -0
- package/docs/packages.md +223 -0
- package/docs/prompt-templates.md +88 -0
- package/docs/providers.md +243 -0
- package/docs/quickstart.md +142 -0
- package/docs/rpc.md +1407 -0
- package/docs/sdk.md +1149 -0
- package/docs/session-format.md +412 -0
- package/docs/sessions.md +137 -0
- package/docs/settings.md +330 -0
- package/docs/shell-aliases.md +13 -0
- package/docs/skills.md +232 -0
- package/docs/terminal-setup.md +106 -0
- package/docs/termux.md +127 -0
- package/docs/themes.md +295 -0
- package/docs/tmux.md +61 -0
- package/docs/tui.md +918 -0
- package/docs/usage.md +277 -0
- package/docs/windows.md +17 -0
- package/examples/README.md +25 -0
- package/examples/extensions/README.md +208 -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 +349 -0
- package/examples/extensions/custom-provider-gitlab-duo/package.json +16 -0
- package/examples/extensions/custom-provider-gitlab-duo/test.ts +82 -0
- package/examples/extensions/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/github-issue-autocomplete.ts +185 -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.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 +1348 -0
- package/examples/extensions/overlay-test.ts +150 -0
- package/examples/extensions/permission-gate.ts +34 -0
- package/examples/extensions/pirate.ts +47 -0
- package/examples/extensions/plan-mode/README.md +65 -0
- package/examples/extensions/plan-mode/index.ts +340 -0
- package/examples/extensions/plan-mode/utils.ts +168 -0
- package/examples/extensions/preset.ts +436 -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 +264 -0
- package/examples/extensions/questionnaire.ts +427 -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 +172 -0
- package/examples/extensions/subagent/agents/planner.md +37 -0
- package/examples/extensions/subagent/agents/reviewer.md +35 -0
- package/examples/extensions/subagent/agents/scout.md +50 -0
- package/examples/extensions/subagent/agents/worker.md +24 -0
- package/examples/extensions/subagent/agents.ts +126 -0
- package/examples/extensions/subagent/index.ts +987 -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 +141 -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 +22 -0
- package/examples/sdk/02-custom-model.ts +49 -0
- package/examples/sdk/03-custom-prompt.ts +72 -0
- package/examples/sdk/04-skills.ts +55 -0
- package/examples/sdk/05-tools.ts +44 -0
- package/examples/sdk/06-extensions.ts +90 -0
- package/examples/sdk/07-context-files.ts +42 -0
- package/examples/sdk/08-prompt-templates.ts +51 -0
- package/examples/sdk/09-api-keys-and-oauth.ts +48 -0
- package/examples/sdk/10-settings.ts +53 -0
- package/examples/sdk/11-sessions.ts +48 -0
- package/examples/sdk/12-full-control.ts +73 -0
- package/examples/sdk/13-session-runtime.ts +67 -0
- package/examples/sdk/README.md +147 -0
- package/package.json +105 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type StartupTool = "fd" | "rg";
|
|
2
|
+
export interface StartupToolPaths {
|
|
3
|
+
fdPath?: string;
|
|
4
|
+
}
|
|
5
|
+
export type StartupToolPathResolver = (tool: StartupTool) => string | null;
|
|
6
|
+
export declare function resolveStartupToolPaths(getPath?: StartupToolPathResolver): StartupToolPaths;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=startup-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"startup-tools.d.ts","sourceRoot":"","sources":["../../../src/modes/interactive/startup-tools.ts"],"names":[],"mappings":"AAEA,KAAK,WAAW,GAAG,IAAI,GAAG,IAAI,CAAC;AAE/B,MAAM,WAAW,gBAAgB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,uBAAuB,GAAG,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,GAAG,IAAI,CAAC;AAE3E,wBAAgB,uBAAuB,CAAC,OAAO,GAAE,uBAAqC,GAAG,gBAAgB,CAGxG","sourcesContent":["import { getToolPath } from \"../../utils/tools-manager.js\";\n\ntype StartupTool = \"fd\" | \"rg\";\n\nexport interface StartupToolPaths {\n\tfdPath?: string;\n}\n\nexport type StartupToolPathResolver = (tool: StartupTool) => string | null;\n\nexport function resolveStartupToolPaths(getPath: StartupToolPathResolver = getToolPath): StartupToolPaths {\n\tconst fdPath = getPath(\"fd\") ?? undefined;\n\treturn { fdPath };\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"startup-tools.js","sourceRoot":"","sources":["../../../src/modes/interactive/startup-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAU3D,MAAM,UAAU,uBAAuB,CAAC,OAAO,GAA4B,WAAW,EAAoB;IACzG,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC;IAC1C,OAAO,EAAE,MAAM,EAAE,CAAC;AAAA,CAClB","sourcesContent":["import { getToolPath } from \"../../utils/tools-manager.js\";\n\ntype StartupTool = \"fd\" | \"rg\";\n\nexport interface StartupToolPaths {\n\tfdPath?: string;\n}\n\nexport type StartupToolPathResolver = (tool: StartupTool) => string | null;\n\nexport function resolveStartupToolPaths(getPath: StartupToolPathResolver = getToolPath): StartupToolPaths {\n\tconst fdPath = getPath(\"fd\") ?? undefined;\n\treturn { fdPath };\n}\n"]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { EditorTheme, MarkdownTheme, SelectListTheme } from "@earendil-works/pi-tui";
|
|
2
|
+
import type { SourceInfo } from "../../../core/source-info.js";
|
|
3
|
+
export type ThemeColor = "accent" | "border" | "borderAccent" | "borderMuted" | "success" | "error" | "warning" | "muted" | "dim" | "text" | "thinkingText" | "userMessageText" | "customMessageText" | "customMessageLabel" | "toolTitle" | "toolOutput" | "mdHeading" | "mdLink" | "mdLinkUrl" | "mdCode" | "mdCodeBlock" | "mdCodeBlockBorder" | "mdQuote" | "mdQuoteBorder" | "mdHr" | "mdListBullet" | "toolDiffAdded" | "toolDiffRemoved" | "toolDiffContext" | "syntaxComment" | "syntaxKeyword" | "syntaxFunction" | "syntaxVariable" | "syntaxString" | "syntaxNumber" | "syntaxType" | "syntaxOperator" | "syntaxPunctuation" | "thinkingOff" | "thinkingMinimal" | "thinkingLow" | "thinkingMedium" | "thinkingHigh" | "thinkingXhigh" | "bashMode";
|
|
4
|
+
export type ThemeBg = "selectedBg" | "userMessageBg" | "customMessageBg" | "toolPendingBg" | "toolSuccessBg" | "toolErrorBg";
|
|
5
|
+
type ColorMode = "truecolor" | "256color";
|
|
6
|
+
export declare class Theme {
|
|
7
|
+
readonly name?: string;
|
|
8
|
+
readonly sourcePath?: string;
|
|
9
|
+
sourceInfo?: SourceInfo;
|
|
10
|
+
private fgColors;
|
|
11
|
+
private bgColors;
|
|
12
|
+
private mode;
|
|
13
|
+
constructor(fgColors: Record<ThemeColor, string | number>, bgColors: Record<ThemeBg, string | number>, mode: ColorMode, options?: {
|
|
14
|
+
name?: string;
|
|
15
|
+
sourcePath?: string;
|
|
16
|
+
sourceInfo?: SourceInfo;
|
|
17
|
+
});
|
|
18
|
+
fg(color: ThemeColor, text: string): string;
|
|
19
|
+
bg(color: ThemeBg, text: string): string;
|
|
20
|
+
bold(text: string): string;
|
|
21
|
+
italic(text: string): string;
|
|
22
|
+
underline(text: string): string;
|
|
23
|
+
inverse(text: string): string;
|
|
24
|
+
strikethrough(text: string): string;
|
|
25
|
+
getFgAnsi(color: ThemeColor): string;
|
|
26
|
+
getBgAnsi(color: ThemeBg): string;
|
|
27
|
+
getColorMode(): ColorMode;
|
|
28
|
+
getThinkingBorderColor(level: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max"): (str: string) => string;
|
|
29
|
+
getBashModeBorderColor(): (str: string) => string;
|
|
30
|
+
}
|
|
31
|
+
export declare function getAvailableThemes(): string[];
|
|
32
|
+
export interface ThemeInfo {
|
|
33
|
+
name: string;
|
|
34
|
+
path: string | undefined;
|
|
35
|
+
}
|
|
36
|
+
export declare function getAvailableThemesWithPaths(): ThemeInfo[];
|
|
37
|
+
export declare function loadThemeFromPath(themePath: string, mode?: ColorMode): Theme;
|
|
38
|
+
export declare function getThemeByName(name: string): Theme | undefined;
|
|
39
|
+
export declare const theme: Theme;
|
|
40
|
+
export declare function setRegisteredThemes(themes: Theme[]): void;
|
|
41
|
+
export declare function initTheme(themeName?: string, enableWatcher?: boolean): void;
|
|
42
|
+
export declare function setTheme(name: string, enableWatcher?: boolean): {
|
|
43
|
+
success: boolean;
|
|
44
|
+
error?: string;
|
|
45
|
+
};
|
|
46
|
+
export declare function setThemeInstance(themeInstance: Theme): void;
|
|
47
|
+
export declare function onThemeChange(callback: () => void): void;
|
|
48
|
+
export declare function stopThemeWatcher(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Get resolved theme colors as CSS-compatible hex strings.
|
|
51
|
+
* Used by HTML export to generate CSS custom properties.
|
|
52
|
+
*/
|
|
53
|
+
export declare function getResolvedThemeColors(themeName?: string): Record<string, string>;
|
|
54
|
+
/**
|
|
55
|
+
* Check if a theme is a "light" theme (for CSS that needs light/dark variants).
|
|
56
|
+
*/
|
|
57
|
+
export declare function isLightTheme(themeName?: string): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Get explicit export colors from theme JSON, if specified.
|
|
60
|
+
* Returns undefined for each color that isn't explicitly set.
|
|
61
|
+
*/
|
|
62
|
+
export declare function getThemeExportColors(themeName?: string): {
|
|
63
|
+
pageBg?: string;
|
|
64
|
+
cardBg?: string;
|
|
65
|
+
infoBg?: string;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Highlight code with syntax coloring based on file extension or language.
|
|
69
|
+
* Returns array of highlighted lines.
|
|
70
|
+
*/
|
|
71
|
+
export declare function highlightCode(code: string, lang?: string): string[];
|
|
72
|
+
/**
|
|
73
|
+
* Get language identifier from file path extension.
|
|
74
|
+
*/
|
|
75
|
+
export declare function getLanguageFromPath(filePath: string): string | undefined;
|
|
76
|
+
export declare function getMarkdownTheme(): MarkdownTheme;
|
|
77
|
+
export declare function getSelectListTheme(): SelectListTheme;
|
|
78
|
+
export declare function getEditorTheme(): EditorTheme;
|
|
79
|
+
export declare function getSettingsListTheme(): import("@earendil-works/pi-tui").SettingsListTheme;
|
|
80
|
+
export {};
|
|
81
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/theme/theme.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAM1F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AA2F/D,MAAM,MAAM,UAAU,GACnB,QAAQ,GACR,QAAQ,GACR,cAAc,GACd,aAAa,GACb,SAAS,GACT,OAAO,GACP,SAAS,GACT,OAAO,GACP,KAAK,GACL,MAAM,GACN,cAAc,GACd,iBAAiB,GACjB,mBAAmB,GACnB,oBAAoB,GACpB,WAAW,GACX,YAAY,GACZ,WAAW,GACX,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,aAAa,GACb,mBAAmB,GACnB,SAAS,GACT,eAAe,GACf,MAAM,GACN,cAAc,GACd,eAAe,GACf,iBAAiB,GACjB,iBAAiB,GACjB,eAAe,GACf,eAAe,GACf,gBAAgB,GAChB,gBAAgB,GAChB,cAAc,GACd,cAAc,GACd,YAAY,GACZ,gBAAgB,GAChB,mBAAmB,GACnB,aAAa,GACb,iBAAiB,GACjB,aAAa,GACb,gBAAgB,GAChB,cAAc,GACd,eAAe,GACf,UAAU,CAAC;AAEd,MAAM,MAAM,OAAO,GAChB,YAAY,GACZ,eAAe,GACf,iBAAiB,GACjB,eAAe,GACf,eAAe,GACf,aAAa,CAAC;AAEjB,KAAK,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;AA4L1C,qBAAa,KAAK;IACjB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,OAAO,CAAC,QAAQ,CAA0B;IAC1C,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,IAAI,CAAY;IAExB,YACC,QAAQ,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC,EAC7C,QAAQ,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,EAC1C,IAAI,EAAE,SAAS,EACf,OAAO,GAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,UAAU,CAAA;KAAO,EAc7E;IAED,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAI1C;IAED,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAIvC;IAED,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzB;IAED,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE3B;IAED,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9B;IAED,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5B;IAED,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElC;IAED,SAAS,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAInC;IAED,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAIhC;IAED,YAAY,IAAI,SAAS,CAExB;IAED,sBAAsB,CACrB,KAAK,EAAE,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GACpE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAkBzB;IAED,sBAAsB,IAAI,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAEhD;CACD;AAqBD,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAe7C;AAED,MAAM,WAAW,SAAS;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;CACzB;AAED,wBAAgB,2BAA2B,IAAI,SAAS,EAAE,CA6BzD;AAmGD,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,KAAK,CAI5E;AAWD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAM9D;AA+BD,eAAO,MAAM,KAAK,EAAE,KAMlB,CAAC;AAaH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAOzD;AAED,wBAAgB,SAAS,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,aAAa,GAAE,OAAe,GAAG,IAAI,CAclF;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,GAAE,OAAe,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAqB3G;AAED,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,KAAK,GAAG,IAAI,CAO3D;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAExD;AA2ED,wBAAgB,gBAAgB,IAAI,IAAI,CAOvC;AAoDD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAqBjF;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAGxD;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG;IACzD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB,CAwBA;AAuCD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAmBnE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAkExE;AAED,wBAAgB,gBAAgB,IAAI,aAAa,CAqChD;AAED,wBAAgB,kBAAkB,IAAI,eAAe,CAQpD;AAED,wBAAgB,cAAc,IAAI,WAAW,CAK5C;AAED,wBAAgB,oBAAoB,IAAI,OAAO,wBAAwB,EAAE,iBAAiB,CAQzF","sourcesContent":["import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport type { EditorTheme, MarkdownTheme, SelectListTheme } from \"@earendil-works/pi-tui\";\nimport chalk from \"chalk\";\nimport { highlight, supportsLanguage } from \"cli-highlight\";\nimport { type Static, Type } from \"typebox\";\nimport { Compile } from \"typebox/compile\";\nimport { getCustomThemesDir, getThemesDir } from \"../../../config.js\";\nimport type { SourceInfo } from \"../../../core/source-info.js\";\nimport { closeWatcher, watchWithErrorHandler } from \"../../../utils/fs-watch.js\";\n\n// ============================================================================\n// Types & Schema\n// ============================================================================\n\nconst ColorValueSchema = Type.Union([\n\tType.String(), // hex \"#ff0000\", var ref \"primary\", or empty \"\"\n\tType.Integer({ minimum: 0, maximum: 255 }), // 256-color index\n]);\n\ntype ColorValue = Static<typeof ColorValueSchema>;\n\nconst ThemeJsonSchema = Type.Object({\n\t$schema: Type.Optional(Type.String()),\n\tname: Type.String(),\n\tvars: Type.Optional(Type.Record(Type.String(), ColorValueSchema)),\n\tcolors: Type.Object({\n\t\t// Core UI (10 colors)\n\t\taccent: ColorValueSchema,\n\t\tborder: ColorValueSchema,\n\t\tborderAccent: ColorValueSchema,\n\t\tborderMuted: ColorValueSchema,\n\t\tsuccess: ColorValueSchema,\n\t\terror: ColorValueSchema,\n\t\twarning: ColorValueSchema,\n\t\tmuted: ColorValueSchema,\n\t\tdim: ColorValueSchema,\n\t\ttext: ColorValueSchema,\n\t\tthinkingText: ColorValueSchema,\n\t\t// Backgrounds & Content Text (11 colors)\n\t\tselectedBg: ColorValueSchema,\n\t\tuserMessageBg: ColorValueSchema,\n\t\tuserMessageText: ColorValueSchema,\n\t\tcustomMessageBg: ColorValueSchema,\n\t\tcustomMessageText: ColorValueSchema,\n\t\tcustomMessageLabel: ColorValueSchema,\n\t\ttoolPendingBg: ColorValueSchema,\n\t\ttoolSuccessBg: ColorValueSchema,\n\t\ttoolErrorBg: ColorValueSchema,\n\t\ttoolTitle: ColorValueSchema,\n\t\ttoolOutput: ColorValueSchema,\n\t\t// Markdown (10 colors)\n\t\tmdHeading: ColorValueSchema,\n\t\tmdLink: ColorValueSchema,\n\t\tmdLinkUrl: ColorValueSchema,\n\t\tmdCode: ColorValueSchema,\n\t\tmdCodeBlock: ColorValueSchema,\n\t\tmdCodeBlockBorder: ColorValueSchema,\n\t\tmdQuote: ColorValueSchema,\n\t\tmdQuoteBorder: ColorValueSchema,\n\t\tmdHr: ColorValueSchema,\n\t\tmdListBullet: ColorValueSchema,\n\t\t// Tool Diffs (3 colors)\n\t\ttoolDiffAdded: ColorValueSchema,\n\t\ttoolDiffRemoved: ColorValueSchema,\n\t\ttoolDiffContext: ColorValueSchema,\n\t\t// Syntax Highlighting (9 colors)\n\t\tsyntaxComment: ColorValueSchema,\n\t\tsyntaxKeyword: ColorValueSchema,\n\t\tsyntaxFunction: ColorValueSchema,\n\t\tsyntaxVariable: ColorValueSchema,\n\t\tsyntaxString: ColorValueSchema,\n\t\tsyntaxNumber: ColorValueSchema,\n\t\tsyntaxType: ColorValueSchema,\n\t\tsyntaxOperator: ColorValueSchema,\n\t\tsyntaxPunctuation: ColorValueSchema,\n\t\t// Thinking Level Borders (6 colors)\n\t\tthinkingOff: ColorValueSchema,\n\t\tthinkingMinimal: ColorValueSchema,\n\t\tthinkingLow: ColorValueSchema,\n\t\tthinkingMedium: ColorValueSchema,\n\t\tthinkingHigh: ColorValueSchema,\n\t\tthinkingXhigh: ColorValueSchema,\n\t\t// Bash Mode (1 color)\n\t\tbashMode: ColorValueSchema,\n\t}),\n\texport: Type.Optional(\n\t\tType.Object({\n\t\t\tpageBg: Type.Optional(ColorValueSchema),\n\t\t\tcardBg: Type.Optional(ColorValueSchema),\n\t\t\tinfoBg: Type.Optional(ColorValueSchema),\n\t\t}),\n\t),\n});\n\ntype ThemeJson = Static<typeof ThemeJsonSchema>;\n\nconst validateThemeJson = Compile(ThemeJsonSchema);\n\nexport type ThemeColor =\n\t| \"accent\"\n\t| \"border\"\n\t| \"borderAccent\"\n\t| \"borderMuted\"\n\t| \"success\"\n\t| \"error\"\n\t| \"warning\"\n\t| \"muted\"\n\t| \"dim\"\n\t| \"text\"\n\t| \"thinkingText\"\n\t| \"userMessageText\"\n\t| \"customMessageText\"\n\t| \"customMessageLabel\"\n\t| \"toolTitle\"\n\t| \"toolOutput\"\n\t| \"mdHeading\"\n\t| \"mdLink\"\n\t| \"mdLinkUrl\"\n\t| \"mdCode\"\n\t| \"mdCodeBlock\"\n\t| \"mdCodeBlockBorder\"\n\t| \"mdQuote\"\n\t| \"mdQuoteBorder\"\n\t| \"mdHr\"\n\t| \"mdListBullet\"\n\t| \"toolDiffAdded\"\n\t| \"toolDiffRemoved\"\n\t| \"toolDiffContext\"\n\t| \"syntaxComment\"\n\t| \"syntaxKeyword\"\n\t| \"syntaxFunction\"\n\t| \"syntaxVariable\"\n\t| \"syntaxString\"\n\t| \"syntaxNumber\"\n\t| \"syntaxType\"\n\t| \"syntaxOperator\"\n\t| \"syntaxPunctuation\"\n\t| \"thinkingOff\"\n\t| \"thinkingMinimal\"\n\t| \"thinkingLow\"\n\t| \"thinkingMedium\"\n\t| \"thinkingHigh\"\n\t| \"thinkingXhigh\"\n\t| \"bashMode\";\n\nexport type ThemeBg =\n\t| \"selectedBg\"\n\t| \"userMessageBg\"\n\t| \"customMessageBg\"\n\t| \"toolPendingBg\"\n\t| \"toolSuccessBg\"\n\t| \"toolErrorBg\";\n\ntype ColorMode = \"truecolor\" | \"256color\";\n\n// ============================================================================\n// Color Utilities\n// ============================================================================\n\nfunction detectColorMode(): ColorMode {\n\tconst colorterm = process.env.COLORTERM;\n\tif (colorterm === \"truecolor\" || colorterm === \"24bit\") {\n\t\treturn \"truecolor\";\n\t}\n\t// Windows Terminal supports truecolor\n\tif (process.env.WT_SESSION) {\n\t\treturn \"truecolor\";\n\t}\n\tconst term = process.env.TERM || \"\";\n\t// Fall back to 256color for truly limited terminals\n\tif (term === \"dumb\" || term === \"\" || term === \"linux\") {\n\t\treturn \"256color\";\n\t}\n\t// Terminal.app also doesn't support truecolor\n\tif (process.env.TERM_PROGRAM === \"Apple_Terminal\") {\n\t\treturn \"256color\";\n\t}\n\t// GNU screen doesn't support truecolor unless explicitly opted in via COLORTERM=truecolor.\n\t// TERM under screen is typically \"screen\", \"screen-256color\", or \"screen.xterm-256color\".\n\tif (term === \"screen\" || term.startsWith(\"screen-\") || term.startsWith(\"screen.\")) {\n\t\treturn \"256color\";\n\t}\n\t// Assume truecolor for everything else - virtually all modern terminals support it\n\treturn \"truecolor\";\n}\n\nfunction hexToRgb(hex: string): { r: number; g: number; b: number } {\n\tconst cleaned = hex.replace(\"#\", \"\");\n\tif (cleaned.length !== 6) {\n\t\tthrow new Error(`Invalid hex color: ${hex}`);\n\t}\n\tconst r = parseInt(cleaned.substring(0, 2), 16);\n\tconst g = parseInt(cleaned.substring(2, 4), 16);\n\tconst b = parseInt(cleaned.substring(4, 6), 16);\n\tif (Number.isNaN(r) || Number.isNaN(g) || Number.isNaN(b)) {\n\t\tthrow new Error(`Invalid hex color: ${hex}`);\n\t}\n\treturn { r, g, b };\n}\n\n// The 6x6x6 color cube channel values (indices 0-5)\nconst CUBE_VALUES = [0, 95, 135, 175, 215, 255];\n\n// Grayscale ramp values (indices 232-255, 24 grays from 8 to 238)\nconst GRAY_VALUES = Array.from({ length: 24 }, (_, i) => 8 + i * 10);\n\nfunction findClosestCubeIndex(value: number): number {\n\tlet minDist = Infinity;\n\tlet minIdx = 0;\n\tfor (let i = 0; i < CUBE_VALUES.length; i++) {\n\t\tconst dist = Math.abs(value - CUBE_VALUES[i]);\n\t\tif (dist < minDist) {\n\t\t\tminDist = dist;\n\t\t\tminIdx = i;\n\t\t}\n\t}\n\treturn minIdx;\n}\n\nfunction findClosestGrayIndex(gray: number): number {\n\tlet minDist = Infinity;\n\tlet minIdx = 0;\n\tfor (let i = 0; i < GRAY_VALUES.length; i++) {\n\t\tconst dist = Math.abs(gray - GRAY_VALUES[i]);\n\t\tif (dist < minDist) {\n\t\t\tminDist = dist;\n\t\t\tminIdx = i;\n\t\t}\n\t}\n\treturn minIdx;\n}\n\nfunction colorDistance(r1: number, g1: number, b1: number, r2: number, g2: number, b2: number): number {\n\t// Weighted Euclidean distance (human eye is more sensitive to green)\n\tconst dr = r1 - r2;\n\tconst dg = g1 - g2;\n\tconst db = b1 - b2;\n\treturn dr * dr * 0.299 + dg * dg * 0.587 + db * db * 0.114;\n}\n\nfunction rgbTo256(r: number, g: number, b: number): number {\n\t// Find closest color in the 6x6x6 cube\n\tconst rIdx = findClosestCubeIndex(r);\n\tconst gIdx = findClosestCubeIndex(g);\n\tconst bIdx = findClosestCubeIndex(b);\n\tconst cubeR = CUBE_VALUES[rIdx];\n\tconst cubeG = CUBE_VALUES[gIdx];\n\tconst cubeB = CUBE_VALUES[bIdx];\n\tconst cubeIndex = 16 + 36 * rIdx + 6 * gIdx + bIdx;\n\tconst cubeDist = colorDistance(r, g, b, cubeR, cubeG, cubeB);\n\n\t// Find closest grayscale\n\tconst gray = Math.round(0.299 * r + 0.587 * g + 0.114 * b);\n\tconst grayIdx = findClosestGrayIndex(gray);\n\tconst grayValue = GRAY_VALUES[grayIdx];\n\tconst grayIndex = 232 + grayIdx;\n\tconst grayDist = colorDistance(r, g, b, grayValue, grayValue, grayValue);\n\n\t// Check if color has noticeable saturation (hue matters)\n\t// If max-min spread is significant, prefer cube to preserve tint\n\tconst maxC = Math.max(r, g, b);\n\tconst minC = Math.min(r, g, b);\n\tconst spread = maxC - minC;\n\n\t// Only consider grayscale if color is nearly neutral (spread < 10)\n\t// AND grayscale is actually closer\n\tif (spread < 10 && grayDist < cubeDist) {\n\t\treturn grayIndex;\n\t}\n\n\treturn cubeIndex;\n}\n\nfunction hexTo256(hex: string): number {\n\tconst { r, g, b } = hexToRgb(hex);\n\treturn rgbTo256(r, g, b);\n}\n\nfunction fgAnsi(color: string | number, mode: ColorMode): string {\n\tif (color === \"\") return \"\\x1b[39m\";\n\tif (typeof color === \"number\") return `\\x1b[38;5;${color}m`;\n\tif (color.startsWith(\"#\")) {\n\t\tif (mode === \"truecolor\") {\n\t\t\tconst { r, g, b } = hexToRgb(color);\n\t\t\treturn `\\x1b[38;2;${r};${g};${b}m`;\n\t\t} else {\n\t\t\tconst index = hexTo256(color);\n\t\t\treturn `\\x1b[38;5;${index}m`;\n\t\t}\n\t}\n\tthrow new Error(`Invalid color value: ${color}`);\n}\n\nfunction bgAnsi(color: string | number, mode: ColorMode): string {\n\tif (color === \"\") return \"\\x1b[49m\";\n\tif (typeof color === \"number\") return `\\x1b[48;5;${color}m`;\n\tif (color.startsWith(\"#\")) {\n\t\tif (mode === \"truecolor\") {\n\t\t\tconst { r, g, b } = hexToRgb(color);\n\t\t\treturn `\\x1b[48;2;${r};${g};${b}m`;\n\t\t} else {\n\t\t\tconst index = hexTo256(color);\n\t\t\treturn `\\x1b[48;5;${index}m`;\n\t\t}\n\t}\n\tthrow new Error(`Invalid color value: ${color}`);\n}\n\nfunction resolveVarRefs(\n\tvalue: ColorValue,\n\tvars: Record<string, ColorValue>,\n\tvisited = new Set<string>(),\n): string | number {\n\tif (typeof value === \"number\" || value === \"\" || value.startsWith(\"#\")) {\n\t\treturn value;\n\t}\n\tif (visited.has(value)) {\n\t\tthrow new Error(`Circular variable reference detected: ${value}`);\n\t}\n\tif (!(value in vars)) {\n\t\tthrow new Error(`Variable reference not found: ${value}`);\n\t}\n\tvisited.add(value);\n\treturn resolveVarRefs(vars[value], vars, visited);\n}\n\nfunction resolveThemeColors<T extends Record<string, ColorValue>>(\n\tcolors: T,\n\tvars: Record<string, ColorValue> = {},\n): Record<keyof T, string | number> {\n\tconst resolved: Record<string, string | number> = {};\n\tfor (const [key, value] of Object.entries(colors)) {\n\t\tresolved[key] = resolveVarRefs(value, vars);\n\t}\n\treturn resolved as Record<keyof T, string | number>;\n}\n\n// ============================================================================\n// Theme Class\n// ============================================================================\n\nexport class Theme {\n\treadonly name?: string;\n\treadonly sourcePath?: string;\n\tsourceInfo?: SourceInfo;\n\tprivate fgColors: Map<ThemeColor, string>;\n\tprivate bgColors: Map<ThemeBg, string>;\n\tprivate mode: ColorMode;\n\n\tconstructor(\n\t\tfgColors: Record<ThemeColor, string | number>,\n\t\tbgColors: Record<ThemeBg, string | number>,\n\t\tmode: ColorMode,\n\t\toptions: { name?: string; sourcePath?: string; sourceInfo?: SourceInfo } = {},\n\t) {\n\t\tthis.name = options.name;\n\t\tthis.sourcePath = options.sourcePath;\n\t\tthis.sourceInfo = options.sourceInfo;\n\t\tthis.mode = mode;\n\t\tthis.fgColors = new Map();\n\t\tfor (const [key, value] of Object.entries(fgColors) as [ThemeColor, string | number][]) {\n\t\t\tthis.fgColors.set(key, fgAnsi(value, mode));\n\t\t}\n\t\tthis.bgColors = new Map();\n\t\tfor (const [key, value] of Object.entries(bgColors) as [ThemeBg, string | number][]) {\n\t\t\tthis.bgColors.set(key, bgAnsi(value, mode));\n\t\t}\n\t}\n\n\tfg(color: ThemeColor, text: string): string {\n\t\tconst ansi = this.fgColors.get(color);\n\t\tif (!ansi) throw new Error(`Unknown theme color: ${color}`);\n\t\treturn `${ansi}${text}\\x1b[39m`; // Reset only foreground color\n\t}\n\n\tbg(color: ThemeBg, text: string): string {\n\t\tconst ansi = this.bgColors.get(color);\n\t\tif (!ansi) throw new Error(`Unknown theme background color: ${color}`);\n\t\treturn `${ansi}${text}\\x1b[49m`; // Reset only background color\n\t}\n\n\tbold(text: string): string {\n\t\treturn chalk.bold(text);\n\t}\n\n\titalic(text: string): string {\n\t\treturn chalk.italic(text);\n\t}\n\n\tunderline(text: string): string {\n\t\treturn chalk.underline(text);\n\t}\n\n\tinverse(text: string): string {\n\t\treturn chalk.inverse(text);\n\t}\n\n\tstrikethrough(text: string): string {\n\t\treturn chalk.strikethrough(text);\n\t}\n\n\tgetFgAnsi(color: ThemeColor): string {\n\t\tconst ansi = this.fgColors.get(color);\n\t\tif (!ansi) throw new Error(`Unknown theme color: ${color}`);\n\t\treturn ansi;\n\t}\n\n\tgetBgAnsi(color: ThemeBg): string {\n\t\tconst ansi = this.bgColors.get(color);\n\t\tif (!ansi) throw new Error(`Unknown theme background color: ${color}`);\n\t\treturn ansi;\n\t}\n\n\tgetColorMode(): ColorMode {\n\t\treturn this.mode;\n\t}\n\n\tgetThinkingBorderColor(\n\t\tlevel: \"off\" | \"minimal\" | \"low\" | \"medium\" | \"high\" | \"xhigh\" | \"max\",\n\t): (str: string) => string {\n\t\tswitch (level) {\n\t\t\tcase \"off\":\n\t\t\t\treturn (str: string) => this.fg(\"thinkingOff\", str);\n\t\t\tcase \"minimal\":\n\t\t\t\treturn (str: string) => this.fg(\"thinkingMinimal\", str);\n\t\t\tcase \"low\":\n\t\t\t\treturn (str: string) => this.fg(\"thinkingLow\", str);\n\t\t\tcase \"medium\":\n\t\t\t\treturn (str: string) => this.fg(\"thinkingMedium\", str);\n\t\t\tcase \"high\":\n\t\t\t\treturn (str: string) => this.fg(\"thinkingHigh\", str);\n\t\t\tcase \"xhigh\":\n\t\t\tcase \"max\":\n\t\t\t\treturn (str: string) => this.fg(\"thinkingXhigh\", str);\n\t\t\tdefault:\n\t\t\t\treturn (str: string) => this.fg(\"thinkingOff\", str);\n\t\t}\n\t}\n\n\tgetBashModeBorderColor(): (str: string) => string {\n\t\treturn (str: string) => this.fg(\"bashMode\", str);\n\t}\n}\n\n// ============================================================================\n// Theme Loading\n// ============================================================================\n\nlet BUILTIN_THEMES: Record<string, ThemeJson> | undefined;\n\nfunction getBuiltinThemes(): Record<string, ThemeJson> {\n\tif (!BUILTIN_THEMES) {\n\t\tconst themesDir = getThemesDir();\n\t\tconst darkPath = path.join(themesDir, \"dark.json\");\n\t\tconst lightPath = path.join(themesDir, \"light.json\");\n\t\tBUILTIN_THEMES = {\n\t\t\tdark: JSON.parse(fs.readFileSync(darkPath, \"utf-8\")) as ThemeJson,\n\t\t\tlight: JSON.parse(fs.readFileSync(lightPath, \"utf-8\")) as ThemeJson,\n\t\t};\n\t}\n\treturn BUILTIN_THEMES;\n}\n\nexport function getAvailableThemes(): string[] {\n\tconst themes = new Set<string>(Object.keys(getBuiltinThemes()));\n\tconst customThemesDir = getCustomThemesDir();\n\tif (fs.existsSync(customThemesDir)) {\n\t\tconst files = fs.readdirSync(customThemesDir);\n\t\tfor (const file of files) {\n\t\t\tif (file.endsWith(\".json\")) {\n\t\t\t\tthemes.add(file.slice(0, -5));\n\t\t\t}\n\t\t}\n\t}\n\tfor (const name of registeredThemes.keys()) {\n\t\tthemes.add(name);\n\t}\n\treturn Array.from(themes).sort();\n}\n\nexport interface ThemeInfo {\n\tname: string;\n\tpath: string | undefined;\n}\n\nexport function getAvailableThemesWithPaths(): ThemeInfo[] {\n\tconst themesDir = getThemesDir();\n\tconst customThemesDir = getCustomThemesDir();\n\tconst result: ThemeInfo[] = [];\n\n\t// Built-in themes\n\tfor (const name of Object.keys(getBuiltinThemes())) {\n\t\tresult.push({ name, path: path.join(themesDir, `${name}.json`) });\n\t}\n\n\t// Custom themes\n\tif (fs.existsSync(customThemesDir)) {\n\t\tfor (const file of fs.readdirSync(customThemesDir)) {\n\t\t\tif (file.endsWith(\".json\")) {\n\t\t\t\tconst name = file.slice(0, -5);\n\t\t\t\tif (!result.some((t) => t.name === name)) {\n\t\t\t\t\tresult.push({ name, path: path.join(customThemesDir, file) });\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (const [name, theme] of registeredThemes.entries()) {\n\t\tif (!result.some((t) => t.name === name)) {\n\t\t\tresult.push({ name, path: theme.sourcePath });\n\t\t}\n\t}\n\n\treturn result.sort((a, b) => a.name.localeCompare(b.name));\n}\n\nfunction parseThemeJson(label: string, json: unknown): ThemeJson {\n\tif (!validateThemeJson.Check(json)) {\n\t\tconst errors = Array.from(validateThemeJson.Errors(json));\n\t\tconst missingColors = new Set<string>();\n\t\tconst otherErrors: string[] = [];\n\n\t\tfor (const error of errors) {\n\t\t\tif (error.keyword === \"required\" && error.instancePath === \"/colors\") {\n\t\t\t\tconst requiredProperties = (error.params as { requiredProperties?: string[] }).requiredProperties;\n\t\t\t\tfor (const requiredProperty of requiredProperties ?? []) {\n\t\t\t\t\tmissingColors.add(requiredProperty);\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst path = error.instancePath || \"/\";\n\t\t\totherErrors.push(` - ${path}: ${error.message}`);\n\t\t}\n\n\t\tlet errorMessage = `Invalid theme \"${label}\":\\n`;\n\t\tif (missingColors.size > 0) {\n\t\t\terrorMessage += \"\\nMissing required color tokens:\\n\";\n\t\t\terrorMessage += Array.from(missingColors)\n\t\t\t\t.sort()\n\t\t\t\t.map((color) => ` - ${color}`)\n\t\t\t\t.join(\"\\n\");\n\t\t\terrorMessage += '\\n\\nPlease add these colors to your theme\\'s \"colors\" object.';\n\t\t\terrorMessage += \"\\nSee the built-in themes (dark.json, light.json) for reference values.\";\n\t\t}\n\t\tif (otherErrors.length > 0) {\n\t\t\terrorMessage += `\\n\\nOther errors:\\n${otherErrors.join(\"\\n\")}`;\n\t\t}\n\n\t\tthrow new Error(errorMessage);\n\t}\n\n\treturn json as ThemeJson;\n}\n\nfunction parseThemeJsonContent(label: string, content: string): ThemeJson {\n\tlet json: unknown;\n\ttry {\n\t\tjson = JSON.parse(content);\n\t} catch (error) {\n\t\tthrow new Error(`Failed to parse theme ${label}: ${error}`);\n\t}\n\treturn parseThemeJson(label, json);\n}\n\nfunction loadThemeJson(name: string): ThemeJson {\n\tconst builtinThemes = getBuiltinThemes();\n\tif (name in builtinThemes) {\n\t\treturn builtinThemes[name];\n\t}\n\tconst registeredTheme = registeredThemes.get(name);\n\tif (registeredTheme?.sourcePath) {\n\t\tconst content = fs.readFileSync(registeredTheme.sourcePath, \"utf-8\");\n\t\treturn parseThemeJsonContent(registeredTheme.sourcePath, content);\n\t}\n\tif (registeredTheme) {\n\t\tthrow new Error(`Theme \"${name}\" does not have a source path for export`);\n\t}\n\tconst customThemesDir = getCustomThemesDir();\n\tconst themePath = path.join(customThemesDir, `${name}.json`);\n\tif (!fs.existsSync(themePath)) {\n\t\tthrow new Error(`Theme not found: ${name}`);\n\t}\n\tconst content = fs.readFileSync(themePath, \"utf-8\");\n\treturn parseThemeJsonContent(name, content);\n}\n\nfunction createTheme(themeJson: ThemeJson, mode?: ColorMode, sourcePath?: string): Theme {\n\tconst colorMode = mode ?? detectColorMode();\n\tconst resolvedColors = resolveThemeColors(themeJson.colors, themeJson.vars);\n\tconst fgColors: Record<ThemeColor, string | number> = {} as Record<ThemeColor, string | number>;\n\tconst bgColors: Record<ThemeBg, string | number> = {} as Record<ThemeBg, string | number>;\n\tconst bgColorKeys: Set<string> = new Set([\n\t\t\"selectedBg\",\n\t\t\"userMessageBg\",\n\t\t\"customMessageBg\",\n\t\t\"toolPendingBg\",\n\t\t\"toolSuccessBg\",\n\t\t\"toolErrorBg\",\n\t]);\n\tfor (const [key, value] of Object.entries(resolvedColors)) {\n\t\tif (bgColorKeys.has(key)) {\n\t\t\tbgColors[key as ThemeBg] = value;\n\t\t} else {\n\t\t\tfgColors[key as ThemeColor] = value;\n\t\t}\n\t}\n\treturn new Theme(fgColors, bgColors, colorMode, {\n\t\tname: themeJson.name,\n\t\tsourcePath,\n\t});\n}\n\nexport function loadThemeFromPath(themePath: string, mode?: ColorMode): Theme {\n\tconst content = fs.readFileSync(themePath, \"utf-8\");\n\tconst themeJson = parseThemeJsonContent(themePath, content);\n\treturn createTheme(themeJson, mode, themePath);\n}\n\nfunction loadTheme(name: string, mode?: ColorMode): Theme {\n\tconst registeredTheme = registeredThemes.get(name);\n\tif (registeredTheme) {\n\t\treturn registeredTheme;\n\t}\n\tconst themeJson = loadThemeJson(name);\n\treturn createTheme(themeJson, mode);\n}\n\nexport function getThemeByName(name: string): Theme | undefined {\n\ttry {\n\t\treturn loadTheme(name);\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n\nfunction detectTerminalBackground(): \"dark\" | \"light\" {\n\tconst colorfgbg = process.env.COLORFGBG || \"\";\n\tif (colorfgbg) {\n\t\tconst parts = colorfgbg.split(\";\");\n\t\tif (parts.length >= 2) {\n\t\t\tconst bg = parseInt(parts[1], 10);\n\t\t\tif (!Number.isNaN(bg)) {\n\t\t\t\tconst result = bg < 8 ? \"dark\" : \"light\";\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t}\n\treturn \"dark\";\n}\n\nfunction getDefaultTheme(): string {\n\treturn detectTerminalBackground();\n}\n\n// ============================================================================\n// Global Theme Instance\n// ============================================================================\n\n// Use globalThis to share theme across module loaders (tsx + jiti in dev mode)\nconst THEME_KEY = Symbol.for(\"@earendil-works/pi-coding-agent:theme\");\nconst THEME_KEY_OLD = Symbol.for(\"@mariozechner/pi-coding-agent:theme\");\n\n// Export theme as a getter that reads from globalThis\n// This ensures all module instances (tsx, jiti) see the same theme\nexport const theme: Theme = new Proxy({} as Theme, {\n\tget(_target, prop) {\n\t\tconst t = (globalThis as Record<symbol, Theme>)[THEME_KEY];\n\t\tif (!t) throw new Error(\"Theme not initialized. Call initTheme() first.\");\n\t\treturn (t as unknown as Record<string | symbol, unknown>)[prop];\n\t},\n});\n\nfunction setGlobalTheme(t: Theme): void {\n\t(globalThis as Record<symbol, Theme>)[THEME_KEY] = t;\n\t(globalThis as Record<symbol, Theme>)[THEME_KEY_OLD] = t;\n}\n\nlet currentThemeName: string | undefined;\nlet themeWatcher: fs.FSWatcher | undefined;\nlet themeReloadTimer: NodeJS.Timeout | undefined;\nlet onThemeChangeCallback: (() => void) | undefined;\nconst registeredThemes = new Map<string, Theme>();\n\nexport function setRegisteredThemes(themes: Theme[]): void {\n\tregisteredThemes.clear();\n\tfor (const theme of themes) {\n\t\tif (theme.name) {\n\t\t\tregisteredThemes.set(theme.name, theme);\n\t\t}\n\t}\n}\n\nexport function initTheme(themeName?: string, enableWatcher: boolean = false): void {\n\tconst name = themeName ?? getDefaultTheme();\n\tcurrentThemeName = name;\n\ttry {\n\t\tsetGlobalTheme(loadTheme(name));\n\t\tif (enableWatcher) {\n\t\t\tstartThemeWatcher();\n\t\t}\n\t} catch (_error) {\n\t\t// Theme is invalid - fall back to dark theme silently\n\t\tcurrentThemeName = \"dark\";\n\t\tsetGlobalTheme(loadTheme(\"dark\"));\n\t\t// Don't start watcher for fallback theme\n\t}\n}\n\nexport function setTheme(name: string, enableWatcher: boolean = false): { success: boolean; error?: string } {\n\tcurrentThemeName = name;\n\ttry {\n\t\tsetGlobalTheme(loadTheme(name));\n\t\tif (enableWatcher) {\n\t\t\tstartThemeWatcher();\n\t\t}\n\t\tif (onThemeChangeCallback) {\n\t\t\tonThemeChangeCallback();\n\t\t}\n\t\treturn { success: true };\n\t} catch (error) {\n\t\t// Theme is invalid - fall back to dark theme\n\t\tcurrentThemeName = \"dark\";\n\t\tsetGlobalTheme(loadTheme(\"dark\"));\n\t\t// Don't start watcher for fallback theme\n\t\treturn {\n\t\t\tsuccess: false,\n\t\t\terror: error instanceof Error ? error.message : String(error),\n\t\t};\n\t}\n}\n\nexport function setThemeInstance(themeInstance: Theme): void {\n\tsetGlobalTheme(themeInstance);\n\tcurrentThemeName = \"<in-memory>\";\n\tstopThemeWatcher(); // Can't watch a direct instance\n\tif (onThemeChangeCallback) {\n\t\tonThemeChangeCallback();\n\t}\n}\n\nexport function onThemeChange(callback: () => void): void {\n\tonThemeChangeCallback = callback;\n}\n\nfunction startThemeWatcher(): void {\n\tstopThemeWatcher();\n\n\t// Only watch if it's a custom theme (not built-in)\n\tif (!currentThemeName || currentThemeName === \"dark\" || currentThemeName === \"light\") {\n\t\treturn;\n\t}\n\n\tconst customThemesDir = getCustomThemesDir();\n\tconst watchedThemeName = currentThemeName;\n\tconst watchedFileName = `${watchedThemeName}.json`;\n\tconst themeFile = path.join(customThemesDir, watchedFileName);\n\n\t// Only watch if the file exists\n\tif (!fs.existsSync(themeFile)) {\n\t\treturn;\n\t}\n\n\tconst scheduleReload = () => {\n\t\tif (themeReloadTimer) {\n\t\t\tclearTimeout(themeReloadTimer);\n\t\t}\n\t\tthemeReloadTimer = setTimeout(() => {\n\t\t\tthemeReloadTimer = undefined;\n\n\t\t\t// Ignore stale timers after switching themes or stopping the watcher\n\t\t\tif (currentThemeName !== watchedThemeName) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Keep the last successfully loaded theme active if the file is temporarily missing\n\t\t\tif (!fs.existsSync(themeFile)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t// Reload the theme from disk and refresh the registry cache\n\t\t\t\tconst reloadedTheme = loadThemeFromPath(themeFile);\n\t\t\t\tregisteredThemes.set(watchedThemeName, reloadedTheme);\n\t\t\t\tsetGlobalTheme(reloadedTheme);\n\t\t\t\t// Notify callback (to invalidate UI)\n\t\t\t\tif (onThemeChangeCallback) {\n\t\t\t\t\tonThemeChangeCallback();\n\t\t\t\t}\n\t\t\t} catch (_error) {\n\t\t\t\t// Ignore errors (file might be in invalid state while being edited)\n\t\t\t}\n\t\t}, 100);\n\t};\n\n\tthemeWatcher =\n\t\twatchWithErrorHandler(\n\t\t\tcustomThemesDir,\n\t\t\t(_eventType, filename) => {\n\t\t\t\tif (currentThemeName !== watchedThemeName) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (!filename) {\n\t\t\t\t\tscheduleReload();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (filename !== watchedFileName) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tscheduleReload();\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tcloseWatcher(themeWatcher);\n\t\t\t\tthemeWatcher = undefined;\n\t\t\t},\n\t\t) ?? undefined;\n}\n\nexport function stopThemeWatcher(): void {\n\tif (themeReloadTimer) {\n\t\tclearTimeout(themeReloadTimer);\n\t\tthemeReloadTimer = undefined;\n\t}\n\tcloseWatcher(themeWatcher);\n\tthemeWatcher = undefined;\n}\n\n// ============================================================================\n// HTML Export Helpers\n// ============================================================================\n\n/**\n * Convert a 256-color index to hex string.\n * Indices 0-15: basic colors (approximate)\n * Indices 16-231: 6x6x6 color cube\n * Indices 232-255: grayscale ramp\n */\nfunction ansi256ToHex(index: number): string {\n\t// Basic colors (0-15) - approximate common terminal values\n\tconst basicColors = [\n\t\t\"#000000\",\n\t\t\"#800000\",\n\t\t\"#008000\",\n\t\t\"#808000\",\n\t\t\"#000080\",\n\t\t\"#800080\",\n\t\t\"#008080\",\n\t\t\"#c0c0c0\",\n\t\t\"#808080\",\n\t\t\"#ff0000\",\n\t\t\"#00ff00\",\n\t\t\"#ffff00\",\n\t\t\"#0000ff\",\n\t\t\"#ff00ff\",\n\t\t\"#00ffff\",\n\t\t\"#ffffff\",\n\t];\n\tif (index < 16) {\n\t\treturn basicColors[index];\n\t}\n\n\t// Color cube (16-231): 6x6x6 = 216 colors\n\tif (index < 232) {\n\t\tconst cubeIndex = index - 16;\n\t\tconst r = Math.floor(cubeIndex / 36);\n\t\tconst g = Math.floor((cubeIndex % 36) / 6);\n\t\tconst b = cubeIndex % 6;\n\t\tconst toHex = (n: number) => (n === 0 ? 0 : 55 + n * 40).toString(16).padStart(2, \"0\");\n\t\treturn `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n\t}\n\n\t// Grayscale (232-255): 24 shades\n\tconst gray = 8 + (index - 232) * 10;\n\tconst grayHex = gray.toString(16).padStart(2, \"0\");\n\treturn `#${grayHex}${grayHex}${grayHex}`;\n}\n\n/**\n * Get resolved theme colors as CSS-compatible hex strings.\n * Used by HTML export to generate CSS custom properties.\n */\nexport function getResolvedThemeColors(themeName?: string): Record<string, string> {\n\tconst name = themeName ?? currentThemeName ?? getDefaultTheme();\n\tconst isLight = name === \"light\";\n\tconst themeJson = loadThemeJson(name);\n\tconst resolved = resolveThemeColors(themeJson.colors, themeJson.vars);\n\n\t// Default text color for empty values (terminal uses default fg color)\n\tconst defaultText = isLight ? \"#000000\" : \"#e5e5e7\";\n\n\tconst cssColors: Record<string, string> = {};\n\tfor (const [key, value] of Object.entries(resolved)) {\n\t\tif (typeof value === \"number\") {\n\t\t\tcssColors[key] = ansi256ToHex(value);\n\t\t} else if (value === \"\") {\n\t\t\t// Empty means default terminal color - use sensible fallback for HTML\n\t\t\tcssColors[key] = defaultText;\n\t\t} else {\n\t\t\tcssColors[key] = value;\n\t\t}\n\t}\n\treturn cssColors;\n}\n\n/**\n * Check if a theme is a \"light\" theme (for CSS that needs light/dark variants).\n */\nexport function isLightTheme(themeName?: string): boolean {\n\t// Currently just check the name - could be extended to analyze colors\n\treturn themeName === \"light\";\n}\n\n/**\n * Get explicit export colors from theme JSON, if specified.\n * Returns undefined for each color that isn't explicitly set.\n */\nexport function getThemeExportColors(themeName?: string): {\n\tpageBg?: string;\n\tcardBg?: string;\n\tinfoBg?: string;\n} {\n\tconst name = themeName ?? currentThemeName ?? getDefaultTheme();\n\ttry {\n\t\tconst themeJson = loadThemeJson(name);\n\t\tconst exportSection = themeJson.export;\n\t\tif (!exportSection) return {};\n\n\t\tconst vars = themeJson.vars ?? {};\n\t\tconst resolve = (value: ColorValue | undefined): string | undefined => {\n\t\t\tif (value === undefined) return undefined;\n\t\t\tconst resolved = resolveVarRefs(value, vars);\n\t\t\tif (typeof resolved === \"number\") return ansi256ToHex(resolved);\n\t\t\tif (resolved === \"\") return undefined;\n\t\t\treturn resolved;\n\t\t};\n\n\t\treturn {\n\t\t\tpageBg: resolve(exportSection.pageBg),\n\t\t\tcardBg: resolve(exportSection.cardBg),\n\t\t\tinfoBg: resolve(exportSection.infoBg),\n\t\t};\n\t} catch {\n\t\treturn {};\n\t}\n}\n\n// ============================================================================\n// TUI Helpers\n// ============================================================================\n\ntype CliHighlightTheme = Record<string, (s: string) => string>;\n\nlet cachedHighlightThemeFor: Theme | undefined;\nlet cachedCliHighlightTheme: CliHighlightTheme | undefined;\n\nfunction buildCliHighlightTheme(t: Theme): CliHighlightTheme {\n\treturn {\n\t\tkeyword: (s: string) => t.fg(\"syntaxKeyword\", s),\n\t\tbuilt_in: (s: string) => t.fg(\"syntaxType\", s),\n\t\tliteral: (s: string) => t.fg(\"syntaxNumber\", s),\n\t\tnumber: (s: string) => t.fg(\"syntaxNumber\", s),\n\t\tstring: (s: string) => t.fg(\"syntaxString\", s),\n\t\tcomment: (s: string) => t.fg(\"syntaxComment\", s),\n\t\tfunction: (s: string) => t.fg(\"syntaxFunction\", s),\n\t\ttitle: (s: string) => t.fg(\"syntaxFunction\", s),\n\t\tclass: (s: string) => t.fg(\"syntaxType\", s),\n\t\ttype: (s: string) => t.fg(\"syntaxType\", s),\n\t\tattr: (s: string) => t.fg(\"syntaxVariable\", s),\n\t\tvariable: (s: string) => t.fg(\"syntaxVariable\", s),\n\t\tparams: (s: string) => t.fg(\"syntaxVariable\", s),\n\t\toperator: (s: string) => t.fg(\"syntaxOperator\", s),\n\t\tpunctuation: (s: string) => t.fg(\"syntaxPunctuation\", s),\n\t};\n}\n\nfunction getCliHighlightTheme(t: Theme): CliHighlightTheme {\n\tif (cachedHighlightThemeFor !== t || !cachedCliHighlightTheme) {\n\t\tcachedHighlightThemeFor = t;\n\t\tcachedCliHighlightTheme = buildCliHighlightTheme(t);\n\t}\n\treturn cachedCliHighlightTheme;\n}\n\n/**\n * Highlight code with syntax coloring based on file extension or language.\n * Returns array of highlighted lines.\n */\nexport function highlightCode(code: string, lang?: string): string[] {\n\t// Validate language before highlighting to avoid stderr spam from cli-highlight\n\tconst validLang = lang && supportsLanguage(lang) ? lang : undefined;\n\t// Skip highlighting when no valid language is specified. cli-highlight's\n\t// auto-detection is unreliable and can misidentify prose as AppleScript,\n\t// LiveCodeServer, etc., coloring random English words as keywords.\n\tif (!validLang) {\n\t\treturn code.split(\"\\n\").map((line) => theme.fg(\"mdCodeBlock\", line));\n\t}\n\tconst opts = {\n\t\tlanguage: validLang,\n\t\tignoreIllegals: true,\n\t\ttheme: getCliHighlightTheme(theme),\n\t};\n\ttry {\n\t\treturn highlight(code, opts).split(\"\\n\");\n\t} catch {\n\t\treturn code.split(\"\\n\");\n\t}\n}\n\n/**\n * Get language identifier from file path extension.\n */\nexport function getLanguageFromPath(filePath: string): string | undefined {\n\tconst ext = filePath.split(\".\").pop()?.toLowerCase();\n\tif (!ext) return undefined;\n\n\tconst extToLang: Record<string, string> = {\n\t\tts: \"typescript\",\n\t\ttsx: \"typescript\",\n\t\tjs: \"javascript\",\n\t\tjsx: \"javascript\",\n\t\tmjs: \"javascript\",\n\t\tcjs: \"javascript\",\n\t\tpy: \"python\",\n\t\trb: \"ruby\",\n\t\trs: \"rust\",\n\t\tgo: \"go\",\n\t\tjava: \"java\",\n\t\tkt: \"kotlin\",\n\t\tswift: \"swift\",\n\t\tc: \"c\",\n\t\th: \"c\",\n\t\tcpp: \"cpp\",\n\t\tcc: \"cpp\",\n\t\tcxx: \"cpp\",\n\t\thpp: \"cpp\",\n\t\tcs: \"csharp\",\n\t\tphp: \"php\",\n\t\tsh: \"bash\",\n\t\tbash: \"bash\",\n\t\tzsh: \"bash\",\n\t\tfish: \"fish\",\n\t\tps1: \"powershell\",\n\t\tsql: \"sql\",\n\t\thtml: \"html\",\n\t\thtm: \"html\",\n\t\tcss: \"css\",\n\t\tscss: \"scss\",\n\t\tsass: \"sass\",\n\t\tless: \"less\",\n\t\tjson: \"json\",\n\t\tyaml: \"yaml\",\n\t\tyml: \"yaml\",\n\t\ttoml: \"toml\",\n\t\txml: \"xml\",\n\t\tmd: \"markdown\",\n\t\tmarkdown: \"markdown\",\n\t\tdockerfile: \"dockerfile\",\n\t\tmakefile: \"makefile\",\n\t\tcmake: \"cmake\",\n\t\tlua: \"lua\",\n\t\tperl: \"perl\",\n\t\tr: \"r\",\n\t\tscala: \"scala\",\n\t\tclj: \"clojure\",\n\t\tex: \"elixir\",\n\t\texs: \"elixir\",\n\t\terl: \"erlang\",\n\t\ths: \"haskell\",\n\t\tml: \"ocaml\",\n\t\tvim: \"vim\",\n\t\tgraphql: \"graphql\",\n\t\tproto: \"protobuf\",\n\t\ttf: \"hcl\",\n\t\thcl: \"hcl\",\n\t};\n\n\treturn extToLang[ext];\n}\n\nexport function getMarkdownTheme(): MarkdownTheme {\n\treturn {\n\t\theading: (text: string) => theme.fg(\"mdHeading\", text),\n\t\tlink: (text: string) => theme.fg(\"mdLink\", text),\n\t\tlinkUrl: (text: string) => theme.fg(\"mdLinkUrl\", text),\n\t\tcode: (text: string) => theme.fg(\"mdCode\", text),\n\t\tcodeBlock: (text: string) => theme.fg(\"mdCodeBlock\", text),\n\t\tcodeBlockBorder: (text: string) => theme.fg(\"mdCodeBlockBorder\", text),\n\t\tquote: (text: string) => theme.fg(\"mdQuote\", text),\n\t\tquoteBorder: (text: string) => theme.fg(\"mdQuoteBorder\", text),\n\t\thr: (text: string) => theme.fg(\"mdHr\", text),\n\t\tlistBullet: (text: string) => theme.fg(\"mdListBullet\", text),\n\t\tbold: (text: string) => theme.bold(text),\n\t\titalic: (text: string) => theme.italic(text),\n\t\tunderline: (text: string) => theme.underline(text),\n\t\tstrikethrough: (text: string) => chalk.strikethrough(text),\n\t\thighlightCode: (code: string, lang?: string): string[] => {\n\t\t\t// Validate language before highlighting to avoid stderr spam from cli-highlight\n\t\t\tconst validLang = lang && supportsLanguage(lang) ? lang : undefined;\n\t\t\t// Skip highlighting when no valid language is specified. cli-highlight's\n\t\t\t// auto-detection is unreliable and can misidentify prose as AppleScript,\n\t\t\t// LiveCodeServer, etc., coloring random English words as keywords.\n\t\t\tif (!validLang) {\n\t\t\t\treturn code.split(\"\\n\").map((line) => theme.fg(\"mdCodeBlock\", line));\n\t\t\t}\n\t\t\tconst opts = {\n\t\t\t\tlanguage: validLang,\n\t\t\t\tignoreIllegals: true,\n\t\t\t\ttheme: getCliHighlightTheme(theme),\n\t\t\t};\n\t\t\ttry {\n\t\t\t\treturn highlight(code, opts).split(\"\\n\");\n\t\t\t} catch {\n\t\t\t\treturn code.split(\"\\n\").map((line) => theme.fg(\"mdCodeBlock\", line));\n\t\t\t}\n\t\t},\n\t};\n}\n\nexport function getSelectListTheme(): SelectListTheme {\n\treturn {\n\t\tselectedPrefix: (text: string) => theme.fg(\"accent\", text),\n\t\tselectedText: (text: string) => theme.fg(\"accent\", text),\n\t\tdescription: (text: string) => theme.fg(\"muted\", text),\n\t\tscrollInfo: (text: string) => theme.fg(\"muted\", text),\n\t\tnoMatch: (text: string) => theme.fg(\"muted\", text),\n\t};\n}\n\nexport function getEditorTheme(): EditorTheme {\n\treturn {\n\t\tborderColor: (text: string) => theme.fg(\"borderMuted\", text),\n\t\tselectList: getSelectListTheme(),\n\t};\n}\n\nexport function getSettingsListTheme(): import(\"@earendil-works/pi-tui\").SettingsListTheme {\n\treturn {\n\t\tlabel: (text: string, selected: boolean) => (selected ? theme.fg(\"accent\", text) : text),\n\t\tvalue: (text: string, selected: boolean) => (selected ? theme.fg(\"accent\", text) : theme.fg(\"muted\", text)),\n\t\tdescription: (text: string) => theme.fg(\"dim\", text),\n\t\tcursor: theme.fg(\"accent\", \"→ \"),\n\t\thint: (text: string) => theme.fg(\"dim\", text),\n\t};\n}\n"]}
|