@mastra/temporal 0.0.0-branches-as-default-20260512170712

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 (45) hide show
  1. package/CHANGELOG.md +238 -0
  2. package/LICENSE.md +30 -0
  3. package/README.md +107 -0
  4. package/dist/chunk-BF6TR7JX.js +9 -0
  5. package/dist/chunk-BF6TR7JX.js.map +1 -0
  6. package/dist/chunk-DYBSPLCJ.cjs +11 -0
  7. package/dist/chunk-DYBSPLCJ.cjs.map +1 -0
  8. package/dist/index.cjs +132 -0
  9. package/dist/index.cjs.map +1 -0
  10. package/dist/index.d.ts +3 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +130 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/mastra-deployer-UCBGECM5.js +39 -0
  15. package/dist/mastra-deployer-UCBGECM5.js.map +1 -0
  16. package/dist/mastra-deployer-YVT5GB5G.cjs +41 -0
  17. package/dist/mastra-deployer-YVT5GB5G.cjs.map +1 -0
  18. package/dist/mastra-deployer.d.ts +16 -0
  19. package/dist/mastra-deployer.d.ts.map +1 -0
  20. package/dist/plugin.d.ts +16 -0
  21. package/dist/plugin.d.ts.map +1 -0
  22. package/dist/run.d.ts +24 -0
  23. package/dist/run.d.ts.map +1 -0
  24. package/dist/temporal-workflow-runtime.mjs +295 -0
  25. package/dist/transforms/activities.d.ts +11 -0
  26. package/dist/transforms/activities.d.ts.map +1 -0
  27. package/dist/transforms/shared.d.ts +23 -0
  28. package/dist/transforms/shared.d.ts.map +1 -0
  29. package/dist/transforms/temporal-workflow-runtime.d.mts +92 -0
  30. package/dist/transforms/temporal-workflow-runtime.d.mts.map +1 -0
  31. package/dist/transforms/workflows.d.ts +20 -0
  32. package/dist/transforms/workflows.d.ts.map +1 -0
  33. package/dist/types.d.ts +4 -0
  34. package/dist/types.d.ts.map +1 -0
  35. package/dist/utils.d.ts +2 -0
  36. package/dist/utils.d.ts.map +1 -0
  37. package/dist/worker.cjs +1336 -0
  38. package/dist/worker.cjs.map +1 -0
  39. package/dist/worker.d.ts +2 -0
  40. package/dist/worker.d.ts.map +1 -0
  41. package/dist/worker.js +1310 -0
  42. package/dist/worker.js.map +1 -0
  43. package/dist/workflow.d.ts +27 -0
  44. package/dist/workflow.d.ts.map +1 -0
  45. package/package.json +95 -0
