@loopstack/core 0.4.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/dist/config-provider.service.d.ts +2 -0
- package/dist/config-provider.service.js +16 -6
- package/dist/config-provider.service.js.map +1 -1
- package/dist/loop-core.module.js +16 -1
- package/dist/loop-core.module.js.map +1 -1
- package/dist/modules/common/services/context.service.js +1 -2
- package/dist/modules/common/services/context.service.js.map +1 -1
- package/dist/modules/configuration/services/configuration.service.d.ts +8 -6
- package/dist/modules/configuration/services/configuration.service.js +18 -11
- package/dist/modules/configuration/services/configuration.service.js.map +1 -1
- package/dist/modules/configuration/services/dynamic-schema-generator.service.js +1 -4
- package/dist/modules/configuration/services/dynamic-schema-generator.service.js.map +1 -1
- package/dist/modules/persistence/handlers/create-entity.handler.d.ts +2 -2
- package/dist/modules/persistence/handlers/sql-query.handler.js +1 -4
- package/dist/modules/persistence/handlers/sql-query.handler.js.map +1 -1
- package/dist/modules/persistence/services/namespace.service.d.ts +0 -2
- package/dist/modules/persistence/services/namespace.service.js +2 -33
- package/dist/modules/persistence/services/namespace.service.js.map +1 -1
- package/dist/modules/persistence/services/pipeline.service.d.ts +3 -1
- package/dist/modules/persistence/services/pipeline.service.js +12 -0
- package/dist/modules/persistence/services/pipeline.service.js.map +1 -1
- package/dist/modules/persistence/services/workflow.service.d.ts +1 -1
- package/dist/modules/persistence/services/workflow.service.js +3 -3
- package/dist/modules/persistence/services/workflow.service.js.map +1 -1
- package/dist/modules/persistence/services/workspace.service.d.ts +4 -2
- package/dist/modules/persistence/services/workspace.service.js +17 -5
- package/dist/modules/persistence/services/workspace.service.js.map +1 -1
- package/dist/modules/scheduler/index.d.ts +2 -0
- package/dist/modules/scheduler/index.js +19 -0
- package/dist/modules/scheduler/index.js.map +1 -0
- package/dist/modules/scheduler/scheduler.module.js +38 -14
- package/dist/modules/scheduler/scheduler.module.js.map +1 -1
- package/dist/modules/scheduler/services/index.d.ts +1 -0
- package/dist/modules/scheduler/services/index.js +18 -0
- package/dist/modules/scheduler/services/index.js.map +1 -0
- package/dist/modules/scheduler/services/task-initialization.service.d.ts +15 -0
- package/dist/modules/scheduler/services/task-initialization.service.js +94 -0
- package/dist/modules/scheduler/services/task-initialization.service.js.map +1 -0
- package/dist/modules/scheduler/services/task-processor/cleanup-pipeline-task-processor.service.d.ts +12 -0
- package/dist/modules/scheduler/services/task-processor/cleanup-pipeline-task-processor.service.js +83 -0
- package/dist/modules/scheduler/services/task-processor/cleanup-pipeline-task-processor.service.js.map +1 -0
- package/dist/modules/scheduler/services/task-processor/create-run-pipeline-task-processor.service.d.ts +12 -0
- package/dist/modules/scheduler/services/task-processor/create-run-pipeline-task-processor.service.js +53 -0
- package/dist/modules/scheduler/services/task-processor/create-run-pipeline-task-processor.service.js.map +1 -0
- package/dist/modules/scheduler/services/task-processor/create-workspace-task-processor.service.d.ts +11 -0
- package/dist/modules/scheduler/services/task-processor/create-workspace-task-processor.service.js +52 -0
- package/dist/modules/scheduler/services/task-processor/create-workspace-task-processor.service.js.map +1 -0
- package/dist/modules/scheduler/services/task-processor/run-pipeline-task-processor.service.d.ts +10 -0
- package/dist/modules/scheduler/services/task-processor/run-pipeline-task-processor.service.js +40 -0
- package/dist/modules/scheduler/services/task-processor/run-pipeline-task-processor.service.js.map +1 -0
- package/dist/modules/scheduler/services/task-processor.service.d.ts +25 -0
- package/dist/modules/scheduler/services/task-processor.service.js +127 -0
- package/dist/modules/scheduler/services/task-processor.service.js.map +1 -0
- package/dist/modules/scheduler/services/task-scheduler.service.d.ts +7 -19
- package/dist/modules/scheduler/services/task-scheduler.service.js +26 -166
- package/dist/modules/scheduler/services/task-scheduler.service.js.map +1 -1
- package/dist/modules/workflow-processor/handlers/add-namespace.handler.js +0 -1
- package/dist/modules/workflow-processor/handlers/add-namespace.handler.js.map +1 -1
- package/dist/modules/workflow-processor/handlers/batch-create-documents.handler.d.ts +2 -2
- package/dist/modules/workflow-processor/handlers/batch-create-documents.handler.js +2 -1
- package/dist/modules/workflow-processor/handlers/batch-create-documents.handler.js.map +1 -1
- package/dist/modules/workflow-processor/handlers/create-document.handler.d.ts +13 -13
- package/dist/modules/workflow-processor/handlers/create-document.handler.js +2 -1
- package/dist/modules/workflow-processor/handlers/create-document.handler.js.map +1 -1
- package/dist/modules/workflow-processor/handlers/load-document.handler.d.ts +42 -7
- package/dist/modules/workflow-processor/handlers/update-document.handler.d.ts +13 -13
- package/dist/modules/workflow-processor/handlers/update-document.handler.js +1 -1
- package/dist/modules/workflow-processor/handlers/update-document.handler.js.map +1 -1
- package/dist/modules/workflow-processor/services/create-pipeline.service.d.ts +9 -0
- package/dist/modules/workflow-processor/services/create-pipeline.service.js +36 -0
- package/dist/modules/workflow-processor/services/create-pipeline.service.js.map +1 -0
- package/dist/modules/workflow-processor/services/handler-execution.service.js +1 -2
- package/dist/modules/workflow-processor/services/handler-execution.service.js.map +1 -1
- package/dist/modules/workflow-processor/services/index.d.ts +1 -0
- package/dist/modules/workflow-processor/services/index.js +1 -0
- package/dist/modules/workflow-processor/services/index.js.map +1 -1
- package/dist/modules/workflow-processor/services/namespace-processor.service.d.ts +0 -1
- package/dist/modules/workflow-processor/services/namespace-processor.service.js +0 -2
- package/dist/modules/workflow-processor/services/namespace-processor.service.js.map +1 -1
- package/dist/modules/workflow-processor/services/pipeline-processor.service.d.ts +1 -1
- package/dist/modules/workflow-processor/services/pipeline-processor.service.js +19 -5
- package/dist/modules/workflow-processor/services/pipeline-processor.service.js.map +1 -1
- package/dist/modules/workflow-processor/services/root-processor.service.d.ts +5 -3
- package/dist/modules/workflow-processor/services/root-processor.service.js +20 -3
- package/dist/modules/workflow-processor/services/root-processor.service.js.map +1 -1
- package/dist/modules/workflow-processor/services/state-machine-config.service.js +6 -6
- package/dist/modules/workflow-processor/services/state-machine-config.service.js.map +1 -1
- package/dist/modules/workflow-processor/services/state-machine-processor.service.js +2 -2
- package/dist/modules/workflow-processor/services/state-machine-processor.service.js.map +1 -1
- package/dist/modules/workflow-processor/services/tool-execution.service.js +2 -2
- package/dist/modules/workflow-processor/services/tool-execution.service.js.map +1 -1
- package/dist/modules/workflow-processor/services/workflow-processor.service.js +1 -1
- package/dist/modules/workflow-processor/services/workflow-processor.service.js.map +1 -1
- package/dist/modules/workflow-processor/services/workflow-state.service.js +2 -2
- package/dist/modules/workflow-processor/services/workflow-state.service.js.map +1 -1
- package/dist/modules/workflow-processor/workflow-processor.module.js +3 -0
- package/dist/modules/workflow-processor/workflow-processor.module.js.map +1 -1
- package/package.json +4 -2
- package/dist/modules/scheduler/entities/scheduled-task.entity.d.ts +0 -30
- package/dist/modules/scheduler/entities/scheduled-task.entity.js +0 -128
- package/dist/modules/scheduler/entities/scheduled-task.entity.js.map +0 -1
- package/dist/modules/scheduler/events/task-execution.event.d.ts +0 -8
- package/dist/modules/scheduler/events/task-execution.event.js +0 -19
- package/dist/modules/scheduler/events/task-execution.event.js.map +0 -1
- package/dist/modules/scheduler/handler/create-task-schedule.handler.d.ts +0 -55
- package/dist/modules/scheduler/handler/create-task-schedule.handler.js +0 -121
- package/dist/modules/scheduler/handler/create-task-schedule.handler.js.map +0 -1
- package/dist/modules/scheduler/handler/remove-task-schedule.handler.d.ts +0 -17
- package/dist/modules/scheduler/handler/remove-task-schedule.handler.js +0 -48
- package/dist/modules/scheduler/handler/remove-task-schedule.handler.js.map +0 -1
- package/dist/modules/scheduler/interfaces/create-task-schedule.interface.d.ts +0 -11
- package/dist/modules/scheduler/interfaces/create-task-schedule.interface.js +0 -3
- package/dist/modules/scheduler/interfaces/create-task-schedule.interface.js.map +0 -1
- package/dist/modules/scheduler/schemas/task.schema.d.ts +0 -3
- package/dist/modules/scheduler/schemas/task.schema.js +0 -30
- package/dist/modules/scheduler/schemas/task.schema.js.map +0 -1
- package/dist/modules/scheduler/services/task-execution.listener.d.ts +0 -5
- package/dist/modules/scheduler/services/task-execution.listener.js +0 -40
- package/dist/modules/scheduler/services/task-execution.listener.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-machine-processor.service.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/services/state-machine-processor.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8CAe2B;AAC3B,qEAAgE;AAChE,mDAAoD;AACpD,yFAAmF;AAEnF,8FAAwF;AACxF,mGAA6F;AAC7F,mCAA8B;AAC9B,yEAAoE;AACpE,6BAAwB;AAExB,MAAM,2BAA2B,GAAG,OAAC,CAAC,KAAK,CACzC,OAAC;KACE,MAAM,CAAC;IACN,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC3D,EAAE,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACzD,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC9C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC;KACD,MAAM,EAAE,CACZ,CAAC;AAGK,IAAM,4BAA4B,oCAAlC,MAAM,4BAA4B;IAIpB;IACA;IACA;IACA;IACA;IAPF,MAAM,GAAG,IAAI,eAAM,CAAC,8BAA4B,CAAC,IAAI,CAAC,CAAC;IAExE,YACmB,eAAgC,EAChC,oBAA0C,EAC1C,6BAA4D,EAC5D,kCAAsE,EACtE,sBAA8C;QAJ9C,oBAAe,GAAf,eAAe,CAAiB;QAChC,yBAAoB,GAApB,oBAA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,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAExD,MAAM,iBAAiB,GACrB,eAAe,CAAC,KAAK,IAAI,OAAO,CAAC,UAAU,EAAE,UAAU,KAAK,QAAQ,CAAC,EAAE;YACrE,CAAC,CAAC,OAAO,CAAC,UAAU;YACpB,CAAC,CAAC,SAAS,CAAC;QAEhB,MAAM,gBAAgB,GAAG,IAAI,4CAAmB,CAC9C,IAAI,EACJ,iBAAiB,EACjB,eAAe,CAChB,CAAC;QAEF,IAAI,gBAAgB,CAAC,YAAY,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACxD,OAAO,QAAQ,CAAC;QAClB,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,sCAAsC,QAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"state-machine-processor.service.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/services/state-machine-processor.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,8CAe2B;AAC3B,qEAAgE;AAChE,mDAAoD;AACpD,yFAAmF;AAEnF,8FAAwF;AACxF,mGAA6F;AAC7F,mCAA8B;AAC9B,yEAAoE;AACpE,6BAAwB;AAExB,MAAM,2BAA2B,GAAG,OAAC,CAAC,KAAK,CACzC,OAAC;KACE,MAAM,CAAC;IACN,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC3D,EAAE,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACzD,IAAI,EAAE,OAAC,CA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AAC,CAAC,CAAC;YAGrB,QAAQ,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;YAC1D,QAAQ,CAAC,KAAK,GAAG,CAAC,CAAC,OAAO,CAAC;QAC7B,CAAC;QAED,IAAI,QAAQ,CAAC,KAAK,EAAE,CAAC;YACnB,QAAQ,CAAC,MAAM,GAAG,sBAAa,CAAC,MAAM,CAAC;QACzC,CAAC;aAAM,IAAI,QAAQ,CAAC,KAAK,KAAK,KAAK,EAAE,CAAC;YACpC,QAAQ,CAAC,MAAM,GAAG,sBAAa,CAAC,SAAS,CAAC;QAC5C,CAAC;aAAM,CAAC;YACN,QAAQ,CAAC,MAAM,GAAG,sBAAa,CAAC,OAAO,CAAC;QAC1C,CAAC;QAED,MAAM,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAE1C,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF,CAAA;AA3ZY,oEAA4B;uCAA5B,4BAA4B;IADxC,IAAA,mBAAU,GAAE;qCAKyB,6BAAe;QACV,6CAAoB;QACX,gEAA6B;QACxB,0EAAkC;QAC9C,iDAAsB;GARtD,4BAA4B,CA2ZxC"}
|
|
@@ -50,8 +50,8 @@ let ToolExecutionService = ToolExecutionService_1 = class ToolExecutionService {
|
|
|
50
50
|
schema: zod_1.z.string(),
|
|
51
51
|
});
|
|
52
52
|
const configElement = this.configurationService.resolveConfig('tools', toolName, context.includes);
|
|
53
|
-
this.contextService.addIncludes(context, configElement.
|
|
54
|
-
const zodSchema = this.schemaRegistry.getZodSchema(`${
|
|
53
|
+
this.contextService.addIncludes(context, configElement.includes);
|
|
54
|
+
const zodSchema = this.schemaRegistry.getZodSchema(`${configElement.key}.arguments`);
|
|
55
55
|
const hasArguments = toolCall.arguments && Object.keys(toolCall.arguments).length;
|
|
56
56
|
if (!zodSchema && hasArguments) {
|
|
57
57
|
throw Error(`Tool called with arguments but no schema defined.`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-execution.service.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/services/tool-execution.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,uDAA2E;AAS3E,mGAA6F;AAC7F,2EAAsE;AACtE,yCAA8C;AAE9C,6BAAwB;AAGjB,IAAM,oBAAoB,4BAA1B,MAAM,oBAAoB;IAIrB;IACA;IACA;IACA;IACA;IAPF,MAAM,GAAG,IAAI,eAAM,CAAC,sBAAoB,CAAC,IAAI,CAAC,CAAC;IAEvD,YACU,oBAA0C,EAC1C,kCAAsE,EACtE,uBAAgD,EAChD,cAA8B,EAC9B,cAA8B;QAJ9B,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,uCAAkC,GAAlC,kCAAkC,CAAoC;QACtE,4BAAuB,GAAvB,uBAAuB,CAAyB;QAChD,mBAAc,GAAd,cAAc,CAAgB;QAC9B,mBAAc,GAAd,cAAc,CAAgB;IACrC,CAAC;IAEJ,iBAAiB,
|
|
1
|
+
{"version":3,"file":"tool-execution.service.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/services/tool-execution.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,uDAA2E;AAS3E,mGAA6F;AAC7F,2EAAsE;AACtE,yCAA8C;AAE9C,6BAAwB;AAGjB,IAAM,oBAAoB,4BAA1B,MAAM,oBAAoB;IAIrB;IACA;IACA;IACA;IACA;IAPF,MAAM,GAAG,IAAI,eAAM,CAAC,sBAAoB,CAAC,IAAI,CAAC,CAAC;IAEvD,YACU,oBAA0C,EAC1C,kCAAsE,EACtE,uBAAgD,EAChD,cAA8B,EAC9B,cAA8B;QAJ9B,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,uCAAkC,GAAlC,kCAAkC,CAAoC;QACtE,4BAAuB,GAAvB,uBAAuB,CAAyB;QAChD,mBAAc,GAAd,cAAc,CAAgB;QAC9B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ChC,8BAAc;QACd,uBAAc;GAR7B,oBAAoB,CAuHhC"}
|
|
@@ -31,7 +31,7 @@ let WorkflowProcessorService = WorkflowProcessorService_1 = class WorkflowProces
|
|
|
31
31
|
}
|
|
32
32
|
async runStateMachineType(configElement, context) {
|
|
33
33
|
const mergedConfigElement = this.stateMachineConfigService.getConfig(configElement);
|
|
34
|
-
this.contextService.addIncludes(context, mergedConfigElement.
|
|
34
|
+
this.contextService.addIncludes(context, mergedConfigElement.includes);
|
|
35
35
|
const currentWorkflow = await this.workflowStateService.getWorkflowState(mergedConfigElement, context);
|
|
36
36
|
const workflow = await this.stateMachineProcessorService.processStateMachine(context, currentWorkflow, mergedConfigElement);
|
|
37
37
|
if (workflow.status === shared_1.WorkflowState.Failed) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-processor.service.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/services/workflow-processor.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,uFAAiF;AACjF,8CAK2B;AAC3B,qEAAgE;AAChE,iFAA2E;AAC3E,yCAA8C;AAGvC,IAAM,wBAAwB,gCAA9B,MAAM,wBAAwB;IAIhB;IACA;IACA;IACA;IANF,MAAM,GAAG,IAAI,eAAM,CAAC,0BAAwB,CAAC,IAAI,CAAC,CAAC;IAEpE,YACmB,yBAAoD,EACpD,cAA8B,EAC9B,oBAA0C,EAC1C,4BAA0D;QAH1D,8BAAyB,GAAzB,yBAAyB,CAA2B;QACpD,mBAAc,GAAd,cAAc,CAAgB;QAC9B,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,iCAA4B,GAA5B,4BAA4B,CAA8B;IAC1E,CAAC;IAEJ,KAAK,CAAC,mBAAmB,CACvB,aAA0C,EAC1C,OAAyB;
|
|
1
|
+
{"version":3,"file":"workflow-processor.service.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/services/workflow-processor.service.ts"],"names":[],"mappings":";;;;;;;;;;;;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,SAAS,GAAG;oBAClB,GAAG,OAAO,CAAC,SAAS;oBACpB,GAAG,QAAQ,CAAC,gBAAgB;iBAC7B,CAAC;YACJ,CAAC;QACH,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;CACF,CAAA;AAlDY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;qCAKmC,wDAAyB;QACpC,uBAAc;QACR,6CAAoB;QACZ,8DAA4B;GAPlE,wBAAwB,CAkDpC"}
|
|
@@ -22,7 +22,7 @@ let WorkflowStateService = WorkflowStateService_1 = class WorkflowStateService {
|
|
|
22
22
|
async getWorkflowState(configElement, context) {
|
|
23
23
|
const workflow = await this.workflowService
|
|
24
24
|
.createFindQuery(context.namespace?.id, {
|
|
25
|
-
|
|
25
|
+
configKey: configElement.key,
|
|
26
26
|
labels: context.labels,
|
|
27
27
|
})
|
|
28
28
|
.getOne();
|
|
@@ -34,7 +34,7 @@ let WorkflowStateService = WorkflowStateService_1 = class WorkflowStateService {
|
|
|
34
34
|
labels: context.labels,
|
|
35
35
|
namespace: context.namespace ?? undefined,
|
|
36
36
|
pipelineId: context.pipelineId,
|
|
37
|
-
|
|
37
|
+
configKey: configElement.key,
|
|
38
38
|
title: configElement.config.title ?? configElement.name,
|
|
39
39
|
ui: configElement.config.ui ?? null,
|
|
40
40
|
index: context.index,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-state.service.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/services/workflow-state.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,mDAAoD;AAS7C,IAAM,oBAAoB,4BAA1B,MAAM,oBAAoB;IAGX;IAFH,MAAM,GAAG,IAAI,eAAM,CAAC,sBAAoB,CAAC,IAAI,CAAC,CAAC;IAEhE,YAAoB,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;IAAG,CAAC;IAExD,KAAK,CAAC,gBAAgB,CACpB,aAA0C,EAC1C,OAAyB;QAEzB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,eAAe;aACxC,eAAe,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,EAAE;YACtC,
|
|
1
|
+
{"version":3,"file":"workflow-state.service.js","sourceRoot":"","sources":["../../../../src/modules/workflow-processor/services/workflow-state.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAoD;AACpD,mDAAoD;AAS7C,IAAM,oBAAoB,4BAA1B,MAAM,oBAAoB;IAGX;IAFH,MAAM,GAAG,IAAI,eAAM,CAAC,sBAAoB,CAAC,IAAI,CAAC,CAAC;IAEhE,YAAoB,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;IAAG,CAAC;IAExD,KAAK,CAAC,gBAAgB,CACpB,aAA0C,EAC1C,OAAyB;QAEzB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,eAAe;aACxC,eAAe,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,EAAE;YACtC,SAAS,EAAE,aAAa,CAAC,GAAG;YAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;SACvB,CAAC;aACD,MAAM,EAAE,CAAC;QAEZ,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,QAAQ,CAAC;QAClB,CAAC;QAED,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC;YACjC,SAAS,EAAE,OAAO,CAAC,MAAM;YACzB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,SAAS;YACzC,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,SAAS,EAAE,aAAa,CAAC,GAAG;YAC5B,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,KAAK,IAAI,aAAa,CAAC,IAAI;YACvD,EAAE,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,IAAI,IAAI;YACnC,KAAK,EAAE,OAAO,CAAC,KAAK;SACrB,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA/BY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAI0B,6BAAe;GAHzC,oBAAoB,CA+BhC"}
|
|
@@ -15,6 +15,7 @@ const common_2 = require("../common");
|
|
|
15
15
|
const validators_1 = require("./validators");
|
|
16
16
|
const services_1 = require("./services");
|
|
17
17
|
const handlers_1 = require("./handlers");
|
|
18
|
+
const services_2 = require("./services");
|
|
18
19
|
let WorkflowProcessorModule = class WorkflowProcessorModule {
|
|
19
20
|
};
|
|
20
21
|
exports.WorkflowProcessorModule = WorkflowProcessorModule;
|
|
@@ -42,6 +43,7 @@ exports.WorkflowProcessorModule = WorkflowProcessorModule = __decorate([
|
|
|
42
43
|
services_1.StateMachineValidatorRegistry,
|
|
43
44
|
services_1.StateMachineProcessorService,
|
|
44
45
|
services_1.StateMachineConfigService,
|
|
46
|
+
services_2.CreatePipelineService,
|
|
45
47
|
handlers_1.CreateDocumentHandler,
|
|
46
48
|
handlers_1.BatchCreateDocumentsHandler,
|
|
47
49
|
handlers_1.MockHandler,
|
|
@@ -56,6 +58,7 @@ exports.WorkflowProcessorModule = WorkflowProcessorModule = __decorate([
|
|
|
56
58
|
services_1.RootProcessorService,
|
|
57
59
|
services_1.ToolExecutionService,
|
|
58
60
|
services_1.TemplateExpressionEvaluatorService,
|
|
61
|
+
services_2.CreatePipelineService,
|
|
59
62
|
],
|
|
60
63
|
})
|
|
61
64
|
], WorkflowProcessorModule);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-processor.module.js","sourceRoot":"","sources":["../../../src/modules/workflow-processor/workflow-processor.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,oDAAuD;AACvD,gDAAmD;AACnD,uCAA+C;AAC/C,sCAAyC;AACzC,6CAIsB;AACtB,yCAaoB;AACpB,yCAUoB;
|
|
1
|
+
{"version":3,"file":"workflow-processor.module.js","sourceRoot":"","sources":["../../../src/modules/workflow-processor/workflow-processor.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,oDAAuD;AACvD,gDAAmD;AACnD,uCAA+C;AAC/C,sCAAyC;AACzC,6CAIsB;AACtB,yCAaoB;AACpB,yCAUoB;AACpB,yCAAmD;AA6C5C,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;CAAG,CAAA;AAA1B,0DAAuB;kCAAvB,uBAAuB;IA3CnC,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,sBAAe;YACf,qBAAY;YACZ,mCAAmB;YACnB,+BAAiB;SAClB;QACD,SAAS,EAAE;YACT,+BAAoB;YACpB,+BAAoB;YACpB,mCAAwB;YACxB,+BAAoB;YACpB,oCAAyB;YACzB,mCAAwB;YACxB,6CAAkC;YAClC,iCAAsB;YACtB,kCAAuB;YACvB,gCAAmB;YACnB,0CAA6B;YAC7B,oCAAuB;YACvB,wCAA6B;YAC7B,uCAA4B;YAC5B,oCAAyB;YACzB,gCAAqB;YAGrB,gCAAqB;YACrB,sCAA2B;YAC3B,sBAAW;YACX,4BAAiB;YACjB,8BAAmB;YACnB,8BAAmB;YACnB,oCAAyB;YACzB,gCAAqB;YACrB,gCAAqB;SACtB;QACD,OAAO,EAAE;YACP,+BAAoB;YACpB,+BAAoB;YACpB,6CAAkC;YAClC,gCAAqB;SACtB;KACF,CAAC;GACW,uBAAuB,CAAG"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@loopstack/core",
|
|
3
3
|
"displayName": "Loopstack Core Module",
|
|
4
4
|
"description": "The core module of the loopstack automation framework",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.6.0",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Jakob Klippel",
|
|
8
8
|
"url": "https://www.linkedin.com/in/jakob-klippel//"
|
|
@@ -20,11 +20,13 @@
|
|
|
20
20
|
"typeorm": "^0.3.20"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@loopstack/shared": "^0.
|
|
23
|
+
"@loopstack/shared": "^0.6.0",
|
|
24
|
+
"@nestjs/bullmq": "^11.0.3",
|
|
24
25
|
"@nestjs/config": "^4.0.0",
|
|
25
26
|
"@nestjs/event-emitter": "^3.0.1",
|
|
26
27
|
"@nestjs/schedule": "^6.0.0",
|
|
27
28
|
"ajv": "^8.17.1",
|
|
29
|
+
"bullmq": "^5.56.8",
|
|
28
30
|
"class-transformer": "^0.5.1",
|
|
29
31
|
"class-validator": "^0.14.1",
|
|
30
32
|
"cron-parser": "^5.3.0",
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export declare enum TaskType {
|
|
2
|
-
ONE_TIME_DATE = "one_time_date",
|
|
3
|
-
ONE_TIME_DURATION = "one_time_duration",
|
|
4
|
-
RECURRING_CRON = "recurring_cron"
|
|
5
|
-
}
|
|
6
|
-
export declare enum TaskStatus {
|
|
7
|
-
ACTIVE = "active",
|
|
8
|
-
PAUSED = "paused",
|
|
9
|
-
COMPLETED = "completed",
|
|
10
|
-
FAILED = "failed"
|
|
11
|
-
}
|
|
12
|
-
export declare class ScheduledTask {
|
|
13
|
-
id: string;
|
|
14
|
-
workspaceId: string;
|
|
15
|
-
rootPipelineId: string;
|
|
16
|
-
name: string;
|
|
17
|
-
type: TaskType;
|
|
18
|
-
status: TaskStatus;
|
|
19
|
-
nextExecutionAt: Date | null;
|
|
20
|
-
durationSeconds: number;
|
|
21
|
-
cronExpression: string;
|
|
22
|
-
payload: Record<string, any>;
|
|
23
|
-
executionCount: number;
|
|
24
|
-
failureCount: number;
|
|
25
|
-
lastExecutionAt: Date;
|
|
26
|
-
lastFailureAt: Date;
|
|
27
|
-
lastError: string | null;
|
|
28
|
-
createdAt: Date;
|
|
29
|
-
updatedAt: Date;
|
|
30
|
-
}
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.ScheduledTask = exports.TaskStatus = exports.TaskType = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
var TaskType;
|
|
15
|
-
(function (TaskType) {
|
|
16
|
-
TaskType["ONE_TIME_DATE"] = "one_time_date";
|
|
17
|
-
TaskType["ONE_TIME_DURATION"] = "one_time_duration";
|
|
18
|
-
TaskType["RECURRING_CRON"] = "recurring_cron";
|
|
19
|
-
})(TaskType || (exports.TaskType = TaskType = {}));
|
|
20
|
-
var TaskStatus;
|
|
21
|
-
(function (TaskStatus) {
|
|
22
|
-
TaskStatus["ACTIVE"] = "active";
|
|
23
|
-
TaskStatus["PAUSED"] = "paused";
|
|
24
|
-
TaskStatus["COMPLETED"] = "completed";
|
|
25
|
-
TaskStatus["FAILED"] = "failed";
|
|
26
|
-
})(TaskStatus || (exports.TaskStatus = TaskStatus = {}));
|
|
27
|
-
let ScheduledTask = class ScheduledTask {
|
|
28
|
-
id;
|
|
29
|
-
workspaceId;
|
|
30
|
-
rootPipelineId;
|
|
31
|
-
name;
|
|
32
|
-
type;
|
|
33
|
-
status;
|
|
34
|
-
nextExecutionAt;
|
|
35
|
-
durationSeconds;
|
|
36
|
-
cronExpression;
|
|
37
|
-
payload;
|
|
38
|
-
executionCount;
|
|
39
|
-
failureCount;
|
|
40
|
-
lastExecutionAt;
|
|
41
|
-
lastFailureAt;
|
|
42
|
-
lastError;
|
|
43
|
-
createdAt;
|
|
44
|
-
updatedAt;
|
|
45
|
-
};
|
|
46
|
-
exports.ScheduledTask = ScheduledTask;
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
49
|
-
__metadata("design:type", String)
|
|
50
|
-
], ScheduledTask.prototype, "id", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
|
|
53
|
-
__metadata("design:type", String)
|
|
54
|
-
], ScheduledTask.prototype, "workspaceId", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
|
|
57
|
-
__metadata("design:type", String)
|
|
58
|
-
], ScheduledTask.prototype, "rootPipelineId", void 0);
|
|
59
|
-
__decorate([
|
|
60
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
|
|
61
|
-
__metadata("design:type", String)
|
|
62
|
-
], ScheduledTask.prototype, "name", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
(0, typeorm_1.Column)({
|
|
65
|
-
type: 'enum',
|
|
66
|
-
enum: TaskType,
|
|
67
|
-
}),
|
|
68
|
-
__metadata("design:type", String)
|
|
69
|
-
], ScheduledTask.prototype, "type", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
(0, typeorm_1.Column)({
|
|
72
|
-
type: 'enum',
|
|
73
|
-
enum: TaskStatus,
|
|
74
|
-
default: TaskStatus.ACTIVE,
|
|
75
|
-
}),
|
|
76
|
-
__metadata("design:type", String)
|
|
77
|
-
], ScheduledTask.prototype, "status", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
(0, typeorm_1.Column)({ type: 'timestamp', nullable: true }),
|
|
80
|
-
__metadata("design:type", Object)
|
|
81
|
-
], ScheduledTask.prototype, "nextExecutionAt", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
84
|
-
__metadata("design:type", Number)
|
|
85
|
-
], ScheduledTask.prototype, "durationSeconds", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
88
|
-
__metadata("design:type", String)
|
|
89
|
-
], ScheduledTask.prototype, "cronExpression", void 0);
|
|
90
|
-
__decorate([
|
|
91
|
-
(0, typeorm_1.Column)({ type: 'jsonb', nullable: true }),
|
|
92
|
-
__metadata("design:type", Object)
|
|
93
|
-
], ScheduledTask.prototype, "payload", void 0);
|
|
94
|
-
__decorate([
|
|
95
|
-
(0, typeorm_1.Column)({ type: 'integer', default: 0 }),
|
|
96
|
-
__metadata("design:type", Number)
|
|
97
|
-
], ScheduledTask.prototype, "executionCount", void 0);
|
|
98
|
-
__decorate([
|
|
99
|
-
(0, typeorm_1.Column)({ type: 'integer', default: 0 }),
|
|
100
|
-
__metadata("design:type", Number)
|
|
101
|
-
], ScheduledTask.prototype, "failureCount", void 0);
|
|
102
|
-
__decorate([
|
|
103
|
-
(0, typeorm_1.Column)({ type: 'timestamp', nullable: true }),
|
|
104
|
-
__metadata("design:type", Date)
|
|
105
|
-
], ScheduledTask.prototype, "lastExecutionAt", void 0);
|
|
106
|
-
__decorate([
|
|
107
|
-
(0, typeorm_1.Column)({ type: 'timestamp', nullable: true }),
|
|
108
|
-
__metadata("design:type", Date)
|
|
109
|
-
], ScheduledTask.prototype, "lastFailureAt", void 0);
|
|
110
|
-
__decorate([
|
|
111
|
-
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
112
|
-
__metadata("design:type", Object)
|
|
113
|
-
], ScheduledTask.prototype, "lastError", void 0);
|
|
114
|
-
__decorate([
|
|
115
|
-
(0, typeorm_1.CreateDateColumn)(),
|
|
116
|
-
__metadata("design:type", Date)
|
|
117
|
-
], ScheduledTask.prototype, "createdAt", void 0);
|
|
118
|
-
__decorate([
|
|
119
|
-
(0, typeorm_1.UpdateDateColumn)(),
|
|
120
|
-
__metadata("design:type", Date)
|
|
121
|
-
], ScheduledTask.prototype, "updatedAt", void 0);
|
|
122
|
-
exports.ScheduledTask = ScheduledTask = __decorate([
|
|
123
|
-
(0, typeorm_1.Entity)('scheduled_tasks'),
|
|
124
|
-
(0, typeorm_1.Index)(['workspaceId', 'rootPipelineId', 'name'], { unique: true }),
|
|
125
|
-
(0, typeorm_1.Index)(['status', 'nextExecutionAt']),
|
|
126
|
-
(0, typeorm_1.Index)(['workspaceId'])
|
|
127
|
-
], ScheduledTask);
|
|
128
|
-
//# sourceMappingURL=scheduled-task.entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scheduled-task.entity.js","sourceRoot":"","sources":["../../../../src/modules/scheduler/entities/scheduled-task.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAOiB;AAEjB,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,2CAA+B,CAAA;IAC/B,mDAAuC,CAAA;IACvC,6CAAiC,CAAA;AACnC,CAAC,EAJW,QAAQ,wBAAR,QAAQ,QAInB;AAED,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;IACjB,qCAAuB,CAAA;IACvB,+BAAiB,CAAA;AACnB,CAAC,EALW,UAAU,0BAAV,UAAU,QAKrB;AAMM,IAAM,aAAa,GAAnB,MAAM,aAAa;IAExB,EAAE,CAAS;IAGX,WAAW,CAAS;IAGpB,cAAc,CAAS;IAGvB,IAAI,CAAS;IAMb,IAAI,CAAW;IAOf,MAAM,CAAa;IAMnB,eAAe,CAAc;IAI7B,eAAe,CAAS;IAIxB,cAAc,CAAS;IAIvB,OAAO,CAAsB;IAG7B,cAAc,CAAS;IAGvB,YAAY,CAAS;IAGrB,eAAe,CAAO;IAGtB,aAAa,CAAO;IAGpB,SA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AE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;mDACnB;AAGrB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC7B,IAAI;sDAAC;AAGtB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC/B,IAAI;oDAAC;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDAChB;AAGzB;IADC,IAAA,0BAAgB,GAAE;8BACR,IAAI;gDAAC;AAGhB;IADC,IAAA,0BAAgB,GAAE;8BACR,IAAI;gDAAC;wBA/DL,aAAa;IAJzB,IAAA,gBAAM,EAAC,iBAAiB,CAAC;IACzB,IAAA,eAAK,EAAC,CAAC,aAAa,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAClE,IAAA,eAAK,EAAC,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC;IACpC,IAAA,eAAK,EAAC,CAAC,aAAa,CAAC,CAAC;GACV,aAAa,CAgEzB"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare class TaskExecutionEvent {
|
|
2
|
-
readonly taskId: string;
|
|
3
|
-
readonly workspaceId: string;
|
|
4
|
-
readonly rootPipelineId: string;
|
|
5
|
-
readonly name: string;
|
|
6
|
-
readonly payload: Record<string, any>;
|
|
7
|
-
constructor(taskId: string, workspaceId: string, rootPipelineId: string, name: string, payload: Record<string, any>);
|
|
8
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TaskExecutionEvent = void 0;
|
|
4
|
-
class TaskExecutionEvent {
|
|
5
|
-
taskId;
|
|
6
|
-
workspaceId;
|
|
7
|
-
rootPipelineId;
|
|
8
|
-
name;
|
|
9
|
-
payload;
|
|
10
|
-
constructor(taskId, workspaceId, rootPipelineId, name, payload) {
|
|
11
|
-
this.taskId = taskId;
|
|
12
|
-
this.workspaceId = workspaceId;
|
|
13
|
-
this.rootPipelineId = rootPipelineId;
|
|
14
|
-
this.name = name;
|
|
15
|
-
this.payload = payload;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.TaskExecutionEvent = TaskExecutionEvent;
|
|
19
|
-
//# sourceMappingURL=task-execution.event.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"task-execution.event.js","sourceRoot":"","sources":["../../../../src/modules/scheduler/events/task-execution.event.ts"],"names":[],"mappings":";;;AAAA,MAAa,kBAAkB;IAEX;IACA;IACA;IACA;IACA;IALlB,YACkB,MAAc,EACd,WAAmB,EACnB,cAAsB,EACtB,IAAY,EACZ,OAA4B;QAJ5B,WAAM,GAAN,MAAM,CAAQ;QACd,gBAAW,GAAX,WAAW,CAAQ;QACnB,mBAAc,GAAd,cAAc,CAAQ;QACtB,SAAI,GAAJ,IAAI,CAAQ;QACZ,YAAO,GAAP,OAAO,CAAqB;IAC3C,CAAC;CACL;AARD,gDAQC"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { ContextInterface, HandlerInterface, HandlerCallResult, WorkflowEntity } from '@loopstack/shared';
|
|
3
|
-
import { TaskSchedulerService } from '../services/task-scheduler.service';
|
|
4
|
-
import { TaskType } from '../entities/scheduled-task.entity';
|
|
5
|
-
export declare const config: z.ZodObject<{
|
|
6
|
-
name: z.ZodUnion<[z.ZodString, z.ZodString]>;
|
|
7
|
-
type: z.ZodUnion<[z.ZodString, z.ZodNativeEnum<typeof TaskType>]>;
|
|
8
|
-
executeAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodString, string, string>]>>;
|
|
9
|
-
waitFor: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString]>>;
|
|
10
|
-
cronExpression: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodString, string, string>]>>;
|
|
11
|
-
payload: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
|
|
12
|
-
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
name: string;
|
|
14
|
-
type: string;
|
|
15
|
-
executeAt?: string | undefined;
|
|
16
|
-
waitFor?: string | undefined;
|
|
17
|
-
cronExpression?: string | undefined;
|
|
18
|
-
payload?: string | Record<string, any> | undefined;
|
|
19
|
-
}, {
|
|
20
|
-
name: string;
|
|
21
|
-
type: string;
|
|
22
|
-
executeAt?: string | undefined;
|
|
23
|
-
waitFor?: string | undefined;
|
|
24
|
-
cronExpression?: string | undefined;
|
|
25
|
-
payload?: string | Record<string, any> | undefined;
|
|
26
|
-
}>;
|
|
27
|
-
declare const schema: z.ZodObject<{
|
|
28
|
-
name: z.ZodString;
|
|
29
|
-
type: z.ZodNativeEnum<typeof TaskType>;
|
|
30
|
-
executeAt: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
31
|
-
waitFor: z.ZodOptional<z.ZodString>;
|
|
32
|
-
cronExpression: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
33
|
-
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
34
|
-
}, "strip", z.ZodTypeAny, {
|
|
35
|
-
name: string;
|
|
36
|
-
type: TaskType;
|
|
37
|
-
executeAt?: string | undefined;
|
|
38
|
-
waitFor?: string | undefined;
|
|
39
|
-
cronExpression?: string | undefined;
|
|
40
|
-
payload?: Record<string, any> | undefined;
|
|
41
|
-
}, {
|
|
42
|
-
name: string;
|
|
43
|
-
type: TaskType;
|
|
44
|
-
executeAt?: string | undefined;
|
|
45
|
-
waitFor?: string | undefined;
|
|
46
|
-
cronExpression?: string | undefined;
|
|
47
|
-
payload?: Record<string, any> | undefined;
|
|
48
|
-
}>;
|
|
49
|
-
export declare class CreateTaskScheduleHandler implements HandlerInterface {
|
|
50
|
-
private taskSchedulerService;
|
|
51
|
-
private readonly logger;
|
|
52
|
-
constructor(taskSchedulerService: TaskSchedulerService);
|
|
53
|
-
apply(props: z.infer<typeof schema>, workflow: WorkflowEntity | undefined, context: ContextInterface): Promise<HandlerCallResult>;
|
|
54
|
-
}
|
|
55
|
-
export {};
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var CreateTaskScheduleHandler_1;
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.CreateTaskScheduleHandler = exports.config = void 0;
|
|
14
|
-
const common_1 = require("@nestjs/common");
|
|
15
|
-
const zod_1 = require("zod");
|
|
16
|
-
const shared_1 = require("@loopstack/shared");
|
|
17
|
-
const task_scheduler_service_1 = require("../services/task-scheduler.service");
|
|
18
|
-
const scheduled_task_entity_1 = require("../entities/scheduled-task.entity");
|
|
19
|
-
const task_schema_1 = require("../schemas/task.schema");
|
|
20
|
-
function parseDurationToSeconds(durationString) {
|
|
21
|
-
const durationRegex = /^(\d+)\s*(second|seconds|minute|minutes|hour|hours|day|days|week|weeks|month|months|year|years)$/i;
|
|
22
|
-
const match = durationString.trim().match(durationRegex);
|
|
23
|
-
if (!match) {
|
|
24
|
-
throw new Error(`Invalid duration format: ${durationString}. Expected format like "7 days", "2 hours", "30 minutes"`);
|
|
25
|
-
}
|
|
26
|
-
const value = parseInt(match[1], 10);
|
|
27
|
-
const unit = match[2].toLowerCase();
|
|
28
|
-
const secondsMap = {
|
|
29
|
-
'second': 1,
|
|
30
|
-
'seconds': 1,
|
|
31
|
-
'minute': 60,
|
|
32
|
-
'minutes': 60,
|
|
33
|
-
'hour': 3600,
|
|
34
|
-
'hours': 3600,
|
|
35
|
-
'day': 86400,
|
|
36
|
-
'days': 86400,
|
|
37
|
-
'week': 604800,
|
|
38
|
-
'weeks': 604800,
|
|
39
|
-
'month': 2592000,
|
|
40
|
-
'months': 2592000,
|
|
41
|
-
'year': 31536000,
|
|
42
|
-
'years': 31536000,
|
|
43
|
-
};
|
|
44
|
-
return value * secondsMap[unit];
|
|
45
|
-
}
|
|
46
|
-
exports.config = zod_1.z.object({
|
|
47
|
-
name: zod_1.z.union([
|
|
48
|
-
shared_1.ExpressionString,
|
|
49
|
-
zod_1.z.string().min(1, 'Task name is required').max(255, 'Task name too long'),
|
|
50
|
-
]),
|
|
51
|
-
type: zod_1.z.union([
|
|
52
|
-
shared_1.ExpressionString,
|
|
53
|
-
zod_1.z.nativeEnum(scheduled_task_entity_1.TaskType, { required_error: 'Task type is required' })
|
|
54
|
-
]),
|
|
55
|
-
executeAt: zod_1.z.optional(zod_1.z.union([
|
|
56
|
-
shared_1.ExpressionString,
|
|
57
|
-
task_schema_1.isoDateStringSchema
|
|
58
|
-
])).describe('Execute at specific date/time (e.g., "2024-12-25T10:00:00Z")'),
|
|
59
|
-
waitFor: zod_1.z.optional(zod_1.z.union([
|
|
60
|
-
shared_1.ExpressionString,
|
|
61
|
-
zod_1.z.string().min(1, 'Duration string is required')
|
|
62
|
-
])).describe('Wait for duration before executing (e.g., "7 days", "2 hours", "30 minutes")'),
|
|
63
|
-
cronExpression: zod_1.z.optional(zod_1.z.union([
|
|
64
|
-
shared_1.ExpressionString,
|
|
65
|
-
task_schema_1.cronExpressionSchema
|
|
66
|
-
])).describe('Cron expression for recurring tasks (e.g., "0 9 * * MON" for every Monday at 9 AM)'),
|
|
67
|
-
payload: zod_1.z.optional(zod_1.z.union([
|
|
68
|
-
shared_1.ExpressionString,
|
|
69
|
-
zod_1.z.record(zod_1.z.any())
|
|
70
|
-
]))
|
|
71
|
-
});
|
|
72
|
-
const schema = zod_1.z.object({
|
|
73
|
-
name: zod_1.z.string().min(1, 'Task name is required').max(255, 'Task name too long'),
|
|
74
|
-
type: zod_1.z.nativeEnum(scheduled_task_entity_1.TaskType, { required_error: 'Task type is required' }),
|
|
75
|
-
executeAt: zod_1.z.optional(task_schema_1.isoDateStringSchema).describe('Execute at specific date/time (e.g., "2024-12-25T10:00:00Z")'),
|
|
76
|
-
waitFor: zod_1.z.optional(zod_1.z.string().min(1, 'Duration string is required')).describe('Wait for duration before executing (e.g., "7 days", "2 hours", "30 minutes")'),
|
|
77
|
-
cronExpression: zod_1.z.optional(task_schema_1.cronExpressionSchema).describe('Cron expression for recurring tasks (e.g., "0 9 * * MON" for every Monday at 9 AM)'),
|
|
78
|
-
payload: zod_1.z.optional(zod_1.z.record(zod_1.z.any()))
|
|
79
|
-
});
|
|
80
|
-
let CreateTaskScheduleHandler = CreateTaskScheduleHandler_1 = class CreateTaskScheduleHandler {
|
|
81
|
-
taskSchedulerService;
|
|
82
|
-
logger = new common_1.Logger(CreateTaskScheduleHandler_1.name);
|
|
83
|
-
constructor(taskSchedulerService) {
|
|
84
|
-
this.taskSchedulerService = taskSchedulerService;
|
|
85
|
-
}
|
|
86
|
-
async apply(props, workflow, context) {
|
|
87
|
-
if (!workflow) {
|
|
88
|
-
throw new Error('Workflow is undefined');
|
|
89
|
-
}
|
|
90
|
-
let durationSeconds;
|
|
91
|
-
if (props.waitFor) {
|
|
92
|
-
try {
|
|
93
|
-
durationSeconds = parseDurationToSeconds(props.waitFor);
|
|
94
|
-
}
|
|
95
|
-
catch (error) {
|
|
96
|
-
this.logger.error(`Failed to parse duration: ${props.waitFor}`, error);
|
|
97
|
-
throw new Error(`Invalid duration format: ${props.waitFor}`);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
const { waitFor, ...restProps } = props;
|
|
101
|
-
const task = await this.taskSchedulerService.createTask({
|
|
102
|
-
workspaceId: context.workspaceId,
|
|
103
|
-
rootPipelineId: context.pipelineId,
|
|
104
|
-
...restProps,
|
|
105
|
-
...(durationSeconds && { durationSeconds }),
|
|
106
|
-
});
|
|
107
|
-
return {
|
|
108
|
-
success: true,
|
|
109
|
-
data: task,
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
exports.CreateTaskScheduleHandler = CreateTaskScheduleHandler;
|
|
114
|
-
exports.CreateTaskScheduleHandler = CreateTaskScheduleHandler = CreateTaskScheduleHandler_1 = __decorate([
|
|
115
|
-
(0, shared_1.Handler)({
|
|
116
|
-
config: schema,
|
|
117
|
-
schema,
|
|
118
|
-
}),
|
|
119
|
-
__metadata("design:paramtypes", [task_scheduler_service_1.TaskSchedulerService])
|
|
120
|
-
], CreateTaskScheduleHandler);
|
|
121
|
-
//# sourceMappingURL=create-task-schedule.handler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-task-schedule.handler.js","sourceRoot":"","sources":["../../../../src/modules/scheduler/handler/create-task-schedule.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAwC;AACxC,6BAAwB;AACxB,8CAM2B;AAC3B,+EAA0E;AAE1E,6EAA6D;AAC7D,wDAAmF;AAEnF,SAAS,sBAAsB,CAAC,cAAsB;IACpD,MAAM,aAAa,GAAG,mGAAmG,CAAC;IAC1H,MAAM,KAAK,GAAG,cAAc,CAAC,IAAI,EAAE,CAAC,KA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CAAzB,yBAAyB;IAJrC,IAAA,gBAAO,EAAC;QACP,MAAM,EAAE,MAAM;QACd,MAAM;KACP,CAAC;qCAI0C,6CAAoB;GAHnD,yBAAyB,CAuCrC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { ContextInterface, HandlerInterface, HandlerCallResult, WorkflowEntity } from '@loopstack/shared';
|
|
3
|
-
import { TaskSchedulerService } from '../services/task-scheduler.service';
|
|
4
|
-
declare const schema: z.ZodObject<{
|
|
5
|
-
name: z.ZodString;
|
|
6
|
-
}, "strict", z.ZodTypeAny, {
|
|
7
|
-
name: string;
|
|
8
|
-
}, {
|
|
9
|
-
name: string;
|
|
10
|
-
}>;
|
|
11
|
-
export declare class RemoveTaskScheduleHandler implements HandlerInterface {
|
|
12
|
-
private taskSchedulerService;
|
|
13
|
-
private readonly logger;
|
|
14
|
-
constructor(taskSchedulerService: TaskSchedulerService);
|
|
15
|
-
apply(props: z.infer<typeof schema>, workflow: WorkflowEntity | undefined, context: ContextInterface): Promise<HandlerCallResult>;
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var RemoveTaskScheduleHandler_1;
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.RemoveTaskScheduleHandler = void 0;
|
|
14
|
-
const common_1 = require("@nestjs/common");
|
|
15
|
-
const zod_1 = require("zod");
|
|
16
|
-
const shared_1 = require("@loopstack/shared");
|
|
17
|
-
const task_scheduler_service_1 = require("../services/task-scheduler.service");
|
|
18
|
-
const config = zod_1.z.object({
|
|
19
|
-
name: zod_1.z.string()
|
|
20
|
-
}).strict();
|
|
21
|
-
const schema = zod_1.z.object({
|
|
22
|
-
name: zod_1.z.string()
|
|
23
|
-
}).strict();
|
|
24
|
-
let RemoveTaskScheduleHandler = RemoveTaskScheduleHandler_1 = class RemoveTaskScheduleHandler {
|
|
25
|
-
taskSchedulerService;
|
|
26
|
-
logger = new common_1.Logger(RemoveTaskScheduleHandler_1.name);
|
|
27
|
-
constructor(taskSchedulerService) {
|
|
28
|
-
this.taskSchedulerService = taskSchedulerService;
|
|
29
|
-
}
|
|
30
|
-
async apply(props, workflow, context) {
|
|
31
|
-
if (!workflow) {
|
|
32
|
-
throw new Error('Workflow is undefined');
|
|
33
|
-
}
|
|
34
|
-
await this.taskSchedulerService.removeTask(context.workspaceId, context.pipelineId, props.name);
|
|
35
|
-
return {
|
|
36
|
-
success: true,
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
exports.RemoveTaskScheduleHandler = RemoveTaskScheduleHandler;
|
|
41
|
-
exports.RemoveTaskScheduleHandler = RemoveTaskScheduleHandler = RemoveTaskScheduleHandler_1 = __decorate([
|
|
42
|
-
(0, shared_1.Handler)({
|
|
43
|
-
config,
|
|
44
|
-
schema,
|
|
45
|
-
}),
|
|
46
|
-
__metadata("design:paramtypes", [task_scheduler_service_1.TaskSchedulerService])
|
|
47
|
-
], RemoveTaskScheduleHandler);
|
|
48
|
-
//# sourceMappingURL=remove-task-schedule.handler.js.map
|