@oh-my-pi/pi-coding-agent 15.12.3 → 15.13.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 +347 -7
- package/dist/cli.js +1615 -1231
- package/dist/types/async/job-manager.d.ts +15 -0
- package/dist/types/autolearn/controller.d.ts +25 -0
- package/dist/types/autolearn/managed-skills.d.ts +45 -0
- package/dist/types/autoresearch/state.d.ts +1 -1
- package/dist/types/autoresearch/tools/init-experiment.d.ts +1 -1
- package/dist/types/autoresearch/tools/log-experiment.d.ts +1 -1
- package/dist/types/autoresearch/tools/run-experiment.d.ts +1 -1
- package/dist/types/autoresearch/tools/update-notes.d.ts +1 -1
- package/dist/types/autoresearch/types.d.ts +1 -1
- package/dist/types/cli/args.d.ts +19 -2
- package/dist/types/cli/models-cli.d.ts +49 -0
- package/dist/types/cli/session-picker.d.ts +1 -1
- package/dist/types/cli/setup-cli.d.ts +1 -1
- package/dist/types/cli/setup-model-picker.d.ts +14 -0
- package/dist/types/collab/protocol.d.ts +1 -1
- package/dist/types/commands/launch.d.ts +0 -3
- package/dist/types/commands/models.d.ts +33 -0
- package/dist/types/commands/say.d.ts +24 -0
- package/dist/types/commands/token.d.ts +25 -0
- package/dist/types/commit/agentic/tools/analyze-file.d.ts +1 -1
- package/dist/types/commit/agentic/tools/git-file-diff.d.ts +1 -1
- package/dist/types/commit/agentic/tools/git-hunk.d.ts +1 -1
- package/dist/types/commit/agentic/tools/git-overview.d.ts +1 -1
- package/dist/types/commit/agentic/tools/propose-changelog.d.ts +1 -1
- package/dist/types/commit/agentic/tools/propose-commit.d.ts +1 -1
- package/dist/types/commit/agentic/tools/recent-commits.d.ts +1 -1
- package/dist/types/commit/agentic/tools/schemas.d.ts +1 -1
- package/dist/types/commit/agentic/tools/split-commit.d.ts +1 -1
- package/dist/types/commit/changelog/generate.d.ts +1 -1
- package/dist/types/commit/shared-llm.d.ts +1 -1
- package/dist/types/config/keybindings.d.ts +3 -3
- package/dist/types/config/model-registry.d.ts +17 -0
- package/dist/types/config/models-config-schema.d.ts +13 -1
- package/dist/types/config/models-config.d.ts +8 -2
- package/dist/types/config/settings-schema.d.ts +281 -58
- package/dist/types/edit/hashline/params.d.ts +1 -1
- package/dist/types/edit/modes/apply-patch.d.ts +1 -1
- package/dist/types/edit/modes/patch.d.ts +1 -1
- package/dist/types/edit/modes/replace.d.ts +1 -1
- package/dist/types/export/html/index.d.ts +2 -1
- package/dist/types/extensibility/custom-commands/types.d.ts +2 -2
- package/dist/types/extensibility/custom-tools/types.d.ts +2 -2
- package/dist/types/extensibility/extensions/model-api.d.ts +17 -0
- package/dist/types/extensibility/extensions/runner.d.ts +3 -1
- package/dist/types/extensibility/extensions/types.d.ts +49 -3
- package/dist/types/extensibility/hooks/index.d.ts +2 -1
- package/dist/types/extensibility/hooks/types.d.ts +2 -2
- package/dist/types/extensibility/plugins/legacy-pi-compat.d.ts +9 -0
- package/dist/types/extensibility/plugins/loader.d.ts +11 -0
- package/dist/types/extensibility/shared-events.d.ts +1 -1
- package/dist/types/extensibility/skills.d.ts +10 -0
- package/dist/types/goals/guided-setup.d.ts +18 -0
- package/dist/types/goals/state.d.ts +1 -1
- package/dist/types/goals/tools/goal-tool.d.ts +1 -1
- package/dist/types/hindsight/transcript.d.ts +1 -1
- package/dist/types/index.d.ts +5 -0
- package/dist/types/internal-urls/local-protocol.d.ts +4 -2
- package/dist/types/lsp/types.d.ts +1 -1
- package/dist/types/main.d.ts +4 -3
- package/dist/types/mcp/manager.d.ts +8 -0
- package/dist/types/mcp/startup-events.d.ts +11 -0
- package/dist/types/memories/index.d.ts +7 -0
- package/dist/types/memory-backend/local-backend.d.ts +4 -3
- package/dist/types/mnemopi/config.d.ts +28 -0
- package/dist/types/modes/acp/acp-agent.d.ts +1 -2
- package/dist/types/modes/components/agent-hub.d.ts +6 -0
- package/dist/types/modes/components/assistant-message.d.ts +1 -2
- package/dist/types/modes/components/compaction-summary-message.d.ts +15 -1
- package/dist/types/modes/components/custom-editor.d.ts +39 -1
- package/dist/types/modes/components/custom-editor.test.d.ts +1 -0
- package/dist/types/modes/components/index.d.ts +1 -0
- package/dist/types/modes/components/logout-account-selector.d.ts +8 -0
- package/dist/types/modes/components/session-selector.d.ts +1 -1
- package/dist/types/modes/components/status-line/component.d.ts +9 -5
- package/dist/types/modes/components/status-line/types.d.ts +2 -1
- package/dist/types/modes/components/tool-execution.d.ts +26 -16
- package/dist/types/modes/components/transcript-container.d.ts +23 -2
- package/dist/types/modes/components/tree-selector.d.ts +1 -1
- package/dist/types/modes/components/usage-row.d.ts +3 -0
- package/dist/types/modes/controllers/command-controller.d.ts +2 -2
- package/dist/types/modes/controllers/event-controller.d.ts +0 -17
- package/dist/types/modes/controllers/input-controller.d.ts +14 -0
- package/dist/types/modes/controllers/selector-controller.d.ts +3 -1
- package/dist/types/modes/gradient-highlight.d.ts +9 -4
- package/dist/types/modes/image-references.d.ts +6 -0
- package/dist/types/modes/interactive-mode.d.ts +27 -6
- package/dist/types/modes/magic-keywords.d.ts +13 -1
- package/dist/types/modes/rpc/rpc-mode.d.ts +35 -1
- package/dist/types/modes/rpc/rpc-types.d.ts +9 -1
- package/dist/types/modes/runtime-init.d.ts +4 -0
- package/dist/types/modes/theme/theme.d.ts +13 -2
- package/dist/types/modes/types.d.ts +8 -7
- package/dist/types/modes/utils/ui-helpers.d.ts +1 -1
- package/dist/types/registry/agent-registry.d.ts +17 -0
- package/dist/types/secrets/obfuscator.d.ts +1 -1
- package/dist/types/session/agent-session.d.ts +28 -35
- package/dist/types/session/agent-storage.d.ts +2 -1
- package/dist/types/session/indexed-session-storage.d.ts +3 -3
- package/dist/types/session/messages.d.ts +8 -10
- package/dist/types/session/session-context.d.ts +39 -0
- package/dist/types/session/session-entries.d.ts +159 -0
- package/dist/types/session/session-listing.d.ts +69 -0
- package/dist/types/session/session-loader.d.ts +16 -0
- package/dist/types/session/session-manager.d.ts +85 -462
- package/dist/types/session/session-migrations.d.ts +12 -0
- package/dist/types/session/session-paths.d.ts +25 -0
- package/dist/types/session/session-persistence.d.ts +8 -0
- package/dist/types/session/session-storage.d.ts +11 -7
- package/dist/types/session/snapcompact-inline.d.ts +12 -1
- package/dist/types/session/snapcompact-savings-journal.d.ts +46 -0
- package/dist/types/session/tool-choice-queue.d.ts +6 -6
- package/dist/types/slash-commands/helpers/logout.d.ts +15 -0
- package/dist/types/stt/asr-client.d.ts +90 -0
- package/dist/types/stt/asr-protocol.d.ts +97 -0
- package/dist/types/stt/asr-worker.d.ts +2 -0
- package/dist/types/stt/downloader.d.ts +38 -0
- package/dist/types/stt/endpointer.d.ts +59 -0
- package/dist/types/stt/index.d.ts +5 -1
- package/dist/types/stt/models.d.ts +120 -0
- package/dist/types/stt/recorder.d.ts +17 -0
- package/dist/types/stt/stt-controller.d.ts +6 -0
- package/dist/types/stt/transcriber.d.ts +5 -7
- package/dist/types/stt/wav.d.ts +29 -0
- package/dist/types/system-prompt.d.ts +4 -0
- package/dist/types/task/executor.d.ts +2 -0
- package/dist/types/task/index.d.ts +9 -1
- package/dist/types/task/types.d.ts +37 -1
- package/dist/types/tools/ask.d.ts +1 -1
- package/dist/types/tools/ast-edit.d.ts +1 -1
- package/dist/types/tools/ast-grep.d.ts +1 -1
- package/dist/types/tools/bash.d.ts +3 -3
- package/dist/types/tools/browser/cmux/cmux-tab.d.ts +202 -0
- package/dist/types/tools/browser/cmux/rpc.d.ts +70 -0
- package/dist/types/tools/browser/cmux/socket-client.d.ts +19 -0
- package/dist/types/tools/browser/registry.d.ts +16 -3
- package/dist/types/tools/browser/render.d.ts +2 -0
- package/dist/types/tools/browser/tab-protocol.d.ts +2 -0
- package/dist/types/tools/browser/tab-supervisor.d.ts +16 -4
- package/dist/types/tools/browser.d.ts +3 -1
- package/dist/types/tools/checkpoint.d.ts +1 -1
- package/dist/types/tools/debug.d.ts +1 -1
- package/dist/types/tools/eval-render.d.ts +1 -1
- package/dist/types/tools/eval.d.ts +1 -1
- package/dist/types/tools/find.d.ts +1 -1
- package/dist/types/tools/gh.d.ts +1 -1
- package/dist/types/tools/image-gen.d.ts +1 -1
- package/dist/types/tools/index.d.ts +14 -2
- package/dist/types/tools/inspect-image.d.ts +1 -1
- package/dist/types/tools/irc.d.ts +2 -1
- package/dist/types/tools/job.d.ts +1 -1
- package/dist/types/tools/learn.d.ts +51 -0
- package/dist/types/tools/manage-skill.d.ts +40 -0
- package/dist/types/tools/memory-edit.d.ts +1 -1
- package/dist/types/tools/memory-recall.d.ts +1 -1
- package/dist/types/tools/memory-reflect.d.ts +1 -1
- package/dist/types/tools/memory-retain.d.ts +1 -1
- package/dist/types/tools/plan-mode-guard.d.ts +10 -0
- package/dist/types/tools/read.d.ts +1 -1
- package/dist/types/tools/render-mermaid.d.ts +1 -1
- package/dist/types/tools/renderers.d.ts +7 -11
- package/dist/types/tools/resolve.d.ts +1 -1
- package/dist/types/tools/review.d.ts +1 -1
- package/dist/types/tools/search-tool-bm25.d.ts +1 -1
- package/dist/types/tools/search.d.ts +1 -1
- package/dist/types/tools/ssh.d.ts +2 -2
- package/dist/types/tools/todo.d.ts +2 -2
- package/dist/types/tools/tts.d.ts +26 -1
- package/dist/types/tools/write.d.ts +2 -2
- package/dist/types/tts/downloader.d.ts +20 -0
- package/dist/types/tts/index.d.ts +8 -0
- package/dist/types/tts/models.d.ts +82 -0
- package/dist/types/tts/player.d.ts +32 -0
- package/dist/types/tts/runtime.d.ts +6 -0
- package/dist/types/tts/streaming-player.d.ts +41 -0
- package/dist/types/tts/tts-client.d.ts +93 -0
- package/dist/types/tts/tts-protocol.d.ts +95 -0
- package/dist/types/tts/tts-worker.d.ts +2 -0
- package/dist/types/tts/vocalizer.d.ts +41 -0
- package/dist/types/tts/wav.d.ts +8 -0
- package/dist/types/utils/clipboard.d.ts +4 -3
- package/dist/types/utils/image-loading.d.ts +18 -1
- package/dist/types/utils/thinking-display.d.ts +17 -0
- package/dist/types/utils/tool-choice.d.ts +8 -0
- package/dist/types/utils/tools-manager.d.ts +2 -1
- package/dist/types/utils/tools-manager.test.d.ts +1 -0
- package/dist/types/web/scrapers/github.d.ts +1 -1
- package/dist/types/web/search/index.d.ts +1 -1
- package/package.json +17 -16
- package/src/async/job-manager.ts +49 -0
- package/src/autolearn/controller.ts +139 -0
- package/src/autolearn/managed-skills.ts +257 -0
- package/src/autoresearch/state.ts +1 -1
- package/src/autoresearch/storage.ts +2 -1
- package/src/autoresearch/tools/init-experiment.ts +1 -1
- package/src/autoresearch/tools/log-experiment.ts +1 -1
- package/src/autoresearch/tools/run-experiment.ts +1 -1
- package/src/autoresearch/tools/update-notes.ts +1 -1
- package/src/autoresearch/types.ts +1 -1
- package/src/cli/args.ts +56 -10
- package/src/cli/auth-gateway-cli.ts +1 -1
- package/src/cli/bench-cli.ts +1 -1
- package/src/cli/dry-balance-cli.ts +1 -1
- package/src/cli/models-cli.ts +427 -0
- package/src/cli/session-picker.ts +2 -1
- package/src/cli/setup-cli.ts +148 -47
- package/src/cli/setup-model-picker.ts +43 -0
- package/src/cli-commands.ts +3 -0
- package/src/cli.ts +45 -13
- package/src/collab/host.ts +10 -13
- package/src/collab/protocol.ts +1 -1
- package/src/commands/launch.ts +0 -3
- package/src/commands/models.ts +61 -0
- package/src/commands/say.ts +102 -0
- package/src/commands/setup.ts +1 -1
- package/src/commands/token.ts +89 -0
- package/src/commit/agentic/tools/analyze-file.ts +4 -1
- package/src/commit/agentic/tools/git-file-diff.ts +1 -1
- package/src/commit/agentic/tools/git-hunk.ts +1 -1
- package/src/commit/agentic/tools/git-overview.ts +1 -1
- package/src/commit/agentic/tools/propose-changelog.ts +1 -1
- package/src/commit/agentic/tools/propose-commit.ts +1 -1
- package/src/commit/agentic/tools/recent-commits.ts +1 -1
- package/src/commit/agentic/tools/schemas.ts +1 -1
- package/src/commit/agentic/tools/split-commit.ts +1 -1
- package/src/commit/analysis/summary.ts +1 -1
- package/src/commit/changelog/generate.ts +1 -1
- package/src/commit/shared-llm.ts +1 -1
- package/src/config/keybindings.ts +2 -2
- package/src/config/model-discovery.ts +11 -5
- package/src/config/model-registry.ts +79 -21
- package/src/config/model-resolver.ts +2 -2
- package/src/config/models-config-schema.ts +5 -2
- package/src/config/models-config.ts +2 -1
- package/src/config/settings-schema.ts +266 -32
- package/src/config/settings.ts +10 -0
- package/src/discovery/builtin.ts +23 -1
- package/src/discovery/claude-plugins.ts +44 -5
- package/src/discovery/helpers.ts +41 -1
- package/src/edit/hashline/params.ts +1 -1
- package/src/edit/modes/apply-patch.ts +1 -1
- package/src/edit/modes/patch.ts +1 -1
- package/src/edit/modes/replace.ts +1 -1
- package/src/eval/__tests__/budget-bridge.test.ts +1 -1
- package/src/eval/agent-bridge.ts +1 -1
- package/src/eval/completion-bridge.ts +1 -1
- package/src/eval/js/shared/prelude.txt +69 -17
- package/src/export/html/index.ts +3 -6
- package/src/export/html/template.js +24 -2
- package/src/export/html/tool-views.generated.js +2 -2
- package/src/extensibility/custom-commands/loader.ts +1 -1
- package/src/extensibility/custom-commands/types.ts +2 -2
- package/src/extensibility/custom-tools/loader.ts +1 -1
- package/src/extensibility/custom-tools/types.ts +2 -2
- package/src/extensibility/extensions/loader.ts +2 -2
- package/src/extensibility/extensions/model-api.ts +41 -0
- package/src/extensibility/extensions/runner.ts +4 -0
- package/src/extensibility/extensions/types.ts +54 -3
- package/src/extensibility/extensions/wrapper.ts +41 -5
- package/src/extensibility/hooks/index.ts +2 -1
- package/src/extensibility/hooks/loader.ts +1 -1
- package/src/extensibility/hooks/types.ts +2 -2
- package/src/extensibility/plugins/legacy-pi-compat.ts +43 -13
- package/src/extensibility/plugins/loader.ts +30 -19
- package/src/extensibility/plugins/manager.ts +221 -90
- package/src/extensibility/shared-events.ts +1 -1
- package/src/extensibility/skills.ts +101 -5
- package/src/goals/guided-setup.ts +133 -0
- package/src/goals/state.ts +1 -1
- package/src/goals/tools/goal-tool.ts +1 -1
- package/src/hindsight/transcript.ts +1 -1
- package/src/index.ts +5 -0
- package/src/internal-urls/docs-index.generated.ts +13 -10
- package/src/internal-urls/history-protocol.ts +1 -1
- package/src/internal-urls/local-protocol.ts +29 -7
- package/src/lsp/types.ts +1 -1
- package/src/main.ts +27 -32
- package/src/mcp/config-writer.ts +7 -3
- package/src/mcp/manager.ts +11 -0
- package/src/mcp/startup-events.ts +21 -0
- package/src/mcp/transports/stdio.ts +2 -1
- package/src/memories/index.ts +149 -12
- package/src/memories/storage.ts +2 -1
- package/src/memory-backend/local-backend.ts +11 -5
- package/src/mnemopi/backend.ts +1 -0
- package/src/mnemopi/config.ts +112 -12
- package/src/modes/acp/acp-agent.ts +8 -53
- package/src/modes/acp/acp-event-mapper.ts +5 -1
- package/src/modes/components/agent-hub.ts +51 -5
- package/src/modes/components/assistant-message.ts +12 -44
- package/src/modes/components/compaction-summary-message.ts +125 -26
- package/src/modes/components/custom-editor.test.ts +96 -0
- package/src/modes/components/custom-editor.ts +164 -8
- package/src/modes/components/index.ts +1 -0
- package/src/modes/components/logout-account-selector.ts +130 -0
- package/src/modes/components/mcp-add-wizard.ts +1 -1
- package/src/modes/components/model-selector.ts +2 -2
- package/src/modes/components/session-selector.ts +1 -1
- package/src/modes/components/settings-defs.ts +7 -0
- package/src/modes/components/status-line/component.ts +54 -157
- package/src/modes/components/status-line/segments.ts +1 -1
- package/src/modes/components/status-line/types.ts +2 -1
- package/src/modes/components/tool-execution.ts +82 -43
- package/src/modes/components/transcript-container.ts +70 -1
- package/src/modes/components/tree-selector.ts +1 -1
- package/src/modes/components/usage-row.ts +18 -0
- package/src/modes/components/user-message.ts +4 -2
- package/src/modes/controllers/command-controller.ts +14 -16
- package/src/modes/controllers/event-controller.ts +101 -73
- package/src/modes/controllers/extension-ui-controller.ts +6 -0
- package/src/modes/controllers/input-controller.ts +311 -57
- package/src/modes/controllers/mcp-command-controller.ts +44 -3
- package/src/modes/controllers/selector-controller.ts +68 -12
- package/src/modes/controllers/streaming-reveal.ts +4 -3
- package/src/modes/gradient-highlight.ts +21 -9
- package/src/modes/image-references.ts +20 -0
- package/src/modes/interactive-mode.ts +288 -48
- package/src/modes/magic-keywords.ts +27 -5
- package/src/modes/rpc/rpc-mode.ts +146 -14
- package/src/modes/rpc/rpc-subagents.ts +2 -2
- package/src/modes/rpc/rpc-types.ts +8 -2
- package/src/modes/runtime-init.ts +28 -3
- package/src/modes/theme/theme.ts +99 -51
- package/src/modes/types.ts +6 -7
- package/src/modes/utils/hotkeys-markdown.ts +1 -1
- package/src/modes/utils/ui-helpers.ts +36 -7
- package/src/priority.json +5 -1
- package/src/prompts/agents/task.md +1 -0
- package/src/prompts/goals/guided-goal-interview.md +8 -0
- package/src/prompts/goals/guided-goal-system.md +12 -0
- package/src/prompts/memories/read-path.md +6 -0
- package/src/prompts/system/autolearn-guidance-learn.md +1 -0
- package/src/prompts/system/autolearn-guidance.md +7 -0
- package/src/prompts/system/autolearn-nudge.md +3 -0
- package/src/prompts/system/eager-task.md +7 -0
- package/src/prompts/system/eager-todo.md +11 -6
- package/src/prompts/system/empty-stop-retry.md +4 -6
- package/src/prompts/system/subagent-system-prompt.md +4 -0
- package/src/prompts/system/system-prompt.md +10 -5
- package/src/prompts/system/title-marker-instruction.md +1 -0
- package/src/prompts/system/title-system-marker.md +16 -0
- package/src/prompts/tools/job.md +1 -0
- package/src/prompts/tools/learn.md +7 -0
- package/src/prompts/tools/manage-skill.md +9 -0
- package/src/prompts/tools/task.md +3 -0
- package/src/registry/agent-registry.ts +30 -0
- package/src/sdk.ts +103 -43
- package/src/secrets/obfuscator.ts +1 -1
- package/src/session/agent-session.ts +331 -318
- package/src/session/agent-storage.ts +18 -9
- package/src/session/history-storage.ts +3 -2
- package/src/session/indexed-session-storage.ts +7 -10
- package/src/session/messages.ts +9 -11
- package/src/session/session-context.ts +352 -0
- package/src/session/session-dump-format.ts +4 -2
- package/src/session/session-entries.ts +194 -0
- package/src/session/session-listing.ts +588 -0
- package/src/session/session-loader.ts +106 -0
- package/src/session/session-manager.ts +968 -3064
- package/src/session/session-migrations.ts +78 -0
- package/src/session/session-paths.ts +193 -0
- package/src/session/session-persistence.ts +131 -0
- package/src/session/session-storage.ts +91 -30
- package/src/session/snapcompact-inline.ts +21 -1
- package/src/session/snapcompact-savings-journal.ts +113 -0
- package/src/session/tool-choice-queue.ts +23 -11
- package/src/slash-commands/builtin-registry.ts +40 -4
- package/src/slash-commands/helpers/logout.ts +88 -0
- package/src/stt/asr-client.ts +520 -0
- package/src/stt/asr-protocol.ts +65 -0
- package/src/stt/asr-worker.ts +790 -0
- package/src/stt/downloader.ts +107 -47
- package/src/stt/endpointer.ts +259 -0
- package/src/stt/index.ts +5 -1
- package/src/stt/models.ts +150 -0
- package/src/stt/recorder.ts +247 -60
- package/src/stt/stt-controller.ts +201 -22
- package/src/stt/transcriber.ts +37 -68
- package/src/stt/wav.ts +173 -0
- package/src/system-prompt.ts +8 -0
- package/src/task/agents.ts +1 -2
- package/src/task/executor.ts +49 -15
- package/src/task/index.ts +60 -6
- package/src/task/render.ts +83 -8
- package/src/task/types.ts +54 -1
- package/src/tools/ask.ts +9 -1
- package/src/tools/ast-edit.ts +1 -1
- package/src/tools/ast-grep.ts +1 -1
- package/src/tools/bash.ts +5 -4
- package/src/tools/browser/cmux/cmux-tab.ts +1264 -0
- package/src/tools/browser/cmux/rpc.ts +156 -0
- package/src/tools/browser/cmux/socket-client.ts +309 -0
- package/src/tools/browser/registry.ts +37 -3
- package/src/tools/browser/render.ts +6 -1
- package/src/tools/browser/tab-protocol.ts +2 -0
- package/src/tools/browser/tab-supervisor.ts +189 -18
- package/src/tools/browser/tab-worker.ts +1 -1
- package/src/tools/browser.ts +16 -1
- package/src/tools/checkpoint.ts +1 -1
- package/src/tools/debug.ts +1 -1
- package/src/tools/eval-render.ts +4 -3
- package/src/tools/eval.ts +11 -6
- package/src/tools/fetch.ts +13 -2
- package/src/tools/find.ts +1 -1
- package/src/tools/gh.ts +1 -1
- package/src/tools/github-cache.ts +2 -1
- package/src/tools/image-gen.ts +1 -1
- package/src/tools/index.ts +43 -5
- package/src/tools/inspect-image.ts +3 -1
- package/src/tools/irc.ts +11 -3
- package/src/tools/job.ts +15 -3
- package/src/tools/learn.ts +144 -0
- package/src/tools/manage-skill.ts +104 -0
- package/src/tools/memory-edit.ts +1 -1
- package/src/tools/memory-recall.ts +1 -1
- package/src/tools/memory-reflect.ts +1 -1
- package/src/tools/memory-retain.ts +1 -1
- package/src/tools/plan-mode-guard.ts +53 -19
- package/src/tools/read.ts +8 -2
- package/src/tools/render-mermaid.ts +1 -1
- package/src/tools/renderers.ts +7 -11
- package/src/tools/report-tool-issue.ts +3 -2
- package/src/tools/resolve.ts +1 -1
- package/src/tools/review.ts +1 -1
- package/src/tools/search-tool-bm25.ts +1 -1
- package/src/tools/search.ts +1 -1
- package/src/tools/ssh.ts +5 -4
- package/src/tools/todo.ts +2 -2
- package/src/tools/tts.ts +204 -93
- package/src/tools/write.ts +19 -3
- package/src/tts/downloader.ts +64 -0
- package/src/tts/index.ts +8 -0
- package/src/tts/models.ts +137 -0
- package/src/tts/player.ts +137 -0
- package/src/tts/runtime.ts +21 -0
- package/src/tts/streaming-player.ts +266 -0
- package/src/tts/tts-client.ts +647 -0
- package/src/tts/tts-protocol.ts +60 -0
- package/src/tts/tts-worker.ts +497 -0
- package/src/tts/vocalizer.ts +162 -0
- package/src/tts/wav.ts +58 -0
- package/src/utils/clipboard.ts +35 -18
- package/src/utils/image-loading.ts +35 -4
- package/src/utils/thinking-display.ts +37 -0
- package/src/utils/title-generator.ts +48 -5
- package/src/utils/tool-choice.ts +16 -0
- package/src/utils/tools-manager.test.ts +25 -0
- package/src/utils/tools-manager.ts +19 -1
- package/src/web/scrapers/github.ts +96 -0
- package/src/web/search/index.ts +14 -1
- package/src/web/search/providers/searxng.ts +13 -1
- package/dist/types/cli/list-models.d.ts +0 -30
- package/dist/types/stt/setup.d.ts +0 -18
- package/src/cli/list-models.ts +0 -194
- package/src/stt/setup.ts +0 -52
- package/src/stt/transcribe.py +0 -70
|
@@ -2,6 +2,7 @@ import { THINKING_EFFORTS } from "@oh-my-pi/pi-ai";
|
|
|
2
2
|
import { DEFAULT_SHARE_URL } from "@oh-my-pi/pi-wire";
|
|
3
3
|
import { SHAPE_VARIANT_NAMES } from "@oh-my-pi/snapcompact";
|
|
4
4
|
import { DEFAULT_RELAY_URL } from "../collab/protocol";
|
|
5
|
+
import { DEFAULT_STT_MODEL_KEY, STT_MODEL_OPTIONS, STT_MODEL_VALUES } from "../stt/models";
|
|
5
6
|
import { AUTO_THINKING, getConfiguredThinkingLevelMetadata, getThinkingLevelMetadata } from "../thinking";
|
|
6
7
|
import {
|
|
7
8
|
TINY_MODEL_DEVICE_DEFAULT,
|
|
@@ -24,6 +25,14 @@ import {
|
|
|
24
25
|
TINY_TITLE_MODEL_OPTIONS,
|
|
25
26
|
TINY_TITLE_MODEL_VALUES,
|
|
26
27
|
} from "../tiny/models";
|
|
28
|
+
import {
|
|
29
|
+
DEFAULT_TTS_LOCAL_MODEL_KEY,
|
|
30
|
+
DEFAULT_TTS_VOICE,
|
|
31
|
+
TTS_LOCAL_MODEL_OPTIONS,
|
|
32
|
+
TTS_LOCAL_MODEL_VALUES,
|
|
33
|
+
TTS_LOCAL_VOICE_OPTIONS,
|
|
34
|
+
TTS_LOCAL_VOICE_VALUES,
|
|
35
|
+
} from "../tts/models";
|
|
27
36
|
import { EDIT_MODES } from "../utils/edit-mode";
|
|
28
37
|
import { SEARCH_PROVIDER_OPTIONS, SEARCH_PROVIDER_PREFERENCES } from "../web/search/types";
|
|
29
38
|
|
|
@@ -109,7 +118,7 @@ export const TAB_GROUPS: Record<SettingTab, readonly string[]> = {
|
|
|
109
118
|
"Power (macOS)",
|
|
110
119
|
],
|
|
111
120
|
context: ["General", "Compaction", "Rules (TTSR)", "Experimental"],
|
|
112
|
-
memory: ["General", "Mnemopi", "Hindsight"],
|
|
121
|
+
memory: ["General", "Auto-Learn", "Mnemopi", "Hindsight"],
|
|
113
122
|
files: ["Editing", "Reading", "Read Summaries", "LSP"],
|
|
114
123
|
shell: ["Bash", "Eval & Python"],
|
|
115
124
|
tools: [
|
|
@@ -998,6 +1007,32 @@ export const SETTINGS_SCHEMA = {
|
|
|
998
1007
|
},
|
|
999
1008
|
},
|
|
1000
1009
|
|
|
1010
|
+
fastModeScope: {
|
|
1011
|
+
type: "enum",
|
|
1012
|
+
values: ["both", "openai", "claude"] as const,
|
|
1013
|
+
default: "both",
|
|
1014
|
+
ui: {
|
|
1015
|
+
tab: "model",
|
|
1016
|
+
group: "Sampling",
|
|
1017
|
+
label: "Fast Mode Scope",
|
|
1018
|
+
description:
|
|
1019
|
+
'Which providers `/fast on` (and the fast-mode toggle) target. "both" = priority on every supported provider; "openai"/"claude" scope it to one family (mirrors serviceTier openai-only/claude-only).',
|
|
1020
|
+
options: [
|
|
1021
|
+
{ value: "both", label: "Both", description: "Priority on every supported provider" },
|
|
1022
|
+
{
|
|
1023
|
+
value: "openai",
|
|
1024
|
+
label: "OpenAI only",
|
|
1025
|
+
description: "Priority on OpenAI/OpenAI-Codex requests; ignored elsewhere",
|
|
1026
|
+
},
|
|
1027
|
+
{
|
|
1028
|
+
value: "claude",
|
|
1029
|
+
label: "Claude only",
|
|
1030
|
+
description: "Anthropic fast mode on direct Claude requests; ignored elsewhere",
|
|
1031
|
+
},
|
|
1032
|
+
],
|
|
1033
|
+
},
|
|
1034
|
+
},
|
|
1035
|
+
|
|
1001
1036
|
// Retries
|
|
1002
1037
|
"retry.enabled": { type: "boolean", default: true },
|
|
1003
1038
|
|
|
@@ -1183,6 +1218,25 @@ export const SETTINGS_SCHEMA = {
|
|
|
1183
1218
|
},
|
|
1184
1219
|
},
|
|
1185
1220
|
|
|
1221
|
+
"paste.largeMenuThreshold": {
|
|
1222
|
+
type: "number",
|
|
1223
|
+
default: 100,
|
|
1224
|
+
ui: {
|
|
1225
|
+
tab: "interaction",
|
|
1226
|
+
group: "Input",
|
|
1227
|
+
label: "Large Paste Menu",
|
|
1228
|
+
description:
|
|
1229
|
+
"When a paste reaches this many lines, offer a menu to wrap it in a code block, wrap it in XML tags, or save it to a file. 0 disables the menu (large pastes still collapse to a [Paste] marker).",
|
|
1230
|
+
options: [
|
|
1231
|
+
{ value: "0", label: "Off" },
|
|
1232
|
+
{ value: "100", label: "100 lines" },
|
|
1233
|
+
{ value: "250", label: "250 lines" },
|
|
1234
|
+
{ value: "500", label: "500 lines" },
|
|
1235
|
+
{ value: "1000", label: "1000 lines" },
|
|
1236
|
+
],
|
|
1237
|
+
},
|
|
1238
|
+
},
|
|
1239
|
+
|
|
1186
1240
|
"startup.quiet": {
|
|
1187
1241
|
type: "boolean",
|
|
1188
1242
|
default: false,
|
|
@@ -1396,24 +1450,15 @@ export const SETTINGS_SCHEMA = {
|
|
|
1396
1450
|
|
|
1397
1451
|
"stt.modelName": {
|
|
1398
1452
|
type: "enum",
|
|
1399
|
-
values:
|
|
1400
|
-
default:
|
|
1453
|
+
values: STT_MODEL_VALUES,
|
|
1454
|
+
default: DEFAULT_STT_MODEL_KEY,
|
|
1401
1455
|
ui: {
|
|
1402
1456
|
tab: "interaction",
|
|
1403
1457
|
group: "Speech",
|
|
1404
1458
|
label: "Speech Model",
|
|
1405
|
-
description:
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
{ value: "tiny.en", label: "tiny.en", description: "English-only; fastest" },
|
|
1409
|
-
{ value: "base", label: "base", description: "Multilingual; small and fast" },
|
|
1410
|
-
{ value: "base.en", label: "base.en", description: "English-only; default" },
|
|
1411
|
-
{ value: "small", label: "small", description: "Multilingual; balanced" },
|
|
1412
|
-
{ value: "small.en", label: "small.en", description: "English-only; balanced" },
|
|
1413
|
-
{ value: "medium", label: "medium", description: "Multilingual; accurate but slower" },
|
|
1414
|
-
{ value: "medium.en", label: "medium.en", description: "English-only; accurate but slower" },
|
|
1415
|
-
{ value: "large", label: "large", description: "Multilingual; most accurate" },
|
|
1416
|
-
],
|
|
1459
|
+
description:
|
|
1460
|
+
"Local on-device speech model. Parakeet TDT v3 (sherpa-onnx) is the SoTA default; Whisper base/small/large-v3-turbo tiers (transformers.js) trade size for multilingual coverage. Downloaded on first use.",
|
|
1461
|
+
options: STT_MODEL_OPTIONS,
|
|
1417
1462
|
},
|
|
1418
1463
|
},
|
|
1419
1464
|
|
|
@@ -1744,6 +1789,18 @@ export const SETTINGS_SCHEMA = {
|
|
|
1744
1789
|
label: "8x13 on 16px pitch, black",
|
|
1745
1790
|
description: "8x13 glyphs on an 8x16 cell (extra leading), black ink.",
|
|
1746
1791
|
},
|
|
1792
|
+
{
|
|
1793
|
+
value: "8on22-bw",
|
|
1794
|
+
label: "8x13 on 22px pitch (leading), black",
|
|
1795
|
+
description:
|
|
1796
|
+
"8x13 glyphs on an 8x22 cell — extra line spacing so rows don't crowd. Default for OpenAI/Google.",
|
|
1797
|
+
},
|
|
1798
|
+
{
|
|
1799
|
+
value: "11on16-bw",
|
|
1800
|
+
label: "8x13 on 11px advance (tracking), black",
|
|
1801
|
+
description:
|
|
1802
|
+
"8x13 glyphs on an 11x16 cell — extra letter spacing so characters don't merge. Default for Anthropic.",
|
|
1803
|
+
},
|
|
1747
1804
|
{
|
|
1748
1805
|
value: "doc-8on16-bw",
|
|
1749
1806
|
label: "Doc 8on16, black",
|
|
@@ -1841,6 +1898,35 @@ export const SETTINGS_SCHEMA = {
|
|
|
1841
1898
|
},
|
|
1842
1899
|
},
|
|
1843
1900
|
|
|
1901
|
+
// Auto-Learn (experimental): post-stop nudge to capture lessons to memory
|
|
1902
|
+
// and mint/enhance isolated managed skills under ~/.omp/agent/managed-skills.
|
|
1903
|
+
// Master flag is default-off → zero footprint; sub-flags gate behaviour.
|
|
1904
|
+
"autolearn.enabled": {
|
|
1905
|
+
type: "boolean",
|
|
1906
|
+
default: false,
|
|
1907
|
+
ui: {
|
|
1908
|
+
tab: "memory",
|
|
1909
|
+
group: "Auto-Learn",
|
|
1910
|
+
label: "Auto-Learn (experimental)",
|
|
1911
|
+
description:
|
|
1912
|
+
"After the agent stops, nudge it to capture lessons to memory and create/enhance isolated managed skills",
|
|
1913
|
+
},
|
|
1914
|
+
},
|
|
1915
|
+
"autolearn.autoContinue": {
|
|
1916
|
+
type: "boolean",
|
|
1917
|
+
default: false,
|
|
1918
|
+
ui: {
|
|
1919
|
+
tab: "memory",
|
|
1920
|
+
group: "Auto-Learn",
|
|
1921
|
+
label: "Auto-run capture at stop",
|
|
1922
|
+
description:
|
|
1923
|
+
"When on, auto-run one capture turn at stop (uses extra tokens). Off = passive reminder on your next turn.",
|
|
1924
|
+
condition: "autolearnActive",
|
|
1925
|
+
},
|
|
1926
|
+
},
|
|
1927
|
+
// Config-file-only knob (numbers without `options` are hidden from the UI).
|
|
1928
|
+
"autolearn.minToolCalls": { type: "number", default: 5 },
|
|
1929
|
+
|
|
1844
1930
|
// Mnemopi local SQLite memory backend.
|
|
1845
1931
|
"mnemopi.dbPath": {
|
|
1846
1932
|
type: "string",
|
|
@@ -1894,6 +1980,31 @@ export const SETTINGS_SCHEMA = {
|
|
|
1894
1980
|
condition: "mnemopiActive",
|
|
1895
1981
|
},
|
|
1896
1982
|
},
|
|
1983
|
+
"mnemopi.embeddingVariant": {
|
|
1984
|
+
type: "enum",
|
|
1985
|
+
values: ["en", "multilingual"] as const,
|
|
1986
|
+
default: "en",
|
|
1987
|
+
ui: {
|
|
1988
|
+
tab: "memory",
|
|
1989
|
+
group: "Mnemopi",
|
|
1990
|
+
label: "Embedding variant",
|
|
1991
|
+
description:
|
|
1992
|
+
"Local embedding model family. en = stronger English model; multilingual = cross-language model. Changing this rebuilds existing memory embeddings on next start.",
|
|
1993
|
+
options: [
|
|
1994
|
+
{
|
|
1995
|
+
value: "en",
|
|
1996
|
+
label: "English (bge-base-en-v1.5)",
|
|
1997
|
+
description: "BAAI/bge-base-en-v1.5 (768d), English-only",
|
|
1998
|
+
},
|
|
1999
|
+
{
|
|
2000
|
+
value: "multilingual",
|
|
2001
|
+
label: "Multilingual (multilingual-e5-large)",
|
|
2002
|
+
description: "intfloat/multilingual-e5-large (1024d), cross-language recall",
|
|
2003
|
+
},
|
|
2004
|
+
],
|
|
2005
|
+
condition: "mnemopiActive",
|
|
2006
|
+
},
|
|
2007
|
+
},
|
|
1897
2008
|
"mnemopi.autoRecall": {
|
|
1898
2009
|
type: "boolean",
|
|
1899
2010
|
default: true,
|
|
@@ -1956,7 +2067,8 @@ export const SETTINGS_SCHEMA = {
|
|
|
1956
2067
|
tab: "memory",
|
|
1957
2068
|
group: "Mnemopi",
|
|
1958
2069
|
label: "Mnemopi Embedding Model",
|
|
1959
|
-
description:
|
|
2070
|
+
description:
|
|
2071
|
+
"Advanced: explicit embedding model id that overrides the variant. Leave empty to use mnemopi.embeddingVariant.",
|
|
1960
2072
|
condition: "mnemopiActive",
|
|
1961
2073
|
},
|
|
1962
2074
|
},
|
|
@@ -2772,13 +2884,23 @@ export const SETTINGS_SCHEMA = {
|
|
|
2772
2884
|
},
|
|
2773
2885
|
|
|
2774
2886
|
"todo.eager": {
|
|
2775
|
-
type: "
|
|
2776
|
-
|
|
2887
|
+
type: "enum",
|
|
2888
|
+
values: ["default", "preferred", "always"] as const,
|
|
2889
|
+
default: "default",
|
|
2777
2890
|
ui: {
|
|
2778
2891
|
tab: "tools",
|
|
2779
2892
|
group: "Todos",
|
|
2780
2893
|
label: "Create Todos Automatically",
|
|
2781
|
-
description: "
|
|
2894
|
+
description: "How strongly to push automatic todo-list creation after the first message",
|
|
2895
|
+
options: [
|
|
2896
|
+
{ value: "default", label: "Default", description: "Model decides; no automatic todo list" },
|
|
2897
|
+
{
|
|
2898
|
+
value: "preferred",
|
|
2899
|
+
label: "Preferred",
|
|
2900
|
+
description: "Suggests a todo list on the first message (reminder, not forced)",
|
|
2901
|
+
},
|
|
2902
|
+
{ value: "always", label: "Always", description: "Forces a comprehensive todo list on the first message" },
|
|
2903
|
+
],
|
|
2782
2904
|
},
|
|
2783
2905
|
},
|
|
2784
2906
|
|
|
@@ -2888,14 +3010,14 @@ export const SETTINGS_SCHEMA = {
|
|
|
2888
3010
|
},
|
|
2889
3011
|
},
|
|
2890
3012
|
|
|
2891
|
-
"
|
|
3013
|
+
"speechgen.enabled": {
|
|
2892
3014
|
type: "boolean",
|
|
2893
3015
|
default: false,
|
|
2894
3016
|
ui: {
|
|
2895
3017
|
tab: "tools",
|
|
2896
3018
|
group: "Available Tools",
|
|
2897
|
-
label: "
|
|
2898
|
-
description: "Enable the tts tool for xAI Grok Voice speech synthesis",
|
|
3019
|
+
label: "Speech Generation",
|
|
3020
|
+
description: "Enable the tts tool for on-device (Kokoro) or xAI Grok Voice speech-file synthesis",
|
|
2899
3021
|
},
|
|
2900
3022
|
},
|
|
2901
3023
|
|
|
@@ -3024,6 +3146,18 @@ export const SETTINGS_SCHEMA = {
|
|
|
3024
3146
|
description: "Launch browser in headless mode (disable to show browser UI)",
|
|
3025
3147
|
},
|
|
3026
3148
|
},
|
|
3149
|
+
|
|
3150
|
+
"browser.cmux": {
|
|
3151
|
+
type: "boolean",
|
|
3152
|
+
default: true,
|
|
3153
|
+
ui: {
|
|
3154
|
+
tab: "tools",
|
|
3155
|
+
group: "Search & Browser",
|
|
3156
|
+
label: "cmux Browser",
|
|
3157
|
+
description:
|
|
3158
|
+
"Use cmux WKWebView surfaces for browser automation when a cmux socket is available. Set PI_BROWSER_CMUX=0 or PI_BROWSER_CMUX=1 to override.",
|
|
3159
|
+
},
|
|
3160
|
+
},
|
|
3027
3161
|
"browser.screenshotDir": {
|
|
3028
3162
|
type: "string",
|
|
3029
3163
|
default: undefined,
|
|
@@ -3086,19 +3220,21 @@ export const SETTINGS_SCHEMA = {
|
|
|
3086
3220
|
|
|
3087
3221
|
"async.pollWaitDuration": {
|
|
3088
3222
|
type: "enum",
|
|
3089
|
-
values: ["5s", "10s", "30s", "1m", "5m"] as const,
|
|
3090
|
-
default: "
|
|
3223
|
+
values: ["5s", "10s", "30s", "1m", "5m", "smart"] as const,
|
|
3224
|
+
default: "smart",
|
|
3091
3225
|
ui: {
|
|
3092
3226
|
tab: "tools",
|
|
3093
3227
|
group: "Execution",
|
|
3094
|
-
label: "Poll
|
|
3095
|
-
description:
|
|
3228
|
+
label: "Max Poll Time",
|
|
3229
|
+
description:
|
|
3230
|
+
"How long the poll tool waits for background job updates before returning the current state. A fixed value waits that exact duration every time. `smart` adapts: it starts at 5s and lengthens with each back-to-back poll (up to 5m), then resets to 5s after about a minute without polling.",
|
|
3096
3231
|
options: [
|
|
3097
3232
|
{ value: "5s", label: "5 seconds" },
|
|
3098
3233
|
{ value: "10s", label: "10 seconds" },
|
|
3099
|
-
{ value: "30s", label: "30 seconds"
|
|
3234
|
+
{ value: "30s", label: "30 seconds" },
|
|
3100
3235
|
{ value: "1m", label: "1 minute" },
|
|
3101
3236
|
{ value: "5m", label: "5 minutes" },
|
|
3237
|
+
{ value: "smart", label: "Smart", description: "Default — adaptive 5s→5m, resets when you stop polling" },
|
|
3102
3238
|
],
|
|
3103
3239
|
},
|
|
3104
3240
|
},
|
|
@@ -3340,13 +3476,19 @@ export const SETTINGS_SCHEMA = {
|
|
|
3340
3476
|
},
|
|
3341
3477
|
|
|
3342
3478
|
"task.eager": {
|
|
3343
|
-
type: "
|
|
3344
|
-
|
|
3479
|
+
type: "enum",
|
|
3480
|
+
values: ["default", "preferred", "always"] as const,
|
|
3481
|
+
default: "default",
|
|
3345
3482
|
ui: {
|
|
3346
3483
|
tab: "tasks",
|
|
3347
3484
|
group: "Subagents",
|
|
3348
3485
|
label: "Prefer Task Delegation",
|
|
3349
|
-
description: "
|
|
3486
|
+
description: "How strongly to push delegating work to subagents",
|
|
3487
|
+
options: [
|
|
3488
|
+
{ value: "default", label: "Default", description: "Model decides when to delegate" },
|
|
3489
|
+
{ value: "preferred", label: "Preferred", description: "Adds delegation guidance to the system prompt" },
|
|
3490
|
+
{ value: "always", label: "Always", description: "Prompt guidance plus a first-turn delegation reminder" },
|
|
3491
|
+
],
|
|
3350
3492
|
},
|
|
3351
3493
|
},
|
|
3352
3494
|
|
|
@@ -3527,6 +3669,10 @@ export const SETTINGS_SCHEMA = {
|
|
|
3527
3669
|
|
|
3528
3670
|
"skills.enablePiProject": { type: "boolean", default: true },
|
|
3529
3671
|
|
|
3672
|
+
"skills.enableAgentsUser": { type: "boolean", default: true },
|
|
3673
|
+
|
|
3674
|
+
"skills.enableAgentsProject": { type: "boolean", default: true },
|
|
3675
|
+
|
|
3530
3676
|
"skills.customDirectories": { type: "array", default: [] as string[] },
|
|
3531
3677
|
|
|
3532
3678
|
"skills.ignoredSkills": { type: "array", default: [] as string[] },
|
|
@@ -3638,6 +3784,93 @@ export const SETTINGS_SCHEMA = {
|
|
|
3638
3784
|
],
|
|
3639
3785
|
},
|
|
3640
3786
|
},
|
|
3787
|
+
"providers.tts": {
|
|
3788
|
+
type: "enum",
|
|
3789
|
+
values: ["auto", "local", "xai"] as const,
|
|
3790
|
+
default: "auto",
|
|
3791
|
+
ui: {
|
|
3792
|
+
tab: "providers",
|
|
3793
|
+
group: "Services",
|
|
3794
|
+
label: "Text-to-Speech Provider",
|
|
3795
|
+
description: "Backend for the tts tool: local on-device neural TTS (Kokoro-82M) or xAI Grok Voice",
|
|
3796
|
+
options: [
|
|
3797
|
+
{
|
|
3798
|
+
value: "auto",
|
|
3799
|
+
label: "Auto",
|
|
3800
|
+
description: "Prefer local on-device TTS; route .mp3 output to xAI when credentials exist",
|
|
3801
|
+
},
|
|
3802
|
+
{ value: "local", label: "Local", description: "On-device neural TTS (Kokoro-82M); output is WAV/PCM16" },
|
|
3803
|
+
{
|
|
3804
|
+
value: "xai",
|
|
3805
|
+
label: "xAI Grok Voice",
|
|
3806
|
+
description: "Requires xAI Grok OAuth or XAI_API_KEY; MP3 or WAV",
|
|
3807
|
+
},
|
|
3808
|
+
],
|
|
3809
|
+
},
|
|
3810
|
+
},
|
|
3811
|
+
"tts.localModel": {
|
|
3812
|
+
type: "enum",
|
|
3813
|
+
values: TTS_LOCAL_MODEL_VALUES,
|
|
3814
|
+
default: DEFAULT_TTS_LOCAL_MODEL_KEY,
|
|
3815
|
+
ui: {
|
|
3816
|
+
tab: "providers",
|
|
3817
|
+
group: "Services",
|
|
3818
|
+
label: "Local TTS Model",
|
|
3819
|
+
description: "On-device neural TTS model (Kokoro-82M) used by the local TTS backend",
|
|
3820
|
+
options: TTS_LOCAL_MODEL_OPTIONS,
|
|
3821
|
+
},
|
|
3822
|
+
},
|
|
3823
|
+
"tts.localVoice": {
|
|
3824
|
+
type: "enum",
|
|
3825
|
+
values: TTS_LOCAL_VOICE_VALUES,
|
|
3826
|
+
default: DEFAULT_TTS_VOICE,
|
|
3827
|
+
ui: {
|
|
3828
|
+
tab: "providers",
|
|
3829
|
+
group: "Services",
|
|
3830
|
+
label: "Local TTS Voice",
|
|
3831
|
+
description: "Kokoro voice used by the local TTS backend (American/British, female/male)",
|
|
3832
|
+
options: TTS_LOCAL_VOICE_OPTIONS,
|
|
3833
|
+
},
|
|
3834
|
+
},
|
|
3835
|
+
"speech.enabled": {
|
|
3836
|
+
type: "boolean",
|
|
3837
|
+
default: false,
|
|
3838
|
+
ui: {
|
|
3839
|
+
tab: "providers",
|
|
3840
|
+
group: "Services",
|
|
3841
|
+
label: "Speech Vocalization",
|
|
3842
|
+
description: "Speak the assistant's output aloud through the speakers as it streams",
|
|
3843
|
+
},
|
|
3844
|
+
},
|
|
3845
|
+
"speech.mode": {
|
|
3846
|
+
type: "enum",
|
|
3847
|
+
values: ["all", "assistant", "yield"] as const,
|
|
3848
|
+
default: "assistant",
|
|
3849
|
+
ui: {
|
|
3850
|
+
tab: "providers",
|
|
3851
|
+
group: "Services",
|
|
3852
|
+
label: "Speech Vocalization Mode",
|
|
3853
|
+
description:
|
|
3854
|
+
"What to speak: all = assistant messages + thinking; assistant = messages only; yield = only the final message at turn end",
|
|
3855
|
+
options: [
|
|
3856
|
+
{ value: "all", label: "All (messages + thinking)" },
|
|
3857
|
+
{ value: "assistant", label: "Assistant messages" },
|
|
3858
|
+
{ value: "yield", label: "Final message only" },
|
|
3859
|
+
],
|
|
3860
|
+
},
|
|
3861
|
+
},
|
|
3862
|
+
"speech.voice": {
|
|
3863
|
+
type: "enum",
|
|
3864
|
+
values: TTS_LOCAL_VOICE_VALUES,
|
|
3865
|
+
default: DEFAULT_TTS_VOICE,
|
|
3866
|
+
ui: {
|
|
3867
|
+
tab: "providers",
|
|
3868
|
+
group: "Services",
|
|
3869
|
+
label: "Speech Vocalization Voice",
|
|
3870
|
+
description: "Kokoro voice used when speaking the assistant's output aloud",
|
|
3871
|
+
options: TTS_LOCAL_VOICE_OPTIONS,
|
|
3872
|
+
},
|
|
3873
|
+
},
|
|
3641
3874
|
"providers.tinyModel": {
|
|
3642
3875
|
type: "enum",
|
|
3643
3876
|
values: TINY_TITLE_MODEL_VALUES,
|
|
@@ -4138,6 +4371,8 @@ export interface SkillsSettings {
|
|
|
4138
4371
|
enableClaudeProject?: boolean;
|
|
4139
4372
|
enablePiUser?: boolean;
|
|
4140
4373
|
enablePiProject?: boolean;
|
|
4374
|
+
enableAgentsUser?: boolean;
|
|
4375
|
+
enableAgentsProject?: boolean;
|
|
4141
4376
|
customDirectories?: string[];
|
|
4142
4377
|
ignoredSkills?: string[];
|
|
4143
4378
|
includeSkills?: string[];
|
|
@@ -4193,8 +4428,7 @@ export interface SttSettings {
|
|
|
4193
4428
|
enabled: boolean;
|
|
4194
4429
|
language: string | undefined;
|
|
4195
4430
|
modelName: string;
|
|
4196
|
-
|
|
4197
|
-
modelPath: string | undefined;
|
|
4431
|
+
streaming: boolean;
|
|
4198
4432
|
}
|
|
4199
4433
|
|
|
4200
4434
|
export interface BashInterceptorRule {
|
package/src/config/settings.ts
CHANGED
|
@@ -752,6 +752,16 @@ export class Settings {
|
|
|
752
752
|
delete taskObj.simple;
|
|
753
753
|
}
|
|
754
754
|
|
|
755
|
+
// task.eager / todo.eager: boolean -> enum (default | preferred | always).
|
|
756
|
+
// `true` reproduced the previous "on" behavior, which is now `always`.
|
|
757
|
+
if (taskObj && typeof taskObj.eager === "boolean") {
|
|
758
|
+
taskObj.eager = taskObj.eager ? "always" : "default";
|
|
759
|
+
}
|
|
760
|
+
const todoObj = raw.todo as Record<string, unknown> | undefined;
|
|
761
|
+
if (todoObj && typeof todoObj.eager === "boolean") {
|
|
762
|
+
todoObj.eager = todoObj.eager ? "always" : "default";
|
|
763
|
+
}
|
|
764
|
+
|
|
755
765
|
// task.isolation.mode: legacy values from before the pi-iso PAL refactor.
|
|
756
766
|
// `worktree` was git worktree → now lives under `rcopy`. `fuse-overlay`
|
|
757
767
|
// and `fuse-projfs` are now the platform-named `overlayfs` / `projfs`
|
package/src/discovery/builtin.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import * as path from "node:path";
|
|
7
7
|
import { logger, parseFrontmatter, tryParseJson } from "@oh-my-pi/pi-utils";
|
|
8
8
|
import { YAML } from "bun";
|
|
9
|
+
import { getManagedSkillsDir, MANAGED_SKILLS_PROVIDER_ID } from "../autolearn/managed-skills";
|
|
9
10
|
import { registerProvider } from "../capability";
|
|
10
11
|
import { type ContextFile, contextFileCapability } from "../capability/context-file";
|
|
11
12
|
import { type Extension, type ExtensionManifest, extensionCapability } from "../capability/extension";
|
|
@@ -283,13 +284,26 @@ async function loadSkills(ctx: LoadContext): Promise<LoadResult<Skill>> {
|
|
|
283
284
|
});
|
|
284
285
|
|
|
285
286
|
const results = await Promise.all([...projectScans, userScan]);
|
|
286
|
-
|
|
287
287
|
return {
|
|
288
288
|
items: results.flatMap(r => r.items),
|
|
289
289
|
warnings: results.flatMap(r => r.warnings ?? []),
|
|
290
290
|
};
|
|
291
291
|
}
|
|
292
292
|
|
|
293
|
+
// Managed skills (auto-learn) are a SEPARATE provider at the lowest skill
|
|
294
|
+
// priority, so an authored skill of the same name from ANY other provider wins
|
|
295
|
+
// the capability-level priority dedup. Discovery is unconditional (an empty
|
|
296
|
+
// managed dir is a no-op); only writing/nudging is gated by `autolearn.enabled`.
|
|
297
|
+
const MANAGED_SKILLS_PRIORITY = 5;
|
|
298
|
+
async function loadManagedSkills(ctx: LoadContext): Promise<LoadResult<Skill>> {
|
|
299
|
+
return scanSkillsFromDir(ctx, {
|
|
300
|
+
dir: getManagedSkillsDir(ctx.home),
|
|
301
|
+
providerId: MANAGED_SKILLS_PROVIDER_ID,
|
|
302
|
+
level: "user",
|
|
303
|
+
requireDescription: true,
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
|
|
293
307
|
registerProvider<Skill>(skillCapability.id, {
|
|
294
308
|
id: PROVIDER_ID,
|
|
295
309
|
displayName: DISPLAY_NAME,
|
|
@@ -298,6 +312,14 @@ registerProvider<Skill>(skillCapability.id, {
|
|
|
298
312
|
load: loadSkills,
|
|
299
313
|
});
|
|
300
314
|
|
|
315
|
+
registerProvider<Skill>(skillCapability.id, {
|
|
316
|
+
id: MANAGED_SKILLS_PROVIDER_ID,
|
|
317
|
+
displayName: "Managed Skills (auto-learn)",
|
|
318
|
+
description: "Auto-generated managed skills from ~/.omp/agent/managed-skills",
|
|
319
|
+
priority: MANAGED_SKILLS_PRIORITY,
|
|
320
|
+
load: loadManagedSkills,
|
|
321
|
+
});
|
|
322
|
+
|
|
301
323
|
// Slash Commands
|
|
302
324
|
async function loadSlashCommands(ctx: LoadContext): Promise<LoadResult<SlashCommand>> {
|
|
303
325
|
const items: SlashCommand[] = [];
|
|
@@ -124,6 +124,43 @@ async function loadSkills(ctx: LoadContext): Promise<LoadResult<Skill>> {
|
|
|
124
124
|
}
|
|
125
125
|
return { items, warnings };
|
|
126
126
|
}
|
|
127
|
+
async function loadSkillSlashCommands(ctx: LoadContext, root: ClaudePluginRoot): Promise<LoadResult<SlashCommand>> {
|
|
128
|
+
const { dir: skillsDir, warning } = await resolvePluginDir(root, ["skills"], "skills");
|
|
129
|
+
const warnings: string[] = warning ? [warning] : [];
|
|
130
|
+
const skillsResult = await scanSkillsFromDir(ctx, {
|
|
131
|
+
dir: skillsDir,
|
|
132
|
+
providerId: PROVIDER_ID,
|
|
133
|
+
level: root.scope,
|
|
134
|
+
});
|
|
135
|
+
warnings.push(...(skillsResult.warnings ?? []));
|
|
136
|
+
|
|
137
|
+
const commands = await Promise.all(
|
|
138
|
+
skillsResult.items.map(async skill => {
|
|
139
|
+
const content = await readFile(skill.path);
|
|
140
|
+
if (content === null) {
|
|
141
|
+
warnings.push(`Failed to read skill slash command: ${skill.path}`);
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
// Slash command name MUST come from the skill directory basename, not
|
|
145
|
+
// frontmatter `name`: `expandSlashCommand` splits the command at the first
|
|
146
|
+
// whitespace, so a display name like "Understand Anything" would never match
|
|
147
|
+
// `/understand`. The documented layout is `skills/<name>/SKILL.md` → `/<name>`.
|
|
148
|
+
const command: SlashCommand = {
|
|
149
|
+
name: path.basename(path.dirname(skill.path)),
|
|
150
|
+
path: skill.path,
|
|
151
|
+
content,
|
|
152
|
+
level: skill.level,
|
|
153
|
+
_source: skill._source,
|
|
154
|
+
};
|
|
155
|
+
return command;
|
|
156
|
+
}),
|
|
157
|
+
);
|
|
158
|
+
|
|
159
|
+
return {
|
|
160
|
+
items: commands.filter((command): command is SlashCommand => command !== null),
|
|
161
|
+
warnings,
|
|
162
|
+
};
|
|
163
|
+
}
|
|
127
164
|
|
|
128
165
|
// =============================================================================
|
|
129
166
|
// Slash Commands
|
|
@@ -139,7 +176,7 @@ async function loadSlashCommands(ctx: LoadContext): Promise<LoadResult<SlashComm
|
|
|
139
176
|
const results = await Promise.all(
|
|
140
177
|
roots.map(async root => {
|
|
141
178
|
const { dir: commandsDir, warning } = await resolvePluginDir(root, ["commands", "slash-commands"], "commands");
|
|
142
|
-
const
|
|
179
|
+
const commandResult = await loadFilesFromDir<SlashCommand>(ctx, commandsDir, PROVIDER_ID, root.scope, {
|
|
143
180
|
extensions: ["md"],
|
|
144
181
|
transform: (name, content, filePath, source) => {
|
|
145
182
|
const cmdName = name.replace(/\.md$/, "");
|
|
@@ -152,14 +189,16 @@ async function loadSlashCommands(ctx: LoadContext): Promise<LoadResult<SlashComm
|
|
|
152
189
|
};
|
|
153
190
|
},
|
|
154
191
|
});
|
|
155
|
-
|
|
192
|
+
const skillCommandResult = await loadSkillSlashCommands(ctx, root);
|
|
193
|
+
return { commandResult, skillCommandResult, warning };
|
|
156
194
|
}),
|
|
157
195
|
);
|
|
158
196
|
|
|
159
|
-
for (const {
|
|
197
|
+
for (const { commandResult, skillCommandResult, warning } of results) {
|
|
160
198
|
if (warning) warnings.push(warning);
|
|
161
|
-
items.push(...
|
|
162
|
-
if (
|
|
199
|
+
items.push(...commandResult.items, ...skillCommandResult.items);
|
|
200
|
+
if (commandResult.warnings) warnings.push(...commandResult.warnings);
|
|
201
|
+
if (skillCommandResult.warnings) warnings.push(...skillCommandResult.warnings);
|
|
163
202
|
}
|
|
164
203
|
|
|
165
204
|
return { items, warnings };
|
package/src/discovery/helpers.ts
CHANGED
|
@@ -491,6 +491,42 @@ interface ExtensionModuleManifest {
|
|
|
491
491
|
extensions?: string[];
|
|
492
492
|
}
|
|
493
493
|
|
|
494
|
+
async function discoverLinkedExtensionModuleFiles(dir: string): Promise<{
|
|
495
|
+
indexFiles: Array<{ path: string }>;
|
|
496
|
+
packageJsonFiles: Array<{ path: string }>;
|
|
497
|
+
}> {
|
|
498
|
+
const entries = await readDirEntries(dir);
|
|
499
|
+
const indexFiles: Array<{ path: string }> = [];
|
|
500
|
+
const packageJsonFiles: Array<{ path: string }> = [];
|
|
501
|
+
|
|
502
|
+
await Promise.all(
|
|
503
|
+
entries.map(async entry => {
|
|
504
|
+
if (entry.name.startsWith(".") || entry.isDirectory()) return;
|
|
505
|
+
|
|
506
|
+
const entryPath = path.join(dir, entry.name);
|
|
507
|
+
const stat = await fs.promises.stat(entryPath).catch(() => null);
|
|
508
|
+
if (!stat?.isDirectory()) return;
|
|
509
|
+
|
|
510
|
+
const [packageJsonContent, indexTsContent, indexJsContent] = await Promise.all([
|
|
511
|
+
readFile(path.join(entryPath, "package.json")),
|
|
512
|
+
readFile(path.join(entryPath, "index.ts")),
|
|
513
|
+
readFile(path.join(entryPath, "index.js")),
|
|
514
|
+
]);
|
|
515
|
+
|
|
516
|
+
if (packageJsonContent !== null) {
|
|
517
|
+
packageJsonFiles.push({ path: `${entry.name}/package.json` });
|
|
518
|
+
}
|
|
519
|
+
if (indexTsContent !== null) {
|
|
520
|
+
indexFiles.push({ path: `${entry.name}/index.ts` });
|
|
521
|
+
} else if (indexJsContent !== null) {
|
|
522
|
+
indexFiles.push({ path: `${entry.name}/index.js` });
|
|
523
|
+
}
|
|
524
|
+
}),
|
|
525
|
+
);
|
|
526
|
+
|
|
527
|
+
return { indexFiles, packageJsonFiles };
|
|
528
|
+
}
|
|
529
|
+
|
|
494
530
|
async function readExtensionModuleManifest(
|
|
495
531
|
_ctx: LoadContext,
|
|
496
532
|
packageJsonPath: string,
|
|
@@ -520,14 +556,18 @@ async function readExtensionModuleManifest(
|
|
|
520
556
|
export async function discoverExtensionModulePaths(_ctx: LoadContext, dir: string): Promise<string[]> {
|
|
521
557
|
const discovered = new Set<string>();
|
|
522
558
|
// Find all candidate files in parallel using glob
|
|
523
|
-
const [directFiles,
|
|
559
|
+
const [directFiles, globIndexFiles, globPackageJsonFiles, linkedFiles] = await Promise.all([
|
|
524
560
|
// 1. Direct *.ts or *.js files
|
|
525
561
|
globIf(dir, "*.{ts,js}", FileType.File, false),
|
|
526
562
|
// 2. Subdirectory index files
|
|
527
563
|
globIf(dir, "*/index.{ts,js}", FileType.File, false),
|
|
528
564
|
// 3. Subdirectory package.json files
|
|
529
565
|
globIf(dir, "*/package.json", FileType.File, false),
|
|
566
|
+
// Native glob does not follow linked extension directories.
|
|
567
|
+
discoverLinkedExtensionModuleFiles(dir),
|
|
530
568
|
]);
|
|
569
|
+
const indexFiles = [...globIndexFiles, ...linkedFiles.indexFiles];
|
|
570
|
+
const packageJsonFiles = [...globPackageJsonFiles, ...linkedFiles.packageJsonFiles];
|
|
531
571
|
|
|
532
572
|
// Process direct files
|
|
533
573
|
for (const match of directFiles) {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* keys without rejection; only `input` is required. `_input` is accepted as a
|
|
5
5
|
* provider-emitted alias for `input`.
|
|
6
6
|
*/
|
|
7
|
-
import
|
|
7
|
+
import { z } from "zod/v4";
|
|
8
8
|
|
|
9
9
|
export const hashlineEditParamsSchema = z.preprocess(raw => {
|
|
10
10
|
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* the `patch` mode.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import
|
|
11
|
+
import { z } from "zod/v4";
|
|
12
12
|
import { parseApplyPatch, parseApplyPatchStreaming } from "../apply-patch/parser";
|
|
13
13
|
import { ApplyPatchError } from "../diff";
|
|
14
14
|
import type { PatchEditEntry } from "./patch";
|
package/src/edit/modes/patch.ts
CHANGED
|
@@ -9,7 +9,7 @@ import * as fs from "node:fs";
|
|
|
9
9
|
import * as path from "node:path";
|
|
10
10
|
import type { AgentToolResult } from "@oh-my-pi/pi-agent-core";
|
|
11
11
|
import { isEnoent } from "@oh-my-pi/pi-utils";
|
|
12
|
-
import
|
|
12
|
+
import { z } from "zod/v4";
|
|
13
13
|
import {
|
|
14
14
|
type FileDiagnosticsResult,
|
|
15
15
|
flushLspWritethroughBatch,
|