@dexto/core 1.7.2 → 1.8.1
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/dist/agent/DextoAgent.cjs +163 -77
- package/dist/agent/DextoAgent.d.ts +73 -19
- package/dist/agent/DextoAgent.d.ts.map +1 -1
- package/dist/agent/DextoAgent.js +165 -67
- package/dist/agent/agent-options.d.ts +6 -10
- package/dist/agent/agent-options.d.ts.map +1 -1
- package/dist/agent/agentCard.js +1 -1
- package/dist/agent/error-codes.js +1 -1
- package/dist/agent/errors.js +1 -1
- package/dist/agent/index.d.ts +1 -0
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +1 -1
- package/dist/agent/schemas.d.ts +2 -2
- package/dist/agent/schemas.js +1 -1
- package/dist/agent/state-manager.js +1 -1
- package/dist/agent/types.d.ts +1 -1
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/approval/error-codes.cjs +1 -1
- package/dist/approval/error-codes.d.ts +1 -1
- package/dist/approval/error-codes.d.ts.map +1 -1
- package/dist/approval/error-codes.js +2 -2
- package/dist/approval/errors.cjs +2 -5
- package/dist/approval/errors.d.ts.map +1 -1
- package/dist/approval/errors.js +3 -6
- package/dist/approval/factory.cjs +19 -4
- package/dist/approval/factory.d.ts +4 -1
- package/dist/approval/factory.d.ts.map +1 -1
- package/dist/approval/factory.js +19 -5
- package/dist/approval/index.d.ts +1 -1
- package/dist/approval/index.d.ts.map +1 -1
- package/dist/approval/index.js +1 -1
- package/dist/approval/manager.cjs +168 -26
- package/dist/approval/manager.d.ts +46 -12
- package/dist/approval/manager.d.ts.map +1 -1
- package/dist/approval/manager.js +177 -29
- package/dist/approval/schemas.cjs +26 -26
- package/dist/approval/schemas.d.ts +29 -29
- package/dist/approval/schemas.d.ts.map +1 -1
- package/dist/approval/schemas.js +23 -23
- package/dist/approval/types.cjs +5 -5
- package/dist/approval/types.d.ts +18 -18
- package/dist/approval/types.d.ts.map +1 -1
- package/dist/approval/types.js +6 -6
- package/dist/{chunk-PTJYTZNU.js → chunk-C6A6W6XS.js} +1 -44
- package/dist/config/index.cjs +75 -0
- package/dist/config/index.d.ts +15 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +50 -0
- package/dist/context/compaction/overflow.d.ts +1 -1
- package/dist/context/compaction/overflow.d.ts.map +1 -1
- package/dist/context/compaction/overflow.js +1 -1
- package/dist/context/compaction/strategies/noop.js +1 -1
- package/dist/context/compaction/strategies/reactive-overflow-compaction.js +1 -1
- package/dist/context/content-clone.cjs +131 -0
- package/dist/context/content-clone.d.ts +7 -0
- package/dist/context/content-clone.d.ts.map +1 -0
- package/dist/context/content-clone.js +104 -0
- package/dist/context/error-codes.js +1 -1
- package/dist/context/errors.js +1 -1
- package/dist/context/index.cjs +2 -0
- package/dist/context/index.d.ts +1 -0
- package/dist/context/index.d.ts.map +1 -1
- package/dist/context/index.js +2 -1
- package/dist/context/manager.cjs +52 -41
- package/dist/context/manager.d.ts +8 -8
- package/dist/context/manager.d.ts.map +1 -1
- package/dist/context/manager.js +46 -35
- package/dist/context/media-helpers.js +1 -1
- package/dist/context/schemas.cjs +77 -0
- package/dist/context/schemas.d.ts +5 -0
- package/dist/context/schemas.d.ts.map +1 -0
- package/dist/context/schemas.js +53 -0
- package/dist/context/types.d.ts +1 -1
- package/dist/context/types.d.ts.map +1 -1
- package/dist/context/types.js +1 -1
- package/dist/context/utils.cjs +73 -72
- package/dist/context/utils.d.ts +4 -4
- package/dist/context/utils.d.ts.map +1 -1
- package/dist/context/utils.js +72 -71
- package/dist/errors/DextoBaseError.js +1 -1
- package/dist/errors/DextoRuntimeError.js +1 -1
- package/dist/errors/DextoValidationError.js +1 -1
- package/dist/errors/index.js +1 -1
- package/dist/errors/result-bridge.js +1 -1
- package/dist/errors/types.js +1 -1
- package/dist/events/index.cjs +9 -1
- package/dist/events/index.d.ts +22 -10
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +10 -2
- package/dist/hooks/builtins/content-policy.js +1 -1
- package/dist/hooks/builtins/response-sanitizer.js +1 -1
- package/dist/hooks/error-codes.js +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/manager.cjs +1 -1
- package/dist/hooks/manager.d.ts +2 -2
- package/dist/hooks/manager.d.ts.map +1 -1
- package/dist/hooks/manager.js +2 -2
- package/dist/hooks/types.d.ts +2 -2
- package/dist/hooks/types.d.ts.map +1 -1
- package/dist/index.browser.cjs +9 -9
- package/dist/index.browser.d.ts +4 -4
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.browser.js +2 -2
- package/dist/index.cjs +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/llm/curation-config.cjs +3 -3
- package/dist/llm/curation-config.d.ts +1 -1
- package/dist/llm/curation-config.js +4 -4
- package/dist/llm/curation.cjs +2 -2
- package/dist/llm/curation.d.ts +2 -2
- package/dist/llm/curation.d.ts.map +1 -1
- package/dist/llm/curation.js +2 -2
- package/dist/llm/error-codes.js +1 -1
- package/dist/llm/errors.cjs +3 -3
- package/dist/llm/errors.d.ts +1 -1
- package/dist/llm/errors.d.ts.map +1 -1
- package/dist/llm/errors.js +2 -2
- package/dist/llm/{reasoning/anthropic-betas.cjs → executor/index.cjs} +10 -9
- package/dist/llm/executor/index.d.ts +2 -0
- package/dist/llm/executor/index.d.ts.map +1 -0
- package/dist/llm/executor/index.js +11 -0
- package/dist/llm/executor/provider-options.cjs +22 -25
- package/dist/llm/executor/provider-options.d.ts +1 -1
- package/dist/llm/executor/provider-options.d.ts.map +1 -1
- package/dist/llm/executor/provider-options.js +18 -17
- package/dist/llm/executor/stream-processor.cjs +28 -139
- package/dist/llm/executor/stream-processor.d.ts +3 -14
- package/dist/llm/executor/stream-processor.d.ts.map +1 -1
- package/dist/llm/executor/stream-processor.js +29 -140
- package/dist/llm/{reasoning/profiles/openai.cjs → executor/tool-definitions.cjs} +22 -18
- package/dist/llm/executor/tool-definitions.d.ts +4 -0
- package/dist/llm/executor/tool-definitions.d.ts.map +1 -0
- package/dist/llm/executor/tool-definitions.js +22 -0
- package/dist/llm/executor/tool-output-truncator.js +1 -1
- package/dist/llm/executor/turn-executor.cjs +1093 -458
- package/dist/llm/executor/turn-executor.d.ts +269 -43
- package/dist/llm/executor/turn-executor.d.ts.map +1 -1
- package/dist/llm/executor/turn-executor.js +1079 -405
- package/dist/llm/executor/types.d.ts +7 -1
- package/dist/llm/executor/types.d.ts.map +1 -1
- package/dist/llm/formatters/vercel.cjs +2 -2
- package/dist/llm/formatters/vercel.d.ts +1 -1
- package/dist/llm/formatters/vercel.d.ts.map +1 -1
- package/dist/llm/formatters/vercel.js +1 -1
- package/dist/llm/index.cjs +2 -4
- package/dist/llm/index.d.ts +1 -2
- package/dist/llm/index.d.ts.map +1 -1
- package/dist/llm/index.js +2 -3
- package/dist/llm/providers/codex-app-server.cjs +22 -2
- package/dist/llm/providers/codex-app-server.d.ts.map +1 -1
- package/dist/llm/providers/codex-app-server.js +23 -3
- package/dist/llm/providers/codex-base-url.js +1 -1
- package/dist/llm/providers/local/ai-sdk-adapter.js +1 -1
- package/dist/llm/providers/local/downloader.js +1 -1
- package/dist/llm/providers/local/error-codes.js +1 -1
- package/dist/llm/providers/local/errors.js +1 -1
- package/dist/llm/providers/local/gpu-detector.js +1 -1
- package/dist/llm/providers/local/index.js +1 -1
- package/dist/llm/providers/local/node-llama-provider.js +1 -1
- package/dist/llm/providers/local/ollama-provider.js +1 -1
- package/dist/llm/providers/local/registry.js +1 -1
- package/dist/llm/providers/local/schemas.js +1 -1
- package/dist/llm/providers/openrouter-model-registry.js +1 -1
- package/dist/llm/registry/auto-update.cjs +5 -5
- package/dist/llm/registry/auto-update.d.ts.map +1 -1
- package/dist/llm/registry/auto-update.js +3 -3
- package/dist/llm/registry/index.cjs +96 -789
- package/dist/llm/registry/index.d.ts +4 -323
- package/dist/llm/registry/index.d.ts.map +1 -1
- package/dist/llm/registry/index.js +100 -763
- package/dist/llm/registry/sync.d.ts +2 -2
- package/dist/llm/registry/sync.d.ts.map +1 -1
- package/dist/llm/registry/sync.js +1 -1
- package/dist/llm/resolver.cjs +7 -6
- package/dist/llm/resolver.d.ts +1 -1
- package/dist/llm/resolver.js +5 -5
- package/dist/llm/schemas.cjs +14 -14
- package/dist/llm/schemas.d.ts +1 -1
- package/dist/llm/schemas.d.ts.map +1 -1
- package/dist/llm/schemas.js +6 -5
- package/dist/llm/services/factory.cjs +13 -15
- package/dist/llm/services/factory.d.ts +3 -3
- package/dist/llm/services/factory.d.ts.map +1 -1
- package/dist/llm/services/factory.js +16 -16
- package/dist/llm/services/types.d.ts +11 -2
- package/dist/llm/services/types.d.ts.map +1 -1
- package/dist/llm/services/vercel.cjs +23 -8
- package/dist/llm/services/vercel.d.ts +11 -7
- package/dist/llm/services/vercel.d.ts.map +1 -1
- package/dist/llm/services/vercel.js +24 -9
- package/dist/llm/usage-metadata.cjs +23 -6
- package/dist/llm/usage-metadata.d.ts +3 -2
- package/dist/llm/usage-metadata.d.ts.map +1 -1
- package/dist/llm/usage-metadata.js +20 -7
- package/dist/llm/usage-scope.js +1 -1
- package/dist/llm/usage-summary.d.ts +1 -1
- package/dist/llm/usage-summary.js +1 -1
- package/dist/llm/validation.cjs +4 -4
- package/dist/llm/validation.d.ts +1 -1
- package/dist/llm/validation.js +2 -2
- package/dist/logger/browser.js +1 -1
- package/dist/logger/default-logger-factory.js +1 -1
- package/dist/logger/factory.js +1 -1
- package/dist/logger/index.js +1 -1
- package/dist/logger/logger.js +1 -1
- package/dist/logger/v2/dexto-logger.js +1 -1
- package/dist/logger/v2/error-codes.js +1 -1
- package/dist/logger/v2/errors.js +1 -1
- package/dist/logger/v2/schemas.js +1 -1
- package/dist/logger/v2/test-utils.js +1 -1
- package/dist/logger/v2/transport-factory.js +1 -1
- package/dist/logger/v2/transports/console-transport.js +1 -1
- package/dist/logger/v2/transports/file-transport.js +1 -1
- package/dist/logger/v2/transports/silent-transport.js +1 -1
- package/dist/logger/v2/types.js +1 -1
- package/dist/mcp/bundled-config.js +1 -1
- package/dist/mcp/error-codes.js +1 -1
- package/dist/mcp/errors.js +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/manager.js +1 -1
- package/dist/mcp/mcp-client.js +1 -1
- package/dist/mcp/resolver.js +1 -1
- package/dist/mcp/schemas.js +1 -1
- package/dist/memory/error-codes.js +1 -1
- package/dist/memory/errors.js +1 -1
- package/dist/memory/index.js +1 -1
- package/dist/memory/manager.cjs +7 -27
- package/dist/memory/manager.d.ts +4 -12
- package/dist/memory/manager.d.ts.map +1 -1
- package/dist/memory/manager.js +8 -28
- package/dist/memory/schemas.js +1 -1
- package/dist/prompts/error-codes.js +1 -1
- package/dist/prompts/errors.js +1 -1
- package/dist/prompts/index.js +1 -1
- package/dist/prompts/name-validation.js +1 -1
- package/dist/prompts/prompt-manager.cjs +9 -38
- package/dist/prompts/prompt-manager.d.ts +2 -10
- package/dist/prompts/prompt-manager.d.ts.map +1 -1
- package/dist/prompts/prompt-manager.js +10 -39
- package/dist/prompts/providers/config-prompt-provider.cjs +8 -87
- package/dist/prompts/providers/config-prompt-provider.d.ts.map +1 -1
- package/dist/prompts/providers/config-prompt-provider.js +9 -88
- package/dist/prompts/providers/custom-prompt-provider.cjs +21 -22
- package/dist/prompts/providers/custom-prompt-provider.d.ts +19 -4
- package/dist/prompts/providers/custom-prompt-provider.d.ts.map +1 -1
- package/dist/prompts/providers/custom-prompt-provider.js +22 -23
- package/dist/prompts/providers/mcp-prompt-provider.js +1 -1
- package/dist/prompts/schemas.cjs +2 -24
- package/dist/prompts/schemas.d.ts +0 -52
- package/dist/prompts/schemas.d.ts.map +1 -1
- package/dist/prompts/schemas.js +3 -25
- package/dist/prompts/types.d.ts +5 -32
- package/dist/prompts/types.d.ts.map +1 -1
- package/dist/prompts/utils.js +1 -1
- package/dist/resources/agent-resources-provider.js +1 -1
- package/dist/resources/error-codes.js +1 -1
- package/dist/resources/errors.js +1 -1
- package/dist/resources/handlers/blob-handler.cjs +14 -11
- package/dist/resources/handlers/blob-handler.d.ts +4 -4
- package/dist/resources/handlers/blob-handler.d.ts.map +1 -1
- package/dist/resources/handlers/blob-handler.js +15 -12
- package/dist/resources/handlers/factory.cjs +3 -3
- package/dist/resources/handlers/factory.js +4 -4
- package/dist/resources/handlers/filesystem-handler.js +1 -1
- package/dist/resources/handlers/types.d.ts +2 -2
- package/dist/resources/handlers/types.d.ts.map +1 -1
- package/dist/resources/index.js +1 -1
- package/dist/resources/manager.cjs +10 -7
- package/dist/resources/manager.d.ts +4 -4
- package/dist/resources/manager.d.ts.map +1 -1
- package/dist/resources/manager.js +11 -8
- package/dist/resources/reference-parser.js +1 -1
- package/dist/resources/schemas.cjs +1 -1
- package/dist/resources/schemas.d.ts +2 -2
- package/dist/resources/schemas.js +2 -2
- package/dist/runtime/host-runtime.js +1 -1
- package/dist/runtime/index.cjs +3 -0
- package/dist/runtime/index.d.ts +2 -0
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +3 -1
- package/dist/runtime/run-context.js +1 -1
- package/dist/search/index.js +1 -1
- package/dist/search/search-service.cjs +6 -13
- package/dist/search/search-service.d.ts +5 -3
- package/dist/search/search-service.d.ts.map +1 -1
- package/dist/search/search-service.js +7 -14
- package/dist/session/chat-session.cjs +264 -108
- package/dist/session/chat-session.d.ts +75 -21
- package/dist/session/chat-session.d.ts.map +1 -1
- package/dist/session/chat-session.js +268 -108
- package/dist/session/error-codes.js +1 -1
- package/dist/session/errors.js +1 -1
- package/dist/session/index.cjs +19 -2
- package/dist/session/index.d.ts +4 -3
- package/dist/session/index.d.ts.map +1 -1
- package/dist/session/index.js +19 -3
- package/dist/session/message-queue.cjs +82 -51
- package/dist/session/message-queue.d.ts +13 -8
- package/dist/session/message-queue.d.ts.map +1 -1
- package/dist/session/message-queue.js +83 -52
- package/dist/session/queue-clone.cjs +50 -0
- package/dist/session/queue-clone.d.ts +5 -0
- package/dist/session/queue-clone.d.ts.map +1 -0
- package/dist/session/queue-clone.js +25 -0
- package/dist/session/schemas.cjs +74 -2
- package/dist/session/schemas.d.ts +94 -0
- package/dist/session/schemas.d.ts.map +1 -1
- package/dist/session/schemas.js +69 -2
- package/dist/session/session-manager.cjs +107 -123
- package/dist/session/session-manager.d.ts +8 -7
- package/dist/session/session-manager.d.ts.map +1 -1
- package/dist/session/session-manager.js +108 -124
- package/dist/session/title-generator.cjs +14 -26
- package/dist/session/title-generator.d.ts +4 -6
- package/dist/session/title-generator.d.ts.map +1 -1
- package/dist/session/title-generator.js +16 -28
- package/dist/session/types.cjs +28 -0
- package/dist/session/types.d.ts +5 -1
- package/dist/session/types.d.ts.map +1 -1
- package/dist/session/types.js +19 -0
- package/dist/{session/history/factory.cjs → skills/index.cjs} +9 -9
- package/dist/skills/index.d.ts +4 -0
- package/dist/skills/index.d.ts.map +1 -0
- package/dist/skills/index.js +7 -0
- package/dist/skills/skill-manager.cjs +76 -0
- package/dist/skills/skill-manager.d.ts +13 -0
- package/dist/skills/skill-manager.d.ts.map +1 -0
- package/dist/skills/skill-manager.js +53 -0
- package/dist/skills/types.d.ts +24 -0
- package/dist/skills/types.d.ts.map +1 -0
- package/dist/skills/workspace-skill-source.cjs +120 -0
- package/dist/skills/workspace-skill-source.d.ts +16 -0
- package/dist/skills/workspace-skill-source.d.ts.map +1 -0
- package/dist/skills/workspace-skill-source.js +97 -0
- package/dist/{llm → storage/approvals}/types.cjs +13 -30
- package/dist/storage/approvals/types.d.ts +54 -0
- package/dist/storage/approvals/types.d.ts.map +1 -0
- package/dist/storage/approvals/types.js +14 -0
- package/dist/storage/artifacts/types.d.ts +73 -0
- package/dist/storage/artifacts/types.d.ts.map +1 -0
- package/dist/storage/conversation/database.cjs +233 -0
- package/dist/storage/conversation/database.d.ts +38 -0
- package/dist/storage/conversation/database.d.ts.map +1 -0
- package/dist/storage/conversation/database.js +210 -0
- package/dist/storage/conversation/types.cjs +16 -0
- package/dist/storage/conversation/types.d.ts +21 -0
- package/dist/storage/conversation/types.d.ts.map +1 -0
- package/dist/storage/conversation/types.js +0 -0
- package/dist/storage/database/types.d.ts +4 -0
- package/dist/storage/database/types.d.ts.map +1 -1
- package/dist/storage/error-codes.js +1 -1
- package/dist/storage/errors.cjs +6 -6
- package/dist/storage/errors.d.ts +2 -2
- package/dist/storage/errors.js +7 -7
- package/dist/storage/index.cjs +42 -5
- package/dist/storage/index.d.ts +19 -8
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +39 -4
- package/dist/storage/memories/types.cjs +16 -0
- package/dist/storage/memories/types.d.ts +17 -0
- package/dist/storage/memories/types.d.ts.map +1 -0
- package/dist/storage/memories/types.js +0 -0
- package/dist/storage/message-queue/types.cjs +16 -0
- package/dist/storage/message-queue/types.d.ts +15 -0
- package/dist/storage/message-queue/types.d.ts.map +1 -0
- package/dist/storage/message-queue/types.js +0 -0
- package/dist/storage/prompts/types.cjs +16 -0
- package/dist/storage/prompts/types.d.ts +14 -0
- package/dist/storage/prompts/types.d.ts.map +1 -0
- package/dist/storage/prompts/types.js +0 -0
- package/dist/storage/runtime-events/types.cjs +16 -0
- package/dist/storage/runtime-events/types.d.ts +19 -0
- package/dist/storage/runtime-events/types.d.ts.map +1 -0
- package/dist/storage/runtime-events/types.js +0 -0
- package/dist/storage/sessions/types.cjs +16 -0
- package/dist/storage/sessions/types.d.ts +19 -0
- package/dist/storage/sessions/types.d.ts.map +1 -0
- package/dist/storage/sessions/types.js +0 -0
- package/dist/storage/stores/backend.cjs +702 -0
- package/dist/storage/stores/backend.d.ts +303 -0
- package/dist/storage/stores/backend.d.ts.map +1 -0
- package/dist/storage/stores/backend.js +677 -0
- package/dist/storage/stores/in-memory.cjs +510 -0
- package/dist/storage/stores/in-memory.d.ts +11 -0
- package/dist/storage/stores/in-memory.d.ts.map +1 -0
- package/dist/storage/stores/in-memory.js +487 -0
- package/dist/storage/stores/types.cjs +16 -0
- package/dist/storage/stores/types.d.ts +36 -0
- package/dist/storage/stores/types.d.ts.map +1 -0
- package/dist/storage/stores/types.js +0 -0
- package/dist/storage/tool-executions/types.cjs +127 -0
- package/dist/storage/tool-executions/types.d.ts +193 -0
- package/dist/storage/tool-executions/types.d.ts.map +1 -0
- package/dist/storage/tool-executions/types.js +96 -0
- package/dist/storage/tool-preferences/types.cjs +16 -0
- package/dist/storage/tool-preferences/types.d.ts +29 -0
- package/dist/storage/tool-preferences/types.d.ts.map +1 -0
- package/dist/storage/tool-preferences/types.js +0 -0
- package/dist/storage/tool-state/types.cjs +16 -0
- package/dist/storage/tool-state/types.d.ts +20 -0
- package/dist/storage/tool-state/types.d.ts.map +1 -0
- package/dist/storage/tool-state/types.js +0 -0
- package/dist/storage/workspaces/types.cjs +16 -0
- package/dist/storage/workspaces/types.d.ts +19 -0
- package/dist/storage/workspaces/types.d.ts.map +1 -0
- package/dist/storage/workspaces/types.js +0 -0
- package/dist/systemPrompt/contributors.cjs +10 -14
- package/dist/systemPrompt/contributors.d.ts +3 -3
- package/dist/systemPrompt/contributors.d.ts.map +1 -1
- package/dist/systemPrompt/contributors.js +11 -15
- package/dist/systemPrompt/error-codes.js +1 -1
- package/dist/systemPrompt/errors.js +1 -1
- package/dist/systemPrompt/in-built-prompts.js +1 -1
- package/dist/systemPrompt/index.js +1 -1
- package/dist/systemPrompt/manager.js +1 -1
- package/dist/systemPrompt/registry.js +1 -1
- package/dist/systemPrompt/schemas.js +1 -1
- package/dist/telemetry/decorators.js +1 -1
- package/dist/telemetry/error-codes.js +1 -1
- package/dist/telemetry/errors.js +1 -1
- package/dist/telemetry/exporters.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/telemetry/schemas.js +1 -1
- package/dist/telemetry/telemetry.js +1 -1
- package/dist/telemetry/utils.js +1 -1
- package/dist/test-utils/in-memory-storage.cjs +9 -17
- package/dist/test-utils/in-memory-storage.js +9 -16
- package/dist/test-utils/session-state-stores.cjs +21 -24
- package/dist/test-utils/session-state-stores.js +22 -24
- package/dist/tools/{confirmation → approval}/allowed-tools-provider/factory.cjs +1 -1
- package/dist/tools/{confirmation → approval}/allowed-tools-provider/factory.d.ts +2 -2
- package/dist/tools/approval/allowed-tools-provider/factory.d.ts.map +1 -0
- package/dist/tools/{confirmation → approval}/allowed-tools-provider/factory.js +2 -2
- package/dist/tools/approval/allowed-tools-provider/in-memory.d.ts.map +1 -0
- package/dist/tools/{confirmation → approval}/allowed-tools-provider/in-memory.js +1 -1
- package/dist/tools/approval/allowed-tools-provider/storage.cjs +66 -0
- package/dist/tools/{confirmation → approval}/allowed-tools-provider/storage.d.ts +4 -10
- package/dist/tools/approval/allowed-tools-provider/storage.d.ts.map +1 -0
- package/dist/tools/approval/allowed-tools-provider/storage.js +43 -0
- package/dist/tools/approval/allowed-tools-provider/types.cjs +16 -0
- package/dist/tools/approval/allowed-tools-provider/types.d.ts.map +1 -0
- package/dist/tools/approval/allowed-tools-provider/types.js +0 -0
- package/dist/tools/approval/session-tool-policy.cjs +269 -0
- package/dist/tools/approval/session-tool-policy.d.ts +43 -0
- package/dist/tools/approval/session-tool-policy.d.ts.map +1 -0
- package/dist/tools/approval/session-tool-policy.js +245 -0
- package/dist/tools/define-tool.js +1 -1
- package/dist/tools/display-types.js +1 -1
- package/dist/tools/error-codes.cjs +3 -3
- package/dist/tools/error-codes.d.ts +4 -4
- package/dist/tools/error-codes.d.ts.map +1 -1
- package/dist/tools/error-codes.js +4 -4
- package/dist/tools/errors.cjs +12 -12
- package/dist/tools/errors.d.ts +6 -6
- package/dist/tools/errors.d.ts.map +1 -1
- package/dist/tools/errors.js +13 -13
- package/dist/tools/index.cjs +3 -0
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +3 -1
- package/dist/tools/pattern-utils.js +1 -1
- package/dist/tools/presentation/tool-presentation.cjs +182 -0
- package/dist/tools/presentation/tool-presentation.d.ts +51 -0
- package/dist/tools/presentation/tool-presentation.d.ts.map +1 -0
- package/dist/tools/presentation/tool-presentation.js +159 -0
- package/dist/tools/presentation.js +1 -1
- package/dist/tools/schemas.cjs +5 -10
- package/dist/tools/schemas.d.ts +1 -4
- package/dist/tools/schemas.d.ts.map +1 -1
- package/dist/tools/schemas.js +6 -11
- package/dist/tools/session-tool-preferences-store.cjs +12 -28
- package/dist/tools/session-tool-preferences-store.d.ts +4 -7
- package/dist/tools/session-tool-preferences-store.d.ts.map +1 -1
- package/dist/tools/session-tool-preferences-store.js +12 -29
- package/dist/tools/tool-call-metadata.js +1 -1
- package/dist/tools/tool-manager.cjs +871 -834
- package/dist/tools/tool-manager.d.ts +94 -96
- package/dist/tools/tool-manager.d.ts.map +1 -1
- package/dist/tools/tool-manager.js +876 -833
- package/dist/tools/types.d.ts +10 -14
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/utils/api-key-resolver.d.ts +1 -1
- package/dist/utils/api-key-resolver.d.ts.map +1 -1
- package/dist/utils/api-key-resolver.js +1 -1
- package/dist/utils/async-context.js +1 -1
- package/dist/utils/debug.js +1 -1
- package/dist/utils/defer.js +1 -1
- package/dist/utils/env.js +1 -1
- package/dist/utils/error-conversion.js +1 -1
- package/dist/utils/execution-context.js +1 -1
- package/dist/utils/fs-walk.js +1 -1
- package/dist/utils/path.js +1 -1
- package/dist/utils/redactor.js +1 -1
- package/dist/utils/result.js +1 -1
- package/dist/utils/safe-stringify.js +1 -1
- package/dist/utils/schema.js +1 -1
- package/dist/utils/service-initializer.cjs +37 -33
- package/dist/utils/service-initializer.d.ts +9 -5
- package/dist/utils/service-initializer.d.ts.map +1 -1
- package/dist/utils/service-initializer.js +38 -34
- package/dist/utils/zod-schema-converter.js +1 -1
- package/dist/workspace/error-codes.cjs +5 -1
- package/dist/workspace/error-codes.d.ts +4 -0
- package/dist/workspace/error-codes.d.ts.map +1 -1
- package/dist/workspace/error-codes.js +6 -2
- package/dist/workspace/errors.cjs +43 -0
- package/dist/workspace/errors.d.ts +9 -0
- package/dist/workspace/errors.d.ts.map +1 -1
- package/dist/workspace/errors.js +44 -1
- package/dist/workspace/index.d.ts +1 -1
- package/dist/workspace/index.d.ts.map +1 -1
- package/dist/workspace/index.js +1 -1
- package/dist/workspace/manager.cjs +21 -29
- package/dist/workspace/manager.d.ts +6 -6
- package/dist/workspace/manager.d.ts.map +1 -1
- package/dist/workspace/manager.js +22 -30
- package/dist/workspace/types.d.ts +47 -0
- package/dist/workspace/types.d.ts.map +1 -1
- package/package.json +116 -3
- package/dist/approval/session-approval-store.cjs +0 -91
- package/dist/approval/session-approval-store.d.ts +0 -37
- package/dist/approval/session-approval-store.d.ts.map +0 -1
- package/dist/approval/session-approval-store.js +0 -68
- package/dist/llm/reasoning/anthropic-betas.d.ts +0 -3
- package/dist/llm/reasoning/anthropic-betas.d.ts.map +0 -1
- package/dist/llm/reasoning/anthropic-betas.js +0 -7
- package/dist/llm/reasoning/anthropic-thinking.cjs +0 -79
- package/dist/llm/reasoning/anthropic-thinking.d.ts +0 -15
- package/dist/llm/reasoning/anthropic-thinking.d.ts.map +0 -1
- package/dist/llm/reasoning/anthropic-thinking.js +0 -52
- package/dist/llm/reasoning/openai-reasoning-effort.cjs +0 -86
- package/dist/llm/reasoning/openai-reasoning-effort.d.ts +0 -5
- package/dist/llm/reasoning/openai-reasoning-effort.d.ts.map +0 -1
- package/dist/llm/reasoning/openai-reasoning-effort.js +0 -61
- package/dist/llm/reasoning/profile.cjs +0 -113
- package/dist/llm/reasoning/profile.d.ts +0 -13
- package/dist/llm/reasoning/profile.d.ts.map +0 -1
- package/dist/llm/reasoning/profile.js +0 -92
- package/dist/llm/reasoning/profiles/anthropic.cjs +0 -61
- package/dist/llm/reasoning/profiles/anthropic.d.ts +0 -8
- package/dist/llm/reasoning/profiles/anthropic.d.ts.map +0 -1
- package/dist/llm/reasoning/profiles/anthropic.js +0 -45
- package/dist/llm/reasoning/profiles/bedrock.cjs +0 -54
- package/dist/llm/reasoning/profiles/bedrock.d.ts +0 -3
- package/dist/llm/reasoning/profiles/bedrock.d.ts.map +0 -1
- package/dist/llm/reasoning/profiles/bedrock.js +0 -36
- package/dist/llm/reasoning/profiles/google.cjs +0 -45
- package/dist/llm/reasoning/profiles/google.d.ts +0 -9
- package/dist/llm/reasoning/profiles/google.d.ts.map +0 -1
- package/dist/llm/reasoning/profiles/google.js +0 -21
- package/dist/llm/reasoning/profiles/openai-compatible.cjs +0 -39
- package/dist/llm/reasoning/profiles/openai-compatible.d.ts +0 -3
- package/dist/llm/reasoning/profiles/openai-compatible.d.ts.map +0 -1
- package/dist/llm/reasoning/profiles/openai-compatible.js +0 -16
- package/dist/llm/reasoning/profiles/openai.d.ts +0 -3
- package/dist/llm/reasoning/profiles/openai.d.ts.map +0 -1
- package/dist/llm/reasoning/profiles/openai.js +0 -18
- package/dist/llm/reasoning/profiles/openrouter.cjs +0 -83
- package/dist/llm/reasoning/profiles/openrouter.d.ts +0 -10
- package/dist/llm/reasoning/profiles/openrouter.d.ts.map +0 -1
- package/dist/llm/reasoning/profiles/openrouter.js +0 -59
- package/dist/llm/reasoning/profiles/shared.cjs +0 -80
- package/dist/llm/reasoning/profiles/shared.d.ts +0 -25
- package/dist/llm/reasoning/profiles/shared.d.ts.map +0 -1
- package/dist/llm/reasoning/profiles/shared.js +0 -53
- package/dist/llm/reasoning/profiles/vertex.cjs +0 -46
- package/dist/llm/reasoning/profiles/vertex.d.ts +0 -3
- package/dist/llm/reasoning/profiles/vertex.d.ts.map +0 -1
- package/dist/llm/reasoning/profiles/vertex.js +0 -23
- package/dist/llm/registry/models.generated.cjs +0 -10741
- package/dist/llm/registry/models.generated.d.ts +0 -2945
- package/dist/llm/registry/models.generated.d.ts.map +0 -1
- package/dist/llm/registry/models.generated.js +0 -10717
- package/dist/llm/registry/models.manual.cjs +0 -44
- package/dist/llm/registry/models.manual.d.ts +0 -22
- package/dist/llm/registry/models.manual.d.ts.map +0 -1
- package/dist/llm/registry/models.manual.js +0 -21
- package/dist/llm/types.d.ts +0 -39
- package/dist/llm/types.d.ts.map +0 -1
- package/dist/llm/types.js +0 -30
- package/dist/session/history/database.cjs +0 -232
- package/dist/session/history/database.d.ts +0 -41
- package/dist/session/history/database.d.ts.map +0 -1
- package/dist/session/history/database.js +0 -209
- package/dist/session/history/factory.d.ts +0 -11
- package/dist/session/history/factory.d.ts.map +0 -1
- package/dist/session/history/factory.js +0 -8
- package/dist/session/history/memory.cjs +0 -57
- package/dist/session/history/memory.d.ts +0 -22
- package/dist/session/history/memory.d.ts.map +0 -1
- package/dist/session/history/memory.js +0 -34
- package/dist/session/history/types.d.ts +0 -26
- package/dist/session/history/types.d.ts.map +0 -1
- package/dist/session/message-queue-store.cjs +0 -75
- package/dist/session/message-queue-store.d.ts +0 -16
- package/dist/session/message-queue-store.d.ts.map +0 -1
- package/dist/session/message-queue-store.js +0 -52
- package/dist/storage/storage-manager.cjs +0 -209
- package/dist/storage/storage-manager.d.ts +0 -77
- package/dist/storage/storage-manager.d.ts.map +0 -1
- package/dist/storage/storage-manager.js +0 -186
- package/dist/tools/confirmation/allowed-tools-provider/factory.d.ts.map +0 -1
- package/dist/tools/confirmation/allowed-tools-provider/in-memory.d.ts.map +0 -1
- package/dist/tools/confirmation/allowed-tools-provider/storage.cjs +0 -69
- package/dist/tools/confirmation/allowed-tools-provider/storage.d.ts.map +0 -1
- package/dist/tools/confirmation/allowed-tools-provider/storage.js +0 -46
- package/dist/tools/confirmation/allowed-tools-provider/types.d.ts.map +0 -1
- /package/dist/{session/history → skills}/types.cjs +0 -0
- /package/dist/{session/history → skills}/types.js +0 -0
- /package/dist/{tools/confirmation/allowed-tools-provider → storage/artifacts}/types.cjs +0 -0
- /package/dist/{tools/confirmation/allowed-tools-provider → storage/artifacts}/types.js +0 -0
- /package/dist/tools/{confirmation → approval}/allowed-tools-provider/in-memory.cjs +0 -0
- /package/dist/tools/{confirmation → approval}/allowed-tools-provider/in-memory.d.ts +0 -0
- /package/dist/tools/{confirmation → approval}/allowed-tools-provider/types.d.ts +0 -0
|
@@ -0,0 +1,702 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var backend_exports = {};
|
|
20
|
+
__export(backend_exports, {
|
|
21
|
+
BackendDextoStores: () => BackendDextoStores,
|
|
22
|
+
DatabaseBackedApprovalStore: () => DatabaseBackedApprovalStore,
|
|
23
|
+
DatabaseBackedArtifactStore: () => DatabaseBackedArtifactStore,
|
|
24
|
+
DatabaseBackedCustomPromptStore: () => DatabaseBackedCustomPromptStore,
|
|
25
|
+
DatabaseBackedMemoryStore: () => DatabaseBackedMemoryStore,
|
|
26
|
+
DatabaseBackedRuntimeEventStore: () => DatabaseBackedRuntimeEventStore,
|
|
27
|
+
DatabaseBackedSessionMessageQueueStore: () => DatabaseBackedSessionMessageQueueStore,
|
|
28
|
+
DatabaseBackedSessionStore: () => DatabaseBackedSessionStore,
|
|
29
|
+
DatabaseBackedToolExecutionStore: () => DatabaseBackedToolExecutionStore,
|
|
30
|
+
DatabaseBackedToolPreferenceStore: () => DatabaseBackedToolPreferenceStore,
|
|
31
|
+
DatabaseBackedToolStateStore: () => DatabaseBackedToolStateStore,
|
|
32
|
+
DatabaseBackedWorkspaceStore: () => DatabaseBackedWorkspaceStore,
|
|
33
|
+
SESSION_FOLLOW_UP_QUEUE_KEY_PREFIX: () => SESSION_FOLLOW_UP_QUEUE_KEY_PREFIX,
|
|
34
|
+
SESSION_STEER_QUEUE_KEY_PREFIX: () => SESSION_STEER_QUEUE_KEY_PREFIX
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(backend_exports);
|
|
37
|
+
var import_schemas = require("../../approval/schemas.js");
|
|
38
|
+
var import_queue_clone = require("../../session/queue-clone.js");
|
|
39
|
+
var import_types = require("../../session/types.js");
|
|
40
|
+
var import_session_tool_preferences_store = require("../../tools/session-tool-preferences-store.js");
|
|
41
|
+
var import_types2 = require("../approvals/types.js");
|
|
42
|
+
var import_types3 = require("../tool-executions/types.js");
|
|
43
|
+
const GLOBAL_SCOPE = "global";
|
|
44
|
+
const MEMORY_KEY_PREFIX = "memory:item:";
|
|
45
|
+
const CUSTOM_PROMPT_KEY_PREFIX = "prompt:custom:";
|
|
46
|
+
const RUNTIME_EVENTS_KEY = "runtime-events";
|
|
47
|
+
const RUNTIME_EVENTS_LIMIT = 1e4;
|
|
48
|
+
const TOOL_EXECUTION_KEY_PREFIX = "tool-execution:";
|
|
49
|
+
const TOOL_STATE_KEY_PREFIX = "tool-state:";
|
|
50
|
+
const WORKSPACE_KEY_PREFIX = "workspace:item:";
|
|
51
|
+
const WORKSPACE_CURRENT_KEY = "workspace:current";
|
|
52
|
+
const SESSION_STEER_QUEUE_KEY_PREFIX = "session-steer-queue";
|
|
53
|
+
const SESSION_FOLLOW_UP_QUEUE_KEY_PREFIX = "session-follow-up-queue";
|
|
54
|
+
const DEFAULT_APPROVAL_STATE = {
|
|
55
|
+
toolPatterns: {},
|
|
56
|
+
approvedDirectories: []
|
|
57
|
+
};
|
|
58
|
+
const DEFAULT_TOOL_PREFERENCES = {
|
|
59
|
+
userAutoApproveTools: [],
|
|
60
|
+
disabledTools: []
|
|
61
|
+
};
|
|
62
|
+
class DatabaseBackedArtifactStore {
|
|
63
|
+
constructor(blobStore) {
|
|
64
|
+
this.blobStore = blobStore;
|
|
65
|
+
}
|
|
66
|
+
async store(input) {
|
|
67
|
+
const reference = await this.blobStore.store(input.data, input.metadata);
|
|
68
|
+
return this.toArtifactReference(reference);
|
|
69
|
+
}
|
|
70
|
+
async retrieve(input) {
|
|
71
|
+
const data = await this.blobStore.retrieve(input.reference, input.format);
|
|
72
|
+
return this.toArtifactData(data);
|
|
73
|
+
}
|
|
74
|
+
async exists(input) {
|
|
75
|
+
return await this.blobStore.exists(input.reference);
|
|
76
|
+
}
|
|
77
|
+
async delete(input) {
|
|
78
|
+
await this.blobStore.delete(input.reference);
|
|
79
|
+
}
|
|
80
|
+
async cleanup(input) {
|
|
81
|
+
return await this.blobStore.cleanup(input?.olderThan);
|
|
82
|
+
}
|
|
83
|
+
async getStats() {
|
|
84
|
+
const stats = await this.blobStore.getStats();
|
|
85
|
+
return {
|
|
86
|
+
count: stats.count,
|
|
87
|
+
totalSize: stats.totalSize,
|
|
88
|
+
backendType: stats.backendType,
|
|
89
|
+
storePath: stats.storePath
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
async listArtifacts() {
|
|
93
|
+
const references = await this.blobStore.listBlobs();
|
|
94
|
+
return references.map((reference) => this.toArtifactReference(reference));
|
|
95
|
+
}
|
|
96
|
+
getStoragePath() {
|
|
97
|
+
return this.blobStore.getStoragePath();
|
|
98
|
+
}
|
|
99
|
+
toArtifactReference(reference) {
|
|
100
|
+
return {
|
|
101
|
+
id: reference.id,
|
|
102
|
+
uri: reference.uri,
|
|
103
|
+
metadata: this.toArtifactMetadata(reference.metadata)
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
toArtifactData(data) {
|
|
107
|
+
switch (data.format) {
|
|
108
|
+
case "base64":
|
|
109
|
+
return {
|
|
110
|
+
format: data.format,
|
|
111
|
+
data: data.data,
|
|
112
|
+
metadata: this.toArtifactMetadata(data.metadata)
|
|
113
|
+
};
|
|
114
|
+
case "buffer":
|
|
115
|
+
return {
|
|
116
|
+
format: data.format,
|
|
117
|
+
data: data.data,
|
|
118
|
+
metadata: this.toArtifactMetadata(data.metadata)
|
|
119
|
+
};
|
|
120
|
+
case "path":
|
|
121
|
+
return {
|
|
122
|
+
format: data.format,
|
|
123
|
+
data: data.data,
|
|
124
|
+
metadata: this.toArtifactMetadata(data.metadata)
|
|
125
|
+
};
|
|
126
|
+
case "stream":
|
|
127
|
+
return {
|
|
128
|
+
format: data.format,
|
|
129
|
+
data: data.data,
|
|
130
|
+
metadata: this.toArtifactMetadata(data.metadata)
|
|
131
|
+
};
|
|
132
|
+
case "url":
|
|
133
|
+
return {
|
|
134
|
+
format: data.format,
|
|
135
|
+
data: data.data,
|
|
136
|
+
metadata: this.toArtifactMetadata(data.metadata)
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
toArtifactMetadata(metadata) {
|
|
141
|
+
return {
|
|
142
|
+
id: metadata.id,
|
|
143
|
+
mimeType: metadata.mimeType,
|
|
144
|
+
createdAt: metadata.createdAt,
|
|
145
|
+
size: metadata.size,
|
|
146
|
+
hash: metadata.hash,
|
|
147
|
+
...metadata.originalName !== void 0 ? { originalName: metadata.originalName } : {},
|
|
148
|
+
...metadata.source !== void 0 ? { source: metadata.source } : {}
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
class DatabaseBackedApprovalStore {
|
|
153
|
+
constructor(database, cache, logger) {
|
|
154
|
+
this.database = database;
|
|
155
|
+
this.cache = cache;
|
|
156
|
+
this.logger = logger;
|
|
157
|
+
}
|
|
158
|
+
async createRequest(input) {
|
|
159
|
+
const request = import_schemas.ApprovalRequestSchema.parse(input.request);
|
|
160
|
+
const key = this.requestKey(request.approvalId);
|
|
161
|
+
const stored = await this.database.setIfAbsent(key, request);
|
|
162
|
+
return import_schemas.ApprovalRequestSchema.parse(stored.value);
|
|
163
|
+
}
|
|
164
|
+
async getRequest(input) {
|
|
165
|
+
const stored = await this.database.get(this.requestKey(input.approvalId));
|
|
166
|
+
return this.parseRequest(stored);
|
|
167
|
+
}
|
|
168
|
+
async listPending(input) {
|
|
169
|
+
const keys = await this.database.list("approval-request:");
|
|
170
|
+
const pending = [];
|
|
171
|
+
for (const key of keys) {
|
|
172
|
+
const stored = await this.database.get(key);
|
|
173
|
+
const request = this.parseRequest(stored);
|
|
174
|
+
if (!request) {
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
177
|
+
if (input.sessionId !== void 0 && request.sessionId !== input.sessionId) {
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
const response = await this.getResponse({ approvalId: request.approvalId });
|
|
181
|
+
if (!response) {
|
|
182
|
+
pending.push(request);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return pending;
|
|
186
|
+
}
|
|
187
|
+
async saveResponse(input) {
|
|
188
|
+
const response = import_schemas.ApprovalResponseSchema.parse(input.response);
|
|
189
|
+
const key = this.responseKey(response.approvalId);
|
|
190
|
+
const stored = await this.database.setIfAbsent(key, response);
|
|
191
|
+
return {
|
|
192
|
+
response: import_schemas.ApprovalResponseSchema.parse(stored.value),
|
|
193
|
+
status: stored.inserted ? "created" : "replayed"
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
async getResponse(input) {
|
|
197
|
+
const stored = await this.database.get(this.responseKey(input.approvalId));
|
|
198
|
+
return this.parseResponse(stored);
|
|
199
|
+
}
|
|
200
|
+
async loadSessionState(input) {
|
|
201
|
+
const key = this.sessionStateKey(input.sessionId);
|
|
202
|
+
const cached = await this.cache.get(key);
|
|
203
|
+
if (cached !== void 0) {
|
|
204
|
+
return this.parseSessionState(cached, key);
|
|
205
|
+
}
|
|
206
|
+
const stored = await this.database.get(key);
|
|
207
|
+
if (stored === void 0) {
|
|
208
|
+
return structuredClone(DEFAULT_APPROVAL_STATE);
|
|
209
|
+
}
|
|
210
|
+
const parsed = this.parseSessionState(stored, key);
|
|
211
|
+
await this.cache.set(key, parsed, 3600);
|
|
212
|
+
return parsed;
|
|
213
|
+
}
|
|
214
|
+
async saveSessionState(input) {
|
|
215
|
+
const key = this.sessionStateKey(input.sessionId);
|
|
216
|
+
const state = import_types2.SessionApprovalStateSchema.parse(input.state);
|
|
217
|
+
await this.database.set(key, state);
|
|
218
|
+
await this.cache.set(key, state, 3600);
|
|
219
|
+
}
|
|
220
|
+
async deleteSessionState(input) {
|
|
221
|
+
const key = this.sessionStateKey(input.sessionId);
|
|
222
|
+
await Promise.all([this.database.delete(key), this.cache.delete(key)]);
|
|
223
|
+
}
|
|
224
|
+
parseRequest(value) {
|
|
225
|
+
const result = import_schemas.ApprovalRequestSchema.safeParse(value);
|
|
226
|
+
return result.success ? result.data : void 0;
|
|
227
|
+
}
|
|
228
|
+
parseResponse(value) {
|
|
229
|
+
const result = import_schemas.ApprovalResponseSchema.safeParse(value);
|
|
230
|
+
return result.success ? result.data : void 0;
|
|
231
|
+
}
|
|
232
|
+
parseSessionState(value, key) {
|
|
233
|
+
const result = import_types2.SessionApprovalStateSchema.safeParse(value);
|
|
234
|
+
if (result.success) {
|
|
235
|
+
return result.data;
|
|
236
|
+
}
|
|
237
|
+
this.logger.warn("Invalid persisted approval state encountered; using defaults", {
|
|
238
|
+
key,
|
|
239
|
+
error: result.error.message
|
|
240
|
+
});
|
|
241
|
+
return structuredClone(DEFAULT_APPROVAL_STATE);
|
|
242
|
+
}
|
|
243
|
+
requestKey(approvalId) {
|
|
244
|
+
return `approval-request:${approvalId}`;
|
|
245
|
+
}
|
|
246
|
+
responseKey(approvalId) {
|
|
247
|
+
return `approval-response:${approvalId}`;
|
|
248
|
+
}
|
|
249
|
+
sessionStateKey(sessionId) {
|
|
250
|
+
return sessionId ? `session-approvals:${sessionId}` : "session-approvals:global";
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
class DatabaseBackedSessionStore {
|
|
254
|
+
constructor(database, cache) {
|
|
255
|
+
this.database = database;
|
|
256
|
+
this.cache = cache;
|
|
257
|
+
}
|
|
258
|
+
async listSessionIds() {
|
|
259
|
+
const keys = await this.database.list("session:");
|
|
260
|
+
return keys.map((key) => key.replace("session:", ""));
|
|
261
|
+
}
|
|
262
|
+
async getSession(input) {
|
|
263
|
+
const key = this.key(input.sessionId);
|
|
264
|
+
const cached = await this.cache.get(key);
|
|
265
|
+
if (cached !== void 0) {
|
|
266
|
+
return structuredClone(cached);
|
|
267
|
+
}
|
|
268
|
+
const session = await this.database.get(key);
|
|
269
|
+
return session ? structuredClone(session) : void 0;
|
|
270
|
+
}
|
|
271
|
+
async saveSession(input) {
|
|
272
|
+
const key = this.key(input.sessionId);
|
|
273
|
+
await this.database.set(key, input.session);
|
|
274
|
+
await this.cache.set(key, input.session, input.ttlSeconds);
|
|
275
|
+
}
|
|
276
|
+
async deleteSession(input) {
|
|
277
|
+
const key = this.key(input.sessionId);
|
|
278
|
+
await Promise.all([this.database.delete(key), this.cache.delete(key)]);
|
|
279
|
+
}
|
|
280
|
+
async evictSession(input) {
|
|
281
|
+
await this.cache.delete(this.key(input.sessionId));
|
|
282
|
+
}
|
|
283
|
+
key(sessionId) {
|
|
284
|
+
return `session:${sessionId}`;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
class DatabaseBackedMemoryStore {
|
|
288
|
+
constructor(database) {
|
|
289
|
+
this.database = database;
|
|
290
|
+
}
|
|
291
|
+
async create(input) {
|
|
292
|
+
await this.database.set(this.key(input.memory.id), input.memory);
|
|
293
|
+
}
|
|
294
|
+
async get(input) {
|
|
295
|
+
return await this.database.get(this.key(input.id));
|
|
296
|
+
}
|
|
297
|
+
async update(input) {
|
|
298
|
+
await this.database.set(this.key(input.memory.id), input.memory);
|
|
299
|
+
}
|
|
300
|
+
async delete(input) {
|
|
301
|
+
await this.database.delete(this.key(input.id));
|
|
302
|
+
}
|
|
303
|
+
async list() {
|
|
304
|
+
const keys = await this.database.list(MEMORY_KEY_PREFIX);
|
|
305
|
+
const memories = [];
|
|
306
|
+
for (const key of keys) {
|
|
307
|
+
const memory = await this.database.get(key);
|
|
308
|
+
if (memory) {
|
|
309
|
+
memories.push(memory);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
return memories;
|
|
313
|
+
}
|
|
314
|
+
key(id) {
|
|
315
|
+
return `${MEMORY_KEY_PREFIX}${id}`;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
class DatabaseBackedWorkspaceStore {
|
|
319
|
+
constructor(database) {
|
|
320
|
+
this.database = database;
|
|
321
|
+
}
|
|
322
|
+
async saveWorkspace(input) {
|
|
323
|
+
await this.database.set(this.key(input.workspace.id), input.workspace);
|
|
324
|
+
}
|
|
325
|
+
async getWorkspace(input) {
|
|
326
|
+
return await this.database.get(this.key(input.id));
|
|
327
|
+
}
|
|
328
|
+
async findWorkspaceByPath(input) {
|
|
329
|
+
const workspaces = await this.listWorkspaces();
|
|
330
|
+
return workspaces.find((workspace) => workspace.path === input.path);
|
|
331
|
+
}
|
|
332
|
+
async listWorkspaces() {
|
|
333
|
+
const keys = await this.database.list(WORKSPACE_KEY_PREFIX);
|
|
334
|
+
const workspaces = [];
|
|
335
|
+
for (const key of keys) {
|
|
336
|
+
const workspace = await this.database.get(key);
|
|
337
|
+
if (workspace) {
|
|
338
|
+
workspaces.push(workspace);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
return workspaces;
|
|
342
|
+
}
|
|
343
|
+
async setCurrentWorkspace(input) {
|
|
344
|
+
await this.database.set(WORKSPACE_CURRENT_KEY, input.id);
|
|
345
|
+
}
|
|
346
|
+
async getCurrentWorkspaceId() {
|
|
347
|
+
return await this.database.get(WORKSPACE_CURRENT_KEY);
|
|
348
|
+
}
|
|
349
|
+
async clearCurrentWorkspace() {
|
|
350
|
+
await this.database.delete(WORKSPACE_CURRENT_KEY);
|
|
351
|
+
}
|
|
352
|
+
key(id) {
|
|
353
|
+
return `${WORKSPACE_KEY_PREFIX}${id}`;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
class DatabaseBackedToolPreferenceStore {
|
|
357
|
+
constructor(database, cache, logger) {
|
|
358
|
+
this.database = database;
|
|
359
|
+
this.cache = cache;
|
|
360
|
+
this.logger = logger;
|
|
361
|
+
}
|
|
362
|
+
async allowTool(input) {
|
|
363
|
+
const tools = await this.listAllowedTools(this.scope(input.sessionId));
|
|
364
|
+
if (tools.includes(input.toolName)) {
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
await this.database.set(this.allowedToolsKey(input.sessionId), [...tools, input.toolName]);
|
|
368
|
+
}
|
|
369
|
+
async disallowTool(input) {
|
|
370
|
+
const tools = await this.listAllowedTools(this.scope(input.sessionId));
|
|
371
|
+
await this.database.set(
|
|
372
|
+
this.allowedToolsKey(input.sessionId),
|
|
373
|
+
tools.filter((toolName) => toolName !== input.toolName)
|
|
374
|
+
);
|
|
375
|
+
}
|
|
376
|
+
async isToolAllowed(input) {
|
|
377
|
+
const sessionTools = await this.listAllowedTools(this.scope(input.sessionId));
|
|
378
|
+
if (sessionTools.includes(input.toolName)) {
|
|
379
|
+
return true;
|
|
380
|
+
}
|
|
381
|
+
const globalTools = await this.listAllowedTools({});
|
|
382
|
+
return globalTools.includes(input.toolName);
|
|
383
|
+
}
|
|
384
|
+
async listAllowedTools(input) {
|
|
385
|
+
const stored = await this.database.get(this.allowedToolsKey(input.sessionId));
|
|
386
|
+
return Array.isArray(stored) ? stored.filter((value) => typeof value === "string") : [];
|
|
387
|
+
}
|
|
388
|
+
async loadSessionPreferences(input) {
|
|
389
|
+
const key = this.sessionPreferencesKey(input.sessionId);
|
|
390
|
+
const cached = await this.cache.get(key);
|
|
391
|
+
if (cached !== void 0) {
|
|
392
|
+
return this.parsePreferences(cached, key);
|
|
393
|
+
}
|
|
394
|
+
const stored = await this.database.get(key);
|
|
395
|
+
if (stored === void 0) {
|
|
396
|
+
return structuredClone(DEFAULT_TOOL_PREFERENCES);
|
|
397
|
+
}
|
|
398
|
+
const parsed = this.parsePreferences(stored, key);
|
|
399
|
+
await this.cache.set(key, parsed, 3600);
|
|
400
|
+
return parsed;
|
|
401
|
+
}
|
|
402
|
+
async saveSessionPreferences(input) {
|
|
403
|
+
const key = this.sessionPreferencesKey(input.sessionId);
|
|
404
|
+
const preferences = import_session_tool_preferences_store.SessionToolPreferencesSchema.parse(input.preferences);
|
|
405
|
+
await this.database.set(key, preferences);
|
|
406
|
+
await this.cache.set(key, preferences, 3600);
|
|
407
|
+
}
|
|
408
|
+
async deleteSessionPreferences(input) {
|
|
409
|
+
const key = this.sessionPreferencesKey(input.sessionId);
|
|
410
|
+
await Promise.all([this.database.delete(key), this.cache.delete(key)]);
|
|
411
|
+
}
|
|
412
|
+
parsePreferences(value, key) {
|
|
413
|
+
const result = import_session_tool_preferences_store.SessionToolPreferencesSchema.safeParse(value);
|
|
414
|
+
if (result.success) {
|
|
415
|
+
return result.data;
|
|
416
|
+
}
|
|
417
|
+
this.logger.warn("Invalid persisted session tool preferences encountered; using defaults", {
|
|
418
|
+
key,
|
|
419
|
+
error: result.error.message
|
|
420
|
+
});
|
|
421
|
+
return structuredClone(DEFAULT_TOOL_PREFERENCES);
|
|
422
|
+
}
|
|
423
|
+
allowedToolsKey(sessionId) {
|
|
424
|
+
return sessionId ? `allowedTools:${sessionId}` : `allowedTools:${GLOBAL_SCOPE}`;
|
|
425
|
+
}
|
|
426
|
+
scope(sessionId) {
|
|
427
|
+
return sessionId === void 0 ? {} : { sessionId };
|
|
428
|
+
}
|
|
429
|
+
sessionPreferencesKey(sessionId) {
|
|
430
|
+
return `session-tool-preferences:${sessionId}`;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
class DatabaseBackedSessionMessageQueueStore {
|
|
434
|
+
constructor(database, cache, logger, keyPrefix) {
|
|
435
|
+
this.database = database;
|
|
436
|
+
this.cache = cache;
|
|
437
|
+
this.logger = logger;
|
|
438
|
+
this.keyPrefix = keyPrefix;
|
|
439
|
+
}
|
|
440
|
+
async listSessionIds() {
|
|
441
|
+
const prefix = `${this.keyPrefix}:`;
|
|
442
|
+
const keys = await this.database.list(prefix);
|
|
443
|
+
return keys.map((key) => key.replace(prefix, ""));
|
|
444
|
+
}
|
|
445
|
+
async load(input) {
|
|
446
|
+
const key = this.key(input.sessionId);
|
|
447
|
+
const cached = await this.cache.get(key);
|
|
448
|
+
const cachedQueue = import_types.QueuedMessagesSchema.safeParse(cached);
|
|
449
|
+
if (cachedQueue.success) {
|
|
450
|
+
return (0, import_queue_clone.cloneQueuedMessages)(cachedQueue.data);
|
|
451
|
+
}
|
|
452
|
+
const stored = await this.database.get(key);
|
|
453
|
+
const storedQueue = import_types.QueuedMessagesSchema.safeParse(stored);
|
|
454
|
+
if (!storedQueue.success) {
|
|
455
|
+
if (stored !== void 0) {
|
|
456
|
+
this.logger.warn("Invalid persisted message queue encountered; ignoring state", {
|
|
457
|
+
key
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
return [];
|
|
461
|
+
}
|
|
462
|
+
const queue = (0, import_queue_clone.cloneQueuedMessages)(storedQueue.data);
|
|
463
|
+
await this.cache.set(key, queue, 3600);
|
|
464
|
+
return (0, import_queue_clone.cloneQueuedMessages)(queue);
|
|
465
|
+
}
|
|
466
|
+
async save(input) {
|
|
467
|
+
const key = this.key(input.sessionId);
|
|
468
|
+
if (input.queue.length === 0) {
|
|
469
|
+
await this.delete({ sessionId: input.sessionId });
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
const queue = (0, import_queue_clone.cloneQueuedMessages)(input.queue);
|
|
473
|
+
await this.database.set(key, queue);
|
|
474
|
+
await this.cache.set(key, queue, 3600);
|
|
475
|
+
}
|
|
476
|
+
async delete(input) {
|
|
477
|
+
const key = this.key(input.sessionId);
|
|
478
|
+
await Promise.all([this.database.delete(key), this.cache.delete(key)]);
|
|
479
|
+
}
|
|
480
|
+
key(sessionId) {
|
|
481
|
+
return `${this.keyPrefix}:${sessionId}`;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
class DatabaseBackedCustomPromptStore {
|
|
485
|
+
constructor(database) {
|
|
486
|
+
this.database = database;
|
|
487
|
+
}
|
|
488
|
+
async save(input) {
|
|
489
|
+
await this.database.set(this.key(input.prompt.name), input.prompt);
|
|
490
|
+
}
|
|
491
|
+
async get(input) {
|
|
492
|
+
return await this.database.get(this.key(input.name));
|
|
493
|
+
}
|
|
494
|
+
async delete(input) {
|
|
495
|
+
await this.database.delete(this.key(input.name));
|
|
496
|
+
}
|
|
497
|
+
async list() {
|
|
498
|
+
const keys = await this.database.list(CUSTOM_PROMPT_KEY_PREFIX);
|
|
499
|
+
const prompts = [];
|
|
500
|
+
for (const key of keys) {
|
|
501
|
+
const prompt = await this.database.get(key);
|
|
502
|
+
if (prompt) {
|
|
503
|
+
prompts.push(prompt);
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
return prompts;
|
|
507
|
+
}
|
|
508
|
+
key(name) {
|
|
509
|
+
return `${CUSTOM_PROMPT_KEY_PREFIX}${name}`;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
class DatabaseBackedRuntimeEventStore {
|
|
513
|
+
constructor(database) {
|
|
514
|
+
this.database = database;
|
|
515
|
+
}
|
|
516
|
+
async append(input) {
|
|
517
|
+
await this.database.append(RUNTIME_EVENTS_KEY, structuredClone(input.event));
|
|
518
|
+
}
|
|
519
|
+
async list(input) {
|
|
520
|
+
const events = await this.database.getRange(
|
|
521
|
+
RUNTIME_EVENTS_KEY,
|
|
522
|
+
0,
|
|
523
|
+
RUNTIME_EVENTS_LIMIT
|
|
524
|
+
);
|
|
525
|
+
const filtered = events.filter((event) => {
|
|
526
|
+
if (input.sessionId !== void 0 && event.sessionId !== input.sessionId) {
|
|
527
|
+
return false;
|
|
528
|
+
}
|
|
529
|
+
if (input.runId !== void 0 && event.runId !== input.runId) {
|
|
530
|
+
return false;
|
|
531
|
+
}
|
|
532
|
+
return true;
|
|
533
|
+
});
|
|
534
|
+
return structuredClone(input.limit === void 0 ? filtered : filtered.slice(-input.limit));
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
class DatabaseBackedToolStateStore {
|
|
538
|
+
constructor(database) {
|
|
539
|
+
this.database = database;
|
|
540
|
+
}
|
|
541
|
+
async get(input) {
|
|
542
|
+
return await this.database.get(this.toKey(input));
|
|
543
|
+
}
|
|
544
|
+
async set(input) {
|
|
545
|
+
await this.database.set(this.toKey(input), input.value);
|
|
546
|
+
}
|
|
547
|
+
async delete(input) {
|
|
548
|
+
await this.database.delete(this.toKey(input));
|
|
549
|
+
}
|
|
550
|
+
async listKeys(input) {
|
|
551
|
+
const prefix = this.toKey({ toolName: input.toolName, key: input.prefix ?? "" });
|
|
552
|
+
return (await this.database.list(prefix)).map(
|
|
553
|
+
(key) => key.slice(this.scopePrefix(input.toolName).length)
|
|
554
|
+
);
|
|
555
|
+
}
|
|
556
|
+
toKey(input) {
|
|
557
|
+
return `${this.scopePrefix(input.toolName)}${input.key}`;
|
|
558
|
+
}
|
|
559
|
+
scopePrefix(toolName) {
|
|
560
|
+
return `${TOOL_STATE_KEY_PREFIX}${toolName}:`;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
class DatabaseBackedToolExecutionStore {
|
|
564
|
+
constructor(database) {
|
|
565
|
+
this.database = database;
|
|
566
|
+
}
|
|
567
|
+
async get(input) {
|
|
568
|
+
const stored = await this.database.get(this.toKey(input.executionId));
|
|
569
|
+
return stored === void 0 ? void 0 : import_types3.ToolExecutionRecordSchema.parse(stored);
|
|
570
|
+
}
|
|
571
|
+
async start(input) {
|
|
572
|
+
const parsed = import_types3.ToolExecutionRunningRecordSchema.parse(input.record);
|
|
573
|
+
const stored = await this.database.setIfAbsent(
|
|
574
|
+
this.toKey(parsed.executionId),
|
|
575
|
+
parsed
|
|
576
|
+
);
|
|
577
|
+
const record = import_types3.ToolExecutionRecordSchema.parse(stored.value);
|
|
578
|
+
return stored.inserted ? { status: "started", record: parsed } : { status: "existing", record };
|
|
579
|
+
}
|
|
580
|
+
async complete(input) {
|
|
581
|
+
const existing = await this.requireRecord(input.executionId);
|
|
582
|
+
if (existing.status === "completed") {
|
|
583
|
+
return existing;
|
|
584
|
+
}
|
|
585
|
+
if (existing.status !== "running") {
|
|
586
|
+
throw new Error(`Tool execution is already ${existing.status}: ${input.executionId}`);
|
|
587
|
+
}
|
|
588
|
+
const resultParts = (0, import_types3.splitToolExecutionResult)(input.result);
|
|
589
|
+
const record = import_types3.ToolExecutionCompletedRecordSchema.parse({
|
|
590
|
+
...existing,
|
|
591
|
+
status: "completed",
|
|
592
|
+
completedAt: input.completedAt,
|
|
593
|
+
updatedAt: input.completedAt,
|
|
594
|
+
...resultParts
|
|
595
|
+
});
|
|
596
|
+
await this.database.set(this.toKey(input.executionId), record);
|
|
597
|
+
return record;
|
|
598
|
+
}
|
|
599
|
+
async fail(input) {
|
|
600
|
+
const existing = await this.requireRecord(input.executionId);
|
|
601
|
+
if (existing.status === "failed") {
|
|
602
|
+
return existing;
|
|
603
|
+
}
|
|
604
|
+
if (existing.status !== "running") {
|
|
605
|
+
throw new Error(`Tool execution is already ${existing.status}: ${input.executionId}`);
|
|
606
|
+
}
|
|
607
|
+
const record = import_types3.ToolExecutionFailedRecordSchema.parse({
|
|
608
|
+
...existing,
|
|
609
|
+
status: "failed",
|
|
610
|
+
completedAt: input.completedAt,
|
|
611
|
+
updatedAt: input.completedAt,
|
|
612
|
+
error: input.error
|
|
613
|
+
});
|
|
614
|
+
await this.database.set(this.toKey(input.executionId), record);
|
|
615
|
+
return record;
|
|
616
|
+
}
|
|
617
|
+
async cancel(input) {
|
|
618
|
+
const existing = await this.requireRecord(input.executionId);
|
|
619
|
+
if (existing.status === "cancelled") {
|
|
620
|
+
return existing;
|
|
621
|
+
}
|
|
622
|
+
if (existing.status !== "running") {
|
|
623
|
+
throw new Error(`Tool execution is already ${existing.status}: ${input.executionId}`);
|
|
624
|
+
}
|
|
625
|
+
const record = import_types3.ToolExecutionCancelledRecordSchema.parse({
|
|
626
|
+
...existing,
|
|
627
|
+
status: "cancelled",
|
|
628
|
+
completedAt: input.completedAt,
|
|
629
|
+
updatedAt: input.completedAt,
|
|
630
|
+
...input.reason !== void 0 ? { reason: input.reason } : {}
|
|
631
|
+
});
|
|
632
|
+
await this.database.set(this.toKey(input.executionId), record);
|
|
633
|
+
return record;
|
|
634
|
+
}
|
|
635
|
+
async requireRecord(executionId) {
|
|
636
|
+
const existing = await this.get({ executionId });
|
|
637
|
+
if (existing === void 0) {
|
|
638
|
+
throw new Error(`Tool execution record not found: ${executionId}`);
|
|
639
|
+
}
|
|
640
|
+
return existing;
|
|
641
|
+
}
|
|
642
|
+
toKey(executionId) {
|
|
643
|
+
return `${TOOL_EXECUTION_KEY_PREFIX}${executionId}`;
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
const NOOP_LIFECYCLE = {
|
|
647
|
+
async connect() {
|
|
648
|
+
},
|
|
649
|
+
async disconnect() {
|
|
650
|
+
},
|
|
651
|
+
isConnected() {
|
|
652
|
+
return true;
|
|
653
|
+
}
|
|
654
|
+
};
|
|
655
|
+
class BackendDextoStores {
|
|
656
|
+
constructor(stores, lifecycle = NOOP_LIFECYCLE, storeType = "backend") {
|
|
657
|
+
this.stores = stores;
|
|
658
|
+
this.lifecycle = lifecycle;
|
|
659
|
+
this.storeType = storeType;
|
|
660
|
+
}
|
|
661
|
+
connected = false;
|
|
662
|
+
getStore(name) {
|
|
663
|
+
return this.stores[name];
|
|
664
|
+
}
|
|
665
|
+
async connect() {
|
|
666
|
+
if (this.connected) {
|
|
667
|
+
return;
|
|
668
|
+
}
|
|
669
|
+
await this.lifecycle.connect();
|
|
670
|
+
this.connected = true;
|
|
671
|
+
}
|
|
672
|
+
async disconnect() {
|
|
673
|
+
if (!this.connected) {
|
|
674
|
+
return;
|
|
675
|
+
}
|
|
676
|
+
await this.lifecycle.disconnect();
|
|
677
|
+
this.connected = false;
|
|
678
|
+
}
|
|
679
|
+
isConnected() {
|
|
680
|
+
return this.connected && this.lifecycle.isConnected();
|
|
681
|
+
}
|
|
682
|
+
getStoreType() {
|
|
683
|
+
return this.storeType;
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
687
|
+
0 && (module.exports = {
|
|
688
|
+
BackendDextoStores,
|
|
689
|
+
DatabaseBackedApprovalStore,
|
|
690
|
+
DatabaseBackedArtifactStore,
|
|
691
|
+
DatabaseBackedCustomPromptStore,
|
|
692
|
+
DatabaseBackedMemoryStore,
|
|
693
|
+
DatabaseBackedRuntimeEventStore,
|
|
694
|
+
DatabaseBackedSessionMessageQueueStore,
|
|
695
|
+
DatabaseBackedSessionStore,
|
|
696
|
+
DatabaseBackedToolExecutionStore,
|
|
697
|
+
DatabaseBackedToolPreferenceStore,
|
|
698
|
+
DatabaseBackedToolStateStore,
|
|
699
|
+
DatabaseBackedWorkspaceStore,
|
|
700
|
+
SESSION_FOLLOW_UP_QUEUE_KEY_PREFIX,
|
|
701
|
+
SESSION_STEER_QUEUE_KEY_PREFIX
|
|
702
|
+
});
|