@robota-sdk/agent-core 3.0.0-beta.6 → 3.0.0-beta.61
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 +89 -0
- package/README.md +40 -11
- package/dist/browser/index.d.ts +722 -324
- package/dist/browser/index.js +10 -4
- package/dist/node/index.cjs +10 -4
- package/dist/node/index.d.cts +722 -324
- package/dist/node/index.d.ts +722 -324
- package/dist/node/index.js +10 -4
- package/package.json +6 -3
- package/dist/abstracts/abstract-agent.d.ts +0 -56
- package/dist/abstracts/abstract-agent.d.ts.map +0 -1
- package/dist/abstracts/abstract-agent.js +0 -55
- package/dist/abstracts/abstract-agent.js.map +0 -1
- package/dist/abstracts/abstract-ai-provider.d.ts +0 -187
- package/dist/abstracts/abstract-ai-provider.d.ts.map +0 -1
- package/dist/abstracts/abstract-ai-provider.js +0 -252
- package/dist/abstracts/abstract-ai-provider.js.map +0 -1
- package/dist/abstracts/abstract-executor.d.ts +0 -110
- package/dist/abstracts/abstract-executor.d.ts.map +0 -1
- package/dist/abstracts/abstract-executor.js +0 -156
- package/dist/abstracts/abstract-executor.js.map +0 -1
- package/dist/abstracts/abstract-manager.d.ts +0 -42
- package/dist/abstracts/abstract-manager.d.ts.map +0 -1
- package/dist/abstracts/abstract-manager.js +0 -49
- package/dist/abstracts/abstract-manager.js.map +0 -1
- package/dist/abstracts/abstract-module.d.ts +0 -365
- package/dist/abstracts/abstract-module.d.ts.map +0 -1
- package/dist/abstracts/abstract-module.js +0 -474
- package/dist/abstracts/abstract-module.js.map +0 -1
- package/dist/abstracts/abstract-plugin.d.ts +0 -369
- package/dist/abstracts/abstract-plugin.d.ts.map +0 -1
- package/dist/abstracts/abstract-plugin.js +0 -258
- package/dist/abstracts/abstract-plugin.js.map +0 -1
- package/dist/abstracts/abstract-tool.d.ts +0 -175
- package/dist/abstracts/abstract-tool.d.ts.map +0 -1
- package/dist/abstracts/abstract-tool.js +0 -140
- package/dist/abstracts/abstract-tool.js.map +0 -1
- package/dist/abstracts/abstract-workflow-converter.d.ts +0 -136
- package/dist/abstracts/abstract-workflow-converter.d.ts.map +0 -1
- package/dist/abstracts/abstract-workflow-converter.js +0 -252
- package/dist/abstracts/abstract-workflow-converter.js.map +0 -1
- package/dist/abstracts/abstract-workflow-validator.d.ts +0 -203
- package/dist/abstracts/abstract-workflow-validator.d.ts.map +0 -1
- package/dist/abstracts/abstract-workflow-validator.js +0 -447
- package/dist/abstracts/abstract-workflow-validator.js.map +0 -1
- package/dist/abstracts/index.d.ts +0 -6
- package/dist/abstracts/index.d.ts.map +0 -1
- package/dist/abstracts/index.js +0 -9
- package/dist/abstracts/index.js.map +0 -1
- package/dist/agents/constants.d.ts +0 -23
- package/dist/agents/constants.d.ts.map +0 -1
- package/dist/agents/constants.js +0 -22
- package/dist/agents/constants.js.map +0 -1
- package/dist/agents/index.d.ts +0 -1
- package/dist/agents/index.d.ts.map +0 -1
- package/dist/agents/index.js +0 -4
- package/dist/agents/index.js.map +0 -1
- package/dist/agents/robota.test.d.ts +0 -2
- package/dist/agents/robota.test.d.ts.map +0 -1
- package/dist/agents/robota.test.js +0 -416
- package/dist/agents/robota.test.js.map +0 -1
- package/dist/core/robota.d.ts +0 -694
- package/dist/core/robota.d.ts.map +0 -1
- package/dist/core/robota.js +0 -1277
- package/dist/core/robota.js.map +0 -1
- package/dist/executors/local-executor.d.ts +0 -96
- package/dist/executors/local-executor.d.ts.map +0 -1
- package/dist/executors/local-executor.js +0 -197
- package/dist/executors/local-executor.js.map +0 -1
- package/dist/executors/local-executor.test.d.ts +0 -2
- package/dist/executors/local-executor.test.d.ts.map +0 -1
- package/dist/executors/local-executor.test.js +0 -192
- package/dist/executors/local-executor.test.js.map +0 -1
- package/dist/index.d.ts +0 -274
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -235
- package/dist/index.js.map +0 -1
- package/dist/interfaces/agent.d.ts +0 -198
- package/dist/interfaces/agent.d.ts.map +0 -1
- package/dist/interfaces/agent.js +0 -2
- package/dist/interfaces/agent.js.map +0 -1
- package/dist/interfaces/event-service.d.ts +0 -79
- package/dist/interfaces/event-service.d.ts.map +0 -1
- package/dist/interfaces/event-service.js +0 -2
- package/dist/interfaces/event-service.js.map +0 -1
- package/dist/interfaces/executor.d.ts +0 -128
- package/dist/interfaces/executor.d.ts.map +0 -1
- package/dist/interfaces/executor.js +0 -2
- package/dist/interfaces/executor.js.map +0 -1
- package/dist/interfaces/history-module.d.ts +0 -19
- package/dist/interfaces/history-module.d.ts.map +0 -1
- package/dist/interfaces/history-module.js +0 -2
- package/dist/interfaces/history-module.js.map +0 -1
- package/dist/interfaces/index.d.ts +0 -13
- package/dist/interfaces/index.d.ts.map +0 -1
- package/dist/interfaces/index.js +0 -4
- package/dist/interfaces/index.js.map +0 -1
- package/dist/interfaces/manager.d.ts +0 -142
- package/dist/interfaces/manager.d.ts.map +0 -1
- package/dist/interfaces/manager.js +0 -2
- package/dist/interfaces/manager.js.map +0 -1
- package/dist/interfaces/messages.d.ts +0 -75
- package/dist/interfaces/messages.d.ts.map +0 -1
- package/dist/interfaces/messages.js +0 -29
- package/dist/interfaces/messages.js.map +0 -1
- package/dist/interfaces/progress-reporting.d.ts +0 -86
- package/dist/interfaces/progress-reporting.d.ts.map +0 -1
- package/dist/interfaces/progress-reporting.js +0 -37
- package/dist/interfaces/progress-reporting.js.map +0 -1
- package/dist/interfaces/provider.d.ts +0 -217
- package/dist/interfaces/provider.d.ts.map +0 -1
- package/dist/interfaces/provider.js +0 -2
- package/dist/interfaces/provider.js.map +0 -1
- package/dist/interfaces/service.d.ts +0 -205
- package/dist/interfaces/service.d.ts.map +0 -1
- package/dist/interfaces/service.js +0 -6
- package/dist/interfaces/service.js.map +0 -1
- package/dist/interfaces/tool.d.ts +0 -248
- package/dist/interfaces/tool.d.ts.map +0 -1
- package/dist/interfaces/tool.js +0 -2
- package/dist/interfaces/tool.js.map +0 -1
- package/dist/interfaces/types.d.ts +0 -71
- package/dist/interfaces/types.d.ts.map +0 -1
- package/dist/interfaces/types.js +0 -33
- package/dist/interfaces/types.js.map +0 -1
- package/dist/interfaces/workflow-converter.d.ts +0 -193
- package/dist/interfaces/workflow-converter.d.ts.map +0 -1
- package/dist/interfaces/workflow-converter.js +0 -11
- package/dist/interfaces/workflow-converter.js.map +0 -1
- package/dist/interfaces/workflow-validator.d.ts +0 -209
- package/dist/interfaces/workflow-validator.d.ts.map +0 -1
- package/dist/interfaces/workflow-validator.js +0 -16
- package/dist/interfaces/workflow-validator.js.map +0 -1
- package/dist/managers/agent-factory.d.ts +0 -132
- package/dist/managers/agent-factory.d.ts.map +0 -1
- package/dist/managers/agent-factory.js +0 -284
- package/dist/managers/agent-factory.js.map +0 -1
- package/dist/managers/agent-factory.test.d.ts +0 -2
- package/dist/managers/agent-factory.test.d.ts.map +0 -1
- package/dist/managers/agent-factory.test.js +0 -249
- package/dist/managers/agent-factory.test.js.map +0 -1
- package/dist/managers/agent-templates.d.ts +0 -84
- package/dist/managers/agent-templates.d.ts.map +0 -1
- package/dist/managers/agent-templates.js +0 -159
- package/dist/managers/agent-templates.js.map +0 -1
- package/dist/managers/ai-provider-manager.d.ts +0 -80
- package/dist/managers/ai-provider-manager.d.ts.map +0 -1
- package/dist/managers/ai-provider-manager.js +0 -226
- package/dist/managers/ai-provider-manager.js.map +0 -1
- package/dist/managers/conversation-history-manager.d.ts +0 -455
- package/dist/managers/conversation-history-manager.d.ts.map +0 -1
- package/dist/managers/conversation-history-manager.js +0 -578
- package/dist/managers/conversation-history-manager.js.map +0 -1
- package/dist/managers/conversation-history-manager.test.d.ts +0 -2
- package/dist/managers/conversation-history-manager.test.d.ts.map +0 -1
- package/dist/managers/conversation-history-manager.test.js +0 -374
- package/dist/managers/conversation-history-manager.test.js.map +0 -1
- package/dist/managers/index.d.ts +0 -8
- package/dist/managers/index.d.ts.map +0 -1
- package/dist/managers/index.js +0 -8
- package/dist/managers/index.js.map +0 -1
- package/dist/managers/module-registry.d.ts +0 -161
- package/dist/managers/module-registry.d.ts.map +0 -1
- package/dist/managers/module-registry.js +0 -519
- package/dist/managers/module-registry.js.map +0 -1
- package/dist/managers/module-type-registry.d.ts +0 -113
- package/dist/managers/module-type-registry.d.ts.map +0 -1
- package/dist/managers/module-type-registry.js +0 -439
- package/dist/managers/module-type-registry.js.map +0 -1
- package/dist/managers/plugins.d.ts +0 -166
- package/dist/managers/plugins.d.ts.map +0 -1
- package/dist/managers/plugins.js +0 -339
- package/dist/managers/plugins.js.map +0 -1
- package/dist/managers/tool-manager.d.ts +0 -70
- package/dist/managers/tool-manager.d.ts.map +0 -1
- package/dist/managers/tool-manager.js +0 -138
- package/dist/managers/tool-manager.js.map +0 -1
- package/dist/managers/tool-manager.test.d.ts +0 -2
- package/dist/managers/tool-manager.test.d.ts.map +0 -1
- package/dist/managers/tool-manager.test.js +0 -186
- package/dist/managers/tool-manager.test.js.map +0 -1
- package/dist/plugins/conversation-history/conversation-history-plugin.d.ts +0 -67
- package/dist/plugins/conversation-history/conversation-history-plugin.d.ts.map +0 -1
- package/dist/plugins/conversation-history/conversation-history-plugin.js +0 -270
- package/dist/plugins/conversation-history/conversation-history-plugin.js.map +0 -1
- package/dist/plugins/conversation-history/index.d.ts +0 -3
- package/dist/plugins/conversation-history/index.d.ts.map +0 -1
- package/dist/plugins/conversation-history/index.js +0 -2
- package/dist/plugins/conversation-history/index.js.map +0 -1
- package/dist/plugins/conversation-history/storages/database-storage.d.ts +0 -19
- package/dist/plugins/conversation-history/storages/database-storage.d.ts.map +0 -1
- package/dist/plugins/conversation-history/storages/database-storage.js +0 -94
- package/dist/plugins/conversation-history/storages/database-storage.js.map +0 -1
- package/dist/plugins/conversation-history/storages/file-storage.d.ts +0 -15
- package/dist/plugins/conversation-history/storages/file-storage.d.ts.map +0 -1
- package/dist/plugins/conversation-history/storages/file-storage.js +0 -94
- package/dist/plugins/conversation-history/storages/file-storage.js.map +0 -1
- package/dist/plugins/conversation-history/storages/index.d.ts +0 -4
- package/dist/plugins/conversation-history/storages/index.d.ts.map +0 -1
- package/dist/plugins/conversation-history/storages/index.js +0 -4
- package/dist/plugins/conversation-history/storages/index.js.map +0 -1
- package/dist/plugins/conversation-history/storages/memory-storage.d.ts +0 -15
- package/dist/plugins/conversation-history/storages/memory-storage.d.ts.map +0 -1
- package/dist/plugins/conversation-history/storages/memory-storage.js +0 -33
- package/dist/plugins/conversation-history/storages/memory-storage.js.map +0 -1
- package/dist/plugins/conversation-history/types.d.ts +0 -61
- package/dist/plugins/conversation-history/types.d.ts.map +0 -1
- package/dist/plugins/conversation-history/types.js +0 -2
- package/dist/plugins/conversation-history/types.js.map +0 -1
- package/dist/plugins/error-handling/context-adapter.d.ts +0 -30
- package/dist/plugins/error-handling/context-adapter.d.ts.map +0 -1
- package/dist/plugins/error-handling/context-adapter.js +0 -41
- package/dist/plugins/error-handling/context-adapter.js.map +0 -1
- package/dist/plugins/error-handling/error-handling-plugin.d.ts +0 -49
- package/dist/plugins/error-handling/error-handling-plugin.d.ts.map +0 -1
- package/dist/plugins/error-handling/error-handling-plugin.js +0 -229
- package/dist/plugins/error-handling/error-handling-plugin.js.map +0 -1
- package/dist/plugins/error-handling/index.d.ts +0 -10
- package/dist/plugins/error-handling/index.d.ts.map +0 -1
- package/dist/plugins/error-handling/index.js +0 -10
- package/dist/plugins/error-handling/index.js.map +0 -1
- package/dist/plugins/error-handling/types.d.ts +0 -73
- package/dist/plugins/error-handling/types.d.ts.map +0 -1
- package/dist/plugins/error-handling/types.js +0 -14
- package/dist/plugins/error-handling/types.js.map +0 -1
- package/dist/plugins/event-emitter/metrics.d.ts +0 -17
- package/dist/plugins/event-emitter/metrics.d.ts.map +0 -1
- package/dist/plugins/event-emitter/metrics.js +0 -17
- package/dist/plugins/event-emitter/metrics.js.map +0 -1
- package/dist/plugins/event-emitter/types.d.ts +0 -112
- package/dist/plugins/event-emitter/types.d.ts.map +0 -1
- package/dist/plugins/event-emitter/types.js +0 -65
- package/dist/plugins/event-emitter/types.js.map +0 -1
- package/dist/plugins/event-emitter-plugin.d.ts +0 -222
- package/dist/plugins/event-emitter-plugin.d.ts.map +0 -1
- package/dist/plugins/event-emitter-plugin.js +0 -432
- package/dist/plugins/event-emitter-plugin.js.map +0 -1
- package/dist/plugins/event-emitter-plugin.test.d.ts +0 -2
- package/dist/plugins/event-emitter-plugin.test.d.ts.map +0 -1
- package/dist/plugins/event-emitter-plugin.test.js +0 -94
- package/dist/plugins/event-emitter-plugin.test.js.map +0 -1
- package/dist/plugins/execution/execution-analytics-plugin.d.ts +0 -129
- package/dist/plugins/execution/execution-analytics-plugin.d.ts.map +0 -1
- package/dist/plugins/execution/execution-analytics-plugin.js +0 -517
- package/dist/plugins/execution/execution-analytics-plugin.js.map +0 -1
- package/dist/plugins/execution/index.d.ts +0 -3
- package/dist/plugins/execution/index.d.ts.map +0 -1
- package/dist/plugins/execution/index.js +0 -2
- package/dist/plugins/execution/index.js.map +0 -1
- package/dist/plugins/execution/types.d.ts +0 -90
- package/dist/plugins/execution/types.d.ts.map +0 -1
- package/dist/plugins/execution/types.js +0 -2
- package/dist/plugins/execution/types.js.map +0 -1
- package/dist/plugins/index.d.ts +0 -10
- package/dist/plugins/index.d.ts.map +0 -1
- package/dist/plugins/index.js +0 -11
- package/dist/plugins/index.js.map +0 -1
- package/dist/plugins/limits/types.d.ts +0 -61
- package/dist/plugins/limits/types.d.ts.map +0 -1
- package/dist/plugins/limits/types.js +0 -2
- package/dist/plugins/limits/types.js.map +0 -1
- package/dist/plugins/limits-plugin.d.ts +0 -113
- package/dist/plugins/limits-plugin.d.ts.map +0 -1
- package/dist/plugins/limits-plugin.js +0 -380
- package/dist/plugins/limits-plugin.js.map +0 -1
- package/dist/plugins/logging/formatters.d.ts +0 -14
- package/dist/plugins/logging/formatters.d.ts.map +0 -1
- package/dist/plugins/logging/formatters.js +0 -24
- package/dist/plugins/logging/formatters.js.map +0 -1
- package/dist/plugins/logging/index.d.ts +0 -3
- package/dist/plugins/logging/index.d.ts.map +0 -1
- package/dist/plugins/logging/index.js +0 -2
- package/dist/plugins/logging/index.js.map +0 -1
- package/dist/plugins/logging/logging-plugin.d.ts +0 -91
- package/dist/plugins/logging/logging-plugin.d.ts.map +0 -1
- package/dist/plugins/logging/logging-plugin.js +0 -335
- package/dist/plugins/logging/logging-plugin.js.map +0 -1
- package/dist/plugins/logging/storages/console-storage.d.ts +0 -14
- package/dist/plugins/logging/storages/console-storage.d.ts.map +0 -1
- package/dist/plugins/logging/storages/console-storage.js +0 -38
- package/dist/plugins/logging/storages/console-storage.js.map +0 -1
- package/dist/plugins/logging/storages/file-storage.d.ts +0 -14
- package/dist/plugins/logging/storages/file-storage.d.ts.map +0 -1
- package/dist/plugins/logging/storages/file-storage.js +0 -41
- package/dist/plugins/logging/storages/file-storage.js.map +0 -1
- package/dist/plugins/logging/storages/index.d.ts +0 -5
- package/dist/plugins/logging/storages/index.d.ts.map +0 -1
- package/dist/plugins/logging/storages/index.js +0 -5
- package/dist/plugins/logging/storages/index.js.map +0 -1
- package/dist/plugins/logging/storages/remote-storage.d.ts +0 -20
- package/dist/plugins/logging/storages/remote-storage.d.ts.map +0 -1
- package/dist/plugins/logging/storages/remote-storage.js +0 -61
- package/dist/plugins/logging/storages/remote-storage.js.map +0 -1
- package/dist/plugins/logging/storages/silent-storage.d.ts +0 -10
- package/dist/plugins/logging/storages/silent-storage.d.ts.map +0 -1
- package/dist/plugins/logging/storages/silent-storage.js +0 -15
- package/dist/plugins/logging/storages/silent-storage.js.map +0 -1
- package/dist/plugins/logging/types.d.ts +0 -84
- package/dist/plugins/logging/types.d.ts.map +0 -1
- package/dist/plugins/logging/types.js +0 -2
- package/dist/plugins/logging/types.js.map +0 -1
- package/dist/plugins/performance/collectors/system-metrics-collector.d.ts +0 -12
- package/dist/plugins/performance/collectors/system-metrics-collector.d.ts.map +0 -1
- package/dist/plugins/performance/collectors/system-metrics-collector.js +0 -65
- package/dist/plugins/performance/collectors/system-metrics-collector.js.map +0 -1
- package/dist/plugins/performance/index.d.ts +0 -5
- package/dist/plugins/performance/index.d.ts.map +0 -1
- package/dist/plugins/performance/index.js +0 -4
- package/dist/plugins/performance/index.js.map +0 -1
- package/dist/plugins/performance/performance-plugin.d.ts +0 -49
- package/dist/plugins/performance/performance-plugin.d.ts.map +0 -1
- package/dist/plugins/performance/performance-plugin.js +0 -293
- package/dist/plugins/performance/performance-plugin.js.map +0 -1
- package/dist/plugins/performance/storages/index.d.ts +0 -2
- package/dist/plugins/performance/storages/index.d.ts.map +0 -1
- package/dist/plugins/performance/storages/index.js +0 -4
- package/dist/plugins/performance/storages/index.js.map +0 -1
- package/dist/plugins/performance/storages/memory-storage.d.ts +0 -19
- package/dist/plugins/performance/storages/memory-storage.d.ts.map +0 -1
- package/dist/plugins/performance/storages/memory-storage.js +0 -69
- package/dist/plugins/performance/storages/memory-storage.js.map +0 -1
- package/dist/plugins/performance/types.d.ts +0 -154
- package/dist/plugins/performance/types.d.ts.map +0 -1
- package/dist/plugins/performance/types.js +0 -2
- package/dist/plugins/performance/types.js.map +0 -1
- package/dist/plugins/usage/aggregate-usage-stats.d.ts +0 -12
- package/dist/plugins/usage/aggregate-usage-stats.d.ts.map +0 -1
- package/dist/plugins/usage/aggregate-usage-stats.js +0 -115
- package/dist/plugins/usage/aggregate-usage-stats.js.map +0 -1
- package/dist/plugins/usage/index.d.ts +0 -5
- package/dist/plugins/usage/index.d.ts.map +0 -1
- package/dist/plugins/usage/index.js +0 -4
- package/dist/plugins/usage/index.js.map +0 -1
- package/dist/plugins/usage/storages/file-storage.d.ts +0 -22
- package/dist/plugins/usage/storages/file-storage.d.ts.map +0 -1
- package/dist/plugins/usage/storages/file-storage.js +0 -111
- package/dist/plugins/usage/storages/file-storage.js.map +0 -1
- package/dist/plugins/usage/storages/index.d.ts +0 -5
- package/dist/plugins/usage/storages/index.d.ts.map +0 -1
- package/dist/plugins/usage/storages/index.js +0 -5
- package/dist/plugins/usage/storages/index.js.map +0 -1
- package/dist/plugins/usage/storages/memory-storage.d.ts +0 -22
- package/dist/plugins/usage/storages/memory-storage.d.ts.map +0 -1
- package/dist/plugins/usage/storages/memory-storage.js +0 -42
- package/dist/plugins/usage/storages/memory-storage.js.map +0 -1
- package/dist/plugins/usage/storages/remote-storage.d.ts +0 -26
- package/dist/plugins/usage/storages/remote-storage.d.ts.map +0 -1
- package/dist/plugins/usage/storages/remote-storage.js +0 -115
- package/dist/plugins/usage/storages/remote-storage.js.map +0 -1
- package/dist/plugins/usage/storages/silent-storage.d.ts +0 -19
- package/dist/plugins/usage/storages/silent-storage.d.ts.map +0 -1
- package/dist/plugins/usage/storages/silent-storage.js +0 -26
- package/dist/plugins/usage/storages/silent-storage.js.map +0 -1
- package/dist/plugins/usage/types.d.ts +0 -127
- package/dist/plugins/usage/types.d.ts.map +0 -1
- package/dist/plugins/usage/types.js +0 -2
- package/dist/plugins/usage/types.js.map +0 -1
- package/dist/plugins/usage/usage-plugin.d.ts +0 -67
- package/dist/plugins/usage/usage-plugin.d.ts.map +0 -1
- package/dist/plugins/usage/usage-plugin.js +0 -309
- package/dist/plugins/usage/usage-plugin.js.map +0 -1
- package/dist/plugins/webhook/http-client.d.ts +0 -30
- package/dist/plugins/webhook/http-client.d.ts.map +0 -1
- package/dist/plugins/webhook/http-client.js +0 -110
- package/dist/plugins/webhook/http-client.js.map +0 -1
- package/dist/plugins/webhook/index.d.ts +0 -9
- package/dist/plugins/webhook/index.d.ts.map +0 -1
- package/dist/plugins/webhook/index.js +0 -9
- package/dist/plugins/webhook/index.js.map +0 -1
- package/dist/plugins/webhook/transformer.d.ts +0 -63
- package/dist/plugins/webhook/transformer.d.ts.map +0 -1
- package/dist/plugins/webhook/transformer.js +0 -157
- package/dist/plugins/webhook/transformer.js.map +0 -1
- package/dist/plugins/webhook/types.d.ts +0 -183
- package/dist/plugins/webhook/types.d.ts.map +0 -1
- package/dist/plugins/webhook/types.js +0 -2
- package/dist/plugins/webhook/types.js.map +0 -1
- package/dist/plugins/webhook/webhook-plugin.d.ts +0 -92
- package/dist/plugins/webhook/webhook-plugin.d.ts.map +0 -1
- package/dist/plugins/webhook/webhook-plugin.js +0 -328
- package/dist/plugins/webhook/webhook-plugin.js.map +0 -1
- package/dist/schemas/agent-template-schema.d.ts +0 -137
- package/dist/schemas/agent-template-schema.d.ts.map +0 -1
- package/dist/schemas/agent-template-schema.js +0 -87
- package/dist/schemas/agent-template-schema.js.map +0 -1
- package/dist/services/conversation-service/index.d.ts +0 -88
- package/dist/services/conversation-service/index.d.ts.map +0 -1
- package/dist/services/conversation-service/index.js +0 -441
- package/dist/services/conversation-service/index.js.map +0 -1
- package/dist/services/conversation-service/types.d.ts +0 -32
- package/dist/services/conversation-service/types.d.ts.map +0 -1
- package/dist/services/conversation-service/types.js +0 -8
- package/dist/services/conversation-service/types.js.map +0 -1
- package/dist/services/event-service.d.ts +0 -61
- package/dist/services/event-service.d.ts.map +0 -1
- package/dist/services/event-service.js +0 -110
- package/dist/services/event-service.js.map +0 -1
- package/dist/services/event-service.test.d.ts +0 -2
- package/dist/services/event-service.test.d.ts.map +0 -1
- package/dist/services/event-service.test.js +0 -86
- package/dist/services/event-service.test.js.map +0 -1
- package/dist/services/execution-service.d.ts +0 -151
- package/dist/services/execution-service.d.ts.map +0 -1
- package/dist/services/execution-service.js +0 -1262
- package/dist/services/execution-service.js.map +0 -1
- package/dist/services/execution-service.test.d.ts +0 -2
- package/dist/services/execution-service.test.d.ts.map +0 -1
- package/dist/services/execution-service.test.js +0 -338
- package/dist/services/execution-service.test.js.map +0 -1
- package/dist/services/history-module.d.ts +0 -15
- package/dist/services/history-module.d.ts.map +0 -1
- package/dist/services/history-module.js +0 -42
- package/dist/services/history-module.js.map +0 -1
- package/dist/services/in-memory-history-store.d.ts +0 -12
- package/dist/services/in-memory-history-store.d.ts.map +0 -1
- package/dist/services/in-memory-history-store.js +0 -41
- package/dist/services/in-memory-history-store.js.map +0 -1
- package/dist/services/index.d.ts +0 -7
- package/dist/services/index.d.ts.map +0 -1
- package/dist/services/index.js +0 -13
- package/dist/services/index.js.map +0 -1
- package/dist/services/task-events.d.ts +0 -6
- package/dist/services/task-events.d.ts.map +0 -1
- package/dist/services/task-events.js +0 -6
- package/dist/services/task-events.js.map +0 -1
- package/dist/services/tool-execution-service.d.ts +0 -74
- package/dist/services/tool-execution-service.d.ts.map +0 -1
- package/dist/services/tool-execution-service.js +0 -189
- package/dist/services/tool-execution-service.js.map +0 -1
- package/dist/services/user-events.d.ts +0 -7
- package/dist/services/user-events.d.ts.map +0 -1
- package/dist/services/user-events.js +0 -6
- package/dist/services/user-events.js.map +0 -1
- package/dist/tools/implementations/function-tool/index.d.ts +0 -9
- package/dist/tools/implementations/function-tool/index.d.ts.map +0 -1
- package/dist/tools/implementations/function-tool/index.js +0 -13
- package/dist/tools/implementations/function-tool/index.js.map +0 -1
- package/dist/tools/implementations/function-tool/schema-converter.d.ts +0 -32
- package/dist/tools/implementations/function-tool/schema-converter.d.ts.map +0 -1
- package/dist/tools/implementations/function-tool/schema-converter.js +0 -164
- package/dist/tools/implementations/function-tool/schema-converter.js.map +0 -1
- package/dist/tools/implementations/function-tool/types.d.ts +0 -72
- package/dist/tools/implementations/function-tool/types.d.ts.map +0 -1
- package/dist/tools/implementations/function-tool/types.js +0 -14
- package/dist/tools/implementations/function-tool/types.js.map +0 -1
- package/dist/tools/implementations/function-tool.d.ts +0 -49
- package/dist/tools/implementations/function-tool.d.ts.map +0 -1
- package/dist/tools/implementations/function-tool.js +0 -223
- package/dist/tools/implementations/function-tool.js.map +0 -1
- package/dist/tools/implementations/index.d.ts +0 -4
- package/dist/tools/implementations/index.d.ts.map +0 -1
- package/dist/tools/implementations/index.js +0 -5
- package/dist/tools/implementations/index.js.map +0 -1
- package/dist/tools/implementations/mcp-tool.d.ts +0 -72
- package/dist/tools/implementations/mcp-tool.d.ts.map +0 -1
- package/dist/tools/implementations/mcp-tool.js +0 -246
- package/dist/tools/implementations/mcp-tool.js.map +0 -1
- package/dist/tools/implementations/openapi-tool.d.ts +0 -56
- package/dist/tools/implementations/openapi-tool.d.ts.map +0 -1
- package/dist/tools/implementations/openapi-tool.js +0 -324
- package/dist/tools/implementations/openapi-tool.js.map +0 -1
- package/dist/tools/implementations/relay-mcp-tool.d.ts +0 -38
- package/dist/tools/implementations/relay-mcp-tool.d.ts.map +0 -1
- package/dist/tools/implementations/relay-mcp-tool.js +0 -46
- package/dist/tools/implementations/relay-mcp-tool.js.map +0 -1
- package/dist/tools/index.d.ts +0 -3
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/index.js +0 -4
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/registry/index.d.ts +0 -2
- package/dist/tools/registry/index.d.ts.map +0 -1
- package/dist/tools/registry/index.js +0 -3
- package/dist/tools/registry/index.js.map +0 -1
- package/dist/tools/registry/tool-registry.d.ts +0 -54
- package/dist/tools/registry/tool-registry.d.ts.map +0 -1
- package/dist/tools/registry/tool-registry.js +0 -146
- package/dist/tools/registry/tool-registry.js.map +0 -1
- package/dist/utils/errors.d.ts +0 -155
- package/dist/utils/errors.d.ts.map +0 -1
- package/dist/utils/errors.js +0 -203
- package/dist/utils/errors.js.map +0 -1
- package/dist/utils/execution-proxy.d.ts +0 -75
- package/dist/utils/execution-proxy.d.ts.map +0 -1
- package/dist/utils/execution-proxy.js +0 -230
- package/dist/utils/execution-proxy.js.map +0 -1
- package/dist/utils/index.d.ts +0 -11
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js +0 -7
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/logger.d.ts +0 -74
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js +0 -143
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/message-converter.d.ts +0 -68
- package/dist/utils/message-converter.d.ts.map +0 -1
- package/dist/utils/message-converter.js +0 -87
- package/dist/utils/message-converter.js.map +0 -1
- package/dist/utils/periodic-task.d.ts +0 -14
- package/dist/utils/periodic-task.d.ts.map +0 -1
- package/dist/utils/periodic-task.js +0 -26
- package/dist/utils/periodic-task.js.map +0 -1
- package/dist/utils/validation.d.ts +0 -40
- package/dist/utils/validation.d.ts.map +0 -1
- package/dist/utils/validation.js +0 -162
- package/dist/utils/validation.js.map +0 -1
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { createLogger } from '../../../utils/logger';
|
|
2
|
-
import { StorageError } from '../../../utils/errors';
|
|
3
|
-
/**
|
|
4
|
-
* Database storage implementation
|
|
5
|
-
*/
|
|
6
|
-
export class DatabaseHistoryStorage {
|
|
7
|
-
connectionString;
|
|
8
|
-
logger;
|
|
9
|
-
constructor(connectionString) {
|
|
10
|
-
this.connectionString = connectionString;
|
|
11
|
-
this.logger = createLogger('DatabaseHistoryStorage');
|
|
12
|
-
}
|
|
13
|
-
async save(conversationId, _entry) {
|
|
14
|
-
try {
|
|
15
|
-
// Database operations would be implemented here
|
|
16
|
-
this.logger.warn('Database storage not fully implemented yet', {
|
|
17
|
-
conversationId,
|
|
18
|
-
connectionString: this.maskConnectionString()
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
catch (error) {
|
|
22
|
-
throw new StorageError('Failed to save conversation to database', {
|
|
23
|
-
conversationId,
|
|
24
|
-
error: error instanceof Error ? error.message : String(error)
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
async load(conversationId) {
|
|
29
|
-
try {
|
|
30
|
-
// Database operations would be implemented here
|
|
31
|
-
this.logger.warn('Database storage not fully implemented yet', {
|
|
32
|
-
conversationId,
|
|
33
|
-
connectionString: this.maskConnectionString()
|
|
34
|
-
});
|
|
35
|
-
return undefined;
|
|
36
|
-
}
|
|
37
|
-
catch (error) {
|
|
38
|
-
throw new StorageError('Failed to load conversation from database', {
|
|
39
|
-
conversationId,
|
|
40
|
-
error: error instanceof Error ? error.message : String(error)
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
async list() {
|
|
45
|
-
try {
|
|
46
|
-
// Database operations would be implemented here
|
|
47
|
-
this.logger.warn('Database storage not fully implemented yet', {
|
|
48
|
-
connectionString: this.maskConnectionString()
|
|
49
|
-
});
|
|
50
|
-
return [];
|
|
51
|
-
}
|
|
52
|
-
catch (error) {
|
|
53
|
-
throw new StorageError('Failed to list conversations from database', {
|
|
54
|
-
error: error instanceof Error ? error.message : String(error)
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
async delete(conversationId) {
|
|
59
|
-
try {
|
|
60
|
-
// Database operations would be implemented here
|
|
61
|
-
this.logger.warn('Database storage not fully implemented yet', {
|
|
62
|
-
conversationId,
|
|
63
|
-
connectionString: this.maskConnectionString()
|
|
64
|
-
});
|
|
65
|
-
return false;
|
|
66
|
-
}
|
|
67
|
-
catch (error) {
|
|
68
|
-
throw new StorageError('Failed to delete conversation from database', {
|
|
69
|
-
conversationId,
|
|
70
|
-
error: error instanceof Error ? error.message : String(error)
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
async clear() {
|
|
75
|
-
try {
|
|
76
|
-
// Database operations would be implemented here
|
|
77
|
-
this.logger.warn('Database storage not fully implemented yet', {
|
|
78
|
-
connectionString: this.maskConnectionString()
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
catch (error) {
|
|
82
|
-
throw new StorageError('Failed to clear conversations from database', {
|
|
83
|
-
error: error instanceof Error ? error.message : String(error)
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Mask sensitive information in connection string for logging
|
|
89
|
-
*/
|
|
90
|
-
maskConnectionString() {
|
|
91
|
-
return this.connectionString.replace(/(:\/\/[^:]+:)[^@]+(@)/, '$1***$2');
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
//# sourceMappingURL=database-storage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"database-storage.js","sourceRoot":"","sources":["../../../../src/plugins/conversation-history/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CAA6C,EAAE;gBAClE,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;aAChE,CAAC,CAAC;QACP,CAAC;IACL,CAAC;IAED;;OAEG;IACK,oBAAoB;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,uBAAuB,EAAE,SAAS,CAAC,CAAC;IAC7E,CAAC;CACJ"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { IHistoryStorage, IConversationHistoryEntry } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* File storage implementation
|
|
4
|
-
*/
|
|
5
|
-
export declare class FileHistoryStorage implements IHistoryStorage {
|
|
6
|
-
private filePath;
|
|
7
|
-
private logger;
|
|
8
|
-
constructor(filePath: string);
|
|
9
|
-
save(conversationId: string, _entry: IConversationHistoryEntry): Promise<void>;
|
|
10
|
-
load(conversationId: string): Promise<IConversationHistoryEntry | undefined>;
|
|
11
|
-
list(): Promise<string[]>;
|
|
12
|
-
delete(conversationId: string): Promise<boolean>;
|
|
13
|
-
clear(): Promise<void>;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=file-storage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-storage.d.ts","sourceRoot":"","sources":["../../../../src/plugins/conversation-history/storages/file-storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAI3E;;GAEG;AACH,qBAAa,kBAAmB,YAAW,eAAe;IACtD,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,MAAM,CAAU;gBAEZ,QAAQ,EAAE,MAAM;IAKtB,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC;IAiB9E,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,yBAAyB,GAAG,SAAS,CAAC;IAiB5E,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAezB,MAAM,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAiBhD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAa/B"}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { createLogger } from '../../../utils/logger';
|
|
2
|
-
import { StorageError } from '../../../utils/errors';
|
|
3
|
-
/**
|
|
4
|
-
* File storage implementation
|
|
5
|
-
*/
|
|
6
|
-
export class FileHistoryStorage {
|
|
7
|
-
filePath;
|
|
8
|
-
logger;
|
|
9
|
-
constructor(filePath) {
|
|
10
|
-
this.filePath = filePath;
|
|
11
|
-
this.logger = createLogger('FileHistoryStorage');
|
|
12
|
-
}
|
|
13
|
-
async save(conversationId, _entry) {
|
|
14
|
-
try {
|
|
15
|
-
// File operations would be implemented here
|
|
16
|
-
// This is a placeholder for actual file system operations
|
|
17
|
-
this.logger.warn('File storage not fully implemented yet', {
|
|
18
|
-
conversationId,
|
|
19
|
-
filePath: this.filePath
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
catch (error) {
|
|
23
|
-
throw new StorageError('Failed to save conversation to file', {
|
|
24
|
-
conversationId,
|
|
25
|
-
filePath: this.filePath,
|
|
26
|
-
error: error instanceof Error ? error.message : String(error)
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
async load(conversationId) {
|
|
31
|
-
try {
|
|
32
|
-
// File operations would be implemented here
|
|
33
|
-
this.logger.warn('File storage not fully implemented yet', {
|
|
34
|
-
conversationId,
|
|
35
|
-
filePath: this.filePath
|
|
36
|
-
});
|
|
37
|
-
return undefined;
|
|
38
|
-
}
|
|
39
|
-
catch (error) {
|
|
40
|
-
throw new StorageError('Failed to load conversation from file', {
|
|
41
|
-
conversationId,
|
|
42
|
-
filePath: this.filePath,
|
|
43
|
-
error: error instanceof Error ? error.message : String(error)
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
async list() {
|
|
48
|
-
try {
|
|
49
|
-
// File operations would be implemented here
|
|
50
|
-
this.logger.warn('File storage not fully implemented yet', {
|
|
51
|
-
filePath: this.filePath
|
|
52
|
-
});
|
|
53
|
-
return [];
|
|
54
|
-
}
|
|
55
|
-
catch (error) {
|
|
56
|
-
throw new StorageError('Failed to list conversations from file', {
|
|
57
|
-
filePath: this.filePath,
|
|
58
|
-
error: error instanceof Error ? error.message : String(error)
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
async delete(conversationId) {
|
|
63
|
-
try {
|
|
64
|
-
// File operations would be implemented here
|
|
65
|
-
this.logger.warn('File storage not fully implemented yet', {
|
|
66
|
-
conversationId,
|
|
67
|
-
filePath: this.filePath
|
|
68
|
-
});
|
|
69
|
-
return false;
|
|
70
|
-
}
|
|
71
|
-
catch (error) {
|
|
72
|
-
throw new StorageError('Failed to delete conversation from file', {
|
|
73
|
-
conversationId,
|
|
74
|
-
filePath: this.filePath,
|
|
75
|
-
error: error instanceof Error ? error.message : String(error)
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
async clear() {
|
|
80
|
-
try {
|
|
81
|
-
// File operations would be implemented here
|
|
82
|
-
this.logger.warn('File storage not fully implemented yet', {
|
|
83
|
-
filePath: this.filePath
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
catch (error) {
|
|
87
|
-
throw new StorageError('Failed to clear conversations from file', {
|
|
88
|
-
filePath: this.filePath,
|
|
89
|
-
error: error instanceof Error ? error.message : String(error)
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
//# sourceMappingURL=file-storage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-storage.js","sourceRoot":"","sources":["../../../../src/plugins/conversation-history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C,EAAE;gBACvD,QAAQ,EAAE,IAAI,CAAC,QAAQ;aAC1B,CAAC,CAAC;QACP,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,MAAM,IAAI,YAAY,CAAC,yCAAyC,EAAE;gBAC9D,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;aAChE,CAAC,CAAC;QACP,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/conversation-history/storages/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/plugins/conversation-history/storages/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { IHistoryStorage, IConversationHistoryEntry } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Memory storage implementation
|
|
4
|
-
*/
|
|
5
|
-
export declare class MemoryHistoryStorage implements IHistoryStorage {
|
|
6
|
-
private conversations;
|
|
7
|
-
private maxConversations;
|
|
8
|
-
constructor(maxConversations?: number);
|
|
9
|
-
save(conversationId: string, entry: IConversationHistoryEntry): Promise<void>;
|
|
10
|
-
load(conversationId: string): Promise<IConversationHistoryEntry | undefined>;
|
|
11
|
-
list(): Promise<string[]>;
|
|
12
|
-
delete(conversationId: string): Promise<boolean>;
|
|
13
|
-
clear(): Promise<void>;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=memory-storage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"memory-storage.d.ts","sourceRoot":"","sources":["../../../../src/plugins/conversation-history/storages/memory-storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAE3E;;GAEG;AACH,qBAAa,oBAAqB,YAAW,eAAe;IACxD,OAAO,CAAC,aAAa,CAAgD;IACrE,OAAO,CAAC,gBAAgB,CAAS;gBAErB,gBAAgB,GAAE,MAAY;IAIpC,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC;IAY7E,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,yBAAyB,GAAG,SAAS,CAAC;IAI5E,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAIzB,MAAM,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIhD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAG/B"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Memory storage implementation
|
|
3
|
-
*/
|
|
4
|
-
export class MemoryHistoryStorage {
|
|
5
|
-
conversations = new Map();
|
|
6
|
-
maxConversations;
|
|
7
|
-
constructor(maxConversations = 100) {
|
|
8
|
-
this.maxConversations = maxConversations;
|
|
9
|
-
}
|
|
10
|
-
async save(conversationId, entry) {
|
|
11
|
-
// Remove oldest conversation if limit exceeded
|
|
12
|
-
if (this.conversations.size >= this.maxConversations && !this.conversations.has(conversationId)) {
|
|
13
|
-
const oldestId = this.conversations.keys().next().value;
|
|
14
|
-
if (oldestId) {
|
|
15
|
-
this.conversations.delete(oldestId);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
this.conversations.set(conversationId, { ...entry });
|
|
19
|
-
}
|
|
20
|
-
async load(conversationId) {
|
|
21
|
-
return this.conversations.get(conversationId);
|
|
22
|
-
}
|
|
23
|
-
async list() {
|
|
24
|
-
return Array.from(this.conversations.keys());
|
|
25
|
-
}
|
|
26
|
-
async delete(conversationId) {
|
|
27
|
-
return this.conversations.delete(conversationId);
|
|
28
|
-
}
|
|
29
|
-
async clear() {
|
|
30
|
-
this.conversations.clear();
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=memory-storage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"memory-storage.js","sourceRoot":"","sources":["../../../../src/plugins/conversation-history/storages/memory-storage.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,OAAO,oBAAoB;IACrB,aAAa,GAAG,IAAI,GAAG,EAAqC,CAAC;IAC7D,gBAAgB,CAAS;IAEjC,YAAY,mBAA2B,GAAG;QACtC,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IAC7C,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,cAAsB,EAAE,KAAgC;QAC/D,+CAA+C;QAC/C,IAAI,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,IAAI,CAAC,gBAAgB,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC;YAC9F,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC;YACxD,IAAI,QAAQ,EAAE,CAAC;gBACX,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YACxC,CAAC;QACL,CAAC;QAED,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;IACzD,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,cAAsB;QAC7B,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAClD,CAAC;IAED,KAAK,CAAC,IAAI;QACN,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC;IACjD,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,cAAsB;QAC/B,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IACrD,CAAC;IAED,KAAK,CAAC,KAAK;QACP,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;IAC/B,CAAC;CACJ"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { TUniversalMessage } from '../../interfaces/agent';
|
|
2
|
-
import type { IPluginOptions, IPluginStats } from '../../abstracts/abstract-plugin';
|
|
3
|
-
/**
|
|
4
|
-
* Storage strategy for conversation history
|
|
5
|
-
*/
|
|
6
|
-
export type THistoryStorageStrategy = 'memory' | 'file' | 'database';
|
|
7
|
-
/**
|
|
8
|
-
* Configuration options for conversation history plugin
|
|
9
|
-
*/
|
|
10
|
-
export interface IConversationHistoryPluginOptions extends IPluginOptions {
|
|
11
|
-
/** Storage strategy to use */
|
|
12
|
-
storage: THistoryStorageStrategy;
|
|
13
|
-
/** Maximum number of conversations to store */
|
|
14
|
-
maxConversations?: number;
|
|
15
|
-
/** Maximum messages per conversation */
|
|
16
|
-
maxMessagesPerConversation?: number;
|
|
17
|
-
/** File path for file storage strategy */
|
|
18
|
-
filePath?: string;
|
|
19
|
-
/** Database connection string for database storage */
|
|
20
|
-
connectionString?: string;
|
|
21
|
-
/** Whether to auto-save after each message */
|
|
22
|
-
autoSave?: boolean;
|
|
23
|
-
/** Save interval in milliseconds for batch saving */
|
|
24
|
-
saveInterval?: number;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Conversation history entry
|
|
28
|
-
*/
|
|
29
|
-
export interface IConversationHistoryEntry {
|
|
30
|
-
conversationId: string;
|
|
31
|
-
messages: TUniversalMessage[];
|
|
32
|
-
startTime: Date;
|
|
33
|
-
lastUpdated: Date;
|
|
34
|
-
metadata?: Record<string, string | number | boolean | Date>;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Storage interface for conversation history
|
|
38
|
-
*/
|
|
39
|
-
export interface IHistoryStorage {
|
|
40
|
-
save(conversationId: string, entry: IConversationHistoryEntry): Promise<void>;
|
|
41
|
-
load(conversationId: string): Promise<IConversationHistoryEntry | undefined>;
|
|
42
|
-
list(): Promise<string[]>;
|
|
43
|
-
delete(conversationId: string): Promise<boolean>;
|
|
44
|
-
clear(): Promise<void>;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Conversation history plugin statistics
|
|
48
|
-
*/
|
|
49
|
-
export interface IConversationHistoryPluginStats extends IPluginStats {
|
|
50
|
-
/** Total number of conversations stored */
|
|
51
|
-
totalConversations: number;
|
|
52
|
-
/** Total number of messages stored */
|
|
53
|
-
totalMessages: number;
|
|
54
|
-
/** Storage strategy in use */
|
|
55
|
-
storageStrategy: THistoryStorageStrategy;
|
|
56
|
-
/** Last save timestamp */
|
|
57
|
-
lastSaveTime?: Date;
|
|
58
|
-
/** Number of failed saves */
|
|
59
|
-
failedSaves: number;
|
|
60
|
-
}
|
|
61
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/plugins/conversation-history/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpF;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,MAAM,GAAG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AAsC;IACtC,aAAa,EAAE,MAAM,CAAC;IACtB,8BAA8B;IAC9B,eAAe,EAAE,uBAAuB,CAAC;IACzC,0BAA0B;IAC1B,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,6BAA6B;IAC7B,WAAW,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plugins/conversation-history/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ErrorHandling Plugin - Context adapter utilities for Facade pattern
|
|
3
|
-
*
|
|
4
|
-
* REASON: TypeScript exactOptionalPropertyTypes strict mode requires special handling for optional properties
|
|
5
|
-
* ALTERNATIVES_CONSIDERED: Bracket notation (rejected by TS), type assertions (rejected), interface modification (breaks compatibility), union types (causes dependencies), removing context (loses debugging)
|
|
6
|
-
* TODO: Consider unified error context type system across all plugins
|
|
7
|
-
*/
|
|
8
|
-
import type { IErrorHandlingContextData, IErrorContextAdapter } from './types';
|
|
9
|
-
import type { TErrorContextData } from '../../utils/errors';
|
|
10
|
-
/**
|
|
11
|
-
* Convert IErrorHandlingContextData to ErrorContextData-compatible format for PluginError
|
|
12
|
-
* REASON: Simple object spread with known properties to avoid index signature conflicts
|
|
13
|
-
* ALTERNATIVES_CONSIDERED: Complex type adapters (unnecessary), Object.assign (verbose), bracket notation (rejected by TS), type assertions (reduces safety)
|
|
14
|
-
* TODO: Consider unified error context type system across all plugins
|
|
15
|
-
*/
|
|
16
|
-
export declare function toErrorContext(context: IErrorHandlingContextData): IErrorContextAdapter;
|
|
17
|
-
/**
|
|
18
|
-
* Safe context extraction for PluginError with nested context structure
|
|
19
|
-
*
|
|
20
|
-
* REASON: PluginError context needs flexible data structure for debugging information
|
|
21
|
-
* ALTERNATIVES_CONSIDERED:
|
|
22
|
-
* 1. Strict primitive types (loses debugging information)
|
|
23
|
-
* 2. Interface definitions (too rigid for error contexts)
|
|
24
|
-
* 3. Union types (becomes unwieldy for error data)
|
|
25
|
-
* 4. Generic constraints (too complex for error handling)
|
|
26
|
-
* 5. Type assertions (decreases type safety)
|
|
27
|
-
* TODO: Consider standardized error context interface if patterns emerge
|
|
28
|
-
*/
|
|
29
|
-
export declare function createPluginErrorContext(context: IErrorHandlingContextData, additionalData?: TErrorContextData): TErrorContextData;
|
|
30
|
-
//# sourceMappingURL=context-adapter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-adapter.d.ts","sourceRoot":"","sources":["../../../src/plugins/error-handling/context-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,yBAAyB,GAAG,oBAAoB,CAQvF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,yBAAyB,EAAE,cAAc,CAAC,EAAE,iBAAiB,GAAG,iBAAiB,CAKlI"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ErrorHandling Plugin - Context adapter utilities for Facade pattern
|
|
3
|
-
*
|
|
4
|
-
* REASON: TypeScript exactOptionalPropertyTypes strict mode requires special handling for optional properties
|
|
5
|
-
* ALTERNATIVES_CONSIDERED: Bracket notation (rejected by TS), type assertions (rejected), interface modification (breaks compatibility), union types (causes dependencies), removing context (loses debugging)
|
|
6
|
-
* TODO: Consider unified error context type system across all plugins
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Convert IErrorHandlingContextData to ErrorContextData-compatible format for PluginError
|
|
10
|
-
* REASON: Simple object spread with known properties to avoid index signature conflicts
|
|
11
|
-
* ALTERNATIVES_CONSIDERED: Complex type adapters (unnecessary), Object.assign (verbose), bracket notation (rejected by TS), type assertions (reduces safety)
|
|
12
|
-
* TODO: Consider unified error context type system across all plugins
|
|
13
|
-
*/
|
|
14
|
-
export function toErrorContext(context) {
|
|
15
|
-
return {
|
|
16
|
-
...(context.executionId && { executionId: context.executionId }),
|
|
17
|
-
...(context.sessionId && { sessionId: context.sessionId }),
|
|
18
|
-
...(context.userId && { userId: context.userId }),
|
|
19
|
-
...(context.attempt !== undefined && { attempt: context.attempt }),
|
|
20
|
-
...(context.originalError && { originalError: context.originalError })
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Safe context extraction for PluginError with nested context structure
|
|
25
|
-
*
|
|
26
|
-
* REASON: PluginError context needs flexible data structure for debugging information
|
|
27
|
-
* ALTERNATIVES_CONSIDERED:
|
|
28
|
-
* 1. Strict primitive types (loses debugging information)
|
|
29
|
-
* 2. Interface definitions (too rigid for error contexts)
|
|
30
|
-
* 3. Union types (becomes unwieldy for error data)
|
|
31
|
-
* 4. Generic constraints (too complex for error handling)
|
|
32
|
-
* 5. Type assertions (decreases type safety)
|
|
33
|
-
* TODO: Consider standardized error context interface if patterns emerge
|
|
34
|
-
*/
|
|
35
|
-
export function createPluginErrorContext(context, additionalData) {
|
|
36
|
-
return {
|
|
37
|
-
...toErrorContext(context),
|
|
38
|
-
...(additionalData && { ...additionalData })
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=context-adapter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-adapter.js","sourceRoot":"","sources":["../../../src/plugins/error-handling/context-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,OAAkC;IAC7D,OAAO;QACH,GAAG,CAAC,OAAO,CAAC,WAAW,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC;QAChE,GAAG,CAAC,OAAO,CAAC,SAAS,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC;QAC1D,GAAG,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;QACjD,GAAG,CAAC,OAAO,CAAC,OAAO,KAAK,SAAS,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC;QAClE,GAAG,CAAC,OAAO,CAAC,aAAa,IAAI,EAAE,aAAa,EAAE,OAAO,CAAC,aAAa,EAAE,CAAC;KACzE,CAAC;AACN,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,wBAAwB,CAAC,OAAkC,EAAE,cAAkC;IAC3G,OAAO;QACH,GAAG,cAAc,CAAC,OAAO,CAAC;QAC1B,GAAG,CAAC,cAAc,IAAI,EAAE,GAAG,cAAc,EAAE,CAAC;KAC/C,CAAC;AACN,CAAC"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { AbstractPlugin } from '../../abstracts/abstract-plugin';
|
|
2
|
-
import type { IErrorHandlingContextData, IErrorHandlingPluginOptions, IErrorHandlingPluginStats } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Plugin for handling errors with configurable strategies
|
|
5
|
-
* Provides error recovery, retry mechanisms, and circuit breaker patterns
|
|
6
|
-
*/
|
|
7
|
-
export declare class ErrorHandlingPlugin extends AbstractPlugin<IErrorHandlingPluginOptions, IErrorHandlingPluginStats> {
|
|
8
|
-
name: string;
|
|
9
|
-
version: string;
|
|
10
|
-
private pluginOptions;
|
|
11
|
-
private logger;
|
|
12
|
-
private failureCount;
|
|
13
|
-
private circuitBreakerOpen;
|
|
14
|
-
private lastFailureTime;
|
|
15
|
-
constructor(options: IErrorHandlingPluginOptions);
|
|
16
|
-
/**
|
|
17
|
-
* Handle an error with the configured strategy
|
|
18
|
-
*/
|
|
19
|
-
handleError(error: Error, context?: IErrorHandlingContextData): Promise<void>;
|
|
20
|
-
/**
|
|
21
|
-
* Execute a function with error handling and retry logic
|
|
22
|
-
*/
|
|
23
|
-
/**
|
|
24
|
-
* Execute a function with error handling and retry logic
|
|
25
|
-
* REASON: PluginError constructor requires ErrorContextData which has different type constraints than IErrorHandlingContextData, causing multiple type compatibility issues
|
|
26
|
-
* ALTERNATIVES_CONSIDERED: Union types (breaks existing error context interfaces), interface definition (creates circular dependencies), generic types (complex type propagation through error handling chain), conditional types (breaks existing plugin interfaces), mapped types (incompatible with error constructor signatures), type guards (runtime only, doesn't solve constructor compatibility), custom declarations (breaks PluginError interface contract), code refactoring (would require redesigning entire error handling system across all plugins), @types packages (none available for this specific use case), external library integration (no standard error context type systems available), utility types (Pick/Omit create new compatibility issues)
|
|
27
|
-
* TODO: Create unified error context type system that bridges IErrorHandlingContextData and ErrorContextData requirements, or redesign PluginError to accept more flexible context types
|
|
28
|
-
*/
|
|
29
|
-
executeWithRetry<T>(fn: () => Promise<T>, context?: IErrorHandlingContextData): Promise<T>;
|
|
30
|
-
/**
|
|
31
|
-
* Reset circuit breaker state
|
|
32
|
-
*/
|
|
33
|
-
resetCircuitBreaker(): void;
|
|
34
|
-
/**
|
|
35
|
-
* Get error handling statistics
|
|
36
|
-
*/
|
|
37
|
-
getStats(): IErrorHandlingPluginStats;
|
|
38
|
-
/**
|
|
39
|
-
* Cleanup resources
|
|
40
|
-
*/
|
|
41
|
-
destroy(): Promise<void>;
|
|
42
|
-
private handleSimple;
|
|
43
|
-
private handleCircuitBreaker;
|
|
44
|
-
private handleExponentialBackoff;
|
|
45
|
-
private isCircuitBreakerOpen;
|
|
46
|
-
private validateOptions;
|
|
47
|
-
private sleep;
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=error-handling-plugin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error-handling-plugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/error-handling/error-handling-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAkC,MAAM,iCAAiC,CAAC;AAKjG,OAAO,KAAK,EACR,yBAAyB,EACzB,2BAA2B,EAC3B,yBAAyB,EAC5B,MAAM,SAAS,CAAC;AAGjB;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,cAAc,CAAC,2BAA2B,EAAE,yBAAyB,CAAC;IAC3G,IAAI,SAAyB;IAC7B,OAAO,SAAW;IAElB,OAAO,CAAC,aAAa,CAAmK;IACxL,OAAO,CAAC,MAAM,CAAU;IACxB,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,kBAAkB,CAAS;IACnC,OAAO,CAAC,eAAe,CAAK;gBAEhB,OAAO,EAAE,2BAA2B;IA+BhD;;OAEG;IACG,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,GAAE,yBAA8B,GAAG,OAAO,CAAC,IAAI,CAAC;IAsCvF;;OAEG;IACH;;;;;OAKG;IACG,gBAAgB,CAAC,CAAC,EACpB,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,OAAO,GAAE,yBAA8B,GACxC,OAAO,CAAC,CAAC,CAAC;IAuDb;;OAEG;IACH,mBAAmB,IAAI,IAAI;IAO3B;;OAEG;IACM,QAAQ,IAAI,yBAAyB;IAY9C;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;YAIhB,YAAY;YAQZ,oBAAoB;YAcpB,wBAAwB;IAStC,OAAO,CAAC,oBAAoB;IAiB5B,OAAO,CAAC,eAAe;IAqBvB,OAAO,CAAC,KAAK;CAGhB"}
|