@mastra/server 1.72.0-alpha.8 → 1.72.0-alpha.9
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/{api-schema-manifest-gLtuKcZT.cjs → api-schema-manifest-C9mzZvwb.cjs} +2 -2
- package/dist/{api-schema-manifest-gLtuKcZT.cjs.map → api-schema-manifest-C9mzZvwb.cjs.map} +1 -1
- package/dist/{api-schema-manifest-B2qMxAnr.js → api-schema-manifest-CeSyB2uX.js} +2 -2
- package/dist/{api-schema-manifest-B2qMxAnr.js.map → api-schema-manifest-CeSyB2uX.js.map} +1 -1
- package/dist/{dist-DyAime2A.cjs → dist-CRMvLG_8.cjs} +2 -2
- package/dist/{dist-DyAime2A.cjs.map → dist-CRMvLG_8.cjs.map} +1 -1
- package/dist/{dist-CsIuYmye.js → dist-CYk5xS3y.js} +2 -2
- package/dist/{dist-CsIuYmye.js.map → dist-CYk5xS3y.js.map} +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/reference-observability-tracing-trace-query.md +37 -16
- package/dist/{observability-new-endpoints-Ct0CSLE4.cjs → observability-new-endpoints-BnLi_Bdm.cjs} +6 -3
- package/dist/observability-new-endpoints-BnLi_Bdm.cjs.map +1 -0
- package/dist/{observability-new-endpoints-DqS6dcR5.js → observability-new-endpoints-aUBFBO-b.js} +7 -4
- package/dist/observability-new-endpoints-aUBFBO-b.js.map +1 -0
- package/dist/{routes-CNwYNwrs.js → routes-D5OKIMYe.js} +2 -2
- package/dist/{routes-CNwYNwrs.js.map → routes-D5OKIMYe.js.map} +1 -1
- package/dist/{routes-DEdytSu5.cjs → routes-T4x5ibCy.cjs} +2 -2
- package/dist/{routes-DEdytSu5.cjs.map → routes-T4x5ibCy.cjs.map} +1 -1
- package/dist/server/handlers/agent-builder.cjs +1 -1
- package/dist/server/handlers/agent-builder.js +1 -1
- package/dist/server/handlers/observability-new-endpoints.cjs +1 -1
- package/dist/server/handlers/observability-new-endpoints.d.ts +4 -0
- package/dist/server/handlers/observability-new-endpoints.d.ts.map +1 -1
- package/dist/server/handlers/observability-new-endpoints.js +1 -1
- package/dist/server/handlers/observability-shared.cjs +29 -0
- package/dist/server/handlers/observability-shared.cjs.map +1 -1
- package/dist/server/handlers/observability-shared.d.ts +4 -0
- package/dist/server/handlers/observability-shared.d.ts.map +1 -1
- package/dist/server/handlers/observability-shared.js +27 -1
- package/dist/server/handlers/observability-shared.js.map +1 -1
- package/dist/server/handlers/observability.cjs +1 -1
- package/dist/server/handlers/observability.js +1 -1
- package/dist/server/handlers/system.cjs +2 -2
- package/dist/server/handlers/system.d.ts +2 -0
- package/dist/server/handlers/system.d.ts.map +1 -1
- package/dist/server/handlers/system.js +2 -2
- package/dist/server/schemas/index.cjs +1 -1
- package/dist/server/schemas/index.js +1 -1
- package/dist/server/schemas/system.d.ts +2 -0
- package/dist/server/schemas/system.d.ts.map +1 -1
- package/dist/server/server-adapter/index.cjs +1 -1
- package/dist/server/server-adapter/index.js +1 -1
- package/dist/server/server-adapter/routes/observability.d.ts +2 -0
- package/dist/server/server-adapter/routes/observability.d.ts.map +1 -1
- package/dist/server/server-adapter/routes/system.d.ts +2 -0
- package/dist/server/server-adapter/routes/system.d.ts.map +1 -1
- package/dist/{system-BE5tDMHq.js → system-6qFm79mm.js} +2 -1
- package/dist/system-6qFm79mm.js.map +1 -0
- package/dist/{system-BlGYb2fu.cjs → system-CskEzH1o.cjs} +2 -1
- package/dist/system-CskEzH1o.cjs.map +1 -0
- package/package.json +5 -5
- package/dist/observability-new-endpoints-Ct0CSLE4.cjs.map +0 -1
- package/dist/observability-new-endpoints-DqS6dcR5.js.map +0 -1
- package/dist/system-BE5tDMHq.js.map +0 -1
- package/dist/system-BlGYb2fu.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require("./rolldown-runtime-Bd6kNlEP.cjs");
|
|
2
2
|
const require_route_builder = require("./route-builder-2yrD15TL.cjs");
|
|
3
|
-
const require_routes = require("./routes-
|
|
3
|
+
const require_routes = require("./routes-T4x5ibCy.cjs");
|
|
4
4
|
//#region src/server/server-adapter/api-schema-manifest.ts
|
|
5
5
|
function convertSchema(schema) {
|
|
6
6
|
return schema ? require_route_builder.schemaToJsonSchema(schema) : void 0;
|
|
@@ -53,4 +53,4 @@ function buildApiSchemaManifest(routes = require_routes.SERVER_ROUTES) {
|
|
|
53
53
|
//#endregion
|
|
54
54
|
exports.buildApiSchemaManifest = buildApiSchemaManifest;
|
|
55
55
|
|
|
56
|
-
//# sourceMappingURL=api-schema-manifest-
|
|
56
|
+
//# sourceMappingURL=api-schema-manifest-C9mzZvwb.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-schema-manifest-
|
|
1
|
+
{"version":3,"file":"api-schema-manifest-C9mzZvwb.cjs","names":["schemaToJsonSchema","SERVER_ROUTES"],"sources":["../src/server/server-adapter/api-schema-manifest.ts"],"sourcesContent":["import type { JSONSchema7 } from '@mastra/schema-compat';\nimport { schemaToJsonSchema } from './openapi-utils';\nimport { SERVER_ROUTES } from './routes/index';\nimport type { ServerRoute } from './routes/index';\n\nexport interface ApiSchemaResponseShape {\n kind: 'array' | 'record' | 'object-property' | 'single' | 'unknown';\n listProperty?: string;\n paginationProperty?: string;\n}\n\nexport interface ApiSchemaManifestRoute {\n method: string;\n path: string;\n responseType: string;\n pathParamSchema?: JSONSchema7;\n queryParamSchema?: JSONSchema7;\n bodySchema?: JSONSchema7;\n responseSchema?: JSONSchema7;\n responseShape: ApiSchemaResponseShape;\n}\n\nexport interface ApiSchemaManifest {\n version: 1;\n routes: ApiSchemaManifestRoute[];\n}\n\nfunction convertSchema(schema: ServerRoute['bodySchema']): JSONSchema7 | undefined {\n return schema ? schemaToJsonSchema(schema) : undefined;\n}\n\nfunction asJsonSchema(value: unknown): JSONSchema7 | undefined {\n return value && typeof value === 'object' && !Array.isArray(value) ? (value as JSONSchema7) : undefined;\n}\n\nfunction schemaType(schema: JSONSchema7 | undefined): JSONSchema7['type'] | undefined {\n const type = schema?.type;\n return Array.isArray(type) ? type.find(Boolean) : type;\n}\n\nfunction inferResponseShape(responseSchema: JSONSchema7 | undefined): ApiSchemaResponseShape {\n if (!responseSchema) return { kind: 'unknown' };\n\n const type = schemaType(responseSchema);\n if (type === 'array') return { kind: 'array' };\n if (type !== 'object') return { kind: 'single' };\n\n const properties =\n responseSchema.properties && !Array.isArray(responseSchema.properties) ? responseSchema.properties : {};\n const propertyNames = Object.keys(properties);\n const paginationProperty = 'page' in properties ? 'page' : 'pagination' in properties ? 'pagination' : undefined;\n const listProperty = Object.entries(properties).find(\n ([, property]) => schemaType(asJsonSchema(property)) === 'array',\n )?.[0];\n\n if (listProperty && (paginationProperty || propertyNames.length <= 2)) {\n return { kind: 'object-property', listProperty, paginationProperty };\n }\n if (responseSchema.additionalProperties && propertyNames.length === 0) return { kind: 'record' };\n return { kind: 'single' };\n}\n\nfunction isManifestRoute(route: ServerRoute): boolean {\n return route.responseType === 'json' && !route.deprecated;\n}\n\nexport function buildApiSchemaManifest(routes: readonly ServerRoute[] = SERVER_ROUTES): ApiSchemaManifest {\n return {\n version: 1,\n routes: routes.filter(isManifestRoute).map(route => {\n const responseSchema = convertSchema(route.responseSchema);\n return {\n method: route.method,\n path: route.path,\n responseType: route.responseType,\n pathParamSchema: convertSchema(route.pathParamSchema),\n queryParamSchema: convertSchema(route.queryParamSchema),\n bodySchema: convertSchema(route.bodySchema),\n responseSchema,\n responseShape: inferResponseShape(responseSchema),\n };\n }),\n };\n}\n"],"mappings":";;;;AA2BA,SAAS,cAAc,QAA4D;CACjF,OAAO,SAASA,sBAAAA,mBAAmB,MAAM,IAAI,KAAA;AAC/C;AAEA,SAAS,aAAa,OAAyC;CAC7D,OAAO,SAAS,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK,IAAK,QAAwB,KAAA;AAChG;AAEA,SAAS,WAAW,QAAkE;C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,cAAc;GAClD;EACF,CAAC;CACH;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as schemaToJsonSchema } from "./route-builder-lBil8Cvo.js";
|
|
2
|
-
import { t as SERVER_ROUTES } from "./routes-
|
|
2
|
+
import { t as SERVER_ROUTES } from "./routes-D5OKIMYe.js";
|
|
3
3
|
//#region src/server/server-adapter/api-schema-manifest.ts
|
|
4
4
|
function convertSchema(schema) {
|
|
5
5
|
return schema ? schemaToJsonSchema(schema) : void 0;
|
|
@@ -52,4 +52,4 @@ function buildApiSchemaManifest(routes = SERVER_ROUTES) {
|
|
|
52
52
|
//#endregion
|
|
53
53
|
export { buildApiSchemaManifest };
|
|
54
54
|
|
|
55
|
-
//# sourceMappingURL=api-schema-manifest-
|
|
55
|
+
//# sourceMappingURL=api-schema-manifest-CeSyB2uX.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-schema-manifest-
|
|
1
|
+
{"version":3,"file":"api-schema-manifest-CeSyB2uX.js","names":[],"sources":["../src/server/server-adapter/api-schema-manifest.ts"],"sourcesContent":["import type { JSONSchema7 } from '@mastra/schema-compat';\nimport { schemaToJsonSchema } from './openapi-utils';\nimport { SERVER_ROUTES } from './routes/index';\nimport type { ServerRoute } from './routes/index';\n\nexport interface ApiSchemaResponseShape {\n kind: 'array' | 'record' | 'object-property' | 'single' | 'unknown';\n listProperty?: string;\n paginationProperty?: string;\n}\n\nexport interface ApiSchemaManifestRoute {\n method: string;\n path: string;\n responseType: string;\n pathParamSchema?: JSONSchema7;\n queryParamSchema?: JSONSchema7;\n bodySchema?: JSONSchema7;\n responseSchema?: JSONSchema7;\n responseShape: ApiSchemaResponseShape;\n}\n\nexport interface ApiSchemaManifest {\n version: 1;\n routes: ApiSchemaManifestRoute[];\n}\n\nfunction convertSchema(schema: ServerRoute['bodySchema']): JSONSchema7 | undefined {\n return schema ? schemaToJsonSchema(schema) : undefined;\n}\n\nfunction asJsonSchema(value: unknown): JSONSchema7 | undefined {\n return value && typeof value === 'object' && !Array.isArray(value) ? (value as JSONSchema7) : undefined;\n}\n\nfunction schemaType(schema: JSONSchema7 | undefined): JSONSchema7['type'] | undefined {\n const type = schema?.type;\n return Array.isArray(type) ? type.find(Boolean) : type;\n}\n\nfunction inferResponseShape(responseSchema: JSONSchema7 | undefined): ApiSchemaResponseShape {\n if (!responseSchema) return { kind: 'unknown' };\n\n const type = schemaType(responseSchema);\n if (type === 'array') return { kind: 'array' };\n if (type !== 'object') return { kind: 'single' };\n\n const properties =\n responseSchema.properties && !Array.isArray(responseSchema.properties) ? responseSchema.properties : {};\n const propertyNames = Object.keys(properties);\n const paginationProperty = 'page' in properties ? 'page' : 'pagination' in properties ? 'pagination' : undefined;\n const listProperty = Object.entries(properties).find(\n ([, property]) => schemaType(asJsonSchema(property)) === 'array',\n )?.[0];\n\n if (listProperty && (paginationProperty || propertyNames.length <= 2)) {\n return { kind: 'object-property', listProperty, paginationProperty };\n }\n if (responseSchema.additionalProperties && propertyNames.length === 0) return { kind: 'record' };\n return { kind: 'single' };\n}\n\nfunction isManifestRoute(route: ServerRoute): boolean {\n return route.responseType === 'json' && !route.deprecated;\n}\n\nexport function buildApiSchemaManifest(routes: readonly ServerRoute[] = SERVER_ROUTES): ApiSchemaManifest {\n return {\n version: 1,\n routes: routes.filter(isManifestRoute).map(route => {\n const responseSchema = convertSchema(route.responseSchema);\n return {\n method: route.method,\n path: route.path,\n responseType: route.responseType,\n pathParamSchema: convertSchema(route.pathParamSchema),\n queryParamSchema: convertSchema(route.queryParamSchema),\n bodySchema: convertSchema(route.bodySchema),\n responseSchema,\n responseShape: inferResponseShape(responseSchema),\n };\n }),\n };\n}\n"],"mappings":";;;AA2BA,SAAS,cAAc,QAA4D;CACjF,OAAO,SAAS,mBAAmB,MAAM,IAAI,KAAA;AAC/C;AAEA,SAAS,aAAa,OAAyC;CAC7D,OAAO,SAAS,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK,IAAK,Q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AAM,UAAU;IAC1C;IACA,eAAe,mBAAmB,cAAc;GAClD;EACF,CAAC;CACH;AACF"}
|
|
@@ -4638,7 +4638,7 @@ function splitLines(text) {
|
|
|
4638
4638
|
return result;
|
|
4639
4639
|
}
|
|
4640
4640
|
//#endregion
|
|
4641
|
-
//#region ../memory/dist/src-
|
|
4641
|
+
//#region ../memory/dist/src-BdfOygyn.js
|
|
4642
4642
|
var __defProp$3 = Object.defineProperty;
|
|
4643
4643
|
var __exportAll = (all, no_symbols) => {
|
|
4644
4644
|
let target = {};
|
|
@@ -49654,4 +49654,4 @@ const agentBuilderWorkflows = {
|
|
|
49654
49654
|
//#endregion
|
|
49655
49655
|
exports.agentBuilderWorkflows = agentBuilderWorkflows;
|
|
49656
49656
|
|
|
49657
|
-
//# sourceMappingURL=dist-
|
|
49657
|
+
//# sourceMappingURL=dist-CRMvLG_8.cjs.map
|