@ductape/sdk 0.1.25 → 0.1.27

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.
Files changed (152) hide show
  1. package/README.md +83 -52
  2. package/dist/agents/agent-context.d.ts +1 -1
  3. package/dist/agents/agent-context.js +1 -1
  4. package/dist/agents/agent-context.js.map +1 -1
  5. package/dist/agents/agents.service.js +4 -4
  6. package/dist/agents/agents.service.js.map +1 -1
  7. package/dist/agents/types/agents.types.d.ts +6 -6
  8. package/dist/api/services/featureApi.service.d.ts +199 -0
  9. package/dist/api/services/featureApi.service.js +201 -0
  10. package/dist/api/services/featureApi.service.js.map +1 -0
  11. package/dist/api/services/processorApi.service.d.ts +2 -2
  12. package/dist/api/services/processorApi.service.js +1 -1
  13. package/dist/api/services/productsApi.service.d.ts +6 -6
  14. package/dist/api/services/productsApi.service.js +3 -3
  15. package/dist/api/services/productsApi.service.js.map +1 -1
  16. package/dist/api/urls.d.ts +12 -12
  17. package/dist/api/urls.js +22 -22
  18. package/dist/api/urls.js.map +1 -1
  19. package/dist/apps/validators/index.d.ts +5 -1
  20. package/dist/apps/validators/index.js +9 -1
  21. package/dist/apps/validators/index.js.map +1 -1
  22. package/dist/apps/validators/joi-validators/create.appWebhook.validator.d.ts +1 -0
  23. package/dist/apps/validators/joi-validators/create.appWebhook.validator.js +1 -0
  24. package/dist/apps/validators/joi-validators/create.appWebhook.validator.js.map +1 -1
  25. package/dist/apps/validators/joi-validators/create.appWebhookEvent.validator.d.ts +1 -0
  26. package/dist/apps/validators/joi-validators/create.appWebhookEvent.validator.js +1 -0
  27. package/dist/apps/validators/joi-validators/create.appWebhookEvent.validator.js.map +1 -1
  28. package/dist/apps/validators/joi-validators/update.appWebhook.validator.d.ts +1 -0
  29. package/dist/apps/validators/joi-validators/update.appWebhook.validator.js +1 -0
  30. package/dist/apps/validators/joi-validators/update.appWebhook.validator.js.map +1 -1
  31. package/dist/apps/validators/joi-validators/update.appWebhookEvent.validator.d.ts +1 -0
  32. package/dist/apps/validators/joi-validators/update.appWebhookEvent.validator.js +1 -0
  33. package/dist/apps/validators/joi-validators/update.appWebhookEvent.validator.js.map +1 -1
  34. package/dist/brokers/brokers.service.d.ts +2 -2
  35. package/dist/brokers/brokers.service.js +2 -2
  36. package/dist/brokers/brokers.service.js.map +1 -1
  37. package/dist/brokers/types/index.d.ts +1 -1
  38. package/dist/cloud/cloud-database-link.util.js +22 -3
  39. package/dist/cloud/cloud-database-link.util.js.map +1 -1
  40. package/dist/cloud/cloud-service-map.util.js +6 -5
  41. package/dist/cloud/cloud-service-map.util.js.map +1 -1
  42. package/dist/cloud/index.d.ts +1 -1
  43. package/dist/cloud/index.js +3 -1
  44. package/dist/cloud/index.js.map +1 -1
  45. package/dist/cloud/types/cloud.types.d.ts +1 -1
  46. package/dist/cloud/vpc-connector-connect.util.d.ts +11 -2
  47. package/dist/cloud/vpc-connector-connect.util.js +7 -0
  48. package/dist/cloud/vpc-connector-connect.util.js.map +1 -1
  49. package/dist/cloud/vpc-connector-tunnel.client.d.ts +26 -0
  50. package/dist/cloud/vpc-connector-tunnel.client.js +70 -0
  51. package/dist/cloud/vpc-connector-tunnel.client.js.map +1 -1
  52. package/dist/database/adapters/mysql.adapter.js +15 -0
  53. package/dist/database/adapters/mysql.adapter.js.map +1 -1
  54. package/dist/database/adapters/postgresql.adapter.js +11 -55
  55. package/dist/database/adapters/postgresql.adapter.js.map +1 -1
  56. package/dist/database/databases.service.d.ts +3 -3
  57. package/dist/database/databases.service.js +18 -18
  58. package/dist/database/databases.service.js.map +1 -1
  59. package/dist/database/index.d.ts +1 -1
  60. package/dist/database/triggers/trigger-processor.d.ts +7 -7
  61. package/dist/database/triggers/trigger-processor.js +17 -17
  62. package/dist/database/triggers/trigger-processor.js.map +1 -1
  63. package/dist/database/types/connection.interface.d.ts +0 -2
  64. package/dist/database/types/index.d.ts +1 -1
  65. package/dist/database/types/trigger.interface.d.ts +9 -9
  66. package/dist/database/types/trigger.interface.js +3 -3
  67. package/dist/database/types/trigger.interface.js.map +1 -1
  68. package/dist/features/feature-builder.d.ts +70 -0
  69. package/dist/features/feature-builder.js +348 -0
  70. package/dist/features/feature-builder.js.map +1 -0
  71. package/dist/features/feature-executor.d.ts +289 -0
  72. package/dist/features/feature-executor.js +2444 -0
  73. package/dist/features/feature-executor.js.map +1 -0
  74. package/dist/features/features.service.d.ts +412 -0
  75. package/dist/features/features.service.js +2222 -0
  76. package/dist/features/features.service.js.map +1 -0
  77. package/dist/features/index.d.ts +30 -0
  78. package/dist/features/index.js +64 -0
  79. package/dist/features/index.js.map +1 -0
  80. package/dist/features/types/features.types.d.ts +1081 -0
  81. package/dist/features/types/features.types.js +13 -0
  82. package/dist/features/types/features.types.js.map +1 -0
  83. package/dist/features/types/index.d.ts +6 -0
  84. package/dist/features/types/index.js +23 -0
  85. package/dist/features/types/index.js.map +1 -0
  86. package/dist/index.d.ts +35 -48
  87. package/dist/index.js +48 -63
  88. package/dist/index.js.map +1 -1
  89. package/dist/init.interface.d.ts +1 -11
  90. package/dist/inputs/inputs.service.d.ts +4 -4
  91. package/dist/inputs/inputs.service.js.map +1 -1
  92. package/dist/introspect/index.d.ts +31 -0
  93. package/dist/introspect/index.js +168 -0
  94. package/dist/introspect/index.js.map +1 -0
  95. package/dist/jobs/index.d.ts +1 -1
  96. package/dist/jobs/types.d.ts +3 -3
  97. package/dist/logs/logs.service.d.ts +0 -3
  98. package/dist/logs/logs.service.js +1 -4
  99. package/dist/logs/logs.service.js.map +1 -1
  100. package/dist/logs/logs.types.d.ts +4 -7
  101. package/dist/logs/logs.types.js +2 -3
  102. package/dist/logs/logs.types.js.map +1 -1
  103. package/dist/processor/services/processor.service.d.ts +27 -26
  104. package/dist/processor/services/processor.service.js +71 -72
  105. package/dist/processor/services/processor.service.js.map +1 -1
  106. package/dist/processor/utils/processor.utils.d.ts +2 -2
  107. package/dist/processor/utils/processor.utils.js.map +1 -1
  108. package/dist/products/bootstrap-cache.d.ts +2 -2
  109. package/dist/products/bootstrap-cache.js +3 -3
  110. package/dist/products/bootstrap-cache.js.map +1 -1
  111. package/dist/products/services/products.service.d.ts +32 -57
  112. package/dist/products/services/products.service.js +44 -397
  113. package/dist/products/services/products.service.js.map +1 -1
  114. package/dist/products/validators/index.d.ts +1 -3
  115. package/dist/products/validators/index.js +1 -5
  116. package/dist/products/validators/index.js.map +1 -1
  117. package/dist/products/validators/joi-validators/create.productDatabase.validator.js +1 -1
  118. package/dist/products/validators/joi-validators/create.productDatabase.validator.js.map +1 -1
  119. package/dist/products/validators/joi-validators/create.productFeature.validator.d.ts +1 -7
  120. package/dist/products/validators/joi-validators/create.productFeature.validator.js +6 -61
  121. package/dist/products/validators/joi-validators/create.productFeature.validator.js.map +1 -1
  122. package/dist/products/validators/joi-validators/update.productDatabase.validator.js +23 -27
  123. package/dist/products/validators/joi-validators/update.productDatabase.validator.js.map +1 -1
  124. package/dist/resilience/fallback.service.js +19 -41
  125. package/dist/resilience/fallback.service.js.map +1 -1
  126. package/dist/resilience/healthcheck.service.d.ts +5 -5
  127. package/dist/resilience/healthcheck.service.js +26 -26
  128. package/dist/resilience/healthcheck.service.js.map +1 -1
  129. package/dist/resilience/quota.service.js +17 -27
  130. package/dist/resilience/quota.service.js.map +1 -1
  131. package/dist/resilience/resilience-execution.utils.d.ts +2 -2
  132. package/dist/resilience/resilience-execution.utils.js +7 -7
  133. package/dist/resilience/resilience-execution.utils.js.map +1 -1
  134. package/dist/resilience/resilience.service.js +14 -30
  135. package/dist/resilience/resilience.service.js.map +1 -1
  136. package/dist/resilience/types/index.d.ts +20 -23
  137. package/dist/resilience/types/index.js +2 -3
  138. package/dist/resilience/types/index.js.map +1 -1
  139. package/dist/types/enums.d.ts +1 -2
  140. package/dist/types/enums.js +1 -2
  141. package/dist/types/enums.js.map +1 -1
  142. package/dist/types/index.types.d.ts +3 -4
  143. package/dist/types/index.types.js +2 -2
  144. package/dist/types/index.types.js.map +1 -1
  145. package/dist/types/logs.types.d.ts +0 -1
  146. package/dist/types/logs.types.js.map +1 -1
  147. package/dist/types/processor.types.d.ts +11 -13
  148. package/dist/types/processor.types.js.map +1 -1
  149. package/dist/types/productsBuilder.types.d.ts +52 -58
  150. package/dist/types/productsBuilder.types.js +57 -55
  151. package/dist/types/productsBuilder.types.js.map +1 -1
  152. package/package.json +5 -2
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ /**
3
+ * Feature Service Types
4
+ *
5
+ * Type definitions for the Ductape Features code-first API.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.FeatureStatus = exports.FeatureRollbackStrategy = exports.FeatureStepType = void 0;
9
+ const types_1 = require("../../types");
10
+ Object.defineProperty(exports, "FeatureStepType", { enumerable: true, get: function () { return types_1.FeatureStepType; } });
11
+ Object.defineProperty(exports, "FeatureRollbackStrategy", { enumerable: true, get: function () { return types_1.FeatureRollbackStrategy; } });
12
+ Object.defineProperty(exports, "FeatureStatus", { enumerable: true, get: function () { return types_1.FeatureStatus; } });
13
+ //# sourceMappingURL=features.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features.types.js","sourceRoot":"","sources":["../../../src/features/types/features.types.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,uCAiBqB;AAgsCnB,gGAxsCA,uBAAe,OAwsCA;AACf,wGAxsCA,+BAAuB,OAwsCA;AACvB,8FAxsCA,qBAAa,OAwsCA"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Feature Types Index
3
+ *
4
+ * Export all feature-related types
5
+ */
6
+ export * from './features.types';
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ /**
3
+ * Feature Types Index
4
+ *
5
+ * Export all feature-related types
6
+ */
7
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
8
+ if (k2 === undefined) k2 = k;
9
+ var desc = Object.getOwnPropertyDescriptor(m, k);
10
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
11
+ desc = { enumerable: true, get: function() { return m[k]; } };
12
+ }
13
+ Object.defineProperty(o, k2, desc);
14
+ }) : (function(o, m, k, k2) {
15
+ if (k2 === undefined) k2 = k;
16
+ o[k2] = m[k];
17
+ }));
18
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ __exportStar(require("./features.types"), exports);
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/features/types/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;AAEH,mDAAiC"}
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ import { DatabaseService, IActionCreateOptions, IActionUpdateOptions, ISimpleSch
5
5
  import { IConstraintDefinition as IMigrationConstraintDefinition } from './database/types/migration.interface';
6
6
  import { IDBActionDispatchInput } from './types/processor.types';
7
7
  import { IGraphConfig } from './graph';
8
- import { WorkflowService } from './workflows';
8
+ import { FeatureService } from './features';
9
9
  import { IHealthcheckDefineOptions, IDefinedHealthcheck, IQuotaDefineOptions, IDefinedQuota, IFallbackDefineOptions, IDefinedFallback } from './resilience';
10
10
  import { AgentsService } from './agents';
11
11
  import { ModelService } from './models';
@@ -23,7 +23,6 @@ import { CloudService, ICreateCloudConnectionInput, ICloudConnectionSetup, IClou
23
23
  * @property {string} [description] - Optional product description.
24
24
  * @property {Array<IProductApp>} [apps] - Associated apps.
25
25
  * @property {Array<IProductSession>} [sessions] - Product sessions.
26
- * @property {Array<IProductFeature>} [features] - Product features.
27
26
  * @property {Array<IProductQuota>} [quotas] - Product quotas.
28
27
  * @property {Array<IProductFallback>} [fallbacks] - Product fallbacks.
29
28
  * @property {Array<IProductEnv>} [environments] - Product environments.
@@ -66,14 +65,6 @@ import { CloudService, ICreateCloudConnectionInput, ICloudConnectionSetup, IClou
66
65
  * @property {Array<IAppEnv>} [environments] - App environments.
67
66
  * @see ts/src/types/productsBuilder.types.ts
68
67
  */
69
- /**
70
- * @typedef {Object} IProductFeature
71
- * @property {string} tag - Feature tag.
72
- * @property {string} name - Feature name.
73
- * @property {string} [description] - Feature description.
74
- * @property {Array<any>} [actions] - Feature actions.
75
- * @see ts/src/types/productsBuilder.types.ts
76
- */
77
68
  /**
78
69
  * @typedef {Object} IProductQuota
79
70
  * @property {string} tag - Quota tag.
@@ -228,9 +219,9 @@ export type { IGraphEnvConfig, IGraphConfig, IGraphConnectionConfig, IGraphConne
228
219
  export { GraphError } from './graph';
229
220
  export { BaseGraphAdapter, Neo4jAdapter, NeptuneAdapter, ArangoDBAdapter, MemgraphAdapter, GraphAdapterFactory, } from './graph';
230
221
  export type { IAdapterConnectionOptions } from './graph';
231
- export { WorkflowService, WorkflowError, workflowService } from './workflows';
232
- export { WorkflowBuilder, createWorkflow } from './workflows';
233
- export type { IWorkflowServiceConfig, IWorkflowConfig, IWorkflowContext, IWorkflowContextMeta, IDefineWorkflowOptions, IExecuteWorkflowOptions, IWorkflowExecutionResult, IWorkflowDispatchInput, IWorkflowDispatchResult, IWorkflowSchedule, ISendSignalOptions, IQueryWorkflowOptions, IWorkflowActionContext, IWorkflowDatabaseContext, IWorkflowGraphContext, IWorkflowNotificationContext, IWorkflowStorageContext, IWorkflowPublishContext, IWorkflowFeatureContext, IWorkflowQuotaContext, IWorkflowFallbackContext, IWorkflowHealthcheckContext, WorkflowHandler, IStepBuilder, IRollbackBuilder, IWorkflowBuilder, } from './workflows';
222
+ export { FeatureService, FeatureError, featureService } from './features';
223
+ export { FeatureBuilder, createFeature } from './features';
224
+ export type { IFeatureServiceConfig, IFeatureConfig, IFeatureContext, IFeatureContextMeta, IDefineFeatureOptions, IExecuteFeatureOptions, IFeatureExecutionResult, IFeatureDispatchInput, IFeatureDispatchResult, IFeatureSchedule, ISendSignalOptions, IQueryFeatureOptions, IFeatureActionContext, IFeatureDatabaseContext, IFeatureGraphContext, IFeatureNotificationContext, IFeatureStorageContext, IFeaturePublishContext, IFeatureQuotaContext, IFeatureFallbackContext, IFeatureHealthcheckContext, FeatureHandler, IStepBuilder, IRollbackBuilder, IFeatureBuilder, } from './features';
234
225
  export { AgentsService, AgentError, agentsService } from './agents';
235
226
  export { AgentExecutor, AgentContext, ToolRegistry, MemoryManager, createLLMProvider, AnthropicProvider, OpenAIProvider, VectorServiceAdapter, createVectorStoreAdapter, createPineconeAdapter, createQdrantAdapter, createWeaviateAdapter, createMemoryAdapter, } from './agents';
236
227
  export type { IAgentServiceConfig, IDefineAgentOptions, IDefinedAgent, IRunAgentOptions, IAgentExecutionResult, IDispatchAgentOptions, IDispatchAgentResult, ISendAgentSignalOptions, IAgentStatusOptions, IAgentState, IListAgentExecutionsOptions, IAgentExecutionListResult, IAgentTool, IAgentToolSchema, IToolParam, IToolCallResult, ILLMConfig, LLMProvider, IAgentMemoryConfig, IAgentTerminationConfig, IAgentStreamEvent, IAgentToolContext, IConversationMessage, ITokenUsage, AgentStatus, IHumanInLoopConfig, IApprovalRequest, IApprovalResponse, IMultiAgentWorkflow, MultiAgentMode, } from './agents';
@@ -256,6 +247,8 @@ export { SecretsService } from './secrets';
256
247
  export { SECRET_PATTERN, SECRET_PATTERN_GLOBAL, SecretNotFoundError, SecretScopeError, SecretEnvironmentError, SecretExpiredError, SecretRevokedError, SecretResolutionError, isSecretReference, containsSecretReferences, extractSecretKeys, findAllSecretReferences, mightContainSecrets, } from './secrets';
257
248
  export type { SecretTokenType, ICreateSecretInput, IUpdateSecretInput, ISecretMetadata, ISecret, ISecretCheck, IResolveSecretsOptions, ISecretResolutionResult, ISecretsServiceConfig, ISecretsService, } from './secrets';
258
249
  export { CloudService, CloudError, resolveCloudLinkedConfig, resolveCloudLinkedEnvConfig, openVpcConnectorTunnelStream, buildVpcConnectorTunnelAdapterOptions, parseTcpEndpointFromUrl, buildVpcConnectorRelayWebSocketUrl, } from './cloud';
250
+ export { getAssetSchemas } from './introspect';
251
+ export type { AssetSchemaManifest, ModuleSchemas, MethodSchema, FieldDef } from './introspect';
259
252
  export type { CloudProvider, CloudAuthMode, CloudConnectionStatus, CloudConnectionScope, ICloudConnection, ICreateCloudConnectionInput, ICloudConnectionSetup, ICompleteCloudConnectionInput, IValidateCloudConnectionResult, CloudResourceService, ICloudResource, IListCloudResourcesInput, IListCloudResourcesResult, CloudComponentType, IImportCloudResourceInput, IProvisionCloudResourceInput, ICloudComponentDraft, IImportCloudResourceResult, IProvisionCloudResourceResult, ICloudRuntimeCredentialsInput, ICloudRuntimeCredentials, ComponentCloudAuthMode, ICloudLinkedComponentFields, IAwsRegisteredSecurityGroup, IUpdateCloudSecurityGroupsInput, CloudNetworkingMode, IAllowedSourceCidr, IUpdateCloudManagedNetworkingInput, IUpdateCloudVpcConnectorInput, IVpcConnectorConfig, ICloudVpcConnectorStatus, ICloudRuntimeCredentialsNetworking, IResolveCloudHostResult, } from './cloud';
260
253
  export interface IDuctape {
261
254
  }
@@ -276,7 +269,7 @@ export default class Ductape implements IDuctape {
276
269
  private appBuilders;
277
270
  private _databaseService;
278
271
  private _graphService;
279
- private _workflowService;
272
+ private _featureService;
280
273
  private _agentsService;
281
274
  private _modelService;
282
275
  private _vectorService;
@@ -1199,7 +1192,7 @@ export default class Ductape implements IDuctape {
1199
1192
  /**
1200
1193
  * Events-related operations for managing product events (message brokers).
1201
1194
  */
1202
- messaging: {
1195
+ events: {
1203
1196
  /**
1204
1197
  * Creates a message broker for a product.
1205
1198
  * @param {string} product - The product tag.
@@ -2367,39 +2360,33 @@ export default class Ductape implements IDuctape {
2367
2360
  dispatch: (data: any) => Promise<IDispatchResult>;
2368
2361
  };
2369
2362
  /**
2370
- * Workflow API – define, execute, and manage workflows without getService().
2363
+ * Feature API – define, execute, and manage features without getService().
2371
2364
  *
2372
2365
  * @example
2373
- * await ductape.workflow.define({ product: 'my-product', tag: 'orders', name: 'Orders', handler: async (ctx) => { ... } });
2374
- * const result = await ductape.workflow.execute({ product: 'my-product', env: 'prd', tag: 'orders', input: { orderId: '1' } });
2375
- */
2376
- workflow: {
2377
- define: (options: import("./workflows").IDefineWorkflowOptions<unknown, unknown>) => Promise<import("./workflows").IDefinedWorkflow<unknown, unknown>>;
2378
- execute: (options: import("./workflows").IExecuteWorkflowOptions) => Promise<import("./workflows").IWorkflowExecutionResult<unknown>>;
2379
- fetch: (workflowTag: string, productTag?: string) => Promise<import("./workflows").IWorkflowConfig>;
2380
- fetchAll: (productTag?: string) => Promise<import("./workflows").IWorkflowConfig[]>;
2381
- create: (productTag: string, workflowData: Partial<import("./types").IProductWorkflow>) => Promise<void>;
2382
- update: (workflowTag: string, productTag: string, updates: Partial<import("./types").IProductWorkflow>) => Promise<void>;
2383
- delete: (workflowTag: string, productTag: string) => Promise<void>;
2384
- dispatch: (data: import("./workflows").IWorkflowDispatchInput) => Promise<import("./workflows").IWorkflowDispatchResult>;
2385
- signal: (options: import("./workflows").ISendSignalOptions) => Promise<void>;
2386
- query: (options: import("./workflows").IQueryWorkflowOptions) => Promise<unknown>;
2387
- status: (options: import("./workflows").IWorkflowStatusInput) => Promise<import("./workflows").IWorkflowStatus>;
2388
- cancel: (options: import("./workflows").IWorkflowCancelInput) => Promise<import("./workflows").IWorkflowCancelResult>;
2389
- replay: (options: import("./workflows").IWorkflowReplayInput) => Promise<import("./workflows").IWorkflowReplayResult>;
2390
- restart: (options: import("./workflows").IWorkflowRestartInput) => Promise<import("./workflows").IWorkflowRestartResult>;
2391
- resume: (options: import("./workflows").IWorkflowResumeInput) => Promise<import("./workflows").IWorkflowResumeResult>;
2392
- replayFromStep: (options: import("./workflows").IWorkflowReplayFromStepInput) => Promise<import("./workflows").IWorkflowReplayResult>;
2393
- history: (options: import("./workflows").IWorkflowHistoryInput) => Promise<import("./workflows").IWorkflowHistory>;
2394
- stepDetail: (options: import("./workflows").IStepDetailInput) => Promise<import("./workflows").IStepDetail>;
2395
- relatedExecutions: (options: import("./workflows").IRelatedExecutionsInput) => Promise<import("./workflows").IRelatedExecutions>;
2396
- compare: (options: import("./workflows").ICompareExecutionsInput) => Promise<import("./workflows").IExecutionComparison>;
2397
- };
2398
- /**
2399
- * @deprecated Use ductape.workflow.* instead. getService() remains for advanced usage.
2366
+ * await ductape.feature.define({ product: 'my-product', tag: 'orders', name: 'Orders', handler: async (ctx) => { ... } });
2367
+ * const result = await ductape.feature.execute({ product: 'my-product', env: 'prd', tag: 'orders', input: { orderId: '1' } });
2400
2368
  */
2401
- workflows: {
2402
- getService: () => Promise<WorkflowService>;
2369
+ feature: {
2370
+ define: (options: import("./features").IDefineFeatureOptions<unknown, unknown>) => Promise<import("./features").IDefinedFeature<unknown, unknown>>;
2371
+ execute: (options: import("./features").IExecuteFeatureOptions) => Promise<import("./features").IFeatureExecutionResult<unknown>>;
2372
+ fetch: (featureTag: string, productTag?: string) => Promise<import("./features").IFeatureConfig>;
2373
+ fetchAll: (productTag?: string) => Promise<import("./features").IFeatureConfig[]>;
2374
+ create: (productTag: string, featureData: Partial<import("./types").IProductFeature>) => Promise<void>;
2375
+ update: (featureTag: string, productTag: string, updates: Partial<import("./types").IProductFeature>) => Promise<void>;
2376
+ delete: (featureTag: string, productTag: string) => Promise<void>;
2377
+ dispatch: (data: import("./features").IFeatureDispatchInput) => Promise<import("./features").IFeatureDispatchResult>;
2378
+ signal: (options: import("./features").ISendSignalOptions) => Promise<void>;
2379
+ query: (options: import("./features").IQueryFeatureOptions) => Promise<unknown>;
2380
+ status: (options: import("./features").IFeatureStatusInput) => Promise<import("./features").IFeatureStatus>;
2381
+ cancel: (options: import("./features").IFeatureCancelInput) => Promise<import("./features").IFeatureCancelResult>;
2382
+ replay: (options: import("./features").IFeatureReplayInput) => Promise<import("./features").IFeatureReplayResult>;
2383
+ restart: (options: import("./features").IFeatureRestartInput) => Promise<import("./features").IFeatureRestartResult>;
2384
+ resume: (options: import("./features").IFeatureResumeInput) => Promise<import("./features").IFeatureResumeResult>;
2385
+ replayFromStep: (options: import("./features").IFeatureReplayFromStepInput) => Promise<import("./features").IFeatureReplayResult>;
2386
+ history: (options: import("./features").IFeatureHistoryInput) => Promise<import("./features").IFeatureHistory>;
2387
+ stepDetail: (options: import("./features").IStepDetailInput) => Promise<import("./features").IStepDetail>;
2388
+ relatedExecutions: (options: import("./features").IRelatedExecutionsInput) => Promise<import("./features").IRelatedExecutions>;
2389
+ compare: (options: import("./features").ICompareExecutionsInput) => Promise<import("./features").IExecutionComparison>;
2403
2390
  };
2404
2391
  /**
2405
2392
  * Agents service for building and executing AI-driven agentic workflows.
@@ -4215,10 +4202,10 @@ export default class Ductape implements IDuctape {
4215
4202
  */
4216
4203
  private createNewGraphService;
4217
4204
  /**
4218
- * Create a new WorkflowService instance with authenticated config
4219
- * @returns WorkflowService instance
4205
+ * Create a new FeatureService instance with authenticated config
4206
+ * @returns FeatureService instance
4220
4207
  */
4221
- private createNewWorkflowService;
4208
+ private createNewFeatureService;
4222
4209
  /**
4223
4210
  * Create a new AgentsService instance with authenticated config
4224
4211
  * @returns AgentsService instance
package/dist/index.js CHANGED
@@ -47,9 +47,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
47
47
  return (mod && mod.__esModule) ? mod : { "default": mod };
48
48
  };
49
49
  Object.defineProperty(exports, "__esModule", { value: true });
50
- exports.cacheLogger = exports.CacheError = exports.CacheService = exports.SessionError = exports.SessionsService = exports.generateSignedUrl = exports.listBlobsInCloud = exports.deleteBlobFromCloud = exports.downloadBlobFromCloud = exports.uploadBlobToCloud = exports.StorageError = exports.StorageService = exports.createMemoryAdapter = exports.createWeaviateAdapter = exports.createQdrantAdapter = exports.createPineconeAdapter = exports.createVectorStoreAdapter = exports.VectorServiceAdapter = exports.OpenAIProvider = exports.AnthropicProvider = exports.createLLMProvider = exports.MemoryManager = exports.ToolRegistry = exports.AgentContext = exports.AgentExecutor = exports.agentsService = exports.AgentError = exports.AgentsService = exports.createWorkflow = exports.WorkflowBuilder = exports.workflowService = exports.WorkflowError = exports.WorkflowService = exports.GraphAdapterFactory = exports.MemgraphAdapter = exports.ArangoDBAdapter = exports.NeptuneAdapter = exports.Neo4jAdapter = exports.BaseGraphAdapter = exports.GraphError = exports.GraphSortOrder = exports.GraphFeature = exports.GraphErrorType = exports.GraphTransactionStatus = exports.GraphIsolationLevel = exports.NodeConstraintType = exports.NodeIndexType = exports.TraversalDirection = exports.GraphType = exports.GraphService = void 0;
50
+ exports.cacheLogger = exports.CacheError = exports.CacheService = exports.SessionError = exports.SessionsService = exports.generateSignedUrl = exports.listBlobsInCloud = exports.deleteBlobFromCloud = exports.downloadBlobFromCloud = exports.uploadBlobToCloud = exports.StorageError = exports.StorageService = exports.createMemoryAdapter = exports.createWeaviateAdapter = exports.createQdrantAdapter = exports.createPineconeAdapter = exports.createVectorStoreAdapter = exports.VectorServiceAdapter = exports.OpenAIProvider = exports.AnthropicProvider = exports.createLLMProvider = exports.MemoryManager = exports.ToolRegistry = exports.AgentContext = exports.AgentExecutor = exports.agentsService = exports.AgentError = exports.AgentsService = exports.createFeature = exports.FeatureBuilder = exports.featureService = exports.FeatureError = exports.FeatureService = exports.GraphAdapterFactory = exports.MemgraphAdapter = exports.ArangoDBAdapter = exports.NeptuneAdapter = exports.Neo4jAdapter = exports.BaseGraphAdapter = exports.GraphError = exports.GraphSortOrder = exports.GraphFeature = exports.GraphErrorType = exports.GraphTransactionStatus = exports.GraphIsolationLevel = exports.NodeConstraintType = exports.NodeIndexType = exports.TraversalDirection = exports.GraphType = exports.GraphService = void 0;
51
51
  exports.parseTcpEndpointFromUrl = exports.buildVpcConnectorTunnelAdapterOptions = exports.openVpcConnectorTunnelStream = exports.resolveCloudLinkedEnvConfig = exports.resolveCloudLinkedConfig = exports.CloudError = exports.CloudService = exports.mightContainSecrets = exports.findAllSecretReferences = exports.extractSecretKeys = exports.containsSecretReferences = exports.isSecretReference = exports.SecretResolutionError = exports.SecretRevokedError = exports.SecretExpiredError = exports.SecretEnvironmentError = exports.SecretScopeError = exports.SecretNotFoundError = exports.SECRET_PATTERN_GLOBAL = exports.SECRET_PATTERN = exports.SecretsService = exports.VectorFeature = exports.VectorErrorType = exports.VectorIndexType = exports.DistanceMetric = exports.VectorDBType = exports.MemoryAdapter = exports.WeaviateAdapter = exports.QdrantAdapter = exports.PineconeAdapter = exports.BaseVectorAdapter = exports.VectorError = exports.VectorDatabaseService = exports.SmsProvider = exports.PushNotificationProvider = exports.NotificationChannelType = exports.notificationsService = exports.NotificationsService = exports.getSqsQueueUrl = exports.isValidSqsUrl = exports.parseEventString = exports.loadBrokerService = exports.GooglePubSubService = exports.RedisService = exports.SQSService = exports.KafkaService = exports.RabbitMQService = exports.BrokerError = exports.BrokersService = exports.CacheLogger = void 0;
52
- exports.buildVpcConnectorRelayWebSocketUrl = void 0;
52
+ exports.getAssetSchemas = exports.buildVpcConnectorRelayWebSocketUrl = void 0;
53
53
  const appApi_service_1 = require("./api/services/appApi.service");
54
54
  const userApi_service_1 = require("./api/services/userApi.service");
55
55
  const workspaceApi_service_1 = require("./api/services/workspaceApi.service");
@@ -68,7 +68,7 @@ const logs_service_1 = __importDefault(require("./logs/logs.service"));
68
68
  const mime = __importStar(require("mime-types"));
69
69
  const database_1 = require("./database");
70
70
  const graph_1 = require("./graph");
71
- const workflows_1 = require("./workflows");
71
+ const features_1 = require("./features");
72
72
  const storage_1 = require("./storage");
73
73
  const sessions_1 = require("./sessions");
74
74
  const brokers_1 = require("./brokers");
@@ -91,7 +91,6 @@ const cloud_1 = require("./cloud");
91
91
  * @property {string} [description] - Optional product description.
92
92
  * @property {Array<IProductApp>} [apps] - Associated apps.
93
93
  * @property {Array<IProductSession>} [sessions] - Product sessions.
94
- * @property {Array<IProductFeature>} [features] - Product features.
95
94
  * @property {Array<IProductQuota>} [quotas] - Product quotas.
96
95
  * @property {Array<IProductFallback>} [fallbacks] - Product fallbacks.
97
96
  * @property {Array<IProductEnv>} [environments] - Product environments.
@@ -134,14 +133,6 @@ const cloud_1 = require("./cloud");
134
133
  * @property {Array<IAppEnv>} [environments] - App environments.
135
134
  * @see ts/src/types/productsBuilder.types.ts
136
135
  */
137
- /**
138
- * @typedef {Object} IProductFeature
139
- * @property {string} tag - Feature tag.
140
- * @property {string} name - Feature name.
141
- * @property {string} [description] - Feature description.
142
- * @property {Array<any>} [actions] - Feature actions.
143
- * @see ts/src/types/productsBuilder.types.ts
144
- */
145
136
  /**
146
137
  * @typedef {Object} IProductQuota
147
138
  * @property {string} tag - Quota tag.
@@ -313,14 +304,14 @@ Object.defineProperty(exports, "NeptuneAdapter", { enumerable: true, get: functi
313
304
  Object.defineProperty(exports, "ArangoDBAdapter", { enumerable: true, get: function () { return graph_5.ArangoDBAdapter; } });
314
305
  Object.defineProperty(exports, "MemgraphAdapter", { enumerable: true, get: function () { return graph_5.MemgraphAdapter; } });
315
306
  Object.defineProperty(exports, "GraphAdapterFactory", { enumerable: true, get: function () { return graph_5.GraphAdapterFactory; } });
316
- // Re-export Workflow module types and classes
317
- var workflows_2 = require("./workflows");
318
- Object.defineProperty(exports, "WorkflowService", { enumerable: true, get: function () { return workflows_2.WorkflowService; } });
319
- Object.defineProperty(exports, "WorkflowError", { enumerable: true, get: function () { return workflows_2.WorkflowError; } });
320
- Object.defineProperty(exports, "workflowService", { enumerable: true, get: function () { return workflows_2.workflowService; } });
321
- var workflows_3 = require("./workflows");
322
- Object.defineProperty(exports, "WorkflowBuilder", { enumerable: true, get: function () { return workflows_3.WorkflowBuilder; } });
323
- Object.defineProperty(exports, "createWorkflow", { enumerable: true, get: function () { return workflows_3.createWorkflow; } });
307
+ // Re-export Feature module types and classes
308
+ var features_2 = require("./features");
309
+ Object.defineProperty(exports, "FeatureService", { enumerable: true, get: function () { return features_2.FeatureService; } });
310
+ Object.defineProperty(exports, "FeatureError", { enumerable: true, get: function () { return features_2.FeatureError; } });
311
+ Object.defineProperty(exports, "featureService", { enumerable: true, get: function () { return features_2.featureService; } });
312
+ var features_3 = require("./features");
313
+ Object.defineProperty(exports, "FeatureBuilder", { enumerable: true, get: function () { return features_3.FeatureBuilder; } });
314
+ Object.defineProperty(exports, "createFeature", { enumerable: true, get: function () { return features_3.createFeature; } });
324
315
  // Re-export Agents module types and classes
325
316
  var agents_2 = require("./agents");
326
317
  Object.defineProperty(exports, "AgentsService", { enumerable: true, get: function () { return agents_2.AgentsService; } });
@@ -425,6 +416,8 @@ Object.defineProperty(exports, "openVpcConnectorTunnelStream", { enumerable: tru
425
416
  Object.defineProperty(exports, "buildVpcConnectorTunnelAdapterOptions", { enumerable: true, get: function () { return cloud_2.buildVpcConnectorTunnelAdapterOptions; } });
426
417
  Object.defineProperty(exports, "parseTcpEndpointFromUrl", { enumerable: true, get: function () { return cloud_2.parseTcpEndpointFromUrl; } });
427
418
  Object.defineProperty(exports, "buildVpcConnectorRelayWebSocketUrl", { enumerable: true, get: function () { return cloud_2.buildVpcConnectorRelayWebSocketUrl; } });
419
+ var introspect_1 = require("./introspect");
420
+ Object.defineProperty(exports, "getAssetSchemas", { enumerable: true, get: function () { return introspect_1.getAssetSchemas; } });
428
421
  class Ductape {
429
422
  async loadRedis() {
430
423
  if (typeof window !== 'undefined') {
@@ -470,7 +463,7 @@ class Ductape {
470
463
  // Cached service instances (lazily initialized after auth)
471
464
  this._databaseService = null;
472
465
  this._graphService = null;
473
- this._workflowService = null;
466
+ this._featureService = null;
474
467
  this._agentsService = null;
475
468
  this._modelService = null;
476
469
  this._vectorService = null;
@@ -1475,7 +1468,7 @@ class Ductape {
1475
1468
  /**
1476
1469
  * Events-related operations for managing product events (message brokers).
1477
1470
  */
1478
- this.messaging = {
1471
+ this.events = {
1479
1472
  /**
1480
1473
  * Creates a message broker for a product.
1481
1474
  * @param {string} product - The product tag.
@@ -3140,102 +3133,94 @@ class Ductape {
3140
3133
  },
3141
3134
  };
3142
3135
  /**
3143
- * Workflow API – define, execute, and manage workflows without getService().
3136
+ * Feature API – define, execute, and manage features without getService().
3144
3137
  *
3145
3138
  * @example
3146
- * await ductape.workflow.define({ product: 'my-product', tag: 'orders', name: 'Orders', handler: async (ctx) => { ... } });
3147
- * const result = await ductape.workflow.execute({ product: 'my-product', env: 'prd', tag: 'orders', input: { orderId: '1' } });
3139
+ * await ductape.feature.define({ product: 'my-product', tag: 'orders', name: 'Orders', handler: async (ctx) => { ... } });
3140
+ * const result = await ductape.feature.execute({ product: 'my-product', env: 'prd', tag: 'orders', input: { orderId: '1' } });
3148
3141
  */
3149
- this.workflow = {
3142
+ this.feature = {
3150
3143
  define: async (...args) => {
3151
- const svc = await this.createNewWorkflowService();
3144
+ const svc = await this.createNewFeatureService();
3152
3145
  return svc.define(...args);
3153
3146
  },
3154
3147
  execute: async (...args) => {
3155
- const svc = await this.createNewWorkflowService();
3148
+ const svc = await this.createNewFeatureService();
3156
3149
  return svc.execute(...args);
3157
3150
  },
3158
3151
  fetch: async (...args) => {
3159
- const svc = await this.createNewWorkflowService();
3152
+ const svc = await this.createNewFeatureService();
3160
3153
  return svc.fetch(...args);
3161
3154
  },
3162
3155
  fetchAll: async (...args) => {
3163
- const svc = await this.createNewWorkflowService();
3156
+ const svc = await this.createNewFeatureService();
3164
3157
  return svc.fetchAll(...args);
3165
3158
  },
3166
3159
  create: async (...args) => {
3167
- const svc = await this.createNewWorkflowService();
3160
+ const svc = await this.createNewFeatureService();
3168
3161
  return svc.create(...args);
3169
3162
  },
3170
3163
  update: async (...args) => {
3171
- const svc = await this.createNewWorkflowService();
3164
+ const svc = await this.createNewFeatureService();
3172
3165
  return svc.update(...args);
3173
3166
  },
3174
3167
  delete: async (...args) => {
3175
- const svc = await this.createNewWorkflowService();
3168
+ const svc = await this.createNewFeatureService();
3176
3169
  return svc.delete(...args);
3177
3170
  },
3178
3171
  dispatch: async (...args) => {
3179
- const svc = await this.createNewWorkflowService();
3172
+ const svc = await this.createNewFeatureService();
3180
3173
  return svc.dispatch(...args);
3181
3174
  },
3182
3175
  signal: async (...args) => {
3183
- const svc = await this.createNewWorkflowService();
3176
+ const svc = await this.createNewFeatureService();
3184
3177
  return svc.signal(...args);
3185
3178
  },
3186
3179
  query: async (...args) => {
3187
- const svc = await this.createNewWorkflowService();
3180
+ const svc = await this.createNewFeatureService();
3188
3181
  return svc.query(...args);
3189
3182
  },
3190
3183
  status: async (...args) => {
3191
- const svc = await this.createNewWorkflowService();
3184
+ const svc = await this.createNewFeatureService();
3192
3185
  return svc.status(...args);
3193
3186
  },
3194
3187
  cancel: async (...args) => {
3195
- const svc = await this.createNewWorkflowService();
3188
+ const svc = await this.createNewFeatureService();
3196
3189
  return svc.cancel(...args);
3197
3190
  },
3198
3191
  replay: async (...args) => {
3199
- const svc = await this.createNewWorkflowService();
3192
+ const svc = await this.createNewFeatureService();
3200
3193
  return svc.replay(...args);
3201
3194
  },
3202
3195
  restart: async (...args) => {
3203
- const svc = await this.createNewWorkflowService();
3196
+ const svc = await this.createNewFeatureService();
3204
3197
  return svc.restart(...args);
3205
3198
  },
3206
3199
  resume: async (...args) => {
3207
- const svc = await this.createNewWorkflowService();
3200
+ const svc = await this.createNewFeatureService();
3208
3201
  return svc.resume(...args);
3209
3202
  },
3210
3203
  replayFromStep: async (...args) => {
3211
- const svc = await this.createNewWorkflowService();
3204
+ const svc = await this.createNewFeatureService();
3212
3205
  return svc.replayFromStep(...args);
3213
3206
  },
3214
3207
  history: async (...args) => {
3215
- const svc = await this.createNewWorkflowService();
3208
+ const svc = await this.createNewFeatureService();
3216
3209
  return svc.history(...args);
3217
3210
  },
3218
3211
  stepDetail: async (...args) => {
3219
- const svc = await this.createNewWorkflowService();
3212
+ const svc = await this.createNewFeatureService();
3220
3213
  return svc.stepDetail(...args);
3221
3214
  },
3222
3215
  relatedExecutions: async (...args) => {
3223
- const svc = await this.createNewWorkflowService();
3216
+ const svc = await this.createNewFeatureService();
3224
3217
  return svc.relatedExecutions(...args);
3225
3218
  },
3226
3219
  compare: async (...args) => {
3227
- const svc = await this.createNewWorkflowService();
3220
+ const svc = await this.createNewFeatureService();
3228
3221
  return svc.compare(...args);
3229
3222
  },
3230
3223
  };
3231
- /**
3232
- * @deprecated Use ductape.workflow.* instead. getService() remains for advanced usage.
3233
- */
3234
- this.workflows = {
3235
- getService: async () => {
3236
- return this.createNewWorkflowService();
3237
- },
3238
- };
3239
3224
  /**
3240
3225
  * Agents service for building and executing AI-driven agentic workflows.
3241
3226
  *
@@ -5218,7 +5203,7 @@ class Ductape {
5218
5203
  this.clientLanguage = (language === null || language === void 0 ? void 0 : language.trim()) || undefined;
5219
5204
  this.environment =
5220
5205
  local === true
5221
- ? index_types_1.EnvType.LOCAL
5206
+ ? index_types_1.EnvType.SELF
5222
5207
  : local === false
5223
5208
  ? index_types_1.EnvType.PRODUCTION
5224
5209
  : (0, index_types_1.apiEnvironmentFromProcess)();
@@ -5602,18 +5587,18 @@ class Ductape {
5602
5587
  return this._graphService;
5603
5588
  }
5604
5589
  /**
5605
- * Create a new WorkflowService instance with authenticated config
5606
- * @returns WorkflowService instance
5590
+ * Create a new FeatureService instance with authenticated config
5591
+ * @returns FeatureService instance
5607
5592
  */
5608
- async createNewWorkflowService() {
5593
+ async createNewFeatureService() {
5609
5594
  const subCheck = false;
5610
5595
  await this.initUserAuth(subCheck);
5611
- // Ensure secrets service is initialized so workflow steps can resolve $Secret{...} / $secret{...} in configs (broker, storage, etc.)
5596
+ // Ensure secrets service is initialized so feature steps can resolve $Secret{...} / $secret{...} in configs (broker, storage, etc.)
5612
5597
  await this.createNewSecretsService();
5613
- if (!this._workflowService) {
5614
- this._workflowService = new workflows_1.WorkflowService(Object.assign(Object.assign({}, this.builderInit()), { private_key: this._privateKey }));
5598
+ if (!this._featureService) {
5599
+ this._featureService = new features_1.FeatureService(Object.assign(Object.assign({}, this.builderInit()), { private_key: this._privateKey }));
5615
5600
  }
5616
- return this._workflowService;
5601
+ return this._featureService;
5617
5602
  }
5618
5603
  /**
5619
5604
  * Create a new AgentsService instance with authenticated config
@@ -5845,7 +5830,7 @@ class Ductape {
5845
5830
  const subCheck = false;
5846
5831
  await this.initUserAuth(subCheck);
5847
5832
  // Ensure secrets service is initialized and set globally so probe services
5848
- // (DatabaseService, StorageService, WorkflowService, etc.) can resolve $secret{...}
5833
+ // (DatabaseService, StorageService, FeatureService, etc.) can resolve $secret{...}
5849
5834
  await this.createNewSecretsService();
5850
5835
  if (!this._healthcheckService) {
5851
5836
  this._healthcheckService = new resilience_1.HealthcheckService(Object.assign(Object.assign(Object.assign({}, this.builderInit()), { redis_client: this.redisClient, queues: { health: this.healthCheckQueue, jobs: this.jobsQueue }, private_key: this._privateKey }), this.runtimeDefaultsForServices()));