@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,193 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow Converter Interface
|
|
3
|
+
*
|
|
4
|
+
* Defines the contract for all workflow converters in the Robota SDK.
|
|
5
|
+
* Follows Interface Segregation Principle by providing minimal, focused interface.
|
|
6
|
+
*
|
|
7
|
+
* @template TInput - Input workflow data type
|
|
8
|
+
* @template TOutput - Output workflow data type
|
|
9
|
+
*/
|
|
10
|
+
import type { ILogger } from '../utils/logger';
|
|
11
|
+
import type { TConfigValue, TMetadata, TMetadataValue, TUniversalValue } from './types';
|
|
12
|
+
/**
|
|
13
|
+
* Workflow configuration - uses base type for cross-converter compatibility
|
|
14
|
+
* Step 1: ❌ Can't assign number/boolean to config value type directly (index signature conflict)
|
|
15
|
+
* Step 2: ✅ TConfigValue already includes primitive types (number, boolean)
|
|
16
|
+
* Step 3: ✅ Fix index signature to allow optional properties
|
|
17
|
+
* Step 4: ✅ Use proper intersection type for compatibility
|
|
18
|
+
*/
|
|
19
|
+
export interface IWorkflowConfig {
|
|
20
|
+
timeout?: number;
|
|
21
|
+
retries?: number;
|
|
22
|
+
validateInput?: boolean;
|
|
23
|
+
validateOutput?: boolean;
|
|
24
|
+
[key: string]: TConfigValue | undefined;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Workflow metadata - uses base type for cross-converter compatibility
|
|
28
|
+
* Step 1: ❌ Can't assign Date/number/string to metadata value type directly (index signature conflict)
|
|
29
|
+
* Step 2: ✅ TMetadataValue already includes Date, primitive types
|
|
30
|
+
* Step 3: ✅ Fix index signature to allow optional properties
|
|
31
|
+
* Step 4: ✅ Use proper intersection type for compatibility
|
|
32
|
+
*/
|
|
33
|
+
export interface IWorkflowMetadata {
|
|
34
|
+
convertedAt?: Date;
|
|
35
|
+
processingTime?: number;
|
|
36
|
+
executionId?: string;
|
|
37
|
+
[key: string]: TMetadataValue | undefined;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Base workflow data constraint with flexible typing
|
|
41
|
+
* All workflow data must extend this interface for type safety
|
|
42
|
+
*/
|
|
43
|
+
export interface IWorkflowData {
|
|
44
|
+
readonly __workflowType?: string;
|
|
45
|
+
[key: string]: TUniversalValue | undefined;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Conversion options for workflow transformations
|
|
49
|
+
* Step 1: ❌ Can't assign IWorkflowConversionOptions to metadata value type (missing index signature)
|
|
50
|
+
* Step 2: ✅ Add index signature to make it compatible with MetadataValue
|
|
51
|
+
* Step 3: ✅ Maintain type safety while allowing metadata storage
|
|
52
|
+
* Step 4: ✅ Use MetadataValue compatibility for dynamic properties
|
|
53
|
+
*/
|
|
54
|
+
export interface IWorkflowConversionOptions {
|
|
55
|
+
/** Include debug information in output */
|
|
56
|
+
includeDebug?: boolean;
|
|
57
|
+
/** Validate input before conversion */
|
|
58
|
+
validateInput?: boolean;
|
|
59
|
+
/** Validate output after conversion */
|
|
60
|
+
validateOutput?: boolean;
|
|
61
|
+
/** Custom logger for conversion process */
|
|
62
|
+
logger?: ILogger;
|
|
63
|
+
/** Additional metadata to include */
|
|
64
|
+
metadata?: IWorkflowMetadata;
|
|
65
|
+
/** Platform-specific options */
|
|
66
|
+
platformOptions?: IWorkflowConfig;
|
|
67
|
+
/** Additional dynamic options compatible with TUniversalValue */
|
|
68
|
+
[key: string]: TUniversalValue | ILogger | IWorkflowMetadata | IWorkflowConfig | undefined;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Conversion result with metadata and validation info
|
|
72
|
+
*/
|
|
73
|
+
export interface IWorkflowConversionResult<TOutput> {
|
|
74
|
+
/** Converted workflow data */
|
|
75
|
+
data: TOutput;
|
|
76
|
+
/** Conversion success status */
|
|
77
|
+
success: boolean;
|
|
78
|
+
/** Validation errors (if any) */
|
|
79
|
+
errors: string[];
|
|
80
|
+
/** Validation warnings (if any) */
|
|
81
|
+
warnings: string[];
|
|
82
|
+
/** Conversion metadata */
|
|
83
|
+
metadata: IWorkflowConversionResultMetadata;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Workflow conversion metadata.
|
|
87
|
+
*
|
|
88
|
+
* IMPORTANT:
|
|
89
|
+
* - Do NOT intersect this object with `TMetadata`.
|
|
90
|
+
* - `TMetadata` has an index signature with a restricted value axis (`TMetadataValue`),
|
|
91
|
+
* which would force every property on this object to be assignable to `TMetadataValue`.
|
|
92
|
+
* - Keep structured fields here, and store additional key/value pairs under `extensions`.
|
|
93
|
+
*/
|
|
94
|
+
export interface IWorkflowConversionResultMetadata {
|
|
95
|
+
/** Conversion timestamp */
|
|
96
|
+
convertedAt: Date;
|
|
97
|
+
/** Processing time in milliseconds */
|
|
98
|
+
processingTime: number;
|
|
99
|
+
/** Input data statistics */
|
|
100
|
+
inputStats: {
|
|
101
|
+
nodeCount: number;
|
|
102
|
+
edgeCount: number;
|
|
103
|
+
};
|
|
104
|
+
/** Output data statistics */
|
|
105
|
+
outputStats: {
|
|
106
|
+
nodeCount: number;
|
|
107
|
+
edgeCount: number;
|
|
108
|
+
};
|
|
109
|
+
/** Converter name */
|
|
110
|
+
converter: string;
|
|
111
|
+
/** Converter version */
|
|
112
|
+
version: string;
|
|
113
|
+
/** Conversion options (optional, typically gated by includeDebug) */
|
|
114
|
+
options?: IWorkflowConversionOptions;
|
|
115
|
+
/**
|
|
116
|
+
* Additional key/value metadata (SSOT axis).
|
|
117
|
+
* Use this for dynamic metadata, not top-level ad-hoc fields.
|
|
118
|
+
*/
|
|
119
|
+
extensions?: TMetadata;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Workflow Converter Interface
|
|
123
|
+
*
|
|
124
|
+
* Core interface for converting between different workflow representations.
|
|
125
|
+
* All workflow converters must implement this interface.
|
|
126
|
+
*
|
|
127
|
+
* @template TInput - Input workflow data type
|
|
128
|
+
* @template TOutput - Output workflow data type
|
|
129
|
+
*/
|
|
130
|
+
export interface IWorkflowConverter<TInput extends IWorkflowData, TOutput extends IWorkflowData> {
|
|
131
|
+
/** Converter name for identification */
|
|
132
|
+
readonly name: string;
|
|
133
|
+
/** Converter version */
|
|
134
|
+
readonly version: string;
|
|
135
|
+
/** Source format that this converter accepts */
|
|
136
|
+
readonly sourceFormat: string;
|
|
137
|
+
/** Target format that this converter produces */
|
|
138
|
+
readonly targetFormat: string;
|
|
139
|
+
/**
|
|
140
|
+
* Convert workflow data from input format to output format
|
|
141
|
+
*
|
|
142
|
+
* @param input - Input workflow data
|
|
143
|
+
* @param options - Conversion options
|
|
144
|
+
* @returns Promise resolving to conversion result
|
|
145
|
+
*/
|
|
146
|
+
convert(input: TInput, options?: IWorkflowConversionOptions): Promise<IWorkflowConversionResult<TOutput>>;
|
|
147
|
+
/**
|
|
148
|
+
* Validate input data before conversion
|
|
149
|
+
*
|
|
150
|
+
* @param input - Input workflow data
|
|
151
|
+
* @returns Promise resolving to validation result
|
|
152
|
+
*/
|
|
153
|
+
validateInput(input: TInput): Promise<{
|
|
154
|
+
isValid: boolean;
|
|
155
|
+
errors: string[];
|
|
156
|
+
warnings: string[];
|
|
157
|
+
}>;
|
|
158
|
+
/**
|
|
159
|
+
* Validate output data after conversion
|
|
160
|
+
*
|
|
161
|
+
* @param output - Output workflow data
|
|
162
|
+
* @returns Promise resolving to validation result
|
|
163
|
+
*/
|
|
164
|
+
validateOutput(output: TOutput): Promise<{
|
|
165
|
+
isValid: boolean;
|
|
166
|
+
errors: string[];
|
|
167
|
+
warnings: string[];
|
|
168
|
+
}>;
|
|
169
|
+
/**
|
|
170
|
+
* Check if this converter supports the given input format
|
|
171
|
+
*
|
|
172
|
+
* @param input - Input data to check
|
|
173
|
+
* @returns True if converter can handle this input
|
|
174
|
+
*/
|
|
175
|
+
canConvert(input: IWorkflowData): input is TInput;
|
|
176
|
+
/**
|
|
177
|
+
* Get conversion statistics and metrics
|
|
178
|
+
*
|
|
179
|
+
* @returns Converter performance metrics
|
|
180
|
+
*/
|
|
181
|
+
getStats(): {
|
|
182
|
+
totalConversions: number;
|
|
183
|
+
successfulConversions: number;
|
|
184
|
+
failedConversions: number;
|
|
185
|
+
averageProcessingTime: number;
|
|
186
|
+
lastConversionAt?: Date;
|
|
187
|
+
};
|
|
188
|
+
/**
|
|
189
|
+
* Reset converter statistics
|
|
190
|
+
*/
|
|
191
|
+
resetStats(): void;
|
|
192
|
+
}
|
|
193
|
+
//# sourceMappingURL=workflow-converter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-converter.d.ts","sourceRoot":"","sources":["../../src/interfaces/workflow-converter.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAExF;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAE5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAAC;CAC3C;AAED;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAE9B,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAAC;CAC7C;AAED;;;GAGG;AACH,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QACzB,qBAAqB,EAAE,MAAM,CAAC;QAC9B,iBAAiB,EAAE,MAAM,CAAC;QAC1B,qBAAqB,EAAE,MAAM,CAAC;QAC9B,gBAAgB,CAAC,EAAE,IAAI,CAAC;KAC3B,CAAC;IAEF;;OAEG;IACH,UAAU,IAAI,IAAI,CAAC;CACtB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow Converter Interface
|
|
3
|
+
*
|
|
4
|
+
* Defines the contract for all workflow converters in the Robota SDK.
|
|
5
|
+
* Follows Interface Segregation Principle by providing minimal, focused interface.
|
|
6
|
+
*
|
|
7
|
+
* @template TInput - Input workflow data type
|
|
8
|
+
* @template TOutput - Output workflow data type
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=workflow-converter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-converter.js","sourceRoot":"","sources":["../../src/interfaces/workflow-converter.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow Validator Interface
|
|
3
|
+
*
|
|
4
|
+
* Defines the contract for workflow validation systems in the Robota SDK.
|
|
5
|
+
* Follows Single Responsibility Principle by focusing only on validation logic.
|
|
6
|
+
*/
|
|
7
|
+
import type { ILogger } from '../utils/logger';
|
|
8
|
+
import type { IWorkflowData, IWorkflowConfig, IWorkflowMetadata } from './workflow-converter';
|
|
9
|
+
/**
|
|
10
|
+
* Validation severity levels
|
|
11
|
+
*/
|
|
12
|
+
export declare enum ValidationSeverity {
|
|
13
|
+
ERROR = "error",
|
|
14
|
+
WARNING = "warning",
|
|
15
|
+
INFO = "info"
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Individual validation issue
|
|
19
|
+
*/
|
|
20
|
+
export interface IValidationIssue {
|
|
21
|
+
/** Unique identifier for this issue */
|
|
22
|
+
id: string;
|
|
23
|
+
/** Issue severity level */
|
|
24
|
+
severity: ValidationSeverity;
|
|
25
|
+
/** Human-readable message */
|
|
26
|
+
message: string;
|
|
27
|
+
/** Technical details or suggestion */
|
|
28
|
+
details?: string;
|
|
29
|
+
/** Location where issue was found */
|
|
30
|
+
location?: {
|
|
31
|
+
nodeId?: string;
|
|
32
|
+
edgeId?: string;
|
|
33
|
+
field?: string;
|
|
34
|
+
line?: number;
|
|
35
|
+
column?: number;
|
|
36
|
+
};
|
|
37
|
+
/** Rule that triggered this issue */
|
|
38
|
+
rule: string;
|
|
39
|
+
/** Suggested fix (if available) */
|
|
40
|
+
suggestedFix?: {
|
|
41
|
+
description: string;
|
|
42
|
+
action: 'modify' | 'remove' | 'add';
|
|
43
|
+
target?: IWorkflowConfig;
|
|
44
|
+
};
|
|
45
|
+
/** Timestamp when issue was detected */
|
|
46
|
+
detectedAt: Date;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Validation options
|
|
50
|
+
*/
|
|
51
|
+
export interface IValidationOptions {
|
|
52
|
+
/** Validation strictness level */
|
|
53
|
+
strict?: boolean;
|
|
54
|
+
/** Skip specific validation rules */
|
|
55
|
+
skipRules?: string[];
|
|
56
|
+
/** Include only specific validation rules */
|
|
57
|
+
includeRules?: string[];
|
|
58
|
+
/** Maximum number of errors to collect */
|
|
59
|
+
maxErrors?: number;
|
|
60
|
+
/** Include warnings in results */
|
|
61
|
+
includeWarnings?: boolean;
|
|
62
|
+
/** Include info messages in results */
|
|
63
|
+
includeInfo?: boolean;
|
|
64
|
+
/** Custom logger for validation process */
|
|
65
|
+
logger?: ILogger;
|
|
66
|
+
/** Additional validation context */
|
|
67
|
+
context?: IWorkflowMetadata;
|
|
68
|
+
/** Enable auto-recovery suggestions */
|
|
69
|
+
enableAutoRecovery?: boolean;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Validation result
|
|
73
|
+
*/
|
|
74
|
+
export interface IValidationResult {
|
|
75
|
+
/** Overall validation success status */
|
|
76
|
+
isValid: boolean;
|
|
77
|
+
/** All validation issues found */
|
|
78
|
+
issues: IValidationIssue[];
|
|
79
|
+
/** Summary by severity */
|
|
80
|
+
summary: {
|
|
81
|
+
errorCount: number;
|
|
82
|
+
warningCount: number;
|
|
83
|
+
infoCount: number;
|
|
84
|
+
totalIssues: number;
|
|
85
|
+
};
|
|
86
|
+
/** Validation metadata */
|
|
87
|
+
metadata: {
|
|
88
|
+
/** Validation timestamp */
|
|
89
|
+
validatedAt: Date;
|
|
90
|
+
/** Processing time in milliseconds */
|
|
91
|
+
processingTime: number;
|
|
92
|
+
/** Validator used */
|
|
93
|
+
validator: string;
|
|
94
|
+
/** Validation rules applied */
|
|
95
|
+
rulesApplied: string[];
|
|
96
|
+
/** Data statistics */
|
|
97
|
+
dataStats: Record<string, string | number | boolean>;
|
|
98
|
+
/** Version */
|
|
99
|
+
version?: string;
|
|
100
|
+
/** Options */
|
|
101
|
+
options?: string | number | boolean | string[] | Date;
|
|
102
|
+
/** Additional metrics */
|
|
103
|
+
[key: string]: string | number | boolean | Date | string[] | Record<string, string | number | boolean> | undefined;
|
|
104
|
+
};
|
|
105
|
+
/** Auto-recovery suggestions (if enabled) */
|
|
106
|
+
recoveryOptions?: Array<{
|
|
107
|
+
description: string;
|
|
108
|
+
confidence: number;
|
|
109
|
+
action: () => Promise<IWorkflowConfig>;
|
|
110
|
+
}>;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Workflow Validator Interface
|
|
114
|
+
*
|
|
115
|
+
* Core interface for validating workflow data structures.
|
|
116
|
+
* All workflow validators must implement this interface.
|
|
117
|
+
*
|
|
118
|
+
* @template TWorkflowData - Type of workflow data to validate
|
|
119
|
+
*/
|
|
120
|
+
export interface IWorkflowValidator<TWorkflowData extends IWorkflowData> {
|
|
121
|
+
/** Validator name for identification */
|
|
122
|
+
readonly name: string;
|
|
123
|
+
/** Validator version */
|
|
124
|
+
readonly version: string;
|
|
125
|
+
/** Data format that this validator handles */
|
|
126
|
+
readonly dataFormat: string;
|
|
127
|
+
/** Available validation rules */
|
|
128
|
+
readonly availableRules: string[];
|
|
129
|
+
/**
|
|
130
|
+
* Validate workflow data
|
|
131
|
+
*
|
|
132
|
+
* @param data - Workflow data to validate
|
|
133
|
+
* @param options - Validation options
|
|
134
|
+
* @returns Promise resolving to validation result
|
|
135
|
+
*/
|
|
136
|
+
validate(data: TWorkflowData, options?: IValidationOptions): Promise<IValidationResult>;
|
|
137
|
+
/**
|
|
138
|
+
* Validate specific aspect of workflow data
|
|
139
|
+
*
|
|
140
|
+
* @param data - Workflow data to validate
|
|
141
|
+
* @param rule - Specific rule to apply
|
|
142
|
+
* @param options - Validation options
|
|
143
|
+
* @returns Promise resolving to validation result for this rule
|
|
144
|
+
*/
|
|
145
|
+
validateRule(data: TWorkflowData, rule: string, options?: IValidationOptions): Promise<IValidationResult>;
|
|
146
|
+
/**
|
|
147
|
+
* Check if validator can handle the given data format
|
|
148
|
+
*
|
|
149
|
+
* @param data - Data to check
|
|
150
|
+
* @returns True if validator can handle this data
|
|
151
|
+
*/
|
|
152
|
+
canValidate(data: IWorkflowData): data is TWorkflowData;
|
|
153
|
+
/**
|
|
154
|
+
* Get available validation rules with descriptions
|
|
155
|
+
*
|
|
156
|
+
* @returns Map of rule names to descriptions
|
|
157
|
+
*/
|
|
158
|
+
getRuleDescriptions(): Map<string, {
|
|
159
|
+
description: string;
|
|
160
|
+
severity: ValidationSeverity;
|
|
161
|
+
category: string;
|
|
162
|
+
enabled: boolean;
|
|
163
|
+
}>;
|
|
164
|
+
/**
|
|
165
|
+
* Enable or disable specific validation rules
|
|
166
|
+
*
|
|
167
|
+
* @param rules - Map of rule names to enabled status
|
|
168
|
+
*/
|
|
169
|
+
configureRules(rules: Map<string, boolean>): void;
|
|
170
|
+
/**
|
|
171
|
+
* Perform automatic recovery for validation issues
|
|
172
|
+
*
|
|
173
|
+
* @param data - Original workflow data
|
|
174
|
+
* @param issues - Validation issues to recover from
|
|
175
|
+
* @returns Promise resolving to recovered data and recovery result
|
|
176
|
+
*/
|
|
177
|
+
autoRecover(data: TWorkflowData, issues: IValidationIssue[]): Promise<{
|
|
178
|
+
recoveredData: TWorkflowData;
|
|
179
|
+
recoveryResult: {
|
|
180
|
+
success: boolean;
|
|
181
|
+
issuesFixed: IValidationIssue[];
|
|
182
|
+
remainingIssues: IValidationIssue[];
|
|
183
|
+
appliedFixes: string[];
|
|
184
|
+
};
|
|
185
|
+
}>;
|
|
186
|
+
/**
|
|
187
|
+
* Get validator statistics and metrics
|
|
188
|
+
*
|
|
189
|
+
* @returns Validator performance metrics
|
|
190
|
+
*/
|
|
191
|
+
getStats(): {
|
|
192
|
+
totalValidations: number;
|
|
193
|
+
successfulValidations: number;
|
|
194
|
+
failedValidations: number;
|
|
195
|
+
averageProcessingTime: number;
|
|
196
|
+
averageIssueCount: number;
|
|
197
|
+
mostCommonIssues: Array<{
|
|
198
|
+
rule: string;
|
|
199
|
+
count: number;
|
|
200
|
+
severity: ValidationSeverity;
|
|
201
|
+
}>;
|
|
202
|
+
lastValidationAt?: Date;
|
|
203
|
+
};
|
|
204
|
+
/**
|
|
205
|
+
* Reset validator statistics
|
|
206
|
+
*/
|
|
207
|
+
resetStats(): void;
|
|
208
|
+
}
|
|
209
|
+
//# sourceMappingURL=workflow-validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-validator.d.ts","sourceRoot":"","sources":["../../src/interfaces/workflow-validator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9F;;GAEG;AACH,oBAAY,kBAAkB;IAC1B,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,IAAI,SAAS;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;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OAIG;IACH,QAAQ,IAAI;QACR,gBAAgB,EAAE,MAAM,CAAC;QACzB,qBAAqB,EAAE,MAAM,CAAC;QAC9B,iBAAiB,EAAE,MAAM,CAAC;QAC1B,qBAAqB,EAAE,MAAM,CAAC;QAC9B,iBAAiB,EAAE,MAAM,CAAC;QAC1B,gBAAgB,EAAE,KAAK,CAAC;YACpB,IAAI,EAAE,MAAM,CAAC;YACb,KAAK,EAAE,MAAM,CAAC;YACd,QAAQ,EAAE,kBAAkB,CAAC;SAChC,CAAC,CAAC;QACH,gBAAgB,CAAC,EAAE,IAAI,CAAC;KAC3B,CAAC;IAEF;;OAEG;IACH,UAAU,IAAI,IAAI,CAAC;CACtB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow Validator Interface
|
|
3
|
+
*
|
|
4
|
+
* Defines the contract for workflow validation systems in the Robota SDK.
|
|
5
|
+
* Follows Single Responsibility Principle by focusing only on validation logic.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Validation severity levels
|
|
9
|
+
*/
|
|
10
|
+
export var ValidationSeverity;
|
|
11
|
+
(function (ValidationSeverity) {
|
|
12
|
+
ValidationSeverity["ERROR"] = "error";
|
|
13
|
+
ValidationSeverity["WARNING"] = "warning";
|
|
14
|
+
ValidationSeverity["INFO"] = "info";
|
|
15
|
+
})(ValidationSeverity || (ValidationSeverity = {}));
|
|
16
|
+
//# sourceMappingURL=workflow-validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-validator.js","sourceRoot":"","sources":["../../src/interfaces/workflow-validator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH;;GAEG;AACH,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC1B,qCAAe,CAAA;IACf,yCAAmB,CAAA;IACnB,mCAAa,CAAA;AACjB,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { IAgent, IAgentConfig, IAgentTemplate } from '../interfaces/agent';
|
|
2
|
+
import { type ITemplateApplicationResult } from './agent-templates';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration options for AgentFactory
|
|
5
|
+
*/
|
|
6
|
+
export interface IAgentFactoryOptions {
|
|
7
|
+
/** Default model to use if not specified in config */
|
|
8
|
+
defaultModel?: string;
|
|
9
|
+
/** Default provider to use if not specified in config */
|
|
10
|
+
defaultProvider?: string;
|
|
11
|
+
/** Maximum number of concurrent agents */
|
|
12
|
+
maxConcurrentAgents?: number;
|
|
13
|
+
/** Default system message for agents */
|
|
14
|
+
defaultSystemMessage?: string;
|
|
15
|
+
/** Enable strict configuration validation */
|
|
16
|
+
strictValidation?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Agent creation statistics
|
|
20
|
+
*/
|
|
21
|
+
export interface IAgentCreationStats {
|
|
22
|
+
/** Total number of agents created */
|
|
23
|
+
totalCreated: number;
|
|
24
|
+
/** Number of currently active agents */
|
|
25
|
+
activeCount: number;
|
|
26
|
+
/** Number of agents created from templates */
|
|
27
|
+
fromTemplates: number;
|
|
28
|
+
/** Number of custom configured agents */
|
|
29
|
+
customConfigured: number;
|
|
30
|
+
/** Template vs custom creation ratio (fromTemplates / totalCreated) */
|
|
31
|
+
templateUsageRatio: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Agent lifecycle events
|
|
35
|
+
*/
|
|
36
|
+
export interface IAgentLifecycleEvents {
|
|
37
|
+
/** Called before agent creation */
|
|
38
|
+
beforeCreate?: (config: IAgentConfig) => Promise<void> | void;
|
|
39
|
+
/** Called after successful agent creation */
|
|
40
|
+
afterCreate?: (agent: IAgent<IAgentConfig>, config: IAgentConfig) => Promise<void> | void;
|
|
41
|
+
/** Called when agent creation fails */
|
|
42
|
+
onCreateError?: (error: Error, config: IAgentConfig) => Promise<void> | void;
|
|
43
|
+
/** Called when agent is destroyed */
|
|
44
|
+
onDestroy?: (agentId: string) => Promise<void> | void;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Agent Factory for creating and managing agents
|
|
48
|
+
* Instance-based for isolated agent factory management
|
|
49
|
+
*/
|
|
50
|
+
export declare class AgentFactory {
|
|
51
|
+
private agentTemplates;
|
|
52
|
+
private initialized;
|
|
53
|
+
private logger;
|
|
54
|
+
private options;
|
|
55
|
+
private activeAgents;
|
|
56
|
+
private creationStats;
|
|
57
|
+
private lifecycleEvents;
|
|
58
|
+
constructor(options?: IAgentFactoryOptions, lifecycleEvents?: IAgentLifecycleEvents);
|
|
59
|
+
/**
|
|
60
|
+
* Initialize the factory
|
|
61
|
+
*/
|
|
62
|
+
initialize(): Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Create a new agent instance
|
|
65
|
+
*/
|
|
66
|
+
createAgent(AgentClass: new (config: IAgentConfig) => IAgent<IAgentConfig>, config: Partial<IAgentConfig>, fromTemplate?: boolean): Promise<IAgent<IAgentConfig>>;
|
|
67
|
+
/**
|
|
68
|
+
* Create agent from template
|
|
69
|
+
*/
|
|
70
|
+
createFromTemplate(AgentClass: new (config: IAgentConfig) => IAgent<IAgentConfig>, templateId: string, overrides?: Partial<IAgentConfig>): Promise<IAgent<IAgentConfig>>;
|
|
71
|
+
/**
|
|
72
|
+
* Register a template
|
|
73
|
+
*/
|
|
74
|
+
registerTemplate(template: IAgentTemplate): void;
|
|
75
|
+
/**
|
|
76
|
+
* Unregister a template
|
|
77
|
+
*/
|
|
78
|
+
unregisterTemplate(templateId: string): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Get all templates
|
|
81
|
+
*/
|
|
82
|
+
getTemplates(): IAgentTemplate[];
|
|
83
|
+
/**
|
|
84
|
+
* Get template by ID
|
|
85
|
+
*/
|
|
86
|
+
getTemplate(templateId: string): IAgentTemplate | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Find templates by criteria
|
|
89
|
+
*/
|
|
90
|
+
findTemplates(criteria: {
|
|
91
|
+
category?: string;
|
|
92
|
+
tags?: string[];
|
|
93
|
+
provider?: string;
|
|
94
|
+
model?: string;
|
|
95
|
+
}): IAgentTemplate[];
|
|
96
|
+
/**
|
|
97
|
+
* Apply template to configuration
|
|
98
|
+
*/
|
|
99
|
+
applyTemplate(template: IAgentTemplate, overrides?: Partial<IAgentConfig>): ITemplateApplicationResult;
|
|
100
|
+
/**
|
|
101
|
+
* Destroy an agent
|
|
102
|
+
*/
|
|
103
|
+
destroyAgent(agentId: string): Promise<boolean>;
|
|
104
|
+
/**
|
|
105
|
+
* Get creation statistics
|
|
106
|
+
*/
|
|
107
|
+
getCreationStats(): IAgentCreationStats;
|
|
108
|
+
/**
|
|
109
|
+
* Get all active agents
|
|
110
|
+
*/
|
|
111
|
+
getActiveAgents(): Map<string, IAgent<IAgentConfig>>;
|
|
112
|
+
/**
|
|
113
|
+
* Validate agent configuration
|
|
114
|
+
*/
|
|
115
|
+
validateConfiguration(config: Partial<IAgentConfig>): {
|
|
116
|
+
isValid: boolean;
|
|
117
|
+
errors: string[];
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Apply default configuration values
|
|
121
|
+
*/
|
|
122
|
+
private applyDefaults;
|
|
123
|
+
/**
|
|
124
|
+
* Generate unique agent ID
|
|
125
|
+
*/
|
|
126
|
+
private generateAgentId;
|
|
127
|
+
/**
|
|
128
|
+
* Update creation statistics
|
|
129
|
+
*/
|
|
130
|
+
private updateCreationStats;
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=agent-factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-factory.d.ts","sourceRoot":"","sources":["../../src/managers/agent-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAK3E,OAAO,EAAkB,KAAK,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAEpF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