@songtonyli/dsh-cli 0.1.53 → 0.1.55
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/README.md +1 -1
- package/bin/dsh.mjs +1 -1
- package/node_modules/@anthropic-ai/sdk/CHANGELOG.md +28 -0
- package/node_modules/@anthropic-ai/sdk/client.js +2 -1
- package/node_modules/@anthropic-ai/sdk/client.mjs +2 -1
- package/node_modules/@anthropic-ai/sdk/core/streaming.js +4 -2
- package/node_modules/@anthropic-ai/sdk/core/streaming.mjs +4 -2
- package/node_modules/@anthropic-ai/sdk/package.json +1 -1
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.js +25 -10
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/agents.mjs +25 -10
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/versions.js +5 -2
- package/node_modules/@anthropic-ai/sdk/resources/beta/agents/versions.mjs +5 -2
- package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.js +10 -4
- package/node_modules/@anthropic-ai/sdk/resources/beta/deployment-runs.mjs +10 -4
- package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.js +40 -16
- package/node_modules/@anthropic-ai/sdk/resources/beta/deployments.mjs +40 -16
- package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.js +25 -10
- package/node_modules/@anthropic-ai/sdk/resources/beta/dreams.mjs +25 -10
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.js +30 -12
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/environments.mjs +30 -12
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.js +20 -8
- package/node_modules/@anthropic-ai/sdk/resources/beta/environments/work.mjs +20 -8
- package/node_modules/@anthropic-ai/sdk/resources/beta/files.js +22 -9
- package/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs +22 -9
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.js +25 -10
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memories.mjs +25 -10
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.js +30 -12
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-stores.mjs +30 -12
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.js +15 -6
- package/node_modules/@anthropic-ai/sdk/resources/beta/memory-stores/memory-versions.mjs +15 -6
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.js +25 -11
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs +25 -11
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.js +4 -2
- package/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.mjs +4 -2
- package/node_modules/@anthropic-ai/sdk/resources/beta/models.js +10 -4
- package/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs +10 -4
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.js +15 -6
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/events.mjs +15 -6
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/resources.js +25 -10
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/resources.mjs +25 -10
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.js +30 -12
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/sessions.mjs +30 -12
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.js +10 -4
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/events.mjs +10 -4
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.js +15 -6
- package/node_modules/@anthropic-ai/sdk/resources/beta/sessions/threads/threads.mjs +15 -6
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.js +20 -8
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.mjs +20 -8
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.js +22 -9
- package/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.mjs +22 -9
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.js +20 -8
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/certificates.mjs +20 -8
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.js +30 -12
- package/node_modules/@anthropic-ai/sdk/resources/beta/tunnels/tunnels.mjs +30 -12
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.js +35 -14
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/credentials.mjs +35 -14
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/vaults.js +30 -12
- package/node_modules/@anthropic-ai/sdk/resources/beta/vaults/vaults.mjs +30 -12
- package/node_modules/@anthropic-ai/sdk/resources/completions.js +5 -2
- package/node_modules/@anthropic-ai/sdk/resources/completions.mjs +5 -2
- package/node_modules/@anthropic-ai/sdk/resources/files.js +79 -10
- package/node_modules/@anthropic-ai/sdk/resources/files.mjs +79 -10
- package/node_modules/@anthropic-ai/sdk/resources/messages/batches.js +52 -13
- package/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs +52 -13
- package/node_modules/@anthropic-ai/sdk/resources/messages/messages.js +10 -4
- package/node_modules/@anthropic-ai/sdk/resources/messages/messages.mjs +10 -4
- package/node_modules/@anthropic-ai/sdk/resources/models.js +23 -4
- package/node_modules/@anthropic-ai/sdk/resources/models.mjs +23 -4
- package/node_modules/@anthropic-ai/sdk/resources/skills/skills.js +64 -8
- package/node_modules/@anthropic-ai/sdk/resources/skills/skills.mjs +64 -8
- package/node_modules/@anthropic-ai/sdk/resources/skills/versions.js +67 -7
- package/node_modules/@anthropic-ai/sdk/resources/skills/versions.mjs +67 -7
- package/node_modules/@anthropic-ai/sdk/src/client.ts +12 -1
- package/node_modules/@anthropic-ai/sdk/src/core/streaming.ts +4 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/agents/agents.ts +75 -10
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/agents/versions.ts +15 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/deployment-runs.ts +30 -4
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/deployments.ts +120 -16
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/dreams.ts +75 -10
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/environments/environments.ts +90 -12
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/environments/work.ts +60 -8
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/files.ts +75 -11
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/memory-stores/memories.ts +75 -10
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/memory-stores/memory-stores.ts +90 -12
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/memory-stores/memory-versions.ts +49 -10
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/batches.ts +85 -11
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/messages/messages.ts +24 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/models.ts +30 -4
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/compliance-settings.ts +12 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/index.ts +2 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/organization/organization.ts +4 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/events.ts +45 -6
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/resources.ts +75 -10
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/sessions.ts +90 -12
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/threads/events.ts +30 -4
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/sessions/threads/threads.ts +45 -6
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/skills/skills.ts +60 -8
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/skills/versions.ts +72 -9
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/tunnels/certificates.ts +60 -8
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/tunnels/tunnels.ts +90 -12
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/vaults/credentials.ts +105 -14
- package/node_modules/@anthropic-ai/sdk/src/resources/beta/vaults/vaults.ts +90 -12
- package/node_modules/@anthropic-ai/sdk/src/resources/completions.ts +15 -2
- package/node_modules/@anthropic-ai/sdk/src/resources/files.ts +161 -18
- package/node_modules/@anthropic-ai/sdk/src/resources/index.ts +5 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/messages/batches.ts +137 -13
- package/node_modules/@anthropic-ai/sdk/src/resources/messages/index.ts +4 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/messages/messages.ts +38 -4
- package/node_modules/@anthropic-ai/sdk/src/resources/models.ts +43 -4
- package/node_modules/@anthropic-ai/sdk/src/resources/skills/index.ts +2 -0
- package/node_modules/@anthropic-ai/sdk/src/resources/skills/skills.ts +127 -13
- package/node_modules/@anthropic-ai/sdk/src/resources/skills/versions.ts +115 -11
- package/node_modules/@anthropic-ai/sdk/src/tools/agent-toolset/fs-util.ts +16 -4
- package/node_modules/@anthropic-ai/sdk/src/version.ts +1 -1
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.js +14 -4
- package/node_modules/@anthropic-ai/sdk/tools/agent-toolset/fs-util.mjs +14 -4
- package/node_modules/@anthropic-ai/sdk/version.js +1 -1
- package/node_modules/@anthropic-ai/sdk/version.mjs +1 -1
- package/node_modules/@aws-sdk/client-bedrock-runtime/README.md +7 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js +2419 -185
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/BedrockRuntime.js +2 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commandBuilder.js +14 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/ApplyGuardrailCommand.js +2 -14
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/ConverseCommand.js +2 -14
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/ConverseStreamCommand.js +2 -18
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/CountTokensCommand.js +2 -14
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/GetAsyncInvokeCommand.js +2 -14
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/InvokeGuardrailChecksCommand.js +4 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/InvokeModelCommand.js +2 -14
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/InvokeModelWithBidirectionalStreamCommand.js +2 -27
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/InvokeModelWithResponseStreamCommand.js +2 -18
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/ListAsyncInvokesCommand.js +2 -14
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/StartAsyncInvokeCommand.js +2 -14
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/commands/index.js +1 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/index.js +2 -1
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/models/enums.js +51 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/runtimeConfig.browser.js +0 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/runtimeConfig.js +1 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/runtimeConfig.native.js +0 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/runtimeConfig.shared.js +2 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/schemas/schemas_0.js +244 -31
- package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +43 -45
- package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +34 -32
- package/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +8 -4
- package/node_modules/@aws-sdk/token-providers/dist-es/index.js +4 -4
- package/node_modules/@aws-sdk/token-providers/package.json +31 -31
- package/node_modules/@deepseek-ai/dsh/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh/README.md +3 -1
- package/node_modules/@deepseek-ai/dsh/README.zh.md +3 -1
- package/node_modules/@deepseek-ai/dsh/lib/bin.js +12 -8
- package/node_modules/@deepseek-ai/dsh/lib/{plugin-DkYIj96-.js → plugin-BGnVfe_D.js} +26 -8
- package/node_modules/@deepseek-ai/dsh/package.json +111 -111
- package/node_modules/@deepseek-ai/dsh-acp/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-acp-app/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-agent/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-agent-default-model/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +24 -24
- package/node_modules/@deepseek-ai/dsh-agent-preset/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-agent-preset/skills/cordis-composition-reference/references/packages.md +2 -2
- package/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-preset-registry/package.json +28 -28
- package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-api-account-controller/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-api-authorization-controller/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-api-gateway/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-api-gateway/README.md +2 -0
- package/node_modules/@deepseek-ai/dsh-api-gateway/README.zh.md +2 -0
- package/node_modules/@deepseek-ai/dsh-api-gateway/lib/index.js +9 -0
- package/node_modules/@deepseek-ai/dsh-api-gateway/lib/types/index.js +12 -0
- package/node_modules/@deepseek-ai/dsh-api-gateway/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-api-job-controller/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +260 -20
- package/node_modules/@deepseek-ai/dsh-api-remotes/lib/types/client/index.js +2 -1
- package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +41 -41
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.host.js +160 -4
- package/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.remote-client.js +120 -0
- package/node_modules/@deepseek-ai/dsh-api-session-controller/package.json +69 -69
- package/node_modules/@deepseek-ai/dsh-api-settings-controller/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/index.js +13 -7
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/types/shells.js +14 -8
- package/node_modules/@deepseek-ai/dsh-api-terminal-controller/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-api-workspace-controller/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-api-workspace-files/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-app-boot/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-atomic-write/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-attachment/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-attachment-local/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-authorization/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-base/package.json +93 -93
- package/node_modules/@deepseek-ai/dsh-bash-local/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-bash-sandbox/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-brand/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-chunked-list/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-connection/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-client-file-upload/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-file-upload/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-client-hmr/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-client-locale/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-client-modules/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-client-product-analytics/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-client-resources/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-client-shortcuts/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-shortcuts/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-shortcuts/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-shortcuts/lib/client.js +12 -7
- package/node_modules/@deepseek-ai/dsh-client-shortcuts/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-client-store/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +9 -20
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-approval/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-brand-official/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.i18n.yaml +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.md +8 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/README.zh.md +7 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/lib/client.js +90 -126
- package/node_modules/@deepseek-ai/dsh-client-ui-chat/package.json +37 -37
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/README.md +7 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/README.zh.md +7 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +111 -50
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +14 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +33 -33
- package/node_modules/@deepseek-ai/dsh-client-ui-cordis/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +27 -27
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-native/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-goal/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.md +9 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/README.zh.md +9 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +216 -63
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/README.md +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/README.zh.md +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/lib/client.js +37 -23
- package/node_modules/@deepseek-ai/dsh-client-ui-open-in-app/package.json +19 -18
- package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-plan/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-plan/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-plan/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-plan/lib/client.js +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-plan/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/lib/client.js +82 -101
- package/node_modules/@deepseek-ai/dsh-client-ui-plugin-manager/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/README.md +10 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/README.zh.md +10 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/DisclosureRow.module.css +14 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/MenuGroup.module.css +37 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/index.js +349 -226
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/DisclosureRow.d.ts +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/Input.d.ts +4 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/MenuGroup.d.ts +22 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/types/index.d.ts +1 -0
- package/node_modules/@deepseek-ai/dsh-client-ui-primitives/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-reference/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-renderer/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-renderer/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-schedule/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-client-ui-session/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/client.js +11 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-account/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-agent-loop/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +7 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-session-log/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-shell/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-signin/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-subagent/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-web-search/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-client-ui-shortcuts/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-shortcuts/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-shortcuts/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-shortcuts/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-shortcuts/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +10 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-browser/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-documentpreview/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/lib/client.js +9 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-files/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/README.i18n.yaml +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/README.md +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/README.zh.md +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/lib/client.js +183 -156
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-right/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar-terminal/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-slots/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/README.i18n.yaml +8 -8
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/README.md +5 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/README.zh.md +5 -3
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/index.js +4 -4
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.i18n.yaml +9 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.md +12 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/README.zh.md +12 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +304 -54
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +24 -23
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/README.i18n.yaml +26 -20
- package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/README.md +37 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/README.zh.md +37 -13
- package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +1257 -218
- package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/package.json +23 -19
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +3 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +24 -24
- package/node_modules/@deepseek-ai/dsh-cmdline/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-command-compact/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-command-feedback/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-command-goal/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-commands/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-commands/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-compaction/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-compaction-image-offload/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-config-editor/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-cordis-client-runner/lib/client.js +59 -4
- package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/README.i18n.yaml +5 -2
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/README.md +8 -0
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/README.zh.md +8 -0
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/index.js +58 -20
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/typert.host.js +18 -18
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/typert.remote-client.js +12 -12
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/types/index.js +5 -3
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/types/inspect-registry.js +62 -17
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/package.json +17 -16
- package/node_modules/@deepseek-ai/dsh-credentials/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-credentials-local/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-deepseek-account/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-deepseek-account-platform/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-deepseek-llm-api-extensions/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-deque/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-experimental-agent-team-profile/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-experimental-api-speech-to-text/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-experimental-auto-review/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-experimental-auto-review/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-auto-review/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-experimental-auto-review/cordis.patch.yml +3 -0
- package/node_modules/@deepseek-ai/dsh-experimental-auto-review/lib/index.js +11 -5
- package/node_modules/@deepseek-ai/dsh-experimental-auto-review/package.json +39 -35
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-agent-team/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-experimental-client-ui-voice-input/package.json +31 -31
- package/node_modules/@deepseek-ai/dsh-experimental-schedule-bundle/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-experimental-speech-to-text-sensevoice/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-experimental-tool-agent-team/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-experimental-voice-input-bundle/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-file-reference/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-file-reference-local/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-fs/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-fs-local/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-fs-observation-policy/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-fs-sandbox/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-goal/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-goal/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-goal-round-driver/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-headless/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-hmr/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-hmr/README.md +1 -0
- package/node_modules/@deepseek-ai/dsh-hmr/README.zh.md +1 -0
- package/node_modules/@deepseek-ai/dsh-hmr/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-home-paths/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-hook-protocol/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-hooks-claude-code/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-hooks-codex/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-host-directory-picker/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-browse/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-host-frontend-static/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-host-open-in-app/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-host-product-telemetry-otel/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-host-webserver/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-http-proxy/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-invariants/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-jobs/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-jobs-local/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-launch-environment/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-lazy-require/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-llm/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-llm/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-llm-cursor/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/package.json +37 -37
- package/node_modules/@deepseek-ai/dsh-llm-deepseek-account/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-llm-deepseek-api-key/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.md +3 -3
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/README.zh.md +3 -3
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +10 -6
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-llm-retry/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-mcp-client/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-mcp-resources/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-message-feedback/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-native-command/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-no-progress-reminder/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-office-to-pdf/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-otel/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-output-retention/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-package-manifest/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-permission-presets/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-permission-presets/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-persona/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-plan-mode/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-plugin-manager/package.json +27 -27
- package/node_modules/@deepseek-ai/dsh-plugin-package-inventory-deepseek/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-ptc-runtime/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-ptc-runtime-node/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-pwsh-local/package.json +8 -8
- package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-sandbox/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/README.md +3 -3
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/README.zh.md +3 -3
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/assets/diagnose-windows-sandbox-acl/SKILL.md +39 -22
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/assets/diagnose-windows-sandbox-acl/scripts/diagnose-windows-sandbox-acl.ps1 +308 -231
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-schedule/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-schedule/README.md +3 -3
- package/node_modules/@deepseek-ai/dsh-schedule/README.zh.md +3 -3
- package/node_modules/@deepseek-ai/dsh-schedule/lib/index.js +6 -4
- package/node_modules/@deepseek-ai/dsh-schedule/lib/types/domain.js +6 -4
- package/node_modules/@deepseek-ai/dsh-schedule/package.json +30 -30
- package/node_modules/@deepseek-ai/dsh-scope/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-sdk-app/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-sdk-jsonrpc-server/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-sdk-minimal/package.json +28 -28
- package/node_modules/@deepseek-ai/dsh-sdk-protocol/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-session/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-session-checkpoint-policy/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-session-format/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-session-format-catalog/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-session-format-v0-to-v1/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-session-format-v1-to-v2/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-session-format-v2-to-v3/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-session-format-v3-to-v4/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-session-log-deepseek/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-session-log-export/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-session-persistence/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-session-projection/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-session-query/package.json +18 -18
- package/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +9 -9
- package/node_modules/@deepseek-ai/dsh-session-reference/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-session-reference/package.json +34 -34
- package/node_modules/@deepseek-ai/dsh-session-stats/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-session-telemetry/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-session-title/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/package.json +13 -13
- package/node_modules/@deepseek-ai/dsh-session-title-llm/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-session-turn-outline/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-settings/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-shell/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-shell-env/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-skill/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-skill-badge/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-skill-filesystem/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-skill-office/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-spill/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-spill-local/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-spill-policy/package.json +30 -30
- package/node_modules/@deepseek-ai/dsh-storage/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-storage-domain/package.json +5 -5
- package/node_modules/@deepseek-ai/dsh-storage-json/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-subagent/lib/typert.host.js +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent/package.json +48 -48
- package/node_modules/@deepseek-ai/dsh-subagent-acp/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-subagent-in-process-driver/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-subprocess/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-subprocess-local/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-system-prompt/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-terminal/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-time-context/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-timeout/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tmux-context/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-token-meter/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-tool-ask-user/README.i18n.yaml +22 -22
- package/node_modules/@deepseek-ai/dsh-tool-ask-user/README.md +27 -11
- package/node_modules/@deepseek-ai/dsh-tool-ask-user/README.zh.md +27 -11
- package/node_modules/@deepseek-ai/dsh-tool-ask-user/lib/index.js +211 -3
- package/node_modules/@deepseek-ai/dsh-tool-ask-user/package.json +12 -9
- package/node_modules/@deepseek-ai/dsh-tool-bash/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-bash/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-bash/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-bash/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-bash/package.json +29 -29
- package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-tool-call-timeout-policy/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-tool-cordis/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-cordis/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-cordis/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +31 -1
- package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/index.js +3 -3
- package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +29 -29
- package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-tool-goal/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-tool-jobs/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-tool-present/package.json +17 -17
- package/node_modules/@deepseek-ai/dsh-tool-pwsh/README.i18n.yaml +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-pwsh/README.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-pwsh/README.zh.md +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-pwsh/lib/index.js +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-pwsh/package.json +28 -28
- package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/README.i18n.yaml +4 -4
- package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/README.md +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/README.zh.md +2 -2
- package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/lib/index.js +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-pwsh-persistent/package.json +20 -20
- package/node_modules/@deepseek-ai/dsh-tool-ralph/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-tool-skill/package.json +12 -12
- package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-tool-subagent/package.json +26 -26
- package/node_modules/@deepseek-ai/dsh-tool-subagent-control/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-tool-todo/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-tool-web/package.json +19 -19
- package/node_modules/@deepseek-ai/dsh-tool-workflow/package.json +22 -22
- package/node_modules/@deepseek-ai/dsh-tool-workspace-dependencies/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-tools/package.json +24 -24
- package/node_modules/@deepseek-ai/dsh-tui-app/package.json +75 -75
- package/node_modules/@deepseek-ai/dsh-typert-loader/package.json +4 -4
- package/node_modules/@deepseek-ai/dsh-typert-protocol/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-typert-registry/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-user-approval/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-user-questions/README.i18n.yaml +19 -22
- package/node_modules/@deepseek-ai/dsh-user-questions/README.md +13 -10
- package/node_modules/@deepseek-ai/dsh-user-questions/README.zh.md +13 -10
- package/node_modules/@deepseek-ai/dsh-user-questions/lib/index.js +659 -46
- package/node_modules/@deepseek-ai/dsh-user-questions/lib/typert.host.js +770 -0
- package/node_modules/@deepseek-ai/dsh-user-questions/lib/typert.remote-client.js +125 -0
- package/node_modules/@deepseek-ai/dsh-user-questions/lib/types/index.js +289 -58
- package/node_modules/@deepseek-ai/dsh-user-questions/lib/types/projection.js +298 -0
- package/node_modules/@deepseek-ai/dsh-user-questions/lib/types/timed-wait.js +85 -0
- package/node_modules/@deepseek-ai/dsh-user-questions/package.json +35 -11
- package/node_modules/@deepseek-ai/dsh-util-code-language/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-util-crypto/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-util-time/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-util-values/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-util-workspace-path/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-web/package.json +3 -3
- package/node_modules/@deepseek-ai/dsh-web-app/package.json +136 -136
- package/node_modules/@deepseek-ai/dsh-web-fetch-http/package.json +7 -7
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-5SrrfWpU.js +127 -0
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-BPHePDI_.css +1 -0
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/index.html +2 -2
- package/node_modules/@deepseek-ai/dsh-web-frontend/package.json +16 -16
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +15 -15
- package/node_modules/@deepseek-ai/dsh-web-search-exa/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-web-search-perplexity/package.json +6 -6
- package/node_modules/@deepseek-ai/dsh-webhook/package.json +21 -21
- package/node_modules/@deepseek-ai/dsh-webhook-github/package.json +10 -10
- package/node_modules/@deepseek-ai/dsh-win32-process/package.json +2 -2
- package/node_modules/@deepseek-ai/dsh-workflow/package.json +11 -11
- package/node_modules/@deepseek-ai/dsh-workflow-ptc/package.json +34 -34
- package/node_modules/@deepseek-ai/dsh-workspace/package.json +14 -14
- package/node_modules/@deepseek-ai/dsh-workspace-changes/package.json +11 -11
- package/node_modules/@earendil-works/pi-ai/README.md +52 -8
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +131 -87
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +17 -5
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +13 -12
- package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +21 -73
- package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js +55 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +25 -65
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +19 -12
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +26 -23
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +44 -59
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +56 -56
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +14 -19
- package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/transform-messages.js +21 -7
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.js +5 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/meta.js +190 -0
- package/node_modules/@earendil-works/pi-ai/dist/bun-oauth.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/compat.js +9 -6
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +49 -4
- package/node_modules/@earendil-works/pi-ai/dist/index.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +4 -0
- package/node_modules/@earendil-works/pi-ai/dist/models.js +5 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/all.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/ant-ling.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/anthropic.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure-openai-responses.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/baseten.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cerebras.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-workers-ai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/deepseek.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/google-vertex.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/google.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/groq.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/kimi-coding.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/meta.json +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/mistral.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-individual.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/radius.json +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-ams.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-sgp.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +12 -11
- package/node_modules/@earendil-works/pi-ai/dist/providers/meta.js +24 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/meta.models.js +6 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js +4 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.js +22 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.js +5 -4
- package/node_modules/@earendil-works/pi-ai/dist/providers/radius.js +19 -5
- package/node_modules/@earendil-works/pi-ai/dist/providers/radius.models.js +6 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/estimate.js +8 -29
- package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +25 -7
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +11 -5
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +9 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/text.js +26 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/transcript.js +204 -0
- package/node_modules/@earendil-works/pi-ai/node_modules/https-proxy-agent/LICENSE +22 -0
- package/node_modules/@earendil-works/pi-ai/node_modules/https-proxy-agent/README.md +70 -0
- package/node_modules/@earendil-works/pi-ai/node_modules/https-proxy-agent/dist/index.js +234 -0
- package/node_modules/@earendil-works/pi-ai/node_modules/https-proxy-agent/dist/parse-proxy-response.js +94 -0
- package/node_modules/@earendil-works/pi-ai/node_modules/https-proxy-agent/package.json +51 -0
- package/node_modules/@earendil-works/pi-ai/package.json +9 -9
- package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
- package/node_modules/@google/genai/README.md +19 -4
- package/node_modules/@google/genai/dist/index.cjs +7737 -2768
- package/node_modules/@google/genai/dist/index.mjs +7730 -2769
- package/node_modules/@google/genai/dist/node/index.cjs +7741 -2763
- package/node_modules/@google/genai/dist/node/index.mjs +7734 -2764
- package/node_modules/@google/genai/dist/tokenizer/node.cjs +424 -117
- package/node_modules/@google/genai/dist/tokenizer/node.mjs +424 -117
- package/node_modules/@google/genai/dist/vertex_internal/index.cjs +560 -181
- package/node_modules/@google/genai/dist/vertex_internal/index.js +561 -182
- package/node_modules/@google/genai/dist/web/index.mjs +7717 -2757
- package/node_modules/@google/genai/package.json +3 -3
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +41 -70
- package/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +3 -0
- package/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +1 -0
- package/node_modules/@smithy/node-http-handler/dist-es/index.js +3 -3
- package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +19 -8
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +2 -3
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +10 -2
- package/node_modules/@smithy/node-http-handler/package.json +23 -30
- package/node_modules/agent-base/dist/helpers.js +5 -34
- package/node_modules/agent-base/dist/index.js +8 -40
- package/node_modules/agent-base/package.json +11 -11
- package/node_modules/http-proxy-agent/dist/index.js +26 -42
- package/node_modules/http-proxy-agent/package.json +14 -13
- package/node_modules/https-proxy-agent/node_modules/agent-base/LICENSE +22 -0
- package/node_modules/https-proxy-agent/node_modules/agent-base/README.md +69 -0
- package/node_modules/https-proxy-agent/node_modules/agent-base/dist/helpers.js +66 -0
- package/node_modules/https-proxy-agent/node_modules/agent-base/dist/index.js +178 -0
- package/node_modules/https-proxy-agent/node_modules/agent-base/package.json +46 -0
- package/node_modules/proxy-agent-negotiate/dist/index.js +35 -0
- package/node_modules/proxy-agent-negotiate/package.json +43 -0
- package/node_modules/typebox/build/compile/validator.mjs +1 -1
- package/node_modules/typebox/build/format/date.mjs +1 -1
- package/node_modules/typebox/build/format/date_time.mjs +3 -3
- package/node_modules/typebox/build/format/email.mjs +2 -2
- package/node_modules/typebox/build/format/hostname.mjs +2 -10
- package/node_modules/typebox/build/format/idn_email.mjs +3 -3
- package/node_modules/typebox/build/format/idn_hostname.mjs +3 -11
- package/node_modules/typebox/build/format/idna/format/bidi.mjs +98 -0
- package/node_modules/typebox/build/format/idna/format/puny.mjs +144 -0
- package/node_modules/typebox/build/format/idna/hostname.mjs +16 -0
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +43 -0
- package/node_modules/typebox/build/format/idna/index.mjs +2 -0
- package/node_modules/typebox/build/format/idna/label/ascii.mjs +9 -0
- package/node_modules/typebox/build/format/idna/label/puny.mjs +28 -0
- package/node_modules/typebox/build/format/idna/label/unicode.mjs +106 -0
- package/node_modules/typebox/build/format/idna/pattern/pattern.mjs +70 -0
- package/node_modules/typebox/build/format/ipv4.mjs +2 -32
- package/node_modules/typebox/build/format/ipv6.mjs +2 -61
- package/node_modules/typebox/build/format/iri.mjs +30 -8
- package/node_modules/typebox/build/format/iri_reference.mjs +9 -55
- package/node_modules/typebox/build/format/json_pointer.mjs +2 -2
- package/node_modules/typebox/build/format/json_pointer_uri_fragment.mjs +2 -2
- package/node_modules/typebox/build/format/regex.mjs +2 -6
- package/node_modules/typebox/build/format/relative_json_pointer.mjs +2 -2
- package/node_modules/typebox/build/format/time.mjs +19 -14
- package/node_modules/typebox/build/format/uri.mjs +3 -130
- package/node_modules/typebox/build/format/uri_reference.mjs +2 -3
- package/node_modules/typebox/build/format/uri_template.mjs +4 -5
- package/node_modules/typebox/build/format/url.mjs +4 -5
- package/node_modules/typebox/build/guard/emit.mjs +13 -8
- package/node_modules/typebox/build/guard/guard.mjs +22 -13
- package/node_modules/typebox/build/guard/string.mjs +23 -31
- package/node_modules/typebox/build/schema/compile.mjs +8 -8
- package/node_modules/typebox/build/schema/engine/_context.mjs +12 -17
- package/node_modules/typebox/build/schema/engine/_functions.mjs +2 -3
- package/node_modules/typebox/build/schema/engine/_regexp.mjs +4 -0
- package/node_modules/typebox/build/schema/engine/_stack.mjs +138 -36
- package/node_modules/typebox/build/schema/engine/additionalItems.mjs +17 -7
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +20 -7
- package/node_modules/typebox/build/schema/engine/allOf.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/anyOf.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/contains.mjs +18 -6
- package/node_modules/typebox/build/schema/engine/enum.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/if.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/items.mjs +26 -6
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/minContains.mjs +14 -4
- package/node_modules/typebox/build/schema/engine/not.mjs +4 -2
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +9 -8
- package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -2
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +4 -3
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +1 -3
- package/node_modules/typebox/build/schema/engine/ref.mjs +3 -9
- package/node_modules/typebox/build/schema/engine/schema.mjs +19 -4
- package/node_modules/typebox/build/schema/engine/type.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +2 -2
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +2 -2
- package/node_modules/typebox/build/schema/errors.mjs +7 -13
- package/node_modules/typebox/build/schema/intern/index.mjs +1 -0
- package/node_modules/typebox/build/schema/intern/intern.mjs +259 -0
- package/node_modules/typebox/build/schema/parse.mjs +10 -5
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +327 -1
- package/node_modules/typebox/build/schema/schema.mjs +1 -0
- package/node_modules/typebox/build/schema/static/propertyNames.mjs +3 -0
- package/node_modules/typebox/build/schema/types/index.mjs +0 -2
- package/node_modules/typebox/build/system/memory/assign.mjs +2 -1
- package/node_modules/typebox/build/system/memory/clone.mjs +14 -11
- package/node_modules/typebox/build/system/memory/create.mjs +3 -4
- package/node_modules/typebox/build/system/memory/discard.mjs +8 -7
- package/node_modules/typebox/build/system/memory/freeze.mjs +6 -0
- package/node_modules/typebox/build/system/memory/update.mjs +3 -2
- package/node_modules/typebox/build/system/settings/settings.mjs +2 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +16 -3
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +34 -4
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +20 -26
- package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +9 -13
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +12 -19
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +8 -20
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +11 -8
- package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +3 -4
- package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +26 -6
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +3 -4
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +3 -4
- package/node_modules/typebox/build/type/engine/priority/priority.mjs +3 -4
- package/node_modules/typebox/build/type/script/mapping.mjs +18 -25
- package/node_modules/typebox/build/type/script/parser.mjs +27 -23
- package/node_modules/typebox/build/value/errors/errors.mjs +2 -7
- package/node_modules/typebox/package.json +29 -29
- package/node_modules/typebox/readme.md +84 -83
- package/package.json +294 -308
- package/node_modules/@aws-crypto/sha256-browser/CHANGELOG.md +0 -118
- package/node_modules/@aws-crypto/sha256-browser/LICENSE +0 -202
- package/node_modules/@aws-crypto/sha256-browser/README.md +0 -31
- package/node_modules/@aws-crypto/sha256-browser/build/main/constants.js +0 -43
- package/node_modules/@aws-crypto/sha256-browser/build/main/crossPlatformSha256.js +0 -30
- package/node_modules/@aws-crypto/sha256-browser/build/main/index.js +0 -8
- package/node_modules/@aws-crypto/sha256-browser/build/main/isEmptyData.js +0 -11
- package/node_modules/@aws-crypto/sha256-browser/build/main/webCryptoSha256.js +0 -56
- package/node_modules/@aws-crypto/sha256-browser/build/module/constants.js +0 -40
- package/node_modules/@aws-crypto/sha256-browser/build/module/crossPlatformSha256.js +0 -27
- package/node_modules/@aws-crypto/sha256-browser/build/module/index.js +0 -3
- package/node_modules/@aws-crypto/sha256-browser/build/module/isEmptyData.js +0 -7
- package/node_modules/@aws-crypto/sha256-browser/build/module/webCryptoSha256.js +0 -53
- package/node_modules/@aws-crypto/sha256-browser/package.json +0 -28
- package/node_modules/@aws-crypto/sha256-browser/src/constants.ts +0 -41
- package/node_modules/@aws-crypto/sha256-browser/src/crossPlatformSha256.ts +0 -30
- package/node_modules/@aws-crypto/sha256-browser/src/index.ts +0 -2
- package/node_modules/@aws-crypto/sha256-browser/src/isEmptyData.ts +0 -9
- package/node_modules/@aws-crypto/sha256-browser/src/webCryptoSha256.ts +0 -71
- package/node_modules/@aws-crypto/sha256-browser/tsconfig.json +0 -10
- package/node_modules/@aws-crypto/sha256-browser/tsconfig.module.json +0 -7
- package/node_modules/@aws-crypto/sha256-js/CHANGELOG.md +0 -106
- package/node_modules/@aws-crypto/sha256-js/LICENSE +0 -201
- package/node_modules/@aws-crypto/sha256-js/README.md +0 -29
- package/node_modules/@aws-crypto/sha256-js/build/main/RawSha256.js +0 -124
- package/node_modules/@aws-crypto/sha256-js/build/main/constants.js +0 -98
- package/node_modules/@aws-crypto/sha256-js/build/main/index.js +0 -5
- package/node_modules/@aws-crypto/sha256-js/build/main/jsSha256.js +0 -85
- package/node_modules/@aws-crypto/sha256-js/build/main/knownHashes.fixture.js +0 -322
- package/node_modules/@aws-crypto/sha256-js/build/module/RawSha256.js +0 -121
- package/node_modules/@aws-crypto/sha256-js/build/module/constants.js +0 -95
- package/node_modules/@aws-crypto/sha256-js/build/module/index.js +0 -2
- package/node_modules/@aws-crypto/sha256-js/build/module/jsSha256.js +0 -82
- package/node_modules/@aws-crypto/sha256-js/build/module/knownHashes.fixture.js +0 -319
- package/node_modules/@aws-crypto/sha256-js/package.json +0 -27
- package/node_modules/@aws-crypto/sha256-js/src/RawSha256.ts +0 -164
- package/node_modules/@aws-crypto/sha256-js/src/constants.ts +0 -98
- package/node_modules/@aws-crypto/sha256-js/src/index.ts +0 -1
- package/node_modules/@aws-crypto/sha256-js/src/jsSha256.ts +0 -94
- package/node_modules/@aws-crypto/sha256-js/src/knownHashes.fixture.ts +0 -401
- package/node_modules/@aws-crypto/sha256-js/tsconfig.json +0 -10
- package/node_modules/@aws-crypto/sha256-js/tsconfig.module.json +0 -7
- package/node_modules/@aws-crypto/supports-web-crypto/CHANGELOG.md +0 -66
- package/node_modules/@aws-crypto/supports-web-crypto/LICENSE +0 -202
- package/node_modules/@aws-crypto/supports-web-crypto/README.md +0 -32
- package/node_modules/@aws-crypto/supports-web-crypto/build/main/index.js +0 -5
- package/node_modules/@aws-crypto/supports-web-crypto/build/main/supportsWebCrypto.js +0 -69
- package/node_modules/@aws-crypto/supports-web-crypto/build/module/index.js +0 -2
- package/node_modules/@aws-crypto/supports-web-crypto/build/module/supportsWebCrypto.js +0 -62
- package/node_modules/@aws-crypto/supports-web-crypto/package.json +0 -23
- package/node_modules/@aws-crypto/supports-web-crypto/src/index.ts +0 -1
- package/node_modules/@aws-crypto/supports-web-crypto/src/supportsWebCrypto.ts +0 -76
- package/node_modules/@aws-crypto/supports-web-crypto/tsconfig.json +0 -10
- package/node_modules/@aws-crypto/supports-web-crypto/tsconfig.module.json +0 -7
- package/node_modules/@aws-crypto/util/CHANGELOG.md +0 -71
- package/node_modules/@aws-crypto/util/LICENSE +0 -201
- package/node_modules/@aws-crypto/util/README.md +0 -16
- package/node_modules/@aws-crypto/util/build/main/convertToBuffer.js +0 -24
- package/node_modules/@aws-crypto/util/build/main/index.js +0 -14
- package/node_modules/@aws-crypto/util/build/main/isEmptyData.js +0 -13
- package/node_modules/@aws-crypto/util/build/main/numToUint8.js +0 -15
- package/node_modules/@aws-crypto/util/build/main/uint32ArrayFrom.js +0 -20
- package/node_modules/@aws-crypto/util/build/module/convertToBuffer.js +0 -20
- package/node_modules/@aws-crypto/util/build/module/index.js +0 -7
- package/node_modules/@aws-crypto/util/build/module/isEmptyData.js +0 -9
- package/node_modules/@aws-crypto/util/build/module/numToUint8.js +0 -11
- package/node_modules/@aws-crypto/util/build/module/uint32ArrayFrom.js +0 -16
- package/node_modules/@aws-crypto/util/package.json +0 -27
- package/node_modules/@aws-crypto/util/src/convertToBuffer.ts +0 -30
- package/node_modules/@aws-crypto/util/src/index.ts +0 -7
- package/node_modules/@aws-crypto/util/src/isEmptyData.ts +0 -12
- package/node_modules/@aws-crypto/util/src/numToUint8.ts +0 -11
- package/node_modules/@aws-crypto/util/src/uint32ArrayFrom.ts +0 -16
- package/node_modules/@aws-crypto/util/tsconfig.json +0 -9
- package/node_modules/@aws-crypto/util/tsconfig.module.json +0 -7
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/auth/httpAuthSchemeProvider.js +0 -63
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/endpoint/bdd.js +0 -49
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/endpoint/endpointResolver.js +0 -18
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/models/BedrockRuntimeServiceException.js +0 -12
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/models/errors.js +0 -169
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/runtimeConfig.browser.js +0 -41
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/runtimeConfig.js +0 -78
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/runtimeConfig.native.js +0 -19
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/runtimeConfig.shared.js +0 -48
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/schemas/schemas_0.js +0 -1500
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/LICENSE +0 -201
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/README.md +0 -9
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-cjs/index.js +0 -859
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +0 -19
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/constants.js +0 -1
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +0 -12
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +0 -51
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/index.js +0 -3
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +0 -251
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +0 -135
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +0 -46
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +0 -180
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +0 -36
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +0 -21
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +0 -22
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +0 -23
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/timing.js +0 -4
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +0 -63
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/package.json +0 -56
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/LICENSE +0 -201
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/README.md +0 -9
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-cjs/index.js +0 -859
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +0 -19
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/constants.js +0 -1
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +0 -12
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +0 -51
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/index.js +0 -3
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +0 -251
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +0 -135
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +0 -46
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +0 -180
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2.js +0 -2
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-https.js +0 -2
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +0 -36
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +0 -21
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +0 -22
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +0 -23
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/timing.js +0 -4
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +0 -63
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/package.json +0 -56
- package/node_modules/@aws-sdk/util-locate-window/LICENSE +0 -201
- package/node_modules/@aws-sdk/util-locate-window/README.md +0 -4
- package/node_modules/@aws-sdk/util-locate-window/dist-cjs/index.js +0 -12
- package/node_modules/@aws-sdk/util-locate-window/dist-es/index.js +0 -10
- package/node_modules/@aws-sdk/util-locate-window/package.json +0 -43
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-Cq6ljTv2.css +0 -1
- package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/index-Dy0OhsZ5.js +0 -127
- package/node_modules/@earendil-works/pi-ai/dist/utils/deferred-tools.js +0 -36
- package/node_modules/@smithy/is-array-buffer/LICENSE +0 -201
- package/node_modules/@smithy/is-array-buffer/README.md +0 -10
- package/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +0 -32
- package/node_modules/@smithy/is-array-buffer/dist-es/index.js +0 -2
- package/node_modules/@smithy/is-array-buffer/package.json +0 -48
- package/node_modules/@smithy/node-http-handler/dist-es/readable.mock.js +0 -21
- package/node_modules/@smithy/node-http-handler/dist-es/server.mock.js +0 -88
- package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js +0 -8
- package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/index.js +0 -41
- package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/readable.mock.js +0 -21
- package/node_modules/@smithy/util-buffer-from/LICENSE +0 -201
- package/node_modules/@smithy/util-buffer-from/README.md +0 -10
- package/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +0 -47
- package/node_modules/@smithy/util-buffer-from/dist-es/index.js +0 -14
- package/node_modules/@smithy/util-buffer-from/package.json +0 -49
- package/node_modules/@smithy/util-utf8/LICENSE +0 -201
- package/node_modules/@smithy/util-utf8/README.md +0 -4
- package/node_modules/@smithy/util-utf8/dist-cjs/fromUtf8.browser.js +0 -1
- package/node_modules/@smithy/util-utf8/dist-cjs/fromUtf8.js +0 -1
- package/node_modules/@smithy/util-utf8/dist-cjs/index.js +0 -65
- package/node_modules/@smithy/util-utf8/dist-cjs/toUint8Array.js +0 -1
- package/node_modules/@smithy/util-utf8/dist-cjs/toUtf8.browser.js +0 -1
- package/node_modules/@smithy/util-utf8/dist-cjs/toUtf8.js +0 -1
- package/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js +0 -1
- package/node_modules/@smithy/util-utf8/dist-es/fromUtf8.js +0 -5
- package/node_modules/@smithy/util-utf8/dist-es/index.js +0 -3
- package/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js +0 -10
- package/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js +0 -9
- package/node_modules/@smithy/util-utf8/dist-es/toUtf8.js +0 -10
- package/node_modules/@smithy/util-utf8/package.json +0 -54
- package/node_modules/typebox/build/format/_idna.mjs +0 -246
- package/node_modules/typebox/build/format/_puny.mjs +0 -77
- package/node_modules/typebox/build/schema/resolve/ref.mjs +0 -146
- package/node_modules/typebox/build/schema/types/contentEncoding.mjs +0 -13
- package/node_modules/typebox/build/schema/types/contentMediaType.mjs +0 -13
- /package/node_modules/{@aws-sdk/credential-provider-http/node_modules/@smithy → @smithy}/node-http-handler/dist-es/node-http2.js +0 -0
- /package/node_modules/{@aws-sdk/credential-provider-http/node_modules/@smithy → @smithy}/node-http-handler/dist-es/node-https.js +0 -0
|
@@ -5,12 +5,15 @@ import { AssistantMessageEventStream } from "../utils/event-stream.js";
|
|
|
5
5
|
import { providerHeadersToRecord } from "../utils/headers.js";
|
|
6
6
|
import { getPiUserAgent } from "../utils/pi-user-agent.js";
|
|
7
7
|
import { sanitizeSurrogates } from "../utils/sanitize-unicode.js";
|
|
8
|
-
import {
|
|
8
|
+
import { getSystemMessageText } from "../utils/text.js";
|
|
9
|
+
import { collapseSystemMessages, getCurrentTools, getInitialSystemMessage } from "../utils/transcript.js";
|
|
10
|
+
import { convertMessages, convertTools, getDisabledGoogleThinkingConfig, isThinkingPart, mapStopReason, resolveGoogleFunctionCallingMode, resolveGoogleThinkingLevel, retainThoughtSignature, retryGoogleRequest, supportsGoogleStrictToolSampling, toGoogleSdkThinkingLevel, toGoogleThinkingLevel, usesGoogleThinkingLevel, } from "./google-shared.js";
|
|
9
11
|
import { buildBaseOptions } from "./simple-options.js";
|
|
10
12
|
// Counter for generating unique tool call IDs
|
|
11
13
|
let toolCallCounter = 0;
|
|
12
14
|
export const stream = (model, context, options) => {
|
|
13
15
|
const stream = new AssistantMessageEventStream();
|
|
16
|
+
const normalizedContext = collapseSystemMessages(context);
|
|
14
17
|
(async () => {
|
|
15
18
|
const output = {
|
|
16
19
|
role: "assistant",
|
|
@@ -38,7 +41,7 @@ export const stream = (model, context, options) => {
|
|
|
38
41
|
throw new Error(`No API key for provider: ${model.provider}`);
|
|
39
42
|
}
|
|
40
43
|
const client = createClient(model, apiKey, options?.headers);
|
|
41
|
-
let params = buildParams(model,
|
|
44
|
+
let params = buildParams(model, normalizedContext, options);
|
|
42
45
|
const nextParams = await options?.onPayload?.(params, model);
|
|
43
46
|
if (nextParams !== undefined) {
|
|
44
47
|
params = nextParams;
|
|
@@ -242,14 +245,16 @@ export const streamSimple = (model, context, options) => {
|
|
|
242
245
|
return stream(model, context, { ...base, thinking: { enabled: false } });
|
|
243
246
|
}
|
|
244
247
|
const clampedReasoning = clampThinkingLevel(model, options.reasoning);
|
|
248
|
+
if (clampedReasoning === "off") {
|
|
249
|
+
return stream(model, context, { ...base, thinking: { enabled: false } });
|
|
250
|
+
}
|
|
245
251
|
const resolvedLevel = resolveGoogleThinkingLevel(model, clampedReasoning);
|
|
246
|
-
|
|
247
|
-
if (isGemini3ProModel(googleModel) || isGemini3FlashModel(googleModel) || isGemma4Model(googleModel)) {
|
|
252
|
+
if (usesGoogleThinkingLevel(model)) {
|
|
248
253
|
return stream(model, context, {
|
|
249
254
|
...base,
|
|
250
255
|
thinking: {
|
|
251
256
|
enabled: true,
|
|
252
|
-
level:
|
|
257
|
+
level: toGoogleThinkingLevel(resolvedLevel),
|
|
253
258
|
},
|
|
254
259
|
});
|
|
255
260
|
}
|
|
@@ -257,7 +262,7 @@ export const streamSimple = (model, context, options) => {
|
|
|
257
262
|
...base,
|
|
258
263
|
thinking: {
|
|
259
264
|
enabled: true,
|
|
260
|
-
budgetTokens: getGoogleBudget(
|
|
265
|
+
budgetTokens: getGoogleBudget(model, resolvedLevel, options.thinkingBudgets),
|
|
261
266
|
},
|
|
262
267
|
});
|
|
263
268
|
};
|
|
@@ -278,6 +283,8 @@ function createClient(model, apiKey, optionsHeaders) {
|
|
|
278
283
|
}
|
|
279
284
|
function buildParams(model, context, options = {}) {
|
|
280
285
|
const contents = convertMessages(model, context);
|
|
286
|
+
const initialSystemMessage = getInitialSystemMessage(context.messages);
|
|
287
|
+
const currentTools = getCurrentTools(context.messages);
|
|
281
288
|
const generationConfig = {};
|
|
282
289
|
if (options.temperature !== undefined) {
|
|
283
290
|
generationConfig.temperature = options.temperature;
|
|
@@ -286,15 +293,15 @@ function buildParams(model, context, options = {}) {
|
|
|
286
293
|
generationConfig.maxOutputTokens = options.maxTokens;
|
|
287
294
|
}
|
|
288
295
|
const supportsStrictMode = supportsGoogleStrictToolSampling(model.id);
|
|
289
|
-
const functionCallingMode =
|
|
290
|
-
? resolveGoogleFunctionCallingMode(
|
|
296
|
+
const functionCallingMode = currentTools.length > 0
|
|
297
|
+
? resolveGoogleFunctionCallingMode(currentTools, options.toolChoice, supportsStrictMode)
|
|
291
298
|
: undefined;
|
|
299
|
+
const systemInstruction = initialSystemMessage ? getSystemMessageText(initialSystemMessage) : "";
|
|
292
300
|
const config = {
|
|
293
301
|
...(Object.keys(generationConfig).length > 0 && generationConfig),
|
|
294
|
-
...(
|
|
295
|
-
...(
|
|
296
|
-
|
|
297
|
-
tools: convertTools(context.tools, false, supportsStrictMode),
|
|
302
|
+
...(systemInstruction && { systemInstruction: sanitizeSurrogates(systemInstruction) }),
|
|
303
|
+
...(currentTools.length > 0 && {
|
|
304
|
+
tools: convertTools(currentTools, false, supportsStrictMode),
|
|
298
305
|
}),
|
|
299
306
|
...(functionCallingMode !== undefined && {
|
|
300
307
|
toolConfig: { functionCallingConfig: { mode: functionCallingMode } },
|
|
@@ -303,8 +310,7 @@ function buildParams(model, context, options = {}) {
|
|
|
303
310
|
if (options.thinking?.enabled && model.reasoning) {
|
|
304
311
|
const thinkingConfig = { includeThoughts: true };
|
|
305
312
|
if (options.thinking.level !== undefined) {
|
|
306
|
-
|
|
307
|
-
thinkingConfig.thinkingLevel = options.thinking.level;
|
|
313
|
+
thinkingConfig.thinkingLevel = toGoogleSdkThinkingLevel(options.thinking.level);
|
|
308
314
|
}
|
|
309
315
|
else if (options.thinking.budgetTokens !== undefined) {
|
|
310
316
|
thinkingConfig.thinkingBudget = options.thinking.budgetTokens;
|
|
@@ -312,7 +318,7 @@ function buildParams(model, context, options = {}) {
|
|
|
312
318
|
config.thinkingConfig = thinkingConfig;
|
|
313
319
|
}
|
|
314
320
|
else if (model.reasoning && options.thinking && !options.thinking.enabled) {
|
|
315
|
-
config.thinkingConfig =
|
|
321
|
+
config.thinkingConfig = getDisabledGoogleThinkingConfig(model);
|
|
316
322
|
}
|
|
317
323
|
if (options.signal) {
|
|
318
324
|
if (options.signal.aborted) {
|
|
@@ -327,64 +333,6 @@ function buildParams(model, context, options = {}) {
|
|
|
327
333
|
};
|
|
328
334
|
return params;
|
|
329
335
|
}
|
|
330
|
-
function isGemma4Model(model) {
|
|
331
|
-
return /gemma-?4/.test(model.id.toLowerCase());
|
|
332
|
-
}
|
|
333
|
-
function isGemini3ProModel(model) {
|
|
334
|
-
return /gemini-3(?:\.\d+)?-pro/.test(model.id.toLowerCase());
|
|
335
|
-
}
|
|
336
|
-
function isGemini3FlashModel(model) {
|
|
337
|
-
const id = model.id.toLowerCase();
|
|
338
|
-
return /gemini-3(?:\.\d+)?-flash/.test(id) || id === "gemini-flash-latest" || id === "gemini-flash-lite-latest";
|
|
339
|
-
}
|
|
340
|
-
function getDisabledThinkingConfig(model) {
|
|
341
|
-
// Google docs: Gemini 3.1 Pro cannot disable thinking, and Gemini 3 Flash / Flash-Lite
|
|
342
|
-
// do not support full thinking-off either. For Gemini 3 models, use the lowest supported
|
|
343
|
-
// thinkingLevel without includeThoughts so hidden thinking remains invisible to pi.
|
|
344
|
-
if (isGemini3ProModel(model)) {
|
|
345
|
-
return { thinkingLevel: "LOW" };
|
|
346
|
-
}
|
|
347
|
-
if (isGemini3FlashModel(model)) {
|
|
348
|
-
return { thinkingLevel: "MINIMAL" };
|
|
349
|
-
}
|
|
350
|
-
if (isGemma4Model(model)) {
|
|
351
|
-
return { thinkingLevel: "MINIMAL" };
|
|
352
|
-
}
|
|
353
|
-
// Gemini 2.x supports disabling via thinkingBudget = 0.
|
|
354
|
-
return { thinkingBudget: 0 };
|
|
355
|
-
}
|
|
356
|
-
function getThinkingLevel(effort, model) {
|
|
357
|
-
if (isGemini3ProModel(model)) {
|
|
358
|
-
switch (effort) {
|
|
359
|
-
case "minimal":
|
|
360
|
-
case "low":
|
|
361
|
-
return "LOW";
|
|
362
|
-
case "medium":
|
|
363
|
-
case "high":
|
|
364
|
-
return "HIGH";
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
if (isGemma4Model(model)) {
|
|
368
|
-
switch (effort) {
|
|
369
|
-
case "minimal":
|
|
370
|
-
case "low":
|
|
371
|
-
return "MINIMAL";
|
|
372
|
-
case "medium":
|
|
373
|
-
case "high":
|
|
374
|
-
return "HIGH";
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
switch (effort) {
|
|
378
|
-
case "minimal":
|
|
379
|
-
return "MINIMAL";
|
|
380
|
-
case "low":
|
|
381
|
-
return "LOW";
|
|
382
|
-
case "medium":
|
|
383
|
-
return "MEDIUM";
|
|
384
|
-
case "high":
|
|
385
|
-
return "HIGH";
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
336
|
function getGoogleBudget(model, level, customBudgets) {
|
|
389
337
|
if (customBudgets?.[level] !== undefined) {
|
|
390
338
|
return customBudgets[level];
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared utilities for Google Generative AI and Google Vertex providers.
|
|
3
3
|
*/
|
|
4
|
-
import { FinishReason, FunctionCallingConfigMode } from "@google/genai";
|
|
4
|
+
import { FinishReason, FunctionCallingConfigMode, ThinkingLevel as GoogleSdkThinkingLevel, } from "@google/genai";
|
|
5
|
+
import { clampThinkingLevel } from "../models.js";
|
|
5
6
|
import { retryProviderRequest } from "../utils/provider-retry.js";
|
|
6
7
|
import { sanitizeSurrogates } from "../utils/sanitize-unicode.js";
|
|
8
|
+
import { collapseSystemMessages, withoutInitialSystemMessage } from "../utils/transcript.js";
|
|
7
9
|
import { getJsonSchemaToolParameters, resolveJsonSchemaStrictSampling } from "./constrained-sampling.js";
|
|
8
10
|
import { transformMessages } from "./transform-messages.js";
|
|
11
|
+
const GOOGLE_SDK_THINKING_LEVEL_MAP = {
|
|
12
|
+
THINKING_LEVEL_UNSPECIFIED: GoogleSdkThinkingLevel.THINKING_LEVEL_UNSPECIFIED,
|
|
13
|
+
MINIMAL: GoogleSdkThinkingLevel.MINIMAL,
|
|
14
|
+
LOW: GoogleSdkThinkingLevel.LOW,
|
|
15
|
+
MEDIUM: GoogleSdkThinkingLevel.MEDIUM,
|
|
16
|
+
HIGH: GoogleSdkThinkingLevel.HIGH,
|
|
17
|
+
};
|
|
9
18
|
/** Resolve a supported pi level or model-specific Google mapping to a standard Google level. */
|
|
10
19
|
export function resolveGoogleThinkingLevel(model, level) {
|
|
11
|
-
if (level === "off")
|
|
12
|
-
return "high";
|
|
13
20
|
const mapped = model.thinkingLevelMap?.[level];
|
|
14
21
|
const resolvedLevel = typeof mapped === "string" ? mapped.toLowerCase() : level;
|
|
15
22
|
switch (resolvedLevel) {
|
|
@@ -22,6 +29,47 @@ export function resolveGoogleThinkingLevel(model, level) {
|
|
|
22
29
|
throw new Error(`Unsupported Google thinking level mapping for ${model.provider}/${model.id}: ${level} -> ${String(mapped)}`);
|
|
23
30
|
}
|
|
24
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Whether this model uses Gemini's discrete `thinkingLevel` control instead of
|
|
34
|
+
* the token-based `thinkingBudget` control. Supported levels come from the
|
|
35
|
+
* model's `thinkingLevelMap`; this only selects the Google wire format.
|
|
36
|
+
*/
|
|
37
|
+
export function usesGoogleThinkingLevel(model) {
|
|
38
|
+
const id = model.id.toLowerCase();
|
|
39
|
+
return (
|
|
40
|
+
// Match Gemini 3 Pro/Flash IDs with or without a minor version, such as
|
|
41
|
+
// gemini-3-flash-preview, gemini-3.1-pro-preview, and gemini-3.8-flash.
|
|
42
|
+
/gemini-3(?:\.\d+)?-(?:pro|flash)/.test(id) ||
|
|
43
|
+
id === "gemini-flash-latest" ||
|
|
44
|
+
id === "gemini-flash-lite-latest" ||
|
|
45
|
+
// Match both hosted Gemma 4 naming forms: gemma-4-* and gemma4-*.
|
|
46
|
+
/gemma-?4/.test(id));
|
|
47
|
+
}
|
|
48
|
+
export function toGoogleThinkingLevel(level) {
|
|
49
|
+
switch (level) {
|
|
50
|
+
case "minimal":
|
|
51
|
+
return "MINIMAL";
|
|
52
|
+
case "low":
|
|
53
|
+
return "LOW";
|
|
54
|
+
case "medium":
|
|
55
|
+
return "MEDIUM";
|
|
56
|
+
case "high":
|
|
57
|
+
return "HIGH";
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
export function toGoogleSdkThinkingLevel(level) {
|
|
61
|
+
return GOOGLE_SDK_THINKING_LEVEL_MAP[level];
|
|
62
|
+
}
|
|
63
|
+
export function getDisabledGoogleThinkingConfig(model) {
|
|
64
|
+
if (!usesGoogleThinkingLevel(model))
|
|
65
|
+
return { thinkingBudget: 0 };
|
|
66
|
+
const fallback = clampThinkingLevel(model, "off");
|
|
67
|
+
if (fallback === "off")
|
|
68
|
+
return { thinkingBudget: 0 };
|
|
69
|
+
const resolvedLevel = resolveGoogleThinkingLevel(model, fallback);
|
|
70
|
+
const apiLevel = toGoogleThinkingLevel(resolvedLevel);
|
|
71
|
+
return { thinkingLevel: toGoogleSdkThinkingLevel(apiLevel) };
|
|
72
|
+
}
|
|
25
73
|
/**
|
|
26
74
|
* Determines whether a streamed Gemini `Part` should be treated as "thinking".
|
|
27
75
|
*
|
|
@@ -95,13 +143,15 @@ function supportsMultimodalFunctionResponse(modelId) {
|
|
|
95
143
|
* Convert internal messages to Gemini Content[] format.
|
|
96
144
|
*/
|
|
97
145
|
export function convertMessages(model, context) {
|
|
146
|
+
// Gemini has no mid-conversation system messages; the leading prompt is sent as systemInstruction.
|
|
147
|
+
const conversation = withoutInitialSystemMessage(collapseSystemMessages(context).messages);
|
|
98
148
|
const contents = [];
|
|
99
149
|
const normalizeToolCallId = (id) => {
|
|
100
150
|
if (!requiresToolCallId(model.id))
|
|
101
151
|
return id;
|
|
102
152
|
return id.replace(/[^a-zA-Z0-9_-]/g, "_").slice(0, 64);
|
|
103
153
|
};
|
|
104
|
-
const transformedMessages = transformMessages(
|
|
154
|
+
const transformedMessages = transformMessages(conversation, model, normalizeToolCallId);
|
|
105
155
|
for (const msg of transformedMessages) {
|
|
106
156
|
if (msg.role === "user") {
|
|
107
157
|
if (typeof msg.content === "string") {
|
|
@@ -350,6 +400,7 @@ export function mapStopReason(reason) {
|
|
|
350
400
|
case FinishReason.LANGUAGE:
|
|
351
401
|
case FinishReason.MALFORMED_FUNCTION_CALL:
|
|
352
402
|
case FinishReason.UNEXPECTED_TOOL_CALL:
|
|
403
|
+
case FinishReason.TOO_MANY_TOOL_CALLS:
|
|
353
404
|
case FinishReason.NO_IMAGE:
|
|
354
405
|
return "error";
|
|
355
406
|
default: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GoogleGenAI, ResourceScope,
|
|
1
|
+
import { GoogleGenAI, ResourceScope, } from "@google/genai";
|
|
2
2
|
import { calculateCost, clampThinkingLevel } from "../models.js";
|
|
3
3
|
import { formatProviderError, normalizeProviderError } from "../utils/error-body.js";
|
|
4
4
|
import { AssistantMessageEventStream } from "../utils/event-stream.js";
|
|
@@ -6,21 +6,17 @@ import { providerHeadersToRecord } from "../utils/headers.js";
|
|
|
6
6
|
import { getPiUserAgent } from "../utils/pi-user-agent.js";
|
|
7
7
|
import { getProviderEnvValue } from "../utils/provider-env.js";
|
|
8
8
|
import { sanitizeSurrogates } from "../utils/sanitize-unicode.js";
|
|
9
|
-
import {
|
|
9
|
+
import { getSystemMessageText } from "../utils/text.js";
|
|
10
|
+
import { collapseSystemMessages, getCurrentTools, getInitialSystemMessage } from "../utils/transcript.js";
|
|
11
|
+
import { convertMessages, convertTools, getDisabledGoogleThinkingConfig, isThinkingPart, mapStopReason, resolveGoogleFunctionCallingMode, resolveGoogleThinkingLevel, retainThoughtSignature, retryGoogleRequest, supportsGoogleStrictToolSampling, toGoogleSdkThinkingLevel, toGoogleThinkingLevel, usesGoogleThinkingLevel, } from "./google-shared.js";
|
|
10
12
|
import { buildBaseOptions } from "./simple-options.js";
|
|
11
13
|
const API_VERSION = "v1";
|
|
12
14
|
const GCP_VERTEX_CREDENTIALS_MARKER = "gcp-vertex-credentials";
|
|
13
|
-
const THINKING_LEVEL_MAP = {
|
|
14
|
-
THINKING_LEVEL_UNSPECIFIED: ThinkingLevel.THINKING_LEVEL_UNSPECIFIED,
|
|
15
|
-
MINIMAL: ThinkingLevel.MINIMAL,
|
|
16
|
-
LOW: ThinkingLevel.LOW,
|
|
17
|
-
MEDIUM: ThinkingLevel.MEDIUM,
|
|
18
|
-
HIGH: ThinkingLevel.HIGH,
|
|
19
|
-
};
|
|
20
15
|
// Counter for generating unique tool call IDs
|
|
21
16
|
let toolCallCounter = 0;
|
|
22
17
|
export const stream = (model, context, options) => {
|
|
23
18
|
const stream = new AssistantMessageEventStream();
|
|
19
|
+
const normalizedContext = collapseSystemMessages(context);
|
|
24
20
|
(async () => {
|
|
25
21
|
const output = {
|
|
26
22
|
role: "assistant",
|
|
@@ -48,7 +44,7 @@ export const stream = (model, context, options) => {
|
|
|
48
44
|
const client = apiKey
|
|
49
45
|
? createClientWithApiKey(model, apiKey, options?.headers)
|
|
50
46
|
: createClient(model, resolveProject(options), resolveLocation(options), options?.headers, options?.env);
|
|
51
|
-
let params = buildParams(model,
|
|
47
|
+
let params = buildParams(model, normalizedContext, options);
|
|
52
48
|
const nextParams = await options?.onPayload?.(params, model);
|
|
53
49
|
if (nextParams !== undefined) {
|
|
54
50
|
params = nextParams;
|
|
@@ -250,14 +246,19 @@ export const streamSimple = (model, context, options) => {
|
|
|
250
246
|
});
|
|
251
247
|
}
|
|
252
248
|
const clampedReasoning = clampThinkingLevel(model, options.reasoning);
|
|
249
|
+
if (clampedReasoning === "off") {
|
|
250
|
+
return stream(model, context, {
|
|
251
|
+
...base,
|
|
252
|
+
thinking: { enabled: false },
|
|
253
|
+
});
|
|
254
|
+
}
|
|
253
255
|
const resolvedLevel = resolveGoogleThinkingLevel(model, clampedReasoning);
|
|
254
|
-
|
|
255
|
-
if (isGemini3ProModel(geminiModel) || isGemini3FlashModel(geminiModel)) {
|
|
256
|
+
if (usesGoogleThinkingLevel(model)) {
|
|
256
257
|
return stream(model, context, {
|
|
257
258
|
...base,
|
|
258
259
|
thinking: {
|
|
259
260
|
enabled: true,
|
|
260
|
-
level:
|
|
261
|
+
level: toGoogleThinkingLevel(resolvedLevel),
|
|
261
262
|
},
|
|
262
263
|
});
|
|
263
264
|
}
|
|
@@ -265,7 +266,7 @@ export const streamSimple = (model, context, options) => {
|
|
|
265
266
|
...base,
|
|
266
267
|
thinking: {
|
|
267
268
|
enabled: true,
|
|
268
|
-
budgetTokens: getGoogleBudget(
|
|
269
|
+
budgetTokens: getGoogleBudget(model, resolvedLevel, options.thinkingBudgets),
|
|
269
270
|
},
|
|
270
271
|
});
|
|
271
272
|
};
|
|
@@ -352,6 +353,8 @@ function resolveLocation(options) {
|
|
|
352
353
|
}
|
|
353
354
|
function buildParams(model, context, options = {}) {
|
|
354
355
|
const contents = convertMessages(model, context);
|
|
356
|
+
const initialSystemMessage = getInitialSystemMessage(context.messages);
|
|
357
|
+
const currentTools = getCurrentTools(context.messages);
|
|
355
358
|
const generationConfig = {};
|
|
356
359
|
if (options.temperature !== undefined) {
|
|
357
360
|
generationConfig.temperature = options.temperature;
|
|
@@ -360,15 +363,15 @@ function buildParams(model, context, options = {}) {
|
|
|
360
363
|
generationConfig.maxOutputTokens = options.maxTokens;
|
|
361
364
|
}
|
|
362
365
|
const supportsStrictMode = supportsGoogleStrictToolSampling(model.id);
|
|
363
|
-
const functionCallingMode =
|
|
364
|
-
? resolveGoogleFunctionCallingMode(
|
|
366
|
+
const functionCallingMode = currentTools.length > 0
|
|
367
|
+
? resolveGoogleFunctionCallingMode(currentTools, options.toolChoice, supportsStrictMode)
|
|
365
368
|
: undefined;
|
|
369
|
+
const systemInstruction = initialSystemMessage ? getSystemMessageText(initialSystemMessage) : "";
|
|
366
370
|
const config = {
|
|
367
371
|
...(Object.keys(generationConfig).length > 0 && generationConfig),
|
|
368
|
-
...(
|
|
369
|
-
...(
|
|
370
|
-
|
|
371
|
-
tools: convertTools(context.tools, false, supportsStrictMode),
|
|
372
|
+
...(systemInstruction && { systemInstruction: sanitizeSurrogates(systemInstruction) }),
|
|
373
|
+
...(currentTools.length > 0 && {
|
|
374
|
+
tools: convertTools(currentTools, false, supportsStrictMode),
|
|
372
375
|
}),
|
|
373
376
|
...(functionCallingMode !== undefined && {
|
|
374
377
|
toolConfig: { functionCallingConfig: { mode: functionCallingMode } },
|
|
@@ -377,7 +380,7 @@ function buildParams(model, context, options = {}) {
|
|
|
377
380
|
if (options.thinking?.enabled && model.reasoning) {
|
|
378
381
|
const thinkingConfig = { includeThoughts: true };
|
|
379
382
|
if (options.thinking.level !== undefined) {
|
|
380
|
-
thinkingConfig.thinkingLevel =
|
|
383
|
+
thinkingConfig.thinkingLevel = toGoogleSdkThinkingLevel(options.thinking.level);
|
|
381
384
|
}
|
|
382
385
|
else if (options.thinking.budgetTokens !== undefined) {
|
|
383
386
|
thinkingConfig.thinkingBudget = options.thinking.budgetTokens;
|
|
@@ -385,7 +388,7 @@ function buildParams(model, context, options = {}) {
|
|
|
385
388
|
config.thinkingConfig = thinkingConfig;
|
|
386
389
|
}
|
|
387
390
|
else if (model.reasoning && options.thinking && !options.thinking.enabled) {
|
|
388
|
-
config.thinkingConfig =
|
|
391
|
+
config.thinkingConfig = getDisabledGoogleThinkingConfig(model);
|
|
389
392
|
}
|
|
390
393
|
if (options.signal) {
|
|
391
394
|
if (options.signal.aborted) {
|
|
@@ -400,49 +403,6 @@ function buildParams(model, context, options = {}) {
|
|
|
400
403
|
};
|
|
401
404
|
return params;
|
|
402
405
|
}
|
|
403
|
-
function isGemini3ProModel(model) {
|
|
404
|
-
return /gemini-3(?:\.\d+)?-pro/.test(model.id.toLowerCase());
|
|
405
|
-
}
|
|
406
|
-
function isGemini3FlashModel(model) {
|
|
407
|
-
const id = model.id.toLowerCase();
|
|
408
|
-
return /gemini-3(?:\.\d+)?-flash/.test(id) || id === "gemini-flash-latest" || id === "gemini-flash-lite-latest";
|
|
409
|
-
}
|
|
410
|
-
function getDisabledThinkingConfig(model) {
|
|
411
|
-
// Google docs: Gemini 3.1 Pro cannot disable thinking, and Gemini 3 Flash / Flash-Lite
|
|
412
|
-
// do not support full thinking-off either. For Gemini 3 models, use the lowest supported
|
|
413
|
-
// thinkingLevel without includeThoughts so hidden thinking remains invisible to pi.
|
|
414
|
-
const geminiModel = model;
|
|
415
|
-
if (isGemini3ProModel(geminiModel)) {
|
|
416
|
-
return { thinkingLevel: ThinkingLevel.LOW };
|
|
417
|
-
}
|
|
418
|
-
if (isGemini3FlashModel(geminiModel)) {
|
|
419
|
-
return { thinkingLevel: ThinkingLevel.MINIMAL };
|
|
420
|
-
}
|
|
421
|
-
// Gemini 2.x supports disabling via thinkingBudget = 0.
|
|
422
|
-
return { thinkingBudget: 0 };
|
|
423
|
-
}
|
|
424
|
-
function getGemini3ThinkingLevel(effort, model) {
|
|
425
|
-
if (isGemini3ProModel(model)) {
|
|
426
|
-
switch (effort) {
|
|
427
|
-
case "minimal":
|
|
428
|
-
case "low":
|
|
429
|
-
return "LOW";
|
|
430
|
-
case "medium":
|
|
431
|
-
case "high":
|
|
432
|
-
return "HIGH";
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
switch (effort) {
|
|
436
|
-
case "minimal":
|
|
437
|
-
return "MINIMAL";
|
|
438
|
-
case "low":
|
|
439
|
-
return "LOW";
|
|
440
|
-
case "medium":
|
|
441
|
-
return "MEDIUM";
|
|
442
|
-
case "high":
|
|
443
|
-
return "HIGH";
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
406
|
function getGoogleBudget(model, level, customBudgets) {
|
|
447
407
|
if (customBudgets?.[level] !== undefined) {
|
|
448
408
|
return customBudgets[level];
|
|
@@ -5,6 +5,8 @@ import { headersToRecord } from "../utils/headers.js";
|
|
|
5
5
|
import { parseStreamingJson } from "../utils/json-parse.js";
|
|
6
6
|
import { getPiUserAgent } from "../utils/pi-user-agent.js";
|
|
7
7
|
import { sanitizeSurrogates } from "../utils/sanitize-unicode.js";
|
|
8
|
+
import { getSystemMessageText, renderSystemMessageUpdate } from "../utils/text.js";
|
|
9
|
+
import { getCurrentTools, resolveTranscript } from "../utils/transcript.js";
|
|
8
10
|
import { getJsonSchemaToolParameters, resolveJsonSchemaStrictSampling } from "./constrained-sampling.js";
|
|
9
11
|
import { buildBaseOptions } from "./simple-options.js";
|
|
10
12
|
import { transformMessages } from "./transform-messages.js";
|
|
@@ -15,6 +17,7 @@ const MAX_MISTRAL_ERROR_BODY_CHARS = 4000;
|
|
|
15
17
|
*/
|
|
16
18
|
export const stream = (model, context, options) => {
|
|
17
19
|
const stream = new AssistantMessageEventStream();
|
|
20
|
+
const normalizedContext = resolveTranscript(context, model.compat?.supportsMidConvoSystemMessages);
|
|
18
21
|
(async () => {
|
|
19
22
|
const output = createOutput(model);
|
|
20
23
|
try {
|
|
@@ -23,8 +26,8 @@ export const stream = (model, context, options) => {
|
|
|
23
26
|
throw new Error(`No API key for provider: ${model.provider}`);
|
|
24
27
|
}
|
|
25
28
|
const normalizeMistralToolCallId = createMistralToolCallIdNormalizer();
|
|
26
|
-
const transformedMessages = transformMessages(
|
|
27
|
-
let payload = buildChatPayload(model,
|
|
29
|
+
const transformedMessages = transformMessages(normalizedContext.messages, model, (id) => normalizeMistralToolCallId(id));
|
|
30
|
+
let payload = buildChatPayload(model, normalizedContext, transformedMessages, options);
|
|
28
31
|
const nextPayload = await options?.onPayload?.(payload, model);
|
|
29
32
|
if (nextPayload !== undefined) {
|
|
30
33
|
payload = nextPayload;
|
|
@@ -356,8 +359,9 @@ function buildChatPayload(model, context, messages, options) {
|
|
|
356
359
|
stream: true,
|
|
357
360
|
messages: toChatMessages(messages, model.input.includes("image")),
|
|
358
361
|
};
|
|
359
|
-
|
|
360
|
-
|
|
362
|
+
const currentTools = getCurrentTools(context.messages);
|
|
363
|
+
if (currentTools.length > 0)
|
|
364
|
+
payload.tools = toFunctionTools(currentTools);
|
|
361
365
|
if (options?.temperature !== undefined)
|
|
362
366
|
payload.temperature = options.temperature;
|
|
363
367
|
if (options?.maxTokens !== undefined)
|
|
@@ -370,12 +374,6 @@ function buildChatPayload(model, context, messages, options) {
|
|
|
370
374
|
payload.reasoningEffort = options.reasoningEffort;
|
|
371
375
|
if (shouldUsePromptCaching(options))
|
|
372
376
|
payload.promptCacheKey = options.sessionId;
|
|
373
|
-
if (context.systemPrompt) {
|
|
374
|
-
payload.messages.unshift({
|
|
375
|
-
role: "system",
|
|
376
|
-
content: sanitizeSurrogates(context.systemPrompt),
|
|
377
|
-
});
|
|
378
|
-
}
|
|
379
377
|
return payload;
|
|
380
378
|
}
|
|
381
379
|
function shouldUsePromptCaching(options) {
|
|
@@ -598,7 +596,13 @@ function stripSymbolKeys(value) {
|
|
|
598
596
|
}
|
|
599
597
|
function toChatMessages(messages, supportsImages) {
|
|
600
598
|
const result = [];
|
|
601
|
-
for (const msg of messages) {
|
|
599
|
+
for (const [index, msg] of messages.entries()) {
|
|
600
|
+
if (msg.role === "system") {
|
|
601
|
+
const text = index === 0 ? getSystemMessageText(msg) : renderSystemMessageUpdate(msg);
|
|
602
|
+
if (text.length > 0)
|
|
603
|
+
result.push({ role: "system", content: sanitizeSurrogates(text) });
|
|
604
|
+
continue;
|
|
605
|
+
}
|
|
602
606
|
if (msg.role === "user") {
|
|
603
607
|
if (typeof msg.content === "string") {
|
|
604
608
|
result.push({ role: "user", content: sanitizeSurrogates(msg.content) });
|
|
@@ -701,7 +705,10 @@ function buildToolResultText(text, hasImages, supportsImages, isError) {
|
|
|
701
705
|
return isError ? "[tool error] (no tool output)" : "(no tool output)";
|
|
702
706
|
}
|
|
703
707
|
function usesReasoningEffort(model) {
|
|
704
|
-
return model.id === "mistral-small-2603" ||
|
|
708
|
+
return (model.id === "mistral-small-2603" ||
|
|
709
|
+
model.id === "mistral-small-latest" ||
|
|
710
|
+
model.id.startsWith("mistral-medium-") ||
|
|
711
|
+
model.id === "zai-glm-5-2");
|
|
705
712
|
}
|
|
706
713
|
function usesPromptModeReasoning(model) {
|
|
707
714
|
return model.reasoning && !usesReasoningEffort(model);
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { clampThinkingLevel } from "../models.js";
|
|
2
2
|
import { registerSessionResourceCleanup } from "../session-resources.js";
|
|
3
3
|
import { combineAbortSignals } from "../utils/abort-signals.js";
|
|
4
|
-
import { splitDeferredTools } from "../utils/deferred-tools.js";
|
|
5
4
|
import { appendAssistantMessageDiagnostic, createAssistantMessageDiagnostic, formatThrownValue, } from "../utils/diagnostics.js";
|
|
6
5
|
import { formatProviderError, normalizeProviderError } from "../utils/error-body.js";
|
|
7
6
|
import { AssistantMessageEventStream } from "../utils/event-stream.js";
|
|
8
7
|
import { headersToRecord } from "../utils/headers.js";
|
|
9
8
|
import { resolveHttpProxyUrlForTarget } from "../utils/node-http-proxy.js";
|
|
10
9
|
import { getPiUserAgent } from "../utils/pi-user-agent.js";
|
|
10
|
+
import { getSystemMessageText } from "../utils/text.js";
|
|
11
|
+
import { getDeclaredTools, getInitialSystemMessage, normalizeContext, resolveTranscript, resolveTranscriptTools, } from "../utils/transcript.js";
|
|
11
12
|
import { uuidv7 } from "../utils/uuid.js";
|
|
12
13
|
import { createGrammarToolInputProperties } from "./constrained-sampling.js";
|
|
13
14
|
import { clampOpenAIPromptCacheKey } from "./openai-prompt-cache.js";
|
|
@@ -141,6 +142,7 @@ function compressRequestBodyZstd(bodyJson) {
|
|
|
141
142
|
// ============================================================================
|
|
142
143
|
export const stream = (model, context, options) => {
|
|
143
144
|
const stream = new AssistantMessageEventStream();
|
|
145
|
+
const normalizedContext = resolveTranscript(context, model.compat?.supportsMidConvoSystemMessages);
|
|
144
146
|
(async () => {
|
|
145
147
|
const output = {
|
|
146
148
|
role: "assistant",
|
|
@@ -165,10 +167,10 @@ export const stream = (model, context, options) => {
|
|
|
165
167
|
throw new Error(`No API key for provider: ${model.provider}`);
|
|
166
168
|
}
|
|
167
169
|
const accountId = extractAccountId(apiKey);
|
|
168
|
-
const grammarToolInputProperties = createGrammarToolInputProperties(
|
|
170
|
+
const grammarToolInputProperties = createGrammarToolInputProperties(getDeclaredTools(normalizedContext.messages), model.compat?.supportsOpenAIGrammarTools ?? false);
|
|
169
171
|
const cacheSessionId = options?.cacheRetention === "none" ? undefined : options?.sessionId;
|
|
170
172
|
const codexSessionId = clampOpenAIPromptCacheKey(cacheSessionId);
|
|
171
|
-
let body = buildRequestBody(model,
|
|
173
|
+
let body = buildRequestBody(model, normalizedContext, options, codexSessionId, grammarToolInputProperties);
|
|
172
174
|
const nextBody = await options?.onPayload?.(body, model);
|
|
173
175
|
if (nextBody !== undefined) {
|
|
174
176
|
body = nextBody;
|
|
@@ -228,7 +230,7 @@ export const stream = (model, context, options) => {
|
|
|
228
230
|
}
|
|
229
231
|
appendAssistantMessageDiagnostic(output, createAssistantMessageDiagnostic("provider_transport_failure", error, {
|
|
230
232
|
configuredTransport: transport,
|
|
231
|
-
|
|
233
|
+
...(websocketStarted ? {} : { fallbackTransport: "sse" }),
|
|
232
234
|
eventsEmitted: websocketStarted,
|
|
233
235
|
phase: websocketStarted ? "after_message_stream_start" : "before_message_stream_start",
|
|
234
236
|
requestBytes: new TextEncoder().encode(bodyJson).byteLength,
|
|
@@ -368,31 +370,27 @@ export const streamSimple = (model, context, options) => {
|
|
|
368
370
|
// ============================================================================
|
|
369
371
|
// Request Building
|
|
370
372
|
// ============================================================================
|
|
371
|
-
function buildRequestBody(model, context, options, cacheSessionId, grammarToolInputProperties = createGrammarToolInputProperties(context.
|
|
373
|
+
function buildRequestBody(model, context, options, cacheSessionId, grammarToolInputProperties = createGrammarToolInputProperties(getDeclaredTools(context.messages), model.compat?.supportsOpenAIGrammarTools ?? false)) {
|
|
372
374
|
const supportsStrictMode = model.compat?.supportsStrictMode ?? true;
|
|
373
375
|
const supportsOpenAIGrammarTools = model.compat?.supportsOpenAIGrammarTools ?? false;
|
|
374
|
-
const
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
? "tool-search"
|
|
378
|
-
: undefined;
|
|
379
|
-
const toolPlacement = splitDeferredTools(context, deferredToolsMode !== undefined);
|
|
376
|
+
const supportsAdditionalTools = model.compat?.supportsAdditionalTools ?? false;
|
|
377
|
+
const supportsToolSearch = model.compat?.supportsToolSearch ?? false;
|
|
378
|
+
const transcriptTools = resolveTranscriptTools(context.messages, supportsAdditionalTools || supportsToolSearch);
|
|
380
379
|
const messages = convertResponsesMessages(model, context, CODEX_TOOL_CALL_PROVIDERS, {
|
|
381
380
|
includeSystemPrompt: false,
|
|
382
381
|
grammarToolInputProperties,
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
supportsStrictMode,
|
|
388
|
-
supportsOpenAIGrammarTools,
|
|
389
|
-
},
|
|
382
|
+
supportsMidConvoSystemMessages: model.compat?.supportsMidConvoSystemMessages ?? false,
|
|
383
|
+
supportsAdditionalTools,
|
|
384
|
+
supportsToolSearch,
|
|
385
|
+
toolOptions: { strict: null, supportsStrictMode, supportsOpenAIGrammarTools },
|
|
390
386
|
});
|
|
387
|
+
const initialSystemMessage = getInitialSystemMessage(context.messages);
|
|
388
|
+
const instructions = initialSystemMessage ? getSystemMessageText(initialSystemMessage) : "";
|
|
391
389
|
const body = {
|
|
392
390
|
model: model.id,
|
|
393
391
|
store: false,
|
|
394
392
|
stream: true,
|
|
395
|
-
instructions:
|
|
393
|
+
instructions: instructions || "You are a helpful assistant.",
|
|
396
394
|
input: messages,
|
|
397
395
|
text: { verbosity: options?.textVerbosity || "low" },
|
|
398
396
|
include: ["reasoning.encrypted_content"],
|
|
@@ -406,8 +404,8 @@ function buildRequestBody(model, context, options, cacheSessionId, grammarToolIn
|
|
|
406
404
|
if (options?.serviceTier !== undefined) {
|
|
407
405
|
body.service_tier = options.serviceTier;
|
|
408
406
|
}
|
|
409
|
-
if (
|
|
410
|
-
body.tools = convertResponsesTools(
|
|
407
|
+
if (transcriptTools.requestTools.length > 0) {
|
|
408
|
+
body.tools = convertResponsesTools(transcriptTools.requestTools, {
|
|
411
409
|
strict: null,
|
|
412
410
|
supportsStrictMode,
|
|
413
411
|
supportsOpenAIGrammarTools,
|
|
@@ -415,7 +413,9 @@ function buildRequestBody(model, context, options, cacheSessionId, grammarToolIn
|
|
|
415
413
|
}
|
|
416
414
|
if (options?.reasoningEffort !== undefined) {
|
|
417
415
|
const effort = options.reasoningEffort === "none"
|
|
418
|
-
?
|
|
416
|
+
? model.thinkingLevelMap?.off === undefined
|
|
417
|
+
? "none"
|
|
418
|
+
: model.thinkingLevelMap.off
|
|
419
419
|
: (model.thinkingLevelMap?.[options.reasoningEffort] ?? options.reasoningEffort);
|
|
420
420
|
if (effort !== null) {
|
|
421
421
|
body.reasoning = {
|
|
@@ -424,6 +424,9 @@ function buildRequestBody(model, context, options, cacheSessionId, grammarToolIn
|
|
|
424
424
|
};
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
|
+
else if (model.reasoning && model.thinkingLevelMap?.off !== null) {
|
|
428
|
+
body.reasoning = { effort: model.thinkingLevelMap?.off ?? "none" };
|
|
429
|
+
}
|
|
427
430
|
return body;
|
|
428
431
|
}
|
|
429
432
|
function getServiceTierCostMultiplier(model, serviceTier) {
|
|
@@ -1193,7 +1196,7 @@ async function processWebSocketStream(url, body, headers, output, stream, model,
|
|
|
1193
1196
|
keepConnection = false;
|
|
1194
1197
|
}
|
|
1195
1198
|
else if (useCachedContext && entry && output.responseId) {
|
|
1196
|
-
const responseItems = convertResponsesMessages(model, { messages: [output] }, CODEX_TOOL_CALL_PROVIDERS, {
|
|
1199
|
+
const responseItems = convertResponsesMessages(model, normalizeContext({ messages: [output] }), CODEX_TOOL_CALL_PROVIDERS, {
|
|
1197
1200
|
includeSystemPrompt: false,
|
|
1198
1201
|
grammarToolInputProperties,
|
|
1199
1202
|
}).filter((item) => item.type !== "function_call_output" && item.type !== "custom_tool_call_output");
|