@mastra/server 1.75.0-alpha.1 → 1.75.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.
Files changed (120) hide show
  1. package/dist/{agent-versions-BA8ug-Iy.js → agent-versions-CTAEDQuT.js} +3 -3
  2. package/dist/agent-versions-CTAEDQuT.js.map +1 -0
  3. package/dist/{agent-versions-BNqDvnn0.cjs → agent-versions-RvvNdlZk.cjs} +3 -3
  4. package/dist/agent-versions-RvvNdlZk.cjs.map +1 -0
  5. package/dist/{api-schema-manifest-Cg5BAmJ6.js → api-schema-manifest-B0p6nxU1.js} +2 -2
  6. package/dist/{api-schema-manifest-Cg5BAmJ6.js.map → api-schema-manifest-B0p6nxU1.js.map} +1 -1
  7. package/dist/{api-schema-manifest-hJw56vOw.cjs → api-schema-manifest-D9_jxxNw.cjs} +2 -2
  8. package/dist/{api-schema-manifest-hJw56vOw.cjs.map → api-schema-manifest-D9_jxxNw.cjs.map} +1 -1
  9. package/dist/{dist-BKGwFBci.js → dist-5xXLv6KR.js} +8 -8
  10. package/dist/{dist-BKGwFBci.js.map → dist-5xXLv6KR.js.map} +1 -1
  11. package/dist/{dist-DJ7t3yBx.js → dist-8fx1_bLF.js} +3 -3
  12. package/dist/{dist-DJ7t3yBx.js.map → dist-8fx1_bLF.js.map} +1 -1
  13. package/dist/{dist-DL6nu99w.cjs → dist-B6rOIYr_.cjs} +8 -8
  14. package/dist/{dist-DL6nu99w.cjs.map → dist-B6rOIYr_.cjs.map} +1 -1
  15. package/dist/{dist-D1rb-p2Y.js → dist-BCTqy9i3.js} +4 -4
  16. package/dist/{dist-D1rb-p2Y.js.map → dist-BCTqy9i3.js.map} +1 -1
  17. package/dist/{dist-DO5NHh-t.cjs → dist-Bw2XgCSY.cjs} +3 -3
  18. package/dist/{dist-DO5NHh-t.cjs.map → dist-Bw2XgCSY.cjs.map} +1 -1
  19. package/dist/{dist-Dx2Qp8Rj.js → dist-Bz4l8I_x.js} +3 -3
  20. package/dist/{dist-Dx2Qp8Rj.js.map → dist-Bz4l8I_x.js.map} +1 -1
  21. package/dist/{dist-DD1mFVAc.js → dist-C5TZXkhS.js} +3 -3
  22. package/dist/dist-C5TZXkhS.js.map +1 -0
  23. package/dist/{dist-B0uCWZUF.cjs → dist-CgemVduI.cjs} +4 -4
  24. package/dist/{dist-B0uCWZUF.cjs.map → dist-CgemVduI.cjs.map} +1 -1
  25. package/dist/{dist-Bl3UrwJs.js → dist-D1oSHJhK.js} +3 -3
  26. package/dist/{dist-Bl3UrwJs.js.map → dist-D1oSHJhK.js.map} +1 -1
  27. package/dist/{dist-vM0zJcP5.cjs → dist-D5O8s1u2.cjs} +3 -3
  28. package/dist/{dist-vM0zJcP5.cjs.map → dist-D5O8s1u2.cjs.map} +1 -1
  29. package/dist/{dist-BQ0VOLA9.cjs → dist-D5mpJHHH.cjs} +3 -3
  30. package/dist/{dist-BQ0VOLA9.cjs.map → dist-D5mpJHHH.cjs.map} +1 -1
  31. package/dist/{dist-CkFmsB2E.cjs → dist-UACuV_1t.cjs} +3 -3
  32. package/dist/{dist-CkFmsB2E.cjs.map → dist-UACuV_1t.cjs.map} +1 -1
  33. package/dist/{dist-DiEECrlS.js → dist-_RnqhYfY.js} +3 -3
  34. package/dist/{dist-DiEECrlS.js.map → dist-_RnqhYfY.js.map} +1 -1
  35. package/dist/{dist-C2u5Kqxy.cjs → dist-tYOY8gEs.cjs} +3 -3
  36. package/dist/dist-tYOY8gEs.cjs.map +1 -0
  37. package/dist/docs/SKILL.md +1 -1
  38. package/dist/docs/assets/SOURCE_MAP.json +1 -1
  39. package/dist/{helpers-8jl_xtug.cjs → helpers-DhvWjBBJ.cjs} +36 -20
  40. package/dist/helpers-DhvWjBBJ.cjs.map +1 -0
  41. package/dist/{helpers-610L0lwQ.js → helpers-DudW6a17.js} +36 -20
  42. package/dist/helpers-DudW6a17.js.map +1 -0
  43. package/dist/{routes-mJga4N4C.cjs → routes-BuiLQCOQ.cjs} +2 -2
  44. package/dist/{routes-mJga4N4C.cjs.map → routes-BuiLQCOQ.cjs.map} +1 -1
  45. package/dist/{routes-obDo67aE.js → routes-CJygX0-a.js} +2 -2
  46. package/dist/{routes-obDo67aE.js.map → routes-CJygX0-a.js.map} +1 -1
  47. package/dist/{schedules-DTYwAXI_.cjs → schedules-Buunf_MT.cjs} +11 -5
  48. package/dist/schedules-Buunf_MT.cjs.map +1 -0
  49. package/dist/{schedules-Cv3CVT2a.js → schedules-OiPV0jLY.js} +11 -5
  50. package/dist/schedules-OiPV0jLY.js.map +1 -0
  51. package/dist/{scorer-versions-nip3xSwF.cjs → scorer-versions-BfGNw7Wp.cjs} +2 -2
  52. package/dist/{scorer-versions-nip3xSwF.cjs.map → scorer-versions-BfGNw7Wp.cjs.map} +1 -1
  53. package/dist/{scorer-versions-CscApWzu.js → scorer-versions-gXsdWw0V.js} +2 -2
  54. package/dist/{scorer-versions-CscApWzu.js.map → scorer-versions-gXsdWw0V.js.map} +1 -1
  55. package/dist/server/auth/helpers.d.ts.map +1 -1
  56. package/dist/server/auth/index.cjs +1 -1
  57. package/dist/server/auth/index.js +1 -1
  58. package/dist/server/handlers/agent-builder.cjs +1 -1
  59. package/dist/server/handlers/agent-builder.js +1 -1
  60. package/dist/server/handlers/agent-versions.cjs +1 -1
  61. package/dist/server/handlers/agent-versions.d.ts +998 -22
  62. package/dist/server/handlers/agent-versions.d.ts.map +1 -1
  63. package/dist/server/handlers/agent-versions.js +1 -1
  64. package/dist/server/handlers/agents.cjs +1 -1
  65. package/dist/server/handlers/agents.d.ts +248 -4
  66. package/dist/server/handlers/agents.d.ts.map +1 -1
  67. package/dist/server/handlers/agents.js +1 -1
  68. package/dist/server/handlers/auth.cjs +1 -1
  69. package/dist/server/handlers/auth.js +1 -1
  70. package/dist/server/handlers/observability-new-endpoints.d.ts +35 -3
  71. package/dist/server/handlers/observability-new-endpoints.d.ts.map +1 -1
  72. package/dist/server/handlers/schedules.cjs +1 -1
  73. package/dist/server/handlers/schedules.d.ts +26 -13
  74. package/dist/server/handlers/schedules.d.ts.map +1 -1
  75. package/dist/server/handlers/schedules.js +1 -1
  76. package/dist/server/handlers/scorer-versions.cjs +1 -1
  77. package/dist/server/handlers/scorer-versions.js +1 -1
  78. package/dist/server/handlers/stored-agent-favorites.cjs +1 -1
  79. package/dist/server/handlers/stored-agent-favorites.js +1 -1
  80. package/dist/server/handlers/stored-agents.cjs +1 -1
  81. package/dist/server/handlers/stored-agents.d.ts +1065 -89
  82. package/dist/server/handlers/stored-agents.d.ts.map +1 -1
  83. package/dist/server/handlers/stored-agents.js +1 -1
  84. package/dist/server/handlers/stored-scorers.cjs +1 -1
  85. package/dist/server/handlers/stored-scorers.js +1 -1
  86. package/dist/server/handlers/system.cjs +1 -1
  87. package/dist/server/handlers/system.js +1 -1
  88. package/dist/server/schemas/agent-versions.d.ts +660 -20
  89. package/dist/server/schemas/agent-versions.d.ts.map +1 -1
  90. package/dist/server/schemas/index.cjs +5 -4
  91. package/dist/server/schemas/index.js +5 -5
  92. package/dist/server/schemas/memory-config.d.ts +130 -0
  93. package/dist/server/schemas/memory-config.d.ts.map +1 -1
  94. package/dist/server/schemas/schedules.d.ts +8 -0
  95. package/dist/server/schemas/schedules.d.ts.map +1 -1
  96. package/dist/server/schemas/stored-agents.d.ts +1430 -150
  97. package/dist/server/schemas/stored-agents.d.ts.map +1 -1
  98. package/dist/server/server-adapter/index.cjs +2 -2
  99. package/dist/server/server-adapter/index.js +2 -2
  100. package/dist/server/server-adapter/routes/observability.d.ts +35 -3
  101. package/dist/server/server-adapter/routes/observability.d.ts.map +1 -1
  102. package/dist/{stored-agents-DTgigNRY.cjs → stored-agents-Dmsel7ey.cjs} +46 -14
  103. package/dist/stored-agents-Dmsel7ey.cjs.map +1 -0
  104. package/dist/{stored-agents-CIdYOdK0.js → stored-agents-ts0bWw8l.js} +41 -15
  105. package/dist/stored-agents-ts0bWw8l.js.map +1 -0
  106. package/dist/{stored-scorers-CziNmnC8.cjs → stored-scorers-DoW6lYh8.cjs} +2 -2
  107. package/dist/{stored-scorers-CziNmnC8.cjs.map → stored-scorers-DoW6lYh8.cjs.map} +1 -1
  108. package/dist/{stored-scorers-DrkDvsU8.js → stored-scorers-DySg7-qS.js} +2 -2
  109. package/dist/{stored-scorers-DrkDvsU8.js.map → stored-scorers-DySg7-qS.js.map} +1 -1
  110. package/package.json +4 -4
  111. package/dist/agent-versions-BA8ug-Iy.js.map +0 -1
  112. package/dist/agent-versions-BNqDvnn0.cjs.map +0 -1
  113. package/dist/dist-C2u5Kqxy.cjs.map +0 -1
  114. package/dist/dist-DD1mFVAc.js.map +0 -1
  115. package/dist/helpers-610L0lwQ.js.map +0 -1
  116. package/dist/helpers-8jl_xtug.cjs.map +0 -1
  117. package/dist/schedules-Cv3CVT2a.js.map +0 -1
  118. package/dist/schedules-DTYwAXI_.cjs.map +0 -1
  119. package/dist/stored-agents-CIdYOdK0.js.map +0 -1
  120. package/dist/stored-agents-DTgigNRY.cjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { t as defaultOptionsSchema } from "./default-options-oSlrqpuP.js";
