@mastra/server 1.70.0-alpha.3 → 1.70.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/server/handlers/error.cjs +9 -0
- package/dist/server/handlers/error.cjs.map +1 -1
- package/dist/server/handlers/error.d.ts.map +1 -1
- package/dist/server/handlers/error.js +9 -0
- package/dist/server/handlers/error.js.map +1 -1
- package/dist/server/handlers/mcp-client-versions.cjs +1 -1
- package/dist/server/handlers/mcp-client-versions.js +1 -1
- package/dist/server/handlers/prompt-block-versions.cjs +1 -1
- package/dist/server/handlers/prompt-block-versions.js +1 -1
- package/dist/server/handlers/scorer-versions.cjs +1 -1
- package/dist/server/handlers/scorer-versions.js +1 -1
- package/dist/server/handlers/stored-mcp-clients.cjs +1 -1
- package/dist/server/handlers/stored-mcp-clients.js +1 -1
- package/dist/server/handlers/stored-prompt-blocks.cjs +1 -1
- package/dist/server/handlers/stored-prompt-blocks.js +1 -1
- package/dist/server/handlers/stored-scorers.cjs +1 -1
- package/dist/server/handlers/stored-scorers.js +1 -1
- package/dist/server/handlers/stored-skill-favorites.cjs +1 -1
- package/dist/server/handlers/stored-skill-favorites.js +1 -1
- package/dist/server/handlers/stored-skills.cjs +1 -1
- package/dist/server/handlers/stored-skills.js +1 -1
- package/dist/server/schemas/index.cjs +1 -1
- package/dist/server/schemas/index.js +1 -1
- package/package.json +6 -6
package/dist/docs/SKILL.md
CHANGED
|
@@ -24,6 +24,10 @@ const WORKFLOW_RESUME_ALREADY_CLAIMED_CODE = "WORKFLOW_RESUME_ALREADY_CLAIMED";
|
|
|
24
24
|
function isWorkflowResumeAlreadyClaimedError(error) {
|
|
25
25
|
return error instanceof Error && error.id === WORKFLOW_RESUME_ALREADY_CLAIMED_CODE;
|
|
26
26
|
}
|
|
27
|
+
const FEEDBACK_REVIEW_STATUS_CONFLICT_CODE = "OBSERVABILITY_UPDATE_FEEDBACK_REVIEW_STATUS_CONFLICT";
|
|
28
|
+
function isFeedbackReviewStatusConflictError(error) {
|
|
29
|
+
return error instanceof Error && error.id === FEEDBACK_REVIEW_STATUS_CONFLICT_CODE;
|
|
30
|
+
}
|
|
27
31
|
/**
|
|
28
32
|
* Structural check for ZodError instances.
|
|
29
33
|
*
|
|
@@ -74,6 +78,11 @@ function handleError(error, defaultMessage) {
|
|
|
74
78
|
stack: error.stack,
|
|
75
79
|
cause: error
|
|
76
80
|
});
|
|
81
|
+
if (isFeedbackReviewStatusConflictError(error)) throw new require_http_exception.HTTPException(409, {
|
|
82
|
+
message: error.message,
|
|
83
|
+
stack: error.stack,
|
|
84
|
+
cause: error
|
|
85
|
+
});
|
|
77
86
|
if (isWorkflowSchemaValidationError(error)) throw new require_http_exception.HTTPException(400, {
|
|
78
87
|
message: error.message,
|
|
79
88
|
stack: error.stack,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.cjs","names":["HTTPException"],"sources":["../../../src/server/handlers/error.ts"],"sourcesContent":["import type { ZodError } from 'zod';\n\nimport { HTTPException } from '../http-exception';\nimport type { StatusCode } from '../http-exception';\nimport type { ApiError } from '../types';\n\n/**\n * Duck-typed interface for ZodError-like objects.\n * Note: Zod v4 uses PropertyKey[] (string | number | symbol) for path.\n */\nexport interface ZodErrorLike {\n issues: Array<{\n path: PropertyKey[];\n message: string;\n }>;\n}\n\n/**\n * Recognition for `ModelNotAllowedError` from `@mastra/core/agent-builder/ee`.\n *\n * Inlined as a duck check rather than imported so that `handleError` (wired\n * into every route) does not force a load-time dependency on the\n * `@mastra/core/agent-builder/ee` subpath. That subpath only ships in\n * `@mastra/core >= 1.34.0`; deploys whose bundled `@mastra/server` resolves\n * against an older core would otherwise crash at startup with\n * `ERR_MODULE_NOT_FOUND` on `@mastra/core/dist/agent-builder/ee/index.js`.\n */\nconst MODEL_NOT_ALLOWED_CODE = 'MODEL_NOT_ALLOWED';\n\ninterface ModelNotAllowedErrorLike extends Error {\n code: typeof MODEL_NOT_ALLOWED_CODE;\n allowed?: unknown;\n attempted?: unknown;\n offendingLabel?: string;\n}\n\nfunction isModelNotAllowedError(error: unknown): error is ModelNotAllowedErrorLike {\n return error instanceof Error && (error as { code?: unknown }).code === MODEL_NOT_ALLOWED_CODE;\n}\n\nconst WORKFLOW_SCHEMA_VALIDATION_FAILED_CODE = 'WORKFLOW_SCHEMA_VALIDATION_FAILED';\n\nfunction isWorkflowSchemaValidationError(error: unknown): error is Error {\n return error instanceof Error && (error as { id?: unknown }).id === WORKFLOW_SCHEMA_VALIDATION_FAILED_CODE;\n}\n\nconst WORKFLOW_RESUME_ALREADY_CLAIMED_CODE = 'WORKFLOW_RESUME_ALREADY_CLAIMED';\n\nfunction isWorkflowResumeAlreadyClaimedError(error: unknown): error is Error {\n return error instanceof Error && (error as { id?: unknown }).id === WORKFLOW_RESUME_ALREADY_CLAIMED_CODE;\n}\n\n/**\n * Structural check for ZodError instances.\n *\n * Avoids `instanceof ZodError` because consumers can resolve `'zod'` to a\n * different package instance (e.g. `zod@^3`) than the one a server adapter is\n * bundled with (`zod@^4`). In that case `instanceof` is false and validation\n * errors fall through to a generic response that drops field-path information.\n *\n * See https://github.com/mastra-ai/mastra/issues/17167.\n */\nexport function isZodError(error: unknown): error is ZodError<any> {\n return (\n !!error &&\n typeof error === 'object' &&\n (error as { name?: unknown }).name === 'ZodError' &&\n Array.isArray((error as { issues?: unknown }).issues)\n );\n}\n\n/**\n * Formats a ZodError into a structured validation error response.\n * Returns an object with an error message and an array of field-specific issues.\n */\nexport function formatZodError(\n error: ZodErrorLike,\n context: string,\n): { error: string; issues: Array<{ field: string; message: string }> } {\n const issues = error.issues.map(e => ({\n field: e.path.length > 0 ? e.path.map(p => String(p)).join('.') : 'root',\n message: e.message,\n }));\n\n return {\n error: `Invalid ${context}`,\n issues,\n };\n}\n\n// Helper to handle errors consistently\nexport function handleError(error: unknown, defaultMessage: string): never {\n if (isModelNotAllowedError(error)) {\n const body = {\n error: {\n code: error.code,\n message: error.message,\n allowed: error.allowed,\n attempted: error.attempted,\n offendingLabel: error.offendingLabel,\n },\n };\n const res = new Response(JSON.stringify(body), {\n status: 422,\n headers: { 'content-type': 'application/json' },\n });\n throw new HTTPException(422, {\n res,\n message: error.message,\n cause: error,\n });\n }\n\n // A losing concurrent resume is a conflict on run state, not a malformed request, so it maps\n // to 409 and clients can distinguish it from a 400/500 and re-read the run.\n if (isWorkflowResumeAlreadyClaimedError(error)) {\n throw new HTTPException(409, {\n message: error.message,\n stack: error.stack,\n cause: error,\n });\n }\n\n if (isWorkflowSchemaValidationError(error)) {\n throw new HTTPException(400, {\n message: error.message,\n stack: error.stack,\n cause: error,\n });\n }\n\n const apiError = error as ApiError;\n\n const apiErrorStatus = apiError.status || apiError.details?.status || 500;\n\n throw new HTTPException(apiErrorStatus as StatusCode, {\n message: apiError.message || defaultMessage,\n stack: apiError.stack,\n cause: apiError.cause,\n });\n}\n"],"mappings":";;;;;;;;;;;;;;AA2BA,MAAM,yBAAyB;AAS/B,SAAS,uBAAuB,OAAmD;CACjF,OAAO,iBAAiB,SAAU,MAA6B,SAAS;AAC1E;AAEA,MAAM,yCAAyC;AAE/C,SAAS,gCAAgC,OAAgC;CACvE,OAAO,iBAAiB,SAAU,MAA2B,OAAO;AACtE;AAEA,MAAM,uCAAuC;AAE7C,SAAS,oCAAoC,OAAgC;CAC3E,OAAO,iBAAiB,SAAU,MAA2B,OAAO;AACtE;;;;;;;;;;;AAYA,SAAgB,WAAW,OAAwC;CACjE,OACE,CAAC,CAAC,SACF,OAAO,UAAU,YAChB,MAA6B,SAAS,cACvC,MAAM,QAAS,MAA+B,MAAM;AAExD;;;;;AAMA,SAAgB,eACd,OACA,SACsE;CACtE,MAAM,SAAS,MAAM,OAAO,KAAI,OAAM;EACpC,OAAO,EAAE,KAAK,SAAS,IAAI,EAAE,KAAK,KAAI,MAAK,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI;EAClE,SAAS,EAAE;CACb,EAAE;CAEF,OAAO;EACL,OAAO,WAAW;EAClB;CACF;AACF;AAGA,SAAgB,YAAY,OAAgB,gBAA+B;CACzE,IAAI,uBAAuB,KAAK,GAAG;EACjC,MAAM,OAAO,EACX,OAAO;GACL,MAAM,MAAM;GACZ,SAAS,MAAM;GACf,SAAS,MAAM;GACf,WAAW,MAAM;GACjB,gBAAgB,MAAM;EACxB,EACF;EAKA,MAAM,IAAIA,uBAAAA,cAAc,KAAK;GAC3B,KAAA,IALc,SAAS,KAAK,UAAU,IAAI,GAAG;IAC7C,QAAQ;IACR,SAAS,EAAE,gBAAgB,mBAAmB;GAChD,CAEI;GACF,SAAS,MAAM;GACf,OAAO;EACT,CAAC;CACH;CAIA,IAAI,oCAAoC,KAAK,GAC3C,MAAM,IAAIA,uBAAAA,cAAc,KAAK;EAC3B,SAAS,MAAM;EACf,OAAO,MAAM;EACb,OAAO;CACT,CAAC;CAGH,IAAI,gCAAgC,KAAK,GACvC,MAAM,IAAIA,uBAAAA,cAAc,KAAK;EAC3B,SAAS,MAAM;EACf,OAAO,MAAM;EACb,OAAO;CACT,CAAC;CAGH,MAAM,WAAW;CAIjB,MAAM,IAAIA,uBAAAA,cAFa,SAAS,UAAU,SAAS,SAAS,UAAU,KAEhB;EACpD,SAAS,SAAS,WAAW;EAC7B,OAAO,SAAS;EAChB,OAAO,SAAS;CAClB,CAAC;AACH"}
|
|
1
|
+
{"version":3,"file":"error.cjs","names":["HTTPException"],"sources":["../../../src/server/handlers/error.ts"],"sourcesContent":["import type { ZodError } from 'zod';\n\nimport { HTTPException } from '../http-exception';\nimport type { StatusCode } from '../http-exception';\nimport type { ApiError } from '../types';\n\n/**\n * Duck-typed interface for ZodError-like objects.\n * Note: Zod v4 uses PropertyKey[] (string | number | symbol) for path.\n */\nexport interface ZodErrorLike {\n issues: Array<{\n path: PropertyKey[];\n message: string;\n }>;\n}\n\n/**\n * Recognition for `ModelNotAllowedError` from `@mastra/core/agent-builder/ee`.\n *\n * Inlined as a duck check rather than imported so that `handleError` (wired\n * into every route) does not force a load-time dependency on the\n * `@mastra/core/agent-builder/ee` subpath. That subpath only ships in\n * `@mastra/core >= 1.34.0`; deploys whose bundled `@mastra/server` resolves\n * against an older core would otherwise crash at startup with\n * `ERR_MODULE_NOT_FOUND` on `@mastra/core/dist/agent-builder/ee/index.js`.\n */\nconst MODEL_NOT_ALLOWED_CODE = 'MODEL_NOT_ALLOWED';\n\ninterface ModelNotAllowedErrorLike extends Error {\n code: typeof MODEL_NOT_ALLOWED_CODE;\n allowed?: unknown;\n attempted?: unknown;\n offendingLabel?: string;\n}\n\nfunction isModelNotAllowedError(error: unknown): error is ModelNotAllowedErrorLike {\n return error instanceof Error && (error as { code?: unknown }).code === MODEL_NOT_ALLOWED_CODE;\n}\n\nconst WORKFLOW_SCHEMA_VALIDATION_FAILED_CODE = 'WORKFLOW_SCHEMA_VALIDATION_FAILED';\n\nfunction isWorkflowSchemaValidationError(error: unknown): error is Error {\n return error instanceof Error && (error as { id?: unknown }).id === WORKFLOW_SCHEMA_VALIDATION_FAILED_CODE;\n}\n\nconst WORKFLOW_RESUME_ALREADY_CLAIMED_CODE = 'WORKFLOW_RESUME_ALREADY_CLAIMED';\n\nfunction isWorkflowResumeAlreadyClaimedError(error: unknown): error is Error {\n return error instanceof Error && (error as { id?: unknown }).id === WORKFLOW_RESUME_ALREADY_CLAIMED_CODE;\n}\n\nconst FEEDBACK_REVIEW_STATUS_CONFLICT_CODE = 'OBSERVABILITY_UPDATE_FEEDBACK_REVIEW_STATUS_CONFLICT';\n\nfunction isFeedbackReviewStatusConflictError(error: unknown): error is Error {\n return error instanceof Error && (error as { id?: unknown }).id === FEEDBACK_REVIEW_STATUS_CONFLICT_CODE;\n}\n\n/**\n * Structural check for ZodError instances.\n *\n * Avoids `instanceof ZodError` because consumers can resolve `'zod'` to a\n * different package instance (e.g. `zod@^3`) than the one a server adapter is\n * bundled with (`zod@^4`). In that case `instanceof` is false and validation\n * errors fall through to a generic response that drops field-path information.\n *\n * See https://github.com/mastra-ai/mastra/issues/17167.\n */\nexport function isZodError(error: unknown): error is ZodError<any> {\n return (\n !!error &&\n typeof error === 'object' &&\n (error as { name?: unknown }).name === 'ZodError' &&\n Array.isArray((error as { issues?: unknown }).issues)\n );\n}\n\n/**\n * Formats a ZodError into a structured validation error response.\n * Returns an object with an error message and an array of field-specific issues.\n */\nexport function formatZodError(\n error: ZodErrorLike,\n context: string,\n): { error: string; issues: Array<{ field: string; message: string }> } {\n const issues = error.issues.map(e => ({\n field: e.path.length > 0 ? e.path.map(p => String(p)).join('.') : 'root',\n message: e.message,\n }));\n\n return {\n error: `Invalid ${context}`,\n issues,\n };\n}\n\n// Helper to handle errors consistently\nexport function handleError(error: unknown, defaultMessage: string): never {\n if (isModelNotAllowedError(error)) {\n const body = {\n error: {\n code: error.code,\n message: error.message,\n allowed: error.allowed,\n attempted: error.attempted,\n offendingLabel: error.offendingLabel,\n },\n };\n const res = new Response(JSON.stringify(body), {\n status: 422,\n headers: { 'content-type': 'application/json' },\n });\n throw new HTTPException(422, {\n res,\n message: error.message,\n cause: error,\n });\n }\n\n // A losing concurrent resume is a conflict on run state, not a malformed request, so it maps\n // to 409 and clients can distinguish it from a 400/500 and re-read the run.\n if (isWorkflowResumeAlreadyClaimedError(error)) {\n throw new HTTPException(409, {\n message: error.message,\n stack: error.stack,\n cause: error,\n });\n }\n\n // The feedback row changed under a review-status update, so the caller re-reads and retries;\n // that is a conflict, not a broken store.\n if (isFeedbackReviewStatusConflictError(error)) {\n throw new HTTPException(409, {\n message: error.message,\n stack: error.stack,\n cause: error,\n });\n }\n\n if (isWorkflowSchemaValidationError(error)) {\n throw new HTTPException(400, {\n message: error.message,\n stack: error.stack,\n cause: error,\n });\n }\n\n const apiError = error as ApiError;\n\n const apiErrorStatus = apiError.status || apiError.details?.status || 500;\n\n throw new HTTPException(apiErrorStatus as StatusCode, {\n message: apiError.message || defaultMessage,\n stack: apiError.stack,\n cause: apiError.cause,\n });\n}\n"],"mappings":";;;;;;;;;;;;;;AA2BA,MAAM,yBAAyB;AAS/B,SAAS,uBAAuB,OAAmD;CACjF,OAAO,iBAAiB,SAAU,MAA6B,SAAS;AAC1E;AAEA,MAAM,yCAAyC;AAE/C,SAAS,gCAAgC,OAAgC;CACvE,OAAO,iBAAiB,SAAU,MAA2B,OAAO;AACtE;AAEA,MAAM,uCAAuC;AAE7C,SAAS,oCAAoC,OAAgC;CAC3E,OAAO,iBAAiB,SAAU,MAA2B,OAAO;AACtE;AAEA,MAAM,uCAAuC;AAE7C,SAAS,oCAAoC,OAAgC;CAC3E,OAAO,iBAAiB,SAAU,MAA2B,OAAO;AACtE;;;;;;;;;;;AAYA,SAAgB,WAAW,OAAwC;CACjE,OACE,CAAC,CAAC,SACF,OAAO,UAAU,YAChB,MAA6B,SAAS,cACvC,MAAM,QAAS,MAA+B,MAAM;AAExD;;;;;AAMA,SAAgB,eACd,OACA,SACsE;CACtE,MAAM,SAAS,MAAM,OAAO,KAAI,OAAM;EACpC,OAAO,EAAE,KAAK,SAAS,IAAI,EAAE,KAAK,KAAI,MAAK,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI;EAClE,SAAS,EAAE;CACb,EAAE;CAEF,OAAO;EACL,OAAO,WAAW;EAClB;CACF;AACF;AAGA,SAAgB,YAAY,OAAgB,gBAA+B;CACzE,IAAI,uBAAuB,KAAK,GAAG;EACjC,MAAM,OAAO,EACX,OAAO;GACL,MAAM,MAAM;GACZ,SAAS,MAAM;GACf,SAAS,MAAM;GACf,WAAW,MAAM;GACjB,gBAAgB,MAAM;EACxB,EACF;EAKA,MAAM,IAAIA,uBAAAA,cAAc,KAAK;GAC3B,KAAA,IALc,SAAS,KAAK,UAAU,IAAI,GAAG;IAC7C,QAAQ;IACR,SAAS,EAAE,gBAAgB,mBAAmB;GAChD,CAEI;GACF,SAAS,MAAM;GACf,OAAO;EACT,CAAC;CACH;CAIA,IAAI,oCAAoC,KAAK,GAC3C,MAAM,IAAIA,uBAAAA,cAAc,KAAK;EAC3B,SAAS,MAAM;EACf,OAAO,MAAM;EACb,OAAO;CACT,CAAC;CAKH,IAAI,oCAAoC,KAAK,GAC3C,MAAM,IAAIA,uBAAAA,cAAc,KAAK;EAC3B,SAAS,MAAM;EACf,OAAO,MAAM;EACb,OAAO;CACT,CAAC;CAGH,IAAI,gCAAgC,KAAK,GACvC,MAAM,IAAIA,uBAAAA,cAAc,KAAK;EAC3B,SAAS,MAAM;EACf,OAAO,MAAM;EACb,OAAO;CACT,CAAC;CAGH,MAAM,WAAW;CAIjB,MAAM,IAAIA,uBAAAA,cAFa,SAAS,UAAU,SAAS,SAAS,UAAU,KAEhB;EACpD,SAAS,SAAS,WAAW;EAC7B,OAAO,SAAS;EAChB,OAAO,SAAS;CAClB,CAAC;AACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/server/handlers/error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAMpC;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,KAAK,CAAC;QACZ,IAAI,EAAE,WAAW,EAAE,CAAC;QACpB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;CACJ;
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/server/handlers/error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAMpC;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,KAAK,CAAC;QACZ,IAAI,EAAE,WAAW,EAAE,CAAC;QACpB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;CACJ;AA2CD;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,QAAQ,CAAC,GAAG,CAAC,CAOjE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,MAAM,GACd;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAUtE;AAGD,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,GAAG,KAAK,CA2DzE"}
|
|
@@ -22,6 +22,10 @@ const WORKFLOW_RESUME_ALREADY_CLAIMED_CODE = "WORKFLOW_RESUME_ALREADY_CLAIMED";
|
|
|
22
22
|
function isWorkflowResumeAlreadyClaimedError(error) {
|
|
23
23
|
return error instanceof Error && error.id === WORKFLOW_RESUME_ALREADY_CLAIMED_CODE;
|
|
24
24
|
}
|
|
25
|
+
const FEEDBACK_REVIEW_STATUS_CONFLICT_CODE = "OBSERVABILITY_UPDATE_FEEDBACK_REVIEW_STATUS_CONFLICT";
|
|
26
|
+
function isFeedbackReviewStatusConflictError(error) {
|
|
27
|
+
return error instanceof Error && error.id === FEEDBACK_REVIEW_STATUS_CONFLICT_CODE;
|
|
28
|
+
}
|
|
25
29
|
/**
|
|
26
30
|
* Structural check for ZodError instances.
|
|
27
31
|
*
|
|
@@ -72,6 +76,11 @@ function handleError(error, defaultMessage) {
|
|
|
72
76
|
stack: error.stack,
|
|
73
77
|
cause: error
|
|
74
78
|
});
|
|
79
|
+
if (isFeedbackReviewStatusConflictError(error)) throw new HTTPException(409, {
|
|
80
|
+
message: error.message,
|
|
81
|
+
stack: error.stack,
|
|
82
|
+
cause: error
|
|
83
|
+
});
|
|
75
84
|
if (isWorkflowSchemaValidationError(error)) throw new HTTPException(400, {
|
|
76
85
|
message: error.message,
|
|
77
86
|
stack: error.stack,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","names":[],"sources":["../../../src/server/handlers/error.ts"],"sourcesContent":["import type { ZodError } from 'zod';\n\nimport { HTTPException } from '../http-exception';\nimport type { StatusCode } from '../http-exception';\nimport type { ApiError } from '../types';\n\n/**\n * Duck-typed interface for ZodError-like objects.\n * Note: Zod v4 uses PropertyKey[] (string | number | symbol) for path.\n */\nexport interface ZodErrorLike {\n issues: Array<{\n path: PropertyKey[];\n message: string;\n }>;\n}\n\n/**\n * Recognition for `ModelNotAllowedError` from `@mastra/core/agent-builder/ee`.\n *\n * Inlined as a duck check rather than imported so that `handleError` (wired\n * into every route) does not force a load-time dependency on the\n * `@mastra/core/agent-builder/ee` subpath. That subpath only ships in\n * `@mastra/core >= 1.34.0`; deploys whose bundled `@mastra/server` resolves\n * against an older core would otherwise crash at startup with\n * `ERR_MODULE_NOT_FOUND` on `@mastra/core/dist/agent-builder/ee/index.js`.\n */\nconst MODEL_NOT_ALLOWED_CODE = 'MODEL_NOT_ALLOWED';\n\ninterface ModelNotAllowedErrorLike extends Error {\n code: typeof MODEL_NOT_ALLOWED_CODE;\n allowed?: unknown;\n attempted?: unknown;\n offendingLabel?: string;\n}\n\nfunction isModelNotAllowedError(error: unknown): error is ModelNotAllowedErrorLike {\n return error instanceof Error && (error as { code?: unknown }).code === MODEL_NOT_ALLOWED_CODE;\n}\n\nconst WORKFLOW_SCHEMA_VALIDATION_FAILED_CODE = 'WORKFLOW_SCHEMA_VALIDATION_FAILED';\n\nfunction isWorkflowSchemaValidationError(error: unknown): error is Error {\n return error instanceof Error && (error as { id?: unknown }).id === WORKFLOW_SCHEMA_VALIDATION_FAILED_CODE;\n}\n\nconst WORKFLOW_RESUME_ALREADY_CLAIMED_CODE = 'WORKFLOW_RESUME_ALREADY_CLAIMED';\n\nfunction isWorkflowResumeAlreadyClaimedError(error: unknown): error is Error {\n return error instanceof Error && (error as { id?: unknown }).id === WORKFLOW_RESUME_ALREADY_CLAIMED_CODE;\n}\n\n/**\n * Structural check for ZodError instances.\n *\n * Avoids `instanceof ZodError` because consumers can resolve `'zod'` to a\n * different package instance (e.g. `zod@^3`) than the one a server adapter is\n * bundled with (`zod@^4`). In that case `instanceof` is false and validation\n * errors fall through to a generic response that drops field-path information.\n *\n * See https://github.com/mastra-ai/mastra/issues/17167.\n */\nexport function isZodError(error: unknown): error is ZodError<any> {\n return (\n !!error &&\n typeof error === 'object' &&\n (error as { name?: unknown }).name === 'ZodError' &&\n Array.isArray((error as { issues?: unknown }).issues)\n );\n}\n\n/**\n * Formats a ZodError into a structured validation error response.\n * Returns an object with an error message and an array of field-specific issues.\n */\nexport function formatZodError(\n error: ZodErrorLike,\n context: string,\n): { error: string; issues: Array<{ field: string; message: string }> } {\n const issues = error.issues.map(e => ({\n field: e.path.length > 0 ? e.path.map(p => String(p)).join('.') : 'root',\n message: e.message,\n }));\n\n return {\n error: `Invalid ${context}`,\n issues,\n };\n}\n\n// Helper to handle errors consistently\nexport function handleError(error: unknown, defaultMessage: string): never {\n if (isModelNotAllowedError(error)) {\n const body = {\n error: {\n code: error.code,\n message: error.message,\n allowed: error.allowed,\n attempted: error.attempted,\n offendingLabel: error.offendingLabel,\n },\n };\n const res = new Response(JSON.stringify(body), {\n status: 422,\n headers: { 'content-type': 'application/json' },\n });\n throw new HTTPException(422, {\n res,\n message: error.message,\n cause: error,\n });\n }\n\n // A losing concurrent resume is a conflict on run state, not a malformed request, so it maps\n // to 409 and clients can distinguish it from a 400/500 and re-read the run.\n if (isWorkflowResumeAlreadyClaimedError(error)) {\n throw new HTTPException(409, {\n message: error.message,\n stack: error.stack,\n cause: error,\n });\n }\n\n if (isWorkflowSchemaValidationError(error)) {\n throw new HTTPException(400, {\n message: error.message,\n stack: error.stack,\n cause: error,\n });\n }\n\n const apiError = error as ApiError;\n\n const apiErrorStatus = apiError.status || apiError.details?.status || 500;\n\n throw new HTTPException(apiErrorStatus as StatusCode, {\n message: apiError.message || defaultMessage,\n stack: apiError.stack,\n cause: apiError.cause,\n });\n}\n"],"mappings":";;;;;;;;;;;;AA2BA,MAAM,yBAAyB;AAS/B,SAAS,uBAAuB,OAAmD;CACjF,OAAO,iBAAiB,SAAU,MAA6B,SAAS;AAC1E;AAEA,MAAM,yCAAyC;AAE/C,SAAS,gCAAgC,OAAgC;CACvE,OAAO,iBAAiB,SAAU,MAA2B,OAAO;AACtE;AAEA,MAAM,uCAAuC;AAE7C,SAAS,oCAAoC,OAAgC;CAC3E,OAAO,iBAAiB,SAAU,MAA2B,OAAO;AACtE;;;;;;;;;;;AAYA,SAAgB,WAAW,OAAwC;CACjE,OACE,CAAC,CAAC,SACF,OAAO,UAAU,YAChB,MAA6B,SAAS,cACvC,MAAM,QAAS,MAA+B,MAAM;AAExD;;;;;AAMA,SAAgB,eACd,OACA,SACsE;CACtE,MAAM,SAAS,MAAM,OAAO,KAAI,OAAM;EACpC,OAAO,EAAE,KAAK,SAAS,IAAI,EAAE,KAAK,KAAI,MAAK,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI;EAClE,SAAS,EAAE;CACb,EAAE;CAEF,OAAO;EACL,OAAO,WAAW;EAClB;CACF;AACF;AAGA,SAAgB,YAAY,OAAgB,gBAA+B;CACzE,IAAI,uBAAuB,KAAK,GAAG;EACjC,MAAM,OAAO,EACX,OAAO;GACL,MAAM,MAAM;GACZ,SAAS,MAAM;GACf,SAAS,MAAM;GACf,WAAW,MAAM;GACjB,gBAAgB,MAAM;EACxB,EACF;EAKA,MAAM,IAAI,cAAc,KAAK;GAC3B,KAAA,IALc,SAAS,KAAK,UAAU,IAAI,GAAG;IAC7C,QAAQ;IACR,SAAS,EAAE,gBAAgB,mBAAmB;GAChD,CAEI;GACF,SAAS,MAAM;GACf,OAAO;EACT,CAAC;CACH;CAIA,IAAI,oCAAoC,KAAK,GAC3C,MAAM,IAAI,cAAc,KAAK;EAC3B,SAAS,MAAM;EACf,OAAO,MAAM;EACb,OAAO;CACT,CAAC;CAGH,IAAI,gCAAgC,KAAK,GACvC,MAAM,IAAI,cAAc,KAAK;EAC3B,SAAS,MAAM;EACf,OAAO,MAAM;EACb,OAAO;CACT,CAAC;CAGH,MAAM,WAAW;CAIjB,MAAM,IAAI,cAFa,SAAS,UAAU,SAAS,SAAS,UAAU,KAEhB;EACpD,SAAS,SAAS,WAAW;EAC7B,OAAO,SAAS;EAChB,OAAO,SAAS;CAClB,CAAC;AACH"}
|
|
1
|
+
{"version":3,"file":"error.js","names":[],"sources":["../../../src/server/handlers/error.ts"],"sourcesContent":["import type { ZodError } from 'zod';\n\nimport { HTTPException } from '../http-exception';\nimport type { StatusCode } from '../http-exception';\nimport type { ApiError } from '../types';\n\n/**\n * Duck-typed interface for ZodError-like objects.\n * Note: Zod v4 uses PropertyKey[] (string | number | symbol) for path.\n */\nexport interface ZodErrorLike {\n issues: Array<{\n path: PropertyKey[];\n message: string;\n }>;\n}\n\n/**\n * Recognition for `ModelNotAllowedError` from `@mastra/core/agent-builder/ee`.\n *\n * Inlined as a duck check rather than imported so that `handleError` (wired\n * into every route) does not force a load-time dependency on the\n * `@mastra/core/agent-builder/ee` subpath. That subpath only ships in\n * `@mastra/core >= 1.34.0`; deploys whose bundled `@mastra/server` resolves\n * against an older core would otherwise crash at startup with\n * `ERR_MODULE_NOT_FOUND` on `@mastra/core/dist/agent-builder/ee/index.js`.\n */\nconst MODEL_NOT_ALLOWED_CODE = 'MODEL_NOT_ALLOWED';\n\ninterface ModelNotAllowedErrorLike extends Error {\n code: typeof MODEL_NOT_ALLOWED_CODE;\n allowed?: unknown;\n attempted?: unknown;\n offendingLabel?: string;\n}\n\nfunction isModelNotAllowedError(error: unknown): error is ModelNotAllowedErrorLike {\n return error instanceof Error && (error as { code?: unknown }).code === MODEL_NOT_ALLOWED_CODE;\n}\n\nconst WORKFLOW_SCHEMA_VALIDATION_FAILED_CODE = 'WORKFLOW_SCHEMA_VALIDATION_FAILED';\n\nfunction isWorkflowSchemaValidationError(error: unknown): error is Error {\n return error instanceof Error && (error as { id?: unknown }).id === WORKFLOW_SCHEMA_VALIDATION_FAILED_CODE;\n}\n\nconst WORKFLOW_RESUME_ALREADY_CLAIMED_CODE = 'WORKFLOW_RESUME_ALREADY_CLAIMED';\n\nfunction isWorkflowResumeAlreadyClaimedError(error: unknown): error is Error {\n return error instanceof Error && (error as { id?: unknown }).id === WORKFLOW_RESUME_ALREADY_CLAIMED_CODE;\n}\n\nconst FEEDBACK_REVIEW_STATUS_CONFLICT_CODE = 'OBSERVABILITY_UPDATE_FEEDBACK_REVIEW_STATUS_CONFLICT';\n\nfunction isFeedbackReviewStatusConflictError(error: unknown): error is Error {\n return error instanceof Error && (error as { id?: unknown }).id === FEEDBACK_REVIEW_STATUS_CONFLICT_CODE;\n}\n\n/**\n * Structural check for ZodError instances.\n *\n * Avoids `instanceof ZodError` because consumers can resolve `'zod'` to a\n * different package instance (e.g. `zod@^3`) than the one a server adapter is\n * bundled with (`zod@^4`). In that case `instanceof` is false and validation\n * errors fall through to a generic response that drops field-path information.\n *\n * See https://github.com/mastra-ai/mastra/issues/17167.\n */\nexport function isZodError(error: unknown): error is ZodError<any> {\n return (\n !!error &&\n typeof error === 'object' &&\n (error as { name?: unknown }).name === 'ZodError' &&\n Array.isArray((error as { issues?: unknown }).issues)\n );\n}\n\n/**\n * Formats a ZodError into a structured validation error response.\n * Returns an object with an error message and an array of field-specific issues.\n */\nexport function formatZodError(\n error: ZodErrorLike,\n context: string,\n): { error: string; issues: Array<{ field: string; message: string }> } {\n const issues = error.issues.map(e => ({\n field: e.path.length > 0 ? e.path.map(p => String(p)).join('.') : 'root',\n message: e.message,\n }));\n\n return {\n error: `Invalid ${context}`,\n issues,\n };\n}\n\n// Helper to handle errors consistently\nexport function handleError(error: unknown, defaultMessage: string): never {\n if (isModelNotAllowedError(error)) {\n const body = {\n error: {\n code: error.code,\n message: error.message,\n allowed: error.allowed,\n attempted: error.attempted,\n offendingLabel: error.offendingLabel,\n },\n };\n const res = new Response(JSON.stringify(body), {\n status: 422,\n headers: { 'content-type': 'application/json' },\n });\n throw new HTTPException(422, {\n res,\n message: error.message,\n cause: error,\n });\n }\n\n // A losing concurrent resume is a conflict on run state, not a malformed request, so it maps\n // to 409 and clients can distinguish it from a 400/500 and re-read the run.\n if (isWorkflowResumeAlreadyClaimedError(error)) {\n throw new HTTPException(409, {\n message: error.message,\n stack: error.stack,\n cause: error,\n });\n }\n\n // The feedback row changed under a review-status update, so the caller re-reads and retries;\n // that is a conflict, not a broken store.\n if (isFeedbackReviewStatusConflictError(error)) {\n throw new HTTPException(409, {\n message: error.message,\n stack: error.stack,\n cause: error,\n });\n }\n\n if (isWorkflowSchemaValidationError(error)) {\n throw new HTTPException(400, {\n message: error.message,\n stack: error.stack,\n cause: error,\n });\n }\n\n const apiError = error as ApiError;\n\n const apiErrorStatus = apiError.status || apiError.details?.status || 500;\n\n throw new HTTPException(apiErrorStatus as StatusCode, {\n message: apiError.message || defaultMessage,\n stack: apiError.stack,\n cause: apiError.cause,\n });\n}\n"],"mappings":";;;;;;;;;;;;AA2BA,MAAM,yBAAyB;AAS/B,SAAS,uBAAuB,OAAmD;CACjF,OAAO,iBAAiB,SAAU,MAA6B,SAAS;AAC1E;AAEA,MAAM,yCAAyC;AAE/C,SAAS,gCAAgC,OAAgC;CACvE,OAAO,iBAAiB,SAAU,MAA2B,OAAO;AACtE;AAEA,MAAM,uCAAuC;AAE7C,SAAS,oCAAoC,OAAgC;CAC3E,OAAO,iBAAiB,SAAU,MAA2B,OAAO;AACtE;AAEA,MAAM,uCAAuC;AAE7C,SAAS,oCAAoC,OAAgC;CAC3E,OAAO,iBAAiB,SAAU,MAA2B,OAAO;AACtE;;;;;;;;;;;AAYA,SAAgB,WAAW,OAAwC;CACjE,OACE,CAAC,CAAC,SACF,OAAO,UAAU,YAChB,MAA6B,SAAS,cACvC,MAAM,QAAS,MAA+B,MAAM;AAExD;;;;;AAMA,SAAgB,eACd,OACA,SACsE;CACtE,MAAM,SAAS,MAAM,OAAO,KAAI,OAAM;EACpC,OAAO,EAAE,KAAK,SAAS,IAAI,EAAE,KAAK,KAAI,MAAK,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI;EAClE,SAAS,EAAE;CACb,EAAE;CAEF,OAAO;EACL,OAAO,WAAW;EAClB;CACF;AACF;AAGA,SAAgB,YAAY,OAAgB,gBAA+B;CACzE,IAAI,uBAAuB,KAAK,GAAG;EACjC,MAAM,OAAO,EACX,OAAO;GACL,MAAM,MAAM;GACZ,SAAS,MAAM;GACf,SAAS,MAAM;GACf,WAAW,MAAM;GACjB,gBAAgB,MAAM;EACxB,EACF;EAKA,MAAM,IAAI,cAAc,KAAK;GAC3B,KAAA,IALc,SAAS,KAAK,UAAU,IAAI,GAAG;IAC7C,QAAQ;IACR,SAAS,EAAE,gBAAgB,mBAAmB;GAChD,CAEI;GACF,SAAS,MAAM;GACf,OAAO;EACT,CAAC;CACH;CAIA,IAAI,oCAAoC,KAAK,GAC3C,MAAM,IAAI,cAAc,KAAK;EAC3B,SAAS,MAAM;EACf,OAAO,MAAM;EACb,OAAO;CACT,CAAC;CAKH,IAAI,oCAAoC,KAAK,GAC3C,MAAM,IAAI,cAAc,KAAK;EAC3B,SAAS,MAAM;EACf,OAAO,MAAM;EACb,OAAO;CACT,CAAC;CAGH,IAAI,gCAAgC,KAAK,GACvC,MAAM,IAAI,cAAc,KAAK;EAC3B,SAAS,MAAM;EACf,OAAO,MAAM;EACb,OAAO;CACT,CAAC;CAGH,MAAM,WAAW;CAIjB,MAAM,IAAI,cAFa,SAAS,UAAU,SAAS,SAAS,UAAU,KAEhB;EACpD,SAAS,SAAS,WAAW;EAC7B,OAAO,SAAS;EAChB,OAAO,SAAS;CAClB,CAAC;AACH"}
|
|
@@ -4,8 +4,8 @@ const require_http_exception = require("../../http-exception-CKDHupKw.cjs");
|
|
|
4
4
|
const require_route_builder = require("../../route-builder-2yrD15TL.cjs");
|
|
5
5
|
const require_utils = require("../../utils-DFQixxkO.cjs");
|
|
6
6
|
const require_server_handlers_error = require("./error.cjs");
|
|
7
|
-
const require_server_handlers_version_helpers = require("./version-helpers.cjs");
|
|
8
7
|
const require_mcp_client_versions = require("../../mcp-client-versions-Zkez3ruO.cjs");
|
|
8
|
+
const require_server_handlers_version_helpers = require("./version-helpers.cjs");
|
|
9
9
|
//#region src/server/handlers/mcp-client-versions.ts
|
|
10
10
|
/**
|
|
11
11
|
* GET /stored/mcp-clients/:mcpClientId/versions - List all versions for an MCP client
|
|
@@ -2,8 +2,8 @@ import { t as HTTPException } from "../../http-exception-CyfxZB6W.js";
|
|
|
2
2
|
import { n as createRoute } from "../../route-builder-lBil8Cvo.js";
|
|
3
3
|
import { i as getStoredResourceScope, n as assertStoredResourceScope } from "../../utils-BJm0ZYnM.js";
|
|
4
4
|
import { handleError } from "./error.js";
|
|
5
|
-
import { MCP_CLIENT_SNAPSHOT_CONFIG_FIELDS, calculateChangedFields, computeVersionDiffs, createVersionWithRetry, enforceRetentionLimit, extractConfigFromVersion } from "./version-helpers.js";
|
|
6
5
|
import { a as createMCPClientVersionResponseSchema, c as listMCPClientVersionsQuerySchema, d as mcpClientVersionPathParams, i as createMCPClientVersionBodySchema, l as listMCPClientVersionsResponseSchema, n as compareMCPClientVersionsQuerySchema, o as deleteMCPClientVersionResponseSchema, p as restoreMCPClientVersionResponseSchema, r as compareMCPClientVersionsResponseSchema, s as getMCPClientVersionResponseSchema, t as activateMCPClientVersionResponseSchema, u as mcpClientVersionIdPathParams } from "../../mcp-client-versions-Df5bgWm1.js";
|
|
6
|
+
import { MCP_CLIENT_SNAPSHOT_CONFIG_FIELDS, calculateChangedFields, computeVersionDiffs, createVersionWithRetry, enforceRetentionLimit, extractConfigFromVersion } from "./version-helpers.js";
|
|
7
7
|
//#region src/server/handlers/mcp-client-versions.ts
|
|
8
8
|
/**
|
|
9
9
|
* GET /stored/mcp-clients/:mcpClientId/versions - List all versions for an MCP client
|
|
@@ -4,8 +4,8 @@ const require_http_exception = require("../../http-exception-CKDHupKw.cjs");
|
|
|
4
4
|
const require_route_builder = require("../../route-builder-2yrD15TL.cjs");
|
|
5
5
|
const require_utils = require("../../utils-DFQixxkO.cjs");
|
|
6
6
|
const require_server_handlers_error = require("./error.cjs");
|
|
7
|
-
const require_server_handlers_version_helpers = require("./version-helpers.cjs");
|
|
8
7
|
const require_prompt_block_versions = require("../../prompt-block-versions-D9IPtjxs.cjs");
|
|
8
|
+
const require_server_handlers_version_helpers = require("./version-helpers.cjs");
|
|
9
9
|
//#region src/server/handlers/prompt-block-versions.ts
|
|
10
10
|
const SNAPSHOT_CONFIG_FIELDS = [
|
|
11
11
|
"name",
|
|
@@ -2,8 +2,8 @@ import { t as HTTPException } from "../../http-exception-CyfxZB6W.js";
|
|
|
2
2
|
import { n as createRoute } from "../../route-builder-lBil8Cvo.js";
|
|
3
3
|
import { i as getStoredResourceScope, n as assertStoredResourceScope } from "../../utils-BJm0ZYnM.js";
|
|
4
4
|
import { handleError } from "./error.js";
|
|
5
|
-
import { calculateChangedFields, computeVersionDiffs, createVersionWithRetry, enforceRetentionLimit, extractConfigFromVersion } from "./version-helpers.js";
|
|
6
5
|
import { a as createPromptBlockVersionResponseSchema, c as listPromptBlockVersionsQuerySchema, d as promptBlockVersionPathParams, i as createPromptBlockVersionBodySchema, l as listPromptBlockVersionsResponseSchema, n as comparePromptBlockVersionsQuerySchema, o as deletePromptBlockVersionResponseSchema, p as restorePromptBlockVersionResponseSchema, r as comparePromptBlockVersionsResponseSchema, s as getPromptBlockVersionResponseSchema, t as activatePromptBlockVersionResponseSchema, u as promptBlockVersionIdPathParams } from "../../prompt-block-versions-D3Ds9pXt.js";
|
|
6
|
+
import { calculateChangedFields, computeVersionDiffs, createVersionWithRetry, enforceRetentionLimit, extractConfigFromVersion } from "./version-helpers.js";
|
|
7
7
|
//#region src/server/handlers/prompt-block-versions.ts
|
|
8
8
|
const SNAPSHOT_CONFIG_FIELDS = [
|
|
9
9
|
"name",
|
|
@@ -4,8 +4,8 @@ const require_http_exception = require("../../http-exception-CKDHupKw.cjs");
|
|
|
4
4
|
const require_route_builder = require("../../route-builder-2yrD15TL.cjs");
|
|
5
5
|
const require_utils = require("../../utils-DFQixxkO.cjs");
|
|
6
6
|
const require_server_handlers_error = require("./error.cjs");
|
|
7
|
-
const require_server_handlers_version_helpers = require("./version-helpers.cjs");
|
|
8
7
|
const require_scorer_versions = require("../../scorer-versions-K5H3xinO.cjs");
|
|
8
|
+
const require_server_handlers_version_helpers = require("./version-helpers.cjs");
|
|
9
9
|
//#region src/server/handlers/scorer-versions.ts
|
|
10
10
|
const SNAPSHOT_CONFIG_FIELDS = [
|
|
11
11
|
"name",
|
|
@@ -2,8 +2,8 @@ import { t as HTTPException } from "../../http-exception-CyfxZB6W.js";
|
|
|
2
2
|
import { n as createRoute } from "../../route-builder-lBil8Cvo.js";
|
|
3
3
|
import { i as getStoredResourceScope, n as assertStoredResourceScope } from "../../utils-BJm0ZYnM.js";
|
|
4
4
|
import { handleError } from "./error.js";
|
|
5
|
-
import { calculateChangedFields, computeVersionDiffs, createVersionWithRetry, enforceRetentionLimit, extractConfigFromVersion } from "./version-helpers.js";
|
|
6
5
|
import { a as createScorerVersionResponseSchema, c as listScorerVersionsQuerySchema, d as scorerVersionIdPathParams, f as scorerVersionPathParams, i as createScorerVersionBodySchema, l as listScorerVersionsResponseSchema, n as compareScorerVersionsQuerySchema, o as deleteScorerVersionResponseSchema, r as compareScorerVersionsResponseSchema, s as getScorerVersionResponseSchema, t as activateScorerVersionResponseSchema, u as restoreScorerVersionResponseSchema } from "../../scorer-versions-8-YMrgNx.js";
|
|
6
|
+
import { calculateChangedFields, computeVersionDiffs, createVersionWithRetry, enforceRetentionLimit, extractConfigFromVersion } from "./version-helpers.js";
|
|
7
7
|
//#region src/server/handlers/scorer-versions.ts
|
|
8
8
|
const SNAPSHOT_CONFIG_FIELDS = [
|
|
9
9
|
"name",
|
|
@@ -5,8 +5,8 @@ const require_common = require("../../common-BkgcoK-2.cjs");
|
|
|
5
5
|
const require_route_builder = require("../../route-builder-2yrD15TL.cjs");
|
|
6
6
|
const require_utils = require("../../utils-DFQixxkO.cjs");
|
|
7
7
|
const require_server_handlers_error = require("./error.cjs");
|
|
8
|
-
const require_server_handlers_version_helpers = require("./version-helpers.cjs");
|
|
9
8
|
const require_stored_mcp_clients = require("../../stored-mcp-clients-Sb1QjyP-.cjs");
|
|
9
|
+
const require_server_handlers_version_helpers = require("./version-helpers.cjs");
|
|
10
10
|
//#region src/server/handlers/stored-mcp-clients.ts
|
|
11
11
|
/**
|
|
12
12
|
* GET /stored/mcp-clients - List all stored MCP clients
|
|
@@ -3,8 +3,8 @@ import { d as statusQuerySchema } from "../../common-tSamNYpt.js";
|
|
|
3
3
|
import { n as createRoute } from "../../route-builder-lBil8Cvo.js";
|
|
4
4
|
import { c as toSlug, i as getStoredResourceScope, n as assertStoredResourceScope, s as scopeStoredResourceMetadata } from "../../utils-BJm0ZYnM.js";
|
|
5
5
|
import { handleError } from "./error.js";
|
|
6
|
-
import { MCP_CLIENT_SNAPSHOT_CONFIG_FIELDS, handleAutoVersioning } from "./version-helpers.js";
|
|
7
6
|
import { a as listStoredMCPClientsQuerySchema, i as getStoredMCPClientResponseSchema, l as updateStoredMCPClientBodySchema, n as createStoredMCPClientResponseSchema, o as listStoredMCPClientsResponseSchema, r as deleteStoredMCPClientResponseSchema, s as storedMCPClientIdPathParams, t as createStoredMCPClientBodySchema, u as updateStoredMCPClientResponseSchema } from "../../stored-mcp-clients-BRa_eINm.js";
|
|
7
|
+
import { MCP_CLIENT_SNAPSHOT_CONFIG_FIELDS, handleAutoVersioning } from "./version-helpers.js";
|
|
8
8
|
//#region src/server/handlers/stored-mcp-clients.ts
|
|
9
9
|
/**
|
|
10
10
|
* GET /stored/mcp-clients - List all stored MCP clients
|
|
@@ -5,8 +5,8 @@ const require_common = require("../../common-BkgcoK-2.cjs");
|
|
|
5
5
|
const require_route_builder = require("../../route-builder-2yrD15TL.cjs");
|
|
6
6
|
const require_utils = require("../../utils-DFQixxkO.cjs");
|
|
7
7
|
const require_server_handlers_error = require("./error.cjs");
|
|
8
|
-
const require_server_handlers_version_helpers = require("./version-helpers.cjs");
|
|
9
8
|
const require_stored_prompt_blocks = require("../../stored-prompt-blocks-CNvL1cde.cjs");
|
|
9
|
+
const require_server_handlers_version_helpers = require("./version-helpers.cjs");
|
|
10
10
|
//#region src/server/handlers/stored-prompt-blocks.ts
|
|
11
11
|
const PROMPT_BLOCK_SNAPSHOT_CONFIG_FIELDS = [
|
|
12
12
|
"name",
|
|
@@ -3,8 +3,8 @@ import { d as statusQuerySchema } from "../../common-tSamNYpt.js";
|
|
|
3
3
|
import { n as createRoute } from "../../route-builder-lBil8Cvo.js";
|
|
4
4
|
import { c as toSlug, i as getStoredResourceScope, n as assertStoredResourceScope, s as scopeStoredResourceMetadata } from "../../utils-BJm0ZYnM.js";
|
|
5
5
|
import { handleError } from "./error.js";
|
|
6
|
-
import { handleAutoVersioning } from "./version-helpers.js";
|
|
7
6
|
import { a as listStoredPromptBlocksQuerySchema, i as getStoredPromptBlockResponseSchema, l as updateStoredPromptBlockBodySchema, n as createStoredPromptBlockResponseSchema, o as listStoredPromptBlocksResponseSchema, r as deleteStoredPromptBlockResponseSchema, s as storedPromptBlockIdPathParams, t as createStoredPromptBlockBodySchema, u as updateStoredPromptBlockResponseSchema } from "../../stored-prompt-blocks-C0cMS4_F.js";
|
|
7
|
+
import { handleAutoVersioning } from "./version-helpers.js";
|
|
8
8
|
//#region src/server/handlers/stored-prompt-blocks.ts
|
|
9
9
|
const PROMPT_BLOCK_SNAPSHOT_CONFIG_FIELDS = [
|
|
10
10
|
"name",
|
|
@@ -5,8 +5,8 @@ const require_common = require("../../common-BkgcoK-2.cjs");
|
|
|
5
5
|
const require_route_builder = require("../../route-builder-2yrD15TL.cjs");
|
|
6
6
|
const require_utils = require("../../utils-DFQixxkO.cjs");
|
|
7
7
|
const require_server_handlers_error = require("./error.cjs");
|
|
8
|
-
const require_server_handlers_version_helpers = require("./version-helpers.cjs");
|
|
9
8
|
const require_stored_scorers = require("../../stored-scorers-DBor7on7.cjs");
|
|
9
|
+
const require_server_handlers_version_helpers = require("./version-helpers.cjs");
|
|
10
10
|
//#region src/server/handlers/stored-scorers.ts
|
|
11
11
|
const SCORER_SNAPSHOT_CONFIG_FIELDS = [
|
|
12
12
|
"name",
|
|
@@ -3,8 +3,8 @@ import { d as statusQuerySchema } from "../../common-tSamNYpt.js";
|
|
|
3
3
|
import { n as createRoute } from "../../route-builder-lBil8Cvo.js";
|
|
4
4
|
import { c as toSlug, i as getStoredResourceScope, n as assertStoredResourceScope, s as scopeStoredResourceMetadata } from "../../utils-BJm0ZYnM.js";
|
|
5
5
|
import { handleError } from "./error.js";
|
|
6
|
-
import { handleAutoVersioning } from "./version-helpers.js";
|
|
7
6
|
import { a as listStoredScorersQuerySchema, i as getStoredScorerResponseSchema, l as updateStoredScorerBodySchema, n as createStoredScorerResponseSchema, o as listStoredScorersResponseSchema, r as deleteStoredScorerResponseSchema, s as storedScorerIdPathParams, t as createStoredScorerBodySchema, u as updateStoredScorerResponseSchema } from "../../stored-scorers-DLYUKdcQ.js";
|
|
7
|
+
import { handleAutoVersioning } from "./version-helpers.js";
|
|
8
8
|
//#region src/server/handlers/stored-scorers.ts
|
|
9
9
|
const SCORER_SNAPSHOT_CONFIG_FIELDS = [
|
|
10
10
|
"name",
|
|
@@ -5,9 +5,9 @@ const require_route_builder = require("../../route-builder-2yrD15TL.cjs");
|
|
|
5
5
|
const require_utils = require("../../utils-DFQixxkO.cjs");
|
|
6
6
|
const require_server_handlers_error = require("./error.cjs");
|
|
7
7
|
const require_server_handlers_authorship = require("./authorship.cjs");
|
|
8
|
+
const require_stored_skills = require("../../stored-skills-DizSy0Pb.cjs");
|
|
8
9
|
const require_editor_builder = require("../../editor-builder-BLW-4Sbg.cjs");
|
|
9
10
|
const require_favorites = require("../../favorites-D1-AzGsK.cjs");
|
|
10
|
-
const require_stored_skills = require("../../stored-skills-DizSy0Pb.cjs");
|
|
11
11
|
//#region src/server/handlers/stored-skill-favorites.ts
|
|
12
12
|
/**
|
|
13
13
|
* Resolves the storage and favorites domains, throwing 500 if unavailable.
|
|
@@ -3,9 +3,9 @@ import { n as createRoute } from "../../route-builder-lBil8Cvo.js";
|
|
|
3
3
|
import { i as getStoredResourceScope, n as assertStoredResourceScope } from "../../utils-BJm0ZYnM.js";
|
|
4
4
|
import { handleError } from "./error.js";
|
|
5
5
|
import { assertReadAccess, getCallerAuthorId } from "./authorship.js";
|
|
6
|
+
import { p as storedSkillIdPathParams } from "../../stored-skills-BSwEeGJ9.js";
|
|
6
7
|
import { a as requireBuilderFeature } from "../../editor-builder-hB7crH1A.js";
|
|
7
8
|
import { t as favoriteToggleResponseSchema } from "../../favorites-DWDyKxts.js";
|
|
8
|
-
import { p as storedSkillIdPathParams } from "../../stored-skills-BSwEeGJ9.js";
|
|
9
9
|
//#region src/server/handlers/stored-skill-favorites.ts
|
|
10
10
|
/**
|
|
11
11
|
* Resolves the storage and favorites domains, throwing 500 if unavailable.
|
|
@@ -5,9 +5,9 @@ const require_route_builder = require("../../route-builder-2yrD15TL.cjs");
|
|
|
5
5
|
const require_utils = require("../../utils-DFQixxkO.cjs");
|
|
6
6
|
const require_server_handlers_error = require("./error.cjs");
|
|
7
7
|
const require_server_handlers_authorship = require("./authorship.cjs");
|
|
8
|
+
const require_stored_skills = require("../../stored-skills-DizSy0Pb.cjs");
|
|
8
9
|
const require_editor_builder = require("../../editor-builder-BLW-4Sbg.cjs");
|
|
9
10
|
const require_server_handlers_favorites_enrichment = require("./favorites-enrichment.cjs");
|
|
10
|
-
const require_stored_skills = require("../../stored-skills-DizSy0Pb.cjs");
|
|
11
11
|
let _mastra_core_workspace = require("@mastra/core/workspace");
|
|
12
12
|
//#region src/server/handlers/stored-skills.ts
|
|
13
13
|
/**
|
|
@@ -3,9 +3,9 @@ import { n as createRoute } from "../../route-builder-lBil8Cvo.js";
|
|
|
3
3
|
import { c as toSlug, i as getStoredResourceScope, n as assertStoredResourceScope, s as scopeStoredResourceMetadata } from "../../utils-BJm0ZYnM.js";
|
|
4
4
|
import { handleError } from "./error.js";
|
|
5
5
|
import { assertReadAccess, assertWriteAccess, getCallerAuthorId, matchesAuthorFilter, resolveAuthorFilter } from "./authorship.js";
|
|
6
|
+
import { a as deleteStoredSkillResponseSchema, c as listStoredSkillsResponseSchema, g as updateStoredSkillResponseSchema, h as updateStoredSkillBodySchema, i as createStoredSkillResponseSchema, l as publishStoredSkillBodySchema, o as getStoredSkillResponseSchema, p as storedSkillIdPathParams, r as createStoredSkillBodySchema, s as listStoredSkillsQuerySchema, u as publishStoredSkillResponseSchema } from "../../stored-skills-BSwEeGJ9.js";
|
|
6
7
|
import { i as isBuilderFeatureEnabled } from "../../editor-builder-hB7crH1A.js";
|
|
7
8
|
import { enrichOrStripFavorites, prepareFavoritesEnrichment, stripFavoriteFields } from "./favorites-enrichment.js";
|
|
8
|
-
import { a as deleteStoredSkillResponseSchema, c as listStoredSkillsResponseSchema, g as updateStoredSkillResponseSchema, h as updateStoredSkillBodySchema, i as createStoredSkillResponseSchema, l as publishStoredSkillBodySchema, o as getStoredSkillResponseSchema, p as storedSkillIdPathParams, r as createStoredSkillBodySchema, s as listStoredSkillsQuerySchema, u as publishStoredSkillResponseSchema } from "../../stored-skills-BSwEeGJ9.js";
|
|
9
9
|
import { LocalSkillSource } from "@mastra/core/workspace";
|
|
10
10
|
//#region src/server/handlers/stored-skills.ts
|
|
11
11
|
/**
|
|
@@ -26,7 +26,6 @@ const require_datasets = require("../../datasets-Bz7SKu-q.cjs");
|
|
|
26
26
|
const require_editor_builder = require("../../editor-builder-DVuvlXR2.cjs");
|
|
27
27
|
const require_mcp_client_versions = require("../../mcp-client-versions-Zkez3ruO.cjs");
|
|
28
28
|
const require_processor_providers = require("../../processor-providers-DHvTA9AL.cjs");
|
|
29
|
-
const require_processors = require("../../processors-D6lRjS0e.cjs");
|
|
30
29
|
const require_prompt_block_versions = require("../../prompt-block-versions-D9IPtjxs.cjs");
|
|
31
30
|
const require_scorer_versions = require("../../scorer-versions-K5H3xinO.cjs");
|
|
32
31
|
const require_stored_mcp_clients = require("../../stored-mcp-clients-Sb1QjyP-.cjs");
|
|
@@ -34,6 +33,7 @@ const require_stored_prompt_blocks = require("../../stored-prompt-blocks-CNvL1cd
|
|
|
34
33
|
const require_stored_scorers = require("../../stored-scorers-DBor7on7.cjs");
|
|
35
34
|
const require_stored_skills = require("../../stored-skills-DizSy0Pb.cjs");
|
|
36
35
|
const require_system = require("../../system-D85p7-oz.cjs");
|
|
36
|
+
const require_processors = require("../../processors-D6lRjS0e.cjs");
|
|
37
37
|
exports.SKILL_ORIGIN_METADATA_KEY = require_stored_skills.SKILL_ORIGIN_METADATA_KEY;
|
|
38
38
|
exports.a2aAgentExecutionBodySchema = require_a2a.agentExecutionBodySchema;
|
|
39
39
|
exports.a2aAgentIdPathParams = require_a2a.a2aAgentIdPathParams;
|
|
@@ -24,7 +24,6 @@ import { A as listDatasetsQuerySchema, B as reviewSummaryResponseSchema, C as ex
|
|
|
24
24
|
import { a as builderModelPolicySchema, c as defaultModelEntrySchema, d as providerModelEntrySchema, i as builderAvailableModelsResponseSchema, l as infrastructureStatusResponseSchema, n as agentFeaturesSchema, o as builderPickerSchema, r as agentModelsSchema, s as builderSettingsResponseSchema, t as agentConfigurationSchema, u as pickerAllowlistSchema } from "../../editor-builder-D46tZA82.js";
|
|
25
25
|
import { a as createMCPClientVersionResponseSchema, c as listMCPClientVersionsQuerySchema, d as mcpClientVersionPathParams, f as mcpClientVersionSchema, i as createMCPClientVersionBodySchema, l as listMCPClientVersionsResponseSchema, n as compareMCPClientVersionsQuerySchema, o as deleteMCPClientVersionResponseSchema, p as restoreMCPClientVersionResponseSchema, r as compareMCPClientVersionsResponseSchema, s as getMCPClientVersionResponseSchema, t as activateMCPClientVersionResponseSchema, u as mcpClientVersionIdPathParams } from "../../mcp-client-versions-Df5bgWm1.js";
|
|
26
26
|
import { n as getProcessorProvidersResponseSchema, r as processorProviderIdPathParams, t as getProcessorProviderResponseSchema } from "../../processor-providers-DBhZC6-4.js";
|
|
27
|
-
import { a as processorIdPathParams, i as processorConfigurationSchema, n as executeProcessorResponseSchema, o as serializedProcessorDetailSchema, r as listProcessorsResponseSchema, s as serializedProcessorSchema, t as executeProcessorBodySchema } from "../../processors-88oJ_4J-.js";
|
|
28
27
|
import { a as createPromptBlockVersionResponseSchema, c as listPromptBlockVersionsQuerySchema, d as promptBlockVersionPathParams, f as promptBlockVersionSchema, i as createPromptBlockVersionBodySchema, l as listPromptBlockVersionsResponseSchema, n as comparePromptBlockVersionsQuerySchema, o as deletePromptBlockVersionResponseSchema, p as restorePromptBlockVersionResponseSchema, r as comparePromptBlockVersionsResponseSchema, s as getPromptBlockVersionResponseSchema, t as activatePromptBlockVersionResponseSchema, u as promptBlockVersionIdPathParams } from "../../prompt-block-versions-D3Ds9pXt.js";
|
|
29
28
|
import { a as createScorerVersionResponseSchema, c as listScorerVersionsQuerySchema, d as scorerVersionIdPathParams, f as scorerVersionPathParams, i as createScorerVersionBodySchema, l as listScorerVersionsResponseSchema, n as compareScorerVersionsQuerySchema, o as deleteScorerVersionResponseSchema, p as scorerVersionSchema, r as compareScorerVersionsResponseSchema, s as getScorerVersionResponseSchema, t as activateScorerVersionResponseSchema, u as restoreScorerVersionResponseSchema } from "../../scorer-versions-8-YMrgNx.js";
|
|
30
29
|
import { a as listStoredMCPClientsQuerySchema, c as storedMCPClientSchema, i as getStoredMCPClientResponseSchema, l as updateStoredMCPClientBodySchema, n as createStoredMCPClientResponseSchema, o as listStoredMCPClientsResponseSchema, r as deleteStoredMCPClientResponseSchema, s as storedMCPClientIdPathParams, t as createStoredMCPClientBodySchema, u as updateStoredMCPClientResponseSchema } from "../../stored-mcp-clients-BRa_eINm.js";
|
|
@@ -32,4 +31,5 @@ import { a as listStoredPromptBlocksQuerySchema, c as storedPromptBlockSchema, i
|
|
|
32
31
|
import { a as listStoredScorersQuerySchema, c as storedScorerSchema, i as getStoredScorerResponseSchema, l as updateStoredScorerBodySchema, n as createStoredScorerResponseSchema, o as listStoredScorersResponseSchema, r as deleteStoredScorerResponseSchema, s as storedScorerIdPathParams, t as createStoredScorerBodySchema, u as updateStoredScorerResponseSchema } from "../../stored-scorers-DLYUKdcQ.js";
|
|
33
32
|
import { a as deleteStoredSkillResponseSchema, c as listStoredSkillsResponseSchema, d as readSkillOrigin, f as skillOriginSchema, g as updateStoredSkillResponseSchema, h as updateStoredSkillBodySchema, i as createStoredSkillResponseSchema, l as publishStoredSkillBodySchema, m as storedSkillSchema, n as buildOriginMetadata, o as getStoredSkillResponseSchema, p as storedSkillIdPathParams, r as createStoredSkillBodySchema, s as listStoredSkillsQuerySchema, t as SKILL_ORIGIN_METADATA_KEY, u as publishStoredSkillResponseSchema } from "../../stored-skills-BSwEeGJ9.js";
|
|
34
33
|
import { a as editorSourceSchema, c as observabilityStorageCapabilitiesSchema, i as editorSourceCapabilitiesSchema, l as systemPackagesResponseSchema, n as apiSchemaManifestRouteSchema, o as mastraPackageSchema, r as apiSchemaResponseShapeSchema, s as observabilityRuntimeStrategySchema, t as apiSchemaManifestResponseSchema } from "../../system-DMAG21IT.js";
|
|
34
|
+
import { a as processorIdPathParams, i as processorConfigurationSchema, n as executeProcessorResponseSchema, o as serializedProcessorDetailSchema, r as listProcessorsResponseSchema, s as serializedProcessorSchema, t as executeProcessorBodySchema } from "../../processors-88oJ_4J-.js";
|
|
35
35
|
export { SKILL_ORIGIN_METADATA_KEY, agentExecutionBodySchema as a2aAgentExecutionBodySchema, a2aAgentIdPathParams, a2aTaskPathParams, abortAgentThreadBodySchema, abortAgentThreadResponseSchema, actionIdPathParams, actionRunPathParams, activateMCPClientVersionResponseSchema, activatePromptBlockVersionResponseSchema, activateScorerVersionResponseSchema, activateVersionResponseSchema, addItemBodySchema, agentCardResponseSchema, agentConfigurationSchema, agentExecutionBodySchema$1 as agentExecutionBodySchema, agentExecutionLegacyBodySchema, agentExecutionResponseSchema, agentFeaturesSchema, agentIdPathParams, agentIdQuerySchema, agentModelsSchema, agentPlanQuerySchema, agentPlanResponseSchema, agentSkillPathParams, agentToolPathParams, agentVersionPathParams, agentVersionQuerySchema, agentVersionSchema, apiSchemaManifestResponseSchema, apiSchemaManifestRouteSchema, apiSchemaResponseShapeSchema, approveNetworkToolCallBodySchema, approveToolCallBodySchema, authStatusToolProviderResponseSchema, authenticatedCapabilitiesSchema, authenticatedUserSchema, authorizeToolProviderBodySchema, authorizeToolProviderResponseSchema, awaitBufferStatusBodySchema, awaitBufferStatusResponseSchema, baseLogMessageSchema, batchDeleteItemsBodySchema, batchDeleteItemsResponseSchema, batchInsertItemsBodySchema, batchInsertItemsResponseSchema, buildOriginMetadata, builderAvailableModelsResponseSchema, builderModelPolicySchema, builderPickerSchema, builderSettingsResponseSchema, cancelPendingAgentSignalsBodySchema, cancelPendingAgentSignalsResponseSchema, capabilitiesResponseSchema, capabilityFlagsSchema, cloneThreadBodySchema, cloneThreadResponseSchema, clusterFailuresBodySchema, clusterFailuresResponseSchema, compareExperimentsBodySchema, compareMCPClientVersionsQuerySchema, compareMCPClientVersionsResponseSchema, comparePromptBlockVersionsQuerySchema, comparePromptBlockVersionsResponseSchema, compareScorerVersionsQuerySchema, compareScorerVersionsResponseSchema, compareVersionsQuerySchema, compareVersionsResponseSchema, comparisonResponseSchema, conditionalFieldSchema, connectionSchema, connectionScopeSchema, connectionStatusToolProviderBodySchema, connectionStatusToolProviderResponseSchema, connectionUsageQuerySchema, connectionUsageResponseSchema, conversationDeletedSchema, conversationIdPathParams, conversationItemMessageSchema, conversationItemSchema, conversationItemsListSchema, conversationMessageContentSchema, conversationObjectSchema, coreMessageSchema, createCombinedPaginationSchema, createCompareVersionsResponseSchema, createConversationBodySchema, createDatasetBodySchema, createIndexBodySchema, createIndexResponseSchema, createListVersionsResponseSchema, createMCPClientVersionBodySchema, createMCPClientVersionResponseSchema, createPagePaginationSchema, createPromptBlockVersionBodySchema, createPromptBlockVersionResponseSchema, createResponseBodySchema, createScorerVersionBodySchema, createScorerVersionResponseSchema, createStoredAgentBodySchema, createStoredAgentResponseSchema, createStoredMCPClientBodySchema, createStoredMCPClientResponseSchema, createStoredPromptBlockBodySchema, createStoredPromptBlockResponseSchema, createStoredScorerBodySchema, createStoredScorerResponseSchema, createStoredSkillBodySchema, createStoredSkillResponseSchema, createStoredWorkspaceBodySchema, createStoredWorkspaceResponseSchema, createThreadBodySchema, createThreadNetworkQuerySchema, createVersionBodySchema, createVersionResponseSchema, createWorkflowRunResponseSchema, credentialsResponseSchema, credentialsSignInBodySchema, credentialsSignUpBodySchema, currentUserResponseSchema, datasetAndExperimentIdPathParams, datasetAndItemIdPathParams, datasetExperimentAndItemIdPathParams, datasetIdPathParams, datasetItemResponseSchema, datasetItemVersionPathParams, datasetResponseSchema, datasetVersionResponseSchema, declineNetworkToolCallBodySchema, declineToolCallBodySchema, defaultModelEntrySchema, defaultOptionsSchema, deleteIndexResponseSchema, deleteMCPClientVersionResponseSchema, deleteMessagesBodySchema, deleteMessagesNetworkQuerySchema, deleteMessagesQuerySchema, deleteMessagesResponseSchema, deletePromptBlockVersionResponseSchema, deleteResponseSchema, deleteScorerVersionResponseSchema, deleteStoredAgentResponseSchema, deleteStoredMCPClientResponseSchema, deleteStoredPromptBlockResponseSchema, deleteStoredScorerResponseSchema, deleteStoredSkillResponseSchema, deleteStoredWorkspaceResponseSchema, deleteThreadNetworkQuerySchema, deleteThreadQuerySchema, deleteThreadResponseSchema, deleteVersionResponseSchema, describeIndexResponseSchema, disconnectConnectionQuerySchema, disconnectConnectionResponseSchema, editorSourceCapabilitiesSchema, editorSourceSchema, enhanceInstructionsBodySchema, enhanceInstructionsResponseSchema, entityPathParams, executeProcessorBodySchema, executeProcessorResponseSchema, executeToolBodySchema, executeToolContextBodySchema, executeToolResponseSchema, experimentIdPathParams, experimentResponseSchema, experimentResultIdPathParams, experimentResultResponseSchema, experimentReviewCountsSchema, experimentSummaryResponseSchema, exportStoredAgentBodySchema, exportStoredAgentResponseSchema, fileEntrySchema, filterSchema, fsDeleteQuerySchema, fsDeleteResponseSchema, fsListQuerySchema, fsListResponseSchema, fsMkdirBodySchema, fsMkdirResponseSchema, fsPathParams, fsReadQuerySchema, fsReadResponseSchema, fsStatQuerySchema, fsStatResponseSchema, fsWriteBodySchema, fsWriteResponseSchema, generateItemsBodySchema, generateItemsResponseSchema, generateResponseSchema, generateSpeechBodySchema, getAgentSkillResponseSchema, getListenerResponseSchema, getMCPClientVersionResponseSchema, getMcpServerDetailQuerySchema, getMemoryConfigQuerySchema, getMemoryStatusNetworkQuerySchema, getMemoryStatusQuerySchema, getObservationalMemoryQuerySchema, getObservationalMemoryResponseSchema, getProcessorProviderResponseSchema, getProcessorProvidersResponseSchema, getPromptBlockVersionResponseSchema, getScorerVersionResponseSchema, getSkillResponseSchema, getStoredAgentDependentsResponseSchema, getStoredAgentResponseSchema, getStoredMCPClientResponseSchema, getStoredPromptBlockResponseSchema, getStoredScorerResponseSchema, getStoredSkillResponseSchema, getStoredWorkspaceResponseSchema, getThreadByIdNetworkQuerySchema, getThreadByIdQuerySchema, getThreadByIdResponseSchema, getToolProviderToolSchemaResponseSchema, getVersionResponseSchema, getWorkingMemoryQuerySchema, getWorkingMemoryResponseSchema, includeSchema, indexBodySchema, indexResponseSchema, infrastructureStatusResponseSchema, instructionsSchema, itemIdPathParams, itemVersionResponseSchema, jsonRpcErrorSchema, listAgentsResponseSchema, listConnectionFieldsQuerySchema, listConnectionFieldsResponseSchema, listConnectionsQuerySchema, listConnectionsResponseSchema, listDatasetVersionsResponseSchema, listDatasetsQuerySchema, listDatasetsResponseSchema, listEmbeddersResponseSchema, listExperimentResultsQuerySchema, listExperimentResultsResponseSchema, listExperimentsQuerySchema, listExperimentsResponseSchema, listIndexesResponseSchema, listItemVersionsResponseSchema, listItemsQuerySchema, listItemsResponseSchema, listLogTransportsResponseSchema, listLogsQuerySchema, listLogsResponseSchema, listMCPClientVersionsQuerySchema, listMCPClientVersionsResponseSchema, listMcpServerToolsResponseSchema, listMcpServersQuerySchema, listMcpServersResponseSchema, listMessagesNetworkQuerySchema, listMessagesQuerySchema, listMessagesResponseSchema, listProcessorsResponseSchema, listPromptBlockVersionsQuerySchema, listPromptBlockVersionsResponseSchema, listReferencesResponseSchema, listScorerVersionsQuerySchema, listScorerVersionsResponseSchema, listScorersResponseSchema, listScoresByEntityIdQuerySchema, listScoresByRunIdQuerySchema, listScoresByScorerIdQuerySchema, listSkillsResponseSchema, listStoredAgentsQuerySchema, listStoredAgentsResponseSchema, listStoredMCPClientsQuerySchema, listStoredMCPClientsResponseSchema, listStoredPromptBlocksQuerySchema, listStoredPromptBlocksResponseSchema, listStoredScorersQuerySchema, listStoredScorersResponseSchema, listStoredSkillsQuerySchema, listStoredSkillsResponseSchema, listStoredWorkspacesQuerySchema, listStoredWorkspacesResponseSchema, listSuspendedRunsQuerySchema, listSuspendedRunsResponseSchema, listThreadsNetworkQuerySchema, listThreadsQuerySchema, listThreadsResponseSchema, listToolProviderToolkitsResponseSchema, listToolProviderToolsQuerySchema, listToolProviderToolsResponseSchema, listToolProvidersResponseSchema, listToolsResponseSchema, listVectorsResponseSchema, listVersionsQuerySchema, listVersionsResponseSchema, listWorkflowRunsQuerySchema, listWorkflowsResponseSchema, listWorkspacesResponseSchema, loginConfigSchema, logoutResponseSchema, mastraPackageSchema, mcpClientVersionIdPathParams, mcpClientVersionPathParams, mcpClientVersionSchema, executeToolBodySchema$1 as mcpExecuteToolBodySchema, executeToolResponseSchema$1 as mcpExecuteToolResponseSchema, mcpServerDetailPathParams, mcpServerIdPathParams, mcpServerToolPathParams, mcpToolInfoSchema, memoryConfigResponseSchema, memoryStatusResponseSchema, messageOrderBySchema, messageResponseSchema, messageSendBodySchema, modelConfigIdPathParams, modelConfigSchema, modelManagementResponseSchema, mountInfoSchema, observabilityRuntimeStrategySchema, observabilityStorageCapabilitiesSchema, observeAgentBodySchema, observeAgentResponseSchema, openStoredAgentChangeRequestBodySchema, openStoredAgentChangeRequestResponseSchema, optionalAgentIdQuerySchema, optionalRunIdSchema, paginationInfoSchema, paginationNumber, paginationQuerySchema, partialQuerySchema, permissionPatternsResponseSchema, pickerAllowlistSchema, previewInstructionsBodySchema, previewInstructionsResponseSchema, processorConfigurationSchema, processorGraphEntrySchema, processorGraphStepSchema, processorIdPathParams, processorPhaseSchema, processorProviderIdPathParams, serializedProcessorSchema as processorSerializedSchema, promptBlockVersionIdPathParams, promptBlockVersionPathParams, promptBlockVersionSchema, providerModelEntrySchema, providerSchema, providersResponseSchema, publicCapabilitiesSchema, publishStoredSkillBodySchema, publishStoredSkillResponseSchema, queryVectorsBodySchema, queryVectorsResponseSchema, queueAgentMessageBodySchema, readSkillOrigin, recoverBodySchema, refreshResponseSchema, reorderAgentModelListBodySchema, resolvedAuthorSchema, responseIdPathParams, responseInputMessageSchema, responseInputTextContentSchema, responseInputTextPartSchema, responseObjectSchema, responseOutputFunctionCallOutputSchema, responseOutputFunctionCallSchema, responseOutputItemSchema, responseOutputMessageSchema, responseOutputTextSchema, responseTextFormatSchema, responseToolSchema, responseUsageSchema, restoreMCPClientVersionResponseSchema, restorePromptBlockVersionResponseSchema, restoreScorerVersionResponseSchema, restoreVersionResponseSchema, resumeAgentBuilderBodySchema, resumeStreamBodySchema, resumeStreamUntilIdleBodySchema, reviewSummaryResponseSchema, ruleGroupSchema, ruleSchema, runExperimentItemBodySchema, runExperimentItemResponseSchema, runIdSchema, saveMessagesBodySchema, saveMessagesNetworkQuerySchema, saveMessagesResponseSchema, saveScoreBodySchema, saveScoreResponseSchema, scorerConfigSchema, scorerEntrySchema, scorerIdPathParams, scorerResultSchema, scorerVersionIdPathParams, scorerVersionPathParams, scorerVersionSchema, scoresWithPaginationResponseSchema, searchMemoryQuerySchema, searchMemoryResponseSchema, searchQuerySchema, searchResponseSchema, searchResultSchema, searchSkillsQuerySchema, searchSkillsResponseSchema, semanticRecallSchema, sendAgentMessageBodySchema, sendAgentSignalBodySchema, sendToolApprovalBodySchema, sendToolApprovalResponseSchema, sendWorkflowRunEventBodySchema, serializedAgentDefinitionSchema, serializedAgentSchema, serializedAgentWithIdSchema, serializedMemoryConfigSchema, serializedObservationConfigSchema, serializedObservationalMemoryConfigObjectSchema, serializedObservationalMemoryConfigSchema, serializedProcessorDetailSchema, serializedProcessorSchema$1 as serializedProcessorSchema, serializedReflectionConfigSchema, serializedToolSchema, serializedWorkflowSchema, serverDetailSchema, serverInfoSchema, skillDisambiguationQuerySchema, skillMetadataSchema, skillMetadataWithPathSchema, skillNamePathParams, skillOriginSchema, skillReferencePathParams, skillReferenceResponseSchema, skillSchema, skillSearchResultSchema, skillSourceSchema, skillsShInstallBodySchema, skillsShInstallResponseSchema, skillsShListResponseSchema, skillsShPopularQuerySchema, skillsShPreviewQuerySchema, skillsShPreviewResponseSchema, skillsShRemoveBodySchema, skillsShRemoveResponseSchema, skillsShSearchQuerySchema, skillsShSearchResponseSchema, skillsShSkillSchema, skillsShSourceSchema, skillsShUpdateBodySchema, skillsShUpdateResponseSchema, snapshotConfigSchema, speakResponseSchema, ssoCallbackQuerySchema, ssoCallbackResponseSchema, ssoConfigSchema, ssoLoginQuerySchema, ssoLoginResponseSchema, startAsyncAgentBuilderBodySchema, statusQuerySchema, storedAgentIdPathParams, storedAgentSchema, storedMCPClientIdPathParams, storedMCPClientSchema, storedProcessorGraphSchema, storedPromptBlockIdPathParams, storedPromptBlockSchema, storedScorerIdPathParams, storedScorerSchema, storedSkillIdPathParams, storedSkillSchema, storedWorkspaceIdPathParams, storedWorkspaceSchema, streamAgentBuilderBodySchema, streamLegacyAgentBuilderBodySchema, streamResponseSchema, streamUntilIdleBodySchema, submitExperimentResultBodySchema, subscribeAgentThreadBodySchema, successResponseSchema, systemPackagesResponseSchema, taskQueryBodySchema, taskResponseSchema, tenancyQuerySchema, threadIdPathParams, titleGenerationSchema, toolCallResponseSchema, toolConfigSchema, toolIdPathParams, toolProviderAuthStatusPathParams, toolProviderConfigSchema, toolProviderConnectionPathParams, toolProviderHealthResponseSchema, toolProviderIdPathParams, toolProvidersSchema, toolSlugPathParams, toolsConfigSchema, tracingOptionsSchema, transcribeSpeechBodySchema, transcribeSpeechResponseSchema, transferThreadBodySchema, transferThreadResponseSchema, triggerExperimentBodySchema, typedPermissive, updateAgentModelBodySchema, updateAgentModelInModelListBodySchema, updateConnectionBodySchema, updateConnectionResponseSchema, updateDatasetBodySchema, updateExperimentBodySchema, updateExperimentResultBodySchema, updateItemBodySchema, updateStoredAgentBodySchema, updateStoredAgentResponseSchema, updateStoredMCPClientBodySchema, updateStoredMCPClientResponseSchema, updateStoredPromptBlockBodySchema, updateStoredPromptBlockResponseSchema, updateStoredScorerBodySchema, updateStoredScorerResponseSchema, updateStoredSkillBodySchema, updateStoredSkillResponseSchema, updateStoredWorkspaceBodySchema, updateStoredWorkspaceResponseSchema, updateThreadBodySchema, updateThreadNetworkQuerySchema, updateWorkingMemoryBodySchema, updateWorkingMemoryResponseSchema, upsertVectorsBodySchema, upsertVectorsResponseSchema, userAccessSchema, vectorIndexPathParams, vectorNamePathParams, versionDetailSchema, versionDiffEntrySchema, versionIdPathParams, versionOrderBySchema, voiceSpeakersResponseSchema, workflowControlResponseSchema, workflowExecutionResultSchema, workflowInfoSchema, workflowRunResultQuerySchema, workflowRunResultSchema, workflowRunsResponseSchema, workspaceIdPathParams, workspaceInfoResponseSchema, snapshotConfigSchema$1 as workspaceSnapshotConfigSchema };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/server",
|
|
3
|
-
"version": "1.70.0-alpha.
|
|
3
|
+
"version": "1.70.0-alpha.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -116,15 +116,15 @@
|
|
|
116
116
|
"vitest": "4.1.11",
|
|
117
117
|
"zod": "^4.6.4",
|
|
118
118
|
"zod-to-ts": "^2.1.0",
|
|
119
|
-
"@internal/storage-test-utils": "0.0.131",
|
|
120
|
-
"@internal/core": "0.1.2",
|
|
121
119
|
"@internal/lint": "0.0.135",
|
|
120
|
+
"@internal/storage-test-utils": "0.0.131",
|
|
122
121
|
"@internal/types-builder": "0.0.110",
|
|
123
|
-
"@internal/
|
|
122
|
+
"@internal/core": "0.1.2",
|
|
124
123
|
"@internal/voice": "0.0.33",
|
|
125
|
-
"@
|
|
124
|
+
"@internal/test-utils": "0.0.71",
|
|
126
125
|
"@mastra/schema-compat": "1.3.11",
|
|
127
|
-
"@mastra/core": "1.70.0-alpha.
|
|
126
|
+
"@mastra/core": "1.70.0-alpha.4",
|
|
127
|
+
"@mastra/agent-builder": "1.1.21-alpha.1"
|
|
128
128
|
},
|
|
129
129
|
"homepage": "https://mastra.ai",
|
|
130
130
|
"repository": {
|