@mastra/core 1.87.0-alpha.13 → 1.87.0-alpha.14
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/agent/durable/index.cjs +1 -1
- package/dist/agent/durable/index.js +1 -1
- package/dist/agent/index.cjs +2 -2
- package/dist/agent/index.js +2 -2
- package/dist/agent-builder/ee/index.cjs +1 -1
- package/dist/agent-builder/ee/index.js +1 -1
- package/dist/agent-controller/index.cjs +1 -1
- package/dist/agent-controller/index.js +1 -1
- package/dist/{agent-controller-DYwtbG2-.js → agent-controller-FSjSZ_iD.js} +5 -5
- package/dist/{agent-controller-DDxEG9Nd.cjs → agent-controller-k4B293tu.cjs} +5 -5
- package/dist/background-tasks/index.cjs +1 -1
- package/dist/background-tasks/index.js +1 -1
- package/dist/{background-tasks-B8Lk1bt5.js → background-tasks-ClI6oF60.js} +1 -1
- package/dist/{background-tasks-LfQsDG6J.cjs → background-tasks-D40Y_iLc.cjs} +1 -1
- package/dist/browser/index.cjs +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/{builder-CPgUrTDP.cjs → builder-C_I6l0US.cjs} +2 -2
- package/dist/{builder-DLaSPG2u.js → builder-D00XMm41.js} +2 -2
- package/dist/channels/index.cjs +2 -2
- package/dist/channels/index.js +2 -2
- package/dist/{channels-DH9fKqmy.cjs → channels-BU5_kAUO.cjs} +1 -1
- package/dist/{channels-BPxJYR70.js → channels-DMSae7xD.js} +1 -1
- package/dist/coding-agent/index.cjs +1 -1
- package/dist/coding-agent/index.js +1 -1
- package/dist/{constants-Bou0hEgY.cjs → constants-CFO8w780.cjs} +8 -0
- package/dist/{constants-CFWgIaqA.js → constants-CUv0mU2y.js} +8 -0
- package/dist/datasets/index.cjs +2 -2
- package/dist/datasets/index.js +2 -2
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +751 -741
- package/dist/docs/references/docs-harness-schedules.md +34 -0
- package/dist/docs/references/reference-workspace-factory-sandbox.md +2 -0
- package/dist/evals/index.cjs +2 -2
- package/dist/evals/index.js +2 -2
- package/dist/evals/scoreTraces/index.cjs +2 -2
- package/dist/evals/scoreTraces/index.js +2 -2
- package/dist/harness/index.cjs +1 -1
- package/dist/harness/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/knowledge/index.cjs +1 -1
- package/dist/knowledge/index.js +1 -1
- package/dist/llm/index.cjs +3 -3
- package/dist/llm/index.js +3 -3
- package/dist/{llm-DeOr7BXy.cjs → llm-C1aiWB6O.cjs} +2 -2
- package/dist/{llm-DGa7alUy.js → llm-D5rGQSnS.js} +2 -2
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +2 -2
- package/dist/{manager-B-pQMauy.cjs → manager-B2z5f39G.cjs} +3 -3
- package/dist/{manager-BErWwr50.js → manager-DxwPLhYJ.js} +3 -3
- package/dist/mastra/index.cjs +1 -1
- package/dist/mastra/index.js +1 -1
- package/dist/{mastra-B1BKkzX0.js → mastra-CHd7UnbI.js} +16 -16
- package/dist/{mastra-CoWxmLQl.cjs → mastra-WMuI7TZD.cjs} +16 -16
- package/dist/memory/index.cjs +2 -2
- package/dist/memory/index.js +2 -2
- package/dist/{model-Bz3zffBv.js → model-B8DlLHex.js} +1 -1
- package/dist/{model-CGH6nAvh.cjs → model-C2CTzjMk.cjs} +1 -1
- package/dist/{netlify-D7oirBdu.cjs → netlify-Dhs0UJul.cjs} +1 -1
- package/dist/{netlify-CzbukKO2.js → netlify-xQFmVbr4.js} +1 -1
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/processor-provider/index.cjs +1 -1
- package/dist/processor-provider/index.js +1 -1
- package/dist/processors/index.cjs +2 -2
- package/dist/processors/index.js +2 -2
- package/dist/{provider-registry-DTaqnIYP.cjs → provider-registry-CSQPAFzz.cjs} +4 -4
- package/dist/{provider-registry-CdCkSE3h.js → provider-registry-FxVHWmht.js} +4 -4
- package/dist/{registry-generator-Dbxm-MYh.js → registry-generator-BzsrHxrr.js} +1 -1
- package/dist/{registry-generator-CcgFsigf.cjs → registry-generator-Dsh7xcz9.cjs} +1 -1
- package/dist/{rehydrate-D7eaaJxI.cjs → rehydrate-8q7KX4rD.cjs} +2 -2
- package/dist/{rehydrate-BhmzzvtV.js → rehydrate-DV1iO9eZ.js} +2 -2
- package/dist/relevance/index.cjs +2 -2
- package/dist/relevance/index.js +2 -2
- package/dist/{run-registry-59R9kE8Z.cjs → run-registry-DOlZccsr.cjs} +86 -29
- package/dist/{run-registry-Du22tS_D.js → run-registry-sTm40Ecv.js} +86 -29
- package/dist/{scheduler-B-VZUvv_.js → scheduler-0ShtMM1I.js} +71 -21
- package/dist/{scheduler-D00X03jQ.cjs → scheduler-CMjK0LoQ.cjs} +82 -20
- package/dist/storage/constants.cjs +1 -1
- package/dist/storage/constants.js +1 -1
- package/dist/storage/domains/schedules/base.d.ts +31 -2
- package/dist/storage/domains/schedules/inmemory.d.ts +9 -2
- package/dist/storage/index.cjs +3 -3
- package/dist/storage/index.js +3 -3
- package/dist/stream/index.cjs +2 -2
- package/dist/stream/index.js +2 -2
- package/dist/{stream-mYc-fHPF.cjs → stream-aGuW9AL8.cjs} +1 -1
- package/dist/{stream-C_oNulbg.js → stream-k-Q1NLUs.js} +1 -1
- package/dist/test-utils/llm-mock.cjs +1 -1
- package/dist/test-utils/llm-mock.js +1 -1
- package/dist/tool-loop-agent/index.cjs +1 -1
- package/dist/tool-loop-agent/index.js +1 -1
- package/dist/{tool-loop-agent-Du1BJO8a.js → tool-loop-agent-CJrysPOR.js} +3 -3
- package/dist/{tool-loop-agent-Bi09dOW5.cjs → tool-loop-agent-WcRtGJHn.cjs} +3 -3
- package/dist/{utils-BGq3p2MX.cjs → utils-DEzQLxWP.cjs} +1 -1
- package/dist/{utils-nyjsIsHZ.js → utils-DamF4CfD.js} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/dist/{validate-CcE7gP2j.cjs → validate-CDlONK0o.cjs} +1 -1
- package/dist/{validate-q0hhKzA4.js → validate-rum3NMFA.js} +1 -1
- package/dist/vector/index.cjs +1 -1
- package/dist/vector/index.js +1 -1
- package/dist/worker/index.cjs +1 -1
- package/dist/worker/index.js +1 -1
- package/dist/{worker-Dzfx-9D0.cjs → worker-6MiKMAqB.cjs} +3 -3
- package/dist/{worker-Wv2nS-Df.js → worker-BnXipQth.js} +2 -2
- package/dist/{worker-DmJLbaGI.cjs → worker-rwal1zI8.cjs} +2 -2
- package/dist/{worker-Dboi5I9k.js → worker-st16x0my.js} +3 -3
- package/dist/{workflow-CFfCkulP.js → workflow-BzhYKgc_.js} +3 -3
- package/dist/{workflow-BPf1-mkb.cjs → workflow-D2-gn0U0.cjs} +3 -3
- package/dist/workflows/builder/index.cjs +1 -1
- package/dist/workflows/builder/index.js +1 -1
- package/dist/workflows/evented/index.cjs +1 -1
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/index.cjs +7 -5
- package/dist/workflows/index.js +6 -6
- package/dist/workflows/scheduler/claim.d.ts +51 -0
- package/dist/workflows/scheduler/index.d.ts +2 -0
- package/package.json +8 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { standardSchemaToJSONSchema, toStandardSchema } from "./schema/index.js";
|
|
2
|
-
import { Ct as collectTemplateStepIds, Dt as validateTemplate } from "./stream-
|
|
2
|
+
import { Ct as collectTemplateStepIds, Dt as validateTemplate } from "./stream-k-Q1NLUs.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
// src/workflows/dynamic/graph.ts
|
|
5
5
|
/**
|
package/dist/vector/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_base = require("../base-BIzR1D3_.cjs");
|
|
3
3
|
const require_error = require("../error-D90lJ6M7.cjs");
|
|
4
|
-
const require_run_registry = require("../run-registry-
|
|
4
|
+
const require_run_registry = require("../run-registry-DOlZccsr.cjs");
|
|
5
5
|
const require_message_list = require("../message-list-C0F2sDNC.cjs");
|
|
6
6
|
const require_dist = require("../dist-P2rjrlmj.cjs");
|
|
7
7
|
const require_dist$1 = require("../dist-CXeCeeW7.cjs");
|
package/dist/vector/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as MastraBase } from "../base-CKLWBhDo.js";
|
|
2
2
|
import { i as MastraError, n as ErrorDomain, t as ErrorCategory } from "../error-oh2DLsP2.js";
|
|
3
|
-
import { Oa as createVectorErrorId, hn as embed$3 } from "../run-registry-
|
|
3
|
+
import { Oa as createVectorErrorId, hn as embed$3 } from "../run-registry-sTm40Ecv.js";
|
|
4
4
|
import { P as embed$2 } from "../message-list-RgFlLrxG.js";
|
|
5
5
|
import { r as embed$1 } from "../dist-TPVqg8oV.js";
|
|
6
6
|
import { n as embed } from "../dist-D3cKCUe-.js";
|
package/dist/worker/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_worker = require("../worker-
|
|
2
|
+
const require_worker = require("../worker-6MiKMAqB.cjs");
|
|
3
3
|
exports.BackgroundTaskWorker = require_worker.BackgroundTaskWorker;
|
|
4
4
|
exports.HttpRemoteStrategy = require_worker.HttpRemoteStrategy;
|
|
5
5
|
exports.InProcessStrategy = require_worker.InProcessStrategy;
|
package/dist/worker/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as BackgroundTaskWorker, s as HttpRemoteStrategy, t as InProcessStrategy, l as MastraWorker, a as OrchestrationWorker, o as PullTransport, r as SchedulerWorker, c as StepExecutionError } from "../worker-
|
|
1
|
+
export { n as BackgroundTaskWorker, s as HttpRemoteStrategy, t as InProcessStrategy, l as MastraWorker, a as OrchestrationWorker, o as PullTransport, r as SchedulerWorker, c as StepExecutionError } from "../worker-st16x0my.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_run_registry = require("./run-registry-
|
|
2
|
-
const require_scheduler = require("./scheduler-
|
|
3
|
-
const require_background_tasks = require("./background-tasks-
|
|
1
|
+
const require_run_registry = require("./run-registry-DOlZccsr.cjs");
|
|
2
|
+
const require_scheduler = require("./scheduler-CMjK0LoQ.cjs");
|
|
3
|
+
const require_background_tasks = require("./background-tasks-D40Y_iLc.cjs");
|
|
4
4
|
const require_request_context = require("./request-context-D9RXYCy8.cjs");
|
|
5
5
|
// src/worker/worker.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { xt as resolveAgentById } from "./run-registry-
|
|
1
|
+
import { xt as resolveAgentById } from "./run-registry-sTm40Ecv.js";
|
|
2
2
|
import { u as RequestContext } from "./request-context-COnZHt2-.js";
|
|
3
|
-
import { l as MastraWorker, o as PullTransport } from "./worker-
|
|
3
|
+
import { l as MastraWorker, o as PullTransport } from "./worker-st16x0my.js";
|
|
4
4
|
import { l as parseFsAgentScheduleRowId } from "./schedules-DZfSx-7P.js";
|
|
5
5
|
// src/schedules/worker.ts
|
|
6
6
|
/** PubSub topic on which the scheduler publishes `agent-schedule.fire` events. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_run_registry = require("./run-registry-
|
|
1
|
+
const require_run_registry = require("./run-registry-DOlZccsr.cjs");
|
|
2
2
|
const require_request_context = require("./request-context-D9RXYCy8.cjs");
|
|
3
|
-
const require_worker = require("./worker-
|
|
3
|
+
const require_worker = require("./worker-6MiKMAqB.cjs");
|
|
4
4
|
const require_schedules = require("./schedules-BZS8McF7.cjs");
|
|
5
5
|
// src/schedules/worker.ts
|
|
6
6
|
/** PubSub topic on which the scheduler publishes `agent-schedule.fire` events. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $s as WorkflowEventProcessor, Dc as getStepEntry, Ec as getNestedWorkflow, Fl as waitMs, Pl as assertDrainTimeout, ec as StepExecutor, tc as computeScheduleDefinitionHash, xt as resolveAgentById } from "./run-registry-
|
|
2
|
-
import { t as Scheduler } from "./scheduler-
|
|
3
|
-
import { l as BackgroundTaskManager } from "./background-tasks-
|
|
1
|
+
import { $s as WorkflowEventProcessor, Dc as getStepEntry, Ec as getNestedWorkflow, Fl as waitMs, Pl as assertDrainTimeout, ec as StepExecutor, tc as computeScheduleDefinitionHash, xt as resolveAgentById } from "./run-registry-sTm40Ecv.js";
|
|
2
|
+
import { t as Scheduler } from "./scheduler-0ShtMM1I.js";
|
|
3
|
+
import { l as BackgroundTaskManager } from "./background-tasks-ClI6oF60.js";
|
|
4
4
|
import { u as RequestContext } from "./request-context-COnZHt2-.js";
|
|
5
5
|
// src/worker/worker.ts
|
|
6
6
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { dn as resolveSuspendedToolRunId } from "./stream-
|
|
1
|
+
import { dn as resolveSuspendedToolRunId } from "./stream-k-Q1NLUs.js";
|
|
2
2
|
import "./utils-DU_pU5SK.js";
|
|
3
3
|
import { m as slimProgressChunk } from "./output-helpers-CVzhy1Y0.js";
|
|
4
|
-
import { Ks as createWorkflow, jc as createStep } from "./run-registry-
|
|
5
|
-
import { d as nextAttemptStart, f as suspendEnvelope, m as unwrapSuspendData, p as toolSuspendPayload, u as BACKGROUND_TASK_WORKFLOW_ID } from "./background-tasks-
|
|
4
|
+
import { Ks as createWorkflow, jc as createStep } from "./run-registry-sTm40Ecv.js";
|
|
5
|
+
import { d as nextAttemptStart, f as suspendEnvelope, m as unwrapSuspendData, p as toolSuspendPayload, u as BACKGROUND_TASK_WORKFLOW_ID } from "./background-tasks-ClI6oF60.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
// src/background-tasks/workflow.ts
|
|
8
8
|
const inputSchema = z.object({ taskId: z.string() });
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_stream = require("./stream-
|
|
1
|
+
const require_stream = require("./stream-aGuW9AL8.cjs");
|
|
2
2
|
require("./utils-D-eNsgDM.cjs");
|
|
3
3
|
const require_output_helpers = require("./output-helpers-DgsH4aTb.cjs");
|
|
4
|
-
const require_run_registry = require("./run-registry-
|
|
5
|
-
const require_background_tasks = require("./background-tasks-
|
|
4
|
+
const require_run_registry = require("./run-registry-DOlZccsr.cjs");
|
|
5
|
+
const require_background_tasks = require("./background-tasks-D40Y_iLc.cjs");
|
|
6
6
|
let zod = require("zod");
|
|
7
7
|
// src/background-tasks/workflow.ts
|
|
8
8
|
const inputSchema = zod.z.object({ taskId: zod.z.string() });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_builder = require("../../builder-
|
|
2
|
+
const require_builder = require("../../builder-C_I6l0US.cjs");
|
|
3
3
|
exports.WORKFLOW_BUILDER_AUTHORING_CONSTRAINTS = require_builder.WORKFLOW_BUILDER_AUTHORING_CONSTRAINTS;
|
|
4
4
|
exports.WORKFLOW_BUILDER_AUTHORING_PLAYBOOK = require_builder.WORKFLOW_BUILDER_AUTHORING_PLAYBOOK;
|
|
5
5
|
exports.WORKFLOW_BUILDER_MAPPING_CONFIG_DESCRIPTION = require_builder.WORKFLOW_BUILDER_MAPPING_CONFIG_DESCRIPTION;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { U as WORKFLOW_BUILDER_AUTHORING_CONSTRAINTS, W as WORKFLOW_BUILDER_AUTHORING_PLAYBOOK, i as WORKFLOW_BUILDER_MAPPING_CONFIG_DESCRIPTION, t as WORKFLOW_BUILDER_SUPPORTED_STEP_TYPES, B as compareWorkflowBuilderSchemas, r as createWorkflowBuilderAgent, a as deleteStoredWorkflowResponseSchema, V as inspectWorkflowBuilderSchemas, o as listStoredWorkflowsResponseSchema, n as normalizeWorkflowBuilderDefinition, H as preflightWorkflowDefinition, s as storedWorkflowDefinitionSchema, c as upsertStoredWorkflowResponseSchema, l as workflowBuilderAgentEntryInputSchema, u as workflowBuilderAgentEntrySchema, d as workflowBuilderClassifierEntryInputSchema, f as workflowBuilderClassifierEntrySchema, p as workflowBuilderConditionalEntryInputSchema, m as workflowBuilderConditionalEntrySchema, h as workflowBuilderDefinitionInputSchema, g as workflowBuilderDefinitionSchema, _ as workflowBuilderForeachEntryInputSchema, v as workflowBuilderForeachEntrySchema, y as workflowBuilderGraphEntryInputSchema, b as workflowBuilderGraphEntrySchema, x as workflowBuilderLoopEntryInputSchema, S as workflowBuilderLoopEntrySchema, C as workflowBuilderMappingConfigSchema, w as workflowBuilderMappingDescriptorSchema, T as workflowBuilderMappingEntryInputSchema, E as workflowBuilderMappingEntrySchema, D as workflowBuilderNestedWorkflowEntryInputSchema, O as workflowBuilderNestedWorkflowEntrySchema, k as workflowBuilderParallelEntryInputSchema, A as workflowBuilderParallelEntrySchema, j as workflowBuilderPredicateSchema, M as workflowBuilderScheduleConfigSchema, N as workflowBuilderScheduleSchema, P as workflowBuilderSleepEntryInputSchema, F as workflowBuilderSleepEntrySchema, I as workflowBuilderSleepUntilEntryInputSchema, L as workflowBuilderSleepUntilEntrySchema, R as workflowBuilderToolEntryInputSchema, z as workflowBuilderToolEntrySchema } from "../../builder-
|
|
1
|
+
export { U as WORKFLOW_BUILDER_AUTHORING_CONSTRAINTS, W as WORKFLOW_BUILDER_AUTHORING_PLAYBOOK, i as WORKFLOW_BUILDER_MAPPING_CONFIG_DESCRIPTION, t as WORKFLOW_BUILDER_SUPPORTED_STEP_TYPES, B as compareWorkflowBuilderSchemas, r as createWorkflowBuilderAgent, a as deleteStoredWorkflowResponseSchema, V as inspectWorkflowBuilderSchemas, o as listStoredWorkflowsResponseSchema, n as normalizeWorkflowBuilderDefinition, H as preflightWorkflowDefinition, s as storedWorkflowDefinitionSchema, c as upsertStoredWorkflowResponseSchema, l as workflowBuilderAgentEntryInputSchema, u as workflowBuilderAgentEntrySchema, d as workflowBuilderClassifierEntryInputSchema, f as workflowBuilderClassifierEntrySchema, p as workflowBuilderConditionalEntryInputSchema, m as workflowBuilderConditionalEntrySchema, h as workflowBuilderDefinitionInputSchema, g as workflowBuilderDefinitionSchema, _ as workflowBuilderForeachEntryInputSchema, v as workflowBuilderForeachEntrySchema, y as workflowBuilderGraphEntryInputSchema, b as workflowBuilderGraphEntrySchema, x as workflowBuilderLoopEntryInputSchema, S as workflowBuilderLoopEntrySchema, C as workflowBuilderMappingConfigSchema, w as workflowBuilderMappingDescriptorSchema, T as workflowBuilderMappingEntryInputSchema, E as workflowBuilderMappingEntrySchema, D as workflowBuilderNestedWorkflowEntryInputSchema, O as workflowBuilderNestedWorkflowEntrySchema, k as workflowBuilderParallelEntryInputSchema, A as workflowBuilderParallelEntrySchema, j as workflowBuilderPredicateSchema, M as workflowBuilderScheduleConfigSchema, N as workflowBuilderScheduleSchema, P as workflowBuilderSleepEntryInputSchema, F as workflowBuilderSleepEntrySchema, I as workflowBuilderSleepUntilEntryInputSchema, L as workflowBuilderSleepUntilEntrySchema, R as workflowBuilderToolEntryInputSchema, z as workflowBuilderToolEntrySchema } from "../../builder-D00XMm41.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_run_registry = require("../../run-registry-
|
|
2
|
+
const require_run_registry = require("../../run-registry-DOlZccsr.cjs");
|
|
3
3
|
exports.EventedExecutionEngine = require_run_registry.EventedExecutionEngine;
|
|
4
4
|
exports.EventedRun = require_run_registry.EventedRun;
|
|
5
5
|
exports.EventedWorkflow = require_run_registry.EventedWorkflow;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Tc as EventedExecutionEngine, qs as EventedRun, Js as EventedWorkflow, ec as StepExecutor, $s as WorkflowEventProcessor, Ys as cloneStep, Xs as cloneWorkflow, Zs as createStep, Qs as createWorkflow } from "../../run-registry-
|
|
1
|
+
export { Tc as EventedExecutionEngine, qs as EventedRun, Js as EventedWorkflow, ec as StepExecutor, $s as WorkflowEventProcessor, Ys as cloneStep, Xs as cloneWorkflow, Zs as createStep, Qs as createWorkflow } from "../../run-registry-sTm40Ecv.js";
|
package/dist/workflows/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_run_registry = require("../run-registry-
|
|
3
|
-
const require_stream = require("../stream-
|
|
2
|
+
const require_run_registry = require("../run-registry-DOlZccsr.cjs");
|
|
3
|
+
const require_stream = require("../stream-aGuW9AL8.cjs");
|
|
4
4
|
const require_predicate_index = require("../predicate/index.cjs");
|
|
5
5
|
const require_schedules = require("../schedules-BZS8McF7.cjs");
|
|
6
|
-
const require_scheduler = require("../scheduler-
|
|
7
|
-
const require_validate = require("../validate-
|
|
8
|
-
const require_rehydrate = require("../rehydrate-
|
|
6
|
+
const require_scheduler = require("../scheduler-CMjK0LoQ.cjs");
|
|
7
|
+
const require_validate = require("../validate-CDlONK0o.cjs");
|
|
8
|
+
const require_rehydrate = require("../rehydrate-8q7KX4rD.cjs");
|
|
9
9
|
// src/workflows/state-reader.ts
|
|
10
10
|
const getStep = (state, stepId) => state.steps?.[stepId];
|
|
11
11
|
const getFirstStepResult = (step) => {
|
|
@@ -84,6 +84,7 @@ exports.analyzeMapConfig = require_validate.analyzeMapConfig;
|
|
|
84
84
|
exports.applyStateDelta = require_run_registry.applyStateDelta;
|
|
85
85
|
exports.assertTimeTravelGraphMatchesSnapshot = require_run_registry.assertTimeTravelGraphMatchesSnapshot;
|
|
86
86
|
exports.assertValidDynamicWorkflow = require_validate.assertValidDynamicWorkflow;
|
|
87
|
+
exports.claimScheduleFire = require_scheduler.claimScheduleFire;
|
|
87
88
|
exports.cleanStepResult = require_run_registry.cleanStepResult;
|
|
88
89
|
exports.cloneStep = require_run_registry.cloneStep$1;
|
|
89
90
|
exports.cloneWorkflow = require_run_registry.cloneWorkflow;
|
|
@@ -137,6 +138,7 @@ exports.predicateToCondition = require_run_registry.predicateToCondition;
|
|
|
137
138
|
exports.rehydrateWorkflow = require_rehydrate.rehydrateWorkflow;
|
|
138
139
|
exports.resolveForeachConcurrency = require_run_registry.resolveForeachConcurrency;
|
|
139
140
|
exports.runCountDeprecationMessage = require_run_registry.runCountDeprecationMessage;
|
|
141
|
+
exports.runScheduleTick = require_scheduler.runScheduleTick;
|
|
140
142
|
exports.schemaCompatibility = require_validate.schemaCompatibility;
|
|
141
143
|
exports.setLongTimeout = require_run_registry.setLongTimeout;
|
|
142
144
|
exports.toJsonSchemaOrUndefined = require_validate.toJsonSchemaOrUndefined;
|
package/dist/workflows/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { $c as createMappingStep, Ac as cloneStep, Al as validateStepSuspendData, Cl as resolveForeachConcurrency, Dl as validateStepRequestContext, El as validateStepInput, Fc as evaluatePredicate, Gs as createEventedWorkflow, Il as workflowTermination, Ks as createWorkflow, Mc as isProcessor, Ml as getEntryId, Nc as mapVariable, Nl as getEntryWorkflow, Oc as Run, Ol as validateStepResumeData, Pc as predicateToCondition, Sl as omitPriorSuspensionFields, Tl as setLongTimeout, Vc as DefaultExecutionEngine, Ws as cloneWorkflow, Yc as ExecutionEngine, _l as getStepIds, al as abortableSleep, bl as isSingleStepEntry, cl as cleanStepResult, dl as createTimeTravelExecutionParams, el as createStepFromAgent, fl as defineLazyWriter, gl as getSingleStepEntryId, hl as getResumeLabelsByStepId, il as RESUME_SNAPSHOT_WAIT_STATUSES, jc as createStep, jl as waitForSuspendedSnapshot, kc as Workflow, kl as validateStepStateData, ll as createDeprecationProxy, ml as getRestartStartIndex, nl as createStepFromTool, ol as applyStateDelta, pl as defineStateAccessors, rl as RESUME_SNAPSHOT_POLL_INTERVAL_MS, sl as assertTimeTravelGraphMatchesSnapshot, tc as computeScheduleDefinitionHash, tl as createStepFromClassifier, ul as createRestartExecutionParams, vl as hydrateSerializedStepErrors, wl as runCountDeprecationMessage, xl as omitPriorCompletionFields, yl as isEntryFinished } from "../run-registry-
|
|
2
|
-
import { Ot as getStepResult, kt as getStepResultAsync } from "../stream-
|
|
1
|
+
import { $c as createMappingStep, Ac as cloneStep, Al as validateStepSuspendData, Cl as resolveForeachConcurrency, Dl as validateStepRequestContext, El as validateStepInput, Fc as evaluatePredicate, Gs as createEventedWorkflow, Il as workflowTermination, Ks as createWorkflow, Mc as isProcessor, Ml as getEntryId, Nc as mapVariable, Nl as getEntryWorkflow, Oc as Run, Ol as validateStepResumeData, Pc as predicateToCondition, Sl as omitPriorSuspensionFields, Tl as setLongTimeout, Vc as DefaultExecutionEngine, Ws as cloneWorkflow, Yc as ExecutionEngine, _l as getStepIds, al as abortableSleep, bl as isSingleStepEntry, cl as cleanStepResult, dl as createTimeTravelExecutionParams, el as createStepFromAgent, fl as defineLazyWriter, gl as getSingleStepEntryId, hl as getResumeLabelsByStepId, il as RESUME_SNAPSHOT_WAIT_STATUSES, jc as createStep, jl as waitForSuspendedSnapshot, kc as Workflow, kl as validateStepStateData, ll as createDeprecationProxy, ml as getRestartStartIndex, nl as createStepFromTool, ol as applyStateDelta, pl as defineStateAccessors, rl as RESUME_SNAPSHOT_POLL_INTERVAL_MS, sl as assertTimeTravelGraphMatchesSnapshot, tc as computeScheduleDefinitionHash, tl as createStepFromClassifier, ul as createRestartExecutionParams, vl as hydrateSerializedStepErrors, wl as runCountDeprecationMessage, xl as omitPriorCompletionFields, yl as isEntryFinished } from "../run-registry-sTm40Ecv.js";
|
|
2
|
+
import { Ot as getStepResult, kt as getStepResultAsync } from "../stream-k-Q1NLUs.js";
|
|
3
3
|
import { derivePredicateLabel, predicateSchema } from "../predicate/index.js";
|
|
4
4
|
import { _ as validateCron, h as computeNextFireAt } from "../schedules-DZfSx-7P.js";
|
|
5
|
-
import { n as WorkflowScheduler, t as Scheduler } from "../scheduler-
|
|
6
|
-
import { a as jsonSchemaToZod, c as analyzeMapConfig, d as toJsonSchemaOrUndefined, f as validateWorkflowRefs, h as forEachSingleStepEntryWithPath, i as validateWorkflowSchemas, l as parseMapConfig, m as forEachSingleStepEntry, n as validateDynamicWorkflow, o as validateStorableJsonSchema, p as collectNestedWorkflowIds, r as validateWorkflowStructure, s as inferGraphSchemas, t as assertValidDynamicWorkflow, u as schemaCompatibility } from "../validate-
|
|
7
|
-
import { n as entryOptionFields, r as toStorableGraph, t as rehydrateWorkflow } from "../rehydrate-
|
|
5
|
+
import { i as runScheduleTick, n as WorkflowScheduler, r as claimScheduleFire, t as Scheduler } from "../scheduler-0ShtMM1I.js";
|
|
6
|
+
import { a as jsonSchemaToZod, c as analyzeMapConfig, d as toJsonSchemaOrUndefined, f as validateWorkflowRefs, h as forEachSingleStepEntryWithPath, i as validateWorkflowSchemas, l as parseMapConfig, m as forEachSingleStepEntry, n as validateDynamicWorkflow, o as validateStorableJsonSchema, p as collectNestedWorkflowIds, r as validateWorkflowStructure, s as inferGraphSchemas, t as assertValidDynamicWorkflow, u as schemaCompatibility } from "../validate-rum3NMFA.js";
|
|
7
|
+
import { n as entryOptionFields, r as toStorableGraph, t as rehydrateWorkflow } from "../rehydrate-DV1iO9eZ.js";
|
|
8
8
|
// src/workflows/state-reader.ts
|
|
9
9
|
const getStep = (state, stepId) => state.steps?.[stepId];
|
|
10
10
|
const getFirstStepResult = (step) => {
|
|
@@ -70,4 +70,4 @@ function createWorkflowStateReader(state) {
|
|
|
70
70
|
getResumeLabels: () => getWorkflowResumeLabels(state)
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
|
-
export { DefaultExecutionEngine, ExecutionEngine, RESUME_SNAPSHOT_POLL_INTERVAL_MS, RESUME_SNAPSHOT_WAIT_STATUSES, Run, Scheduler, Workflow, WorkflowScheduler, abortableSleep, analyzeMapConfig, applyStateDelta, assertTimeTravelGraphMatchesSnapshot, assertValidDynamicWorkflow, cleanStepResult, cloneStep, cloneWorkflow, collectNestedWorkflowIds, computeNextFireAt, computeScheduleDefinitionHash, createDeprecationProxy, createEventedWorkflow, createMappingStep, createRestartExecutionParams, createStep, createStepFromAgent, createStepFromClassifier, createStepFromTool, createTimeTravelExecutionParams, createWorkflow, createWorkflowStateReader, defineLazyWriter, defineStateAccessors, derivePredicateLabel, entryOptionFields, evaluatePredicate, forEachSingleStepEntry, forEachSingleStepEntryWithPath, getEntryId, getEntryWorkflow, getRestartStartIndex, getResumeLabelsByStepId, getSingleStepEntryId, getStepIds, getStepResult, getStepResultAsync, getWorkflowResumeLabel, getWorkflowResumeLabels, getWorkflowStepOutput, getWorkflowStepPayload, getWorkflowSuspendedStep, getWorkflowSuspendedSteps, hydrateSerializedStepErrors, inferGraphSchemas, isEntryFinished, isProcessor, isSingleStepEntry, jsonSchemaToZod, mapVariable, omitPriorCompletionFields, omitPriorSuspensionFields, parseMapConfig, predicateSchema, predicateToCondition, rehydrateWorkflow, resolveForeachConcurrency, runCountDeprecationMessage, schemaCompatibility, setLongTimeout, toJsonSchemaOrUndefined, toStorableGraph, validateCron, validateDynamicWorkflow, validateStepInput, validateStepRequestContext, validateStepResumeData, validateStepStateData, validateStepSuspendData, validateStorableJsonSchema, validateWorkflowRefs, validateWorkflowSchemas, validateWorkflowStructure, waitForSuspendedSnapshot, workflowTermination };
|
|
73
|
+
export { DefaultExecutionEngine, ExecutionEngine, RESUME_SNAPSHOT_POLL_INTERVAL_MS, RESUME_SNAPSHOT_WAIT_STATUSES, Run, Scheduler, Workflow, WorkflowScheduler, abortableSleep, analyzeMapConfig, applyStateDelta, assertTimeTravelGraphMatchesSnapshot, assertValidDynamicWorkflow, claimScheduleFire, cleanStepResult, cloneStep, cloneWorkflow, collectNestedWorkflowIds, computeNextFireAt, computeScheduleDefinitionHash, createDeprecationProxy, createEventedWorkflow, createMappingStep, createRestartExecutionParams, createStep, createStepFromAgent, createStepFromClassifier, createStepFromTool, createTimeTravelExecutionParams, createWorkflow, createWorkflowStateReader, defineLazyWriter, defineStateAccessors, derivePredicateLabel, entryOptionFields, evaluatePredicate, forEachSingleStepEntry, forEachSingleStepEntryWithPath, getEntryId, getEntryWorkflow, getRestartStartIndex, getResumeLabelsByStepId, getSingleStepEntryId, getStepIds, getStepResult, getStepResultAsync, getWorkflowResumeLabel, getWorkflowResumeLabels, getWorkflowStepOutput, getWorkflowStepPayload, getWorkflowSuspendedStep, getWorkflowSuspendedSteps, hydrateSerializedStepErrors, inferGraphSchemas, isEntryFinished, isProcessor, isSingleStepEntry, jsonSchemaToZod, mapVariable, omitPriorCompletionFields, omitPriorSuspensionFields, parseMapConfig, predicateSchema, predicateToCondition, rehydrateWorkflow, resolveForeachConcurrency, runCountDeprecationMessage, runScheduleTick, schemaCompatibility, setLongTimeout, toJsonSchemaOrUndefined, toStorableGraph, validateCron, validateDynamicWorkflow, validateStepInput, validateStepRequestContext, validateStepResumeData, validateStepStateData, validateStepSuspendData, validateStorableJsonSchema, validateWorkflowRefs, validateWorkflowSchemas, validateWorkflowStructure, waitForSuspendedSnapshot, workflowTermination };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { Schedule, SchedulesStorage } from '../../storage/domains/schedules/base.js';
|
|
2
|
+
/**
|
|
3
|
+
* Deterministic per occurrence. Unscoped rows keep `sched_<id>_<fireAt>`; a
|
|
4
|
+
* tenant's row adds its encoded tenant so equal ids in two tenants never share
|
|
5
|
+
* a run id.
|
|
6
|
+
*/
|
|
7
|
+
export declare function scheduleRunId(schedule: Pick<Schedule, 'id' | 'nextFireAt' | 'tenantId'>): string;
|
|
8
|
+
export interface ClaimedScheduleFire {
|
|
9
|
+
schedule: Schedule;
|
|
10
|
+
/** Deterministic per occurrence, so every process derives the same id. */
|
|
11
|
+
runId: string;
|
|
12
|
+
actualFireAt: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Claim one occurrence of a due schedule: advance `nextFireAt` with a
|
|
16
|
+
* compare-and-swap so only one caller across processes wins it. Returns
|
|
17
|
+
* undefined when another caller won, or the row was paused or changed.
|
|
18
|
+
* Throws when the cron can't produce a next fire time.
|
|
19
|
+
*/
|
|
20
|
+
export declare function claimScheduleFire({ store, schedule, now, }: {
|
|
21
|
+
store: SchedulesStorage;
|
|
22
|
+
schedule: Schedule;
|
|
23
|
+
now: number;
|
|
24
|
+
}): Promise<ClaimedScheduleFire | undefined>;
|
|
25
|
+
export interface DueScheduleFire {
|
|
26
|
+
schedule: Schedule;
|
|
27
|
+
/** Deterministic per occurrence; use it to name or dedupe the dispatched work. */
|
|
28
|
+
runId: string;
|
|
29
|
+
scheduledFireAt: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* One scheduler tick without a timer. Lists due tenant schedules (of every
|
|
33
|
+
* tenant on the root store, or one tenant's on its view), hands each
|
|
34
|
+
* occurrence to `dispatch`, and only then advances the row. Schedules without
|
|
35
|
+
* a tenant belong to the in-process `Scheduler` and are never touched here, so
|
|
36
|
+
* one occurrence is never fired by both. A failed dispatch leaves the row due for the next tick; a
|
|
37
|
+
* crash after dispatch re-dispatches the same `runId` next tick, so `dispatch`
|
|
38
|
+
* must be idempotent on it (e.g. a named queue task). Hosts that drive ticks
|
|
39
|
+
* from outside the process (a cron job calling an HTTP route) call this.
|
|
40
|
+
* `onError` receives every failed occurrence; a failing dispatch stays due and
|
|
41
|
+
* fails again each tick, so log or alert on it.
|
|
42
|
+
* Returns the occurrences this tick dispatched and advanced.
|
|
43
|
+
*/
|
|
44
|
+
export declare function runScheduleTick({ store, now, limit, dispatch, onError, }: {
|
|
45
|
+
store: SchedulesStorage;
|
|
46
|
+
now: number;
|
|
47
|
+
limit?: number;
|
|
48
|
+
dispatch: (fire: DueScheduleFire) => Promise<void>;
|
|
49
|
+
onError: (error: unknown, schedule: Schedule) => void;
|
|
50
|
+
}): Promise<DueScheduleFire[]>;
|
|
51
|
+
//# sourceMappingURL=claim.d.ts.map
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { claimScheduleFire, runScheduleTick } from './claim.js';
|
|
2
|
+
export type { ClaimedScheduleFire, DueScheduleFire } from './claim.js';
|
|
1
3
|
export { computeNextFireAt, validateCron } from './cron.js';
|
|
2
4
|
export { computeScheduleDefinitionHash } from './definition-hash.js';
|
|
3
5
|
export { Scheduler, WorkflowScheduler } from './scheduler.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/core",
|
|
3
|
-
"version": "1.87.0-alpha.
|
|
3
|
+
"version": "1.87.0-alpha.14",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -986,19 +986,19 @@
|
|
|
986
986
|
"vscode-languageserver-protocol": "^3.18.5",
|
|
987
987
|
"zod": "^4.6.7",
|
|
988
988
|
"zod-v3": "npm:zod@3.25.76",
|
|
989
|
-
"@internal/ai-sdk-v5": "0.0.99",
|
|
990
|
-
"@internal/ai-v7": "0.0.99",
|
|
991
|
-
"@internal/ai-sdk-v4": "0.0.99",
|
|
992
|
-
"@internal/ai-v6": "0.0.99",
|
|
993
989
|
"@internal/auth": "0.0.40",
|
|
994
990
|
"@internal/core": "0.1.4",
|
|
991
|
+
"@internal/ai-sdk-v4": "0.0.99",
|
|
992
|
+
"@internal/ai-sdk-v5": "0.0.99",
|
|
993
|
+
"@internal/ai-v6": "0.0.99",
|
|
995
994
|
"@internal/deployer": "0.0.5",
|
|
995
|
+
"@internal/external-types": "0.0.102",
|
|
996
996
|
"@internal/lint": "0.0.152",
|
|
997
|
-
"@internal/test-utils": "0.0.88",
|
|
998
|
-
"@internal/types-builder": "0.0.127",
|
|
999
997
|
"@internal/llm-recorder": "0.0.88",
|
|
998
|
+
"@internal/test-utils": "0.0.88",
|
|
1000
999
|
"@internal/voice": "0.0.48",
|
|
1001
|
-
"@internal/
|
|
1000
|
+
"@internal/types-builder": "0.0.127",
|
|
1001
|
+
"@internal/ai-v7": "0.0.99"
|
|
1002
1002
|
},
|
|
1003
1003
|
"engines": {
|
|
1004
1004
|
"node": ">=22.13.0"
|