@mastra/inngest 1.11.5-alpha.2 → 1.11.5-alpha.3

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/dist/connect.cjs CHANGED
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_src = require("./src-F0jsXKoi.cjs");
2
+ const require_src = require("./src-D-mqQKT7.cjs");
3
3
  exports.connect = require_src.connect;
package/dist/connect.js CHANGED
@@ -1 +1 @@
1
- export { i as connect } from "./src-CNBlIex4.js";
1
+ export { i as connect } from "./src-zXJQpJbZ.js";
@@ -413,6 +413,13 @@ export interface InngestAgent<TOutput = undefined> {
413
413
  succeeded: number;
414
414
  failed: number;
415
415
  }>;
416
+ /**
417
+ * The owner and lifecycle of one of this agent's runs, read from its saved workflow
418
+ * row: `running`, `suspended`, or `finished`. Undefined when the run is unknown,
419
+ * belongs to another agent, or storage is not configured.
420
+ * @internal Used by resumable chat routes to reconnect to a run.
421
+ */
422
+ __getRunRecord: Agent<any, any, TOutput>['__getRunRecord'];
416
423
  /**
417
424
  * Get the durable workflows required by this agent.
418
425
  * Called by Mastra during agent registration.
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_src = require("./src-F0jsXKoi.cjs");
2
+ const require_src = require("./src-D-mqQKT7.cjs");
3
3
  exports.InngestExecutionEngine = require_src.InngestExecutionEngine;
4
4
  exports.InngestPubSub = require_src.InngestPubSub;
5
5
  exports.InngestRun = require_src.InngestRun;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { m as InngestExecutionEngine, f as InngestPubSub, d as InngestRun, u as InngestWorkflow, p as OVERSIZED_EVENT_CHUNK_TYPE, r as _compatibilityCheck, i as connect, s as createInngestAgent, l as createInngestDurableAgenticWorkflow, a as createServe, t as createStep, n as init, c as isInngestAgent, o as serve } from "./src-CNBlIex4.js";
1
+ export { m as InngestExecutionEngine, f as InngestPubSub, d as InngestRun, u as InngestWorkflow, p as OVERSIZED_EVENT_CHUNK_TYPE, r as _compatibilityCheck, i as connect, s as createInngestAgent, l as createInngestDurableAgenticWorkflow, a as createServe, t as createStep, n as init, c as isInngestAgent, o as serve } from "./src-zXJQpJbZ.js";
@@ -4461,6 +4461,28 @@ function createInngestAgent(options) {
4461
4461
  failed: 0
4462
4462
  };
4463
4463
  },
4464
+ async __getRunRecord(runId) {
4465
+ const snapshot = await (await mastra?.getStorage()?.getStore("workflows"))?.loadWorkflowSnapshot({
4466
+ workflowName: InngestDurableStepIds.AGENTIC_LOOP,
4467
+ runId
4468
+ });
4469
+ const input = snapshot?.context?.input;
4470
+ if (!snapshot || !input || input.agentId !== agentId) return void 0;
4471
+ const parked = snapshot.status === "suspended" || snapshot.status === "running" && Object.keys(snapshot.suspendedPaths ?? {}).length > 0;
4472
+ const live = [
4473
+ "running",
4474
+ "waiting",
4475
+ "pending"
4476
+ ].includes(snapshot.status);
4477
+ return {
4478
+ agentId,
4479
+ runId,
4480
+ threadId: input.state?.threadId,
4481
+ resourceId: input.state?.resourceId,
4482
+ status: parked ? "suspended" : live ? "running" : "finished",
4483
+ updatedAt: snapshot.timestamp
4484
+ };
4485
+ },
4464
4486
  async observe(runId, observeOptions) {
4465
4487
  const observedEntry = (0, _mastra_core_agent_durable.getRunRegistryEntry)(runId, mastra);
4466
4488
  const observedAgentSpan = observedEntry?.resumeAgentSpan ?? observedEntry?.agentSpan ?? await loadRunAgentSpan(runId);
@@ -4439,6 +4439,28 @@ function createInngestAgent(options) {
4439
4439
  failed: 0
4440
4440
  };
4441
4441
  },
4442
+ async __getRunRecord(runId) {
4443
+ const snapshot = await (await mastra?.getStorage()?.getStore("workflows"))?.loadWorkflowSnapshot({
4444
+ workflowName: InngestDurableStepIds.AGENTIC_LOOP,
4445
+ runId
4446
+ });
4447
+ const input = snapshot?.context?.input;
4448
+ if (!snapshot || !input || input.agentId !== agentId) return void 0;
4449
+ const parked = snapshot.status === "suspended" || snapshot.status === "running" && Object.keys(snapshot.suspendedPaths ?? {}).length > 0;
4450
+ const live = [
4451
+ "running",
4452
+ "waiting",
4453
+ "pending"
4454
+ ].includes(snapshot.status);
4455
+ return {
4456
+ agentId,
4457
+ runId,
4458
+ threadId: input.state?.threadId,
4459
+ resourceId: input.state?.resourceId,
4460
+ status: parked ? "suspended" : live ? "running" : "finished",
4461
+ updatedAt: snapshot.timestamp
4462
+ };
4463
+ },
4442
4464
  async observe(runId, observeOptions) {
4443
4465
  const observedEntry = getRunRegistryEntry(runId, mastra);
4444
4466
  const observedAgentSpan = observedEntry?.resumeAgentSpan ?? observedEntry?.agentSpan ?? await loadRunAgentSpan(runId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/inngest",
3
- "version": "1.11.5-alpha.2",
3
+ "version": "1.11.5-alpha.3",
4
4
  "description": "Mastra Inngest integration",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -66,12 +66,12 @@
66
66
  "@internal/lint": "0.0.151",
67
67
  "@internal/types-builder": "0.0.126",
68
68
  "@internal/workflow-test-utils": "0.0.31",
69
- "@mastra/core": "1.86.0-alpha.6",
70
- "@mastra/deployer": "1.86.0-alpha.6",
71
- "@mastra/libsql": "1.32.0-alpha.0",
72
- "@mastra/memory": "1.41.3-alpha.2",
69
+ "@mastra/core": "1.86.0-alpha.9",
70
+ "@mastra/deployer": "1.86.0-alpha.9",
71
+ "@mastra/libsql": "1.32.0-alpha.3",
72
+ "@mastra/memory": "1.41.3-alpha.5",
73
73
  "@mastra/observability": "1.24.3-alpha.1",
74
- "@mastra/pg": "1.37.1-alpha.1"
74
+ "@mastra/pg": "1.38.0-alpha.4"
75
75
  },
76
76
  "peerDependencies": {
77
77
  "@mastra/core": ">=1.83.0-0 <2.0.0-0",