@mastra/code-sdk 1.8.1-alpha.3 → 1.8.1-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/agents/workflow-builder-agent.d.ts.map +1 -1
- package/dist/agents/workflow-builder-agent.js +4 -2
- package/dist/agents/workflow-builder-agent.js.map +1 -1
- package/dist/tools/workflows/list-available-classifiers.d.ts +19 -0
- package/dist/tools/workflows/list-available-classifiers.d.ts.map +1 -0
- package/dist/tools/workflows/list-available-classifiers.js +56 -0
- package/dist/tools/workflows/list-available-classifiers.js.map +1 -0
- package/dist/tools/workflows/save-workflow.d.ts +132 -22
- package/dist/tools/workflows/save-workflow.d.ts.map +1 -1
- package/dist/tools/workflows/tool-ids.d.ts +2 -1
- package/dist/tools/workflows/tool-ids.d.ts.map +1 -1
- package/dist/tools/workflows/tool-ids.js +1 -0
- package/dist/tools/workflows/tool-ids.js.map +1 -1
- package/package.json +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-builder-agent.d.ts","sourceRoot":"","sources":["../../src/agents/workflow-builder-agent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workflow-builder-agent.d.ts","sourceRoot":"","sources":["../../src/agents/workflow-builder-agent.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,oBAAoB,6KA4D/B,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getDynamicModel } from "./model.js";
|
|
2
2
|
import { WORKFLOW_AUTHORING_TOOL_IDS } from "../tools/workflows/tool-ids.js";
|
|
3
3
|
import { listAvailableAgentsTool } from "../tools/workflows/list-available-agents.js";
|
|
4
|
+
import { listAvailableClassifiersTool } from "../tools/workflows/list-available-classifiers.js";
|
|
4
5
|
import { listAvailableToolsTool } from "../tools/workflows/list-available-tools.js";
|
|
5
6
|
import { listAvailableWorkflowsTool } from "../tools/workflows/list-available-workflows.js";
|
|
6
7
|
import { saveWorkflowTool } from "../tools/workflows/save-workflow.js";
|
|
@@ -24,6 +25,7 @@ const workflowBuilderAgent = createWorkflowBuilderAgent({
|
|
|
24
25
|
description: "Turns plain-language workflow descriptions into runnable, persisted workflow definitions.",
|
|
25
26
|
tools: {
|
|
26
27
|
[WORKFLOW_AUTHORING_TOOL_IDS.listAgents]: listAvailableAgentsTool,
|
|
28
|
+
[WORKFLOW_AUTHORING_TOOL_IDS.listClassifiers]: listAvailableClassifiersTool,
|
|
27
29
|
[WORKFLOW_AUTHORING_TOOL_IDS.listTools]: listAvailableToolsTool,
|
|
28
30
|
[WORKFLOW_AUTHORING_TOOL_IDS.listWorkflows]: listAvailableWorkflowsTool,
|
|
29
31
|
[WORKFLOW_AUTHORING_TOOL_IDS.saveWorkflow]: saveWorkflowTool
|
|
@@ -59,9 +61,9 @@ Always confirm these shapes against \`list-available-tools\` rather than trustin
|
|
|
59
61
|
|
|
60
62
|
# Mastra Code discovery notes
|
|
61
63
|
|
|
62
|
-
The
|
|
64
|
+
The four shared listing tools behave here exactly as the shared playbook describes; each row's \`id\` is the value you copy into \`agentId\` / \`classifierId\` / \`toolId\` / \`workflowId\`. \`list-available-classifiers\` includes configured question metadata and stable \`values.<question>\` paths for conditional routing. \`list-available-workflows\` includes both code-defined and Dynamic Workflows, and its catalog is always available on this surface.
|
|
63
65
|
|
|
64
|
-
Your
|
|
66
|
+
Your fifth tool is \`save-workflow\`, which persists and live-registers a definition. Make one sequential complete call per attempt, only after composition and the shared pre-action check.
|
|
65
67
|
|
|
66
68
|
# Mastra Code execution and response protocol
|
|
67
69
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-builder-agent.js","names":[],"sources":["../../src/agents/workflow-builder-agent.ts"],"sourcesContent":["/**\n * Workflow Builder sub-agent.\n *\n * The parent code-agent (build/plan/explore modes) delegates to this agent\n * via the `create-workflow` tool. Keeping the long workflow-authoring system\n * prompt here — instead of inlining it into every parent mode — keeps the\n * parent modes lean and lets the same author logic ship to Studio later.\n *\n * The sub-agent's tool set is intentionally tiny: discover what's available,\n * construct the entire definition in one thought, save it. No setter loop,\n * no per-step mutations.\n */\nimport { createWorkflowBuilderAgent } from '@mastra/core/workflows/builder';\nimport { listAvailableAgentsTool } from '../tools/workflows/list-available-agents.js';\nimport { listAvailableToolsTool } from '../tools/workflows/list-available-tools.js';\nimport { listAvailableWorkflowsTool } from '../tools/workflows/list-available-workflows.js';\nimport { saveWorkflowTool } from '../tools/workflows/save-workflow.js';\nimport { WORKFLOW_AUTHORING_TOOL_IDS } from '../tools/workflows/tool-ids.js';\nimport { getDynamicModel } from './model.js';\n\nexport const workflowBuilderAgent = createWorkflowBuilderAgent({\n id: 'workflow-builder',\n name: 'Workflow Builder',\n description: 'Turns plain-language workflow descriptions into runnable, persisted workflow definitions.',\n tools: {\n [WORKFLOW_AUTHORING_TOOL_IDS.listAgents]: listAvailableAgentsTool,\n [WORKFLOW_AUTHORING_TOOL_IDS.listTools]: listAvailableToolsTool,\n [WORKFLOW_AUTHORING_TOOL_IDS.listWorkflows]: listAvailableWorkflowsTool,\n [WORKFLOW_AUTHORING_TOOL_IDS.saveWorkflow]: saveWorkflowTool,\n },\n surfaceInstructions: `# Mastra Code authoring policy\n\nYour job: turn the user's verbatim plain-language request into a complete Dynamic Workflow definition and persist it with save-workflow. Success means save-workflow returned \\`{ ok: true, id }\\` for the workflow the user asked for; do not claim success before that result.\n\nSave each definition successfully **exactly once**: after \\`save-workflow\\` returns \\`{ ok: true, id }\\`, never save that workflow again. The workflow the user asked for is always saved LAST. You may save other workflows before it **only** when they are helper workflows the requested workflow references as \\`{ type: \"workflow\" }\\` entries — never to probe the schema or split one workflow into pieces the user did not ask for. A rejected save is not a successful save; correct the reported issues and make the one sequential corrected attempt permitted by the protocol below.\n\n# \\`code-agent\\` — when to use it as an agent step\n\nThe Mastra instance registers \\`code-agent\\` (mastracode's coding agent) alongside the workflow-builder. When discovery surfaces it in \\`list-available-agents\\`, know that under the hood it has full access to workspace tools (view / edit / run commands), MCP tools, and web search — and it *reasons* over a prompt to pick the right ones.\n\nUse it as an \\`agent\\` step when the workflow needs judgment or open-ended tool orchestration you can't hardcode — e.g. \"read these files and figure out what changed\", \"review these logs and summarise the failures\", \"call the right MCP tool to open a Linear issue based on this content\".\n\nWhen the workflow needs a **specific, deterministic** operation (like \\`execute_command wc -l file.ts\\` or a single fixed web-search call), prefer a plain \\`tool\\` step — cheaper, no LLM in the middle, and reproducible.\n\n# Workspace tool output shapes — read this before wiring a file-oriented workflow\n\nThe workspace tools you are most likely to compose with return **strings, not objects**, and the shared bridge-agent and \\`initData\\` re-threading guidance applies to them directly:\n\n- \\`find_files\\` returns a formatted \\`string\\` listing, and the entries are **bare basenames with no path prefix** (e.g. \\`app-tools.ts\\\\nserver.ts\\`). A downstream step told only \"summarise each file\" therefore has no idea which folder they live in.\n- \\`find_files\\` — inputSchema \\`{ path?: string, ... }\\`, outputSchema tree-formatted text (string).\n- \\`view\\` — inputSchema \\`{ path: string, ... }\\`, outputSchema \\`string | { __workspaceMedia: true, text: string, mediaType: string, data: string }\\`.\n\nTwo consequences, both covered by the shared playbook's worked examples:\n\n1. A string listing is not iterable, so \\`foreach\\` needs a bridge \\`agent\\` step with a top-level array \\`outputSchema\\` between the listing tool and the loop.\n2. Because the listing strips the folder path, the mapping that builds the bridge agent's prompt MUST re-thread the original path with \\`\\${initData.<pathField>}\\` alongside \\`\\${stepResults.<listing-step>}\\`. Skipping this is the most common cause of downstream \"file not found\" failures.\n\nAlways confirm these shapes against \\`list-available-tools\\` rather than trusting the summary above.\n\n# Mastra Code discovery notes\n\nThe
|
|
1
|
+
{"version":3,"file":"workflow-builder-agent.js","names":[],"sources":["../../src/agents/workflow-builder-agent.ts"],"sourcesContent":["/**\n * Workflow Builder sub-agent.\n *\n * The parent code-agent (build/plan/explore modes) delegates to this agent\n * via the `create-workflow` tool. Keeping the long workflow-authoring system\n * prompt here — instead of inlining it into every parent mode — keeps the\n * parent modes lean and lets the same author logic ship to Studio later.\n *\n * The sub-agent's tool set is intentionally tiny: discover what's available,\n * construct the entire definition in one thought, save it. No setter loop,\n * no per-step mutations.\n */\nimport { createWorkflowBuilderAgent } from '@mastra/core/workflows/builder';\nimport { listAvailableAgentsTool } from '../tools/workflows/list-available-agents.js';\nimport { listAvailableClassifiersTool } from '../tools/workflows/list-available-classifiers.js';\nimport { listAvailableToolsTool } from '../tools/workflows/list-available-tools.js';\nimport { listAvailableWorkflowsTool } from '../tools/workflows/list-available-workflows.js';\nimport { saveWorkflowTool } from '../tools/workflows/save-workflow.js';\nimport { WORKFLOW_AUTHORING_TOOL_IDS } from '../tools/workflows/tool-ids.js';\nimport { getDynamicModel } from './model.js';\n\nexport const workflowBuilderAgent = createWorkflowBuilderAgent({\n id: 'workflow-builder',\n name: 'Workflow Builder',\n description: 'Turns plain-language workflow descriptions into runnable, persisted workflow definitions.',\n tools: {\n [WORKFLOW_AUTHORING_TOOL_IDS.listAgents]: listAvailableAgentsTool,\n [WORKFLOW_AUTHORING_TOOL_IDS.listClassifiers]: listAvailableClassifiersTool,\n [WORKFLOW_AUTHORING_TOOL_IDS.listTools]: listAvailableToolsTool,\n [WORKFLOW_AUTHORING_TOOL_IDS.listWorkflows]: listAvailableWorkflowsTool,\n [WORKFLOW_AUTHORING_TOOL_IDS.saveWorkflow]: saveWorkflowTool,\n },\n surfaceInstructions: `# Mastra Code authoring policy\n\nYour job: turn the user's verbatim plain-language request into a complete Dynamic Workflow definition and persist it with save-workflow. Success means save-workflow returned \\`{ ok: true, id }\\` for the workflow the user asked for; do not claim success before that result.\n\nSave each definition successfully **exactly once**: after \\`save-workflow\\` returns \\`{ ok: true, id }\\`, never save that workflow again. The workflow the user asked for is always saved LAST. You may save other workflows before it **only** when they are helper workflows the requested workflow references as \\`{ type: \"workflow\" }\\` entries — never to probe the schema or split one workflow into pieces the user did not ask for. A rejected save is not a successful save; correct the reported issues and make the one sequential corrected attempt permitted by the protocol below.\n\n# \\`code-agent\\` — when to use it as an agent step\n\nThe Mastra instance registers \\`code-agent\\` (mastracode's coding agent) alongside the workflow-builder. When discovery surfaces it in \\`list-available-agents\\`, know that under the hood it has full access to workspace tools (view / edit / run commands), MCP tools, and web search — and it *reasons* over a prompt to pick the right ones.\n\nUse it as an \\`agent\\` step when the workflow needs judgment or open-ended tool orchestration you can't hardcode — e.g. \"read these files and figure out what changed\", \"review these logs and summarise the failures\", \"call the right MCP tool to open a Linear issue based on this content\".\n\nWhen the workflow needs a **specific, deterministic** operation (like \\`execute_command wc -l file.ts\\` or a single fixed web-search call), prefer a plain \\`tool\\` step — cheaper, no LLM in the middle, and reproducible.\n\n# Workspace tool output shapes — read this before wiring a file-oriented workflow\n\nThe workspace tools you are most likely to compose with return **strings, not objects**, and the shared bridge-agent and \\`initData\\` re-threading guidance applies to them directly:\n\n- \\`find_files\\` returns a formatted \\`string\\` listing, and the entries are **bare basenames with no path prefix** (e.g. \\`app-tools.ts\\\\nserver.ts\\`). A downstream step told only \"summarise each file\" therefore has no idea which folder they live in.\n- \\`find_files\\` — inputSchema \\`{ path?: string, ... }\\`, outputSchema tree-formatted text (string).\n- \\`view\\` — inputSchema \\`{ path: string, ... }\\`, outputSchema \\`string | { __workspaceMedia: true, text: string, mediaType: string, data: string }\\`.\n\nTwo consequences, both covered by the shared playbook's worked examples:\n\n1. A string listing is not iterable, so \\`foreach\\` needs a bridge \\`agent\\` step with a top-level array \\`outputSchema\\` between the listing tool and the loop.\n2. Because the listing strips the folder path, the mapping that builds the bridge agent's prompt MUST re-thread the original path with \\`\\${initData.<pathField>}\\` alongside \\`\\${stepResults.<listing-step>}\\`. Skipping this is the most common cause of downstream \"file not found\" failures.\n\nAlways confirm these shapes against \\`list-available-tools\\` rather than trusting the summary above.\n\n# Mastra Code discovery notes\n\nThe four shared listing tools behave here exactly as the shared playbook describes; each row's \\`id\\` is the value you copy into \\`agentId\\` / \\`classifierId\\` / \\`toolId\\` / \\`workflowId\\`. \\`list-available-classifiers\\` includes configured question metadata and stable \\`values.<question>\\` paths for conditional routing. \\`list-available-workflows\\` includes both code-defined and Dynamic Workflows, and its catalog is always available on this surface.\n\nYour fifth tool is \\`save-workflow\\`, which persists and live-registers a definition. Make one sequential complete call per attempt, only after composition and the shared pre-action check.\n\n# Mastra Code execution and response protocol\n\n1. Complete discovery, composition, and the shared pre-action check before calling \\`save-workflow\\`.\n2. If the design needs helper workflows (for example, per-branch wrappers so \\`parallel\\` branches can consume different fields — see the shared nested-workflow guidance), save each helper FIRST, one complete definition per call, in dependency order. Each \\`save-workflow\\` success live-registers that helper, which makes it a valid \\`workflowId\\` for the next definition. Confirm with \\`list-available-workflows\\` before referencing it, and give each helper a real \\`id\\` and \\`description\\` — helpers are permanent, user-visible registry entries, not scratch space.\n3. Call \\`save-workflow\\` with one complete \\`{ id, description, inputSchema, outputSchema, graph }\\` definition for the requested workflow. There are no incremental setter tools and no parallel save attempts.\n4. Wait for the tool result. Success means exactly that \\`save-workflow\\` returned \\`{ ok: true, id }\\`; at that point the workflow is persisted and live-registered.\n5. If the tool rejects the definition, do not claim success. Use the returned diagnostics and authoritative discovery to correct every named issue, rerun the shared pre-action check, and make one sequential corrected complete save attempt. Do not rationalize a registry mismatch as a missing engine feature.\n6. After success, follow the shared summary rules and end with the concrete run command \\`/workflows run <id> {…}\\` for the requested workflow. If you saved helper workflows, name them so the user knows they now exist in the registry.\n`,\n // Same dynamic model resolver mastracode's main code-agent uses — picks up\n // the user's configured provider/model from session state. When the parent\n // code-agent delegates to this sub-agent (via `create-workflow`), the\n // request context propagates so the same model resolves.\n model: getDynamicModel,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,MAAa,uBAAuB,2BAA2B;CAC7D,IAAI;CACJ,MAAM;CACN,aAAa;CACb,OAAO;GACJ,4BAA4B,aAAa;GACzC,4BAA4B,kBAAkB;GAC9C,4BAA4B,YAAY;GACxC,4BAA4B,gBAAgB;GAC5C,4BAA4B,eAAe;CAC9C;CACA,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDrB,OAAO;AACT,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const listAvailableClassifiersTool: import("@mastra/core/tools").Tool<Record<string, never>, {
|
|
2
|
+
classifiers: {
|
|
3
|
+
id: string;
|
|
4
|
+
outputPaths: {
|
|
5
|
+
answers: string;
|
|
6
|
+
usage: string;
|
|
7
|
+
};
|
|
8
|
+
questions?: {
|
|
9
|
+
id: string;
|
|
10
|
+
type: "boolean" | "score" | "choice";
|
|
11
|
+
answerPath: string;
|
|
12
|
+
routingPath: string;
|
|
13
|
+
instructions?: any;
|
|
14
|
+
choices?: string[] | undefined;
|
|
15
|
+
criteria?: any;
|
|
16
|
+
}[] | undefined;
|
|
17
|
+
}[];
|
|
18
|
+
}, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext<unknown, unknown, unknown>, "list-available-classifiers", unknown>;
|
|
19
|
+
//# sourceMappingURL=list-available-classifiers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-available-classifiers.d.ts","sourceRoot":"","sources":["../../../src/tools/workflows/list-available-classifiers.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;yIAiDvC,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { createTool } from "@mastra/core/tools";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/tools/workflows/list-available-classifiers.ts
|
|
4
|
+
function describeQuestions(questions) {
|
|
5
|
+
if (!questions) return void 0;
|
|
6
|
+
return Object.entries(questions).map(([id, question]) => ({
|
|
7
|
+
id,
|
|
8
|
+
type: question.type,
|
|
9
|
+
instructions: question.instructions,
|
|
10
|
+
choices: question.type === "choice" ? Object.keys(question.criteria) : void 0,
|
|
11
|
+
criteria: question.criteria,
|
|
12
|
+
answerPath: `inputData.answers.${id}`,
|
|
13
|
+
routingPath: `inputData.answers.${id}.${question.type === "choice" ? "choice" : question.type === "score" ? "score" : "probability"}`
|
|
14
|
+
}));
|
|
15
|
+
}
|
|
16
|
+
const listAvailableClassifiersTool = createTool({
|
|
17
|
+
id: "list-available-classifiers",
|
|
18
|
+
description: "Returns configured classifiers registered on the Mastra instance. The ids returned here are the only valid values for `{ type: \"classifier\", classifierId }`. Each row includes question metadata and stable output paths for routing with conditional entries.",
|
|
19
|
+
inputSchema: z.object({}),
|
|
20
|
+
outputSchema: z.object({ classifiers: z.array(z.object({
|
|
21
|
+
id: z.string(),
|
|
22
|
+
questions: z.array(z.object({
|
|
23
|
+
id: z.string(),
|
|
24
|
+
type: z.enum([
|
|
25
|
+
"choice",
|
|
26
|
+
"score",
|
|
27
|
+
"boolean"
|
|
28
|
+
]),
|
|
29
|
+
instructions: z.any().optional(),
|
|
30
|
+
choices: z.array(z.string()).optional(),
|
|
31
|
+
criteria: z.any().optional(),
|
|
32
|
+
answerPath: z.string(),
|
|
33
|
+
routingPath: z.string()
|
|
34
|
+
})).optional(),
|
|
35
|
+
outputPaths: z.object({
|
|
36
|
+
answers: z.string(),
|
|
37
|
+
usage: z.string()
|
|
38
|
+
})
|
|
39
|
+
})) }),
|
|
40
|
+
execute: async (_input, { mastra }) => {
|
|
41
|
+
if (!mastra) throw new Error("list-available-classifiers requires a Mastra context.");
|
|
42
|
+
const all = mastra.listClassifiers?.() ?? {};
|
|
43
|
+
return { classifiers: Object.entries(all).filter(([, classifier]) => classifier.questions !== void 0).map(([id, classifier]) => ({
|
|
44
|
+
id,
|
|
45
|
+
questions: describeQuestions(classifier.questions),
|
|
46
|
+
outputPaths: {
|
|
47
|
+
answers: "inputData.answers.<question>",
|
|
48
|
+
usage: "inputData.usage"
|
|
49
|
+
}
|
|
50
|
+
})) };
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
//#endregion
|
|
54
|
+
export { listAvailableClassifiersTool };
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=list-available-classifiers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-available-classifiers.js","names":[],"sources":["../../../src/tools/workflows/list-available-classifiers.ts"],"sourcesContent":["/**\n * Sub-agent tool: list classifiers the workflow-builder can reference in\n * classifier entries of a Dynamic Workflow graph. Read-only.\n */\nimport type { ClassifierQuestions } from '@mastra/core/classifier';\nimport { createTool } from '@mastra/core/tools';\nimport { z } from 'zod';\n\nfunction describeQuestions(questions: ClassifierQuestions | undefined) {\n if (!questions) return undefined;\n\n return Object.entries(questions).map(([id, question]) => ({\n id,\n type: question.type,\n instructions: question.instructions,\n choices: question.type === 'choice' ? Object.keys(question.criteria) : undefined,\n criteria: question.criteria,\n answerPath: `inputData.answers.${id}`,\n routingPath: `inputData.answers.${id}.${\n question.type === 'choice' ? 'choice' : question.type === 'score' ? 'score' : 'probability'\n }`,\n }));\n}\n\nexport const listAvailableClassifiersTool = createTool({\n id: 'list-available-classifiers',\n description:\n 'Returns configured classifiers registered on the Mastra instance. The ids returned here are the only valid values for `{ type: \"classifier\", classifierId }`. Each row includes question metadata and stable output paths for routing with conditional entries.',\n inputSchema: z.object({}),\n outputSchema: z.object({\n classifiers: z.array(\n z.object({\n id: z.string(),\n questions: z\n .array(\n z.object({\n id: z.string(),\n type: z.enum(['choice', 'score', 'boolean']),\n instructions: z.any().optional(),\n choices: z.array(z.string()).optional(),\n criteria: z.any().optional(),\n answerPath: z.string(),\n routingPath: z.string(),\n }),\n )\n .optional(),\n outputPaths: z.object({\n answers: z.string(),\n usage: z.string(),\n }),\n }),\n ),\n }),\n execute: async (_input, { mastra }) => {\n if (!mastra) throw new Error('list-available-classifiers requires a Mastra context.');\n const all =\n (\n mastra as { listClassifiers?: () => Record<string, { questions?: ClassifierQuestions }> | undefined }\n ).listClassifiers?.() ?? {};\n\n return {\n classifiers: Object.entries(all)\n .filter(([, classifier]) => classifier.questions !== undefined)\n .map(([id, classifier]) => ({\n id,\n questions: describeQuestions(classifier.questions),\n outputPaths: {\n answers: 'inputData.answers.<question>',\n usage: 'inputData.usage',\n },\n })),\n };\n },\n});\n"],"mappings":";;;AAQA,SAAS,kBAAkB,WAA4C;CACrE,IAAI,CAAC,WAAW,OAAO,KAAA;CAEvB,OAAO,OAAO,QAAQ,SAAS,CAAC,CAAC,KAAK,CAAC,IAAI,eAAe;EACxD;EACA,MAAM,SAAS;EACf,cAAc,SAAS;EACvB,SAAS,SAAS,SAAS,WAAW,OAAO,KAAK,SAAS,QAAQ,IAAI,KAAA;EACvE,UAAU,SAAS;EACnB,YAAY,qBAAqB;EACjC,aAAa,qBAAqB,GAAG,GACnC,SAAS,SAAS,WAAW,WAAW,SAAS,SAAS,UAAU,UAAU;CAElF,EAAE;AACJ;AAEA,MAAa,+BAA+B,WAAW;CACrD,IAAI;CACJ,aACE;CACF,aAAa,EAAE,OAAO,CAAC,CAAC;CACxB,cAAc,EAAE,OAAO,EACrB,aAAa,EAAE,MACb,EAAE,OAAO;EACP,IAAI,EAAE,OAAO;EACb,WAAW,EACR,MACC,EAAE,OAAO;GACP,IAAI,EAAE,OAAO;GACb,MAAM,EAAE,KAAK;IAAC;IAAU;IAAS;GAAS,CAAC;GAC3C,cAAc,EAAE,IAAI,CAAC,CAAC,SAAS;GAC/B,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS;GACtC,UAAU,EAAE,IAAI,CAAC,CAAC,SAAS;GAC3B,YAAY,EAAE,OAAO;GACrB,aAAa,EAAE,OAAO;EACxB,CAAC,CACH,CAAC,CACA,SAAS;EACZ,aAAa,EAAE,OAAO;GACpB,SAAS,EAAE,OAAO;GAClB,OAAO,EAAE,OAAO;EAClB,CAAC;CACH,CAAC,CACH,EACF,CAAC;CACD,SAAS,OAAO,QAAQ,EAAE,aAAa;EACrC,IAAI,CAAC,QAAQ,MAAM,IAAI,MAAM,uDAAuD;EACpF,MAAM,MAEF,OACA,kBAAkB,KAAK,CAAC;EAE5B,OAAO,EACL,aAAa,OAAO,QAAQ,GAAG,CAAC,CAC7B,QAAQ,GAAG,gBAAgB,WAAW,cAAc,KAAA,CAAS,CAAC,CAC9D,KAAK,CAAC,IAAI,iBAAiB;GAC1B;GACA,WAAW,kBAAkB,WAAW,SAAS;GACjD,aAAa;IACX,SAAS;IACT,OAAO;GACT;EACF,EAAE,EACN;CACF;AACF,CAAC"}
|
|
@@ -16,7 +16,7 @@ export declare const workflowDefinitionInputSchema: z.ZodPreprocess<z.ZodObject<
|
|
|
16
16
|
outputSchema: z.ZodOptional<z.ZodUnknown>;
|
|
17
17
|
options: z.ZodOptional<z.ZodObject<{
|
|
18
18
|
retries: z.ZodOptional<z.ZodNumber>;
|
|
19
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
19
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
20
20
|
}, z.core.$strip>>;
|
|
21
21
|
}, z.core.$strict>, z.ZodObject<{
|
|
22
22
|
type: z.ZodLiteral<"tool">;
|
|
@@ -25,11 +25,22 @@ export declare const workflowDefinitionInputSchema: z.ZodPreprocess<z.ZodObject<
|
|
|
25
25
|
description: z.ZodOptional<z.ZodString>;
|
|
26
26
|
options: z.ZodOptional<z.ZodObject<{
|
|
27
27
|
retries: z.ZodOptional<z.ZodNumber>;
|
|
28
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
28
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
29
29
|
}, z.core.$strip>>;
|
|
30
30
|
}, z.core.$strict>, z.ZodObject<{
|
|
31
|
+
type: z.ZodLiteral<"classifier">;
|
|
32
|
+
id: z.ZodString;
|
|
33
|
+
classifierId: z.ZodString;
|
|
31
34
|
description: z.ZodOptional<z.ZodString>;
|
|
32
|
-
|
|
35
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
36
|
+
maxRetries: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
38
|
+
retries: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
42
|
+
description: z.ZodOptional<z.ZodString>;
|
|
43
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
33
44
|
type: z.ZodLiteral<"mapping">;
|
|
34
45
|
id: z.ZodString;
|
|
35
46
|
mapConfig: z.ZodString;
|
|
@@ -40,11 +51,11 @@ export declare const workflowDefinitionInputSchema: z.ZodPreprocess<z.ZodObject<
|
|
|
40
51
|
description: z.ZodOptional<z.ZodString>;
|
|
41
52
|
options: z.ZodOptional<z.ZodObject<{
|
|
42
53
|
retries: z.ZodOptional<z.ZodNumber>;
|
|
43
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
54
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
44
55
|
}, z.core.$strip>>;
|
|
45
56
|
}, z.core.$strict>, z.ZodObject<{
|
|
46
57
|
description: z.ZodOptional<z.ZodString>;
|
|
47
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
58
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
48
59
|
id: z.ZodOptional<z.ZodString>;
|
|
49
60
|
type: z.ZodLiteral<"parallel">;
|
|
50
61
|
steps: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -55,7 +66,7 @@ export declare const workflowDefinitionInputSchema: z.ZodPreprocess<z.ZodObject<
|
|
|
55
66
|
outputSchema: z.ZodOptional<z.ZodUnknown>;
|
|
56
67
|
options: z.ZodOptional<z.ZodObject<{
|
|
57
68
|
retries: z.ZodOptional<z.ZodNumber>;
|
|
58
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
69
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
59
70
|
}, z.core.$strip>>;
|
|
60
71
|
}, z.core.$strict>, z.ZodObject<{
|
|
61
72
|
type: z.ZodLiteral<"tool">;
|
|
@@ -64,7 +75,18 @@ export declare const workflowDefinitionInputSchema: z.ZodPreprocess<z.ZodObject<
|
|
|
64
75
|
description: z.ZodOptional<z.ZodString>;
|
|
65
76
|
options: z.ZodOptional<z.ZodObject<{
|
|
66
77
|
retries: z.ZodOptional<z.ZodNumber>;
|
|
67
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
78
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
79
|
+
}, z.core.$strip>>;
|
|
80
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
81
|
+
type: z.ZodLiteral<"classifier">;
|
|
82
|
+
id: z.ZodString;
|
|
83
|
+
classifierId: z.ZodString;
|
|
84
|
+
description: z.ZodOptional<z.ZodString>;
|
|
85
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
86
|
+
maxRetries: z.ZodOptional<z.ZodNumber>;
|
|
87
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
88
|
+
retries: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
68
90
|
}, z.core.$strip>>;
|
|
69
91
|
}, z.core.$strict>, z.ZodObject<{
|
|
70
92
|
type: z.ZodLiteral<"workflow">;
|
|
@@ -73,12 +95,12 @@ export declare const workflowDefinitionInputSchema: z.ZodPreprocess<z.ZodObject<
|
|
|
73
95
|
description: z.ZodOptional<z.ZodString>;
|
|
74
96
|
options: z.ZodOptional<z.ZodObject<{
|
|
75
97
|
retries: z.ZodOptional<z.ZodNumber>;
|
|
76
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
98
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
77
99
|
}, z.core.$strip>>;
|
|
78
100
|
}, z.core.$strict>]>>;
|
|
79
101
|
}, z.core.$strict>, z.ZodObject<{
|
|
80
102
|
description: z.ZodOptional<z.ZodString>;
|
|
81
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
103
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
82
104
|
id: z.ZodOptional<z.ZodString>;
|
|
83
105
|
type: z.ZodLiteral<"foreach">;
|
|
84
106
|
step: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -89,7 +111,7 @@ export declare const workflowDefinitionInputSchema: z.ZodPreprocess<z.ZodObject<
|
|
|
89
111
|
outputSchema: z.ZodOptional<z.ZodUnknown>;
|
|
90
112
|
options: z.ZodOptional<z.ZodObject<{
|
|
91
113
|
retries: z.ZodOptional<z.ZodNumber>;
|
|
92
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
114
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
93
115
|
}, z.core.$strip>>;
|
|
94
116
|
}, z.core.$strict>, z.ZodObject<{
|
|
95
117
|
type: z.ZodLiteral<"tool">;
|
|
@@ -98,7 +120,18 @@ export declare const workflowDefinitionInputSchema: z.ZodPreprocess<z.ZodObject<
|
|
|
98
120
|
description: z.ZodOptional<z.ZodString>;
|
|
99
121
|
options: z.ZodOptional<z.ZodObject<{
|
|
100
122
|
retries: z.ZodOptional<z.ZodNumber>;
|
|
101
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
123
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
124
|
+
}, z.core.$strip>>;
|
|
125
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
126
|
+
type: z.ZodLiteral<"classifier">;
|
|
127
|
+
id: z.ZodString;
|
|
128
|
+
classifierId: z.ZodString;
|
|
129
|
+
description: z.ZodOptional<z.ZodString>;
|
|
130
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
131
|
+
maxRetries: z.ZodOptional<z.ZodNumber>;
|
|
132
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
133
|
+
retries: z.ZodOptional<z.ZodNumber>;
|
|
134
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
102
135
|
}, z.core.$strip>>;
|
|
103
136
|
}, z.core.$strict>, z.ZodObject<{
|
|
104
137
|
type: z.ZodLiteral<"workflow">;
|
|
@@ -107,7 +140,7 @@ export declare const workflowDefinitionInputSchema: z.ZodPreprocess<z.ZodObject<
|
|
|
107
140
|
description: z.ZodOptional<z.ZodString>;
|
|
108
141
|
options: z.ZodOptional<z.ZodObject<{
|
|
109
142
|
retries: z.ZodOptional<z.ZodNumber>;
|
|
110
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
143
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
111
144
|
}, z.core.$strip>>;
|
|
112
145
|
}, z.core.$strict>]>;
|
|
113
146
|
opts: z.ZodOptional<z.ZodObject<{
|
|
@@ -115,19 +148,19 @@ export declare const workflowDefinitionInputSchema: z.ZodPreprocess<z.ZodObject<
|
|
|
115
148
|
}, z.core.$strip>>;
|
|
116
149
|
}, z.core.$strict>, z.ZodObject<{
|
|
117
150
|
description: z.ZodOptional<z.ZodString>;
|
|
118
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
151
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
119
152
|
type: z.ZodLiteral<"sleep">;
|
|
120
153
|
id: z.ZodString;
|
|
121
154
|
duration: z.ZodNumber;
|
|
122
155
|
}, z.core.$strict>, z.ZodObject<{
|
|
123
156
|
description: z.ZodOptional<z.ZodString>;
|
|
124
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
157
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
125
158
|
type: z.ZodLiteral<"sleepUntil">;
|
|
126
159
|
id: z.ZodString;
|
|
127
160
|
date: z.ZodString;
|
|
128
161
|
}, z.core.$strict>, z.ZodObject<{
|
|
129
162
|
description: z.ZodOptional<z.ZodString>;
|
|
130
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
163
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
131
164
|
id: z.ZodOptional<z.ZodString>;
|
|
132
165
|
type: z.ZodLiteral<"conditional">;
|
|
133
166
|
steps: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -138,7 +171,7 @@ export declare const workflowDefinitionInputSchema: z.ZodPreprocess<z.ZodObject<
|
|
|
138
171
|
outputSchema: z.ZodOptional<z.ZodUnknown>;
|
|
139
172
|
options: z.ZodOptional<z.ZodObject<{
|
|
140
173
|
retries: z.ZodOptional<z.ZodNumber>;
|
|
141
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
174
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
142
175
|
}, z.core.$strip>>;
|
|
143
176
|
}, z.core.$strict>, z.ZodObject<{
|
|
144
177
|
type: z.ZodLiteral<"tool">;
|
|
@@ -147,7 +180,18 @@ export declare const workflowDefinitionInputSchema: z.ZodPreprocess<z.ZodObject<
|
|
|
147
180
|
description: z.ZodOptional<z.ZodString>;
|
|
148
181
|
options: z.ZodOptional<z.ZodObject<{
|
|
149
182
|
retries: z.ZodOptional<z.ZodNumber>;
|
|
150
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
183
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
184
|
+
}, z.core.$strip>>;
|
|
185
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
186
|
+
type: z.ZodLiteral<"classifier">;
|
|
187
|
+
id: z.ZodString;
|
|
188
|
+
classifierId: z.ZodString;
|
|
189
|
+
description: z.ZodOptional<z.ZodString>;
|
|
190
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
191
|
+
maxRetries: z.ZodOptional<z.ZodNumber>;
|
|
192
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
193
|
+
retries: z.ZodOptional<z.ZodNumber>;
|
|
194
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
151
195
|
}, z.core.$strip>>;
|
|
152
196
|
}, z.core.$strict>, z.ZodObject<{
|
|
153
197
|
type: z.ZodLiteral<"workflow">;
|
|
@@ -156,13 +200,13 @@ export declare const workflowDefinitionInputSchema: z.ZodPreprocess<z.ZodObject<
|
|
|
156
200
|
description: z.ZodOptional<z.ZodString>;
|
|
157
201
|
options: z.ZodOptional<z.ZodObject<{
|
|
158
202
|
retries: z.ZodOptional<z.ZodNumber>;
|
|
159
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
203
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
160
204
|
}, z.core.$strip>>;
|
|
161
205
|
}, z.core.$strict>]>>;
|
|
162
206
|
predicates: z.ZodArray<z.ZodType<import("@mastra/core/predicate").Predicate, unknown, z.core.$ZodTypeInternals<import("@mastra/core/predicate").Predicate, unknown>>>;
|
|
163
207
|
}, z.core.$strict>, z.ZodObject<{
|
|
164
208
|
description: z.ZodOptional<z.ZodString>;
|
|
165
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
209
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
166
210
|
id: z.ZodOptional<z.ZodString>;
|
|
167
211
|
type: z.ZodLiteral<"loop">;
|
|
168
212
|
step: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -173,7 +217,7 @@ export declare const workflowDefinitionInputSchema: z.ZodPreprocess<z.ZodObject<
|
|
|
173
217
|
outputSchema: z.ZodOptional<z.ZodUnknown>;
|
|
174
218
|
options: z.ZodOptional<z.ZodObject<{
|
|
175
219
|
retries: z.ZodOptional<z.ZodNumber>;
|
|
176
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
220
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
177
221
|
}, z.core.$strip>>;
|
|
178
222
|
}, z.core.$strict>, z.ZodObject<{
|
|
179
223
|
type: z.ZodLiteral<"tool">;
|
|
@@ -182,7 +226,18 @@ export declare const workflowDefinitionInputSchema: z.ZodPreprocess<z.ZodObject<
|
|
|
182
226
|
description: z.ZodOptional<z.ZodString>;
|
|
183
227
|
options: z.ZodOptional<z.ZodObject<{
|
|
184
228
|
retries: z.ZodOptional<z.ZodNumber>;
|
|
185
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
229
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
230
|
+
}, z.core.$strip>>;
|
|
231
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
232
|
+
type: z.ZodLiteral<"classifier">;
|
|
233
|
+
id: z.ZodString;
|
|
234
|
+
classifierId: z.ZodString;
|
|
235
|
+
description: z.ZodOptional<z.ZodString>;
|
|
236
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
237
|
+
maxRetries: z.ZodOptional<z.ZodNumber>;
|
|
238
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
239
|
+
retries: z.ZodOptional<z.ZodNumber>;
|
|
240
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
186
241
|
}, z.core.$strip>>;
|
|
187
242
|
}, z.core.$strict>, z.ZodObject<{
|
|
188
243
|
type: z.ZodLiteral<"workflow">;
|
|
@@ -191,7 +246,7 @@ export declare const workflowDefinitionInputSchema: z.ZodPreprocess<z.ZodObject<
|
|
|
191
246
|
description: z.ZodOptional<z.ZodString>;
|
|
192
247
|
options: z.ZodOptional<z.ZodObject<{
|
|
193
248
|
retries: z.ZodOptional<z.ZodNumber>;
|
|
194
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
249
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
|
|
195
250
|
}, z.core.$strip>>;
|
|
196
251
|
}, z.core.$strict>]>;
|
|
197
252
|
loopType: z.ZodEnum<{
|
|
@@ -625,6 +680,17 @@ export declare const saveWorkflowTool: import("@mastra/core/tools").Tool<{
|
|
|
625
680
|
retries?: number | undefined;
|
|
626
681
|
metadata?: Record<string, unknown> | undefined;
|
|
627
682
|
} | undefined;
|
|
683
|
+
} | {
|
|
684
|
+
type: "classifier";
|
|
685
|
+
id: string;
|
|
686
|
+
classifierId: string;
|
|
687
|
+
description?: string | undefined;
|
|
688
|
+
options?: {
|
|
689
|
+
maxRetries?: number | undefined;
|
|
690
|
+
providerOptions?: Record<string, unknown> | undefined;
|
|
691
|
+
retries?: number | undefined;
|
|
692
|
+
metadata?: Record<string, unknown> | undefined;
|
|
693
|
+
} | undefined;
|
|
628
694
|
} | {
|
|
629
695
|
type: "mapping";
|
|
630
696
|
id: string;
|
|
@@ -661,6 +727,17 @@ export declare const saveWorkflowTool: import("@mastra/core/tools").Tool<{
|
|
|
661
727
|
retries?: number | undefined;
|
|
662
728
|
metadata?: Record<string, unknown> | undefined;
|
|
663
729
|
} | undefined;
|
|
730
|
+
} | {
|
|
731
|
+
type: "classifier";
|
|
732
|
+
id: string;
|
|
733
|
+
classifierId: string;
|
|
734
|
+
description?: string | undefined;
|
|
735
|
+
options?: {
|
|
736
|
+
maxRetries?: number | undefined;
|
|
737
|
+
providerOptions?: Record<string, unknown> | undefined;
|
|
738
|
+
retries?: number | undefined;
|
|
739
|
+
metadata?: Record<string, unknown> | undefined;
|
|
740
|
+
} | undefined;
|
|
664
741
|
} | {
|
|
665
742
|
type: "workflow";
|
|
666
743
|
id: string;
|
|
@@ -695,6 +772,17 @@ export declare const saveWorkflowTool: import("@mastra/core/tools").Tool<{
|
|
|
695
772
|
retries?: number | undefined;
|
|
696
773
|
metadata?: Record<string, unknown> | undefined;
|
|
697
774
|
} | undefined;
|
|
775
|
+
} | {
|
|
776
|
+
type: "classifier";
|
|
777
|
+
id: string;
|
|
778
|
+
classifierId: string;
|
|
779
|
+
description?: string | undefined;
|
|
780
|
+
options?: {
|
|
781
|
+
maxRetries?: number | undefined;
|
|
782
|
+
providerOptions?: Record<string, unknown> | undefined;
|
|
783
|
+
retries?: number | undefined;
|
|
784
|
+
metadata?: Record<string, unknown> | undefined;
|
|
785
|
+
} | undefined;
|
|
698
786
|
} | {
|
|
699
787
|
type: "workflow";
|
|
700
788
|
id: string;
|
|
@@ -744,6 +832,17 @@ export declare const saveWorkflowTool: import("@mastra/core/tools").Tool<{
|
|
|
744
832
|
retries?: number | undefined;
|
|
745
833
|
metadata?: Record<string, unknown> | undefined;
|
|
746
834
|
} | undefined;
|
|
835
|
+
} | {
|
|
836
|
+
type: "classifier";
|
|
837
|
+
id: string;
|
|
838
|
+
classifierId: string;
|
|
839
|
+
description?: string | undefined;
|
|
840
|
+
options?: {
|
|
841
|
+
maxRetries?: number | undefined;
|
|
842
|
+
providerOptions?: Record<string, unknown> | undefined;
|
|
843
|
+
retries?: number | undefined;
|
|
844
|
+
metadata?: Record<string, unknown> | undefined;
|
|
845
|
+
} | undefined;
|
|
747
846
|
} | {
|
|
748
847
|
type: "workflow";
|
|
749
848
|
id: string;
|
|
@@ -779,6 +878,17 @@ export declare const saveWorkflowTool: import("@mastra/core/tools").Tool<{
|
|
|
779
878
|
retries?: number | undefined;
|
|
780
879
|
metadata?: Record<string, unknown> | undefined;
|
|
781
880
|
} | undefined;
|
|
881
|
+
} | {
|
|
882
|
+
type: "classifier";
|
|
883
|
+
id: string;
|
|
884
|
+
classifierId: string;
|
|
885
|
+
description?: string | undefined;
|
|
886
|
+
options?: {
|
|
887
|
+
maxRetries?: number | undefined;
|
|
888
|
+
providerOptions?: Record<string, unknown> | undefined;
|
|
889
|
+
retries?: number | undefined;
|
|
890
|
+
metadata?: Record<string, unknown> | undefined;
|
|
891
|
+
} | undefined;
|
|
782
892
|
} | {
|
|
783
893
|
type: "workflow";
|
|
784
894
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"save-workflow.d.ts","sourceRoot":"","sources":["../../../src/tools/workflows/save-workflow.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,2CAA2C,IAAI,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAE3H,eAAO,MAAM,6BAA6B
|
|
1
|
+
{"version":3,"file":"save-workflow.d.ts","sourceRoot":"","sources":["../../../src/tools/workflows/save-workflow.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,2CAA2C,IAAI,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAE3H,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAGzC,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4HAsB3B,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const WORKFLOW_AUTHORING_TOOL_IDS: {
|
|
2
2
|
readonly listAgents: "list-available-agents";
|
|
3
|
+
readonly listClassifiers: "list-available-classifiers";
|
|
3
4
|
readonly listTools: "list-available-tools";
|
|
4
5
|
readonly listWorkflows: "list-available-workflows";
|
|
5
6
|
readonly saveWorkflow: "save-workflow";
|
|
@@ -11,5 +12,5 @@ export declare const WORKFLOW_MANAGEMENT_TOOL_IDS: {
|
|
|
11
12
|
readonly runWorkflow: "run-workflow";
|
|
12
13
|
readonly deleteWorkflow: "delete-workflow";
|
|
13
14
|
};
|
|
14
|
-
export declare const WORKFLOW_BUILDER_NOISE_TOOL_IDS: readonly ("create-workflow" | "delete-workflow" | "get-workflow" | "list-workflows" | "run-workflow" | "list-available-agents" | "list-available-tools" | "list-available-workflows" | "save-workflow")[];
|
|
15
|
+
export declare const WORKFLOW_BUILDER_NOISE_TOOL_IDS: readonly ("create-workflow" | "delete-workflow" | "get-workflow" | "list-workflows" | "run-workflow" | "list-available-agents" | "list-available-classifiers" | "list-available-tools" | "list-available-workflows" | "save-workflow")[];
|
|
15
16
|
//# sourceMappingURL=tool-ids.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-ids.d.ts","sourceRoot":"","sources":["../../../src/tools/workflows/tool-ids.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B
|
|
1
|
+
{"version":3,"file":"tool-ids.d.ts","sourceRoot":"","sources":["../../../src/tools/workflows/tool-ids.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B;;;;;;CAM9B,CAAC;AAEX,eAAO,MAAM,4BAA4B;;;;;;CAM/B,CAAC;AAEX,eAAO,MAAM,+BAA+B,0OAGlC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
//#region src/tools/workflows/tool-ids.ts
|
|
2
2
|
const WORKFLOW_AUTHORING_TOOL_IDS = {
|
|
3
3
|
listAgents: "list-available-agents",
|
|
4
|
+
listClassifiers: "list-available-classifiers",
|
|
4
5
|
listTools: "list-available-tools",
|
|
5
6
|
listWorkflows: "list-available-workflows",
|
|
6
7
|
saveWorkflow: "save-workflow"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-ids.js","names":[],"sources":["../../../src/tools/workflows/tool-ids.ts"],"sourcesContent":["export const WORKFLOW_AUTHORING_TOOL_IDS = {\n listAgents: 'list-available-agents',\n listTools: 'list-available-tools',\n listWorkflows: 'list-available-workflows',\n saveWorkflow: 'save-workflow',\n} as const;\n\nexport const WORKFLOW_MANAGEMENT_TOOL_IDS = {\n createWorkflow: 'create-workflow',\n listWorkflows: 'list-workflows',\n getWorkflow: 'get-workflow',\n runWorkflow: 'run-workflow',\n deleteWorkflow: 'delete-workflow',\n} as const;\n\nexport const WORKFLOW_BUILDER_NOISE_TOOL_IDS = [\n ...Object.values(WORKFLOW_AUTHORING_TOOL_IDS),\n ...Object.values(WORKFLOW_MANAGEMENT_TOOL_IDS),\n] as const;\n"],"mappings":";AAAA,MAAa,8BAA8B;CACzC,YAAY;CACZ,WAAW;CACX,eAAe;CACf,cAAc;AAChB;AAEA,MAAa,+BAA+B;CAC1C,gBAAgB;CAChB,eAAe;CACf,aAAa;CACb,aAAa;CACb,gBAAgB;AAClB;AAEA,MAAa,kCAAkC,CAC7C,GAAG,OAAO,OAAO,2BAA2B,GAC5C,GAAG,OAAO,OAAO,4BAA4B,CAC/C"}
|
|
1
|
+
{"version":3,"file":"tool-ids.js","names":[],"sources":["../../../src/tools/workflows/tool-ids.ts"],"sourcesContent":["export const WORKFLOW_AUTHORING_TOOL_IDS = {\n listAgents: 'list-available-agents',\n listClassifiers: 'list-available-classifiers',\n listTools: 'list-available-tools',\n listWorkflows: 'list-available-workflows',\n saveWorkflow: 'save-workflow',\n} as const;\n\nexport const WORKFLOW_MANAGEMENT_TOOL_IDS = {\n createWorkflow: 'create-workflow',\n listWorkflows: 'list-workflows',\n getWorkflow: 'get-workflow',\n runWorkflow: 'run-workflow',\n deleteWorkflow: 'delete-workflow',\n} as const;\n\nexport const WORKFLOW_BUILDER_NOISE_TOOL_IDS = [\n ...Object.values(WORKFLOW_AUTHORING_TOOL_IDS),\n ...Object.values(WORKFLOW_MANAGEMENT_TOOL_IDS),\n] as const;\n"],"mappings":";AAAA,MAAa,8BAA8B;CACzC,YAAY;CACZ,iBAAiB;CACjB,WAAW;CACX,eAAe;CACf,cAAc;AAChB;AAEA,MAAa,+BAA+B;CAC1C,gBAAgB;CAChB,eAAe;CACf,aAAa;CACb,aAAa;CACb,gBAAgB;AAClB;AAEA,MAAa,kCAAkC,CAC7C,GAAG,OAAO,OAAO,2BAA2B,GAC5C,GAAG,OAAO,OAAO,4BAA4B,CAC/C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/code-sdk",
|
|
3
|
-
"version": "1.8.1-alpha.
|
|
3
|
+
"version": "1.8.1-alpha.4",
|
|
4
4
|
"description": "Mastra Code SDK: the agent core behind Mastra Code (everything except the TUI) — build your own UIs and surfaces on top of it",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -56,19 +56,19 @@
|
|
|
56
56
|
"vscode-languageserver-protocol": "^3.17.5",
|
|
57
57
|
"yaml": "^2.7.1",
|
|
58
58
|
"zod": "^4.6.4",
|
|
59
|
-
"@mastra/
|
|
60
|
-
"@mastra/core": "1.69.0-alpha.3",
|
|
59
|
+
"@mastra/core": "1.69.0-alpha.4",
|
|
61
60
|
"@mastra/duckdb": "1.10.0",
|
|
61
|
+
"@mastra/fastembed": "1.3.1",
|
|
62
|
+
"@mastra/github-signals": "0.5.0",
|
|
62
63
|
"@mastra/libsql": "1.23.1",
|
|
63
|
-
"@mastra/mcp": "2.0.0",
|
|
64
64
|
"@mastra/memory": "1.31.0",
|
|
65
|
-
"@mastra/
|
|
66
|
-
"@mastra/
|
|
65
|
+
"@mastra/agent-browser": "0.5.3",
|
|
66
|
+
"@mastra/mcp": "2.0.0",
|
|
67
|
+
"@mastra/observability": "1.18.0-alpha.0",
|
|
67
68
|
"@mastra/parallel": "0.1.2",
|
|
68
|
-
"@mastra/stagehand": "0.3.5",
|
|
69
69
|
"@mastra/pg": "1.26.0",
|
|
70
|
-
"@mastra/github-signals": "0.5.0",
|
|
71
70
|
"@mastra/schema-compat": "1.3.11",
|
|
71
|
+
"@mastra/stagehand": "0.3.5",
|
|
72
72
|
"@mastra/tavily": "1.1.2"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
"typescript-eslint": "^8.57.0",
|
|
82
82
|
"vitest": "4.1.11",
|
|
83
83
|
"@internal/lint": "0.0.134",
|
|
84
|
-
"@internal/
|
|
85
|
-
"@internal/
|
|
84
|
+
"@internal/types-builder": "0.0.109",
|
|
85
|
+
"@internal/workspace-test-utils": "0.0.78"
|
|
86
86
|
},
|
|
87
87
|
"engines": {
|
|
88
88
|
"node": ">=22.19.0"
|