@mastra/server 1.87.0-alpha.2 → 1.87.0-alpha.5
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/{a2a-DwjvHqcb.cjs → a2a-BN1yr3_0.cjs} +2 -2
- package/dist/{a2a-CY7rgzPe.js → a2a-Ko42c8aO.js} +2 -2
- package/dist/{agent-builder-CFlwtwZC.cjs → agent-builder-BySDH8w4.cjs} +3 -3
- package/dist/{agent-builder-DawgAfRt.js → agent-builder-i24xZTwm.js} +3 -3
- package/dist/{agent-controller-CzKnfKkw.js → agent-controller-CviX4R-w.js} +2 -2
- package/dist/{agent-controller-BP-CFfsg.cjs → agent-controller-dORP4p-X.cjs} +2 -2
- package/dist/{agents-CAXsXenf.js → agents-C0IdGyiL.js} +6 -5
- package/dist/{agents-GHhuyz5x.cjs → agents-D5Gfdskc.cjs} +6 -5
- package/dist/{api-schema-manifest-BvvlL0TR.js → api-schema-manifest-CG30_RPu.js} +1 -1
- package/dist/{api-schema-manifest-D8c0D-Nd.cjs → api-schema-manifest-DOdengLi.cjs} +1 -1
- package/dist/{background-tasks-xkwOZ9D_.js → background-tasks-B9YLamYP.js} +1 -1
- package/dist/{background-tasks-4EZqzWvG.cjs → background-tasks-Cb6wRhsM.cjs} +1 -1
- package/dist/{builder-registry-BBI_5CBL.cjs → builder-registry-C-RaKe16.cjs} +1 -1
- package/dist/{builder-registry-WYVRUCgJ.js → builder-registry-DvnU_YM0.js} +1 -1
- package/dist/{catalogue-BjUuotVl.cjs → catalogue-5OgOvPdj.cjs} +11 -11
- package/dist/{catalogue-CJKwUMII.js → catalogue-Dzee6I_u.js} +11 -11
- package/dist/{channels-DlsNzITQ.cjs → channels-5aNdsEw1.cjs} +1 -1
- package/dist/{channels-bkX-zz9J.js → channels-DI1jIiLJ.js} +1 -1
- package/dist/{constants-C1ASuP4t.js → constants-BGZc2rRV.js} +1 -0
- package/dist/{constants-CyNbINin.cjs → constants-DrYn0WtO.cjs} +1 -0
- package/dist/{conversations-CgogBOHO.cjs → conversations-BgaiPkn3.cjs} +2 -2
- package/dist/{conversations-BjD8wOc3.js → conversations-Dvej1_Fz.js} +2 -2
- package/dist/{datasets-CZRqni0N.cjs → datasets-F0EduyNl.cjs} +1 -0
- package/dist/{datasets-CYdtUF8e.js → datasets-raywnGOv.js} +1 -0
- package/dist/{dist-DnaUFs3u.cjs → dist-BExtYJCh.cjs} +53 -15
- package/dist/{dist-BS3dauvO.js → dist-CuLV2DIz.js} +54 -16
- package/dist/{dist-DvGuHSAT.cjs → dist-CxDD21r1.cjs} +1 -1
- package/dist/dist-DbJfioW_.js +1 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/reference-server-dispatch-route.md +1 -1
- package/dist/docs/references/reference-server-invoke-route.md +1 -1
- package/dist/{editor-builder-BRzXnsRW.js → editor-builder-C7JESHXV.js} +1 -1
- package/dist/{editor-builder-G1ub9j0s.cjs → editor-builder-CrDeYS4M.cjs} +1 -1
- package/dist/{helpers-hFdKABRP.js → helpers-Cu3u8z-m.js} +1 -1
- package/dist/{helpers-Zu5ZVxSl.cjs → helpers-JABjIdEV.cjs} +1 -1
- package/dist/{knowledge-wqC0nrmu.js → knowledge-BxAzi7GS.js} +2 -2
- package/dist/{knowledge-B3768ERP.cjs → knowledge-Ca1Oa8to.cjs} +2 -2
- package/dist/{logs-B0dcn5iB.cjs → logs-B0KVAwEq.cjs} +1 -1
- package/dist/{logs-CqgT7AOV.js → logs-EbPb9KkB.js} +1 -1
- package/dist/{mcp-DXvFogeV.js → mcp-C7rIfLyo.js} +1 -1
- package/dist/{mcp-C060MyHc.cjs → mcp-Ca1BQb6m.cjs} +1 -1
- package/dist/{memory-03B4pe3w.js → memory-BCNMsZz4.js} +2 -2
- package/dist/{memory-4Izw-l6v.cjs → memory-MbUMCc-D.cjs} +2 -2
- package/dist/{observability-URaJnI_U.js → observability-BkIqjp9o.js} +1 -1
- package/dist/{observability-zNA_CVaz.cjs → observability-BurXEXQA.cjs} +1 -1
- package/dist/{observability-new-endpoints-vj6FaEcm.js → observability-new-endpoints-B8cU0TgV.js} +1 -1
- package/dist/{observability-new-endpoints-iRwQxqwY.cjs → observability-new-endpoints-BmMAKxRm.cjs} +1 -1
- package/dist/{plans-DGC1grMp.js → plans-CaSviy0J.js} +2 -2
- package/dist/{plans-kA8E3Auv.cjs → plans-DyZvjADy.cjs} +2 -2
- package/dist/{probe-image-size-B3ETFAcX.js → probe-image-size-D6EbqDxl.js} +1 -1
- package/dist/{probe-image-size-D801MyMQ.cjs → probe-image-size-DSXA3-NW.cjs} +1 -1
- package/dist/{responses--nGf7l3O.js → responses-Bs8vk9BH.js} +2 -2
- package/dist/{responses-B4GDz-Nm.cjs → responses-DZ4Cwu6V.cjs} +2 -2
- package/dist/{routes-Byg1B8Qr.js → routes-B-GM8Kgs.js} +24 -24
- package/dist/{routes-BTrz1ppE.cjs → routes-BGnprZYb.cjs} +24 -24
- package/dist/{schedules-RWgPeypN.js → schedules-CP8eVRES.js} +2 -2
- package/dist/{schedules-CwL28Eca.cjs → schedules-CyzFSKWs.cjs} +2 -2
- package/dist/{scores-Biv7XGW_.js → scores-BAfbF8q6.js} +1 -1
- package/dist/{scores-D0Qq7TfU.cjs → scores-BFPKFy2D.cjs} +1 -1
- package/dist/server/auth/index.cjs +2 -2
- package/dist/server/auth/index.js +2 -2
- package/dist/server/constants.d.ts +1 -1
- package/dist/server/handlers/a2a.cjs +1 -1
- package/dist/server/handlers/a2a.js +1 -1
- package/dist/server/handlers/agent-builder.cjs +1 -1
- package/dist/server/handlers/agent-builder.js +1 -1
- package/dist/server/handlers/agent-controller.cjs +1 -1
- package/dist/server/handlers/agent-controller.js +1 -1
- package/dist/server/handlers/agent-versions.cjs +1 -1
- package/dist/server/handlers/agent-versions.js +1 -1
- package/dist/server/handlers/agents.cjs +1 -1
- package/dist/server/handlers/agents.js +1 -1
- package/dist/server/handlers/auth.cjs +2 -2
- package/dist/server/handlers/auth.js +2 -2
- package/dist/server/handlers/authorship.cjs +1 -1
- package/dist/server/handlers/authorship.js +1 -1
- package/dist/server/handlers/background-tasks.cjs +1 -1
- package/dist/server/handlers/background-tasks.js +1 -1
- package/dist/server/handlers/builder-registry.cjs +1 -1
- package/dist/server/handlers/builder-registry.js +1 -1
- package/dist/server/handlers/channels.cjs +1 -1
- package/dist/server/handlers/channels.js +1 -1
- package/dist/server/handlers/conversations.cjs +1 -1
- package/dist/server/handlers/conversations.js +1 -1
- package/dist/server/handlers/datasets.cjs +2 -2
- package/dist/server/handlers/datasets.d.ts +12 -0
- package/dist/server/handlers/datasets.js +2 -2
- package/dist/server/handlers/editor-builder.cjs +1 -1
- package/dist/server/handlers/editor-builder.js +1 -1
- package/dist/server/handlers/favorites-enrichment.cjs +1 -1
- package/dist/server/handlers/favorites-enrichment.js +1 -1
- package/dist/server/handlers/knowledge.cjs +1 -1
- package/dist/server/handlers/knowledge.js +1 -1
- package/dist/server/handlers/logs.cjs +1 -1
- package/dist/server/handlers/logs.js +1 -1
- package/dist/server/handlers/mcp-client-versions.cjs +1 -1
- package/dist/server/handlers/mcp-client-versions.js +1 -1
- package/dist/server/handlers/mcp.cjs +1 -1
- package/dist/server/handlers/mcp.js +1 -1
- package/dist/server/handlers/memory.cjs +1 -1
- package/dist/server/handlers/memory.js +1 -1
- package/dist/server/handlers/observability-new-endpoints.cjs +1 -1
- package/dist/server/handlers/observability-new-endpoints.js +1 -1
- package/dist/server/handlers/observability-signal-context.cjs +1 -1
- package/dist/server/handlers/observability-signal-context.js +1 -1
- package/dist/server/handlers/observability.cjs +2 -2
- package/dist/server/handlers/observability.js +2 -2
- package/dist/server/handlers/plans.cjs +1 -1
- package/dist/server/handlers/plans.js +1 -1
- package/dist/server/handlers/prompt-block-versions.cjs +1 -1
- package/dist/server/handlers/prompt-block-versions.js +1 -1
- package/dist/server/handlers/responses.cjs +1 -1
- package/dist/server/handlers/responses.js +1 -1
- package/dist/server/handlers/responses.storage.cjs +1 -1
- package/dist/server/handlers/responses.storage.js +1 -1
- package/dist/server/handlers/schedules.cjs +1 -1
- package/dist/server/handlers/schedules.js +1 -1
- package/dist/server/handlers/scorer-versions.cjs +1 -1
- package/dist/server/handlers/scorer-versions.js +1 -1
- package/dist/server/handlers/scores.cjs +1 -1
- package/dist/server/handlers/scores.js +1 -1
- package/dist/server/handlers/stored-agent-favorites.cjs +2 -2
- package/dist/server/handlers/stored-agent-favorites.js +2 -2
- package/dist/server/handlers/stored-agents.cjs +2 -2
- package/dist/server/handlers/stored-agents.js +2 -2
- package/dist/server/handlers/stored-mcp-clients.cjs +1 -1
- package/dist/server/handlers/stored-mcp-clients.js +1 -1
- package/dist/server/handlers/stored-prompt-blocks.cjs +1 -1
- package/dist/server/handlers/stored-prompt-blocks.js +1 -1
- package/dist/server/handlers/stored-scorers.cjs +1 -1
- package/dist/server/handlers/stored-scorers.js +1 -1
- package/dist/server/handlers/stored-skill-favorites.cjs +2 -2
- package/dist/server/handlers/stored-skill-favorites.js +2 -2
- package/dist/server/handlers/stored-skills.cjs +2 -2
- package/dist/server/handlers/stored-skills.js +2 -2
- package/dist/server/handlers/stored-workspaces.cjs +1 -1
- package/dist/server/handlers/stored-workspaces.js +1 -1
- package/dist/server/handlers/system.cjs +1 -1
- package/dist/server/handlers/system.js +1 -1
- package/dist/server/handlers/tool-providers.cjs +1 -1
- package/dist/server/handlers/tool-providers.js +1 -1
- package/dist/server/handlers/tools.cjs +1 -1
- package/dist/server/handlers/tools.js +1 -1
- package/dist/server/handlers/utils.cjs +1 -1
- package/dist/server/handlers/utils.js +1 -1
- package/dist/server/handlers/validate-agent-instructions.cjs +1 -1
- package/dist/server/handlers/validate-agent-instructions.js +1 -1
- package/dist/server/handlers/voice.cjs +1 -1
- package/dist/server/handlers/voice.js +1 -1
- package/dist/server/handlers/workflow-builder.cjs +1 -1
- package/dist/server/handlers/workflow-builder.js +1 -1
- package/dist/server/handlers/workflows.cjs +1 -1
- package/dist/server/handlers/workflows.js +1 -1
- package/dist/server/handlers.cjs +14 -14
- package/dist/server/handlers.js +14 -14
- package/dist/server/schemas/datasets.d.ts +2 -0
- package/dist/server/schemas/index.cjs +1 -1
- package/dist/server/schemas/index.js +1 -1
- package/dist/server/server-adapter/index.cjs +5 -5
- package/dist/server/server-adapter/index.js +5 -5
- package/dist/server/server-adapter/routes/datasets.d.ts +12 -0
- package/dist/{server-adapter-BBWHYl1q.js → server-adapter-CDN86NTj.js} +5 -5
- package/dist/{server-adapter-DEOmNkC-.cjs → server-adapter-sru9PQEI.cjs} +5 -5
- package/dist/{tools-C3KBdlil.js → tools-CwEOkjcz.js} +3 -3
- package/dist/{tools-By0RVh_O.cjs → tools-DqvlVXzp.cjs} +3 -3
- package/dist/{utils-C2VRtQjI.js → utils-4Rc0P7nt.js} +1 -1
- package/dist/{utils-j29NB2ZJ.cjs → utils-CUmygG-3.cjs} +1 -1
- package/dist/{utils-CvYihOoy.js → utils-D3t571cY.js} +1 -1
- package/dist/{utils-DQJOBnMo.cjs → utils-LrIIsUqL.cjs} +1 -1
- package/dist/{voice-PfxY_vQg.js → voice-D3HJhfF3.js} +1 -1
- package/dist/{voice-CESew8Fc.cjs → voice-dO17mzi-.cjs} +1 -1
- package/dist/{workflow-builder-DpL3Nq6T.cjs → workflow-builder-B2pNUBoW.cjs} +1 -1
- package/dist/{workflow-builder-BET96Cr_.js → workflow-builder-C0cXa5or.js} +1 -1
- package/dist/{workflows-PVrj85xM.cjs → workflows-B5CaaElk.cjs} +2 -2
- package/dist/{workflows-OjUXkjWw.js → workflows-BRJQrD4w.js} +2 -2
- package/package.json +4 -4
- package/dist/dist-egxWNNJS.js +0 -1
|
@@ -2,8 +2,8 @@ const require_rolldown_runtime = require("./rolldown-runtime-10nMEhjP.cjs");
|
|
|
2
2
|
const require_a2a = require("./a2a-BsBYrosr.cjs");
|
|
3
3
|
const require_server_a2a_store = require("./server/a2a/store.cjs");
|
|
4
4
|
const require_route_builder = require("./route-builder-DjTBxSZN.cjs");
|
|
5
|
-
const require_utils = require("./utils-
|
|
6
|
-
const require_agents = require("./agents-
|
|
5
|
+
const require_utils = require("./utils-LrIIsUqL.cjs");
|
|
6
|
+
const require_agents = require("./agents-D5Gfdskc.cjs");
|
|
7
7
|
const require_server_handlers_auth = require("./server/handlers/auth.cjs");
|
|
8
8
|
let zod_v4 = require("zod/v4");
|
|
9
9
|
let util = require("util");
|
|
@@ -2,8 +2,8 @@ import { o as __toESM, r as __exportAll, t as __commonJSMin } from "./rolldown-r
|
|
|
2
2
|
import { a as agentCardV1ResponseSchema, i as agentCardResponseSchema, o as agentExecutionBodySchema, r as a2aV1MethodMap, s as agentExecutionResponseSchema, t as a2aAgentIdPathParams } from "./a2a-C3ClP3C2.js";
|
|
3
3
|
import { TaskStoreVersionConflictError } from "./server/a2a/store.js";
|
|
4
4
|
import { n as createRoute } from "./route-builder-Dz18c3qm.js";
|
|
5
|
-
import { r as convertInstructionsToString } from "./utils-
|
|
6
|
-
import { G as getAgentFromSystem } from "./agents-
|
|
5
|
+
import { r as convertInstructionsToString } from "./utils-4Rc0P7nt.js";
|
|
6
|
+
import { G as getAgentFromSystem } from "./agents-C0IdGyiL.js";
|
|
7
7
|
import { getPublicOrigin } from "./server/handlers/auth.js";
|
|
8
8
|
import { z } from "zod/v4";
|
|
9
9
|
import { isDeepStrictEqual } from "util";
|
|
@@ -5,9 +5,9 @@ const require_workflows = require("./workflows-CKcjXfXk.cjs");
|
|
|
5
5
|
const require_agents = require("./agents-CH_G37hG.cjs");
|
|
6
6
|
const require_common = require("./common-D5XxSuvu.cjs");
|
|
7
7
|
const require_route_builder = require("./route-builder-DjTBxSZN.cjs");
|
|
8
|
-
const require_utils = require("./utils-
|
|
8
|
+
const require_utils = require("./utils-LrIIsUqL.cjs");
|
|
9
9
|
const require_server_handlers_error = require("./server/handlers/error.cjs");
|
|
10
|
-
const require_workflows$1 = require("./workflows-
|
|
10
|
+
const require_workflows$1 = require("./workflows-B5CaaElk.cjs");
|
|
11
11
|
// src/server/handlers/agent-builder.ts
|
|
12
12
|
var agent_builder_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
|
|
13
13
|
CANCEL_AGENT_BUILDER_ACTION_RUN_ROUTE: () => CANCEL_AGENT_BUILDER_ACTION_RUN_ROUTE,
|
|
@@ -30,7 +30,7 @@ var agent_builder_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll
|
|
|
30
30
|
let createAgentBuilderWorkflowsPromise;
|
|
31
31
|
const agentBuilderWorkflowsByMastra = /* @__PURE__ */ new WeakMap();
|
|
32
32
|
async function registerAgentBuilderWorkflows(mastra) {
|
|
33
|
-
createAgentBuilderWorkflowsPromise ??= Promise.resolve().then(() => require("./dist-
|
|
33
|
+
createAgentBuilderWorkflowsPromise ??= Promise.resolve().then(() => require("./dist-BExtYJCh.cjs")).then((mod) => mod.createAgentBuilderWorkflows);
|
|
34
34
|
const create = await createAgentBuilderWorkflowsPromise;
|
|
35
35
|
let agentBuilderWorkflows = agentBuilderWorkflowsByMastra.get(mastra);
|
|
36
36
|
if (!agentBuilderWorkflows) {
|
|
@@ -5,9 +5,9 @@ import { b as workflowRunResultSchema, g as workflowInfoSchema, i as listWorkflo
|
|
|
5
5
|
import { X as streamResponseSchema } from "./agents-B0OpLdbp.js";
|
|
6
6
|
import { o as optionalRunIdSchema, u as runIdSchema } from "./common-J-yUnHk9.js";
|
|
7
7
|
import { n as createRoute } from "./route-builder-Dz18c3qm.js";
|
|
8
|
-
import { t as WorkflowRegistry } from "./utils-
|
|
8
|
+
import { t as WorkflowRegistry } from "./utils-4Rc0P7nt.js";
|
|
9
9
|
import { handleError } from "./server/handlers/error.js";
|
|
10
|
-
import { C as STREAM_LEGACY_WORKFLOW_ROUTE, S as START_WORKFLOW_RUN_ROUTE, _ as RESUME_ASYNC_WORKFLOW_ROUTE, a as GET_WORKFLOW_BY_ID_ROUTE, b as RESUME_WORKFLOW_ROUTE, c as LIST_WORKFLOW_RUNS_ROUTE, d as OBSERVE_STREAM_WORKFLOW_ROUTE, n as CREATE_WORKFLOW_RUN_ROUTE, o as GET_WORKFLOW_RUN_BY_ID_ROUTE, s as LIST_WORKFLOWS_ROUTE, t as CANCEL_WORKFLOW_RUN_ROUTE, u as OBSERVE_STREAM_LEGACY_WORKFLOW_ROUTE, v as RESUME_NO_WAIT_WORKFLOW_ROUTE, w as STREAM_WORKFLOW_ROUTE, x as START_ASYNC_WORKFLOW_ROUTE, y as RESUME_STREAM_WORKFLOW_ROUTE } from "./workflows-
|
|
10
|
+
import { C as STREAM_LEGACY_WORKFLOW_ROUTE, S as START_WORKFLOW_RUN_ROUTE, _ as RESUME_ASYNC_WORKFLOW_ROUTE, a as GET_WORKFLOW_BY_ID_ROUTE, b as RESUME_WORKFLOW_ROUTE, c as LIST_WORKFLOW_RUNS_ROUTE, d as OBSERVE_STREAM_WORKFLOW_ROUTE, n as CREATE_WORKFLOW_RUN_ROUTE, o as GET_WORKFLOW_RUN_BY_ID_ROUTE, s as LIST_WORKFLOWS_ROUTE, t as CANCEL_WORKFLOW_RUN_ROUTE, u as OBSERVE_STREAM_LEGACY_WORKFLOW_ROUTE, v as RESUME_NO_WAIT_WORKFLOW_ROUTE, w as STREAM_WORKFLOW_ROUTE, x as START_ASYNC_WORKFLOW_ROUTE, y as RESUME_STREAM_WORKFLOW_ROUTE } from "./workflows-BRJQrD4w.js";
|
|
11
11
|
// src/server/handlers/agent-builder.ts
|
|
12
12
|
var agent_builder_exports = /* @__PURE__ */ __exportAll({
|
|
13
13
|
CANCEL_AGENT_BUILDER_ACTION_RUN_ROUTE: () => CANCEL_AGENT_BUILDER_ACTION_RUN_ROUTE,
|
|
@@ -30,7 +30,7 @@ var agent_builder_exports = /* @__PURE__ */ __exportAll({
|
|
|
30
30
|
let createAgentBuilderWorkflowsPromise;
|
|
31
31
|
const agentBuilderWorkflowsByMastra = /* @__PURE__ */ new WeakMap();
|
|
32
32
|
async function registerAgentBuilderWorkflows(mastra) {
|
|
33
|
-
createAgentBuilderWorkflowsPromise ??= import("./dist-
|
|
33
|
+
createAgentBuilderWorkflowsPromise ??= import("./dist-CuLV2DIz.js").then((mod) => mod.createAgentBuilderWorkflows);
|
|
34
34
|
const create = await createAgentBuilderWorkflowsPromise;
|
|
35
35
|
let agentBuilderWorkflows = agentBuilderWorkflowsByMastra.get(mastra);
|
|
36
36
|
if (!agentBuilderWorkflows) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as MASTRA_USER_KEY } from "./constants-
|
|
2
|
-
import { _ as MastraFGAPermissions, n as enforceThreadAccess } from "./utils-
|
|
1
|
+
import { d as MASTRA_USER_KEY } from "./constants-BGZc2rRV.js";
|
|
2
|
+
import { _ as MastraFGAPermissions, n as enforceThreadAccess } from "./utils-D3t571cY.js";
|
|
3
3
|
import { t as HTTPException } from "./http-exception-CzaWkxMl.js";
|
|
4
4
|
import { E as includeSchema, F as messageOrderBySchema, h as filterSchema } from "./memory-CCEjoCF6.js";
|
|
5
5
|
import { n as createRoute } from "./route-builder-Dz18c3qm.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_constants = require("./constants-
|
|
2
|
-
const require_utils = require("./utils-
|
|
1
|
+
const require_constants = require("./constants-DrYn0WtO.cjs");
|
|
2
|
+
const require_utils = require("./utils-CUmygG-3.cjs");
|
|
3
3
|
const require_http_exception = require("./http-exception-Co3MbFUf.cjs");
|
|
4
4
|
const require_memory = require("./memory--xJDrSwF.cjs");
|
|
5
5
|
const require_route_builder = require("./route-builder-DjTBxSZN.cjs");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as __exportAll } from "./rolldown-runtime-CQI-hT2b.js";
|
|
2
|
-
import { c as toSlug, i as getStoredResourceScope, l as stringify, n as assertStoredResourceScope, s as scopeStoredResourceMetadata } from "./utils-
|
|
3
|
-
import { c as MASTRA_RESOURCE_ID_KEY, f as MASTRA_USER_PERMISSIONS_KEY, h as WORKSPACE_TOOLS, i as MASTRA_IS_STUDIO_KEY, v as resolveToolConfig } from "./constants-
|
|
2
|
+
import { c as toSlug, i as getStoredResourceScope, l as stringify, n as assertStoredResourceScope, s as scopeStoredResourceMetadata } from "./utils-4Rc0P7nt.js";
|
|
3
|
+
import { c as MASTRA_RESOURCE_ID_KEY, f as MASTRA_USER_PERMISSIONS_KEY, h as WORKSPACE_TOOLS, i as MASTRA_IS_STUDIO_KEY, v as resolveToolConfig } from "./constants-BGZc2rRV.js";
|
|
4
4
|
import { n as standardSchemaToJSONSchema, r as toStandardSchema } from "./schema-TQPB_dl2-CCzMcdDx.js";
|
|
5
|
-
import { _ as MastraFGAPermissions, a as getEffectiveThreadId, c as mergeBodyRequestContext, d as requireEffectiveResourceId, f as sanitizeBody, g as validateThreadOwnership, h as validateRunOwnership, i as getEffectiveResourceId, m as validateBody, n as enforceThreadAccess, o as getHandlerFGAProvider, p as stripClientCredentialHeaders, r as getContextResourceId, t as applyEffectiveThreadId } from "./utils-
|
|
5
|
+
import { _ as MastraFGAPermissions, a as getEffectiveThreadId, c as mergeBodyRequestContext, d as requireEffectiveResourceId, f as sanitizeBody, g as validateThreadOwnership, h as validateRunOwnership, i as getEffectiveResourceId, m as validateBody, n as enforceThreadAccess, o as getHandlerFGAProvider, p as stripClientCredentialHeaders, r as getContextResourceId, t as applyEffectiveThreadId } from "./utils-D3t571cY.js";
|
|
6
6
|
import { t as HTTPException } from "./http-exception-CzaWkxMl.js";
|
|
7
7
|
import { $ as toolCallResponseSchema, A as observeAgentBodySchema, B as sendAgentMessageBodySchema, C as generateResponseSchema, E as listSuspendedRunsResponseSchema, F as queueAgentSignalBodySchema, G as serializedAgentSchema, H as sendToolApprovalBodySchema, I as recoverBodySchema, L as reorderAgentModelListBodySchema, N as providersResponseSchema, O as modelConfigIdPathParams, P as queueAgentMessageBodySchema, Q as subscribeAgentThreadBodySchema, R as resumeStreamBodySchema, T as listSuspendedRunsQuerySchema, U as sendToolApprovalResponseSchema, V as sendAgentSignalBodySchema, X as streamResponseSchema, Z as streamUntilIdleBodySchema, _ as declineToolCallBodySchema, a as agentIdPathParams, c as agentRunPathParams, d as agentVersionQuerySchema, f as approveNetworkToolCallBodySchema, g as declineNetworkToolCallBodySchema, h as cancelPendingAgentSignalsResponseSchema, i as agentExecutionLegacyBodySchema, j as observeAgentResponseSchema, k as modelManagementResponseSchema, l as agentSkillPathParams, m as cancelPendingAgentSignalsBodySchema, n as abortAgentThreadResponseSchema, nt as updateAgentModelInModelListBodySchema, p as approveToolCallBodySchema, r as agentExecutionBodySchema, t as abortAgentThreadBodySchema, tt as updateAgentModelBodySchema, v as enhanceInstructionsBodySchema, w as listAgentsResponseSchema, y as enhanceInstructionsResponseSchema, z as resumeStreamUntilIdleBodySchema } from "./agents-B0OpLdbp.js";
|
|
8
8
|
import { r as createStoredAgentResponseSchema } from "./stored-agents-DcyDMKP2.js";
|
|
@@ -3295,16 +3295,17 @@ Return your response as JSON with exactly these two fields:
|
|
|
3295
3295
|
|
|
3296
3296
|
Remember: A good system prompt should be specific enough to guide behavior but flexible enough to handle edge cases. Focus on creating prompts that are clear, actionable, and aligned with the intended use case.`;
|
|
3297
3297
|
async function findConnectedModel(agent) {
|
|
3298
|
+
const isUsable = (model) => !(model instanceof ModelRouterLanguageModel) || isProviderConnected(model.provider);
|
|
3298
3299
|
const modelList = await agent.getModelList();
|
|
3299
3300
|
if (modelList && modelList.length > 0) {
|
|
3300
3301
|
for (const modelConfig of modelList) if (modelConfig.enabled !== false) {
|
|
3301
3302
|
const model = modelConfig.model;
|
|
3302
|
-
if (
|
|
3303
|
+
if (isUsable(model)) return model;
|
|
3303
3304
|
}
|
|
3304
3305
|
return null;
|
|
3305
3306
|
}
|
|
3306
3307
|
const defaultModel = await agent.getModel();
|
|
3307
|
-
if (
|
|
3308
|
+
if (isUsable(defaultModel)) return defaultModel;
|
|
3308
3309
|
return null;
|
|
3309
3310
|
}
|
|
3310
3311
|
const ENHANCE_INSTRUCTIONS_ROUTE = createRoute({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-10nMEhjP.cjs");
|
|
2
|
-
const require_utils = require("./utils-
|
|
3
|
-
const require_constants = require("./constants-
|
|
2
|
+
const require_utils = require("./utils-LrIIsUqL.cjs");
|
|
3
|
+
const require_constants = require("./constants-DrYn0WtO.cjs");
|
|
4
4
|
const require_schema_TQPB_dl2 = require("./schema-TQPB_dl2-CJX1q58F.cjs");
|
|
5
|
-
const require_utils$1 = require("./utils-
|
|
5
|
+
const require_utils$1 = require("./utils-CUmygG-3.cjs");
|
|
6
6
|
const require_http_exception = require("./http-exception-Co3MbFUf.cjs");
|
|
7
7
|
const require_agents = require("./agents-CH_G37hG.cjs");
|
|
8
8
|
const require_stored_agents = require("./stored-agents-BS4_LGSs.cjs");
|
|
@@ -3295,16 +3295,17 @@ Return your response as JSON with exactly these two fields:
|
|
|
3295
3295
|
|
|
3296
3296
|
Remember: A good system prompt should be specific enough to guide behavior but flexible enough to handle edge cases. Focus on creating prompts that are clear, actionable, and aligned with the intended use case.`;
|
|
3297
3297
|
async function findConnectedModel(agent) {
|
|
3298
|
+
const isUsable = (model) => !(model instanceof _mastra_core_llm.ModelRouterLanguageModel) || isProviderConnected(model.provider);
|
|
3298
3299
|
const modelList = await agent.getModelList();
|
|
3299
3300
|
if (modelList && modelList.length > 0) {
|
|
3300
3301
|
for (const modelConfig of modelList) if (modelConfig.enabled !== false) {
|
|
3301
3302
|
const model = modelConfig.model;
|
|
3302
|
-
if (
|
|
3303
|
+
if (isUsable(model)) return model;
|
|
3303
3304
|
}
|
|
3304
3305
|
return null;
|
|
3305
3306
|
}
|
|
3306
3307
|
const defaultModel = await agent.getModel();
|
|
3307
|
-
if (
|
|
3308
|
+
if (isUsable(defaultModel)) return defaultModel;
|
|
3308
3309
|
return null;
|
|
3309
3310
|
}
|
|
3310
3311
|
const ENHANCE_INSTRUCTIONS_ROUTE = require_route_builder.createRoute({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as schemaToJsonSchema } from "./route-builder-Dz18c3qm.js";
|
|
2
|
-
import { r as SERVER_ROUTES } from "./routes-
|
|
2
|
+
import { r as SERVER_ROUTES } from "./routes-B-GM8Kgs.js";
|
|
3
3
|
// src/server/server-adapter/api-schema-manifest.ts
|
|
4
4
|
function convertSchema(schema, io) {
|
|
5
5
|
return schema ? schemaToJsonSchema(schema, io) : void 0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require("./rolldown-runtime-10nMEhjP.cjs");
|
|
2
2
|
const require_route_builder = require("./route-builder-DjTBxSZN.cjs");
|
|
3
|
-
const require_routes = require("./routes-
|
|
3
|
+
const require_routes = require("./routes-BGnprZYb.cjs");
|
|
4
4
|
// src/server/server-adapter/api-schema-manifest.ts
|
|
5
5
|
function convertSchema(schema, io) {
|
|
6
6
|
return schema ? require_route_builder.schemaToJsonSchema(schema, io) : void 0;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as HTTPException } from "./http-exception-CzaWkxMl.js";
|
|
2
2
|
import { c as paginationNumber } from "./common-J-yUnHk9.js";
|
|
3
3
|
import { n as createRoute } from "./route-builder-Dz18c3qm.js";
|
|
4
|
-
import { r as getContextResourceId } from "./utils-
|
|
4
|
+
import { r as getContextResourceId } from "./utils-D3t571cY.js";
|
|
5
5
|
import { z as z$1 } from "zod";
|
|
6
6
|
// src/server/schemas/background-tasks.ts
|
|
7
7
|
const backgroundTaskStatusSchema = z$1.enum([
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_http_exception = require("./http-exception-Co3MbFUf.cjs");
|
|
2
2
|
const require_common = require("./common-D5XxSuvu.cjs");
|
|
3
3
|
const require_route_builder = require("./route-builder-DjTBxSZN.cjs");
|
|
4
|
-
const require_utils = require("./utils-
|
|
4
|
+
const require_utils = require("./utils-CUmygG-3.cjs");
|
|
5
5
|
let zod = require("zod");
|
|
6
6
|
// src/server/schemas/background-tasks.ts
|
|
7
7
|
const backgroundTaskStatusSchema = zod.z.enum([
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_http_exception = require("./http-exception-Co3MbFUf.cjs");
|
|
2
2
|
const require_workspace = require("./workspace-C5BBUatQ.cjs");
|
|
3
3
|
const require_route_builder = require("./route-builder-DjTBxSZN.cjs");
|
|
4
|
-
const require_utils = require("./utils-
|
|
4
|
+
const require_utils = require("./utils-LrIIsUqL.cjs");
|
|
5
5
|
const require_server_handlers_authorship = require("./server/handlers/authorship.cjs");
|
|
6
6
|
const require_server_handlers_error = require("./server/handlers/error.cjs");
|
|
7
7
|
const require_server_handlers_skills_sh_shared = require("./server/handlers/skills-sh-shared.cjs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as HTTPException } from "./http-exception-CzaWkxMl.js";
|
|
2
2
|
import { H as skillsShPreviewResponseSchema, K as skillsShSearchResponseSchema, z as skillsShListResponseSchema } from "./workspace-DBDA3UQl.js";
|
|
3
3
|
import { n as createRoute } from "./route-builder-Dz18c3qm.js";
|
|
4
|
-
import { c as toSlug } from "./utils-
|
|
4
|
+
import { c as toSlug } from "./utils-4Rc0P7nt.js";
|
|
5
5
|
import { getCallerAuthorId } from "./server/handlers/authorship.js";
|
|
6
6
|
import { handleError } from "./server/handlers/error.js";
|
|
7
7
|
import { assertSafeFilePath, assertSafeSkillName, fetchSkillFiles, getPopularSkillsSh, previewSkillsSh, searchSkillsSh } from "./server/handlers/skills-sh-shared.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-10nMEhjP.cjs");
|
|
2
2
|
const require_schema_TQPB_dl2 = require("./schema-TQPB_dl2-CJX1q58F.cjs");
|
|
3
|
-
require("./constants-
|
|
4
|
-
const require_agents = require("./agents-
|
|
5
|
-
const require_tools = require("./tools-
|
|
6
|
-
const require_workflows = require("./workflows-
|
|
7
|
-
const require_server_adapter = require("./server-adapter-
|
|
8
|
-
const require_routes = require("./routes-
|
|
9
|
-
require("./utils-
|
|
10
|
-
const require_memory = require("./memory-
|
|
11
|
-
const require_observability = require("./observability-
|
|
12
|
-
const require_observability_new_endpoints = require("./observability-new-endpoints-
|
|
13
|
-
const require_editor_builder = require("./editor-builder-
|
|
3
|
+
require("./constants-DrYn0WtO.cjs");
|
|
4
|
+
const require_agents = require("./agents-D5Gfdskc.cjs");
|
|
5
|
+
const require_tools = require("./tools-DqvlVXzp.cjs");
|
|
6
|
+
const require_workflows = require("./workflows-B5CaaElk.cjs");
|
|
7
|
+
const require_server_adapter = require("./server-adapter-sru9PQEI.cjs");
|
|
8
|
+
const require_routes = require("./routes-BGnprZYb.cjs");
|
|
9
|
+
require("./utils-LrIIsUqL.cjs");
|
|
10
|
+
const require_memory = require("./memory-MbUMCc-D.cjs");
|
|
11
|
+
const require_observability = require("./observability-BurXEXQA.cjs");
|
|
12
|
+
const require_observability_new_endpoints = require("./observability-new-endpoints-BmMAKxRm.cjs");
|
|
13
|
+
const require_editor_builder = require("./editor-builder-CrDeYS4M.cjs");
|
|
14
14
|
const require_server_handlers_stored_agents = require("./server/handlers/stored-agents.cjs");
|
|
15
15
|
const require_stored_agents = require("./stored-agents-BS4_LGSs.cjs");
|
|
16
16
|
let _mastra_core_error = require("@mastra/core/error");
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { n as standardSchemaToJSONSchema, r as toStandardSchema } from "./schema-TQPB_dl2-CCzMcdDx.js";
|
|
2
|
-
import "./constants-
|
|
3
|
-
import { G as getAgentFromSystem, f as GENERATE_AGENT_ROUTE, h as GET_AGENT_BY_ID_ROUTE, v as LIST_AGENTS_ROUTE } from "./agents-
|
|
4
|
-
import { a as LIST_TOOLS_ROUTE, i as GET_TOOL_BY_ID_ROUTE, n as EXECUTE_TOOL_ROUTE, o as findTool } from "./tools-
|
|
5
|
-
import { _ as RESUME_ASYNC_WORKFLOW_ROUTE, a as GET_WORKFLOW_BY_ID_ROUTE, k as listWorkflowsFromSystem, o as GET_WORKFLOW_RUN_BY_ID_ROUTE, s as LIST_WORKFLOWS_ROUTE, t as CANCEL_WORKFLOW_RUN_ROUTE, x as START_ASYNC_WORKFLOW_ROUTE } from "./workflows-
|
|
6
|
-
import { o as checkRouteRBAC, r as authorizeRoute, s as dispatchRoute } from "./server-adapter-
|
|
7
|
-
import { c as getBuiltinMCPCapabilities, s as getEffectivePermission } from "./routes-
|
|
8
|
-
import "./utils-
|
|
9
|
-
import { E as UPDATE_THREAD_ROUTE, b as LIST_THREADS_ROUTE, d as GET_MEMORY_STATUS_ROUTE, f as GET_OBSERVATIONAL_MEMORY_ROUTE, g as GET_WORKING_MEMORY_ROUTE, h as GET_THREAD_BY_ID_ROUTE, i as CREATE_THREAD_ROUTE, l as GET_MEMORY_CONFIG_ROUTE, n as CLONE_THREAD_ROUTE, p as GET_RESOURCE_WORKING_MEMORY_ROUTE, t as AWAIT_BUFFER_STATUS_ROUTE, v as LIST_MESSAGES_ROUTE } from "./memory-
|
|
10
|
-
import { a as GET_TRACE_ROUTE, i as GET_TRACE_LIGHT_ROUTE, o as GET_TRACE_TRAJECTORY_ROUTE, r as GET_SPAN_ROUTE, u as LIST_TRACES_ROUTE } from "./observability-
|
|
11
|
-
import { A as GET_TRACE_QUERY_FIELDS, D as GET_SCORE_TIME_SERIES, E as GET_SCORE_PERCENTILES, F as LIST_SCORES, L as QUERY_SPANS, M as LIST_FEEDBACK, N as LIST_LOGS, O as GET_SERVICE_NAMES, R as QUERY_THREADS, S as GET_METRIC_TIME_SERIES, T as GET_SCORE_BREAKDOWN, _ as GET_METRIC_BREAKDOWN, b as GET_METRIC_NAMES, c as GET_ENTITY_NAMES, f as GET_FEEDBACK_AGGREGATE, g as GET_METRIC_AGGREGATE, h as GET_FEEDBACK_TIME_SERIES, j as GET_TRACE_QUERY_VALUES, k as GET_TAGS, l as GET_ENTITY_TYPES, m as GET_FEEDBACK_PERCENTILES, n as AGGREGATE_TRACES, p as GET_FEEDBACK_BREAKDOWN, s as GET_CAPABILITIES, t as AGGREGATE_SPANS, u as GET_ENVIRONMENTS, v as GET_METRIC_LABEL_KEYS, w as GET_SCORE_AGGREGATE, x as GET_METRIC_PERCENTILES, y as GET_METRIC_LABEL_VALUES, z as QUERY_TRACES } from "./observability-new-endpoints-
|
|
12
|
-
import { t as GET_EDITOR_BUILDER_AVAILABLE_MODELS_ROUTE } from "./editor-builder-
|
|
2
|
+
import "./constants-BGZc2rRV.js";
|
|
3
|
+
import { G as getAgentFromSystem, f as GENERATE_AGENT_ROUTE, h as GET_AGENT_BY_ID_ROUTE, v as LIST_AGENTS_ROUTE } from "./agents-C0IdGyiL.js";
|
|
4
|
+
import { a as LIST_TOOLS_ROUTE, i as GET_TOOL_BY_ID_ROUTE, n as EXECUTE_TOOL_ROUTE, o as findTool } from "./tools-CwEOkjcz.js";
|
|
5
|
+
import { _ as RESUME_ASYNC_WORKFLOW_ROUTE, a as GET_WORKFLOW_BY_ID_ROUTE, k as listWorkflowsFromSystem, o as GET_WORKFLOW_RUN_BY_ID_ROUTE, s as LIST_WORKFLOWS_ROUTE, t as CANCEL_WORKFLOW_RUN_ROUTE, x as START_ASYNC_WORKFLOW_ROUTE } from "./workflows-BRJQrD4w.js";
|
|
6
|
+
import { o as checkRouteRBAC, r as authorizeRoute, s as dispatchRoute } from "./server-adapter-CDN86NTj.js";
|
|
7
|
+
import { c as getBuiltinMCPCapabilities, s as getEffectivePermission } from "./routes-B-GM8Kgs.js";
|
|
8
|
+
import "./utils-4Rc0P7nt.js";
|
|
9
|
+
import { E as UPDATE_THREAD_ROUTE, b as LIST_THREADS_ROUTE, d as GET_MEMORY_STATUS_ROUTE, f as GET_OBSERVATIONAL_MEMORY_ROUTE, g as GET_WORKING_MEMORY_ROUTE, h as GET_THREAD_BY_ID_ROUTE, i as CREATE_THREAD_ROUTE, l as GET_MEMORY_CONFIG_ROUTE, n as CLONE_THREAD_ROUTE, p as GET_RESOURCE_WORKING_MEMORY_ROUTE, t as AWAIT_BUFFER_STATUS_ROUTE, v as LIST_MESSAGES_ROUTE } from "./memory-BCNMsZz4.js";
|
|
10
|
+
import { a as GET_TRACE_ROUTE, i as GET_TRACE_LIGHT_ROUTE, o as GET_TRACE_TRAJECTORY_ROUTE, r as GET_SPAN_ROUTE, u as LIST_TRACES_ROUTE } from "./observability-BkIqjp9o.js";
|
|
11
|
+
import { A as GET_TRACE_QUERY_FIELDS, D as GET_SCORE_TIME_SERIES, E as GET_SCORE_PERCENTILES, F as LIST_SCORES, L as QUERY_SPANS, M as LIST_FEEDBACK, N as LIST_LOGS, O as GET_SERVICE_NAMES, R as QUERY_THREADS, S as GET_METRIC_TIME_SERIES, T as GET_SCORE_BREAKDOWN, _ as GET_METRIC_BREAKDOWN, b as GET_METRIC_NAMES, c as GET_ENTITY_NAMES, f as GET_FEEDBACK_AGGREGATE, g as GET_METRIC_AGGREGATE, h as GET_FEEDBACK_TIME_SERIES, j as GET_TRACE_QUERY_VALUES, k as GET_TAGS, l as GET_ENTITY_TYPES, m as GET_FEEDBACK_PERCENTILES, n as AGGREGATE_TRACES, p as GET_FEEDBACK_BREAKDOWN, s as GET_CAPABILITIES, t as AGGREGATE_SPANS, u as GET_ENVIRONMENTS, v as GET_METRIC_LABEL_KEYS, w as GET_SCORE_AGGREGATE, x as GET_METRIC_PERCENTILES, y as GET_METRIC_LABEL_VALUES, z as QUERY_TRACES } from "./observability-new-endpoints-B8cU0TgV.js";
|
|
12
|
+
import { t as GET_EDITOR_BUILDER_AVAILABLE_MODELS_ROUTE } from "./editor-builder-C7JESHXV.js";
|
|
13
13
|
import { CREATE_STORED_AGENT_ROUTE, GET_STORED_AGENT_ROUTE, LIST_STORED_AGENTS_ROUTE, UPDATE_STORED_AGENT_ROUTE } from "./server/handlers/stored-agents.js";
|
|
14
14
|
import { O as updateStoredAgentBodySchema, n as createStoredAgentBodySchema } from "./stored-agents-DcyDMKP2.js";
|
|
15
15
|
import { ErrorCategory, ErrorDomain, MastraError } from "@mastra/core/error";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require("./constants-
|
|
1
|
+
require("./constants-DrYn0WtO.cjs");
|
|
2
2
|
const require_http_exception = require("./http-exception-Co3MbFUf.cjs");
|
|
3
3
|
const require_route_builder = require("./route-builder-DjTBxSZN.cjs");
|
|
4
4
|
const require_server_handlers_authorship = require("./server/handlers/authorship.cjs");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./constants-
|
|
1
|
+
import "./constants-BGZc2rRV.js";
|
|
2
2
|
import { t as HTTPException } from "./http-exception-CzaWkxMl.js";
|
|
3
3
|
import { n as createRoute } from "./route-builder-Dz18c3qm.js";
|
|
4
4
|
import { assertWriteAccess, getCallerAuthorId, hasAdminBypass, hasScopedPermission } from "./server/handlers/authorship.js";
|
|
@@ -73,6 +73,7 @@ const RESERVED_REQUEST_CONTEXT_KEYS = [
|
|
|
73
73
|
MASTRA_INHERITED_MEMORY_KEY,
|
|
74
74
|
"mastra__factoryMemorySettings",
|
|
75
75
|
"mastra__durableSegments",
|
|
76
|
+
"mastra__controllerRunBinding",
|
|
76
77
|
"organizationId"
|
|
77
78
|
];
|
|
78
79
|
const RESERVED_CONTEXT_KEYS = new Set(RESERVED_REQUEST_CONTEXT_KEYS);
|
|
@@ -73,6 +73,7 @@ const RESERVED_REQUEST_CONTEXT_KEYS = [
|
|
|
73
73
|
MASTRA_INHERITED_MEMORY_KEY,
|
|
74
74
|
"mastra__factoryMemorySettings",
|
|
75
75
|
"mastra__durableSegments",
|
|
76
|
+
"mastra__controllerRunBinding",
|
|
76
77
|
"organizationId"
|
|
77
78
|
];
|
|
78
79
|
const RESERVED_CONTEXT_KEYS = new Set(RESERVED_REQUEST_CONTEXT_KEYS);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-10nMEhjP.cjs");
|
|
2
|
-
const require_utils = require("./utils-
|
|
2
|
+
const require_utils = require("./utils-CUmygG-3.cjs");
|
|
3
3
|
const require_http_exception = require("./http-exception-Co3MbFUf.cjs");
|
|
4
4
|
const require_conversations = require("./conversations-BVj0Dk2Q.cjs");
|
|
5
5
|
const require_route_builder = require("./route-builder-DjTBxSZN.cjs");
|
|
6
|
-
const require_agents = require("./agents-
|
|
6
|
+
const require_agents = require("./agents-D5Gfdskc.cjs");
|
|
7
7
|
const require_server_handlers_error = require("./server/handlers/error.cjs");
|
|
8
8
|
const require_server_handlers_responses_adapter = require("./server/handlers/responses.adapter.cjs");
|
|
9
9
|
const require_server_handlers_responses_storage = require("./server/handlers/responses.storage.cjs");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as __exportAll } from "./rolldown-runtime-CQI-hT2b.js";
|
|
2
|
-
import { _ as MastraFGAPermissions, g as validateThreadOwnership, i as getEffectiveResourceId } from "./utils-
|
|
2
|
+
import { _ as MastraFGAPermissions, g as validateThreadOwnership, i as getEffectiveResourceId } from "./utils-D3t571cY.js";
|
|
3
3
|
import { t as HTTPException } from "./http-exception-CzaWkxMl.js";
|
|
4
4
|
import { a as createConversationBodySchema, i as conversationObjectSchema, n as conversationIdPathParams, r as conversationItemsListSchema, t as conversationDeletedSchema } from "./conversations-DHrKTI6x.js";
|
|
5
5
|
import { n as createRoute } from "./route-builder-Dz18c3qm.js";
|
|
6
|
-
import { G as getAgentFromSystem } from "./agents-
|
|
6
|
+
import { G as getAgentFromSystem } from "./agents-C0IdGyiL.js";
|
|
7
7
|
import { handleError } from "./server/handlers/error.js";
|
|
8
8
|
import { mapMastraMessagesToConversationItems } from "./server/handlers/responses.adapter.js";
|
|
9
9
|
import { findConversationThreadAcrossAgents, getAgentMemoryStore } from "./server/handlers/responses.storage.js";
|
|
@@ -444,6 +444,7 @@ const experimentResponseSchema = zod_v4.z.object({
|
|
|
444
444
|
]).nullable(),
|
|
445
445
|
targetId: zod_v4.z.string().nullable(),
|
|
446
446
|
scorerIds: zod_v4.z.array(zod_v4.z.string()).nullable().optional(),
|
|
447
|
+
scorerVersions: zod_v4.z.record(zod_v4.z.string(), zod_v4.z.string()).nullable().optional().describe("Stored-scorer version IDs pinned for this experiment, keyed by scorer ID"),
|
|
447
448
|
name: zod_v4.z.string().optional(),
|
|
448
449
|
description: zod_v4.z.string().optional(),
|
|
449
450
|
metadata: zod_v4.z.record(zod_v4.z.string(), zod_v4.z.unknown()).optional(),
|
|
@@ -444,6 +444,7 @@ const experimentResponseSchema = z.object({
|
|
|
444
444
|
]).nullable(),
|
|
445
445
|
targetId: z.string().nullable(),
|
|
446
446
|
scorerIds: z.array(z.string()).nullable().optional(),
|
|
447
|
+
scorerVersions: z.record(z.string(), z.string()).nullable().optional().describe("Stored-scorer version IDs pinned for this experiment, keyed by scorer ID"),
|
|
447
448
|
name: z.string().optional(),
|
|
448
449
|
description: z.string().optional(),
|
|
449
450
|
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-10nMEhjP.cjs");
|
|
2
2
|
const require_schema_TQPB_dl2 = require("./schema-TQPB_dl2-CJX1q58F.cjs");
|
|
3
|
-
require("./utils-
|
|
3
|
+
require("./utils-LrIIsUqL.cjs");
|
|
4
4
|
const require_dist = require("./dist-BZGewCGq.cjs");
|
|
5
5
|
let zod_v4 = require("zod/v4");
|
|
6
6
|
zod_v4 = require_rolldown_runtime.__toESM(zod_v4, 1);
|
|
@@ -8656,7 +8656,7 @@ function splitLines(text) {
|
|
|
8656
8656
|
else result.push(result.pop().slice(0, -1));
|
|
8657
8657
|
return result;
|
|
8658
8658
|
}
|
|
8659
|
-
// ../memory/dist/src-
|
|
8659
|
+
// ../memory/dist/src-BLtNRhqm.js
|
|
8660
8660
|
var __defProp$3 = Object.defineProperty;
|
|
8661
8661
|
var __exportAll = (all, no_symbols) => {
|
|
8662
8662
|
let target = {};
|
|
@@ -34041,12 +34041,30 @@ function resolveTimeZone(timeZone) {
|
|
|
34041
34041
|
}
|
|
34042
34042
|
return known ? timeZone : void 0;
|
|
34043
34043
|
}
|
|
34044
|
+
const MAX_CACHED_FORMATTERS = 256;
|
|
34045
|
+
const formatters = /* @__PURE__ */ new Map();
|
|
34046
|
+
/**
|
|
34047
|
+
* A shared `en-US` formatter for `options` in `timeZone`, or in the process time zone when unset. Building a formatter
|
|
34048
|
+
* costs far more than formatting with one, and OM formats a date for every message line. `name` identifies `options`.
|
|
34049
|
+
*/
|
|
34050
|
+
function getDateTimeFormat(name, timeZone, options) {
|
|
34051
|
+
const key = `${name}|${timeZone ?? `process:${globalThis.process?.env?.TZ ?? ""}`}`;
|
|
34052
|
+
let formatter = formatters.get(key);
|
|
34053
|
+
if (!formatter) {
|
|
34054
|
+
if (formatters.size >= MAX_CACHED_FORMATTERS) formatters.clear();
|
|
34055
|
+
formatter = new Intl.DateTimeFormat("en-US", {
|
|
34056
|
+
...options,
|
|
34057
|
+
timeZone
|
|
34058
|
+
});
|
|
34059
|
+
formatters.set(key, formatter);
|
|
34060
|
+
}
|
|
34061
|
+
return formatter;
|
|
34062
|
+
}
|
|
34044
34063
|
/** Day number of the calendar date `instant` falls on in `timeZone` (the process time zone when unset). */
|
|
34045
34064
|
function calendarDayIn(instant, timeZone) {
|
|
34046
34065
|
const zone = resolveTimeZone(timeZone);
|
|
34047
34066
|
if (!zone) return calendarDay(instant);
|
|
34048
|
-
const parts =
|
|
34049
|
-
timeZone: zone,
|
|
34067
|
+
const parts = getDateTimeFormat("calendar-day", zone, {
|
|
34050
34068
|
year: "numeric",
|
|
34051
34069
|
month: "numeric",
|
|
34052
34070
|
day: "numeric"
|
|
@@ -34361,7 +34379,8 @@ function formatTemporalGap(diffMs) {
|
|
|
34361
34379
|
return formatTwoUnits(year, "year", month, "month");
|
|
34362
34380
|
}
|
|
34363
34381
|
function formatTemporalTimestamp(date) {
|
|
34364
|
-
|
|
34382
|
+
if (Number.isNaN(date.getTime())) return "Invalid Date";
|
|
34383
|
+
return getDateTimeFormat("temporal-timestamp", void 0, {
|
|
34365
34384
|
year: "numeric",
|
|
34366
34385
|
month: "2-digit",
|
|
34367
34386
|
day: "2-digit",
|
|
@@ -34369,7 +34388,7 @@ function formatTemporalTimestamp(date) {
|
|
|
34369
34388
|
minute: "2-digit",
|
|
34370
34389
|
hour12: true,
|
|
34371
34390
|
timeZoneName: "short"
|
|
34372
|
-
});
|
|
34391
|
+
}).format(date);
|
|
34373
34392
|
}
|
|
34374
34393
|
function getMessagePartTimestamp(msg, position) {
|
|
34375
34394
|
const timestamps = msg.content?.parts?.map((part) => "createdAt" in part ? part.createdAt : void 0).filter((timestamp) => typeof timestamp === "number");
|
|
@@ -35421,8 +35440,7 @@ const OBSERVER_IMAGE_FILE_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
|
35421
35440
|
]);
|
|
35422
35441
|
function formatObserverDate(createdAt, timeZone) {
|
|
35423
35442
|
if (!createdAt) return "";
|
|
35424
|
-
const parts =
|
|
35425
|
-
timeZone,
|
|
35443
|
+
const parts = getDateTimeFormat("observer-date", timeZone, {
|
|
35426
35444
|
year: "numeric",
|
|
35427
35445
|
month: "short",
|
|
35428
35446
|
day: "numeric"
|
|
@@ -35431,12 +35449,11 @@ function formatObserverDate(createdAt, timeZone) {
|
|
|
35431
35449
|
return `${part("month")} ${part("day")} ${part("year")}`;
|
|
35432
35450
|
}
|
|
35433
35451
|
function formatObserverTime(createdAt, timeZone) {
|
|
35434
|
-
return createdAt ?
|
|
35435
|
-
timeZone,
|
|
35452
|
+
return createdAt ? getDateTimeFormat("observer-time", timeZone, {
|
|
35436
35453
|
hour: "numeric",
|
|
35437
35454
|
minute: "2-digit",
|
|
35438
35455
|
hour12: true
|
|
35439
|
-
}) : "";
|
|
35456
|
+
}).format(createdAt) : "";
|
|
35440
35457
|
}
|
|
35441
35458
|
function getObserverPathExtension(value) {
|
|
35442
35459
|
return (value.split("#", 1)[0]?.split("?", 1)[0] ?? value).match(/\.([a-z0-9]+)$/i)?.[1]?.toLowerCase();
|
|
@@ -37361,7 +37378,7 @@ async function resolveImageDimensionsAsync(part) {
|
|
|
37361
37378
|
const url = resolveHttpAssetUrl(getObjectValue(part, "image") ?? getObjectValue(part, "data"));
|
|
37362
37379
|
if (!url) return existing;
|
|
37363
37380
|
try {
|
|
37364
|
-
const probeImageSize = (await Promise.resolve().then(() => /* @__PURE__ */ require_rolldown_runtime.__toESM(require("./probe-image-size-
|
|
37381
|
+
const probeImageSize = (await Promise.resolve().then(() => /* @__PURE__ */ require_rolldown_runtime.__toESM(require("./probe-image-size-DSXA3-NW.cjs").default, 1))).default;
|
|
37365
37382
|
const probed = await probeImageSize(url, {
|
|
37366
37383
|
open_timeout: REMOTE_IMAGE_PROBE_TIMEOUT_MS,
|
|
37367
37384
|
response_timeout: REMOTE_IMAGE_PROBE_TIMEOUT_MS,
|
|
@@ -49834,6 +49851,27 @@ const invalidMerge = (text) => new _mastra_core_error.MastraError({
|
|
|
49834
49851
|
category: _mastra_core_error.ErrorCategory.USER,
|
|
49835
49852
|
text
|
|
49836
49853
|
});
|
|
49854
|
+
/**
|
|
49855
|
+
* Whether a processor with `id` is configured, either at the top level or as a step
|
|
49856
|
+
* anywhere inside a processor workflow (sequential, branch, parallel, loop, foreach, nested workflow).
|
|
49857
|
+
* Workflow steps built with `createStep(processor)` carry `processorId`, which survives step id
|
|
49858
|
+
* rewrites (the Editor renames graph steps to `processor:<graph step id>`); older core versions
|
|
49859
|
+
* only carry the id `processor:<id>`.
|
|
49860
|
+
* A step inside a branch counts even though it only runs when that branch is taken.
|
|
49861
|
+
*/
|
|
49862
|
+
function hasConfiguredProcessorId(processors, id) {
|
|
49863
|
+
const seen = /* @__PURE__ */ new Set();
|
|
49864
|
+
const matchesStep = (step) => {
|
|
49865
|
+
if (!step || typeof step !== "object" || seen.has(step)) return false;
|
|
49866
|
+
seen.add(step);
|
|
49867
|
+
const { processorId, id: stepId, stepGraph } = step;
|
|
49868
|
+
if (Array.isArray(stepGraph)) return stepGraph.some(matchesEntry);
|
|
49869
|
+
return processorId !== void 0 ? processorId === id : stepId === `processor:${id}`;
|
|
49870
|
+
};
|
|
49871
|
+
const isEntry = (value) => !!value && typeof value === "object" && "type" in value && "step" in value;
|
|
49872
|
+
const matchesEntry = (entry) => (isEntry(entry.step) ? matchesEntry(entry.step) : matchesStep(entry.step)) || (entry.steps ?? []).some(matchesEntry);
|
|
49873
|
+
return processors.some((processor) => (0, _mastra_core_processors.isProcessorWorkflow)(processor) ? matchesStep(processor) : processor.id === id);
|
|
49874
|
+
}
|
|
49837
49875
|
var Memory = class Memory extends _mastra_core_memory.MastraMemory {
|
|
49838
49876
|
createMemoryTokenCounter() {
|
|
49839
49877
|
return new TokenCounter();
|
|
@@ -52123,7 +52161,7 @@ Notes:
|
|
|
52123
52161
|
*/
|
|
52124
52162
|
async getErrorProcessors(configuredProcessors = [], context) {
|
|
52125
52163
|
const processors = await super.getErrorProcessors(configuredProcessors, context);
|
|
52126
|
-
const om = await this.createOMProcessor(configuredProcessors, context);
|
|
52164
|
+
const om = await this.createOMProcessor(configuredProcessors.filter((p) => !(0, _mastra_core_processors.isProcessorWorkflow)(p)), context);
|
|
52127
52165
|
if (om) processors.push(om);
|
|
52128
52166
|
return processors;
|
|
52129
52167
|
}
|
|
@@ -52133,7 +52171,7 @@ Notes:
|
|
|
52133
52171
|
* in the user's configured processors.
|
|
52134
52172
|
*/
|
|
52135
52173
|
async createOMProcessor(configuredProcessors = [], context) {
|
|
52136
|
-
if (configuredProcessors
|
|
52174
|
+
if (hasConfiguredProcessorId(configuredProcessors, "observational-memory")) return null;
|
|
52137
52175
|
const runtimeMemory = context?.get("MastraMemory");
|
|
52138
52176
|
const runtimeObservationalMemory = normalizeObservationalMemoryConfig(runtimeMemory?.memoryConfig?.observationalMemory);
|
|
52139
52177
|
const effectiveConfig = normalizeObservationalMemoryConfig((runtimeMemory?.memoryConfig?.observationalMemory !== void 0 ? this.getMergedThreadConfig({
|
|
@@ -53296,7 +53334,7 @@ const createModelInstance = async (provider, modelId, version = "v2") => {
|
|
|
53296
53334
|
try {
|
|
53297
53335
|
const providerFn = version === `v1` ? { v1: {
|
|
53298
53336
|
openai: async () => {
|
|
53299
|
-
const { openai } = await Promise.resolve().then(() => require("./dist-
|
|
53337
|
+
const { openai } = await Promise.resolve().then(() => require("./dist-CxDD21r1.cjs"));
|
|
53300
53338
|
return openai(modelId);
|
|
53301
53339
|
},
|
|
53302
53340
|
anthropic: async () => {
|