@@ -0,0 +1,92 @@
1
+ export function createWorkflow(workflowId: any): ((startArgs: any) => Promise<{
2
+ status: string;
3
+ input: any;
4
+ result: any;
5
+ state: any;
6
+ steps: {};
7
+ }>) & {
8
+ then(stepId: any): (startArgs: any) => Promise<{
9
+ status: string;
10
+ input: any;
11
+ result: any;
12
+ state: any;
13
+ steps: {};
14
+ }>;
15
+ thenWorkflow(workflowType: any): (startArgs: any) => Promise<{
16
+ status: string;
17
+ input: any;
18
+ result: any;
19
+ state: any;
20
+ steps: {};
21
+ }>;
22
+ sleep(durationOrFnId: any): (startArgs: any) => Promise<{
23
+ status: string;
24
+ input: any;
25
+ result: any;
26
+ state: any;
27
+ steps: {};
28
+ }>;
29
+ sleepUntil(dateOrFnId: any): (startArgs: any) => Promise<{
30
+ status: string;
31
+ input: any;
32
+ result: any;
33
+ state: any;
34
+ steps: {};
35
+ }>;
36
+ parallel(stepIds: any): (startArgs: any) => Promise<{
37
+ status: string;
38
+ input: any;
39
+ result: any;
40
+ state: any;
41
+ steps: {};
42
+ }>;
43
+ branch(pairs: any): (startArgs: any) => Promise<{
44
+ status: string;
45
+ input: any;
46
+ result: any;
47
+ state: any;
48
+ steps: {};
49
+ }>;
50
+ dowhile(stepId: any, condId: any): (startArgs: any) => Promise<{
51
+ status: string;
52
+ input: any;
53
+ result: any;
54
+ state: any;
55
+ steps: {};
56
+ }>;
57
+ dountil(stepId: any, condId: any): (startArgs: any) => Promise<{
58
+ status: string;
59
+ input: any;
60
+ result: any;
61
+ state: any;
62
+ steps: {};
63
+ }>;
64
+ foreach(stepId: any, opts: any): (startArgs: any) => Promise<{
65
+ status: string;
66
+ input: any;
67
+ result: any;
68
+ state: any;
69
+ steps: {};
70
+ }>;
71
+ commit(): (startArgs: any) => Promise<{
72
+ status: string;
73
+ input: any;
74
+ result: any;
75
+ state: any;
76
+ steps: {};
77
+ }>;
78
+ };
79
+ export class TemporalExecutionEngine {
80
+ constructor(params: any);
81
+ startToCloseTimeout: any;
82
+ activityHandle: import("@temporalio/workflow").ActivityInterfaceFor<import("@temporalio/workflow").UntypedActivities>;
83
+ execute(params: any): Promise<{
84
+ status: string;
85
+ input: any;
86
+ result: any;
87
+ state: any;
88
+ steps: {};
89
+ }>;
90
+ executeEntry(entry: any, inputData: any, stepResults: any): Promise<any>;
91
+ }
92
+ //# sourceMappingURL=temporal-workflow-runtime.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"temporal-workflow-runtime.d.mts","sourceRoot":"","sources":["../../src/transforms/temporal-workflow-runtime.mjs"],"names":[],"mappings":"AAiJA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqJC;AApSD;IAIE,yBAGC;IAND,yBAAoB;IACpB,sHAAe;IAOf;;;;;;OAeC;IAED,yEAkHC;CACF"}
@@ -0,0 +1,20 @@
1
+ export interface BuildTemporalWorkflowOptions {
2
+ }
3
+ export interface TemporalWorkflowExport {
4
+ exportName: string;
5
+ workflowId: string;
6
+ }
7
+ export interface BuildTemporalWorkflowModuleResult {
8
+ code: string;
9
+ workflows: TemporalWorkflowExport[];
10
+ }
11
+ /**
12
+ * Transforms a user-authored workflow module into a Temporal-friendly module:
13
+ * - strips Mastra/Temporal setup that cannot run in the workflow sandbox
14
+ * - rewrites fluent workflow chains into deterministic exported functions
15
+ * - returns registry metadata so the entry module can re-export the right names
16
+ */
17
+ export declare function buildTemporalWorkflowModule(entryFile: string, outputDirectory: string, outputFileName: string): Promise<{
18
+ outputPath: string;
19
+ }>;
20
+ //# sourceMappingURL=workflows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/transforms/workflows.ts"],"names":[],"mappings":"AAsYA,MAAM,WAAW,4BAA4B;CAE5C;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iCAAiC;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,sBAAsB,EAAE,CAAC;CACrC;AAiUD;;;;;GAKG;AACH,wBAAsB,2BAA2B,CAC/C,SAAS,EAAE,MAAM,EACjB,eAAe,EAAE,MAAM,EACvB,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,CAwCjC"}
@@ -0,0 +1,4 @@
1
+ export type TemporalEngineType = {
2
+ step: any;
3
+ };
4
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,GAAG,CAAC;CACX,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function toWorkflowType(id: string): string;
2
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,UAGxC"}