@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,787 @@
|
|
|
1
|
+
import { BedrockRuntimeClient, BedrockRuntimeServiceException, StopReason as BedrockStopReason, CachePointType, CacheTTL, ConversationRole, ConverseStreamCommand, ImageFormat, ToolResultStatus, } from "@aws-sdk/client-bedrock-runtime";
|
|
2
|
+
import { NodeHttpHandler } from "@smithy/node-http-handler";
|
|
3
|
+
import { calculateCost } from "../models.js";
|
|
4
|
+
import { AssistantMessageEventStream } from "../utils/event-stream.js";
|
|
5
|
+
import { parseStreamingJson } from "../utils/json-parse.js";
|
|
6
|
+
import { createHttpProxyAgentsForTarget } from "../utils/node-http-proxy.js";
|
|
7
|
+
import { sanitizeSurrogates } from "../utils/sanitize-unicode.js";
|
|
8
|
+
import { adjustMaxTokensForThinking, applyExtraBody, BEDROCK_RESERVED_BODY_KEYS, buildBaseOptions, clampReasoning, } from "./simple-options.js";
|
|
9
|
+
import { transformMessages } from "./transform-messages.js";
|
|
10
|
+
export const streamBedrock = (model, context, options = {}) => {
|
|
11
|
+
const stream = new AssistantMessageEventStream();
|
|
12
|
+
(async () => {
|
|
13
|
+
const output = {
|
|
14
|
+
role: "assistant",
|
|
15
|
+
content: [],
|
|
16
|
+
api: "bedrock-converse-stream",
|
|
17
|
+
provider: model.provider,
|
|
18
|
+
model: model.id,
|
|
19
|
+
usage: {
|
|
20
|
+
input: 0,
|
|
21
|
+
output: 0,
|
|
22
|
+
cacheRead: 0,
|
|
23
|
+
cacheWrite: 0,
|
|
24
|
+
totalTokens: 0,
|
|
25
|
+
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 },
|
|
26
|
+
},
|
|
27
|
+
stopReason: "stop",
|
|
28
|
+
timestamp: Date.now(),
|
|
29
|
+
};
|
|
30
|
+
const blocks = output.content;
|
|
31
|
+
const config = {
|
|
32
|
+
profile: options.profile,
|
|
33
|
+
};
|
|
34
|
+
const configuredRegion = getConfiguredBedrockRegion(options);
|
|
35
|
+
const hasConfiguredProfile = hasConfiguredBedrockProfile();
|
|
36
|
+
const endpointRegion = getStandardBedrockEndpointRegion(model.baseUrl);
|
|
37
|
+
const useExplicitEndpoint = shouldUseExplicitBedrockEndpoint(model.baseUrl, configuredRegion, hasConfiguredProfile);
|
|
38
|
+
// Only pin standard AWS Bedrock runtime endpoints when no region/profile is configured.
|
|
39
|
+
// This preserves custom endpoints (VPC/proxy) from #3402 without forcing built-in
|
|
40
|
+
// catalog defaults such as us-east-1 to override AWS_REGION/AWS_PROFILE.
|
|
41
|
+
if (useExplicitEndpoint) {
|
|
42
|
+
config.endpoint = model.baseUrl;
|
|
43
|
+
}
|
|
44
|
+
// Resolve bearer token for Bedrock API key auth.
|
|
45
|
+
const bearerToken = options.bearerToken || process.env.AWS_BEARER_TOKEN_BEDROCK || undefined;
|
|
46
|
+
const useBearerToken = bearerToken !== undefined && process.env.AWS_BEDROCK_SKIP_AUTH !== "1";
|
|
47
|
+
// in Node.js/Bun environment only
|
|
48
|
+
if (typeof process !== "undefined" && (process.versions?.node || process.versions?.bun)) {
|
|
49
|
+
// Region resolution: explicit option > env vars > SDK default chain.
|
|
50
|
+
// When AWS_PROFILE is set, we leave region undefined so the SDK can
|
|
51
|
+
// resovle it from aws profile configs. Otherwise fall back to us-east-1.
|
|
52
|
+
if (configuredRegion) {
|
|
53
|
+
config.region = configuredRegion;
|
|
54
|
+
}
|
|
55
|
+
else if (endpointRegion && useExplicitEndpoint) {
|
|
56
|
+
config.region = endpointRegion;
|
|
57
|
+
}
|
|
58
|
+
else if (!hasConfiguredProfile) {
|
|
59
|
+
config.region = "us-east-1";
|
|
60
|
+
}
|
|
61
|
+
// Support proxies that don't need authentication
|
|
62
|
+
if (process.env.AWS_BEDROCK_SKIP_AUTH === "1") {
|
|
63
|
+
config.credentials = {
|
|
64
|
+
accessKeyId: "dummy-access-key",
|
|
65
|
+
secretAccessKey: "dummy-secret-key",
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
const proxyAgents = createHttpProxyAgentsForTarget(model.baseUrl);
|
|
69
|
+
if (proxyAgents) {
|
|
70
|
+
// Bedrock runtime uses NodeHttp2Handler by default since v3.798.0, which is based
|
|
71
|
+
// on `http2` module and has no support for http agent.
|
|
72
|
+
// Use NodeHttpHandler to support HTTP(S) proxy agents.
|
|
73
|
+
config.requestHandler = new NodeHttpHandler(proxyAgents);
|
|
74
|
+
}
|
|
75
|
+
else if (process.env.AWS_BEDROCK_FORCE_HTTP1 === "1") {
|
|
76
|
+
// Some custom endpoints require HTTP/1.1 instead of HTTP/2
|
|
77
|
+
config.requestHandler = new NodeHttpHandler();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
// Non-Node environment (browser): fall back to us-east-1 since
|
|
82
|
+
// there's no config file resolution available.
|
|
83
|
+
config.region =
|
|
84
|
+
configuredRegion || (endpointRegion && useExplicitEndpoint ? endpointRegion : undefined) || "us-east-1";
|
|
85
|
+
}
|
|
86
|
+
if (useBearerToken) {
|
|
87
|
+
config.token = { token: bearerToken };
|
|
88
|
+
config.authSchemePreference = ["httpBearerAuth"];
|
|
89
|
+
}
|
|
90
|
+
try {
|
|
91
|
+
const client = new BedrockRuntimeClient(config);
|
|
92
|
+
const cacheRetention = resolveCacheRetention(options.cacheRetention);
|
|
93
|
+
let commandInput = {
|
|
94
|
+
modelId: model.id,
|
|
95
|
+
messages: convertMessages(context, model, cacheRetention, {
|
|
96
|
+
preserveThinking: options.reasoning !== undefined,
|
|
97
|
+
}),
|
|
98
|
+
system: buildSystemPrompt(context.systemPrompt, model, cacheRetention),
|
|
99
|
+
inferenceConfig: {
|
|
100
|
+
...(options.maxTokens !== undefined && { maxTokens: options.maxTokens }),
|
|
101
|
+
...(options.temperature !== undefined && { temperature: options.temperature }),
|
|
102
|
+
},
|
|
103
|
+
toolConfig: convertToolConfig(context.tools, options.toolChoice),
|
|
104
|
+
additionalModelRequestFields: buildAdditionalModelRequestFields(model, options),
|
|
105
|
+
...(options.requestMetadata !== undefined && { requestMetadata: options.requestMetadata }),
|
|
106
|
+
};
|
|
107
|
+
applyExtraBody(commandInput, options.extraBody, BEDROCK_RESERVED_BODY_KEYS);
|
|
108
|
+
const nextCommandInput = await options?.onPayload?.(commandInput, model);
|
|
109
|
+
if (nextCommandInput !== undefined) {
|
|
110
|
+
commandInput = nextCommandInput;
|
|
111
|
+
}
|
|
112
|
+
const command = new ConverseStreamCommand(commandInput);
|
|
113
|
+
const response = await client.send(command, { abortSignal: options.signal });
|
|
114
|
+
if (response.$metadata.httpStatusCode !== undefined) {
|
|
115
|
+
const responseHeaders = {};
|
|
116
|
+
if (response.$metadata.requestId) {
|
|
117
|
+
responseHeaders["x-amzn-requestid"] = response.$metadata.requestId;
|
|
118
|
+
}
|
|
119
|
+
await options?.onResponse?.({ status: response.$metadata.httpStatusCode, headers: responseHeaders }, model);
|
|
120
|
+
}
|
|
121
|
+
for await (const item of response.stream) {
|
|
122
|
+
if (item.messageStart) {
|
|
123
|
+
if (item.messageStart.role !== ConversationRole.ASSISTANT) {
|
|
124
|
+
throw new Error("Unexpected assistant message start but got user message start instead");
|
|
125
|
+
}
|
|
126
|
+
stream.push({ type: "start", partial: output });
|
|
127
|
+
}
|
|
128
|
+
else if (item.contentBlockStart) {
|
|
129
|
+
handleContentBlockStart(item.contentBlockStart, blocks, output, stream);
|
|
130
|
+
}
|
|
131
|
+
else if (item.contentBlockDelta) {
|
|
132
|
+
handleContentBlockDelta(item.contentBlockDelta, blocks, output, stream);
|
|
133
|
+
}
|
|
134
|
+
else if (item.contentBlockStop) {
|
|
135
|
+
handleContentBlockStop(item.contentBlockStop, blocks, output, stream);
|
|
136
|
+
}
|
|
137
|
+
else if (item.messageStop) {
|
|
138
|
+
output.stopReason = mapStopReason(item.messageStop.stopReason);
|
|
139
|
+
}
|
|
140
|
+
else if (item.metadata) {
|
|
141
|
+
handleMetadata(item.metadata, model, output);
|
|
142
|
+
}
|
|
143
|
+
else if (item.internalServerException) {
|
|
144
|
+
throw item.internalServerException;
|
|
145
|
+
}
|
|
146
|
+
else if (item.modelStreamErrorException) {
|
|
147
|
+
throw item.modelStreamErrorException;
|
|
148
|
+
}
|
|
149
|
+
else if (item.validationException) {
|
|
150
|
+
throw item.validationException;
|
|
151
|
+
}
|
|
152
|
+
else if (item.throttlingException) {
|
|
153
|
+
throw item.throttlingException;
|
|
154
|
+
}
|
|
155
|
+
else if (item.serviceUnavailableException) {
|
|
156
|
+
throw item.serviceUnavailableException;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
if (options.signal?.aborted) {
|
|
160
|
+
throw new Error("Request was aborted");
|
|
161
|
+
}
|
|
162
|
+
if (output.stopReason === "error" || output.stopReason === "aborted") {
|
|
163
|
+
throw new Error("An unknown error occurred");
|
|
164
|
+
}
|
|
165
|
+
stream.push({ type: "done", reason: output.stopReason, message: output });
|
|
166
|
+
stream.end();
|
|
167
|
+
}
|
|
168
|
+
catch (error) {
|
|
169
|
+
for (const block of output.content) {
|
|
170
|
+
delete block.index;
|
|
171
|
+
// partialJson is only a streaming scratch buffer; never persist it.
|
|
172
|
+
delete block.partialJson;
|
|
173
|
+
}
|
|
174
|
+
output.stopReason = options.signal?.aborted ? "aborted" : "error";
|
|
175
|
+
output.errorMessage = formatBedrockError(error);
|
|
176
|
+
stream.push({ type: "error", reason: output.stopReason, error: output });
|
|
177
|
+
stream.end();
|
|
178
|
+
}
|
|
179
|
+
})();
|
|
180
|
+
return stream;
|
|
181
|
+
};
|
|
182
|
+
/**
|
|
183
|
+
* Human-readable prefixes for Bedrock SDK exception names.
|
|
184
|
+
* The downstream retry logic in agent-session matches patterns like
|
|
185
|
+
* `server.?error` and `service.?unavailable`, so we preserve the legacy
|
|
186
|
+
* prefix format rather than using the raw SDK exception name.
|
|
187
|
+
*/
|
|
188
|
+
const BEDROCK_ERROR_PREFIXES = {
|
|
189
|
+
InternalServerException: "Internal server error",
|
|
190
|
+
ModelStreamErrorException: "Model stream error",
|
|
191
|
+
ValidationException: "Validation error",
|
|
192
|
+
ThrottlingException: "Throttling error",
|
|
193
|
+
ServiceUnavailableException: "Service unavailable",
|
|
194
|
+
};
|
|
195
|
+
/**
|
|
196
|
+
* Format a Bedrock error with a human-readable prefix.
|
|
197
|
+
* AWS SDK exceptions (both from `client.send()` and from stream event items)
|
|
198
|
+
* extend BedrockRuntimeServiceException. We map the `.name` to a stable
|
|
199
|
+
* human-readable prefix so downstream consumers (retry logic, context-overflow
|
|
200
|
+
* detection) can distinguish error categories via simple string matching.
|
|
201
|
+
*/
|
|
202
|
+
function formatBedrockError(error) {
|
|
203
|
+
const message = error instanceof Error ? error.message : JSON.stringify(error);
|
|
204
|
+
if (error instanceof BedrockRuntimeServiceException) {
|
|
205
|
+
const prefix = BEDROCK_ERROR_PREFIXES[error.name] ?? error.name;
|
|
206
|
+
return `${prefix}: ${message}`;
|
|
207
|
+
}
|
|
208
|
+
return message;
|
|
209
|
+
}
|
|
210
|
+
export const streamSimpleBedrock = (model, context, options) => {
|
|
211
|
+
const base = buildBaseOptions(model, options, undefined);
|
|
212
|
+
if (!options?.reasoning) {
|
|
213
|
+
return streamBedrock(model, context, { ...base, reasoning: undefined });
|
|
214
|
+
}
|
|
215
|
+
if (isAnthropicClaudeModel(model)) {
|
|
216
|
+
if (supportsAdaptiveThinking(model.id, model.name)) {
|
|
217
|
+
return streamBedrock(model, context, {
|
|
218
|
+
...base,
|
|
219
|
+
reasoning: options.reasoning,
|
|
220
|
+
thinkingBudgets: options.thinkingBudgets,
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
// Undefined means the caller did not request an output cap; let the helper use the model cap.
|
|
224
|
+
// Do not coerce to 0 here, or the thinking budget would become the entire maxTokens value.
|
|
225
|
+
const adjusted = adjustMaxTokensForThinking(base.maxTokens, model.maxTokens, options.reasoning, options.thinkingBudgets);
|
|
226
|
+
return streamBedrock(model, context, {
|
|
227
|
+
...base,
|
|
228
|
+
maxTokens: adjusted.maxTokens,
|
|
229
|
+
reasoning: options.reasoning,
|
|
230
|
+
thinkingBudgets: {
|
|
231
|
+
...(options.thinkingBudgets || {}),
|
|
232
|
+
[clampReasoning(options.reasoning)]: adjusted.thinkingBudget,
|
|
233
|
+
},
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
return streamBedrock(model, context, {
|
|
237
|
+
...base,
|
|
238
|
+
reasoning: options.reasoning,
|
|
239
|
+
thinkingBudgets: options.thinkingBudgets,
|
|
240
|
+
});
|
|
241
|
+
};
|
|
242
|
+
function handleContentBlockStart(event, blocks, output, stream) {
|
|
243
|
+
const index = event.contentBlockIndex;
|
|
244
|
+
const start = event.start;
|
|
245
|
+
if (start?.toolUse) {
|
|
246
|
+
const block = {
|
|
247
|
+
type: "toolCall",
|
|
248
|
+
id: start.toolUse.toolUseId || "",
|
|
249
|
+
name: start.toolUse.name || "",
|
|
250
|
+
arguments: {},
|
|
251
|
+
partialJson: "",
|
|
252
|
+
index,
|
|
253
|
+
};
|
|
254
|
+
output.content.push(block);
|
|
255
|
+
stream.push({ type: "toolcall_start", contentIndex: blocks.length - 1, partial: output });
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
function handleContentBlockDelta(event, blocks, output, stream) {
|
|
259
|
+
const contentBlockIndex = event.contentBlockIndex;
|
|
260
|
+
const delta = event.delta;
|
|
261
|
+
let index = blocks.findIndex((b) => b.index === contentBlockIndex);
|
|
262
|
+
let block = blocks[index];
|
|
263
|
+
if (delta?.text !== undefined) {
|
|
264
|
+
// If no text block exists yet, create one, as `handleContentBlockStart` is not sent for text blocks
|
|
265
|
+
if (!block) {
|
|
266
|
+
const newBlock = { type: "text", text: "", index: contentBlockIndex };
|
|
267
|
+
output.content.push(newBlock);
|
|
268
|
+
index = blocks.length - 1;
|
|
269
|
+
block = blocks[index];
|
|
270
|
+
stream.push({ type: "text_start", contentIndex: index, partial: output });
|
|
271
|
+
}
|
|
272
|
+
if (block.type === "text") {
|
|
273
|
+
block.text += delta.text;
|
|
274
|
+
stream.push({ type: "text_delta", contentIndex: index, delta: delta.text, partial: output });
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
else if (delta?.toolUse && block?.type === "toolCall") {
|
|
278
|
+
block.partialJson = (block.partialJson || "") + (delta.toolUse.input || "");
|
|
279
|
+
block.arguments = parseStreamingJson(block.partialJson);
|
|
280
|
+
stream.push({ type: "toolcall_delta", contentIndex: index, delta: delta.toolUse.input || "", partial: output });
|
|
281
|
+
}
|
|
282
|
+
else if (delta?.reasoningContent) {
|
|
283
|
+
let thinkingBlock = block;
|
|
284
|
+
let thinkingIndex = index;
|
|
285
|
+
if (!thinkingBlock) {
|
|
286
|
+
const newBlock = { type: "thinking", thinking: "", thinkingSignature: "", index: contentBlockIndex };
|
|
287
|
+
output.content.push(newBlock);
|
|
288
|
+
thinkingIndex = blocks.length - 1;
|
|
289
|
+
thinkingBlock = blocks[thinkingIndex];
|
|
290
|
+
stream.push({ type: "thinking_start", contentIndex: thinkingIndex, partial: output });
|
|
291
|
+
}
|
|
292
|
+
if (thinkingBlock?.type === "thinking") {
|
|
293
|
+
if (delta.reasoningContent.text) {
|
|
294
|
+
thinkingBlock.thinking += delta.reasoningContent.text;
|
|
295
|
+
stream.push({
|
|
296
|
+
type: "thinking_delta",
|
|
297
|
+
contentIndex: thinkingIndex,
|
|
298
|
+
delta: delta.reasoningContent.text,
|
|
299
|
+
partial: output,
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
if (delta.reasoningContent.signature) {
|
|
303
|
+
thinkingBlock.thinkingSignature =
|
|
304
|
+
(thinkingBlock.thinkingSignature || "") + delta.reasoningContent.signature;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
function handleMetadata(event, model, output) {
|
|
310
|
+
if (event.usage) {
|
|
311
|
+
output.usage.input = event.usage.inputTokens || 0;
|
|
312
|
+
output.usage.output = event.usage.outputTokens || 0;
|
|
313
|
+
output.usage.cacheRead = event.usage.cacheReadInputTokens || 0;
|
|
314
|
+
output.usage.cacheWrite = event.usage.cacheWriteInputTokens || 0;
|
|
315
|
+
output.usage.totalTokens = event.usage.totalTokens || output.usage.input + output.usage.output;
|
|
316
|
+
calculateCost(model, output.usage);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
function handleContentBlockStop(event, blocks, output, stream) {
|
|
320
|
+
const index = blocks.findIndex((b) => b.index === event.contentBlockIndex);
|
|
321
|
+
const block = blocks[index];
|
|
322
|
+
if (!block)
|
|
323
|
+
return;
|
|
324
|
+
delete block.index;
|
|
325
|
+
switch (block.type) {
|
|
326
|
+
case "text":
|
|
327
|
+
stream.push({ type: "text_end", contentIndex: index, content: block.text, partial: output });
|
|
328
|
+
break;
|
|
329
|
+
case "thinking":
|
|
330
|
+
stream.push({ type: "thinking_end", contentIndex: index, content: block.thinking, partial: output });
|
|
331
|
+
break;
|
|
332
|
+
case "toolCall":
|
|
333
|
+
block.arguments = parseStreamingJson(block.partialJson);
|
|
334
|
+
// Finalize in-place and strip the scratch buffer so replay only
|
|
335
|
+
// carries parsed arguments.
|
|
336
|
+
delete block.partialJson;
|
|
337
|
+
stream.push({ type: "toolcall_end", contentIndex: index, toolCall: block, partial: output });
|
|
338
|
+
break;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Check if the model supports adaptive thinking (Opus 4.6+, Sonnet 4.6).
|
|
343
|
+
* Checks both model ID and model name to support application inference profiles
|
|
344
|
+
* whose ARNs don't contain the model name.
|
|
345
|
+
*/
|
|
346
|
+
function getModelMatchCandidates(modelId, modelName) {
|
|
347
|
+
const values = modelName ? [modelId, modelName] : [modelId];
|
|
348
|
+
return values.flatMap((value) => {
|
|
349
|
+
const lower = value.toLowerCase();
|
|
350
|
+
return [lower, lower.replace(/[\s_.:]+/g, "-")];
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
function supportsAdaptiveThinking(modelId, modelName) {
|
|
354
|
+
const candidates = getModelMatchCandidates(modelId, modelName);
|
|
355
|
+
return candidates.some((s) => s.includes("opus-4-6") || s.includes("opus-4-7") || s.includes("sonnet-4-6"));
|
|
356
|
+
}
|
|
357
|
+
function supportsNativeXhighEffort(model) {
|
|
358
|
+
const candidates = getModelMatchCandidates(model.id, model.name);
|
|
359
|
+
return candidates.some((s) => s.includes("opus-4-7"));
|
|
360
|
+
}
|
|
361
|
+
function mapThinkingLevelToEffort(model, level) {
|
|
362
|
+
if (level === "xhigh" && supportsNativeXhighEffort(model))
|
|
363
|
+
return "xhigh";
|
|
364
|
+
const mapped = level ? model.thinkingLevelMap?.[level] : undefined;
|
|
365
|
+
if (typeof mapped === "string")
|
|
366
|
+
return mapped;
|
|
367
|
+
const candidates = getModelMatchCandidates(model.id, model.name);
|
|
368
|
+
const isOpus47 = candidates.some((s) => s.includes("opus-4-7") || s.includes("opus-4.7"));
|
|
369
|
+
const isOpus46 = candidates.some((s) => s.includes("opus-4-6") || s.includes("opus-4.6"));
|
|
370
|
+
switch (level) {
|
|
371
|
+
case "minimal":
|
|
372
|
+
case "low":
|
|
373
|
+
return "low";
|
|
374
|
+
case "medium":
|
|
375
|
+
return "medium";
|
|
376
|
+
case "high":
|
|
377
|
+
return "high";
|
|
378
|
+
case "xhigh":
|
|
379
|
+
if (isOpus47)
|
|
380
|
+
return "xhigh";
|
|
381
|
+
if (isOpus46)
|
|
382
|
+
return "max";
|
|
383
|
+
return "high";
|
|
384
|
+
case "max":
|
|
385
|
+
if (isOpus47 || isOpus46)
|
|
386
|
+
return "max";
|
|
387
|
+
return "high";
|
|
388
|
+
default:
|
|
389
|
+
return "high";
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Resolve cache retention preference.
|
|
394
|
+
* Defaults to "short" and uses PI_CACHE_RETENTION for backward compatibility.
|
|
395
|
+
*/
|
|
396
|
+
function resolveCacheRetention(cacheRetention) {
|
|
397
|
+
if (cacheRetention) {
|
|
398
|
+
return cacheRetention;
|
|
399
|
+
}
|
|
400
|
+
if (typeof process !== "undefined" && process.env.PI_CACHE_RETENTION === "long") {
|
|
401
|
+
return "long";
|
|
402
|
+
}
|
|
403
|
+
return "short";
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* Check if the model is an Anthropic Claude model on Bedrock.
|
|
407
|
+
* Checks both model ID and model name to support application inference profiles
|
|
408
|
+
* whose ARNs don't contain the model name.
|
|
409
|
+
*/
|
|
410
|
+
function isAnthropicClaudeModel(model) {
|
|
411
|
+
const id = model.id.toLowerCase();
|
|
412
|
+
const name = model.name?.toLowerCase() ?? "";
|
|
413
|
+
return (id.includes("anthropic.claude") ||
|
|
414
|
+
id.includes("anthropic/claude") ||
|
|
415
|
+
name.includes("anthropic.claude") ||
|
|
416
|
+
name.includes("anthropic/claude") ||
|
|
417
|
+
name.includes("claude"));
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Check if the model supports prompt caching.
|
|
421
|
+
* Supported: Claude 3.5 Haiku, Claude 3.7 Sonnet, Claude 4.x models
|
|
422
|
+
*
|
|
423
|
+
* For base models and system-defined inference profiles the model ID / ARN
|
|
424
|
+
* contains the model name, so we can decide locally.
|
|
425
|
+
*
|
|
426
|
+
* For application inference profiles (whose ARNs don't contain the model name),
|
|
427
|
+
* also checks model.name which is user-controlled via models.json or registerProvider.
|
|
428
|
+
* As a last resort, set AWS_BEDROCK_FORCE_CACHE=1 to enable cache points.
|
|
429
|
+
* Amazon Nova models have automatic caching and don't need explicit cache points.
|
|
430
|
+
*/
|
|
431
|
+
function supportsPromptCaching(model) {
|
|
432
|
+
const candidates = getModelMatchCandidates(model.id, model.name);
|
|
433
|
+
const hasClaudeRef = candidates.some((s) => s.includes("claude"));
|
|
434
|
+
if (!hasClaudeRef) {
|
|
435
|
+
// Application inference profiles don't contain the model name in the ARN.
|
|
436
|
+
// Allow users to force cache points via environment variable.
|
|
437
|
+
if (typeof process !== "undefined" && process.env.AWS_BEDROCK_FORCE_CACHE === "1")
|
|
438
|
+
return true;
|
|
439
|
+
return false;
|
|
440
|
+
}
|
|
441
|
+
// Claude 4.x models (opus-4, sonnet-4, haiku-4)
|
|
442
|
+
if (candidates.some((s) => s.includes("-4-")))
|
|
443
|
+
return true;
|
|
444
|
+
// Claude 3.7 Sonnet
|
|
445
|
+
if (candidates.some((s) => s.includes("claude-3-7-sonnet")))
|
|
446
|
+
return true;
|
|
447
|
+
// Claude 3.5 Haiku
|
|
448
|
+
if (candidates.some((s) => s.includes("claude-3-5-haiku")))
|
|
449
|
+
return true;
|
|
450
|
+
return false;
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* Check if the model supports thinking signatures in reasoningContent.
|
|
454
|
+
* Only Anthropic Claude models support the signature field.
|
|
455
|
+
* Other models (OpenAI, Qwen, Minimax, Moonshot, etc.) reject it with:
|
|
456
|
+
* "This model doesn't support the reasoningContent.reasoningText.signature field"
|
|
457
|
+
*
|
|
458
|
+
* Checks both model ID and model name to support application inference profiles.
|
|
459
|
+
*/
|
|
460
|
+
function supportsThinkingSignature(model) {
|
|
461
|
+
return isAnthropicClaudeModel(model);
|
|
462
|
+
}
|
|
463
|
+
function buildSystemPrompt(systemPrompt, model, cacheRetention) {
|
|
464
|
+
if (!systemPrompt)
|
|
465
|
+
return undefined;
|
|
466
|
+
const blocks = [{ text: sanitizeSurrogates(systemPrompt) }];
|
|
467
|
+
// Add cache point for supported Claude models when caching is enabled
|
|
468
|
+
if (cacheRetention !== "none" && supportsPromptCaching(model)) {
|
|
469
|
+
blocks.push({
|
|
470
|
+
cachePoint: { type: CachePointType.DEFAULT, ...(cacheRetention === "long" ? { ttl: CacheTTL.ONE_HOUR } : {}) },
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
return blocks;
|
|
474
|
+
}
|
|
475
|
+
function normalizeToolCallId(id) {
|
|
476
|
+
const sanitized = id.replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
477
|
+
return sanitized.length > 64 ? sanitized.slice(0, 64) : sanitized;
|
|
478
|
+
}
|
|
479
|
+
function convertMessages(context, model, cacheRetention, options = {}) {
|
|
480
|
+
const result = [];
|
|
481
|
+
const transformedMessages = transformMessages(context.messages, model, normalizeToolCallId, {
|
|
482
|
+
preserveThinking: options.preserveThinking,
|
|
483
|
+
});
|
|
484
|
+
for (let i = 0; i < transformedMessages.length; i++) {
|
|
485
|
+
const m = transformedMessages[i];
|
|
486
|
+
switch (m.role) {
|
|
487
|
+
case "user": {
|
|
488
|
+
const content = [];
|
|
489
|
+
if (typeof m.content === "string") {
|
|
490
|
+
content.push({ text: sanitizeSurrogates(m.content) });
|
|
491
|
+
}
|
|
492
|
+
else {
|
|
493
|
+
for (const c of m.content) {
|
|
494
|
+
switch (c.type) {
|
|
495
|
+
case "text":
|
|
496
|
+
content.push({ text: sanitizeSurrogates(c.text) });
|
|
497
|
+
break;
|
|
498
|
+
case "image":
|
|
499
|
+
content.push({ image: createImageBlock(c.mimeType, c.data) });
|
|
500
|
+
break;
|
|
501
|
+
default:
|
|
502
|
+
continue;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
if (content.length === 0)
|
|
507
|
+
continue;
|
|
508
|
+
result.push({
|
|
509
|
+
role: ConversationRole.USER,
|
|
510
|
+
content,
|
|
511
|
+
});
|
|
512
|
+
break;
|
|
513
|
+
}
|
|
514
|
+
case "assistant": {
|
|
515
|
+
// Skip assistant messages with empty content (e.g., from aborted requests)
|
|
516
|
+
// Bedrock rejects messages with empty content arrays
|
|
517
|
+
if (m.content.length === 0) {
|
|
518
|
+
continue;
|
|
519
|
+
}
|
|
520
|
+
const contentBlocks = [];
|
|
521
|
+
for (const c of m.content) {
|
|
522
|
+
switch (c.type) {
|
|
523
|
+
case "text":
|
|
524
|
+
// Skip empty text blocks
|
|
525
|
+
if (c.text.trim().length === 0)
|
|
526
|
+
continue;
|
|
527
|
+
contentBlocks.push({ text: sanitizeSurrogates(c.text) });
|
|
528
|
+
break;
|
|
529
|
+
case "toolCall":
|
|
530
|
+
contentBlocks.push({
|
|
531
|
+
toolUse: { toolUseId: c.id, name: c.name, input: c.arguments },
|
|
532
|
+
});
|
|
533
|
+
break;
|
|
534
|
+
case "thinking":
|
|
535
|
+
// Skip empty thinking blocks
|
|
536
|
+
if (c.thinking.trim().length === 0)
|
|
537
|
+
continue;
|
|
538
|
+
// Only Anthropic models support the signature field in reasoningText.
|
|
539
|
+
// For other models, we omit the signature to avoid errors like:
|
|
540
|
+
// "This model doesn't support the reasoningContent.reasoningText.signature field"
|
|
541
|
+
if (supportsThinkingSignature(model)) {
|
|
542
|
+
// Signatures arrive after thinking deltas. If a partial or externally
|
|
543
|
+
// persisted message lacks a signature, Bedrock rejects the replayed
|
|
544
|
+
// reasoning block. Fall back to plain text, matching Anthropic.
|
|
545
|
+
if (!c.thinkingSignature || c.thinkingSignature.trim().length === 0) {
|
|
546
|
+
contentBlocks.push({ text: sanitizeSurrogates(c.thinking) });
|
|
547
|
+
}
|
|
548
|
+
else {
|
|
549
|
+
contentBlocks.push({
|
|
550
|
+
reasoningContent: {
|
|
551
|
+
reasoningText: {
|
|
552
|
+
text: sanitizeSurrogates(c.thinking),
|
|
553
|
+
signature: c.thinkingSignature,
|
|
554
|
+
},
|
|
555
|
+
},
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
else {
|
|
560
|
+
contentBlocks.push({
|
|
561
|
+
reasoningContent: {
|
|
562
|
+
reasoningText: { text: sanitizeSurrogates(c.thinking) },
|
|
563
|
+
},
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
break;
|
|
567
|
+
default:
|
|
568
|
+
continue;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
// Skip if all content blocks were filtered out
|
|
572
|
+
if (contentBlocks.length === 0) {
|
|
573
|
+
continue;
|
|
574
|
+
}
|
|
575
|
+
result.push({
|
|
576
|
+
role: ConversationRole.ASSISTANT,
|
|
577
|
+
content: contentBlocks,
|
|
578
|
+
});
|
|
579
|
+
break;
|
|
580
|
+
}
|
|
581
|
+
case "toolResult": {
|
|
582
|
+
// Collect all consecutive toolResult messages into a single user message
|
|
583
|
+
// Bedrock requires all tool results to be in one message
|
|
584
|
+
const toolResults = [];
|
|
585
|
+
// Add current tool result with all content blocks combined
|
|
586
|
+
toolResults.push({
|
|
587
|
+
toolResult: {
|
|
588
|
+
toolUseId: m.toolCallId,
|
|
589
|
+
content: m.content.map((c) => c.type === "image"
|
|
590
|
+
? { image: createImageBlock(c.mimeType, c.data) }
|
|
591
|
+
: { text: sanitizeSurrogates(c.text) }),
|
|
592
|
+
status: m.isError ? ToolResultStatus.ERROR : ToolResultStatus.SUCCESS,
|
|
593
|
+
},
|
|
594
|
+
});
|
|
595
|
+
// Look ahead for consecutive toolResult messages
|
|
596
|
+
let j = i + 1;
|
|
597
|
+
while (j < transformedMessages.length && transformedMessages[j].role === "toolResult") {
|
|
598
|
+
const nextMsg = transformedMessages[j];
|
|
599
|
+
toolResults.push({
|
|
600
|
+
toolResult: {
|
|
601
|
+
toolUseId: nextMsg.toolCallId,
|
|
602
|
+
content: nextMsg.content.map((c) => c.type === "image"
|
|
603
|
+
? { image: createImageBlock(c.mimeType, c.data) }
|
|
604
|
+
: { text: sanitizeSurrogates(c.text) }),
|
|
605
|
+
status: nextMsg.isError ? ToolResultStatus.ERROR : ToolResultStatus.SUCCESS,
|
|
606
|
+
},
|
|
607
|
+
});
|
|
608
|
+
j++;
|
|
609
|
+
}
|
|
610
|
+
// Skip the messages we've already processed
|
|
611
|
+
i = j - 1;
|
|
612
|
+
result.push({
|
|
613
|
+
role: ConversationRole.USER,
|
|
614
|
+
content: toolResults,
|
|
615
|
+
});
|
|
616
|
+
break;
|
|
617
|
+
}
|
|
618
|
+
default:
|
|
619
|
+
continue;
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
// Add cache point to the last user message for supported Claude models when caching is enabled
|
|
623
|
+
if (cacheRetention !== "none" && supportsPromptCaching(model) && result.length > 0) {
|
|
624
|
+
const lastMessage = result[result.length - 1];
|
|
625
|
+
if (lastMessage.role === ConversationRole.USER && lastMessage.content) {
|
|
626
|
+
lastMessage.content.push({
|
|
627
|
+
cachePoint: {
|
|
628
|
+
type: CachePointType.DEFAULT,
|
|
629
|
+
...(cacheRetention === "long" ? { ttl: CacheTTL.ONE_HOUR } : {}),
|
|
630
|
+
},
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
return result;
|
|
635
|
+
}
|
|
636
|
+
function convertToolConfig(tools, toolChoice) {
|
|
637
|
+
if (!tools?.length || toolChoice === "none")
|
|
638
|
+
return undefined;
|
|
639
|
+
const bedrockTools = tools.map((tool) => ({
|
|
640
|
+
toolSpec: {
|
|
641
|
+
name: tool.name,
|
|
642
|
+
description: tool.description,
|
|
643
|
+
inputSchema: { json: toDocumentType(tool.parameters) },
|
|
644
|
+
},
|
|
645
|
+
}));
|
|
646
|
+
let bedrockToolChoice;
|
|
647
|
+
switch (toolChoice) {
|
|
648
|
+
case "auto":
|
|
649
|
+
bedrockToolChoice = { auto: {} };
|
|
650
|
+
break;
|
|
651
|
+
case "any":
|
|
652
|
+
bedrockToolChoice = { any: {} };
|
|
653
|
+
break;
|
|
654
|
+
default:
|
|
655
|
+
if (toolChoice?.type === "tool") {
|
|
656
|
+
bedrockToolChoice = { tool: { name: toolChoice.name } };
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
return { tools: bedrockTools, toolChoice: bedrockToolChoice };
|
|
660
|
+
}
|
|
661
|
+
function toDocumentType(value) {
|
|
662
|
+
return JSON.parse(JSON.stringify(value));
|
|
663
|
+
}
|
|
664
|
+
function mapStopReason(reason) {
|
|
665
|
+
switch (reason) {
|
|
666
|
+
case BedrockStopReason.END_TURN:
|
|
667
|
+
case BedrockStopReason.STOP_SEQUENCE:
|
|
668
|
+
return "stop";
|
|
669
|
+
case BedrockStopReason.MAX_TOKENS:
|
|
670
|
+
case BedrockStopReason.MODEL_CONTEXT_WINDOW_EXCEEDED:
|
|
671
|
+
return "length";
|
|
672
|
+
case BedrockStopReason.TOOL_USE:
|
|
673
|
+
return "toolUse";
|
|
674
|
+
default:
|
|
675
|
+
return "error";
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
function getConfiguredBedrockRegion(options) {
|
|
679
|
+
if (typeof process === "undefined") {
|
|
680
|
+
return options.region;
|
|
681
|
+
}
|
|
682
|
+
return options.region || process.env.AWS_REGION || process.env.AWS_DEFAULT_REGION || undefined;
|
|
683
|
+
}
|
|
684
|
+
function hasConfiguredBedrockProfile() {
|
|
685
|
+
if (typeof process === "undefined") {
|
|
686
|
+
return false;
|
|
687
|
+
}
|
|
688
|
+
return Boolean(process.env.AWS_PROFILE);
|
|
689
|
+
}
|
|
690
|
+
function getStandardBedrockEndpointRegion(baseUrl) {
|
|
691
|
+
if (!baseUrl) {
|
|
692
|
+
return undefined;
|
|
693
|
+
}
|
|
694
|
+
try {
|
|
695
|
+
const { hostname } = new URL(baseUrl);
|
|
696
|
+
const match = hostname.toLowerCase().match(/^bedrock-runtime(?:-fips)?\.([a-z0-9-]+)\.amazonaws\.com(?:\.cn)?$/);
|
|
697
|
+
return match?.[1];
|
|
698
|
+
}
|
|
699
|
+
catch {
|
|
700
|
+
return undefined;
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
function shouldUseExplicitBedrockEndpoint(baseUrl, configuredRegion, hasConfiguredProfile) {
|
|
704
|
+
const endpointRegion = getStandardBedrockEndpointRegion(baseUrl);
|
|
705
|
+
if (!endpointRegion) {
|
|
706
|
+
return true;
|
|
707
|
+
}
|
|
708
|
+
return !configuredRegion && !hasConfiguredProfile;
|
|
709
|
+
}
|
|
710
|
+
function isGovCloudBedrockTarget(model, options) {
|
|
711
|
+
const region = getConfiguredBedrockRegion(options);
|
|
712
|
+
if (region?.toLowerCase().startsWith("us-gov-")) {
|
|
713
|
+
return true;
|
|
714
|
+
}
|
|
715
|
+
const modelId = model.id.toLowerCase();
|
|
716
|
+
return modelId.startsWith("us-gov.") || modelId.startsWith("arn:aws-us-gov:");
|
|
717
|
+
}
|
|
718
|
+
function buildAdditionalModelRequestFields(model, options) {
|
|
719
|
+
if (!options.reasoning || !model.reasoning) {
|
|
720
|
+
return undefined;
|
|
721
|
+
}
|
|
722
|
+
if (isAnthropicClaudeModel(model)) {
|
|
723
|
+
// GovCloud Bedrock currently rejects the Claude thinking.display field.
|
|
724
|
+
// Omit it there until the GovCloud Converse schema catches up.
|
|
725
|
+
const display = isGovCloudBedrockTarget(model, options) ? undefined : (options.thinkingDisplay ?? "summarized");
|
|
726
|
+
const result = supportsAdaptiveThinking(model.id, model.name)
|
|
727
|
+
? {
|
|
728
|
+
thinking: { type: "adaptive", ...(display !== undefined ? { display } : {}) },
|
|
729
|
+
output_config: { effort: mapThinkingLevelToEffort(model, options.reasoning) },
|
|
730
|
+
}
|
|
731
|
+
: (() => {
|
|
732
|
+
const defaultBudgets = {
|
|
733
|
+
minimal: 1024,
|
|
734
|
+
low: 2048,
|
|
735
|
+
medium: 8192,
|
|
736
|
+
high: 16384,
|
|
737
|
+
xhigh: 16384,
|
|
738
|
+
max: 16384,
|
|
739
|
+
};
|
|
740
|
+
// Custom ThinkingBudgets only declares minimal/low/medium/high; xhigh and max
|
|
741
|
+
// fall back to defaultBudgets (the Bedrock budget-based path doesn't know the
|
|
742
|
+
// native Anthropic adaptive "max" tier, and this model is not on the adaptive
|
|
743
|
+
// path anyway).
|
|
744
|
+
const level = options.reasoning === "xhigh" || options.reasoning === "max" ? "high" : options.reasoning;
|
|
745
|
+
const budget = options.thinkingBudgets?.[level] ?? defaultBudgets[options.reasoning];
|
|
746
|
+
return {
|
|
747
|
+
thinking: {
|
|
748
|
+
type: "enabled",
|
|
749
|
+
budget_tokens: budget,
|
|
750
|
+
...(display !== undefined ? { display } : {}),
|
|
751
|
+
},
|
|
752
|
+
};
|
|
753
|
+
})();
|
|
754
|
+
if (!supportsAdaptiveThinking(model.id, model.name) && (options.interleavedThinking ?? true)) {
|
|
755
|
+
result.anthropic_beta = ["interleaved-thinking-2025-05-14"];
|
|
756
|
+
}
|
|
757
|
+
return result;
|
|
758
|
+
}
|
|
759
|
+
return undefined;
|
|
760
|
+
}
|
|
761
|
+
function createImageBlock(mimeType, data) {
|
|
762
|
+
let format;
|
|
763
|
+
switch (mimeType) {
|
|
764
|
+
case "image/jpeg":
|
|
765
|
+
case "image/jpg":
|
|
766
|
+
format = ImageFormat.JPEG;
|
|
767
|
+
break;
|
|
768
|
+
case "image/png":
|
|
769
|
+
format = ImageFormat.PNG;
|
|
770
|
+
break;
|
|
771
|
+
case "image/gif":
|
|
772
|
+
format = ImageFormat.GIF;
|
|
773
|
+
break;
|
|
774
|
+
case "image/webp":
|
|
775
|
+
format = ImageFormat.WEBP;
|
|
776
|
+
break;
|
|
777
|
+
default:
|
|
778
|
+
throw new Error(`Unknown image type: ${mimeType}`);
|
|
779
|
+
}
|
|
780
|
+
const binaryString = atob(data);
|
|
781
|
+
const bytes = new Uint8Array(binaryString.length);
|
|
782
|
+
for (let i = 0; i < binaryString.length; i++) {
|
|
783
|
+
bytes[i] = binaryString.charCodeAt(i);
|
|
784
|
+
}
|
|
785
|
+
return { source: { bytes }, format };
|
|
786
|
+
}
|
|
787
|
+
//# sourceMappingURL=amazon-bedrock.js.map
|