@oh-my-pi/pi-coding-agent 7.0.0 → 8.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +87 -0
- package/README.md +1 -1
- package/docs/hooks.md +2 -2
- package/docs/sdk.md +1 -1
- package/package.json +12 -11
- package/scripts/format-prompts.ts +143 -0
- package/scripts/generate-template.ts +1 -1
- package/src/cli/args.ts +3 -3
- package/src/cli/config-cli.ts +4 -4
- package/src/cli/file-processor.ts +3 -3
- package/src/cli/list-models.ts +2 -2
- package/src/cli/plugin-cli.ts +3 -3
- package/src/cli/session-picker.ts +2 -2
- package/src/cli/setup-cli.ts +2 -2
- package/src/cli/stats-cli.ts +1 -1
- package/src/cli/update-cli.ts +2 -2
- package/src/{core → config}/keybindings.ts +1 -1
- package/src/{core → config}/model-registry.ts +1 -1
- package/src/{core → config}/model-resolver.ts +3 -3
- package/src/{core → config}/prompt-templates.ts +2 -2
- package/src/{core → config}/settings-manager.ts +6 -6
- package/src/{core/cursor/exec-bridge.ts → cursor.ts} +4 -4
- package/src/discovery/agents-md.ts +4 -4
- package/src/discovery/builtin.ts +17 -17
- package/src/discovery/claude.ts +12 -12
- package/src/discovery/cline.ts +6 -6
- package/src/discovery/codex.ts +21 -21
- package/src/discovery/cursor.ts +9 -9
- package/src/discovery/gemini.ts +9 -9
- package/src/discovery/github.ts +6 -6
- package/src/discovery/helpers.ts +4 -4
- package/src/discovery/index.ts +16 -16
- package/src/discovery/mcp-json.ts +4 -4
- package/src/discovery/ssh.ts +4 -4
- package/src/discovery/vscode.ts +4 -4
- package/src/discovery/windsurf.ts +6 -6
- package/src/{core/tools/exa → exa}/company.ts +2 -3
- package/src/{core/tools/exa → exa}/index.ts +2 -2
- package/src/{core/tools/exa → exa}/linkedin.ts +2 -3
- package/src/{core/tools/exa → exa}/mcp-client.ts +2 -2
- package/src/{core/tools/exa → exa}/render.ts +3 -3
- package/src/{core/tools/exa → exa}/researcher.ts +1 -1
- package/src/{core/tools/exa → exa}/search.ts +2 -10
- package/src/{core/tools/exa → exa}/websets.ts +1 -1
- package/src/{core → exec}/bash-executor.ts +22 -6
- package/src/{core → export}/custom-share.ts +1 -1
- package/src/{core/export-html → export/html}/index.ts +3 -3
- package/src/{core → export}/ttsr.ts +2 -2
- package/src/{core → extensibility}/custom-commands/bundled/review/index.ts +4 -4
- package/src/{core → extensibility}/custom-commands/loader.ts +3 -3
- package/src/{core → extensibility}/custom-commands/types.ts +1 -1
- package/src/{core → extensibility}/custom-tools/loader.ts +9 -9
- package/src/{core → extensibility}/custom-tools/types.ts +6 -6
- package/src/{core → extensibility}/custom-tools/wrapper.ts +1 -1
- package/src/{core → extensibility}/extensions/loader.ts +8 -8
- package/src/{core → extensibility}/extensions/runner.ts +3 -3
- package/src/{core → extensibility}/extensions/types.ts +15 -15
- package/src/{core → extensibility}/extensions/wrapper.ts +1 -1
- package/src/{core → extensibility}/hooks/index.ts +1 -1
- package/src/{core → extensibility}/hooks/loader.ts +7 -7
- package/src/{core → extensibility}/hooks/runner.ts +4 -4
- package/src/{core → extensibility}/hooks/types.ts +9 -9
- package/src/{core → extensibility}/plugins/doctor.ts +1 -1
- package/src/{core → extensibility}/plugins/installer.ts +2 -3
- package/src/{core → extensibility}/plugins/paths.ts +1 -1
- package/src/{core → extensibility}/skills.ts +8 -48
- package/src/{core → extensibility}/slash-commands.ts +6 -6
- package/src/index.ts +127 -128
- package/src/internal-urls/agent-protocol.ts +126 -0
- package/src/internal-urls/artifact-protocol.ts +93 -0
- package/src/internal-urls/index.ts +28 -0
- package/src/internal-urls/json-query.ts +126 -0
- package/src/internal-urls/router.ts +69 -0
- package/src/internal-urls/rule-protocol.ts +56 -0
- package/src/internal-urls/skill-protocol.ts +112 -0
- package/src/internal-urls/types.ts +48 -0
- package/src/{core/python-executor.ts → ipy/executor.ts} +51 -11
- package/src/{core/python-gateway-coordinator.ts → ipy/gateway-coordinator.ts} +41 -325
- package/src/{core/python-kernel.ts → ipy/kernel.ts} +38 -10
- package/src/ipy/prelude.ts +3 -0
- package/src/{core/tools/lsp → lsp}/client.ts +7 -6
- package/src/{core/tools/lsp → lsp}/clients/biome-client.ts +1 -1
- package/src/{core/tools/lsp → lsp}/clients/index.ts +1 -1
- package/src/{core/tools/lsp → lsp}/clients/lsp-linter-client.ts +4 -4
- package/src/{core/tools/lsp → lsp}/config.ts +1 -1
- package/src/{core/tools/lsp → lsp}/index.ts +16 -15
- package/src/{core/tools/lsp → lsp}/render.ts +2 -2
- package/src/{core/tools/lsp → lsp}/types.ts +14 -16
- package/src/{core/tools/lsp → lsp}/utils.ts +1 -1
- package/src/main.ts +12 -12
- package/src/{core/mcp → mcp}/config.ts +8 -8
- package/src/{core/mcp → mcp}/loader.ts +5 -6
- package/src/{core/mcp → mcp}/manager.ts +2 -2
- package/src/{core/mcp → mcp}/tool-bridge.ts +35 -6
- package/src/{core/mcp → mcp}/tool-cache.ts +1 -1
- package/src/{core/mcp → mcp}/transports/http.ts +7 -1
- package/src/{core/mcp → mcp}/transports/stdio.ts +1 -1
- package/src/{core/mcp → mcp}/types.ts +1 -1
- package/src/migrations.ts +2 -2
- package/src/modes/{interactive/components → components}/armin.ts +1 -1
- package/src/modes/{interactive/components → components}/assistant-message.ts +1 -1
- package/src/modes/{interactive/components → components}/bash-execution.ts +37 -29
- package/src/modes/{interactive/components → components}/bordered-loader.ts +1 -1
- package/src/modes/{interactive/components → components}/branch-summary-message.ts +2 -2
- package/src/modes/{interactive/components → components}/compaction-summary-message.ts +2 -2
- package/src/modes/{interactive/components → components}/custom-message.ts +3 -3
- package/src/modes/{interactive/components → components}/diff.ts +1 -1
- package/src/modes/{interactive/components → components}/dynamic-border.ts +1 -1
- package/src/modes/{interactive/components → components}/extensions/extension-dashboard.ts +3 -3
- package/src/modes/{interactive/components → components}/extensions/extension-list.ts +2 -2
- package/src/modes/{interactive/components → components}/extensions/inspector-panel.ts +1 -1
- package/src/modes/{interactive/components → components}/extensions/state-manager.ts +11 -17
- package/src/modes/{interactive/components → components}/extensions/types.ts +1 -1
- package/src/modes/{interactive/components → components}/footer.ts +3 -3
- package/src/modes/{interactive/components → components}/history-search.ts +2 -2
- package/src/modes/{interactive/components → components}/hook-editor.ts +1 -1
- package/src/modes/{interactive/components → components}/hook-input.ts +1 -1
- package/src/modes/{interactive/components → components}/hook-message.ts +3 -3
- package/src/modes/{interactive/components → components}/hook-selector.ts +1 -1
- package/src/modes/{interactive/components → components}/keybinding-hints.ts +2 -2
- package/src/modes/{interactive/components → components}/login-dialog.ts +1 -1
- package/src/modes/{interactive/components → components}/model-selector.ts +5 -5
- package/src/modes/{interactive/components → components}/oauth-selector.ts +2 -2
- package/src/modes/{interactive/components → components}/plugin-settings.ts +3 -3
- package/src/modes/{interactive/components → components}/python-execution.ts +35 -24
- package/src/modes/{interactive/components → components}/queue-mode-selector.ts +1 -1
- package/src/modes/{interactive/components → components}/read-tool-group.ts +2 -2
- package/src/modes/{interactive/components → components}/session-selector.ts +3 -3
- package/src/modes/{interactive/components → components}/settings-defs.ts +2 -2
- package/src/modes/{interactive/components → components}/settings-selector.ts +2 -2
- package/src/modes/{interactive/components → components}/show-images-selector.ts +1 -1
- package/src/modes/{interactive/components → components}/status-line/segments.ts +2 -2
- package/src/modes/{interactive/components → components}/status-line/separators.ts +1 -1
- package/src/modes/{interactive/components → components}/status-line/types.ts +2 -2
- package/src/modes/{interactive/components → components}/status-line-segment-editor.ts +2 -2
- package/src/modes/{interactive/components → components}/status-line.ts +3 -3
- package/src/modes/{interactive/components → components}/theme-selector.ts +1 -1
- package/src/modes/{interactive/components → components}/thinking-selector.ts +1 -1
- package/src/modes/{interactive/components → components}/todo-display.ts +3 -4
- package/src/modes/{interactive/components → components}/todo-reminder.ts +2 -2
- package/src/modes/{interactive/components → components}/tool-execution.ts +8 -8
- package/src/modes/{interactive/components → components}/tree-selector.ts +3 -3
- package/src/modes/{interactive/components → components}/ttsr-notification.ts +2 -2
- package/src/modes/{interactive/components → components}/user-message-selector.ts +1 -1
- package/src/modes/{interactive/components → components}/user-message.ts +1 -1
- package/src/modes/{interactive/components → components}/welcome.ts +2 -2
- package/src/modes/{interactive/controllers → controllers}/command-controller.ts +32 -30
- package/src/modes/{interactive/controllers → controllers}/event-controller.ts +9 -9
- package/src/modes/{interactive/controllers → controllers}/extension-ui-controller.ts +8 -8
- package/src/modes/{interactive/controllers → controllers}/input-controller.ts +6 -6
- package/src/modes/{interactive/controllers → controllers}/selector-controller.ts +16 -16
- package/src/modes/index.ts +1 -1
- package/src/modes/{interactive/interactive-mode.ts → interactive-mode.ts} +14 -14
- package/src/modes/print-mode.ts +1 -1
- package/src/modes/rpc/rpc-client.ts +3 -3
- package/src/modes/rpc/rpc-mode.ts +3 -3
- package/src/modes/rpc/rpc-types.ts +3 -3
- package/src/modes/{interactive/theme → theme}/theme.ts +1 -1
- package/src/modes/{interactive/types.ts → types.ts} +8 -9
- package/src/modes/{interactive/utils → utils}/ui-helpers.ts +20 -27
- package/src/{core/tools/patch → patch}/applicator.ts +1 -1
- package/src/{core/tools/patch → patch}/diff.ts +1 -1
- package/src/{core/tools/patch → patch}/index.ts +31 -36
- package/src/{core/tools/patch → patch}/shared.ts +9 -6
- package/src/prompts/agents/explore.md +83 -46
- package/src/prompts/agents/init.md +9 -4
- package/src/prompts/agents/plan.md +8 -7
- package/src/prompts/agents/reviewer.md +36 -18
- package/src/prompts/agents/task.md +4 -4
- package/src/prompts/compaction/branch-summary-preamble.md +0 -1
- package/src/prompts/review-request.md +0 -1
- package/src/prompts/system/custom-system-prompt.md +2 -14
- package/src/prompts/system/file-operations.md +0 -2
- package/src/prompts/system/system-prompt.md +147 -138
- package/src/prompts/system/web-search.md +26 -0
- package/src/prompts/tools/ask.md +31 -24
- package/src/prompts/tools/bash.md +20 -17
- package/src/prompts/tools/calculator.md +9 -5
- package/src/prompts/tools/fetch.md +16 -0
- package/src/prompts/tools/find.md +15 -5
- package/src/prompts/tools/gemini-image.md +21 -6
- package/src/prompts/tools/grep.md +28 -12
- package/src/prompts/tools/lsp.md +35 -14
- package/src/prompts/tools/patch.md +39 -41
- package/src/prompts/tools/python.md +59 -76
- package/src/prompts/tools/read.md +23 -22
- package/src/prompts/tools/replace.md +19 -12
- package/src/prompts/tools/ssh.md +21 -28
- package/src/prompts/tools/task.md +54 -44
- package/src/prompts/tools/todo-write.md +52 -163
- package/src/prompts/tools/web-search.md +16 -9
- package/src/prompts/tools/write.md +13 -2
- package/src/{core/sdk.ts → sdk.ts} +65 -34
- package/src/{core → session}/agent-session.ts +45 -37
- package/src/{core → session}/agent-storage.ts +2 -2
- package/src/session/artifacts.ts +110 -0
- package/src/{core → session}/auth-storage.ts +1 -1
- package/src/{core → session}/compaction/branch-summarization.ts +5 -5
- package/src/{core → session}/compaction/compaction.ts +6 -6
- package/src/{core → session}/compaction/utils.ts +3 -3
- package/src/{core → session}/history-storage.ts +1 -1
- package/src/{core → session}/messages.ts +6 -8
- package/src/{core → session}/session-manager.ts +2 -2
- package/src/{core → session}/storage-migration.ts +2 -2
- package/src/session/streaming-output.ts +177 -0
- package/src/{core/ssh → ssh}/connection-manager.ts +1 -1
- package/src/{core/ssh → ssh}/ssh-executor.ts +19 -4
- package/src/{core/ssh → ssh}/sshfs-mount.ts +1 -1
- package/src/{core/system-prompt.ts → system-prompt.ts} +8 -37
- package/src/{core/tools/task → task}/agents.ts +8 -8
- package/src/{core/tools/task → task}/commands.ts +5 -6
- package/src/{core/tools/task → task}/discovery.ts +3 -3
- package/src/{core/tools/task → task}/executor.ts +34 -44
- package/src/{core/tools/task → task}/index.ts +206 -50
- package/src/{core/tools/task → task}/render.ts +80 -23
- package/src/{core/tools/task → task}/subprocess-tool-registry.ts +1 -1
- package/src/task/template.ts +47 -0
- package/src/{core/tools/task → task}/types.ts +19 -27
- package/src/{core/tools/task → task}/worker-protocol.ts +8 -4
- package/src/{core/tools/task → task}/worker.ts +34 -29
- package/src/task/worktree.ts +166 -0
- package/src/{core/tools → tools}/ask.ts +13 -21
- package/src/{core/tools → tools}/bash-interceptor.ts +1 -1
- package/src/{core/tools → tools}/bash.ts +61 -63
- package/src/{core/tools → tools}/calculator.ts +4 -4
- package/src/{core/tools → tools}/complete.ts +1 -1
- package/src/{core/tools → tools}/context.ts +2 -2
- package/src/{core/tools/web-fetch.ts → tools/fetch.ts} +97 -76
- package/src/{core/tools → tools}/find.ts +80 -104
- package/src/{core/tools → tools}/gemini-image.ts +420 -29
- package/src/{core/tools → tools}/grep.ts +155 -164
- package/src/{core/tools → tools}/index.ts +63 -56
- package/src/tools/list-limit.ts +40 -0
- package/src/{core/tools → tools}/ls.ts +44 -35
- package/src/{core/tools → tools}/notebook.ts +3 -3
- package/src/tools/output-meta.ts +443 -0
- package/src/tools/output-utils.ts +63 -0
- package/src/{core/tools → tools}/python.ts +105 -89
- package/src/tools/read.ts +882 -0
- package/src/{core/tools → tools}/render-utils.ts +1 -1
- package/src/{core/tools → tools}/renderers.ts +8 -10
- package/src/{core/tools → tools}/review.ts +2 -2
- package/src/{core/tools → tools}/ssh.ts +56 -59
- package/src/{core/tools → tools}/todo-write.ts +12 -23
- package/src/tools/tool-errors.ts +95 -0
- package/src/tools/tool-result.ts +92 -0
- package/src/{core/tools → tools}/truncate.ts +2 -2
- package/src/{core/tools → tools}/write.ts +15 -13
- package/src/utils/changelog.ts +1 -1
- package/src/{core → utils}/file-mentions.ts +4 -4
- package/src/utils/image-convert.ts +1 -1
- package/src/utils/image-resize.ts +1 -1
- package/src/utils/shell.ts +1 -1
- package/src/{core → utils}/title-generator.ts +4 -4
- package/src/utils/tools-manager.ts +1 -1
- package/src/{core/tools/web-scrapers → web/scrapers}/choosealicense.ts +1 -1
- package/src/{core/tools/web-scrapers → web/scrapers}/twitter.ts +3 -2
- package/src/{core/tools/web-scrapers → web/scrapers}/types.ts +4 -2
- package/src/{core/tools/web-scrapers → web/scrapers}/utils.ts +1 -1
- package/src/{core/tools/web-scrapers → web/scrapers}/youtube.ts +14 -13
- package/src/{core/tools/web-search → web/search}/auth.ts +4 -4
- package/src/{core/tools/web-search → web/search}/index.ts +22 -71
- package/src/{core/tools/web-search → web/search}/providers/anthropic.ts +7 -10
- package/src/{core/tools/web-search → web/search}/providers/exa.ts +2 -2
- package/src/{core/tools/web-search → web/search}/providers/perplexity.ts +4 -16
- package/src/{core/tools/web-search → web/search}/render.ts +3 -3
- package/tsconfig.json +25 -0
- package/scripts/migrate-sessions.sh +0 -93
- package/src/core/index.ts +0 -56
- package/src/core/python-prelude.ts +0 -3
- package/src/core/ssh-executor.ts +0 -5
- package/src/core/streaming-output.ts +0 -115
- package/src/core/tools/output.ts +0 -519
- package/src/core/tools/read.ts +0 -717
- package/src/core/tools/task/template.ts +0 -37
- package/src/prompts/tools/output.md +0 -47
- package/src/prompts/tools/web-fetch.md +0 -9
- package/src/vendor/photon/photon_rs_bg.wasm.b64.js +0 -1
- /package/src/{core/tools/exa → exa}/types.ts +0 -0
- /package/src/{core → exec}/exec.ts +0 -0
- /package/src/{core/export-html → export/html}/template.css +0 -0
- /package/src/{core/export-html → export/html}/template.generated.ts +0 -0
- /package/src/{core/export-html → export/html}/template.html +0 -0
- /package/src/{core/export-html → export/html}/template.js +0 -0
- /package/src/{core/export-html → export/html}/template.macro.ts +0 -0
- /package/src/{core/export-html → export/html}/vendor/highlight.min.js +0 -0
- /package/src/{core/export-html → export/html}/vendor/marked.min.js +0 -0
- /package/src/{core → extensibility}/custom-commands/index.ts +0 -0
- /package/src/{core → extensibility}/custom-tools/index.ts +0 -0
- /package/src/{core → extensibility}/extensions/index.ts +0 -0
- /package/src/{core → extensibility}/hooks/tool-wrapper.ts +0 -0
- /package/src/{core → extensibility}/plugins/index.ts +0 -0
- /package/src/{core → extensibility}/plugins/loader.ts +0 -0
- /package/src/{core → extensibility}/plugins/manager.ts +0 -0
- /package/src/{core → extensibility}/plugins/parser.ts +0 -0
- /package/src/{core → extensibility}/plugins/types.ts +0 -0
- /package/src/{core/python-modules.ts → ipy/modules.ts} +0 -0
- /package/src/{core/python-prelude.py → ipy/prelude.py} +0 -0
- /package/src/{core/tools/lsp → lsp}/defaults.json +0 -0
- /package/src/{core/tools/lsp → lsp}/edits.ts +0 -0
- /package/src/{core/tools/lsp → lsp}/lspmux.ts +0 -0
- /package/src/{core/tools/lsp → lsp}/rust-analyzer.ts +0 -0
- /package/src/{core/mcp → mcp}/client.ts +0 -0
- /package/src/{core/mcp → mcp}/index.ts +0 -0
- /package/src/{core/mcp → mcp}/json-rpc.ts +0 -0
- /package/src/{core/mcp → mcp}/transports/index.ts +0 -0
- /package/src/modes/{interactive/components → components}/countdown-timer.ts +0 -0
- /package/src/modes/{interactive/components → components}/custom-editor.ts +0 -0
- /package/src/modes/{interactive/components → components}/extensions/index.ts +0 -0
- /package/src/modes/{interactive/components → components}/index.ts +0 -0
- /package/src/modes/{interactive/components → components}/status-line/index.ts +0 -0
- /package/src/modes/{interactive/components → components}/status-line/presets.ts +0 -0
- /package/src/modes/{interactive/components → components}/visual-truncate.ts +0 -0
- /package/src/modes/{interactive/theme → theme}/dark.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/alabaster.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/amethyst.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/anthracite.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/basalt.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/birch.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-abyss.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-arctic.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-aurora.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-catppuccin.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-cavern.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-copper.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-cosmos.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-cyberpunk.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-dracula.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-eclipse.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-ember.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-equinox.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-forest.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-github.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-gruvbox.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-lavender.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-lunar.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-midnight.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-monochrome.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-monokai.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-nebula.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-nord.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-ocean.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-one.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-rainforest.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-reef.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-retro.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-rose-pine.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-sakura.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-slate.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-solarized.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-solstice.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-starfall.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-sunset.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-swamp.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-synthwave.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-taiga.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-terminal.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-tokyo-night.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-tundra.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-twilight.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/dark-volcanic.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/graphite.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/index.ts +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-arctic.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-aurora-day.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-canyon.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-catppuccin.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-cirrus.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-coral.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-cyberpunk.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-dawn.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-dunes.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-eucalyptus.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-forest.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-frost.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-github.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-glacier.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-gruvbox.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-haze.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-honeycomb.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-lagoon.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-lavender.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-meadow.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-mint.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-monochrome.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-ocean.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-one.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-opal.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-orchard.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-paper.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-prism.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-retro.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-sand.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-savanna.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-solarized.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-soleil.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-sunset.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-synthwave.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-tokyo-night.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-wetland.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/light-zenith.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/limestone.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/mahogany.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/marble.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/obsidian.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/onyx.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/pearl.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/porcelain.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/quartz.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/sandstone.json +0 -0
- /package/src/modes/{interactive/theme → theme}/defaults/titanium.json +0 -0
- /package/src/modes/{interactive/theme → theme}/light.json +0 -0
- /package/src/modes/{interactive/theme → theme}/theme-schema.json +0 -0
- /package/src/{core/tools/patch → patch}/fuzzy.ts +0 -0
- /package/src/{core/tools/patch → patch}/normalize.ts +0 -0
- /package/src/{core/tools/patch → patch}/normative.ts +0 -0
- /package/src/{core/tools/patch → patch}/parser.ts +0 -0
- /package/src/{core/tools/patch → patch}/types.ts +0 -0
- /package/src/{core → session}/compaction/index.ts +0 -0
- /package/src/{core → session}/session-storage.ts +0 -0
- /package/src/{core/tools/task → task}/name-generator.ts +0 -0
- /package/src/{core/tools/task → task}/omp-command.ts +0 -0
- /package/src/{core/tools/task → task}/parallel.ts +0 -0
- /package/src/{core/tools → tools}/jtd-to-json-schema.ts +0 -0
- /package/src/{core/tools → tools}/path-utils.ts +0 -0
- /package/src/{core → utils}/event-bus.ts +0 -0
- /package/src/{core → utils}/frontmatter.ts +0 -0
- /package/src/{core → utils}/terminal-notify.ts +0 -0
- /package/src/{core → utils}/timings.ts +0 -0
- /package/src/{core → utils}/utils.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/artifacthub.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/arxiv.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/aur.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/biorxiv.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/bluesky.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/brew.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/cheatsh.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/chocolatey.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/cisa-kev.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/clojars.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/coingecko.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/crates-io.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/crossref.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/devto.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/discogs.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/discourse.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/dockerhub.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/fdroid.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/firefox-addons.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/flathub.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/github-gist.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/github.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/gitlab.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/go-pkg.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/hackage.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/hackernews.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/hex.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/huggingface.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/iacr.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/index.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/jetbrains-marketplace.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/lemmy.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/lobsters.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/mastodon.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/maven.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/mdn.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/metacpan.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/musicbrainz.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/npm.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/nuget.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/nvd.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/ollama.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/open-vsx.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/opencorporates.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/openlibrary.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/orcid.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/osv.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/packagist.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/pub-dev.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/pubmed.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/pypi.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/rawg.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/readthedocs.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/reddit.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/repology.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/rfc.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/rubygems.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/searchcode.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/sec-edgar.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/semantic-scholar.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/snapcraft.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/sourcegraph.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/spdx.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/spotify.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/stackoverflow.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/terraform.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/tldr.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/vimeo.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/vscode-marketplace.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/w3c.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/wikidata.ts +0 -0
- /package/src/{core/tools/web-scrapers → web/scrapers}/wikipedia.ts +0 -0
- /package/src/{core/tools/web-search → web/search}/types.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,93 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [8.0.0] - 2026-01-23
|
|
6
|
+
### Added
|
|
7
|
+
|
|
8
|
+
- Added antigravity provider support for image generation with Google Cloud authentication
|
|
9
|
+
- Added support for google-antigravity API credentials in model registry
|
|
10
|
+
- Added antigravity-specific request handling with SSE streaming
|
|
11
|
+
- Added projectId parameter to antigravity credentials parsing
|
|
12
|
+
- Added antigravity provider to preferred image provider selection
|
|
13
|
+
- Added list-limit utility for consistent result limiting across tools
|
|
14
|
+
- Added output-utils module with tail buffer and artifact allocation helpers
|
|
15
|
+
- Added tool-result module for standardized tool result construction
|
|
16
|
+
- Added truncation summary options to OutputMetaBuilder for better output tracking
|
|
17
|
+
- Added artifact storage system for truncated tool outputs with artifact:// URL protocol
|
|
18
|
+
- Added structured output metadata system with fluent OutputMetaBuilder for consistent notices
|
|
19
|
+
- Added standardized tool error types (ToolError, MultiError, ToolAbortError) for better error handling
|
|
20
|
+
- Added internal URL routing system with protocol handlers:
|
|
21
|
+
- `agent://<id>` - access agent output artifacts
|
|
22
|
+
- `agent://<id>/<path>` and `agent://<id>?q=<query>` - JSON extraction from agent outputs
|
|
23
|
+
- `skill://<name>` and `skill://<name>/<path>` - read skill files and relative paths
|
|
24
|
+
- `rule://<name>` - read rule content
|
|
25
|
+
- URL resolution includes filesystem path in output for bash/python interop
|
|
26
|
+
- Added fetch tool for URL content retrieval with enhanced processing capabilities
|
|
27
|
+
- Added `isolated` option to task tool for git worktree execution with automatic patch generation and application
|
|
28
|
+
- Added format-prompts script to standardize prompt file formatting
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
- Updated default line limit from 4000 to 3000 lines for output truncation
|
|
33
|
+
- Reordered truncation notice to show offset continuation before artifact reference
|
|
34
|
+
- Applied meta notice wrapper to all tools in createTools function
|
|
35
|
+
- Updated test expectations to reflect new 3000 line limit
|
|
36
|
+
- Removed output tool from schema validation test list
|
|
37
|
+
- Replaced inline output truncation notices with structured metadata system across all tools
|
|
38
|
+
- Updated bash, python, and ssh executors to track detailed output statistics (total lines/bytes vs output lines/bytes)
|
|
39
|
+
- Modified artifact storage to use pre-allocated paths instead of inline file writing
|
|
40
|
+
- Changed message format to use meta field instead of fullOutputPath for truncation information
|
|
41
|
+
- Updated interactive components to display truncation metadata from structured format
|
|
42
|
+
- Standardized tool result building with new ToolResultBuilder for consistent metadata handling
|
|
43
|
+
- Simplified Python gateway coordination by removing reference counting and client tracking
|
|
44
|
+
- Updated Python gateway to use global shared instance instead of per-process coordination
|
|
45
|
+
- Modified Python kernel initialization to set working directory and environment per kernel
|
|
46
|
+
- Updated interactive status display to show Python and venv paths instead of client count
|
|
47
|
+
- Changed system prompt to clarify CHECKPOINT step 0 timing
|
|
48
|
+
- Updated Python environment warming to use await instead of void for proper error handling
|
|
49
|
+
- Updated interactive mode shutdown to use postmortem.quit instead of process.exit
|
|
50
|
+
- Updated bash tool documentation to clarify specialized tool usage
|
|
51
|
+
- Updated task tool documentation to escape placeholder syntax in examples
|
|
52
|
+
- Updated Python environment warming to use await instead of void for proper error handling
|
|
53
|
+
- Updated interactive mode shutdown to use postmortem.quit instead of process.exit
|
|
54
|
+
- Updated bash tool documentation to clarify specialized tool usage
|
|
55
|
+
- Updated task tool documentation to escape placeholder syntax in examples
|
|
56
|
+
- Updated all tools to use structured metadata instead of inline notices for truncation, limits, and diagnostics
|
|
57
|
+
- Replaced manual error formatting with ToolError.render() and standardized error handling
|
|
58
|
+
- Enhanced bash and python executors to save full output as artifacts when truncated
|
|
59
|
+
- Improved abort signal handling across all tools with consistent ToolAbortError
|
|
60
|
+
- Renamed task parameter from `vars` to `args` throughout task tool interface and updated template rendering to support built-in `{{id}}` and `{{description}}` placeholders
|
|
61
|
+
- Simplified todo-write tool by removing active_form parameter, using single content field for task descriptions
|
|
62
|
+
- Updated system prompt structure with `<important>` and `<avoid>` tags, clearer critical sections, and standardized whitespace handling
|
|
63
|
+
- Renamed web_fetch tool to fetch and removed internal URL handling (use read tool instead)
|
|
64
|
+
- Standardized tool parameter names from camelCase to snake_case across edit, grep, python, and todo-write tools
|
|
65
|
+
- Unified timeout parameters across all tools with auto-conversion from milliseconds and reasonable clamping (1s-3600s for bash/ssh, 1s-600s for python/gemini-image)
|
|
66
|
+
- Simplified web-search tool by removing advanced parameters (`max_tokens`, `model`, `search_domain_filter`, `search_context_size`, `return_related_questions`) and using `recency` instead of `search_recency_filter`
|
|
67
|
+
- Restructured tool documentation with standardized `<instruction>`, `<output>`, `<critical>`, and `<avoid>` sections across all 18 tools
|
|
68
|
+
- Updated find tool to always sort results by modification time
|
|
69
|
+
- Updated bash prompt to use `cwd` parameter instead of `workdir`
|
|
70
|
+
- Improved output truncation limits: bash to 50KB/2000 lines, python to 100KB
|
|
71
|
+
- Removed model parameter from task and gemini-image tools to use session/provider defaults
|
|
72
|
+
- Improved MCP tool name handling with explicit server and tool name properties
|
|
73
|
+
- Marked read tool as non-abortable to improve performance
|
|
74
|
+
- Converted dynamic imports to static imports in installer and exa tools
|
|
75
|
+
|
|
76
|
+
### Removed
|
|
77
|
+
|
|
78
|
+
- Removed output tool (replaced by `agent://` URLs via read tool)
|
|
79
|
+
- Removed web_fetch tool (replaced by fetch tool)
|
|
80
|
+
|
|
81
|
+
### Fixed
|
|
82
|
+
|
|
83
|
+
- Fixed Python kernel environment initialization for external and shared gateways
|
|
84
|
+
- Fixed gateway status reporting to include Python and virtual environment paths
|
|
85
|
+
- Fixed inconsistent error formatting across tools by standardizing on ToolError types
|
|
86
|
+
- Fixed timeout parameter handling to auto-convert milliseconds to seconds and clamp to reasonable ranges
|
|
87
|
+
- Fixed whitespace formatting in json-query.ts comment
|
|
88
|
+
- Fixed interactive shutdown to await postmortem cleanup so Python kernel gateways are terminated
|
|
89
|
+
- Fixed shared Python gateway reuse across working directories by initializing kernel cwd and env per kernel
|
|
90
|
+
- Fixed Python gateway coordination to use a single global gateway without ref counting
|
|
91
|
+
|
|
5
92
|
## [7.0.0] - 2026-01-21
|
|
6
93
|
### Added
|
|
7
94
|
|
package/README.md
CHANGED
|
@@ -938,7 +938,7 @@ All tools are enabled by default. Use `--tools <list>` to restrict to a subset.
|
|
|
938
938
|
| `lsp` | Language Server Protocol queries (go-to-definition, references, hover) |
|
|
939
939
|
| `todo_write` | Track task progress during sessions |
|
|
940
940
|
| `web_search` | Search the web |
|
|
941
|
-
| `
|
|
941
|
+
| `fetch` | Fetch and process URLs |
|
|
942
942
|
| `python` | Execute Python code in IPython kernel |
|
|
943
943
|
| `notebook` | Edit Jupyter notebook cells |
|
|
944
944
|
|
package/docs/hooks.md
CHANGED
|
@@ -345,10 +345,10 @@ Tool inputs:
|
|
|
345
345
|
- `bash`: `{ command, timeout? }`
|
|
346
346
|
- `read`: `{ path, offset?, limit? }`
|
|
347
347
|
- `write`: `{ path, content }`
|
|
348
|
-
- `edit`: `{ path,
|
|
348
|
+
- `edit`: `{ path, old_text, new_text }`
|
|
349
349
|
- `ls`: `{ path?, limit? }`
|
|
350
350
|
- `find`: `{ pattern, path?, limit? }`
|
|
351
|
-
- `grep`: `{ pattern, path?, glob?,
|
|
351
|
+
- `grep`: `{ pattern, path?, glob?, ignore_case?, literal?, context?, limit? }`
|
|
352
352
|
|
|
353
353
|
#### tool_result
|
|
354
354
|
|
package/docs/sdk.md
CHANGED
|
@@ -375,7 +375,7 @@ All tools are defined in `BUILTIN_TOOLS`:
|
|
|
375
375
|
- `output` - Task output retrieval
|
|
376
376
|
- `read` - File reading (text and images)
|
|
377
377
|
- `task` - Subagent spawning
|
|
378
|
-
- `
|
|
378
|
+
- `fetch` - URL fetching
|
|
379
379
|
- `web_search` - Web search
|
|
380
380
|
- `write` - File writing
|
|
381
381
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oh-my-pi/pi-coding-agent",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.1",
|
|
4
4
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"ompConfig": {
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"import": "./src/index.ts"
|
|
19
19
|
},
|
|
20
20
|
"./hooks": {
|
|
21
|
-
"types": "./src/
|
|
22
|
-
"import": "./src/
|
|
21
|
+
"types": "./src/extensibility/hooks/index.ts",
|
|
22
|
+
"import": "./src/extensibility/hooks/index.ts"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
@@ -27,24 +27,26 @@
|
|
|
27
27
|
"scripts",
|
|
28
28
|
"docs",
|
|
29
29
|
"examples",
|
|
30
|
-
"CHANGELOG.md"
|
|
30
|
+
"CHANGELOG.md",
|
|
31
|
+
"tsconfig.json"
|
|
31
32
|
],
|
|
32
33
|
"scripts": {
|
|
33
34
|
"check": "tsgo -p tsconfig.check.json",
|
|
35
|
+
"format-prompts": "bun scripts/format-prompts.ts",
|
|
34
36
|
"clean": "rm -rf dist",
|
|
35
37
|
"build": "tsgo -p tsconfig.build.json && chmod +x dist/cli.js",
|
|
36
38
|
"build:binary": "bun run generate-wasm-b64 && bun build --compile ./src/cli.ts --outfile dist/omp",
|
|
37
39
|
"generate-template": "bun scripts/generate-template.ts",
|
|
38
40
|
"postinstall": "bun run generate-template || true",
|
|
39
41
|
"test": "bun test",
|
|
40
|
-
"prepublishOnly": "bun run generate-template &&
|
|
42
|
+
"prepublishOnly": "bun run generate-template && cp tsconfig.publish.json tsconfig.json"
|
|
41
43
|
},
|
|
42
44
|
"dependencies": {
|
|
43
|
-
"@oh-my-pi/omp-stats": "
|
|
44
|
-
"@oh-my-pi/pi-agent-core": "
|
|
45
|
-
"@oh-my-pi/pi-ai": "
|
|
46
|
-
"@oh-my-pi/pi-tui": "
|
|
47
|
-
"@oh-my-pi/pi-utils": "
|
|
45
|
+
"@oh-my-pi/omp-stats": "8.0.0",
|
|
46
|
+
"@oh-my-pi/pi-agent-core": "8.0.0",
|
|
47
|
+
"@oh-my-pi/pi-ai": "8.0.0",
|
|
48
|
+
"@oh-my-pi/pi-tui": "8.0.0",
|
|
49
|
+
"@oh-my-pi/pi-utils": "8.0.0",
|
|
48
50
|
"@openai/agents": "^0.3.7",
|
|
49
51
|
"@sinclair/typebox": "^0.34.46",
|
|
50
52
|
"ajv": "^8.17.1",
|
|
@@ -56,7 +58,6 @@
|
|
|
56
58
|
"handlebars": "^4.7.8",
|
|
57
59
|
"highlight.js": "^11.11.1",
|
|
58
60
|
"marked": "^15.0.12",
|
|
59
|
-
"minimatch": "^10.1.1",
|
|
60
61
|
"nanoid": "^5.1.6",
|
|
61
62
|
"ndjson": "^2.0.0",
|
|
62
63
|
"node-html-parser": "^6.1.13",
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
/**
|
|
3
|
+
* Format prompt files (mixed XML + Markdown + Handlebars).
|
|
4
|
+
*
|
|
5
|
+
* Rules:
|
|
6
|
+
* 1. No blank line between "text:" and following list/block
|
|
7
|
+
* 2. No blank line after opening XML tag or Handlebars block
|
|
8
|
+
* 3. No blank line before closing XML tag or Handlebars block
|
|
9
|
+
* 4. Collapse 2+ blank lines to single blank line
|
|
10
|
+
* 5. Trim trailing whitespace (preserve indentation)
|
|
11
|
+
* 6. Ensure single newline at EOF
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { Glob } from "bun";
|
|
15
|
+
|
|
16
|
+
const PROMPTS_DIR = new URL("../src/prompts/", import.meta.url).pathname;
|
|
17
|
+
|
|
18
|
+
// Opening XML tag (not self-closing, not closing)
|
|
19
|
+
const OPENING_XML = /^<([a-z_-]+)(?:\s+[^>]*)?>$/;
|
|
20
|
+
// Closing XML tag
|
|
21
|
+
const CLOSING_XML = /^<\/([a-z_-]+)>$/;
|
|
22
|
+
// Handlebars block start: {{#if}}, {{#has}}, {{#list}}, etc.
|
|
23
|
+
const OPENING_HBS = /^\{\{#/;
|
|
24
|
+
// Handlebars block end: {{/if}}, {{/has}}, {{/list}}, etc.
|
|
25
|
+
const CLOSING_HBS = /^\{\{\//;
|
|
26
|
+
// Line ending with colon (intro to a list) - handles **bold:** too
|
|
27
|
+
const ENDS_WITH_COLON = /:\**\s*$/;
|
|
28
|
+
// List item or Handlebars conditional that acts like list
|
|
29
|
+
const LIST_OR_BLOCK = /^(\s*)[-*]|\d+\.\s|^\{\{#/;
|
|
30
|
+
// Code fence
|
|
31
|
+
const CODE_FENCE = /^```/;
|
|
32
|
+
|
|
33
|
+
function formatPrompt(content: string): string {
|
|
34
|
+
const lines = content.split("\n");
|
|
35
|
+
const result: string[] = [];
|
|
36
|
+
let inCodeBlock = false;
|
|
37
|
+
|
|
38
|
+
for (let i = 0; i < lines.length; i++) {
|
|
39
|
+
let line = lines[i];
|
|
40
|
+
|
|
41
|
+
// Trim trailing whitespace (preserve leading)
|
|
42
|
+
line = line.trimEnd();
|
|
43
|
+
|
|
44
|
+
const trimmed = line.trim();
|
|
45
|
+
|
|
46
|
+
// Track code blocks - don't modify inside them
|
|
47
|
+
if (CODE_FENCE.test(trimmed)) {
|
|
48
|
+
inCodeBlock = !inCodeBlock;
|
|
49
|
+
result.push(line);
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (inCodeBlock) {
|
|
54
|
+
result.push(line);
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const isBlank = trimmed === "";
|
|
59
|
+
|
|
60
|
+
// Skip blank lines that violate our rules
|
|
61
|
+
if (isBlank) {
|
|
62
|
+
const prevLine = result[result.length - 1]?.trim() ?? "";
|
|
63
|
+
const nextLine = lines[i + 1]?.trim() ?? "";
|
|
64
|
+
|
|
65
|
+
// Rule 1: No blank between "text:" and list/block
|
|
66
|
+
if (ENDS_WITH_COLON.test(prevLine) && LIST_OR_BLOCK.test(nextLine)) {
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Rule 2: No blank after opening XML tag or Handlebars block
|
|
71
|
+
if (OPENING_XML.test(prevLine) || OPENING_HBS.test(prevLine)) {
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Rule 3: No blank before closing XML tag or Handlebars block
|
|
76
|
+
if (CLOSING_XML.test(nextLine) || CLOSING_HBS.test(nextLine)) {
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Rule 4: Collapse multiple blank lines
|
|
81
|
+
const prevIsBlank = prevLine === "";
|
|
82
|
+
if (prevIsBlank) {
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Rule 3 (cleanup): Remove trailing blanks before closing tag
|
|
88
|
+
if (CLOSING_XML.test(trimmed) || CLOSING_HBS.test(trimmed)) {
|
|
89
|
+
while (result.length > 0 && result[result.length - 1].trim() === "") {
|
|
90
|
+
result.pop();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
result.push(line);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Rule 6: Single newline at EOF
|
|
98
|
+
while (result.length > 0 && result[result.length - 1].trim() === "") {
|
|
99
|
+
result.pop();
|
|
100
|
+
}
|
|
101
|
+
result.push("");
|
|
102
|
+
|
|
103
|
+
return result.join("\n");
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
async function main() {
|
|
107
|
+
const glob = new Glob("**/*.md");
|
|
108
|
+
const files: string[] = [];
|
|
109
|
+
let changed = 0;
|
|
110
|
+
|
|
111
|
+
for await (const path of glob.scan(PROMPTS_DIR)) {
|
|
112
|
+
files.push(path);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const check = process.argv.includes("--check");
|
|
116
|
+
|
|
117
|
+
for (const relativePath of files) {
|
|
118
|
+
const fullPath = `${PROMPTS_DIR}${relativePath}`;
|
|
119
|
+
const original = await Bun.file(fullPath).text();
|
|
120
|
+
const formatted = formatPrompt(original);
|
|
121
|
+
|
|
122
|
+
if (original !== formatted) {
|
|
123
|
+
if (check) {
|
|
124
|
+
console.log(`Would format: ${relativePath}`);
|
|
125
|
+
} else {
|
|
126
|
+
await Bun.write(fullPath, formatted);
|
|
127
|
+
console.log(`Formatted: ${relativePath}`);
|
|
128
|
+
}
|
|
129
|
+
changed++;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if (check && changed > 0) {
|
|
134
|
+
console.log(`\n${changed} file(s) need formatting. Run 'bun run format-prompts' to fix.`);
|
|
135
|
+
process.exit(1);
|
|
136
|
+
} else if (changed === 0) {
|
|
137
|
+
console.log("All prompt files are formatted.");
|
|
138
|
+
} else {
|
|
139
|
+
console.log(`\nFormatted ${changed} file(s).`);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
main();
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This avoids the Bun macro restriction in node_modules.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
const dir = new URL("../src/
|
|
7
|
+
const dir = new URL("../src/export/html/", import.meta.url).pathname;
|
|
8
8
|
|
|
9
9
|
// Read all files
|
|
10
10
|
const html = await Bun.file(`${dir}template.html`).text();
|
package/src/cli/args.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import type { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
|
|
6
6
|
import chalk from "chalk";
|
|
7
|
-
import { APP_NAME, CONFIG_DIR_NAME, ENV_AGENT_DIR } from "
|
|
8
|
-
import { BUILTIN_TOOLS } from "
|
|
7
|
+
import { APP_NAME, CONFIG_DIR_NAME, ENV_AGENT_DIR } from "$c/config";
|
|
8
|
+
import { BUILTIN_TOOLS } from "$c/tools/index";
|
|
9
9
|
|
|
10
10
|
export type Mode = "text" | "json" | "rpc";
|
|
11
11
|
|
|
@@ -296,7 +296,7 @@ ${chalk.bold("Available Tools (all enabled by default):")}
|
|
|
296
296
|
python - Execute Python code (requires: ${APP_NAME} setup python)
|
|
297
297
|
notebook - Edit Jupyter notebooks
|
|
298
298
|
task - Launch sub-agents for parallel tasks
|
|
299
|
-
|
|
299
|
+
fetch - Fetch and process URLs
|
|
300
300
|
web_search - Search the web
|
|
301
301
|
ask - Ask user questions (interactive mode only)
|
|
302
302
|
`);
|
package/src/cli/config-cli.ts
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import chalk from "chalk";
|
|
9
|
-
import { APP_NAME, getAgentDir } from "
|
|
10
|
-
import { SettingsManager } from "
|
|
11
|
-
import { SETTINGS_DEFS, type SettingDef } from "
|
|
12
|
-
import { theme } from "
|
|
9
|
+
import { APP_NAME, getAgentDir } from "$c/config";
|
|
10
|
+
import { SettingsManager } from "$c/config/settings-manager";
|
|
11
|
+
import { SETTINGS_DEFS, type SettingDef } from "$c/modes/components/settings-defs";
|
|
12
|
+
import { theme } from "$c/modes/theme/theme";
|
|
13
13
|
|
|
14
14
|
// =============================================================================
|
|
15
15
|
// Types
|
|
@@ -6,9 +6,9 @@ import { existsSync, readFileSync, statSync } from "node:fs";
|
|
|
6
6
|
import { resolve } from "node:path";
|
|
7
7
|
import type { ImageContent } from "@oh-my-pi/pi-ai";
|
|
8
8
|
import chalk from "chalk";
|
|
9
|
-
import { resolveReadPath } from "
|
|
10
|
-
import { formatDimensionNote, resizeImage } from "
|
|
11
|
-
import { detectSupportedImageMimeTypeFromFile } from "
|
|
9
|
+
import { resolveReadPath } from "$c/tools/path-utils";
|
|
10
|
+
import { formatDimensionNote, resizeImage } from "$c/utils/image-resize";
|
|
11
|
+
import { detectSupportedImageMimeTypeFromFile } from "$c/utils/mime";
|
|
12
12
|
|
|
13
13
|
export interface ProcessedFiles {
|
|
14
14
|
text: string;
|
package/src/cli/list-models.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import type { Api, Model } from "@oh-my-pi/pi-ai";
|
|
6
|
-
import type { ModelRegistry } from "
|
|
7
|
-
import { fuzzyFilter } from "
|
|
6
|
+
import type { ModelRegistry } from "$c/config/model-registry";
|
|
7
|
+
import { fuzzyFilter } from "$c/utils/fuzzy";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Format a number as human-readable (e.g., 200000 -> "200K", 1000000 -> "1M")
|
package/src/cli/plugin-cli.ts
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import chalk from "chalk";
|
|
8
|
-
import { APP_NAME } from "
|
|
9
|
-
import { PluginManager, parseSettingValue, validateSetting } from "
|
|
10
|
-
import { theme } from "
|
|
8
|
+
import { APP_NAME } from "$c/config";
|
|
9
|
+
import { PluginManager, parseSettingValue, validateSetting } from "$c/extensibility/plugins/index";
|
|
10
|
+
import { theme } from "$c/modes/theme/theme";
|
|
11
11
|
|
|
12
12
|
// =============================================================================
|
|
13
13
|
// Types
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { ProcessTerminal, TUI } from "@oh-my-pi/pi-tui";
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
6
|
+
import { SessionSelectorComponent } from "$c/modes/components/session-selector";
|
|
7
|
+
import type { SessionInfo } from "$c/session/session-manager";
|
|
8
8
|
|
|
9
9
|
/** Show TUI session selector and return selected session path or null if cancelled */
|
|
10
10
|
export async function selectSession(sessions: SessionInfo[]): Promise<string | null> {
|
package/src/cli/setup-cli.ts
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
import { $ } from "bun";
|
|
8
8
|
import chalk from "chalk";
|
|
9
|
-
import { APP_NAME } from "
|
|
10
|
-
import { theme } from "
|
|
9
|
+
import { APP_NAME } from "$c/config";
|
|
10
|
+
import { theme } from "$c/modes/theme/theme";
|
|
11
11
|
|
|
12
12
|
export type SetupComponent = "python";
|
|
13
13
|
|
package/src/cli/stats-cli.ts
CHANGED
package/src/cli/update-cli.ts
CHANGED
|
@@ -11,8 +11,8 @@ import { dirname } from "node:path";
|
|
|
11
11
|
import { Readable } from "node:stream";
|
|
12
12
|
import { pipeline } from "node:stream/promises";
|
|
13
13
|
import chalk from "chalk";
|
|
14
|
-
import { APP_NAME, VERSION } from "
|
|
15
|
-
import { theme } from "
|
|
14
|
+
import { APP_NAME, VERSION } from "$c/config";
|
|
15
|
+
import { theme } from "$c/modes/theme/theme";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Detect if we're running as a Bun compiled binary.
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
setEditorKeybindings,
|
|
11
11
|
} from "@oh-my-pi/pi-tui";
|
|
12
12
|
import { logger } from "@oh-my-pi/pi-utils";
|
|
13
|
-
import { getAgentDir } from "
|
|
13
|
+
import { getAgentDir } from "$c/config";
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Application-level actions (coding agent specific).
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import { logger } from "@oh-my-pi/pi-utils";
|
|
15
15
|
import { type Static, Type } from "@sinclair/typebox";
|
|
16
16
|
import AjvModule from "ajv";
|
|
17
|
-
import type { AuthStorage } from "
|
|
17
|
+
import type { AuthStorage } from "$c/session/auth-storage";
|
|
18
18
|
|
|
19
19
|
const Ajv = (AjvModule as any).default || AjvModule;
|
|
20
20
|
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
import type { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
|
|
6
6
|
import { type Api, type KnownProvider, type Model, modelsAreEqual } from "@oh-my-pi/pi-ai";
|
|
7
7
|
import chalk from "chalk";
|
|
8
|
-
import {
|
|
9
|
-
import { isValidThinkingLevel } from "../cli/args";
|
|
8
|
+
import { isValidThinkingLevel } from "$c/cli/args";
|
|
10
9
|
import type { ModelRegistry } from "./model-registry";
|
|
11
10
|
|
|
12
11
|
/** Default model IDs for each known provider */
|
|
@@ -229,7 +228,8 @@ export async function resolveModelScope(patterns: string[], modelRegistry: Model
|
|
|
229
228
|
// This allows "*sonnet*" to match without requiring "anthropic/*sonnet*"
|
|
230
229
|
const matchingModels = availableModels.filter((m) => {
|
|
231
230
|
const fullId = `${m.provider}/${m.id}`;
|
|
232
|
-
|
|
231
|
+
const glob = new Bun.Glob(globPattern.toLowerCase());
|
|
232
|
+
return glob.match(fullId.toLowerCase()) || glob.match(m.id.toLowerCase());
|
|
233
233
|
});
|
|
234
234
|
|
|
235
235
|
if (matchingModels.length === 0) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { join, resolve } from "node:path";
|
|
2
2
|
import { logger } from "@oh-my-pi/pi-utils";
|
|
3
3
|
import Handlebars from "handlebars";
|
|
4
|
-
import { CONFIG_DIR_NAME, getPromptsDir } from "
|
|
5
|
-
import { parseFrontmatter } from "
|
|
4
|
+
import { CONFIG_DIR_NAME, getPromptsDir } from "$c/config";
|
|
5
|
+
import { parseFrontmatter } from "$c/utils/frontmatter";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Represents a prompt template loaded from a markdown file
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { rename } from "node:fs/promises";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { logger } from "@oh-my-pi/pi-utils";
|
|
4
|
-
import { type Settings as SettingsItem, settingsCapability } from "
|
|
5
|
-
import { getAgentDbPath, getAgentDir } from "
|
|
6
|
-
import { loadCapability } from "
|
|
7
|
-
import type { SymbolPreset } from "
|
|
8
|
-
import { AgentStorage } from "
|
|
4
|
+
import { type Settings as SettingsItem, settingsCapability } from "$c/capability/settings";
|
|
5
|
+
import { getAgentDbPath, getAgentDir } from "$c/config";
|
|
6
|
+
import { loadCapability } from "$c/discovery";
|
|
7
|
+
import type { SymbolPreset } from "$c/modes/theme/theme";
|
|
8
|
+
import { AgentStorage } from "$c/session/agent-storage";
|
|
9
9
|
|
|
10
10
|
export interface CompactionSettings {
|
|
11
11
|
enabled?: boolean; // default: true
|
|
@@ -120,7 +120,7 @@ export interface PythonSettings {
|
|
|
120
120
|
export interface EditSettings {
|
|
121
121
|
fuzzyMatch?: boolean; // default: true (accept high-confidence fuzzy matches for whitespace/indentation)
|
|
122
122
|
fuzzyThreshold?: number; // default: 0.95 (similarity threshold for fuzzy matching)
|
|
123
|
-
patchMode?: boolean; // default: true (use codex-style apply-patch format instead of
|
|
123
|
+
patchMode?: boolean; // default: true (use codex-style apply-patch format instead of old_text/new_text)
|
|
124
124
|
streamingAbort?: boolean; // default: false (abort streaming edit tool calls when patch preview fails)
|
|
125
125
|
}
|
|
126
126
|
|
|
@@ -8,7 +8,7 @@ import type {
|
|
|
8
8
|
AgentToolUpdateCallback,
|
|
9
9
|
} from "@oh-my-pi/pi-agent-core";
|
|
10
10
|
import type { CursorMcpCall, CursorExecHandlers as ICursorExecHandlers, ToolResultMessage } from "@oh-my-pi/pi-ai";
|
|
11
|
-
import { resolveToCwd } from "
|
|
11
|
+
import { resolveToCwd } from "$c/tools/path-utils";
|
|
12
12
|
|
|
13
13
|
interface CursorExecBridgeOptions {
|
|
14
14
|
cwd: string;
|
|
@@ -164,11 +164,11 @@ export class CursorExecHandlers implements ICursorExecHandlers {
|
|
|
164
164
|
pattern: args.pattern,
|
|
165
165
|
path: args.path || undefined,
|
|
166
166
|
glob: args.glob || undefined,
|
|
167
|
-
|
|
167
|
+
output_mode: args.outputMode || undefined,
|
|
168
168
|
context: args.context ?? args.contextBefore ?? args.contextAfter ?? undefined,
|
|
169
|
-
|
|
169
|
+
ignore_case: args.caseInsensitive || undefined,
|
|
170
170
|
type: args.type || undefined,
|
|
171
|
-
|
|
171
|
+
head_limit: args.headLimit ?? undefined,
|
|
172
172
|
multiline: args.multiline || undefined,
|
|
173
173
|
});
|
|
174
174
|
return toolResultMessage;
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { dirname, join, sep } from "node:path";
|
|
10
|
-
import { type ContextFile, contextFileCapability } from "
|
|
11
|
-
import { readFile } from "
|
|
12
|
-
import { registerProvider } from "
|
|
13
|
-
import type { LoadContext, LoadResult } from "
|
|
10
|
+
import { type ContextFile, contextFileCapability } from "$c/capability/context-file";
|
|
11
|
+
import { readFile } from "$c/capability/fs";
|
|
12
|
+
import { registerProvider } from "$c/capability/index";
|
|
13
|
+
import type { LoadContext, LoadResult } from "$c/capability/types";
|
|
14
14
|
import { calculateDepth, createSourceMeta } from "./helpers";
|
|
15
15
|
|
|
16
16
|
const PROVIDER_ID = "agents-md";
|
package/src/discovery/builtin.ts
CHANGED
|
@@ -6,23 +6,23 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { dirname, isAbsolute, join, resolve } from "path";
|
|
9
|
-
import { type ContextFile, contextFileCapability } from "
|
|
10
|
-
import { type Extension, type ExtensionManifest, extensionCapability } from "
|
|
11
|
-
import { type ExtensionModule, extensionModuleCapability } from "
|
|
12
|
-
import { readDirEntries, readFile } from "
|
|
13
|
-
import { type Hook, hookCapability } from "
|
|
14
|
-
import { registerProvider } from "
|
|
15
|
-
import { type Instruction, instructionCapability } from "
|
|
16
|
-
import { type MCPServer, mcpCapability } from "
|
|
17
|
-
import { type Prompt, promptCapability } from "
|
|
18
|
-
import { type Rule, ruleCapability } from "
|
|
19
|
-
import { type Settings, settingsCapability } from "
|
|
20
|
-
import { type Skill, skillCapability } from "
|
|
21
|
-
import { type SlashCommand, slashCommandCapability } from "
|
|
22
|
-
import { type SystemPrompt, systemPromptCapability } from "
|
|
23
|
-
import { type CustomTool, toolCapability } from "
|
|
24
|
-
import type { LoadContext, LoadResult } from "
|
|
25
|
-
import { parseFrontmatter } from "
|
|
9
|
+
import { type ContextFile, contextFileCapability } from "$c/capability/context-file";
|
|
10
|
+
import { type Extension, type ExtensionManifest, extensionCapability } from "$c/capability/extension";
|
|
11
|
+
import { type ExtensionModule, extensionModuleCapability } from "$c/capability/extension-module";
|
|
12
|
+
import { readDirEntries, readFile } from "$c/capability/fs";
|
|
13
|
+
import { type Hook, hookCapability } from "$c/capability/hook";
|
|
14
|
+
import { registerProvider } from "$c/capability/index";
|
|
15
|
+
import { type Instruction, instructionCapability } from "$c/capability/instruction";
|
|
16
|
+
import { type MCPServer, mcpCapability } from "$c/capability/mcp";
|
|
17
|
+
import { type Prompt, promptCapability } from "$c/capability/prompt";
|
|
18
|
+
import { type Rule, ruleCapability } from "$c/capability/rule";
|
|
19
|
+
import { type Settings, settingsCapability } from "$c/capability/settings";
|
|
20
|
+
import { type Skill, skillCapability } from "$c/capability/skill";
|
|
21
|
+
import { type SlashCommand, slashCommandCapability } from "$c/capability/slash-command";
|
|
22
|
+
import { type SystemPrompt, systemPromptCapability } from "$c/capability/system-prompt";
|
|
23
|
+
import { type CustomTool, toolCapability } from "$c/capability/tool";
|
|
24
|
+
import type { LoadContext, LoadResult } from "$c/capability/types";
|
|
25
|
+
import { parseFrontmatter } from "$c/utils/frontmatter";
|
|
26
26
|
import {
|
|
27
27
|
createSourceMeta,
|
|
28
28
|
discoverExtensionModulePaths,
|