@dexto/core 1.2.4 → 1.2.6
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 +60 -0
- package/dist/agent/DextoAgent.cjs +579 -345
- package/dist/agent/DextoAgent.d.ts +131 -83
- package/dist/agent/DextoAgent.d.ts.map +1 -1
- package/dist/agent/DextoAgent.js +573 -336
- package/dist/agent/agentCard.cjs +4 -2
- package/dist/agent/agentCard.d.ts +0 -1
- package/dist/agent/agentCard.d.ts.map +1 -1
- package/dist/agent/agentCard.js +4 -2
- package/dist/agent/index.cjs +3 -7
- package/dist/agent/index.d.ts +3 -3
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +7 -6
- package/dist/agent/schemas.cjs +179 -75
- package/dist/agent/schemas.d.ts +2678 -586
- package/dist/agent/schemas.d.ts.map +1 -1
- package/dist/agent/schemas.js +172 -65
- package/dist/agent/state-manager.cjs +28 -23
- package/dist/agent/state-manager.d.ts +4 -1
- package/dist/agent/state-manager.d.ts.map +1 -1
- package/dist/agent/state-manager.js +28 -23
- package/dist/{preferences/constants.cjs → agent/types.cjs} +2 -14
- package/dist/agent/types.d.ts +54 -0
- package/dist/agent/types.d.ts.map +1 -0
- package/dist/agent/types.js +0 -0
- package/dist/approval/errors.cjs +89 -8
- package/dist/approval/errors.d.ts +5 -3
- package/dist/approval/errors.d.ts.map +1 -1
- package/dist/approval/errors.js +89 -8
- package/dist/approval/{providers/factory.d.ts → factory.d.ts} +2 -2
- package/dist/approval/factory.d.ts.map +1 -0
- package/dist/approval/{providers/factory.js → factory.js} +1 -1
- package/dist/approval/index.cjs +4 -6
- package/dist/approval/index.d.ts +3 -5
- package/dist/approval/index.d.ts.map +1 -1
- package/dist/approval/index.js +4 -5
- package/dist/approval/manager.cjs +140 -37
- package/dist/approval/manager.d.ts +56 -17
- package/dist/approval/manager.d.ts.map +1 -1
- package/dist/approval/manager.js +141 -38
- package/dist/approval/schemas.cjs +9 -1
- package/dist/approval/schemas.d.ts +120 -35
- package/dist/approval/schemas.d.ts.map +1 -1
- package/dist/approval/schemas.js +9 -2
- package/dist/approval/types.cjs +14 -2
- package/dist/approval/types.d.ts +64 -12
- package/dist/approval/types.d.ts.map +1 -1
- package/dist/approval/types.js +12 -1
- package/dist/context/compression/middle-removal.cjs +11 -11
- package/dist/context/compression/middle-removal.d.ts +3 -1
- package/dist/context/compression/middle-removal.d.ts.map +1 -1
- package/dist/context/compression/middle-removal.js +11 -11
- package/dist/context/compression/oldest-removal.cjs +18 -5
- package/dist/context/compression/oldest-removal.d.ts +3 -1
- package/dist/context/compression/oldest-removal.d.ts.map +1 -1
- package/dist/context/compression/oldest-removal.js +18 -5
- package/dist/context/manager.cjs +94 -67
- package/dist/context/manager.d.ts +13 -10
- package/dist/context/manager.d.ts.map +1 -1
- package/dist/context/manager.js +94 -67
- package/dist/context/utils.cjs +79 -65
- package/dist/context/utils.d.ts +15 -12
- package/dist/context/utils.d.ts.map +1 -1
- package/dist/context/utils.js +45 -31
- package/dist/errors/DextoRuntimeError.d.ts +5 -5
- package/dist/errors/DextoRuntimeError.d.ts.map +1 -1
- package/dist/errors/result-bridge.cjs +2 -3
- package/dist/errors/result-bridge.d.ts +5 -3
- package/dist/errors/result-bridge.d.ts.map +1 -1
- package/dist/errors/result-bridge.js +1 -2
- package/dist/errors/types.cjs +1 -2
- package/dist/errors/types.d.ts +5 -8
- package/dist/errors/types.d.ts.map +1 -1
- package/dist/errors/types.js +1 -2
- package/dist/events/index.cjs +125 -55
- package/dist/events/index.d.ts +204 -97
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +123 -55
- package/dist/filesystem/filesystem-service.cjs +40 -30
- package/dist/filesystem/filesystem-service.d.ts +9 -1
- package/dist/filesystem/filesystem-service.d.ts.map +1 -1
- package/dist/filesystem/filesystem-service.js +40 -30
- package/dist/filesystem/path-validator.cjs +4 -3
- package/dist/filesystem/path-validator.d.ts +3 -1
- package/dist/filesystem/path-validator.d.ts.map +1 -1
- package/dist/filesystem/path-validator.js +4 -3
- package/dist/filesystem/types.d.ts +3 -3
- package/dist/filesystem/types.d.ts.map +1 -1
- package/dist/index.browser.cjs +7 -0
- package/dist/index.browser.d.ts +2 -0
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.browser.js +4 -0
- package/dist/index.cjs +0 -7
- package/dist/index.d.ts +12 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -4
- package/dist/llm/formatters/anthropic.cjs +32 -21
- package/dist/llm/formatters/anthropic.d.ts +3 -0
- package/dist/llm/formatters/anthropic.d.ts.map +1 -1
- package/dist/llm/formatters/anthropic.js +32 -21
- package/dist/llm/formatters/factory.cjs +6 -7
- package/dist/llm/formatters/factory.d.ts +2 -1
- package/dist/llm/formatters/factory.d.ts.map +1 -1
- package/dist/llm/formatters/factory.js +4 -5
- package/dist/llm/formatters/openai.cjs +38 -9
- package/dist/llm/formatters/openai.d.ts +3 -0
- package/dist/llm/formatters/openai.d.ts.map +1 -1
- package/dist/llm/formatters/openai.js +38 -9
- package/dist/llm/formatters/vercel.cjs +49 -8
- package/dist/llm/formatters/vercel.d.ts +3 -0
- package/dist/llm/formatters/vercel.d.ts.map +1 -1
- package/dist/llm/formatters/vercel.js +49 -8
- package/dist/llm/registry.cjs +153 -17
- package/dist/llm/registry.d.ts +5 -2
- package/dist/llm/registry.d.ts.map +1 -1
- package/dist/llm/registry.js +143 -7
- package/dist/llm/resolver.cjs +4 -4
- package/dist/llm/resolver.d.ts +3 -2
- package/dist/llm/resolver.d.ts.map +1 -1
- package/dist/llm/resolver.js +4 -4
- package/dist/llm/schemas.cjs +6 -3
- package/dist/llm/schemas.d.ts +51 -17
- package/dist/llm/schemas.d.ts.map +1 -1
- package/dist/llm/schemas.js +5 -3
- package/dist/llm/services/anthropic.cjs +216 -183
- package/dist/llm/services/anthropic.d.ts +3 -1
- package/dist/llm/services/anthropic.d.ts.map +1 -1
- package/dist/llm/services/anthropic.js +217 -184
- package/dist/llm/services/factory.cjs +15 -9
- package/dist/llm/services/factory.d.ts +2 -1
- package/dist/llm/services/factory.d.ts.map +1 -1
- package/dist/llm/services/factory.js +15 -9
- package/dist/llm/services/openai.cjs +262 -225
- package/dist/llm/services/openai.d.ts +3 -1
- package/dist/llm/services/openai.d.ts.map +1 -1
- package/dist/llm/services/openai.js +263 -226
- package/dist/llm/services/test-utils.integration.cjs +58 -12
- package/dist/llm/services/test-utils.integration.d.ts.map +1 -1
- package/dist/llm/services/test-utils.integration.js +58 -12
- package/dist/llm/services/types.d.ts +9 -0
- package/dist/llm/services/types.d.ts.map +1 -1
- package/dist/llm/services/vercel.cjs +163 -111
- package/dist/llm/services/vercel.d.ts +3 -1
- package/dist/llm/services/vercel.d.ts.map +1 -1
- package/dist/llm/services/vercel.js +157 -105
- package/dist/llm/tokenizer/factory.cjs +2 -2
- package/dist/llm/tokenizer/factory.d.ts +3 -1
- package/dist/llm/tokenizer/factory.d.ts.map +1 -1
- package/dist/llm/tokenizer/factory.js +2 -2
- package/dist/llm/tokenizer/openai.cjs +16 -9
- package/dist/llm/tokenizer/openai.d.ts +4 -1
- package/dist/llm/tokenizer/openai.d.ts.map +1 -1
- package/dist/llm/tokenizer/openai.js +16 -9
- package/dist/llm/validation.cjs +8 -9
- package/dist/llm/validation.d.ts +3 -1
- package/dist/llm/validation.d.ts.map +1 -1
- package/dist/llm/validation.js +5 -6
- package/dist/logger/factory.cjs +54 -0
- package/dist/logger/factory.d.ts +36 -0
- package/dist/logger/factory.d.ts.map +1 -0
- package/dist/logger/factory.js +31 -0
- package/dist/logger/index.cjs +42 -3
- package/dist/logger/index.d.ts +17 -1
- package/dist/logger/index.d.ts.map +1 -1
- package/dist/logger/index.js +26 -1
- package/dist/logger/logger.cjs +30 -17
- package/dist/logger/logger.d.ts.map +1 -1
- package/dist/logger/logger.js +30 -17
- package/dist/logger/v2/dexto-logger.cjs +141 -0
- package/dist/logger/v2/dexto-logger.d.ts +54 -0
- package/dist/logger/v2/dexto-logger.d.ts.map +1 -0
- package/dist/logger/v2/dexto-logger.js +118 -0
- package/dist/{preferences → logger/v2}/error-codes.cjs +11 -10
- package/dist/logger/v2/error-codes.d.ts +13 -0
- package/dist/logger/v2/error-codes.d.ts.map +1 -0
- package/dist/logger/v2/error-codes.js +13 -0
- package/dist/logger/v2/errors.cjs +107 -0
- package/dist/logger/v2/errors.d.ts +32 -0
- package/dist/logger/v2/errors.d.ts.map +1 -0
- package/dist/logger/v2/errors.js +84 -0
- package/dist/logger/v2/schemas.cjs +57 -0
- package/dist/logger/v2/schemas.d.ts +147 -0
- package/dist/logger/v2/schemas.d.ts.map +1 -0
- package/dist/logger/v2/schemas.js +33 -0
- package/dist/logger/v2/transport-factory.cjs +53 -0
- package/dist/logger/v2/transport-factory.d.ts +21 -0
- package/dist/logger/v2/transport-factory.d.ts.map +1 -0
- package/dist/logger/v2/transport-factory.js +29 -0
- package/dist/logger/v2/transports/console-transport.cjs +79 -0
- package/dist/logger/v2/transports/console-transport.d.ts +23 -0
- package/dist/logger/v2/transports/console-transport.d.ts.map +1 -0
- package/dist/logger/v2/transports/console-transport.js +46 -0
- package/dist/logger/v2/transports/file-transport.cjs +161 -0
- package/dist/logger/v2/transports/file-transport.d.ts +46 -0
- package/dist/logger/v2/transports/file-transport.d.ts.map +1 -0
- package/dist/logger/v2/transports/file-transport.js +128 -0
- package/dist/logger/v2/types.cjs +49 -0
- package/dist/logger/v2/types.d.ts +123 -0
- package/dist/logger/v2/types.d.ts.map +1 -0
- package/dist/logger/v2/types.js +26 -0
- package/dist/mcp/manager.cjs +88 -78
- package/dist/mcp/manager.d.ts +3 -1
- package/dist/mcp/manager.d.ts.map +1 -1
- package/dist/mcp/manager.js +88 -78
- package/dist/mcp/mcp-client.cjs +109 -79
- package/dist/mcp/mcp-client.d.ts +3 -0
- package/dist/mcp/mcp-client.d.ts.map +1 -1
- package/dist/mcp/mcp-client.js +102 -72
- package/dist/memory/index.cjs +2 -0
- package/dist/memory/index.d.ts +1 -1
- package/dist/memory/index.d.ts.map +1 -1
- package/dist/memory/index.js +3 -1
- package/dist/memory/manager.cjs +9 -7
- package/dist/memory/manager.d.ts +3 -1
- package/dist/memory/manager.d.ts.map +1 -1
- package/dist/memory/manager.js +9 -7
- package/dist/memory/schemas.cjs +10 -0
- package/dist/memory/schemas.d.ts +37 -8
- package/dist/memory/schemas.d.ts.map +1 -1
- package/dist/memory/schemas.js +9 -0
- package/dist/plugins/manager.cjs +21 -19
- package/dist/plugins/manager.d.ts +3 -1
- package/dist/plugins/manager.d.ts.map +1 -1
- package/dist/plugins/manager.js +21 -19
- package/dist/plugins/schemas.d.ts +9 -9
- package/dist/plugins/types.d.ts +2 -2
- package/dist/plugins/types.d.ts.map +1 -1
- package/dist/process/command-validator.cjs +30 -20
- package/dist/process/command-validator.d.ts +4 -1
- package/dist/process/command-validator.d.ts.map +1 -1
- package/dist/process/command-validator.js +30 -20
- package/dist/process/process-service.cjs +23 -21
- package/dist/process/process-service.d.ts +3 -1
- package/dist/process/process-service.d.ts.map +1 -1
- package/dist/process/process-service.js +23 -21
- package/dist/prompts/index.cjs +6 -8
- package/dist/prompts/index.d.ts +2 -4
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +4 -6
- package/dist/prompts/prompt-manager.cjs +25 -20
- package/dist/prompts/prompt-manager.d.ts +3 -1
- package/dist/prompts/prompt-manager.d.ts.map +1 -1
- package/dist/prompts/prompt-manager.js +25 -20
- package/dist/prompts/providers/config-prompt-provider.cjs +331 -0
- package/dist/prompts/providers/config-prompt-provider.d.ts +34 -0
- package/dist/prompts/providers/config-prompt-provider.d.ts.map +1 -0
- package/dist/prompts/providers/config-prompt-provider.js +308 -0
- package/dist/prompts/providers/custom-prompt-provider.cjs +11 -7
- package/dist/prompts/providers/custom-prompt-provider.d.ts +3 -1
- package/dist/prompts/providers/custom-prompt-provider.d.ts.map +1 -1
- package/dist/prompts/providers/custom-prompt-provider.js +11 -7
- package/dist/prompts/providers/mcp-prompt-provider.cjs +7 -6
- package/dist/prompts/providers/mcp-prompt-provider.d.ts +3 -1
- package/dist/prompts/providers/mcp-prompt-provider.d.ts.map +1 -1
- package/dist/prompts/providers/mcp-prompt-provider.js +7 -6
- package/dist/prompts/schemas.cjs +42 -23
- package/dist/prompts/schemas.d.ts +123 -14
- package/dist/prompts/schemas.d.ts.map +1 -1
- package/dist/prompts/schemas.js +39 -22
- package/dist/prompts/types.d.ts +1 -1
- package/dist/prompts/types.d.ts.map +1 -1
- package/dist/resources/handlers/blob-handler.cjs +15 -11
- package/dist/resources/handlers/blob-handler.d.ts +3 -1
- package/dist/resources/handlers/blob-handler.d.ts.map +1 -1
- package/dist/resources/handlers/blob-handler.js +15 -11
- package/dist/resources/handlers/factory.cjs +3 -3
- package/dist/resources/handlers/factory.d.ts +2 -1
- package/dist/resources/handlers/factory.d.ts.map +1 -1
- package/dist/resources/handlers/factory.js +3 -3
- package/dist/resources/handlers/filesystem-handler.cjs +10 -8
- package/dist/resources/handlers/filesystem-handler.d.ts +3 -1
- package/dist/resources/handlers/filesystem-handler.d.ts.map +1 -1
- package/dist/resources/handlers/filesystem-handler.js +10 -8
- package/dist/resources/internal-provider.cjs +28 -20
- package/dist/resources/internal-provider.d.ts +3 -1
- package/dist/resources/internal-provider.d.ts.map +1 -1
- package/dist/resources/internal-provider.js +28 -20
- package/dist/resources/manager.cjs +34 -25
- package/dist/resources/manager.d.ts +3 -1
- package/dist/resources/manager.d.ts.map +1 -1
- package/dist/resources/manager.js +34 -25
- package/dist/resources/schemas.d.ts +6 -6
- package/dist/search/search-service.cjs +8 -6
- package/dist/search/search-service.d.ts +3 -1
- package/dist/search/search-service.d.ts.map +1 -1
- package/dist/search/search-service.js +8 -6
- package/dist/session/chat-session.cjs +40 -27
- package/dist/session/chat-session.d.ts +10 -7
- package/dist/session/chat-session.d.ts.map +1 -1
- package/dist/session/chat-session.js +40 -27
- package/dist/session/history/database.cjs +18 -11
- package/dist/session/history/database.d.ts +3 -1
- package/dist/session/history/database.d.ts.map +1 -1
- package/dist/session/history/database.js +18 -11
- package/dist/session/history/factory.cjs +2 -2
- package/dist/session/history/factory.d.ts +5 -1
- package/dist/session/history/factory.d.ts.map +1 -1
- package/dist/session/history/factory.js +2 -2
- package/dist/session/session-manager.cjs +37 -53
- package/dist/session/session-manager.d.ts +3 -17
- package/dist/session/session-manager.d.ts.map +1 -1
- package/dist/session/session-manager.js +37 -53
- package/dist/session/title-generator.cjs +3 -2
- package/dist/session/title-generator.d.ts +2 -1
- package/dist/session/title-generator.d.ts.map +1 -1
- package/dist/session/title-generator.js +3 -2
- package/dist/storage/blob/factory.cjs +9 -18
- package/dist/storage/blob/factory.d.ts +5 -4
- package/dist/storage/blob/factory.d.ts.map +1 -1
- package/dist/storage/blob/factory.js +8 -17
- package/dist/storage/blob/local-blob-store.cjs +25 -32
- package/dist/storage/blob/local-blob-store.d.ts +3 -2
- package/dist/storage/blob/local-blob-store.d.ts.map +1 -1
- package/dist/storage/blob/local-blob-store.js +25 -32
- package/dist/storage/blob/memory-blob-store.cjs +326 -0
- package/dist/storage/blob/memory-blob-store.d.ts +66 -0
- package/dist/storage/blob/memory-blob-store.d.ts.map +1 -0
- package/dist/storage/blob/memory-blob-store.js +303 -0
- package/dist/storage/blob/schemas.cjs +3 -1
- package/dist/storage/blob/schemas.d.ts +6 -6
- package/dist/storage/blob/schemas.d.ts.map +1 -1
- package/dist/storage/blob/schemas.js +3 -1
- package/dist/storage/cache/factory.cjs +7 -8
- package/dist/storage/cache/factory.d.ts +4 -1
- package/dist/storage/cache/factory.d.ts.map +1 -1
- package/dist/storage/cache/factory.js +4 -5
- package/dist/storage/cache/redis-store.cjs +4 -1
- package/dist/storage/cache/redis-store.d.ts +3 -1
- package/dist/storage/cache/redis-store.d.ts.map +1 -1
- package/dist/storage/cache/redis-store.js +4 -1
- package/dist/storage/database/factory.cjs +13 -16
- package/dist/storage/database/factory.d.ts +5 -3
- package/dist/storage/database/factory.d.ts.map +1 -1
- package/dist/storage/database/factory.js +9 -12
- package/dist/storage/database/postgres-store.cjs +4 -1
- package/dist/storage/database/postgres-store.d.ts +3 -1
- package/dist/storage/database/postgres-store.d.ts.map +1 -1
- package/dist/storage/database/postgres-store.js +4 -1
- package/dist/storage/database/schemas.cjs +3 -4
- package/dist/storage/database/schemas.d.ts +8 -16
- package/dist/storage/database/schemas.d.ts.map +1 -1
- package/dist/storage/database/schemas.js +3 -4
- package/dist/storage/database/sqlite-store.cjs +17 -45
- package/dist/storage/database/sqlite-store.d.ts +3 -3
- package/dist/storage/database/sqlite-store.d.ts.map +1 -1
- package/dist/storage/database/sqlite-store.js +17 -45
- package/dist/storage/schemas.cjs +3 -1
- package/dist/storage/schemas.d.ts +16 -23
- package/dist/storage/schemas.d.ts.map +1 -1
- package/dist/storage/schemas.js +3 -1
- package/dist/storage/storage-manager.cjs +15 -15
- package/dist/storage/storage-manager.d.ts +6 -6
- package/dist/storage/storage-manager.d.ts.map +1 -1
- package/dist/storage/storage-manager.js +15 -15
- package/dist/systemPrompt/contributors.cjs +15 -15
- package/dist/systemPrompt/contributors.d.ts +5 -3
- package/dist/systemPrompt/contributors.d.ts.map +1 -1
- package/dist/systemPrompt/contributors.js +15 -15
- package/dist/systemPrompt/in-built-prompts.cjs +0 -5
- package/dist/systemPrompt/in-built-prompts.d.ts +1 -2
- package/dist/systemPrompt/in-built-prompts.d.ts.map +1 -1
- package/dist/systemPrompt/in-built-prompts.js +0 -4
- package/dist/systemPrompt/manager.cjs +31 -23
- package/dist/systemPrompt/manager.d.ts +5 -3
- package/dist/systemPrompt/manager.d.ts.map +1 -1
- package/dist/systemPrompt/manager.js +31 -23
- package/dist/systemPrompt/registry.cjs +1 -2
- package/dist/systemPrompt/registry.d.ts +1 -1
- package/dist/systemPrompt/registry.d.ts.map +1 -1
- package/dist/systemPrompt/registry.js +1 -2
- package/dist/systemPrompt/schemas.cjs +24 -18
- package/dist/systemPrompt/schemas.d.ts +46 -222
- package/dist/systemPrompt/schemas.d.ts.map +1 -1
- package/dist/systemPrompt/schemas.js +14 -18
- package/dist/telemetry/decorators.cjs +54 -15
- package/dist/telemetry/decorators.d.ts.map +1 -1
- package/dist/telemetry/decorators.js +54 -15
- package/dist/telemetry/utils.cjs +21 -14
- package/dist/telemetry/utils.d.ts +7 -3
- package/dist/telemetry/utils.d.ts.map +1 -1
- package/dist/telemetry/utils.js +21 -14
- package/dist/tools/confirmation/allowed-tools-provider/factory.cjs +2 -2
- package/dist/tools/confirmation/allowed-tools-provider/factory.d.ts +2 -1
- package/dist/tools/confirmation/allowed-tools-provider/factory.d.ts.map +1 -1
- package/dist/tools/confirmation/allowed-tools-provider/factory.js +2 -2
- package/dist/tools/confirmation/allowed-tools-provider/storage.cjs +7 -6
- package/dist/tools/confirmation/allowed-tools-provider/storage.d.ts +3 -1
- package/dist/tools/confirmation/allowed-tools-provider/storage.d.ts.map +1 -1
- package/dist/tools/confirmation/allowed-tools-provider/storage.js +7 -6
- package/dist/tools/errors.cjs +2 -1
- package/dist/tools/errors.d.ts.map +1 -1
- package/dist/tools/errors.js +2 -1
- package/dist/tools/internal-tools/constants.cjs +2 -1
- package/dist/tools/internal-tools/constants.d.ts +1 -1
- package/dist/tools/internal-tools/constants.d.ts.map +1 -1
- package/dist/tools/internal-tools/constants.js +2 -1
- package/dist/tools/internal-tools/implementations/bash-exec-tool.cjs +1 -1
- package/dist/tools/internal-tools/implementations/bash-exec-tool.js +1 -1
- package/dist/tools/internal-tools/implementations/delegate-to-url-tool.cjs +192 -0
- package/dist/tools/internal-tools/implementations/delegate-to-url-tool.d.ts +33 -0
- package/dist/tools/internal-tools/implementations/delegate-to-url-tool.d.ts.map +1 -0
- package/dist/tools/internal-tools/implementations/delegate-to-url-tool.js +169 -0
- package/dist/tools/internal-tools/provider.cjs +21 -17
- package/dist/tools/internal-tools/provider.d.ts +3 -1
- package/dist/tools/internal-tools/provider.d.ts.map +1 -1
- package/dist/tools/internal-tools/provider.js +21 -17
- package/dist/tools/internal-tools/registry.cjs +5 -0
- package/dist/tools/internal-tools/registry.d.ts.map +1 -1
- package/dist/tools/internal-tools/registry.js +5 -0
- package/dist/tools/schemas.cjs +16 -4
- package/dist/tools/schemas.d.ts +21 -9
- package/dist/tools/schemas.d.ts.map +1 -1
- package/dist/tools/schemas.js +15 -4
- package/dist/tools/tool-manager.cjs +64 -47
- package/dist/tools/tool-manager.d.ts +4 -2
- package/dist/tools/tool-manager.d.ts.map +1 -1
- package/dist/tools/tool-manager.js +61 -44
- package/dist/tools/types.d.ts +0 -4
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/utils/env-file.cjs +118 -0
- package/dist/utils/env-file.d.ts +5 -0
- package/dist/utils/env-file.d.ts.map +1 -0
- package/dist/utils/env-file.js +85 -0
- package/dist/utils/error-conversion.cjs +23 -1
- package/dist/utils/error-conversion.d.ts +2 -1
- package/dist/utils/error-conversion.d.ts.map +1 -1
- package/dist/utils/error-conversion.js +23 -1
- package/dist/utils/execution-context.d.ts.map +1 -1
- package/dist/utils/fs-walk.d.ts.map +1 -1
- package/dist/utils/index.cjs +7 -9
- package/dist/utils/index.d.ts +3 -4
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +3 -4
- package/dist/utils/path.cjs +22 -57
- package/dist/utils/path.d.ts +8 -7
- package/dist/utils/path.d.ts.map +1 -1
- package/dist/utils/path.js +21 -54
- package/dist/utils/result.cjs +37 -14
- package/dist/utils/result.d.ts.map +1 -1
- package/dist/utils/result.js +37 -14
- package/dist/utils/schema.cjs +2 -3
- package/dist/utils/schema.d.ts +2 -1
- package/dist/utils/schema.d.ts.map +1 -1
- package/dist/utils/schema.js +1 -2
- package/dist/utils/service-initializer.cjs +88 -61
- package/dist/utils/service-initializer.d.ts +4 -2
- package/dist/utils/service-initializer.d.ts.map +1 -1
- package/dist/utils/service-initializer.js +70 -43
- package/package.json +7 -3
- package/dist/Dexto.cjs +0 -251
- package/dist/Dexto.d.ts +0 -191
- package/dist/Dexto.d.ts.map +0 -1
- package/dist/Dexto.js +0 -228
- package/dist/agent/registry/error-codes.cjs +0 -44
- package/dist/agent/registry/error-codes.d.ts +0 -21
- package/dist/agent/registry/error-codes.d.ts.map +0 -1
- package/dist/agent/registry/error-codes.js +0 -21
- package/dist/agent/registry/errors.cjs +0 -188
- package/dist/agent/registry/errors.d.ts +0 -63
- package/dist/agent/registry/errors.d.ts.map +0 -1
- package/dist/agent/registry/errors.js +0 -165
- package/dist/agent/registry/registry.cjs +0 -479
- package/dist/agent/registry/registry.d.ts +0 -130
- package/dist/agent/registry/registry.d.ts.map +0 -1
- package/dist/agent/registry/registry.js +0 -453
- package/dist/agent/registry/types.cjs +0 -74
- package/dist/agent/registry/types.d.ts +0 -142
- package/dist/agent/registry/types.d.ts.map +0 -1
- package/dist/agent/registry/types.js +0 -48
- package/dist/agent/registry/user-registry.cjs +0 -140
- package/dist/agent/registry/user-registry.d.ts +0 -34
- package/dist/agent/registry/user-registry.d.ts.map +0 -1
- package/dist/agent/registry/user-registry.js +0 -105
- package/dist/approval/providers/event-based-approval-provider.cjs +0 -156
- package/dist/approval/providers/event-based-approval-provider.d.ts +0 -39
- package/dist/approval/providers/event-based-approval-provider.d.ts.map +0 -1
- package/dist/approval/providers/event-based-approval-provider.js +0 -133
- package/dist/approval/providers/factory.d.ts.map +0 -1
- package/dist/approval/providers/noop-approval-provider.cjs +0 -54
- package/dist/approval/providers/noop-approval-provider.d.ts +0 -18
- package/dist/approval/providers/noop-approval-provider.d.ts.map +0 -1
- package/dist/approval/providers/noop-approval-provider.js +0 -31
- package/dist/config/agent-resolver.cjs +0 -153
- package/dist/config/agent-resolver.d.ts +0 -14
- package/dist/config/agent-resolver.d.ts.map +0 -1
- package/dist/config/agent-resolver.js +0 -123
- package/dist/config/error-codes.cjs +0 -39
- package/dist/config/error-codes.d.ts +0 -16
- package/dist/config/error-codes.d.ts.map +0 -1
- package/dist/config/error-codes.js +0 -16
- package/dist/config/errors.cjs +0 -126
- package/dist/config/errors.d.ts +0 -34
- package/dist/config/errors.d.ts.map +0 -1
- package/dist/config/errors.js +0 -103
- package/dist/config/index.cjs +0 -26
- package/dist/config/index.d.ts +0 -4
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js +0 -3
- package/dist/config/loader.cjs +0 -119
- package/dist/config/loader.d.ts +0 -16
- package/dist/config/loader.d.ts.map +0 -1
- package/dist/config/loader.js +0 -86
- package/dist/config/writer.cjs +0 -182
- package/dist/config/writer.d.ts +0 -35
- package/dist/config/writer.d.ts.map +0 -1
- package/dist/config/writer.js +0 -147
- package/dist/preferences/constants.d.ts +0 -2
- package/dist/preferences/constants.d.ts.map +0 -1
- package/dist/preferences/constants.js +0 -5
- package/dist/preferences/error-codes.d.ts +0 -8
- package/dist/preferences/error-codes.d.ts.map +0 -1
- package/dist/preferences/error-codes.js +0 -12
- package/dist/preferences/errors.cjs +0 -75
- package/dist/preferences/errors.d.ts +0 -18
- package/dist/preferences/errors.d.ts.map +0 -1
- package/dist/preferences/errors.js +0 -51
- package/dist/preferences/index.cjs +0 -55
- package/dist/preferences/index.d.ts +0 -6
- package/dist/preferences/index.d.ts.map +0 -1
- package/dist/preferences/index.js +0 -32
- package/dist/preferences/loader.cjs +0 -138
- package/dist/preferences/loader.d.ts +0 -51
- package/dist/preferences/loader.d.ts.map +0 -1
- package/dist/preferences/loader.js +0 -110
- package/dist/preferences/schemas.cjs +0 -75
- package/dist/preferences/schemas.d.ts +0 -110
- package/dist/preferences/schemas.d.ts.map +0 -1
- package/dist/preferences/schemas.js +0 -49
- package/dist/prompts/providers/file-prompt-provider.cjs +0 -399
- package/dist/prompts/providers/file-prompt-provider.d.ts +0 -47
- package/dist/prompts/providers/file-prompt-provider.d.ts.map +0 -1
- package/dist/prompts/providers/file-prompt-provider.js +0 -376
- package/dist/prompts/providers/starter-prompt-provider.cjs +0 -170
- package/dist/prompts/providers/starter-prompt-provider.d.ts +0 -45
- package/dist/prompts/providers/starter-prompt-provider.d.ts.map +0 -1
- package/dist/prompts/providers/starter-prompt-provider.js +0 -147
- package/dist/utils/api-key-store.cjs +0 -56
- package/dist/utils/api-key-store.d.ts +0 -24
- package/dist/utils/api-key-store.d.ts.map +0 -1
- package/dist/utils/api-key-store.js +0 -31
- package/dist/utils/env.cjs +0 -154
- package/dist/utils/env.d.ts +0 -28
- package/dist/utils/env.d.ts.map +0 -1
- package/dist/utils/env.js +0 -119
- package/dist/utils/port-utils.cjs +0 -37
- package/dist/utils/port-utils.d.ts +0 -10
- package/dist/utils/port-utils.d.ts.map +0 -1
- package/dist/utils/port-utils.js +0 -14
- package/dist/utils/port-utils.spec.cjs +0 -26
- package/dist/utils/port-utils.spec.js +0 -25
- /package/dist/approval/{providers/factory.cjs → factory.cjs} +0 -0
|
@@ -1,44 +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
|
-
RegistryErrorCode: () => RegistryErrorCode
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(error_codes_exports);
|
|
24
|
-
var RegistryErrorCode = /* @__PURE__ */ ((RegistryErrorCode2) => {
|
|
25
|
-
RegistryErrorCode2["AGENT_NOT_FOUND"] = "registry_agent_not_found";
|
|
26
|
-
RegistryErrorCode2["AGENT_INVALID_ENTRY"] = "registry_agent_invalid_entry";
|
|
27
|
-
RegistryErrorCode2["AGENT_ALREADY_EXISTS"] = "registry_agent_already_exists";
|
|
28
|
-
RegistryErrorCode2["INSTALLATION_FAILED"] = "registry_installation_failed";
|
|
29
|
-
RegistryErrorCode2["INSTALLATION_VALIDATION_FAILED"] = "registry_installation_validation_failed";
|
|
30
|
-
RegistryErrorCode2["REGISTRY_NOT_FOUND"] = "registry_file_not_found";
|
|
31
|
-
RegistryErrorCode2["REGISTRY_PARSE_ERROR"] = "registry_parse_error";
|
|
32
|
-
RegistryErrorCode2["REGISTRY_WRITE_ERROR"] = "registry_write_error";
|
|
33
|
-
RegistryErrorCode2["CONFIG_NOT_FOUND"] = "registry_config_not_found";
|
|
34
|
-
RegistryErrorCode2["MAIN_CONFIG_MISSING"] = "registry_main_config_missing";
|
|
35
|
-
RegistryErrorCode2["AGENT_NOT_INSTALLED"] = "registry_agent_not_installed";
|
|
36
|
-
RegistryErrorCode2["AGENT_PROTECTED"] = "registry_agent_protected";
|
|
37
|
-
RegistryErrorCode2["UNINSTALLATION_FAILED"] = "registry_uninstallation_failed";
|
|
38
|
-
RegistryErrorCode2["AGENT_NOT_INSTALLED_AUTO_INSTALL_DISABLED"] = "registry_agent_not_installed_auto_install_disabled";
|
|
39
|
-
return RegistryErrorCode2;
|
|
40
|
-
})(RegistryErrorCode || {});
|
|
41
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
42
|
-
0 && (module.exports = {
|
|
43
|
-
RegistryErrorCode
|
|
44
|
-
});
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Registry-specific error codes
|
|
3
|
-
* Includes agent resolution, installation, and registry management errors
|
|
4
|
-
*/
|
|
5
|
-
export declare enum RegistryErrorCode {
|
|
6
|
-
AGENT_NOT_FOUND = "registry_agent_not_found",
|
|
7
|
-
AGENT_INVALID_ENTRY = "registry_agent_invalid_entry",
|
|
8
|
-
AGENT_ALREADY_EXISTS = "registry_agent_already_exists",
|
|
9
|
-
INSTALLATION_FAILED = "registry_installation_failed",
|
|
10
|
-
INSTALLATION_VALIDATION_FAILED = "registry_installation_validation_failed",
|
|
11
|
-
REGISTRY_NOT_FOUND = "registry_file_not_found",
|
|
12
|
-
REGISTRY_PARSE_ERROR = "registry_parse_error",
|
|
13
|
-
REGISTRY_WRITE_ERROR = "registry_write_error",
|
|
14
|
-
CONFIG_NOT_FOUND = "registry_config_not_found",
|
|
15
|
-
MAIN_CONFIG_MISSING = "registry_main_config_missing",
|
|
16
|
-
AGENT_NOT_INSTALLED = "registry_agent_not_installed",
|
|
17
|
-
AGENT_PROTECTED = "registry_agent_protected",
|
|
18
|
-
UNINSTALLATION_FAILED = "registry_uninstallation_failed",
|
|
19
|
-
AGENT_NOT_INSTALLED_AUTO_INSTALL_DISABLED = "registry_agent_not_installed_auto_install_disabled"
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=error-codes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error-codes.d.ts","sourceRoot":"","sources":["../../../src/agent/registry/error-codes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,iBAAiB;IAEzB,eAAe,6BAA6B;IAC5C,mBAAmB,iCAAiC;IACpD,oBAAoB,kCAAkC;IAGtD,mBAAmB,iCAAiC;IACpD,8BAA8B,4CAA4C;IAG1E,kBAAkB,4BAA4B;IAC9C,oBAAoB,yBAAyB;IAC7C,oBAAoB,yBAAyB;IAG7C,gBAAgB,8BAA8B;IAC9C,mBAAmB,iCAAiC;IAGpD,mBAAmB,iCAAiC;IACpD,eAAe,6BAA6B;IAC5C,qBAAqB,mCAAmC;IAGxD,yCAAyC,uDAAuD;CACnG"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import "../../chunk-C6A6W6XS.js";
|
|
2
|
-
var RegistryErrorCode = /* @__PURE__ */ ((RegistryErrorCode2) => {
|
|
3
|
-
RegistryErrorCode2["AGENT_NOT_FOUND"] = "registry_agent_not_found";
|
|
4
|
-
RegistryErrorCode2["AGENT_INVALID_ENTRY"] = "registry_agent_invalid_entry";
|
|
5
|
-
RegistryErrorCode2["AGENT_ALREADY_EXISTS"] = "registry_agent_already_exists";
|
|
6
|
-
RegistryErrorCode2["INSTALLATION_FAILED"] = "registry_installation_failed";
|
|
7
|
-
RegistryErrorCode2["INSTALLATION_VALIDATION_FAILED"] = "registry_installation_validation_failed";
|
|
8
|
-
RegistryErrorCode2["REGISTRY_NOT_FOUND"] = "registry_file_not_found";
|
|
9
|
-
RegistryErrorCode2["REGISTRY_PARSE_ERROR"] = "registry_parse_error";
|
|
10
|
-
RegistryErrorCode2["REGISTRY_WRITE_ERROR"] = "registry_write_error";
|
|
11
|
-
RegistryErrorCode2["CONFIG_NOT_FOUND"] = "registry_config_not_found";
|
|
12
|
-
RegistryErrorCode2["MAIN_CONFIG_MISSING"] = "registry_main_config_missing";
|
|
13
|
-
RegistryErrorCode2["AGENT_NOT_INSTALLED"] = "registry_agent_not_installed";
|
|
14
|
-
RegistryErrorCode2["AGENT_PROTECTED"] = "registry_agent_protected";
|
|
15
|
-
RegistryErrorCode2["UNINSTALLATION_FAILED"] = "registry_uninstallation_failed";
|
|
16
|
-
RegistryErrorCode2["AGENT_NOT_INSTALLED_AUTO_INSTALL_DISABLED"] = "registry_agent_not_installed_auto_install_disabled";
|
|
17
|
-
return RegistryErrorCode2;
|
|
18
|
-
})(RegistryErrorCode || {});
|
|
19
|
-
export {
|
|
20
|
-
RegistryErrorCode
|
|
21
|
-
};
|
|
@@ -1,188 +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 errors_exports = {};
|
|
20
|
-
__export(errors_exports, {
|
|
21
|
-
RegistryError: () => RegistryError
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(errors_exports);
|
|
24
|
-
var import_errors = require("../../errors/index.cjs");
|
|
25
|
-
var import_types = require("../../errors/types.cjs");
|
|
26
|
-
var import_error_codes = require("./error-codes.js");
|
|
27
|
-
class RegistryError {
|
|
28
|
-
// Agent lookup errors
|
|
29
|
-
static agentNotFound(agentId, availableAgents) {
|
|
30
|
-
return new import_errors.DextoRuntimeError(
|
|
31
|
-
import_error_codes.RegistryErrorCode.AGENT_NOT_FOUND,
|
|
32
|
-
import_types.ErrorScope.AGENT_REGISTRY,
|
|
33
|
-
import_types.ErrorType.USER,
|
|
34
|
-
`Agent '${agentId}' not found in registry`,
|
|
35
|
-
{ agentId, availableAgents },
|
|
36
|
-
`Available agents: ${availableAgents.join(", ")}. Use a file path for custom agents.`
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
static agentInvalidEntry(agentId, reason) {
|
|
40
|
-
return new import_errors.DextoRuntimeError(
|
|
41
|
-
import_error_codes.RegistryErrorCode.AGENT_INVALID_ENTRY,
|
|
42
|
-
import_types.ErrorScope.AGENT_REGISTRY,
|
|
43
|
-
import_types.ErrorType.SYSTEM,
|
|
44
|
-
`Registry entry for '${agentId}' is invalid: ${reason}`,
|
|
45
|
-
{ agentId, reason },
|
|
46
|
-
"This indicates a problem with the agent registry - please report this issue"
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
static agentAlreadyExists(agentId) {
|
|
50
|
-
return new import_errors.DextoRuntimeError(
|
|
51
|
-
import_error_codes.RegistryErrorCode.AGENT_ALREADY_EXISTS,
|
|
52
|
-
import_types.ErrorScope.AGENT_REGISTRY,
|
|
53
|
-
import_types.ErrorType.USER,
|
|
54
|
-
`Agent '${agentId}' already exists in user registry`,
|
|
55
|
-
{ agentId },
|
|
56
|
-
"Choose a different name or uninstall the existing agent first"
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
static customAgentNameConflict(agentId) {
|
|
60
|
-
return new import_errors.DextoRuntimeError(
|
|
61
|
-
import_error_codes.RegistryErrorCode.AGENT_ALREADY_EXISTS,
|
|
62
|
-
import_types.ErrorScope.AGENT_REGISTRY,
|
|
63
|
-
import_types.ErrorType.USER,
|
|
64
|
-
`Cannot create custom agent '${agentId}': name conflicts with builtin agent`,
|
|
65
|
-
{ agentId, conflictType: "builtin" },
|
|
66
|
-
"Choose a different name for your custom agent"
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
// Installation errors
|
|
70
|
-
static installationFailed(agentId, cause) {
|
|
71
|
-
return new import_errors.DextoRuntimeError(
|
|
72
|
-
import_error_codes.RegistryErrorCode.INSTALLATION_FAILED,
|
|
73
|
-
import_types.ErrorScope.AGENT_REGISTRY,
|
|
74
|
-
import_types.ErrorType.SYSTEM,
|
|
75
|
-
`Failed to install agent '${agentId}': ${cause}`,
|
|
76
|
-
{ agentId, cause },
|
|
77
|
-
"Check network connection and available disk space"
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
static installationValidationFailed(agentId, missingPath) {
|
|
81
|
-
return new import_errors.DextoRuntimeError(
|
|
82
|
-
import_error_codes.RegistryErrorCode.INSTALLATION_VALIDATION_FAILED,
|
|
83
|
-
import_types.ErrorScope.AGENT_REGISTRY,
|
|
84
|
-
import_types.ErrorType.SYSTEM,
|
|
85
|
-
`Installation validation failed for '${agentId}': missing main config`,
|
|
86
|
-
{ agentId, missingPath },
|
|
87
|
-
"This indicates a problem with the agent bundle - please report this issue"
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
// Config file errors
|
|
91
|
-
static configNotFound(configPath) {
|
|
92
|
-
return new import_errors.DextoRuntimeError(
|
|
93
|
-
import_error_codes.RegistryErrorCode.CONFIG_NOT_FOUND,
|
|
94
|
-
import_types.ErrorScope.AGENT_REGISTRY,
|
|
95
|
-
import_types.ErrorType.SYSTEM,
|
|
96
|
-
`Agent config file not found: ${configPath}`,
|
|
97
|
-
{ configPath },
|
|
98
|
-
"This indicates a problem with the agent installation"
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
static mainConfigMissing(agentId, expectedPath) {
|
|
102
|
-
return new import_errors.DextoRuntimeError(
|
|
103
|
-
import_error_codes.RegistryErrorCode.MAIN_CONFIG_MISSING,
|
|
104
|
-
import_types.ErrorScope.AGENT_REGISTRY,
|
|
105
|
-
import_types.ErrorType.SYSTEM,
|
|
106
|
-
`Main config file not found for agent '${agentId}': ${expectedPath}`,
|
|
107
|
-
{ agentId, expectedPath },
|
|
108
|
-
"This indicates a problem with the agent bundle structure"
|
|
109
|
-
);
|
|
110
|
-
}
|
|
111
|
-
// Uninstallation errors
|
|
112
|
-
static agentNotInstalled(agentId) {
|
|
113
|
-
return new import_errors.DextoRuntimeError(
|
|
114
|
-
import_error_codes.RegistryErrorCode.AGENT_NOT_INSTALLED,
|
|
115
|
-
import_types.ErrorScope.AGENT_REGISTRY,
|
|
116
|
-
import_types.ErrorType.USER,
|
|
117
|
-
`Agent '${agentId}' is not installed`,
|
|
118
|
-
{ agentId },
|
|
119
|
-
'Use "dexto list-agents --installed" to see installed agents'
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
static agentProtected(agentId) {
|
|
123
|
-
return new import_errors.DextoRuntimeError(
|
|
124
|
-
import_error_codes.RegistryErrorCode.AGENT_PROTECTED,
|
|
125
|
-
import_types.ErrorScope.AGENT_REGISTRY,
|
|
126
|
-
import_types.ErrorType.USER,
|
|
127
|
-
`Agent '${agentId}' is protected and cannot be uninstalled. Use --force to override (not recommended for critical agents)`,
|
|
128
|
-
{ agentId },
|
|
129
|
-
"Use --force to override (not recommended for critical agents)"
|
|
130
|
-
);
|
|
131
|
-
}
|
|
132
|
-
static uninstallationFailed(agentId, cause) {
|
|
133
|
-
return new import_errors.DextoRuntimeError(
|
|
134
|
-
import_error_codes.RegistryErrorCode.UNINSTALLATION_FAILED,
|
|
135
|
-
import_types.ErrorScope.AGENT_REGISTRY,
|
|
136
|
-
import_types.ErrorType.SYSTEM,
|
|
137
|
-
`Failed to uninstall agent '${agentId}': ${cause}`,
|
|
138
|
-
{ agentId, cause },
|
|
139
|
-
"Check file permissions and ensure no processes are using the agent"
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
// Registry file errors
|
|
143
|
-
static registryNotFound(registryPath, cause) {
|
|
144
|
-
return new import_errors.DextoRuntimeError(
|
|
145
|
-
import_error_codes.RegistryErrorCode.REGISTRY_NOT_FOUND,
|
|
146
|
-
import_types.ErrorScope.AGENT_REGISTRY,
|
|
147
|
-
import_types.ErrorType.SYSTEM,
|
|
148
|
-
`Agent registry not found: ${registryPath}: ${cause}`,
|
|
149
|
-
{ registryPath },
|
|
150
|
-
"This indicates a problem with the Dexto installation - please reinstall or report this issue"
|
|
151
|
-
);
|
|
152
|
-
}
|
|
153
|
-
static registryParseError(registryPath, cause) {
|
|
154
|
-
return new import_errors.DextoRuntimeError(
|
|
155
|
-
import_error_codes.RegistryErrorCode.REGISTRY_PARSE_ERROR,
|
|
156
|
-
import_types.ErrorScope.AGENT_REGISTRY,
|
|
157
|
-
import_types.ErrorType.SYSTEM,
|
|
158
|
-
`Failed to parse agent registry from ${registryPath}: ${cause}`,
|
|
159
|
-
{ registryPath, cause },
|
|
160
|
-
"This indicates a corrupted registry file - please reinstall Dexto"
|
|
161
|
-
);
|
|
162
|
-
}
|
|
163
|
-
static registryWriteError(registryPath, cause) {
|
|
164
|
-
return new import_errors.DextoRuntimeError(
|
|
165
|
-
import_error_codes.RegistryErrorCode.REGISTRY_WRITE_ERROR,
|
|
166
|
-
import_types.ErrorScope.AGENT_REGISTRY,
|
|
167
|
-
import_types.ErrorType.SYSTEM,
|
|
168
|
-
`Failed to save agent registry to ${registryPath}: ${cause}`,
|
|
169
|
-
{ registryPath, cause },
|
|
170
|
-
"Check file permissions and available disk space"
|
|
171
|
-
);
|
|
172
|
-
}
|
|
173
|
-
// Auto-install control errors
|
|
174
|
-
static agentNotInstalledAutoInstallDisabled(agentId, availableAgents) {
|
|
175
|
-
return new import_errors.DextoRuntimeError(
|
|
176
|
-
import_error_codes.RegistryErrorCode.AGENT_NOT_INSTALLED_AUTO_INSTALL_DISABLED,
|
|
177
|
-
import_types.ErrorScope.AGENT_REGISTRY,
|
|
178
|
-
import_types.ErrorType.USER,
|
|
179
|
-
`Agent '${agentId}' is not installed locally and auto-install is disabled`,
|
|
180
|
-
{ agentId, availableAgents },
|
|
181
|
-
`Use 'dexto install ${agentId}' to install it manually, or use a file path for custom agents`
|
|
182
|
-
);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
186
|
-
0 && (module.exports = {
|
|
187
|
-
RegistryError
|
|
188
|
-
});
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { DextoRuntimeError } from '../../errors/index.js';
|
|
2
|
-
/**
|
|
3
|
-
* Registry runtime error factory methods
|
|
4
|
-
* Creates properly typed errors for registry operations
|
|
5
|
-
*/
|
|
6
|
-
export declare class RegistryError {
|
|
7
|
-
static agentNotFound(agentId: string, availableAgents: string[]): DextoRuntimeError<{
|
|
8
|
-
agentId: string;
|
|
9
|
-
availableAgents: string[];
|
|
10
|
-
}>;
|
|
11
|
-
static agentInvalidEntry(agentId: string, reason: string): DextoRuntimeError<{
|
|
12
|
-
agentId: string;
|
|
13
|
-
reason: string;
|
|
14
|
-
}>;
|
|
15
|
-
static agentAlreadyExists(agentId: string): DextoRuntimeError<{
|
|
16
|
-
agentId: string;
|
|
17
|
-
}>;
|
|
18
|
-
static customAgentNameConflict(agentId: string): DextoRuntimeError<{
|
|
19
|
-
agentId: string;
|
|
20
|
-
conflictType: string;
|
|
21
|
-
}>;
|
|
22
|
-
static installationFailed(agentId: string, cause: string): DextoRuntimeError<{
|
|
23
|
-
agentId: string;
|
|
24
|
-
cause: string;
|
|
25
|
-
}>;
|
|
26
|
-
static installationValidationFailed(agentId: string, missingPath: string): DextoRuntimeError<{
|
|
27
|
-
agentId: string;
|
|
28
|
-
missingPath: string;
|
|
29
|
-
}>;
|
|
30
|
-
static configNotFound(configPath: string): DextoRuntimeError<{
|
|
31
|
-
configPath: string;
|
|
32
|
-
}>;
|
|
33
|
-
static mainConfigMissing(agentId: string, expectedPath: string): DextoRuntimeError<{
|
|
34
|
-
agentId: string;
|
|
35
|
-
expectedPath: string;
|
|
36
|
-
}>;
|
|
37
|
-
static agentNotInstalled(agentId: string): DextoRuntimeError<{
|
|
38
|
-
agentId: string;
|
|
39
|
-
}>;
|
|
40
|
-
static agentProtected(agentId: string): DextoRuntimeError<{
|
|
41
|
-
agentId: string;
|
|
42
|
-
}>;
|
|
43
|
-
static uninstallationFailed(agentId: string, cause: string): DextoRuntimeError<{
|
|
44
|
-
agentId: string;
|
|
45
|
-
cause: string;
|
|
46
|
-
}>;
|
|
47
|
-
static registryNotFound(registryPath: string, cause: string): DextoRuntimeError<{
|
|
48
|
-
registryPath: string;
|
|
49
|
-
}>;
|
|
50
|
-
static registryParseError(registryPath: string, cause: string): DextoRuntimeError<{
|
|
51
|
-
registryPath: string;
|
|
52
|
-
cause: string;
|
|
53
|
-
}>;
|
|
54
|
-
static registryWriteError(registryPath: string, cause: string): DextoRuntimeError<{
|
|
55
|
-
registryPath: string;
|
|
56
|
-
cause: string;
|
|
57
|
-
}>;
|
|
58
|
-
static agentNotInstalledAutoInstallDisabled(agentId: string, availableAgents: string[]): DextoRuntimeError<{
|
|
59
|
-
agentId: string;
|
|
60
|
-
availableAgents: string[];
|
|
61
|
-
}>;
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/agent/registry/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAI1D;;;GAGG;AACH,qBAAa,aAAa;IAEtB,MAAM,CAAC,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE;;;;IAW/D,MAAM,CAAC,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;;;;IAWxD,MAAM,CAAC,kBAAkB,CAAC,OAAO,EAAE,MAAM;;;IAWzC,MAAM,CAAC,uBAAuB,CAAC,OAAO,EAAE,MAAM;;;;IAY9C,MAAM,CAAC,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;IAWxD,MAAM,CAAC,4BAA4B,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;;;;IAYxE,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM;;;IAWxC,MAAM,CAAC,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM;;;;IAY9D,MAAM,CAAC,iBAAiB,CAAC,OAAO,EAAE,MAAM;;;IAWxC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM;;;IAWrC,MAAM,CAAC,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;IAY1D,MAAM,CAAC,gBAAgB,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;IAW3D,MAAM,CAAC,kBAAkB,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;IAW7D,MAAM,CAAC,kBAAkB,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;;;;IAY7D,MAAM,CAAC,oCAAoC,CAAC,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE;;;;CAUzF"}
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import "../../chunk-C6A6W6XS.js";
|
|
2
|
-
import { DextoRuntimeError } from "../../errors/index.js";
|
|
3
|
-
import { ErrorScope, ErrorType } from "../../errors/types.js";
|
|
4
|
-
import { RegistryErrorCode } from "./error-codes.js";
|
|
5
|
-
class RegistryError {
|
|
6
|
-
// Agent lookup errors
|
|
7
|
-
static agentNotFound(agentId, availableAgents) {
|
|
8
|
-
return new DextoRuntimeError(
|
|
9
|
-
RegistryErrorCode.AGENT_NOT_FOUND,
|
|
10
|
-
ErrorScope.AGENT_REGISTRY,
|
|
11
|
-
ErrorType.USER,
|
|
12
|
-
`Agent '${agentId}' not found in registry`,
|
|
13
|
-
{ agentId, availableAgents },
|
|
14
|
-
`Available agents: ${availableAgents.join(", ")}. Use a file path for custom agents.`
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
static agentInvalidEntry(agentId, reason) {
|
|
18
|
-
return new DextoRuntimeError(
|
|
19
|
-
RegistryErrorCode.AGENT_INVALID_ENTRY,
|
|
20
|
-
ErrorScope.AGENT_REGISTRY,
|
|
21
|
-
ErrorType.SYSTEM,
|
|
22
|
-
`Registry entry for '${agentId}' is invalid: ${reason}`,
|
|
23
|
-
{ agentId, reason },
|
|
24
|
-
"This indicates a problem with the agent registry - please report this issue"
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
static agentAlreadyExists(agentId) {
|
|
28
|
-
return new DextoRuntimeError(
|
|
29
|
-
RegistryErrorCode.AGENT_ALREADY_EXISTS,
|
|
30
|
-
ErrorScope.AGENT_REGISTRY,
|
|
31
|
-
ErrorType.USER,
|
|
32
|
-
`Agent '${agentId}' already exists in user registry`,
|
|
33
|
-
{ agentId },
|
|
34
|
-
"Choose a different name or uninstall the existing agent first"
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
static customAgentNameConflict(agentId) {
|
|
38
|
-
return new DextoRuntimeError(
|
|
39
|
-
RegistryErrorCode.AGENT_ALREADY_EXISTS,
|
|
40
|
-
ErrorScope.AGENT_REGISTRY,
|
|
41
|
-
ErrorType.USER,
|
|
42
|
-
`Cannot create custom agent '${agentId}': name conflicts with builtin agent`,
|
|
43
|
-
{ agentId, conflictType: "builtin" },
|
|
44
|
-
"Choose a different name for your custom agent"
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
// Installation errors
|
|
48
|
-
static installationFailed(agentId, cause) {
|
|
49
|
-
return new DextoRuntimeError(
|
|
50
|
-
RegistryErrorCode.INSTALLATION_FAILED,
|
|
51
|
-
ErrorScope.AGENT_REGISTRY,
|
|
52
|
-
ErrorType.SYSTEM,
|
|
53
|
-
`Failed to install agent '${agentId}': ${cause}`,
|
|
54
|
-
{ agentId, cause },
|
|
55
|
-
"Check network connection and available disk space"
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
static installationValidationFailed(agentId, missingPath) {
|
|
59
|
-
return new DextoRuntimeError(
|
|
60
|
-
RegistryErrorCode.INSTALLATION_VALIDATION_FAILED,
|
|
61
|
-
ErrorScope.AGENT_REGISTRY,
|
|
62
|
-
ErrorType.SYSTEM,
|
|
63
|
-
`Installation validation failed for '${agentId}': missing main config`,
|
|
64
|
-
{ agentId, missingPath },
|
|
65
|
-
"This indicates a problem with the agent bundle - please report this issue"
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
// Config file errors
|
|
69
|
-
static configNotFound(configPath) {
|
|
70
|
-
return new DextoRuntimeError(
|
|
71
|
-
RegistryErrorCode.CONFIG_NOT_FOUND,
|
|
72
|
-
ErrorScope.AGENT_REGISTRY,
|
|
73
|
-
ErrorType.SYSTEM,
|
|
74
|
-
`Agent config file not found: ${configPath}`,
|
|
75
|
-
{ configPath },
|
|
76
|
-
"This indicates a problem with the agent installation"
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
static mainConfigMissing(agentId, expectedPath) {
|
|
80
|
-
return new DextoRuntimeError(
|
|
81
|
-
RegistryErrorCode.MAIN_CONFIG_MISSING,
|
|
82
|
-
ErrorScope.AGENT_REGISTRY,
|
|
83
|
-
ErrorType.SYSTEM,
|
|
84
|
-
`Main config file not found for agent '${agentId}': ${expectedPath}`,
|
|
85
|
-
{ agentId, expectedPath },
|
|
86
|
-
"This indicates a problem with the agent bundle structure"
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
// Uninstallation errors
|
|
90
|
-
static agentNotInstalled(agentId) {
|
|
91
|
-
return new DextoRuntimeError(
|
|
92
|
-
RegistryErrorCode.AGENT_NOT_INSTALLED,
|
|
93
|
-
ErrorScope.AGENT_REGISTRY,
|
|
94
|
-
ErrorType.USER,
|
|
95
|
-
`Agent '${agentId}' is not installed`,
|
|
96
|
-
{ agentId },
|
|
97
|
-
'Use "dexto list-agents --installed" to see installed agents'
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
static agentProtected(agentId) {
|
|
101
|
-
return new DextoRuntimeError(
|
|
102
|
-
RegistryErrorCode.AGENT_PROTECTED,
|
|
103
|
-
ErrorScope.AGENT_REGISTRY,
|
|
104
|
-
ErrorType.USER,
|
|
105
|
-
`Agent '${agentId}' is protected and cannot be uninstalled. Use --force to override (not recommended for critical agents)`,
|
|
106
|
-
{ agentId },
|
|
107
|
-
"Use --force to override (not recommended for critical agents)"
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
static uninstallationFailed(agentId, cause) {
|
|
111
|
-
return new DextoRuntimeError(
|
|
112
|
-
RegistryErrorCode.UNINSTALLATION_FAILED,
|
|
113
|
-
ErrorScope.AGENT_REGISTRY,
|
|
114
|
-
ErrorType.SYSTEM,
|
|
115
|
-
`Failed to uninstall agent '${agentId}': ${cause}`,
|
|
116
|
-
{ agentId, cause },
|
|
117
|
-
"Check file permissions and ensure no processes are using the agent"
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
// Registry file errors
|
|
121
|
-
static registryNotFound(registryPath, cause) {
|
|
122
|
-
return new DextoRuntimeError(
|
|
123
|
-
RegistryErrorCode.REGISTRY_NOT_FOUND,
|
|
124
|
-
ErrorScope.AGENT_REGISTRY,
|
|
125
|
-
ErrorType.SYSTEM,
|
|
126
|
-
`Agent registry not found: ${registryPath}: ${cause}`,
|
|
127
|
-
{ registryPath },
|
|
128
|
-
"This indicates a problem with the Dexto installation - please reinstall or report this issue"
|
|
129
|
-
);
|
|
130
|
-
}
|
|
131
|
-
static registryParseError(registryPath, cause) {
|
|
132
|
-
return new DextoRuntimeError(
|
|
133
|
-
RegistryErrorCode.REGISTRY_PARSE_ERROR,
|
|
134
|
-
ErrorScope.AGENT_REGISTRY,
|
|
135
|
-
ErrorType.SYSTEM,
|
|
136
|
-
`Failed to parse agent registry from ${registryPath}: ${cause}`,
|
|
137
|
-
{ registryPath, cause },
|
|
138
|
-
"This indicates a corrupted registry file - please reinstall Dexto"
|
|
139
|
-
);
|
|
140
|
-
}
|
|
141
|
-
static registryWriteError(registryPath, cause) {
|
|
142
|
-
return new DextoRuntimeError(
|
|
143
|
-
RegistryErrorCode.REGISTRY_WRITE_ERROR,
|
|
144
|
-
ErrorScope.AGENT_REGISTRY,
|
|
145
|
-
ErrorType.SYSTEM,
|
|
146
|
-
`Failed to save agent registry to ${registryPath}: ${cause}`,
|
|
147
|
-
{ registryPath, cause },
|
|
148
|
-
"Check file permissions and available disk space"
|
|
149
|
-
);
|
|
150
|
-
}
|
|
151
|
-
// Auto-install control errors
|
|
152
|
-
static agentNotInstalledAutoInstallDisabled(agentId, availableAgents) {
|
|
153
|
-
return new DextoRuntimeError(
|
|
154
|
-
RegistryErrorCode.AGENT_NOT_INSTALLED_AUTO_INSTALL_DISABLED,
|
|
155
|
-
ErrorScope.AGENT_REGISTRY,
|
|
156
|
-
ErrorType.USER,
|
|
157
|
-
`Agent '${agentId}' is not installed locally and auto-install is disabled`,
|
|
158
|
-
{ agentId, availableAgents },
|
|
159
|
-
`Use 'dexto install ${agentId}' to install it manually, or use a file path for custom agents`
|
|
160
|
-
);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
export {
|
|
164
|
-
RegistryError
|
|
165
|
-
};
|