2
- import { D as toolsConfigSchema, E as toolConfigSchema, T as storedProcessorGraphSchema, f as modelConfigSchema, j as serializedMemoryConfigSchema, l as instructionsSchema, t as conditionalFieldSchema, x as scorerConfigSchema } from "./stored-agents-CIdYOdK0.js";
2
+ import { D as toolsConfigSchema, E as toolConfigSchema, I as storedMemoryRefSchema, T as storedProcessorGraphSchema, f as modelConfigSchema, l as instructionsSchema, t as conditionalFieldSchema, x as scorerConfigSchema } from "./stored-agents-ts0bWw8l.js";
3
3
  import { i as createListVersionsResponseSchema, r as createCompareVersionsResponseSchema } from "./version-common-Co-USxDX.js";
4
4
  import { z } from "zod/v4";
5
5
  //#region src/server/schemas/agent-versions.ts
@@ -36,7 +36,7 @@ const agentVersionSchema = z.object({
36
36
  mcpClients: conditionalFieldSchema(z.record(z.string(), mcpClientToolsConfigSchema)).optional().describe("Map of stored MCP client IDs to their tool configurations — static or conditional"),
37
37
  inputProcessors: conditionalFieldSchema(storedProcessorGraphSchema).optional().describe("Input processor graph — static or conditional"),
38
38
  outputProcessors: conditionalFieldSchema(storedProcessorGraphSchema).optional().describe("Output processor graph — static or conditional"),
39
- memory: conditionalFieldSchema(serializedMemoryConfigSchema).optional().describe("Memory configuration — static or conditional"),
39
+ memory: conditionalFieldSchema(storedMemoryRefSchema).optional().describe("Memory: registered memory reference or inline config — static or conditional"),
40
40
  scorers: conditionalFieldSchema(z.record(z.string(), scorerConfigSchema)).optional().describe("Scorer keys with optional sampling config — static or conditional"),
41
41
  requestContextSchema: z.record(z.string(), z.unknown()).optional().describe("JSON Schema defining valid request context variables"),
42
42
  changedFields: z.array(z.string()).optional().describe("Array of field names that changed from the previous version"),
@@ -71,4 +71,4 @@ const compareVersionsResponseSchema = createCompareVersionsResponseSchema(agentV
71
71
  //#endregion
72
72
  export { getVersionResponseSchema as a, versionIdPathParams as c, createVersionResponseSchema as i, agentVersionSchema as n, listVersionsResponseSchema as o, compareVersionsResponseSchema as r, restoreVersionResponseSchema as s, agentVersionPathParams as t };
73
73
 
74
- //# sourceMappingURL=agent-versions-BA8ug-Iy.js.map
74
+ //# sourceMappingURL=agent-versions-CTAEDQuT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-versions-CTAEDQuT.js","names":[],"sources":["../src/server/schemas/agent-versions.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport { defaultOptionsSchema } from './default-options';\nimport { storedMemoryRefSchema } from './memory-config';\nimport {\n scorerConfigSchema,\n instructionsSchema,\n conditionalFieldSchema,\n modelConfigSchema,\n toolConfigSchema,\n toolsConfigSchema,\n storedProcessorGraphSchema,\n} from './stored-agents';\nimport {\n listVersionsQuerySchema,\n compareVersionsQuerySchema,\n createVersionBodySchema,\n activateVersionResponseSchema,\n deleteVersionResponseSchema,\n versionDiffEntrySchema,\n createListVersionsResponseSchema,\n createCompareVersionsResponseSchema,\n} from './version-common';\n\nconst mcpClientToolsConfigSchema = z.object({\n tools: z.record(z.string(), toolConfigSchema).optional(),\n});\n\n// Re-export shared schemas for backwards compat\nexport {\n listVersionsQuerySchema,\n compareVersionsQuerySchema,\n createVersionBodySchema,\n activateVersionResponseSchema,\n deleteVersionResponseSchema,\n versionDiffEntrySchema,\n};\n\n// ============================================================================\n// Path Parameter Schemas\n// ============================================================================\n\n/**\n * Path parameters for agent version routes\n */\nexport const agentVersionPathParams = z.object({\n agentId: z.string().describe('Unique identifier for the stored agent'),\n});\n\n/**\n * Path parameters for specific version routes\n */\nexport const versionIdPathParams = z.object({\n agentId: z.string().describe('Unique identifier for the stored agent'),\n versionId: z.string().describe('Unique identifier for the version (UUID)'),\n});\n\n// ============================================================================\n// Response Schemas\n// ============================================================================\n\n/**\n * Agent version object schema (full response)\n * Config fields are top-level on the version (no nested snapshot object).\n * Extends StorageAgentSnapshotType fields.\n */\nexport const agentVersionSchema = z.object({\n id: z.string().describe('Unique identifier for the version (UUID)'),\n agentId: z.string().describe('ID of the agent this version belongs to'),\n versionNumber: z.number().describe('Sequential version number (1, 2, 3, ...)'),\n // Top-level config fields (from StorageAgentSnapshotType)\n name: z.string().describe('Name of the agent'),\n description: z.string().optional().describe('Description of the agent'),\n instructions: instructionsSchema,\n model: conditionalFieldSchema(modelConfigSchema).describe(\n 'Model configuration — static value or array of conditional variants',\n ),\n tools: conditionalFieldSchema(toolsConfigSchema)\n .optional()\n .describe('Tool keys mapped to per-tool config — static or conditional'),\n defaultOptions: conditionalFieldSchema(defaultOptionsSchema)\n .optional()\n .describe('Default options for generate/stream calls — static or conditional'),\n workflows: conditionalFieldSchema(z.record(z.string(), toolConfigSchema))\n .optional()\n .describe('Workflow keys with optional per-workflow config — static or conditional'),\n agents: conditionalFieldSchema(z.record(z.string(), toolConfigSchema))\n .optional()\n .describe('Agent keys with optional per-agent config — static or conditional'),\n integrationTools: conditionalFieldSchema(z.record(z.string(), mcpClientToolsConfigSchema))\n .optional()\n .describe('Map of tool provider IDs to their tool configurations — static or conditional'),\n mcpClients: conditionalFieldSchema(z.record(z.string(), mcpClientToolsConfigSchema))\n .optional()\n .describe('Map of stored MCP client IDs to their tool configurations — static or conditional'),\n inputProcessors: conditionalFieldSchema(storedProcessorGraphSchema)\n .optional()\n .describe('Input processor graph — static or conditional'),\n outputProcessors: conditionalFieldSchema(storedProcessorGraphSchema)\n .optional()\n .describe('Output processor graph — static or conditional'),\n memory: conditionalFieldSchema(storedMemoryRefSchema)\n .optional()\n .describe('Memory: registered memory reference or inline config — static or conditional'),\n scorers: conditionalFieldSchema(z.record(z.string(), scorerConfigSchema))\n .optional()\n .describe('Scorer keys with optional sampling config — static or conditional'),\n requestContextSchema: z\n .record(z.string(), z.unknown())\n .optional()\n .describe('JSON Schema defining valid request context variables'),\n // Version metadata fields\n changedFields: z.array(z.string()).optional().describe('Array of field names that changed from the previous version'),\n changeMessage: z.string().optional().describe('Optional message describing the changes'),\n createdAt: z.coerce.date().describe('When this version was created'),\n});\n\n/**\n * Response for GET /stored/agents/:agentId/versions\n */\nexport const listVersionsResponseSchema = createListVersionsResponseSchema(agentVersionSchema);\n\n/**\n * Response for GET /stored/agents/:agentId/versions/:versionId\n */\nexport const getVersionResponseSchema = agentVersionSchema;\n\n/**\n * Response for POST /stored/agents/:agentId/versions\n */\nexport const createVersionResponseSchema = agentVersionSchema.partial().merge(\n z.object({\n // These fields are always present in a version response\n id: z.string().describe('Unique identifier for the version (UUID)'),\n agentId: z.string().describe('ID of the agent this version belongs to'),\n versionNumber: z.number().describe('Sequential version number (1, 2, 3, ...)'),\n createdAt: z.coerce.date().describe('When this version was created'),\n }),\n);\n\n/**\n * Response for POST /stored/agents/:agentId/versions/:versionId/restore\n */\nexport const restoreVersionResponseSchema = agentVersionSchema.describe(\n 'The newly created version from the restored configuration',\n);\n\n/**\n * Response for GET /stored/agents/:agentId/versions/compare\n */\nexport const compareVersionsResponseSchema: ReturnType<\n typeof createCompareVersionsResponseSchema<typeof agentVersionSchema>\n> =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,MAAa,gCAET,oCAAoC,kBAAkB"}
@@ -1,5 +1,5 @@
1
1
  const require_default_options = require("./default-options-C7tykjLq.cjs");
2
- const require_stored_agents = require("./stored-agents-DTgigNRY.cjs");
2
+ const require_stored_agents = require("./stored-agents-Dmsel7ey.cjs");
3
3
  const require_version_common = require("./version-common-Bu42Y2QN.cjs");
4
4
  let zod_v4 = require("zod/v4");
5
5
  //#region src/server/schemas/agent-versions.ts
@@ -36,7 +36,7 @@ const agentVersionSchema = zod_v4.z.object({
36
36
  mcpClients: require_stored_agents.conditionalFieldSchema(zod_v4.z.record(zod_v4.z.string(), mcpClientToolsConfigSchema)).optional().describe("Map of stored MCP client IDs to their tool configurations — static or conditional"),
37
37
  inputProcessors: require_stored_agents.conditionalFieldSchema(require_stored_agents.storedProcessorGraphSchema).optional().describe("Input processor graph — static or conditional"),
38
38
  outputProcessors: require_stored_agents.conditionalFieldSchema(require_stored_agents.storedProcessorGraphSchema).optional().describe("Output processor graph — static or conditional"),
39
- memory: require_stored_agents.conditionalFieldSchema(require_stored_agents.serializedMemoryConfigSchema).optional().describe("Memory configuration — static or conditional"),
39
+ memory: require_stored_agents.conditionalFieldSchema(require_stored_agents.storedMemoryRefSchema).optional().describe("Memory: registered memory reference or inline config — static or conditional"),
40
40
  scorers: require_stored_agents.conditionalFieldSchema(zod_v4.z.record(zod_v4.z.string(), require_stored_agents.scorerConfigSchema)).optional().describe("Scorer keys with optional sampling config — static or conditional"),
41
41
  requestContextSchema: zod_v4.z.record(zod_v4.z.string(), zod_v4.z.unknown()).optional().describe("JSON Schema defining valid request context variables"),
42
42
  changedFields: zod_v4.z.array(zod_v4.z.string()).optional().describe("Array of field names that changed from the previous version"),
@@ -118,4 +118,4 @@ Object.defineProperty(exports, "versionIdPathParams", {
118
118
  }
119
119
  });
120
120
 
121
- //# sourceMappingURL=agent-versions-BNqDvnn0.cjs.map
121
+ //# sourceMappingURL=agent-versions-RvvNdlZk.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-versions-RvvNdlZk.cjs","names":["z","toolConfigSchema","instructionsSchema","conditionalFieldSchema","modelConfigSchema","toolsConfigSchema","defaultOptionsSchema","storedProcessorGraphSchema","storedMemoryRefSchema","scorerConfigSchema","createListVersionsResponseSchema","createCompareVersionsResponseSchema"],"sources":["../src/server/schemas/agent-versions.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport { defaultOptionsSchema } from './default-options';\nimport { storedMemoryRefSchema } from './memory-config';\nimport {\n scorerConfigSchema,\n instructionsSchema,\n conditionalFieldSchema,\n modelConfigSchema,\n toolConfigSchema,\n toolsConfigSchema,\n storedProcessorGraphSchema,\n} from './stored-agents';\nimport {\n listVersionsQuerySchema,\n compareVersionsQuerySchema,\n createVersionBodySchema,\n activateVersionResponseSchema,\n deleteVersionResponseSchema,\n versionDiffEntrySchema,\n createListVersionsResponseSchema,\n createCompareVersionsResponseSchema,\n} from './version-common';\n\nconst mcpClientToolsConfigSchema = z.object({\n tools: z.record(z.string(), toolConfigSchema).optional(),\n});\n\n// Re-export shared schemas for backwards compat\nexport {\n listVersionsQuerySchema,\n compareVersionsQuerySchema,\n createVersionBodySchema,\n activateVersionResponseSchema,\n deleteVersionResponseSchema,\n versionDiffEntrySchema,\n};\n\n// ============================================================================\n// Path Parameter Schemas\n// ============================================================================\n\n/**\n * Path parameters for agent version routes\n */\nexport const agentVersionPathParams = z.object({\n agentId: z.string().describe('Unique identifier for the stored agent'),\n});\n\n/**\n * Path parameters for specific version routes\n */\nexport const versionIdPathParams = z.object({\n agentId: z.string().describe('Unique identifier for the stored agent'),\n versionId: z.string().describe('Unique identifier for the version (UUID)'),\n});\n\n// ============================================================================\n// Response Schemas\n// ============================================================================\n\n/**\n * Agent version object schema (full response)\n * Config fields are top-level on the version (no nested snapshot object).\n * Extends StorageAgentSnapshotType fields.\n */\nexport const agentVersionSchema = z.object({\n id: z.string().describe('Unique identifier for the version (UUID)'),\n agentId: z.string().describe('ID of the agent this version belongs to'),\n versionNumber: z.number().describe('Sequential version number (1, 2, 3, ...)'),\n // Top-level config fields (from StorageAgentSnapshotType)\n name: z.string().describe('Name of the agent'),\n description: z.string().optional().describe('Description of the agent'),\n instructions: instructionsSchema,\n model: conditionalFieldSchema(modelConfigSchema).describe(\n 'Model configuration — static value or array of conditional variants',\n ),\n tools: conditionalFieldSchema(toolsConfigSchema)\n .optional()\n .describe('Tool keys mapped to per-tool config — static or conditional'),\n defaultOptions: conditionalFieldSchema(defaultOptionsSchema)\n .optional()\n .describe('Default options for generate/stream calls — static or conditional'),\n workflows: conditionalFieldSchema(z.record(z.string(), toolConfigSchema))\n .optional()\n .describe('Workflow keys with optional per-workflow config — static or conditional'),\n agents: conditionalFieldSchema(z.record(z.string(), toolConfigSchema))\n .optional()\n .describe('Agent keys with optional per-agent config — static or conditional'),\n integrationTools: conditionalFieldSchema(z.record(z.string(), mcpClientToolsConfigSchema))\n .optional()\n .describe('Map of tool provider IDs to their tool configurations — static or conditional'),\n mcpClients: conditionalFieldSchema(z.record(z.string(), mcpClientToolsConfigSchema))\n .optional()\n .describe('Map of stored MCP client IDs to their tool configurations — static or conditional'),\n inputProcessors: conditionalFieldSchema(storedProcessorGraphSchema)\n .optional()\n .describe('Input processor graph — static or conditional'),\n outputProcessors: conditionalFieldSchema(storedProcessorGraphSchema)\n .optional()\n .describe('Output processor graph — static or conditional'),\n memory: conditionalFieldSchema(storedMemoryRefSchema)\n .optional()\n .describe('Memory: registered memory reference or inline config — static or conditional'),\n scorers: conditionalFieldSchema(z.record(z.string(), scorerConfigSchema))\n .optional()\n .describe('Scorer keys with optional sampling config — static or conditional'),\n requestContextSchema: z\n .record(z.string(), z.unknown())\n .optional()\n .describe('JSON Schema defining valid request context variables'),\n // Version metadata fields\n changedFields: z.array(z.string()).optional().describe('Array of field names that changed from the previous version'),\n changeMessage: z.string().optional().describe('Optional message describing the changes'),\n createdAt: z.coerce.date().describe('When this version was created'),\n});\n\n/**\n * Response for GET /stored/agents/:agentId/versions\n */\nexport const listVersionsResponseSchema = createListVersionsResponseSchema(agentVersionSchema);\n\n/**\n * Response for GET /stored/agents/:agentId/versions/:versionId\n */\nexport const getVersionResponseSchema = agentVersionSchema;\n\n/**\n * Response for POST /stored/agents/:agentId/versions\n */\nexport const createVersionResponseSchema = agentVersionSchema.partial().merge(\n z.object({\n // These fields are always present in a version response\n id: z.string().describe('Unique identifier for the version (UUID)'),\n agentId: z.string().describe('ID of the agent this version belongs to'),\n versionNumber: z.number().describe('Sequential version number (1, 2, 3, ...)'),\n createdAt: z.coerce.date().describe('When this version was created'),\n }),\n);\n\n/**\n * Response for POST /stored/agents/:agentId/versions/:versionId/restore\n */\nexport const restoreVersionResponseSchema = agentVersionSchema.describe(\n 'The newly created version from the restored configuration',\n);\n\n/**\n * Response for GET /stored/agents/:agentId/versions/compare\n */\nexport const compareVersionsResponseSchema: ReturnType<\n typeof createCompareVersionsResponseSchema<typeof agentVersionSchema>\n> = createCompareVersionsResponseSchema(agentVersionSchema);\n"],"mappings":";;;;;AAuBA,MAAM,6BAA6BA,OAAAA,EAAE,OAAO,EAC1C,OAAOA,OAAAA,EAAE,OAAOA,OAAAA,EAAE,OAAO,GAAGC,sBAAAA,gBAAgB,CAAC,CAAC,SAAS,EACzD,CAAC;;;;AAmBD,MAAa,yBAAyBD,OAAAA,EAAE,OAAO,EAC7C,SAASA,OAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,EACvE,CAAC;;;;AAKD,MAAa,sBAAsBA,OAAAA,EAAE,OAAO;CAC1C,SAASA,OAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC;CACrE,WAAWA,OAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C;AAC3E,CAAC;;;;;;AAWD,MAAa,qBAAqBA,OAAAA,EAAE,OAAO;CACzC,IAAIA,OAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C;CAClE,SAASA,OAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC;CAC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es-obDo67aE.js";
2
+ import { t as SERVER_ROUTES } from "./routes-CJygX0-a.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-Cg5BAmJ6.js.map
55
+ //# sourceMappingURL=api-schema-manifest-B0p6nxU1.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-schema-manifest-Cg5BAmJ6.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"}
1
+ {"version":3,"file":"api-schema-manifest-B0p6nxU1.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"}
@@ -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-mJga4N4C.cjs");
3
+ const require_routes = require("./routes-BuiLQCOQ.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-hJw56vOw.cjs.map
56
+ //# sourceMappingURL=api-schema-manifest-D9_jxxNw.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-schema-manifest-hJw56vOw.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
+ {"version":3,"file":"api-schema-manifest-D9_jxxNw.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,I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,YAAY,cAAc,MAAM,UAAU;IAC1C;IACA,eAAe,mBAAmB,cAAc;GAClD;EACF,CAAC;CACH;AACF"}
@@ -2,7 +2,7 @@ import { o as __toESM$1, t as __commonJSMin$1 } from "./rolldown-runtime-maW3aOI
2
2
  import { n as standardSchemaToJSONSchema, r as toStandardSchema$1, t as isStandardSchemaWithJSON$1 } from "./schema-e0VHpMt0-CvPvLS06.js";
3
3
  import "./schema-Xxr5X5Je.js";
4
4
  import { t as require_sync } from "./sync-BG15Yae1.js";
5
- import { openai } from "./dist-Dx2Qp8Rj.js";
5
+ import { openai } from "./dist-Bz4l8I_x.js";
6
6
  import { createRequire } from "module";
7
7
  import * as z4 from "zod/v4";
8
8
  import { z } from "zod/v4";
@@ -4637,7 +4637,7 @@ function splitLines(text) {
4637
4637
  return result;
4638
4638
  }
4639
4639
  //#endregion
4640
- //#region ../memory/dist/src-CFTlELNa.js
4640
+ //#region ../memory/dist/src-DPOcJ6r0.js
4641
4641
  var __defProp$3 = Object.defineProperty;
4642
4642
  var __exportAll = (all, no_symbols) => {
4643
4643
  let target = {};
@@ -40444,23 +40444,23 @@ const createModelInstance = async (provider, modelId, version = "v2") => {
40444
40444
  try {
40445
40445
  const providerFn = version === `v1` ? { v1: {
40446
40446
  openai: async () => {
40447
- const { openai } = await import("./dist-Dx2Qp8Rj.js");
40447
+ const { openai } = await import("./dist-Bz4l8I_x.js");
40448
40448
  return openai(modelId);
40449
40449
  },
40450
40450
  anthropic: async () => {
40451
- const { anthropic } = await import("./dist-Bl3UrwJs.js");
40451
+ const { anthropic } = await import("./dist-D1oSHJhK.js");
40452
40452
  return anthropic(modelId);
40453
40453
  },
40454
40454
  groq: async () => {
40455
- const { groq } = await import("./dist-DiEECrlS.js");
40455
+ const { groq } = await import("./dist-_RnqhYfY.js");
40456
40456
  return groq(modelId);
40457
40457
  },
40458
40458
  xai: async () => {
40459
- const { xai } = await import("./dist-D1rb-p2Y.js");
40459
+ const { xai } = await import("./dist-BCTqy9i3.js");
40460
40460
  return xai(modelId);
40461
40461
  },
40462
40462
  google: async () => {
40463
- const { google } = await import("./dist-DJ7t3yBx.js");
40463
+ const { google } = await import("./dist-8fx1_bLF.js");
40464
40464
  return google(modelId);
40465
40465
  }
40466
40466
  } }[version][provider] : () => new ModelRouterLanguageModel(`${provider}/${modelId}`);
@@ -50437,4 +50437,4 @@ const agentBuilderWorkflows = {
50437
50437
  //#endregion
50438
50438
  export { agentBuilderWorkflows };
50439
50439
 
50440
- //# sourceMappingURL=dist-BKGwFBci.js.map
50440
+ //# sourceMappingURL=dist-5xXLv6KR.js.map