@mastra/inngest 1.0.0-beta.9 → 1.0.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 +1184 -0
- package/dist/__tests__/adapters/_utils.d.ts +18 -0
- package/dist/__tests__/adapters/_utils.d.ts.map +1 -0
- package/dist/execution-engine.d.ts +102 -5
- package/dist/execution-engine.d.ts.map +1 -1
- package/dist/index.cjs +1039 -289
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +70 -25
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1040 -291
- package/dist/index.js.map +1 -1
- package/dist/run.d.ts +59 -51
- package/dist/run.d.ts.map +1 -1
- package/dist/serve.d.ts +66 -3
- package/dist/serve.d.ts.map +1 -1
- package/dist/types.d.ts +7 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/workflow.d.ts +5 -4
- package/dist/workflow.d.ts.map +1 -1
- package/package.json +22 -10
package/dist/run.d.ts
CHANGED
|
@@ -4,11 +4,10 @@ import type { TracingContext, TracingOptions } from '@mastra/core/observability'
|
|
|
4
4
|
import type { RequestContext } from '@mastra/core/request-context';
|
|
5
5
|
import { WorkflowRunOutput } from '@mastra/core/stream';
|
|
6
6
|
import { Run } from '@mastra/core/workflows';
|
|
7
|
-
import type { ExecutionEngine, ExecutionGraph, SerializedStepFlowEntry, Step, StepWithComponent, StreamEvent, TimeTravelContext, WorkflowEngineType, WorkflowResult, WorkflowStreamEvent } from '@mastra/core/workflows';
|
|
7
|
+
import type { ExecutionEngine, ExecutionGraph, OutputWriter, SerializedStepFlowEntry, Step, StepWithComponent, StreamEvent, TimeTravelContext, WorkflowEngineType, WorkflowResult, WorkflowStreamEvent } from '@mastra/core/workflows';
|
|
8
8
|
import type { Inngest } from 'inngest';
|
|
9
|
-
import type z from 'zod';
|
|
10
9
|
import type { InngestEngineType } from './types.js';
|
|
11
|
-
export declare class InngestRun<TEngineType = InngestEngineType, TSteps extends Step<string, any, any, any, any, any,
|
|
10
|
+
export declare class InngestRun<TEngineType = InngestEngineType, TSteps extends Step<string, any, any, any, any, any, TEngineType>[] = Step<string, unknown, unknown, unknown, unknown, unknown, TEngineType>[], TState = unknown, TInput = unknown, TOutput = unknown> extends Run<TEngineType, TSteps, TState, TInput, TOutput> {
|
|
12
11
|
#private;
|
|
13
12
|
private inngest;
|
|
14
13
|
serializedStepGraph: SerializedStepFlowEntry[];
|
|
@@ -32,15 +31,24 @@ export declare class InngestRun<TEngineType = InngestEngineType, TSteps extends
|
|
|
32
31
|
getRuns(eventId: string): Promise<any>;
|
|
33
32
|
getRunOutput(eventId: string, maxWaitMs?: number): Promise<any>;
|
|
34
33
|
cancel(): Promise<void>;
|
|
35
|
-
start(
|
|
36
|
-
inputData?:
|
|
34
|
+
start(args: (TInput extends unknown ? {
|
|
35
|
+
inputData?: TInput;
|
|
36
|
+
} : {
|
|
37
|
+
inputData: TInput;
|
|
38
|
+
}) & (TState extends unknown ? {
|
|
39
|
+
initialState?: TState;
|
|
40
|
+
} : {
|
|
41
|
+
initialState: TState;
|
|
42
|
+
}) & {
|
|
37
43
|
requestContext?: RequestContext;
|
|
38
|
-
|
|
44
|
+
outputWriter?: OutputWriter;
|
|
45
|
+
tracingContext?: TracingContext;
|
|
39
46
|
tracingOptions?: TracingOptions;
|
|
40
47
|
outputOptions?: {
|
|
41
48
|
includeState?: boolean;
|
|
42
49
|
includeResumeLabels?: boolean;
|
|
43
50
|
};
|
|
51
|
+
perStep?: boolean;
|
|
44
52
|
}): Promise<WorkflowResult<TState, TInput, TOutput, TSteps>>;
|
|
45
53
|
/**
|
|
46
54
|
* Starts the workflow execution without waiting for completion (fire-and-forget).
|
|
@@ -48,44 +56,54 @@ export declare class InngestRun<TEngineType = InngestEngineType, TSteps extends
|
|
|
48
56
|
* The workflow executes independently in Inngest.
|
|
49
57
|
* Use this when you don't need to wait for the result or want to avoid polling failures.
|
|
50
58
|
*/
|
|
51
|
-
startAsync(
|
|
52
|
-
inputData?:
|
|
59
|
+
startAsync(args: (TInput extends unknown ? {
|
|
60
|
+
inputData?: TInput;
|
|
61
|
+
} : {
|
|
62
|
+
inputData: TInput;
|
|
63
|
+
}) & (TState extends unknown ? {
|
|
64
|
+
initialState?: TState;
|
|
65
|
+
} : {
|
|
66
|
+
initialState: TState;
|
|
67
|
+
}) & {
|
|
53
68
|
requestContext?: RequestContext;
|
|
54
|
-
initialState?: z.infer<TState>;
|
|
55
69
|
tracingOptions?: TracingOptions;
|
|
56
70
|
outputOptions?: {
|
|
57
71
|
includeState?: boolean;
|
|
58
72
|
includeResumeLabels?: boolean;
|
|
59
73
|
};
|
|
74
|
+
perStep?: boolean;
|
|
60
75
|
}): Promise<{
|
|
61
76
|
runId: string;
|
|
62
77
|
}>;
|
|
63
|
-
_start({ inputData, initialState, outputOptions, tracingOptions, format, requestContext, }: {
|
|
64
|
-
inputData?:
|
|
78
|
+
_start({ inputData, initialState, outputOptions, tracingOptions, format, requestContext, perStep, }: {
|
|
79
|
+
inputData?: TInput;
|
|
65
80
|
requestContext?: RequestContext;
|
|
66
|
-
initialState?:
|
|
81
|
+
initialState?: TState;
|
|
67
82
|
tracingOptions?: TracingOptions;
|
|
68
83
|
outputOptions?: {
|
|
69
84
|
includeState?: boolean;
|
|
70
85
|
includeResumeLabels?: boolean;
|
|
71
86
|
};
|
|
72
87
|
format?: 'legacy' | 'vnext' | undefined;
|
|
88
|
+
perStep?: boolean;
|
|
73
89
|
}): Promise<WorkflowResult<TState, TInput, TOutput, TSteps>>;
|
|
74
|
-
resume<
|
|
75
|
-
resumeData?:
|
|
76
|
-
step: Step<string, any, any,
|
|
90
|
+
resume<TResume>(params: {
|
|
91
|
+
resumeData?: TResume;
|
|
92
|
+
step: Step<string, any, any, TResume, any> | [...Step<string, any, any, any, any>[], Step<string, any, any, TResume, any>] | string | string[];
|
|
77
93
|
requestContext?: RequestContext;
|
|
94
|
+
perStep?: boolean;
|
|
78
95
|
}): Promise<WorkflowResult<TState, TInput, TOutput, TSteps>>;
|
|
79
|
-
_resume<
|
|
80
|
-
resumeData?:
|
|
81
|
-
step: Step<string, any, any,
|
|
96
|
+
_resume<TResume>(params: {
|
|
97
|
+
resumeData?: TResume;
|
|
98
|
+
step: Step<string, any, any, TResume, any> | [...Step<string, any, any, any, any>[], Step<string, any, any, TResume, any>] | string | string[];
|
|
82
99
|
requestContext?: RequestContext;
|
|
100
|
+
perStep?: boolean;
|
|
83
101
|
}): Promise<WorkflowResult<TState, TInput, TOutput, TSteps>>;
|
|
84
|
-
timeTravel<
|
|
85
|
-
inputData?:
|
|
102
|
+
timeTravel<TInput>(params: {
|
|
103
|
+
inputData?: TInput;
|
|
86
104
|
resumeData?: any;
|
|
87
|
-
initialState?:
|
|
88
|
-
step: Step<string, any,
|
|
105
|
+
initialState?: TState;
|
|
106
|
+
step: Step<string, any, TInput, any, any> | [...Step<string, any, any, any, any>[], Step<string, any, TInput, any, any>] | string | string[];
|
|
89
107
|
context?: TimeTravelContext<any, any, any, any>;
|
|
90
108
|
nestedStepsContext?: Record<string, TimeTravelContext<any, any, any, any>>;
|
|
91
109
|
requestContext?: RequestContext;
|
|
@@ -94,12 +112,13 @@ export declare class InngestRun<TEngineType = InngestEngineType, TSteps extends
|
|
|
94
112
|
includeState?: boolean;
|
|
95
113
|
includeResumeLabels?: boolean;
|
|
96
114
|
};
|
|
115
|
+
perStep?: boolean;
|
|
97
116
|
}): Promise<WorkflowResult<TState, TInput, TOutput, TSteps>>;
|
|
98
|
-
_timeTravel<
|
|
99
|
-
inputData?:
|
|
117
|
+
_timeTravel<TInput>(params: {
|
|
118
|
+
inputData?: TInput;
|
|
100
119
|
resumeData?: any;
|
|
101
|
-
initialState?:
|
|
102
|
-
step: Step<string, any,
|
|
120
|
+
initialState?: TState;
|
|
121
|
+
step: Step<string, any, TInput, any, any> | [...Step<string, any, any, any, any>[], Step<string, any, TInput, any, any>] | string | string[];
|
|
103
122
|
context?: TimeTravelContext<any, any, any, any>;
|
|
104
123
|
nestedStepsContext?: Record<string, TimeTravelContext<any, any, any, any>>;
|
|
105
124
|
requestContext?: RequestContext;
|
|
@@ -108,55 +127,44 @@ export declare class InngestRun<TEngineType = InngestEngineType, TSteps extends
|
|
|
108
127
|
includeState?: boolean;
|
|
109
128
|
includeResumeLabels?: boolean;
|
|
110
129
|
};
|
|
111
|
-
|
|
130
|
+
perStep?: boolean;
|
|
131
|
+
}): Promise<any>;
|
|
112
132
|
watch(cb: (event: WorkflowStreamEvent) => void): () => void;
|
|
113
133
|
streamLegacy({ inputData, requestContext }?: {
|
|
114
|
-
inputData?:
|
|
134
|
+
inputData?: TInput;
|
|
115
135
|
requestContext?: RequestContext;
|
|
116
136
|
}): {
|
|
117
137
|
stream: ReadableStream<StreamEvent>;
|
|
118
138
|
getWorkflowState: () => Promise<WorkflowResult<TState, TInput, TOutput, TSteps>>;
|
|
119
139
|
};
|
|
120
|
-
stream({ inputData, requestContext, tracingOptions, closeOnSuspend, initialState, outputOptions, }?: {
|
|
121
|
-
inputData?:
|
|
122
|
-
requestContext?: RequestContext;
|
|
123
|
-
tracingContext?: TracingContext;
|
|
124
|
-
tracingOptions?: TracingOptions;
|
|
125
|
-
closeOnSuspend?: boolean;
|
|
126
|
-
initialState?: z.input<TState>;
|
|
127
|
-
outputOptions?: {
|
|
128
|
-
includeState?: boolean;
|
|
129
|
-
includeResumeLabels?: boolean;
|
|
130
|
-
};
|
|
131
|
-
}): ReturnType<Run<InngestEngineType, TSteps, TState, TInput, TOutput>['stream']>;
|
|
132
|
-
streamVNext(args?: {
|
|
133
|
-
inputData?: z.input<TInput>;
|
|
140
|
+
stream({ inputData, requestContext, tracingOptions, closeOnSuspend, initialState, outputOptions, perStep, }?: {
|
|
141
|
+
inputData?: TInput;
|
|
134
142
|
requestContext?: RequestContext;
|
|
135
143
|
tracingContext?: TracingContext;
|
|
136
144
|
tracingOptions?: TracingOptions;
|
|
137
145
|
closeOnSuspend?: boolean;
|
|
138
|
-
initialState?:
|
|
146
|
+
initialState?: TState;
|
|
139
147
|
outputOptions?: {
|
|
140
148
|
includeState?: boolean;
|
|
141
149
|
includeResumeLabels?: boolean;
|
|
142
150
|
};
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
151
|
+
perStep?: boolean;
|
|
152
|
+
}): WorkflowRunOutput<WorkflowResult<TState, TInput, TOutput, TSteps>>;
|
|
153
|
+
timeTravelStream<TTravelInput>({ inputData, resumeData, initialState, step, context, nestedStepsContext, requestContext, tracingOptions, outputOptions, perStep, }: {
|
|
154
|
+
inputData?: TTravelInput;
|
|
155
|
+
initialState?: TState;
|
|
147
156
|
resumeData?: any;
|
|
148
|
-
step: Step<string, any,
|
|
149
|
-
...Step<string, any, any, any, any, any, TEngineType>[],
|
|
150
|
-
Step<string, any, TInputSchema, any, any, any, TEngineType>
|
|
151
|
-
] | string | string[];
|
|
157
|
+
step: Step<string, any, any, any, any, any, TEngineType> | [...Step<string, any, any, any, any, any, TEngineType>[], Step<string, any, any, any, any, any, TEngineType>] | string | string[];
|
|
152
158
|
context?: TimeTravelContext<any, any, any, any>;
|
|
153
159
|
nestedStepsContext?: Record<string, TimeTravelContext<any, any, any, any>>;
|
|
154
160
|
requestContext?: RequestContext;
|
|
161
|
+
tracingContext?: TracingContext;
|
|
155
162
|
tracingOptions?: TracingOptions;
|
|
156
163
|
outputOptions?: {
|
|
157
164
|
includeState?: boolean;
|
|
158
165
|
includeResumeLabels?: boolean;
|
|
159
166
|
};
|
|
167
|
+
perStep?: boolean;
|
|
160
168
|
}): WorkflowRunOutput<WorkflowResult<TState, TInput, TOutput, TSteps>>;
|
|
161
169
|
/**
|
|
162
170
|
* Hydrates errors in a failed workflow result back to proper Error instances.
|
package/dist/run.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGjD,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AAE,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,WAAW,CAAC,CAAC,GAC7G,MAAM,GACN,MAAM,EAAE,CAAC;QACb,OAAO,CAAC,EAAE,iBAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;QAChD,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;QAC3E,cAAc,CAAC,EAAE,cAAc,CAAC;QAChC,cAAc,CAAC,EAAE,cAAc,CAAC;QAChC,cAAc,CAAC,EAAE,cAAc,CAAC;QAChC,aAAa,CAAC,EAAE;YACd,YAAY,CAAC,EAAE,OAAO,CAAC;YACvB,mBAAmB,CAAC,EAAE,OAAO,CAAC;SAC/B,CAAC;QACF,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB;IAoED;;;OAGG;IACH,OAAO,CAAC,mBAAmB;CAU5B"}
|
package/dist/serve.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { Mastra } from '@mastra/core/mastra';
|
|
2
2
|
import type { Inngest, InngestFunction, RegisterOptions } from 'inngest';
|
|
3
|
-
import { serve as
|
|
4
|
-
|
|
3
|
+
import { serve as inngestServeHono } from 'inngest/hono';
|
|
4
|
+
/**
|
|
5
|
+
* Options for serve functions
|
|
6
|
+
*/
|
|
7
|
+
export interface MastraServeOptions {
|
|
5
8
|
mastra: Mastra;
|
|
6
9
|
inngest: Inngest;
|
|
7
10
|
/**
|
|
@@ -9,5 +12,65 @@ export declare function serve({ mastra, inngest, functions: userFunctions, regis
|
|
|
9
12
|
*/
|
|
10
13
|
functions?: InngestFunction.Like[];
|
|
11
14
|
registerOptions?: RegisterOptions;
|
|
12
|
-
}
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Type for inngest serve adapters (e.g., from inngest/hono, inngest/express, etc.)
|
|
18
|
+
* Inferred from the inngest serve function signatures.
|
|
19
|
+
*/
|
|
20
|
+
export type InngestServeAdapter<THandler> = (options: {
|
|
21
|
+
client: Inngest;
|
|
22
|
+
functions: InngestFunction.Like[];
|
|
23
|
+
[key: string]: unknown;
|
|
24
|
+
}) => THandler;
|
|
25
|
+
/**
|
|
26
|
+
* Factory function to create a serve function with any inngest adapter.
|
|
27
|
+
* Use this to integrate Mastra workflows with any framework supported by inngest.
|
|
28
|
+
*
|
|
29
|
+
* @example Express
|
|
30
|
+
* ```ts
|
|
31
|
+
* import { createServe } from '@mastra/inngest';
|
|
32
|
+
* import { serve } from 'inngest/express';
|
|
33
|
+
*
|
|
34
|
+
* const serveExpress = createServe(serve);
|
|
35
|
+
* app.use('/api/inngest', serveExpress({ mastra, inngest }));
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @example Fastify
|
|
39
|
+
* ```ts
|
|
40
|
+
* import { createServe } from '@mastra/inngest';
|
|
41
|
+
* import { serve } from 'inngest/fastify';
|
|
42
|
+
*
|
|
43
|
+
* const serveFastify = createServe(serve);
|
|
44
|
+
* fastify.route({
|
|
45
|
+
* method: ['GET', 'POST', 'PUT'],
|
|
46
|
+
* handler: serveFastify({ mastra, inngest }),
|
|
47
|
+
* url: '/api/inngest',
|
|
48
|
+
* });
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* @example Next.js
|
|
52
|
+
* ```ts
|
|
53
|
+
* import { createServe } from '@mastra/inngest';
|
|
54
|
+
* import { serve } from 'inngest/next';
|
|
55
|
+
*
|
|
56
|
+
* const serveNext = createServe(serve);
|
|
57
|
+
* export const { GET, POST, PUT } = serveNext({ mastra, inngest });
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export declare function createServe<THandler>(adapter: InngestServeAdapter<THandler>): (options: MastraServeOptions) => THandler;
|
|
61
|
+
/**
|
|
62
|
+
* Serve Mastra workflows with Hono (default).
|
|
63
|
+
*
|
|
64
|
+
* For other frameworks, use `createServe` with the appropriate inngest adapter.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* import { serve } from '@mastra/inngest';
|
|
69
|
+
*
|
|
70
|
+
* app.use('/api/inngest', async (c) => {
|
|
71
|
+
* return serve({ mastra, inngest })(c);
|
|
72
|
+
* });
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
export declare const serve: (options: MastraServeOptions) => ReturnType<typeof inngestServeHono>;
|
|
13
76
|
//# sourceMappingURL=serve.d.ts.map
|
package/dist/serve.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../src/serve.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AACzE,OAAO,EAAE,KAAK,IAAI,
|
|
1
|
+
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../src/serve.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AACzE,OAAO,EAAE,KAAK,IAAI,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGzD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC,IAAI,EAAE,CAAC;IACnC,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC;AAED;;;GAGG;AACH,MAAM,MAAM,mBAAmB,CAAC,QAAQ,IAAI,CAAC,OAAO,EAAE;IACpD,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,eAAe,CAAC,IAAI,EAAE,CAAC;IAClC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,KAAK,QAAQ,CAAC;AA2Bf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAClC,OAAO,EAAE,mBAAmB,CAAC,QAAQ,CAAC,GACrC,CAAC,OAAO,EAAE,kBAAkB,KAAK,QAAQ,CAK3C;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,KAAK,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,UAAU,CAAC,OAAO,gBAAgB,CACxD,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import type { Step, WorkflowConfig } from '@mastra/core/workflows';
|
|
2
|
-
import type { Inngest } from 'inngest';
|
|
3
|
-
import type z from 'zod';
|
|
2
|
+
import type { Inngest, InngestFunction } from 'inngest';
|
|
4
3
|
export type InngestCreateFunctionConfig = Parameters<Inngest['createFunction']>[0];
|
|
4
|
+
export type InngestCreateFunctionEventConfig = InngestFunction.Trigger<string>;
|
|
5
5
|
export type InngestFlowControlConfig = Pick<InngestCreateFunctionConfig, 'concurrency' | 'rateLimit' | 'throttle' | 'debounce' | 'priority'>;
|
|
6
|
-
export type
|
|
6
|
+
export type InngestFlowCronConfig<TInputData, TInitialState> = Pick<InngestCreateFunctionEventConfig, 'cron'> & {
|
|
7
|
+
inputData?: TInputData;
|
|
8
|
+
initialState?: TInitialState;
|
|
9
|
+
};
|
|
10
|
+
export type InngestWorkflowConfig<TWorkflowId extends string, TState, TInput, TOutput, TSteps extends Step[]> = WorkflowConfig<TWorkflowId, TState, TInput, TOutput, TSteps> & InngestFlowControlConfig & InngestFlowCronConfig<TInput, TState>;
|
|
7
11
|
export type _AssertInngestCompatibility = InngestFlowControlConfig extends Pick<Parameters<Inngest['createFunction']>[0], keyof InngestFlowControlConfig> ? true : never;
|
|
8
12
|
export declare const _compatibilityCheck: _AssertInngestCompatibility;
|
|
9
13
|
export type InngestEngineType = {
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAGxD,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACnF,MAAM,MAAM,gCAAgC,GAAG,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAG/E,MAAM,MAAM,wBAAwB,GAAG,IAAI,CACzC,2BAA2B,EAC3B,aAAa,GAAG,WAAW,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,CACnE,CAAC;AAEF,MAAM,MAAM,qBAAqB,CAAC,UAAU,EAAE,aAAa,IAAI,IAAI,CAAC,gCAAgC,EAAE,MAAM,CAAC,GAAG;IAC9G,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,YAAY,CAAC,EAAE,aAAa,CAAC;CAC9B,CAAC;AAGF,MAAM,MAAM,qBAAqB,CAC/B,WAAW,SAAS,MAAM,EAC1B,MAAM,EACN,MAAM,EACN,OAAO,EACP,MAAM,SAAS,IAAI,EAAE,IACnB,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,GAC9D,wBAAwB,GACxB,qBAAqB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAGxC,MAAM,MAAM,2BAA2B,GACrC,wBAAwB,SAAS,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,wBAAwB,CAAC,GAC3G,IAAI,GACJ,KAAK,CAAC;AACZ,eAAO,MAAM,mBAAmB,EAAE,2BAAkC,CAAC;AAErE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,GAAG,CAAC;CACX,CAAC"}
|
package/dist/workflow.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import type { Mastra } from '@mastra/core/mastra';
|
|
2
|
-
import type {
|
|
2
|
+
import type { WorkflowRuns } from '@mastra/core/storage';
|
|
3
3
|
import { Workflow } from '@mastra/core/workflows';
|
|
4
4
|
import type { Step, StepFlowEntry, Run } from '@mastra/core/workflows';
|
|
5
5
|
import type { Inngest } from 'inngest';
|
|
6
|
-
import type { z } from 'zod';
|
|
7
6
|
import type { InngestEngineType, InngestWorkflowConfig } from './types.js';
|
|
8
|
-
export declare class InngestWorkflow<TEngineType = InngestEngineType, TSteps extends Step<string, any, any>[] = Step<string, any, any>[], TWorkflowId extends string = string, TState
|
|
7
|
+
export declare class InngestWorkflow<TEngineType = InngestEngineType, TSteps extends Step<string, any, any>[] = Step<string, any, any>[], TWorkflowId extends string = string, TState = unknown, TInput = unknown, TOutput = unknown, TPrevSchema = TInput> extends Workflow<TEngineType, TSteps, TWorkflowId, TState, TInput, TOutput, TPrevSchema> {
|
|
9
8
|
#private;
|
|
10
9
|
inngest: Inngest;
|
|
11
10
|
private function;
|
|
11
|
+
private cronFunction;
|
|
12
12
|
private readonly flowControlConfig?;
|
|
13
|
+
private readonly cronConfig?;
|
|
13
14
|
constructor(params: InngestWorkflowConfig<TWorkflowId, TState, TInput, TOutput, TSteps>, inngest: Inngest);
|
|
14
15
|
listWorkflowRuns(args?: {
|
|
15
16
|
fromDate?: Date;
|
|
@@ -18,12 +19,12 @@ export declare class InngestWorkflow<TEngineType = InngestEngineType, TSteps ext
|
|
|
18
19
|
page?: number;
|
|
19
20
|
resourceId?: string;
|
|
20
21
|
}): Promise<WorkflowRuns>;
|
|
21
|
-
getWorkflowRunById(runId: string): Promise<WorkflowRun | null>;
|
|
22
22
|
__registerMastra(mastra: Mastra): void;
|
|
23
23
|
createRun(options?: {
|
|
24
24
|
runId?: string;
|
|
25
25
|
resourceId?: string;
|
|
26
26
|
}): Promise<Run<TEngineType, TSteps, TState, TInput, TOutput>>;
|
|
27
|
+
private createCronFunction;
|
|
27
28
|
getFunction(): import("inngest").InngestFunction<Omit<import("inngest").InngestFunction.Options<Inngest<import("inngest").ClientOptions>, import("inngest").InngestMiddleware.Stack, import("inngest").InngestFunction.Trigger<string>[] | [{
|
|
28
29
|
cron: string;
|
|
29
30
|
} & Partial<Record<"event" | "if", never>>] | [{
|
package/dist/workflow.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../src/workflow.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../src/workflow.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,KAAK,EACV,IAAI,EAEJ,aAAa,EAGb,GAAG,EACJ,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAIvC,OAAO,KAAK,EACV,iBAAiB,EAGjB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAEjB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9D,OAAO,CAAC,kBAAkB;IAyB1B,WAAW;;;;;;;;;;;IAiLX,kBAAkB,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,EAAE;IAenF,YAAY;;;;;;;;;;;CAOb"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/inngest",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Mastra Inngest integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -30,23 +30,32 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@ai-sdk/openai": "^1.3.24",
|
|
32
32
|
"@hono/node-server": "^1.19.6",
|
|
33
|
+
"@koa/router": "^13.0.0",
|
|
34
|
+
"@types/express": "^5.0.0",
|
|
35
|
+
"@types/koa": "^3.0.0",
|
|
36
|
+
"@types/koa-bodyparser": "^4.3.13",
|
|
33
37
|
"@types/node": "22.13.17",
|
|
34
38
|
"@vitest/coverage-v8": "4.0.12",
|
|
35
39
|
"@vitest/ui": "4.0.12",
|
|
36
40
|
"ai": "^4.3.19",
|
|
37
41
|
"eslint": "^9.37.0",
|
|
38
42
|
"execa": "^9.6.0",
|
|
43
|
+
"express": "^5.1.0",
|
|
44
|
+
"fastify": "^5.6.2",
|
|
39
45
|
"get-port": "7.1.0",
|
|
40
|
-
"hono": "^4.
|
|
46
|
+
"hono": "^4.11.3",
|
|
41
47
|
"inngest-cli": "^1.12.1",
|
|
48
|
+
"koa": "^3.1.0",
|
|
49
|
+
"koa-bodyparser": "^4.4.1",
|
|
42
50
|
"tsup": "^8.5.0",
|
|
43
|
-
"typescript": "^5.
|
|
44
|
-
"vitest": "4.0.
|
|
45
|
-
"@internal/lint": "0.0.
|
|
46
|
-
"@
|
|
47
|
-
"@mastra/
|
|
48
|
-
"@
|
|
49
|
-
"@mastra/core": "1.0.0
|
|
51
|
+
"typescript": "^5.9.3",
|
|
52
|
+
"vitest": "4.0.16",
|
|
53
|
+
"@internal/lint": "0.0.54",
|
|
54
|
+
"@mastra/deployer": "1.0.0",
|
|
55
|
+
"@mastra/libsql": "1.0.0",
|
|
56
|
+
"@internal/types-builder": "0.0.29",
|
|
57
|
+
"@mastra/core": "1.0.0",
|
|
58
|
+
"@mastra/observability": "1.0.0"
|
|
50
59
|
},
|
|
51
60
|
"peerDependencies": {
|
|
52
61
|
"@mastra/core": ">=1.0.0-0 <2.0.0-0",
|
|
@@ -67,7 +76,10 @@
|
|
|
67
76
|
"scripts": {
|
|
68
77
|
"build": "tsup --silent --config tsup.config.ts",
|
|
69
78
|
"build:watch": "pnpm build --watch",
|
|
70
|
-
"test": "docker-compose up -d && vitest run --no-isolate --retry=1 && docker-compose down",
|
|
79
|
+
"test": "docker-compose up -d && vitest run --no-isolate --retry=1 --exclude='src/__tests__/adapters/**' && docker-compose down",
|
|
80
|
+
"test:unit": "vitest run --no-isolate --retry=1 --exclude='src/__tests__/adapters/**' --exclude='src/index.test.ts'",
|
|
81
|
+
"test:workflow": "docker-compose up -d && vitest run --no-isolate --retry=1 src/index.test.ts && docker-compose down",
|
|
82
|
+
"test:integration": "docker-compose up -d && vitest run --no-isolate --retry=1 src/__tests__/adapters/ && docker-compose down",
|
|
71
83
|
"lint": "eslint ."
|
|
72
84
|
}
|
|
73
85
|
}
|