@mastra/server 1.67.0-alpha.3 → 1.67.0-alpha.4
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/_types/@mastra_schema-compat/dist/schema.types.d.ts +20 -1
- package/dist/{api-schema-manifest-DNk8B4kw.js → api-schema-manifest-B8uyCfJp.js} +2 -2
- package/dist/{api-schema-manifest-DNk8B4kw.js.map → api-schema-manifest-B8uyCfJp.js.map} +1 -1
- package/dist/{api-schema-manifest-1LriOYQM.cjs → api-schema-manifest-nIt4xi1r.cjs} +2 -2
- package/dist/{api-schema-manifest-1LriOYQM.cjs.map → api-schema-manifest-nIt4xi1r.cjs.map} +1 -1
- package/dist/{datasets-C-_ZWnxR.cjs → datasets-BqCRJLYH.cjs} +25 -2
- package/dist/datasets-BqCRJLYH.cjs.map +1 -0
- package/dist/{datasets-B4qPHzEy.js → datasets-Dhk4CUat.js} +20 -3
- package/dist/datasets-Dhk4CUat.js.map +1 -0
- package/dist/{dist-Bw-Zrv4_.js → dist-8iDh9UbP.js} +14 -5
- package/dist/dist-8iDh9UbP.js.map +1 -0
- package/dist/{dist-Du9y2ur5.cjs → dist-CBDJtAr5.cjs} +14 -5
- package/dist/dist-CBDJtAr5.cjs.map +1 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/{routes-DXUcYEc6.js → routes-BSAA4PVg.js} +4 -1
- package/dist/routes-BSAA4PVg.js.map +1 -0
- package/dist/{routes-9i4gAixo.cjs → routes-D5r7qWgZ.cjs} +4 -1
- package/dist/routes-D5r7qWgZ.cjs.map +1 -0
- 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/agents.cjs +9 -16
- package/dist/server/handlers/agents.cjs.map +1 -1
- package/dist/server/handlers/agents.d.ts.map +1 -1
- package/dist/server/handlers/agents.js +2 -9
- package/dist/server/handlers/agents.js.map +1 -1
- package/dist/server/handlers/conversations.cjs +1 -1
- package/dist/server/handlers/conversations.js +1 -1
- package/dist/server/handlers/datasets.cjs +17 -8
- package/dist/server/handlers/datasets.cjs.map +1 -1
- package/dist/server/handlers/datasets.d.ts +27 -0
- package/dist/server/handlers/datasets.d.ts.map +1 -1
- package/dist/server/handlers/datasets.js +17 -8
- package/dist/server/handlers/datasets.js.map +1 -1
- package/dist/server/handlers/logs.cjs +1 -1
- package/dist/server/handlers/logs.js +1 -1
- package/dist/server/handlers/memory.cjs +1 -1
- package/dist/server/handlers/memory.js +1 -1
- package/dist/server/handlers/plans.cjs +1 -1
- package/dist/server/handlers/plans.js +1 -1
- package/dist/server/handlers/responses.cjs +1 -1
- package/dist/server/handlers/responses.d.ts +11 -11
- 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/system.cjs +1 -1
- package/dist/server/handlers/system.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 +2 -1
- package/dist/server/handlers/utils.d.ts +6 -0
- package/dist/server/handlers/utils.d.ts.map +1 -1
- package/dist/server/handlers/utils.js +2 -2
- package/dist/server/handlers/workflow-builder.cjs +5 -0
- package/dist/server/handlers/workflow-builder.d.ts +322 -0
- package/dist/server/handlers/workflow-builder.d.ts.map +1 -0
- package/dist/server/handlers/workflow-builder.js +2 -0
- package/dist/server/handlers/workflows.cjs +1 -1
- package/dist/server/handlers/workflows.js +1 -1
- package/dist/server/schemas/datasets.d.ts +18 -0
- package/dist/server/schemas/datasets.d.ts.map +1 -1
- package/dist/server/schemas/index.cjs +2 -1
- package/dist/server/schemas/index.js +2 -2
- package/dist/server/schemas/workflow-builder.d.ts +26 -0
- package/dist/server/schemas/workflow-builder.d.ts.map +1 -0
- package/dist/server/server-adapter/index.cjs +11 -1
- package/dist/server/server-adapter/index.cjs.map +1 -1
- package/dist/server/server-adapter/index.d.ts.map +1 -1
- package/dist/server/server-adapter/index.js +11 -1
- package/dist/server/server-adapter/index.js.map +1 -1
- package/dist/server/server-adapter/routes/conversations.d.ts +3 -3
- package/dist/server/server-adapter/routes/datasets.d.ts +27 -0
- package/dist/server/server-adapter/routes/datasets.d.ts.map +1 -1
- package/dist/server/server-adapter/routes/editor-builder.d.ts +319 -0
- package/dist/server/server-adapter/routes/editor-builder.d.ts.map +1 -1
- package/dist/server/server-adapter/routes/workspace.d.ts +23 -23
- package/dist/{utils-CMWGBd0O.js → utils-KsERfbhc.js} +15 -3
- package/dist/utils-KsERfbhc.js.map +1 -0
- package/dist/{utils-BtkczLrA.cjs → utils-aIu3gkhJ.cjs} +19 -1
- package/dist/utils-aIu3gkhJ.cjs.map +1 -0
- package/dist/workflow-builder-C9DVk9Tw.js +102 -0
- package/dist/workflow-builder-C9DVk9Tw.js.map +1 -0
- package/dist/workflow-builder-_rQWs1B6.cjs +115 -0
- package/dist/workflow-builder-_rQWs1B6.cjs.map +1 -0
- package/package.json +7 -7
- package/dist/datasets-B4qPHzEy.js.map +0 -1
- package/dist/datasets-C-_ZWnxR.cjs.map +0 -1
- package/dist/dist-Bw-Zrv4_.js.map +0 -1
- package/dist/dist-Du9y2ur5.cjs.map +0 -1
- package/dist/routes-9i4gAixo.cjs.map +0 -1
- package/dist/routes-DXUcYEc6.js.map +0 -1
- package/dist/utils-BtkczLrA.cjs.map +0 -1
- package/dist/utils-CMWGBd0O.js.map +0 -1
|
@@ -3,7 +3,7 @@ const require_rolldown_runtime = require("../../rolldown-runtime-Bd6kNlEP.cjs");
|
|
|
3
3
|
const require_common = require("../../common-DQn8jX5T.cjs");
|
|
4
4
|
const require_route_builder = require("../../route-builder-DupY8fkI.cjs");
|
|
5
5
|
const require_server_handlers_error = require("./error.cjs");
|
|
6
|
-
const require_utils = require("../../utils-
|
|
6
|
+
const require_utils = require("../../utils-aIu3gkhJ.cjs");
|
|
7
7
|
const require_logs = require("../../logs-BDuGFqxu.cjs");
|
|
8
8
|
//#region src/server/handlers/logs.ts
|
|
9
9
|
var logs_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
|
|
@@ -2,7 +2,7 @@ import { r as __exportAll } from "../../rolldown-runtime-maW3aOIk.js";
|
|
|
2
2
|
import { l as runIdSchema } from "../../common-5ZZuR6wj.js";
|
|
3
3
|
import { n as createRoute } from "../../route-builder-BukcT_Kp.js";
|
|
4
4
|
import { handleError } from "./error.js";
|
|
5
|
-
import {
|
|
5
|
+
import { o as parseFilters, u as validateBody } from "../../utils-KsERfbhc.js";
|
|
6
6
|
import { n as listLogsQuerySchema, r as listLogsResponseSchema, t as listLogTransportsResponseSchema } from "../../logs-Cz5NiwGP.js";
|
|
7
7
|
//#region src/server/handlers/logs.ts
|
|
8
8
|
var logs_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -3,7 +3,7 @@ const require_rolldown_runtime = require("../../rolldown-runtime-Bd6kNlEP.cjs");
|
|
|
3
3
|
const require_http_exception = require("../../http-exception-CKDHupKw.cjs");
|
|
4
4
|
const require_route_builder = require("../../route-builder-DupY8fkI.cjs");
|
|
5
5
|
const require_server_handlers_error = require("./error.cjs");
|
|
6
|
-
const require_utils = require("../../utils-
|
|
6
|
+
const require_utils = require("../../utils-aIu3gkhJ.cjs");
|
|
7
7
|
const require_memory = require("../../memory-CE6rUGmo.cjs");
|
|
8
8
|
const require_server_handlers_gateway_memory_client = require("./gateway-memory-client.cjs");
|
|
9
9
|
let _mastra_core_agent = require("@mastra/core/agent");
|
|
@@ -2,7 +2,7 @@ import { r as __exportAll } from "../../rolldown-runtime-maW3aOIk.js";
|
|
|
2
2
|
import { t as HTTPException } from "../../http-exception-CyfxZB6W.js";
|
|
3
3
|
import { n as createRoute } from "../../route-builder-BukcT_Kp.js";
|
|
4
4
|
import { handleError } from "./error.js";
|
|
5
|
-
import {
|
|
5
|
+
import { i as getEffectiveThreadId, n as getContextResourceId, p as MastraFGAPermissions, r as getEffectiveResourceId, t as enforceThreadAccess, u as validateBody } from "../../utils-KsERfbhc.js";
|
|
6
6
|
import { A as listThreadsNetworkQuerySchema, B as searchMemoryQuerySchema, C as getThreadByIdResponseSchema, D as listMessagesNetworkQuerySchema, G as updateThreadBodySchema, H as threadIdPathParams, I as optionalAgentIdQuerySchema, J as updateWorkingMemoryResponseSchema, K as updateThreadNetworkQuerySchema, L as saveMessagesBodySchema, M as listThreadsResponseSchema, N as memoryConfigResponseSchema, O as listMessagesQuerySchema, P as memoryStatusResponseSchema, R as saveMessagesNetworkQuerySchema, S as getThreadByIdQuerySchema, T as getWorkingMemoryResponseSchema, U as transferThreadBodySchema, V as searchMemoryResponseSchema, W as transferThreadResponseSchema, _ as getMemoryStatusNetworkQuerySchema, a as cloneThreadResponseSchema, b as getObservationalMemoryResponseSchema, c as deleteMessagesBodySchema, d as deleteMessagesResponseSchema, f as deleteThreadNetworkQuerySchema, g as getMemoryConfigQuerySchema, i as cloneThreadBodySchema, j as listThreadsQuerySchema, k as listMessagesResponseSchema, l as deleteMessagesNetworkQuerySchema, m as deleteThreadResponseSchema, n as awaitBufferStatusBodySchema, o as createThreadBodySchema, p as deleteThreadQuerySchema, q as updateWorkingMemoryBodySchema, r as awaitBufferStatusResponseSchema, s as createThreadNetworkQuerySchema, t as agentIdQuerySchema, u as deleteMessagesQuerySchema, v as getMemoryStatusQuerySchema, w as getWorkingMemoryQuerySchema, x as getThreadByIdNetworkQuerySchema, y as getObservationalMemoryQuerySchema, z as saveMessagesResponseSchema } from "../../memory-Cp3Yo-OX.js";
|
|
7
7
|
import { getGatewayClient, isGatewayAgentAsync, toLocalMessage, toLocalOMRecord, toLocalThread } from "./gateway-memory-client.js";
|
|
8
8
|
import { Agent } from "@mastra/core/agent";
|
|
@@ -4,7 +4,7 @@ const require_http_exception = require("../../http-exception-CKDHupKw.cjs");
|
|
|
4
4
|
const require_agents = require("../../agents-C3k-sZBO.cjs");
|
|
5
5
|
const require_route_builder = require("../../route-builder-DupY8fkI.cjs");
|
|
6
6
|
const require_server_handlers_error = require("./error.cjs");
|
|
7
|
-
const require_utils = require("../../utils-
|
|
7
|
+
const require_utils = require("../../utils-aIu3gkhJ.cjs");
|
|
8
8
|
const require_server_handlers_agents = require("./agents.cjs");
|
|
9
9
|
let _mastra_core_tools = require("@mastra/core/tools");
|
|
10
10
|
//#region src/server/handlers/plans.ts
|
|
@@ -3,7 +3,7 @@ import { t as HTTPException } from "../../http-exception-CyfxZB6W.js";
|
|
|
3
3
|
import { a as agentIdPathParams, o as agentPlanQuerySchema, s as agentPlanResponseSchema } from "../../agents-AMeMJBI1.js";
|
|
4
4
|
import { n as createRoute } from "../../route-builder-BukcT_Kp.js";
|
|
5
5
|
import { handleError } from "./error.js";
|
|
6
|
-
import {
|
|
6
|
+
import { p as MastraFGAPermissions } from "../../utils-KsERfbhc.js";
|
|
7
7
|
import { getAgentFromSystem } from "./agents.js";
|
|
8
8
|
import { submitPlanTool } from "@mastra/core/tools";
|
|
9
9
|
//#region src/server/handlers/plans.ts
|
|
@@ -3,7 +3,7 @@ const require_rolldown_runtime = require("../../rolldown-runtime-Bd6kNlEP.cjs");
|
|
|
3
3
|
const require_http_exception = require("../../http-exception-CKDHupKw.cjs");
|
|
4
4
|
const require_route_builder = require("../../route-builder-DupY8fkI.cjs");
|
|
5
5
|
const require_server_handlers_error = require("./error.cjs");
|
|
6
|
-
const require_utils = require("../../utils-
|
|
6
|
+
const require_utils = require("../../utils-aIu3gkhJ.cjs");
|
|
7
7
|
const require_server_handlers_agents = require("./agents.cjs");
|
|
8
8
|
const require_responses = require("../../responses-CKNdSRkS.cjs");
|
|
9
9
|
const require_server_handlers_responses_adapter = require("./responses.adapter.cjs");
|
|
@@ -187,6 +187,17 @@ export declare const GET_RESPONSE_ROUTE: Omit<import("@mastra/core/server").ApiR
|
|
|
187
187
|
model: string;
|
|
188
188
|
status: "completed" | "in_progress" | "incomplete";
|
|
189
189
|
output: ({
|
|
190
|
+
id: string;
|
|
191
|
+
type: "message";
|
|
192
|
+
role: "assistant";
|
|
193
|
+
status: "completed" | "in_progress" | "incomplete";
|
|
194
|
+
content: {
|
|
195
|
+
type: "output_text";
|
|
196
|
+
text: string;
|
|
197
|
+
annotations?: unknown[] | undefined;
|
|
198
|
+
logprobs?: unknown[] | undefined;
|
|
199
|
+
}[];
|
|
200
|
+
} | {
|
|
190
201
|
id: string;
|
|
191
202
|
type: "function_call";
|
|
192
203
|
call_id: string;
|
|
@@ -198,17 +209,6 @@ export declare const GET_RESPONSE_ROUTE: Omit<import("@mastra/core/server").ApiR
|
|
|
198
209
|
type: "function_call_output";
|
|
199
210
|
call_id: string;
|
|
200
211
|
output: string;
|
|
201
|
-
} | {
|
|
202
|
-
id: string;
|
|
203
|
-
type: "message";
|
|
204
|
-
role: "assistant";
|
|
205
|
-
status: "completed" | "in_progress" | "incomplete";
|
|
206
|
-
content: {
|
|
207
|
-
type: "output_text";
|
|
208
|
-
text: string;
|
|
209
|
-
annotations?: unknown[] | undefined;
|
|
210
|
-
logprobs?: unknown[] | undefined;
|
|
211
|
-
}[];
|
|
212
212
|
})[];
|
|
213
213
|
usage: {
|
|
214
214
|
input_tokens: number;
|
|
@@ -2,7 +2,7 @@ import { r as __exportAll } from "../../rolldown-runtime-maW3aOIk.js";
|
|
|
2
2
|
import { t as HTTPException } from "../../http-exception-CyfxZB6W.js";
|
|
3
3
|
import { n as createRoute } from "../../route-builder-BukcT_Kp.js";
|
|
4
4
|
import { handleError } from "./error.js";
|
|
5
|
-
import {
|
|
5
|
+
import { i as getEffectiveThreadId, p as MastraFGAPermissions, r as getEffectiveResourceId, t as enforceThreadAccess } from "../../utils-KsERfbhc.js";
|
|
6
6
|
import { getAgentFromSystem } from "./agents.js";
|
|
7
7
|
import { a as deleteResponseSchema, i as createResponseBodySchema, o as responseIdPathParams, u as responseObjectSchema } from "../../responses-DJNJgCTg.js";
|
|
8
8
|
import { buildCompletedResponse, buildInProgressResponse, createMessageId, createOutputTextPart, createResponseStreamEventTranslator, formatSseEvent, mapMastraToolsToResponseTools, mapResponseInputToExecutionMessages, mapResponseTurnRecordToResponse, toResponseStatus, toResponseUsage } from "./responses.adapter.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../../rolldown-runtime-Bd6kNlEP.cjs");
|
|
3
3
|
const require_http_exception = require("../../http-exception-CKDHupKw.cjs");
|
|
4
|
-
const require_utils = require("../../utils-
|
|
4
|
+
const require_utils = require("../../utils-aIu3gkhJ.cjs");
|
|
5
5
|
//#region src/server/handlers/responses.storage.ts
|
|
6
6
|
function isPlainObject(value) {
|
|
7
7
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as HTTPException } from "../../http-exception-CyfxZB6W.js";
|
|
2
|
-
import {
|
|
2
|
+
import { f as validateThreadOwnership, r as getEffectiveResourceId } from "../../utils-KsERfbhc.js";
|
|
3
3
|
//#region src/server/handlers/responses.storage.ts
|
|
4
4
|
function isPlainObject(value) {
|
|
5
5
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -88,7 +88,7 @@ const GET_API_SCHEMA_ROUTE = require_route_builder.createRoute({
|
|
|
88
88
|
tags: ["System"],
|
|
89
89
|
requiresAuth: true,
|
|
90
90
|
handler: async () => {
|
|
91
|
-
const { buildApiSchemaManifest } = await Promise.resolve().then(() => require("../../api-schema-manifest-
|
|
91
|
+
const { buildApiSchemaManifest } = await Promise.resolve().then(() => require("../../api-schema-manifest-nIt4xi1r.cjs"));
|
|
92
92
|
return buildApiSchemaManifest();
|
|
93
93
|
}
|
|
94
94
|
});
|
|
@@ -86,7 +86,7 @@ const GET_API_SCHEMA_ROUTE = createRoute({
|
|
|
86
86
|
tags: ["System"],
|
|
87
87
|
requiresAuth: true,
|
|
88
88
|
handler: async () => {
|
|
89
|
-
const { buildApiSchemaManifest } = await import("../../api-schema-manifest-
|
|
89
|
+
const { buildApiSchemaManifest } = await import("../../api-schema-manifest-B8uyCfJp.js");
|
|
90
90
|
return buildApiSchemaManifest();
|
|
91
91
|
}
|
|
92
92
|
});
|
|
@@ -8,7 +8,7 @@ const require_route_builder = require("../../route-builder-DupY8fkI.cjs");
|
|
|
8
8
|
require("../../schema-C7CvwM1d.cjs");
|
|
9
9
|
const require_utils = require("../../utils-WcR0QSUB.cjs");
|
|
10
10
|
const require_server_handlers_error = require("./error.cjs");
|
|
11
|
-
const require_utils$1 = require("../../utils-
|
|
11
|
+
const require_utils$1 = require("../../utils-aIu3gkhJ.cjs");
|
|
12
12
|
const require_server_handlers_tool_schema_overrides = require("./tool-schema-overrides.cjs");
|
|
13
13
|
const require_server_handlers_agents = require("./agents.cjs");
|
|
14
14
|
let _mastra_core_tools = require("@mastra/core/tools");
|
|
@@ -7,7 +7,7 @@ import { n as createRoute } from "../../route-builder-BukcT_Kp.js";
|
|
|
7
7
|
import "../../schema-BF_cZG0Y.js";
|
|
8
8
|
import { l as stringify } from "../../utils-Duk4hfT_.js";
|
|
9
9
|
import { handleError } from "./error.js";
|
|
10
|
-
import {
|
|
10
|
+
import { p as MastraFGAPermissions, u as validateBody } from "../../utils-KsERfbhc.js";
|
|
11
11
|
import { stripInjectedToolOverrideFields } from "./tool-schema-overrides.js";
|
|
12
12
|
import { getAgentFromSystem } from "./agents.js";
|
|
13
13
|
import { isProviderDefinedTool, isVercelTool } from "@mastra/core/tools";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../../rolldown-runtime-Bd6kNlEP.cjs");
|
|
3
|
-
const require_utils = require("../../utils-
|
|
3
|
+
const require_utils = require("../../utils-aIu3gkhJ.cjs");
|
|
4
4
|
exports.enforceThreadAccess = require_utils.enforceThreadAccess;
|
|
5
5
|
exports.getContextResourceId = require_utils.getContextResourceId;
|
|
6
6
|
exports.getEffectiveResourceId = require_utils.getEffectiveResourceId;
|
|
7
7
|
exports.getEffectiveThreadId = require_utils.getEffectiveThreadId;
|
|
8
|
+
exports.mergeBodyRequestContext = require_utils.mergeBodyRequestContext;
|
|
8
9
|
exports.parseFilters = require_utils.parseFilters;
|
|
9
10
|
exports.parsePerPage = require_utils.parsePerPage;
|
|
10
11
|
exports.requireEffectiveResourceId = require_utils.requireEffectiveResourceId;
|
|
@@ -12,6 +12,12 @@ export declare function parsePerPage(value: string | undefined, defaultValue?: n
|
|
|
12
12
|
* Parses filter query parameters into a key-value object.
|
|
13
13
|
*/
|
|
14
14
|
export declare function parseFilters(filters: string | string[] | undefined): Record<string, string> | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Merges a body-supplied requestContext into the trusted server RequestContext.
|
|
17
|
+
* The server context is authoritative: reserved keys are skipped and body values
|
|
18
|
+
* only fill keys the server context has not already set.
|
|
19
|
+
*/
|
|
20
|
+
export declare function mergeBodyRequestContext(serverRequestContext: RequestContext, bodyRequestContext: unknown): void;
|
|
15
21
|
/**
|
|
16
22
|
* Gets the effective resourceId, preferring the reserved key from requestContext
|
|
17
23
|
* over client-provided values for security.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/server/handlers/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAOtD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QAWzD;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,EAAE,MAAM,EAAE,QAMnF;AAED,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAA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AAS,EACtD,mBAAmB,EAAE,MAAM,GAAG,SAAS,GACtC,OAAO,CAAC,IAAI,CAAC,CAIf"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { enforceThreadAccess, getContextResourceId, getEffectiveResourceId, getEffectiveThreadId, parseFilters, parsePerPage, requireEffectiveResourceId, sanitizeBody, validateBody, validateRunOwnership, validateThreadOwnership };
|
|
1
|
+
import { a as mergeBodyRequestContext, c as requireEffectiveResourceId, d as validateRunOwnership, f as validateThreadOwnership, i as getEffectiveThreadId, l as sanitizeBody, n as getContextResourceId, o as parseFilters, r as getEffectiveResourceId, s as parsePerPage, t as enforceThreadAccess, u as validateBody } from "../../utils-KsERfbhc.js";
|
|
2
|
+
export { enforceThreadAccess, getContextResourceId, getEffectiveResourceId, getEffectiveThreadId, mergeBodyRequestContext, parseFilters, parsePerPage, requireEffectiveResourceId, sanitizeBody, validateBody, validateRunOwnership, validateThreadOwnership };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
require("../../rolldown-runtime-Bd6kNlEP.cjs");
|
|
3
|
+
const require_workflow_builder = require("../../workflow-builder-_rQWs1B6.cjs");
|
|
4
|
+
exports.GET_WORKFLOW_BUILDER_SETTINGS_ROUTE = require_workflow_builder.GET_WORKFLOW_BUILDER_SETTINGS_ROUTE;
|
|
5
|
+
exports.STREAM_WORKFLOW_BUILDER_ROUTE = require_workflow_builder.STREAM_WORKFLOW_BUILDER_ROUTE;
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
export declare const GET_WORKFLOW_BUILDER_SETTINGS_ROUTE: Omit<import("@mastra/core/server").ApiRoute, "createHandler" | "handler" | "method" | "openapi" | "path"> & {
|
|
2
|
+
method: "GET";
|
|
3
|
+
path: "/editor/workflow-builder/settings";
|
|
4
|
+
responseType: "json";
|
|
5
|
+
streamFormat?: 'sse' | 'stream';
|
|
6
|
+
sseFlushOnConnect?: boolean;
|
|
7
|
+
handler(params: import("../server-adapter").ServerContext): Promise<{
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
modelPolicy?: {
|
|
10
|
+
active: boolean;
|
|
11
|
+
pickerVisible?: boolean | undefined;
|
|
12
|
+
allowed?: ({
|
|
13
|
+
provider: string;
|
|
14
|
+
modelId?: string | undefined;
|
|
15
|
+
} | {
|
|
16
|
+
kind: "custom";
|
|
17
|
+
provider: string;
|
|
18
|
+
modelId?: string | undefined;
|
|
19
|
+
})[] | undefined;
|
|
20
|
+
default?: {
|
|
21
|
+
provider: string;
|
|
22
|
+
modelId: string;
|
|
23
|
+
} | {
|
|
24
|
+
kind: "custom";
|
|
25
|
+
provider: string;
|
|
26
|
+
modelId: string;
|
|
27
|
+
} | undefined;
|
|
28
|
+
} | undefined;
|
|
29
|
+
}>;
|
|
30
|
+
pathParamSchema?: import("zod").ZodType;
|
|
31
|
+
queryParamSchema?: import("zod").ZodType;
|
|
32
|
+
bodySchema?: import("zod").ZodType;
|
|
33
|
+
responseSchema?: import("zod").ZodType;
|
|
34
|
+
openapi?: import("../server-adapter/openapi-utils").OpenAPIRoute;
|
|
35
|
+
maxBodySize?: number;
|
|
36
|
+
deprecated?: boolean;
|
|
37
|
+
requiresPermission?: import("@mastra/core/auth").MastraFGAPermissionInput | import("@mastra/core/auth").MastraFGAPermissionInput[];
|
|
38
|
+
fga?: import("@mastra/core/auth").FGARouteConfig;
|
|
39
|
+
onValidationError?: import("@mastra/core/server").ValidationErrorHook;
|
|
40
|
+
readonly __schemas?: import("../server-adapter").RouteSchemas<undefined, undefined, undefined, import("zod").ZodObject<{
|
|
41
|
+
enabled: import("zod").ZodBoolean;
|
|
42
|
+
modelPolicy: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
43
|
+
active: import("zod").ZodBoolean;
|
|
44
|
+
pickerVisible: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
45
|
+
allowed: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
46
|
+
kind: import("zod").ZodLiteral<"custom">;
|
|
47
|
+
provider: import("zod").ZodString;
|
|
48
|
+
modelId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
49
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
50
|
+
provider: import("zod").ZodString;
|
|
51
|
+
modelId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
52
|
+
}, import("zod/v4/core").$strict>]>>>;
|
|
53
|
+
default: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
54
|
+
kind: import("zod").ZodLiteral<"custom">;
|
|
55
|
+
provider: import("zod").ZodString;
|
|
56
|
+
modelId: import("zod").ZodString;
|
|
57
|
+
}, import("zod/v4/core").$strict>, import("zod").ZodObject<{
|
|
58
|
+
provider: import("zod").ZodString;
|
|
59
|
+
modelId: import("zod").ZodString;
|
|
60
|
+
}, import("zod/v4/core").$strict>]>>;
|
|
61
|
+
}, import("zod/v4/core").$strip>>;
|
|
62
|
+
}, import("zod/v4/core").$strip>> | undefined;
|
|
63
|
+
} & {
|
|
64
|
+
readonly _mastraSchemaRoute: true;
|
|
65
|
+
};
|
|
66
|
+
export declare const STREAM_WORKFLOW_BUILDER_ROUTE: Omit<import("@mastra/core/server").ApiRoute, "createHandler" | "handler" | "method" | "openapi" | "path"> & {
|
|
67
|
+
method: "POST";
|
|
68
|
+
path: "/editor/workflow-builder/stream";
|
|
69
|
+
responseType: "stream";
|
|
70
|
+
streamFormat?: 'sse' | 'stream';
|
|
71
|
+
sseFlushOnConnect?: boolean;
|
|
72
|
+
handler(params: {
|
|
73
|
+
[x: string]: unknown;
|
|
74
|
+
messages: string | import("@mastra/core/agent/message-list").MessageInput[];
|
|
75
|
+
instructions?: import("@mastra/core/llm").SystemMessage | undefined;
|
|
76
|
+
system?: import("@mastra/core/llm").SystemMessage | undefined;
|
|
77
|
+
context?: import("@mastra/core/agent/message-list").MessageInput[] | undefined;
|
|
78
|
+
memory?: {
|
|
79
|
+
thread: string | {
|
|
80
|
+
[x: string]: unknown;
|
|
81
|
+
id: string;
|
|
82
|
+
};
|
|
83
|
+
resource?: string | undefined;
|
|
84
|
+
options?: Record<string, unknown> | undefined;
|
|
85
|
+
readOnly?: boolean | undefined;
|
|
86
|
+
} | undefined;
|
|
87
|
+
runId?: string | undefined;
|
|
88
|
+
savePerStep?: boolean | undefined;
|
|
89
|
+
requestContext?: Record<string, unknown> | undefined;
|
|
90
|
+
versions?: {
|
|
91
|
+
agents?: Record<string, {
|
|
92
|
+
versionId: string;
|
|
93
|
+
} | {
|
|
94
|
+
status: "draft" | "published";
|
|
95
|
+
}> | undefined;
|
|
96
|
+
defaultStatus?: "draft" | "published" | undefined;
|
|
97
|
+
} | undefined;
|
|
98
|
+
maxSteps?: number | undefined;
|
|
99
|
+
stopWhen?: ((event: unknown) => boolean | PromiseLike<boolean>)[] | ((event: unknown) => boolean | PromiseLike<boolean>) | undefined;
|
|
100
|
+
model?: string | undefined;
|
|
101
|
+
providerOptions?: Record<string, Record<string, string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
102
|
+
[key: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
|
|
103
|
+
} | null)[] | {
|
|
104
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
105
|
+
} | null)[] | {
|
|
106
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
107
|
+
} | null)[] | {
|
|
108
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
109
|
+
} | null)[] | {
|
|
110
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
111
|
+
} | null)[] | {
|
|
112
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
113
|
+
} | null)[] | {
|
|
114
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
115
|
+
} | null)[] | {
|
|
116
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
117
|
+
} | null)[] | {
|
|
118
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
119
|
+
} | null)[] | {
|
|
120
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
121
|
+
} | null)[] | {
|
|
122
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
123
|
+
} | null)[] | {
|
|
124
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
125
|
+
} | null>> | undefined;
|
|
126
|
+
modelSettings?: {
|
|
127
|
+
maxOutputTokens?: number;
|
|
128
|
+
temperature?: number;
|
|
129
|
+
topP?: number;
|
|
130
|
+
topK?: number;
|
|
131
|
+
presencePenalty?: number;
|
|
132
|
+
frequencyPenalty?: number;
|
|
133
|
+
stopSequences?: string[];
|
|
134
|
+
seed?: number;
|
|
135
|
+
maxRetries?: number;
|
|
136
|
+
headers?: Record<string, string | undefined>;
|
|
137
|
+
reasoning?: import("@mastra/core/loop").ReasoningLevel;
|
|
138
|
+
} | undefined;
|
|
139
|
+
activeTools?: string[] | undefined;
|
|
140
|
+
toolsets?: import("@mastra/core/agent").ToolsetsInput | undefined;
|
|
141
|
+
clientTools?: import("@mastra/core/agent").ToolsInput | undefined;
|
|
142
|
+
toolChoice?: "auto" | "none" | "required" | {
|
|
143
|
+
type: "tool";
|
|
144
|
+
toolName: string;
|
|
145
|
+
} | undefined;
|
|
146
|
+
requireToolApproval?: boolean | undefined;
|
|
147
|
+
scorers?: Record<string, {
|
|
148
|
+
scorer: string;
|
|
149
|
+
sampling?: import("@mastra/core/evals").ScoringSamplingConfig;
|
|
150
|
+
}> | undefined;
|
|
151
|
+
returnScorerData?: boolean | undefined;
|
|
152
|
+
tracingOptions?: {
|
|
153
|
+
metadata?: Record<string, unknown> | undefined;
|
|
154
|
+
requestContextKeys?: string[] | undefined;
|
|
155
|
+
traceId?: string | undefined;
|
|
156
|
+
parentSpanId?: string | undefined;
|
|
157
|
+
tags?: string[] | undefined;
|
|
158
|
+
hideInput?: boolean | undefined;
|
|
159
|
+
hideOutput?: boolean | undefined;
|
|
160
|
+
} | undefined;
|
|
161
|
+
output?: import("@mastra/core/llm").OutputType;
|
|
162
|
+
structuredOutput?: import("@mastra/core/agent").PublicStructuredOutputOptions<Record<string, unknown>> | undefined;
|
|
163
|
+
untilIdle?: boolean | {
|
|
164
|
+
maxIdleMs?: number | undefined;
|
|
165
|
+
} | undefined;
|
|
166
|
+
} & import("../server-adapter").ServerContext): Promise<import("../server-adapter/routes/stream-types").MastraStreamReturn>;
|
|
167
|
+
pathParamSchema?: import("zod").ZodType;
|
|
168
|
+
queryParamSchema?: import("zod").ZodType;
|
|
169
|
+
bodySchema?: import("zod").ZodType;
|
|
170
|
+
responseSchema?: import("zod").ZodType;
|
|
171
|
+
openapi?: import("../server-adapter/openapi-utils").OpenAPIRoute;
|
|
172
|
+
maxBodySize?: number;
|
|
173
|
+
deprecated?: boolean;
|
|
174
|
+
requiresPermission?: import("@mastra/core/auth").MastraFGAPermissionInput | import("@mastra/core/auth").MastraFGAPermissionInput[];
|
|
175
|
+
fga?: import("@mastra/core/auth").FGARouteConfig;
|
|
176
|
+
onValidationError?: import("@mastra/core/server").ValidationErrorHook;
|
|
177
|
+
readonly __schemas?: import("../server-adapter").RouteSchemas<undefined, undefined, import("zod").ZodObject<{
|
|
178
|
+
messages: import("zod").ZodUnion<readonly [import("zod").ZodArray<import("zod").ZodType<import("@mastra/core/agent/message-list").MessageInput, unknown, import("zod/v4/core").$ZodTypeInternals<import("@mastra/core/agent/message-list").MessageInput, unknown>>>, import("zod").ZodString]>;
|
|
179
|
+
instructions: import("zod").ZodOptional<import("zod").ZodType<import("@mastra/core/llm").SystemMessage, unknown, import("zod/v4/core").$ZodTypeInternals<import("@mastra/core/llm").SystemMessage, unknown>>>;
|
|
180
|
+
system: import("zod").ZodOptional<import("zod").ZodType<import("@mastra/core/llm").SystemMessage, unknown, import("zod/v4/core").$ZodTypeInternals<import("@mastra/core/llm").SystemMessage, unknown>>>;
|
|
181
|
+
context: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodType<import("@mastra/core/agent/message-list").MessageInput, unknown, import("zod/v4/core").$ZodTypeInternals<import("@mastra/core/agent/message-list").MessageInput, unknown>>>>;
|
|
182
|
+
memory: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
183
|
+
thread: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
184
|
+
id: import("zod").ZodString;
|
|
185
|
+
}, import("zod/v4/core").$loose>]>;
|
|
186
|
+
resource: import("zod").ZodOptional<import("zod").ZodString>;
|
|
187
|
+
options: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
188
|
+
readOnly: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
189
|
+
}, import("zod/v4/core").$strip>>;
|
|
190
|
+
runId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
191
|
+
savePerStep: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
192
|
+
requestContext: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
193
|
+
versions: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
194
|
+
agents: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnion<readonly [import("zod").ZodObject<{
|
|
195
|
+
versionId: import("zod").ZodString;
|
|
196
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
197
|
+
status: import("zod").ZodEnum<{
|
|
198
|
+
draft: "draft";
|
|
199
|
+
published: "published";
|
|
200
|
+
}>;
|
|
201
|
+
}, import("zod/v4/core").$strip>]>>>;
|
|
202
|
+
defaultStatus: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
203
|
+
draft: "draft";
|
|
204
|
+
published: "published";
|
|
205
|
+
}>>;
|
|
206
|
+
}, import("zod/v4/core").$strip>>;
|
|
207
|
+
maxSteps: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
208
|
+
stopWhen: import("zod").ZodOptional<import("zod").ZodType<((event: unknown) => boolean | PromiseLike<boolean>)[] | ((event: unknown) => boolean | PromiseLike<boolean>), unknown, import("zod/v4/core").$ZodTypeInternals<((event: unknown) => boolean | PromiseLike<boolean>)[] | ((event: unknown) => boolean | PromiseLike<boolean>), unknown>>>;
|
|
209
|
+
model: import("zod").ZodOptional<import("zod").ZodString>;
|
|
210
|
+
providerOptions: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodType<string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
211
|
+
[key: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
|
|
212
|
+
} | null)[] | {
|
|
213
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
214
|
+
} | null)[] | {
|
|
215
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
216
|
+
} | null)[] | {
|
|
217
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
218
|
+
} | null)[] | {
|
|
219
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
220
|
+
} | null)[] | {
|
|
221
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
222
|
+
} | null)[] | {
|
|
223
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
224
|
+
} | null)[] | {
|
|
225
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
226
|
+
} | null)[] | {
|
|
227
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
228
|
+
} | null)[] | {
|
|
229
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
230
|
+
} | null)[] | {
|
|
231
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
232
|
+
} | null)[] | {
|
|
233
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
234
|
+
} | null, unknown, import("zod/v4/core").$ZodTypeInternals<string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | {
|
|
235
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
236
|
+
} | null)[] | {
|
|
237
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
238
|
+
} | null)[] | {
|
|
239
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
240
|
+
} | null)[] | {
|
|
241
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
242
|
+
} | null)[] | {
|
|
243
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
244
|
+
} | null)[] | {
|
|
245
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
246
|
+
} | null)[] | {
|
|
247
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
248
|
+
} | null)[] | {
|
|
249
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
250
|
+
} | null)[] | {
|
|
251
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
252
|
+
} | null)[] | {
|
|
253
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
254
|
+
} | null)[] | {
|
|
255
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
256
|
+
} | null)[] | {
|
|
257
|
+
[key: string]: string | number | boolean | any | any | null;
|
|
258
|
+
} | null, unknown>>>>>;
|
|
259
|
+
modelSettings: import("zod").ZodOptional<import("zod").ZodType<{
|
|
260
|
+
maxOutputTokens?: number;
|
|
261
|
+
temperature?: number;
|
|
262
|
+
topP?: number;
|
|
263
|
+
topK?: number;
|
|
264
|
+
presencePenalty?: number;
|
|
265
|
+
frequencyPenalty?: number;
|
|
266
|
+
stopSequences?: string[];
|
|
267
|
+
seed?: number;
|
|
268
|
+
maxRetries?: number;
|
|
269
|
+
headers?: Record<string, string | undefined>;
|
|
270
|
+
reasoning?: import("@mastra/core/loop").ReasoningLevel;
|
|
271
|
+
}, unknown, import("zod/v4/core").$ZodTypeInternals<{
|
|
272
|
+
maxOutputTokens?: number;
|
|
273
|
+
temperature?: number;
|
|
274
|
+
topP?: number;
|
|
275
|
+
topK?: number;
|
|
276
|
+
presencePenalty?: number;
|
|
277
|
+
frequencyPenalty?: number;
|
|
278
|
+
stopSequences?: string[];
|
|
279
|
+
seed?: number;
|
|
280
|
+
maxRetries?: number;
|
|
281
|
+
headers?: Record<string, string | undefined>;
|
|
282
|
+
reasoning?: import("@mastra/core/loop").ReasoningLevel;
|
|
283
|
+
}, unknown>>>;
|
|
284
|
+
activeTools: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
285
|
+
toolsets: import("zod").ZodOptional<import("zod").ZodType<import("@mastra/core/agent").ToolsetsInput, unknown, import("zod/v4/core").$ZodTypeInternals<import("@mastra/core/agent").ToolsetsInput, unknown>>>;
|
|
286
|
+
clientTools: import("zod").ZodOptional<import("zod").ZodType<import("@mastra/core/agent").ToolsInput, unknown, import("zod/v4/core").$ZodTypeInternals<import("@mastra/core/agent").ToolsInput, unknown>>>;
|
|
287
|
+
toolChoice: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodEnum<{
|
|
288
|
+
auto: "auto";
|
|
289
|
+
none: "none";
|
|
290
|
+
required: "required";
|
|
291
|
+
}>, import("zod").ZodObject<{
|
|
292
|
+
type: import("zod").ZodLiteral<"tool">;
|
|
293
|
+
toolName: import("zod").ZodString;
|
|
294
|
+
}, import("zod/v4/core").$strip>]>>;
|
|
295
|
+
requireToolApproval: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
296
|
+
scorers: import("zod").ZodOptional<import("zod").ZodType<Record<string, {
|
|
297
|
+
scorer: string;
|
|
298
|
+
sampling?: import("@mastra/core/evals").ScoringSamplingConfig;
|
|
299
|
+
}>, unknown, import("zod/v4/core").$ZodTypeInternals<Record<string, {
|
|
300
|
+
scorer: string;
|
|
301
|
+
sampling?: import("@mastra/core/evals").ScoringSamplingConfig;
|
|
302
|
+
}>, unknown>>>;
|
|
303
|
+
returnScorerData: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
304
|
+
tracingOptions: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
305
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
306
|
+
requestContextKeys: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
307
|
+
traceId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
308
|
+
parentSpanId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
309
|
+
tags: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
310
|
+
hideInput: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
311
|
+
hideOutput: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
312
|
+
}, import("zod/v4/core").$strip>>;
|
|
313
|
+
output: import("zod").ZodOptional<import("zod").ZodType<import("@mastra/core/llm").OutputType, unknown, import("zod/v4/core").$ZodTypeInternals<import("@mastra/core/llm").OutputType, unknown>>>;
|
|
314
|
+
structuredOutput: import("zod").ZodOptional<import("zod").ZodType<import("@mastra/core/agent").PublicStructuredOutputOptions<Record<string, unknown>>, unknown, import("zod/v4/core").$ZodTypeInternals<import("@mastra/core/agent").PublicStructuredOutputOptions<Record<string, unknown>>, unknown>>>;
|
|
315
|
+
untilIdle: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodBoolean, import("zod").ZodObject<{
|
|
316
|
+
maxIdleMs: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
317
|
+
}, import("zod/v4/core").$strip>]>>;
|
|
318
|
+
}, import("zod/v4/core").$loose>, import("zod").ZodUnknown> | undefined;
|
|
319
|
+
} & {
|
|
320
|
+
readonly _mastraSchemaRoute: true;
|
|
321
|
+
};
|
|
322
|
+
//# sourceMappingURL=workflow-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-builder.d.ts","sourceRoot":"","sources":["../../../src/server/handlers/workflow-builder.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyB9C,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwExC,CAAC"}
|
|
@@ -7,7 +7,7 @@ const require_agents = require("../../agents-C3k-sZBO.cjs");
|
|
|
7
7
|
const require_route_builder = require("../../route-builder-DupY8fkI.cjs");
|
|
8
8
|
const require_utils = require("../../utils-WcR0QSUB.cjs");
|
|
9
9
|
const require_server_handlers_error = require("./error.cjs");
|
|
10
|
-
const require_utils$1 = require("../../utils-
|
|
10
|
+
const require_utils$1 = require("../../utils-aIu3gkhJ.cjs");
|
|
11
11
|
let zod_v4 = require("zod/v4");
|
|
12
12
|
let _mastra_core_stream = require("@mastra/core/stream");
|
|
13
13
|
//#region src/server/handlers/workflows.ts
|
|
@@ -6,7 +6,7 @@ import { K as streamResponseSchema } from "../../agents-AMeMJBI1.js";
|
|
|
6
6
|
import { n as createRoute } from "../../route-builder-BukcT_Kp.js";
|
|
7
7
|
import { a as getWorkflowInfo, t as WorkflowRegistry } from "../../utils-Duk4hfT_.js";
|
|
8
8
|
import { handleError } from "./error.js";
|
|
9
|
-
import {
|
|
9
|
+
import { d as validateRunOwnership, p as MastraFGAPermissions, r as getEffectiveResourceId } from "../../utils-KsERfbhc.js";
|
|
10
10
|
import { z } from "zod/v4";
|
|
11
11
|
import { createReplayStream } from "@mastra/core/stream";
|
|
12
12
|
//#region src/server/handlers/workflows.ts
|
|
@@ -35,6 +35,17 @@ export declare const listExperimentResultsQuerySchema: z.ZodObject<{
|
|
|
35
35
|
perPage: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
36
36
|
tags: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
37
37
|
}, z.core.$strip>;
|
|
38
|
+
export declare const listDatasetsQuerySchema: z.ZodObject<{
|
|
39
|
+
page: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
40
|
+
perPage: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
41
|
+
targetType: z.ZodOptional<z.ZodEnum<{
|
|
42
|
+
agent: "agent";
|
|
43
|
+
processor: "processor";
|
|
44
|
+
scorer: "scorer";
|
|
45
|
+
workflow: "workflow";
|
|
46
|
+
}>>;
|
|
47
|
+
targetIds: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
48
|
+
}, z.core.$strip>;
|
|
38
49
|
export declare const listExperimentsQuerySchema: z.ZodObject<{
|
|
39
50
|
page: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
40
51
|
perPage: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
@@ -42,6 +53,13 @@ export declare const listExperimentsQuerySchema: z.ZodObject<{
|
|
|
42
53
|
comparisonId: z.ZodOptional<z.ZodString>;
|
|
43
54
|
variantId: z.ZodOptional<z.ZodString>;
|
|
44
55
|
trialIndex: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
56
|
+
targetType: z.ZodOptional<z.ZodEnum<{
|
|
57
|
+
agent: "agent";
|
|
58
|
+
processor: "processor";
|
|
59
|
+
scorer: "scorer";
|
|
60
|
+
workflow: "workflow";
|
|
61
|
+
}>>;
|
|
62
|
+
targetId: z.ZodOptional<z.ZodString>;
|
|
45
63
|
}, z.core.$strip>;
|
|
46
64
|
export declare const tenancyQuerySchema: z.ZodObject<{
|
|
47
65
|
organizationId: z.ZodOptional<z.ZodString>;
|