@mastra/server 1.64.1-alpha.0 → 1.65.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-builder-D8JyDQ5J.cjs → agent-builder-B2GCn_tS.cjs} +2 -2
- package/dist/{agent-builder-D8JyDQ5J.cjs.map → agent-builder-B2GCn_tS.cjs.map} +1 -1
- package/dist/{agent-builder-DNTFty1u.js → agent-builder-DUM8fGTt.js} +2 -2
- package/dist/{agent-builder-DNTFty1u.js.map → agent-builder-DUM8fGTt.js.map} +1 -1
- package/dist/{api-schema-manifest-BqgRfP-2.cjs → api-schema-manifest-DBKVhp6F.cjs} +2 -2
- package/dist/{api-schema-manifest-BqgRfP-2.cjs.map → api-schema-manifest-DBKVhp6F.cjs.map} +1 -1
- package/dist/{api-schema-manifest-BiPbewoh.js → api-schema-manifest-seBh6tGE.js} +2 -2
- package/dist/{api-schema-manifest-BiPbewoh.js.map → api-schema-manifest-seBh6tGE.js.map} +1 -1
- package/dist/{datasets-DYhcB-od.cjs → datasets-B3DTc52y.cjs} +12 -1
- package/dist/datasets-B3DTc52y.cjs.map +1 -0
- package/dist/{datasets-CInAtVdf.js → datasets-dzuIwMeB.js} +7 -2
- package/dist/datasets-dzuIwMeB.js.map +1 -0
- package/dist/{dist-mj70vroq.cjs → dist-DPu6oGri.cjs} +44 -16
- package/dist/dist-DPu6oGri.cjs.map +1 -0
- package/dist/{dist-BwPO-2NT.js → dist-DxhjXh6M.js} +44 -16
- package/dist/dist-DxhjXh6M.js.map +1 -0
- package/dist/docs/SKILL.md +2 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/reference-observability-tracing-trace-query.md +179 -0
- package/dist/docs/references/reference-server-routes.md +1 -0
- package/dist/{dynamic-workflows-CzkrhMwZ.js → dynamic-workflows-Cn9MXevC.js} +16 -1
- package/dist/dynamic-workflows-Cn9MXevC.js.map +1 -0
- package/dist/{dynamic-workflows-BT_ryQUl.cjs → dynamic-workflows-DSg9_yec.cjs} +16 -1
- package/dist/dynamic-workflows-DSg9_yec.cjs.map +1 -0
- package/dist/{observability-new-endpoints-BxXDVoQ0.cjs → observability-new-endpoints-DaESE5D0.cjs} +144 -2
- package/dist/observability-new-endpoints-DaESE5D0.cjs.map +1 -0
- package/dist/{observability-new-endpoints-C_om-Dj7.js → observability-new-endpoints-DeWTjk36.js} +140 -6
- package/dist/observability-new-endpoints-DeWTjk36.js.map +1 -0
- package/dist/{routes-DYQWvd_y.cjs → routes-D3LdlCKT.cjs} +5 -3
- package/dist/routes-D3LdlCKT.cjs.map +1 -0
- package/dist/{routes-CCD8Q7x1.js → routes-Dnb7rduj.js} +6 -4
- package/dist/routes-Dnb7rduj.js.map +1 -0
- package/dist/server/handlers/agent-builder.cjs +3 -3
- package/dist/server/handlers/agent-builder.d.ts +30 -0
- package/dist/server/handlers/agent-builder.d.ts.map +1 -1
- package/dist/server/handlers/agent-builder.js +3 -3
- package/dist/server/handlers/datasets.cjs +28 -1
- package/dist/server/handlers/datasets.cjs.map +1 -1
- package/dist/server/handlers/datasets.d.ts +115 -0
- package/dist/server/handlers/datasets.d.ts.map +1 -1
- package/dist/server/handlers/datasets.js +28 -2
- package/dist/server/handlers/datasets.js.map +1 -1
- package/dist/server/handlers/dynamic-workflows.cjs +1 -1
- package/dist/server/handlers/dynamic-workflows.d.ts +96 -0
- package/dist/server/handlers/dynamic-workflows.d.ts.map +1 -1
- package/dist/server/handlers/dynamic-workflows.js +1 -1
- package/dist/server/handlers/observability-new-endpoints.cjs +2 -1
- package/dist/server/handlers/observability-new-endpoints.d.ts +278 -56
- package/dist/server/handlers/observability-new-endpoints.d.ts.map +1 -1
- package/dist/server/handlers/observability-new-endpoints.js +2 -2
- package/dist/server/handlers/observability-shared.cjs +13 -0
- package/dist/server/handlers/observability-shared.cjs.map +1 -1
- package/dist/server/handlers/observability-shared.d.ts +8 -0
- package/dist/server/handlers/observability-shared.d.ts.map +1 -1
- package/dist/server/handlers/observability-shared.js +13 -1
- package/dist/server/handlers/observability-shared.js.map +1 -1
- package/dist/server/handlers/observability.cjs +3 -1
- package/dist/server/handlers/observability.cjs.map +1 -1
- package/dist/server/handlers/observability.js +3 -2
- package/dist/server/handlers/observability.js.map +1 -1
- package/dist/server/handlers/system.cjs +1 -1
- package/dist/server/handlers/system.js +1 -1
- package/dist/server/handlers/workflows.cjs +1 -1
- package/dist/server/handlers/workflows.d.ts +42 -0
- package/dist/server/handlers/workflows.d.ts.map +1 -1
- package/dist/server/handlers/workflows.js +1 -1
- package/dist/server/handlers.cjs +1 -1
- package/dist/server/handlers.js +1 -1
- package/dist/server/schemas/datasets.d.ts +5 -0
- package/dist/server/schemas/datasets.d.ts.map +1 -1
- package/dist/server/schemas/dynamic-workflows.d.ts +72 -0
- package/dist/server/schemas/dynamic-workflows.d.ts.map +1 -1
- package/dist/server/schemas/index.cjs +4 -3
- package/dist/server/schemas/index.js +4 -4
- package/dist/server/schemas/workflows.d.ts +12 -0
- package/dist/server/schemas/workflows.d.ts.map +1 -1
- package/dist/server/server-adapter/index.cjs +8 -1
- package/dist/server/server-adapter/index.cjs.map +1 -1
- package/dist/server/server-adapter/index.d.ts +3 -0
- package/dist/server/server-adapter/index.d.ts.map +1 -1
- package/dist/server/server-adapter/index.js +7 -2
- package/dist/server/server-adapter/index.js.map +1 -1
- package/dist/server/server-adapter/routes/agent-builder.d.ts +30 -0
- package/dist/server/server-adapter/routes/agent-builder.d.ts.map +1 -1
- package/dist/server/server-adapter/routes/datasets.d.ts +114 -0
- package/dist/server/server-adapter/routes/datasets.d.ts.map +1 -1
- package/dist/server/server-adapter/routes/observability.d.ts +109 -0
- package/dist/server/server-adapter/routes/observability.d.ts.map +1 -1
- package/dist/server/server-adapter/routes/workflows.d.ts +42 -0
- package/dist/server/server-adapter/routes/workflows.d.ts.map +1 -1
- package/dist/{workflows--79xhOOb.cjs → workflows-BNnfyZhn.cjs} +20 -15
- package/dist/workflows-BNnfyZhn.cjs.map +1 -0
- package/dist/{workflows-B2ooCiwN.js → workflows-CUgR3bTL.js} +20 -15
- package/dist/workflows-CUgR3bTL.js.map +1 -0
- package/package.json +6 -6
- package/dist/datasets-CInAtVdf.js.map +0 -1
- package/dist/datasets-DYhcB-od.cjs.map +0 -1
- package/dist/dist-BwPO-2NT.js.map +0 -1
- package/dist/dist-mj70vroq.cjs.map +0 -1
- package/dist/dynamic-workflows-BT_ryQUl.cjs.map +0 -1
- package/dist/dynamic-workflows-CzkrhMwZ.js.map +0 -1
- package/dist/observability-new-endpoints-BxXDVoQ0.cjs.map +0 -1
- package/dist/observability-new-endpoints-C_om-Dj7.js.map +0 -1
- package/dist/routes-CCD8Q7x1.js.map +0 -1
- package/dist/routes-DYQWvd_y.cjs.map +0 -1
- package/dist/workflows--79xhOOb.cjs.map +0 -1
- package/dist/workflows-B2ooCiwN.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observability.js","names":["store"],"sources":["../../../src/server/handlers/observability.ts"],"sourcesContent":["import { extractTrajectoryFromTrace, listScoresResponseSchema } from '@mastra/core/evals';\nimport { scoreTraces } from '@mastra/core/evals/scoreTraces';\nimport {\n tracesFilterSchema,\n tracesOrderBySchema,\n spanIdsSchema,\n listTracesResponseSchema,\n scoreTracesRequestSchema,\n scoreTracesResponseSchema,\n getTraceArgsSchema,\n getTraceResponseSchema,\n getTraceLightResponseSchema,\n getSpanArgsSchema,\n getSpanResponseSchema,\n dateRangeSchema,\n toTraceSpans,\n traceSpanSchema,\n} from '@mastra/core/storage';\n// `branches*`, `listBranches*`, and `getBranch*` schemas are new in\n// @mastra/core@1.32.0; route them through a shim that tolerates older cores\n// (see ./observability-storage-schemas.ts for full rationale).\nimport { z } from 'zod/v4';\nimport { HTTPException } from '../http-exception';\nimport type { ServerRoute } from '../server-adapter/routes';\nimport { createRoute, pickParams, wrapSchemaForQueryParams } from '../server-adapter/routes/route-builder';\nimport { handleError } from './error';\nimport { paginationArgsSchema } from './observability-list-query-schemas';\nimport {\n assertObservabilityDeltaSupported,\n createObservabilityListQuerySchema,\n getObservabilityStore,\n getScoresStore,\n getStorage,\n OBSERVABILITY_LIST_ENDPOINTS,\n} from './observability-shared';\nimport {\n branchesFilterSchema,\n branchesOrderBySchema,\n listBranchesResponseSchema,\n getBranchArgsSchema,\n getBranchResponseSchema,\n listTracesLightResponseSchema,\n} from './observability-storage-schemas';\n\nexport * from './observability-new-endpoints';\n\n// ============================================================================\n// Legacy Parameter Support (backward compatibility with main branch API)\n// ============================================================================\n\n/**\n * Legacy query parameters from the old API (main branch).\n * These are accepted for backward compatibility and transformed to new format.\n */\nconst legacyQueryParamsSchema = z.object({\n // Old: dateRange was in pagination, now it's startedAt in filters\n dateRange: dateRangeSchema.optional(),\n // Old: name matched span names like \"agent run: 'myAgent'\"\n name: z.string().optional(),\n // entityType needs preprocessing to handle legacy 'workflow' value\n entityType: z.preprocess(val => (val === 'workflow' ? 'workflow_run' : val), z.string().optional()),\n});\n\n/**\n * Transforms legacy query parameters to the new format.\n * - dateRange -> startedAt (if startedAt not already set)\n * - name=\"agent run: 'x'\" -> entityId='x', entityType='agent'\n * - name=\"workflow run: 'x'\" -> entityId='x', entityType='workflow_run'\n * - entityType='workflow' -> entityType='workflow_run' (enum value fix)\n */\nfunction transformLegacyParams(params: Record<string, unknown>): Record<string, unknown> {\n const result = { ...params };\n\n // Transform old entityType='workflow' -> 'workflow_run' to support direct handler usage in tests\n if (result.entityType === 'workflow') {\n result.entityType = 'workflow_run';\n }\n\n // Transform old dateRange -> new startedAt\n if (params.dateRange && !params.startedAt) {\n result.startedAt = params.dateRange;\n delete result.dateRange;\n }\n\n // Transform old name -> entityId + entityType\n // Old format: name matched span names like \"agent run: 'myAgent'\" or \"workflow run: 'myWorkflow'\"\n if (typeof params.name === 'string' && !params.entityId) {\n const agentMatch = params.name.match(/^agent run: '([^']+)'$/);\n const workflowMatch = params.name.match(/^workflow run: '([^']+)'$/);\n\n if (agentMatch) {\n result.entityId = agentMatch[1];\n result.entityType = 'agent';\n } else if (workflowMatch) {\n result.entityId = workflowMatch[1];\n result.entityType = 'workflow_run';\n }\n delete result.name;\n }\n\n return result;\n}\n\n// ============================================================================\n// Route Definitions (new pattern - handlers defined inline with createRoute)\n// ============================================================================\n\n/** Filter shape shared by the full and lightweight trace list routes. */\nconst tracesListFilterSchema = tracesFilterSchema.extend({\n ...legacyQueryParamsSchema.shape, // Accept legacy params for backward compatibility\n entityType: z.preprocess(\n value => (value === 'workflow' ? 'workflow_run' : value),\n tracesFilterSchema.shape.entityType,\n ),\n});\n\nconst listTracesQueryParamSchema = createObservabilityListQuerySchema(tracesListFilterSchema, tracesOrderBySchema);\n\n/** Route: GET /observability/traces - paginated trace listing with filtering and sorting. */\nexport const LIST_TRACES_ROUTE: ServerRoute = createRoute({\n method: 'GET',\n path: '/observability/traces',\n responseType: 'json',\n queryParamSchema: listTracesQueryParamSchema,\n responseSchema: listTracesResponseSchema,\n summary: 'List traces',\n description:\n 'Returns a paginated list of traces with optional filtering and sorting. In delta mode, returns only newly listed traces matching the filters.',\n tags: ['Observability'],\n requiresAuth: true,\n handler: async ({ mastra, mode, after, limit, ...params }) => {\n try {\n // Transform legacy params to new format before processing\n const transformedParams = transformLegacyParams(params);\n\n const filters = pickParams(tracesFilterSchema, transformedParams);\n const observabilityStore = await getObservabilityStore(mastra);\n if (mode === 'delta') {\n assertObservabilityDeltaSupported(observabilityStore, OBSERVABILITY_LIST_ENDPOINTS.traces);\n return await observabilityStore.listTraces({\n mode,\n filters,\n after: typeof after === 'string' ? after : undefined,\n limit,\n });\n }\n\n const pagination = pickParams(paginationArgsSchema, transformedParams);\n const orderBy = pickParams(tracesOrderBySchema, transformedParams);\n return await observabilityStore.listTraces({ filters, pagination, orderBy });\n } catch (error) {\n return handleError(error, 'Error listing traces');\n }\n },\n});\n\n/** Route: GET /observability/traces/light - paginated lightweight trace listing with filtering and sorting. */\nexport const LIST_TRACES_LIGHT_ROUTE = createRoute({\n method: 'GET',\n path: '/observability/traces/light',\n responseType: 'json',\n queryParamSchema: listTracesQueryParamSchema,\n responseSchema: listTracesLightResponseSchema,\n summary: 'List lightweight traces',\n description:\n 'Returns a paginated list of lightweight traces with optional filtering and sorting. In delta mode, returns only newly listed traces matching the filters.',\n tags: ['Observability'],\n requiresAuth: true,\n handler: async ({ mastra, mode, after, limit, ...params }) => {\n try {\n const transformedParams = transformLegacyParams(params);\n\n const filters = pickParams(tracesFilterSchema, transformedParams);\n const observabilityStore = await getObservabilityStore(mastra);\n\n // Every current store answers `listTracesLight` — stores without a dedicated\n // implementation inherit the base class's projection fallback. This guard is\n // only for an older `@mastra/core` whose base class predates the method, where\n // calling it would throw `TypeError: ... is not a function`; there we fall back\n // to `listTraces` so consumers still get a response.\n const store = observabilityStore as { listTracesLight?: unknown };\n const supportsLight = typeof store.listTracesLight === 'function';\n\n if (mode === 'delta') {\n assertObservabilityDeltaSupported(observabilityStore, OBSERVABILITY_LIST_ENDPOINTS.traces);\n const deltaArgs = {\n mode,\n filters,\n after: typeof after === 'string' ? after : undefined,\n limit,\n } as const;\n return supportsLight\n ? await observabilityStore.listTracesLight(deltaArgs)\n : await observabilityStore.listTraces(deltaArgs);\n }\n\n const pagination = pickParams(paginationArgsSchema, transformedParams);\n const orderBy = pickParams(tracesOrderBySchema, transformedParams);\n\n if (!supportsLight) {\n return await observabilityStore.listTraces({ filters, pagination, orderBy });\n }\n return await observabilityStore.listTracesLight({ filters, pagination, orderBy });\n } catch (error) {\n return handleError(error, 'Error listing lightweight traces');\n }\n },\n});\n\n/** Route: GET /observability/branches - paginated branch-anchor span listing across all traces. */\nexport const LIST_BRANCHES_ROUTE = createRoute({\n method: 'GET',\n path: '/observability/branches',\n responseType: 'json',\n queryParamSchema: createObservabilityListQuerySchema(branchesFilterSchema, branchesOrderBySchema),\n responseSchema: listBranchesResponseSchema,\n summary: 'List trace branches',\n description:\n 'Returns a paginated list of branch-anchor spans (e.g., AGENT_RUN, WORKFLOW_RUN, TOOL_CALL) across all traces. Unlike listTraces (one row per root-rooted trace), each row here is a single anchor span -- including ones nested under a different root entity. In delta mode, returns only newly listed branch rows matching the filters.',\n tags: ['Observability'],\n requiresAuth: true,\n handler: async ({ mastra, mode, after, limit, ...params }) => {\n try {\n const filters = pickParams(branchesFilterSchema, params);\n const observabilityStore = await getObservabilityStore(mastra);\n if (mode === 'delta') {\n assertObservabilityDeltaSupported(observabilityStore, OBSERVABILITY_LIST_ENDPOINTS.branches);\n return await observabilityStore.listBranches({\n mode,\n filters,\n after: typeof after === 'string' ? after : undefined,\n limit,\n });\n }\n\n const pagination = pickParams(paginationArgsSchema, params);\n const orderBy = pickParams(branchesOrderBySchema, params);\n return await observabilityStore.listBranches({ filters, pagination, orderBy });\n } catch (error) {\n return handleError(error, 'Error listing branches');\n }\n },\n});\n\n/** Route: GET /observability/traces/:traceId/branches/:spanId - retrieve the subtree rooted at a span. */\nexport const GET_BRANCH_ROUTE = createRoute({\n method: 'GET',\n path: '/observability/traces/:traceId/branches/:spanId',\n responseType: 'json',\n pathParamSchema: getBranchArgsSchema.pick({ traceId: true, spanId: true }),\n queryParamSchema: wrapSchemaForQueryParams(getBranchArgsSchema.pick({ depth: true })),\n responseSchema: getBranchResponseSchema,\n summary: 'Get trace branch by span ID',\n description:\n 'Returns the subtree of spans rooted at the given span. The optional `depth` query param bounds descendant levels below the anchor (0 = anchor only; omitted = full subtree).',\n tags: ['Observability'],\n requiresAuth: true,\n handler: async ({ mastra, traceId, spanId, depth }) => {\n try {\n const observabilityStore = await getObservabilityStore(mastra);\n const branch = await observabilityStore.getBranch({ traceId, spanId, depth });\n\n if (!branch) {\n throw new HTTPException(404, { message: `Branch not found for span '${spanId}' in trace '${traceId}'` });\n }\n\n return branch;\n } catch (error) {\n return handleError(error, 'Error getting branch');\n }\n },\n});\n/** Route: GET /observability/traces/:traceId - retrieve a single trace with all spans. */\nexport const GET_TRACE_ROUTE: ServerRoute = createRoute({\n method: 'GET',\n path: '/observability/traces/:traceId',\n responseType: 'json',\n pathParamSchema: getTraceArgsSchema,\n responseSchema: getTraceResponseSchema.extend({ spans: z.array(traceSpanSchema) }),\n summary: 'Get AI trace by ID',\n description: 'Returns a complete AI trace with all spans by trace ID',\n tags: ['Observability'],\n requiresAuth: true,\n handler: async ({ mastra, traceId }) => {\n try {\n const observabilityStore = await getObservabilityStore(mastra);\n const trace = await observabilityStore.getTrace({ traceId });\n\n if (!trace) {\n throw new HTTPException(404, { message: `Trace with ID '${traceId}' not found` });\n }\n\n // Stored SpanRecords carry no status field; derive it from error/endedAt so\n // trace-detail spans match the status shown in trace list rows.\n return { ...trace, spans: toTraceSpans(trace.spans) };\n } catch (error) {\n return handleError(error, 'Error getting trace');\n }\n },\n});\n\n/** Route: GET /observability/traces/:traceId/light - lightweight trace for timeline rendering. */\nexport const GET_TRACE_LIGHT_ROUTE: ServerRoute = createRoute({\n method: 'GET',\n path: '/observability/traces/:traceId/light',\n responseType: 'json',\n pathParamSchema: getTraceArgsSchema,\n responseSchema: getTraceLightResponseSchema,\n summary: 'Get lightweight AI trace by ID',\n description:\n 'Returns a trace with lightweight span data (timeline fields only, excludes input/output/attributes/metadata/tags/links)',\n tags: ['Observability'],\n requiresAuth: true,\n handler: async ({ mastra, traceId }) => {\n try {\n const observabilityStore = await getObservabilityStore(mastra);\n const trace = await observabilityStore.getTraceLight({ traceId });\n\n if (!trace) {\n throw new HTTPException(404, { message: `Trace with ID '${traceId}' not found` });\n }\n\n return trace;\n } catch (error) {\n return handleError(error, 'Error getting lightweight trace');\n }\n },\n});\n\n/** Route: GET /observability/traces/:traceId/spans/:spanId - get a single span with full details. */\nexport const GET_SPAN_ROUTE: ServerRoute = createRoute({\n method: 'GET',\n path: '/observability/traces/:traceId/spans/:spanId',\n responseType: 'json',\n pathParamSchema: getSpanArgsSchema,\n responseSchema: getSpanResponseSchema,\n summary: 'Get a single span by ID',\n description: 'Returns a complete span record with all details by trace ID and span ID',\n tags: ['Observability'],\n requiresAuth: true,\n handler: async ({ mastra, traceId, spanId }) => {\n try {\n const observabilityStore = await getObservabilityStore(mastra);\n const span = await observabilityStore.getSpan({ traceId, spanId });\n\n if (!span) {\n throw new HTTPException(404, { message: `Span not found` });\n }\n\n return span;\n } catch (error) {\n return handleError(error, 'Error getting span');\n }\n },\n});\n\n/** Route: GET /observability/traces/:traceId/trajectory - extract trajectory from a trace. */\nexport const GET_TRACE_TRAJECTORY_ROUTE = createRoute({\n method: 'GET',\n path: '/observability/traces/:traceId/trajectory',\n responseType: 'json',\n pathParamSchema: getTraceArgsSchema,\n responseSchema: z.object({\n steps: z.array(z.unknown()),\n totalDurationMs: z.number().optional(),\n rawOutput: z.unknown().optional(),\n rawWorkflowResult: z.unknown().optional(),\n }),\n summary: 'Extract trajectory from trace',\n description: 'Extracts a structured trajectory (ordered steps) from a trace by analyzing its spans',\n tags: ['Observability'],\n requiresAuth: true,\n handler: async ({ mastra, traceId }) => {\n try {\n const observabilityStore = await getObservabilityStore(mastra);\n const trace = await observabilityStore.getTrace({ traceId });\n\n if (!trace) {\n throw new HTTPException(404, { message: `Trace with ID '${traceId}' not found` });\n }\n\n const trajectory = extractTrajectoryFromTrace(trace.spans);\n return trajectory;\n } catch (error) {\n return handleError(error, 'Error extracting trajectory from trace');\n }\n },\n});\n\n/** Route: POST /observability/traces/score - score traces using a specified scorer (fire-and-forget). */\nexport const SCORE_TRACES_ROUTE = createRoute({\n method: 'POST',\n path: '/observability/traces/score',\n responseType: 'json',\n bodySchema: scoreTracesRequestSchema,\n responseSchema: scoreTracesResponseSchema,\n summary: 'Score traces',\n description: 'Scores one or more traces using a specified scorer (fire-and-forget)',\n tags: ['Observability'],\n requiresAuth: true,\n handler: async ({ mastra, ...params }) => {\n try {\n // Validate storage exists before starting background task\n getStorage(mastra);\n\n const { scorerName, targets } = params;\n\n const scorer = mastra.getScorerById(scorerName);\n if (!scorer) {\n throw new HTTPException(404, { message: `Scorer '${scorerName}' not found` });\n }\n\n scoreTraces({\n scorerId: scorer.config.id || scorer.config.name,\n targets,\n mastra,\n }).catch(error => {\n const logger = mastra.getLogger();\n logger?.error(`Background trace scoring failed: ${error.message}`, error);\n });\n\n return {\n status: 'success',\n message: `Scoring started for ${targets.length} ${targets.length === 1 ? 'trace' : 'traces'}`,\n traceCount: targets.length,\n };\n } catch (error) {\n return handleError(error, 'Error processing trace scoring');\n }\n },\n});\n\nexport const LIST_SCORES_BY_SPAN_ROUTE = createRoute({\n method: 'GET',\n path: '/observability/traces/:traceId/:spanId/scores',\n responseType: 'json',\n pathParamSchema: spanIdsSchema,\n // List endpoints accept optional query params; use partial() to allow empty queries.\n queryParamSchema: wrapSchemaForQueryParams(paginationArgsSchema.partial()),\n responseSchema: listScoresResponseSchema,\n summary: 'List scores by span',\n description: 'Returns all scores for a specific span within a trace',\n tags: ['Observability'],\n requiresAuth: true,\n handler: async ({ mastra, ...params }) => {\n try {\n const pagination = pickParams(paginationArgsSchema, params);\n const spanIds = pickParams(spanIdsSchema, params);\n\n const scoresStore = await getScoresStore(mastra);\n\n return await scoresStore.listScoresBySpan({\n ...spanIds,\n pagination,\n });\n } catch (error) {\n return handleError(error, 'Error getting scores by span');\n }\n },\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDA,MAAM,0BAA0B,EAAE,OAAO;CAEvC,WAAW,gBAAgB,SAAS;CAEpC,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS;CAE1B,YAAY,EAAE,YAAW,QAAQ,QAAQ,aAAa,iBAAiB,KAAM,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC;AACpG,CAAC;;;;;;;;AASD,SAAS,sBAAsB,QAA0D;CACvF,MAAM,SAAS,EAAE,GAAG,OAAO;CAG3B,IAAI,OAAO,eAAe,YACxB,OAAO,aAAa;CAItB,IAAI,OAAO,aAAa,CAAC,OAAO,WAAW;EACzC,OAAO,YAAY,OAAO;EAC1B,OAAO,OAAO;CAChB;CAIA,I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AQ,OAAO,GAAG,QAAQ,WAAW,IAAI,UAAU;IACnF,YAAY,QAAQ;GACtB;EACF,SAAS,OAAO;GACd,OAAO,YAAY,OAAO,gCAAgC;EAC5D;CACF;AACF,CAAC;AAED,MAAa,4BAA4B,YAAY;CACnD,QAAQ;CACR,MAAM;CACN,cAAc;CACd,iBAAiB;CAEjB,kBAAkB,yBAAyB,qBAAqB,QAAQ,CAAC;CACzE,gBAAgB;CAChB,SAAS;CACT,aAAa;CACb,MAAM,CAAC,eAAe;CACtB,cAAc;CACd,SAAS,OAAO,EAAE,QAAQ,GAAG,aAAa;EACxC,IAAI;GACF,MAAM,aAAa,WAAW,sBAAsB,MAAM;GAC1D,MAAM,UAAU,WAAW,eAAe,MAAM;GAIhD,OAAO,OAAM,MAFa,eAAe,MAAM,EAAA,CAEtB,iBAAiB;IACxC,GAAG;IACH;GACF,CAAC;EACH,SAAS,OAAO;GACd,OAAO,YAAY,OAAO,8BAA8B;EAC1D;CACF;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"observability.js","names":["store"],"sources":["../../../src/server/handlers/observability.ts"],"sourcesContent":["import { extractTrajectoryFromTrace, listScoresResponseSchema } from '@mastra/core/evals';\nimport { scoreTraces } from '@mastra/core/evals/scoreTraces';\nimport {\n tracesFilterSchema,\n tracesOrderBySchema,\n spanIdsSchema,\n listTracesResponseSchema,\n scoreTracesRequestSchema,\n scoreTracesResponseSchema,\n getTraceArgsSchema,\n getTraceResponseSchema,\n getTraceLightResponseSchema,\n getSpanArgsSchema,\n getSpanResponseSchema,\n dateRangeSchema,\n toTraceSpans,\n traceSpanSchema,\n} from '@mastra/core/storage';\n// `branches*`, `listBranches*`, and `getBranch*` schemas are new in\n// @mastra/core@1.32.0; route them through a shim that tolerates older cores\n// (see ./observability-storage-schemas.ts for full rationale).\nimport { z } from 'zod/v4';\nimport { HTTPException } from '../http-exception';\nimport type { ServerRoute } from '../server-adapter/routes';\nimport { createRoute, pickParams, wrapSchemaForQueryParams } from '../server-adapter/routes/route-builder';\nimport { handleError } from './error';\nimport { paginationArgsSchema } from './observability-list-query-schemas';\nimport {\n assertObservabilityDeltaSupported,\n createObservabilityListQuerySchema,\n getObservabilityStore,\n getScoresStore,\n getStorage,\n OBSERVABILITY_LIST_ENDPOINTS,\n} from './observability-shared';\nimport {\n branchesFilterSchema,\n branchesOrderBySchema,\n listBranchesResponseSchema,\n getBranchArgsSchema,\n getBranchResponseSchema,\n listTracesLightResponseSchema,\n} from './observability-storage-schemas';\n\nexport * from './observability-new-endpoints';\n\n// ============================================================================\n// Legacy Parameter Support (backward compatibility with main branch API)\n// ============================================================================\n\n/**\n * Legacy query parameters from the old API (main branch).\n * These are accepted for backward compatibility and transformed to new format.\n */\nconst legacyQueryParamsSchema = z.object({\n // Old: dateRange was in pagination, now it's startedAt in filters\n dateRange: dateRangeSchema.optional(),\n // Old: name matched span names like \"agent run: 'myAgent'\"\n name: z.string().optional(),\n // entityType needs preprocessing to handle legacy 'workflow' value\n entityType: z.preprocess(val => (val === 'workflow' ? 'workflow_run' : val), z.string().optional()),\n});\n\n/**\n * Transforms legacy query parameters to the new format.\n * - dateRange -> startedAt (if startedAt not already set)\n * - name=\"agent run: 'x'\" -> entityId='x', entityType='agent'\n * - name=\"workflow run: 'x'\" -> entityId='x', entityType='workflow_run'\n * - entityType='workflow' -> entityType='workflow_run' (enum value fix)\n */\nfunction transformLegacyParams(params: Record<string, unknown>): Record<string, unknown> {\n const result = { ...params };\n\n // Transform old entityType='workflow' -> 'workflow_run' to support direct handler usage in tests\n if (result.entityType === 'workflow') {\n result.entityType = 'workflow_run';\n }\n\n // Transform old dateRange -> new startedAt\n if (params.dateRange && !params.startedAt) {\n result.startedAt = params.dateRange;\n delete result.dateRange;\n }\n\n // Transform old name -> entityId + entityType\n // Old format: name matched span names like \"agent run: 'myAgent'\" or \"workflow run: 'myWorkflow'\"\n if (typeof params.name === 'string' && !params.entityId) {\n const agentMatch = params.name.match(/^agent run: '([^']+)'$/);\n const workflowMatch = params.name.match(/^workflow run: '([^']+)'$/);\n\n if (agentMatch) {\n result.entityId = agentMatch[1];\n result.entityType = 'agent';\n } else if (workflowMatch) {\n result.entityId = workflowMatch[1];\n result.entityType = 'workflow_run';\n }\n delete result.name;\n }\n\n return result;\n}\n\n// ============================================================================\n// Route Definitions (new pattern - handlers defined inline with createRoute)\n// ============================================================================\n\n/** Filter shape shared by the full and lightweight trace list routes. */\nconst tracesListFilterSchema = tracesFilterSchema.extend({\n ...legacyQueryParamsSchema.shape, // Accept legacy params for backward compatibility\n entityType: z.preprocess(\n value => (value === 'workflow' ? 'workflow_run' : value),\n tracesFilterSchema.shape.entityType,\n ),\n});\n\nconst listTracesQueryParamSchema = createObservabilityListQuerySchema(tracesListFilterSchema, tracesOrderBySchema);\n\n/** Route: GET /observability/traces - paginated trace listing with filtering and sorting. */\nexport const LIST_TRACES_ROUTE: ServerRoute = createRoute({\n method: 'GET',\n path: '/observability/traces',\n responseType: 'json',\n queryParamSchema: listTracesQueryParamSchema,\n responseSchema: listTracesResponseSchema,\n summary: 'List traces',\n description:\n 'Returns a paginated list of traces with optional filtering and sorting. In delta mode, returns only newly listed traces matching the filters.',\n tags: ['Observability'],\n requiresAuth: true,\n handler: async ({ mastra, mode, after, limit, ...params }) => {\n try {\n // Transform legacy params to new format before processing\n const transformedParams = transformLegacyParams(params);\n\n const filters = pickParams(tracesFilterSchema, transformedParams);\n const observabilityStore = await getObservabilityStore(mastra);\n if (mode === 'delta') {\n assertObservabilityDeltaSupported(observabilityStore, OBSERVABILITY_LIST_ENDPOINTS.traces);\n return await observabilityStore.listTraces({\n mode,\n filters,\n after: typeof after === 'string' ? after : undefined,\n limit,\n });\n }\n\n const pagination = pickParams(paginationArgsSchema, transformedParams);\n const orderBy = pickParams(tracesOrderBySchema, transformedParams);\n return await observabilityStore.listTraces({ filters, pagination, orderBy });\n } catch (error) {\n return handleError(error, 'Error listing traces');\n }\n },\n});\n\n/** Route: GET /observability/traces/light - paginated lightweight trace listing with filtering and sorting. */\nexport const LIST_TRACES_LIGHT_ROUTE = createRoute({\n method: 'GET',\n path: '/observability/traces/light',\n responseType: 'json',\n queryParamSchema: listTracesQueryParamSchema,\n responseSchema: listTracesLightResponseSchema,\n summary: 'List lightweight traces',\n description:\n 'Returns a paginated list of lightweight traces with optional filtering and sorting. In delta mode, returns only newly listed traces matching the filters.',\n tags: ['Observability'],\n requiresAuth: true,\n handler: async ({ mastra, mode, after, limit, ...params }) => {\n try {\n const transformedParams = transformLegacyParams(params);\n\n const filters = pickParams(tracesFilterSchema, transformedParams);\n const observabilityStore = await getObservabilityStore(mastra);\n\n // Every current store answers `listTracesLight` — stores without a dedicated\n // implementation inherit the base class's projection fallback. This guard is\n // only for an older `@mastra/core` whose base class predates the method, where\n // calling it would throw `TypeError: ... is not a function`; there we fall back\n // to `listTraces` so consumers still get a response.\n const store = observabilityStore as { listTracesLight?: unknown };\n const supportsLight = typeof store.listTracesLight === 'function';\n\n if (mode === 'delta') {\n assertObservabilityDeltaSupported(observabilityStore, OBSERVABILITY_LIST_ENDPOINTS.traces);\n const deltaArgs = {\n mode,\n filters,\n after: typeof after === 'string' ? after : undefined,\n limit,\n } as const;\n return supportsLight\n ? await observabilityStore.listTracesLight(deltaArgs)\n : await observabilityStore.listTraces(deltaArgs);\n }\n\n const pagination = pickParams(paginationArgsSchema, transformedParams);\n const orderBy = pickParams(tracesOrderBySchema, transformedParams);\n\n if (!supportsLight) {\n return await observabilityStore.listTraces({ filters, pagination, orderBy });\n }\n return await observabilityStore.listTracesLight({ filters, pagination, orderBy });\n } catch (error) {\n return handleError(error, 'Error listing lightweight traces');\n }\n },\n});\n\n/** Route: GET /observability/branches - paginated branch-anchor span listing across all traces. */\nexport const LIST_BRANCHES_ROUTE = createRoute({\n method: 'GET',\n path: '/observability/branches',\n responseType: 'json',\n queryParamSchema: createObservabilityListQuerySchema(branchesFilterSchema, branchesOrderBySchema),\n responseSchema: listBranchesResponseSchema,\n summary: 'List trace branches',\n description:\n 'Returns a paginated list of branch-anchor spans (e.g., AGENT_RUN, WORKFLOW_RUN, TOOL_CALL) across all traces. Unlike listTraces (one row per root-rooted trace), each row here is a single anchor span -- including ones nested under a different root entity. In delta mode, returns only newly listed branch rows matching the filters.',\n tags: ['Observability'],\n requiresAuth: true,\n handler: async ({ mastra, mode, after, limit, ...params }) => {\n try {\n const filters = pickParams(branchesFilterSchema, params);\n const observabilityStore = await getObservabilityStore(mastra);\n if (mode === 'delta') {\n assertObservabilityDeltaSupported(observabilityStore, OBSERVABILITY_LIST_ENDPOINTS.branches);\n return await observabilityStore.listBranches({\n mode,\n filters,\n after: typeof after === 'string' ? after : undefined,\n limit,\n });\n }\n\n const pagination = pickParams(paginationArgsSchema, params);\n const orderBy = pickParams(branchesOrderBySchema, params);\n return await observabilityStore.listBranches({ filters, pagination, orderBy });\n } catch (error) {\n return handleError(error, 'Error listing branches');\n }\n },\n});\n\n/** Route: GET /observability/traces/:traceId/branches/:spanId - retrieve the subtree rooted at a span. */\nexport const GET_BRANCH_ROUTE = createRoute({\n method: 'GET',\n path: '/observability/traces/:traceId/branches/:spanId',\n responseType: 'json',\n pathParamSchema: getBranchArgsSchema.pick({ traceId: true, spanId: true }),\n queryParamSchema: wrapSchemaForQueryParams(getBranchArgsSchema.pick({ depth: true })),\n responseSchema: getBranchResponseSchema,\n summary: 'Get trace branch by span ID',\n description:\n 'Returns the subtree of spans rooted at the given span. The optional `depth` query param bounds descendant levels below the anchor (0 = anchor only; omitted = full subtree).',\n tags: ['Observability'],\n requiresAuth: true,\n handler: async ({ mastra, traceId, spanId, depth }) => {\n try {\n const observabilityStore = await getObservabilityStore(mastra);\n const branch = await observabilityStore.getBranch({ traceId, spanId, depth });\n\n if (!branch) {\n throw new HTTPException(404, { message: `Branch not found for span '${spanId}' in trace '${traceId}'` });\n }\n\n return branch;\n } catch (error) {\n return handleError(error, 'Error getting branch');\n }\n },\n});\n/** Route: GET /observability/traces/:traceId - retrieve a single trace with all spans. */\nexport const GET_TRACE_ROUTE: ServerRoute = createRoute({\n method: 'GET',\n path: '/observability/traces/:traceId',\n responseType: 'json',\n pathParamSchema: getTraceArgsSchema,\n responseSchema: getTraceResponseSchema.extend({ spans: z.array(traceSpanSchema) }),\n summary: 'Get AI trace by ID',\n description: 'Returns a complete AI trace with all spans by trace ID',\n tags: ['Observability'],\n requiresAuth: true,\n handler: async ({ mastra, traceId }) => {\n try {\n const observabilityStore = await getObservabilityStore(mastra);\n const trace = await observabilityStore.getTrace({ traceId });\n\n if (!trace) {\n throw new HTTPException(404, { message: `Trace with ID '${traceId}' not found` });\n }\n\n // Stored SpanRecords carry no status field; derive it from error/endedAt so\n // trace-detail spans match the status shown in trace list rows.\n return { ...trace, spans: toTraceSpans(trace.spans) };\n } catch (error) {\n return handleError(error, 'Error getting trace');\n }\n },\n});\n\n/** Route: GET /observability/traces/:traceId/light - lightweight trace for timeline rendering. */\nexport const GET_TRACE_LIGHT_ROUTE: ServerRoute = createRoute({\n method: 'GET',\n path: '/observability/traces/:traceId/light',\n responseType: 'json',\n pathParamSchema: getTraceArgsSchema,\n responseSchema: getTraceLightResponseSchema,\n summary: 'Get lightweight AI trace by ID',\n description:\n 'Returns a trace with lightweight span data (timeline fields only, excludes input/output/attributes/metadata/tags/links)',\n tags: ['Observability'],\n requiresAuth: true,\n handler: async ({ mastra, traceId }) => {\n try {\n const observabilityStore = await getObservabilityStore(mastra);\n const trace = await observabilityStore.getTraceLight({ traceId });\n\n if (!trace) {\n throw new HTTPException(404, { message: `Trace with ID '${traceId}' not found` });\n }\n\n return trace;\n } catch (error) {\n return handleError(error, 'Error getting lightweight trace');\n }\n },\n});\n\n/** Route: GET /observability/traces/:traceId/spans/:spanId - get a single span with full details. */\nexport const GET_SPAN_ROUTE: ServerRoute = createRoute({\n method: 'GET',\n path: '/observability/traces/:traceId/spans/:spanId',\n responseType: 'json',\n pathParamSchema: getSpanArgsSchema,\n responseSchema: getSpanResponseSchema,\n summary: 'Get a single span by ID',\n description: 'Returns a complete span record with all details by trace ID and span ID',\n tags: ['Observability'],\n requiresAuth: true,\n handler: async ({ mastra, traceId, spanId }) => {\n try {\n const observabilityStore = await getObservabilityStore(mastra);\n const span = await observabilityStore.getSpan({ traceId, spanId });\n\n if (!span) {\n throw new HTTPException(404, { message: `Span not found` });\n }\n\n return span;\n } catch (error) {\n return handleError(error, 'Error getting span');\n }\n },\n});\n\n/** Route: GET /observability/traces/:traceId/trajectory - extract trajectory from a trace. */\nexport const GET_TRACE_TRAJECTORY_ROUTE = createRoute({\n method: 'GET',\n path: '/observability/traces/:traceId/trajectory',\n responseType: 'json',\n pathParamSchema: getTraceArgsSchema,\n responseSchema: z.object({\n steps: z.array(z.unknown()),\n totalDurationMs: z.number().optional(),\n rawOutput: z.unknown().optional(),\n rawWorkflowResult: z.unknown().optional(),\n }),\n summary: 'Extract trajectory from trace',\n description: 'Extracts a structured trajectory (ordered steps) from a trace by analyzing its spans',\n tags: ['Observability'],\n requiresAuth: true,\n handler: async ({ mastra, traceId }) => {\n try {\n const observabilityStore = await getObservabilityStore(mastra);\n const trace = await observabilityStore.getTrace({ traceId });\n\n if (!trace) {\n throw new HTTPException(404, { message: `Trace with ID '${traceId}' not found` });\n }\n\n const trajectory = extractTrajectoryFromTrace(trace.spans);\n return trajectory;\n } catch (error) {\n return handleError(error, 'Error extracting trajectory from trace');\n }\n },\n});\n\n/** Route: POST /observability/traces/score - score traces using a specified scorer (fire-and-forget). */\nexport const SCORE_TRACES_ROUTE = createRoute({\n method: 'POST',\n path: '/observability/traces/score',\n responseType: 'json',\n bodySchema: scoreTracesRequestSchema,\n responseSchema: scoreTracesResponseSchema,\n summary: 'Score traces',\n description: 'Scores one or more traces using a specified scorer (fire-and-forget)',\n tags: ['Observability'],\n requiresAuth: true,\n handler: async ({ mastra, ...params }) => {\n try {\n // Validate storage exists before starting background task\n getStorage(mastra);\n\n const { scorerName, targets } = params;\n\n const scorer = mastra.getScorerById(scorerName);\n if (!scorer) {\n throw new HTTPException(404, { message: `Scorer '${scorerName}' not found` });\n }\n\n scoreTraces({\n scorerId: scorer.config.id || scorer.config.name,\n targets,\n mastra,\n }).catch(error => {\n const logger = mastra.getLogger();\n logger?.error(`Background trace scoring failed: ${error.message}`, error);\n });\n\n return {\n status: 'success',\n message: `Scoring started for ${targets.length} ${targets.length === 1 ? 'trace' : 'traces'}`,\n traceCount: targets.length,\n };\n } catch (error) {\n return handleError(error, 'Error processing trace scoring');\n }\n },\n});\n\nexport const LIST_SCORES_BY_SPAN_ROUTE = createRoute({\n method: 'GET',\n path: '/observability/traces/:traceId/:spanId/scores',\n responseType: 'json',\n pathParamSchema: spanIdsSchema,\n // List endpoints accept optional query params; use partial() to allow empty queries.\n queryParamSchema: wrapSchemaForQueryParams(paginationArgsSchema.partial()),\n responseSchema: listScoresResponseSchema,\n summary: 'List scores by span',\n description: 'Returns all scores for a specific span within a trace',\n tags: ['Observability'],\n requiresAuth: true,\n handler: async ({ mastra, ...params }) => {\n try {\n const pagination = pickParams(paginationArgsSchema, params);\n const spanIds = pickParams(spanIdsSchema, params);\n\n const scoresStore = await getScoresStore(mastra);\n\n return await scoresStore.listScoresBySpan({\n ...spanIds,\n pagination,\n });\n } catch (error) {\n return handleError(error, 'Error getting scores by span');\n }\n },\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDA,MAAM,0BAA0B,EAAE,OAAO;CAEvC,WAAW,gBAAgB,SAAS;CAEpC,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS;CAE1B,YAAY,EAAE,YAAW,QAAQ,QAAQ,aAAa,iBAAiB,KAAM,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC;AACpG,CAAC;;;;;;;;AASD,SAAS,sBAAsB,QAA0D;CACvF,MAAM,SAAS,EAAE,GAAG,OAAO;CAG3B,IAAI,OAAO,eAAe,YACxB,OAAO,aAAa;CAItB,IAAI,OAAO,aAAa,CAAC,OAAO,WAAW;EACzC,OA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AC;GAED,OAAO;IACL,QAAQ;IACR,SAAS,uBAAuB,QAAQ,OAAO,GAAG,QAAQ,WAAW,IAAI,UAAU;IACnF,YAAY,QAAQ;GACtB;EACF,SAAS,OAAO;GACd,OAAO,YAAY,OAAO,gCAAgC;EAC5D;CACF;AACF,CAAC;AAED,MAAa,4BAA4B,YAAY;CACnD,QAAQ;CACR,MAAM;CACN,cAAc;CACd,iBAAiB;CAEjB,kBAAkB,yBAAyB,qBAAqB,QAAQ,CAAC;CACzE,gBAAgB;CAChB,SAAS;CACT,aAAa;CACb,MAAM,CAAC,eAAe;CACtB,cAAc;CACd,SAAS,OAAO,EAAE,QAAQ,GAAG,aAAa;EACxC,IAAI;GACF,MAAM,aAAa,WAAW,sBAAsB,MAAM;GAC1D,MAAM,UAAU,WAAW,eAAe,MAAM;GAIhD,OAAO,OAAM,MAFa,eAAe,MAAM,EAAA,CAEtB,iBAAiB;IACxC,GAAG;IACH;GACF,CAAC;EACH,SAAS,OAAO;GACd,OAAO,YAAY,OAAO,8BAA8B;EAC1D;CACF;AACF,CAAC"}
|
|
@@ -87,7 +87,7 @@ const GET_API_SCHEMA_ROUTE = require_route_builder.createRoute({
|
|
|
87
87
|
tags: ["System"],
|
|
88
88
|
requiresAuth: true,
|
|
89
89
|
handler: async () => {
|
|
90
|
-
const { buildApiSchemaManifest } = await Promise.resolve().then(() => require("../../api-schema-manifest-
|
|
90
|
+
const { buildApiSchemaManifest } = await Promise.resolve().then(() => require("../../api-schema-manifest-DBKVhp6F.cjs"));
|
|
91
91
|
return buildApiSchemaManifest();
|
|
92
92
|
}
|
|
93
93
|
});
|
|
@@ -85,7 +85,7 @@ const GET_API_SCHEMA_ROUTE = createRoute({
|
|
|
85
85
|
tags: ["System"],
|
|
86
86
|
requiresAuth: true,
|
|
87
87
|
handler: async () => {
|
|
88
|
-
const { buildApiSchemaManifest } = await import("../../api-schema-manifest-
|
|
88
|
+
const { buildApiSchemaManifest } = await import("../../api-schema-manifest-seBh6tGE.js");
|
|
89
89
|
return buildApiSchemaManifest();
|
|
90
90
|
}
|
|
91
91
|
});
|
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_rolldown_runtime = require("../../rolldown-runtime-Bd6kNlEP.cjs");
|
|
3
3
|
const require_http_exception = require("../../http-exception-CKDHupKw.cjs");
|
|
4
4
|
const require_common = require("../../common-DQn8jX5T.cjs");
|
|
5
|
-
const require_workflows = require("../../workflows
|
|
5
|
+
const require_workflows = require("../../workflows-BNnfyZhn.cjs");
|
|
6
6
|
const require_agents = require("../../agents-CLv_RFQx.cjs");
|
|
7
7
|
const require_route_builder = require("../../route-builder-C8n4ugUf.cjs");
|
|
8
8
|
const require_utils = require("../../utils-CmYnjLcY.cjs");
|
|
@@ -44,6 +44,9 @@ export declare const LIST_WORKFLOWS_ROUTE: Omit<import("@mastra/core/server").Ap
|
|
|
44
44
|
metadata?: Record<string, unknown> | undefined;
|
|
45
45
|
stepGraph: {
|
|
46
46
|
type: "agent" | "conditional" | "foreach" | "loop" | "mapping" | "parallel" | "sleep" | "sleepUntil" | "step" | "tool" | "waitForEvent" | "workflow";
|
|
47
|
+
id?: string | undefined;
|
|
48
|
+
description?: string | undefined;
|
|
49
|
+
metadata?: Record<string, unknown> | undefined;
|
|
47
50
|
}[];
|
|
48
51
|
inputSchema?: string | undefined;
|
|
49
52
|
outputSchema?: string | undefined;
|
|
@@ -107,6 +110,9 @@ export declare const LIST_WORKFLOWS_ROUTE: Omit<import("@mastra/core/server").Ap
|
|
|
107
110
|
waitForEvent: "waitForEvent";
|
|
108
111
|
workflow: "workflow";
|
|
109
112
|
}>;
|
|
113
|
+
id: z.ZodOptional<z.ZodString>;
|
|
114
|
+
description: z.ZodOptional<z.ZodString>;
|
|
115
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
110
116
|
}, z.core.$strip>>;
|
|
111
117
|
inputSchema: z.ZodOptional<z.ZodString>;
|
|
112
118
|
outputSchema: z.ZodOptional<z.ZodString>;
|
|
@@ -188,6 +194,9 @@ export declare const GET_WORKFLOW_BY_ID_ROUTE: Omit<import("@mastra/core/server"
|
|
|
188
194
|
metadata?: Record<string, unknown> | undefined;
|
|
189
195
|
stepGraph: {
|
|
190
196
|
type: "agent" | "conditional" | "foreach" | "loop" | "mapping" | "parallel" | "sleep" | "sleepUntil" | "step" | "tool" | "waitForEvent" | "workflow";
|
|
197
|
+
id?: string | undefined;
|
|
198
|
+
description?: string | undefined;
|
|
199
|
+
metadata?: Record<string, unknown> | undefined;
|
|
191
200
|
}[];
|
|
192
201
|
inputSchema?: string | undefined;
|
|
193
202
|
outputSchema?: string | undefined;
|
|
@@ -251,6 +260,9 @@ export declare const GET_WORKFLOW_BY_ID_ROUTE: Omit<import("@mastra/core/server"
|
|
|
251
260
|
waitForEvent: "waitForEvent";
|
|
252
261
|
workflow: "workflow";
|
|
253
262
|
}>;
|
|
263
|
+
id: z.ZodOptional<z.ZodString>;
|
|
264
|
+
description: z.ZodOptional<z.ZodString>;
|
|
265
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
254
266
|
}, z.core.$strip>>;
|
|
255
267
|
inputSchema: z.ZodOptional<z.ZodString>;
|
|
256
268
|
outputSchema: z.ZodOptional<z.ZodString>;
|
|
@@ -367,6 +379,9 @@ export declare const GET_WORKFLOW_RUN_BY_ID_ROUTE: Omit<import("@mastra/core/ser
|
|
|
367
379
|
activeStepsPath?: Record<string, number[]> | undefined;
|
|
368
380
|
serializedStepGraph?: {
|
|
369
381
|
type: "agent" | "conditional" | "foreach" | "loop" | "mapping" | "parallel" | "sleep" | "sleepUntil" | "step" | "tool" | "waitForEvent" | "workflow";
|
|
382
|
+
id?: string | undefined;
|
|
383
|
+
description?: string | undefined;
|
|
384
|
+
metadata?: Record<string, unknown> | undefined;
|
|
370
385
|
}[] | undefined;
|
|
371
386
|
}>;
|
|
372
387
|
pathParamSchema?: z.ZodType;
|
|
@@ -428,6 +443,9 @@ export declare const GET_WORKFLOW_RUN_BY_ID_ROUTE: Omit<import("@mastra/core/ser
|
|
|
428
443
|
waitForEvent: "waitForEvent";
|
|
429
444
|
workflow: "workflow";
|
|
430
445
|
}>;
|
|
446
|
+
id: z.ZodOptional<z.ZodString>;
|
|
447
|
+
description: z.ZodOptional<z.ZodString>;
|
|
448
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
431
449
|
}, z.core.$strip>>>;
|
|
432
450
|
}, z.core.$strip>> | undefined;
|
|
433
451
|
} & {
|
|
@@ -658,6 +676,9 @@ export declare const START_ASYNC_WORKFLOW_ROUTE: Omit<import("@mastra/core/serve
|
|
|
658
676
|
activeStepsPath?: Record<string, number[]> | undefined;
|
|
659
677
|
serializedStepGraph?: {
|
|
660
678
|
type: "agent" | "conditional" | "foreach" | "loop" | "mapping" | "parallel" | "sleep" | "sleepUntil" | "step" | "tool" | "waitForEvent" | "workflow";
|
|
679
|
+
id?: string | undefined;
|
|
680
|
+
description?: string | undefined;
|
|
681
|
+
metadata?: Record<string, unknown> | undefined;
|
|
661
682
|
}[] | undefined;
|
|
662
683
|
}>;
|
|
663
684
|
pathParamSchema?: z.ZodType;
|
|
@@ -724,6 +745,9 @@ export declare const START_ASYNC_WORKFLOW_ROUTE: Omit<import("@mastra/core/serve
|
|
|
724
745
|
waitForEvent: "waitForEvent";
|
|
725
746
|
workflow: "workflow";
|
|
726
747
|
}>;
|
|
748
|
+
id: z.ZodOptional<z.ZodString>;
|
|
749
|
+
description: z.ZodOptional<z.ZodString>;
|
|
750
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
727
751
|
}, z.core.$strip>>>;
|
|
728
752
|
}, z.core.$strip>> | undefined;
|
|
729
753
|
} & {
|
|
@@ -858,6 +882,9 @@ export declare const RESUME_ASYNC_WORKFLOW_ROUTE: Omit<import("@mastra/core/serv
|
|
|
858
882
|
activeStepsPath?: Record<string, number[]> | undefined;
|
|
859
883
|
serializedStepGraph?: {
|
|
860
884
|
type: "agent" | "conditional" | "foreach" | "loop" | "mapping" | "parallel" | "sleep" | "sleepUntil" | "step" | "tool" | "waitForEvent" | "workflow";
|
|
885
|
+
id?: string | undefined;
|
|
886
|
+
description?: string | undefined;
|
|
887
|
+
metadata?: Record<string, unknown> | undefined;
|
|
861
888
|
}[] | undefined;
|
|
862
889
|
}>;
|
|
863
890
|
pathParamSchema?: z.ZodType;
|
|
@@ -924,6 +951,9 @@ export declare const RESUME_ASYNC_WORKFLOW_ROUTE: Omit<import("@mastra/core/serv
|
|
|
924
951
|
waitForEvent: "waitForEvent";
|
|
925
952
|
workflow: "workflow";
|
|
926
953
|
}>;
|
|
954
|
+
id: z.ZodOptional<z.ZodString>;
|
|
955
|
+
description: z.ZodOptional<z.ZodString>;
|
|
956
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
927
957
|
}, z.core.$strip>>>;
|
|
928
958
|
}, z.core.$strip>> | undefined;
|
|
929
959
|
} & {
|
|
@@ -1096,6 +1126,9 @@ export declare const RESTART_ASYNC_WORKFLOW_ROUTE: Omit<import("@mastra/core/ser
|
|
|
1096
1126
|
activeStepsPath?: Record<string, number[]> | undefined;
|
|
1097
1127
|
serializedStepGraph?: {
|
|
1098
1128
|
type: "agent" | "conditional" | "foreach" | "loop" | "mapping" | "parallel" | "sleep" | "sleepUntil" | "step" | "tool" | "waitForEvent" | "workflow";
|
|
1129
|
+
id?: string | undefined;
|
|
1130
|
+
description?: string | undefined;
|
|
1131
|
+
metadata?: Record<string, unknown> | undefined;
|
|
1099
1132
|
}[] | undefined;
|
|
1100
1133
|
}>;
|
|
1101
1134
|
pathParamSchema?: z.ZodType;
|
|
@@ -1158,6 +1191,9 @@ export declare const RESTART_ASYNC_WORKFLOW_ROUTE: Omit<import("@mastra/core/ser
|
|
|
1158
1191
|
waitForEvent: "waitForEvent";
|
|
1159
1192
|
workflow: "workflow";
|
|
1160
1193
|
}>;
|
|
1194
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1195
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1196
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1161
1197
|
}, z.core.$strip>>>;
|
|
1162
1198
|
}, z.core.$strip>> | undefined;
|
|
1163
1199
|
} & {
|
|
@@ -1314,6 +1350,9 @@ export declare const TIME_TRAVEL_ASYNC_WORKFLOW_ROUTE: Omit<import("@mastra/core
|
|
|
1314
1350
|
activeStepsPath?: Record<string, number[]> | undefined;
|
|
1315
1351
|
serializedStepGraph?: {
|
|
1316
1352
|
type: "agent" | "conditional" | "foreach" | "loop" | "mapping" | "parallel" | "sleep" | "sleepUntil" | "step" | "tool" | "waitForEvent" | "workflow";
|
|
1353
|
+
id?: string | undefined;
|
|
1354
|
+
description?: string | undefined;
|
|
1355
|
+
metadata?: Record<string, unknown> | undefined;
|
|
1317
1356
|
}[] | undefined;
|
|
1318
1357
|
}>;
|
|
1319
1358
|
pathParamSchema?: z.ZodType;
|
|
@@ -1383,6 +1422,9 @@ export declare const TIME_TRAVEL_ASYNC_WORKFLOW_ROUTE: Omit<import("@mastra/core
|
|
|
1383
1422
|
waitForEvent: "waitForEvent";
|
|
1384
1423
|
workflow: "workflow";
|
|
1385
1424
|
}>;
|
|
1425
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1426
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1427
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1386
1428
|
}, z.core.$strip>>>;
|
|
1387
1429
|
}, z.core.$strip>> | undefined;
|
|
1388
1430
|
} & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../../src/server/handlers/workflows.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EA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CAiDvC,CAAC;AAEH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2D/C,CAAC;AAyDH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CtC,CAAC;AA+BH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BvC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as __exportAll } from "../../rolldown-runtime-maW3aOIk.js";
|
|
2
2
|
import { t as HTTPException } from "../../http-exception-CyfxZB6W.js";
|
|
3
3
|
import { l as runIdSchema, o as optionalRunIdSchema } from "../../common-5ZZuR6wj.js";
|
|
4
|
-
import { _ as workflowRunCountsResponseSchema, a as observeWorkflowQuerySchema, b as workflowRunResultSchema, d as streamWorkflowBodySchema, f as timeTravelBodySchema, g as workflowInfoSchema, h as workflowIdPathParams, i as listWorkflowsResponseSchema, l as startAsyncWorkflowBodySchema, m as workflowExecutionResultSchema, n as createWorkflowRunResponseSchema, o as restartBodySchema, p as workflowControlResponseSchema, r as listWorkflowRunsQuerySchema, s as resumeBodySchema, t as createWorkflowRunBodySchema, v as workflowRunPathParams, x as workflowRunsResponseSchema, y as workflowRunResultQuerySchema } from "../../workflows-
|
|
4
|
+
import { _ as workflowRunCountsResponseSchema, a as observeWorkflowQuerySchema, b as workflowRunResultSchema, d as streamWorkflowBodySchema, f as timeTravelBodySchema, g as workflowInfoSchema, h as workflowIdPathParams, i as listWorkflowsResponseSchema, l as startAsyncWorkflowBodySchema, m as workflowExecutionResultSchema, n as createWorkflowRunResponseSchema, o as restartBodySchema, p as workflowControlResponseSchema, r as listWorkflowRunsQuerySchema, s as resumeBodySchema, t as createWorkflowRunBodySchema, v as workflowRunPathParams, x as workflowRunsResponseSchema, y as workflowRunResultQuerySchema } from "../../workflows-CUgR3bTL.js";
|
|
5
5
|
import { K as streamResponseSchema } from "../../agents-BetrUB_N.js";
|
|
6
6
|
import { n as createRoute } from "../../route-builder-BveLN9LU.js";
|
|
7
7
|
import { a as getWorkflowInfo, t as WorkflowRegistry } from "../../utils-B2vd77Fi.js";
|
package/dist/server/handlers.cjs
CHANGED
|
@@ -17,7 +17,7 @@ const require_server_handlers_tools = require("./handlers/tools.cjs");
|
|
|
17
17
|
const require_server_handlers_workspace = require("./handlers/workspace.cjs");
|
|
18
18
|
const require_server_handlers_vector = require("./handlers/vector.cjs");
|
|
19
19
|
const require_server_handlers_voice = require("./handlers/voice.cjs");
|
|
20
|
-
const require_dynamic_workflows = require("../dynamic-workflows-
|
|
20
|
+
const require_dynamic_workflows = require("../dynamic-workflows-DSg9_yec.cjs");
|
|
21
21
|
Object.defineProperty(exports, "a2a", {
|
|
22
22
|
enumerable: true,
|
|
23
23
|
get: function() {
|
package/dist/server/handlers.js
CHANGED
|
@@ -15,5 +15,5 @@ import { t as tools_exports } from "./handlers/tools.js";
|
|
|
15
15
|
import { t as workspace_exports } from "./handlers/workspace.js";
|
|
16
16
|
import { t as vector_exports } from "./handlers/vector.js";
|
|
17
17
|
import { t as voice_exports } from "./handlers/voice.js";
|
|
18
|
-
import { a as dynamic_workflows_exports } from "../dynamic-workflows-
|
|
18
|
+
import { a as dynamic_workflows_exports } from "../dynamic-workflows-Cn9MXevC.js";
|
|
19
19
|
export { a2a_exports as a2a, agent_builder_exports as agentBuilder, agents_exports as agents, conversations_exports as conversations, dynamic_workflows_exports as dynamicWorkflows, formatZodError, isZodError, logs_exports as logs, mcp_exports as mcp, memory_exports as memory, observability_exports as observability, plans_exports as plans, responses_exports as responses, scores_exports as scores, tools_exports as tools, vector_exports as vector, voice_exports as voice, workflows_exports as workflows, workspace_exports as workspace };
|
|
@@ -378,6 +378,11 @@ export declare const updateItemBodySchema: z.ZodObject<{
|
|
|
378
378
|
referenceId: z.ZodOptional<z.ZodString>;
|
|
379
379
|
}, z.core.$strip>>;
|
|
380
380
|
}, z.core.$strip>;
|
|
381
|
+
export declare const updateExperimentBodySchema: z.ZodObject<{
|
|
382
|
+
name: z.ZodOptional<z.ZodString>;
|
|
383
|
+
description: z.ZodOptional<z.ZodString>;
|
|
384
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
385
|
+
}, z.core.$strict>;
|
|
381
386
|
export declare const triggerExperimentBodySchema: z.ZodObject<{
|
|
382
387
|
start: z.ZodOptional<z.ZodBoolean>;
|
|
383
388
|
targetType: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datasets.d.ts","sourceRoot":"","sources":["../../../src/server/schemas/datasets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAkO3B,eAAO,MAAM,mBAAmB;;iBAE9B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;iBAEjC,CAAC;AAEH,eAAO,MAAM,gBAAgB;;iBAE3B,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;iBAG3C,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;iBAIvC,CAAC;AAEH,eAAO,MAAM,oCAAoC;;;;iBAI/C,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;iBAGrC,CAAC;AAMH,eAAO,MAAM,qBAAqB;;;iBAGhC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;iBAKrC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;iBAK/B,CAAC;AAMH,eAAO,MAAM,uBAAuB;;;;;;;;;;iBAUlC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;iBAWlC,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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BpC,CAAC;AASH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;iBAYxC,CAAC"}
|
|
@@ -41,6 +41,8 @@ export declare const dynamicWorkflowDefinitionBodySchema: z.ZodObject<{
|
|
|
41
41
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
42
42
|
}, z.core.$strip>>;
|
|
43
43
|
}, z.core.$strip>, z.ZodObject<{
|
|
44
|
+
description: z.ZodOptional<z.ZodString>;
|
|
45
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
44
46
|
type: z.ZodLiteral<"mapping">;
|
|
45
47
|
id: z.ZodString;
|
|
46
48
|
mapConfig: z.ZodString;
|
|
@@ -50,6 +52,9 @@ export declare const dynamicWorkflowDefinitionBodySchema: z.ZodObject<{
|
|
|
50
52
|
workflowId: z.ZodString;
|
|
51
53
|
description: z.ZodOptional<z.ZodString>;
|
|
52
54
|
}, z.core.$strip>, z.ZodObject<{
|
|
55
|
+
description: z.ZodOptional<z.ZodString>;
|
|
56
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
57
|
+
id: z.ZodOptional<z.ZodString>;
|
|
53
58
|
type: z.ZodLiteral<"parallel">;
|
|
54
59
|
steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
55
60
|
type: z.ZodLiteral<"agent">;
|
|
@@ -71,6 +76,8 @@ export declare const dynamicWorkflowDefinitionBodySchema: z.ZodObject<{
|
|
|
71
76
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
72
77
|
}, z.core.$strip>>;
|
|
73
78
|
}, z.core.$strip>, z.ZodObject<{
|
|
79
|
+
description: z.ZodOptional<z.ZodString>;
|
|
80
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
74
81
|
type: z.ZodLiteral<"mapping">;
|
|
75
82
|
id: z.ZodString;
|
|
76
83
|
mapConfig: z.ZodString;
|
|
@@ -81,6 +88,9 @@ export declare const dynamicWorkflowDefinitionBodySchema: z.ZodObject<{
|
|
|
81
88
|
description: z.ZodOptional<z.ZodString>;
|
|
82
89
|
}, z.core.$strip>], "type">>;
|
|
83
90
|
}, z.core.$strip>, z.ZodObject<{
|
|
91
|
+
description: z.ZodOptional<z.ZodString>;
|
|
92
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
93
|
+
id: z.ZodOptional<z.ZodString>;
|
|
84
94
|
type: z.ZodLiteral<"foreach">;
|
|
85
95
|
step: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
86
96
|
type: z.ZodLiteral<"agent">;
|
|
@@ -111,14 +121,21 @@ export declare const dynamicWorkflowDefinitionBodySchema: z.ZodObject<{
|
|
|
111
121
|
concurrency: z.ZodNumber;
|
|
112
122
|
}, z.core.$strip>>;
|
|
113
123
|
}, z.core.$strip>, z.ZodObject<{
|
|
124
|
+
description: z.ZodOptional<z.ZodString>;
|
|
125
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
114
126
|
type: z.ZodLiteral<"sleep">;
|
|
115
127
|
id: z.ZodString;
|
|
116
128
|
duration: z.ZodNumber;
|
|
117
129
|
}, z.core.$strip>, z.ZodObject<{
|
|
130
|
+
description: z.ZodOptional<z.ZodString>;
|
|
131
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
118
132
|
type: z.ZodLiteral<"sleepUntil">;
|
|
119
133
|
id: z.ZodString;
|
|
120
134
|
date: z.ZodString;
|
|
121
135
|
}, z.core.$strip>, z.ZodObject<{
|
|
136
|
+
description: z.ZodOptional<z.ZodString>;
|
|
137
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
138
|
+
id: z.ZodOptional<z.ZodString>;
|
|
122
139
|
type: z.ZodLiteral<"conditional">;
|
|
123
140
|
steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
124
141
|
type: z.ZodLiteral<"agent">;
|
|
@@ -140,6 +157,8 @@ export declare const dynamicWorkflowDefinitionBodySchema: z.ZodObject<{
|
|
|
140
157
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
141
158
|
}, z.core.$strip>>;
|
|
142
159
|
}, z.core.$strip>, z.ZodObject<{
|
|
160
|
+
description: z.ZodOptional<z.ZodString>;
|
|
161
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
143
162
|
type: z.ZodLiteral<"mapping">;
|
|
144
163
|
id: z.ZodString;
|
|
145
164
|
mapConfig: z.ZodString;
|
|
@@ -151,6 +170,9 @@ export declare const dynamicWorkflowDefinitionBodySchema: z.ZodObject<{
|
|
|
151
170
|
}, z.core.$strip>], "type">>;
|
|
152
171
|
predicates: z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
153
172
|
}, z.core.$strip>, z.ZodObject<{
|
|
173
|
+
description: z.ZodOptional<z.ZodString>;
|
|
174
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
175
|
+
id: z.ZodOptional<z.ZodString>;
|
|
154
176
|
type: z.ZodLiteral<"loop">;
|
|
155
177
|
step: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
156
178
|
type: z.ZodLiteral<"agent">;
|
|
@@ -172,6 +194,8 @@ export declare const dynamicWorkflowDefinitionBodySchema: z.ZodObject<{
|
|
|
172
194
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
173
195
|
}, z.core.$strip>>;
|
|
174
196
|
}, z.core.$strip>, z.ZodObject<{
|
|
197
|
+
description: z.ZodOptional<z.ZodString>;
|
|
198
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
175
199
|
type: z.ZodLiteral<"mapping">;
|
|
176
200
|
id: z.ZodString;
|
|
177
201
|
mapConfig: z.ZodString;
|
|
@@ -220,6 +244,8 @@ export declare const upsertDynamicWorkflowBodySchema: z.ZodObject<{
|
|
|
220
244
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
221
245
|
}, z.core.$strip>>;
|
|
222
246
|
}, z.core.$strip>, z.ZodObject<{
|
|
247
|
+
description: z.ZodOptional<z.ZodString>;
|
|
248
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
223
249
|
type: z.ZodLiteral<"mapping">;
|
|
224
250
|
id: z.ZodString;
|
|
225
251
|
mapConfig: z.ZodString;
|
|
@@ -229,6 +255,9 @@ export declare const upsertDynamicWorkflowBodySchema: z.ZodObject<{
|
|
|
229
255
|
workflowId: z.ZodString;
|
|
230
256
|
description: z.ZodOptional<z.ZodString>;
|
|
231
257
|
}, z.core.$strip>, z.ZodObject<{
|
|
258
|
+
description: z.ZodOptional<z.ZodString>;
|
|
259
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
260
|
+
id: z.ZodOptional<z.ZodString>;
|
|
232
261
|
type: z.ZodLiteral<"parallel">;
|
|
233
262
|
steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
234
263
|
type: z.ZodLiteral<"agent">;
|
|
@@ -250,6 +279,8 @@ export declare const upsertDynamicWorkflowBodySchema: z.ZodObject<{
|
|
|
250
279
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
251
280
|
}, z.core.$strip>>;
|
|
252
281
|
}, z.core.$strip>, z.ZodObject<{
|
|
282
|
+
description: z.ZodOptional<z.ZodString>;
|
|
283
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
253
284
|
type: z.ZodLiteral<"mapping">;
|
|
254
285
|
id: z.ZodString;
|
|
255
286
|
mapConfig: z.ZodString;
|
|
@@ -260,6 +291,9 @@ export declare const upsertDynamicWorkflowBodySchema: z.ZodObject<{
|
|
|
260
291
|
description: z.ZodOptional<z.ZodString>;
|
|
261
292
|
}, z.core.$strip>], "type">>;
|
|
262
293
|
}, z.core.$strip>, z.ZodObject<{
|
|
294
|
+
description: z.ZodOptional<z.ZodString>;
|
|
295
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
296
|
+
id: z.ZodOptional<z.ZodString>;
|
|
263
297
|
type: z.ZodLiteral<"foreach">;
|
|
264
298
|
step: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
265
299
|
type: z.ZodLiteral<"agent">;
|
|
@@ -290,14 +324,21 @@ export declare const upsertDynamicWorkflowBodySchema: z.ZodObject<{
|
|
|
290
324
|
concurrency: z.ZodNumber;
|
|
291
325
|
}, z.core.$strip>>;
|
|
292
326
|
}, z.core.$strip>, z.ZodObject<{
|
|
327
|
+
description: z.ZodOptional<z.ZodString>;
|
|
328
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
293
329
|
type: z.ZodLiteral<"sleep">;
|
|
294
330
|
id: z.ZodString;
|
|
295
331
|
duration: z.ZodNumber;
|
|
296
332
|
}, z.core.$strip>, z.ZodObject<{
|
|
333
|
+
description: z.ZodOptional<z.ZodString>;
|
|
334
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
297
335
|
type: z.ZodLiteral<"sleepUntil">;
|
|
298
336
|
id: z.ZodString;
|
|
299
337
|
date: z.ZodString;
|
|
300
338
|
}, z.core.$strip>, z.ZodObject<{
|
|
339
|
+
description: z.ZodOptional<z.ZodString>;
|
|
340
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
341
|
+
id: z.ZodOptional<z.ZodString>;
|
|
301
342
|
type: z.ZodLiteral<"conditional">;
|
|
302
343
|
steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
303
344
|
type: z.ZodLiteral<"agent">;
|
|
@@ -319,6 +360,8 @@ export declare const upsertDynamicWorkflowBodySchema: z.ZodObject<{
|
|
|
319
360
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
320
361
|
}, z.core.$strip>>;
|
|
321
362
|
}, z.core.$strip>, z.ZodObject<{
|
|
363
|
+
description: z.ZodOptional<z.ZodString>;
|
|
364
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
322
365
|
type: z.ZodLiteral<"mapping">;
|
|
323
366
|
id: z.ZodString;
|
|
324
367
|
mapConfig: z.ZodString;
|
|
@@ -330,6 +373,9 @@ export declare const upsertDynamicWorkflowBodySchema: z.ZodObject<{
|
|
|
330
373
|
}, z.core.$strip>], "type">>;
|
|
331
374
|
predicates: z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
332
375
|
}, z.core.$strip>, z.ZodObject<{
|
|
376
|
+
description: z.ZodOptional<z.ZodString>;
|
|
377
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
378
|
+
id: z.ZodOptional<z.ZodString>;
|
|
333
379
|
type: z.ZodLiteral<"loop">;
|
|
334
380
|
step: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
335
381
|
type: z.ZodLiteral<"agent">;
|
|
@@ -351,6 +397,8 @@ export declare const upsertDynamicWorkflowBodySchema: z.ZodObject<{
|
|
|
351
397
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
352
398
|
}, z.core.$strip>>;
|
|
353
399
|
}, z.core.$strip>, z.ZodObject<{
|
|
400
|
+
description: z.ZodOptional<z.ZodString>;
|
|
401
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
354
402
|
type: z.ZodLiteral<"mapping">;
|
|
355
403
|
id: z.ZodString;
|
|
356
404
|
mapConfig: z.ZodString;
|
|
@@ -394,6 +442,8 @@ export declare const upsertDynamicWorkflowBodySchema: z.ZodObject<{
|
|
|
394
442
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
395
443
|
}, z.core.$strip>>;
|
|
396
444
|
}, z.core.$strip>, z.ZodObject<{
|
|
445
|
+
description: z.ZodOptional<z.ZodString>;
|
|
446
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
397
447
|
type: z.ZodLiteral<"mapping">;
|
|
398
448
|
id: z.ZodString;
|
|
399
449
|
mapConfig: z.ZodString;
|
|
@@ -403,6 +453,9 @@ export declare const upsertDynamicWorkflowBodySchema: z.ZodObject<{
|
|
|
403
453
|
workflowId: z.ZodString;
|
|
404
454
|
description: z.ZodOptional<z.ZodString>;
|
|
405
455
|
}, z.core.$strip>, z.ZodObject<{
|
|
456
|
+
description: z.ZodOptional<z.ZodString>;
|
|
457
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
458
|
+
id: z.ZodOptional<z.ZodString>;
|
|
406
459
|
type: z.ZodLiteral<"parallel">;
|
|
407
460
|
steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
408
461
|
type: z.ZodLiteral<"agent">;
|
|
@@ -424,6 +477,8 @@ export declare const upsertDynamicWorkflowBodySchema: z.ZodObject<{
|
|
|
424
477
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
425
478
|
}, z.core.$strip>>;
|
|
426
479
|
}, z.core.$strip>, z.ZodObject<{
|
|
480
|
+
description: z.ZodOptional<z.ZodString>;
|
|
481
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
427
482
|
type: z.ZodLiteral<"mapping">;
|
|
428
483
|
id: z.ZodString;
|
|
429
484
|
mapConfig: z.ZodString;
|
|
@@ -434,6 +489,9 @@ export declare const upsertDynamicWorkflowBodySchema: z.ZodObject<{
|
|
|
434
489
|
description: z.ZodOptional<z.ZodString>;
|
|
435
490
|
}, z.core.$strip>], "type">>;
|
|
436
491
|
}, z.core.$strip>, z.ZodObject<{
|
|
492
|
+
description: z.ZodOptional<z.ZodString>;
|
|
493
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
494
|
+
id: z.ZodOptional<z.ZodString>;
|
|
437
495
|
type: z.ZodLiteral<"foreach">;
|
|
438
496
|
step: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
439
497
|
type: z.ZodLiteral<"agent">;
|
|
@@ -464,14 +522,21 @@ export declare const upsertDynamicWorkflowBodySchema: z.ZodObject<{
|
|
|
464
522
|
concurrency: z.ZodNumber;
|
|
465
523
|
}, z.core.$strip>>;
|
|
466
524
|
}, z.core.$strip>, z.ZodObject<{
|
|
525
|
+
description: z.ZodOptional<z.ZodString>;
|
|
526
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
467
527
|
type: z.ZodLiteral<"sleep">;
|
|
468
528
|
id: z.ZodString;
|
|
469
529
|
duration: z.ZodNumber;
|
|
470
530
|
}, z.core.$strip>, z.ZodObject<{
|
|
531
|
+
description: z.ZodOptional<z.ZodString>;
|
|
532
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
471
533
|
type: z.ZodLiteral<"sleepUntil">;
|
|
472
534
|
id: z.ZodString;
|
|
473
535
|
date: z.ZodString;
|
|
474
536
|
}, z.core.$strip>, z.ZodObject<{
|
|
537
|
+
description: z.ZodOptional<z.ZodString>;
|
|
538
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
539
|
+
id: z.ZodOptional<z.ZodString>;
|
|
475
540
|
type: z.ZodLiteral<"conditional">;
|
|
476
541
|
steps: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
477
542
|
type: z.ZodLiteral<"agent">;
|
|
@@ -493,6 +558,8 @@ export declare const upsertDynamicWorkflowBodySchema: z.ZodObject<{
|
|
|
493
558
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
494
559
|
}, z.core.$strip>>;
|
|
495
560
|
}, z.core.$strip>, z.ZodObject<{
|
|
561
|
+
description: z.ZodOptional<z.ZodString>;
|
|
562
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
496
563
|
type: z.ZodLiteral<"mapping">;
|
|
497
564
|
id: z.ZodString;
|
|
498
565
|
mapConfig: z.ZodString;
|
|
@@ -504,6 +571,9 @@ export declare const upsertDynamicWorkflowBodySchema: z.ZodObject<{
|
|
|
504
571
|
}, z.core.$strip>], "type">>;
|
|
505
572
|
predicates: z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
506
573
|
}, z.core.$strip>, z.ZodObject<{
|
|
574
|
+
description: z.ZodOptional<z.ZodString>;
|
|
575
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
576
|
+
id: z.ZodOptional<z.ZodString>;
|
|
507
577
|
type: z.ZodLiteral<"loop">;
|
|
508
578
|
step: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
509
579
|
type: z.ZodLiteral<"agent">;
|
|
@@ -525,6 +595,8 @@ export declare const upsertDynamicWorkflowBodySchema: z.ZodObject<{
|
|
|
525
595
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
526
596
|
}, z.core.$strip>>;
|
|
527
597
|
}, z.core.$strip>, z.ZodObject<{
|
|
598
|
+
description: z.ZodOptional<z.ZodString>;
|
|
599
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
528
600
|
type: z.ZodLiteral<"mapping">;
|
|
529
601
|
id: z.ZodString;
|
|
530
602
|
mapConfig: z.ZodString;
|