@robota-sdk/agent-core 3.0.0-beta.7 → 3.0.0-beta.70
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 +116 -0
- package/README.md +41 -12
- package/dist/browser/index.d.ts +3735 -3090
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +12 -5
- package/dist/browser/index.js.map +1 -0
- package/dist/node/index.cjs +11 -5
- package/dist/node/index.d.ts +3735 -3090
- package/dist/node/index.d.ts.map +1 -0
- package/dist/node/index.js +12 -5
- package/dist/node/index.js.map +1 -0
- package/package.json +8 -5
- 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/browser/builtin-templates.json +0 -107
- 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/node/builtin-templates.json +0 -107
- package/dist/node/index.d.cts +0 -4238
- 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,3 +0,0 @@
|
|
|
1
|
-
export { ExecutionAnalyticsPlugin } from './execution-analytics-plugin';
|
|
2
|
-
export type { IExecutionAnalyticsOptions, IExecutionStats, IAggregatedExecutionStats, IExecutionAnalyticsPluginStats, IExecutionAnalyticsContextData } from './types';
|
|
3
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/execution/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,YAAY,EACR,0BAA0B,EAC1B,eAAe,EACf,yBAAyB,EACzB,8BAA8B,EAC9B,8BAA8B,EACjC,MAAM,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/execution/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Analytics context data for execution tracking
|
|
3
|
-
*/
|
|
4
|
-
export interface IExecutionAnalyticsContextData {
|
|
5
|
-
executionId?: string;
|
|
6
|
-
sessionId?: string;
|
|
7
|
-
userId?: string;
|
|
8
|
-
operation?: string;
|
|
9
|
-
toolName?: string;
|
|
10
|
-
parameterCount?: number;
|
|
11
|
-
inputLength?: number;
|
|
12
|
-
responseLength?: number;
|
|
13
|
-
hasOptions?: boolean;
|
|
14
|
-
hasError?: boolean;
|
|
15
|
-
resultType?: string;
|
|
16
|
-
errorSource?: string;
|
|
17
|
-
contextType?: string;
|
|
18
|
-
hasContext?: boolean;
|
|
19
|
-
modelName?: string;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Execution statistics entry
|
|
23
|
-
*/
|
|
24
|
-
export interface IExecutionStats {
|
|
25
|
-
executionId: string;
|
|
26
|
-
operation: string;
|
|
27
|
-
startTime: Date;
|
|
28
|
-
endTime: Date;
|
|
29
|
-
duration: number;
|
|
30
|
-
success: boolean;
|
|
31
|
-
error?: {
|
|
32
|
-
message: string;
|
|
33
|
-
stack?: string;
|
|
34
|
-
type: string;
|
|
35
|
-
};
|
|
36
|
-
metadata?: Record<string, string | number | boolean | Date | string[]>;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Aggregated execution statistics
|
|
40
|
-
*/
|
|
41
|
-
export interface IAggregatedExecutionStats {
|
|
42
|
-
totalExecutions: number;
|
|
43
|
-
successfulExecutions: number;
|
|
44
|
-
failedExecutions: number;
|
|
45
|
-
successRate: number;
|
|
46
|
-
averageDuration: number;
|
|
47
|
-
totalDuration: number;
|
|
48
|
-
operationStats: Record<string, {
|
|
49
|
-
count: number;
|
|
50
|
-
successCount: number;
|
|
51
|
-
failureCount: number;
|
|
52
|
-
averageDuration: number;
|
|
53
|
-
totalDuration: number;
|
|
54
|
-
}>;
|
|
55
|
-
errorStats: Record<string, number>;
|
|
56
|
-
timeRange: {
|
|
57
|
-
start: Date;
|
|
58
|
-
end: Date;
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
import type { IPluginOptions, IPluginStats } from '../../abstracts/abstract-plugin';
|
|
62
|
-
/**
|
|
63
|
-
* Plugin options
|
|
64
|
-
*/
|
|
65
|
-
export interface IExecutionAnalyticsOptions extends IPluginOptions {
|
|
66
|
-
/** Maximum number of entries to keep in memory */
|
|
67
|
-
maxEntries?: number;
|
|
68
|
-
/** Whether to track error details */
|
|
69
|
-
trackErrors?: boolean;
|
|
70
|
-
/** Performance threshold in milliseconds for warnings */
|
|
71
|
-
performanceThreshold?: number;
|
|
72
|
-
/** Enable performance warnings */
|
|
73
|
-
enableWarnings?: boolean;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Execution analytics plugin statistics
|
|
77
|
-
*/
|
|
78
|
-
export interface IExecutionAnalyticsPluginStats extends IPluginStats {
|
|
79
|
-
/** Total number of executions recorded */
|
|
80
|
-
totalRecorded: number;
|
|
81
|
-
/** Number of active executions */
|
|
82
|
-
activeExecutions: number;
|
|
83
|
-
/** Memory usage in KB */
|
|
84
|
-
memoryUsage: number;
|
|
85
|
-
/** Oldest record timestamp */
|
|
86
|
-
oldestRecord?: Date;
|
|
87
|
-
/** Newest record timestamp */
|
|
88
|
-
newestRecord?: Date;
|
|
89
|
-
}
|
|
90
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/plugins/execution/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,EAAE,IAAI,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE;QACJ,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM,EAAE,CAAC,CAAC;CAC1E;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACtC,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE;QAC3B,KAAK,EAAE,MAAM,CAAC;QACd,YAAY,EAAE,MAAM,CAAC;QACrB,YAAY,EAAE,MAAM,CAAC;QACrB,eAAe,EAAE,MAAM,CAAC;QACxB,aAAa,EAAE,MAAM,CAAC;KACzB,CAAC,CAAC;IACH,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,SAAS,EAAE;QACP,KAAK,EAAE,IAAI,CAAC;QACZ,GAAG,EAAE,IAAI,CAAC;KACb,CAAC;CACL;AAED,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpF;;GAEG;AACH,MAAM,WAAW,0BAA2B,SAAQ,cAAc;IAC9D,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qCAAqC;IACrC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,yDAAyD;IACzD,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,kCAAkC;IAClC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,8BAA+B,SAAQ,YAAY;IAChE,0CAA0C;IAC1C,aAAa,EAAE,MAAM,CAAC;IACtB,kCAAkC;IAClC,gBAAgB,EAAE,MAAM,CAAC;IACzB,yBAAyB;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,8BAA8B;IAC9B,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,8BAA8B;IAC9B,YAAY,CAAC,EAAE,IAAI,CAAC;CACvB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plugins/execution/types.ts"],"names":[],"mappings":""}
|
package/dist/plugins/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from './conversation-history';
|
|
2
|
-
export * from './error-handling';
|
|
3
|
-
export * from './execution';
|
|
4
|
-
export { LimitsPlugin } from './limits-plugin';
|
|
5
|
-
export * from './logging';
|
|
6
|
-
export * from './performance';
|
|
7
|
-
export * from './usage';
|
|
8
|
-
export { EventEmitterPlugin } from './event-emitter-plugin';
|
|
9
|
-
export * from './webhook';
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AACA,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,cAAc,WAAW,CAAC"}
|
package/dist/plugins/index.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// Plugin exports
|
|
2
|
-
export * from './conversation-history';
|
|
3
|
-
export * from './error-handling';
|
|
4
|
-
export * from './execution';
|
|
5
|
-
export { LimitsPlugin } from './limits-plugin';
|
|
6
|
-
export * from './logging';
|
|
7
|
-
export * from './performance';
|
|
8
|
-
export * from './usage';
|
|
9
|
-
export { EventEmitterPlugin } from './event-emitter-plugin';
|
|
10
|
-
export * from './webhook';
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,cAAc,WAAW,CAAC"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import type { IPluginOptions } from '../../abstracts/abstract-plugin';
|
|
2
|
-
/**
|
|
3
|
-
* Rate limiting strategies
|
|
4
|
-
*/
|
|
5
|
-
export type TLimitsStrategy = 'token-bucket' | 'sliding-window' | 'fixed-window' | 'none';
|
|
6
|
-
/**
|
|
7
|
-
* Limits plugin configuration
|
|
8
|
-
*/
|
|
9
|
-
export interface ILimitsPluginOptions extends IPluginOptions {
|
|
10
|
-
/** Rate limiting strategy */
|
|
11
|
-
strategy: TLimitsStrategy;
|
|
12
|
-
/** Maximum tokens per time window */
|
|
13
|
-
maxTokens?: number;
|
|
14
|
-
/** Maximum requests per time window */
|
|
15
|
-
maxRequests?: number;
|
|
16
|
-
/** Time window in milliseconds */
|
|
17
|
-
timeWindow?: number;
|
|
18
|
-
/** Maximum cost per time window (in USD) */
|
|
19
|
-
maxCost?: number;
|
|
20
|
-
/** Token cost per 1000 tokens (in USD) */
|
|
21
|
-
tokenCostPer1000?: number;
|
|
22
|
-
/** Bucket refill rate for token bucket strategy */
|
|
23
|
-
refillRate?: number;
|
|
24
|
-
/** Initial bucket size for token bucket strategy */
|
|
25
|
-
bucketSize?: number;
|
|
26
|
-
/** Custom cost calculator */
|
|
27
|
-
costCalculator?: (tokens: number, model: string) => number;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Plugin limits status data type - supports nested objects and null values for comprehensive status reporting
|
|
31
|
-
*
|
|
32
|
-
* REASON: Status data needs to include nested objects for bucket/window details and null values for missing data
|
|
33
|
-
* ALTERNATIVES_CONSIDERED:
|
|
34
|
-
* 1. Strict primitive types (loses nested status information)
|
|
35
|
-
* 2. Union types without null (breaks null handling)
|
|
36
|
-
* 3. Interface definitions (too rigid for dynamic status)
|
|
37
|
-
* 4. Generic constraints (too complex for status data)
|
|
38
|
-
* 5. Type assertions (decreases type safety)
|
|
39
|
-
* TODO: Consider specific status interfaces if patterns emerge
|
|
40
|
-
*/
|
|
41
|
-
export type TPluginLimitsStatusData = Record<string, string | number | boolean | Array<string | number | boolean> | Record<string, string | number | boolean> | null>;
|
|
42
|
-
/**
|
|
43
|
-
* Rate limiting window data
|
|
44
|
-
*/
|
|
45
|
-
export interface ILimitWindow {
|
|
46
|
-
count: number;
|
|
47
|
-
tokens: number;
|
|
48
|
-
cost: number;
|
|
49
|
-
windowStart: number;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Token bucket state
|
|
53
|
-
*/
|
|
54
|
-
export interface ITokenBucket {
|
|
55
|
-
tokens: number;
|
|
56
|
-
lastRefill: number;
|
|
57
|
-
requests: number;
|
|
58
|
-
cost: number;
|
|
59
|
-
windowStart: number;
|
|
60
|
-
}
|
|
61
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/plugins/limits/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEtE;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,cAAc,GAAG,gBAAgB,GAAG,cAAc,GAAG,MAAM,CAAC;AAE1F;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IACxD,6BAA6B;IAC7B,QAAQ,EAAE,eAAe,CAAC;IAC1B,qCAAqC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mDAAmD;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6BAA6B;IAC7B,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CAC9D;AAED;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;AAEtK;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plugins/limits/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { AbstractPlugin, type IPluginExecutionContext, type IPluginExecutionResult } from '../abstracts/abstract-plugin';
|
|
2
|
-
import type { TLimitsStrategy, ILimitsPluginOptions, TPluginLimitsStatusData } from './limits/types';
|
|
3
|
-
export type { TLimitsStrategy, ILimitsPluginOptions, TPluginLimitsStatusData };
|
|
4
|
-
/**
|
|
5
|
-
* Reusable type definitions for limits plugin
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Plugin execution context type
|
|
9
|
-
* Used for processing execution context in limits plugin
|
|
10
|
-
* Extends IPluginExecutionContext for compatibility
|
|
11
|
-
*/
|
|
12
|
-
export interface ILimitsPluginExecutionContext extends IPluginExecutionContext {
|
|
13
|
-
config?: {
|
|
14
|
-
model?: string;
|
|
15
|
-
maxTokens?: number;
|
|
16
|
-
temperature?: number;
|
|
17
|
-
};
|
|
18
|
-
conversationId?: string;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Plugin execution result type
|
|
22
|
-
* Used for processing execution results in limits plugin
|
|
23
|
-
*/
|
|
24
|
-
export type TLimitsPluginExecutionResult = {
|
|
25
|
-
tokensUsed?: number;
|
|
26
|
-
cost?: number;
|
|
27
|
-
success?: boolean;
|
|
28
|
-
[key: string]: string | number | boolean | undefined;
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* Plugin for rate limiting and resource control
|
|
32
|
-
* Enforces limits on token usage, request frequency, and costs
|
|
33
|
-
*/
|
|
34
|
-
export declare class LimitsPlugin extends AbstractPlugin<ILimitsPluginOptions> {
|
|
35
|
-
name: string;
|
|
36
|
-
version: string;
|
|
37
|
-
private pluginOptions;
|
|
38
|
-
private logger;
|
|
39
|
-
private windows;
|
|
40
|
-
private buckets;
|
|
41
|
-
private requestCounts;
|
|
42
|
-
constructor(options: ILimitsPluginOptions);
|
|
43
|
-
/**
|
|
44
|
-
* Check limits before execution
|
|
45
|
-
*/
|
|
46
|
-
beforeExecution(context: IPluginExecutionContext): Promise<void>;
|
|
47
|
-
/**
|
|
48
|
-
* Update limits after execution
|
|
49
|
-
*/
|
|
50
|
-
afterExecution(context: IPluginExecutionContext, result: IPluginExecutionResult): Promise<void>;
|
|
51
|
-
/**
|
|
52
|
-
* Token bucket rate limiting
|
|
53
|
-
*/
|
|
54
|
-
private checkTokenBucket;
|
|
55
|
-
/**
|
|
56
|
-
* Sliding window rate limiting
|
|
57
|
-
*/
|
|
58
|
-
private checkSlidingWindow;
|
|
59
|
-
/**
|
|
60
|
-
* Fixed window rate limiting
|
|
61
|
-
*/
|
|
62
|
-
private checkFixedWindow;
|
|
63
|
-
/**
|
|
64
|
-
* Update token bucket after execution
|
|
65
|
-
*/
|
|
66
|
-
private updateTokenBucket;
|
|
67
|
-
/**
|
|
68
|
-
* Update window after execution
|
|
69
|
-
*/
|
|
70
|
-
private updateWindow;
|
|
71
|
-
/**
|
|
72
|
-
* Get or create token bucket for key
|
|
73
|
-
*/
|
|
74
|
-
private getBucket;
|
|
75
|
-
/**
|
|
76
|
-
* Get or create window for key
|
|
77
|
-
*/
|
|
78
|
-
private getWindow;
|
|
79
|
-
/**
|
|
80
|
-
* Generate key for rate limiting (user/session based)
|
|
81
|
-
*/
|
|
82
|
-
private getKey;
|
|
83
|
-
/**
|
|
84
|
-
* Estimate tokens needed for request
|
|
85
|
-
*/
|
|
86
|
-
private estimateTokens;
|
|
87
|
-
/**
|
|
88
|
-
* Default cost calculator
|
|
89
|
-
*/
|
|
90
|
-
private defaultCostCalculator;
|
|
91
|
-
/**
|
|
92
|
-
* Validate plugin options
|
|
93
|
-
*/
|
|
94
|
-
private validateOptions;
|
|
95
|
-
/**
|
|
96
|
-
* Get current limits status
|
|
97
|
-
*
|
|
98
|
-
* REASON: Limits status contains mixed data types (numbers, strings, arrays, objects) for comprehensive status reporting
|
|
99
|
-
* ALTERNATIVES_CONSIDERED:
|
|
100
|
-
* 1. Strict interface definitions (too rigid for dynamic status data)
|
|
101
|
-
* 2. Union types (becomes unwieldy for status reporting)
|
|
102
|
-
* 3. Generic constraints (too complex for status methods)
|
|
103
|
-
* 4. Separate status types (breaks existing functionality)
|
|
104
|
-
* 5. Type assertions (decreases type safety)
|
|
105
|
-
* TODO: Consider specific status interface if patterns emerge
|
|
106
|
-
*/
|
|
107
|
-
getLimitsStatus(key?: string): TPluginLimitsStatusData;
|
|
108
|
-
/**
|
|
109
|
-
* Reset limits for a key or all keys
|
|
110
|
-
*/
|
|
111
|
-
resetLimits(key?: string): void;
|
|
112
|
-
}
|
|
113
|
-
//# sourceMappingURL=limits-plugin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"limits-plugin.d.ts","sourceRoot":"","sources":["../../src/plugins/limits-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,cAAc,EACd,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAG9B,MAAM,8BAA8B,CAAC;AAGtC,OAAO,KAAK,EACR,eAAe,EACf,oBAAoB,EACpB,uBAAuB,EAG1B,MAAM,gBAAgB,CAAC;AAIxB,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,CAAC;AAE/E;;GAEG;AAEH;;;;GAIG;AACH,MAAM,WAAW,6BAA8B,SAAQ,uBAAuB;IAC1E,MAAM,CAAC,EAAE;QACL,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,MAAM,4BAA4B,GAAG;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CACxD,CAAC;AAEF;;;GAGG;AACH,qBAAa,YAAa,SAAQ,cAAc,CAAC,oBAAoB,CAAC;IAClE,IAAI,SAAkB;IACtB,OAAO,SAAW;IAElB,OAAO,CAAC,aAAa,CAAiC;IACtD,OAAO,CAAC,MAAM,CAAU;IACxB,OAAO,CAAC,OAAO,CAAmC;IAClD,OAAO,CAAC,OAAO,CAAmC;IAClD,OAAO,CAAC,aAAa,CAA6B;gBAEtC,OAAO,EAAE,oBAAoB;IAkCzC;;OAEG;IACY,eAAe,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC;IAmC/E;;OAEG;IACY,cAAc,CAAC,OAAO,EAAE,uBAAuB,EAAE,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;IAoC9G;;OAEG;YACW,gBAAgB;IAiD9B;;OAEG;YACW,kBAAkB;IA4ChC;;OAEG;YACW,gBAAgB;IA0C9B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAKzB;;OAEG;IACH,OAAO,CAAC,YAAY;IAMpB;;OAEG;IACH,OAAO,CAAC,SAAS;IAajB;;OAEG;IACH,OAAO,CAAC,SAAS;IAYjB;;OAEG;IACH,OAAO,CAAC,MAAM;IAId;;OAEG;IACH,OAAO,CAAC,cAAc;IAStB;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAe7B;;GAED;IACC,OAAO,CAAC,eAAe;IAsFvB;;;;;;;;;;;OAWG;IACH,eAAe,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,uBAAuB;IA8BtD;;OAEG;IACH,WAAW,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI;CAalC"}
|