@psnext/slingcli 2.4.20260507-2 → 2.4.20260509-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/LICENSE +1 -1
- package/README.md +1 -1
- package/bin/sling.js +56 -14
- package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-agent-core/dist/agent-loop.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-agent-core/dist/agent.js +4 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +526 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js +243 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +616 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +348 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.js +3 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/factory.js +9 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.js +102 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js +194 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.js +92 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.js +42 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.js +31 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +196 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.js +170 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.js +90 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js +258 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/system-prompt.js +30 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js +16 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js +97 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/index.js +26 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-agent-core/dist/proxy.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-agent-core/package.json +7 -5
- package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/cli.js +6 -6
- package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/env-api-keys.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +307 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.js +23 -0
- package/node_modules/@earendil-works/pi-ai/dist/images-api-registry.js +22 -0
- package/node_modules/@earendil-works/pi-ai/dist/images.js +14 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/index.js +4 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/models.generated.js +427 -122
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/openrouter.js +129 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/register-builtins.js +34 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/providers/openai-codex-responses.js +1 -1
- package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/openai-completions.js +150 -122
- package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/providers/openai-responses-shared.js +14 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/openai-codex.js +25 -14
- package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/overflow.js +3 -0
- package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/package.json +5 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/bun/register-bedrock.js +4 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli/args.js +1 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli/config-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli/list-models.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli/session-picker.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/config.js +52 -30
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/agent-session.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/auth-storage.js +2 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/compaction/branch-summarization.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/compaction/compaction.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.js +153 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/template.css +45 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/template.js +68 -4
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/extensions/loader.js +26 -12
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/keybindings.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/model-registry.js +3 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/model-resolver.js +2 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/package-manager.js +22 -5
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/provider-display-names.js +1 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/sdk.js +3 -3
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/bash.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/edit.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/find.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/grep.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/ls.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/read.js +3 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/render-utils.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/truncate.js +205 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/write.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/main.js +2 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/migrations.js +3 -3
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/assistant-message.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/bash-execution.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/bordered-loader.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/branch-summary-message.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/compaction-summary-message.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/config-selector.js +25 -3
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/custom-editor.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/custom-message.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/earendil-announcement.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/extension-editor.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/extension-input.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/extension-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/footer.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/keybinding-hints.js +36 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +4 -3
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/model-selector.js +2 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/oauth-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/scoped-models-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/session-selector-search.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/session-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +4 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/show-images-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/skill-invocation-message.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/theme-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/thinking-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/tree-selector.js +3 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/user-message-selector.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/user-message.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/visual-truncate.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/interactive-mode.js +47 -32
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/theme/dark.json +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/theme/light.json +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/theme/theme.js +1 -1
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/package-manager-cli.js +42 -39
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/clipboard.js +9 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/paths.js +16 -0
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/version-check.js +9 -2
- package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/package.json +9 -8
- package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/image.js +14 -7
- package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/markdown.js +24 -84
- package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/terminal-image.js +10 -4
- package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/tui.js +73 -4
- package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/utils.js +33 -7
- package/node_modules/{@mariozechner → @earendil-works}/pi-tui/package.json +3 -3
- package/node_modules/@mariozechner/clipboard/README.md +58 -0
- package/node_modules/@mariozechner/clipboard/index.d.ts +23 -0
- package/node_modules/@mariozechner/clipboard-linux-x64-gnu/README.md +3 -0
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/http2.d.ts +4 -1
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/node/stream/web.d.ts +4 -0
- package/node_modules/brace-expansion/dist/commonjs/index.js +1 -1
- package/node_modules/brace-expansion/dist/commonjs/index.js.map +1 -1
- package/node_modules/brace-expansion/dist/esm/index.js +1 -1
- package/node_modules/brace-expansion/dist/esm/index.js.map +1 -1
- package/node_modules/brace-expansion/package.json +1 -1
- package/node_modules/fast-xml-builder/CHANGELOG.md +4 -0
- package/node_modules/fast-xml-builder/lib/fxb.cjs +1 -1
- package/node_modules/fast-xml-builder/lib/fxb.d.cts +91 -1
- package/node_modules/fast-xml-builder/lib/fxb.min.js +1 -1
- package/node_modules/fast-xml-builder/lib/fxb.min.js.map +1 -1
- package/node_modules/fast-xml-builder/package.json +3 -2
- package/node_modules/fast-xml-builder/src/fxb.d.ts +92 -3
- package/node_modules/fast-xml-builder/src/fxb.js +92 -31
- package/node_modules/fast-xml-builder/src/orderedJs2Xml.js +87 -33
- package/node_modules/get-east-asian-width/lookup-data.js +15 -12
- package/node_modules/get-east-asian-width/lookup.js +25 -22
- package/node_modules/get-east-asian-width/package.json +1 -1
- package/node_modules/jiti/README.md +258 -0
- package/node_modules/jiti/dist/babel.cjs +257 -0
- package/node_modules/jiti/dist/jiti.cjs +1 -0
- package/node_modules/jiti/lib/jiti.mjs +29 -0
- package/node_modules/jiti/lib/types.d.ts +420 -0
- package/node_modules/jiti/package.json +146 -0
- package/node_modules/protobufjs/dist/light/protobuf.js +5 -3
- package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/protobuf.js +5 -3
- package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/package.json +1 -1
- package/node_modules/protobufjs/src/namespace.js +3 -1
- package/node_modules/semver/README.md +19 -4
- package/node_modules/semver/bin/semver.js +14 -10
- package/node_modules/semver/functions/truncate.js +48 -0
- package/node_modules/semver/index.js +2 -0
- package/node_modules/semver/internal/re.js +1 -1
- package/node_modules/semver/package.json +3 -3
- package/node_modules/semver/range.bnf +5 -4
- package/node_modules/socks/package.json +2 -2
- package/node_modules/strnum/CHANGELOG.md +3 -0
- package/node_modules/strnum/package.json +3 -2
- package/node_modules/strnum/strnum.js +12 -10
- package/node_modules/xml-naming/README.md +189 -0
- package/node_modules/xml-naming/package.json +54 -0
- package/node_modules/xml-naming/src/index.d.ts +74 -0
- package/node_modules/xml-naming/src/index.js +270 -0
- package/package.json +6 -6
- package/sling-default-packages.json +2 -1
- package/slingshot/index.js +442 -23
- package/node_modules/@mariozechner/jiti/dist/babel.cjs +0 -246
- package/node_modules/@mariozechner/jiti/dist/jiti.cjs +0 -1
- package/node_modules/@mariozechner/jiti/package.json +0 -96
- package/node_modules/@mariozechner/pi-agent-core/dist/index.js +0 -9
- package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/cli.js +0 -116
- package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/env-api-keys.js +0 -166
- package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/index.js +0 -15
- package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/models.generated.js +0 -16568
- package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/providers/amazon-bedrock.js +0 -753
- package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/providers/openai-codex-responses.js +0 -909
- package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/providers/openai-responses-shared.js +0 -479
- package/node_modules/@mariozechner/pi-agent-core/node_modules/@mariozechner/pi-ai/dist/utils/oauth/openai-codex.js +0 -374
- package/node_modules/@mariozechner/pi-ai/dist/api-registry.js +0 -44
- package/node_modules/@mariozechner/pi-ai/dist/bedrock-provider.js +0 -6
- package/node_modules/@mariozechner/pi-ai/dist/models.js +0 -71
- package/node_modules/@mariozechner/pi-ai/dist/oauth.js +0 -2
- package/node_modules/@mariozechner/pi-ai/dist/providers/anthropic.js +0 -951
- package/node_modules/@mariozechner/pi-ai/dist/providers/azure-openai-responses.js +0 -208
- package/node_modules/@mariozechner/pi-ai/dist/providers/cloudflare.js +0 -26
- package/node_modules/@mariozechner/pi-ai/dist/providers/faux.js +0 -368
- package/node_modules/@mariozechner/pi-ai/dist/providers/github-copilot-headers.js +0 -29
- package/node_modules/@mariozechner/pi-ai/dist/providers/google-shared.js +0 -329
- package/node_modules/@mariozechner/pi-ai/dist/providers/google-vertex.js +0 -442
- package/node_modules/@mariozechner/pi-ai/dist/providers/google.js +0 -400
- package/node_modules/@mariozechner/pi-ai/dist/providers/mistral.js +0 -535
- package/node_modules/@mariozechner/pi-ai/dist/providers/openai-completions.js +0 -908
- package/node_modules/@mariozechner/pi-ai/dist/providers/openai-responses.js +0 -220
- package/node_modules/@mariozechner/pi-ai/dist/providers/register-builtins.js +0 -243
- package/node_modules/@mariozechner/pi-ai/dist/providers/simple-options.js +0 -39
- package/node_modules/@mariozechner/pi-ai/dist/providers/transform-messages.js +0 -184
- package/node_modules/@mariozechner/pi-ai/dist/stream.js +0 -27
- package/node_modules/@mariozechner/pi-ai/dist/types.js +0 -2
- package/node_modules/@mariozechner/pi-ai/dist/utils/event-stream.js +0 -81
- package/node_modules/@mariozechner/pi-ai/dist/utils/hash.js +0 -14
- package/node_modules/@mariozechner/pi-ai/dist/utils/headers.js +0 -8
- package/node_modules/@mariozechner/pi-ai/dist/utils/json-parse.js +0 -113
- package/node_modules/@mariozechner/pi-ai/dist/utils/oauth/anthropic.js +0 -335
- package/node_modules/@mariozechner/pi-ai/dist/utils/oauth/github-copilot.js +0 -292
- package/node_modules/@mariozechner/pi-ai/dist/utils/oauth/index.js +0 -121
- package/node_modules/@mariozechner/pi-ai/dist/utils/oauth/oauth-page.js +0 -105
- package/node_modules/@mariozechner/pi-ai/dist/utils/oauth/pkce.js +0 -31
- package/node_modules/@mariozechner/pi-ai/dist/utils/oauth/types.js +0 -2
- package/node_modules/@mariozechner/pi-ai/dist/utils/overflow.js +0 -146
- package/node_modules/@mariozechner/pi-ai/dist/utils/sanitize-unicode.js +0 -26
- package/node_modules/@mariozechner/pi-ai/dist/utils/typebox-helpers.js +0 -21
- package/node_modules/@mariozechner/pi-ai/dist/utils/validation.js +0 -281
- package/node_modules/@mariozechner/pi-ai/package.json +0 -108
- package/node_modules/@mariozechner/pi-coding-agent/dist/bun/register-bedrock.js +0 -4
- package/node_modules/@mariozechner/pi-coding-agent/dist/modes/interactive/components/keybinding-hints.js +0 -22
- package/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-agent-core/dist/agent-loop.js +0 -458
- package/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-agent-core/dist/agent.js +0 -398
- package/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-agent-core/dist/index.js +0 -9
- package/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-agent-core/dist/proxy.js +0 -278
- package/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-agent-core/dist/types.js +0 -2
- package/node_modules/@mariozechner/pi-coding-agent/node_modules/@mariozechner/pi-agent-core/package.json +0 -45
- package/node_modules/socks/.claude/settings.local.json +0 -26
- package/node_modules/std-env/LICENCE +0 -22
- package/node_modules/std-env/README.md +0 -118
- package/node_modules/std-env/dist/index.cjs +0 -1
- package/node_modules/std-env/dist/index.d.cts +0 -92
- package/node_modules/std-env/dist/index.d.mts +0 -92
- package/node_modules/std-env/dist/index.d.ts +0 -92
- package/node_modules/std-env/dist/index.mjs +0 -1
- package/node_modules/std-env/package.json +0 -46
- package/node_modules/yoctocolors/base.d.ts +0 -47
- package/node_modules/yoctocolors/base.js +0 -94
- package/node_modules/yoctocolors/index.d.ts +0 -2
- package/node_modules/yoctocolors/index.js +0 -2
- package/node_modules/yoctocolors/license +0 -9
- package/node_modules/yoctocolors/package.json +0 -69
- package/node_modules/yoctocolors/readme.md +0 -138
- /package/node_modules/{@mariozechner/pi-coding-agent/dist/core → @earendil-works/pi-agent-core/dist/harness}/compaction/utils.js +0 -0
- /package/node_modules/{@mariozechner/pi-coding-agent/dist/core/tools → @earendil-works/pi-agent-core/dist/harness/utils}/truncate.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-agent-core/dist/types.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/api-registry.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/bedrock-provider.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/models.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/oauth.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/providers/amazon-bedrock.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/anthropic.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/azure-openai-responses.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/cloudflare.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/faux.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/github-copilot-headers.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/google-shared.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/google-vertex.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/google.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/mistral.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/openai-responses.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/register-builtins.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/simple-options.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/providers/transform-messages.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/session-resources.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/stream.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/types.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-ai/dist/utils/diagnostics.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/event-stream.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/hash.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/headers.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/json-parse.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/anthropic.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/github-copilot.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/index.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/oauth-page.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/pkce.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/oauth/types.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/sanitize-unicode.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/typebox-helpers.js +0 -0
- /package/node_modules/{@mariozechner/pi-agent-core/node_modules/@mariozechner → @earendil-works}/pi-ai/dist/utils/validation.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/bun/cli.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/bun/restore-sandbox-env.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli/file-processor.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli/initial-message.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/cli.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/agent-session-runtime.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/agent-session-services.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/auth-guidance.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/bash-executor.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/compaction/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/defaults.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/diagnostics.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/event-bus.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/exec.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/ansi-to-html.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/template.html +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/tool-renderer.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/vendor/highlight.min.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/export-html/vendor/marked.min.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/extensions/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/extensions/runner.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/extensions/types.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/extensions/wrapper.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/footer-data-provider.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/messages.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/output-guard.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/prompt-templates.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/resolve-config-value.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/resource-loader.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/session-cwd.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/session-manager.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/settings-manager.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/skills.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/slash-commands.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/source-info.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/system-prompt.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/telemetry.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/timings.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/edit-diff.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/file-mutation-queue.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/output-accumulator.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/path-utils.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/tool-definition-wrapper.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/assets/clankolas.png +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/armin.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/countdown-timer.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/daxnuts.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/diff.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/dynamic-border.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/components/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/interactive/theme/theme-schema.json +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/print-mode.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/rpc/jsonl.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/rpc/rpc-client.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/rpc/rpc-mode.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/modes/rpc/rpc-types.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/changelog.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/child-process.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/clipboard-image.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/clipboard-native.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/exif-orientation.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/frontmatter.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/fs-watch.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/git.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/image-convert.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/image-resize.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/mime.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/photon.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/pi-user-agent.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/shell.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/sleep.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/utils/tools-manager.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/autocomplete.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/box.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/cancellable-loader.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/editor.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/input.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/loader.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/select-list.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/settings-list.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/spacer.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/text.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/components/truncated-text.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/editor-component.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/fuzzy.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/index.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/keybindings.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/keys.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/kill-ring.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/stdin-buffer.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/terminal.js +0 -0
- /package/node_modules/{@mariozechner → @earendil-works}/pi-tui/dist/undo-stack.js +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/LICENSE +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti-cli.mjs +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti-hooks.mjs +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti-native.mjs +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti-register.d.mts +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti-register.mjs +0 -0
- /package/node_modules/{@mariozechner/jiti/lib/jiti.mjs → jiti/lib/jiti-static.mjs} +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti.cjs +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti.d.cts +0 -0
- /package/node_modules/{@mariozechner/jiti → jiti}/lib/jiti.d.mts +0 -0
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Extension loader - loads TypeScript extension modules using jiti.
|
|
3
3
|
*
|
|
4
|
-
* Uses @mariozechner/jiti fork with virtualModules support for compiled Bun binaries.
|
|
5
4
|
*/
|
|
6
5
|
import * as fs from "node:fs";
|
|
7
6
|
import { createRequire } from "node:module";
|
|
8
7
|
import * as os from "node:os";
|
|
9
8
|
import * as path from "node:path";
|
|
10
9
|
import { fileURLToPath } from "node:url";
|
|
11
|
-
import
|
|
12
|
-
import * as
|
|
13
|
-
import * as
|
|
14
|
-
import * as
|
|
15
|
-
import
|
|
10
|
+
import * as _bundledPiAgentCore from "@earendil-works/pi-agent-core";
|
|
11
|
+
import * as _bundledPiAi from "@earendil-works/pi-ai";
|
|
12
|
+
import * as _bundledPiAiOauth from "@earendil-works/pi-ai/oauth";
|
|
13
|
+
import * as _bundledPiTui from "@earendil-works/pi-tui";
|
|
14
|
+
import { createJiti } from "jiti/static";
|
|
16
15
|
// Static imports of packages that extensions may use.
|
|
17
16
|
// These MUST be static so Bun bundles them into the compiled binary.
|
|
18
17
|
// The virtualModules option then makes them available to extensions.
|
|
@@ -21,7 +20,7 @@ import * as _bundledTypeboxCompile from "typebox/compile";
|
|
|
21
20
|
import * as _bundledTypeboxValue from "typebox/value";
|
|
22
21
|
import { CONFIG_DIR_NAME, getAgentDir, isBunBinary } from "../../config.js";
|
|
23
22
|
// NOTE: This import works because loader.ts exports are NOT re-exported from index.ts,
|
|
24
|
-
// avoiding a circular dependency. Extensions can import from @
|
|
23
|
+
// avoiding a circular dependency. Extensions can import from @earendil-works/pi-coding-agent.
|
|
25
24
|
import * as _bundledPiCodingAgent from "../../index.js";
|
|
26
25
|
import { createEventBus } from "../event-bus.js";
|
|
27
26
|
import { execCommand } from "../exec.js";
|
|
@@ -34,6 +33,11 @@ const VIRTUAL_MODULES = {
|
|
|
34
33
|
"@sinclair/typebox": _bundledTypebox,
|
|
35
34
|
"@sinclair/typebox/compile": _bundledTypeboxCompile,
|
|
36
35
|
"@sinclair/typebox/value": _bundledTypeboxValue,
|
|
36
|
+
"@earendil-works/pi-agent-core": _bundledPiAgentCore,
|
|
37
|
+
"@earendil-works/pi-tui": _bundledPiTui,
|
|
38
|
+
"@earendil-works/pi-ai": _bundledPiAi,
|
|
39
|
+
"@earendil-works/pi-ai/oauth": _bundledPiAiOauth,
|
|
40
|
+
"@earendil-works/pi-coding-agent": _bundledPiCodingAgent,
|
|
37
41
|
"@mariozechner/pi-agent-core": _bundledPiAgentCore,
|
|
38
42
|
"@mariozechner/pi-tui": _bundledPiTui,
|
|
39
43
|
"@mariozechner/pi-ai": _bundledPiAi,
|
|
@@ -62,12 +66,22 @@ function getAliases() {
|
|
|
62
66
|
}
|
|
63
67
|
return fileURLToPath(import.meta.resolve(specifier));
|
|
64
68
|
};
|
|
69
|
+
const piCodingAgentEntry = packageIndex;
|
|
70
|
+
const piAgentCoreEntry = resolveWorkspaceOrImport("agent/dist/index.js", "@earendil-works/pi-agent-core");
|
|
71
|
+
const piTuiEntry = resolveWorkspaceOrImport("tui/dist/index.js", "@earendil-works/pi-tui");
|
|
72
|
+
const piAiEntry = resolveWorkspaceOrImport("ai/dist/index.js", "@earendil-works/pi-ai");
|
|
73
|
+
const piAiOauthEntry = resolveWorkspaceOrImport("ai/dist/oauth.js", "@earendil-works/pi-ai/oauth");
|
|
65
74
|
_aliases = {
|
|
66
|
-
"@
|
|
67
|
-
"@
|
|
68
|
-
"@
|
|
69
|
-
"@
|
|
70
|
-
"@
|
|
75
|
+
"@earendil-works/pi-coding-agent": piCodingAgentEntry,
|
|
76
|
+
"@earendil-works/pi-agent-core": piAgentCoreEntry,
|
|
77
|
+
"@earendil-works/pi-tui": piTuiEntry,
|
|
78
|
+
"@earendil-works/pi-ai": piAiEntry,
|
|
79
|
+
"@earendil-works/pi-ai/oauth": piAiOauthEntry,
|
|
80
|
+
"@mariozechner/pi-coding-agent": piCodingAgentEntry,
|
|
81
|
+
"@mariozechner/pi-agent-core": piAgentCoreEntry,
|
|
82
|
+
"@mariozechner/pi-tui": piTuiEntry,
|
|
83
|
+
"@mariozechner/pi-ai": piAiEntry,
|
|
84
|
+
"@mariozechner/pi-ai/oauth": piAiOauthEntry,
|
|
71
85
|
typebox: typeboxEntry,
|
|
72
86
|
"typebox/compile": typeboxCompileEntry,
|
|
73
87
|
"typebox/value": typeboxValueEntry,
|
package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/keybindings.js
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TUI_KEYBINDINGS, KeybindingsManager as TuiKeybindingsManager, } from "@
|
|
1
|
+
import { TUI_KEYBINDINGS, KeybindingsManager as TuiKeybindingsManager, } from "@earendil-works/pi-tui";
|
|
2
2
|
import { existsSync, readFileSync } from "fs";
|
|
3
3
|
import { join } from "path";
|
|
4
4
|
import { getAgentDir } from "../config.js";
|
package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/model-registry.js
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Model registry - manages built-in and custom models, provides API key resolution.
|
|
3
3
|
*/
|
|
4
|
-
import { getModels, getProviders, registerApiProvider, resetApiProviders, } from "@
|
|
5
|
-
import { registerOAuthProvider, resetOAuthProviders } from "@
|
|
4
|
+
import { getModels, getProviders, registerApiProvider, resetApiProviders, } from "@earendil-works/pi-ai";
|
|
5
|
+
import { registerOAuthProvider, resetOAuthProviders } from "@earendil-works/pi-ai/oauth";
|
|
6
6
|
import { existsSync, readFileSync } from "fs";
|
|
7
7
|
import { join } from "path";
|
|
8
8
|
import { Type } from "typebox";
|
|
@@ -72,6 +72,7 @@ const OpenAICompletionsCompatSchema = Type.Object({
|
|
|
72
72
|
thinkingFormat: Type.Optional(Type.Union([
|
|
73
73
|
Type.Literal("openai"),
|
|
74
74
|
Type.Literal("openrouter"),
|
|
75
|
+
Type.Literal("together"),
|
|
75
76
|
Type.Literal("deepseek"),
|
|
76
77
|
Type.Literal("zai"),
|
|
77
78
|
Type.Literal("qwen"),
|
package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/model-resolver.js
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Model resolution, scoping, and initial selection
|
|
3
3
|
*/
|
|
4
|
-
import { modelsAreEqual } from "@
|
|
4
|
+
import { modelsAreEqual } from "@earendil-works/pi-ai";
|
|
5
5
|
import chalk from "chalk";
|
|
6
6
|
import { minimatch } from "minimatch";
|
|
7
7
|
import { isValidThinkingLevel } from "../cli/args.js";
|
|
@@ -30,6 +30,7 @@ export const defaultModelPerProvider = {
|
|
|
30
30
|
"moonshotai-cn": "kimi-k2.6",
|
|
31
31
|
huggingface: "moonshotai/Kimi-K2.6",
|
|
32
32
|
fireworks: "accounts/fireworks/models/kimi-k2p6",
|
|
33
|
+
together: "moonshotai/Kimi-K2.6",
|
|
33
34
|
opencode: "kimi-k2.6",
|
|
34
35
|
"opencode-go": "kimi-k2.6",
|
|
35
36
|
"kimi-coding": "kimi-for-coding",
|
package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/package-manager.js
RENAMED
|
@@ -1787,15 +1787,32 @@ export class DefaultPackageManager {
|
|
|
1787
1787
|
this.addResource(target, path, metadata, enabled);
|
|
1788
1788
|
}
|
|
1789
1789
|
};
|
|
1790
|
+
// Project extensions from .pi/
|
|
1790
1791
|
addResources("extensions", collectAutoExtensionEntries(projectDirs.extensions), projectMetadata, projectOverrides.extensions, projectBaseDir);
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1792
|
+
// Project skills from .pi/
|
|
1793
|
+
addResources("skills", collectAutoSkillEntries(projectDirs.skills, "pi"), projectMetadata, projectOverrides.skills, projectBaseDir);
|
|
1794
|
+
// Project skills from .agents/ (each with its own baseDir)
|
|
1795
|
+
for (const agentsSkillsDir of projectAgentsSkillDirs) {
|
|
1796
|
+
const agentsBaseDir = dirname(agentsSkillsDir); // the .agents directory
|
|
1797
|
+
const agentsMetadata = {
|
|
1798
|
+
...projectMetadata,
|
|
1799
|
+
baseDir: agentsBaseDir,
|
|
1800
|
+
};
|
|
1801
|
+
addResources("skills", collectAutoSkillEntries(agentsSkillsDir, "agents"), agentsMetadata, projectOverrides.skills, agentsBaseDir);
|
|
1802
|
+
}
|
|
1795
1803
|
addResources("prompts", collectAutoPromptEntries(projectDirs.prompts), projectMetadata, projectOverrides.prompts, projectBaseDir);
|
|
1796
1804
|
addResources("themes", collectAutoThemeEntries(projectDirs.themes), projectMetadata, projectOverrides.themes, projectBaseDir);
|
|
1805
|
+
// User extensions from ~/.pi/agent/
|
|
1797
1806
|
addResources("extensions", collectAutoExtensionEntries(userDirs.extensions), userMetadata, userOverrides.extensions, globalBaseDir);
|
|
1798
|
-
|
|
1807
|
+
// User skills from ~/.pi/agent/
|
|
1808
|
+
addResources("skills", collectAutoSkillEntries(userDirs.skills, "pi"), userMetadata, userOverrides.skills, globalBaseDir);
|
|
1809
|
+
// User skills from ~/.agents/ (with its own baseDir)
|
|
1810
|
+
const userAgentsBaseDir = dirname(userAgentsSkillsDir);
|
|
1811
|
+
const userAgentsMetadata = {
|
|
1812
|
+
...userMetadata,
|
|
1813
|
+
baseDir: userAgentsBaseDir,
|
|
1814
|
+
};
|
|
1815
|
+
addResources("skills", collectAutoSkillEntries(userAgentsSkillsDir, "agents"), userAgentsMetadata, userOverrides.skills, userAgentsBaseDir);
|
|
1799
1816
|
addResources("prompts", collectAutoPromptEntries(userDirs.prompts), userMetadata, userOverrides.prompts, globalBaseDir);
|
|
1800
1817
|
addResources("themes", collectAutoThemeEntries(userDirs.themes), userMetadata, userOverrides.themes, globalBaseDir);
|
|
1801
1818
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
|
-
import { Agent } from "@
|
|
3
|
-
import { clampThinkingLevel, streamSimple } from "@
|
|
2
|
+
import { Agent } from "@earendil-works/pi-agent-core";
|
|
3
|
+
import { clampThinkingLevel, streamSimple } from "@earendil-works/pi-ai";
|
|
4
4
|
import { getAgentDir } from "../config.js";
|
|
5
5
|
import { AgentSession } from "./agent-session.js";
|
|
6
6
|
import { formatNoModelsAvailableMessage } from "./auth-guidance.js";
|
|
@@ -54,7 +54,7 @@ function getAttributionHeaders(model, settingsManager) {
|
|
|
54
54
|
* const { session } = await createAgentSession();
|
|
55
55
|
*
|
|
56
56
|
* // With explicit model
|
|
57
|
-
* import { getModel } from '@
|
|
57
|
+
* import { getModel } from '@earendil-works/pi-ai';
|
|
58
58
|
* const { session } = await createAgentSession({
|
|
59
59
|
* model: getModel('anthropic', 'claude-opus-4-5'),
|
|
60
60
|
* thinkingLevel: 'high',
|
package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/bash.js
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
|
-
import { Container, Text, truncateToWidth } from "@
|
|
2
|
+
import { Container, Text, truncateToWidth } from "@earendil-works/pi-tui";
|
|
3
3
|
import { spawn } from "child_process";
|
|
4
4
|
import { Type } from "typebox";
|
|
5
5
|
import { keyHint } from "../../modes/interactive/components/keybinding-hints.js";
|
package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/edit.js
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Box, Container, Spacer, Text } from "@
|
|
1
|
+
import { Box, Container, Spacer, Text } from "@earendil-works/pi-tui";
|
|
2
2
|
import { constants } from "fs";
|
|
3
3
|
import { access as fsAccess, readFile as fsReadFile, writeFile as fsWriteFile } from "fs/promises";
|
|
4
4
|
import { Type } from "typebox";
|
package/node_modules/{@mariozechner → @earendil-works}/pi-coding-agent/dist/core/tools/read.js
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { basename, dirname, isAbsolute, relative, resolve as resolvePath, sep } from "node:path";
|
|
2
|
-
import { Text } from "@
|
|
2
|
+
import { Text } from "@earendil-works/pi-tui";
|
|
3
3
|
import { constants } from "fs";
|
|
4
4
|
import { access as fsAccess, readFile as fsReadFile } from "fs/promises";
|
|
5
5
|
import { Type } from "typebox";
|
|
@@ -8,6 +8,7 @@ import { keyHint, keyText } from "../../modes/interactive/components/keybinding-
|
|
|
8
8
|
import { getLanguageFromPath, highlightCode } from "../../modes/interactive/theme/theme.js";
|
|
9
9
|
import { formatDimensionNote, resizeImage } from "../../utils/image-resize.js";
|
|
10
10
|
import { detectSupportedImageMimeTypeFromFile } from "../../utils/mime.js";
|
|
11
|
+
import { formatPathRelativeToCwdOrAbsolute } from "../../utils/paths.js";
|
|
11
12
|
import { resolveReadPath } from "./path-utils.js";
|
|
12
13
|
import { getTextOutput, invalidArgText, replaceTabs, shortenPath, str } from "./render-utils.js";
|
|
13
14
|
import { wrapToolDefinition } from "./tool-definition-wrapper.js";
|
|
@@ -81,7 +82,7 @@ function getCompactReadClassification(args, cwd) {
|
|
|
81
82
|
if (docsClassification)
|
|
82
83
|
return docsClassification;
|
|
83
84
|
if (COMPACT_RESOURCE_FILE_NAMES.has(fileName)) {
|
|
84
|
-
return { kind: "resource", label:
|
|
85
|
+
return { kind: "resource", label: formatPathRelativeToCwdOrAbsolute(absolutePath, cwd) };
|
|
85
86
|
}
|
|
86
87
|
return undefined;
|
|
87
88
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as os from "node:os";
|
|
2
|
-
import { getCapabilities, getImageDimensions, imageFallback } from "@
|
|
2
|
+
import { getCapabilities, getImageDimensions, imageFallback } from "@earendil-works/pi-tui";
|
|
3
3
|
import stripAnsi from "strip-ansi";
|
|
4
4
|
import { sanitizeBinaryOutput } from "../../utils/shell.js";
|
|
5
5
|
export function shortenPath(path) {
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared truncation utilities for tool outputs.
|
|
3
|
+
*
|
|
4
|
+
* Truncation is based on two independent limits - whichever is hit first wins:
|
|
5
|
+
* - Line limit (default: 2000 lines)
|
|
6
|
+
* - Byte limit (default: 50KB)
|
|
7
|
+
*
|
|
8
|
+
* Never returns partial lines (except bash tail truncation edge case).
|
|
9
|
+
*/
|
|
10
|
+
export const DEFAULT_MAX_LINES = 2000;
|
|
11
|
+
export const DEFAULT_MAX_BYTES = 50 * 1024; // 50KB
|
|
12
|
+
export const GREP_MAX_LINE_LENGTH = 500; // Max chars per grep match line
|
|
13
|
+
/**
|
|
14
|
+
* Format bytes as human-readable size.
|
|
15
|
+
*/
|
|
16
|
+
export function formatSize(bytes) {
|
|
17
|
+
if (bytes < 1024) {
|
|
18
|
+
return `${bytes}B`;
|
|
19
|
+
}
|
|
20
|
+
else if (bytes < 1024 * 1024) {
|
|
21
|
+
return `${(bytes / 1024).toFixed(1)}KB`;
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
return `${(bytes / (1024 * 1024)).toFixed(1)}MB`;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Truncate content from the head (keep first N lines/bytes).
|
|
29
|
+
* Suitable for file reads where you want to see the beginning.
|
|
30
|
+
*
|
|
31
|
+
* Never returns partial lines. If first line exceeds byte limit,
|
|
32
|
+
* returns empty content with firstLineExceedsLimit=true.
|
|
33
|
+
*/
|
|
34
|
+
export function truncateHead(content, options = {}) {
|
|
35
|
+
const maxLines = options.maxLines ?? DEFAULT_MAX_LINES;
|
|
36
|
+
const maxBytes = options.maxBytes ?? DEFAULT_MAX_BYTES;
|
|
37
|
+
const totalBytes = Buffer.byteLength(content, "utf-8");
|
|
38
|
+
const lines = content.split("\n");
|
|
39
|
+
const totalLines = lines.length;
|
|
40
|
+
// Check if no truncation needed
|
|
41
|
+
if (totalLines <= maxLines && totalBytes <= maxBytes) {
|
|
42
|
+
return {
|
|
43
|
+
content,
|
|
44
|
+
truncated: false,
|
|
45
|
+
truncatedBy: null,
|
|
46
|
+
totalLines,
|
|
47
|
+
totalBytes,
|
|
48
|
+
outputLines: totalLines,
|
|
49
|
+
outputBytes: totalBytes,
|
|
50
|
+
lastLinePartial: false,
|
|
51
|
+
firstLineExceedsLimit: false,
|
|
52
|
+
maxLines,
|
|
53
|
+
maxBytes,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
// Check if first line alone exceeds byte limit
|
|
57
|
+
const firstLineBytes = Buffer.byteLength(lines[0], "utf-8");
|
|
58
|
+
if (firstLineBytes > maxBytes) {
|
|
59
|
+
return {
|
|
60
|
+
content: "",
|
|
61
|
+
truncated: true,
|
|
62
|
+
truncatedBy: "bytes",
|
|
63
|
+
totalLines,
|
|
64
|
+
totalBytes,
|
|
65
|
+
outputLines: 0,
|
|
66
|
+
outputBytes: 0,
|
|
67
|
+
lastLinePartial: false,
|
|
68
|
+
firstLineExceedsLimit: true,
|
|
69
|
+
maxLines,
|
|
70
|
+
maxBytes,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
// Collect complete lines that fit
|
|
74
|
+
const outputLinesArr = [];
|
|
75
|
+
let outputBytesCount = 0;
|
|
76
|
+
let truncatedBy = "lines";
|
|
77
|
+
for (let i = 0; i < lines.length && i < maxLines; i++) {
|
|
78
|
+
const line = lines[i];
|
|
79
|
+
const lineBytes = Buffer.byteLength(line, "utf-8") + (i > 0 ? 1 : 0); // +1 for newline
|
|
80
|
+
if (outputBytesCount + lineBytes > maxBytes) {
|
|
81
|
+
truncatedBy = "bytes";
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
outputLinesArr.push(line);
|
|
85
|
+
outputBytesCount += lineBytes;
|
|
86
|
+
}
|
|
87
|
+
// If we exited due to line limit
|
|
88
|
+
if (outputLinesArr.length >= maxLines && outputBytesCount <= maxBytes) {
|
|
89
|
+
truncatedBy = "lines";
|
|
90
|
+
}
|
|
91
|
+
const outputContent = outputLinesArr.join("\n");
|
|
92
|
+
const finalOutputBytes = Buffer.byteLength(outputContent, "utf-8");
|
|
93
|
+
return {
|
|
94
|
+
content: outputContent,
|
|
95
|
+
truncated: true,
|
|
96
|
+
truncatedBy,
|
|
97
|
+
totalLines,
|
|
98
|
+
totalBytes,
|
|
99
|
+
outputLines: outputLinesArr.length,
|
|
100
|
+
outputBytes: finalOutputBytes,
|
|
101
|
+
lastLinePartial: false,
|
|
102
|
+
firstLineExceedsLimit: false,
|
|
103
|
+
maxLines,
|
|
104
|
+
maxBytes,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Truncate content from the tail (keep last N lines/bytes).
|
|
109
|
+
* Suitable for bash output where you want to see the end (errors, final results).
|
|
110
|
+
*
|
|
111
|
+
* May return partial first line if the last line of original content exceeds byte limit.
|
|
112
|
+
*/
|
|
113
|
+
export function truncateTail(content, options = {}) {
|
|
114
|
+
const maxLines = options.maxLines ?? DEFAULT_MAX_LINES;
|
|
115
|
+
const maxBytes = options.maxBytes ?? DEFAULT_MAX_BYTES;
|
|
116
|
+
const totalBytes = Buffer.byteLength(content, "utf-8");
|
|
117
|
+
const lines = content.split("\n");
|
|
118
|
+
const totalLines = lines.length;
|
|
119
|
+
// Check if no truncation needed
|
|
120
|
+
if (totalLines <= maxLines && totalBytes <= maxBytes) {
|
|
121
|
+
return {
|
|
122
|
+
content,
|
|
123
|
+
truncated: false,
|
|
124
|
+
truncatedBy: null,
|
|
125
|
+
totalLines,
|
|
126
|
+
totalBytes,
|
|
127
|
+
outputLines: totalLines,
|
|
128
|
+
outputBytes: totalBytes,
|
|
129
|
+
lastLinePartial: false,
|
|
130
|
+
firstLineExceedsLimit: false,
|
|
131
|
+
maxLines,
|
|
132
|
+
maxBytes,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
// Work backwards from the end
|
|
136
|
+
const outputLinesArr = [];
|
|
137
|
+
let outputBytesCount = 0;
|
|
138
|
+
let truncatedBy = "lines";
|
|
139
|
+
let lastLinePartial = false;
|
|
140
|
+
for (let i = lines.length - 1; i >= 0 && outputLinesArr.length < maxLines; i--) {
|
|
141
|
+
const line = lines[i];
|
|
142
|
+
const lineBytes = Buffer.byteLength(line, "utf-8") + (outputLinesArr.length > 0 ? 1 : 0); // +1 for newline
|
|
143
|
+
if (outputBytesCount + lineBytes > maxBytes) {
|
|
144
|
+
truncatedBy = "bytes";
|
|
145
|
+
// Edge case: if we haven't added ANY lines yet and this line exceeds maxBytes,
|
|
146
|
+
// take the end of the line (partial)
|
|
147
|
+
if (outputLinesArr.length === 0) {
|
|
148
|
+
const truncatedLine = truncateStringToBytesFromEnd(line, maxBytes);
|
|
149
|
+
outputLinesArr.unshift(truncatedLine);
|
|
150
|
+
outputBytesCount = Buffer.byteLength(truncatedLine, "utf-8");
|
|
151
|
+
lastLinePartial = true;
|
|
152
|
+
}
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
outputLinesArr.unshift(line);
|
|
156
|
+
outputBytesCount += lineBytes;
|
|
157
|
+
}
|
|
158
|
+
// If we exited due to line limit
|
|
159
|
+
if (outputLinesArr.length >= maxLines && outputBytesCount <= maxBytes) {
|
|
160
|
+
truncatedBy = "lines";
|
|
161
|
+
}
|
|
162
|
+
const outputContent = outputLinesArr.join("\n");
|
|
163
|
+
const finalOutputBytes = Buffer.byteLength(outputContent, "utf-8");
|
|
164
|
+
return {
|
|
165
|
+
content: outputContent,
|
|
166
|
+
truncated: true,
|
|
167
|
+
truncatedBy,
|
|
168
|
+
totalLines,
|
|
169
|
+
totalBytes,
|
|
170
|
+
outputLines: outputLinesArr.length,
|
|
171
|
+
outputBytes: finalOutputBytes,
|
|
172
|
+
lastLinePartial,
|
|
173
|
+
firstLineExceedsLimit: false,
|
|
174
|
+
maxLines,
|
|
175
|
+
maxBytes,
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Truncate a string to fit within a byte limit (from the end).
|
|
180
|
+
* Handles multi-byte UTF-8 characters correctly.
|
|
181
|
+
*/
|
|
182
|
+
function truncateStringToBytesFromEnd(str, maxBytes) {
|
|
183
|
+
const buf = Buffer.from(str, "utf-8");
|
|
184
|
+
if (buf.length <= maxBytes) {
|
|
185
|
+
return str;
|
|
186
|
+
}
|
|
187
|
+
// Start from the end, skip maxBytes back
|
|
188
|
+
let start = buf.length - maxBytes;
|
|
189
|
+
// Find a valid UTF-8 boundary (start of a character)
|
|
190
|
+
while (start < buf.length && (buf[start] & 0xc0) === 0x80) {
|
|
191
|
+
start++;
|
|
192
|
+
}
|
|
193
|
+
return buf.slice(start).toString("utf-8");
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Truncate a single line to max characters, adding [truncated] suffix.
|
|
197
|
+
* Used for grep match lines.
|
|
198
|
+
*/
|
|
199
|
+
export function truncateLine(line, maxChars = GREP_MAX_LINE_LENGTH) {
|
|
200
|
+
if (line.length <= maxChars) {
|
|
201
|
+
return { text: line, wasTruncated: false };
|
|
202
|
+
}
|
|
203
|
+
return { text: `${line.slice(0, maxChars)}... [truncated]`, wasTruncated: true };
|
|
204
|
+
}
|
|
205
|
+
//# sourceMappingURL=truncate.js.map
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { resolve } from "node:path";
|
|
8
8
|
import { createInterface } from "node:readline";
|
|
9
|
-
import { modelsAreEqual } from "@
|
|
10
|
-
import { ProcessTerminal, setKeybindings, TUI } from "@
|
|
9
|
+
import { modelsAreEqual } from "@earendil-works/pi-ai";
|
|
10
|
+
import { ProcessTerminal, setKeybindings, TUI } from "@earendil-works/pi-tui";
|
|
11
11
|
import chalk from "chalk";
|
|
12
12
|
import { parseArgs, printHelp } from "./cli/args.js";
|
|
13
13
|
import { processFileArguments } from "./cli/file-processor.js";
|
|
@@ -6,8 +6,8 @@ import { existsSync, mkdirSync, readdirSync, readFileSync, renameSync, rmSync, w
|
|
|
6
6
|
import { dirname, join } from "path";
|
|
7
7
|
import { CONFIG_DIR_NAME, getAgentDir, getBinDir } from "./config.js";
|
|
8
8
|
import { migrateKeybindingsConfig } from "./core/keybindings.js";
|
|
9
|
-
const MIGRATION_GUIDE_URL = "https://github.com/
|
|
10
|
-
const EXTENSIONS_DOC_URL = "https://github.com/
|
|
9
|
+
const MIGRATION_GUIDE_URL = "https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/CHANGELOG.md#extensions-migration";
|
|
10
|
+
const EXTENSIONS_DOC_URL = "https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/docs/extensions.md";
|
|
11
11
|
/**
|
|
12
12
|
* Migrate legacy oauth.json and settings.json apiKeys to auth.json.
|
|
13
13
|
*
|
|
@@ -70,7 +70,7 @@ export function migrateAuthToAuthJson() {
|
|
|
70
70
|
* ~/.pi/agent/sessions/<encoded-cwd>/. This migration moves them
|
|
71
71
|
* to the correct location based on the cwd in their session header.
|
|
72
72
|
*
|
|
73
|
-
* See: https://github.com/
|
|
73
|
+
* See: https://github.com/earendil-works/pi-mono/issues/320
|
|
74
74
|
*/
|
|
75
75
|
export function migrateSessionsFromAgentRoot() {
|
|
76
76
|
const agentDir = getAgentDir();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Container, Markdown, Spacer, Text } from "@
|
|
1
|
+
import { Container, Markdown, Spacer, Text } from "@earendil-works/pi-tui";
|
|
2
2
|
import { getMarkdownTheme, theme } from "../theme/theme.js";
|
|
3
3
|
const OSC133_ZONE_START = "\x1b]133;A\x07";
|
|
4
4
|
const OSC133_ZONE_END = "\x1b]133;B\x07";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Component for displaying bash command execution with streaming output.
|
|
3
3
|
*/
|
|
4
|
-
import { Container, Loader, Spacer, Text } from "@
|
|
4
|
+
import { Container, Loader, Spacer, Text } from "@earendil-works/pi-tui";
|
|
5
5
|
import stripAnsi from "strip-ansi";
|
|
6
6
|
import { DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, truncateTail, } from "../../../core/tools/truncate.js";
|
|
7
7
|
import { theme } from "../theme/theme.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CancellableLoader, Container, Loader, Spacer, Text } from "@
|
|
1
|
+
import { CancellableLoader, Container, Loader, Spacer, Text } from "@earendil-works/pi-tui";
|
|
2
2
|
import { DynamicBorder } from "./dynamic-border.js";
|
|
3
3
|
import { keyHint } from "./keybinding-hints.js";
|
|
4
4
|
/** Loader wrapped with borders for extension UI */
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* TUI component for managing package resources (enable/disable)
|
|
3
3
|
*/
|
|
4
|
+
import { homedir } from "node:os";
|
|
4
5
|
import { basename, dirname, join, relative } from "node:path";
|
|
5
|
-
import { Container, getKeybindings, Input, matchesKey, Spacer, truncateToWidth, visibleWidth, } from "@
|
|
6
|
+
import { Container, getKeybindings, Input, matchesKey, Spacer, truncateToWidth, visibleWidth, } from "@earendil-works/pi-tui";
|
|
6
7
|
import { CONFIG_DIR_NAME } from "../../../config.js";
|
|
7
8
|
import { theme } from "../theme/theme.js";
|
|
8
9
|
import { DynamicBorder } from "./dynamic-border.js";
|
|
@@ -13,13 +14,34 @@ const RESOURCE_TYPE_LABELS = {
|
|
|
13
14
|
prompts: "Prompts",
|
|
14
15
|
themes: "Themes",
|
|
15
16
|
};
|
|
17
|
+
function formatBaseDir(baseDir) {
|
|
18
|
+
const homeDir = homedir();
|
|
19
|
+
let displayPath;
|
|
20
|
+
if (baseDir === homeDir) {
|
|
21
|
+
displayPath = "~";
|
|
22
|
+
}
|
|
23
|
+
else if (baseDir.startsWith(homeDir)) {
|
|
24
|
+
// Replace home prefix with ~, normalize separators for display
|
|
25
|
+
const rest = baseDir.slice(homeDir.length);
|
|
26
|
+
displayPath = `~${rest.replace(/\\/g, "/")}`;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
displayPath = baseDir.replace(/\\/g, "/");
|
|
30
|
+
}
|
|
31
|
+
return displayPath.endsWith("/") ? displayPath : `${displayPath}/`;
|
|
32
|
+
}
|
|
16
33
|
function getGroupLabel(metadata) {
|
|
17
34
|
if (metadata.origin === "package") {
|
|
18
35
|
return `${metadata.source} (${metadata.scope})`;
|
|
19
36
|
}
|
|
20
37
|
// Top-level resources
|
|
21
38
|
if (metadata.source === "auto") {
|
|
22
|
-
|
|
39
|
+
if (metadata.baseDir) {
|
|
40
|
+
return metadata.scope === "user"
|
|
41
|
+
? `User (${formatBaseDir(metadata.baseDir)})`
|
|
42
|
+
: `Project (${formatBaseDir(metadata.baseDir)})`;
|
|
43
|
+
}
|
|
44
|
+
return metadata.scope === "user" ? "User (~/.pi/agent/)" : "Project (.pi/)";
|
|
23
45
|
}
|
|
24
46
|
return metadata.scope === "user" ? "User settings" : "Project settings";
|
|
25
47
|
}
|
|
@@ -28,7 +50,7 @@ function buildGroups(resolved) {
|
|
|
28
50
|
const addToGroup = (resources, resourceType) => {
|
|
29
51
|
for (const res of resources) {
|
|
30
52
|
const { path, enabled, metadata } = res;
|
|
31
|
-
const groupKey = `${metadata.origin}:${metadata.scope}:${metadata.source}`;
|
|
53
|
+
const groupKey = `${metadata.origin}:${metadata.scope}:${metadata.source}:${metadata.baseDir ?? ""}`;
|
|
32
54
|
if (!groupMap.has(groupKey)) {
|
|
33
55
|
groupMap.set(groupKey, {
|
|
34
56
|
key: groupKey,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Box, Container, Markdown, Spacer, Text } from "@
|
|
1
|
+
import { Box, Container, Markdown, Spacer, Text } from "@earendil-works/pi-tui";
|
|
2
2
|
import { getMarkdownTheme, theme } from "../theme/theme.js";
|
|
3
3
|
/**
|
|
4
4
|
* Component that renders a custom message entry from extensions.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as fs from "node:fs";
|
|
2
|
-
import { Container, Image, Spacer, Text } from "@
|
|
2
|
+
import { Container, Image, Spacer, Text } from "@earendil-works/pi-tui";
|
|
3
3
|
import { getBundledInteractiveAssetPath } from "../../../config.js";
|
|
4
4
|
import { theme } from "../theme/theme.js";
|
|
5
5
|
import { DynamicBorder } from "./dynamic-border.js";
|
|
@@ -6,7 +6,7 @@ import { spawnSync } from "node:child_process";
|
|
|
6
6
|
import * as fs from "node:fs";
|
|
7
7
|
import * as os from "node:os";
|
|
8
8
|
import * as path from "node:path";
|
|
9
|
-
import { Container, Editor, getKeybindings, Spacer, Text, } from "@
|
|
9
|
+
import { Container, Editor, getKeybindings, Spacer, Text, } from "@earendil-works/pi-tui";
|
|
10
10
|
import { getEditorTheme, theme } from "../theme/theme.js";
|
|
11
11
|
import { DynamicBorder } from "./dynamic-border.js";
|
|
12
12
|
import { keyHint } from "./keybinding-hints.js";
|