@mastra/inngest 1.8.0-alpha.2 → 1.8.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 +63 -0
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,68 @@
|
|
|
1
1
|
# @mastra/inngest
|
|
2
2
|
|
|
3
|
+
## 1.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Added support for the fine-grained authorization (FGA) `actor` signal on the Inngest execution engine. ([#18674](https://github.com/mastra-ai/mastra/pull/18674))
|
|
8
|
+
|
|
9
|
+
Workflows running on the Inngest engine can now pass a trusted `actor` through `run.start()`, `startAsync()`, `resume()`, `stream()`, and `timeTravel()`. The signal is re-threaded across durable step and nested-workflow boundaries, so every nested agent, tool, and memory FGA check sees the same actor. Previously `actor` was only threaded through the default engine, so trusted background workflows on Inngest lost the membership bypass at each step re-entry.
|
|
10
|
+
|
|
11
|
+
**Usage**
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
const run = await workflow.createRun();
|
|
15
|
+
await run.start({
|
|
16
|
+
inputData,
|
|
17
|
+
requestContext, // includes organizationId / tenant scope
|
|
18
|
+
actor: { actorKind: 'system', sourceWorkflow: 'nightly-sync' },
|
|
19
|
+
});
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
- Bring `InngestAgent` (Inngest-backed durable agent) to parity with `DurableAgent` for per-call execution options, abort handling, idle-aware resume, and `generate()`. ([#18615](https://github.com/mastra-ai/mastra/pull/18615))
|
|
23
|
+
|
|
24
|
+
`InngestAgent.stream()` and `resume()` now accept the same execution-option surface as `DurableAgent`, including `stopWhen`, `activeTools`, `structuredOutput`, `versions`, `system`, `disableBackgroundTasks`, `tracingOptions`, `actor`, `transform`, `prepareStep`, `isTaskComplete`, `delegation`, function-form `requireToolApproval`, and the lifecycle callbacks `onAbort` / `onIterationComplete`. Closure-shaped options (`prepareStep`, `transform`, function-form `isTaskComplete` / `requireToolApproval`, `stopWhen` callbacks) continue to work in-process; they degrade after a worker hop the same way they do for in-memory `DurableAgent`.
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
const result = await inngestAgent.stream(messages, {
|
|
28
|
+
runId: 'run-1',
|
|
29
|
+
abortSignal: controller.signal,
|
|
30
|
+
stopWhen: stepCountIs(5),
|
|
31
|
+
onIterationComplete: ({ iteration }) => console.log('done', iteration),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
// Cancel a live run from the caller
|
|
35
|
+
result.abort();
|
|
36
|
+
|
|
37
|
+
// Resume and drive the run to completion in a single call
|
|
38
|
+
await inngestAgent.resume({ runId: 'run-1', resumeData, untilIdle: true });
|
|
39
|
+
|
|
40
|
+
// Durable equivalents of Agent.generate / resumeGenerate
|
|
41
|
+
const out = await inngestAgent.generate(messages, { runId: 'run-2' });
|
|
42
|
+
const resumed = await inngestAgent.resumeGenerate({ runId: 'run-2', resumeData });
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
`@mastra/core` re-exports `globalRunRegistry` and `runResumeDurableStreamUntilIdle` from `@mastra/core/agent/durable` so durable-agent integrations can share the same registry and idle-wrapper plumbing.
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- Fix `observe()` on Inngest durable agents so late subscribers replay buffered events before the live stream. ([#18535](https://github.com/mastra-ai/mastra/pull/18535))
|
|
50
|
+
|
|
51
|
+
Previously, calling `observe()` after a run had started — or reconnecting after a disconnect — only delivered chunks emitted from that moment on. Anything published earlier in the run was lost, including events from nested durable steps. `observe()` now replays the full history of `chunk`, `finish`, and `suspended` events for the requested `runId`, then continues on the live stream, matching the in-memory `DurableAgent` behavior.
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
// First connection kicks off the run
|
|
55
|
+
await inngestAgent.stream(messages, { runId: 'run-1' });
|
|
56
|
+
|
|
57
|
+
// Second connection replays earlier events, then continues live
|
|
58
|
+
const { fullStream } = await inngestAgent.observe('run-1');
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
When no cache is configured, an in-process cache is used as a fallback so single-process replay works out of the box. Cross-process `observe()` still requires a shared cache backend (e.g. Redis) passed via `cache` or `mastra.serverCache`.
|
|
62
|
+
|
|
63
|
+
- Updated dependencies [[`b9a2961`](https://github.com/mastra-ai/mastra/commit/b9a2961c1be81e3639c0879e58588c26dd0ae866), [`b33c77d`](https://github.com/mastra-ai/mastra/commit/b33c77d5293f14a794f3ec38dc947a6676de2764), [`1274eb3`](https://github.com/mastra-ai/mastra/commit/1274eb3a9508f579ceb3187fbce34408222d4b71), [`cdd5f93`](https://github.com/mastra-ai/mastra/commit/cdd5f939cefa67390629704dce92563ccbf492b2), [`1274eb3`](https://github.com/mastra-ai/mastra/commit/1274eb3a9508f579ceb3187fbce34408222d4b71), [`0ac14ce`](https://github.com/mastra-ai/mastra/commit/0ac14cea48e1b0a7857782153c78f7242fdf7e1a), [`9566d27`](https://github.com/mastra-ai/mastra/commit/9566d27ead3d95bdbe5a69e5a082a68222829cf2), [`8be63b0`](https://github.com/mastra-ai/mastra/commit/8be63b015fb8d72cea1220f05e7dc3bb997cc249), [`1009f77`](https://github.com/mastra-ai/mastra/commit/1009f772aa40016b49267c8566d0c29f6a16aa3c), [`1b8728a`](https://github.com/mastra-ai/mastra/commit/1b8728a57fd844205a452b0b4216d20ff60c784a), [`23c31de`](https://github.com/mastra-ai/mastra/commit/23c31de96ed8153402dcf092ac84b27a0c3638c1), [`0368766`](https://github.com/mastra-ai/mastra/commit/0368766744c7ea3df4d6059e2cc15f7bdf55f5a6), [`6f578ac`](https://github.com/mastra-ai/mastra/commit/6f578acba84930b406b2a0700b17cfdfaf5aae56), [`345eecc`](https://github.com/mastra-ai/mastra/commit/345eecce6ba519b5d987f0e10b5de4c8e5734580), [`1917c53`](https://github.com/mastra-ai/mastra/commit/1917c53b19dac43926f29c496893b0686462dca4), [`c01012f`](https://github.com/mastra-ai/mastra/commit/c01012f50368d29eb3fc3764df42d48291973d23), [`705ba98`](https://github.com/mastra-ai/mastra/commit/705ba98726d388a596e896225f237907ca6807a9), [`95857bc`](https://github.com/mastra-ai/mastra/commit/95857bcd6669da7193f503e803f0d72a2bd66be6), [`e62c108`](https://github.com/mastra-ai/mastra/commit/e62c108409dfd6a6cac0a48ec39c5cc81d24fd52), [`2866f04`](https://github.com/mastra-ai/mastra/commit/2866f04953edb78c1637fa45cc53abe24122edcb), [`ee14cae`](https://github.com/mastra-ai/mastra/commit/ee14cae244805783bde518a6142de28b744b169c), [`e84e791`](https://github.com/mastra-ai/mastra/commit/e84e79174031d7bc8793ca6c805eb38b06e7cfb1), [`c2f0b7f`](https://github.com/mastra-ai/mastra/commit/c2f0b7f1370f4428d165f51f0d1d9a48331cc257), [`213feb8`](https://github.com/mastra-ai/mastra/commit/213feb87bfdd1d8ec00ea660e218f9bcfcb34e7b), [`58e287b`](https://github.com/mastra-ai/mastra/commit/58e287b1edaf978b13745a1795989cad3826e82b), [`e420b3c`](https://github.com/mastra-ai/mastra/commit/e420b3c3ffc98bbc5b791897ea390bb47af99696), [`be875ed`](https://github.com/mastra-ai/mastra/commit/be875ed43f856742ce58529f531b5ea0ae6911f3), [`9eefdc0`](https://github.com/mastra-ai/mastra/commit/9eefdc0ac03f989718c6d835334940a977938895), [`bfbbb01`](https://github.com/mastra-ai/mastra/commit/bfbbb01bd845ba54cdc0c678c277d08a7cb847e4), [`7d112ca`](https://github.com/mastra-ai/mastra/commit/7d112ca17078479b2659b88ba1c85b936cfc111c)]:
|
|
64
|
+
- @mastra/core@1.48.0
|
|
65
|
+
|
|
3
66
|
## 1.8.0-alpha.2
|
|
4
67
|
|
|
5
68
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/inngest",
|
|
3
|
-
"version": "1.8.0
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "Mastra Inngest integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
"typescript": "^6.0.3",
|
|
62
62
|
"vitest": "4.1.8",
|
|
63
63
|
"zod": "^4.4.3",
|
|
64
|
+
"@internal/lint": "0.0.110",
|
|
65
|
+
"@internal/types-builder": "0.0.85",
|
|
64
66
|
"@internal/workflow-test-utils": "0.0.24",
|
|
65
|
-
"@mastra/
|
|
66
|
-
"@mastra/deployer": "1.48.0
|
|
67
|
-
"@mastra/
|
|
68
|
-
"@mastra/observability": "1.15.2"
|
|
69
|
-
"@internal/lint": "0.0.109",
|
|
70
|
-
"@internal/types-builder": "0.0.84"
|
|
67
|
+
"@mastra/libsql": "1.14.3",
|
|
68
|
+
"@mastra/deployer": "1.48.0",
|
|
69
|
+
"@mastra/core": "1.48.0",
|
|
70
|
+
"@mastra/observability": "1.15.2"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"@mastra/core": ">=1.13.2-0 <2.0.0-0",
|