@ductape/sdk 0.0.4-v51 → 0.0.4-v53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/agents/agent-context.d.ts +98 -0
- package/dist/agents/agent-context.js +588 -0
- package/dist/agents/agent-context.js.map +1 -0
- package/dist/agents/agent-executor.d.ts +180 -0
- package/dist/agents/agent-executor.js +715 -0
- package/dist/agents/agent-executor.js.map +1 -0
- package/dist/agents/agents.service.d.ts +304 -0
- package/dist/agents/agents.service.js +1244 -0
- package/dist/agents/agents.service.js.map +1 -0
- package/dist/agents/index.d.ts +55 -0
- package/dist/agents/index.js +110 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/memory-manager.d.ts +182 -0
- package/dist/agents/memory-manager.js +383 -0
- package/dist/agents/memory-manager.js.map +1 -0
- package/dist/agents/tool-registry.d.ts +141 -0
- package/dist/agents/tool-registry.js +355 -0
- package/dist/agents/tool-registry.js.map +1 -0
- package/dist/agents/types/agents.types.d.ts +1225 -0
- package/dist/agents/types/agents.types.js +12 -0
- package/dist/agents/types/agents.types.js.map +1 -0
- package/dist/agents/types/index.d.ts +6 -0
- package/dist/agents/types/index.js +23 -0
- package/dist/agents/types/index.js.map +1 -0
- package/dist/agents/vector-store-adapter.d.ts +108 -0
- package/dist/agents/vector-store-adapter.js +213 -0
- package/dist/agents/vector-store-adapter.js.map +1 -0
- package/dist/api/services/appApi.service.js +4 -5
- package/dist/api/services/appApi.service.js.map +1 -1
- package/dist/api/services/processorApi.service.d.ts +322 -0
- package/dist/api/services/processorApi.service.js +252 -0
- package/dist/api/services/processorApi.service.js.map +1 -1
- package/dist/api/services/productsApi.service.d.ts +69 -1
- package/dist/api/services/productsApi.service.js +67 -31
- package/dist/api/services/productsApi.service.js.map +1 -1
- package/dist/api/services/resilienceApi.service.d.ts +106 -0
- package/dist/api/services/resilienceApi.service.js +224 -0
- package/dist/api/services/resilienceApi.service.js.map +1 -0
- package/dist/api/services/secretsApi.service.d.ts +38 -0
- package/dist/api/services/secretsApi.service.js +96 -0
- package/dist/api/services/secretsApi.service.js.map +1 -0
- package/dist/api/services/userApi.service.js +0 -1
- package/dist/api/services/userApi.service.js.map +1 -1
- package/dist/api/services/workflowApi.service.d.ts +199 -0
- package/dist/api/services/workflowApi.service.js +183 -0
- package/dist/api/services/workflowApi.service.js.map +1 -0
- package/dist/api/services/workspaceApi.service.js +0 -1
- package/dist/api/services/workspaceApi.service.js.map +1 -1
- package/dist/api/urls.d.ts +57 -0
- package/dist/api/urls.js +68 -1
- package/dist/api/urls.js.map +1 -1
- package/dist/api/utils/cache.utils.js +4 -10
- package/dist/api/utils/cache.utils.js.map +1 -1
- package/dist/apps/services/app.service.d.ts +0 -10
- package/dist/apps/services/app.service.js +74 -30
- package/dist/apps/services/app.service.js.map +1 -1
- package/dist/apps/utils/auth-context-manager.d.ts +137 -0
- package/dist/apps/utils/auth-context-manager.js +248 -0
- package/dist/apps/utils/auth-context-manager.js.map +1 -0
- package/dist/apps/utils/credential-manager.d.ts +128 -0
- package/dist/apps/utils/credential-manager.js +199 -0
- package/dist/apps/utils/credential-manager.js.map +1 -0
- package/dist/apps/utils/index.d.ts +10 -0
- package/dist/apps/utils/index.js +54 -0
- package/dist/apps/utils/index.js.map +1 -0
- package/dist/apps/utils/input-helpers.d.ts +67 -0
- package/dist/apps/utils/input-helpers.js +185 -0
- package/dist/apps/utils/input-helpers.js.map +1 -0
- package/dist/apps/utils/input-resolver.d.ts +165 -0
- package/dist/apps/utils/input-resolver.js +477 -0
- package/dist/apps/utils/input-resolver.js.map +1 -0
- package/dist/apps/utils/oauth-manager.d.ts +196 -0
- package/dist/apps/utils/oauth-manager.js +405 -0
- package/dist/apps/utils/oauth-manager.js.map +1 -0
- package/dist/apps/validators/joi-validators/create.appWebhook.validator.d.ts +2 -1
- package/dist/apps/validators/joi-validators/create.appWebhook.validator.js +15 -2
- package/dist/apps/validators/joi-validators/create.appWebhook.validator.js.map +1 -1
- package/dist/apps/validators/joi-validators/update.appWebhook.validator.d.ts +2 -1
- package/dist/apps/validators/joi-validators/update.appWebhook.validator.js +14 -2
- package/dist/apps/validators/joi-validators/update.appWebhook.validator.js.map +1 -1
- package/dist/bin.d.ts +26 -0
- package/dist/bin.js +28 -0
- package/dist/bin.js.map +1 -0
- package/dist/brokers/brokers.service.d.ts +257 -0
- package/dist/brokers/brokers.service.js +604 -0
- package/dist/brokers/brokers.service.js.map +1 -0
- package/dist/brokers/index.d.ts +46 -0
- package/dist/brokers/index.js +83 -0
- package/dist/brokers/index.js.map +1 -0
- package/dist/brokers/types/index.d.ts +288 -0
- package/dist/brokers/types/index.js +8 -0
- package/dist/brokers/types/index.js.map +1 -0
- package/dist/brokers/utils/broker.util.d.ts +33 -0
- package/dist/brokers/utils/broker.util.js +125 -0
- package/dist/brokers/utils/broker.util.js.map +1 -0
- package/dist/brokers/utils/providers/aws-sqs.service.d.ts +16 -0
- package/dist/brokers/utils/providers/aws-sqs.service.js +71 -0
- package/dist/brokers/utils/providers/aws-sqs.service.js.map +1 -0
- package/dist/brokers/utils/providers/google-pubsub.service.d.ts +16 -0
- package/dist/brokers/utils/providers/google-pubsub.service.js +43 -0
- package/dist/brokers/utils/providers/google-pubsub.service.js.map +1 -0
- package/dist/brokers/utils/providers/index.d.ts +6 -0
- package/dist/brokers/utils/providers/index.js +16 -0
- package/dist/brokers/utils/providers/index.js.map +1 -0
- package/dist/brokers/utils/providers/kafka.service.d.ts +16 -0
- package/dist/brokers/utils/providers/kafka.service.js +52 -0
- package/dist/brokers/utils/providers/kafka.service.js.map +1 -0
- package/dist/brokers/utils/providers/nats.service.d.ts +18 -0
- package/dist/brokers/utils/providers/nats.service.js +63 -0
- package/dist/brokers/utils/providers/nats.service.js.map +1 -0
- package/dist/brokers/utils/providers/rabbitmq.service.d.ts +14 -0
- package/dist/brokers/utils/providers/rabbitmq.service.js +67 -0
- package/dist/brokers/utils/providers/rabbitmq.service.js.map +1 -0
- package/dist/brokers/utils/providers/redis.service.d.ts +18 -0
- package/dist/brokers/utils/providers/redis.service.js +93 -0
- package/dist/brokers/utils/providers/redis.service.js.map +1 -0
- package/dist/cache/cache.manager.d.ts +159 -0
- package/dist/cache/cache.manager.js +265 -0
- package/dist/cache/cache.manager.js.map +1 -0
- package/dist/cache/cache.service.d.ts +186 -0
- package/dist/cache/cache.service.js +437 -0
- package/dist/cache/cache.service.js.map +1 -0
- package/dist/cache/index.d.ts +52 -0
- package/dist/cache/index.js +79 -0
- package/dist/cache/index.js.map +1 -0
- package/dist/cache/types/index.d.ts +106 -0
- package/dist/cache/types/index.js +6 -0
- package/dist/cache/types/index.js.map +1 -0
- package/dist/database/actions/action-manager.d.ts +170 -0
- package/dist/database/actions/action-manager.js +465 -0
- package/dist/database/actions/action-manager.js.map +1 -0
- package/dist/database/actions/index.d.ts +6 -0
- package/dist/database/actions/index.js +13 -0
- package/dist/database/actions/index.js.map +1 -0
- package/dist/database/adapters/adapter.factory.d.ts +62 -0
- package/dist/database/adapters/adapter.factory.js +97 -0
- package/dist/database/adapters/adapter.factory.js.map +1 -0
- package/dist/database/adapters/base.adapter.d.ts +307 -90
- package/dist/database/adapters/base.adapter.js +139 -20
- package/dist/database/adapters/base.adapter.js.map +1 -1
- package/dist/database/adapters/cassandra.adapter.d.ts +90 -0
- package/dist/database/adapters/cassandra.adapter.js +1019 -0
- package/dist/database/adapters/cassandra.adapter.js.map +1 -0
- package/dist/database/adapters/dynamodb.adapter.d.ts +94 -77
- package/dist/database/adapters/dynamodb.adapter.js +1162 -1305
- package/dist/database/adapters/dynamodb.adapter.js.map +1 -1
- package/dist/database/adapters/index.d.ts +11 -0
- package/dist/database/adapters/index.js +27 -0
- package/dist/database/adapters/index.js.map +1 -0
- package/dist/database/adapters/mariadb.adapter.d.ts +100 -0
- package/dist/database/adapters/mariadb.adapter.js +247 -0
- package/dist/database/adapters/mariadb.adapter.js.map +1 -0
- package/dist/database/adapters/mongodb.adapter.d.ts +105 -57
- package/dist/database/adapters/mongodb.adapter.js +941 -838
- package/dist/database/adapters/mongodb.adapter.js.map +1 -1
- package/dist/database/adapters/mysql.adapter.d.ts +76 -138
- package/dist/database/adapters/mysql.adapter.js +990 -1246
- package/dist/database/adapters/mysql.adapter.js.map +1 -1
- package/dist/database/adapters/postgresql.adapter.d.ts +75 -139
- package/dist/database/adapters/postgresql.adapter.js +1076 -1346
- package/dist/database/adapters/postgresql.adapter.js.map +1 -1
- package/dist/database/databases.service.d.ts +1374 -0
- package/dist/database/databases.service.js +2680 -0
- package/dist/database/databases.service.js.map +1 -0
- package/dist/database/index.d.ts +41 -13
- package/dist/database/index.js +97 -86
- package/dist/database/index.js.map +1 -1
- package/dist/database/migrations/index.d.ts +6 -0
- package/dist/database/migrations/index.js +12 -0
- package/dist/database/migrations/index.js.map +1 -0
- package/dist/database/migrations/migration-engine.d.ts +132 -0
- package/dist/database/migrations/migration-engine.js +1356 -0
- package/dist/database/migrations/migration-engine.js.map +1 -0
- package/dist/database/operators/aggregation-builder.d.ts +64 -0
- package/dist/database/operators/aggregation-builder.js +746 -0
- package/dist/database/operators/aggregation-builder.js.map +1 -0
- package/dist/database/operators/index.d.ts +7 -0
- package/dist/database/operators/index.js +15 -0
- package/dist/database/operators/index.js.map +1 -0
- package/dist/database/operators/query-builder.d.ts +55 -0
- package/dist/database/operators/query-builder.js +365 -0
- package/dist/database/operators/query-builder.js.map +1 -0
- package/dist/database/presave/decrypt.d.ts +25 -0
- package/dist/database/presave/decrypt.js +146 -0
- package/dist/database/presave/decrypt.js.map +1 -0
- package/dist/database/presave/index.d.ts +9 -0
- package/dist/database/presave/index.js +18 -0
- package/dist/database/presave/index.js.map +1 -0
- package/dist/database/presave/presave-processor.d.ts +148 -0
- package/dist/database/presave/presave-processor.js +702 -0
- package/dist/database/presave/presave-processor.js.map +1 -0
- package/dist/database/schema/index.d.ts +7 -0
- package/dist/database/schema/index.js +13 -0
- package/dist/database/schema/index.js.map +1 -0
- package/dist/database/schema/schema-manager.d.ts +258 -0
- package/dist/database/schema/schema-manager.js +637 -0
- package/dist/database/schema/schema-manager.js.map +1 -0
- package/dist/database/transactions/index.d.ts +6 -0
- package/dist/database/transactions/index.js +13 -0
- package/dist/database/transactions/index.js.map +1 -0
- package/dist/database/transactions/transaction-manager.d.ts +113 -0
- package/dist/database/transactions/transaction-manager.js +344 -0
- package/dist/database/transactions/transaction-manager.js.map +1 -0
- package/dist/database/triggers/index.d.ts +7 -0
- package/dist/database/triggers/index.js +14 -0
- package/dist/database/triggers/index.js.map +1 -0
- package/dist/database/triggers/trigger-processor.d.ts +239 -0
- package/dist/database/triggers/trigger-processor.js +1034 -0
- package/dist/database/triggers/trigger-processor.js.map +1 -0
- package/dist/database/types/action.interface.d.ts +148 -0
- package/dist/database/types/action.interface.js +6 -0
- package/dist/database/types/action.interface.js.map +1 -0
- package/dist/database/types/aggregation.interface.d.ts +179 -0
- package/dist/database/types/aggregation.interface.js +6 -0
- package/dist/database/types/aggregation.interface.js.map +1 -0
- package/dist/database/types/connection.interface.d.ts +137 -0
- package/dist/database/types/connection.interface.js +6 -0
- package/dist/database/types/connection.interface.js.map +1 -0
- package/dist/database/types/enums.d.ts +195 -0
- package/dist/database/types/enums.js +244 -0
- package/dist/database/types/enums.js.map +1 -0
- package/dist/database/types/index.d.ts +12 -10
- package/dist/database/types/index.js +26 -32
- package/dist/database/types/index.js.map +1 -1
- package/dist/database/types/migration.interface.d.ts +686 -0
- package/dist/database/types/migration.interface.js +9 -0
- package/dist/database/types/migration.interface.js.map +1 -0
- package/dist/database/types/presave.interface.d.ts +292 -0
- package/dist/database/types/presave.interface.js +60 -0
- package/dist/database/types/presave.interface.js.map +1 -0
- package/dist/database/types/query.interface.d.ts +199 -0
- package/dist/database/types/query.interface.js +6 -0
- package/dist/database/types/query.interface.js.map +1 -0
- package/dist/database/types/schema.interface.d.ts +398 -0
- package/dist/database/types/schema.interface.js +6 -0
- package/dist/database/types/schema.interface.js.map +1 -0
- package/dist/database/types/transaction.interface.d.ts +84 -0
- package/dist/database/types/transaction.interface.js +6 -0
- package/dist/database/types/transaction.interface.js.map +1 -0
- package/dist/database/types/trigger.interface.d.ts +612 -0
- package/dist/database/types/trigger.interface.js +121 -0
- package/dist/database/types/trigger.interface.js.map +1 -0
- package/dist/database/types/write.interface.d.ts +208 -0
- package/dist/database/types/write.interface.js +6 -0
- package/dist/database/types/write.interface.js.map +1 -0
- package/dist/database/utils/database-error.d.ts +96 -0
- package/dist/database/utils/database-error.js +221 -0
- package/dist/database/utils/database-error.js.map +1 -0
- package/dist/database/utils/index.d.ts +6 -0
- package/dist/database/utils/index.js +11 -0
- package/dist/database/utils/index.js.map +1 -0
- package/dist/graph/adapters/adapter.factory.d.ts +47 -0
- package/dist/graph/adapters/adapter.factory.js +77 -0
- package/dist/graph/adapters/adapter.factory.js.map +1 -0
- package/dist/graph/adapters/arangodb.adapter.d.ts +78 -72
- package/dist/graph/adapters/arangodb.adapter.js +1310 -1220
- package/dist/graph/adapters/arangodb.adapter.js.map +1 -1
- package/dist/graph/adapters/base.adapter.d.ts +135 -118
- package/dist/graph/adapters/base.adapter.js +46 -20
- package/dist/graph/adapters/base.adapter.js.map +1 -1
- package/dist/graph/adapters/index.d.ts +5 -4
- package/dist/graph/adapters/index.js +6 -8
- package/dist/graph/adapters/index.js.map +1 -1
- package/dist/graph/adapters/memgraph.adapter.d.ts +98 -73
- package/dist/graph/adapters/memgraph.adapter.js +1050 -1202
- package/dist/graph/adapters/memgraph.adapter.js.map +1 -1
- package/dist/graph/adapters/neo4j.adapter.d.ts +71 -78
- package/dist/graph/adapters/neo4j.adapter.js +912 -1605
- package/dist/graph/adapters/neo4j.adapter.js.map +1 -1
- package/dist/graph/adapters/neptune.adapter.d.ts +76 -81
- package/dist/graph/adapters/neptune.adapter.js +1095 -1228
- package/dist/graph/adapters/neptune.adapter.js.map +1 -1
- package/dist/graph/graphs.service.d.ts +524 -0
- package/dist/graph/graphs.service.js +1683 -0
- package/dist/graph/graphs.service.js.map +1 -0
- package/dist/graph/index.d.ts +54 -8
- package/dist/graph/index.js +67 -32
- package/dist/graph/index.js.map +1 -1
- package/dist/graph/transactions/index.d.ts +4 -0
- package/dist/graph/transactions/index.js +9 -0
- package/dist/graph/transactions/index.js.map +1 -0
- package/dist/graph/transactions/transaction-manager.d.ts +61 -0
- package/dist/graph/transactions/transaction-manager.js +126 -0
- package/dist/graph/transactions/transaction-manager.js.map +1 -0
- package/dist/graph/types/connection.interface.d.ts +141 -0
- package/dist/graph/types/connection.interface.js +9 -0
- package/dist/graph/types/connection.interface.js.map +1 -0
- package/dist/graph/types/enums.d.ts +101 -0
- package/dist/graph/types/enums.js +114 -0
- package/dist/graph/types/enums.js.map +1 -0
- package/dist/graph/types/index.d.ts +11 -9
- package/dist/graph/types/index.js +15 -30
- package/dist/graph/types/index.js.map +1 -1
- package/dist/graph/types/node.interface.d.ts +248 -0
- package/dist/graph/types/node.interface.js +9 -0
- package/dist/graph/types/node.interface.js.map +1 -0
- package/dist/graph/types/query.interface.d.ts +168 -0
- package/dist/graph/types/query.interface.js +9 -0
- package/dist/graph/types/query.interface.js.map +1 -0
- package/dist/graph/types/relationship.interface.d.ts +207 -0
- package/dist/graph/types/relationship.interface.js +9 -0
- package/dist/graph/types/relationship.interface.js.map +1 -0
- package/dist/graph/types/schema.interface.d.ts +295 -0
- package/dist/graph/types/schema.interface.js +9 -0
- package/dist/graph/types/schema.interface.js.map +1 -0
- package/dist/graph/types/transaction.interface.d.ts +55 -0
- package/dist/graph/types/transaction.interface.js +9 -0
- package/dist/graph/types/transaction.interface.js.map +1 -0
- package/dist/graph/types/traversal.interface.d.ts +181 -0
- package/dist/graph/types/traversal.interface.js +9 -0
- package/dist/graph/types/traversal.interface.js.map +1 -0
- package/dist/graph/utils/graph-error.d.ts +71 -0
- package/dist/graph/utils/graph-error.js +142 -0
- package/dist/graph/utils/graph-error.js.map +1 -0
- package/dist/graph/utils/index.d.ts +4 -0
- package/dist/graph/utils/index.js +9 -0
- package/dist/graph/utils/index.js.map +1 -0
- package/dist/index.d.ts +1905 -875
- package/dist/index.js +3063 -1282
- package/dist/index.js.map +1 -1
- package/dist/init.interface.d.ts +407 -0
- package/dist/init.interface.js +3 -0
- package/dist/init.interface.js.map +1 -0
- package/dist/jobs/index.d.ts +38 -0
- package/dist/jobs/index.js +50 -0
- package/dist/jobs/index.js.map +1 -0
- package/dist/jobs/jobs.service.d.ts +154 -0
- package/dist/jobs/jobs.service.js +491 -0
- package/dist/jobs/jobs.service.js.map +1 -0
- package/dist/jobs/jobs.state.d.ts +113 -0
- package/dist/jobs/jobs.state.js +447 -0
- package/dist/jobs/jobs.state.js.map +1 -0
- package/dist/jobs/types.d.ts +449 -0
- package/dist/jobs/types.js +74 -0
- package/dist/jobs/types.js.map +1 -0
- package/dist/logs/logs.types.d.ts +12 -2
- package/dist/logs/logs.types.js +5 -1
- package/dist/logs/logs.types.js.map +1 -1
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +11 -0
- package/dist/models/index.js.map +1 -0
- package/dist/models/models.service.d.ts +137 -0
- package/dist/models/models.service.js +195 -0
- package/dist/models/models.service.js.map +1 -0
- package/dist/notifications/index.d.ts +13 -0
- package/dist/notifications/index.js +26 -0
- package/dist/notifications/index.js.map +1 -0
- package/dist/notifications/notifications.service.d.ts +252 -0
- package/dist/notifications/notifications.service.js +654 -0
- package/dist/notifications/notifications.service.js.map +1 -0
- package/dist/notifications/types/index.d.ts +4 -0
- package/dist/notifications/types/index.js +21 -0
- package/dist/notifications/types/index.js.map +1 -0
- package/dist/notifications/types/notifications.types.d.ts +400 -0
- package/dist/notifications/types/notifications.types.js +49 -0
- package/dist/notifications/types/notifications.types.js.map +1 -0
- package/dist/processor/services/messagebrokers/kafka.service.js +2 -0
- package/dist/processor/services/messagebrokers/kafka.service.js.map +1 -1
- package/dist/processor/services/messagebrokers/rabbitmq.service.d.ts +1 -9
- package/dist/processor/services/messagebrokers/rabbitmq.service.js +11 -40
- package/dist/processor/services/messagebrokers/rabbitmq.service.js.map +1 -1
- package/dist/processor/services/processor.service.d.ts +86 -70
- package/dist/processor/services/processor.service.js +1353 -1259
- package/dist/processor/services/processor.service.js.map +1 -1
- package/dist/processor/utils/processor.utils.js +5 -1
- package/dist/processor/utils/processor.utils.js.map +1 -1
- package/dist/products/services/products.service.d.ts +167 -25
- package/dist/products/services/products.service.js +1248 -412
- package/dist/products/services/products.service.js.map +1 -1
- package/dist/products/validators/index.d.ts +6 -3
- package/dist/products/validators/index.js +14 -5
- package/dist/products/validators/index.js.map +1 -1
- package/dist/products/validators/joi-validators/create.productAgent.validator.d.ts +3 -0
- package/dist/products/validators/joi-validators/create.productAgent.validator.js +218 -0
- package/dist/products/validators/joi-validators/create.productAgent.validator.js.map +1 -0
- package/dist/products/validators/joi-validators/create.productDatabase.validator.js +5 -0
- package/dist/products/validators/joi-validators/create.productDatabase.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/create.productDatabaseAction.validator.d.ts +4 -15
- package/dist/products/validators/joi-validators/create.productDatabaseAction.validator.js +109 -501
- package/dist/products/validators/joi-validators/create.productDatabaseAction.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/create.productGraph.validator.js +14 -9
- package/dist/products/validators/joi-validators/create.productGraph.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/create.productMessageBrokerTopic.validator.js +0 -1
- package/dist/products/validators/joi-validators/create.productMessageBrokerTopic.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/create.productMessageBrokers.validator.js +87 -30
- package/dist/products/validators/joi-validators/create.productMessageBrokers.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/create.productModel.validator.d.ts +3 -0
- package/dist/products/validators/joi-validators/create.productModel.validator.js +132 -0
- package/dist/products/validators/joi-validators/create.productModel.validator.js.map +1 -0
- package/dist/products/validators/joi-validators/create.productNotification.validator.js +135 -50
- package/dist/products/validators/joi-validators/create.productNotification.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/create.productStorage.validator.js +77 -18
- package/dist/products/validators/joi-validators/create.productStorage.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/create.productVector.validator.d.ts +3 -0
- package/dist/products/validators/joi-validators/create.productVector.validator.js +135 -0
- package/dist/products/validators/joi-validators/create.productVector.validator.js.map +1 -0
- package/dist/products/validators/joi-validators/update.productDatabase.validator.js +5 -0
- package/dist/products/validators/joi-validators/update.productDatabase.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/update.productDatabaseAction.validator.d.ts +0 -6
- package/dist/products/validators/joi-validators/update.productDatabaseAction.validator.js +26 -28
- package/dist/products/validators/joi-validators/update.productDatabaseAction.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/update.productGraph.validator.js +11 -12
- package/dist/products/validators/joi-validators/update.productGraph.validator.js.map +1 -1
- package/dist/products/validators/joi-validators/update.productMessageBrokerTopic.validator.js +0 -1
- package/dist/products/validators/joi-validators/update.productMessageBrokerTopic.validator.js.map +1 -1
- package/dist/resilience/fallback.service.d.ts +88 -0
- package/dist/resilience/fallback.service.js +511 -0
- package/dist/resilience/fallback.service.js.map +1 -0
- package/dist/resilience/healthcheck.service.d.ts +106 -0
- package/dist/resilience/healthcheck.service.js +379 -0
- package/dist/resilience/healthcheck.service.js.map +1 -0
- package/dist/resilience/index.d.ts +104 -0
- package/dist/resilience/index.js +140 -0
- package/dist/resilience/index.js.map +1 -0
- package/dist/resilience/quota.service.d.ts +90 -0
- package/dist/resilience/quota.service.js +519 -0
- package/dist/resilience/quota.service.js.map +1 -0
- package/dist/resilience/resilience.service.d.ts +95 -0
- package/dist/resilience/resilience.service.js +525 -0
- package/dist/resilience/resilience.service.js.map +1 -0
- package/dist/resilience/types/index.d.ts +479 -0
- package/dist/resilience/types/index.js +26 -0
- package/dist/resilience/types/index.js.map +1 -0
- package/dist/secrets/index.d.ts +10 -0
- package/dist/secrets/index.js +33 -0
- package/dist/secrets/index.js.map +1 -0
- package/dist/secrets/secrets.resolver.d.ts +52 -0
- package/dist/secrets/secrets.resolver.js +233 -0
- package/dist/secrets/secrets.resolver.js.map +1 -0
- package/dist/secrets/secrets.service.d.ts +83 -0
- package/dist/secrets/secrets.service.js +159 -0
- package/dist/secrets/secrets.service.js.map +1 -0
- package/dist/secrets/secrets.types.d.ts +188 -0
- package/dist/secrets/secrets.types.js +87 -0
- package/dist/secrets/secrets.types.js.map +1 -0
- package/dist/sessions/index.d.ts +50 -0
- package/dist/sessions/index.js +93 -0
- package/dist/sessions/index.js.map +1 -0
- package/dist/sessions/sessions.helper.d.ts +68 -0
- package/dist/sessions/sessions.helper.js +116 -0
- package/dist/sessions/sessions.helper.js.map +1 -0
- package/dist/sessions/sessions.resolver.d.ts +150 -0
- package/dist/sessions/sessions.resolver.js +356 -0
- package/dist/sessions/sessions.resolver.js.map +1 -0
- package/dist/sessions/sessions.service.d.ts +170 -0
- package/dist/sessions/sessions.service.js +736 -0
- package/dist/sessions/sessions.service.js.map +1 -0
- package/dist/sessions/types/index.d.ts +290 -0
- package/dist/sessions/types/index.js +6 -0
- package/dist/sessions/types/index.js.map +1 -0
- package/dist/storage/index.d.ts +66 -0
- package/dist/storage/index.js +98 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/storage.service.d.ts +123 -0
- package/dist/storage/storage.service.js +478 -0
- package/dist/storage/storage.service.js.map +1 -0
- package/dist/storage/types/index.d.ts +207 -0
- package/dist/storage/types/index.js +6 -0
- package/dist/storage/types/index.js.map +1 -0
- package/dist/storage/utils/storage.util.d.ts +51 -0
- package/dist/storage/utils/storage.util.js +402 -0
- package/dist/storage/utils/storage.util.js.map +1 -0
- package/dist/test/index.d.ts +3 -0
- package/dist/test/index.js +13 -0
- package/dist/test/index.js.map +1 -0
- package/dist/test/test.appBuilder.d.ts +0 -1
- package/dist/test/test.appBuilder.js +0 -15
- package/dist/test/test.appBuilder.js.map +1 -1
- package/dist/test/test.database.js +140 -0
- package/dist/test/test.database.js.map +1 -0
- package/dist/test/test.health.d.ts +0 -1
- package/dist/test/test.health.js +0 -48
- package/dist/test/test.health.js.map +1 -1
- package/dist/test/test.import.d.ts +0 -1
- package/dist/test/test.import.js +0 -1506
- package/dist/test/test.import.js.map +1 -1
- package/dist/test/test.import.openapi.d.ts +0 -1
- package/dist/test/test.import.openapi.js +0 -75
- package/dist/test/test.import.openapi.js.map +1 -1
- package/dist/test/test.imports.d.ts +0 -1
- package/dist/test/test.imports.js +0 -76
- package/dist/test/test.imports.js.map +1 -1
- package/dist/test/test.logs.d.ts +0 -1
- package/dist/test/test.logs.js +0 -17
- package/dist/test/test.logs.js.map +1 -1
- package/dist/test/test.notifiers.d.ts +0 -1
- package/dist/test/test.notifiers.js +0 -84
- package/dist/test/test.notifiers.js.map +1 -1
- package/dist/test/test.processor.d.ts +0 -1
- package/dist/test/test.processor.js +0 -37
- package/dist/test/test.processor.js.map +1 -1
- package/dist/test/test.productBuilder.d.ts +0 -1
- package/dist/test/test.productBuilder.js +0 -660
- package/dist/test/test.productBuilder.js.map +1 -1
- package/dist/test/test.products.d.ts +0 -1
- package/dist/test/test.products.js +0 -48
- package/dist/test/test.products.js.map +1 -1
- package/dist/test/test.storage.js +332 -0
- package/dist/test/test.storage.js.map +1 -0
- package/dist/test/test.triggers.js +314 -0
- package/dist/test/test.triggers.js.map +1 -0
- package/dist/types/appBuilder.types.d.ts +1 -1
- package/dist/types/enums.d.ts +6 -1
- package/dist/types/enums.js +5 -0
- package/dist/types/enums.js.map +1 -1
- package/dist/types/processor.types.d.ts +197 -35
- package/dist/types/processor.types.js +9 -1
- package/dist/types/processor.types.js.map +1 -1
- package/dist/types/productsBuilder.types.d.ts +837 -75
- package/dist/types/productsBuilder.types.js +168 -62
- package/dist/types/productsBuilder.types.js.map +1 -1
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/index.js +2 -49
- package/dist/utils/index.js.map +1 -1
- package/dist/vector/adapters/base.adapter.d.ts +152 -0
- package/dist/vector/adapters/base.adapter.js +137 -0
- package/dist/vector/adapters/base.adapter.js.map +1 -0
- package/dist/vector/adapters/index.d.ts +10 -0
- package/dist/vector/adapters/index.js +19 -0
- package/dist/vector/adapters/index.js.map +1 -0
- package/dist/vector/adapters/memory.adapter.d.ts +85 -0
- package/dist/vector/adapters/memory.adapter.js +505 -0
- package/dist/vector/adapters/memory.adapter.js.map +1 -0
- package/dist/vector/adapters/pinecone.adapter.d.ts +52 -0
- package/dist/vector/adapters/pinecone.adapter.js +400 -0
- package/dist/vector/adapters/pinecone.adapter.js.map +1 -0
- package/dist/vector/adapters/qdrant.adapter.d.ts +56 -0
- package/dist/vector/adapters/qdrant.adapter.js +392 -0
- package/dist/vector/adapters/qdrant.adapter.js.map +1 -0
- package/dist/vector/adapters/weaviate.adapter.d.ts +64 -0
- package/dist/vector/adapters/weaviate.adapter.js +478 -0
- package/dist/vector/adapters/weaviate.adapter.js.map +1 -0
- package/dist/vector/index.d.ts +47 -0
- package/dist/vector/index.js +72 -0
- package/dist/vector/index.js.map +1 -0
- package/dist/vector/types/connection.interface.d.ts +151 -0
- package/dist/vector/types/connection.interface.js +8 -0
- package/dist/vector/types/connection.interface.js.map +1 -0
- package/dist/vector/types/embedding.interface.d.ts +144 -0
- package/dist/vector/types/embedding.interface.js +8 -0
- package/dist/vector/types/embedding.interface.js.map +1 -0
- package/dist/vector/types/enums.d.ts +104 -0
- package/dist/vector/types/enums.js +113 -0
- package/dist/vector/types/enums.js.map +1 -0
- package/dist/vector/types/index.d.ts +9 -0
- package/dist/vector/types/index.js +16 -0
- package/dist/vector/types/index.js.map +1 -0
- package/dist/vector/types/vector.interface.d.ts +315 -0
- package/dist/vector/types/vector.interface.js +8 -0
- package/dist/vector/types/vector.interface.js.map +1 -0
- package/dist/vector/utils/index.d.ts +6 -0
- package/dist/vector/utils/index.js +11 -0
- package/dist/vector/utils/index.js.map +1 -0
- package/dist/vector/utils/vector-error.d.ts +69 -0
- package/dist/vector/utils/vector-error.js +117 -0
- package/dist/vector/utils/vector-error.js.map +1 -0
- package/dist/vector/vector-database.service.d.ts +405 -0
- package/dist/vector/vector-database.service.js +544 -0
- package/dist/vector/vector-database.service.js.map +1 -0
- package/dist/vector/vector.service.d.ts +245 -0
- package/dist/vector/vector.service.js +381 -0
- package/dist/vector/vector.service.js.map +1 -0
- package/dist/workflows/index.d.ts +30 -0
- package/dist/workflows/index.js +64 -0
- package/dist/workflows/index.js.map +1 -0
- package/dist/workflows/types/index.d.ts +6 -0
- package/dist/workflows/types/index.js +23 -0
- package/dist/workflows/types/index.js.map +1 -0
- package/dist/workflows/types/workflows.types.d.ts +1035 -0
- package/dist/workflows/types/workflows.types.js +13 -0
- package/dist/workflows/types/workflows.types.js.map +1 -0
- package/dist/workflows/workflow-builder.d.ts +70 -0
- package/dist/workflows/workflow-builder.js +338 -0
- package/dist/workflows/workflow-builder.js.map +1 -0
- package/dist/workflows/workflow-executor.d.ts +205 -0
- package/dist/workflows/workflow-executor.js +1186 -0
- package/dist/workflows/workflow-executor.js.map +1 -0
- package/dist/workflows/workflows.service.d.ts +398 -0
- package/dist/workflows/workflows.service.js +1595 -0
- package/dist/workflows/workflows.service.js.map +1 -0
- package/package.json +16 -13
- package/dist/actions/actions.repo.d.ts +0 -0
- package/dist/actions/actions.repo.js +0 -13
- package/dist/actions/actions.repo.js.map +0 -1
- package/dist/actions/actions.service.d.ts +0 -0
- package/dist/actions/actions.service.js +0 -24
- package/dist/actions/actions.service.js.map +0 -1
- package/dist/actions/utils/actions.util.read.d.ts +0 -0
- package/dist/actions/utils/actions.util.read.js +0 -427
- package/dist/actions/utils/actions.util.read.js.map +0 -1
- package/dist/api/services/integrationsApi.service.d.ts +0 -18
- package/dist/api/services/integrationsApi.service.js +0 -80
- package/dist/api/services/integrationsApi.service.js.map +0 -1
- package/dist/api/services/workspaceSecretsApi.service.d.ts +0 -75
- package/dist/api/services/workspaceSecretsApi.service.js +0 -62
- package/dist/api/services/workspaceSecretsApi.service.js.map +0 -1
- package/dist/appBuilder/services/app.service.d.ts +0 -111
- package/dist/appBuilder/services/app.service.js +0 -737
- package/dist/appBuilder/services/app.service.js.map +0 -1
- package/dist/appBuilder/services/appBuilder.service.d.ts +0 -111
- package/dist/appBuilder/services/appBuilder.service.js +0 -662
- package/dist/appBuilder/services/appBuilder.service.js.map +0 -1
- package/dist/appBuilder/utils/objects.utils.d.ts +0 -3
- package/dist/appBuilder/utils/objects.utils.js +0 -9
- package/dist/appBuilder/utils/objects.utils.js.map +0 -1
- package/dist/appBuilder/utils/string.utils.d.ts +0 -2
- package/dist/appBuilder/utils/string.utils.js +0 -57
- package/dist/appBuilder/utils/string.utils.js.map +0 -1
- package/dist/appBuilder/validators/index.d.ts +0 -19
- package/dist/appBuilder/validators/index.js +0 -40
- package/dist/appBuilder/validators/index.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/create.app.validator.d.ts +0 -3
- package/dist/appBuilder/validators/joi-validators/create.app.validator.js +0 -10
- package/dist/appBuilder/validators/joi-validators/create.app.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/create.appAction.validator.d.ts +0 -4
- package/dist/appBuilder/validators/joi-validators/create.appAction.validator.js +0 -20
- package/dist/appBuilder/validators/joi-validators/create.appAction.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/create.appActionResponse.validator.d.ts +0 -7
- package/dist/appBuilder/validators/joi-validators/create.appActionResponse.validator.js +0 -44
- package/dist/appBuilder/validators/joi-validators/create.appActionResponse.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/create.appAuth.validator.d.ts +0 -3
- package/dist/appBuilder/validators/joi-validators/create.appAuth.validator.js +0 -31
- package/dist/appBuilder/validators/joi-validators/create.appAuth.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/create.appBody.validators.d.ts +0 -4
- package/dist/appBuilder/validators/joi-validators/create.appBody.validators.js +0 -11
- package/dist/appBuilder/validators/joi-validators/create.appBody.validators.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/create.appConstants.validator.d.ts +0 -4
- package/dist/appBuilder/validators/joi-validators/create.appConstants.validator.js +0 -12
- package/dist/appBuilder/validators/joi-validators/create.appConstants.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/create.appEnv.validator.d.ts +0 -4
- package/dist/appBuilder/validators/joi-validators/create.appEnv.validator.js +0 -17
- package/dist/appBuilder/validators/joi-validators/create.appEnv.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/create.appEvent.validator.d.ts +0 -5
- package/dist/appBuilder/validators/joi-validators/create.appEvent.validator.js +0 -30
- package/dist/appBuilder/validators/joi-validators/create.appEvent.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/create.appVariable.validator.d.ts +0 -4
- package/dist/appBuilder/validators/joi-validators/create.appVariable.validator.js +0 -14
- package/dist/appBuilder/validators/joi-validators/create.appVariable.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/sample.validator.d.ts +0 -5
- package/dist/appBuilder/validators/joi-validators/sample.validator.js +0 -26
- package/dist/appBuilder/validators/joi-validators/sample.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/update.app.validator.d.ts +0 -4
- package/dist/appBuilder/validators/joi-validators/update.app.validator.js +0 -34
- package/dist/appBuilder/validators/joi-validators/update.app.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/update.appAction.validator.d.ts +0 -4
- package/dist/appBuilder/validators/joi-validators/update.appAction.validator.js +0 -23
- package/dist/appBuilder/validators/joi-validators/update.appAction.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/update.appActionResponse.validator.d.ts +0 -3
- package/dist/appBuilder/validators/joi-validators/update.appActionResponse.validator.js +0 -21
- package/dist/appBuilder/validators/joi-validators/update.appActionResponse.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/update.appAuth.validator.d.ts +0 -4
- package/dist/appBuilder/validators/joi-validators/update.appAuth.validator.js +0 -19
- package/dist/appBuilder/validators/joi-validators/update.appAuth.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/update.appConstants.validator.d.ts +0 -4
- package/dist/appBuilder/validators/joi-validators/update.appConstants.validator.js +0 -12
- package/dist/appBuilder/validators/joi-validators/update.appConstants.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/update.appEnv.validator.d.ts +0 -4
- package/dist/appBuilder/validators/joi-validators/update.appEnv.validator.js +0 -17
- package/dist/appBuilder/validators/joi-validators/update.appEnv.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/update.appEvent.validator.d.ts +0 -4
- package/dist/appBuilder/validators/joi-validators/update.appEvent.validator.js +0 -16
- package/dist/appBuilder/validators/joi-validators/update.appEvent.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/update.appVariables.validator.d.ts +0 -4
- package/dist/appBuilder/validators/joi-validators/update.appVariables.validator.js +0 -14
- package/dist/appBuilder/validators/joi-validators/update.appVariables.validator.js.map +0 -1
- package/dist/appBuilder/validators/joi-validators/update.validation.entityData.validator.d.ts +0 -3
- package/dist/appBuilder/validators/joi-validators/update.validation.entityData.validator.js +0 -27
- package/dist/appBuilder/validators/joi-validators/update.validation.entityData.validator.js.map +0 -1
- package/dist/apps/validators/joi-validators/create.appEvent.validator.d.ts +0 -5
- package/dist/apps/validators/joi-validators/create.appEvent.validator.js +0 -30
- package/dist/apps/validators/joi-validators/create.appEvent.validator.js.map +0 -1
- package/dist/apps/validators/joi-validators/update.appEvent.validator.d.ts +0 -4
- package/dist/apps/validators/joi-validators/update.appEvent.validator.js +0 -16
- package/dist/apps/validators/joi-validators/update.appEvent.validator.js.map +0 -1
- package/dist/clients/integrations.client.d.ts +0 -2
- package/dist/clients/integrations.client.js +0 -26
- package/dist/clients/integrations.client.js.map +0 -1
- package/dist/database/database.service.d.ts +0 -232
- package/dist/database/database.service.js +0 -802
- package/dist/database/database.service.js.map +0 -1
- package/dist/database/types/aggregation.types.d.ts +0 -261
- package/dist/database/types/aggregation.types.js +0 -21
- package/dist/database/types/aggregation.types.js.map +0 -1
- package/dist/database/types/connection.types.d.ts +0 -132
- package/dist/database/types/connection.types.js +0 -6
- package/dist/database/types/connection.types.js.map +0 -1
- package/dist/database/types/database.types.d.ts +0 -175
- package/dist/database/types/database.types.js +0 -75
- package/dist/database/types/database.types.js.map +0 -1
- package/dist/database/types/index.types.d.ts +0 -220
- package/dist/database/types/index.types.js +0 -27
- package/dist/database/types/index.types.js.map +0 -1
- package/dist/database/types/migration.types.d.ts +0 -205
- package/dist/database/types/migration.types.js +0 -44
- package/dist/database/types/migration.types.js.map +0 -1
- package/dist/database/types/query.types.d.ts +0 -305
- package/dist/database/types/query.types.js +0 -57
- package/dist/database/types/query.types.js.map +0 -1
- package/dist/database/types/result.types.d.ts +0 -220
- package/dist/database/types/result.types.js +0 -6
- package/dist/database/types/result.types.js.map +0 -1
- package/dist/database/types/schema.types.d.ts +0 -190
- package/dist/database/types/schema.types.js +0 -69
- package/dist/database/types/schema.types.js.map +0 -1
- package/dist/database/utils/helpers.d.ts +0 -66
- package/dist/database/utils/helpers.js +0 -501
- package/dist/database/utils/helpers.js.map +0 -1
- package/dist/database/utils/migration.utils.d.ts +0 -151
- package/dist/database/utils/migration.utils.js +0 -476
- package/dist/database/utils/migration.utils.js.map +0 -1
- package/dist/database/utils/transaction.d.ts +0 -64
- package/dist/database/utils/transaction.js +0 -130
- package/dist/database/utils/transaction.js.map +0 -1
- package/dist/database/validators/connection.validator.d.ts +0 -20
- package/dist/database/validators/connection.validator.js +0 -267
- package/dist/database/validators/connection.validator.js.map +0 -1
- package/dist/database/validators/query.validator.d.ts +0 -31
- package/dist/database/validators/query.validator.js +0 -305
- package/dist/database/validators/query.validator.js.map +0 -1
- package/dist/database/validators/schema.validator.d.ts +0 -31
- package/dist/database/validators/schema.validator.js +0 -334
- package/dist/database/validators/schema.validator.js.map +0 -1
- package/dist/graph/graph.service.d.ts +0 -278
- package/dist/graph/graph.service.js +0 -687
- package/dist/graph/graph.service.js.map +0 -1
- package/dist/graph/types/connection.types.d.ts +0 -158
- package/dist/graph/types/connection.types.js +0 -43
- package/dist/graph/types/connection.types.js.map +0 -1
- package/dist/graph/types/graph.types.d.ts +0 -144
- package/dist/graph/types/graph.types.js +0 -84
- package/dist/graph/types/graph.types.js.map +0 -1
- package/dist/graph/types/node.types.d.ts +0 -193
- package/dist/graph/types/node.types.js +0 -49
- package/dist/graph/types/node.types.js.map +0 -1
- package/dist/graph/types/path.types.d.ts +0 -224
- package/dist/graph/types/path.types.js +0 -38
- package/dist/graph/types/path.types.js.map +0 -1
- package/dist/graph/types/query.types.d.ts +0 -247
- package/dist/graph/types/query.types.js +0 -23
- package/dist/graph/types/query.types.js.map +0 -1
- package/dist/graph/types/relationship.types.d.ts +0 -224
- package/dist/graph/types/relationship.types.js +0 -35
- package/dist/graph/types/relationship.types.js.map +0 -1
- package/dist/graph/types/result.types.d.ts +0 -237
- package/dist/graph/types/result.types.js +0 -7
- package/dist/graph/types/result.types.js.map +0 -1
- package/dist/graph/validators/index.d.ts +0 -81
- package/dist/graph/validators/index.js +0 -243
- package/dist/graph/validators/index.js.map +0 -1
- package/dist/integrationsBuilder/services/integration.service.d.ts +0 -138
- package/dist/integrationsBuilder/services/integration.service.js +0 -1148
- package/dist/integrationsBuilder/services/integration.service.js.map +0 -1
- package/dist/integrationsBuilder/services/integrationBuilder.service.d.ts +0 -130
- package/dist/integrationsBuilder/services/integrationBuilder.service.js +0 -1017
- package/dist/integrationsBuilder/services/integrationBuilder.service.js.map +0 -1
- package/dist/integrationsBuilder/utils/objects.utils.d.ts +0 -2
- package/dist/integrationsBuilder/utils/objects.utils.js +0 -48
- package/dist/integrationsBuilder/utils/objects.utils.js.map +0 -1
- package/dist/integrationsBuilder/utils/string.utils.d.ts +0 -1
- package/dist/integrationsBuilder/utils/string.utils.js +0 -9
- package/dist/integrationsBuilder/utils/string.utils.js.map +0 -1
- package/dist/integrationsBuilder/validators/index.d.ts +0 -18
- package/dist/integrationsBuilder/validators/index.js +0 -38
- package/dist/integrationsBuilder/validators/index.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/create.integration.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/create.integration.validator.js +0 -10
- package/dist/integrationsBuilder/validators/joi-validators/create.integration.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationApp.validator.d.ts +0 -4
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationApp.validator.js +0 -26
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationApp.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationCache.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationCache.validator.js +0 -8
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationCache.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationDatabase.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationDatabase.validator.js +0 -8
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationDatabase.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationEnv.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationEnv.validator.js +0 -10
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationEnv.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationFeature.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationFeature.validator.js +0 -60
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationFeature.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationFunction.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationFunction.validator.js +0 -8
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationFunction.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationJob.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationJob.validator.js +0 -8
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationJob.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationNotification.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationNotification.validator.js +0 -8
- package/dist/integrationsBuilder/validators/joi-validators/create.integrationNotification.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationApp.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationApp.validator.js +0 -9
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationApp.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationCache.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationCache.validator.js +0 -8
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationCache.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationDatabase.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationDatabase.validator.js +0 -8
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationDatabase.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationEnv.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationEnv.validator.js +0 -8
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationEnv.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationFeature.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationFeature.validator.js +0 -8
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationFeature.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationFunction.validator copy.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationFunction.validator copy.js +0 -8
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationFunction.validator copy.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationJob.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationJob.validator.js +0 -8
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationJob.validator.js.map +0 -1
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationNotification.validator.d.ts +0 -3
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationNotification.validator.js +0 -8
- package/dist/integrationsBuilder/validators/joi-validators/update.integrationNotification.validator.js.map +0 -1
- package/dist/postman.d.ts +0 -1
- package/dist/postman.js +0 -21674
- package/dist/postman.js.map +0 -1
- package/dist/processor/utils/mongo.util.d.ts +0 -0
- package/dist/processor/utils/mongo.util.js +0 -152
- package/dist/processor/utils/mongo.util.js.map +0 -1
- package/dist/processor/utils/postgres.util.d.ts +0 -14
- package/dist/processor/utils/postgres.util.js +0 -83
- package/dist/processor/utils/postgres.util.js.map +0 -1
- package/dist/products/services/utils/crypt.utils.d.ts +0 -1
- package/dist/products/services/utils/crypt.utils.js +0 -17
- package/dist/products/services/utils/crypt.utils.js.map +0 -1
- package/dist/products/services/utils/functions.utils.d.ts +0 -13
- package/dist/products/services/utils/functions.utils.js +0 -289
- package/dist/products/services/utils/functions.utils.js.map +0 -1
- package/dist/products/services/utils/objects.utils.d.ts +0 -13
- package/dist/products/services/utils/objects.utils.js +0 -89
- package/dist/products/services/utils/objects.utils.js.map +0 -1
- package/dist/products/services/utils/string.utils.d.ts +0 -12
- package/dist/products/services/utils/string.utils.js +0 -168
- package/dist/products/services/utils/string.utils.js.map +0 -1
- package/dist/products/validators/joi-validators/create.product.validator.d.ts +0 -3
- package/dist/products/validators/joi-validators/create.product.validator.js +0 -10
- package/dist/products/validators/joi-validators/create.product.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/create.productGraphAction.validator.d.ts +0 -14
- package/dist/products/validators/joi-validators/create.productGraphAction.validator.js +0 -696
- package/dist/products/validators/joi-validators/create.productGraphAction.validator.js.map +0 -1
- package/dist/products/validators/joi-validators/update.productGraphAction.validator.d.ts +0 -7
- package/dist/products/validators/joi-validators/update.productGraphAction.validator.js +0 -72
- package/dist/products/validators/joi-validators/update.productGraphAction.validator.js.map +0 -1
- package/dist/test.appBuilder.js +0 -14
- package/dist/test.appBuilder.js.map +0 -1
- package/dist/test.import.d.ts +0 -0
- package/dist/test.import.js +0 -24
- package/dist/test.import.js.map +0 -1
- package/dist/test.imports.js +0 -28
- package/dist/test.imports.js.map +0 -1
- package/dist/test.integrationBuilder.js +0 -276
- package/dist/test.integrationBuilder.js.map +0 -1
- package/dist/test.processor.d.ts +0 -1
- package/dist/test.processor.js +0 -23
- package/dist/test.processor.js.map +0 -1
- package/dist/test.utils.d.ts +0 -1
- package/dist/test.utils.js +0 -25
- package/dist/test.utils.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/types/integrationsBuilder.types.d.ts +0 -276
- package/dist/types/integrationsBuilder.types.js +0 -51
- package/dist/types/integrationsBuilder.types.js.map +0 -1
- /package/dist/{test.appBuilder.d.ts → test/test.database.d.ts} +0 -0
- /package/dist/{test.imports.d.ts → test/test.storage.d.ts} +0 -0
- /package/dist/{test.integrationBuilder.d.ts → test/test.triggers.d.ts} +0 -0
|
@@ -0,0 +1,1225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for the Ductape Agentic Workflows API.
|
|
5
|
+
* Enables AI-driven, autonomous multi-step processes where an LLM
|
|
6
|
+
* dynamically decides the next action based on observations and reasoning.
|
|
7
|
+
*/
|
|
8
|
+
import { IActionRequest, INotificationRequest, IDbActionRequest, IStorageRequest, IFeatureInput } from '../../types';
|
|
9
|
+
/**
|
|
10
|
+
* Configuration options for AgentsService initialization
|
|
11
|
+
*/
|
|
12
|
+
export interface IAgentServiceConfig {
|
|
13
|
+
/** Workspace ID */
|
|
14
|
+
workspace_id: string;
|
|
15
|
+
/** Public key for authentication */
|
|
16
|
+
public_key: string;
|
|
17
|
+
/** User ID */
|
|
18
|
+
user_id: string;
|
|
19
|
+
/** Authentication token */
|
|
20
|
+
token: string;
|
|
21
|
+
/** Environment type (staging, production, local) */
|
|
22
|
+
env_type: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Supported LLM providers
|
|
26
|
+
*/
|
|
27
|
+
export type LLMProvider = 'anthropic' | 'openai' | 'google' | 'cohere' | 'custom';
|
|
28
|
+
/**
|
|
29
|
+
* LLM model configuration
|
|
30
|
+
*/
|
|
31
|
+
export interface ILLMConfig {
|
|
32
|
+
/** LLM provider */
|
|
33
|
+
provider: LLMProvider;
|
|
34
|
+
/** Model identifier (e.g., 'claude-sonnet-4-20250514', 'gpt-4') */
|
|
35
|
+
model: string;
|
|
36
|
+
/** Sampling temperature (0-1) */
|
|
37
|
+
temperature?: number;
|
|
38
|
+
/** Maximum tokens to generate */
|
|
39
|
+
maxTokens?: number;
|
|
40
|
+
/** Top-p sampling */
|
|
41
|
+
topP?: number;
|
|
42
|
+
/** Stop sequences */
|
|
43
|
+
stopSequences?: string[];
|
|
44
|
+
/** API key (can be pulled from secrets) */
|
|
45
|
+
apiKey?: string;
|
|
46
|
+
/** API base URL for custom providers */
|
|
47
|
+
baseUrl?: string;
|
|
48
|
+
/** Custom headers */
|
|
49
|
+
headers?: Record<string, string>;
|
|
50
|
+
/** Request timeout in ms */
|
|
51
|
+
timeout?: number;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Model configuration overrides
|
|
55
|
+
* These can be applied at runtime to override settings from the model entity
|
|
56
|
+
*/
|
|
57
|
+
export interface IModelConfigOverrides {
|
|
58
|
+
/** Override temperature */
|
|
59
|
+
temperature?: number;
|
|
60
|
+
/** Override max tokens */
|
|
61
|
+
maxTokens?: number;
|
|
62
|
+
/** Override top-p sampling */
|
|
63
|
+
topP?: number;
|
|
64
|
+
/** Override stop sequences */
|
|
65
|
+
stopSequences?: string[];
|
|
66
|
+
/** Override timeout in ms */
|
|
67
|
+
timeout?: number;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Tool parameter types
|
|
71
|
+
*/
|
|
72
|
+
export type ToolParamType = 'string' | 'number' | 'boolean' | 'array' | 'object';
|
|
73
|
+
/**
|
|
74
|
+
* Tool parameter definition
|
|
75
|
+
*/
|
|
76
|
+
export interface IToolParam {
|
|
77
|
+
/** Parameter type */
|
|
78
|
+
type: ToolParamType;
|
|
79
|
+
/** Description for LLM */
|
|
80
|
+
description: string;
|
|
81
|
+
/** Whether parameter is required */
|
|
82
|
+
required?: boolean;
|
|
83
|
+
/** Enum values for constrained inputs */
|
|
84
|
+
enum?: string[];
|
|
85
|
+
/** Default value */
|
|
86
|
+
default?: unknown;
|
|
87
|
+
/** For array types, the item type */
|
|
88
|
+
items?: IToolParam;
|
|
89
|
+
/** For object types, nested properties */
|
|
90
|
+
properties?: Record<string, IToolParam>;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Tool call result
|
|
94
|
+
*/
|
|
95
|
+
export interface IToolCallResult {
|
|
96
|
+
/** Tool tag */
|
|
97
|
+
tool: string;
|
|
98
|
+
/** Input parameters used */
|
|
99
|
+
input: Record<string, unknown>;
|
|
100
|
+
/** Tool output */
|
|
101
|
+
output: unknown;
|
|
102
|
+
/** Whether the call was successful */
|
|
103
|
+
success: boolean;
|
|
104
|
+
/** Error message if failed */
|
|
105
|
+
error?: string;
|
|
106
|
+
/** Execution time in ms */
|
|
107
|
+
duration: number;
|
|
108
|
+
/** Timestamp */
|
|
109
|
+
timestamp: number;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Agent tool definition
|
|
113
|
+
*/
|
|
114
|
+
export interface IAgentTool<TParams = Record<string, unknown>, TResult = unknown> {
|
|
115
|
+
/** Unique tool identifier */
|
|
116
|
+
tag: string;
|
|
117
|
+
/** Human-readable name */
|
|
118
|
+
name?: string;
|
|
119
|
+
/** Description for LLM to understand when to use this tool */
|
|
120
|
+
description: string;
|
|
121
|
+
/** Input parameter schema */
|
|
122
|
+
parameters: Record<string, IToolParam>;
|
|
123
|
+
/** Tool implementation */
|
|
124
|
+
handler: (ctx: IAgentToolContext, params: TParams) => Promise<TResult>;
|
|
125
|
+
/** Whether this tool requires human confirmation before execution */
|
|
126
|
+
requiresConfirmation?: boolean;
|
|
127
|
+
/** Estimated cost for quota tracking */
|
|
128
|
+
costEstimate?: number;
|
|
129
|
+
/** Timeout for this tool in ms */
|
|
130
|
+
timeout?: number;
|
|
131
|
+
/** Number of retries on failure */
|
|
132
|
+
retries?: number;
|
|
133
|
+
/** Tool-level resilience configuration */
|
|
134
|
+
resilience?: IAgentToolResilienceConfig;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Short-term memory configuration
|
|
138
|
+
*/
|
|
139
|
+
export interface IShortTermMemoryConfig {
|
|
140
|
+
/** Maximum messages to keep in context */
|
|
141
|
+
maxMessages?: number;
|
|
142
|
+
/** Summarize conversation after this many messages */
|
|
143
|
+
summarizeAfter?: number;
|
|
144
|
+
/** Include tool call results in context */
|
|
145
|
+
includeToolResults?: boolean;
|
|
146
|
+
/** Strategy for truncation */
|
|
147
|
+
truncationStrategy?: 'fifo' | 'sliding_window' | 'summarize';
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Long-term memory configuration
|
|
151
|
+
*/
|
|
152
|
+
export interface ILongTermMemoryConfig {
|
|
153
|
+
/** Enable long-term memory */
|
|
154
|
+
enabled: boolean;
|
|
155
|
+
/** Vector store tag for retrieval */
|
|
156
|
+
vectorStore?: string;
|
|
157
|
+
/** Number of results to retrieve */
|
|
158
|
+
retrieveTopK?: number;
|
|
159
|
+
/** Minimum similarity threshold */
|
|
160
|
+
minSimilarity?: number;
|
|
161
|
+
/** Automatically store new learnings */
|
|
162
|
+
autoStore?: boolean;
|
|
163
|
+
/** Namespace for memory isolation */
|
|
164
|
+
namespace?: string;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Full memory configuration
|
|
168
|
+
*/
|
|
169
|
+
export interface IAgentMemoryConfig {
|
|
170
|
+
/** Short-term (conversation) memory */
|
|
171
|
+
shortTerm?: IShortTermMemoryConfig;
|
|
172
|
+
/** Long-term (persistent) memory */
|
|
173
|
+
longTerm?: ILongTermMemoryConfig;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Stop condition based on tool call
|
|
177
|
+
*/
|
|
178
|
+
export interface IToolStopCondition {
|
|
179
|
+
/** Stop when this tool is called */
|
|
180
|
+
tool: string;
|
|
181
|
+
/** Optional: only stop if tool output matches */
|
|
182
|
+
outputMatch?: Record<string, unknown>;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Stop condition based on output content
|
|
186
|
+
*/
|
|
187
|
+
export interface IOutputStopCondition {
|
|
188
|
+
/** Stop when output contains these fields/values */
|
|
189
|
+
output: Record<string, unknown>;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Stop condition based on LLM response
|
|
193
|
+
*/
|
|
194
|
+
export interface IMessageStopCondition {
|
|
195
|
+
/** Stop when LLM says it's done (pattern match) */
|
|
196
|
+
messagePattern?: string | RegExp;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Union of stop condition types
|
|
200
|
+
*/
|
|
201
|
+
export type StopCondition = IToolStopCondition | IOutputStopCondition | IMessageStopCondition;
|
|
202
|
+
/**
|
|
203
|
+
* Termination configuration
|
|
204
|
+
*/
|
|
205
|
+
export interface IAgentTerminationConfig {
|
|
206
|
+
/** Maximum number of agent loop iterations */
|
|
207
|
+
maxIterations?: number;
|
|
208
|
+
/** Maximum total tokens to use */
|
|
209
|
+
maxTokens?: number;
|
|
210
|
+
/** Timeout duration (ms or duration string like '10m') */
|
|
211
|
+
timeout?: number | string;
|
|
212
|
+
/** Explicit stop conditions */
|
|
213
|
+
stopConditions?: StopCondition[];
|
|
214
|
+
/** Whether to allow manual termination via signal */
|
|
215
|
+
allowManualStop?: boolean;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Hook timing
|
|
219
|
+
*/
|
|
220
|
+
export type HookTiming = 'before' | 'after';
|
|
221
|
+
/**
|
|
222
|
+
* Agent hook definition
|
|
223
|
+
*/
|
|
224
|
+
export interface IAgentHook {
|
|
225
|
+
/** Hook name */
|
|
226
|
+
name: string;
|
|
227
|
+
/** When to trigger (before/after) */
|
|
228
|
+
timing: HookTiming;
|
|
229
|
+
/** Event to hook into */
|
|
230
|
+
event: 'iteration' | 'tool_call' | 'llm_call' | 'termination';
|
|
231
|
+
/** Hook handler */
|
|
232
|
+
handler: (ctx: IAgentHookContext) => Promise<void | boolean>;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Context provided to hooks
|
|
236
|
+
*/
|
|
237
|
+
export interface IAgentHookContext {
|
|
238
|
+
/** Current agent state */
|
|
239
|
+
state: IAgentState;
|
|
240
|
+
/** Event data */
|
|
241
|
+
event: {
|
|
242
|
+
type: string;
|
|
243
|
+
data: unknown;
|
|
244
|
+
};
|
|
245
|
+
/** Abort the current operation */
|
|
246
|
+
abort: (reason: string) => void;
|
|
247
|
+
/** Modify the operation */
|
|
248
|
+
modify: (changes: Record<string, unknown>) => void;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Approval request
|
|
252
|
+
*/
|
|
253
|
+
export interface IApprovalRequest {
|
|
254
|
+
/** Request ID */
|
|
255
|
+
id: string;
|
|
256
|
+
/** Tool being called */
|
|
257
|
+
tool: string;
|
|
258
|
+
/** Parameters to approve */
|
|
259
|
+
params: Record<string, unknown>;
|
|
260
|
+
/** Reason for approval request */
|
|
261
|
+
reason: string;
|
|
262
|
+
/** Timeout for approval */
|
|
263
|
+
timeout?: number;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Approval response
|
|
267
|
+
*/
|
|
268
|
+
export interface IApprovalResponse {
|
|
269
|
+
/** Whether approved */
|
|
270
|
+
approved: boolean;
|
|
271
|
+
/** Modified parameters (if changed) */
|
|
272
|
+
modifiedParams?: Record<string, unknown>;
|
|
273
|
+
/** Rejection reason */
|
|
274
|
+
reason?: string;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Human-in-the-loop configuration
|
|
278
|
+
*/
|
|
279
|
+
export interface IHumanInLoopConfig {
|
|
280
|
+
/** Enable human-in-the-loop */
|
|
281
|
+
enabled: boolean;
|
|
282
|
+
/** Tools that always require approval */
|
|
283
|
+
alwaysRequireApproval?: string[];
|
|
284
|
+
/** Default timeout for approval requests */
|
|
285
|
+
approvalTimeout?: number | string;
|
|
286
|
+
/** Webhook to call for approvals */
|
|
287
|
+
approvalWebhook?: string;
|
|
288
|
+
/** Broker topic to publish approval requests */
|
|
289
|
+
approvalBroker?: {
|
|
290
|
+
broker: string;
|
|
291
|
+
event: string;
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Stream event types
|
|
296
|
+
*/
|
|
297
|
+
export type AgentStreamEventType = 'thinking_start' | 'thinking_delta' | 'thinking_end' | 'tool_start' | 'tool_end' | 'message_start' | 'message_delta' | 'message_end' | 'iteration_start' | 'iteration_end' | 'agent_complete' | 'error';
|
|
298
|
+
/**
|
|
299
|
+
* Stream event
|
|
300
|
+
*/
|
|
301
|
+
export interface IAgentStreamEvent {
|
|
302
|
+
/** Event type */
|
|
303
|
+
type: AgentStreamEventType;
|
|
304
|
+
/** Event timestamp */
|
|
305
|
+
timestamp: number;
|
|
306
|
+
/** Event data */
|
|
307
|
+
data: unknown;
|
|
308
|
+
/** Current iteration */
|
|
309
|
+
iteration?: number;
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Streaming configuration
|
|
313
|
+
*/
|
|
314
|
+
export interface IAgentStreamConfig {
|
|
315
|
+
/** Enable streaming */
|
|
316
|
+
enabled: boolean;
|
|
317
|
+
/** Events to stream */
|
|
318
|
+
events?: AgentStreamEventType[];
|
|
319
|
+
/** Webhook to send events to */
|
|
320
|
+
webhook?: string;
|
|
321
|
+
/** Broker to publish events to */
|
|
322
|
+
broker?: {
|
|
323
|
+
broker: string;
|
|
324
|
+
event: string;
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Tool-level resilience configuration
|
|
329
|
+
* References existing product-level healthchecks, quotas, and fallbacks by tag
|
|
330
|
+
*/
|
|
331
|
+
export interface IAgentToolResilienceConfig {
|
|
332
|
+
/** Tag of an existing quota to use for this tool */
|
|
333
|
+
quota?: string;
|
|
334
|
+
/** Tag of an existing fallback to use for this tool */
|
|
335
|
+
fallback?: string;
|
|
336
|
+
/** Tag of an existing healthcheck to verify before execution */
|
|
337
|
+
healthcheck?: string;
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Agent-level resilience configuration
|
|
341
|
+
* References existing product-level healthchecks, quotas, and fallbacks
|
|
342
|
+
*
|
|
343
|
+
* Note: Healthchecks, quotas, and fallbacks must be defined at the product level
|
|
344
|
+
* using the resilience API. Agents can only reference existing configurations.
|
|
345
|
+
*
|
|
346
|
+
* @example
|
|
347
|
+
* ```typescript
|
|
348
|
+
* // First, define resilience configs at the product level
|
|
349
|
+
* await ductape.resilience.createHealthcheck({
|
|
350
|
+
* product: 'my-product',
|
|
351
|
+
* tag: 'anthropic-health',
|
|
352
|
+
* // ... healthcheck config
|
|
353
|
+
* });
|
|
354
|
+
*
|
|
355
|
+
* await ductape.resilience.createQuota({
|
|
356
|
+
* product: 'my-product',
|
|
357
|
+
* tag: 'llm-quota',
|
|
358
|
+
* // ... quota config
|
|
359
|
+
* });
|
|
360
|
+
*
|
|
361
|
+
* // Then reference them in agent definition
|
|
362
|
+
* const agent = await ductape.agents.define({
|
|
363
|
+
* // ...
|
|
364
|
+
* resilience: {
|
|
365
|
+
* defaults: {
|
|
366
|
+
* healthcheck: 'anthropic-health',
|
|
367
|
+
* quota: 'llm-quota',
|
|
368
|
+
* },
|
|
369
|
+
* },
|
|
370
|
+
* });
|
|
371
|
+
* ```
|
|
372
|
+
*/
|
|
373
|
+
export interface IAgentResilienceConfig {
|
|
374
|
+
/** Default resilience settings applied to all tools */
|
|
375
|
+
defaults?: {
|
|
376
|
+
/** Tag of an existing quota to use by default */
|
|
377
|
+
quota?: string;
|
|
378
|
+
/** Tag of an existing fallback to use by default */
|
|
379
|
+
fallback?: string;
|
|
380
|
+
/** Tag of an existing healthcheck to verify before tool execution */
|
|
381
|
+
healthcheck?: string;
|
|
382
|
+
};
|
|
383
|
+
/** Tool-specific resilience overrides (keyed by tool tag) */
|
|
384
|
+
toolOverrides?: Record<string, IAgentToolResilienceConfig>;
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Full agent definition options
|
|
388
|
+
*/
|
|
389
|
+
export interface IDefineAgentOptions<TInput = Record<string, unknown>> {
|
|
390
|
+
/** Target product (optional if using builder pattern) */
|
|
391
|
+
product?: string;
|
|
392
|
+
/** Unique agent tag */
|
|
393
|
+
tag: string;
|
|
394
|
+
/** Human-readable name */
|
|
395
|
+
name: string;
|
|
396
|
+
/** Agent description */
|
|
397
|
+
description?: string;
|
|
398
|
+
/**
|
|
399
|
+
* Model tag referencing a model configuration defined at the product level.
|
|
400
|
+
* Model configurations are managed via product.createModel() or the Ductape dashboard.
|
|
401
|
+
*/
|
|
402
|
+
model: string;
|
|
403
|
+
/**
|
|
404
|
+
* Model configuration overrides applied at agent level.
|
|
405
|
+
* These override settings from the referenced model entity.
|
|
406
|
+
*/
|
|
407
|
+
modelConfig?: IModelConfigOverrides;
|
|
408
|
+
/** System prompt defining agent behavior */
|
|
409
|
+
systemPrompt: string;
|
|
410
|
+
/** Available tools */
|
|
411
|
+
tools: IAgentTool[];
|
|
412
|
+
/** Termination configuration */
|
|
413
|
+
termination?: IAgentTerminationConfig;
|
|
414
|
+
/** Memory configuration */
|
|
415
|
+
memory?: IAgentMemoryConfig;
|
|
416
|
+
/** Hooks for customization */
|
|
417
|
+
hooks?: IAgentHook[];
|
|
418
|
+
/** Human-in-the-loop configuration */
|
|
419
|
+
humanInLoop?: IHumanInLoopConfig;
|
|
420
|
+
/** Streaming configuration */
|
|
421
|
+
streaming?: IAgentStreamConfig;
|
|
422
|
+
/** Input schema validation */
|
|
423
|
+
inputSchema?: Record<string, IToolParam>;
|
|
424
|
+
/** Environment configurations */
|
|
425
|
+
envs?: IAgentEnvConfig[];
|
|
426
|
+
/** Resilience configuration (healthchecks, quotas, fallbacks) */
|
|
427
|
+
resilience?: IAgentResilienceConfig;
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Environment-specific agent configuration
|
|
431
|
+
*/
|
|
432
|
+
export interface IAgentEnvConfig {
|
|
433
|
+
/** Environment slug */
|
|
434
|
+
slug: string;
|
|
435
|
+
/** Whether active in this env */
|
|
436
|
+
active?: boolean;
|
|
437
|
+
/** Environment-specific model tag override */
|
|
438
|
+
model?: string;
|
|
439
|
+
/** Environment-specific model config overrides */
|
|
440
|
+
modelConfig?: IModelConfigOverrides;
|
|
441
|
+
/** Environment-specific tool overrides */
|
|
442
|
+
toolOverrides?: Record<string, Partial<IAgentTool>>;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Defined agent (result of define())
|
|
446
|
+
*/
|
|
447
|
+
export interface IDefinedAgent {
|
|
448
|
+
/** Agent tag */
|
|
449
|
+
tag: string;
|
|
450
|
+
/** Agent name */
|
|
451
|
+
name: string;
|
|
452
|
+
/** Description */
|
|
453
|
+
description?: string;
|
|
454
|
+
/** Model tag referencing a product-level model configuration */
|
|
455
|
+
model: string;
|
|
456
|
+
/** Agent-level model config overrides */
|
|
457
|
+
modelConfig?: IModelConfigOverrides;
|
|
458
|
+
/** System prompt */
|
|
459
|
+
systemPrompt: string;
|
|
460
|
+
/** Tool definitions (without handlers for storage) */
|
|
461
|
+
toolSchemas: IAgentToolSchema[];
|
|
462
|
+
/** Termination config */
|
|
463
|
+
termination?: IAgentTerminationConfig;
|
|
464
|
+
/** Memory config */
|
|
465
|
+
memory?: IAgentMemoryConfig;
|
|
466
|
+
/** Human-in-loop config */
|
|
467
|
+
humanInLoop?: IHumanInLoopConfig;
|
|
468
|
+
/** Streaming config */
|
|
469
|
+
streaming?: IAgentStreamConfig;
|
|
470
|
+
/** Input schema */
|
|
471
|
+
inputSchema?: Record<string, IToolParam>;
|
|
472
|
+
/** Environment configs */
|
|
473
|
+
envs?: IAgentEnvConfig[];
|
|
474
|
+
/** Resilience config */
|
|
475
|
+
resilience?: IAgentResilienceConfig;
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* Tool schema (without handler, for storage/API)
|
|
479
|
+
*/
|
|
480
|
+
export interface IAgentToolSchema {
|
|
481
|
+
tag: string;
|
|
482
|
+
name?: string;
|
|
483
|
+
description: string;
|
|
484
|
+
parameters: Record<string, IToolParam>;
|
|
485
|
+
requiresConfirmation?: boolean;
|
|
486
|
+
costEstimate?: number;
|
|
487
|
+
timeout?: number;
|
|
488
|
+
retries?: number;
|
|
489
|
+
/** Tool-level resilience configuration */
|
|
490
|
+
resilience?: IAgentToolResilienceConfig;
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* Options for running an agent
|
|
494
|
+
*/
|
|
495
|
+
export interface IRunAgentOptions {
|
|
496
|
+
/** Product tag */
|
|
497
|
+
product: string;
|
|
498
|
+
/** Environment slug */
|
|
499
|
+
env: string;
|
|
500
|
+
/** Agent tag */
|
|
501
|
+
tag: string;
|
|
502
|
+
/** Agent input */
|
|
503
|
+
input: Record<string, unknown>;
|
|
504
|
+
/** Initial conversation context */
|
|
505
|
+
conversationContext?: IConversationMessage[];
|
|
506
|
+
/** Session token in format: session_tag:jwt_token */
|
|
507
|
+
session?: string;
|
|
508
|
+
/** Idempotency key */
|
|
509
|
+
idempotency_key?: string;
|
|
510
|
+
/** Cache tag */
|
|
511
|
+
cache?: string;
|
|
512
|
+
/** Override termination config */
|
|
513
|
+
termination?: Partial<IAgentTerminationConfig>;
|
|
514
|
+
/** Runtime model configuration overrides (merged with model entity settings) */
|
|
515
|
+
modelConfig?: IModelConfigOverrides;
|
|
516
|
+
/** Enable streaming */
|
|
517
|
+
stream?: boolean;
|
|
518
|
+
/** Stream callback */
|
|
519
|
+
onStream?: (event: IAgentStreamEvent) => void;
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* Conversation message
|
|
523
|
+
*/
|
|
524
|
+
export interface IConversationMessage {
|
|
525
|
+
/** Message role */
|
|
526
|
+
role: 'user' | 'assistant' | 'system' | 'tool';
|
|
527
|
+
/** Message content */
|
|
528
|
+
content: string;
|
|
529
|
+
/** Tool call info (for tool messages) */
|
|
530
|
+
toolCall?: {
|
|
531
|
+
id: string;
|
|
532
|
+
name: string;
|
|
533
|
+
input: Record<string, unknown>;
|
|
534
|
+
};
|
|
535
|
+
/** Tool result (for tool messages) */
|
|
536
|
+
toolResult?: unknown;
|
|
537
|
+
/** Timestamp */
|
|
538
|
+
timestamp?: number;
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Agent execution state
|
|
542
|
+
*/
|
|
543
|
+
export interface IAgentState {
|
|
544
|
+
/** Execution ID */
|
|
545
|
+
execution_id: string;
|
|
546
|
+
/** Agent tag */
|
|
547
|
+
agent_tag: string;
|
|
548
|
+
/** Current status */
|
|
549
|
+
status: AgentStatus;
|
|
550
|
+
/** Input data */
|
|
551
|
+
input: Record<string, unknown>;
|
|
552
|
+
/** Current iteration */
|
|
553
|
+
iteration: number;
|
|
554
|
+
/** Conversation history */
|
|
555
|
+
conversation: IConversationMessage[];
|
|
556
|
+
/** Tool call history */
|
|
557
|
+
toolCalls: IToolCallResult[];
|
|
558
|
+
/** Custom state data */
|
|
559
|
+
data: Record<string, unknown>;
|
|
560
|
+
/** Token usage */
|
|
561
|
+
usage: ITokenUsage;
|
|
562
|
+
/** Start timestamp */
|
|
563
|
+
startedAt: number;
|
|
564
|
+
/** Last update timestamp */
|
|
565
|
+
updatedAt: number;
|
|
566
|
+
/** Error if failed */
|
|
567
|
+
error?: string;
|
|
568
|
+
}
|
|
569
|
+
/**
|
|
570
|
+
* Agent execution status
|
|
571
|
+
*/
|
|
572
|
+
export type AgentStatus = 'pending' | 'running' | 'waiting_approval' | 'paused' | 'completed' | 'failed' | 'cancelled' | 'timeout';
|
|
573
|
+
/**
|
|
574
|
+
* Token usage tracking
|
|
575
|
+
*/
|
|
576
|
+
export interface ITokenUsage {
|
|
577
|
+
/** Input tokens */
|
|
578
|
+
inputTokens: number;
|
|
579
|
+
/** Output tokens */
|
|
580
|
+
outputTokens: number;
|
|
581
|
+
/** Total tokens */
|
|
582
|
+
totalTokens: number;
|
|
583
|
+
/** Cache read tokens */
|
|
584
|
+
cacheReadTokens?: number;
|
|
585
|
+
/** Cache write tokens */
|
|
586
|
+
cacheWriteTokens?: number;
|
|
587
|
+
}
|
|
588
|
+
/**
|
|
589
|
+
* Agent execution result
|
|
590
|
+
*/
|
|
591
|
+
export interface IAgentExecutionResult<TOutput = unknown> {
|
|
592
|
+
/** Execution ID */
|
|
593
|
+
execution_id: string;
|
|
594
|
+
/** Final status */
|
|
595
|
+
status: AgentStatus;
|
|
596
|
+
/** Output data */
|
|
597
|
+
output?: TOutput;
|
|
598
|
+
/** Final assistant message */
|
|
599
|
+
finalMessage?: string;
|
|
600
|
+
/** Error message if failed */
|
|
601
|
+
error?: string;
|
|
602
|
+
/** Number of iterations */
|
|
603
|
+
iterations: number;
|
|
604
|
+
/** All tool calls made */
|
|
605
|
+
toolCalls: IToolCallResult[];
|
|
606
|
+
/** Token usage */
|
|
607
|
+
usage: ITokenUsage;
|
|
608
|
+
/** Execution time in ms */
|
|
609
|
+
executionTime: number;
|
|
610
|
+
/** Termination reason */
|
|
611
|
+
terminationReason?: string;
|
|
612
|
+
}
|
|
613
|
+
/**
|
|
614
|
+
* Context for tool handlers - provides access to Ductape components
|
|
615
|
+
*/
|
|
616
|
+
export interface IAgentToolContext {
|
|
617
|
+
/** Agent input (read-only) */
|
|
618
|
+
readonly input: Record<string, unknown>;
|
|
619
|
+
/** Execution metadata */
|
|
620
|
+
readonly execution_id: string;
|
|
621
|
+
readonly agent_tag: string;
|
|
622
|
+
readonly env: string;
|
|
623
|
+
readonly product: string;
|
|
624
|
+
/** Current iteration */
|
|
625
|
+
readonly iteration: number;
|
|
626
|
+
/** Get conversation history */
|
|
627
|
+
getConversationHistory(): IConversationMessage[];
|
|
628
|
+
/** Get tool call history */
|
|
629
|
+
getToolCallHistory(): IToolCallResult[];
|
|
630
|
+
/** Session token in format: session_tag:jwt_token */
|
|
631
|
+
readonly session?: string;
|
|
632
|
+
/** Action context */
|
|
633
|
+
action: IAgentActionContext;
|
|
634
|
+
/** Database context */
|
|
635
|
+
database: IAgentDatabaseContext;
|
|
636
|
+
/** Graph context */
|
|
637
|
+
graph: IAgentGraphContext;
|
|
638
|
+
/** Notification context */
|
|
639
|
+
notification: IAgentNotificationContext;
|
|
640
|
+
/** Storage context */
|
|
641
|
+
storage: IAgentStorageContext;
|
|
642
|
+
/** Publish context */
|
|
643
|
+
publish: IAgentPublishContext;
|
|
644
|
+
/** Feature context */
|
|
645
|
+
feature: IAgentFeatureContext;
|
|
646
|
+
/** Resilience context (quotas, fallbacks, healthchecks) */
|
|
647
|
+
resilience: IAgentResilienceContext;
|
|
648
|
+
/** Set custom state */
|
|
649
|
+
setState(key: string, value: unknown): void;
|
|
650
|
+
/** Get custom state */
|
|
651
|
+
getState<T>(key: string): T | undefined;
|
|
652
|
+
/** Store in long-term memory */
|
|
653
|
+
remember(content: string, metadata?: Record<string, unknown>): Promise<void>;
|
|
654
|
+
/** Retrieve from long-term memory */
|
|
655
|
+
recall(query: string, topK?: number): Promise<IMemoryResult[]>;
|
|
656
|
+
/** Logger */
|
|
657
|
+
log: IAgentLogger;
|
|
658
|
+
}
|
|
659
|
+
/**
|
|
660
|
+
* Memory retrieval result
|
|
661
|
+
*/
|
|
662
|
+
export interface IMemoryResult {
|
|
663
|
+
content: string;
|
|
664
|
+
metadata?: Record<string, unknown>;
|
|
665
|
+
similarity: number;
|
|
666
|
+
}
|
|
667
|
+
/**
|
|
668
|
+
* Logger interface
|
|
669
|
+
*/
|
|
670
|
+
export interface IAgentLogger {
|
|
671
|
+
debug(message: string, data?: Record<string, unknown>): void;
|
|
672
|
+
info(message: string, data?: Record<string, unknown>): void;
|
|
673
|
+
warn(message: string, data?: Record<string, unknown>): void;
|
|
674
|
+
error(message: string, data?: Record<string, unknown>): void;
|
|
675
|
+
}
|
|
676
|
+
/**
|
|
677
|
+
* Action context for agent tools
|
|
678
|
+
*/
|
|
679
|
+
export interface IAgentActionContext {
|
|
680
|
+
run<T>(options: {
|
|
681
|
+
app: string;
|
|
682
|
+
event: string;
|
|
683
|
+
input: IActionRequest;
|
|
684
|
+
retries?: number;
|
|
685
|
+
timeout?: number;
|
|
686
|
+
}): Promise<T>;
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* Database context for agent tools
|
|
690
|
+
*/
|
|
691
|
+
export interface IAgentDatabaseContext {
|
|
692
|
+
execute<T>(options: {
|
|
693
|
+
database: string;
|
|
694
|
+
event: string;
|
|
695
|
+
input: IDbActionRequest;
|
|
696
|
+
retries?: number;
|
|
697
|
+
timeout?: number;
|
|
698
|
+
}): Promise<T>;
|
|
699
|
+
query<T>(options: {
|
|
700
|
+
database: string;
|
|
701
|
+
event: string;
|
|
702
|
+
params?: Record<string, unknown>;
|
|
703
|
+
}): Promise<T[]>;
|
|
704
|
+
insert<T>(options: {
|
|
705
|
+
database: string;
|
|
706
|
+
event: string;
|
|
707
|
+
data: Record<string, unknown>;
|
|
708
|
+
}): Promise<T>;
|
|
709
|
+
update<T>(options: {
|
|
710
|
+
database: string;
|
|
711
|
+
event: string;
|
|
712
|
+
data: Record<string, unknown>;
|
|
713
|
+
where: Record<string, unknown>;
|
|
714
|
+
}): Promise<T>;
|
|
715
|
+
delete(options: {
|
|
716
|
+
database: string;
|
|
717
|
+
event: string;
|
|
718
|
+
where: Record<string, unknown>;
|
|
719
|
+
}): Promise<boolean>;
|
|
720
|
+
}
|
|
721
|
+
/**
|
|
722
|
+
* Graph context for agent tools
|
|
723
|
+
*/
|
|
724
|
+
export interface IAgentGraphContext {
|
|
725
|
+
execute<T>(options: {
|
|
726
|
+
graph: string;
|
|
727
|
+
action: string;
|
|
728
|
+
input: Record<string, unknown>;
|
|
729
|
+
}): Promise<T>;
|
|
730
|
+
createNode<T>(options: {
|
|
731
|
+
graph: string;
|
|
732
|
+
labels: string[];
|
|
733
|
+
properties: Record<string, unknown>;
|
|
734
|
+
}): Promise<T>;
|
|
735
|
+
updateNode<T>(options: {
|
|
736
|
+
graph: string;
|
|
737
|
+
id: string | number;
|
|
738
|
+
properties: Record<string, unknown>;
|
|
739
|
+
}): Promise<T>;
|
|
740
|
+
deleteNode(options: {
|
|
741
|
+
graph: string;
|
|
742
|
+
id: string | number;
|
|
743
|
+
}): Promise<void>;
|
|
744
|
+
createRelationship<T>(options: {
|
|
745
|
+
graph: string;
|
|
746
|
+
from: string;
|
|
747
|
+
to: string;
|
|
748
|
+
type: string;
|
|
749
|
+
properties?: Record<string, unknown>;
|
|
750
|
+
}): Promise<T>;
|
|
751
|
+
traverse<T>(options: {
|
|
752
|
+
graph: string;
|
|
753
|
+
startNodeId: string | number;
|
|
754
|
+
direction?: 'outgoing' | 'incoming' | 'both';
|
|
755
|
+
relationshipTypes?: string[];
|
|
756
|
+
maxDepth?: number;
|
|
757
|
+
}): Promise<T>;
|
|
758
|
+
query<T>(options: {
|
|
759
|
+
graph: string;
|
|
760
|
+
action: string;
|
|
761
|
+
params?: Record<string, unknown>;
|
|
762
|
+
}): Promise<T[]>;
|
|
763
|
+
}
|
|
764
|
+
/**
|
|
765
|
+
* Notification context for agent tools
|
|
766
|
+
*/
|
|
767
|
+
export interface IAgentNotificationContext {
|
|
768
|
+
send(options: {
|
|
769
|
+
notification: string;
|
|
770
|
+
event: string;
|
|
771
|
+
input: INotificationRequest;
|
|
772
|
+
retries?: number;
|
|
773
|
+
}): Promise<void>;
|
|
774
|
+
email(options: {
|
|
775
|
+
notification: string;
|
|
776
|
+
event: string;
|
|
777
|
+
recipients: string[];
|
|
778
|
+
subject: Record<string, unknown>;
|
|
779
|
+
template: Record<string, unknown>;
|
|
780
|
+
}): Promise<void>;
|
|
781
|
+
push(options: {
|
|
782
|
+
notification: string;
|
|
783
|
+
event: string;
|
|
784
|
+
tokens: string[];
|
|
785
|
+
title: Record<string, unknown>;
|
|
786
|
+
body: Record<string, unknown>;
|
|
787
|
+
data?: Record<string, unknown>;
|
|
788
|
+
}): Promise<void>;
|
|
789
|
+
sms(options: {
|
|
790
|
+
notification: string;
|
|
791
|
+
event: string;
|
|
792
|
+
phones: string[];
|
|
793
|
+
message: Record<string, unknown>;
|
|
794
|
+
}): Promise<void>;
|
|
795
|
+
}
|
|
796
|
+
/**
|
|
797
|
+
* Storage context for agent tools
|
|
798
|
+
*/
|
|
799
|
+
export interface IAgentStorageContext {
|
|
800
|
+
upload(options: {
|
|
801
|
+
storage: string;
|
|
802
|
+
event: string;
|
|
803
|
+
input: IStorageRequest;
|
|
804
|
+
retries?: number;
|
|
805
|
+
}): Promise<IFileUploadResult>;
|
|
806
|
+
download(options: {
|
|
807
|
+
storage: string;
|
|
808
|
+
event: string;
|
|
809
|
+
input: IStorageRequest;
|
|
810
|
+
}): Promise<IFileDownloadResult>;
|
|
811
|
+
delete(options: {
|
|
812
|
+
storage: string;
|
|
813
|
+
event: string;
|
|
814
|
+
input: {
|
|
815
|
+
file_key: string;
|
|
816
|
+
};
|
|
817
|
+
}): Promise<void>;
|
|
818
|
+
}
|
|
819
|
+
/**
|
|
820
|
+
* Publish context for agent tools
|
|
821
|
+
*/
|
|
822
|
+
export interface IAgentPublishContext {
|
|
823
|
+
send(options: {
|
|
824
|
+
broker: string;
|
|
825
|
+
event: string;
|
|
826
|
+
input: {
|
|
827
|
+
message: Record<string, unknown>;
|
|
828
|
+
};
|
|
829
|
+
retries?: number;
|
|
830
|
+
}): Promise<void>;
|
|
831
|
+
}
|
|
832
|
+
/**
|
|
833
|
+
* Feature context for agent tools
|
|
834
|
+
*/
|
|
835
|
+
export interface IAgentFeatureContext {
|
|
836
|
+
run<T>(options: {
|
|
837
|
+
feature: string;
|
|
838
|
+
input: Record<string, unknown>;
|
|
839
|
+
retries?: number;
|
|
840
|
+
timeout?: number;
|
|
841
|
+
}): Promise<T>;
|
|
842
|
+
}
|
|
843
|
+
/**
|
|
844
|
+
* Quota context for agent resilience operations
|
|
845
|
+
*/
|
|
846
|
+
export interface IAgentQuotaContext {
|
|
847
|
+
/**
|
|
848
|
+
* Run an operation through a quota (weighted load balancing)
|
|
849
|
+
* Distributes requests across providers based on weight
|
|
850
|
+
*/
|
|
851
|
+
run<T>(options: {
|
|
852
|
+
/** Quota tag defined at product level */
|
|
853
|
+
tag: string;
|
|
854
|
+
/** Input to pass to the provider */
|
|
855
|
+
input: Record<string, unknown>;
|
|
856
|
+
/** Session token in format: session_tag:jwt_token */
|
|
857
|
+
session?: string;
|
|
858
|
+
}): Promise<T>;
|
|
859
|
+
/**
|
|
860
|
+
* Get current quota usage/status
|
|
861
|
+
*/
|
|
862
|
+
status(options: {
|
|
863
|
+
/** Quota tag */
|
|
864
|
+
tag: string;
|
|
865
|
+
}): Promise<IAgentQuotaStatus>;
|
|
866
|
+
}
|
|
867
|
+
/**
|
|
868
|
+
* Fallback context for agent resilience operations
|
|
869
|
+
*/
|
|
870
|
+
export interface IAgentFallbackContext {
|
|
871
|
+
/**
|
|
872
|
+
* Run an operation through a fallback chain
|
|
873
|
+
* Tries primary provider first, falls back to alternatives on failure
|
|
874
|
+
*/
|
|
875
|
+
run<T>(options: {
|
|
876
|
+
/** Fallback tag defined at product level */
|
|
877
|
+
tag: string;
|
|
878
|
+
/** Input to pass to the provider */
|
|
879
|
+
input: Record<string, unknown>;
|
|
880
|
+
/** Session token in format: session_tag:jwt_token */
|
|
881
|
+
session?: string;
|
|
882
|
+
}): Promise<T>;
|
|
883
|
+
}
|
|
884
|
+
/**
|
|
885
|
+
* Healthcheck context for agent resilience operations
|
|
886
|
+
*/
|
|
887
|
+
export interface IAgentHealthcheckContext {
|
|
888
|
+
/**
|
|
889
|
+
* Check health status of a provider/service
|
|
890
|
+
*/
|
|
891
|
+
check(options: {
|
|
892
|
+
/** Healthcheck tag defined at product level */
|
|
893
|
+
tag: string;
|
|
894
|
+
/** Environment to check */
|
|
895
|
+
env?: string;
|
|
896
|
+
}): Promise<IAgentHealthcheckResult>;
|
|
897
|
+
/**
|
|
898
|
+
* Get healthcheck status for all configured checks
|
|
899
|
+
*/
|
|
900
|
+
status(): Promise<Record<string, IAgentHealthcheckResult>>;
|
|
901
|
+
}
|
|
902
|
+
/**
|
|
903
|
+
* Resilience context for agent tools
|
|
904
|
+
* Provides access to quota, fallback, and healthcheck operations
|
|
905
|
+
*
|
|
906
|
+
* @example
|
|
907
|
+
* ```typescript
|
|
908
|
+
* // Run through quota
|
|
909
|
+
* const result = await ctx.resilience.quota.run({
|
|
910
|
+
* tag: 'llm-quota',
|
|
911
|
+
* input: { prompt: 'Hello' },
|
|
912
|
+
* });
|
|
913
|
+
*
|
|
914
|
+
* // Run through fallback
|
|
915
|
+
* const result = await ctx.resilience.fallback.run({
|
|
916
|
+
* tag: 'llm-fallback',
|
|
917
|
+
* input: { prompt: 'Hello' },
|
|
918
|
+
* });
|
|
919
|
+
*
|
|
920
|
+
* // Check health
|
|
921
|
+
* const health = await ctx.resilience.healthcheck.check({
|
|
922
|
+
* tag: 'api-health',
|
|
923
|
+
* });
|
|
924
|
+
* ```
|
|
925
|
+
*/
|
|
926
|
+
export interface IAgentResilienceContext {
|
|
927
|
+
/** Quota operations */
|
|
928
|
+
quota: IAgentQuotaContext;
|
|
929
|
+
/** Fallback operations */
|
|
930
|
+
fallback: IAgentFallbackContext;
|
|
931
|
+
/** Healthcheck operations */
|
|
932
|
+
healthcheck: IAgentHealthcheckContext;
|
|
933
|
+
}
|
|
934
|
+
/**
|
|
935
|
+
* Healthcheck result
|
|
936
|
+
*/
|
|
937
|
+
export interface IAgentHealthcheckResult {
|
|
938
|
+
/** Healthcheck tag */
|
|
939
|
+
tag: string;
|
|
940
|
+
/** Current status */
|
|
941
|
+
status: 'healthy' | 'unhealthy' | 'degraded' | 'unknown';
|
|
942
|
+
/** Last check timestamp */
|
|
943
|
+
lastChecked?: number;
|
|
944
|
+
/** Last successful check timestamp */
|
|
945
|
+
lastAvailable?: number;
|
|
946
|
+
/** Latency of last check in ms */
|
|
947
|
+
lastLatency?: number;
|
|
948
|
+
/** Average latency in ms */
|
|
949
|
+
averageLatency?: number;
|
|
950
|
+
/** Error message if unhealthy */
|
|
951
|
+
error?: string;
|
|
952
|
+
}
|
|
953
|
+
/**
|
|
954
|
+
* Quota status
|
|
955
|
+
*/
|
|
956
|
+
export interface IAgentQuotaStatus {
|
|
957
|
+
/** Quota tag */
|
|
958
|
+
tag: string;
|
|
959
|
+
/** Total quota configured */
|
|
960
|
+
totalQuota?: number;
|
|
961
|
+
/** Current usage */
|
|
962
|
+
usedQuota?: number;
|
|
963
|
+
/** Remaining quota */
|
|
964
|
+
remainingQuota?: number;
|
|
965
|
+
/** Provider statuses */
|
|
966
|
+
providers: Array<{
|
|
967
|
+
name: string;
|
|
968
|
+
weight: number;
|
|
969
|
+
uses: number;
|
|
970
|
+
status: 'available' | 'unavailable' | 'degraded';
|
|
971
|
+
healthcheck?: string;
|
|
972
|
+
}>;
|
|
973
|
+
}
|
|
974
|
+
/**
|
|
975
|
+
* File upload result
|
|
976
|
+
*/
|
|
977
|
+
export interface IFileUploadResult {
|
|
978
|
+
file_key: string;
|
|
979
|
+
url?: string;
|
|
980
|
+
size?: number;
|
|
981
|
+
content_type?: string;
|
|
982
|
+
}
|
|
983
|
+
/**
|
|
984
|
+
* File download result
|
|
985
|
+
*/
|
|
986
|
+
export interface IFileDownloadResult {
|
|
987
|
+
content: Buffer | string;
|
|
988
|
+
content_type?: string;
|
|
989
|
+
size?: number;
|
|
990
|
+
}
|
|
991
|
+
/**
|
|
992
|
+
* Options for converting an agent into a tool
|
|
993
|
+
*/
|
|
994
|
+
export interface IAgentAsToolOptions {
|
|
995
|
+
/** Custom tool tag (defaults to agent tag) */
|
|
996
|
+
toolTag?: string;
|
|
997
|
+
/** Custom tool name (defaults to agent name) */
|
|
998
|
+
toolName?: string;
|
|
999
|
+
/** Custom tool description (defaults to agent description) */
|
|
1000
|
+
toolDescription?: string;
|
|
1001
|
+
/** Whether this agent-tool requires confirmation */
|
|
1002
|
+
requiresConfirmation?: boolean;
|
|
1003
|
+
/** Timeout for the agent execution */
|
|
1004
|
+
timeout?: number;
|
|
1005
|
+
/** Number of retries on failure */
|
|
1006
|
+
retries?: number;
|
|
1007
|
+
/** Input parameter overrides (narrow down what parent can pass) */
|
|
1008
|
+
inputSchema?: Record<string, IToolParam>;
|
|
1009
|
+
/** Transform input before passing to agent */
|
|
1010
|
+
inputTransform?: (params: Record<string, unknown>) => Record<string, unknown>;
|
|
1011
|
+
/** Transform agent output before returning to parent */
|
|
1012
|
+
outputTransform?: (result: IAgentExecutionResult) => unknown;
|
|
1013
|
+
/** Whether to include full execution details or just output */
|
|
1014
|
+
includeDetails?: boolean;
|
|
1015
|
+
}
|
|
1016
|
+
/**
|
|
1017
|
+
* Agent tool definition (an agent wrapped as a tool)
|
|
1018
|
+
*/
|
|
1019
|
+
export interface IAgentToolDefinition {
|
|
1020
|
+
/** Agent tag to invoke */
|
|
1021
|
+
agentTag: string;
|
|
1022
|
+
/** Product containing the agent */
|
|
1023
|
+
product: string;
|
|
1024
|
+
/** Environment to run in (inherits from parent if not specified) */
|
|
1025
|
+
env?: string;
|
|
1026
|
+
/** Tool options */
|
|
1027
|
+
options?: IAgentAsToolOptions;
|
|
1028
|
+
}
|
|
1029
|
+
/**
|
|
1030
|
+
* Multi-agent orchestration mode
|
|
1031
|
+
*/
|
|
1032
|
+
export type MultiAgentMode = 'sequential' | 'parallel' | 'hierarchical' | 'collaborative';
|
|
1033
|
+
/**
|
|
1034
|
+
* Agent in a multi-agent workflow
|
|
1035
|
+
*/
|
|
1036
|
+
export interface IMultiAgentMember {
|
|
1037
|
+
/** Agent tag */
|
|
1038
|
+
agent: string;
|
|
1039
|
+
/** Role in the workflow */
|
|
1040
|
+
role?: string;
|
|
1041
|
+
/** Input mapping from orchestrator */
|
|
1042
|
+
inputMapping?: Record<string, string>;
|
|
1043
|
+
/** Condition to include this agent */
|
|
1044
|
+
condition?: string;
|
|
1045
|
+
}
|
|
1046
|
+
/**
|
|
1047
|
+
* Multi-agent workflow definition
|
|
1048
|
+
*/
|
|
1049
|
+
export interface IMultiAgentWorkflow {
|
|
1050
|
+
/** Workflow tag */
|
|
1051
|
+
tag: string;
|
|
1052
|
+
/** Workflow name */
|
|
1053
|
+
name: string;
|
|
1054
|
+
/** Orchestration mode */
|
|
1055
|
+
mode: MultiAgentMode;
|
|
1056
|
+
/** Participating agents */
|
|
1057
|
+
agents: IMultiAgentMember[];
|
|
1058
|
+
/** Orchestrator agent (for hierarchical mode) */
|
|
1059
|
+
orchestrator?: string;
|
|
1060
|
+
/** Final aggregation logic */
|
|
1061
|
+
aggregation?: 'merge' | 'vote' | 'first' | 'custom';
|
|
1062
|
+
/** Custom aggregation handler */
|
|
1063
|
+
aggregationHandler?: (results: IAgentExecutionResult[]) => unknown;
|
|
1064
|
+
}
|
|
1065
|
+
/**
|
|
1066
|
+
* Schedule configuration for dispatched agents
|
|
1067
|
+
*/
|
|
1068
|
+
export interface IAgentSchedule {
|
|
1069
|
+
/** Start time (timestamp or ISO string) */
|
|
1070
|
+
start_at?: number | string;
|
|
1071
|
+
/** Cron expression for recurring */
|
|
1072
|
+
cron?: string;
|
|
1073
|
+
/** Interval in ms for recurring */
|
|
1074
|
+
every?: number;
|
|
1075
|
+
/** Maximum number of executions */
|
|
1076
|
+
limit?: number;
|
|
1077
|
+
/** End date for recurring */
|
|
1078
|
+
endDate?: number | string;
|
|
1079
|
+
/** Timezone */
|
|
1080
|
+
tz?: string;
|
|
1081
|
+
}
|
|
1082
|
+
/**
|
|
1083
|
+
* Options for dispatching an agent
|
|
1084
|
+
*/
|
|
1085
|
+
export interface IDispatchAgentOptions {
|
|
1086
|
+
/** Product tag */
|
|
1087
|
+
product: string;
|
|
1088
|
+
/** Environment slug */
|
|
1089
|
+
env: string;
|
|
1090
|
+
/** Agent tag */
|
|
1091
|
+
agent: string;
|
|
1092
|
+
/** Agent input */
|
|
1093
|
+
input: Record<string, unknown>;
|
|
1094
|
+
/** Schedule configuration */
|
|
1095
|
+
schedule?: IAgentSchedule;
|
|
1096
|
+
/** Session token in format: session_tag:jwt_token */
|
|
1097
|
+
session?: string;
|
|
1098
|
+
/** Cache tag */
|
|
1099
|
+
cache?: string;
|
|
1100
|
+
/** Number of retries */
|
|
1101
|
+
retries?: number;
|
|
1102
|
+
}
|
|
1103
|
+
/**
|
|
1104
|
+
* Dispatch result
|
|
1105
|
+
*/
|
|
1106
|
+
export interface IDispatchAgentResult {
|
|
1107
|
+
/** Job ID */
|
|
1108
|
+
job_id: string;
|
|
1109
|
+
/** Job status */
|
|
1110
|
+
status: 'scheduled' | 'queued' | 'running';
|
|
1111
|
+
/** Scheduled timestamp */
|
|
1112
|
+
scheduled_at?: number;
|
|
1113
|
+
/** Whether this is a recurring job */
|
|
1114
|
+
recurring?: boolean;
|
|
1115
|
+
/** Next run timestamp (for recurring) */
|
|
1116
|
+
next_run_at?: number;
|
|
1117
|
+
}
|
|
1118
|
+
/**
|
|
1119
|
+
* Options for sending a signal to an agent
|
|
1120
|
+
*/
|
|
1121
|
+
export interface ISendAgentSignalOptions {
|
|
1122
|
+
/** Product tag */
|
|
1123
|
+
product: string;
|
|
1124
|
+
/** Environment slug */
|
|
1125
|
+
env: string;
|
|
1126
|
+
/** Execution ID */
|
|
1127
|
+
execution_id: string;
|
|
1128
|
+
/** Signal name */
|
|
1129
|
+
signal: 'stop' | 'pause' | 'resume' | 'approve' | 'reject' | 'input' | string;
|
|
1130
|
+
/** Signal payload */
|
|
1131
|
+
payload?: Record<string, unknown>;
|
|
1132
|
+
}
|
|
1133
|
+
/**
|
|
1134
|
+
* Options for getting agent execution status
|
|
1135
|
+
*/
|
|
1136
|
+
export interface IAgentStatusOptions {
|
|
1137
|
+
/** Product tag */
|
|
1138
|
+
product: string;
|
|
1139
|
+
/** Environment slug */
|
|
1140
|
+
env: string;
|
|
1141
|
+
/** Execution ID */
|
|
1142
|
+
execution_id: string;
|
|
1143
|
+
}
|
|
1144
|
+
/**
|
|
1145
|
+
* Options for listing agent executions
|
|
1146
|
+
*/
|
|
1147
|
+
export interface IListAgentExecutionsOptions {
|
|
1148
|
+
/** Product tag */
|
|
1149
|
+
product: string;
|
|
1150
|
+
/** Environment slug */
|
|
1151
|
+
env: string;
|
|
1152
|
+
/** Agent tag (optional filter) */
|
|
1153
|
+
agent?: string;
|
|
1154
|
+
/** Status filter */
|
|
1155
|
+
status?: AgentStatus | AgentStatus[];
|
|
1156
|
+
/** Start date filter */
|
|
1157
|
+
from?: number | string;
|
|
1158
|
+
/** End date filter */
|
|
1159
|
+
to?: number | string;
|
|
1160
|
+
/** Page number */
|
|
1161
|
+
page?: number;
|
|
1162
|
+
/** Page size */
|
|
1163
|
+
limit?: number;
|
|
1164
|
+
}
|
|
1165
|
+
/**
|
|
1166
|
+
* Agent execution list result
|
|
1167
|
+
*/
|
|
1168
|
+
export interface IAgentExecutionListResult {
|
|
1169
|
+
/** Executions */
|
|
1170
|
+
executions: Array<{
|
|
1171
|
+
execution_id: string;
|
|
1172
|
+
agent_tag: string;
|
|
1173
|
+
status: AgentStatus;
|
|
1174
|
+
startedAt: number;
|
|
1175
|
+
completedAt?: number;
|
|
1176
|
+
iterations: number;
|
|
1177
|
+
usage: ITokenUsage;
|
|
1178
|
+
}>;
|
|
1179
|
+
/** Total count */
|
|
1180
|
+
total: number;
|
|
1181
|
+
/** Current page */
|
|
1182
|
+
page: number;
|
|
1183
|
+
/** Page size */
|
|
1184
|
+
limit: number;
|
|
1185
|
+
}
|
|
1186
|
+
/**
|
|
1187
|
+
* Cost tracking data
|
|
1188
|
+
*/
|
|
1189
|
+
export interface IAgentCostData {
|
|
1190
|
+
/** Execution ID */
|
|
1191
|
+
execution_id: string;
|
|
1192
|
+
/** Token costs */
|
|
1193
|
+
tokenCost: {
|
|
1194
|
+
inputCost: number;
|
|
1195
|
+
outputCost: number;
|
|
1196
|
+
totalCost: number;
|
|
1197
|
+
currency: string;
|
|
1198
|
+
};
|
|
1199
|
+
/** Tool costs (if tracked) */
|
|
1200
|
+
toolCosts?: Record<string, number>;
|
|
1201
|
+
/** Total cost */
|
|
1202
|
+
totalCost: number;
|
|
1203
|
+
}
|
|
1204
|
+
/**
|
|
1205
|
+
* Observability event
|
|
1206
|
+
*/
|
|
1207
|
+
export interface IAgentObservabilityEvent {
|
|
1208
|
+
/** Event ID */
|
|
1209
|
+
id: string;
|
|
1210
|
+
/** Execution ID */
|
|
1211
|
+
execution_id: string;
|
|
1212
|
+
/** Event type */
|
|
1213
|
+
type: string;
|
|
1214
|
+
/** Event timestamp */
|
|
1215
|
+
timestamp: number;
|
|
1216
|
+
/** Event data */
|
|
1217
|
+
data: Record<string, unknown>;
|
|
1218
|
+
/** Span info (for tracing) */
|
|
1219
|
+
span?: {
|
|
1220
|
+
traceId: string;
|
|
1221
|
+
spanId: string;
|
|
1222
|
+
parentSpanId?: string;
|
|
1223
|
+
};
|
|
1224
|
+
}
|
|
1225
|
+
export { IActionRequest, INotificationRequest, IDbActionRequest, IStorageRequest, IFeatureInput, };
|