indusagi 0.13.5 → 0.13.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +661 -0
- package/README.md +7 -1
- package/dist/cli.js +114 -23
- package/package.json +56 -45
- package/dist/agent.js +0 -28713
- package/dist/ai.js +0 -19964
- package/dist/capabilities.js +0 -2730
- package/dist/connectors-saas.js +0 -3355
- package/dist/index.js +0 -16644
- package/dist/interop.js +0 -3247
- package/dist/knowledge/guides/authoring-an-agent.md +0 -53
- package/dist/knowledge/guides/choosing-tools.md +0 -49
- package/dist/knowledge/guides/model-selection.md +0 -51
- package/dist/knowledge/guides/writing-system-prompts.md +0 -53
- package/dist/knowledge/index.ts +0 -19
- package/dist/knowledge/loader.ts +0 -200
- package/dist/knowledge/manifest.json +0 -29
- package/dist/llmgateway.js +0 -3243
- package/dist/mcp.js +0 -1639
- package/dist/memory.js +0 -0
- package/dist/react-host/index.js +0 -101
- package/dist/react-host/ink.js +0 -97
- package/dist/react-host/jsx-runtime.js +0 -95
- package/dist/react-ink.js +0 -3834
- package/dist/runtime.js +0 -4421
- package/dist/shell-app.js +0 -12333
- package/dist/smithy.js +0 -8033
- package/dist/swarm.js +0 -8818
- package/dist/tracing.js +0 -724
- package/dist/tui.js +0 -2213
- package/dist/types/capabilities/backends/index.d.ts +0 -10
- package/dist/types/capabilities/backends/node-backends.d.ts +0 -30
- package/dist/types/capabilities/capabilities.test.d.ts +0 -14
- package/dist/types/capabilities/files/diff.d.ts +0 -49
- package/dist/types/capabilities/files/edit.d.ts +0 -21
- package/dist/types/capabilities/files/ls.d.ts +0 -16
- package/dist/types/capabilities/files/read-state-gate.d.ts +0 -69
- package/dist/types/capabilities/files/read-state-gate.test.d.ts +0 -14
- package/dist/types/capabilities/files/read.d.ts +0 -15
- package/dist/types/capabilities/files/write.d.ts +0 -16
- package/dist/types/capabilities/index.d.ts +0 -29
- package/dist/types/capabilities/kernel/backends.d.ts +0 -119
- package/dist/types/capabilities/kernel/context.d.ts +0 -52
- package/dist/types/capabilities/kernel/index.d.ts +0 -24
- package/dist/types/capabilities/kernel/output.d.ts +0 -40
- package/dist/types/capabilities/kernel/registry.d.ts +0 -61
- package/dist/types/capabilities/kernel/spec.d.ts +0 -168
- package/dist/types/capabilities/planning/todo.d.ts +0 -62
- package/dist/types/capabilities/registry.d.ts +0 -44
- package/dist/types/capabilities/search/find.d.ts +0 -33
- package/dist/types/capabilities/search/grep.d.ts +0 -30
- package/dist/types/capabilities/shell/bash.d.ts +0 -18
- package/dist/types/capabilities/shell/process.d.ts +0 -33
- package/dist/types/capabilities/web/webfetch.d.ts +0 -25
- package/dist/types/capabilities/web/websearch.d.ts +0 -23
- package/dist/types/connectors-saas/connectors-saas.test.d.ts +0 -12
- package/dist/types/connectors-saas/index.d.ts +0 -16
- package/dist/types/connectors-saas/saas/adapter/composio-backend.d.ts +0 -60
- package/dist/types/connectors-saas/saas/control/connect.d.ts +0 -114
- package/dist/types/connectors-saas/saas/control/tools.d.ts +0 -67
- package/dist/types/connectors-saas/saas/core/builder.d.ts +0 -86
- package/dist/types/connectors-saas/saas/core/cache.d.ts +0 -53
- package/dist/types/connectors-saas/saas/core/index.d.ts +0 -14
- package/dist/types/connectors-saas/saas/core/port.d.ts +0 -157
- package/dist/types/connectors-saas/saas/core/scope-planner.d.ts +0 -74
- package/dist/types/connectors-saas/saas/gateway.d.ts +0 -133
- package/dist/types/connectors-saas/saas/render/format.d.ts +0 -54
- package/dist/types/connectors-saas/saas/render/index.d.ts +0 -19
- package/dist/types/connectors-saas/saas/render/summarizers.d.ts +0 -58
- package/dist/types/facade/agent.d.ts +0 -1
- package/dist/types/facade/ai.d.ts +0 -1
- package/dist/types/facade/bot/actions/bash.d.ts +0 -71
- package/dist/types/facade/bot/actions/bash.test.d.ts +0 -1
- package/dist/types/facade/bot/actions/checkpoint.d.ts +0 -49
- package/dist/types/facade/bot/actions/checkpoint.test.d.ts +0 -1
- package/dist/types/facade/bot/actions/composio/accounts.d.ts +0 -22
- package/dist/types/facade/bot/actions/composio/client.d.ts +0 -39
- package/dist/types/facade/bot/actions/composio/connect.d.ts +0 -19
- package/dist/types/facade/bot/actions/composio/enable.d.ts +0 -25
- package/dist/types/facade/bot/actions/composio/execute.d.ts +0 -26
- package/dist/types/facade/bot/actions/composio/helpers.d.ts +0 -16
- package/dist/types/facade/bot/actions/composio/index.d.ts +0 -9
- package/dist/types/facade/bot/actions/composio/provider.d.ts +0 -8
- package/dist/types/facade/bot/actions/composio/toolkits.d.ts +0 -22
- package/dist/types/facade/bot/actions/composio/tools.d.ts +0 -28
- package/dist/types/facade/bot/actions/composio/types.d.ts +0 -137
- package/dist/types/facade/bot/actions/crew/activity-tracker.d.ts +0 -65
- package/dist/types/facade/bot/actions/crew/cleanup.d.ts +0 -50
- package/dist/types/facade/bot/actions/crew/fs-lock.d.ts +0 -11
- package/dist/types/facade/bot/actions/crew/index.d.ts +0 -11
- package/dist/types/facade/bot/actions/crew/mailbox.d.ts +0 -20
- package/dist/types/facade/bot/actions/crew/model-policy.d.ts +0 -22
- package/dist/types/facade/bot/actions/crew/names.d.ts +0 -27
- package/dist/types/facade/bot/actions/crew/protocol.d.ts +0 -74
- package/dist/types/facade/bot/actions/crew/task-store.d.ts +0 -88
- package/dist/types/facade/bot/actions/crew/team-attach-claim.d.ts +0 -35
- package/dist/types/facade/bot/actions/crew/team-config.d.ts +0 -54
- package/dist/types/facade/bot/actions/crew/worktree.d.ts +0 -39
- package/dist/types/facade/bot/actions/edit-diff.d.ts +0 -66
- package/dist/types/facade/bot/actions/edit-utils.d.ts +0 -86
- package/dist/types/facade/bot/actions/edit.d.ts +0 -59
- package/dist/types/facade/bot/actions/edit.test.d.ts +0 -1
- package/dist/types/facade/bot/actions/find.d.ts +0 -27
- package/dist/types/facade/bot/actions/find.test.d.ts +0 -1
- package/dist/types/facade/bot/actions/grep.d.ts +0 -53
- package/dist/types/facade/bot/actions/grep.test.d.ts +0 -1
- package/dist/types/facade/bot/actions/index.d.ts +0 -316
- package/dist/types/facade/bot/actions/kit/hook-runner.d.ts +0 -12
- package/dist/types/facade/bot/actions/kit/image-resize.d.ts +0 -19
- package/dist/types/facade/bot/actions/kit/mime.d.ts +0 -1
- package/dist/types/facade/bot/actions/kit/shell.d.ts +0 -12
- package/dist/types/facade/bot/actions/ls.d.ts +0 -41
- package/dist/types/facade/bot/actions/path-utils.d.ts +0 -8
- package/dist/types/facade/bot/actions/process-controller.d.ts +0 -14
- package/dist/types/facade/bot/actions/process-manager.d.ts +0 -59
- package/dist/types/facade/bot/actions/process-types.d.ts +0 -73
- package/dist/types/facade/bot/actions/process.d.ts +0 -37
- package/dist/types/facade/bot/actions/read-state.d.ts +0 -83
- package/dist/types/facade/bot/actions/read-state.test.d.ts +0 -1
- package/dist/types/facade/bot/actions/read.d.ts +0 -43
- package/dist/types/facade/bot/actions/read.test.d.ts +0 -1
- package/dist/types/facade/bot/actions/registry.d.ts +0 -20
- package/dist/types/facade/bot/actions/sandbox-backend.d.ts +0 -99
- package/dist/types/facade/bot/actions/sandbox-backend.test.d.ts +0 -1
- package/dist/types/facade/bot/actions/todo-store.d.ts +0 -76
- package/dist/types/facade/bot/actions/todo-types.d.ts +0 -72
- package/dist/types/facade/bot/actions/todo.d.ts +0 -76
- package/dist/types/facade/bot/actions/truncate.d.ts +0 -78
- package/dist/types/facade/bot/actions/webfetch.d.ts +0 -35
- package/dist/types/facade/bot/actions/websearch.d.ts +0 -37
- package/dist/types/facade/bot/actions/websearch.test.d.ts +0 -1
- package/dist/types/facade/bot/actions/write.d.ts +0 -45
- package/dist/types/facade/bot/agent-loop.d.ts +0 -30
- package/dist/types/facade/bot/agent-loop.test.d.ts +0 -1
- package/dist/types/facade/bot/agent.d.ts +0 -140
- package/dist/types/facade/bot/error-handler.d.ts +0 -7
- package/dist/types/facade/bot/event-bus.d.ts +0 -8
- package/dist/types/facade/bot/index.d.ts +0 -7
- package/dist/types/facade/bot/messages.d.ts +0 -83
- package/dist/types/facade/bot/permission-gate.test.d.ts +0 -1
- package/dist/types/facade/bot/proxy.d.ts +0 -70
- package/dist/types/facade/bot/session-manager.d.ts +0 -409
- package/dist/types/facade/bot/state-manager.d.ts +0 -21
- package/dist/types/facade/bot/telemetry.d.ts +0 -6
- package/dist/types/facade/bot/types.d.ts +0 -267
- package/dist/types/facade/mcp-core/client-pool.d.ts +0 -105
- package/dist/types/facade/mcp-core/client.d.ts +0 -213
- package/dist/types/facade/mcp-core/client.test.d.ts +0 -18
- package/dist/types/facade/mcp-core/config.d.ts +0 -60
- package/dist/types/facade/mcp-core/errors.d.ts +0 -103
- package/dist/types/facade/mcp-core/index.d.ts +0 -55
- package/dist/types/facade/mcp-core/schema-converter.d.ts +0 -67
- package/dist/types/facade/mcp-core/server.d.ts +0 -110
- package/dist/types/facade/mcp-core/tool-factory.d.ts +0 -62
- package/dist/types/facade/mcp-core/types.d.ts +0 -298
- package/dist/types/facade/mcp.d.ts +0 -1
- package/dist/types/facade/memory.d.ts +0 -1
- package/dist/types/facade/ml/adapters/amazon-bedrock.d.ts +0 -32
- package/dist/types/facade/ml/adapters/anthropic-retry.test.d.ts +0 -1
- package/dist/types/facade/ml/adapters/anthropic.d.ts +0 -78
- package/dist/types/facade/ml/adapters/azure-openai-responses.d.ts +0 -14
- package/dist/types/facade/ml/adapters/google-shared.d.ts +0 -99
- package/dist/types/facade/ml/adapters/google-vertex.d.ts +0 -14
- package/dist/types/facade/ml/adapters/google.d.ts +0 -15
- package/dist/types/facade/ml/adapters/kimi.d.ts +0 -21
- package/dist/types/facade/ml/adapters/mock.d.ts +0 -9
- package/dist/types/facade/ml/adapters/nvidia.d.ts +0 -12
- package/dist/types/facade/ml/adapters/openai-codex-responses.d.ts +0 -8
- package/dist/types/facade/ml/adapters/openai-completions.d.ts +0 -24
- package/dist/types/facade/ml/adapters/openai-responses-shared.d.ts +0 -25
- package/dist/types/facade/ml/adapters/openai-responses.d.ts +0 -12
- package/dist/types/facade/ml/adapters/openai-scaffold.d.ts +0 -3
- package/dist/types/facade/ml/adapters/register-builtins.d.ts +0 -2
- package/dist/types/facade/ml/adapters/simple-options.d.ts +0 -39
- package/dist/types/facade/ml/adapters/simple-options.test.d.ts +0 -1
- package/dist/types/facade/ml/adapters/transform-messages.d.ts +0 -23
- package/dist/types/facade/ml/api-registry.d.ts +0 -49
- package/dist/types/facade/ml/cli.d.ts +0 -2
- package/dist/types/facade/ml/env-api-keys.d.ts +0 -19
- package/dist/types/facade/ml/index.d.ts +0 -27
- package/dist/types/facade/ml/kit/auth/anthropic.d.ts +0 -17
- package/dist/types/facade/ml/kit/auth/github-copilot.d.ts +0 -22
- package/dist/types/facade/ml/kit/auth/index.d.ts +0 -50
- package/dist/types/facade/ml/kit/auth/kimi.d.ts +0 -23
- package/dist/types/facade/ml/kit/auth/oauth-page.d.ts +0 -2
- package/dist/types/facade/ml/kit/auth/openai-codex.d.ts +0 -36
- package/dist/types/facade/ml/kit/auth/pkce.d.ts +0 -12
- package/dist/types/facade/ml/kit/auth/types.d.ts +0 -67
- package/dist/types/facade/ml/kit/base-stream-handler.d.ts +0 -30
- package/dist/types/facade/ml/kit/event-stream.d.ts +0 -63
- package/dist/types/facade/ml/kit/index.d.ts +0 -14
- package/dist/types/facade/ml/kit/json-parse.d.ts +0 -23
- package/dist/types/facade/ml/kit/message-transform.d.ts +0 -32
- package/dist/types/facade/ml/kit/output-factory.d.ts +0 -8
- package/dist/types/facade/ml/kit/overflow.d.ts +0 -9
- package/dist/types/facade/ml/kit/provider-adapter.d.ts +0 -56
- package/dist/types/facade/ml/kit/provider-client-builder.d.ts +0 -36
- package/dist/types/facade/ml/kit/provider-consolidation.d.ts +0 -3
- package/dist/types/facade/ml/kit/provider-constants.d.ts +0 -34
- package/dist/types/facade/ml/kit/provider-errors.d.ts +0 -52
- package/dist/types/facade/ml/kit/sanitize-unicode.d.ts +0 -2
- package/dist/types/facade/ml/kit/stream-event-helper.d.ts +0 -38
- package/dist/types/facade/ml/kit/stream-handler-types.d.ts +0 -46
- package/dist/types/facade/ml/kit/streaming-state-manager.d.ts +0 -42
- package/dist/types/facade/ml/kit/tool-converter.d.ts +0 -49
- package/dist/types/facade/ml/kit/typebox-helpers.d.ts +0 -24
- package/dist/types/facade/ml/kit/validation.d.ts +0 -26
- package/dist/types/facade/ml/models.d.ts +0 -41
- package/dist/types/facade/ml/models.generated.d.ts +0 -12405
- package/dist/types/facade/ml/stream.d.ts +0 -27
- package/dist/types/facade/ml/types.d.ts +0 -269
- package/dist/types/index.d.ts +0 -16
- package/dist/types/interop/index.d.ts +0 -12
- package/dist/types/interop/interop.test.d.ts +0 -19
- package/dist/types/interop/protocol-bridge/bridge.d.ts +0 -52
- package/dist/types/interop/protocol-bridge/contract.d.ts +0 -249
- package/dist/types/interop/protocol-bridge/endpoint.d.ts +0 -124
- package/dist/types/interop/protocol-bridge/fleet.d.ts +0 -92
- package/dist/types/interop/protocol-bridge/host.d.ts +0 -61
- package/dist/types/interop/protocol-bridge/index.d.ts +0 -16
- package/dist/types/interop/protocol-bridge/schema.d.ts +0 -29
- package/dist/types/llmgateway/catalog/cards.d.ts +0 -18
- package/dist/types/llmgateway/catalog/cost.d.ts +0 -15
- package/dist/types/llmgateway/catalog/index.d.ts +0 -7
- package/dist/types/llmgateway/catalog/query.d.ts +0 -40
- package/dist/types/llmgateway/connectors/anthropic.d.ts +0 -35
- package/dist/types/llmgateway/connectors/azure-openai.d.ts +0 -33
- package/dist/types/llmgateway/connectors/bedrock.d.ts +0 -113
- package/dist/types/llmgateway/connectors/google-vertex.d.ts +0 -38
- package/dist/types/llmgateway/connectors/google.d.ts +0 -40
- package/dist/types/llmgateway/connectors/index.d.ts +0 -26
- package/dist/types/llmgateway/connectors/kimi.d.ts +0 -28
- package/dist/types/llmgateway/connectors/mock.d.ts +0 -37
- package/dist/types/llmgateway/connectors/nvidia.d.ts +0 -27
- package/dist/types/llmgateway/connectors/ollama.d.ts +0 -45
- package/dist/types/llmgateway/connectors/openai-chat.d.ts +0 -25
- package/dist/types/llmgateway/connectors/openai-responses.d.ts +0 -49
- package/dist/types/llmgateway/contract/connector.d.ts +0 -32
- package/dist/types/llmgateway/contract/conversation.d.ts +0 -86
- package/dist/types/llmgateway/contract/emission.d.ts +0 -55
- package/dist/types/llmgateway/contract/errors.d.ts +0 -27
- package/dist/types/llmgateway/contract/index.d.ts +0 -13
- package/dist/types/llmgateway/contract/model-card.d.ts +0 -42
- package/dist/types/llmgateway/contract/options.d.ts +0 -31
- package/dist/types/llmgateway/contract/reply.d.ts +0 -33
- package/dist/types/llmgateway/conversion/index.d.ts +0 -10
- package/dist/types/llmgateway/conversion/mappers.d.ts +0 -65
- package/dist/types/llmgateway/conversion/openai-compatible.d.ts +0 -46
- package/dist/types/llmgateway/conversion/reduce.d.ts +0 -20
- package/dist/types/llmgateway/credentials/oauth.d.ts +0 -73
- package/dist/types/llmgateway/credentials/pkce.d.ts +0 -52
- package/dist/types/llmgateway/credentials/secrets.d.ts +0 -74
- package/dist/types/llmgateway/gateway.d.ts +0 -34
- package/dist/types/llmgateway/gateway.test.d.ts +0 -14
- package/dist/types/llmgateway/index.d.ts +0 -11
- package/dist/types/llmgateway/streaming/channel.d.ts +0 -24
- package/dist/types/llmgateway/streaming/index.d.ts +0 -10
- package/dist/types/llmgateway/streaming/ndjson.d.ts +0 -17
- package/dist/types/llmgateway/streaming/sse.d.ts +0 -31
- package/dist/types/react-host/index.d.ts +0 -9
- package/dist/types/react-host/ink.d.ts +0 -5
- package/dist/types/react-host/jsx-runtime.d.ts +0 -4
- package/dist/types/react-host/loader.d.ts +0 -3
- package/dist/types/react-ink/components/ChangelogBlock.d.ts +0 -8
- package/dist/types/react-ink/components/DisplayBlockView.d.ts +0 -8
- package/dist/types/react-ink/components/Footer.d.ts +0 -11
- package/dist/types/react-ink/components/MessageList.d.ts +0 -14
- package/dist/types/react-ink/components/MessageRow.d.ts +0 -13
- package/dist/types/react-ink/components/StatusLine.d.ts +0 -18
- package/dist/types/react-ink/components/TaskPanel.d.ts +0 -11
- package/dist/types/react-ink/components/ToolEventBlock.d.ts +0 -48
- package/dist/types/react-ink/components/ToolEventBlock.test.d.ts +0 -1
- package/dist/types/react-ink/components/dialogs/DialogFrame.d.ts +0 -8
- package/dist/types/react-ink/components/dialogs/LoginDialog.d.ts +0 -14
- package/dist/types/react-ink/components/dialogs/ModelDialog.d.ts +0 -9
- package/dist/types/react-ink/components/dialogs/OAuthDialog.d.ts +0 -9
- package/dist/types/react-ink/components/dialogs/ScopedModelsDialog.d.ts +0 -9
- package/dist/types/react-ink/components/dialogs/SelectableDialog.d.ts +0 -22
- package/dist/types/react-ink/components/dialogs/SessionDialog.d.ts +0 -13
- package/dist/types/react-ink/components/dialogs/SettingsDialog.d.ts +0 -14
- package/dist/types/react-ink/components/dialogs/StartupSessionPicker.d.ts +0 -9
- package/dist/types/react-ink/components/dialogs/ThemeDialog.d.ts +0 -26
- package/dist/types/react-ink/components/dialogs/TreeDialog.d.ts +0 -8
- package/dist/types/react-ink/components/dialogs/UserMessageDialog.d.ts +0 -8
- package/dist/types/react-ink/components/messages/AssistantMessage.d.ts +0 -12
- package/dist/types/react-ink/components/messages/BashMessage.d.ts +0 -8
- package/dist/types/react-ink/components/messages/BranchSummaryMessage.d.ts +0 -8
- package/dist/types/react-ink/components/messages/CompactionMessage.d.ts +0 -8
- package/dist/types/react-ink/components/messages/CustomMessage.d.ts +0 -9
- package/dist/types/react-ink/components/messages/SkillInvocationMessage.d.ts +0 -7
- package/dist/types/react-ink/components/messages/ToolCallMessage.d.ts +0 -8
- package/dist/types/react-ink/components/messages/ToolResultBlock.d.ts +0 -12
- package/dist/types/react-ink/components/messages/UserMessage.d.ts +0 -9
- package/dist/types/react-ink/diff/Diff.d.ts +0 -22
- package/dist/types/react-ink/diff/diff.test.d.ts +0 -1
- package/dist/types/react-ink/diff/structured.d.ts +0 -41
- package/dist/types/react-ink/diff/word-diff.d.ts +0 -27
- package/dist/types/react-ink/index.d.ts +0 -42
- package/dist/types/react-ink/markdown/Markdown.d.ts +0 -23
- package/dist/types/react-ink/markdown/MarkdownTable.d.ts +0 -19
- package/dist/types/react-ink/markdown/StreamingMarkdown.d.ts +0 -34
- package/dist/types/react-ink/markdown/format-token.d.ts +0 -39
- package/dist/types/react-ink/markdown/highlight.d.ts +0 -31
- package/dist/types/react-ink/theme-adapter.d.ts +0 -66
- package/dist/types/react-ink/types.d.ts +0 -133
- package/dist/types/react-ink/utils/message-groups.d.ts +0 -25
- package/dist/types/react-ink/utils/selection-dialog.d.ts +0 -2
- package/dist/types/react-ink/utils/session-browser.d.ts +0 -27
- package/dist/types/react-ink/utils/tool-display.d.ts +0 -37
- package/dist/types/runtime/cadence/cadence.test.d.ts +0 -6
- package/dist/types/runtime/cadence/fold.d.ts +0 -48
- package/dist/types/runtime/cadence/index.d.ts +0 -12
- package/dist/types/runtime/cadence/reducer.d.ts +0 -44
- package/dist/types/runtime/conductor/agent.d.ts +0 -71
- package/dist/types/runtime/conductor/index.d.ts +0 -11
- package/dist/types/runtime/contract/config.d.ts +0 -44
- package/dist/types/runtime/contract/effect.d.ts +0 -41
- package/dist/types/runtime/contract/errors.d.ts +0 -22
- package/dist/types/runtime/contract/events.d.ts +0 -63
- package/dist/types/runtime/contract/index.d.ts +0 -18
- package/dist/types/runtime/contract/run-state.d.ts +0 -57
- package/dist/types/runtime/contract/session.d.ts +0 -42
- package/dist/types/runtime/contract/signal.d.ts +0 -49
- package/dist/types/runtime/contract/tools.d.ts +0 -45
- package/dist/types/runtime/dispatch/index.d.ts +0 -9
- package/dist/types/runtime/dispatch/scheduler.d.ts +0 -53
- package/dist/types/runtime/index.d.ts +0 -22
- package/dist/types/runtime/ledger/accumulator.d.ts +0 -44
- package/dist/types/runtime/ledger/bus.d.ts +0 -50
- package/dist/types/runtime/ledger/index.d.ts +0 -11
- package/dist/types/runtime/memory/compactor.d.ts +0 -56
- package/dist/types/runtime/memory/estimate.d.ts +0 -21
- package/dist/types/runtime/memory/index.d.ts +0 -8
- package/dist/types/runtime/runtime.test.d.ts +0 -15
- package/dist/types/runtime/store/dag.d.ts +0 -72
- package/dist/types/runtime/store/hash.d.ts +0 -18
- package/dist/types/runtime/store/index.d.ts +0 -12
- package/dist/types/runtime/store/persist.d.ts +0 -49
- package/dist/types/runtime/turn/driver.d.ts +0 -32
- package/dist/types/runtime/turn/index.d.ts +0 -8
- package/dist/types/runtime/wire/index.d.ts +0 -10
- package/dist/types/runtime/wire/projectors.d.ts +0 -53
- package/dist/types/shell-app/auth-cli/index.d.ts +0 -9
- package/dist/types/shell-app/auth-cli/oauth-cli.d.ts +0 -73
- package/dist/types/shell-app/boot/context.d.ts +0 -108
- package/dist/types/shell-app/boot/index.d.ts +0 -13
- package/dist/types/shell-app/boot/pipeline.d.ts +0 -66
- package/dist/types/shell-app/boot/stages.d.ts +0 -77
- package/dist/types/shell-app/cli.d.ts +0 -75
- package/dist/types/shell-app/config/index.d.ts +0 -11
- package/dist/types/shell-app/config/locator.d.ts +0 -85
- package/dist/types/shell-app/config/settings.d.ts +0 -91
- package/dist/types/shell-app/index.d.ts +0 -26
- package/dist/types/shell-app/invocation/flags.d.ts +0 -89
- package/dist/types/shell-app/invocation/parse.d.ts +0 -89
- package/dist/types/shell-app/locate/brand.d.ts +0 -71
- package/dist/types/shell-app/locate/index.d.ts +0 -12
- package/dist/types/shell-app/locate/locator.d.ts +0 -122
- package/dist/types/shell-app/runners/contract.d.ts +0 -116
- package/dist/types/shell-app/runners/index.d.ts +0 -15
- package/dist/types/shell-app/runners/one-shot.d.ts +0 -21
- package/dist/types/shell-app/runners/registry.d.ts +0 -34
- package/dist/types/shell-app/runners/repl.d.ts +0 -51
- package/dist/types/shell-app/runners/wire.d.ts +0 -34
- package/dist/types/shell-app/shell-app.test.d.ts +0 -14
- package/dist/types/shell-app/upgrade/index.d.ts +0 -9
- package/dist/types/shell-app/upgrade/upgrades.d.ts +0 -62
- package/dist/types/smithy/config/flag-reader.d.ts +0 -128
- package/dist/types/smithy/config/index.d.ts +0 -9
- package/dist/types/smithy/forge.d.ts +0 -135
- package/dist/types/smithy/index.d.ts +0 -36
- package/dist/types/smithy/knowledge/index.d.ts +0 -10
- package/dist/types/smithy/knowledge/loader.d.ts +0 -64
- package/dist/types/smithy/persona/blueprint.d.ts +0 -75
- package/dist/types/smithy/persona/define-agent.d.ts +0 -51
- package/dist/types/smithy/persona/index.d.ts +0 -14
- package/dist/types/smithy/persona/profiles.d.ts +0 -44
- package/dist/types/smithy/runtime/index.d.ts +0 -9
- package/dist/types/smithy/runtime/tool-ledger.d.ts +0 -130
- package/dist/types/smithy/smithy.test.d.ts +0 -20
- package/dist/types/smithy/ui/index.d.ts +0 -11
- package/dist/types/smithy/ui/transcript.d.ts +0 -183
- package/dist/types/swarm/coordinator.d.ts +0 -192
- package/dist/types/swarm/index.d.ts +0 -33
- package/dist/types/swarm/isolation/index.d.ts +0 -14
- package/dist/types/swarm/isolation/runner.d.ts +0 -61
- package/dist/types/swarm/isolation/worktree.d.ts +0 -142
- package/dist/types/swarm/kernel/faults.d.ts +0 -52
- package/dist/types/swarm/kernel/ids.d.ts +0 -25
- package/dist/types/swarm/kernel/index.d.ts +0 -26
- package/dist/types/swarm/kernel/json-cell.d.ts +0 -113
- package/dist/types/swarm/kernel/jsonl-log.d.ts +0 -81
- package/dist/types/swarm/postbox/channel.d.ts +0 -88
- package/dist/types/swarm/postbox/codecs.d.ts +0 -253
- package/dist/types/swarm/postbox/index.d.ts +0 -16
- package/dist/types/swarm/roster/index.d.ts +0 -16
- package/dist/types/swarm/roster/manifest.d.ts +0 -185
- package/dist/types/swarm/swarm.test.d.ts +0 -24
- package/dist/types/swarm/telemetry/activity.d.ts +0 -143
- package/dist/types/swarm/workboard/board.d.ts +0 -174
- package/dist/types/swarm/workboard/dep-graph.d.ts +0 -77
- package/dist/types/swarm/workboard/index.d.ts +0 -12
- package/dist/types/tracing/adapter/index.d.ts +0 -12
- package/dist/types/tracing/adapter/runtime-trace.d.ts +0 -54
- package/dist/types/tracing/channel/index.d.ts +0 -9
- package/dist/types/tracing/channel/signal.d.ts +0 -93
- package/dist/types/tracing/index.d.ts +0 -25
- package/dist/types/tracing/recorder/index.d.ts +0 -12
- package/dist/types/tracing/recorder/recorder.d.ts +0 -75
- package/dist/types/tracing/recorder/sampling.d.ts +0 -55
- package/dist/types/tracing/redaction/index.d.ts +0 -8
- package/dist/types/tracing/redaction/secret-scrubber.d.ts +0 -95
- package/dist/types/tracing/registry/hub.d.ts +0 -57
- package/dist/types/tracing/registry/index.d.ts +0 -7
- package/dist/types/tracing/signal/handle.d.ts +0 -73
- package/dist/types/tracing/signal/index.d.ts +0 -12
- package/dist/types/tracing/signal/segment.d.ts +0 -124
- package/dist/types/tracing/sinks/base.d.ts +0 -51
- package/dist/types/tracing/sinks/console.d.ts +0 -44
- package/dist/types/tracing/sinks/file.d.ts +0 -47
- package/dist/types/tracing/sinks/index.d.ts +0 -16
- package/dist/types/tracing/sinks/stream.d.ts +0 -46
- package/dist/types/tracing/tracing.test.d.ts +0 -7
- package/dist/types/ui/autocomplete.d.ts +0 -59
- package/dist/types/ui/contracts.d.ts +0 -38
- package/dist/types/ui/editor-component.d.ts +0 -100
- package/dist/types/ui/fuzzy.d.ts +0 -29
- package/dist/types/ui/index.d.ts +0 -8
- package/dist/types/ui/keybindings.d.ts +0 -62
- package/dist/types/ui/keys.d.ts +0 -171
- package/dist/types/ui/theme-types.d.ts +0 -36
- package/dist/types/ui/utils.d.ts +0 -101
- package/dist/types/ui-bridge/InteractiveApp.d.ts +0 -38
- package/dist/types/ui-bridge/adapter.d.ts +0 -90
- package/dist/types/ui-bridge/index.d.ts +0 -37
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { type Message, type SystemContentBlock, type ToolConfiguration } from "@aws-sdk/client-bedrock-runtime";
|
|
2
|
-
import type { Context, Model, SimpleStreamOptions, StreamFunction, StreamOptions, ThinkingBudgets, ThinkingLevel } from "../types.js";
|
|
3
|
-
export interface BedrockOptions extends StreamOptions {
|
|
4
|
-
region?: string;
|
|
5
|
-
profile?: string;
|
|
6
|
-
toolChoice?: "auto" | "any" | "none" | {
|
|
7
|
-
type: "tool";
|
|
8
|
-
name: string;
|
|
9
|
-
};
|
|
10
|
-
reasoning?: ThinkingLevel;
|
|
11
|
-
thinkingBudgets?: ThinkingBudgets;
|
|
12
|
-
interleavedThinking?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export declare class BedrockRequestBuilder {
|
|
15
|
-
private readonly model;
|
|
16
|
-
private readonly context;
|
|
17
|
-
private readonly options;
|
|
18
|
-
constructor(model: Model<"bedrock-converse-stream">, context: Context, options: BedrockOptions);
|
|
19
|
-
build(): {
|
|
20
|
-
modelId: string;
|
|
21
|
-
messages: Message[];
|
|
22
|
-
system: SystemContentBlock[] | undefined;
|
|
23
|
-
inferenceConfig: {
|
|
24
|
-
maxTokens: number | undefined;
|
|
25
|
-
temperature: number | undefined;
|
|
26
|
-
};
|
|
27
|
-
toolConfig: ToolConfiguration | undefined;
|
|
28
|
-
additionalModelRequestFields: Record<string, any> | undefined;
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
export declare const streamBedrock: StreamFunction<"bedrock-converse-stream", BedrockOptions>;
|
|
32
|
-
export declare const streamSimpleBedrock: StreamFunction<"bedrock-converse-stream", SimpleStreamOptions>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import type { MessageCreateParamsStreaming } from "@anthropic-ai/sdk/resources/messages.js";
|
|
2
|
-
import type { Context, Model, SimpleStreamOptions, StreamFunction, StreamOptions } from "../types.js";
|
|
3
|
-
import { BaseStreamHandler } from "../kit/base-stream-handler.js";
|
|
4
|
-
import { type ProviderLifecycleHooks } from "./simple-options.js";
|
|
5
|
-
export interface AnthropicOptions extends StreamOptions {
|
|
6
|
-
thinkingEnabled?: boolean;
|
|
7
|
-
thinkingBudgetTokens?: number;
|
|
8
|
-
interleavedThinking?: boolean;
|
|
9
|
-
toolChoice?: "auto" | "any" | "none" | {
|
|
10
|
-
type: "tool";
|
|
11
|
-
name: string;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
export interface AnthropicExecutionOptions {
|
|
15
|
-
hooks?: ProviderLifecycleHooks<MessageCreateParamsStreaming, unknown>;
|
|
16
|
-
retryPolicy?: {
|
|
17
|
-
maxAttempts?: number;
|
|
18
|
-
baseDelayMs?: number;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Assembles the streaming request payload for the Anthropic Messages API.
|
|
23
|
-
*
|
|
24
|
-
* Acts as the single place that turns a generic model/context/options triple
|
|
25
|
-
* into a concrete `MessageCreateParamsStreaming` object.
|
|
26
|
-
*/
|
|
27
|
-
export declare class AnthropicRequestBuilder {
|
|
28
|
-
private readonly model;
|
|
29
|
-
private readonly context;
|
|
30
|
-
private readonly isOAuthToken;
|
|
31
|
-
private readonly options?;
|
|
32
|
-
constructor(model: Model<"anthropic-messages">, context: Context, isOAuthToken: boolean, options?: AnthropicOptions | undefined);
|
|
33
|
-
/**
|
|
34
|
-
* Produce the parameters passed to the Anthropic streaming endpoint.
|
|
35
|
-
*
|
|
36
|
-
* @returns The fully populated SDK streaming request.
|
|
37
|
-
*/
|
|
38
|
-
build(): MessageCreateParamsStreaming;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Stream handler tailored to Anthropic.
|
|
42
|
-
*
|
|
43
|
-
* Drives the Anthropic SDK stream and forwards normalized assistant events.
|
|
44
|
-
*/
|
|
45
|
-
export declare class AnthropicStreamHandler extends BaseStreamHandler {
|
|
46
|
-
private readonly executeFn?;
|
|
47
|
-
constructor(executeFn?: (() => Promise<void>) | undefined);
|
|
48
|
-
/**
|
|
49
|
-
* Run the supplied executor, if any, to consume the Anthropic stream.
|
|
50
|
-
*/
|
|
51
|
-
protected processStream(): Promise<void>;
|
|
52
|
-
/**
|
|
53
|
-
* Walk the raw SDK stream, handing each event to the supplied callback.
|
|
54
|
-
*
|
|
55
|
-
* @param anthropicStream - Raw async iterable produced by the Anthropic SDK.
|
|
56
|
-
* @param onEvent - Invoked once per streamed event.
|
|
57
|
-
*/
|
|
58
|
-
process(anthropicStream: AsyncIterable<unknown>, onEvent: (event: any) => void): Promise<void>;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Reads a `Retry-After` header off an Anthropic APIError and converts it to a
|
|
62
|
-
* delay in milliseconds. The header is the integer-seconds form per the
|
|
63
|
-
* Anthropic API; a missing/non-numeric value yields `null` so callers fall
|
|
64
|
-
* back to exponential backoff.
|
|
65
|
-
*/
|
|
66
|
-
export declare function parseAnthropicRetryAfterMs(error: unknown): number | null;
|
|
67
|
-
/**
|
|
68
|
-
* Classifies an Anthropic failure as worth retrying. Mirrors
|
|
69
|
-
* `kit/provider-errors.ts:isRetryableError`: transient HTTP statuses (408/409/
|
|
70
|
-
* 429/529/5xx) and an `overloaded_error` body are retryable; auth/validation
|
|
71
|
-
* (401/403/4xx) are not. Generic errors fall back to a message sniff covering
|
|
72
|
-
* network/timeout/overload conditions. The `_attempt` is accepted to satisfy
|
|
73
|
-
* the RetryPolicy.shouldRetry contract but unused here (the loop already caps
|
|
74
|
-
* attempts).
|
|
75
|
-
*/
|
|
76
|
-
export declare function shouldRetryAnthropic(error: unknown, _attempt: number): boolean;
|
|
77
|
-
export declare const streamAnthropic: StreamFunction<"anthropic-messages", AnthropicOptions>;
|
|
78
|
-
export declare const streamSimpleAnthropic: StreamFunction<"anthropic-messages", SimpleStreamOptions>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { SimpleStreamOptions, StreamFunction, StreamOptions } from "../types.js";
|
|
2
|
-
export interface AzureOpenAIResponsesOptions extends StreamOptions {
|
|
3
|
-
reasoningEffort?: "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
4
|
-
reasoningSummary?: "auto" | "detailed" | "concise" | null;
|
|
5
|
-
azureApiVersion?: string;
|
|
6
|
-
azureResourceName?: string;
|
|
7
|
-
azureBaseUrl?: string;
|
|
8
|
-
azureDeploymentName?: string;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Streaming entry point for Azure OpenAI Responses deployments.
|
|
12
|
-
*/
|
|
13
|
-
export declare const streamAzureOpenAIResponses: StreamFunction<"azure-openai-responses", AzureOpenAIResponsesOptions>;
|
|
14
|
-
export declare const streamSimpleAzureOpenAIResponses: StreamFunction<"azure-openai-responses", SimpleStreamOptions>;
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Common building blocks used by both Google front-ends — the Generative AI
|
|
3
|
-
* (Gemini) adapter and the Vertex AI adapter. Covers turning our messages and
|
|
4
|
-
* tools into Google's shapes, mapping finish reasons back to our stop reasons,
|
|
5
|
-
* and the bookkeeping around reasoning ("thought") signatures.
|
|
6
|
-
*/
|
|
7
|
-
import { type Content, FinishReason, FunctionCallingConfigMode, type Part, type Schema } from "@google/genai";
|
|
8
|
-
import type { Context, Model, StopReason, Tool } from "../types.js";
|
|
9
|
-
import { type ProviderLifecycleHooks } from "./simple-options.js";
|
|
10
|
-
type GoogleApiType = "google-generative-ai" | "google-vertex";
|
|
11
|
-
export interface GoogleRequestExecutionOptions<TRequest = unknown, TResponse = unknown> {
|
|
12
|
-
hooks?: ProviderLifecycleHooks<TRequest, TResponse>;
|
|
13
|
-
retryPolicy?: {
|
|
14
|
-
maxAttempts?: number;
|
|
15
|
-
baseDelayMs?: number;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export declare function executeGoogleRequest<TRequest, TResponse>(request: TRequest, executor: () => Promise<TResponse>, options?: GoogleRequestExecutionOptions<TRequest, TResponse>): Promise<TResponse>;
|
|
19
|
-
/**
|
|
20
|
-
* Discrete reasoning intensities understood by Gemini. Every entry corresponds
|
|
21
|
-
* one-to-one with a value of the Google SDK's ThinkingLevel enum.
|
|
22
|
-
*/
|
|
23
|
-
export type GoogleThinkingLevel = "THINKING_LEVEL_UNSPECIFIED" | "MINIMAL" | "LOW" | "MEDIUM" | "HIGH";
|
|
24
|
-
/**
|
|
25
|
-
* The four reasoning efforts callers can request, ordered weakest to strongest.
|
|
26
|
-
* Drawn from the internal ThinkingLevel set with the "xhigh" tier collapsed away.
|
|
27
|
-
*/
|
|
28
|
-
export type ClampedReasoningEffort = "minimal" | "low" | "medium" | "high";
|
|
29
|
-
/** The slice of a Model object the Gemini reasoning helpers actually consult. */
|
|
30
|
-
type GeminiModelRef = {
|
|
31
|
-
id: string;
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* Family buckets that decide how reasoning effort maps onto a request. Gemini 3
|
|
35
|
-
* variants take a discrete level; everything else takes a token budget.
|
|
36
|
-
*/
|
|
37
|
-
export type GeminiFamily = "gemini-3-pro" | "gemini-3-flash" | "default";
|
|
38
|
-
/** Sort a model id into the Gemini family whose reasoning rules apply to it. */
|
|
39
|
-
export declare function classifyGeminiFamily(modelId: string): GeminiFamily;
|
|
40
|
-
/**
|
|
41
|
-
* Pick the discrete Gemini thinking level for a given effort. The Gemini-3 Pro
|
|
42
|
-
* family uses its coarser two-rung table; all other ids use the full four-rung
|
|
43
|
-
* mapping.
|
|
44
|
-
*/
|
|
45
|
-
export declare function selectGeminiThinkingLevel(effort: ClampedReasoningEffort, model: GeminiModelRef): GoogleThinkingLevel;
|
|
46
|
-
/**
|
|
47
|
-
* Resolve the thinking-token budget for a model/effort pair. A caller-supplied
|
|
48
|
-
* override wins outright; otherwise the per-family default table is consulted,
|
|
49
|
-
* and unrecognized families return -1 so the model sizes its own budget.
|
|
50
|
-
*/
|
|
51
|
-
export declare function resolveGeminiThinkingBudget(model: GeminiModelRef, effort: ClampedReasoningEffort, customBudgets?: Partial<Record<ClampedReasoningEffort, number>>): number;
|
|
52
|
-
/**
|
|
53
|
-
* Distinguishes a reasoning fragment from a normal answer fragment: a Gemini
|
|
54
|
-
* `Part` whose `thought` flag is set holds the model's internal reasoning.
|
|
55
|
-
*/
|
|
56
|
-
export declare function isThinkingPart(part: Pick<Part, "thought" | "thoughtSignature">): boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Keep whichever thought signature is freshest as chunks stream in: a new
|
|
59
|
-
* non-empty value replaces the old one, otherwise the previous value stands.
|
|
60
|
-
*/
|
|
61
|
-
export declare function retainThoughtSignature(existing: string | undefined, incoming: string | undefined): string | undefined;
|
|
62
|
-
/**
|
|
63
|
-
* Some models served through Google demand that every function call — and the
|
|
64
|
-
* function response that answers it — carry an explicit correlation id. This
|
|
65
|
-
* returns true for those model families.
|
|
66
|
-
*/
|
|
67
|
-
export declare function requiresToolCallId(modelId: string): boolean;
|
|
68
|
-
/**
|
|
69
|
-
* Map our internal conversation history onto the `Content[]` array Gemini's
|
|
70
|
-
* generate-content request expects.
|
|
71
|
-
*/
|
|
72
|
-
export declare function convertMessages<T extends GoogleApiType>(model: Model<T>, context: Context): Content[];
|
|
73
|
-
/**
|
|
74
|
-
* Repackage our tool definitions into the nested function-declaration block
|
|
75
|
-
* Gemini reads them from.
|
|
76
|
-
*/
|
|
77
|
-
export declare function convertTools(tools: Tool[]): {
|
|
78
|
-
functionDeclarations: {
|
|
79
|
-
name: string;
|
|
80
|
-
description?: string;
|
|
81
|
-
parameters: Schema;
|
|
82
|
-
}[];
|
|
83
|
-
}[] | undefined;
|
|
84
|
-
/**
|
|
85
|
-
* Resolve one of our tool-choice keywords to the matching Gemini
|
|
86
|
-
* FunctionCallingConfigMode, defaulting to AUTO for anything unrecognized.
|
|
87
|
-
*/
|
|
88
|
-
export declare function mapToolChoice(choice: string): FunctionCallingConfigMode;
|
|
89
|
-
/**
|
|
90
|
-
* Look up the unified StopReason for a Gemini FinishReason enum value, throwing
|
|
91
|
-
* if the enum carries a value the table above does not cover.
|
|
92
|
-
*/
|
|
93
|
-
export declare function mapStopReason(reason: FinishReason): StopReason;
|
|
94
|
-
/**
|
|
95
|
-
* Variant of the finish-reason lookup that takes the raw string seen in
|
|
96
|
-
* deserialized API JSON, returning "error" for anything not explicitly listed.
|
|
97
|
-
*/
|
|
98
|
-
export declare function mapStopReasonString(reason: string): StopReason;
|
|
99
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { SimpleStreamOptions, StreamFunction, StreamOptions } from "../types.js";
|
|
2
|
-
import { type GoogleThinkingLevel } from "./google-shared.js";
|
|
3
|
-
export interface GoogleVertexOptions extends StreamOptions {
|
|
4
|
-
toolChoice?: "auto" | "none" | "any";
|
|
5
|
-
thinking?: {
|
|
6
|
-
enabled: boolean;
|
|
7
|
-
budgetTokens?: number;
|
|
8
|
-
level?: GoogleThinkingLevel;
|
|
9
|
-
};
|
|
10
|
-
project?: string;
|
|
11
|
-
location?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare const streamGoogleVertex: StreamFunction<"google-vertex", GoogleVertexOptions>;
|
|
14
|
-
export declare const streamSimpleGoogleVertex: StreamFunction<"google-vertex", SimpleStreamOptions>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type ThinkingConfig } from "@google/genai";
|
|
2
|
-
import type { SimpleStreamOptions, StreamFunction, StreamOptions } from "../types.js";
|
|
3
|
-
import { type GoogleThinkingLevel } from "./google-shared.js";
|
|
4
|
-
export interface GoogleOptions extends StreamOptions {
|
|
5
|
-
toolChoice?: "auto" | "none" | "any";
|
|
6
|
-
thinking?: {
|
|
7
|
-
enabled: boolean;
|
|
8
|
-
budgetTokens?: number;
|
|
9
|
-
level?: GoogleThinkingLevel;
|
|
10
|
-
/** @internal already-computed thinking config, reused as-is when present */
|
|
11
|
-
_resolved?: ThinkingConfig;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
export declare const streamGoogle: StreamFunction<"google-generative-ai", GoogleOptions>;
|
|
15
|
-
export declare const streamSimpleGoogle: StreamFunction<"google-generative-ai", SimpleStreamOptions>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Adapter for Moonshot AI's Kimi models.
|
|
3
|
-
*
|
|
4
|
-
* Two providers are handled here:
|
|
5
|
-
* - `kimi` — the general Kimi API at https://api.kimi.moonshot.cn/v1
|
|
6
|
-
* - `kimi-coding` — the coding-focused Kimi Code endpoint (a paid tier)
|
|
7
|
-
*
|
|
8
|
-
* Both speak an OpenAI-compatible chat-completions protocol.
|
|
9
|
-
*/
|
|
10
|
-
import type { SimpleStreamOptions, StreamFunction, StreamOptions } from "../types.js";
|
|
11
|
-
export interface KimiOptions extends StreamOptions {
|
|
12
|
-
reasoningLevel?: "none" | "low" | "medium" | "high";
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Streaming entry point for Kimi (OpenAI-compatible chat completions).
|
|
16
|
-
*/
|
|
17
|
-
export declare const streamKimi: StreamFunction<"kimi-openai-compatible", KimiOptions>;
|
|
18
|
-
/**
|
|
19
|
-
* Convenience entry point that derives Kimi options from SimpleStreamOptions.
|
|
20
|
-
*/
|
|
21
|
-
export declare const streamSimpleKimi: StreamFunction<"kimi-openai-compatible", SimpleStreamOptions>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { SimpleStreamOptions, StreamFunction, StreamOptions } from "../types.js";
|
|
2
|
-
interface MockStreamOptions extends StreamOptions {
|
|
3
|
-
mockDelayMs?: number;
|
|
4
|
-
mockText?: string;
|
|
5
|
-
mockToolName?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const streamMock: StreamFunction<"mock-ai", MockStreamOptions>;
|
|
8
|
-
export declare const streamSimpleMock: StreamFunction<"mock-ai", SimpleStreamOptions>;
|
|
9
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Adapter for NVIDIA's hosted inference API.
|
|
3
|
-
*
|
|
4
|
-
* Endpoint: https://integrate.api.nvidia.com/v1 (OpenAI-compatible)
|
|
5
|
-
* Credentials are read from the NVIDIA_API_KEY environment variable.
|
|
6
|
-
*/
|
|
7
|
-
import type { SimpleStreamOptions, StreamFunction, StreamOptions } from "../types.js";
|
|
8
|
-
export interface NvidiaOptions extends StreamOptions {
|
|
9
|
-
topP?: number;
|
|
10
|
-
}
|
|
11
|
-
export declare const streamNvidia: StreamFunction<"nvidia-openai-compatible", NvidiaOptions>;
|
|
12
|
-
export declare const streamSimpleNvidia: StreamFunction<"nvidia-openai-compatible", SimpleStreamOptions>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { SimpleStreamOptions, StreamFunction, StreamOptions } from "../types.js";
|
|
2
|
-
export interface OpenAICodexResponsesOptions extends StreamOptions {
|
|
3
|
-
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
4
|
-
reasoningSummary?: "auto" | "concise" | "detailed" | "off" | "on" | null;
|
|
5
|
-
textVerbosity?: "low" | "medium" | "high";
|
|
6
|
-
}
|
|
7
|
-
export declare const streamOpenAICodexResponses: StreamFunction<"openai-codex-responses", OpenAICodexResponsesOptions>;
|
|
8
|
-
export declare const streamSimpleOpenAICodexResponses: StreamFunction<"openai-codex-responses", SimpleStreamOptions>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { ChatCompletionMessageParam } from "openai/resources/chat/completions.js";
|
|
2
|
-
import type { Context, Model, OpenAICompletionsCompat, SimpleStreamOptions, StreamFunction, StreamOptions } from "../types.js";
|
|
3
|
-
export interface OpenAICompletionsOptions extends StreamOptions {
|
|
4
|
-
toolChoice?: "auto" | "none" | "required" | {
|
|
5
|
-
type: "function";
|
|
6
|
-
function: {
|
|
7
|
-
name: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
reasoningEffort?: "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
11
|
-
retryPolicy?: {
|
|
12
|
-
maxAttempts?: number;
|
|
13
|
-
baseDelayMs?: number;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
export declare class OpenAICompatibilityAdapter {
|
|
17
|
-
private readonly model;
|
|
18
|
-
constructor(model: Model<"openai-completions">);
|
|
19
|
-
resolveCompat(): OpenAICompletionsCompat;
|
|
20
|
-
normalizeToolCallId(id: string): string;
|
|
21
|
-
}
|
|
22
|
-
export declare const streamOpenAICompletions: StreamFunction<"openai-completions", OpenAICompletionsOptions>;
|
|
23
|
-
export declare const streamSimpleOpenAICompletions: StreamFunction<"openai-completions", SimpleStreamOptions>;
|
|
24
|
-
export declare function convertMessages(model: Model<"openai-completions">, context: Context, compat: Required<OpenAICompletionsCompat>): ChatCompletionMessageParam[];
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { Tool as OpenAITool, ResponseCreateParamsStreaming, ResponseInput, ResponseStreamEvent } from "openai/resources/responses/responses.js";
|
|
2
|
-
import type { Api, AssistantMessage, Context, Model, Tool, Usage } from "../types.js";
|
|
3
|
-
import type { AssistantMessageEventStream } from "../kit/event-stream.js";
|
|
4
|
-
import { type ProviderLifecycleHooks } from "./simple-options.js";
|
|
5
|
-
export interface OpenAIResponsesStreamOptions {
|
|
6
|
-
serviceTier?: ResponseCreateParamsStreaming["service_tier"];
|
|
7
|
-
applyServiceTierPricing?: (usage: Usage, serviceTier: ResponseCreateParamsStreaming["service_tier"] | undefined) => void;
|
|
8
|
-
}
|
|
9
|
-
export interface OpenAIRequestExecutionOptions<TRequest = unknown, TResponse = unknown> {
|
|
10
|
-
hooks?: ProviderLifecycleHooks<TRequest, TResponse>;
|
|
11
|
-
retryPolicy?: {
|
|
12
|
-
maxAttempts?: number;
|
|
13
|
-
baseDelayMs?: number;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
export declare function executeOpenAIRequest<TRequest, TResponse>(request: TRequest, executor: () => Promise<TResponse>, options?: OpenAIRequestExecutionOptions<TRequest, TResponse>): Promise<TResponse>;
|
|
17
|
-
export interface ConvertResponsesMessagesOptions {
|
|
18
|
-
includeSystemPrompt?: boolean;
|
|
19
|
-
}
|
|
20
|
-
export interface ConvertResponsesToolsOptions {
|
|
21
|
-
strict?: boolean | null;
|
|
22
|
-
}
|
|
23
|
-
export declare function convertResponsesMessages<TApi extends Api>(model: Model<TApi>, context: Context, allowedToolCallProviders: ReadonlySet<string>, options?: ConvertResponsesMessagesOptions): ResponseInput;
|
|
24
|
-
export declare function convertResponsesTools(tools: Tool[], options?: ConvertResponsesToolsOptions): OpenAITool[];
|
|
25
|
-
export declare function processResponsesStream<TApi extends Api>(openaiStream: AsyncIterable<ResponseStreamEvent>, output: AssistantMessage, stream: AssistantMessageEventStream, model: Model<TApi>, options?: OpenAIResponsesStreamOptions): Promise<void>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ResponseCreateParamsStreaming } from "openai/resources/responses/responses.js";
|
|
2
|
-
import type { SimpleStreamOptions, StreamFunction, StreamOptions } from "../types.js";
|
|
3
|
-
export interface OpenAIResponsesOptions extends StreamOptions {
|
|
4
|
-
reasoningEffort?: "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
5
|
-
reasoningSummary?: "auto" | "detailed" | "concise" | null;
|
|
6
|
-
serviceTier?: ResponseCreateParamsStreaming["service_tier"];
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Streaming entry point for the OpenAI Responses API.
|
|
10
|
-
*/
|
|
11
|
-
export declare const streamOpenAIResponses: StreamFunction<"openai-responses", OpenAIResponsesOptions>;
|
|
12
|
-
export declare const streamSimpleOpenAIResponses: StreamFunction<"openai-responses", SimpleStreamOptions>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { type SimpleStreamOptions, type StreamFunction, type StreamOptions } from "../types.js";
|
|
2
|
-
export declare const streamOpenAICompletionsScaffold: StreamFunction<"openai-completions", StreamOptions>;
|
|
3
|
-
export declare const streamSimpleOpenAICompletionsScaffold: StreamFunction<"openai-completions", SimpleStreamOptions>;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { Api, Model, SimpleStreamOptions, StreamOptions, ThinkingBudgets, ThinkingLevel } from "../types.js";
|
|
2
|
-
export interface ProviderLifecycleHooks<TRequest = unknown, TResponse = unknown> {
|
|
3
|
-
onBeforeRequest?: (request: TRequest) => void | Promise<void>;
|
|
4
|
-
onAfterResponse?: (response: TResponse) => void | Promise<void>;
|
|
5
|
-
onError?: (error: unknown) => void | Promise<void>;
|
|
6
|
-
}
|
|
7
|
-
export interface RetryPolicy {
|
|
8
|
-
maxAttempts: number;
|
|
9
|
-
baseDelayMs: number;
|
|
10
|
-
maxDelayMs?: number;
|
|
11
|
-
/**
|
|
12
|
-
* When present, abort is checked between attempts and before each backoff
|
|
13
|
-
* sleep. A live request is short-circuited the moment its signal fires —
|
|
14
|
-
* but the presence of a signal no longer suppresses transient retries.
|
|
15
|
-
*/
|
|
16
|
-
signal?: AbortSignal;
|
|
17
|
-
shouldRetry?: (error: unknown, attempt: number) => boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Returns the server-requested cooldown (e.g. a parsed `Retry-After`
|
|
20
|
-
* header) in milliseconds, or `null` when the error carries no such hint.
|
|
21
|
-
* When provided, it takes priority over exponential backoff (still clamped
|
|
22
|
-
* by `maxDelayMs`).
|
|
23
|
-
*/
|
|
24
|
-
getRetryAfterMs?: (error: unknown) => number | null;
|
|
25
|
-
}
|
|
26
|
-
export declare class SimpleOptionsProviderError extends Error {
|
|
27
|
-
readonly code: "rate_limit" | "timeout" | "network" | "validation" | "auth" | "unknown";
|
|
28
|
-
readonly cause?: unknown | undefined;
|
|
29
|
-
constructor(message: string, code?: "rate_limit" | "timeout" | "network" | "validation" | "auth" | "unknown", cause?: unknown | undefined);
|
|
30
|
-
}
|
|
31
|
-
export declare function normalizeProviderError(error: unknown): SimpleOptionsProviderError;
|
|
32
|
-
export declare function executeWithRetry<T>(operation: () => Promise<T>, policy: RetryPolicy): Promise<T>;
|
|
33
|
-
export declare function buildBaseOptions(model: Model<Api>, options?: SimpleStreamOptions, apiKey?: string): StreamOptions;
|
|
34
|
-
export declare function clampReasoning(effort: ThinkingLevel | undefined): Exclude<ThinkingLevel, "xhigh"> | undefined;
|
|
35
|
-
export declare function mapThinkingLevel(level: ThinkingLevel | undefined, provider?: "supports-xhigh" | "clamp-xhigh"): ThinkingLevel | Exclude<ThinkingLevel, "xhigh"> | undefined;
|
|
36
|
-
export declare function adjustMaxTokensForThinking(baseMaxTokens: number, modelMaxTokens: number, reasoningLevel: ThinkingLevel, customBudgets?: ThinkingBudgets): {
|
|
37
|
-
maxTokens: number;
|
|
38
|
-
thinkingBudget: number;
|
|
39
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { Api, AssistantMessage, Message, Model } from "../types.js";
|
|
2
|
-
export interface MessageTransformContext<TApi extends Api> {
|
|
3
|
-
model: Model<TApi>;
|
|
4
|
-
normalizeToolCallId?: (id: string, model: Model<TApi>, source: AssistantMessage) => string;
|
|
5
|
-
debug?: (stage: string, details?: unknown) => void;
|
|
6
|
-
}
|
|
7
|
-
export interface MessageTransformation<TApi extends Api> {
|
|
8
|
-
name: string;
|
|
9
|
-
apply(messages: Message[], context: MessageTransformContext<TApi>): Message[];
|
|
10
|
-
}
|
|
11
|
-
export declare class MessageTransformationPipeline<TApi extends Api> {
|
|
12
|
-
private transformations;
|
|
13
|
-
addTransformation(transformation: MessageTransformation<TApi>): this;
|
|
14
|
-
transform(messages: Message[], context: MessageTransformContext<TApi>): Message[];
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Push a conversation through the shared transformation pipeline so it can be
|
|
18
|
-
* sent to any provider safely. Tool-call identifiers are the tricky part: some
|
|
19
|
-
* providers hand back long ids that include characters like `|`, while others
|
|
20
|
-
* only accept short word-character ids. The `normalizeToolCallId` callback
|
|
21
|
-
* bridges those formats whenever messages cross a model or provider boundary.
|
|
22
|
-
*/
|
|
23
|
-
export declare function transformMessages<TApi extends Api>(messages: Message[], model: Model<TApi>, normalizeToolCallId?: (id: string, model: Model<TApi>, source: AssistantMessage) => string): Message[];
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { Api, AssistantMessageEventStream, Context, Model, SimpleStreamOptions, StreamFunction, StreamOptions } from "./types.js";
|
|
2
|
-
export type ApiStreamFunction = (model: Model<Api>, context: Context, options?: StreamOptions) => AssistantMessageEventStream;
|
|
3
|
-
export type ApiStreamSimpleFunction = (model: Model<Api>, context: Context, options?: SimpleStreamOptions) => AssistantMessageEventStream;
|
|
4
|
-
export interface ApiProvider<TApi extends Api = Api, TOptions extends StreamOptions = StreamOptions> {
|
|
5
|
-
api: TApi;
|
|
6
|
-
stream: StreamFunction<TApi, TOptions>;
|
|
7
|
-
streamSimple: StreamFunction<TApi, SimpleStreamOptions>;
|
|
8
|
-
}
|
|
9
|
-
export interface ApiProviderMetadata {
|
|
10
|
-
sourceId?: string;
|
|
11
|
-
version?: string;
|
|
12
|
-
enabled: boolean;
|
|
13
|
-
registeredAt: number;
|
|
14
|
-
updatedAt: number;
|
|
15
|
-
}
|
|
16
|
-
export interface RegisteredApiProvider {
|
|
17
|
-
provider: ApiProviderInternal;
|
|
18
|
-
metadata: ApiProviderMetadata;
|
|
19
|
-
}
|
|
20
|
-
export interface ApiProviderInternal {
|
|
21
|
-
api: Api;
|
|
22
|
-
stream: ApiStreamFunction;
|
|
23
|
-
streamSimple: ApiStreamSimpleFunction;
|
|
24
|
-
}
|
|
25
|
-
export interface RegisterApiProviderOptions {
|
|
26
|
-
sourceId?: string;
|
|
27
|
-
version?: string;
|
|
28
|
-
enabled?: boolean;
|
|
29
|
-
}
|
|
30
|
-
export declare class ProviderRegistry {
|
|
31
|
-
private readonly registry;
|
|
32
|
-
register<TApi extends Api, TOptions extends StreamOptions>(provider: ApiProvider<TApi, TOptions>, options?: RegisterApiProviderOptions): void;
|
|
33
|
-
get(api: Api): ApiProviderInternal | undefined;
|
|
34
|
-
getWithMetadata(api: Api): RegisteredApiProvider | undefined;
|
|
35
|
-
list(includeDisabled?: boolean): ApiProviderInternal[];
|
|
36
|
-
enable(api: Api): boolean;
|
|
37
|
-
disable(api: Api): boolean;
|
|
38
|
-
unregisterBySource(sourceId: string): void;
|
|
39
|
-
clear(): void;
|
|
40
|
-
}
|
|
41
|
-
export declare const providerRegistry: ProviderRegistry;
|
|
42
|
-
export declare function registerApiProvider<TApi extends Api, TOptions extends StreamOptions>(provider: ApiProvider<TApi, TOptions>, sourceIdOrOptions?: string | RegisterApiProviderOptions): void;
|
|
43
|
-
export declare function getApiProvider(api: Api): ApiProviderInternal | undefined;
|
|
44
|
-
export declare function getApiProviderWithMetadata(api: Api): RegisteredApiProvider | undefined;
|
|
45
|
-
export declare function getApiProviders(includeDisabled?: boolean): ApiProviderInternal[];
|
|
46
|
-
export declare function enableApiProvider(api: Api): boolean;
|
|
47
|
-
export declare function disableApiProvider(api: Api): boolean;
|
|
48
|
-
export declare function unregisterApiProviders(sourceId: string): void;
|
|
49
|
-
export declare function clearApiProviders(): void;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { KnownProvider } from "./types.js";
|
|
2
|
-
export interface EnvApiKeyResolution {
|
|
3
|
-
provider: string;
|
|
4
|
-
apiKey?: string;
|
|
5
|
-
isAuthenticatedMarker: boolean;
|
|
6
|
-
isValid: boolean;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Resolve a provider's credential from the process environment.
|
|
10
|
-
*
|
|
11
|
-
* Most providers map to a single env var (such as OPENAI_API_KEY); a few use
|
|
12
|
-
* custom logic (Bedrock and Vertex return the SDK marker, Copilot/Anthropic
|
|
13
|
-
* accept token fallbacks). Returns undefined when nothing usable is configured.
|
|
14
|
-
*/
|
|
15
|
-
export declare function getEnvApiKey(provider: KnownProvider): string | undefined;
|
|
16
|
-
export declare function getEnvApiKey(provider: string): string | undefined;
|
|
17
|
-
export declare function isLikelyValidApiKey(value: string | undefined): boolean;
|
|
18
|
-
export declare function resolveEnvApiKey(provider: KnownProvider | string): EnvApiKeyResolution;
|
|
19
|
-
export declare function rotateEnvApiKey(provider: KnownProvider | string, fallback?: string): string | undefined;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export * from "./api-registry.js";
|
|
2
|
-
export * from "./env-api-keys.js";
|
|
3
|
-
export * from "./models.generated.js";
|
|
4
|
-
export * from "./models.js";
|
|
5
|
-
export * from "./adapters/mock.js";
|
|
6
|
-
export * from "./adapters/openai-scaffold.js";
|
|
7
|
-
export * from "./adapters/anthropic.js";
|
|
8
|
-
export * from "./adapters/azure-openai-responses.js";
|
|
9
|
-
export * from "./adapters/google.js";
|
|
10
|
-
export * from "./adapters/google-vertex.js";
|
|
11
|
-
export * from "./adapters/openai-completions.js";
|
|
12
|
-
export * from "./adapters/openai-responses.js";
|
|
13
|
-
export * from "./adapters/openai-responses-shared.js";
|
|
14
|
-
export * from "./adapters/openai-codex-responses.js";
|
|
15
|
-
export * from "./adapters/amazon-bedrock.js";
|
|
16
|
-
export * from "./adapters/kimi.js";
|
|
17
|
-
export * from "./adapters/nvidia.js";
|
|
18
|
-
export { executeGoogleRequest, convertTools, isThinkingPart, retainThoughtSignature, requiresToolCallId, mapToolChoice, mapStopReason, mapStopReasonString, type GoogleThinkingLevel, } from "./adapters/google-shared.js";
|
|
19
|
-
export * from "./adapters/simple-options.js";
|
|
20
|
-
export * from "./adapters/register-builtins.js";
|
|
21
|
-
export * from "./stream.js";
|
|
22
|
-
export * from "./types.js";
|
|
23
|
-
export * from "./kit/index.js";
|
|
24
|
-
export * from "./kit/auth/index.js";
|
|
25
|
-
export * from "./kit/overflow.js";
|
|
26
|
-
export * from "./kit/typebox-helpers.js";
|
|
27
|
-
export * from "./kit/validation.js";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sign-in flow for Anthropic accounts (Claude Pro / Max) over OAuth + PKCE.
|
|
3
|
-
*/
|
|
4
|
-
import type { OAuthCredentials, OAuthProviderInterface } from "./types.js";
|
|
5
|
-
/**
|
|
6
|
-
* Walk a user through Anthropic OAuth sign-in.
|
|
7
|
-
*
|
|
8
|
-
* @param onAuthUrl - Invoked with the authorization URL so the caller can open it.
|
|
9
|
-
* @param onPromptCode - Invoked to collect the authorization code from the user.
|
|
10
|
-
*/
|
|
11
|
-
export declare function loginAnthropic(onAuthUrl: (url: string) => void, onPromptCode: () => Promise<string>): Promise<OAuthCredentials>;
|
|
12
|
-
/**
|
|
13
|
-
* Exchange an Anthropic refresh token for a renewed credential.
|
|
14
|
-
*/
|
|
15
|
-
export declare function refreshAnthropicToken(refreshToken: string): Promise<OAuthCredentials>;
|
|
16
|
-
export declare function isAnthropicOAuthCredentialsValid(credentials: OAuthCredentials): boolean;
|
|
17
|
-
export declare const anthropicOAuthProvider: OAuthProviderInterface;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GitHub Copilot sign-in via the OAuth device-authorization grant.
|
|
3
|
-
*/
|
|
4
|
-
import type { OAuthCredentials, OAuthProviderInterface } from "./types.js";
|
|
5
|
-
type LoginOptions = {
|
|
6
|
-
onAuth: (url: string, instructions?: string) => void;
|
|
7
|
-
onPrompt: (prompt: {
|
|
8
|
-
message: string;
|
|
9
|
-
placeholder?: string;
|
|
10
|
-
allowEmpty?: boolean;
|
|
11
|
-
}) => Promise<string>;
|
|
12
|
-
onProgress?: (message: string) => void;
|
|
13
|
-
signal?: AbortSignal;
|
|
14
|
-
};
|
|
15
|
-
export declare function normalizeDomain(raw: string): string | null;
|
|
16
|
-
/** Module-level entry point for resolving the Copilot API base URL. */
|
|
17
|
-
export declare function getGitHubCopilotBaseUrl(token?: string, enterpriseDomain?: string): string;
|
|
18
|
-
export declare function refreshGitHubCopilotToken(refreshToken: string, enterpriseDomain?: string): Promise<OAuthCredentials>;
|
|
19
|
-
export declare function loginGitHubCopilot(options: LoginOptions): Promise<OAuthCredentials>;
|
|
20
|
-
export declare function isGitHubCopilotOAuthCredentialsValid(credentials: OAuthCredentials): boolean;
|
|
21
|
-
export declare const githubCopilotOAuthProvider: OAuthProviderInterface;
|
|
22
|
-
export {};
|