@dexto/core 1.5.8 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -8
- package/dist/agent/DextoAgent.cjs +293 -154
- package/dist/agent/DextoAgent.d.ts +83 -56
- package/dist/agent/DextoAgent.d.ts.map +1 -1
- package/dist/agent/DextoAgent.js +290 -151
- package/dist/{context/compaction/provider.cjs → agent/agent-options.cjs} +2 -2
- package/dist/agent/agent-options.d.ts +53 -0
- package/dist/agent/agent-options.d.ts.map +1 -0
- package/dist/agent/agentCard.cjs +1 -1
- package/dist/agent/errors.cjs +2 -2
- package/dist/agent/errors.d.ts.map +1 -1
- package/dist/agent/index.cjs +1 -6
- package/dist/agent/index.d.ts +3 -2
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +1 -7
- package/dist/{storage/blob/provider.cjs → agent/runtime-config.cjs} +2 -2
- package/dist/agent/runtime-config.d.ts +53 -0
- package/dist/agent/runtime-config.d.ts.map +1 -0
- package/dist/agent/schemas.cjs +2 -104
- package/dist/agent/schemas.d.ts +10 -9199
- package/dist/agent/schemas.d.ts.map +1 -1
- package/dist/agent/schemas.js +1 -109
- package/dist/agent/state-manager.d.ts +5 -5
- package/dist/agent/state-manager.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 +1 -1
- package/dist/approval/errors.cjs +5 -5
- package/dist/approval/errors.d.ts +2 -2
- package/dist/approval/errors.d.ts.map +1 -1
- package/dist/approval/errors.js +5 -5
- package/dist/approval/index.cjs +8 -8
- package/dist/approval/index.d.ts +2 -2
- package/dist/approval/index.d.ts.map +1 -1
- package/dist/approval/index.js +8 -8
- package/dist/approval/manager.cjs +77 -57
- package/dist/approval/manager.d.ts +41 -43
- package/dist/approval/manager.d.ts.map +1 -1
- package/dist/approval/manager.js +75 -55
- package/dist/approval/schemas.cjs +26 -25
- package/dist/approval/schemas.d.ts +35 -15
- package/dist/approval/schemas.d.ts.map +1 -1
- package/dist/approval/schemas.js +22 -21
- package/dist/approval/types.cjs +1 -1
- package/dist/approval/types.d.ts +14 -14
- package/dist/approval/types.d.ts.map +1 -1
- package/dist/approval/types.js +1 -1
- package/dist/context/compaction/index.cjs +2 -23
- package/dist/context/compaction/index.d.ts +1 -7
- package/dist/context/compaction/index.d.ts.map +1 -1
- package/dist/context/compaction/index.js +1 -16
- package/dist/context/compaction/strategies/noop.cjs +19 -1
- package/dist/context/compaction/strategies/noop.d.ts +13 -3
- package/dist/context/compaction/strategies/noop.d.ts.map +1 -1
- package/dist/context/compaction/strategies/noop.js +19 -1
- package/dist/context/compaction/strategies/{reactive-overflow.cjs → reactive-overflow-compaction.cjs} +67 -64
- package/dist/context/compaction/strategies/{reactive-overflow.d.ts → reactive-overflow-compaction.d.ts} +19 -36
- package/dist/context/compaction/strategies/reactive-overflow-compaction.d.ts.map +1 -0
- package/dist/context/compaction/strategies/{reactive-overflow.js → reactive-overflow-compaction.js} +63 -60
- package/dist/context/compaction/types.d.ts +40 -8
- package/dist/context/compaction/types.d.ts.map +1 -1
- package/dist/context/manager.cjs +4 -2
- package/dist/context/manager.d.ts +4 -3
- package/dist/context/manager.d.ts.map +1 -1
- package/dist/context/manager.js +4 -2
- package/dist/context/types.d.ts +2 -0
- package/dist/context/types.d.ts.map +1 -1
- package/dist/context/utils.cjs +2 -2
- package/dist/context/utils.d.ts +14 -14
- package/dist/context/utils.d.ts.map +1 -1
- package/dist/errors/result-bridge.d.ts +2 -2
- package/dist/errors/result-bridge.d.ts.map +1 -1
- package/dist/errors/types.cjs +1 -1
- package/dist/errors/types.d.ts +3 -3
- package/dist/errors/types.d.ts.map +1 -1
- package/dist/errors/types.js +1 -1
- package/dist/events/index.cjs +11 -1
- package/dist/events/index.d.ts +43 -7
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +11 -1
- package/dist/{plugins → hooks}/builtins/content-policy.cjs +7 -6
- package/dist/hooks/builtins/content-policy.d.ts +24 -0
- package/dist/hooks/builtins/content-policy.d.ts.map +1 -0
- package/dist/{plugins → hooks}/builtins/content-policy.js +6 -5
- package/dist/{plugins → hooks}/builtins/response-sanitizer.cjs +3 -3
- package/dist/hooks/builtins/response-sanitizer.d.ts +22 -0
- package/dist/hooks/builtins/response-sanitizer.d.ts.map +1 -0
- package/dist/{plugins → hooks}/builtins/response-sanitizer.js +2 -2
- package/dist/hooks/error-codes.cjs +43 -0
- package/dist/hooks/error-codes.d.ts +34 -0
- package/dist/hooks/error-codes.d.ts.map +1 -0
- package/dist/hooks/error-codes.js +20 -0
- package/dist/{storage/cache/providers/memory.cjs → hooks/index.cjs} +15 -18
- package/dist/hooks/index.d.ts +14 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +11 -0
- package/dist/hooks/manager.cjs +354 -0
- package/dist/hooks/manager.d.ts +103 -0
- package/dist/hooks/manager.d.ts.map +1 -0
- package/dist/hooks/manager.js +331 -0
- package/dist/{plugins → hooks}/types.d.ts +36 -34
- package/dist/hooks/types.d.ts.map +1 -0
- package/dist/index.browser.cjs +13 -12
- package/dist/index.browser.d.ts +5 -5
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.browser.js +8 -7
- package/dist/index.cjs +5 -7
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -3
- package/dist/llm/errors.cjs +1 -1
- package/dist/llm/executor/stream-processor.cjs +131 -11
- package/dist/llm/executor/stream-processor.d.ts +7 -5
- package/dist/llm/executor/stream-processor.d.ts.map +1 -1
- package/dist/llm/executor/stream-processor.js +131 -11
- package/dist/llm/executor/turn-executor.cjs +49 -54
- package/dist/llm/executor/turn-executor.d.ts +7 -8
- package/dist/llm/executor/turn-executor.d.ts.map +1 -1
- package/dist/llm/executor/turn-executor.js +49 -54
- package/dist/llm/formatters/vercel.cjs +2 -2
- package/dist/llm/formatters/vercel.d.ts +2 -2
- package/dist/llm/formatters/vercel.d.ts.map +1 -1
- package/dist/llm/providers/local/schemas.d.ts +10 -10
- package/dist/llm/registry/auto-update.d.ts +2 -2
- package/dist/llm/registry/auto-update.d.ts.map +1 -1
- package/dist/llm/registry/index.d.ts +3 -3
- package/dist/llm/registry/index.d.ts.map +1 -1
- package/dist/llm/resolver.cjs +2 -2
- package/dist/llm/resolver.d.ts +4 -4
- package/dist/llm/resolver.d.ts.map +1 -1
- package/dist/llm/schemas.cjs +67 -104
- package/dist/llm/schemas.d.ts +6 -145
- package/dist/llm/schemas.d.ts.map +1 -1
- package/dist/llm/schemas.js +64 -101
- package/dist/llm/services/factory.cjs +2 -3
- package/dist/llm/services/factory.d.ts +3 -4
- package/dist/llm/services/factory.d.ts.map +1 -1
- package/dist/llm/services/factory.js +2 -3
- package/dist/llm/services/vercel.cjs +7 -14
- package/dist/llm/services/vercel.d.ts +6 -7
- package/dist/llm/services/vercel.d.ts.map +1 -1
- package/dist/llm/services/vercel.js +7 -14
- package/dist/llm/validation.cjs +1 -1
- package/dist/llm/validation.d.ts +2 -2
- package/dist/llm/validation.d.ts.map +1 -1
- package/dist/logger/browser.cjs +4 -4
- package/dist/logger/browser.d.ts +4 -4
- package/dist/logger/browser.d.ts.map +1 -1
- package/dist/logger/browser.js +3 -3
- package/dist/{context/compaction/providers/noop-provider.cjs → logger/default-logger-factory.cjs} +16 -22
- package/dist/logger/default-logger-factory.d.ts +301 -0
- package/dist/logger/default-logger-factory.d.ts.map +1 -0
- package/dist/logger/default-logger-factory.js +18 -0
- package/dist/logger/factory.d.ts +2 -2
- package/dist/logger/factory.d.ts.map +1 -1
- package/dist/logger/index.cjs +7 -2
- package/dist/logger/index.d.ts +5 -3
- package/dist/logger/index.d.ts.map +1 -1
- package/dist/logger/index.js +8 -2
- package/dist/logger/logger.cjs +4 -4
- package/dist/logger/logger.d.ts +4 -4
- package/dist/logger/logger.d.ts.map +1 -1
- package/dist/logger/logger.js +3 -3
- package/dist/logger/v2/dexto-logger.d.ts +3 -3
- package/dist/logger/v2/dexto-logger.d.ts.map +1 -1
- package/dist/logger/v2/schemas.d.ts +12 -12
- package/dist/logger/v2/test-utils.d.ts +5 -5
- package/dist/logger/v2/test-utils.d.ts.map +1 -1
- package/dist/logger/v2/transport-factory.d.ts +3 -3
- package/dist/logger/v2/transport-factory.d.ts.map +1 -1
- package/dist/logger/v2/transports/console-transport.d.ts +2 -2
- package/dist/logger/v2/transports/console-transport.d.ts.map +1 -1
- package/dist/logger/v2/transports/file-transport.d.ts +2 -2
- package/dist/logger/v2/transports/file-transport.d.ts.map +1 -1
- package/dist/logger/v2/transports/silent-transport.d.ts +2 -2
- package/dist/logger/v2/transports/silent-transport.d.ts.map +1 -1
- package/dist/logger/v2/types.cjs +1 -1
- package/dist/logger/v2/types.d.ts +8 -8
- package/dist/logger/v2/types.d.ts.map +1 -1
- package/dist/logger/v2/types.js +1 -1
- package/dist/mcp/errors.cjs +2 -2
- package/dist/mcp/errors.d.ts.map +1 -1
- package/dist/mcp/manager.cjs +16 -11
- package/dist/mcp/manager.d.ts +16 -13
- package/dist/mcp/manager.d.ts.map +1 -1
- package/dist/mcp/manager.js +17 -12
- package/dist/mcp/mcp-client.cjs +25 -20
- package/dist/mcp/mcp-client.d.ts +5 -5
- package/dist/mcp/mcp-client.d.ts.map +1 -1
- package/dist/mcp/mcp-client.js +20 -15
- package/dist/mcp/resolver.cjs +1 -1
- package/dist/mcp/schemas.cjs +5 -5
- package/dist/mcp/schemas.d.ts +4 -4
- package/dist/mcp/schemas.js +2 -2
- package/dist/mcp/types.d.ts +7 -7
- package/dist/mcp/types.d.ts.map +1 -1
- package/dist/memory/manager.d.ts +2 -2
- package/dist/memory/manager.d.ts.map +1 -1
- package/dist/memory/schemas.d.ts +2 -2
- package/dist/prompts/errors.cjs +3 -3
- package/dist/prompts/errors.d.ts.map +1 -1
- package/dist/prompts/prompt-manager.d.ts +3 -3
- package/dist/prompts/prompt-manager.d.ts.map +1 -1
- package/dist/prompts/providers/config-prompt-provider.cjs +15 -29
- package/dist/prompts/providers/config-prompt-provider.d.ts +3 -3
- package/dist/prompts/providers/config-prompt-provider.d.ts.map +1 -1
- package/dist/prompts/providers/config-prompt-provider.js +15 -29
- package/dist/prompts/providers/custom-prompt-provider.d.ts +2 -2
- package/dist/prompts/providers/custom-prompt-provider.d.ts.map +1 -1
- package/dist/prompts/providers/mcp-prompt-provider.d.ts +2 -2
- package/dist/prompts/providers/mcp-prompt-provider.d.ts.map +1 -1
- package/dist/prompts/schemas.d.ts +4 -4
- package/dist/resources/{internal-provider.cjs → agent-resources-provider.cjs} +16 -16
- package/dist/resources/{internal-provider.d.ts → agent-resources-provider.d.ts} +6 -6
- package/dist/resources/agent-resources-provider.d.ts.map +1 -0
- package/dist/resources/{internal-provider.js → agent-resources-provider.js} +13 -13
- package/dist/resources/errors.cjs +2 -2
- package/dist/resources/errors.d.ts.map +1 -1
- package/dist/resources/handlers/blob-handler.d.ts +2 -2
- package/dist/resources/handlers/blob-handler.d.ts.map +1 -1
- package/dist/resources/handlers/factory.d.ts +3 -3
- package/dist/resources/handlers/factory.d.ts.map +1 -1
- package/dist/resources/handlers/filesystem-handler.d.ts +2 -2
- package/dist/resources/handlers/filesystem-handler.d.ts.map +1 -1
- package/dist/resources/index.cjs +7 -9
- package/dist/resources/index.d.ts +3 -3
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +5 -10
- package/dist/resources/manager.cjs +77 -74
- package/dist/resources/manager.d.ts +16 -7
- package/dist/resources/manager.d.ts.map +1 -1
- package/dist/resources/manager.js +77 -74
- package/dist/resources/schemas.cjs +6 -26
- package/dist/resources/schemas.d.ts +8 -100
- package/dist/resources/schemas.d.ts.map +1 -1
- package/dist/resources/schemas.js +4 -23
- package/dist/search/search-service.d.ts +2 -2
- package/dist/search/search-service.d.ts.map +1 -1
- package/dist/session/chat-session.cjs +15 -25
- package/dist/session/chat-session.d.ts +7 -5
- package/dist/session/chat-session.d.ts.map +1 -1
- package/dist/session/chat-session.js +16 -26
- package/dist/session/errors.cjs +2 -2
- package/dist/session/errors.d.ts.map +1 -1
- package/dist/session/history/database.cjs +1 -1
- package/dist/session/history/database.d.ts +4 -4
- package/dist/session/history/database.d.ts.map +1 -1
- package/dist/session/history/factory.d.ts +3 -3
- package/dist/session/history/factory.d.ts.map +1 -1
- package/dist/session/history/memory.d.ts +4 -4
- package/dist/session/history/memory.d.ts.map +1 -1
- package/dist/session/history/types.d.ts +2 -2
- package/dist/session/history/types.d.ts.map +1 -1
- package/dist/session/index.cjs +3 -0
- package/dist/session/index.d.ts +2 -0
- package/dist/session/index.d.ts.map +1 -1
- package/dist/session/index.js +2 -0
- package/dist/session/message-queue.d.ts +2 -2
- package/dist/session/message-queue.d.ts.map +1 -1
- package/dist/session/session-manager.cjs +67 -9
- package/dist/session/session-manager.d.ts +46 -7
- package/dist/session/session-manager.d.ts.map +1 -1
- package/dist/session/session-manager.js +67 -9
- package/dist/session/title-generator.cjs +2 -2
- package/dist/session/title-generator.d.ts +2 -2
- package/dist/session/title-generator.d.ts.map +1 -1
- package/dist/storage/blob/index.cjs +0 -40
- package/dist/storage/blob/index.d.ts +2 -44
- package/dist/storage/blob/index.d.ts.map +1 -1
- package/dist/storage/blob/index.js +0 -30
- package/dist/storage/cache/index.cjs +0 -37
- package/dist/storage/cache/index.d.ts +0 -42
- package/dist/storage/cache/index.d.ts.map +1 -1
- package/dist/storage/cache/index.js +0 -28
- package/dist/storage/database/index.cjs +0 -42
- package/dist/storage/database/index.d.ts +0 -43
- package/dist/storage/database/index.d.ts.map +1 -1
- package/dist/storage/database/index.js +0 -37
- package/dist/storage/error-codes.cjs +1 -6
- package/dist/storage/error-codes.d.ts +2 -7
- package/dist/storage/error-codes.d.ts.map +1 -1
- package/dist/storage/error-codes.js +1 -6
- package/dist/storage/errors.cjs +18 -82
- package/dist/storage/errors.d.ts +4 -24
- package/dist/storage/errors.d.ts.map +1 -1
- package/dist/storage/errors.js +16 -80
- package/dist/storage/index.cjs +8 -69
- package/dist/storage/index.d.ts +11 -66
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +6 -50
- package/dist/storage/storage-manager.cjs +9 -25
- package/dist/storage/storage-manager.d.ts +11 -15
- package/dist/storage/storage-manager.d.ts.map +1 -1
- package/dist/storage/storage-manager.js +8 -23
- package/dist/storage/types.d.ts +0 -1
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/systemPrompt/contributors.d.ts +4 -4
- package/dist/systemPrompt/contributors.d.ts.map +1 -1
- package/dist/systemPrompt/errors.cjs +2 -2
- package/dist/systemPrompt/errors.d.ts.map +1 -1
- package/dist/systemPrompt/manager.cjs +1 -5
- package/dist/systemPrompt/manager.d.ts +2 -3
- package/dist/systemPrompt/manager.d.ts.map +1 -1
- package/dist/systemPrompt/manager.js +1 -5
- package/dist/telemetry/index.cjs +3 -0
- package/dist/telemetry/index.d.ts +2 -0
- package/dist/telemetry/index.d.ts.map +1 -1
- package/dist/telemetry/index.js +2 -0
- package/dist/telemetry/utils.d.ts +4 -4
- package/dist/telemetry/utils.d.ts.map +1 -1
- package/dist/test-utils/in-memory-storage.cjs +288 -0
- package/dist/test-utils/in-memory-storage.js +252 -0
- package/dist/tools/confirmation/allowed-tools-provider/factory.d.ts +3 -3
- package/dist/tools/confirmation/allowed-tools-provider/factory.d.ts.map +1 -1
- package/dist/tools/confirmation/allowed-tools-provider/in-memory.d.ts +2 -2
- package/dist/tools/confirmation/allowed-tools-provider/in-memory.d.ts.map +1 -1
- package/dist/tools/confirmation/allowed-tools-provider/storage.d.ts +4 -4
- package/dist/tools/confirmation/allowed-tools-provider/storage.d.ts.map +1 -1
- package/dist/tools/confirmation/allowed-tools-provider/types.d.ts +2 -2
- package/dist/tools/confirmation/allowed-tools-provider/types.d.ts.map +1 -1
- package/dist/tools/{internal-tools/constants.cjs → define-tool.cjs} +8 -13
- package/dist/tools/define-tool.d.ts +11 -0
- package/dist/tools/define-tool.d.ts.map +1 -0
- package/dist/tools/define-tool.js +7 -0
- package/dist/tools/error-codes.cjs +2 -2
- package/dist/tools/error-codes.d.ts +2 -2
- package/dist/tools/error-codes.d.ts.map +1 -1
- package/dist/tools/error-codes.js +2 -2
- package/dist/tools/errors.cjs +11 -23
- package/dist/tools/errors.d.ts +4 -10
- package/dist/tools/errors.d.ts.map +1 -1
- package/dist/tools/errors.js +9 -21
- package/dist/tools/index.cjs +3 -8
- package/dist/tools/index.d.ts +2 -4
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +2 -7
- package/dist/{storage/blob/providers/index.cjs → tools/pattern-utils.cjs} +11 -9
- package/dist/tools/pattern-utils.d.ts +20 -0
- package/dist/tools/pattern-utils.d.ts.map +1 -0
- package/dist/tools/pattern-utils.js +10 -0
- package/dist/tools/schemas.cjs +14 -40
- package/dist/tools/schemas.d.ts +6 -50
- package/dist/tools/schemas.d.ts.map +1 -1
- package/dist/tools/schemas.js +11 -32
- package/dist/tools/tool-call-metadata.cjs +3 -3
- package/dist/tools/tool-call-metadata.d.ts +1 -1
- package/dist/tools/tool-call-metadata.d.ts.map +1 -1
- package/dist/tools/tool-call-metadata.js +3 -3
- package/dist/tools/tool-manager.cjs +376 -327
- package/dist/tools/tool-manager.d.ts +63 -80
- package/dist/tools/tool-manager.d.ts.map +1 -1
- package/dist/tools/tool-manager.js +376 -331
- package/dist/tools/types.d.ts +112 -13
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/utils/error-conversion.d.ts +2 -2
- package/dist/utils/error-conversion.d.ts.map +1 -1
- package/dist/utils/path.d.ts +2 -2
- package/dist/utils/path.d.ts.map +1 -1
- package/dist/utils/result.cjs +1 -1
- package/dist/utils/result.d.ts.map +1 -1
- package/dist/utils/schema.cjs +9 -5
- package/dist/utils/schema.d.ts +4 -2
- package/dist/utils/schema.d.ts.map +1 -1
- package/dist/utils/schema.js +9 -5
- package/dist/utils/service-initializer.cjs +51 -56
- package/dist/utils/service-initializer.d.ts +17 -14
- package/dist/utils/service-initializer.d.ts.map +1 -1
- package/dist/utils/service-initializer.js +51 -56
- package/dist/{storage/cache/providers/index.cjs → workspace/error-codes.cjs} +8 -9
- package/dist/workspace/error-codes.d.ts +5 -0
- package/dist/workspace/error-codes.d.ts.map +1 -0
- package/dist/workspace/error-codes.js +7 -0
- package/dist/{storage/blob/factory.cjs → workspace/errors.cjs} +20 -14
- package/dist/workspace/errors.d.ts +5 -0
- package/dist/workspace/errors.d.ts.map +1 -0
- package/dist/workspace/errors.js +21 -0
- package/dist/{image → workspace}/index.cjs +12 -10
- package/dist/workspace/index.d.ts +5 -0
- package/dist/workspace/index.d.ts.map +1 -0
- package/dist/workspace/index.js +9 -0
- package/dist/workspace/manager.cjs +113 -0
- package/dist/workspace/manager.d.ts +18 -0
- package/dist/workspace/manager.d.ts.map +1 -0
- package/dist/workspace/manager.js +90 -0
- package/dist/workspace/types.d.ts +14 -0
- package/dist/workspace/types.d.ts.map +1 -0
- package/package.json +2 -2
- package/dist/context/compaction/factory.cjs +0 -57
- package/dist/context/compaction/factory.d.ts +0 -17
- package/dist/context/compaction/factory.d.ts.map +0 -1
- package/dist/context/compaction/factory.js +0 -34
- package/dist/context/compaction/provider.d.ts +0 -48
- package/dist/context/compaction/provider.d.ts.map +0 -1
- package/dist/context/compaction/providers/noop-provider.d.ts +0 -24
- package/dist/context/compaction/providers/noop-provider.d.ts.map +0 -1
- package/dist/context/compaction/providers/noop-provider.js +0 -24
- package/dist/context/compaction/providers/reactive-overflow-provider.cjs +0 -76
- package/dist/context/compaction/providers/reactive-overflow-provider.d.ts +0 -51
- package/dist/context/compaction/providers/reactive-overflow-provider.d.ts.map +0 -1
- package/dist/context/compaction/providers/reactive-overflow-provider.js +0 -52
- package/dist/context/compaction/registry.cjs +0 -39
- package/dist/context/compaction/registry.d.ts +0 -19
- package/dist/context/compaction/registry.d.ts.map +0 -1
- package/dist/context/compaction/registry.js +0 -16
- package/dist/context/compaction/schemas.cjs +0 -58
- package/dist/context/compaction/schemas.d.ts +0 -69
- package/dist/context/compaction/schemas.d.ts.map +0 -1
- package/dist/context/compaction/schemas.js +0 -34
- package/dist/context/compaction/strategies/reactive-overflow.d.ts.map +0 -1
- package/dist/image/define-image.cjs +0 -146
- package/dist/image/define-image.d.ts +0 -71
- package/dist/image/define-image.d.ts.map +0 -1
- package/dist/image/define-image.js +0 -121
- package/dist/image/index.d.ts +0 -53
- package/dist/image/index.d.ts.map +0 -1
- package/dist/image/index.js +0 -7
- package/dist/image/types.d.ts +0 -246
- package/dist/image/types.d.ts.map +0 -1
- package/dist/llm/services/test-utils.integration.cjs +0 -237
- package/dist/llm/services/test-utils.integration.d.ts +0 -48
- package/dist/llm/services/test-utils.integration.d.ts.map +0 -1
- package/dist/llm/services/test-utils.integration.js +0 -214
- package/dist/plugins/builtins/content-policy.d.ts +0 -26
- package/dist/plugins/builtins/content-policy.d.ts.map +0 -1
- package/dist/plugins/builtins/response-sanitizer.d.ts +0 -25
- package/dist/plugins/builtins/response-sanitizer.d.ts.map +0 -1
- package/dist/plugins/error-codes.cjs +0 -43
- package/dist/plugins/error-codes.d.ts +0 -34
- package/dist/plugins/error-codes.d.ts.map +0 -1
- package/dist/plugins/error-codes.js +0 -20
- package/dist/plugins/index.cjs +0 -61
- package/dist/plugins/index.d.ts +0 -21
- package/dist/plugins/index.d.ts.map +0 -1
- package/dist/plugins/index.js +0 -30
- package/dist/plugins/loader.cjs +0 -171
- package/dist/plugins/loader.d.ts +0 -30
- package/dist/plugins/loader.d.ts.map +0 -1
- package/dist/plugins/loader.js +0 -145
- package/dist/plugins/manager.cjs +0 -473
- package/dist/plugins/manager.d.ts +0 -106
- package/dist/plugins/manager.d.ts.map +0 -1
- package/dist/plugins/manager.js +0 -450
- package/dist/plugins/registrations/builtins.cjs +0 -51
- package/dist/plugins/registrations/builtins.d.ts +0 -17
- package/dist/plugins/registrations/builtins.d.ts.map +0 -1
- package/dist/plugins/registrations/builtins.js +0 -28
- package/dist/plugins/registry.cjs +0 -63
- package/dist/plugins/registry.d.ts +0 -101
- package/dist/plugins/registry.d.ts.map +0 -1
- package/dist/plugins/registry.js +0 -39
- package/dist/plugins/schemas.cjs +0 -73
- package/dist/plugins/schemas.d.ts +0 -195
- package/dist/plugins/schemas.d.ts.map +0 -1
- package/dist/plugins/schemas.js +0 -47
- package/dist/plugins/types.d.ts.map +0 -1
- package/dist/providers/base-registry.cjs +0 -147
- package/dist/providers/base-registry.d.ts +0 -147
- package/dist/providers/base-registry.d.ts.map +0 -1
- package/dist/providers/base-registry.js +0 -123
- package/dist/providers/discovery.cjs +0 -109
- package/dist/providers/discovery.d.ts +0 -96
- package/dist/providers/discovery.d.ts.map +0 -1
- package/dist/providers/discovery.js +0 -84
- package/dist/providers/index.cjs +0 -24
- package/dist/providers/index.d.ts +0 -32
- package/dist/providers/index.d.ts.map +0 -1
- package/dist/providers/index.js +0 -2
- package/dist/resources/internal-provider.d.ts.map +0 -1
- package/dist/storage/blob/factory.d.ts +0 -37
- package/dist/storage/blob/factory.d.ts.map +0 -1
- package/dist/storage/blob/factory.js +0 -15
- package/dist/storage/blob/local-blob-store.cjs +0 -496
- package/dist/storage/blob/local-blob-store.d.ts +0 -58
- package/dist/storage/blob/local-blob-store.d.ts.map +0 -1
- package/dist/storage/blob/local-blob-store.js +0 -463
- package/dist/storage/blob/memory-blob-store.cjs +0 -326
- package/dist/storage/blob/memory-blob-store.d.ts +0 -66
- package/dist/storage/blob/memory-blob-store.d.ts.map +0 -1
- package/dist/storage/blob/memory-blob-store.js +0 -303
- package/dist/storage/blob/provider.d.ts +0 -50
- package/dist/storage/blob/provider.d.ts.map +0 -1
- package/dist/storage/blob/providers/index.d.ts +0 -8
- package/dist/storage/blob/providers/index.d.ts.map +0 -1
- package/dist/storage/blob/providers/index.js +0 -7
- package/dist/storage/blob/providers/local.cjs +0 -39
- package/dist/storage/blob/providers/local.d.ts +0 -17
- package/dist/storage/blob/providers/local.d.ts.map +0 -1
- package/dist/storage/blob/providers/local.js +0 -16
- package/dist/storage/blob/providers/memory.cjs +0 -39
- package/dist/storage/blob/providers/memory.d.ts +0 -17
- package/dist/storage/blob/providers/memory.d.ts.map +0 -1
- package/dist/storage/blob/providers/memory.js +0 -16
- package/dist/storage/blob/registry.cjs +0 -50
- package/dist/storage/blob/registry.d.ts +0 -42
- package/dist/storage/blob/registry.d.ts.map +0 -1
- package/dist/storage/blob/registry.js +0 -26
- package/dist/storage/blob/schemas.cjs +0 -52
- package/dist/storage/blob/schemas.d.ts +0 -85
- package/dist/storage/blob/schemas.d.ts.map +0 -1
- package/dist/storage/blob/schemas.js +0 -26
- package/dist/storage/cache/factory.cjs +0 -38
- package/dist/storage/cache/factory.d.ts +0 -37
- package/dist/storage/cache/factory.d.ts.map +0 -1
- package/dist/storage/cache/factory.js +0 -15
- package/dist/storage/cache/memory-cache-store.cjs +0 -107
- package/dist/storage/cache/memory-cache-store.d.ts +0 -26
- package/dist/storage/cache/memory-cache-store.d.ts.map +0 -1
- package/dist/storage/cache/memory-cache-store.js +0 -84
- package/dist/storage/cache/provider.cjs +0 -16
- package/dist/storage/cache/provider.d.ts +0 -56
- package/dist/storage/cache/provider.d.ts.map +0 -1
- package/dist/storage/cache/provider.js +0 -0
- package/dist/storage/cache/providers/index.d.ts +0 -8
- package/dist/storage/cache/providers/index.d.ts.map +0 -1
- package/dist/storage/cache/providers/index.js +0 -7
- package/dist/storage/cache/providers/memory.d.ts +0 -17
- package/dist/storage/cache/providers/memory.d.ts.map +0 -1
- package/dist/storage/cache/providers/memory.js +0 -17
- package/dist/storage/cache/providers/redis.cjs +0 -66
- package/dist/storage/cache/providers/redis.d.ts +0 -20
- package/dist/storage/cache/providers/redis.d.ts.map +0 -1
- package/dist/storage/cache/providers/redis.js +0 -33
- package/dist/storage/cache/redis-store.cjs +0 -173
- package/dist/storage/cache/redis-store.d.ts +0 -32
- package/dist/storage/cache/redis-store.d.ts.map +0 -1
- package/dist/storage/cache/redis-store.js +0 -150
- package/dist/storage/cache/registry.cjs +0 -50
- package/dist/storage/cache/registry.d.ts +0 -42
- package/dist/storage/cache/registry.d.ts.map +0 -1
- package/dist/storage/cache/registry.js +0 -26
- package/dist/storage/cache/schemas.cjs +0 -81
- package/dist/storage/cache/schemas.d.ts +0 -150
- package/dist/storage/cache/schemas.d.ts.map +0 -1
- package/dist/storage/cache/schemas.js +0 -55
- package/dist/storage/database/factory.cjs +0 -38
- package/dist/storage/database/factory.d.ts +0 -39
- package/dist/storage/database/factory.d.ts.map +0 -1
- package/dist/storage/database/factory.js +0 -15
- package/dist/storage/database/memory-database-store.cjs +0 -122
- package/dist/storage/database/memory-database-store.d.ts +0 -29
- package/dist/storage/database/memory-database-store.d.ts.map +0 -1
- package/dist/storage/database/memory-database-store.js +0 -99
- package/dist/storage/database/postgres-store.cjs +0 -342
- package/dist/storage/database/postgres-store.d.ts +0 -55
- package/dist/storage/database/postgres-store.d.ts.map +0 -1
- package/dist/storage/database/postgres-store.js +0 -319
- package/dist/storage/database/provider.cjs +0 -16
- package/dist/storage/database/provider.d.ts +0 -56
- package/dist/storage/database/provider.d.ts.map +0 -1
- package/dist/storage/database/provider.js +0 -0
- package/dist/storage/database/providers/index.cjs +0 -34
- package/dist/storage/database/providers/index.d.ts +0 -9
- package/dist/storage/database/providers/index.d.ts.map +0 -1
- package/dist/storage/database/providers/index.js +0 -9
- package/dist/storage/database/providers/memory.cjs +0 -40
- package/dist/storage/database/providers/memory.d.ts +0 -16
- package/dist/storage/database/providers/memory.d.ts.map +0 -1
- package/dist/storage/database/providers/memory.js +0 -17
- package/dist/storage/database/providers/postgres.cjs +0 -62
- package/dist/storage/database/providers/postgres.d.ts +0 -19
- package/dist/storage/database/providers/postgres.d.ts.map +0 -1
- package/dist/storage/database/providers/postgres.js +0 -29
- package/dist/storage/database/providers/sqlite.cjs +0 -66
- package/dist/storage/database/providers/sqlite.d.ts +0 -20
- package/dist/storage/database/providers/sqlite.d.ts.map +0 -1
- package/dist/storage/database/providers/sqlite.js +0 -33
- package/dist/storage/database/registry.cjs +0 -50
- package/dist/storage/database/registry.d.ts +0 -42
- package/dist/storage/database/registry.d.ts.map +0 -1
- package/dist/storage/database/registry.js +0 -26
- package/dist/storage/database/schemas.cjs +0 -97
- package/dist/storage/database/schemas.d.ts +0 -226
- package/dist/storage/database/schemas.d.ts.map +0 -1
- package/dist/storage/database/schemas.js +0 -70
- package/dist/storage/database/sqlite-store.cjs +0 -270
- package/dist/storage/database/sqlite-store.d.ts +0 -33
- package/dist/storage/database/sqlite-store.d.ts.map +0 -1
- package/dist/storage/database/sqlite-store.js +0 -237
- package/dist/storage/schemas.cjs +0 -57
- package/dist/storage/schemas.d.ts +0 -347
- package/dist/storage/schemas.d.ts.map +0 -1
- package/dist/storage/schemas.js +0 -37
- package/dist/tools/bash-pattern-utils.cjs +0 -91
- package/dist/tools/bash-pattern-utils.d.ts +0 -58
- package/dist/tools/bash-pattern-utils.d.ts.map +0 -1
- package/dist/tools/bash-pattern-utils.js +0 -64
- package/dist/tools/custom-tool-registry.cjs +0 -64
- package/dist/tools/custom-tool-registry.d.ts +0 -126
- package/dist/tools/custom-tool-registry.d.ts.map +0 -1
- package/dist/tools/custom-tool-registry.js +0 -40
- package/dist/tools/custom-tool-schema-registry.cjs +0 -164
- package/dist/tools/custom-tool-schema-registry.d.ts +0 -86
- package/dist/tools/custom-tool-schema-registry.d.ts.map +0 -1
- package/dist/tools/custom-tool-schema-registry.js +0 -140
- package/dist/tools/internal-tools/constants.d.ts +0 -12
- package/dist/tools/internal-tools/constants.d.ts.map +0 -1
- package/dist/tools/internal-tools/constants.js +0 -12
- package/dist/tools/internal-tools/implementations/ask-user-tool.cjs +0 -57
- package/dist/tools/internal-tools/implementations/ask-user-tool.d.ts +0 -18
- package/dist/tools/internal-tools/implementations/ask-user-tool.d.ts.map +0 -1
- package/dist/tools/internal-tools/implementations/ask-user-tool.js +0 -34
- package/dist/tools/internal-tools/implementations/delegate-to-url-tool.cjs +0 -192
- package/dist/tools/internal-tools/implementations/delegate-to-url-tool.d.ts +0 -33
- package/dist/tools/internal-tools/implementations/delegate-to-url-tool.d.ts.map +0 -1
- package/dist/tools/internal-tools/implementations/delegate-to-url-tool.js +0 -169
- package/dist/tools/internal-tools/implementations/get-resource-tool.cjs +0 -113
- package/dist/tools/internal-tools/implementations/get-resource-tool.d.ts +0 -30
- package/dist/tools/internal-tools/implementations/get-resource-tool.d.ts.map +0 -1
- package/dist/tools/internal-tools/implementations/get-resource-tool.js +0 -90
- package/dist/tools/internal-tools/implementations/invoke-skill-tool.cjs +0 -140
- package/dist/tools/internal-tools/implementations/invoke-skill-tool.d.ts +0 -24
- package/dist/tools/internal-tools/implementations/invoke-skill-tool.d.ts.map +0 -1
- package/dist/tools/internal-tools/implementations/invoke-skill-tool.js +0 -117
- package/dist/tools/internal-tools/implementations/list-resources-tool.cjs +0 -91
- package/dist/tools/internal-tools/implementations/list-resources-tool.d.ts +0 -24
- package/dist/tools/internal-tools/implementations/list-resources-tool.d.ts.map +0 -1
- package/dist/tools/internal-tools/implementations/list-resources-tool.js +0 -68
- package/dist/tools/internal-tools/implementations/search-history-tool.cjs +0 -61
- package/dist/tools/internal-tools/implementations/search-history-tool.d.ts +0 -7
- package/dist/tools/internal-tools/implementations/search-history-tool.d.ts.map +0 -1
- package/dist/tools/internal-tools/implementations/search-history-tool.js +0 -38
- package/dist/tools/internal-tools/index.cjs +0 -26
- package/dist/tools/internal-tools/index.d.ts +0 -4
- package/dist/tools/internal-tools/index.d.ts.map +0 -1
- package/dist/tools/internal-tools/index.js +0 -3
- package/dist/tools/internal-tools/provider.cjs +0 -324
- package/dist/tools/internal-tools/provider.d.ts +0 -116
- package/dist/tools/internal-tools/provider.d.ts.map +0 -1
- package/dist/tools/internal-tools/provider.js +0 -301
- package/dist/tools/internal-tools/registry.cjs +0 -71
- package/dist/tools/internal-tools/registry.d.ts +0 -91
- package/dist/tools/internal-tools/registry.d.ts.map +0 -1
- package/dist/tools/internal-tools/registry.js +0 -47
- /package/dist/{context/compaction/provider.js → agent/agent-options.js} +0 -0
- /package/dist/{image/types.js → agent/runtime-config.js} +0 -0
- /package/dist/{image → hooks}/types.cjs +0 -0
- /package/dist/{plugins → hooks}/types.js +0 -0
- /package/dist/{plugins → workspace}/types.cjs +0 -0
- /package/dist/{storage/blob/provider.js → workspace/types.js} +0 -0
|
@@ -1,237 +0,0 @@
|
|
|
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 test_utils_integration_exports = {};
|
|
20
|
-
__export(test_utils_integration_exports, {
|
|
21
|
-
TestConfigs: () => TestConfigs,
|
|
22
|
-
cleanupTestEnvironment: () => cleanupTestEnvironment,
|
|
23
|
-
createTestEnvironment: () => createTestEnvironment,
|
|
24
|
-
providerRequiresApiKey: () => providerRequiresApiKey,
|
|
25
|
-
requiresApiKey: () => requiresApiKey
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(test_utils_integration_exports);
|
|
28
|
-
var import_DextoAgent = require("../../agent/DextoAgent.js");
|
|
29
|
-
var import_api_key_resolver = require("../../utils/api-key-resolver.js");
|
|
30
|
-
async function createTestEnvironment(config, sessionId = "test-session") {
|
|
31
|
-
const agent = new import_DextoAgent.DextoAgent(config);
|
|
32
|
-
await agent.start();
|
|
33
|
-
return {
|
|
34
|
-
agent,
|
|
35
|
-
sessionId,
|
|
36
|
-
cleanup: async () => {
|
|
37
|
-
if (agent.isStarted()) {
|
|
38
|
-
await agent.stop();
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
const TestConfigs = {
|
|
44
|
-
/**
|
|
45
|
-
* Creates OpenAI test config
|
|
46
|
-
*/
|
|
47
|
-
createOpenAIConfig() {
|
|
48
|
-
const provider = "openai";
|
|
49
|
-
const apiKey = (0, import_api_key_resolver.resolveApiKeyForProvider)(provider);
|
|
50
|
-
if (!apiKey) {
|
|
51
|
-
throw new Error(
|
|
52
|
-
`${(0, import_api_key_resolver.getPrimaryApiKeyEnvVar)(provider)} environment variable is required for OpenAI integration tests`
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
return {
|
|
56
|
-
systemPrompt: "You are a helpful assistant for testing purposes.",
|
|
57
|
-
llm: {
|
|
58
|
-
provider,
|
|
59
|
-
model: "gpt-4o-mini",
|
|
60
|
-
// Use cheapest non-reasoning model for testing
|
|
61
|
-
apiKey,
|
|
62
|
-
maxOutputTokens: 1e3,
|
|
63
|
-
// Enough for reasoning models (reasoning + answer)
|
|
64
|
-
temperature: 0,
|
|
65
|
-
// Deterministic responses
|
|
66
|
-
maxIterations: 1
|
|
67
|
-
// Minimal tool iterations
|
|
68
|
-
},
|
|
69
|
-
mcpServers: {},
|
|
70
|
-
storage: {
|
|
71
|
-
cache: { type: "in-memory" },
|
|
72
|
-
database: { type: "in-memory" },
|
|
73
|
-
blob: { type: "local", storePath: "/tmp/test-blobs" }
|
|
74
|
-
},
|
|
75
|
-
sessions: {
|
|
76
|
-
maxSessions: 10,
|
|
77
|
-
sessionTTL: 6e4
|
|
78
|
-
// 60s for tests
|
|
79
|
-
},
|
|
80
|
-
logger: {
|
|
81
|
-
level: "info",
|
|
82
|
-
transports: [{ type: "console" }]
|
|
83
|
-
},
|
|
84
|
-
toolConfirmation: {
|
|
85
|
-
mode: "auto-approve",
|
|
86
|
-
// Tests don't have interactive approval
|
|
87
|
-
timeout: 12e4
|
|
88
|
-
},
|
|
89
|
-
elicitation: {
|
|
90
|
-
enabled: false,
|
|
91
|
-
// Tests don't handle elicitation
|
|
92
|
-
timeout: 12e4
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
},
|
|
96
|
-
/**
|
|
97
|
-
* Creates Anthropic test config
|
|
98
|
-
*/
|
|
99
|
-
createAnthropicConfig() {
|
|
100
|
-
const provider = "anthropic";
|
|
101
|
-
const apiKey = (0, import_api_key_resolver.resolveApiKeyForProvider)(provider);
|
|
102
|
-
if (!apiKey) {
|
|
103
|
-
throw new Error(
|
|
104
|
-
`${(0, import_api_key_resolver.getPrimaryApiKeyEnvVar)(provider)} environment variable is required for Anthropic integration tests`
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
return {
|
|
108
|
-
systemPrompt: "You are a helpful assistant for testing purposes.",
|
|
109
|
-
llm: {
|
|
110
|
-
provider,
|
|
111
|
-
model: "claude-haiku-4-5-20251001",
|
|
112
|
-
// Use cheapest model for testing
|
|
113
|
-
apiKey,
|
|
114
|
-
maxOutputTokens: 1e3,
|
|
115
|
-
// Enough for reasoning models (reasoning + answer)
|
|
116
|
-
temperature: 0,
|
|
117
|
-
maxIterations: 1
|
|
118
|
-
},
|
|
119
|
-
mcpServers: {},
|
|
120
|
-
storage: {
|
|
121
|
-
cache: { type: "in-memory" },
|
|
122
|
-
database: { type: "in-memory" },
|
|
123
|
-
blob: { type: "local", storePath: "/tmp/test-blobs" }
|
|
124
|
-
},
|
|
125
|
-
sessions: {
|
|
126
|
-
maxSessions: 10,
|
|
127
|
-
sessionTTL: 6e4
|
|
128
|
-
},
|
|
129
|
-
logger: {
|
|
130
|
-
level: "info",
|
|
131
|
-
transports: [{ type: "console" }]
|
|
132
|
-
},
|
|
133
|
-
toolConfirmation: {
|
|
134
|
-
mode: "auto-approve",
|
|
135
|
-
// Tests don't have interactive approval
|
|
136
|
-
timeout: 12e4
|
|
137
|
-
},
|
|
138
|
-
elicitation: {
|
|
139
|
-
enabled: false,
|
|
140
|
-
// Tests don't handle elicitation
|
|
141
|
-
timeout: 12e4
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
},
|
|
145
|
-
/**
|
|
146
|
-
* Creates Vercel test config - parametric for different providers/models
|
|
147
|
-
*/
|
|
148
|
-
createVercelConfig(provider = "openai", model) {
|
|
149
|
-
const apiKey = (0, import_api_key_resolver.resolveApiKeyForProvider)(provider);
|
|
150
|
-
if (!apiKey && providerRequiresApiKey(provider)) {
|
|
151
|
-
throw new Error(
|
|
152
|
-
`${(0, import_api_key_resolver.getPrimaryApiKeyEnvVar)(provider)} environment variable is required for Vercel integration tests with ${provider}`
|
|
153
|
-
);
|
|
154
|
-
}
|
|
155
|
-
const defaultModels = {
|
|
156
|
-
openai: "gpt-4o-mini",
|
|
157
|
-
anthropic: "claude-haiku-4-5-20251001",
|
|
158
|
-
google: "gemini-2.0-flash",
|
|
159
|
-
groq: "llama-3.1-8b-instant",
|
|
160
|
-
xai: "grok-beta",
|
|
161
|
-
cohere: "command-r",
|
|
162
|
-
minimax: "MiniMax-M2.1",
|
|
163
|
-
glm: "glm-4.7",
|
|
164
|
-
"openai-compatible": "gpt-5-mini",
|
|
165
|
-
openrouter: "anthropic/claude-3.5-haiku",
|
|
166
|
-
// OpenRouter model format: provider/model
|
|
167
|
-
litellm: "gpt-4",
|
|
168
|
-
// LiteLLM model names follow the provider's convention
|
|
169
|
-
glama: "openai/gpt-4o",
|
|
170
|
-
// Glama model format: provider/model
|
|
171
|
-
vertex: "gemini-2.5-pro",
|
|
172
|
-
// Vertex AI uses ADC auth, not API keys
|
|
173
|
-
bedrock: "anthropic.claude-3-5-haiku-20241022-v1:0",
|
|
174
|
-
// Bedrock uses AWS credentials, not API keys
|
|
175
|
-
local: "llama-3.2-3b-q4",
|
|
176
|
-
// Native node-llama-cpp GGUF models
|
|
177
|
-
ollama: "llama3.2",
|
|
178
|
-
// Ollama server models
|
|
179
|
-
"dexto-nova": "anthropic/claude-4.5-sonnet"
|
|
180
|
-
// Dexto gateway (OpenRouter model format)
|
|
181
|
-
};
|
|
182
|
-
return {
|
|
183
|
-
systemPrompt: "You are a helpful assistant for testing purposes.",
|
|
184
|
-
llm: {
|
|
185
|
-
provider,
|
|
186
|
-
model: model || defaultModels[provider],
|
|
187
|
-
apiKey,
|
|
188
|
-
maxOutputTokens: 1e3,
|
|
189
|
-
// Enough for reasoning models (reasoning + answer)
|
|
190
|
-
temperature: 0,
|
|
191
|
-
maxIterations: 1
|
|
192
|
-
},
|
|
193
|
-
mcpServers: {},
|
|
194
|
-
storage: {
|
|
195
|
-
cache: { type: "in-memory" },
|
|
196
|
-
database: { type: "in-memory" },
|
|
197
|
-
blob: { type: "local", storePath: "/tmp/test-blobs" }
|
|
198
|
-
},
|
|
199
|
-
sessions: {
|
|
200
|
-
maxSessions: 10,
|
|
201
|
-
sessionTTL: 6e4
|
|
202
|
-
},
|
|
203
|
-
logger: {
|
|
204
|
-
level: "info",
|
|
205
|
-
transports: [{ type: "console" }]
|
|
206
|
-
},
|
|
207
|
-
toolConfirmation: {
|
|
208
|
-
mode: "auto-approve",
|
|
209
|
-
// Tests don't have interactive approval
|
|
210
|
-
timeout: 12e4
|
|
211
|
-
},
|
|
212
|
-
elicitation: {
|
|
213
|
-
enabled: false,
|
|
214
|
-
// Tests don't handle elicitation
|
|
215
|
-
timeout: 12e4
|
|
216
|
-
}
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
};
|
|
220
|
-
function providerRequiresApiKey(provider) {
|
|
221
|
-
const envVars = import_api_key_resolver.PROVIDER_API_KEY_MAP[provider];
|
|
222
|
-
return envVars && envVars.length > 0;
|
|
223
|
-
}
|
|
224
|
-
function requiresApiKey(provider) {
|
|
225
|
-
return !!(0, import_api_key_resolver.resolveApiKeyForProvider)(provider);
|
|
226
|
-
}
|
|
227
|
-
async function cleanupTestEnvironment(_env) {
|
|
228
|
-
await _env.cleanup();
|
|
229
|
-
}
|
|
230
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
231
|
-
0 && (module.exports = {
|
|
232
|
-
TestConfigs,
|
|
233
|
-
cleanupTestEnvironment,
|
|
234
|
-
createTestEnvironment,
|
|
235
|
-
providerRequiresApiKey,
|
|
236
|
-
requiresApiKey
|
|
237
|
-
});
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { DextoAgent } from '../../agent/DextoAgent.js';
|
|
2
|
-
import type { LLMProvider } from '../types.js';
|
|
3
|
-
import type { AgentConfig } from '../../agent/schemas.js';
|
|
4
|
-
/**
|
|
5
|
-
* Shared utilities for LLM service integration tests
|
|
6
|
-
*/
|
|
7
|
-
export interface TestEnvironment {
|
|
8
|
-
agent: DextoAgent;
|
|
9
|
-
sessionId: string;
|
|
10
|
-
cleanup: () => Promise<void>;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Creates a test environment with real dependencies (no mocks)
|
|
14
|
-
* Uses DextoAgent to handle complex initialization properly
|
|
15
|
-
*/
|
|
16
|
-
export declare function createTestEnvironment(config: AgentConfig, sessionId?: string): Promise<TestEnvironment>;
|
|
17
|
-
/**
|
|
18
|
-
* Test configuration helpers that create full AgentConfig objects
|
|
19
|
-
*/
|
|
20
|
-
export declare const TestConfigs: {
|
|
21
|
-
/**
|
|
22
|
-
* Creates OpenAI test config
|
|
23
|
-
*/
|
|
24
|
-
readonly createOpenAIConfig: () => AgentConfig;
|
|
25
|
-
/**
|
|
26
|
-
* Creates Anthropic test config
|
|
27
|
-
*/
|
|
28
|
-
readonly createAnthropicConfig: () => AgentConfig;
|
|
29
|
-
/**
|
|
30
|
-
* Creates Vercel test config - parametric for different providers/models
|
|
31
|
-
*/
|
|
32
|
-
readonly createVercelConfig: (provider?: LLMProvider, model?: string) => AgentConfig;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Helper to check if a provider requires an API key
|
|
36
|
-
* Providers with empty arrays in PROVIDER_API_KEY_MAP don't require API keys (e.g., local, ollama, vertex)
|
|
37
|
-
*/
|
|
38
|
-
export declare function providerRequiresApiKey(provider: LLMProvider): boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Helper to check if API key is available for a provider
|
|
41
|
-
* Used to skip tests when API keys are not configured
|
|
42
|
-
*/
|
|
43
|
-
export declare function requiresApiKey(provider: LLMProvider): boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Cleanup helper
|
|
46
|
-
*/
|
|
47
|
-
export declare function cleanupTestEnvironment(_env: TestEnvironment): Promise<void>;
|
|
48
|
-
//# sourceMappingURL=test-utils.integration.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-utils.integration.d.ts","sourceRoot":"","sources":["../../../src/llm/services/test-utils.integration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAMvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D;;GAEG;AAEH,MAAM,WAAW,eAAe;IAC5B,KAAK,EAAE,UAAU,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAChC;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CACvC,MAAM,EAAE,WAAW,EACnB,SAAS,GAAE,MAAuB,GACnC,OAAO,CAAC,eAAe,CAAC,CAe1B;AAKD;;GAEG;AACH,eAAO,MAAM,WAAW;IACpB;;OAEG;uCACmB,WAAW;IA4CjC;;OAEG;0CACsB,WAAW;IA4CpC;;OAEG;6CAC0B,WAAW,UAAqB,MAAM,KAAG,WAAW;CAgE3E,CAAC;AAEX;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO,CAGrE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO,CAE7D;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAEjF"}
|
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
import "../../chunk-PTJYTZNU.js";
|
|
2
|
-
import { DextoAgent } from "../../agent/DextoAgent.js";
|
|
3
|
-
import {
|
|
4
|
-
resolveApiKeyForProvider,
|
|
5
|
-
getPrimaryApiKeyEnvVar,
|
|
6
|
-
PROVIDER_API_KEY_MAP
|
|
7
|
-
} from "../../utils/api-key-resolver.js";
|
|
8
|
-
async function createTestEnvironment(config, sessionId = "test-session") {
|
|
9
|
-
const agent = new DextoAgent(config);
|
|
10
|
-
await agent.start();
|
|
11
|
-
return {
|
|
12
|
-
agent,
|
|
13
|
-
sessionId,
|
|
14
|
-
cleanup: async () => {
|
|
15
|
-
if (agent.isStarted()) {
|
|
16
|
-
await agent.stop();
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
const TestConfigs = {
|
|
22
|
-
/**
|
|
23
|
-
* Creates OpenAI test config
|
|
24
|
-
*/
|
|
25
|
-
createOpenAIConfig() {
|
|
26
|
-
const provider = "openai";
|
|
27
|
-
const apiKey = resolveApiKeyForProvider(provider);
|
|
28
|
-
if (!apiKey) {
|
|
29
|
-
throw new Error(
|
|
30
|
-
`${getPrimaryApiKeyEnvVar(provider)} environment variable is required for OpenAI integration tests`
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
return {
|
|
34
|
-
systemPrompt: "You are a helpful assistant for testing purposes.",
|
|
35
|
-
llm: {
|
|
36
|
-
provider,
|
|
37
|
-
model: "gpt-4o-mini",
|
|
38
|
-
// Use cheapest non-reasoning model for testing
|
|
39
|
-
apiKey,
|
|
40
|
-
maxOutputTokens: 1e3,
|
|
41
|
-
// Enough for reasoning models (reasoning + answer)
|
|
42
|
-
temperature: 0,
|
|
43
|
-
// Deterministic responses
|
|
44
|
-
maxIterations: 1
|
|
45
|
-
// Minimal tool iterations
|
|
46
|
-
},
|
|
47
|
-
mcpServers: {},
|
|
48
|
-
storage: {
|
|
49
|
-
cache: { type: "in-memory" },
|
|
50
|
-
database: { type: "in-memory" },
|
|
51
|
-
blob: { type: "local", storePath: "/tmp/test-blobs" }
|
|
52
|
-
},
|
|
53
|
-
sessions: {
|
|
54
|
-
maxSessions: 10,
|
|
55
|
-
sessionTTL: 6e4
|
|
56
|
-
// 60s for tests
|
|
57
|
-
},
|
|
58
|
-
logger: {
|
|
59
|
-
level: "info",
|
|
60
|
-
transports: [{ type: "console" }]
|
|
61
|
-
},
|
|
62
|
-
toolConfirmation: {
|
|
63
|
-
mode: "auto-approve",
|
|
64
|
-
// Tests don't have interactive approval
|
|
65
|
-
timeout: 12e4
|
|
66
|
-
},
|
|
67
|
-
elicitation: {
|
|
68
|
-
enabled: false,
|
|
69
|
-
// Tests don't handle elicitation
|
|
70
|
-
timeout: 12e4
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
},
|
|
74
|
-
/**
|
|
75
|
-
* Creates Anthropic test config
|
|
76
|
-
*/
|
|
77
|
-
createAnthropicConfig() {
|
|
78
|
-
const provider = "anthropic";
|
|
79
|
-
const apiKey = resolveApiKeyForProvider(provider);
|
|
80
|
-
if (!apiKey) {
|
|
81
|
-
throw new Error(
|
|
82
|
-
`${getPrimaryApiKeyEnvVar(provider)} environment variable is required for Anthropic integration tests`
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
return {
|
|
86
|
-
systemPrompt: "You are a helpful assistant for testing purposes.",
|
|
87
|
-
llm: {
|
|
88
|
-
provider,
|
|
89
|
-
model: "claude-haiku-4-5-20251001",
|
|
90
|
-
// Use cheapest model for testing
|
|
91
|
-
apiKey,
|
|
92
|
-
maxOutputTokens: 1e3,
|
|
93
|
-
// Enough for reasoning models (reasoning + answer)
|
|
94
|
-
temperature: 0,
|
|
95
|
-
maxIterations: 1
|
|
96
|
-
},
|
|
97
|
-
mcpServers: {},
|
|
98
|
-
storage: {
|
|
99
|
-
cache: { type: "in-memory" },
|
|
100
|
-
database: { type: "in-memory" },
|
|
101
|
-
blob: { type: "local", storePath: "/tmp/test-blobs" }
|
|
102
|
-
},
|
|
103
|
-
sessions: {
|
|
104
|
-
maxSessions: 10,
|
|
105
|
-
sessionTTL: 6e4
|
|
106
|
-
},
|
|
107
|
-
logger: {
|
|
108
|
-
level: "info",
|
|
109
|
-
transports: [{ type: "console" }]
|
|
110
|
-
},
|
|
111
|
-
toolConfirmation: {
|
|
112
|
-
mode: "auto-approve",
|
|
113
|
-
// Tests don't have interactive approval
|
|
114
|
-
timeout: 12e4
|
|
115
|
-
},
|
|
116
|
-
elicitation: {
|
|
117
|
-
enabled: false,
|
|
118
|
-
// Tests don't handle elicitation
|
|
119
|
-
timeout: 12e4
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
},
|
|
123
|
-
/**
|
|
124
|
-
* Creates Vercel test config - parametric for different providers/models
|
|
125
|
-
*/
|
|
126
|
-
createVercelConfig(provider = "openai", model) {
|
|
127
|
-
const apiKey = resolveApiKeyForProvider(provider);
|
|
128
|
-
if (!apiKey && providerRequiresApiKey(provider)) {
|
|
129
|
-
throw new Error(
|
|
130
|
-
`${getPrimaryApiKeyEnvVar(provider)} environment variable is required for Vercel integration tests with ${provider}`
|
|
131
|
-
);
|
|
132
|
-
}
|
|
133
|
-
const defaultModels = {
|
|
134
|
-
openai: "gpt-4o-mini",
|
|
135
|
-
anthropic: "claude-haiku-4-5-20251001",
|
|
136
|
-
google: "gemini-2.0-flash",
|
|
137
|
-
groq: "llama-3.1-8b-instant",
|
|
138
|
-
xai: "grok-beta",
|
|
139
|
-
cohere: "command-r",
|
|
140
|
-
minimax: "MiniMax-M2.1",
|
|
141
|
-
glm: "glm-4.7",
|
|
142
|
-
"openai-compatible": "gpt-5-mini",
|
|
143
|
-
openrouter: "anthropic/claude-3.5-haiku",
|
|
144
|
-
// OpenRouter model format: provider/model
|
|
145
|
-
litellm: "gpt-4",
|
|
146
|
-
// LiteLLM model names follow the provider's convention
|
|
147
|
-
glama: "openai/gpt-4o",
|
|
148
|
-
// Glama model format: provider/model
|
|
149
|
-
vertex: "gemini-2.5-pro",
|
|
150
|
-
// Vertex AI uses ADC auth, not API keys
|
|
151
|
-
bedrock: "anthropic.claude-3-5-haiku-20241022-v1:0",
|
|
152
|
-
// Bedrock uses AWS credentials, not API keys
|
|
153
|
-
local: "llama-3.2-3b-q4",
|
|
154
|
-
// Native node-llama-cpp GGUF models
|
|
155
|
-
ollama: "llama3.2",
|
|
156
|
-
// Ollama server models
|
|
157
|
-
"dexto-nova": "anthropic/claude-4.5-sonnet"
|
|
158
|
-
// Dexto gateway (OpenRouter model format)
|
|
159
|
-
};
|
|
160
|
-
return {
|
|
161
|
-
systemPrompt: "You are a helpful assistant for testing purposes.",
|
|
162
|
-
llm: {
|
|
163
|
-
provider,
|
|
164
|
-
model: model || defaultModels[provider],
|
|
165
|
-
apiKey,
|
|
166
|
-
maxOutputTokens: 1e3,
|
|
167
|
-
// Enough for reasoning models (reasoning + answer)
|
|
168
|
-
temperature: 0,
|
|
169
|
-
maxIterations: 1
|
|
170
|
-
},
|
|
171
|
-
mcpServers: {},
|
|
172
|
-
storage: {
|
|
173
|
-
cache: { type: "in-memory" },
|
|
174
|
-
database: { type: "in-memory" },
|
|
175
|
-
blob: { type: "local", storePath: "/tmp/test-blobs" }
|
|
176
|
-
},
|
|
177
|
-
sessions: {
|
|
178
|
-
maxSessions: 10,
|
|
179
|
-
sessionTTL: 6e4
|
|
180
|
-
},
|
|
181
|
-
logger: {
|
|
182
|
-
level: "info",
|
|
183
|
-
transports: [{ type: "console" }]
|
|
184
|
-
},
|
|
185
|
-
toolConfirmation: {
|
|
186
|
-
mode: "auto-approve",
|
|
187
|
-
// Tests don't have interactive approval
|
|
188
|
-
timeout: 12e4
|
|
189
|
-
},
|
|
190
|
-
elicitation: {
|
|
191
|
-
enabled: false,
|
|
192
|
-
// Tests don't handle elicitation
|
|
193
|
-
timeout: 12e4
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
function providerRequiresApiKey(provider) {
|
|
199
|
-
const envVars = PROVIDER_API_KEY_MAP[provider];
|
|
200
|
-
return envVars && envVars.length > 0;
|
|
201
|
-
}
|
|
202
|
-
function requiresApiKey(provider) {
|
|
203
|
-
return !!resolveApiKeyForProvider(provider);
|
|
204
|
-
}
|
|
205
|
-
async function cleanupTestEnvironment(_env) {
|
|
206
|
-
await _env.cleanup();
|
|
207
|
-
}
|
|
208
|
-
export {
|
|
209
|
-
TestConfigs,
|
|
210
|
-
cleanupTestEnvironment,
|
|
211
|
-
createTestEnvironment,
|
|
212
|
-
providerRequiresApiKey,
|
|
213
|
-
requiresApiKey
|
|
214
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { DextoPlugin, PluginResult, BeforeLLMRequestPayload, PluginExecutionContext } from '../types.js';
|
|
2
|
-
/**
|
|
3
|
-
* Configuration options for the ContentPolicy plugin
|
|
4
|
-
*/
|
|
5
|
-
export interface ContentPolicyConfig {
|
|
6
|
-
maxInputChars?: number;
|
|
7
|
-
redactEmails?: boolean;
|
|
8
|
-
redactApiKeys?: boolean;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* ContentPolicy Plugin
|
|
12
|
-
*
|
|
13
|
-
* Enforces content policies on LLM requests including:
|
|
14
|
-
* - Abusive language detection (blocking)
|
|
15
|
-
* - Input length limits
|
|
16
|
-
* - Email address redaction
|
|
17
|
-
* - API key redaction
|
|
18
|
-
*
|
|
19
|
-
* Ported from feat/hooks content-policy hook implementation
|
|
20
|
-
*/
|
|
21
|
-
export declare class ContentPolicyPlugin implements DextoPlugin {
|
|
22
|
-
private config;
|
|
23
|
-
initialize(config: Record<string, any>): Promise<void>;
|
|
24
|
-
beforeLLMRequest(payload: BeforeLLMRequestPayload, _context: PluginExecutionContext): Promise<PluginResult>;
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=content-policy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content-policy.d.ts","sourceRoot":"","sources":["../../../src/plugins/builtins/content-policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,WAAW,EACX,YAAY,EAEZ,uBAAuB,EACvB,sBAAsB,EACzB,MAAM,aAAa,CAAC;AAErB;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B;AAgBD;;;;;;;;;;GAUG;AACH,qBAAa,mBAAoB,YAAW,WAAW;IACnD,OAAO,CAAC,MAAM,CAA2C;IAEnD,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAQtD,gBAAgB,CAClB,OAAO,EAAE,uBAAuB,EAChC,QAAQ,EAAE,sBAAsB,GACjC,OAAO,CAAC,YAAY,CAAC;CA6E3B"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { DextoPlugin, BeforeResponsePayload, PluginExecutionContext, PluginResult } from '../types.js';
|
|
2
|
-
export interface ResponseSanitizerConfig {
|
|
3
|
-
redactEmails?: boolean;
|
|
4
|
-
redactApiKeys?: boolean;
|
|
5
|
-
maxResponseLength?: number;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Response sanitizer built-in plugin
|
|
9
|
-
*
|
|
10
|
-
* This plugin redacts sensitive information from LLM responses to prevent accidental leakage:
|
|
11
|
-
* - Email addresses
|
|
12
|
-
* - API keys and tokens
|
|
13
|
-
* - Optional: Truncates responses that exceed length limits
|
|
14
|
-
*
|
|
15
|
-
* This demonstrates how plugins can modify response content before it's sent to users,
|
|
16
|
-
* using the beforeResponse extension point.
|
|
17
|
-
*/
|
|
18
|
-
export declare class ResponseSanitizerPlugin implements DextoPlugin {
|
|
19
|
-
private redactEmails;
|
|
20
|
-
private redactApiKeys;
|
|
21
|
-
private maxResponseLength;
|
|
22
|
-
initialize(config: Record<string, any>): Promise<void>;
|
|
23
|
-
beforeResponse(payload: BeforeResponsePayload, _context: PluginExecutionContext): Promise<PluginResult>;
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=response-sanitizer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"response-sanitizer.d.ts","sourceRoot":"","sources":["../../../src/plugins/builtins/response-sanitizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,WAAW,EACX,qBAAqB,EACrB,sBAAsB,EACtB,YAAY,EAEf,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,uBAAuB;IACpC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAQD;;;;;;;;;;GAUG;AACH,qBAAa,uBAAwB,YAAW,WAAW;IACvD,OAAO,CAAC,YAAY,CAAkC;IACtD,OAAO,CAAC,aAAa,CAAmC;IACxD,OAAO,CAAC,iBAAiB,CAAsC;IAEzD,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAOtD,cAAc,CAChB,OAAO,EAAE,qBAAqB,EAC9B,QAAQ,EAAE,sBAAsB,GACjC,OAAO,CAAC,YAAY,CAAC;CAyE3B"}
|
|
@@ -1,43 +0,0 @@
|
|
|
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 error_codes_exports = {};
|
|
20
|
-
__export(error_codes_exports, {
|
|
21
|
-
PluginErrorCode: () => PluginErrorCode
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(error_codes_exports);
|
|
24
|
-
var PluginErrorCode = /* @__PURE__ */ ((PluginErrorCode2) => {
|
|
25
|
-
PluginErrorCode2["PLUGIN_LOAD_FAILED"] = "PLUGIN_LOAD_FAILED";
|
|
26
|
-
PluginErrorCode2["PLUGIN_INVALID_SHAPE"] = "PLUGIN_INVALID_SHAPE";
|
|
27
|
-
PluginErrorCode2["PLUGIN_INSTANTIATION_FAILED"] = "PLUGIN_INSTANTIATION_FAILED";
|
|
28
|
-
PluginErrorCode2["PLUGIN_INITIALIZATION_FAILED"] = "PLUGIN_INITIALIZATION_FAILED";
|
|
29
|
-
PluginErrorCode2["PLUGIN_CONFIGURATION_INVALID"] = "PLUGIN_CONFIGURATION_INVALID";
|
|
30
|
-
PluginErrorCode2["PLUGIN_EXECUTION_FAILED"] = "PLUGIN_EXECUTION_FAILED";
|
|
31
|
-
PluginErrorCode2["PLUGIN_EXECUTION_TIMEOUT"] = "PLUGIN_EXECUTION_TIMEOUT";
|
|
32
|
-
PluginErrorCode2["PLUGIN_BLOCKED_EXECUTION"] = "PLUGIN_BLOCKED_EXECUTION";
|
|
33
|
-
PluginErrorCode2["PLUGIN_DUPLICATE_PRIORITY"] = "PLUGIN_DUPLICATE_PRIORITY";
|
|
34
|
-
PluginErrorCode2["PLUGIN_DEPENDENCY_NOT_INSTALLED"] = "PLUGIN_DEPENDENCY_NOT_INSTALLED";
|
|
35
|
-
PluginErrorCode2["PLUGIN_PROVIDER_ALREADY_REGISTERED"] = "PLUGIN_PROVIDER_ALREADY_REGISTERED";
|
|
36
|
-
PluginErrorCode2["PLUGIN_PROVIDER_NOT_FOUND"] = "PLUGIN_PROVIDER_NOT_FOUND";
|
|
37
|
-
PluginErrorCode2["PLUGIN_PROVIDER_VALIDATION_FAILED"] = "PLUGIN_PROVIDER_VALIDATION_FAILED";
|
|
38
|
-
return PluginErrorCode2;
|
|
39
|
-
})(PluginErrorCode || {});
|
|
40
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
-
0 && (module.exports = {
|
|
42
|
-
PluginErrorCode
|
|
43
|
-
});
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Plugin-specific error codes
|
|
3
|
-
* Used for plugin loading, validation, and execution errors
|
|
4
|
-
*/
|
|
5
|
-
export declare enum PluginErrorCode {
|
|
6
|
-
/** Plugin file not found or cannot be loaded */
|
|
7
|
-
PLUGIN_LOAD_FAILED = "PLUGIN_LOAD_FAILED",
|
|
8
|
-
/** Plugin does not implement required interface */
|
|
9
|
-
PLUGIN_INVALID_SHAPE = "PLUGIN_INVALID_SHAPE",
|
|
10
|
-
/** Plugin constructor threw an error */
|
|
11
|
-
PLUGIN_INSTANTIATION_FAILED = "PLUGIN_INSTANTIATION_FAILED",
|
|
12
|
-
/** Plugin initialization failed */
|
|
13
|
-
PLUGIN_INITIALIZATION_FAILED = "PLUGIN_INITIALIZATION_FAILED",
|
|
14
|
-
/** Plugin configuration is invalid */
|
|
15
|
-
PLUGIN_CONFIGURATION_INVALID = "PLUGIN_CONFIGURATION_INVALID",
|
|
16
|
-
/** Plugin execution failed */
|
|
17
|
-
PLUGIN_EXECUTION_FAILED = "PLUGIN_EXECUTION_FAILED",
|
|
18
|
-
/** Plugin execution timed out */
|
|
19
|
-
PLUGIN_EXECUTION_TIMEOUT = "PLUGIN_EXECUTION_TIMEOUT",
|
|
20
|
-
/** Plugin blocked execution */
|
|
21
|
-
PLUGIN_BLOCKED_EXECUTION = "PLUGIN_BLOCKED_EXECUTION",
|
|
22
|
-
/** Duplicate plugin priority */
|
|
23
|
-
PLUGIN_DUPLICATE_PRIORITY = "PLUGIN_DUPLICATE_PRIORITY",
|
|
24
|
-
/** Required dependency not installed for plugin loading */
|
|
25
|
-
PLUGIN_DEPENDENCY_NOT_INSTALLED = "PLUGIN_DEPENDENCY_NOT_INSTALLED",
|
|
26
|
-
/** Plugin provider already registered in registry */
|
|
27
|
-
PLUGIN_PROVIDER_ALREADY_REGISTERED = "PLUGIN_PROVIDER_ALREADY_REGISTERED",
|
|
28
|
-
/** Plugin provider not found in registry */
|
|
29
|
-
PLUGIN_PROVIDER_NOT_FOUND = "PLUGIN_PROVIDER_NOT_FOUND",
|
|
30
|
-
/** Plugin provider configuration validation failed */
|
|
31
|
-
PLUGIN_PROVIDER_VALIDATION_FAILED = "PLUGIN_PROVIDER_VALIDATION_FAILED"
|
|
32
|
-
}
|
|
33
|
-
export type { PluginErrorCode as default };
|
|
34
|
-
//# sourceMappingURL=error-codes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error-codes.d.ts","sourceRoot":"","sources":["../../src/plugins/error-codes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,eAAe;IACvB,gDAAgD;IAChD,kBAAkB,uBAAuB;IAEzC,mDAAmD;IACnD,oBAAoB,yBAAyB;IAE7C,wCAAwC;IACxC,2BAA2B,gCAAgC;IAE3D,mCAAmC;IACnC,4BAA4B,iCAAiC;IAE7D,sCAAsC;IACtC,4BAA4B,iCAAiC;IAE7D,8BAA8B;IAC9B,uBAAuB,4BAA4B;IAEnD,iCAAiC;IACjC,wBAAwB,6BAA6B;IAErD,+BAA+B;IAC/B,wBAAwB,6BAA6B;IAErD,gCAAgC;IAChC,yBAAyB,8BAA8B;IAEvD,2DAA2D;IAC3D,+BAA+B,oCAAoC;IAEnE,qDAAqD;IACrD,kCAAkC,uCAAuC;IAEzE,4CAA4C;IAC5C,yBAAyB,8BAA8B;IAEvD,sDAAsD;IACtD,iCAAiC,sCAAsC;CAC1E;AAED,YAAY,EAAE,eAAe,IAAI,OAAO,EAAE,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import "../chunk-PTJYTZNU.js";
|
|
2
|
-
var PluginErrorCode = /* @__PURE__ */ ((PluginErrorCode2) => {
|
|
3
|
-
PluginErrorCode2["PLUGIN_LOAD_FAILED"] = "PLUGIN_LOAD_FAILED";
|
|
4
|
-
PluginErrorCode2["PLUGIN_INVALID_SHAPE"] = "PLUGIN_INVALID_SHAPE";
|
|
5
|
-
PluginErrorCode2["PLUGIN_INSTANTIATION_FAILED"] = "PLUGIN_INSTANTIATION_FAILED";
|
|
6
|
-
PluginErrorCode2["PLUGIN_INITIALIZATION_FAILED"] = "PLUGIN_INITIALIZATION_FAILED";
|
|
7
|
-
PluginErrorCode2["PLUGIN_CONFIGURATION_INVALID"] = "PLUGIN_CONFIGURATION_INVALID";
|
|
8
|
-
PluginErrorCode2["PLUGIN_EXECUTION_FAILED"] = "PLUGIN_EXECUTION_FAILED";
|
|
9
|
-
PluginErrorCode2["PLUGIN_EXECUTION_TIMEOUT"] = "PLUGIN_EXECUTION_TIMEOUT";
|
|
10
|
-
PluginErrorCode2["PLUGIN_BLOCKED_EXECUTION"] = "PLUGIN_BLOCKED_EXECUTION";
|
|
11
|
-
PluginErrorCode2["PLUGIN_DUPLICATE_PRIORITY"] = "PLUGIN_DUPLICATE_PRIORITY";
|
|
12
|
-
PluginErrorCode2["PLUGIN_DEPENDENCY_NOT_INSTALLED"] = "PLUGIN_DEPENDENCY_NOT_INSTALLED";
|
|
13
|
-
PluginErrorCode2["PLUGIN_PROVIDER_ALREADY_REGISTERED"] = "PLUGIN_PROVIDER_ALREADY_REGISTERED";
|
|
14
|
-
PluginErrorCode2["PLUGIN_PROVIDER_NOT_FOUND"] = "PLUGIN_PROVIDER_NOT_FOUND";
|
|
15
|
-
PluginErrorCode2["PLUGIN_PROVIDER_VALIDATION_FAILED"] = "PLUGIN_PROVIDER_VALIDATION_FAILED";
|
|
16
|
-
return PluginErrorCode2;
|
|
17
|
-
})(PluginErrorCode || {});
|
|
18
|
-
export {
|
|
19
|
-
PluginErrorCode
|
|
20
|
-
};
|