@code-yeongyu/senpi 2026.5.20-4 → 2026.5.21
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 +12 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +4 -10
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +10 -4
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +2 -3
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/http-dispatcher.d.ts +21 -0
- package/dist/core/http-dispatcher.d.ts.map +1 -0
- package/dist/core/http-dispatcher.js +48 -0
- package/dist/core/http-dispatcher.js.map +1 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +2 -1
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +3 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +20 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +2 -0
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +2 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +15 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +10 -1
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/senpi +4 -10
- package/dist/utils/paths.d.ts +1 -0
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +16 -0
- package/dist/utils/paths.js.map +1 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +2 -2
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +2 -2
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +3 -3
- package/node_modules/@earendil-works/pi-agent-core/README.md +488 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts +24 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +610 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts +120 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.js +405 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts +92 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +904 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.d.ts +53 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js +174 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts +95 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +533 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/utils.d.ts +25 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/utils.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/utils.js +131 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/utils.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts +51 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +486 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.d.ts +52 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.d.ts.map +1 -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/messages.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.d.ts +48 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js +230 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.d.ts +26 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js +101 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.d.ts +33 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js +231 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.d.ts +18 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js +42 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.d.ts +25 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js +114 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.d.ts +11 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.js +39 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts +32 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +197 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/uuid.d.ts +2 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/uuid.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/uuid.js +50 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/uuid.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.d.ts +44 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js +311 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/system-prompt.d.ts +3 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/system-prompt.d.ts.map +1 -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/system-prompt.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts +604 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js +103 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.d.ts +14 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js +126 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.d.ts +70 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js +290 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts +20 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/index.js +25 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/index.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/node.d.ts +3 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/node.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/node.js +3 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/node.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts +69 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js +278 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +394 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/types.js +2 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -0
- package/node_modules/@earendil-works/pi-agent-core/package.json +61 -0
- package/node_modules/@earendil-works/pi-ai/README.md +1386 -0
- package/node_modules/@earendil-works/pi-ai/dist/api-registry.d.ts +20 -0
- package/node_modules/@earendil-works/pi-ai/dist/api-registry.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api-registry.js +44 -0
- package/node_modules/@earendil-works/pi-ai/dist/api-registry.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/bedrock-provider.d.ts +5 -0
- package/node_modules/@earendil-works/pi-ai/dist/bedrock-provider.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/bedrock-provider.js +6 -0
- package/node_modules/@earendil-works/pi-ai/dist/bedrock-provider.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/cli.d.ts +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/cli.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/cli.js +116 -0
- package/node_modules/@earendil-works/pi-ai/dist/cli.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.d.ts +18 -0
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +178 -0
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.d.ts +10 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts +440 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +442 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.js +23 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/images-api-registry.d.ts +14 -0
- package/node_modules/@earendil-works/pi-ai/dist/images-api-registry.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/images-api-registry.js +22 -0
- package/node_modules/@earendil-works/pi-ai/dist/images-api-registry.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/images.d.ts +4 -0
- package/node_modules/@earendil-works/pi-ai/dist/images.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/images.js +14 -0
- package/node_modules/@earendil-works/pi-ai/dist/images.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/index.d.ts +33 -0
- package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/index.js +21 -0
- package/node_modules/@earendil-works/pi-ai/dist/index.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/models.d.ts +37 -0
- package/node_modules/@earendil-works/pi-ai/dist/models.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +17658 -0
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +16510 -0
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/models.js +114 -0
- package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/oauth.d.ts +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/oauth.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/oauth.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/oauth.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.d.ts +38 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js +787 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts +52 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +1127 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.d.ts +15 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +229 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare.d.ts +13 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare.js +26 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.d.ts +66 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +401 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot-headers.d.ts +8 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot-headers.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot-headers.js +29 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot-headers.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-shared.d.ts +73 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-shared.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-shared.js +359 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-shared.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.d.ts +15 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.js +465 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/google.d.ts +13 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/google.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/google.js +431 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/google.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/openrouter.d.ts +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/openrouter.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/openrouter.js +129 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/openrouter.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/register-builtins.d.ts +4 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/register-builtins.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/register-builtins.js +34 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/register-builtins.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.d.ts +25 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.js +542 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.d.ts +30 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js +1112 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.d.ts +22 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js +977 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-prompt-cache.d.ts +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-prompt-cache.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-prompt-cache.js +10 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-prompt-cache.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.d.ts +19 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js +579 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.d.ts +13 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js +651 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/register-builtins.d.ts +35 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/register-builtins.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/register-builtins.js +254 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/register-builtins.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.d.ts +38 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js +174 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/transform-messages.d.ts +16 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/transform-messages.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/transform-messages.js +186 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/transform-messages.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/session-resources.d.ts +4 -0
- package/node_modules/@earendil-works/pi-ai/dist/session-resources.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/session-resources.js +22 -0
- package/node_modules/@earendil-works/pi-ai/dist/session-resources.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/stream.d.ts +8 -0
- package/node_modules/@earendil-works/pi-ai/dist/stream.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/stream.js +42 -0
- package/node_modules/@earendil-works/pi-ai/dist/stream.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/context-transformer.d.ts +22 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/context-transformer.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/context-transformer.js +161 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/context-transformer.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/index.d.ts +13 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/index.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/index.js +23 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/index.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/gemma4.d.ts +21 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/gemma4.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/gemma4.js +559 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/gemma4.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/hermes.d.ts +21 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/hermes.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/hermes.js +69 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/hermes.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/json-mix.d.ts +12 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/json-mix.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/json-mix.js +570 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/json-mix.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/morph-xml.d.ts +15 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/morph-xml.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/morph-xml.js +935 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/morph-xml.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/xml-tool-tag-scanner.d.ts +14 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/xml-tool-tag-scanner.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/xml-tool-tag-scanner.js +54 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/xml-tool-tag-scanner.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/yaml-xml.d.ts +8 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/yaml-xml.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/yaml-xml.js +295 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/yaml-xml.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/stream-wrapper.d.ts +4 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/stream-wrapper.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/stream-wrapper.js +336 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/stream-wrapper.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/types.d.ts +103 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/types.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/types.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/types.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +543 -0
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/types.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/diagnostics.d.ts +19 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/diagnostics.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/diagnostics.js +25 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/diagnostics.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts +21 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +81 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/hash.d.ts +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/hash.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/hash.js +14 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/hash.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/headers.d.ts +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/headers.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/headers.js +8 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/headers.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/json-parse.d.ts +16 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/json-parse.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/json-parse.js +113 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/json-parse.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/node-http-proxy.d.ts +10 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/node-http-proxy.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/node-http-proxy.js +97 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/node-http-proxy.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/anthropic.d.ts +25 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/anthropic.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/anthropic.js +335 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/anthropic.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.d.ts +30 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js +292 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.d.ts +57 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.js +121 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/oauth-page.d.ts +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/oauth-page.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/oauth-page.js +105 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/oauth-page.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.d.ts +34 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js +385 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/pkce.d.ts +13 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/pkce.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/pkce.js +31 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/pkce.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/types.d.ts +57 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/types.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/types.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/types.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts +56 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +151 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/sanitize-unicode.d.ts +22 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/sanitize-unicode.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/sanitize-unicode.js +26 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/sanitize-unicode.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/tool-pair-repair.d.ts +5 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/tool-pair-repair.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/tool-pair-repair.js +49 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/tool-pair-repair.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/typebox-helpers.d.ts +17 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/typebox-helpers.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/typebox-helpers.js +21 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/typebox-helpers.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/validation.d.ts +18 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/validation.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/validation.js +281 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/validation.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/package.json +113 -0
- package/node_modules/@earendil-works/pi-tui/README.md +779 -0
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts +54 -0
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js +632 -0
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts +22 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/box.js +104 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/box.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.d.ts +22 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.js +35 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +249 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +1916 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts +28 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js +89 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts +37 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js +426 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts +40 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js +95 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts +90 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +634 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts +50 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js +159 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts +50 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +185 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.d.ts +12 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.js +23 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts +19 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js +89 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.d.ts +13 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.js +51 -0
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.d.ts +39 -0
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.js +2 -0
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts +16 -0
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js +110 -0
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +23 -0
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/index.js +32 -0
- package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts +193 -0
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +174 -0
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/keys.d.ts +184 -0
- package/node_modules/@earendil-works/pi-tui/dist/keys.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/keys.js +1173 -0
- package/node_modules/@earendil-works/pi-tui/dist/keys.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.d.ts +28 -0
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.js +44 -0
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts +50 -0
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js +361 -0
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts +90 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +336 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +88 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +329 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +231 -0
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/tui.js +1230 -0
- package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.d.ts +17 -0
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.js +25 -0
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +79 -0
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/utils.js +1031 -0
- package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/package.json +48 -0
- package/node_modules/@smithy/node-http-handler/LICENSE +201 -0
- package/node_modules/@smithy/node-http-handler/README.md +9 -0
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +724 -0
- package/node_modules/@smithy/node-http-handler/dist-es/constants.js +1 -0
- package/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +9 -0
- package/node_modules/@smithy/node-http-handler/dist-es/index.js +3 -0
- package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +216 -0
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +87 -0
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +32 -0
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +170 -0
- package/node_modules/@smithy/node-http-handler/dist-es/readable.mock.js +21 -0
- package/node_modules/@smithy/node-http-handler/dist-es/server.mock.js +88 -0
- package/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +36 -0
- package/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +21 -0
- package/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +22 -0
- package/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +23 -0
- package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js +8 -0
- package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/index.js +41 -0
- package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/readable.mock.js +21 -0
- package/node_modules/@smithy/node-http-handler/dist-es/timing.js +4 -0
- package/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +56 -0
- package/node_modules/@smithy/node-http-handler/dist-types/constants.d.ts +5 -0
- package/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +4 -0
- package/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +3 -0
- package/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +46 -0
- package/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +24 -0
- package/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +12 -0
- package/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +63 -0
- package/node_modules/@smithy/node-http-handler/dist-types/readable.mock.d.ts +13 -0
- package/node_modules/@smithy/node-http-handler/dist-types/server.mock.d.ts +12 -0
- package/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +2 -0
- package/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +6 -0
- package/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +6 -0
- package/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +2 -0
- package/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +5 -0
- package/node_modules/@smithy/node-http-handler/dist-types/stream-collector/index.d.ts +6 -0
- package/node_modules/@smithy/node-http-handler/dist-types/stream-collector/readable.mock.d.ts +13 -0
- package/node_modules/@smithy/node-http-handler/dist-types/timing.d.ts +8 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/constants.d.ts +5 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts +4 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/index.d.ts +3 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +46 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +24 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +12 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +63 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/readable.mock.d.ts +13 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/server.mock.d.ts +12 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +2 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-request-timeout.d.ts +6 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +6 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +2 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/collector.d.ts +5 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/index.d.ts +6 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/readable.mock.d.ts +13 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/timing.d.ts +8 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +11 -0
- package/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +11 -0
- package/node_modules/@smithy/node-http-handler/package.json +68 -0
- package/node_modules/@smithy/types/LICENSE +201 -0
- package/node_modules/@smithy/types/README.md +115 -0
- package/node_modules/@smithy/types/dist-cjs/index.js +91 -0
- package/node_modules/@smithy/types/dist-es/abort-handler.js +1 -0
- package/node_modules/@smithy/types/dist-es/abort.js +1 -0
- package/node_modules/@smithy/types/dist-es/auth/HttpApiKeyAuth.js +5 -0
- package/node_modules/@smithy/types/dist-es/auth/HttpAuthScheme.js +1 -0
- package/node_modules/@smithy/types/dist-es/auth/HttpAuthSchemeProvider.js +1 -0
- package/node_modules/@smithy/types/dist-es/auth/HttpSigner.js +1 -0
- package/node_modules/@smithy/types/dist-es/auth/IdentityProviderConfig.js +1 -0
- package/node_modules/@smithy/types/dist-es/auth/auth.js +5 -0
- package/node_modules/@smithy/types/dist-es/auth/index.js +6 -0
- package/node_modules/@smithy/types/dist-es/blob/blob-payload-input-types.js +1 -0
- package/node_modules/@smithy/types/dist-es/checksum.js +1 -0
- package/node_modules/@smithy/types/dist-es/client.js +1 -0
- package/node_modules/@smithy/types/dist-es/command.js +1 -0
- package/node_modules/@smithy/types/dist-es/connection/config.js +1 -0
- package/node_modules/@smithy/types/dist-es/connection/index.js +3 -0
- package/node_modules/@smithy/types/dist-es/connection/manager.js +1 -0
- package/node_modules/@smithy/types/dist-es/connection/pool.js +1 -0
- package/node_modules/@smithy/types/dist-es/crypto.js +1 -0
- package/node_modules/@smithy/types/dist-es/downlevel-ts3.4/transform/type-transform.js +1 -0
- package/node_modules/@smithy/types/dist-es/encode.js +1 -0
- package/node_modules/@smithy/types/dist-es/endpoint.js +5 -0
- package/node_modules/@smithy/types/dist-es/endpoints/EndpointRuleObject.js +1 -0
- package/node_modules/@smithy/types/dist-es/endpoints/ErrorRuleObject.js +1 -0
- package/node_modules/@smithy/types/dist-es/endpoints/RuleSetObject.js +1 -0
- package/node_modules/@smithy/types/dist-es/endpoints/TreeRuleObject.js +1 -0
- package/node_modules/@smithy/types/dist-es/endpoints/index.js +5 -0
- package/node_modules/@smithy/types/dist-es/endpoints/shared.js +1 -0
- package/node_modules/@smithy/types/dist-es/eventStream.js +1 -0
- package/node_modules/@smithy/types/dist-es/extensions/checksum.js +38 -0
- package/node_modules/@smithy/types/dist-es/extensions/defaultClientConfiguration.js +7 -0
- package/node_modules/@smithy/types/dist-es/extensions/defaultExtensionConfiguration.js +1 -0
- package/node_modules/@smithy/types/dist-es/extensions/index.js +3 -0
- package/node_modules/@smithy/types/dist-es/extensions/retry.js +1 -0
- package/node_modules/@smithy/types/dist-es/externals-check/browser-externals-check.js +1 -0
- package/node_modules/@smithy/types/dist-es/feature-ids.js +1 -0
- package/node_modules/@smithy/types/dist-es/http/httpHandlerInitialization.js +1 -0
- package/node_modules/@smithy/types/dist-es/http.js +5 -0
- package/node_modules/@smithy/types/dist-es/identity/apiKeyIdentity.js +1 -0
- package/node_modules/@smithy/types/dist-es/identity/awsCredentialIdentity.js +1 -0
- package/node_modules/@smithy/types/dist-es/identity/identity.js +1 -0
- package/node_modules/@smithy/types/dist-es/identity/index.js +4 -0
- package/node_modules/@smithy/types/dist-es/identity/tokenIdentity.js +1 -0
- package/node_modules/@smithy/types/dist-es/index.js +42 -0
- package/node_modules/@smithy/types/dist-es/logger.js +1 -0
- package/node_modules/@smithy/types/dist-es/middleware.js +1 -0
- package/node_modules/@smithy/types/dist-es/pagination.js +1 -0
- package/node_modules/@smithy/types/dist-es/profile.js +6 -0
- package/node_modules/@smithy/types/dist-es/response.js +1 -0
- package/node_modules/@smithy/types/dist-es/retry.js +1 -0
- package/node_modules/@smithy/types/dist-es/schema/schema-deprecated.js +1 -0
- package/node_modules/@smithy/types/dist-es/schema/schema.js +1 -0
- package/node_modules/@smithy/types/dist-es/schema/sentinels.js +1 -0
- package/node_modules/@smithy/types/dist-es/schema/static-schemas.js +1 -0
- package/node_modules/@smithy/types/dist-es/schema/traits.js +1 -0
- package/node_modules/@smithy/types/dist-es/serde.js +1 -0
- package/node_modules/@smithy/types/dist-es/shapes.js +1 -0
- package/node_modules/@smithy/types/dist-es/signature.js +1 -0
- package/node_modules/@smithy/types/dist-es/stream.js +1 -0
- package/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-common-types.js +1 -0
- package/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-input-types.js +1 -0
- package/node_modules/@smithy/types/dist-es/streaming-payload/streaming-blob-payload-output-types.js +1 -0
- package/node_modules/@smithy/types/dist-es/transfer.js +6 -0
- package/node_modules/@smithy/types/dist-es/transform/client-method-transforms.js +1 -0
- package/node_modules/@smithy/types/dist-es/transform/client-payload-blob-type-narrow.js +1 -0
- package/node_modules/@smithy/types/dist-es/transform/exact.js +1 -0
- package/node_modules/@smithy/types/dist-es/transform/mutable.js +1 -0
- package/node_modules/@smithy/types/dist-es/transform/no-undefined.js +1 -0
- package/node_modules/@smithy/types/dist-es/transform/type-transform.js +1 -0
- package/node_modules/@smithy/types/dist-es/uri.js +1 -0
- package/node_modules/@smithy/types/dist-es/util.js +1 -0
- package/node_modules/@smithy/types/dist-es/waiter.js +1 -0
- package/node_modules/@smithy/types/dist-types/abort-handler.d.ts +7 -0
- package/node_modules/@smithy/types/dist-types/abort.d.ts +50 -0
- package/node_modules/@smithy/types/dist-types/auth/HttpApiKeyAuth.d.ts +7 -0
- package/node_modules/@smithy/types/dist-types/auth/HttpAuthScheme.d.ts +49 -0
- package/node_modules/@smithy/types/dist-types/auth/HttpAuthSchemeProvider.d.ts +20 -0
- package/node_modules/@smithy/types/dist-types/auth/HttpSigner.d.ts +41 -0
- package/node_modules/@smithy/types/dist-types/auth/IdentityProviderConfig.d.ts +14 -0
- package/node_modules/@smithy/types/dist-types/auth/auth.d.ts +57 -0
- package/node_modules/@smithy/types/dist-types/auth/index.d.ts +6 -0
- package/node_modules/@smithy/types/dist-types/blob/blob-payload-input-types.d.ts +40 -0
- package/node_modules/@smithy/types/dist-types/checksum.d.ts +63 -0
- package/node_modules/@smithy/types/dist-types/client.d.ts +57 -0
- package/node_modules/@smithy/types/dist-types/command.d.ts +28 -0
- package/node_modules/@smithy/types/dist-types/connection/config.d.ts +10 -0
- package/node_modules/@smithy/types/dist-types/connection/index.d.ts +3 -0
- package/node_modules/@smithy/types/dist-types/connection/manager.d.ts +34 -0
- package/node_modules/@smithy/types/dist-types/connection/pool.d.ts +32 -0
- package/node_modules/@smithy/types/dist-types/crypto.d.ts +60 -0
- package/node_modules/@smithy/types/dist-types/downlevel-ts3.4/transform/type-transform.d.ts +25 -0
- package/node_modules/@smithy/types/dist-types/encode.d.ts +31 -0
- package/node_modules/@smithy/types/dist-types/endpoint.d.ts +77 -0
- package/node_modules/@smithy/types/dist-types/endpoints/EndpointRuleObject.d.ts +27 -0
- package/node_modules/@smithy/types/dist-types/endpoints/ErrorRuleObject.d.ts +10 -0
- package/node_modules/@smithy/types/dist-types/endpoints/RuleSetObject.d.ts +28 -0
- package/node_modules/@smithy/types/dist-types/endpoints/TreeRuleObject.d.ts +16 -0
- package/node_modules/@smithy/types/dist-types/endpoints/index.d.ts +5 -0
- package/node_modules/@smithy/types/dist-types/endpoints/shared.d.ts +55 -0
- package/node_modules/@smithy/types/dist-types/eventStream.d.ts +137 -0
- package/node_modules/@smithy/types/dist-types/extensions/checksum.d.ts +58 -0
- package/node_modules/@smithy/types/dist-types/extensions/defaultClientConfiguration.d.ts +33 -0
- package/node_modules/@smithy/types/dist-types/extensions/defaultExtensionConfiguration.d.ts +9 -0
- package/node_modules/@smithy/types/dist-types/extensions/index.d.ts +4 -0
- package/node_modules/@smithy/types/dist-types/extensions/retry.d.ts +18 -0
- package/node_modules/@smithy/types/dist-types/externals-check/browser-externals-check.d.ts +35 -0
- package/node_modules/@smithy/types/dist-types/feature-ids.d.ts +16 -0
- package/node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.ts +128 -0
- package/node_modules/@smithy/types/dist-types/http.d.ts +112 -0
- package/node_modules/@smithy/types/dist-types/identity/apiKeyIdentity.d.ts +14 -0
- package/node_modules/@smithy/types/dist-types/identity/awsCredentialIdentity.d.ts +31 -0
- package/node_modules/@smithy/types/dist-types/identity/identity.d.ts +15 -0
- package/node_modules/@smithy/types/dist-types/identity/index.d.ts +4 -0
- package/node_modules/@smithy/types/dist-types/identity/tokenIdentity.d.ts +14 -0
- package/node_modules/@smithy/types/dist-types/index.d.ts +42 -0
- package/node_modules/@smithy/types/dist-types/logger.d.ts +13 -0
- package/node_modules/@smithy/types/dist-types/middleware.d.ts +534 -0
- package/node_modules/@smithy/types/dist-types/pagination.d.ts +33 -0
- package/node_modules/@smithy/types/dist-types/profile.d.ts +30 -0
- package/node_modules/@smithy/types/dist-types/response.d.ts +40 -0
- package/node_modules/@smithy/types/dist-types/retry.d.ts +133 -0
- package/node_modules/@smithy/types/dist-types/schema/schema-deprecated.d.ts +136 -0
- package/node_modules/@smithy/types/dist-types/schema/schema.d.ts +230 -0
- package/node_modules/@smithy/types/dist-types/schema/sentinels.d.ts +65 -0
- package/node_modules/@smithy/types/dist-types/schema/static-schemas.d.ts +82 -0
- package/node_modules/@smithy/types/dist-types/schema/traits.d.ts +46 -0
- package/node_modules/@smithy/types/dist-types/serde.d.ts +114 -0
- package/node_modules/@smithy/types/dist-types/shapes.d.ts +82 -0
- package/node_modules/@smithy/types/dist-types/signature.d.ts +155 -0
- package/node_modules/@smithy/types/dist-types/stream.d.ts +22 -0
- package/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-common-types.d.ts +32 -0
- package/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-input-types.d.ts +60 -0
- package/node_modules/@smithy/types/dist-types/streaming-payload/streaming-blob-payload-output-types.d.ts +51 -0
- package/node_modules/@smithy/types/dist-types/transfer.d.ts +41 -0
- package/node_modules/@smithy/types/dist-types/transform/client-method-transforms.d.ts +26 -0
- package/node_modules/@smithy/types/dist-types/transform/client-payload-blob-type-narrow.d.ts +77 -0
- package/node_modules/@smithy/types/dist-types/transform/exact.d.ts +6 -0
- package/node_modules/@smithy/types/dist-types/transform/mutable.d.ts +6 -0
- package/node_modules/@smithy/types/dist-types/transform/no-undefined.d.ts +68 -0
- package/node_modules/@smithy/types/dist-types/transform/type-transform.d.ts +34 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/abort-handler.d.ts +7 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/abort.d.ts +50 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpApiKeyAuth.d.ts +7 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthScheme.d.ts +49 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpAuthSchemeProvider.d.ts +20 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/auth/HttpSigner.d.ts +41 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/auth/IdentityProviderConfig.d.ts +14 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/auth/auth.d.ts +57 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/auth/index.d.ts +6 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/blob/blob-payload-input-types.d.ts +40 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/checksum.d.ts +63 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/client.d.ts +57 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/command.d.ts +28 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/connection/config.d.ts +10 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/connection/index.d.ts +3 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/connection/manager.d.ts +34 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/connection/pool.d.ts +32 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/crypto.d.ts +60 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/downlevel-ts3.4/transform/type-transform.d.ts +41 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/encode.d.ts +31 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/endpoint.d.ts +77 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/endpoints/EndpointRuleObject.d.ts +27 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/endpoints/ErrorRuleObject.d.ts +10 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/endpoints/RuleSetObject.d.ts +28 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/endpoints/TreeRuleObject.d.ts +16 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/endpoints/index.d.ts +5 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/endpoints/shared.d.ts +55 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/eventStream.d.ts +137 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/extensions/checksum.d.ts +58 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/extensions/defaultClientConfiguration.d.ts +33 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/extensions/defaultExtensionConfiguration.d.ts +9 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/extensions/index.d.ts +4 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/extensions/retry.d.ts +18 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/externals-check/browser-externals-check.d.ts +35 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/feature-ids.d.ts +16 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/http/httpHandlerInitialization.d.ts +128 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/http.d.ts +112 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/identity/apiKeyIdentity.d.ts +14 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/identity/awsCredentialIdentity.d.ts +31 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/identity/identity.d.ts +15 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/identity/index.d.ts +4 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/identity/tokenIdentity.d.ts +14 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/index.d.ts +42 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/logger.d.ts +13 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/middleware.d.ts +534 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/pagination.d.ts +33 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/profile.d.ts +30 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/response.d.ts +40 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/retry.d.ts +133 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/schema/schema-deprecated.d.ts +142 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/schema/schema.d.ts +245 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/schema/sentinels.d.ts +65 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/schema/static-schemas.d.ts +101 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/schema/traits.d.ts +46 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/serde.d.ts +114 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/shapes.d.ts +82 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/signature.d.ts +155 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/stream.d.ts +22 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-common-types.d.ts +32 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-payload-input-types.d.ts +60 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/streaming-payload/streaming-blob-payload-output-types.d.ts +51 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/transfer.d.ts +41 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/transform/client-method-transforms.d.ts +26 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/transform/client-payload-blob-type-narrow.d.ts +81 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/transform/exact.d.ts +14 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/transform/mutable.d.ts +6 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/transform/no-undefined.d.ts +88 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/transform/type-transform.d.ts +41 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/uri.d.ts +17 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/util.d.ts +192 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/waiter.d.ts +35 -0
- package/node_modules/@smithy/types/dist-types/uri.d.ts +17 -0
- package/node_modules/@smithy/types/dist-types/util.d.ts +176 -0
- package/node_modules/@smithy/types/dist-types/waiter.d.ts +35 -0
- package/node_modules/@smithy/types/package.json +61 -0
- package/node_modules/marked/LICENSE.md +44 -0
- package/node_modules/marked/README.md +106 -0
- package/node_modules/marked/bin/main.js +282 -0
- package/node_modules/marked/bin/marked.js +15 -0
- package/node_modules/marked/lib/marked.cjs +2211 -0
- package/node_modules/marked/lib/marked.cjs.map +7 -0
- package/node_modules/marked/lib/marked.d.cts +728 -0
- package/node_modules/marked/lib/marked.d.ts +728 -0
- package/node_modules/marked/lib/marked.esm.js +2189 -0
- package/node_modules/marked/lib/marked.esm.js.map +7 -0
- package/node_modules/marked/lib/marked.umd.js +2213 -0
- package/node_modules/marked/lib/marked.umd.js.map +7 -0
- package/node_modules/marked/man/marked.1 +111 -0
- package/node_modules/marked/man/marked.1.md +92 -0
- package/node_modules/marked/marked.min.js +69 -0
- package/node_modules/marked/package.json +111 -0
- package/npm-shrinkwrap.json +1841 -0
- package/package.json +49 -31
|
@@ -0,0 +1,1031 @@
|
|
|
1
|
+
import { eastAsianWidth } from "get-east-asian-width";
|
|
2
|
+
// Grapheme segmenter (shared instance)
|
|
3
|
+
const segmenter = new Intl.Segmenter(undefined, { granularity: "grapheme" });
|
|
4
|
+
/**
|
|
5
|
+
* Get the shared grapheme segmenter instance.
|
|
6
|
+
*/
|
|
7
|
+
export function getSegmenter() {
|
|
8
|
+
return segmenter;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Check if a grapheme cluster (after segmentation) could possibly be an RGI emoji.
|
|
12
|
+
* This is a fast heuristic to avoid the expensive rgiEmojiRegex test.
|
|
13
|
+
* The tested Unicode blocks are deliberately broad to account for future
|
|
14
|
+
* Unicode additions.
|
|
15
|
+
*/
|
|
16
|
+
function couldBeEmoji(segment) {
|
|
17
|
+
const cp = segment.codePointAt(0);
|
|
18
|
+
return ((cp >= 0x1f000 && cp <= 0x1fbff) || // Emoji and Pictograph
|
|
19
|
+
(cp >= 0x2300 && cp <= 0x23ff) || // Misc technical
|
|
20
|
+
(cp >= 0x2600 && cp <= 0x27bf) || // Misc symbols, dingbats
|
|
21
|
+
(cp >= 0x2b50 && cp <= 0x2b55) || // Specific stars/circles
|
|
22
|
+
segment.includes("\uFE0F") || // Contains VS16 (emoji presentation selector)
|
|
23
|
+
segment.length > 2 // Multi-codepoint sequences (ZWJ, skin tones, etc.)
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
// Regexes for character classification (same as string-width library)
|
|
27
|
+
const zeroWidthRegex = /^(?:\p{Default_Ignorable_Code_Point}|\p{Control}|\p{Mark}|\p{Surrogate})+$/v;
|
|
28
|
+
const leadingNonPrintingRegex = /^[\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Mark}\p{Surrogate}]+/v;
|
|
29
|
+
const rgiEmojiRegex = /^\p{RGI_Emoji}$/v;
|
|
30
|
+
// Cache for non-ASCII strings
|
|
31
|
+
const WIDTH_CACHE_SIZE = 512;
|
|
32
|
+
const widthCache = new Map();
|
|
33
|
+
function isPrintableAscii(str) {
|
|
34
|
+
for (let i = 0; i < str.length; i++) {
|
|
35
|
+
const code = str.charCodeAt(i);
|
|
36
|
+
if (code < 0x20 || code > 0x7e) {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
function truncateFragmentToWidth(text, maxWidth) {
|
|
43
|
+
if (maxWidth <= 0 || text.length === 0) {
|
|
44
|
+
return { text: "", width: 0 };
|
|
45
|
+
}
|
|
46
|
+
if (isPrintableAscii(text)) {
|
|
47
|
+
const clipped = text.slice(0, maxWidth);
|
|
48
|
+
return { text: clipped, width: clipped.length };
|
|
49
|
+
}
|
|
50
|
+
const hasAnsi = text.includes("\x1b");
|
|
51
|
+
const hasTabs = text.includes("\t");
|
|
52
|
+
if (!hasAnsi && !hasTabs) {
|
|
53
|
+
let result = "";
|
|
54
|
+
let width = 0;
|
|
55
|
+
for (const { segment } of segmenter.segment(text)) {
|
|
56
|
+
const w = graphemeWidth(segment);
|
|
57
|
+
if (width + w > maxWidth) {
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
result += segment;
|
|
61
|
+
width += w;
|
|
62
|
+
}
|
|
63
|
+
return { text: result, width };
|
|
64
|
+
}
|
|
65
|
+
let result = "";
|
|
66
|
+
let width = 0;
|
|
67
|
+
let i = 0;
|
|
68
|
+
let pendingAnsi = "";
|
|
69
|
+
while (i < text.length) {
|
|
70
|
+
const ansi = extractAnsiCode(text, i);
|
|
71
|
+
if (ansi) {
|
|
72
|
+
pendingAnsi += ansi.code;
|
|
73
|
+
i += ansi.length;
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
if (text[i] === "\t") {
|
|
77
|
+
if (width + 3 > maxWidth) {
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
if (pendingAnsi) {
|
|
81
|
+
result += pendingAnsi;
|
|
82
|
+
pendingAnsi = "";
|
|
83
|
+
}
|
|
84
|
+
result += "\t";
|
|
85
|
+
width += 3;
|
|
86
|
+
i++;
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
let end = i;
|
|
90
|
+
while (end < text.length && text[end] !== "\t") {
|
|
91
|
+
const nextAnsi = extractAnsiCode(text, end);
|
|
92
|
+
if (nextAnsi) {
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
end++;
|
|
96
|
+
}
|
|
97
|
+
for (const { segment } of segmenter.segment(text.slice(i, end))) {
|
|
98
|
+
const w = graphemeWidth(segment);
|
|
99
|
+
if (width + w > maxWidth) {
|
|
100
|
+
return { text: result, width };
|
|
101
|
+
}
|
|
102
|
+
if (pendingAnsi) {
|
|
103
|
+
result += pendingAnsi;
|
|
104
|
+
pendingAnsi = "";
|
|
105
|
+
}
|
|
106
|
+
result += segment;
|
|
107
|
+
width += w;
|
|
108
|
+
}
|
|
109
|
+
i = end;
|
|
110
|
+
}
|
|
111
|
+
return { text: result, width };
|
|
112
|
+
}
|
|
113
|
+
function finalizeTruncatedResult(prefix, prefixWidth, ellipsis, ellipsisWidth, maxWidth, pad) {
|
|
114
|
+
const reset = "\x1b[0m";
|
|
115
|
+
const visibleWidth = prefixWidth + ellipsisWidth;
|
|
116
|
+
let result;
|
|
117
|
+
if (ellipsis.length > 0) {
|
|
118
|
+
result = `${prefix}${reset}${ellipsis}${reset}`;
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
result = `${prefix}${reset}`;
|
|
122
|
+
}
|
|
123
|
+
return pad ? result + " ".repeat(Math.max(0, maxWidth - visibleWidth)) : result;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Calculate the terminal width of a single grapheme cluster.
|
|
127
|
+
* Based on code from the string-width library, but includes a possible-emoji
|
|
128
|
+
* check to avoid running the RGI_Emoji regex unnecessarily.
|
|
129
|
+
*/
|
|
130
|
+
function graphemeWidth(segment) {
|
|
131
|
+
// Zero-width clusters
|
|
132
|
+
if (zeroWidthRegex.test(segment)) {
|
|
133
|
+
return 0;
|
|
134
|
+
}
|
|
135
|
+
// Emoji check with pre-filter
|
|
136
|
+
if (couldBeEmoji(segment) && rgiEmojiRegex.test(segment)) {
|
|
137
|
+
return 2;
|
|
138
|
+
}
|
|
139
|
+
// Get base visible codepoint
|
|
140
|
+
const base = segment.replace(leadingNonPrintingRegex, "");
|
|
141
|
+
const cp = base.codePointAt(0);
|
|
142
|
+
if (cp === undefined) {
|
|
143
|
+
return 0;
|
|
144
|
+
}
|
|
145
|
+
// Regional indicator symbols (U+1F1E6..U+1F1FF) are often rendered as
|
|
146
|
+
// full-width emoji in terminals, even when isolated during streaming.
|
|
147
|
+
// Keep width conservative (2) to avoid terminal auto-wrap drift artifacts.
|
|
148
|
+
if (cp >= 0x1f1e6 && cp <= 0x1f1ff) {
|
|
149
|
+
return 2;
|
|
150
|
+
}
|
|
151
|
+
let width = eastAsianWidth(cp);
|
|
152
|
+
// Trailing halfwidth/fullwidth forms and AM vowels that segment with a base.
|
|
153
|
+
if (segment.length > 1) {
|
|
154
|
+
for (const char of segment.slice(1)) {
|
|
155
|
+
const c = char.codePointAt(0);
|
|
156
|
+
if (c >= 0xff00 && c <= 0xffef) {
|
|
157
|
+
width += eastAsianWidth(c);
|
|
158
|
+
}
|
|
159
|
+
else if (c === 0x0e33 || c === 0x0eb3) {
|
|
160
|
+
width += 1;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return width;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Calculate the visible width of a string in terminal columns.
|
|
168
|
+
*/
|
|
169
|
+
export function visibleWidth(str) {
|
|
170
|
+
if (str.length === 0) {
|
|
171
|
+
return 0;
|
|
172
|
+
}
|
|
173
|
+
// Fast path: pure ASCII printable
|
|
174
|
+
if (isPrintableAscii(str)) {
|
|
175
|
+
return str.length;
|
|
176
|
+
}
|
|
177
|
+
// Check cache
|
|
178
|
+
const cached = widthCache.get(str);
|
|
179
|
+
if (cached !== undefined) {
|
|
180
|
+
return cached;
|
|
181
|
+
}
|
|
182
|
+
// Normalize: tabs to 3 spaces, strip ANSI escape codes
|
|
183
|
+
let clean = str;
|
|
184
|
+
if (str.includes("\t")) {
|
|
185
|
+
clean = clean.replace(/\t/g, " ");
|
|
186
|
+
}
|
|
187
|
+
if (clean.includes("\x1b")) {
|
|
188
|
+
// Strip supported ANSI/OSC/APC escape sequences in one pass.
|
|
189
|
+
// This covers CSI styling/cursor codes, OSC hyperlinks and prompt markers,
|
|
190
|
+
// and APC sequences like CURSOR_MARKER.
|
|
191
|
+
let stripped = "";
|
|
192
|
+
let i = 0;
|
|
193
|
+
while (i < clean.length) {
|
|
194
|
+
const ansi = extractAnsiCode(clean, i);
|
|
195
|
+
if (ansi) {
|
|
196
|
+
i += ansi.length;
|
|
197
|
+
continue;
|
|
198
|
+
}
|
|
199
|
+
stripped += clean[i];
|
|
200
|
+
i++;
|
|
201
|
+
}
|
|
202
|
+
clean = stripped;
|
|
203
|
+
}
|
|
204
|
+
// Calculate width
|
|
205
|
+
let width = 0;
|
|
206
|
+
for (const { segment } of segmenter.segment(clean)) {
|
|
207
|
+
width += graphemeWidth(segment);
|
|
208
|
+
}
|
|
209
|
+
// Cache result
|
|
210
|
+
if (widthCache.size >= WIDTH_CACHE_SIZE) {
|
|
211
|
+
const firstKey = widthCache.keys().next().value;
|
|
212
|
+
if (firstKey !== undefined) {
|
|
213
|
+
widthCache.delete(firstKey);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
widthCache.set(str, width);
|
|
217
|
+
return width;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Normalize text for terminal output without changing logical editor content.
|
|
221
|
+
* Some terminals render precomposed Thai/Lao AM vowels inconsistently during
|
|
222
|
+
* differential repaint. Their compatibility decompositions have the same cell
|
|
223
|
+
* width but avoid stale-cell artifacts in terminal renderers.
|
|
224
|
+
*/
|
|
225
|
+
const THAI_LAO_AM_REGEX = /[\u0e33\u0eb3]/;
|
|
226
|
+
const THAI_LAO_AM_GLOBAL_REGEX = /[\u0e33\u0eb3]/g;
|
|
227
|
+
export function normalizeTerminalOutput(str) {
|
|
228
|
+
if (!THAI_LAO_AM_REGEX.test(str))
|
|
229
|
+
return str;
|
|
230
|
+
return str.replace(THAI_LAO_AM_GLOBAL_REGEX, (char) => (char === "\u0e33" ? "\u0e4d\u0e32" : "\u0ecd\u0eb2"));
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Extract ANSI escape sequences from a string at the given position.
|
|
234
|
+
*/
|
|
235
|
+
export function extractAnsiCode(str, pos) {
|
|
236
|
+
if (pos >= str.length || str[pos] !== "\x1b")
|
|
237
|
+
return null;
|
|
238
|
+
const next = str[pos + 1];
|
|
239
|
+
// CSI sequence: ESC [ ... m/G/K/H/J
|
|
240
|
+
if (next === "[") {
|
|
241
|
+
let j = pos + 2;
|
|
242
|
+
while (j < str.length && !/[mGKHJ]/.test(str[j]))
|
|
243
|
+
j++;
|
|
244
|
+
if (j < str.length)
|
|
245
|
+
return { code: str.substring(pos, j + 1), length: j + 1 - pos };
|
|
246
|
+
return null;
|
|
247
|
+
}
|
|
248
|
+
// OSC sequence: ESC ] ... BEL or ESC ] ... ST (ESC \)
|
|
249
|
+
// Used for hyperlinks (OSC 8), window titles, etc.
|
|
250
|
+
if (next === "]") {
|
|
251
|
+
let j = pos + 2;
|
|
252
|
+
while (j < str.length) {
|
|
253
|
+
if (str[j] === "\x07")
|
|
254
|
+
return { code: str.substring(pos, j + 1), length: j + 1 - pos };
|
|
255
|
+
if (str[j] === "\x1b" && str[j + 1] === "\\")
|
|
256
|
+
return { code: str.substring(pos, j + 2), length: j + 2 - pos };
|
|
257
|
+
j++;
|
|
258
|
+
}
|
|
259
|
+
return null;
|
|
260
|
+
}
|
|
261
|
+
// APC sequence: ESC _ ... BEL or ESC _ ... ST (ESC \)
|
|
262
|
+
// Used for cursor marker and application-specific commands
|
|
263
|
+
if (next === "_") {
|
|
264
|
+
let j = pos + 2;
|
|
265
|
+
while (j < str.length) {
|
|
266
|
+
if (str[j] === "\x07")
|
|
267
|
+
return { code: str.substring(pos, j + 1), length: j + 1 - pos };
|
|
268
|
+
if (str[j] === "\x1b" && str[j + 1] === "\\")
|
|
269
|
+
return { code: str.substring(pos, j + 2), length: j + 2 - pos };
|
|
270
|
+
j++;
|
|
271
|
+
}
|
|
272
|
+
return null;
|
|
273
|
+
}
|
|
274
|
+
return null;
|
|
275
|
+
}
|
|
276
|
+
function parseOsc8Hyperlink(ansiCode) {
|
|
277
|
+
if (!ansiCode.startsWith("\x1b]8;")) {
|
|
278
|
+
return undefined;
|
|
279
|
+
}
|
|
280
|
+
const terminator = ansiCode.endsWith("\x07") ? "\x07" : "\x1b\\";
|
|
281
|
+
const body = ansiCode.slice(4, terminator === "\x07" ? -1 : -2);
|
|
282
|
+
const separatorIndex = body.indexOf(";");
|
|
283
|
+
if (separatorIndex === -1) {
|
|
284
|
+
return undefined;
|
|
285
|
+
}
|
|
286
|
+
const params = body.slice(0, separatorIndex);
|
|
287
|
+
const url = body.slice(separatorIndex + 1);
|
|
288
|
+
if (!url) {
|
|
289
|
+
return null;
|
|
290
|
+
}
|
|
291
|
+
return { params, url, terminator };
|
|
292
|
+
}
|
|
293
|
+
function formatOsc8Hyperlink(hyperlink) {
|
|
294
|
+
return `\x1b]8;${hyperlink.params};${hyperlink.url}${hyperlink.terminator}`;
|
|
295
|
+
}
|
|
296
|
+
function formatOsc8Close(terminator) {
|
|
297
|
+
return `\x1b]8;;${terminator}`;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Track active ANSI SGR codes to preserve styling across line breaks.
|
|
301
|
+
*/
|
|
302
|
+
class AnsiCodeTracker {
|
|
303
|
+
// Track individual attributes separately so we can reset them specifically
|
|
304
|
+
bold = false;
|
|
305
|
+
dim = false;
|
|
306
|
+
italic = false;
|
|
307
|
+
underline = false;
|
|
308
|
+
blink = false;
|
|
309
|
+
inverse = false;
|
|
310
|
+
hidden = false;
|
|
311
|
+
strikethrough = false;
|
|
312
|
+
fgColor = null; // Stores the full code like "31" or "38;5;240"
|
|
313
|
+
bgColor = null; // Stores the full code like "41" or "48;5;240"
|
|
314
|
+
activeHyperlink = null;
|
|
315
|
+
process(ansiCode) {
|
|
316
|
+
// OSC 8 hyperlink: \x1b]8;;<url>\x1b\\ (open) or \x1b]8;;\x1b\\ (close).
|
|
317
|
+
// Preserve the original terminator because some terminals only make BEL-terminated
|
|
318
|
+
// links clickable. OAuth login URLs use BEL, so reopening wrapped lines with ST
|
|
319
|
+
// made only the first physical line clickable in those terminals.
|
|
320
|
+
const hyperlink = parseOsc8Hyperlink(ansiCode);
|
|
321
|
+
if (hyperlink !== undefined) {
|
|
322
|
+
this.activeHyperlink = hyperlink;
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
if (!ansiCode.endsWith("m")) {
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
// Extract the parameters between \x1b[ and m
|
|
329
|
+
const match = ansiCode.match(/\x1b\[([\d;]*)m/);
|
|
330
|
+
if (!match)
|
|
331
|
+
return;
|
|
332
|
+
const params = match[1];
|
|
333
|
+
if (params === "" || params === "0") {
|
|
334
|
+
// Full reset
|
|
335
|
+
this.reset();
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
// Parse parameters (can be semicolon-separated)
|
|
339
|
+
const parts = params.split(";");
|
|
340
|
+
let i = 0;
|
|
341
|
+
while (i < parts.length) {
|
|
342
|
+
const code = Number.parseInt(parts[i], 10);
|
|
343
|
+
// Handle 256-color and RGB codes which consume multiple parameters
|
|
344
|
+
if (code === 38 || code === 48) {
|
|
345
|
+
// 38;5;N (256 color fg) or 38;2;R;G;B (RGB fg)
|
|
346
|
+
// 48;5;N (256 color bg) or 48;2;R;G;B (RGB bg)
|
|
347
|
+
if (parts[i + 1] === "5" && parts[i + 2] !== undefined) {
|
|
348
|
+
// 256 color: 38;5;N or 48;5;N
|
|
349
|
+
const colorCode = `${parts[i]};${parts[i + 1]};${parts[i + 2]}`;
|
|
350
|
+
if (code === 38) {
|
|
351
|
+
this.fgColor = colorCode;
|
|
352
|
+
}
|
|
353
|
+
else {
|
|
354
|
+
this.bgColor = colorCode;
|
|
355
|
+
}
|
|
356
|
+
i += 3;
|
|
357
|
+
continue;
|
|
358
|
+
}
|
|
359
|
+
else if (parts[i + 1] === "2" && parts[i + 4] !== undefined) {
|
|
360
|
+
// RGB color: 38;2;R;G;B or 48;2;R;G;B
|
|
361
|
+
const colorCode = `${parts[i]};${parts[i + 1]};${parts[i + 2]};${parts[i + 3]};${parts[i + 4]}`;
|
|
362
|
+
if (code === 38) {
|
|
363
|
+
this.fgColor = colorCode;
|
|
364
|
+
}
|
|
365
|
+
else {
|
|
366
|
+
this.bgColor = colorCode;
|
|
367
|
+
}
|
|
368
|
+
i += 5;
|
|
369
|
+
continue;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
// Standard SGR codes
|
|
373
|
+
switch (code) {
|
|
374
|
+
case 0:
|
|
375
|
+
this.reset();
|
|
376
|
+
break;
|
|
377
|
+
case 1:
|
|
378
|
+
this.bold = true;
|
|
379
|
+
break;
|
|
380
|
+
case 2:
|
|
381
|
+
this.dim = true;
|
|
382
|
+
break;
|
|
383
|
+
case 3:
|
|
384
|
+
this.italic = true;
|
|
385
|
+
break;
|
|
386
|
+
case 4:
|
|
387
|
+
this.underline = true;
|
|
388
|
+
break;
|
|
389
|
+
case 5:
|
|
390
|
+
this.blink = true;
|
|
391
|
+
break;
|
|
392
|
+
case 7:
|
|
393
|
+
this.inverse = true;
|
|
394
|
+
break;
|
|
395
|
+
case 8:
|
|
396
|
+
this.hidden = true;
|
|
397
|
+
break;
|
|
398
|
+
case 9:
|
|
399
|
+
this.strikethrough = true;
|
|
400
|
+
break;
|
|
401
|
+
case 21:
|
|
402
|
+
this.bold = false;
|
|
403
|
+
break; // Some terminals
|
|
404
|
+
case 22:
|
|
405
|
+
this.bold = false;
|
|
406
|
+
this.dim = false;
|
|
407
|
+
break;
|
|
408
|
+
case 23:
|
|
409
|
+
this.italic = false;
|
|
410
|
+
break;
|
|
411
|
+
case 24:
|
|
412
|
+
this.underline = false;
|
|
413
|
+
break;
|
|
414
|
+
case 25:
|
|
415
|
+
this.blink = false;
|
|
416
|
+
break;
|
|
417
|
+
case 27:
|
|
418
|
+
this.inverse = false;
|
|
419
|
+
break;
|
|
420
|
+
case 28:
|
|
421
|
+
this.hidden = false;
|
|
422
|
+
break;
|
|
423
|
+
case 29:
|
|
424
|
+
this.strikethrough = false;
|
|
425
|
+
break;
|
|
426
|
+
case 39:
|
|
427
|
+
this.fgColor = null;
|
|
428
|
+
break; // Default fg
|
|
429
|
+
case 49:
|
|
430
|
+
this.bgColor = null;
|
|
431
|
+
break; // Default bg
|
|
432
|
+
default:
|
|
433
|
+
// Standard foreground colors 30-37, 90-97
|
|
434
|
+
if ((code >= 30 && code <= 37) || (code >= 90 && code <= 97)) {
|
|
435
|
+
this.fgColor = String(code);
|
|
436
|
+
}
|
|
437
|
+
// Standard background colors 40-47, 100-107
|
|
438
|
+
else if ((code >= 40 && code <= 47) || (code >= 100 && code <= 107)) {
|
|
439
|
+
this.bgColor = String(code);
|
|
440
|
+
}
|
|
441
|
+
break;
|
|
442
|
+
}
|
|
443
|
+
i++;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
reset() {
|
|
447
|
+
this.bold = false;
|
|
448
|
+
this.dim = false;
|
|
449
|
+
this.italic = false;
|
|
450
|
+
this.underline = false;
|
|
451
|
+
this.blink = false;
|
|
452
|
+
this.inverse = false;
|
|
453
|
+
this.hidden = false;
|
|
454
|
+
this.strikethrough = false;
|
|
455
|
+
this.fgColor = null;
|
|
456
|
+
this.bgColor = null;
|
|
457
|
+
// SGR reset does not affect OSC 8 hyperlink state
|
|
458
|
+
}
|
|
459
|
+
/** Clear all state for reuse. */
|
|
460
|
+
clear() {
|
|
461
|
+
this.reset();
|
|
462
|
+
this.activeHyperlink = null;
|
|
463
|
+
}
|
|
464
|
+
getActiveCodes() {
|
|
465
|
+
const codes = [];
|
|
466
|
+
if (this.bold)
|
|
467
|
+
codes.push("1");
|
|
468
|
+
if (this.dim)
|
|
469
|
+
codes.push("2");
|
|
470
|
+
if (this.italic)
|
|
471
|
+
codes.push("3");
|
|
472
|
+
if (this.underline)
|
|
473
|
+
codes.push("4");
|
|
474
|
+
if (this.blink)
|
|
475
|
+
codes.push("5");
|
|
476
|
+
if (this.inverse)
|
|
477
|
+
codes.push("7");
|
|
478
|
+
if (this.hidden)
|
|
479
|
+
codes.push("8");
|
|
480
|
+
if (this.strikethrough)
|
|
481
|
+
codes.push("9");
|
|
482
|
+
if (this.fgColor)
|
|
483
|
+
codes.push(this.fgColor);
|
|
484
|
+
if (this.bgColor)
|
|
485
|
+
codes.push(this.bgColor);
|
|
486
|
+
let result = codes.length > 0 ? `\x1b[${codes.join(";")}m` : "";
|
|
487
|
+
if (this.activeHyperlink) {
|
|
488
|
+
result += formatOsc8Hyperlink(this.activeHyperlink);
|
|
489
|
+
}
|
|
490
|
+
return result;
|
|
491
|
+
}
|
|
492
|
+
hasActiveCodes() {
|
|
493
|
+
return (this.bold ||
|
|
494
|
+
this.dim ||
|
|
495
|
+
this.italic ||
|
|
496
|
+
this.underline ||
|
|
497
|
+
this.blink ||
|
|
498
|
+
this.inverse ||
|
|
499
|
+
this.hidden ||
|
|
500
|
+
this.strikethrough ||
|
|
501
|
+
this.fgColor !== null ||
|
|
502
|
+
this.bgColor !== null ||
|
|
503
|
+
this.activeHyperlink !== null);
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Get reset codes for attributes that need to be turned off at line end.
|
|
507
|
+
* Underline must be closed to prevent bleeding into padding.
|
|
508
|
+
* Active OSC 8 hyperlinks must be closed and re-opened on the next line.
|
|
509
|
+
* Returns empty string if no attributes need closing.
|
|
510
|
+
*/
|
|
511
|
+
getLineEndReset() {
|
|
512
|
+
let result = "";
|
|
513
|
+
if (this.underline) {
|
|
514
|
+
result += "\x1b[24m"; // Underline off only
|
|
515
|
+
}
|
|
516
|
+
if (this.activeHyperlink) {
|
|
517
|
+
result += formatOsc8Close(this.activeHyperlink.terminator); // Re-opened at line start via getActiveCodes()
|
|
518
|
+
}
|
|
519
|
+
return result;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
function updateTrackerFromText(text, tracker) {
|
|
523
|
+
let i = 0;
|
|
524
|
+
while (i < text.length) {
|
|
525
|
+
const ansiResult = extractAnsiCode(text, i);
|
|
526
|
+
if (ansiResult) {
|
|
527
|
+
tracker.process(ansiResult.code);
|
|
528
|
+
i += ansiResult.length;
|
|
529
|
+
}
|
|
530
|
+
else {
|
|
531
|
+
i++;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* Split text into words while keeping ANSI codes attached.
|
|
537
|
+
*/
|
|
538
|
+
function splitIntoTokensWithAnsi(text) {
|
|
539
|
+
const tokens = [];
|
|
540
|
+
let current = "";
|
|
541
|
+
let pendingAnsi = ""; // ANSI codes waiting to be attached to next visible content
|
|
542
|
+
let inWhitespace = false;
|
|
543
|
+
let i = 0;
|
|
544
|
+
while (i < text.length) {
|
|
545
|
+
const ansiResult = extractAnsiCode(text, i);
|
|
546
|
+
if (ansiResult) {
|
|
547
|
+
// Hold ANSI codes separately - they'll be attached to the next visible char
|
|
548
|
+
pendingAnsi += ansiResult.code;
|
|
549
|
+
i += ansiResult.length;
|
|
550
|
+
continue;
|
|
551
|
+
}
|
|
552
|
+
const char = text[i];
|
|
553
|
+
const charIsSpace = char === " ";
|
|
554
|
+
if (charIsSpace !== inWhitespace && current) {
|
|
555
|
+
// Switching between whitespace and non-whitespace, push current token
|
|
556
|
+
tokens.push(current);
|
|
557
|
+
current = "";
|
|
558
|
+
}
|
|
559
|
+
// Attach any pending ANSI codes to this visible character
|
|
560
|
+
if (pendingAnsi) {
|
|
561
|
+
current += pendingAnsi;
|
|
562
|
+
pendingAnsi = "";
|
|
563
|
+
}
|
|
564
|
+
inWhitespace = charIsSpace;
|
|
565
|
+
current += char;
|
|
566
|
+
i++;
|
|
567
|
+
}
|
|
568
|
+
// Handle any remaining pending ANSI codes (attach to last token)
|
|
569
|
+
if (pendingAnsi) {
|
|
570
|
+
current += pendingAnsi;
|
|
571
|
+
}
|
|
572
|
+
if (current) {
|
|
573
|
+
tokens.push(current);
|
|
574
|
+
}
|
|
575
|
+
return tokens;
|
|
576
|
+
}
|
|
577
|
+
/**
|
|
578
|
+
* Wrap text with ANSI codes preserved.
|
|
579
|
+
*
|
|
580
|
+
* ONLY does word wrapping - NO padding, NO background colors.
|
|
581
|
+
* Returns lines where each line is <= width visible chars.
|
|
582
|
+
* Active ANSI codes are preserved across line breaks.
|
|
583
|
+
*
|
|
584
|
+
* @param text - Text to wrap (may contain ANSI codes and newlines)
|
|
585
|
+
* @param width - Maximum visible width per line
|
|
586
|
+
* @returns Array of wrapped lines (NOT padded to width)
|
|
587
|
+
*/
|
|
588
|
+
export function wrapTextWithAnsi(text, width) {
|
|
589
|
+
if (!text) {
|
|
590
|
+
return [""];
|
|
591
|
+
}
|
|
592
|
+
// Handle newlines by processing each line separately
|
|
593
|
+
// Track ANSI state across lines so styles carry over after literal newlines
|
|
594
|
+
const inputLines = text.split("\n");
|
|
595
|
+
const result = [];
|
|
596
|
+
const tracker = new AnsiCodeTracker();
|
|
597
|
+
for (const inputLine of inputLines) {
|
|
598
|
+
// Prepend active ANSI codes from previous lines (except for first line)
|
|
599
|
+
const prefix = result.length > 0 ? tracker.getActiveCodes() : "";
|
|
600
|
+
result.push(...wrapSingleLine(prefix + inputLine, width));
|
|
601
|
+
// Update tracker with codes from this line for next iteration
|
|
602
|
+
updateTrackerFromText(inputLine, tracker);
|
|
603
|
+
}
|
|
604
|
+
return result.length > 0 ? result : [""];
|
|
605
|
+
}
|
|
606
|
+
function wrapSingleLine(line, width) {
|
|
607
|
+
if (!line) {
|
|
608
|
+
return [""];
|
|
609
|
+
}
|
|
610
|
+
const visibleLength = visibleWidth(line);
|
|
611
|
+
if (visibleLength <= width) {
|
|
612
|
+
return [line];
|
|
613
|
+
}
|
|
614
|
+
const wrapped = [];
|
|
615
|
+
const tracker = new AnsiCodeTracker();
|
|
616
|
+
const tokens = splitIntoTokensWithAnsi(line);
|
|
617
|
+
let currentLine = "";
|
|
618
|
+
let currentVisibleLength = 0;
|
|
619
|
+
for (const token of tokens) {
|
|
620
|
+
const tokenVisibleLength = visibleWidth(token);
|
|
621
|
+
const isWhitespace = token.trim() === "";
|
|
622
|
+
// Token itself is too long - break it character by character
|
|
623
|
+
if (tokenVisibleLength > width && !isWhitespace) {
|
|
624
|
+
if (currentLine) {
|
|
625
|
+
// Add specific reset for underline only (preserves background)
|
|
626
|
+
const lineEndReset = tracker.getLineEndReset();
|
|
627
|
+
if (lineEndReset) {
|
|
628
|
+
currentLine += lineEndReset;
|
|
629
|
+
}
|
|
630
|
+
wrapped.push(currentLine);
|
|
631
|
+
currentLine = "";
|
|
632
|
+
currentVisibleLength = 0;
|
|
633
|
+
}
|
|
634
|
+
// Break long token - breakLongWord handles its own resets
|
|
635
|
+
const broken = breakLongWord(token, width, tracker);
|
|
636
|
+
wrapped.push(...broken.slice(0, -1));
|
|
637
|
+
currentLine = broken[broken.length - 1];
|
|
638
|
+
currentVisibleLength = visibleWidth(currentLine);
|
|
639
|
+
continue;
|
|
640
|
+
}
|
|
641
|
+
// Check if adding this token would exceed width
|
|
642
|
+
const totalNeeded = currentVisibleLength + tokenVisibleLength;
|
|
643
|
+
if (totalNeeded > width && currentVisibleLength > 0) {
|
|
644
|
+
// Trim trailing whitespace, then add underline reset (not full reset, to preserve background)
|
|
645
|
+
let lineToWrap = currentLine.trimEnd();
|
|
646
|
+
const lineEndReset = tracker.getLineEndReset();
|
|
647
|
+
if (lineEndReset) {
|
|
648
|
+
lineToWrap += lineEndReset;
|
|
649
|
+
}
|
|
650
|
+
wrapped.push(lineToWrap);
|
|
651
|
+
if (isWhitespace) {
|
|
652
|
+
// Don't start new line with whitespace
|
|
653
|
+
currentLine = tracker.getActiveCodes();
|
|
654
|
+
currentVisibleLength = 0;
|
|
655
|
+
}
|
|
656
|
+
else {
|
|
657
|
+
currentLine = tracker.getActiveCodes() + token;
|
|
658
|
+
currentVisibleLength = tokenVisibleLength;
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
else {
|
|
662
|
+
// Add to current line
|
|
663
|
+
currentLine += token;
|
|
664
|
+
currentVisibleLength += tokenVisibleLength;
|
|
665
|
+
}
|
|
666
|
+
updateTrackerFromText(token, tracker);
|
|
667
|
+
}
|
|
668
|
+
if (currentLine) {
|
|
669
|
+
// No reset at end of final line - let caller handle it
|
|
670
|
+
wrapped.push(currentLine);
|
|
671
|
+
}
|
|
672
|
+
// Trailing whitespace can cause lines to exceed the requested width
|
|
673
|
+
return wrapped.length > 0 ? wrapped.map((line) => line.trimEnd()) : [""];
|
|
674
|
+
}
|
|
675
|
+
const PUNCTUATION_REGEX = /[(){}[\]<>.,;:'"!?+\-=*/\\|&%^$#@~`]/;
|
|
676
|
+
/**
|
|
677
|
+
* Check if a character is whitespace.
|
|
678
|
+
*/
|
|
679
|
+
export function isWhitespaceChar(char) {
|
|
680
|
+
return /\s/.test(char);
|
|
681
|
+
}
|
|
682
|
+
/**
|
|
683
|
+
* Check if a character is punctuation.
|
|
684
|
+
*/
|
|
685
|
+
export function isPunctuationChar(char) {
|
|
686
|
+
return PUNCTUATION_REGEX.test(char);
|
|
687
|
+
}
|
|
688
|
+
function breakLongWord(word, width, tracker) {
|
|
689
|
+
const lines = [];
|
|
690
|
+
let currentLine = tracker.getActiveCodes();
|
|
691
|
+
let currentWidth = 0;
|
|
692
|
+
// First, separate ANSI codes from visible content
|
|
693
|
+
// We need to handle ANSI codes specially since they're not graphemes
|
|
694
|
+
let i = 0;
|
|
695
|
+
const segments = [];
|
|
696
|
+
while (i < word.length) {
|
|
697
|
+
const ansiResult = extractAnsiCode(word, i);
|
|
698
|
+
if (ansiResult) {
|
|
699
|
+
segments.push({ type: "ansi", value: ansiResult.code });
|
|
700
|
+
i += ansiResult.length;
|
|
701
|
+
}
|
|
702
|
+
else {
|
|
703
|
+
// Find the next ANSI code or end of string
|
|
704
|
+
let end = i;
|
|
705
|
+
while (end < word.length) {
|
|
706
|
+
const nextAnsi = extractAnsiCode(word, end);
|
|
707
|
+
if (nextAnsi)
|
|
708
|
+
break;
|
|
709
|
+
end++;
|
|
710
|
+
}
|
|
711
|
+
// Segment this non-ANSI portion into graphemes
|
|
712
|
+
const textPortion = word.slice(i, end);
|
|
713
|
+
for (const seg of segmenter.segment(textPortion)) {
|
|
714
|
+
segments.push({ type: "grapheme", value: seg.segment });
|
|
715
|
+
}
|
|
716
|
+
i = end;
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
// Now process segments
|
|
720
|
+
for (const seg of segments) {
|
|
721
|
+
if (seg.type === "ansi") {
|
|
722
|
+
currentLine += seg.value;
|
|
723
|
+
tracker.process(seg.value);
|
|
724
|
+
continue;
|
|
725
|
+
}
|
|
726
|
+
const grapheme = seg.value;
|
|
727
|
+
// Skip empty graphemes to avoid issues with string-width calculation
|
|
728
|
+
if (!grapheme)
|
|
729
|
+
continue;
|
|
730
|
+
const graphemeWidth = visibleWidth(grapheme);
|
|
731
|
+
if (currentWidth + graphemeWidth > width) {
|
|
732
|
+
// Add specific reset for underline only (preserves background)
|
|
733
|
+
const lineEndReset = tracker.getLineEndReset();
|
|
734
|
+
if (lineEndReset) {
|
|
735
|
+
currentLine += lineEndReset;
|
|
736
|
+
}
|
|
737
|
+
lines.push(currentLine);
|
|
738
|
+
currentLine = tracker.getActiveCodes();
|
|
739
|
+
currentWidth = 0;
|
|
740
|
+
}
|
|
741
|
+
currentLine += grapheme;
|
|
742
|
+
currentWidth += graphemeWidth;
|
|
743
|
+
}
|
|
744
|
+
if (currentLine) {
|
|
745
|
+
// No reset at end of final segment - caller handles continuation
|
|
746
|
+
lines.push(currentLine);
|
|
747
|
+
}
|
|
748
|
+
return lines.length > 0 ? lines : [""];
|
|
749
|
+
}
|
|
750
|
+
/**
|
|
751
|
+
* Apply background color to a line, padding to full width.
|
|
752
|
+
*
|
|
753
|
+
* @param line - Line of text (may contain ANSI codes)
|
|
754
|
+
* @param width - Total width to pad to
|
|
755
|
+
* @param bgFn - Background color function
|
|
756
|
+
* @returns Line with background applied and padded to width
|
|
757
|
+
*/
|
|
758
|
+
export function applyBackgroundToLine(line, width, bgFn) {
|
|
759
|
+
// Calculate padding needed
|
|
760
|
+
const visibleLen = visibleWidth(line);
|
|
761
|
+
const paddingNeeded = Math.max(0, width - visibleLen);
|
|
762
|
+
const padding = " ".repeat(paddingNeeded);
|
|
763
|
+
// Apply background to content + padding
|
|
764
|
+
const withPadding = line + padding;
|
|
765
|
+
const marker = "\x1fpi-bg-marker\x1f";
|
|
766
|
+
const wrappedMarker = bgFn(marker);
|
|
767
|
+
const markerIndex = wrappedMarker.indexOf(marker);
|
|
768
|
+
if (markerIndex === -1) {
|
|
769
|
+
return bgFn(withPadding);
|
|
770
|
+
}
|
|
771
|
+
const bgStart = wrappedMarker.slice(0, markerIndex);
|
|
772
|
+
const bgEnd = wrappedMarker.slice(markerIndex + marker.length);
|
|
773
|
+
const restored = withPadding.replace(/\x1b\[([0-9;]*)m/g, (sequence, params) => {
|
|
774
|
+
if (params === "" || params.split(";").some((param) => param === "0" || param === "49")) {
|
|
775
|
+
return `${sequence}${bgStart}`;
|
|
776
|
+
}
|
|
777
|
+
return sequence;
|
|
778
|
+
});
|
|
779
|
+
return `${bgStart}${restored}${bgEnd}`;
|
|
780
|
+
}
|
|
781
|
+
/**
|
|
782
|
+
* Truncate text to fit within a maximum visible width, adding ellipsis if needed.
|
|
783
|
+
* Optionally pad with spaces to reach exactly maxWidth.
|
|
784
|
+
* Properly handles ANSI escape codes (they don't count toward width).
|
|
785
|
+
*
|
|
786
|
+
* @param text - Text to truncate (may contain ANSI codes)
|
|
787
|
+
* @param maxWidth - Maximum visible width
|
|
788
|
+
* @param ellipsis - Ellipsis string to append when truncating (default: "...")
|
|
789
|
+
* @param pad - If true, pad result with spaces to exactly maxWidth (default: false)
|
|
790
|
+
* @returns Truncated text, optionally padded to exactly maxWidth
|
|
791
|
+
*/
|
|
792
|
+
export function truncateToWidth(text, maxWidth, ellipsis = "...", pad = false) {
|
|
793
|
+
if (maxWidth <= 0) {
|
|
794
|
+
return "";
|
|
795
|
+
}
|
|
796
|
+
if (text.length === 0) {
|
|
797
|
+
return pad ? " ".repeat(maxWidth) : "";
|
|
798
|
+
}
|
|
799
|
+
const ellipsisWidth = visibleWidth(ellipsis);
|
|
800
|
+
if (ellipsisWidth >= maxWidth) {
|
|
801
|
+
const textWidth = visibleWidth(text);
|
|
802
|
+
if (textWidth <= maxWidth) {
|
|
803
|
+
return pad ? text + " ".repeat(maxWidth - textWidth) : text;
|
|
804
|
+
}
|
|
805
|
+
const clippedEllipsis = truncateFragmentToWidth(ellipsis, maxWidth);
|
|
806
|
+
if (clippedEllipsis.width === 0) {
|
|
807
|
+
return pad ? " ".repeat(maxWidth) : "";
|
|
808
|
+
}
|
|
809
|
+
return finalizeTruncatedResult("", 0, clippedEllipsis.text, clippedEllipsis.width, maxWidth, pad);
|
|
810
|
+
}
|
|
811
|
+
if (isPrintableAscii(text)) {
|
|
812
|
+
if (text.length <= maxWidth) {
|
|
813
|
+
return pad ? text + " ".repeat(maxWidth - text.length) : text;
|
|
814
|
+
}
|
|
815
|
+
const targetWidth = maxWidth - ellipsisWidth;
|
|
816
|
+
return finalizeTruncatedResult(text.slice(0, targetWidth), targetWidth, ellipsis, ellipsisWidth, maxWidth, pad);
|
|
817
|
+
}
|
|
818
|
+
const targetWidth = maxWidth - ellipsisWidth;
|
|
819
|
+
let result = "";
|
|
820
|
+
let pendingAnsi = "";
|
|
821
|
+
let visibleSoFar = 0;
|
|
822
|
+
let keptWidth = 0;
|
|
823
|
+
let keepContiguousPrefix = true;
|
|
824
|
+
let overflowed = false;
|
|
825
|
+
let exhaustedInput = false;
|
|
826
|
+
const hasAnsi = text.includes("\x1b");
|
|
827
|
+
const hasTabs = text.includes("\t");
|
|
828
|
+
if (!hasAnsi && !hasTabs) {
|
|
829
|
+
for (const { segment } of segmenter.segment(text)) {
|
|
830
|
+
const width = graphemeWidth(segment);
|
|
831
|
+
if (keepContiguousPrefix && keptWidth + width <= targetWidth) {
|
|
832
|
+
result += segment;
|
|
833
|
+
keptWidth += width;
|
|
834
|
+
}
|
|
835
|
+
else {
|
|
836
|
+
keepContiguousPrefix = false;
|
|
837
|
+
}
|
|
838
|
+
visibleSoFar += width;
|
|
839
|
+
if (visibleSoFar > maxWidth) {
|
|
840
|
+
overflowed = true;
|
|
841
|
+
break;
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
exhaustedInput = !overflowed;
|
|
845
|
+
}
|
|
846
|
+
else {
|
|
847
|
+
let i = 0;
|
|
848
|
+
while (i < text.length) {
|
|
849
|
+
const ansi = extractAnsiCode(text, i);
|
|
850
|
+
if (ansi) {
|
|
851
|
+
pendingAnsi += ansi.code;
|
|
852
|
+
i += ansi.length;
|
|
853
|
+
continue;
|
|
854
|
+
}
|
|
855
|
+
if (text[i] === "\t") {
|
|
856
|
+
if (keepContiguousPrefix && keptWidth + 3 <= targetWidth) {
|
|
857
|
+
if (pendingAnsi) {
|
|
858
|
+
result += pendingAnsi;
|
|
859
|
+
pendingAnsi = "";
|
|
860
|
+
}
|
|
861
|
+
result += "\t";
|
|
862
|
+
keptWidth += 3;
|
|
863
|
+
}
|
|
864
|
+
else {
|
|
865
|
+
keepContiguousPrefix = false;
|
|
866
|
+
pendingAnsi = "";
|
|
867
|
+
}
|
|
868
|
+
visibleSoFar += 3;
|
|
869
|
+
if (visibleSoFar > maxWidth) {
|
|
870
|
+
overflowed = true;
|
|
871
|
+
break;
|
|
872
|
+
}
|
|
873
|
+
i++;
|
|
874
|
+
continue;
|
|
875
|
+
}
|
|
876
|
+
let end = i;
|
|
877
|
+
while (end < text.length && text[end] !== "\t") {
|
|
878
|
+
const nextAnsi = extractAnsiCode(text, end);
|
|
879
|
+
if (nextAnsi) {
|
|
880
|
+
break;
|
|
881
|
+
}
|
|
882
|
+
end++;
|
|
883
|
+
}
|
|
884
|
+
for (const { segment } of segmenter.segment(text.slice(i, end))) {
|
|
885
|
+
const width = graphemeWidth(segment);
|
|
886
|
+
if (keepContiguousPrefix && keptWidth + width <= targetWidth) {
|
|
887
|
+
if (pendingAnsi) {
|
|
888
|
+
result += pendingAnsi;
|
|
889
|
+
pendingAnsi = "";
|
|
890
|
+
}
|
|
891
|
+
result += segment;
|
|
892
|
+
keptWidth += width;
|
|
893
|
+
}
|
|
894
|
+
else {
|
|
895
|
+
keepContiguousPrefix = false;
|
|
896
|
+
pendingAnsi = "";
|
|
897
|
+
}
|
|
898
|
+
visibleSoFar += width;
|
|
899
|
+
if (visibleSoFar > maxWidth) {
|
|
900
|
+
overflowed = true;
|
|
901
|
+
break;
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
if (overflowed) {
|
|
905
|
+
break;
|
|
906
|
+
}
|
|
907
|
+
i = end;
|
|
908
|
+
}
|
|
909
|
+
exhaustedInput = i >= text.length;
|
|
910
|
+
}
|
|
911
|
+
if (!overflowed && exhaustedInput) {
|
|
912
|
+
return pad ? text + " ".repeat(Math.max(0, maxWidth - visibleSoFar)) : text;
|
|
913
|
+
}
|
|
914
|
+
return finalizeTruncatedResult(result, keptWidth, ellipsis, ellipsisWidth, maxWidth, pad);
|
|
915
|
+
}
|
|
916
|
+
/**
|
|
917
|
+
* Extract a range of visible columns from a line. Handles ANSI codes and wide chars.
|
|
918
|
+
* @param strict - If true, exclude wide chars at boundary that would extend past the range
|
|
919
|
+
*/
|
|
920
|
+
export function sliceByColumn(line, startCol, length, strict = false) {
|
|
921
|
+
return sliceWithWidth(line, startCol, length, strict).text;
|
|
922
|
+
}
|
|
923
|
+
/** Like sliceByColumn but also returns the actual visible width of the result. */
|
|
924
|
+
export function sliceWithWidth(line, startCol, length, strict = false) {
|
|
925
|
+
if (length <= 0)
|
|
926
|
+
return { text: "", width: 0 };
|
|
927
|
+
const endCol = startCol + length;
|
|
928
|
+
let result = "", resultWidth = 0, currentCol = 0, i = 0, pendingAnsi = "";
|
|
929
|
+
while (i < line.length) {
|
|
930
|
+
const ansi = extractAnsiCode(line, i);
|
|
931
|
+
if (ansi) {
|
|
932
|
+
if (currentCol >= startCol && currentCol < endCol)
|
|
933
|
+
result += ansi.code;
|
|
934
|
+
else if (currentCol < startCol)
|
|
935
|
+
pendingAnsi += ansi.code;
|
|
936
|
+
i += ansi.length;
|
|
937
|
+
continue;
|
|
938
|
+
}
|
|
939
|
+
let textEnd = i;
|
|
940
|
+
while (textEnd < line.length && !extractAnsiCode(line, textEnd))
|
|
941
|
+
textEnd++;
|
|
942
|
+
for (const { segment } of segmenter.segment(line.slice(i, textEnd))) {
|
|
943
|
+
const w = graphemeWidth(segment);
|
|
944
|
+
const inRange = currentCol >= startCol && currentCol < endCol;
|
|
945
|
+
const fits = !strict || currentCol + w <= endCol;
|
|
946
|
+
if (inRange && fits) {
|
|
947
|
+
if (pendingAnsi) {
|
|
948
|
+
result += pendingAnsi;
|
|
949
|
+
pendingAnsi = "";
|
|
950
|
+
}
|
|
951
|
+
result += segment;
|
|
952
|
+
resultWidth += w;
|
|
953
|
+
}
|
|
954
|
+
currentCol += w;
|
|
955
|
+
if (currentCol >= endCol)
|
|
956
|
+
break;
|
|
957
|
+
}
|
|
958
|
+
i = textEnd;
|
|
959
|
+
if (currentCol >= endCol)
|
|
960
|
+
break;
|
|
961
|
+
}
|
|
962
|
+
return { text: result, width: resultWidth };
|
|
963
|
+
}
|
|
964
|
+
// Pooled tracker instance for extractSegments (avoids allocation per call)
|
|
965
|
+
const pooledStyleTracker = new AnsiCodeTracker();
|
|
966
|
+
/**
|
|
967
|
+
* Extract "before" and "after" segments from a line in a single pass.
|
|
968
|
+
* Used for overlay compositing where we need content before and after the overlay region.
|
|
969
|
+
* Preserves styling from before the overlay that should affect content after it.
|
|
970
|
+
*/
|
|
971
|
+
export function extractSegments(line, beforeEnd, afterStart, afterLen, strictAfter = false) {
|
|
972
|
+
let before = "", beforeWidth = 0, after = "", afterWidth = 0;
|
|
973
|
+
let currentCol = 0, i = 0;
|
|
974
|
+
let pendingAnsiBefore = "";
|
|
975
|
+
let afterStarted = false;
|
|
976
|
+
const afterEnd = afterStart + afterLen;
|
|
977
|
+
// Track styling state so "after" inherits styling from before the overlay
|
|
978
|
+
pooledStyleTracker.clear();
|
|
979
|
+
while (i < line.length) {
|
|
980
|
+
const ansi = extractAnsiCode(line, i);
|
|
981
|
+
if (ansi) {
|
|
982
|
+
// Track all SGR codes to know styling state at afterStart
|
|
983
|
+
pooledStyleTracker.process(ansi.code);
|
|
984
|
+
// Include ANSI codes in their respective segments
|
|
985
|
+
if (currentCol < beforeEnd) {
|
|
986
|
+
pendingAnsiBefore += ansi.code;
|
|
987
|
+
}
|
|
988
|
+
else if (currentCol >= afterStart && currentCol < afterEnd && afterStarted) {
|
|
989
|
+
// Only include after we've started "after" (styling already prepended)
|
|
990
|
+
after += ansi.code;
|
|
991
|
+
}
|
|
992
|
+
i += ansi.length;
|
|
993
|
+
continue;
|
|
994
|
+
}
|
|
995
|
+
let textEnd = i;
|
|
996
|
+
while (textEnd < line.length && !extractAnsiCode(line, textEnd))
|
|
997
|
+
textEnd++;
|
|
998
|
+
for (const { segment } of segmenter.segment(line.slice(i, textEnd))) {
|
|
999
|
+
const w = graphemeWidth(segment);
|
|
1000
|
+
if (currentCol < beforeEnd) {
|
|
1001
|
+
if (pendingAnsiBefore) {
|
|
1002
|
+
before += pendingAnsiBefore;
|
|
1003
|
+
pendingAnsiBefore = "";
|
|
1004
|
+
}
|
|
1005
|
+
before += segment;
|
|
1006
|
+
beforeWidth += w;
|
|
1007
|
+
}
|
|
1008
|
+
else if (currentCol >= afterStart && currentCol < afterEnd) {
|
|
1009
|
+
const fits = !strictAfter || currentCol + w <= afterEnd;
|
|
1010
|
+
if (fits) {
|
|
1011
|
+
// On first "after" grapheme, prepend inherited styling from before overlay
|
|
1012
|
+
if (!afterStarted) {
|
|
1013
|
+
after += pooledStyleTracker.getActiveCodes();
|
|
1014
|
+
afterStarted = true;
|
|
1015
|
+
}
|
|
1016
|
+
after += segment;
|
|
1017
|
+
afterWidth += w;
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
currentCol += w;
|
|
1021
|
+
// Early exit: done with "before" only, or done with both segments
|
|
1022
|
+
if (afterLen <= 0 ? currentCol >= beforeEnd : currentCol >= afterEnd)
|
|
1023
|
+
break;
|
|
1024
|
+
}
|
|
1025
|
+
i = textEnd;
|
|
1026
|
+
if (afterLen <= 0 ? currentCol >= beforeEnd : currentCol >= afterEnd)
|
|
1027
|
+
break;
|
|
1028
|
+
}
|
|
1029
|
+
return { before, beforeWidth, after, afterWidth };
|
|
1030
|
+
}
|
|
1031
|
+
//# sourceMappingURL=utils.js.map
|