@robota-sdk/agent-core 3.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +180 -0
- package/LICENSE +21 -0
- package/README.md +230 -0
- package/dist/abstracts/abstract-agent.d.ts +56 -0
- package/dist/abstracts/abstract-agent.d.ts.map +1 -0
- package/dist/abstracts/abstract-agent.js +55 -0
- package/dist/abstracts/abstract-agent.js.map +1 -0
- package/dist/abstracts/abstract-ai-provider.d.ts +187 -0
- package/dist/abstracts/abstract-ai-provider.d.ts.map +1 -0
- package/dist/abstracts/abstract-ai-provider.js +252 -0
- package/dist/abstracts/abstract-ai-provider.js.map +1 -0
- package/dist/abstracts/abstract-executor.d.ts +110 -0
- package/dist/abstracts/abstract-executor.d.ts.map +1 -0
- package/dist/abstracts/abstract-executor.js +156 -0
- package/dist/abstracts/abstract-executor.js.map +1 -0
- package/dist/abstracts/abstract-manager.d.ts +42 -0
- package/dist/abstracts/abstract-manager.d.ts.map +1 -0
- package/dist/abstracts/abstract-manager.js +49 -0
- package/dist/abstracts/abstract-manager.js.map +1 -0
- package/dist/abstracts/abstract-module.d.ts +365 -0
- package/dist/abstracts/abstract-module.d.ts.map +1 -0
- package/dist/abstracts/abstract-module.js +474 -0
- package/dist/abstracts/abstract-module.js.map +1 -0
- package/dist/abstracts/abstract-plugin.d.ts +369 -0
- package/dist/abstracts/abstract-plugin.d.ts.map +1 -0
- package/dist/abstracts/abstract-plugin.js +258 -0
- package/dist/abstracts/abstract-plugin.js.map +1 -0
- package/dist/abstracts/abstract-tool.d.ts +175 -0
- package/dist/abstracts/abstract-tool.d.ts.map +1 -0
- package/dist/abstracts/abstract-tool.js +140 -0
- package/dist/abstracts/abstract-tool.js.map +1 -0
- package/dist/abstracts/abstract-workflow-converter.d.ts +136 -0
- package/dist/abstracts/abstract-workflow-converter.d.ts.map +1 -0
- package/dist/abstracts/abstract-workflow-converter.js +252 -0
- package/dist/abstracts/abstract-workflow-converter.js.map +1 -0
- package/dist/abstracts/abstract-workflow-validator.d.ts +203 -0
- package/dist/abstracts/abstract-workflow-validator.d.ts.map +1 -0
- package/dist/abstracts/abstract-workflow-validator.js +447 -0
- package/dist/abstracts/abstract-workflow-validator.js.map +1 -0
- package/dist/abstracts/index.d.ts +6 -0
- package/dist/abstracts/index.d.ts.map +1 -0
- package/dist/abstracts/index.js +9 -0
- package/dist/abstracts/index.js.map +1 -0
- package/dist/agents/constants.d.ts +23 -0
- package/dist/agents/constants.d.ts.map +1 -0
- package/dist/agents/constants.js +22 -0
- package/dist/agents/constants.js.map +1 -0
- package/dist/agents/index.d.ts +1 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +4 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/robota.test.d.ts +2 -0
- package/dist/agents/robota.test.d.ts.map +1 -0
- package/dist/agents/robota.test.js +416 -0
- package/dist/agents/robota.test.js.map +1 -0
- package/dist/browser/builtin-templates.json +107 -0
- package/dist/browser/index.d.ts +4237 -0
- package/dist/browser/index.js +4 -0
- package/dist/core/robota.d.ts +694 -0
- package/dist/core/robota.d.ts.map +1 -0
- package/dist/core/robota.js +1277 -0
- package/dist/core/robota.js.map +1 -0
- package/dist/executors/local-executor.d.ts +96 -0
- package/dist/executors/local-executor.d.ts.map +1 -0
- package/dist/executors/local-executor.js +197 -0
- package/dist/executors/local-executor.js.map +1 -0
- package/dist/executors/local-executor.test.d.ts +2 -0
- package/dist/executors/local-executor.test.d.ts.map +1 -0
- package/dist/executors/local-executor.test.js +192 -0
- package/dist/executors/local-executor.test.js.map +1 -0
- package/dist/index.d.ts +274 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +235 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/agent.d.ts +198 -0
- package/dist/interfaces/agent.d.ts.map +1 -0
- package/dist/interfaces/agent.js +2 -0
- package/dist/interfaces/agent.js.map +1 -0
- package/dist/interfaces/event-service.d.ts +79 -0
- package/dist/interfaces/event-service.d.ts.map +1 -0
- package/dist/interfaces/event-service.js +2 -0
- package/dist/interfaces/event-service.js.map +1 -0
- package/dist/interfaces/executor.d.ts +128 -0
- package/dist/interfaces/executor.d.ts.map +1 -0
- package/dist/interfaces/executor.js +2 -0
- package/dist/interfaces/executor.js.map +1 -0
- package/dist/interfaces/history-module.d.ts +19 -0
- package/dist/interfaces/history-module.d.ts.map +1 -0
- package/dist/interfaces/history-module.js +2 -0
- package/dist/interfaces/history-module.js.map +1 -0
- package/dist/interfaces/index.d.ts +13 -0
- package/dist/interfaces/index.d.ts.map +1 -0
- package/dist/interfaces/index.js +4 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/interfaces/manager.d.ts +142 -0
- package/dist/interfaces/manager.d.ts.map +1 -0
- package/dist/interfaces/manager.js +2 -0
- package/dist/interfaces/manager.js.map +1 -0
- package/dist/interfaces/messages.d.ts +75 -0
- package/dist/interfaces/messages.d.ts.map +1 -0
- package/dist/interfaces/messages.js +29 -0
- package/dist/interfaces/messages.js.map +1 -0
- package/dist/interfaces/progress-reporting.d.ts +86 -0
- package/dist/interfaces/progress-reporting.d.ts.map +1 -0
- package/dist/interfaces/progress-reporting.js +37 -0
- package/dist/interfaces/progress-reporting.js.map +1 -0
- package/dist/interfaces/provider.d.ts +217 -0
- package/dist/interfaces/provider.d.ts.map +1 -0
- package/dist/interfaces/provider.js +2 -0
- package/dist/interfaces/provider.js.map +1 -0
- package/dist/interfaces/service.d.ts +205 -0
- package/dist/interfaces/service.d.ts.map +1 -0
- package/dist/interfaces/service.js +6 -0
- package/dist/interfaces/service.js.map +1 -0
- package/dist/interfaces/tool.d.ts +248 -0
- package/dist/interfaces/tool.d.ts.map +1 -0
- package/dist/interfaces/tool.js +2 -0
- package/dist/interfaces/tool.js.map +1 -0
- package/dist/interfaces/types.d.ts +71 -0
- package/dist/interfaces/types.d.ts.map +1 -0
- package/dist/interfaces/types.js +33 -0
- package/dist/interfaces/types.js.map +1 -0
- package/dist/interfaces/workflow-converter.d.ts +193 -0
- package/dist/interfaces/workflow-converter.d.ts.map +1 -0
- package/dist/interfaces/workflow-converter.js +11 -0
- package/dist/interfaces/workflow-converter.js.map +1 -0
- package/dist/interfaces/workflow-validator.d.ts +209 -0
- package/dist/interfaces/workflow-validator.d.ts.map +1 -0
- package/dist/interfaces/workflow-validator.js +16 -0
- package/dist/interfaces/workflow-validator.js.map +1 -0
- package/dist/managers/agent-factory.d.ts +132 -0
- package/dist/managers/agent-factory.d.ts.map +1 -0
- package/dist/managers/agent-factory.js +284 -0
- package/dist/managers/agent-factory.js.map +1 -0
- package/dist/managers/agent-factory.test.d.ts +2 -0
- package/dist/managers/agent-factory.test.d.ts.map +1 -0
- package/dist/managers/agent-factory.test.js +249 -0
- package/dist/managers/agent-factory.test.js.map +1 -0
- package/dist/managers/agent-templates.d.ts +84 -0
- package/dist/managers/agent-templates.d.ts.map +1 -0
- package/dist/managers/agent-templates.js +159 -0
- package/dist/managers/agent-templates.js.map +1 -0
- package/dist/managers/ai-provider-manager.d.ts +80 -0
- package/dist/managers/ai-provider-manager.d.ts.map +1 -0
- package/dist/managers/ai-provider-manager.js +226 -0
- package/dist/managers/ai-provider-manager.js.map +1 -0
- package/dist/managers/conversation-history-manager.d.ts +455 -0
- package/dist/managers/conversation-history-manager.d.ts.map +1 -0
- package/dist/managers/conversation-history-manager.js +578 -0
- package/dist/managers/conversation-history-manager.js.map +1 -0
- package/dist/managers/conversation-history-manager.test.d.ts +2 -0
- package/dist/managers/conversation-history-manager.test.d.ts.map +1 -0
- package/dist/managers/conversation-history-manager.test.js +374 -0
- package/dist/managers/conversation-history-manager.test.js.map +1 -0
- package/dist/managers/index.d.ts +8 -0
- package/dist/managers/index.d.ts.map +1 -0
- package/dist/managers/index.js +8 -0
- package/dist/managers/index.js.map +1 -0
- package/dist/managers/module-registry.d.ts +161 -0
- package/dist/managers/module-registry.d.ts.map +1 -0
- package/dist/managers/module-registry.js +519 -0
- package/dist/managers/module-registry.js.map +1 -0
- package/dist/managers/module-type-registry.d.ts +113 -0
- package/dist/managers/module-type-registry.d.ts.map +1 -0
- package/dist/managers/module-type-registry.js +439 -0
- package/dist/managers/module-type-registry.js.map +1 -0
- package/dist/managers/plugins.d.ts +166 -0
- package/dist/managers/plugins.d.ts.map +1 -0
- package/dist/managers/plugins.js +339 -0
- package/dist/managers/plugins.js.map +1 -0
- package/dist/managers/tool-manager.d.ts +70 -0
- package/dist/managers/tool-manager.d.ts.map +1 -0
- package/dist/managers/tool-manager.js +138 -0
- package/dist/managers/tool-manager.js.map +1 -0
- package/dist/managers/tool-manager.test.d.ts +2 -0
- package/dist/managers/tool-manager.test.d.ts.map +1 -0
- package/dist/managers/tool-manager.test.js +186 -0
- package/dist/managers/tool-manager.test.js.map +1 -0
- package/dist/node/builtin-templates.json +107 -0
- package/dist/node/index.cjs +4 -0
- package/dist/node/index.d.cts +4237 -0
- package/dist/node/index.d.ts +4237 -0
- package/dist/node/index.js +4 -0
- package/dist/plugins/conversation-history/conversation-history-plugin.d.ts +67 -0
- package/dist/plugins/conversation-history/conversation-history-plugin.d.ts.map +1 -0
- package/dist/plugins/conversation-history/conversation-history-plugin.js +270 -0
- package/dist/plugins/conversation-history/conversation-history-plugin.js.map +1 -0
- package/dist/plugins/conversation-history/index.d.ts +3 -0
- package/dist/plugins/conversation-history/index.d.ts.map +1 -0
- package/dist/plugins/conversation-history/index.js +2 -0
- package/dist/plugins/conversation-history/index.js.map +1 -0
- package/dist/plugins/conversation-history/storages/database-storage.d.ts +19 -0
- package/dist/plugins/conversation-history/storages/database-storage.d.ts.map +1 -0
- package/dist/plugins/conversation-history/storages/database-storage.js +94 -0
- package/dist/plugins/conversation-history/storages/database-storage.js.map +1 -0
- package/dist/plugins/conversation-history/storages/file-storage.d.ts +15 -0
- package/dist/plugins/conversation-history/storages/file-storage.d.ts.map +1 -0
- package/dist/plugins/conversation-history/storages/file-storage.js +94 -0
- package/dist/plugins/conversation-history/storages/file-storage.js.map +1 -0
- package/dist/plugins/conversation-history/storages/index.d.ts +4 -0
- package/dist/plugins/conversation-history/storages/index.d.ts.map +1 -0
- package/dist/plugins/conversation-history/storages/index.js +4 -0
- package/dist/plugins/conversation-history/storages/index.js.map +1 -0
- package/dist/plugins/conversation-history/storages/memory-storage.d.ts +15 -0
- package/dist/plugins/conversation-history/storages/memory-storage.d.ts.map +1 -0
- package/dist/plugins/conversation-history/storages/memory-storage.js +33 -0
- package/dist/plugins/conversation-history/storages/memory-storage.js.map +1 -0
- package/dist/plugins/conversation-history/types.d.ts +61 -0
- package/dist/plugins/conversation-history/types.d.ts.map +1 -0
- package/dist/plugins/conversation-history/types.js +2 -0
- package/dist/plugins/conversation-history/types.js.map +1 -0
- package/dist/plugins/error-handling/context-adapter.d.ts +30 -0
- package/dist/plugins/error-handling/context-adapter.d.ts.map +1 -0
- package/dist/plugins/error-handling/context-adapter.js +41 -0
- package/dist/plugins/error-handling/context-adapter.js.map +1 -0
- package/dist/plugins/error-handling/error-handling-plugin.d.ts +49 -0
- package/dist/plugins/error-handling/error-handling-plugin.d.ts.map +1 -0
- package/dist/plugins/error-handling/error-handling-plugin.js +229 -0
- package/dist/plugins/error-handling/error-handling-plugin.js.map +1 -0
- package/dist/plugins/error-handling/index.d.ts +10 -0
- package/dist/plugins/error-handling/index.d.ts.map +1 -0
- package/dist/plugins/error-handling/index.js +10 -0
- package/dist/plugins/error-handling/index.js.map +1 -0
- package/dist/plugins/error-handling/types.d.ts +73 -0
- package/dist/plugins/error-handling/types.d.ts.map +1 -0
- package/dist/plugins/error-handling/types.js +14 -0
- package/dist/plugins/error-handling/types.js.map +1 -0
- package/dist/plugins/event-emitter/metrics.d.ts +17 -0
- package/dist/plugins/event-emitter/metrics.d.ts.map +1 -0
- package/dist/plugins/event-emitter/metrics.js +17 -0
- package/dist/plugins/event-emitter/metrics.js.map +1 -0
- package/dist/plugins/event-emitter/types.d.ts +112 -0
- package/dist/plugins/event-emitter/types.d.ts.map +1 -0
- package/dist/plugins/event-emitter/types.js +65 -0
- package/dist/plugins/event-emitter/types.js.map +1 -0
- package/dist/plugins/event-emitter-plugin.d.ts +222 -0
- package/dist/plugins/event-emitter-plugin.d.ts.map +1 -0
- package/dist/plugins/event-emitter-plugin.js +432 -0
- package/dist/plugins/event-emitter-plugin.js.map +1 -0
- package/dist/plugins/event-emitter-plugin.test.d.ts +2 -0
- package/dist/plugins/event-emitter-plugin.test.d.ts.map +1 -0
- package/dist/plugins/event-emitter-plugin.test.js +94 -0
- package/dist/plugins/event-emitter-plugin.test.js.map +1 -0
- package/dist/plugins/execution/execution-analytics-plugin.d.ts +129 -0
- package/dist/plugins/execution/execution-analytics-plugin.d.ts.map +1 -0
- package/dist/plugins/execution/execution-analytics-plugin.js +517 -0
- package/dist/plugins/execution/execution-analytics-plugin.js.map +1 -0
- package/dist/plugins/execution/index.d.ts +3 -0
- package/dist/plugins/execution/index.d.ts.map +1 -0
- package/dist/plugins/execution/index.js +2 -0
- package/dist/plugins/execution/index.js.map +1 -0
- package/dist/plugins/execution/types.d.ts +90 -0
- package/dist/plugins/execution/types.d.ts.map +1 -0
- package/dist/plugins/execution/types.js +2 -0
- package/dist/plugins/execution/types.js.map +1 -0
- package/dist/plugins/index.d.ts +10 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +11 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/limits/types.d.ts +61 -0
- package/dist/plugins/limits/types.d.ts.map +1 -0
- package/dist/plugins/limits/types.js +2 -0
- package/dist/plugins/limits/types.js.map +1 -0
- package/dist/plugins/limits-plugin.d.ts +113 -0
- package/dist/plugins/limits-plugin.d.ts.map +1 -0
- package/dist/plugins/limits-plugin.js +380 -0
- package/dist/plugins/limits-plugin.js.map +1 -0
- package/dist/plugins/logging/formatters.d.ts +14 -0
- package/dist/plugins/logging/formatters.d.ts.map +1 -0
- package/dist/plugins/logging/formatters.js +24 -0
- package/dist/plugins/logging/formatters.js.map +1 -0
- package/dist/plugins/logging/index.d.ts +3 -0
- package/dist/plugins/logging/index.d.ts.map +1 -0
- package/dist/plugins/logging/index.js +2 -0
- package/dist/plugins/logging/index.js.map +1 -0
- package/dist/plugins/logging/logging-plugin.d.ts +91 -0
- package/dist/plugins/logging/logging-plugin.d.ts.map +1 -0
- package/dist/plugins/logging/logging-plugin.js +335 -0
- package/dist/plugins/logging/logging-plugin.js.map +1 -0
- package/dist/plugins/logging/storages/console-storage.d.ts +14 -0
- package/dist/plugins/logging/storages/console-storage.d.ts.map +1 -0
- package/dist/plugins/logging/storages/console-storage.js +38 -0
- package/dist/plugins/logging/storages/console-storage.js.map +1 -0
- package/dist/plugins/logging/storages/file-storage.d.ts +14 -0
- package/dist/plugins/logging/storages/file-storage.d.ts.map +1 -0
- package/dist/plugins/logging/storages/file-storage.js +41 -0
- package/dist/plugins/logging/storages/file-storage.js.map +1 -0
- package/dist/plugins/logging/storages/index.d.ts +5 -0
- package/dist/plugins/logging/storages/index.d.ts.map +1 -0
- package/dist/plugins/logging/storages/index.js +5 -0
- package/dist/plugins/logging/storages/index.js.map +1 -0
- package/dist/plugins/logging/storages/remote-storage.d.ts +20 -0
- package/dist/plugins/logging/storages/remote-storage.d.ts.map +1 -0
- package/dist/plugins/logging/storages/remote-storage.js +61 -0
- package/dist/plugins/logging/storages/remote-storage.js.map +1 -0
- package/dist/plugins/logging/storages/silent-storage.d.ts +10 -0
- package/dist/plugins/logging/storages/silent-storage.d.ts.map +1 -0
- package/dist/plugins/logging/storages/silent-storage.js +15 -0
- package/dist/plugins/logging/storages/silent-storage.js.map +1 -0
- package/dist/plugins/logging/types.d.ts +84 -0
- package/dist/plugins/logging/types.d.ts.map +1 -0
- package/dist/plugins/logging/types.js +2 -0
- package/dist/plugins/logging/types.js.map +1 -0
- package/dist/plugins/performance/collectors/system-metrics-collector.d.ts +12 -0
- package/dist/plugins/performance/collectors/system-metrics-collector.d.ts.map +1 -0
- package/dist/plugins/performance/collectors/system-metrics-collector.js +65 -0
- package/dist/plugins/performance/collectors/system-metrics-collector.js.map +1 -0
- package/dist/plugins/performance/index.d.ts +5 -0
- package/dist/plugins/performance/index.d.ts.map +1 -0
- package/dist/plugins/performance/index.js +4 -0
- package/dist/plugins/performance/index.js.map +1 -0
- package/dist/plugins/performance/performance-plugin.d.ts +49 -0
- package/dist/plugins/performance/performance-plugin.d.ts.map +1 -0
- package/dist/plugins/performance/performance-plugin.js +293 -0
- package/dist/plugins/performance/performance-plugin.js.map +1 -0
- package/dist/plugins/performance/storages/index.d.ts +2 -0
- package/dist/plugins/performance/storages/index.d.ts.map +1 -0
- package/dist/plugins/performance/storages/index.js +4 -0
- package/dist/plugins/performance/storages/index.js.map +1 -0
- package/dist/plugins/performance/storages/memory-storage.d.ts +19 -0
- package/dist/plugins/performance/storages/memory-storage.d.ts.map +1 -0
- package/dist/plugins/performance/storages/memory-storage.js +69 -0
- package/dist/plugins/performance/storages/memory-storage.js.map +1 -0
- package/dist/plugins/performance/types.d.ts +154 -0
- package/dist/plugins/performance/types.d.ts.map +1 -0
- package/dist/plugins/performance/types.js +2 -0
- package/dist/plugins/performance/types.js.map +1 -0
- package/dist/plugins/usage/aggregate-usage-stats.d.ts +12 -0
- package/dist/plugins/usage/aggregate-usage-stats.d.ts.map +1 -0
- package/dist/plugins/usage/aggregate-usage-stats.js +115 -0
- package/dist/plugins/usage/aggregate-usage-stats.js.map +1 -0
- package/dist/plugins/usage/index.d.ts +5 -0
- package/dist/plugins/usage/index.d.ts.map +1 -0
- package/dist/plugins/usage/index.js +4 -0
- package/dist/plugins/usage/index.js.map +1 -0
- package/dist/plugins/usage/storages/file-storage.d.ts +22 -0
- package/dist/plugins/usage/storages/file-storage.d.ts.map +1 -0
- package/dist/plugins/usage/storages/file-storage.js +111 -0
- package/dist/plugins/usage/storages/file-storage.js.map +1 -0
- package/dist/plugins/usage/storages/index.d.ts +5 -0
- package/dist/plugins/usage/storages/index.d.ts.map +1 -0
- package/dist/plugins/usage/storages/index.js +5 -0
- package/dist/plugins/usage/storages/index.js.map +1 -0
- package/dist/plugins/usage/storages/memory-storage.d.ts +22 -0
- package/dist/plugins/usage/storages/memory-storage.d.ts.map +1 -0
- package/dist/plugins/usage/storages/memory-storage.js +42 -0
- package/dist/plugins/usage/storages/memory-storage.js.map +1 -0
- package/dist/plugins/usage/storages/remote-storage.d.ts +26 -0
- package/dist/plugins/usage/storages/remote-storage.d.ts.map +1 -0
- package/dist/plugins/usage/storages/remote-storage.js +115 -0
- package/dist/plugins/usage/storages/remote-storage.js.map +1 -0
- package/dist/plugins/usage/storages/silent-storage.d.ts +19 -0
- package/dist/plugins/usage/storages/silent-storage.d.ts.map +1 -0
- package/dist/plugins/usage/storages/silent-storage.js +26 -0
- package/dist/plugins/usage/storages/silent-storage.js.map +1 -0
- package/dist/plugins/usage/types.d.ts +127 -0
- package/dist/plugins/usage/types.d.ts.map +1 -0
- package/dist/plugins/usage/types.js +2 -0
- package/dist/plugins/usage/types.js.map +1 -0
- package/dist/plugins/usage/usage-plugin.d.ts +67 -0
- package/dist/plugins/usage/usage-plugin.d.ts.map +1 -0
- package/dist/plugins/usage/usage-plugin.js +309 -0
- package/dist/plugins/usage/usage-plugin.js.map +1 -0
- package/dist/plugins/webhook/http-client.d.ts +30 -0
- package/dist/plugins/webhook/http-client.d.ts.map +1 -0
- package/dist/plugins/webhook/http-client.js +110 -0
- package/dist/plugins/webhook/http-client.js.map +1 -0
- package/dist/plugins/webhook/index.d.ts +9 -0
- package/dist/plugins/webhook/index.d.ts.map +1 -0
- package/dist/plugins/webhook/index.js +9 -0
- package/dist/plugins/webhook/index.js.map +1 -0
- package/dist/plugins/webhook/transformer.d.ts +63 -0
- package/dist/plugins/webhook/transformer.d.ts.map +1 -0
- package/dist/plugins/webhook/transformer.js +157 -0
- package/dist/plugins/webhook/transformer.js.map +1 -0
- package/dist/plugins/webhook/types.d.ts +183 -0
- package/dist/plugins/webhook/types.d.ts.map +1 -0
- package/dist/plugins/webhook/types.js +2 -0
- package/dist/plugins/webhook/types.js.map +1 -0
- package/dist/plugins/webhook/webhook-plugin.d.ts +92 -0
- package/dist/plugins/webhook/webhook-plugin.d.ts.map +1 -0
- package/dist/plugins/webhook/webhook-plugin.js +328 -0
- package/dist/plugins/webhook/webhook-plugin.js.map +1 -0
- package/dist/schemas/agent-template-schema.d.ts +137 -0
- package/dist/schemas/agent-template-schema.d.ts.map +1 -0
- package/dist/schemas/agent-template-schema.js +87 -0
- package/dist/schemas/agent-template-schema.js.map +1 -0
- package/dist/services/conversation-service/index.d.ts +88 -0
- package/dist/services/conversation-service/index.d.ts.map +1 -0
- package/dist/services/conversation-service/index.js +441 -0
- package/dist/services/conversation-service/index.js.map +1 -0
- package/dist/services/conversation-service/types.d.ts +32 -0
- package/dist/services/conversation-service/types.d.ts.map +1 -0
- package/dist/services/conversation-service/types.js +8 -0
- package/dist/services/conversation-service/types.js.map +1 -0
- package/dist/services/event-service.d.ts +61 -0
- package/dist/services/event-service.d.ts.map +1 -0
- package/dist/services/event-service.js +110 -0
- package/dist/services/event-service.js.map +1 -0
- package/dist/services/event-service.test.d.ts +2 -0
- package/dist/services/event-service.test.d.ts.map +1 -0
- package/dist/services/event-service.test.js +86 -0
- package/dist/services/event-service.test.js.map +1 -0
- package/dist/services/execution-service.d.ts +151 -0
- package/dist/services/execution-service.d.ts.map +1 -0
- package/dist/services/execution-service.js +1262 -0
- package/dist/services/execution-service.js.map +1 -0
- package/dist/services/execution-service.test.d.ts +2 -0
- package/dist/services/execution-service.test.d.ts.map +1 -0
- package/dist/services/execution-service.test.js +338 -0
- package/dist/services/execution-service.test.js.map +1 -0
- package/dist/services/history-module.d.ts +15 -0
- package/dist/services/history-module.d.ts.map +1 -0
- package/dist/services/history-module.js +42 -0
- package/dist/services/history-module.js.map +1 -0
- package/dist/services/in-memory-history-store.d.ts +12 -0
- package/dist/services/in-memory-history-store.d.ts.map +1 -0
- package/dist/services/in-memory-history-store.js +41 -0
- package/dist/services/in-memory-history-store.js.map +1 -0
- package/dist/services/index.d.ts +7 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +13 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/task-events.d.ts +6 -0
- package/dist/services/task-events.d.ts.map +1 -0
- package/dist/services/task-events.js +6 -0
- package/dist/services/task-events.js.map +1 -0
- package/dist/services/tool-execution-service.d.ts +74 -0
- package/dist/services/tool-execution-service.d.ts.map +1 -0
- package/dist/services/tool-execution-service.js +189 -0
- package/dist/services/tool-execution-service.js.map +1 -0
- package/dist/services/user-events.d.ts +7 -0
- package/dist/services/user-events.d.ts.map +1 -0
- package/dist/services/user-events.js +6 -0
- package/dist/services/user-events.js.map +1 -0
- package/dist/tools/implementations/function-tool/index.d.ts +9 -0
- package/dist/tools/implementations/function-tool/index.d.ts.map +1 -0
- package/dist/tools/implementations/function-tool/index.js +13 -0
- package/dist/tools/implementations/function-tool/index.js.map +1 -0
- package/dist/tools/implementations/function-tool/schema-converter.d.ts +32 -0
- package/dist/tools/implementations/function-tool/schema-converter.d.ts.map +1 -0
- package/dist/tools/implementations/function-tool/schema-converter.js +164 -0
- package/dist/tools/implementations/function-tool/schema-converter.js.map +1 -0
- package/dist/tools/implementations/function-tool/types.d.ts +72 -0
- package/dist/tools/implementations/function-tool/types.d.ts.map +1 -0
- package/dist/tools/implementations/function-tool/types.js +14 -0
- package/dist/tools/implementations/function-tool/types.js.map +1 -0
- package/dist/tools/implementations/function-tool.d.ts +49 -0
- package/dist/tools/implementations/function-tool.d.ts.map +1 -0
- package/dist/tools/implementations/function-tool.js +223 -0
- package/dist/tools/implementations/function-tool.js.map +1 -0
- package/dist/tools/implementations/index.d.ts +4 -0
- package/dist/tools/implementations/index.d.ts.map +1 -0
- package/dist/tools/implementations/index.js +5 -0
- package/dist/tools/implementations/index.js.map +1 -0
- package/dist/tools/implementations/mcp-tool.d.ts +72 -0
- package/dist/tools/implementations/mcp-tool.d.ts.map +1 -0
- package/dist/tools/implementations/mcp-tool.js +246 -0
- package/dist/tools/implementations/mcp-tool.js.map +1 -0
- package/dist/tools/implementations/openapi-tool.d.ts +56 -0
- package/dist/tools/implementations/openapi-tool.d.ts.map +1 -0
- package/dist/tools/implementations/openapi-tool.js +324 -0
- package/dist/tools/implementations/openapi-tool.js.map +1 -0
- package/dist/tools/implementations/relay-mcp-tool.d.ts +38 -0
- package/dist/tools/implementations/relay-mcp-tool.d.ts.map +1 -0
- package/dist/tools/implementations/relay-mcp-tool.js +46 -0
- package/dist/tools/implementations/relay-mcp-tool.js.map +1 -0
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +4 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/registry/index.d.ts +2 -0
- package/dist/tools/registry/index.d.ts.map +1 -0
- package/dist/tools/registry/index.js +3 -0
- package/dist/tools/registry/index.js.map +1 -0
- package/dist/tools/registry/tool-registry.d.ts +54 -0
- package/dist/tools/registry/tool-registry.d.ts.map +1 -0
- package/dist/tools/registry/tool-registry.js +146 -0
- package/dist/tools/registry/tool-registry.js.map +1 -0
- package/dist/utils/errors.d.ts +155 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +203 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/execution-proxy.d.ts +75 -0
- package/dist/utils/execution-proxy.d.ts.map +1 -0
- package/dist/utils/execution-proxy.js +230 -0
- package/dist/utils/execution-proxy.js.map +1 -0
- package/dist/utils/index.d.ts +11 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +7 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logger.d.ts +74 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +143 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/message-converter.d.ts +68 -0
- package/dist/utils/message-converter.d.ts.map +1 -0
- package/dist/utils/message-converter.js +87 -0
- package/dist/utils/message-converter.js.map +1 -0
- package/dist/utils/periodic-task.d.ts +14 -0
- package/dist/utils/periodic-task.d.ts.map +1 -0
- package/dist/utils/periodic-task.js +26 -0
- package/dist/utils/periodic-task.js.map +1 -0
- package/dist/utils/validation.d.ts +40 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +162 -0
- package/dist/utils/validation.js.map +1 -0
- package/package.json +101 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import type { TProviderConfigValue, IAIProvider } from './provider';
|
|
2
|
+
import type { IPluginContract, IPluginOptions, IPluginStats } from '../abstracts/abstract-plugin';
|
|
3
|
+
import type { IModule } from '../abstracts/abstract-module';
|
|
4
|
+
import type { IToolWithEventService } from '../abstracts/abstract-tool';
|
|
5
|
+
import type { TUtilLogLevel } from '../utils/logger';
|
|
6
|
+
import type { TMetadata, TConfigValue } from './types';
|
|
7
|
+
import type { IEventService } from '../services/event-service';
|
|
8
|
+
import type { IOwnerPathSegment } from '../services/event-service';
|
|
9
|
+
import type { TUniversalMessageMetadata, TUniversalMessage } from './messages';
|
|
10
|
+
export type { TUniversalMessage, TUniversalMessageMetadata, IBaseMessage, IUserMessage, IAssistantMessage, ISystemMessage, IToolMessage, IToolCall, TUniversalMessageRole, } from './messages';
|
|
11
|
+
/**
|
|
12
|
+
* IExecutionContextInjection
|
|
13
|
+
*
|
|
14
|
+
* Minimal context payload used to inject an existing ownerPath into a new agent instance
|
|
15
|
+
* (e.g., when a tool creates an agent and must preserve absolute ownerPath semantics).
|
|
16
|
+
*
|
|
17
|
+
* NOTE: This is intentionally NOT ToolExecutionContext. ToolExecutionContext is for tool calls
|
|
18
|
+
* and requires toolName/parameters; agent creation only needs ownerPath and execution linkage.
|
|
19
|
+
*/
|
|
20
|
+
export interface IExecutionContextInjection {
|
|
21
|
+
ownerPath?: IOwnerPathSegment[];
|
|
22
|
+
parentExecutionId?: string;
|
|
23
|
+
rootExecutionId?: string;
|
|
24
|
+
executionLevel?: number;
|
|
25
|
+
sourceId?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Provider-specific configuration
|
|
29
|
+
*/
|
|
30
|
+
export interface IAgentProviderConfig {
|
|
31
|
+
openai?: {
|
|
32
|
+
apiKey?: string;
|
|
33
|
+
baseURL?: string;
|
|
34
|
+
organization?: string;
|
|
35
|
+
[key: string]: TProviderConfigValue | undefined;
|
|
36
|
+
};
|
|
37
|
+
anthropic?: {
|
|
38
|
+
apiKey?: string;
|
|
39
|
+
baseURL?: string;
|
|
40
|
+
[key: string]: TProviderConfigValue | undefined;
|
|
41
|
+
};
|
|
42
|
+
google?: {
|
|
43
|
+
apiKey?: string;
|
|
44
|
+
projectId?: string;
|
|
45
|
+
location?: string;
|
|
46
|
+
[key: string]: TProviderConfigValue | undefined;
|
|
47
|
+
};
|
|
48
|
+
[provider: string]: Record<string, TProviderConfigValue | undefined> | undefined;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Agent configuration options - New design with aiProviders array and defaultModel
|
|
52
|
+
*/
|
|
53
|
+
export interface IAgentConfig {
|
|
54
|
+
id?: string;
|
|
55
|
+
name: string;
|
|
56
|
+
aiProviders: IAIProvider[];
|
|
57
|
+
defaultModel: {
|
|
58
|
+
provider: string;
|
|
59
|
+
model: string;
|
|
60
|
+
temperature?: number;
|
|
61
|
+
maxTokens?: number;
|
|
62
|
+
topP?: number;
|
|
63
|
+
systemMessage?: string;
|
|
64
|
+
};
|
|
65
|
+
tools?: Array<IToolWithEventService>;
|
|
66
|
+
plugins?: Array<IPluginContract<IPluginOptions, IPluginStats>>;
|
|
67
|
+
modules?: IModule[];
|
|
68
|
+
systemMessage?: string;
|
|
69
|
+
systemPrompt?: string;
|
|
70
|
+
conversationId?: string;
|
|
71
|
+
sessionId?: string;
|
|
72
|
+
userId?: string;
|
|
73
|
+
metadata?: TUniversalMessageMetadata;
|
|
74
|
+
context?: Record<string, TConfigValue>;
|
|
75
|
+
logging?: {
|
|
76
|
+
level?: TUtilLogLevel;
|
|
77
|
+
enabled?: boolean;
|
|
78
|
+
format?: string;
|
|
79
|
+
destination?: string;
|
|
80
|
+
};
|
|
81
|
+
providerConfig?: IAgentProviderConfig;
|
|
82
|
+
stream?: boolean;
|
|
83
|
+
toolChoice?: 'auto' | 'none' | string;
|
|
84
|
+
responseFormat?: IResponseFormatConfig;
|
|
85
|
+
safetySettings?: ISafetySetting[];
|
|
86
|
+
timeout?: number;
|
|
87
|
+
retryAttempts?: number;
|
|
88
|
+
rateLimiting?: {
|
|
89
|
+
enabled?: boolean;
|
|
90
|
+
maxRequests?: number;
|
|
91
|
+
windowMs?: number;
|
|
92
|
+
};
|
|
93
|
+
eventService?: IEventService;
|
|
94
|
+
executionContext?: IExecutionContextInjection;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Agent template interface
|
|
98
|
+
*/
|
|
99
|
+
export interface IAgentTemplate {
|
|
100
|
+
id: string;
|
|
101
|
+
name: string;
|
|
102
|
+
description?: string;
|
|
103
|
+
category?: string;
|
|
104
|
+
tags?: string[];
|
|
105
|
+
config: IAgentConfig;
|
|
106
|
+
version?: string;
|
|
107
|
+
author?: string;
|
|
108
|
+
createdAt?: Date;
|
|
109
|
+
updatedAt?: Date;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Agent run options - type-safe interface for all agent execution options
|
|
113
|
+
*/
|
|
114
|
+
export interface IRunOptions {
|
|
115
|
+
temperature?: number;
|
|
116
|
+
maxTokens?: number;
|
|
117
|
+
stream?: boolean;
|
|
118
|
+
toolChoice?: 'auto' | 'none' | string;
|
|
119
|
+
sessionId?: string;
|
|
120
|
+
userId?: string;
|
|
121
|
+
metadata?: TMetadata;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Generic agent interface with type parameters for enhanced type safety
|
|
125
|
+
*
|
|
126
|
+
* @template TConfig - Agent configuration type (defaults to IAgentConfig for backward compatibility)
|
|
127
|
+
* @template TContext - Execution context type (defaults to IRunOptions for backward compatibility)
|
|
128
|
+
* @template TUniversalMessage - Message type (defaults to TUniversalMessage for backward compatibility)
|
|
129
|
+
*/
|
|
130
|
+
export interface IAgent<TConfig = IAgentConfig, TContext = IRunOptions, TMessage = TUniversalMessage> {
|
|
131
|
+
/**
|
|
132
|
+
* Configure the agent with type-safe configuration
|
|
133
|
+
*/
|
|
134
|
+
configure?(config: TConfig): Promise<void>;
|
|
135
|
+
/**
|
|
136
|
+
* Run agent with user input and type-safe context
|
|
137
|
+
*/
|
|
138
|
+
run(input: string, context?: TContext): Promise<string>;
|
|
139
|
+
/**
|
|
140
|
+
* Run agent with streaming response and type-safe context
|
|
141
|
+
*/
|
|
142
|
+
runStream(input: string, context?: TContext): AsyncGenerator<string, void, never>;
|
|
143
|
+
/**
|
|
144
|
+
* Get conversation history with type-safe messages
|
|
145
|
+
*/
|
|
146
|
+
getHistory(): TMessage[];
|
|
147
|
+
/**
|
|
148
|
+
* Clear conversation history
|
|
149
|
+
*/
|
|
150
|
+
clearHistory(): void;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Extended run context with provider-agnostic options
|
|
154
|
+
* Supports dynamic provider configurations without hardcoding specific providers
|
|
155
|
+
*/
|
|
156
|
+
export interface IExtendedRunContext {
|
|
157
|
+
temperature?: number;
|
|
158
|
+
maxTokens?: number;
|
|
159
|
+
stream?: boolean;
|
|
160
|
+
toolChoice?: 'auto' | 'none' | string;
|
|
161
|
+
sessionId?: string;
|
|
162
|
+
userId?: string;
|
|
163
|
+
metadata?: TMetadata;
|
|
164
|
+
providerOptions?: Record<string, TConfigValue>;
|
|
165
|
+
stopSequences?: string[];
|
|
166
|
+
topK?: number;
|
|
167
|
+
topP?: number;
|
|
168
|
+
seed?: number;
|
|
169
|
+
responseFormat?: IResponseFormatConfig;
|
|
170
|
+
safetySettings?: ISafetySetting[];
|
|
171
|
+
generationConfig?: IGenerationConfig;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Response format configuration
|
|
175
|
+
*/
|
|
176
|
+
export interface IResponseFormatConfig {
|
|
177
|
+
type?: 'text' | 'json_object';
|
|
178
|
+
schema?: Record<string, TConfigValue>;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Safety setting configuration
|
|
182
|
+
*/
|
|
183
|
+
export interface ISafetySetting {
|
|
184
|
+
category: string;
|
|
185
|
+
threshold: string;
|
|
186
|
+
[key: string]: TConfigValue;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Generation configuration
|
|
190
|
+
*/
|
|
191
|
+
export interface IGenerationConfig {
|
|
192
|
+
temperature?: number;
|
|
193
|
+
maxTokens?: number;
|
|
194
|
+
topP?: number;
|
|
195
|
+
topK?: number;
|
|
196
|
+
[key: string]: TConfigValue;
|
|
197
|
+
}
|
|
198
|
+
//# sourceMappingURL=agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/interfaces/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAClG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/E,YAAY,EACR,iBAAiB,EACjB,yBAAyB,EACzB,YAAY,EACZ,Y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IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAC;CAC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../src/interfaces/agent.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { TLoggerData, TUniversalValue } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* A single segment in an explicit ownerPath.
|
|
4
|
+
*
|
|
5
|
+
* Path-only rule:
|
|
6
|
+
* - Relationships must be derived from these explicit segments, not from parsing IDs.
|
|
7
|
+
*/
|
|
8
|
+
export interface IOwnerPathSegment {
|
|
9
|
+
type: string;
|
|
10
|
+
id: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Event context that accompanies an emitted event.
|
|
14
|
+
* This is the single source of truth for deterministic linking in subscribers.
|
|
15
|
+
*/
|
|
16
|
+
export interface IEventContext {
|
|
17
|
+
ownerType: string;
|
|
18
|
+
ownerId: string;
|
|
19
|
+
ownerPath: IOwnerPathSegment[];
|
|
20
|
+
/** Optional structured metadata for debugging/observability */
|
|
21
|
+
metadata?: TLoggerData;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Allowed extension values for event payloads.
|
|
25
|
+
*
|
|
26
|
+
* NOTE:
|
|
27
|
+
* - Must not use `any`/`unknown`.
|
|
28
|
+
* - Includes IEventContext so `context` can be carried in data bags when needed.
|
|
29
|
+
*/
|
|
30
|
+
export type TEventExtensionValue = TUniversalValue | TLoggerData | Error | IEventContext | IOwnerPathSegment[];
|
|
31
|
+
/**
|
|
32
|
+
* Base event payload shape.
|
|
33
|
+
* Emitters may add additional fields, but MUST keep linkage information explicit.
|
|
34
|
+
*/
|
|
35
|
+
export interface IBaseEventData {
|
|
36
|
+
/** Timestamp when the event was emitted. This is required for deterministic ordering. */
|
|
37
|
+
timestamp: Date;
|
|
38
|
+
/** Optional structured metadata */
|
|
39
|
+
metadata?: TLoggerData;
|
|
40
|
+
/** Extensible fields for event-specific payloads */
|
|
41
|
+
[key: string]: TEventExtensionValue | undefined;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Execution-related event payload.
|
|
45
|
+
*/
|
|
46
|
+
export interface IExecutionEventData extends IBaseEventData {
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Tool-related event payload.
|
|
50
|
+
*/
|
|
51
|
+
export interface IToolEventData extends IBaseEventData {
|
|
52
|
+
toolName?: string;
|
|
53
|
+
parameters?: Record<string, TUniversalValue>;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Agent-related event payload.
|
|
57
|
+
*/
|
|
58
|
+
export interface IAgentEventData extends IBaseEventData {
|
|
59
|
+
agentId?: string;
|
|
60
|
+
}
|
|
61
|
+
export type TEventListener = (eventType: string, data: IBaseEventData, context?: IEventContext) => void;
|
|
62
|
+
/**
|
|
63
|
+
* Minimal EventService contract for emitting events.
|
|
64
|
+
* Subscriptions are handled by dedicated modules (e.g., EventEmitterPlugin), not here.
|
|
65
|
+
*/
|
|
66
|
+
export interface IEventService {
|
|
67
|
+
emit(eventType: string, data: IBaseEventData, context?: IEventContext): void;
|
|
68
|
+
subscribe(listener: TEventListener): void;
|
|
69
|
+
unsubscribe(listener: TEventListener): void;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Explicit owner binding information used for scoped event emission.
|
|
73
|
+
*/
|
|
74
|
+
export interface IEventServiceOwnerBinding {
|
|
75
|
+
ownerType: string;
|
|
76
|
+
ownerId: string;
|
|
77
|
+
ownerPath: IOwnerPathSegment[];
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=event-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-service.d.ts","sourceRoot":"","sources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AC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAC7E,SAAS,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IAC1C,WAAW,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,iBAAiB,EAAE,CAAC;CAClC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-service.js","sourceRoot":"","sources":["../../src/interfaces/event-service.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import type { IChatOptions, IToolSchema } from './index';
|
|
2
|
+
import type { TUniversalMessage, IAssistantMessage } from './messages';
|
|
3
|
+
/**
|
|
4
|
+
* Request for executing a streaming chat completion through an executor
|
|
5
|
+
*/
|
|
6
|
+
export interface IChatExecutionRequest {
|
|
7
|
+
/** Array of messages in the conversation */
|
|
8
|
+
messages: TUniversalMessage[];
|
|
9
|
+
/** Chat options including model, temperature, etc. */
|
|
10
|
+
options?: IChatOptions;
|
|
11
|
+
/** Available tools for the AI to use */
|
|
12
|
+
tools?: IToolSchema[];
|
|
13
|
+
/** Target AI provider (e.g., 'openai', 'anthropic', 'google') */
|
|
14
|
+
provider: string;
|
|
15
|
+
/** Specific model to use */
|
|
16
|
+
model: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Request for executing a streaming chat completion through an executor
|
|
20
|
+
*/
|
|
21
|
+
export interface IStreamExecutionRequest extends IChatExecutionRequest {
|
|
22
|
+
/** Indicates this is a streaming request */
|
|
23
|
+
stream: true;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Interface for executing AI provider operations
|
|
27
|
+
*
|
|
28
|
+
* Executors abstract the execution mechanism, allowing providers to work
|
|
29
|
+
* with either local API calls or remote server calls transparently.
|
|
30
|
+
*
|
|
31
|
+
* Implementation patterns:
|
|
32
|
+
* - LocalExecutor: Direct API calls using provider SDKs
|
|
33
|
+
* - RemoteExecutor: HTTP/WebSocket calls to remote server
|
|
34
|
+
* - CacheExecutor: Cached responses with explicit error propagation
|
|
35
|
+
* - HybridExecutor: Conditional local/remote execution
|
|
36
|
+
*/
|
|
37
|
+
export interface IExecutor {
|
|
38
|
+
/**
|
|
39
|
+
* Execute a chat completion request
|
|
40
|
+
*
|
|
41
|
+
* @param request - Chat execution request with messages, options, and tools
|
|
42
|
+
* @returns Promise resolving to assistant message response
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```typescript
|
|
46
|
+
* const response = await executor.executeChat({
|
|
47
|
+
* messages: [{ role: 'user', content: 'Hello!' }],
|
|
48
|
+
* options: { model: 'gpt-4', temperature: 0.7 },
|
|
49
|
+
* provider: 'openai',
|
|
50
|
+
* model: 'gpt-4'
|
|
51
|
+
* });
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
executeChat(request: IChatExecutionRequest): Promise<IAssistantMessage>;
|
|
55
|
+
/**
|
|
56
|
+
* Execute a streaming chat completion request
|
|
57
|
+
*
|
|
58
|
+
* @param request - Streaming chat execution request
|
|
59
|
+
* @returns AsyncIterable of message chunks
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```typescript
|
|
63
|
+
* for await (const chunk of executor.executeChatStream({
|
|
64
|
+
* messages: [{ role: 'user', content: 'Tell me a story' }],
|
|
65
|
+
* options: { model: 'gpt-4' },
|
|
66
|
+
* provider: 'openai',
|
|
67
|
+
* model: 'gpt-4',
|
|
68
|
+
* stream: true
|
|
69
|
+
* })) {
|
|
70
|
+
* console.log(chunk.content);
|
|
71
|
+
* }
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
executeChatStream?(request: IStreamExecutionRequest): AsyncIterable<TUniversalMessage>;
|
|
75
|
+
/**
|
|
76
|
+
* Check if the executor supports tool calling
|
|
77
|
+
* @returns true if tool calling is supported
|
|
78
|
+
*/
|
|
79
|
+
supportsTools(): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Validate executor configuration
|
|
82
|
+
* @returns true if configuration is valid
|
|
83
|
+
*/
|
|
84
|
+
validateConfig(): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Clean up resources when executor is no longer needed
|
|
87
|
+
*/
|
|
88
|
+
dispose?(): Promise<void>;
|
|
89
|
+
/**
|
|
90
|
+
* Get executor name/identifier
|
|
91
|
+
*/
|
|
92
|
+
readonly name: string;
|
|
93
|
+
/**
|
|
94
|
+
* Get executor version
|
|
95
|
+
*/
|
|
96
|
+
readonly version: string;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Configuration options for local executor
|
|
100
|
+
*/
|
|
101
|
+
export interface ILocalExecutorConfig {
|
|
102
|
+
/** Timeout for API requests in milliseconds */
|
|
103
|
+
timeout?: number;
|
|
104
|
+
/** Maximum number of retry attempts */
|
|
105
|
+
maxRetries?: number;
|
|
106
|
+
/** Base delay between retries in milliseconds */
|
|
107
|
+
retryDelay?: number;
|
|
108
|
+
/** Whether to enable request/response logging */
|
|
109
|
+
enableLogging?: boolean;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Configuration options for remote executor
|
|
113
|
+
*/
|
|
114
|
+
export interface IRemoteExecutorConfig {
|
|
115
|
+
/** Remote server URL */
|
|
116
|
+
serverUrl: string;
|
|
117
|
+
/** User authentication token */
|
|
118
|
+
userApiKey: string;
|
|
119
|
+
/** Timeout for HTTP requests in milliseconds */
|
|
120
|
+
timeout?: number;
|
|
121
|
+
/** Maximum number of retry attempts */
|
|
122
|
+
maxRetries?: number;
|
|
123
|
+
/** Whether to enable WebSocket for streaming */
|
|
124
|
+
enableWebSocket?: boolean;
|
|
125
|
+
/** Custom headers to include in requests */
|
|
126
|
+
headers?: Record<string, string>;
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=executor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../src/interfaces/executor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,4CAA4C;IAC5C,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,sDAAsD;IACtD,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,wCAAwC;IACxC,KAAK,CAAC,EAAE,WAAW,EAAE,CAAC;IACtB,iEAAiE;IACjE,QAAQ,EAAE,MAAM,CAAC;IACjB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,qBAAqB;IAClE,4CAA4C;IAC5C,MAAM,EAAE,IAAI,CAAC;CAChB;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,SAAS;IACtB;;;;;;;;;;;;;;;OAeG;IACH,WAAW,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAExE;;;;;;;;;;;;;;;;;;OAkBG;IACH,iBAAiB,CAAC,CAAC,OAAO,EAAE,uBAAuB,GAAG,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAEvF;;;OAGG;IACH,aAAa,IAAI,OAAO,CAAC;IAEzB;;;OAGG;IACH,cAAc,IAAI,OAAO,CAAC;IAE1B;;OAEG;IACH,OAAO,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,wBAAwB;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,gCAAgC;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gDAAgD;IAChD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../src/interfaces/executor.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { IBaseEventData, IEventContext } from './event-service';
|
|
2
|
+
export interface IEventHistoryRecord {
|
|
3
|
+
eventName: string;
|
|
4
|
+
sequenceId: number;
|
|
5
|
+
timestamp: Date;
|
|
6
|
+
eventData: IBaseEventData;
|
|
7
|
+
context: IEventContext;
|
|
8
|
+
}
|
|
9
|
+
export interface IEventHistorySnapshot {
|
|
10
|
+
lastSequenceId: number;
|
|
11
|
+
createdAt: Date;
|
|
12
|
+
}
|
|
13
|
+
export interface IEventHistoryModule {
|
|
14
|
+
append(record: IEventHistoryRecord): void;
|
|
15
|
+
read(fromSequenceId: number, toSequenceId?: number): IEventHistoryRecord[];
|
|
16
|
+
readStream(fromSequenceId: number, toSequenceId?: number): AsyncIterable<IEventHistoryRecord>;
|
|
17
|
+
getSnapshot?(): IEventHistorySnapshot | undefined;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=history-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history-module.d.ts","sourceRoot":"","sources":["../../src/interfaces/history-module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErE,MAAM,WAAW,mBAAmB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,cAAc,CAAC;IAC1B,OAAO,EAAE,aAAa,CAAC;CAC1B;AAED,MAAM,WAAW,qBAAqB;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,IAAI,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAChC,MAAM,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAC1C,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,mBAAmB,EAAE,CAAC;IAC3E,UAAU,CAAC,cAAc,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC,mBAAmB,CAAC,CAAC;IAC9F,WAAW,CAAC,IAAI,qBAAqB,GAAG,SAAS,CAAC;CACrD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history-module.js","sourceRoot":"","sources":["../../src/interfaces/history-module.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from './types';
|
|
2
|
+
export type { IAgentConfig, IAgentTemplate, IRunOptions } from './agent';
|
|
3
|
+
export type { TUniversalMessage, TUniversalMessageRole, TUniversalMessageMetadata, IBaseMessage, IUserMessage, IAssistantMessage, ISystemMessage, IToolMessage, IToolCall } from './messages';
|
|
4
|
+
export type { IAIProvider, IToolSchema, IParameterSchema, TJSONSchemaKind, TJSONSchemaEnum, TParameterDefaultValue, IChatOptions, IProviderOptions, IProviderRequest, IRawProviderResponse, ITokenUsage, IProviderSpecificOptions, TProviderConfigValue, TProviderOptionValueBase } from './provider';
|
|
5
|
+
export type { TAgentCreationMetadata, TManagerToolParameters, IConfigValidationResult, IAgentCreationOptions, IAgentFactory, IAIProviderManager, IToolManager } from './manager';
|
|
6
|
+
export type { ITool, IFunctionTool, IToolRegistry, IToolFactory, IToolResult, IToolExecutionResult, IToolExecutionContext, IParameterValidationResult, TToolExecutor, IOpenAPIToolConfig, IMCPToolConfig, TToolMetadata, } from './tool';
|
|
7
|
+
export type { IEventService, IEventContext, IOwnerPathSegment, IBaseEventData, IExecutionEventData, IToolEventData, IAgentEventData, IEventServiceOwnerBinding, TEventListener } from './event-service';
|
|
8
|
+
export type { IProgressReportingTool, IToolExecutionStep, TToolProgressCallback } from './progress-reporting';
|
|
9
|
+
export { isProgressReportingTool, getToolEstimatedDuration, getToolExecutionSteps, setToolProgressCallback } from './progress-reporting';
|
|
10
|
+
export type { TConversationContextMetadata, TToolExecutionParameters, TExecutionMetadata, TResponseMetadata, IToolExecutionRequest, IConversationContext, IConversationResponse, IStreamingChunk, IContextOptions, IExecutionServiceOptions, IConversationServiceOptions, IConversationService, IToolExecutionService, IExecutionService } from './service';
|
|
11
|
+
export type { IExecutor, IChatExecutionRequest, IStreamExecutionRequest, ILocalExecutorConfig, IRemoteExecutorConfig } from './executor';
|
|
12
|
+
export type { IEventHistoryModule, IEventHistoryRecord, IEventHistorySnapshot } from './history-module';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AACA,cAAc,SAAS,CAAC;AAGxB,YAAY,EACR,YAAY,EACZ,cAAc,EACd,WAAW,EACd,MAAM,SAAS,CAAC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AAM,WAAW,CAAC;AAEnB,YAAY,EACR,SAAS,EACT,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,qBAAqB,EACxB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACR,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACxB,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,cAAc,SAAS,CAAC;AAmFxB,OAAO,EACH,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,EAC1B,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import type { IAIProvider, IToolSchema } from './provider';
|
|
2
|
+
import type { ITool, TToolExecutor, IToolExecutionContext, TToolParameters } from './tool';
|
|
3
|
+
import type { TUniversalValue } from './types';
|
|
4
|
+
import type { IAgentConfig, IAgent } from './agent';
|
|
5
|
+
/**
|
|
6
|
+
* Reusable type definitions for manager layer
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Agent creation metadata type
|
|
10
|
+
* Used for storing additional information about agent creation and configuration
|
|
11
|
+
*/
|
|
12
|
+
export type TAgentCreationMetadata = Record<string, string | number | boolean | Date>;
|
|
13
|
+
/**
|
|
14
|
+
* Tool execution parameters for manager operations
|
|
15
|
+
* Used for tool parameter validation and execution in manager context
|
|
16
|
+
*/
|
|
17
|
+
export type TManagerToolParameters = Record<string, string | number | boolean | string[] | number[] | boolean[]>;
|
|
18
|
+
/**
|
|
19
|
+
* Configuration validation result
|
|
20
|
+
*/
|
|
21
|
+
export interface IConfigValidationResult {
|
|
22
|
+
isValid: boolean;
|
|
23
|
+
errors: string[];
|
|
24
|
+
warnings?: string[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* AI Provider Manager interface for provider registration and selection
|
|
28
|
+
*/
|
|
29
|
+
export interface IAIProviderManager {
|
|
30
|
+
/**
|
|
31
|
+
* Register an AI provider
|
|
32
|
+
*/
|
|
33
|
+
addProvider(name: string, provider: IAIProvider): void;
|
|
34
|
+
/**
|
|
35
|
+
* Remove an AI provider
|
|
36
|
+
*/
|
|
37
|
+
removeProvider(name: string): void;
|
|
38
|
+
/**
|
|
39
|
+
* Get registered provider by name
|
|
40
|
+
*/
|
|
41
|
+
getProvider(name: string): IAIProvider | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Get all registered providers
|
|
44
|
+
*/
|
|
45
|
+
getProviders(): Record<string, IAIProvider>;
|
|
46
|
+
/**
|
|
47
|
+
* Set current provider and model
|
|
48
|
+
*/
|
|
49
|
+
setCurrentProvider(name: string, model: string): void;
|
|
50
|
+
/**
|
|
51
|
+
* Get current provider and model
|
|
52
|
+
*/
|
|
53
|
+
getCurrentProvider(): {
|
|
54
|
+
provider: string;
|
|
55
|
+
model: string;
|
|
56
|
+
} | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Check if provider is configured
|
|
59
|
+
*/
|
|
60
|
+
isConfigured(): boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Get available models for a provider
|
|
63
|
+
*/
|
|
64
|
+
getAvailableModels(providerName: string): string[];
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Tool Manager interface for tool registration and management
|
|
68
|
+
*/
|
|
69
|
+
export interface IToolManager {
|
|
70
|
+
/**
|
|
71
|
+
* Register a tool
|
|
72
|
+
*/
|
|
73
|
+
addTool(schema: IToolSchema, executor: TToolExecutor): void;
|
|
74
|
+
/**
|
|
75
|
+
* Remove a tool by name
|
|
76
|
+
*/
|
|
77
|
+
removeTool(name: string): void;
|
|
78
|
+
/**
|
|
79
|
+
* Get tool interface by name
|
|
80
|
+
*/
|
|
81
|
+
getTool(name: string): ITool | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* Get tool schema by name
|
|
84
|
+
*/
|
|
85
|
+
getToolSchema(name: string): IToolSchema | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* Get all registered tools
|
|
88
|
+
*/
|
|
89
|
+
getTools(): IToolSchema[];
|
|
90
|
+
/**
|
|
91
|
+
* Execute a tool
|
|
92
|
+
*/
|
|
93
|
+
executeTool(name: string, parameters: TToolParameters, context?: IToolExecutionContext): Promise<TUniversalValue>;
|
|
94
|
+
/**
|
|
95
|
+
* Check if tool exists
|
|
96
|
+
*/
|
|
97
|
+
hasTool(name: string): boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Set allowed tools (for filtering)
|
|
100
|
+
*/
|
|
101
|
+
setAllowedTools(tools: string[]): void;
|
|
102
|
+
/**
|
|
103
|
+
* Get allowed tools
|
|
104
|
+
*/
|
|
105
|
+
getAllowedTools(): string[] | undefined;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Agent creation options
|
|
109
|
+
*/
|
|
110
|
+
export interface IAgentCreationOptions {
|
|
111
|
+
/** Override default configuration */
|
|
112
|
+
overrides?: Partial<IAgentConfig>;
|
|
113
|
+
/** Validation options */
|
|
114
|
+
validation?: {
|
|
115
|
+
strict?: boolean;
|
|
116
|
+
skipOptional?: boolean;
|
|
117
|
+
};
|
|
118
|
+
/** Additional metadata */
|
|
119
|
+
metadata?: TAgentCreationMetadata;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Agent Factory interface for agent creation and configuration
|
|
123
|
+
*/
|
|
124
|
+
export interface IAgentFactory {
|
|
125
|
+
/**
|
|
126
|
+
* Create agent instance
|
|
127
|
+
*/
|
|
128
|
+
createAgent(config: IAgentConfig, options?: IAgentCreationOptions): IAgent<IAgentConfig>;
|
|
129
|
+
/**
|
|
130
|
+
* Validate agent configuration
|
|
131
|
+
*/
|
|
132
|
+
validateConfig(config: IAgentConfig): IConfigValidationResult;
|
|
133
|
+
/**
|
|
134
|
+
* Get default configuration
|
|
135
|
+
*/
|
|
136
|
+
getDefaultConfig(): IAgentConfig;
|
|
137
|
+
/**
|
|
138
|
+
* Merge configurations
|
|
139
|
+
*/
|
|
140
|
+
mergeConfig(base: IAgentConfig, override: Partial<IAgentConfig>): IAgentConfig;
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/interfaces/manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAC3F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEpD;;GAEG;AAEH;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC,CAAC;AAEtF;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;AAEjH;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B;;OAEG;IACH,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAEvD;;OAEG;IACH,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAEnC;;OAEG;IACH,WAAW,CAAC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