@mastra/server 1.65.0-alpha.1 → 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/{api-schema-manifest-BxLfDBP-.cjs → api-schema-manifest-DBKVhp6F.cjs} +2 -2
- package/dist/{api-schema-manifest-BxLfDBP-.cjs.map → api-schema-manifest-DBKVhp6F.cjs.map} +1 -1
- package/dist/{api-schema-manifest-CenKfsu1.js → api-schema-manifest-seBh6tGE.js} +2 -2
- package/dist/{api-schema-manifest-CenKfsu1.js.map → api-schema-manifest-seBh6tGE.js.map} +1 -1
- package/dist/{dist-C8lAYOI6.cjs → dist-DPu6oGri.cjs} +6 -3
- package/dist/{dist-C8lAYOI6.cjs.map → dist-DPu6oGri.cjs.map} +1 -1
- package/dist/{dist-BW8S4tCf.js → dist-DxhjXh6M.js} +6 -3
- package/dist/{dist-BW8S4tCf.js.map → dist-DxhjXh6M.js.map} +1 -1
- 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/{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-wp2lb2LI.cjs → routes-D3LdlCKT.cjs} +3 -2
- package/dist/routes-D3LdlCKT.cjs.map +1 -0
- package/dist/{routes-bRlxNTKn.js → routes-Dnb7rduj.js} +3 -2
- package/dist/routes-Dnb7rduj.js.map +1 -0
- package/dist/server/handlers/agent-builder.cjs +1 -1
- package/dist/server/handlers/agent-builder.js +1 -1
- package/dist/server/handlers/mcp-client-versions.cjs +1 -1
- package/dist/server/handlers/mcp-client-versions.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/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/handlers/system.cjs +1 -1
- package/dist/server/handlers/system.js +1 -1
- package/dist/server/schemas/index.cjs +1 -1
- package/dist/server/schemas/index.js +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/observability.d.ts +109 -0
- package/dist/server/server-adapter/routes/observability.d.ts.map +1 -1
- package/package.json +6 -6
- 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-bRlxNTKn.js.map +0 -1
- package/dist/routes-wp2lb2LI.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require("./rolldown-runtime-Bd6kNlEP.cjs");
|
|
2
2
|
const require_route_builder = require("./route-builder-C8n4ugUf.cjs");
|
|
3
|
-
const require_routes = require("./routes-
|
|
3
|
+
const require_routes = require("./routes-D3LdlCKT.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-DBKVhp6F.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-schema-manifest-
|
|
1
|
+
{"version":3,"file":"api-schema-manifest-DBKVhp6F.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;CACpF,MAAM,OAAO,QAAQ;CACrB,OAAO,MAAM,QAAQ,IAAI,IAAI,KAAK,KAAK,OAAO,IAAI;AACpD;AAEA,SAAS,mBAAmB,gBAAiE;CAC3F,IAAI,CAAC,gBAAgB,OAAO,EAAE,MAAM,UAAU;CAE9C,MAAM,OAAO,WAAW,cAAc;CACtC,IAAI,SAAS,SAAS,OAAO,EAAE,MAAM,QAAQ;CAC7C,IAAI,SAAS,UAAU,OAAO,EAAE,MAAM,SAAS;CAE/C,MAAM,aACJ,eAAe,cAAc,CAAC,MAAM,QAAQ,eAAe,UAAU,IAAI,eAAe,aAAa,CAAC;CACxG,MAAM,gBAAgB,OAAO,KAAK,UAAU;CAC5C,MAAM,qBAAqB,UAAU,aAAa,SAAS,gBAAgB,aAAa,eAAe,KAAA;CACvG,MAAM,eAAe,OAAO,QAAQ,UAAU,CAAC,CAAC,MAC7C,GAAG,cAAc,WAAW,aAAa,QAAQ,CAAC,MAAM,OAC3D,CAAC,GAAG;CAEJ,IAAI,iBAAiB,sBAAsB,cAAc,UAAU,IACjE,OAAO;EAAE,MAAM;EAAmB;EAAc;CAAmB;CAErE,IAAI,eAAe,wBAAwB,cAAc,WAAW,GAAG,OAAO,EAAE,MAAM,SAAS;CAC/F,OAAO,EAAE,MAAM,SAAS;AAC1B;AAEA,SAAS,gBAAgB,OAA6B;CACpD,OAAO,MAAM,iBAAiB,UAAU,CAAC,MAAM;AACjD;AAEA,SAAgB,uBAAuB,SAAiCC,eAAAA,eAAkC;CACxG,OAAO;EACL,SAAS;EACT,QAAQ,OAAO,OAAO,eAAe,CAAC,CAAC,KAAI,UAAS;GAClD,MAAM,iBAAiB,cAAc,MAAM,cAAc;GACzD,OAAO;IACL,QAAQ,MAAM;IACd,MAAM,MAAM;IACZ,cAAc,MAAM;IACpB,iBAAiB,cAAc,MAAM,eAAe;IACpD,kBAAkB,cAAc,MAAM,gBAAgB;IACtD,YAAY,cAAc,MAAM,UAAU;IAC1C;IACA,eAAe,mBAAmB,cAAc;GAClD;EACF,CAAC;CACH;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as schemaToJsonSchema } from "./route-builder-BveLN9LU.js";
|
|
2
|
-
import { t as SERVER_ROUTES } from "./routes-
|
|
2
|
+
import { t as SERVER_ROUTES } from "./routes-Dnb7rduj.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-seBh6tGE.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-schema-manifest-
|
|
1
|
+
{"version":3,"file":"api-schema-manifest-seBh6tGE.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,QAAwB,KAAA;AAChG;AAEA,SAAS,WAAW,QAAkE;CACpF,MAAM,OAAO,QAAQ;CACrB,OAAO,MAAM,QAAQ,IAAI,IAAI,KAAK,KAAK,OAAO,IAAI;AACpD;AAEA,SAAS,mBAAmB,gBAAiE;CAC3F,IAAI,CAAC,gBAAgB,OAAO,EAAE,MAAM,UAAU;CAE9C,MAAM,OAAO,WAAW,cAAc;CACtC,IAAI,SAAS,SAAS,OAAO,EAAE,MAAM,QAAQ;CAC7C,IAAI,SAAS,UAAU,OAAO,EAAE,MAAM,SAAS;CAE/C,MAAM,aACJ,eAAe,cAAc,CAAC,MAAM,QAAQ,eAAe,UAAU,IAAI,eAAe,aAAa,CAAC;CACxG,MAAM,gBAAgB,OAAO,KAAK,UAAU;CAC5C,MAAM,qBAAqB,UAAU,aAAa,SAAS,gBAAgB,aAAa,eAAe,KAAA;CACvG,MAAM,eAAe,OAAO,QAAQ,UAAU,CAAC,CAAC,MAC7C,GAAG,cAAc,WAAW,aAAa,QAAQ,CAAC,MAAM,OAC3D,CAAC,GAAG;CAEJ,IAAI,iBAAiB,sBAAsB,cAAc,UAAU,IACjE,OAAO;EAAE,MAAM;EAAmB;EAAc;CAAmB;CAErE,IAAI,eAAe,wBAAwB,cAAc,WAAW,GAAG,OAAO,EAAE,MAAM,SAAS;CAC/F,OAAO,EAAE,MAAM,SAAS;AAC1B;AAEA,SAAS,gBAAgB,OAA6B;CACpD,OAAO,MAAM,iBAAiB,UAAU,CAAC,MAAM;AACjD;AAEA,SAAgB,uBAAuB,SAAiC,eAAkC;CACxG,OAAO;EACL,SAAS;EACT,QAAQ,OAAO,OAAO,eAAe,CAAC,CAAC,KAAI,UAAS;GAClD,MAAM,iBAAiB,cAAc,MAAM,cAAc;GACzD,OAAO;IACL,QAAQ,MAAM;IACd,MAAM,MAAM;IACZ,cAAc,MAAM;IACpB,iBAAiB,cAAc,MAAM,eAAe;IACpD,kBAAkB,cAAc,MAAM,gBAAgB;IACtD,YAAY,cAAc,MAAM,UAAU;IAC1C;IACA,eAAe,mBAAmB,cAAc;GAClD;EACF,CAAC;CACH;AACF"}
|
|
@@ -4694,7 +4694,7 @@ function splitLines(text) {
|
|
|
4694
4694
|
return result;
|
|
4695
4695
|
}
|
|
4696
4696
|
//#endregion
|
|
4697
|
-
//#region ../memory/dist/src-
|
|
4697
|
+
//#region ../memory/dist/src-QH80Zc0y.js
|
|
4698
4698
|
var __defProp$3 = Object.defineProperty;
|
|
4699
4699
|
var __exportAll = (all, no_symbols) => {
|
|
4700
4700
|
let target = {};
|
|
@@ -29112,7 +29112,7 @@ var AsyncBufferObservationStrategy = class extends ObservationStrategy {
|
|
|
29112
29112
|
if (!processed.observations) return;
|
|
29113
29113
|
const { record, threadId, resourceId, messages } = this.opts;
|
|
29114
29114
|
const messageTokens = await this.tokenCounter.countMessagesAsync(messages);
|
|
29115
|
-
await this.storage.updateBufferedObservations({
|
|
29115
|
+
await withRetry(() => this.storage.updateBufferedObservations({
|
|
29116
29116
|
id: record.id,
|
|
29117
29117
|
chunk: {
|
|
29118
29118
|
cycleId: this.cycleId,
|
|
@@ -29128,6 +29128,9 @@ var AsyncBufferObservationStrategy = class extends ObservationStrategy {
|
|
|
29128
29128
|
extractionFailures: processed.extractionFailures
|
|
29129
29129
|
},
|
|
29130
29130
|
lastBufferedAtTime: processed.lastObservedAt
|
|
29131
|
+
}), {
|
|
29132
|
+
label: "persist-buffered-observations",
|
|
29133
|
+
abortSignal: this.opts.abortSignal
|
|
29131
29134
|
});
|
|
29132
29135
|
await this.indexObservationGroups(processed.observations, threadId, resourceId, processed.lastObservedAt);
|
|
29133
29136
|
const newTitle = processed.threadTitle?.trim();
|
|
@@ -46818,4 +46821,4 @@ const agentBuilderWorkflows = {
|
|
|
46818
46821
|
//#endregion
|
|
46819
46822
|
exports.agentBuilderWorkflows = agentBuilderWorkflows;
|
|
46820
46823
|
|
|
46821
|
-
//# sourceMappingURL=dist-
|
|
46824
|
+
//# sourceMappingURL=dist-DPu6oGri.cjs.map
|