indusagi 0.13.6 → 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 +54 -47
- 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,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Web Fetch Tool
|
|
3
|
-
*
|
|
4
|
-
* Fetches content from a specified URL.
|
|
5
|
-
* Supports text, markdown, and HTML format options.
|
|
6
|
-
*/
|
|
7
|
-
import type { AgentTool } from "../types.js";
|
|
8
|
-
declare const webFetchSchema: import("@sinclair/typebox").TObject<{
|
|
9
|
-
url: import("@sinclair/typebox").TString;
|
|
10
|
-
format: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"text">, import("@sinclair/typebox").TLiteral<"markdown">, import("@sinclair/typebox").TLiteral<"html">]>>;
|
|
11
|
-
timeout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
12
|
-
}>;
|
|
13
|
-
export interface WebFetchToolDetails {
|
|
14
|
-
url: string;
|
|
15
|
-
format?: "text" | "markdown" | "html";
|
|
16
|
-
timeout?: number;
|
|
17
|
-
contentType?: string;
|
|
18
|
-
fetchedBytes?: number;
|
|
19
|
-
}
|
|
20
|
-
export interface WebFetchToolOptions {
|
|
21
|
-
/** Maximum response size in bytes (default: 5MB) */
|
|
22
|
-
maxResponseSize?: number;
|
|
23
|
-
/** Default timeout in milliseconds (default: 30000) */
|
|
24
|
-
defaultTimeout?: number;
|
|
25
|
-
/** Optional proxy base URL that forwards target URL via ?url= */
|
|
26
|
-
proxyUrl?: string;
|
|
27
|
-
}
|
|
28
|
-
export declare function createWebFetchTool(options?: WebFetchToolOptions): AgentTool<typeof webFetchSchema>;
|
|
29
|
-
/** Default web fetch tool */
|
|
30
|
-
export declare const webFetchTool: AgentTool<import("@sinclair/typebox").TObject<{
|
|
31
|
-
url: import("@sinclair/typebox").TString;
|
|
32
|
-
format: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"text">, import("@sinclair/typebox").TLiteral<"markdown">, import("@sinclair/typebox").TLiteral<"html">]>>;
|
|
33
|
-
timeout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
34
|
-
}>, any>;
|
|
35
|
-
export {};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Web Search Tool
|
|
3
|
-
*
|
|
4
|
-
* Performs real-time web searches by scraping DuckDuckGo's lightweight HTML
|
|
5
|
-
* results endpoint. Each organic hit is distilled to the three fields a model
|
|
6
|
-
* reasons over — title, destination URL, and a short snippet — and rendered as a
|
|
7
|
-
* compact numbered list. Provides up-to-date information for current events and
|
|
8
|
-
* recent data.
|
|
9
|
-
*/
|
|
10
|
-
import type { AgentTool } from "../types.js";
|
|
11
|
-
declare const webSearchSchema: import("@sinclair/typebox").TObject<{
|
|
12
|
-
query: import("@sinclair/typebox").TString;
|
|
13
|
-
numResults: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
14
|
-
}>;
|
|
15
|
-
export interface WebSearchToolDetails {
|
|
16
|
-
query: string;
|
|
17
|
-
numResults?: number;
|
|
18
|
-
}
|
|
19
|
-
export interface WebSearchToolOptions {
|
|
20
|
-
/** Custom API base URL (for testing or alternative endpoints) */
|
|
21
|
-
baseUrl?: string;
|
|
22
|
-
/** API key for Exa AI (if required) */
|
|
23
|
-
apiKey?: string;
|
|
24
|
-
/** Max requests per process window */
|
|
25
|
-
rateLimitPerMinute?: number;
|
|
26
|
-
/** Optional result filtering hook */
|
|
27
|
-
filterResult?: (raw: string) => string;
|
|
28
|
-
/** Optional fallback implementation */
|
|
29
|
-
fallbackSearch?: (query: string, numResults?: number, signal?: AbortSignal) => Promise<string>;
|
|
30
|
-
}
|
|
31
|
-
export declare function createWebSearchTool(options?: WebSearchToolOptions): AgentTool<typeof webSearchSchema>;
|
|
32
|
-
/** Default web search tool */
|
|
33
|
-
export declare const webSearchTool: AgentTool<import("@sinclair/typebox").TObject<{
|
|
34
|
-
query: import("@sinclair/typebox").TString;
|
|
35
|
-
numResults: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
36
|
-
}>, any>;
|
|
37
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { AgentTool } from "../types.js";
|
|
2
|
-
import { type CheckpointHandle } from "./checkpoint.js";
|
|
3
|
-
import { type ReadStateHandle } from "./read-state.js";
|
|
4
|
-
declare const writeSchema: import("@sinclair/typebox").TObject<{
|
|
5
|
-
path: import("@sinclair/typebox").TString;
|
|
6
|
-
content: import("@sinclair/typebox").TString;
|
|
7
|
-
}>;
|
|
8
|
-
/**
|
|
9
|
-
* Pluggable filesystem callbacks for the write tool. Override them to direct
|
|
10
|
-
* writes at an alternate backend, for instance an SSH or remote-mount layer.
|
|
11
|
-
*/
|
|
12
|
-
export interface WriteOperations {
|
|
13
|
-
/** Write text out to a file. */
|
|
14
|
-
writeFile: (absolutePath: string, content: string) => Promise<void>;
|
|
15
|
-
/** Make sure a directory is present, building any missing parents along the way. */
|
|
16
|
-
mkdir: (dir: string) => Promise<void>;
|
|
17
|
-
/** Optional callback for taking a snapshot of a file ahead of overwriting it. */
|
|
18
|
-
copyFile?: (from: string, to: string) => Promise<void>;
|
|
19
|
-
}
|
|
20
|
-
export interface WriteToolOptions {
|
|
21
|
-
/** Swap out the filesystem callbacks; the local disk is used by default. */
|
|
22
|
-
operations?: WriteOperations;
|
|
23
|
-
/** If set, duplicate any existing file to a sibling .bak before it is overwritten. */
|
|
24
|
-
createBackup?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Optional read-before-edit gate store. When present, overwriting an EXISTING
|
|
27
|
-
* file is refused unless it was read this session and has not drifted on disk;
|
|
28
|
-
* brand-new files (not yet on disk) are exempt. Absent → no gate (no-op).
|
|
29
|
-
*/
|
|
30
|
-
readState?: ReadStateHandle;
|
|
31
|
-
/**
|
|
32
|
-
* Optional file-checkpoint sink. When present, the file's pre-mutation
|
|
33
|
-
* on-disk content (or `null` when it did not exist) is captured exactly once
|
|
34
|
-
* before the overwrite, so a later rewind can roll the working tree back.
|
|
35
|
-
* Absent → no snapshot (no-op).
|
|
36
|
-
*/
|
|
37
|
-
checkpoint?: CheckpointHandle;
|
|
38
|
-
}
|
|
39
|
-
export declare function createWriteTool(cwd: string, options?: WriteToolOptions): AgentTool<typeof writeSchema>;
|
|
40
|
-
/** Ready-to-use write tool bound to the current working directory. */
|
|
41
|
-
export declare const writeTool: AgentTool<import("@sinclair/typebox").TObject<{
|
|
42
|
-
path: import("@sinclair/typebox").TString;
|
|
43
|
-
content: import("@sinclair/typebox").TString;
|
|
44
|
-
}>, any>;
|
|
45
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The engine that runs the agent's turn cycle.
|
|
3
|
-
*
|
|
4
|
-
* Throughout this module the conversation is carried as AgentMessage values.
|
|
5
|
-
* They are only flattened into the provider's Message[] representation at the
|
|
6
|
-
* last possible moment — immediately before a model call inside
|
|
7
|
-
* streamAssistantResponse — and never anywhere else.
|
|
8
|
-
*/
|
|
9
|
-
import { EventStream } from "../ml/index.js";
|
|
10
|
-
import type { AgentContext, AgentEvent, AgentLoopConfig, AgentMessage, StreamFn } from "./types.js";
|
|
11
|
-
/**
|
|
12
|
-
* Conservative static allow-list of tools that only read state, never mutate
|
|
13
|
-
* it. Consecutive runs of these within a single assistant turn are safe to
|
|
14
|
-
* dispatch concurrently. Anything not on this list — mutating tools (edit,
|
|
15
|
-
* write, bash), and every dynamic / MCP / composio tool whose behavior the
|
|
16
|
-
* loop can't statically vouch for — runs serially in request order.
|
|
17
|
-
*
|
|
18
|
-
* Callers can supply their own set through `AgentLoopConfig.readOnlyToolNames`.
|
|
19
|
-
*/
|
|
20
|
-
export declare const READ_ONLY_TOOL_NAMES: ReadonlySet<string>;
|
|
21
|
-
/**
|
|
22
|
-
* Begin a brand-new run. The supplied prompt messages are appended to the
|
|
23
|
-
* conversation up front, then the turn cycle starts.
|
|
24
|
-
*/
|
|
25
|
-
export declare function agentLoop(prompts: AgentMessage[], context: AgentContext, config: AgentLoopConfig, signal?: AbortSignal, streamFn?: StreamFn): EventStream<AgentEvent, AgentMessage[]>;
|
|
26
|
-
/**
|
|
27
|
-
* Pick a run back up from wherever the context currently sits, without adding
|
|
28
|
-
* any new prompt messages.
|
|
29
|
-
*/
|
|
30
|
-
export declare function agentLoopContinue(context: AgentContext, config: AgentLoopConfig, signal?: AbortSignal, streamFn?: StreamFn): EventStream<AgentEvent, AgentMessage[]>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* High-level Agent wrapper around the streaming loop. It keeps the mutable run
|
|
3
|
-
* state, exposes the public prompt/steer/follow-up surface, and forwards work to
|
|
4
|
-
* the loop functions directly. There is no transport indirection here: by
|
|
5
|
-
* default the model is reached through streamSimple.
|
|
6
|
-
*/
|
|
7
|
-
import { type ImageContent, type Message, type Model, type ThinkingBudgets } from "../ml/index.js";
|
|
8
|
-
import type { AgentEvent, AgentMessage, AgentState, AgentTool, CanUseToolFn, StreamFn, ThinkingLevel } from "./types.js";
|
|
9
|
-
type QueueMode = "all" | "one-at-a-time";
|
|
10
|
-
export interface AgentOptions {
|
|
11
|
-
initialState?: Partial<AgentState>;
|
|
12
|
-
/**
|
|
13
|
-
* Hook that maps the agent's AgentMessage[] onto the provider-facing
|
|
14
|
-
* Message[] right before every model call. When omitted, the built-in
|
|
15
|
-
* reducer keeps only user/assistant/toolResult messages and converts
|
|
16
|
-
* attachments.
|
|
17
|
-
*/
|
|
18
|
-
convertToLlm?: (messages: AgentMessage[]) => Message[] | Promise<Message[]>;
|
|
19
|
-
/**
|
|
20
|
-
* Runs ahead of convertToLlm and may rewrite the message list — handy for
|
|
21
|
-
* trimming long histories or splicing in extra context.
|
|
22
|
-
*/
|
|
23
|
-
transformContext?: (messages: AgentMessage[], signal?: AbortSignal) => Promise<AgentMessage[]>;
|
|
24
|
-
/**
|
|
25
|
-
* How queued steering messages are released: "all" flushes the whole queue
|
|
26
|
-
* in one go, "one-at-a-time" releases a single message per turn.
|
|
27
|
-
*/
|
|
28
|
-
steeringMode?: QueueMode;
|
|
29
|
-
/**
|
|
30
|
-
* How queued follow-up messages are released: "all" flushes the whole queue
|
|
31
|
-
* in one go, "one-at-a-time" releases a single message per turn.
|
|
32
|
-
*/
|
|
33
|
-
followUpMode?: QueueMode;
|
|
34
|
-
/**
|
|
35
|
-
* Swap in an alternative streaming implementation — e.g. a remote proxy
|
|
36
|
-
* backend. Falls back to streamSimple when not provided.
|
|
37
|
-
*/
|
|
38
|
-
streamFn?: StreamFn;
|
|
39
|
-
/**
|
|
40
|
-
* Stable identifier passed through to providers that key their server-side
|
|
41
|
-
* caches on a session, so repeated turns can reuse prior context.
|
|
42
|
-
*/
|
|
43
|
-
sessionId?: string;
|
|
44
|
-
/**
|
|
45
|
-
* Supplies a fresh API key per call. Useful when credentials rotate or
|
|
46
|
-
* expire, such as short-lived OAuth access tokens.
|
|
47
|
-
*/
|
|
48
|
-
getApiKey?: (provider: string) => Promise<string | undefined> | string | undefined;
|
|
49
|
-
/**
|
|
50
|
-
* Hard permission gate consulted before each tool runs. A host supplies it to
|
|
51
|
-
* enforce an allow/ask/deny policy; the loop awaits it on the validated args
|
|
52
|
-
* and either proceeds (optionally with substituted input) or short-circuits
|
|
53
|
-
* to an isError result. Omit it to allow every tool — today's behavior.
|
|
54
|
-
*/
|
|
55
|
-
canUseTool?: CanUseToolFn;
|
|
56
|
-
/**
|
|
57
|
-
* Per-level token allowances for thinking; only meaningful for providers
|
|
58
|
-
* whose reasoning effort is expressed as a token budget.
|
|
59
|
-
*/
|
|
60
|
-
thinkingBudgets?: ThinkingBudgets;
|
|
61
|
-
}
|
|
62
|
-
export declare class Agent {
|
|
63
|
-
private _state;
|
|
64
|
-
private readonly eventBus;
|
|
65
|
-
private readonly stateManager;
|
|
66
|
-
private readonly queuePolicy;
|
|
67
|
-
private abortController?;
|
|
68
|
-
private convertToLlm;
|
|
69
|
-
private transformContext?;
|
|
70
|
-
streamFn: StreamFn;
|
|
71
|
-
private _sessionId?;
|
|
72
|
-
getApiKey?: (provider: string) => Promise<string | undefined> | string | undefined;
|
|
73
|
-
canUseTool?: CanUseToolFn;
|
|
74
|
-
private runningPrompt?;
|
|
75
|
-
private resolveRunningPrompt?;
|
|
76
|
-
private _thinkingBudgets?;
|
|
77
|
-
constructor(opts?: AgentOptions);
|
|
78
|
-
/**
|
|
79
|
-
* The session identifier currently forwarded to providers for caching.
|
|
80
|
-
*/
|
|
81
|
-
get sessionId(): string | undefined;
|
|
82
|
-
/**
|
|
83
|
-
* Update the provider-caching session identifier. Set a new value whenever
|
|
84
|
-
* the conversation changes identity — a brand-new session, a branch, or a
|
|
85
|
-
* resumed run.
|
|
86
|
-
*/
|
|
87
|
-
set sessionId(value: string | undefined);
|
|
88
|
-
/**
|
|
89
|
-
* The thinking-level token budgets currently in effect, if any.
|
|
90
|
-
*/
|
|
91
|
-
get thinkingBudgets(): ThinkingBudgets | undefined;
|
|
92
|
-
/**
|
|
93
|
-
* Override the thinking-level token budgets for providers that meter
|
|
94
|
-
* reasoning by token count.
|
|
95
|
-
*/
|
|
96
|
-
set thinkingBudgets(value: ThinkingBudgets | undefined);
|
|
97
|
-
get state(): AgentState;
|
|
98
|
-
subscribe(fn: (e: AgentEvent) => void): () => void;
|
|
99
|
-
setSystemPrompt(v: string): void;
|
|
100
|
-
setModel(m: Model<any>): void;
|
|
101
|
-
setThinkingLevel(l: ThinkingLevel): void;
|
|
102
|
-
setSteeringMode(mode: QueueMode): void;
|
|
103
|
-
getSteeringMode(): QueueMode;
|
|
104
|
-
setFollowUpMode(mode: QueueMode): void;
|
|
105
|
-
getFollowUpMode(): QueueMode;
|
|
106
|
-
setTools(t: AgentTool<any>[]): void;
|
|
107
|
-
replaceMessages(ms: AgentMessage[]): void;
|
|
108
|
-
appendMessage(m: AgentMessage): void;
|
|
109
|
-
/**
|
|
110
|
-
* Enqueue a steering message to redirect the agent while it is running. It
|
|
111
|
-
* lands once the in-flight tool finishes and causes any still-pending tool
|
|
112
|
-
* calls in that turn to be skipped.
|
|
113
|
-
*/
|
|
114
|
-
steer(m: AgentMessage): void;
|
|
115
|
-
/**
|
|
116
|
-
* Enqueue a follow-up message that is held back until the agent has gone
|
|
117
|
-
* idle — i.e. there are no outstanding tool calls and no steering left to
|
|
118
|
-
* process.
|
|
119
|
-
*/
|
|
120
|
-
followUp(m: AgentMessage): void;
|
|
121
|
-
clearSteeringQueue(): void;
|
|
122
|
-
clearFollowUpQueue(): void;
|
|
123
|
-
clearAllQueues(): void;
|
|
124
|
-
clearMessages(): void;
|
|
125
|
-
abort(): void;
|
|
126
|
-
waitForIdle(): Promise<void>;
|
|
127
|
-
reset(): void;
|
|
128
|
-
/** Submit a new prompt, given either raw text or one or more AgentMessages. */
|
|
129
|
-
prompt(message: AgentMessage | AgentMessage[]): Promise<void>;
|
|
130
|
-
prompt(input: string, images?: ImageContent[]): Promise<void>;
|
|
131
|
-
/** Resume the existing conversation, e.g. to retry after a context overflow. */
|
|
132
|
-
continue(): Promise<void>;
|
|
133
|
-
/**
|
|
134
|
-
* Core driver for a run. Passing a messages array opens a new turn seeded
|
|
135
|
-
* with them; passing nothing resumes the conversation already in state.
|
|
136
|
-
*/
|
|
137
|
-
private _runLoop;
|
|
138
|
-
private emit;
|
|
139
|
-
}
|
|
140
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { AgentEvent } from "./types.js";
|
|
2
|
-
export type AgentEventListener = (event: AgentEvent) => void;
|
|
3
|
-
export declare class AgentEventBus {
|
|
4
|
-
private listeners;
|
|
5
|
-
subscribe(listener: AgentEventListener): () => void;
|
|
6
|
-
emit(event: AgentEvent): void;
|
|
7
|
-
clear(): void;
|
|
8
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Extra message variants that only appear within a live session, plus the
|
|
3
|
-
* routine that collapses an AgentMessage list into the plain Message list a
|
|
4
|
-
* model can read.
|
|
5
|
-
*
|
|
6
|
-
* The base AgentMessage union is widened (via declaration merging) with four
|
|
7
|
-
* session-only kinds — recorded shell runs, extension-supplied entries, and the
|
|
8
|
-
* two flavours of summary (branch and compaction). The transformer below knows
|
|
9
|
-
* how each of those, as well as the ordinary kinds, becomes an LLM Message.
|
|
10
|
-
*/
|
|
11
|
-
import type { AgentMessage } from "./types.js";
|
|
12
|
-
import type { ImageContent, Message, TextContent } from "../ml/index.js";
|
|
13
|
-
export declare const COMPACTION_SUMMARY_PREFIX = "Earlier turns in this conversation were condensed. Here is the recap that replaces them:\n\n<summary>\n";
|
|
14
|
-
export declare const COMPACTION_SUMMARY_SUFFIX = "\n</summary>";
|
|
15
|
-
export declare const BRANCH_SUMMARY_PREFIX = "Recap of a side branch that the conversation has since returned from:\n\n<summary>\n";
|
|
16
|
-
export declare const BRANCH_SUMMARY_SUFFIX = "</summary>";
|
|
17
|
-
/**
|
|
18
|
-
* One shell command captured from the inline `!` entry point.
|
|
19
|
-
*/
|
|
20
|
-
export interface BashExecutionMessage {
|
|
21
|
-
role: "bashExecution";
|
|
22
|
-
command: string;
|
|
23
|
-
output: string;
|
|
24
|
-
exitCode: number | undefined;
|
|
25
|
-
cancelled: boolean;
|
|
26
|
-
truncated: boolean;
|
|
27
|
-
fullOutputPath?: string;
|
|
28
|
-
timestamp: number;
|
|
29
|
-
/** Set by the `!!` form to suppress this entry from the model context. */
|
|
30
|
-
excludeFromContext?: boolean;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Content an extension dropped into the conversation through sendMessage().
|
|
34
|
-
* This is the vehicle extensions use to inject their own material into the
|
|
35
|
-
* ongoing dialogue.
|
|
36
|
-
*/
|
|
37
|
-
export interface CustomMessage<T = unknown> {
|
|
38
|
-
role: "custom";
|
|
39
|
-
customType: string;
|
|
40
|
-
content: string | (TextContent | ImageContent)[];
|
|
41
|
-
display: boolean;
|
|
42
|
-
details?: T;
|
|
43
|
-
timestamp: number;
|
|
44
|
-
}
|
|
45
|
-
export interface BranchSummaryMessage {
|
|
46
|
-
role: "branchSummary";
|
|
47
|
-
summary: string;
|
|
48
|
-
fromId: string;
|
|
49
|
-
timestamp: number;
|
|
50
|
-
}
|
|
51
|
-
export interface CompactionSummaryMessage {
|
|
52
|
-
role: "compactionSummary";
|
|
53
|
-
summary: string;
|
|
54
|
-
tokensBefore: number;
|
|
55
|
-
timestamp: number;
|
|
56
|
-
}
|
|
57
|
-
declare module "./types.js" {
|
|
58
|
-
interface CustomAgentMessages {
|
|
59
|
-
bashExecution: BashExecutionMessage;
|
|
60
|
-
custom: CustomMessage;
|
|
61
|
-
branchSummary: BranchSummaryMessage;
|
|
62
|
-
compactionSummary: CompactionSummaryMessage;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Turn a captured shell run into the user-message text shown to the model.
|
|
67
|
-
*/
|
|
68
|
-
export declare function bashExecutionToText(msg: BashExecutionMessage): string;
|
|
69
|
-
export declare function createBranchSummaryMessage(summary: string, fromId: string, timestamp: string): BranchSummaryMessage;
|
|
70
|
-
export declare function createCompactionSummaryMessage(summary: string, tokensBefore: number, timestamp: string): CompactionSummaryMessage;
|
|
71
|
-
/** Reconstruct a CustomMessage (the in-memory AgentMessage form) from saved entry fields. */
|
|
72
|
-
export declare function createCustomMessage(customType: string, content: string | (TextContent | ImageContent)[], display: boolean, details: unknown | undefined, timestamp: string): CustomMessage;
|
|
73
|
-
/**
|
|
74
|
-
* Reduce an AgentMessage list (session-only kinds included) to the plain
|
|
75
|
-
* Message list the model accepts. Anything a translator maps to `undefined`
|
|
76
|
-
* is removed from the result.
|
|
77
|
-
*
|
|
78
|
-
* Reached from:
|
|
79
|
-
* - the Agent's convertToLlm hook, used for prompts and queued input
|
|
80
|
-
* - compaction summarization
|
|
81
|
-
* - extensions and tools wanting a model-ready view
|
|
82
|
-
*/
|
|
83
|
-
export declare function convertToLlm(messages: AgentMessage[]): Message[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Client for talking to a remote streaming endpoint that fronts the model. It
|
|
3
|
-
* opens an SSE connection, decodes the line-delimited proxy events, and rebuilds
|
|
4
|
-
* the assistant message incrementally so the result matches a direct stream.
|
|
5
|
-
*/
|
|
6
|
-
import { EventStream, type AssistantMessage, type AssistantMessageEvent, type Context, type Model, type SimpleStreamOptions, type StopReason } from "../ml/index.js";
|
|
7
|
-
declare class ProxyMessageEventStream extends EventStream<AssistantMessageEvent, AssistantMessage> {
|
|
8
|
-
constructor();
|
|
9
|
-
}
|
|
10
|
-
export type ProxyAssistantMessageEvent = {
|
|
11
|
-
type: "start";
|
|
12
|
-
} | {
|
|
13
|
-
type: "text_start";
|
|
14
|
-
contentIndex: number;
|
|
15
|
-
} | {
|
|
16
|
-
type: "text_delta";
|
|
17
|
-
contentIndex: number;
|
|
18
|
-
delta: string;
|
|
19
|
-
} | {
|
|
20
|
-
type: "text_end";
|
|
21
|
-
contentIndex: number;
|
|
22
|
-
contentSignature?: string;
|
|
23
|
-
} | {
|
|
24
|
-
type: "thinking_start";
|
|
25
|
-
contentIndex: number;
|
|
26
|
-
} | {
|
|
27
|
-
type: "thinking_delta";
|
|
28
|
-
contentIndex: number;
|
|
29
|
-
delta: string;
|
|
30
|
-
} | {
|
|
31
|
-
type: "thinking_end";
|
|
32
|
-
contentIndex: number;
|
|
33
|
-
contentSignature?: string;
|
|
34
|
-
} | {
|
|
35
|
-
type: "toolcall_start";
|
|
36
|
-
contentIndex: number;
|
|
37
|
-
id: string;
|
|
38
|
-
toolName: string;
|
|
39
|
-
} | {
|
|
40
|
-
type: "toolcall_delta";
|
|
41
|
-
contentIndex: number;
|
|
42
|
-
delta: string;
|
|
43
|
-
} | {
|
|
44
|
-
type: "toolcall_end";
|
|
45
|
-
contentIndex: number;
|
|
46
|
-
} | {
|
|
47
|
-
type: "done";
|
|
48
|
-
reason: Extract<StopReason, "stop" | "length" | "toolUse">;
|
|
49
|
-
usage: AssistantMessage["usage"];
|
|
50
|
-
} | {
|
|
51
|
-
type: "error";
|
|
52
|
-
reason: Extract<StopReason, "aborted" | "error">;
|
|
53
|
-
errorMessage?: string;
|
|
54
|
-
usage: AssistantMessage["usage"];
|
|
55
|
-
};
|
|
56
|
-
export interface RetryConfig {
|
|
57
|
-
maxAttempts?: number;
|
|
58
|
-
baseDelayMs?: number;
|
|
59
|
-
maxDelayMs?: number;
|
|
60
|
-
}
|
|
61
|
-
export interface ProxyStreamOptions extends SimpleStreamOptions {
|
|
62
|
-
authToken: string;
|
|
63
|
-
getAuthToken?: () => Promise<string>;
|
|
64
|
-
proxyUrl: string;
|
|
65
|
-
timeoutMs?: number;
|
|
66
|
-
retry?: RetryConfig;
|
|
67
|
-
logger?: (message: string, meta?: Record<string, unknown>) => void;
|
|
68
|
-
}
|
|
69
|
-
export declare function streamProxy(model: Model<any>, context: Context, options: ProxyStreamOptions): ProxyMessageEventStream;
|
|
70
|
-
export {};
|