@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
package/dist/plugins/index.cjs
DELETED
|
@@ -1,61 +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 plugins_exports = {};
|
|
20
|
-
__export(plugins_exports, {
|
|
21
|
-
BuiltInPluginConfigSchema: () => import_schemas.BuiltInPluginConfigSchema,
|
|
22
|
-
ContentPolicyPlugin: () => import_content_policy.ContentPolicyPlugin,
|
|
23
|
-
CustomPluginConfigSchema: () => import_schemas.CustomPluginConfigSchema,
|
|
24
|
-
PluginErrorCode: () => import_error_codes.PluginErrorCode,
|
|
25
|
-
PluginManager: () => import_manager.PluginManager,
|
|
26
|
-
PluginRegistry: () => import_registry.PluginRegistry,
|
|
27
|
-
PluginsConfigSchema: () => import_schemas.PluginsConfigSchema,
|
|
28
|
-
RegistryPluginConfigSchema: () => import_schemas.RegistryPluginConfigSchema,
|
|
29
|
-
ResponseSanitizerPlugin: () => import_response_sanitizer.ResponseSanitizerPlugin,
|
|
30
|
-
loadPluginModule: () => import_loader.loadPluginModule,
|
|
31
|
-
pluginRegistry: () => import_registry.pluginRegistry,
|
|
32
|
-
registerBuiltInPlugins: () => import_builtins.registerBuiltInPlugins,
|
|
33
|
-
resolvePluginPath: () => import_loader.resolvePluginPath,
|
|
34
|
-
validatePluginShape: () => import_loader.validatePluginShape
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(plugins_exports);
|
|
37
|
-
var import_manager = require("./manager.js");
|
|
38
|
-
var import_schemas = require("./schemas.js");
|
|
39
|
-
var import_registry = require("./registry.js");
|
|
40
|
-
var import_error_codes = require("./error-codes.js");
|
|
41
|
-
var import_loader = require("./loader.js");
|
|
42
|
-
var import_builtins = require("./registrations/builtins.js");
|
|
43
|
-
var import_content_policy = require("./builtins/content-policy.js");
|
|
44
|
-
var import_response_sanitizer = require("./builtins/response-sanitizer.js");
|
|
45
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
-
0 && (module.exports = {
|
|
47
|
-
BuiltInPluginConfigSchema,
|
|
48
|
-
ContentPolicyPlugin,
|
|
49
|
-
CustomPluginConfigSchema,
|
|
50
|
-
PluginErrorCode,
|
|
51
|
-
PluginManager,
|
|
52
|
-
PluginRegistry,
|
|
53
|
-
PluginsConfigSchema,
|
|
54
|
-
RegistryPluginConfigSchema,
|
|
55
|
-
ResponseSanitizerPlugin,
|
|
56
|
-
loadPluginModule,
|
|
57
|
-
pluginRegistry,
|
|
58
|
-
registerBuiltInPlugins,
|
|
59
|
-
resolvePluginPath,
|
|
60
|
-
validatePluginShape
|
|
61
|
-
});
|
package/dist/plugins/index.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Plugin System
|
|
3
|
-
*
|
|
4
|
-
* Unified plugin architecture for extending agent behavior at key extension points.
|
|
5
|
-
* Replaces the hooks system from PR #385 with a more flexible plugin model.
|
|
6
|
-
*/
|
|
7
|
-
export type { DextoPlugin, PluginConfig, PluginExecutionContext, PluginResult, PluginNotice, ExtensionPoint, BeforeLLMRequestPayload, BeforeToolCallPayload, AfterToolResultPayload, BeforeResponsePayload, } from './types.js';
|
|
8
|
-
export { PluginManager } from './manager.js';
|
|
9
|
-
export type { PluginManagerOptions, ExecutionContextOptions } from './manager.js';
|
|
10
|
-
export { CustomPluginConfigSchema, BuiltInPluginConfigSchema, PluginsConfigSchema, RegistryPluginConfigSchema, } from './schemas.js';
|
|
11
|
-
export type { PluginsConfig, ValidatedPluginsConfig, RegistryPluginConfig } from './schemas.js';
|
|
12
|
-
export { PluginRegistry, pluginRegistry } from './registry.js';
|
|
13
|
-
export type { PluginProvider, PluginCreationContext } from './registry.js';
|
|
14
|
-
export { PluginErrorCode } from './error-codes.js';
|
|
15
|
-
export { loadPluginModule, resolvePluginPath, validatePluginShape } from './loader.js';
|
|
16
|
-
export { registerBuiltInPlugins } from './registrations/builtins.js';
|
|
17
|
-
export { ContentPolicyPlugin } from './builtins/content-policy.js';
|
|
18
|
-
export type { ContentPolicyConfig } from './builtins/content-policy.js';
|
|
19
|
-
export { ResponseSanitizerPlugin } from './builtins/response-sanitizer.js';
|
|
20
|
-
export type { ResponseSanitizerConfig } from './builtins/response-sanitizer.js';
|
|
21
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EACR,WAAW,EACX,YAAY,EACZ,sBAAsB,EACtB,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,GACxB,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,YAAY,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAGlF,OAAO,EACH,wBAAwB,EACxB,yBAAyB,EACzB,mBAAmB,EACnB,0BAA0B,GAC7B,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,aAAa,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAGhG,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/D,YAAY,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAG3E,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGnD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGvF,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAGrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,YAAY,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,YAAY,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC"}
|
package/dist/plugins/index.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import "../chunk-PTJYTZNU.js";
|
|
2
|
-
import { PluginManager } from "./manager.js";
|
|
3
|
-
import {
|
|
4
|
-
CustomPluginConfigSchema,
|
|
5
|
-
BuiltInPluginConfigSchema,
|
|
6
|
-
PluginsConfigSchema,
|
|
7
|
-
RegistryPluginConfigSchema
|
|
8
|
-
} from "./schemas.js";
|
|
9
|
-
import { PluginRegistry, pluginRegistry } from "./registry.js";
|
|
10
|
-
import { PluginErrorCode } from "./error-codes.js";
|
|
11
|
-
import { loadPluginModule, resolvePluginPath, validatePluginShape } from "./loader.js";
|
|
12
|
-
import { registerBuiltInPlugins } from "./registrations/builtins.js";
|
|
13
|
-
import { ContentPolicyPlugin } from "./builtins/content-policy.js";
|
|
14
|
-
import { ResponseSanitizerPlugin } from "./builtins/response-sanitizer.js";
|
|
15
|
-
export {
|
|
16
|
-
BuiltInPluginConfigSchema,
|
|
17
|
-
ContentPolicyPlugin,
|
|
18
|
-
CustomPluginConfigSchema,
|
|
19
|
-
PluginErrorCode,
|
|
20
|
-
PluginManager,
|
|
21
|
-
PluginRegistry,
|
|
22
|
-
PluginsConfigSchema,
|
|
23
|
-
RegistryPluginConfigSchema,
|
|
24
|
-
ResponseSanitizerPlugin,
|
|
25
|
-
loadPluginModule,
|
|
26
|
-
pluginRegistry,
|
|
27
|
-
registerBuiltInPlugins,
|
|
28
|
-
resolvePluginPath,
|
|
29
|
-
validatePluginShape
|
|
30
|
-
};
|
package/dist/plugins/loader.cjs
DELETED
|
@@ -1,171 +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 loader_exports = {};
|
|
20
|
-
__export(loader_exports, {
|
|
21
|
-
loadPluginModule: () => loadPluginModule,
|
|
22
|
-
resolvePluginPath: () => resolvePluginPath,
|
|
23
|
-
validatePluginShape: () => validatePluginShape
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(loader_exports);
|
|
26
|
-
var import_path = require("path");
|
|
27
|
-
var import_url = require("url");
|
|
28
|
-
var import_errors = require("../errors/index.js");
|
|
29
|
-
var import_error_codes = require("./error-codes.js");
|
|
30
|
-
const import_meta = {};
|
|
31
|
-
function validatePluginShape(PluginClass, pluginName) {
|
|
32
|
-
if (typeof PluginClass !== "function" || !PluginClass.prototype) {
|
|
33
|
-
throw new import_errors.DextoRuntimeError(
|
|
34
|
-
import_error_codes.PluginErrorCode.PLUGIN_INVALID_SHAPE,
|
|
35
|
-
import_errors.ErrorScope.PLUGIN,
|
|
36
|
-
import_errors.ErrorType.USER,
|
|
37
|
-
`Plugin '${pluginName}' default export must be a class or constructor function`
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
const proto = PluginClass.prototype;
|
|
41
|
-
const extensionPoints = [
|
|
42
|
-
"beforeLLMRequest",
|
|
43
|
-
"beforeToolCall",
|
|
44
|
-
"afterToolResult",
|
|
45
|
-
"beforeResponse"
|
|
46
|
-
];
|
|
47
|
-
const hasExtensionPoint = extensionPoints.some((point) => typeof proto[point] === "function");
|
|
48
|
-
if (!hasExtensionPoint) {
|
|
49
|
-
throw new import_errors.DextoRuntimeError(
|
|
50
|
-
import_error_codes.PluginErrorCode.PLUGIN_INVALID_SHAPE,
|
|
51
|
-
import_errors.ErrorScope.PLUGIN,
|
|
52
|
-
import_errors.ErrorType.USER,
|
|
53
|
-
`Plugin '${pluginName}' must implement at least one extension point method`,
|
|
54
|
-
{ availableExtensionPoints: extensionPoints }
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
if ("initialize" in proto && typeof proto.initialize !== "function") {
|
|
58
|
-
throw new import_errors.DextoRuntimeError(
|
|
59
|
-
import_error_codes.PluginErrorCode.PLUGIN_INVALID_SHAPE,
|
|
60
|
-
import_errors.ErrorScope.PLUGIN,
|
|
61
|
-
import_errors.ErrorType.USER,
|
|
62
|
-
`Plugin '${pluginName}' initialize property must be a function (found ${typeof proto.initialize})`
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
if ("cleanup" in proto && typeof proto.cleanup !== "function") {
|
|
66
|
-
throw new import_errors.DextoRuntimeError(
|
|
67
|
-
import_error_codes.PluginErrorCode.PLUGIN_INVALID_SHAPE,
|
|
68
|
-
import_errors.ErrorScope.PLUGIN,
|
|
69
|
-
import_errors.ErrorType.USER,
|
|
70
|
-
`Plugin '${pluginName}' cleanup property must be a function (found ${typeof proto.cleanup})`
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
function resolvePluginPath(modulePath, configDir) {
|
|
75
|
-
if (!(0, import_path.isAbsolute)(modulePath)) {
|
|
76
|
-
throw new import_errors.DextoRuntimeError(
|
|
77
|
-
import_error_codes.PluginErrorCode.PLUGIN_CONFIGURATION_INVALID,
|
|
78
|
-
import_errors.ErrorScope.PLUGIN,
|
|
79
|
-
import_errors.ErrorType.USER,
|
|
80
|
-
"Plugin module path must be absolute (got '" + modulePath + "'). Use ${{dexto.agent_dir}} template variable for agent-relative paths.",
|
|
81
|
-
{
|
|
82
|
-
modulePath,
|
|
83
|
-
configDir,
|
|
84
|
-
hint: 'Example: module: "${{dexto.agent_dir}}/plugins/my-plugin.ts"'
|
|
85
|
-
}
|
|
86
|
-
);
|
|
87
|
-
}
|
|
88
|
-
return modulePath;
|
|
89
|
-
}
|
|
90
|
-
async function loadPluginModule(modulePath, pluginName) {
|
|
91
|
-
try {
|
|
92
|
-
let pluginModule;
|
|
93
|
-
if (modulePath.endsWith(".ts") || modulePath.endsWith(".tsx")) {
|
|
94
|
-
if (typeof process === "undefined" || !process.versions?.node) {
|
|
95
|
-
throw new import_errors.DextoRuntimeError(
|
|
96
|
-
import_error_codes.PluginErrorCode.PLUGIN_LOAD_FAILED,
|
|
97
|
-
import_errors.ErrorScope.PLUGIN,
|
|
98
|
-
import_errors.ErrorType.SYSTEM,
|
|
99
|
-
`Cannot load TypeScript plugin '${pluginName}' in browser environment. Plugins with .ts extension require Node.js runtime.`,
|
|
100
|
-
{ modulePath, pluginName }
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
const tsxPackage = "tsx/esm/api";
|
|
104
|
-
let tsx;
|
|
105
|
-
try {
|
|
106
|
-
tsx = await import(
|
|
107
|
-
/* webpackIgnore: true */
|
|
108
|
-
tsxPackage
|
|
109
|
-
);
|
|
110
|
-
} catch (importError) {
|
|
111
|
-
const err = importError;
|
|
112
|
-
if (err.code === "ERR_MODULE_NOT_FOUND") {
|
|
113
|
-
throw new import_errors.DextoRuntimeError(
|
|
114
|
-
import_error_codes.PluginErrorCode.PLUGIN_DEPENDENCY_NOT_INSTALLED,
|
|
115
|
-
import_errors.ErrorScope.PLUGIN,
|
|
116
|
-
import_errors.ErrorType.USER,
|
|
117
|
-
`Cannot load TypeScript plugin '${pluginName}': tsx package is not installed.
|
|
118
|
-
Install with: npm install tsx
|
|
119
|
-
Or pre-compile your plugin to .js for production use.`,
|
|
120
|
-
{ modulePath, pluginName, packageName: "tsx" }
|
|
121
|
-
);
|
|
122
|
-
}
|
|
123
|
-
throw importError;
|
|
124
|
-
}
|
|
125
|
-
const moduleUrl = (0, import_url.pathToFileURL)(modulePath).href;
|
|
126
|
-
pluginModule = await tsx.tsImport(moduleUrl, import_meta.url);
|
|
127
|
-
} else {
|
|
128
|
-
const moduleUrl = (0, import_url.pathToFileURL)(modulePath).href;
|
|
129
|
-
pluginModule = await import(
|
|
130
|
-
/* webpackIgnore: true */
|
|
131
|
-
moduleUrl
|
|
132
|
-
);
|
|
133
|
-
}
|
|
134
|
-
let PluginClass = pluginModule.default;
|
|
135
|
-
if (PluginClass && typeof PluginClass === "object" && "default" in PluginClass) {
|
|
136
|
-
PluginClass = PluginClass.default;
|
|
137
|
-
}
|
|
138
|
-
if (!PluginClass) {
|
|
139
|
-
throw new import_errors.DextoRuntimeError(
|
|
140
|
-
import_error_codes.PluginErrorCode.PLUGIN_INVALID_SHAPE,
|
|
141
|
-
import_errors.ErrorScope.PLUGIN,
|
|
142
|
-
import_errors.ErrorType.USER,
|
|
143
|
-
`Plugin '${pluginName}' at '${modulePath}' has no default export. Ensure your plugin exports a class as default.`,
|
|
144
|
-
{ modulePath, pluginName }
|
|
145
|
-
);
|
|
146
|
-
}
|
|
147
|
-
validatePluginShape(PluginClass, pluginName);
|
|
148
|
-
return PluginClass;
|
|
149
|
-
} catch (error) {
|
|
150
|
-
if (error instanceof import_errors.DextoRuntimeError) {
|
|
151
|
-
throw error;
|
|
152
|
-
}
|
|
153
|
-
throw new import_errors.DextoRuntimeError(
|
|
154
|
-
import_error_codes.PluginErrorCode.PLUGIN_LOAD_FAILED,
|
|
155
|
-
import_errors.ErrorScope.PLUGIN,
|
|
156
|
-
import_errors.ErrorType.SYSTEM,
|
|
157
|
-
`Failed to load plugin '${pluginName}' from '${modulePath}': ${error instanceof Error ? error.message : String(error)}`,
|
|
158
|
-
{
|
|
159
|
-
modulePath,
|
|
160
|
-
pluginName,
|
|
161
|
-
originalError: error instanceof Error ? error.message : String(error)
|
|
162
|
-
}
|
|
163
|
-
);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
167
|
-
0 && (module.exports = {
|
|
168
|
-
loadPluginModule,
|
|
169
|
-
resolvePluginPath,
|
|
170
|
-
validatePluginShape
|
|
171
|
-
});
|
package/dist/plugins/loader.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Validate that a loaded plugin implements the DextoPlugin interface correctly
|
|
3
|
-
* Performs runtime checks that complement TypeScript's compile-time type checking
|
|
4
|
-
*
|
|
5
|
-
* @param PluginClass - The plugin class constructor
|
|
6
|
-
* @param pluginName - Name for error messages
|
|
7
|
-
* @throws {DextoRuntimeError} If validation fails
|
|
8
|
-
*/
|
|
9
|
-
export declare function validatePluginShape(PluginClass: any, pluginName: string): void;
|
|
10
|
-
/**
|
|
11
|
-
* Resolve and validate plugin module path
|
|
12
|
-
* Ensures path is absolute after template variable expansion
|
|
13
|
-
*
|
|
14
|
-
* @param modulePath - Path from config (after template expansion)
|
|
15
|
-
* @param configDir - Directory containing agent config (for validation context)
|
|
16
|
-
* @returns Resolved absolute path
|
|
17
|
-
* @throws {DextoRuntimeError} If path is not absolute
|
|
18
|
-
*/
|
|
19
|
-
export declare function resolvePluginPath(modulePath: string, configDir: string): string;
|
|
20
|
-
/**
|
|
21
|
-
* Load a plugin from a module path
|
|
22
|
-
* Supports both .ts (via tsx) and .js files
|
|
23
|
-
*
|
|
24
|
-
* @param modulePath - Absolute path to plugin module
|
|
25
|
-
* @param pluginName - Name for error messages
|
|
26
|
-
* @returns Plugin class constructor
|
|
27
|
-
* @throws {DextoRuntimeError} If loading or validation fails
|
|
28
|
-
*/
|
|
29
|
-
export declare function loadPluginModule(modulePath: string, pluginName: string): Promise<any>;
|
|
30
|
-
//# sourceMappingURL=loader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/plugins/loader.ts"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAqD9E;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAoB/E;AAED;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAuG3F"}
|
package/dist/plugins/loader.js
DELETED
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import "../chunk-PTJYTZNU.js";
|
|
2
|
-
import { isAbsolute } from "path";
|
|
3
|
-
import { pathToFileURL } from "url";
|
|
4
|
-
import { DextoRuntimeError, ErrorScope, ErrorType } from "../errors/index.js";
|
|
5
|
-
import { PluginErrorCode } from "./error-codes.js";
|
|
6
|
-
function validatePluginShape(PluginClass, pluginName) {
|
|
7
|
-
if (typeof PluginClass !== "function" || !PluginClass.prototype) {
|
|
8
|
-
throw new DextoRuntimeError(
|
|
9
|
-
PluginErrorCode.PLUGIN_INVALID_SHAPE,
|
|
10
|
-
ErrorScope.PLUGIN,
|
|
11
|
-
ErrorType.USER,
|
|
12
|
-
`Plugin '${pluginName}' default export must be a class or constructor function`
|
|
13
|
-
);
|
|
14
|
-
}
|
|
15
|
-
const proto = PluginClass.prototype;
|
|
16
|
-
const extensionPoints = [
|
|
17
|
-
"beforeLLMRequest",
|
|
18
|
-
"beforeToolCall",
|
|
19
|
-
"afterToolResult",
|
|
20
|
-
"beforeResponse"
|
|
21
|
-
];
|
|
22
|
-
const hasExtensionPoint = extensionPoints.some((point) => typeof proto[point] === "function");
|
|
23
|
-
if (!hasExtensionPoint) {
|
|
24
|
-
throw new DextoRuntimeError(
|
|
25
|
-
PluginErrorCode.PLUGIN_INVALID_SHAPE,
|
|
26
|
-
ErrorScope.PLUGIN,
|
|
27
|
-
ErrorType.USER,
|
|
28
|
-
`Plugin '${pluginName}' must implement at least one extension point method`,
|
|
29
|
-
{ availableExtensionPoints: extensionPoints }
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
if ("initialize" in proto && typeof proto.initialize !== "function") {
|
|
33
|
-
throw new DextoRuntimeError(
|
|
34
|
-
PluginErrorCode.PLUGIN_INVALID_SHAPE,
|
|
35
|
-
ErrorScope.PLUGIN,
|
|
36
|
-
ErrorType.USER,
|
|
37
|
-
`Plugin '${pluginName}' initialize property must be a function (found ${typeof proto.initialize})`
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
if ("cleanup" in proto && typeof proto.cleanup !== "function") {
|
|
41
|
-
throw new DextoRuntimeError(
|
|
42
|
-
PluginErrorCode.PLUGIN_INVALID_SHAPE,
|
|
43
|
-
ErrorScope.PLUGIN,
|
|
44
|
-
ErrorType.USER,
|
|
45
|
-
`Plugin '${pluginName}' cleanup property must be a function (found ${typeof proto.cleanup})`
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
function resolvePluginPath(modulePath, configDir) {
|
|
50
|
-
if (!isAbsolute(modulePath)) {
|
|
51
|
-
throw new DextoRuntimeError(
|
|
52
|
-
PluginErrorCode.PLUGIN_CONFIGURATION_INVALID,
|
|
53
|
-
ErrorScope.PLUGIN,
|
|
54
|
-
ErrorType.USER,
|
|
55
|
-
"Plugin module path must be absolute (got '" + modulePath + "'). Use ${{dexto.agent_dir}} template variable for agent-relative paths.",
|
|
56
|
-
{
|
|
57
|
-
modulePath,
|
|
58
|
-
configDir,
|
|
59
|
-
hint: 'Example: module: "${{dexto.agent_dir}}/plugins/my-plugin.ts"'
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
return modulePath;
|
|
64
|
-
}
|
|
65
|
-
async function loadPluginModule(modulePath, pluginName) {
|
|
66
|
-
try {
|
|
67
|
-
let pluginModule;
|
|
68
|
-
if (modulePath.endsWith(".ts") || modulePath.endsWith(".tsx")) {
|
|
69
|
-
if (typeof process === "undefined" || !process.versions?.node) {
|
|
70
|
-
throw new DextoRuntimeError(
|
|
71
|
-
PluginErrorCode.PLUGIN_LOAD_FAILED,
|
|
72
|
-
ErrorScope.PLUGIN,
|
|
73
|
-
ErrorType.SYSTEM,
|
|
74
|
-
`Cannot load TypeScript plugin '${pluginName}' in browser environment. Plugins with .ts extension require Node.js runtime.`,
|
|
75
|
-
{ modulePath, pluginName }
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
const tsxPackage = "tsx/esm/api";
|
|
79
|
-
let tsx;
|
|
80
|
-
try {
|
|
81
|
-
tsx = await import(
|
|
82
|
-
/* webpackIgnore: true */
|
|
83
|
-
tsxPackage
|
|
84
|
-
);
|
|
85
|
-
} catch (importError) {
|
|
86
|
-
const err = importError;
|
|
87
|
-
if (err.code === "ERR_MODULE_NOT_FOUND") {
|
|
88
|
-
throw new DextoRuntimeError(
|
|
89
|
-
PluginErrorCode.PLUGIN_DEPENDENCY_NOT_INSTALLED,
|
|
90
|
-
ErrorScope.PLUGIN,
|
|
91
|
-
ErrorType.USER,
|
|
92
|
-
`Cannot load TypeScript plugin '${pluginName}': tsx package is not installed.
|
|
93
|
-
Install with: npm install tsx
|
|
94
|
-
Or pre-compile your plugin to .js for production use.`,
|
|
95
|
-
{ modulePath, pluginName, packageName: "tsx" }
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
throw importError;
|
|
99
|
-
}
|
|
100
|
-
const moduleUrl = pathToFileURL(modulePath).href;
|
|
101
|
-
pluginModule = await tsx.tsImport(moduleUrl, import.meta.url);
|
|
102
|
-
} else {
|
|
103
|
-
const moduleUrl = pathToFileURL(modulePath).href;
|
|
104
|
-
pluginModule = await import(
|
|
105
|
-
/* webpackIgnore: true */
|
|
106
|
-
moduleUrl
|
|
107
|
-
);
|
|
108
|
-
}
|
|
109
|
-
let PluginClass = pluginModule.default;
|
|
110
|
-
if (PluginClass && typeof PluginClass === "object" && "default" in PluginClass) {
|
|
111
|
-
PluginClass = PluginClass.default;
|
|
112
|
-
}
|
|
113
|
-
if (!PluginClass) {
|
|
114
|
-
throw new DextoRuntimeError(
|
|
115
|
-
PluginErrorCode.PLUGIN_INVALID_SHAPE,
|
|
116
|
-
ErrorScope.PLUGIN,
|
|
117
|
-
ErrorType.USER,
|
|
118
|
-
`Plugin '${pluginName}' at '${modulePath}' has no default export. Ensure your plugin exports a class as default.`,
|
|
119
|
-
{ modulePath, pluginName }
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
validatePluginShape(PluginClass, pluginName);
|
|
123
|
-
return PluginClass;
|
|
124
|
-
} catch (error) {
|
|
125
|
-
if (error instanceof DextoRuntimeError) {
|
|
126
|
-
throw error;
|
|
127
|
-
}
|
|
128
|
-
throw new DextoRuntimeError(
|
|
129
|
-
PluginErrorCode.PLUGIN_LOAD_FAILED,
|
|
130
|
-
ErrorScope.PLUGIN,
|
|
131
|
-
ErrorType.SYSTEM,
|
|
132
|
-
`Failed to load plugin '${pluginName}' from '${modulePath}': ${error instanceof Error ? error.message : String(error)}`,
|
|
133
|
-
{
|
|
134
|
-
modulePath,
|
|
135
|
-
pluginName,
|
|
136
|
-
originalError: error instanceof Error ? error.message : String(error)
|
|
137
|
-
}
|
|
138
|
-
);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
export {
|
|
142
|
-
loadPluginModule,
|
|
143
|
-
resolvePluginPath,
|
|
144
|
-
validatePluginShape
|
|
145
|
-
};
|