@mastra/inngest 1.0.0-beta.11 → 1.0.0-beta.13
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 +175 -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 +100 -2
- package/dist/execution-engine.d.ts.map +1 -1
- package/dist/index.cjs +878 -212
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +63 -28
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +879 -214
- package/dist/index.js.map +1 -1
- package/dist/run.d.ts +48 -37
- 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 +4 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/workflow.d.ts +1 -2
- package/dist/workflow.d.ts.map +1 -1
- package/package.json +18 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,180 @@
|
|
|
1
1
|
# @mastra/inngest
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.13
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- Refactor workflow and tool types to remove Zod-specific constraints ([#11814](https://github.com/mastra-ai/mastra/pull/11814))
|
|
8
|
+
|
|
9
|
+
Removed Zod-specific type constraints across all workflow implementations and tool types, replacing them with generic types. This ensures type consistency across default, evented, and inngest workflows while preparing for Zod v4 migration.
|
|
10
|
+
|
|
11
|
+
**Workflow Changes:**
|
|
12
|
+
- Removed `z.ZodObject<any>` and `z.ZodType<any>` constraints from all workflow generic types
|
|
13
|
+
- Updated method signatures to use `TInput` and `TState` directly instead of `z.infer<TInput>` and `z.infer<TState>`
|
|
14
|
+
- Aligned conditional types across all workflow implementations using `TInput extends unknown` pattern
|
|
15
|
+
- Fixed `TSteps` generic to properly use `TEngineType` instead of `any`
|
|
16
|
+
|
|
17
|
+
**Tool Changes:**
|
|
18
|
+
- Removed Zod schema constraints from `ToolExecutionContext` and related interfaces
|
|
19
|
+
- Simplified type parameters from `TSuspendSchema extends ZodLikeSchema` to `TSuspend` and `TResume`
|
|
20
|
+
- Updated tool execution context types to use generic types
|
|
21
|
+
|
|
22
|
+
**Type Utilities:**
|
|
23
|
+
- Refactored type helpers to work with generic schemas instead of Zod-specific types
|
|
24
|
+
- Updated type extraction utilities for better compatibility
|
|
25
|
+
|
|
26
|
+
This change maintains backward compatibility while improving type consistency and preparing for Zod v4 support across all affected packages.
|
|
27
|
+
|
|
28
|
+
- **Breaking Change**: Convert OUTPUT generic from `OutputSchema` constraint to plain generic ([#11741](https://github.com/mastra-ai/mastra/pull/11741))
|
|
29
|
+
|
|
30
|
+
This change removes the direct dependency on Zod typings in the public API by converting all `OUTPUT extends OutputSchema` generic constraints to plain `OUTPUT` generics throughout the codebase. This is preparation for moving to a standard schema approach.
|
|
31
|
+
- All generic type parameters previously constrained to `OutputSchema` (e.g., `<OUTPUT extends OutputSchema = undefined>`) are now plain generics with defaults (e.g., `<OUTPUT = undefined>`)
|
|
32
|
+
- Affects all public APIs including `Agent`, `MastraModelOutput`, `AgentExecutionOptions`, and stream/generate methods
|
|
33
|
+
- `InferSchemaOutput<OUTPUT>` replaced with `OUTPUT` throughout
|
|
34
|
+
- `PartialSchemaOutput<OUTPUT>` replaced with `Partial<OUTPUT>`
|
|
35
|
+
- Schema fields now use `NonNullable<OutputSchema<OUTPUT>>` instead of `OUTPUT` directly
|
|
36
|
+
- Added `FullOutput<OUTPUT>` type representing complete output with all fields
|
|
37
|
+
- Added `AgentExecutionOptionsBase<OUTPUT>` type
|
|
38
|
+
- `getFullOutput()` method now returns `Promise<FullOutput<OUTPUT>>`
|
|
39
|
+
- `Agent` class now generic: `Agent<TAgentId, TTools, TOutput>`
|
|
40
|
+
- `agent.generate()` and `agent.stream()` methods have updated signatures
|
|
41
|
+
- `MastraModelOutput<OUTPUT>` no longer requires `OutputSchema` constraint
|
|
42
|
+
- Network route and streaming APIs updated to use plain OUTPUT generic
|
|
43
|
+
|
|
44
|
+
**Before:**
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
const output = await agent.generate<z.ZodType>({
|
|
48
|
+
messages: [...],
|
|
49
|
+
structuredOutput: { schema: mySchema }
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
**After:**
|
|
53
|
+
const output = await agent.generate<z.infer<typeof mySchema>>({
|
|
54
|
+
messages: [...],
|
|
55
|
+
structuredOutput: { schema: mySchema }
|
|
56
|
+
});
|
|
57
|
+
// Or rely on type inference:
|
|
58
|
+
const output = await agent.generate({
|
|
59
|
+
messages: [...],
|
|
60
|
+
structuredOutput: { schema: mySchema }
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Patch Changes
|
|
66
|
+
|
|
67
|
+
- Improved TypeScript type inference for workflow steps. ([#11953](https://github.com/mastra-ai/mastra/pull/11953))
|
|
68
|
+
|
|
69
|
+
**What changed:**
|
|
70
|
+
- Step input/output type mismatches are now caught at compile time when chaining steps with `.then()`
|
|
71
|
+
- The `execute` function now properly infers types from `inputSchema`, `outputSchema`, `stateSchema`, and other schema parameters
|
|
72
|
+
- Clearer error messages when step types don't match workflow requirements
|
|
73
|
+
|
|
74
|
+
**Why:**
|
|
75
|
+
Previously, type errors in workflow step chains would only surface at runtime. Now TypeScript validates that each step's input requirements are satisfied by the previous step's output, helping you catch integration issues earlier in development.
|
|
76
|
+
|
|
77
|
+
- Fix custom error properties being lost through Inngest serialization ([#11962](https://github.com/mastra-ai/mastra/pull/11962))
|
|
78
|
+
|
|
79
|
+
Inngest's error serialization only captures standard Error properties (message, name, stack, code, cause). Custom properties like `statusCode`, `responseHeaders`, or `isRetryable` from API/AI SDK errors were being stripped during serialization. Errors are now wrapped with a cause structure that preserves custom properties through the serialization boundary.
|
|
80
|
+
|
|
81
|
+
- Real-time span export for Inngest workflow engine ([#11973](https://github.com/mastra-ai/mastra/pull/11973))
|
|
82
|
+
- Spans are now exported immediately when created and ended, instead of being batched at workflow completion
|
|
83
|
+
- Added durable span lifecycle hooks (`createStepSpan`, `endStepSpan`, `errorStepSpan`, `createChildSpan`, `endChildSpan`, `errorChildSpan`) that wrap span operations in Inngest's `step.run()` for memoization
|
|
84
|
+
- Added `rebuildSpan()` method to reconstruct span objects from exported data after Inngest replay
|
|
85
|
+
- Fixed nested workflow step spans missing output data
|
|
86
|
+
- Spans correctly maintain parent-child relationships across Inngest's durable execution boundaries using `tracingIds`
|
|
87
|
+
|
|
88
|
+
- Fix observability tracing for Inngest workflows ([#11885](https://github.com/mastra-ai/mastra/pull/11885))
|
|
89
|
+
- Use SpanCollector to capture span hierarchy during execution and create real spans in the memoized finalize step
|
|
90
|
+
- Fix span timing by using step result `startedAt`/`endedAt` (memoized by Inngest) instead of replay-time timestamps
|
|
91
|
+
- Ensures proper parent-child span relationships and accurate durations in traces
|
|
92
|
+
- Multi-replica safe: no shared state needed across server instances
|
|
93
|
+
|
|
94
|
+
- Updated dependencies [[`ebae12a`](https://github.com/mastra-ai/mastra/commit/ebae12a2dd0212e75478981053b148a2c246962d), [`c61a0a5`](https://github.com/mastra-ai/mastra/commit/c61a0a5de4904c88fd8b3718bc26d1be1c2ec6e7), [`69136e7`](https://github.com/mastra-ai/mastra/commit/69136e748e32f57297728a4e0f9a75988462f1a7), [`449aed2`](https://github.com/mastra-ai/mastra/commit/449aed2ba9d507b75bf93d427646ea94f734dfd1), [`eb648a2`](https://github.com/mastra-ai/mastra/commit/eb648a2cc1728f7678768dd70cd77619b448dab9), [`0131105`](https://github.com/mastra-ai/mastra/commit/0131105532e83bdcbb73352fc7d0879eebf140dc), [`9d5059e`](https://github.com/mastra-ai/mastra/commit/9d5059eae810829935fb08e81a9bb7ecd5b144a7), [`ef756c6`](https://github.com/mastra-ai/mastra/commit/ef756c65f82d16531c43f49a27290a416611e526), [`b00ccd3`](https://github.com/mastra-ai/mastra/commit/b00ccd325ebd5d9e37e34dd0a105caae67eb568f), [`3bdfa75`](https://github.com/mastra-ai/mastra/commit/3bdfa7507a91db66f176ba8221aa28dd546e464a), [`e770de9`](https://github.com/mastra-ai/mastra/commit/e770de941a287a49b1964d44db5a5763d19890a6), [`52e2716`](https://github.com/mastra-ai/mastra/commit/52e2716b42df6eff443de72360ae83e86ec23993), [`27b4040`](https://github.com/mastra-ai/mastra/commit/27b4040bfa1a95d92546f420a02a626b1419a1d6), [`610a70b`](https://github.com/mastra-ai/mastra/commit/610a70bdad282079f0c630e0d7bb284578f20151), [`8dc7f55`](https://github.com/mastra-ai/mastra/commit/8dc7f55900395771da851dc7d78d53ae84fe34ec), [`8379099`](https://github.com/mastra-ai/mastra/commit/8379099fc467af6bef54dd7f80c9bd75bf8bbddf), [`8c0ec25`](https://github.com/mastra-ai/mastra/commit/8c0ec25646c8a7df253ed1e5ff4863a0d3f1316c), [`ff4d9a6`](https://github.com/mastra-ai/mastra/commit/ff4d9a6704fc87b31a380a76ed22736fdedbba5a), [`69821ef`](https://github.com/mastra-ai/mastra/commit/69821ef806482e2c44e2197ac0b050c3fe3a5285), [`1ed5716`](https://github.com/mastra-ai/mastra/commit/1ed5716830867b3774c4a1b43cc0d82935f32b96), [`4186bdd`](https://github.com/mastra-ai/mastra/commit/4186bdd00731305726fa06adba0b076a1d50b49f), [`7aaf973`](https://github.com/mastra-ai/mastra/commit/7aaf973f83fbbe9521f1f9e7a4fd99b8de464617)]:
|
|
95
|
+
- @mastra/core@1.0.0-beta.22
|
|
96
|
+
|
|
97
|
+
## 1.0.0-beta.12
|
|
98
|
+
|
|
99
|
+
### Minor Changes
|
|
100
|
+
|
|
101
|
+
- Added `createServe` factory function to support multiple web framework adapters for Inngest workflows. ([#11667](https://github.com/mastra-ai/mastra/pull/11667))
|
|
102
|
+
|
|
103
|
+
Previously, the `serve` function only supported Hono. Now you can use any framework adapter provided by the Inngest package (Express, Fastify, Koa, Next.js, and more).
|
|
104
|
+
|
|
105
|
+
**Before (Hono only)**
|
|
106
|
+
|
|
107
|
+
```typescript
|
|
108
|
+
import { serve } from '@mastra/inngest';
|
|
109
|
+
|
|
110
|
+
// Only worked with Hono
|
|
111
|
+
app.all('/api/inngest', c => serve({ mastra, inngest })(c));
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**After (any framework)**
|
|
115
|
+
|
|
116
|
+
```typescript
|
|
117
|
+
import { createServe } from '@mastra/inngest';
|
|
118
|
+
import { serve as expressAdapter } from 'inngest/express';
|
|
119
|
+
import { serve as fastifyAdapter } from 'inngest/fastify';
|
|
120
|
+
|
|
121
|
+
// Express
|
|
122
|
+
app.use('/api/inngest', createServe(expressAdapter)({ mastra, inngest }));
|
|
123
|
+
|
|
124
|
+
// Fastify
|
|
125
|
+
fastify.route({
|
|
126
|
+
method: ['GET', 'POST', 'PUT'],
|
|
127
|
+
url: '/api/inngest',
|
|
128
|
+
handler: createServe(fastifyAdapter)({ mastra, inngest }),
|
|
129
|
+
});
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
The existing `serve` export remains available for backward compatibility with Hono.
|
|
133
|
+
|
|
134
|
+
Fixes #10053
|
|
135
|
+
|
|
136
|
+
### Patch Changes
|
|
137
|
+
|
|
138
|
+
- Add additional context to workflow `onFinish` and `onError` callbacks ([#11705](https://github.com/mastra-ai/mastra/pull/11705))
|
|
139
|
+
|
|
140
|
+
The `onFinish` and `onError` lifecycle callbacks now receive additional properties:
|
|
141
|
+
- `runId` - The unique identifier for the workflow run
|
|
142
|
+
- `workflowId` - The workflow's identifier
|
|
143
|
+
- `resourceId` - Optional resource identifier (if provided when creating the run)
|
|
144
|
+
- `getInitData()` - Function that returns the initial input data passed to the workflow
|
|
145
|
+
- `mastra` - The Mastra instance (if workflow is registered with Mastra)
|
|
146
|
+
- `requestContext` - Request-scoped context data
|
|
147
|
+
- `logger` - The workflow's logger instance
|
|
148
|
+
- `state` - The workflow's current state object
|
|
149
|
+
|
|
150
|
+
```typescript
|
|
151
|
+
const workflow = createWorkflow({
|
|
152
|
+
id: 'order-processing',
|
|
153
|
+
inputSchema: z.object({ orderId: z.string() }),
|
|
154
|
+
outputSchema: z.object({ status: z.string() }),
|
|
155
|
+
options: {
|
|
156
|
+
onFinish: async ({ runId, workflowId, getInitData, logger, state, mastra }) => {
|
|
157
|
+
const inputData = getInitData();
|
|
158
|
+
logger.info(`Workflow ${workflowId} run ${runId} completed`, {
|
|
159
|
+
orderId: inputData.orderId,
|
|
160
|
+
finalState: state,
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
// Access other Mastra components if needed
|
|
164
|
+
const agent = mastra?.getAgent('notification-agent');
|
|
165
|
+
},
|
|
166
|
+
onError: async ({ runId, workflowId, error, logger, requestContext }) => {
|
|
167
|
+
logger.error(`Workflow ${workflowId} run ${runId} failed: ${error?.message}`);
|
|
168
|
+
// Access request context for additional debugging
|
|
169
|
+
const userId = requestContext.get('userId');
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
});
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
- Updated dependencies [[`08766f1`](https://github.com/mastra-ai/mastra/commit/08766f15e13ac0692fde2a8bd366c2e16e4321df), [`ae8baf7`](https://github.com/mastra-ai/mastra/commit/ae8baf7d8adcb0ff9dac11880400452bc49b33ff), [`cfabdd4`](https://github.com/mastra-ai/mastra/commit/cfabdd4aae7a726b706942d6836eeca110fb6267), [`a0e437f`](https://github.com/mastra-ai/mastra/commit/a0e437fac561b28ee719e0302d72b2f9b4c138f0), [`bec5efd`](https://github.com/mastra-ai/mastra/commit/bec5efde96653ccae6604e68c696d1bc6c1a0bf5), [`9eedf7d`](https://github.com/mastra-ai/mastra/commit/9eedf7de1d6e0022a2f4e5e9e6fe1ec468f9b43c)]:
|
|
176
|
+
- @mastra/core@1.0.0-beta.21
|
|
177
|
+
|
|
3
178
|
## 1.0.0-beta.11
|
|
4
179
|
|
|
5
180
|
### Patch Changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Mastra } from '@mastra/core/mastra';
|
|
2
|
+
import { Inngest } from 'inngest';
|
|
3
|
+
import type { InngestWorkflow } from '../../workflow.js';
|
|
4
|
+
export declare const INNGEST_PORT = 4000;
|
|
5
|
+
export declare const HANDLER_PORT = 4001;
|
|
6
|
+
export declare function createTestInngest(id: string): Inngest<{
|
|
7
|
+
id: string;
|
|
8
|
+
baseUrl: string;
|
|
9
|
+
}>;
|
|
10
|
+
export declare function resetInngest(): Promise<void>;
|
|
11
|
+
export declare function waitForInngestSync(ms?: number): Promise<void>;
|
|
12
|
+
export interface TestWorkflowResult {
|
|
13
|
+
workflow: InngestWorkflow<any, any, any>;
|
|
14
|
+
mastra: Mastra;
|
|
15
|
+
inngest: Inngest;
|
|
16
|
+
}
|
|
17
|
+
export declare function createTestWorkflow(adapterId: string): TestWorkflowResult;
|
|
18
|
+
//# sourceMappingURL=_utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_utils.d.ts","sourceRoot":"","sources":["../../../src/__tests__/adapters/_utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAIlC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,eAAO,MAAM,YAAY,OAAO,CAAC;AACjC,eAAO,MAAM,YAAY,OAAO,CAAC;AAEjC,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM;;;GAK3C;AAED,wBAAsB,YAAY,kBAIjC;AAED,wBAAsB,kBAAkB,CAAC,EAAE,SAAO,iBAEjD;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,kBAAkB,CA0CxE"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RequestContext } from '@mastra/core/di';
|
|
1
2
|
import type { SerializedError } from '@mastra/core/error';
|
|
2
3
|
import type { PubSub } from '@mastra/core/events';
|
|
3
4
|
import type { Mastra } from '@mastra/core/mastra';
|
|
@@ -55,8 +56,15 @@ export declare class InngestExecutionEngine extends DefaultExecutionEngine {
|
|
|
55
56
|
executeSleepUntilDate(date: Date, sleepUntilId: string, workflowId: string): Promise<void>;
|
|
56
57
|
/**
|
|
57
58
|
* Wrap durable operations in Inngest step.run() for durability.
|
|
58
|
-
*
|
|
59
|
-
*
|
|
59
|
+
*
|
|
60
|
+
* IMPORTANT: Errors are wrapped with a cause structure before throwing.
|
|
61
|
+
* This is necessary because Inngest's error serialization (serialize-error-cjs)
|
|
62
|
+
* only captures standard Error properties (message, name, stack, code, cause).
|
|
63
|
+
* Custom properties like statusCode, responseHeaders from AI SDK errors would
|
|
64
|
+
* be lost. By putting our serialized error (via getErrorFromUnknown with toJSON())
|
|
65
|
+
* in the cause property, we ensure custom properties survive serialization.
|
|
66
|
+
* The cause property is in serialize-error-cjs's allowlist, and when the cause
|
|
67
|
+
* object is finally JSON.stringify'd, our error's toJSON() is called.
|
|
60
68
|
*/
|
|
61
69
|
wrapDurableOperation<T>(operationId: string, operationFn: () => Promise<T>): Promise<T>;
|
|
62
70
|
/**
|
|
@@ -73,6 +81,12 @@ export declare class InngestExecutionEngine extends DefaultExecutionEngine {
|
|
|
73
81
|
error?: any;
|
|
74
82
|
steps: Record<string, any>;
|
|
75
83
|
tripwire?: any;
|
|
84
|
+
runId: string;
|
|
85
|
+
workflowId: string;
|
|
86
|
+
resourceId?: string;
|
|
87
|
+
input?: any;
|
|
88
|
+
requestContext: RequestContext;
|
|
89
|
+
state: Record<string, any>;
|
|
76
90
|
}): Promise<void>;
|
|
77
91
|
/**
|
|
78
92
|
* Actually invoke the lifecycle callbacks. Called from workflow.ts finalize step.
|
|
@@ -83,6 +97,89 @@ export declare class InngestExecutionEngine extends DefaultExecutionEngine {
|
|
|
83
97
|
error?: any;
|
|
84
98
|
steps: Record<string, any>;
|
|
85
99
|
tripwire?: any;
|
|
100
|
+
runId: string;
|
|
101
|
+
workflowId: string;
|
|
102
|
+
resourceId?: string;
|
|
103
|
+
input?: any;
|
|
104
|
+
requestContext: RequestContext;
|
|
105
|
+
state: Record<string, any>;
|
|
106
|
+
}): Promise<void>;
|
|
107
|
+
/**
|
|
108
|
+
* Create a step span durably - on first execution, creates and exports span.
|
|
109
|
+
* On replay, returns cached span data without re-creating.
|
|
110
|
+
*/
|
|
111
|
+
createStepSpan(params: {
|
|
112
|
+
parentSpan: any;
|
|
113
|
+
stepId: string;
|
|
114
|
+
operationId: string;
|
|
115
|
+
options: {
|
|
116
|
+
name: string;
|
|
117
|
+
type: any;
|
|
118
|
+
input?: unknown;
|
|
119
|
+
entityType?: string;
|
|
120
|
+
entityId?: string;
|
|
121
|
+
tracingPolicy?: any;
|
|
122
|
+
};
|
|
123
|
+
executionContext: ExecutionContext;
|
|
124
|
+
}): Promise<any>;
|
|
125
|
+
/**
|
|
126
|
+
* End a step span durably.
|
|
127
|
+
*/
|
|
128
|
+
endStepSpan(params: {
|
|
129
|
+
span: any;
|
|
130
|
+
operationId: string;
|
|
131
|
+
endOptions: {
|
|
132
|
+
output?: unknown;
|
|
133
|
+
attributes?: Record<string, unknown>;
|
|
134
|
+
};
|
|
135
|
+
}): Promise<void>;
|
|
136
|
+
/**
|
|
137
|
+
* Record error on step span durably.
|
|
138
|
+
*/
|
|
139
|
+
errorStepSpan(params: {
|
|
140
|
+
span: any;
|
|
141
|
+
operationId: string;
|
|
142
|
+
errorOptions: {
|
|
143
|
+
error: Error;
|
|
144
|
+
attributes?: Record<string, unknown>;
|
|
145
|
+
};
|
|
146
|
+
}): Promise<void>;
|
|
147
|
+
/**
|
|
148
|
+
* Create a generic child span durably (for control-flow operations).
|
|
149
|
+
* On first execution, creates and exports span. On replay, returns cached span data.
|
|
150
|
+
*/
|
|
151
|
+
createChildSpan(params: {
|
|
152
|
+
parentSpan: any;
|
|
153
|
+
operationId: string;
|
|
154
|
+
options: {
|
|
155
|
+
name: string;
|
|
156
|
+
type: any;
|
|
157
|
+
input?: unknown;
|
|
158
|
+
attributes?: Record<string, unknown>;
|
|
159
|
+
};
|
|
160
|
+
executionContext: ExecutionContext;
|
|
161
|
+
}): Promise<any>;
|
|
162
|
+
/**
|
|
163
|
+
* End a generic child span durably (for control-flow operations).
|
|
164
|
+
*/
|
|
165
|
+
endChildSpan(params: {
|
|
166
|
+
span: any;
|
|
167
|
+
operationId: string;
|
|
168
|
+
endOptions?: {
|
|
169
|
+
output?: unknown;
|
|
170
|
+
attributes?: Record<string, unknown>;
|
|
171
|
+
};
|
|
172
|
+
}): Promise<void>;
|
|
173
|
+
/**
|
|
174
|
+
* Record error on a generic child span durably (for control-flow operations).
|
|
175
|
+
*/
|
|
176
|
+
errorChildSpan(params: {
|
|
177
|
+
span: any;
|
|
178
|
+
operationId: string;
|
|
179
|
+
errorOptions: {
|
|
180
|
+
error: Error;
|
|
181
|
+
attributes?: Record<string, unknown>;
|
|
182
|
+
};
|
|
86
183
|
}): Promise<void>;
|
|
87
184
|
/**
|
|
88
185
|
* Execute nested InngestWorkflow using inngestStep.invoke() for durability.
|
|
@@ -103,6 +200,7 @@ export declare class InngestExecutionEngine extends DefaultExecutionEngine {
|
|
|
103
200
|
pubsub: PubSub;
|
|
104
201
|
startedAt: number;
|
|
105
202
|
perStep?: boolean;
|
|
203
|
+
stepSpan?: any;
|
|
106
204
|
}): Promise<StepResult<any, any, any, any> | null>;
|
|
107
205
|
}
|
|
108
206
|
//# sourceMappingURL=execution-engine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-engine.d.ts","sourceRoot":"","sources":["../src/execution-engine.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"execution-engine.d.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