@mastra/server 1.25.0-alpha.2 → 1.25.0
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/CHANGELOG.md +37 -0
- package/dist/_types/@internal_core/dist/index.d.ts +133 -1
- package/dist/{chunk-GXFIXDFL.cjs → chunk-24VJHE45.cjs} +20 -20
- package/dist/{chunk-GXFIXDFL.cjs.map → chunk-24VJHE45.cjs.map} +1 -1
- package/dist/{chunk-XAQFSUUI.js → chunk-2RC624RU.js} +4 -3
- package/dist/chunk-2RC624RU.js.map +1 -0
- package/dist/{chunk-GOWBOBJQ.cjs → chunk-7Q5EF4YL.cjs} +29 -29
- package/dist/{chunk-GOWBOBJQ.cjs.map → chunk-7Q5EF4YL.cjs.map} +1 -1
- package/dist/{chunk-LYWILBPQ.cjs → chunk-AUOLHRVZ.cjs} +12 -2
- package/dist/chunk-AUOLHRVZ.cjs.map +1 -0
- package/dist/{chunk-ZUE6UM4G.js → chunk-FJ4PYS2Y.js} +3 -3
- package/dist/{chunk-ZUE6UM4G.js.map → chunk-FJ4PYS2Y.js.map} +1 -1
- package/dist/{chunk-QOTCV5IU.js → chunk-J3GI6BPX.js} +7 -3
- package/dist/chunk-J3GI6BPX.js.map +1 -0
- package/dist/{chunk-4WDIYJVY.js → chunk-JFVESFFY.js} +5 -5
- package/dist/{chunk-4WDIYJVY.js.map → chunk-JFVESFFY.js.map} +1 -1
- package/dist/{chunk-BW3VXQTH.js → chunk-NCVXAT2D.js} +12 -2
- package/dist/chunk-NCVXAT2D.js.map +1 -0
- package/dist/{chunk-XEDMM24R.cjs → chunk-PNMZ2R5P.cjs} +7 -3
- package/dist/chunk-PNMZ2R5P.cjs.map +1 -0
- package/dist/{chunk-GEPOXL25.cjs → chunk-Z4PPU3CR.cjs} +4 -3
- package/dist/chunk-Z4PPU3CR.cjs.map +1 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/{observational-memory-H74M5SB6-NOBB6S7C.js → observational-memory-4TDIBXK6-H3GGM2SP.js} +3 -3
- package/dist/{observational-memory-H74M5SB6-NOBB6S7C.js.map → observational-memory-4TDIBXK6-H3GGM2SP.js.map} +1 -1
- package/dist/{observational-memory-H74M5SB6-ELUPJE5K.cjs → observational-memory-4TDIBXK6-LKQTCHRF.cjs} +26 -26
- package/dist/{observational-memory-H74M5SB6-ELUPJE5K.cjs.map → observational-memory-4TDIBXK6-LKQTCHRF.cjs.map} +1 -1
- package/dist/server/handlers/agent-builder.cjs +16 -16
- package/dist/server/handlers/agent-builder.js +1 -1
- package/dist/server/handlers/observability-new-endpoints.cjs +27 -27
- package/dist/server/handlers/observability-new-endpoints.d.ts +204 -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.cjs +33 -33
- package/dist/server/handlers/observability.d.ts +12 -0
- package/dist/server/handlers/observability.d.ts.map +1 -1
- package/dist/server/handlers/observability.js +2 -2
- package/dist/server/handlers/vector.cjs +16 -16
- package/dist/server/handlers/vector.js +1 -1
- package/dist/server/handlers.cjs +6 -6
- package/dist/server/handlers.js +3 -3
- package/dist/server/server-adapter/index.cjs +57 -57
- package/dist/server/server-adapter/index.js +4 -4
- package/dist/server/server-adapter/routes/observability.d.ts +114 -0
- package/dist/server/server-adapter/routes/observability.d.ts.map +1 -1
- package/package.json +8 -8
- package/dist/chunk-BW3VXQTH.js.map +0 -1
- package/dist/chunk-GEPOXL25.cjs.map +0 -1
- package/dist/chunk-LYWILBPQ.cjs.map +0 -1
- package/dist/chunk-QOTCV5IU.js.map +0 -1
- package/dist/chunk-XAQFSUUI.js.map +0 -1
- package/dist/chunk-XEDMM24R.cjs.map +0 -1
|
@@ -76,6 +76,9 @@ var parentEntityNameField = z.string().describe("Name of the parent entity");
|
|
|
76
76
|
var rootEntityTypeField = z.nativeEnum(EntityType).describe("Entity type of the root entity");
|
|
77
77
|
var rootEntityIdField = z.string().describe("ID of the root entity");
|
|
78
78
|
var rootEntityNameField = z.string().describe("Name of the root entity");
|
|
79
|
+
var entityVersionIdField = z.string().describe("Version ID of the entity that produced this signal (e.g., agent version, workflow version)");
|
|
80
|
+
var parentEntityVersionIdField = z.string().describe("Version ID of the parent entity that produced this signal");
|
|
81
|
+
var rootEntityVersionIdField = z.string().describe("Version ID of the root entity that produced this signal");
|
|
79
82
|
var experimentIdField = z.string().describe("Experiment or eval run identifier");
|
|
80
83
|
var scopeField = z.record(z.string(), z.unknown()).describe('Arbitrary package/app version info (e.g., {"core": "1.0.0", "memory": "1.0.0", "gitSha": "abcd1234"})');
|
|
81
84
|
var metadataField = z.record(z.string(), z.unknown()).describe("User-defined metadata for custom filtering");
|
|
@@ -106,6 +109,10 @@ var contextFieldsBase = {
|
|
|
106
109
|
environment: environmentField.nullish(),
|
|
107
110
|
serviceName: serviceNameField.nullish(),
|
|
108
111
|
scope: scopeField.nullish(),
|
|
112
|
+
// Entity versioning
|
|
113
|
+
entityVersionId: entityVersionIdField.nullish(),
|
|
114
|
+
parentEntityVersionId: parentEntityVersionIdField.nullish(),
|
|
115
|
+
rootEntityVersionId: rootEntityVersionIdField.nullish(),
|
|
109
116
|
// Experimentation
|
|
110
117
|
experimentId: experimentIdField.nullish()
|
|
111
118
|
};
|
|
@@ -123,6 +130,9 @@ var commonFilterFields = {
|
|
|
123
130
|
spanId: z.string().optional().describe("Filter by span ID"),
|
|
124
131
|
entityType: entityTypeField.optional(),
|
|
125
132
|
entityName: entityNameField.optional(),
|
|
133
|
+
entityVersionId: entityVersionIdField.optional(),
|
|
134
|
+
parentEntityVersionId: parentEntityVersionIdField.optional(),
|
|
135
|
+
rootEntityVersionId: rootEntityVersionIdField.optional(),
|
|
126
136
|
userId: userIdField.optional(),
|
|
127
137
|
organizationId: organizationIdField.optional(),
|
|
128
138
|
experimentId: experimentIdField.optional(),
|
|
@@ -979,5 +989,5 @@ var NEW_ROUTES = {
|
|
|
979
989
|
};
|
|
980
990
|
|
|
981
991
|
export { CREATE_FEEDBACK, CREATE_SCORE, GET_ENTITY_NAMES, GET_ENTITY_TYPES, GET_ENVIRONMENTS, GET_FEEDBACK_AGGREGATE, GET_FEEDBACK_BREAKDOWN, GET_FEEDBACK_PERCENTILES, GET_FEEDBACK_TIME_SERIES, GET_METRIC_AGGREGATE, GET_METRIC_BREAKDOWN, GET_METRIC_LABEL_KEYS, GET_METRIC_LABEL_VALUES, GET_METRIC_NAMES, GET_METRIC_PERCENTILES, GET_METRIC_TIME_SERIES, GET_SCORE_AGGREGATE, GET_SCORE_BREAKDOWN, GET_SCORE_PERCENTILES, GET_SCORE_TIME_SERIES, GET_SERVICE_NAMES, GET_TAGS, LIST_FEEDBACK, LIST_LOGS, LIST_SCORES, NEW_ROUTES };
|
|
982
|
-
//# sourceMappingURL=chunk-
|
|
983
|
-
//# sourceMappingURL=chunk-
|
|
992
|
+
//# sourceMappingURL=chunk-NCVXAT2D.js.map
|
|
993
|
+
//# sourceMappingURL=chunk-NCVXAT2D.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../_internal-core/src/storage/domains/shared.ts","../../_internal-core/src/storage/domains/observability/logs.ts","../../_internal-core/src/storage/domains/observability/scores.ts","../../_internal-core/src/storage/domains/observability/feedback.ts","../../_internal-core/src/storage/domains/observability/metrics.ts","../../_internal-core/src/storage/domains/observability/discovery.ts","../src/server/handlers/observability-new-endpoints.ts"],"names":["EntityType","z"],"mappings":";;;;;;;AAGO,IAAK,UAAA,qBAAAA,WAAAA,KAAL;AAELA,EAAAA,WAAAA,CAAA,OAAA,CAAA,GAAQ,OAAA;AAERA,EAAAA,WAAAA,CAAA,QAAA,CAAA,GAAS,QAAA;AAETA,EAAAA,WAAAA,CAAA,YAAA,CAAA,GAAa,YAAA;AAEbA,EAAAA,WAAAA,CAAA,iBAAA,CAAA,GAAkB,iBAAA;AAElBA,EAAAA,WAAAA,CAAA,sBAAA,CAAA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entities that can produce observability spans. */\nexport enum EntityType {\n /** Agent/Model execution */\n AGENT = 'agent',\n /** Scorer definition/execution */\n SCORER = 'scorer',\n /** Trajectory evaluation target */\n TRAJECTORY = 'trajectory',\n /** Input Processor */\n INPUT_PROCESSOR = 'input_processor',\n /** Input Step Processor */\n INPUT_STEP_PROCESSOR = 'input_step_processor',\n /** Output Processor */\n OUTPUT_PROCESSOR = 'output_processor',\n /** Output Step Processor */\n OUTPUT_STEP_PROCESSOR = 'output_step_processor',\n /** Workflow Step */\n WORKFLOW_STEP = 'workflow_step',\n /** Tool */\n TOOL = 'tool',\n /** Workflow */\n WORKFLOW_RUN = 'workflow_run',\n /** Memory */\n MEMORY = 'memory',\n}\n\n/**\n * Common DB fields\n */\nexport const createdAtField = z.date().describe('Database record creation time');\n\nexport const updatedAtField = z.date().describe('Database record last update time');\n\nexport const dbTimestamps = {\n createdAt: createdAtField,\n updatedAt: updatedAtField.nullable(),\n} as const satisfies z.ZodRawShape;\n\n/**\n * Pagination arguments for list queries (page and perPage only)\n * Uses z.coerce to handle string → number conversion from query params\n */\nexport const paginationArgsSchema = z\n .object({\n page: z.coerce.number().int().min(0).optional().default(0).describe('Zero-indexed page number'),\n perPage: z.coerce.number().int().min(1).max(100).optional().default(10).describe('Number of items per page'),\n })\n .describe('Pagination options for list queries');\n\n/** Input type for pagination arguments (page and perPage). */\nexport type PaginationArgs = z.input<typeof paginationArgsSchema>;\n\n/**\n * Pagination response info\n * Used across all paginated endpoints\n */\nexport const paginationInfoSchema = z.object({\n total: z.number().describe('Total number of items available'),\n page: z.number().describe('Current page'),\n perPage: z\n .union([z.number(), z.literal(false)])\n .describe('Number of items per page, or false if pagination is disabled'),\n hasMore: z.boolean().describe('True if more pages are available'),\n});\n\n/**\n * Date range for filtering by time\n * Uses z.coerce to handle ISO string → Date conversion from query params\n */\nexport const dateRangeSchema = z\n .object({\n start: z.coerce.date().optional().describe('Start of date range (inclusive by default)'),\n end: z.coerce.date().optional().describe('End of date range (inclusive by default)'),\n startExclusive: z\n .boolean()\n .optional()\n .describe('When true, excludes the start date from results (uses > instead of >=)'),\n endExclusive: z\n .boolean()\n .optional()\n .describe('When true, excludes the end date from results (uses < instead of <=)'),\n })\n .describe('Date range filter for timestamps');\n\n/** Date range with optional inclusive/exclusive boundaries. */\nexport type DateRange = z.input<typeof dateRangeSchema>;\n\nexport const sortDirectionSchema = z.enum(['ASC', 'DESC']).describe(\"Sort direction: 'ASC' | 'DESC'\");\n\n/** Aggregation type schema shared across OLAP-style observability queries. */\nexport const aggregationTypeSchema = z\n .enum(['sum', 'avg', 'min', 'max', 'count', 'last'])\n .describe('Aggregation function');\nexport type AggregationType = z.infer<typeof aggregationTypeSchema>;\n\n/** Aggregation interval schema shared across OLAP-style observability queries. */\nexport const aggregationIntervalSchema = z.enum(['1m', '5m', '15m', '1h', '1d']).describe('Time bucket interval');\nexport type AggregationInterval = z.infer<typeof aggregationIntervalSchema>;\n\n/** Compare period for aggregate queries with period-over-period comparison. */\nexport const comparePeriodSchema = z\n .enum(['previous_period', 'previous_day', 'previous_week'])\n .describe('Comparison period for aggregate queries');\nexport type ComparePeriod = z.infer<typeof comparePeriodSchema>;\n\n/** Shared groupBy schema for OLAP-style breakdown and time-series queries. */\nexport const groupBySchema = z.array(z.string()).min(1).describe('Fields to group by');\nexport type GroupBy = z.infer<typeof groupBySchema>;\n\n/** Shared percentiles schema for percentile queries. */\nexport const percentilesSchema = z.array(z.number().min(0).max(1)).min(1).describe('Percentile values (0-1)');\nexport type Percentiles = z.infer<typeof percentilesSchema>;\n\n/** Shared fields for aggregate OLAP responses across observability signals. */\nexport const aggregateResponseFields = {\n value: z.number().nullable().describe('Aggregated value'),\n previousValue: z.number().nullable().optional().describe('Value from comparison period'),\n changePercent: z.number().nullable().optional().describe('Percentage change from comparison period'),\n} as const;\n\n/** Shared field for OLAP breakdown dimension values. */\nexport const dimensionsField = z.record(z.string(), z.string().nullable()).describe('Dimension values for this group');\n\n/** Shared field for non-null OLAP aggregated values. */\nexport const aggregatedValueField = z.number().describe('Aggregated value');\n\n/** Shared field for OLAP bucket timestamps. */\nexport const bucketTimestampField = z.date().describe('Bucket timestamp');\n\n/** Shared field for percentile identifiers in OLAP responses. */\nexport const percentileField = z.number().describe('Percentile value');\n\n/** Shared field for percentile values within a time bucket. */\nexport const percentileBucketValueField = z.number().describe('Percentile value at this bucket');\n\nexport const entityTypeField = z\n .nativeEnum(EntityType)\n .describe(`Entity type (e.g., 'agent' | 'processor' | 'tool' | 'workflow')`);\n\nexport const entityIdField = z.string().describe('ID of the entity (e.g., \"weatherAgent\", \"orderWorkflow\")');\n\nexport const entityNameField = z.string().describe('Name of the entity');\n\nexport const userIdField = z.string().describe('Human end-user who triggered execution');\n\nexport const organizationIdField = z.string().describe('Multi-tenant organization/account');\n\nexport const resourceIdField = z.string().describe('Broader resource context (Mastra memory compatibility)');\n\nexport const runIdField = z.string().describe('Unique execution run identifier');\n\nexport const sessionIdField = z.string().describe('Session identifier for grouping traces');\n\nexport const threadIdField = z.string().describe('Conversation thread identifier');\n\nexport const requestIdField = z.string().describe('HTTP request ID for log correlation');\n\nexport const environmentField = z.string().describe(`Environment (e.g., \"production\" | \"staging\" | \"development\")`);\n\nexport const sourceField = z.string().describe(`Source of execution (e.g., \"local\" | \"cloud\" | \"ci\")`);\nexport const executionSourceField = z.string().describe(`Source of execution (e.g., \"local\" | \"cloud\" | \"ci\")`);\n\nexport const serviceNameField = z.string().describe('Name of the service');\n\n// Parent entity hierarchy fields\nexport const parentEntityTypeField = z.nativeEnum(EntityType).describe('Entity type of the parent entity');\nexport const parentEntityIdField = z.string().describe('ID of the parent entity');\nexport const parentEntityNameField = z.string().describe('Name of the parent entity');\n\n// Root entity hierarchy fields\nexport const rootEntityTypeField = z.nativeEnum(EntityType).describe('Entity type of the root entity');\nexport const rootEntityIdField = z.string().describe('ID of the root entity');\nexport const rootEntityNameField = z.string().describe('Name of the root entity');\n\n// Entity versioning\nexport const entityVersionIdField = z\n .string()\n .describe('Version ID of the entity that produced this signal (e.g., agent version, workflow version)');\nexport const parentEntityVersionIdField = z\n .string()\n .describe('Version ID of the parent entity that produced this signal');\nexport const rootEntityVersionIdField = z.string().describe('Version ID of the root entity that produced this signal');\n\n// Experimentation\nexport const experimentIdField = z.string().describe('Experiment or eval run identifier');\n\n// ============================================================================\n// Common observability fields (shared across tracing, metrics, logs)\n// ============================================================================\n\nexport const scopeField = z\n .record(z.string(), z.unknown())\n .describe('Arbitrary package/app version info (e.g., {\"core\": \"1.0.0\", \"memory\": \"1.0.0\", \"gitSha\": \"abcd1234\"})');\n\nexport const metadataField = z.record(z.string(), z.unknown()).describe('User-defined metadata for custom filtering');\n\nexport const tagsField = z.array(z.string()).describe('Labels for filtering');\n\n/**\n * Base context fields shared across tracing and non-tracing observability records.\n * Source/provenance is intentionally excluded because tracing uses `source`\n * while signals use `executionSource`.\n */\nconst contextFieldsBase = {\n // Entity identification\n entityType: entityTypeField.nullish(),\n entityId: entityIdField.nullish(),\n entityName: entityNameField.nullish(),\n\n // Parent entity hierarchy\n parentEntityType: parentEntityTypeField.nullish(),\n parentEntityId: parentEntityIdField.nullish(),\n parentEntityName: parentEntityNameField.nullish(),\n\n // Root entity hierarchy\n rootEntityType: rootEntityTypeField.nullish(),\n rootEntityId: rootEntityIdField.nullish(),\n rootEntityName: rootEntityNameField.nullish(),\n\n // Identity & tenancy\n userId: userIdField.nullish(),\n organizationId: organizationIdField.nullish(),\n resourceId: resourceIdField.nullish(),\n\n // Correlation IDs\n runId: runIdField.nullish(),\n sessionId: sessionIdField.nullish(),\n threadId: threadIdField.nullish(),\n requestId: requestIdField.nullish(),\n\n // Deployment context\n environment: environmentField.nullish(),\n serviceName: serviceNameField.nullish(),\n scope: scopeField.nullish(),\n\n // Entity versioning\n entityVersionId: entityVersionIdField.nullish(),\n parentEntityVersionId: parentEntityVersionIdField.nullish(),\n rootEntityVersionId: rootEntityVersionIdField.nullish(),\n\n // Experimentation\n experimentId: experimentIdField.nullish(),\n} as const;\n\n/**\n * Context fields shared across observability signals other than spans (metrics, logs, scores, feedback).\n * These use `executionSource` to avoid colliding with signal-specific provenance fields.\n */\nexport const contextFields = {\n ...contextFieldsBase,\n executionSource: executionSourceField.nullish(),\n tags: tagsField.nullish(),\n} as const;\n\n/**\n * Context fields used by tracing/span records.\n * Tracing continues to expose execution provenance as `source`.\n */\nexport const spanContextFields = {\n ...contextFieldsBase,\n source: sourceField.nullish(),\n} as const;\n\n/**\n * Common filter fields shared across observability signal filters (metrics, logs, scores, feedback).\n * All fields are optional — each signal extends this with signal-specific filters.\n */\nexport const commonFilterFields = {\n timestamp: dateRangeSchema.optional().describe('Filter by timestamp range'),\n traceId: z.string().optional().describe('Filter by trace ID'),\n spanId: z.string().optional().describe('Filter by span ID'),\n entityType: entityTypeField.optional(),\n entityName: entityNameField.optional(),\n entityVersionId: entityVersionIdField.optional(),\n parentEntityVersionId: parentEntityVersionIdField.optional(),\n rootEntityVersionId: rootEntityVersionIdField.optional(),\n userId: userIdField.optional(),\n organizationId: organizationIdField.optional(),\n experimentId: experimentIdField.optional(),\n serviceName: serviceNameField.optional(),\n environment: environmentField.optional(),\n parentEntityType: parentEntityTypeField.optional(),\n parentEntityName: parentEntityNameField.optional(),\n rootEntityType: rootEntityTypeField.optional(),\n rootEntityName: rootEntityNameField.optional(),\n resourceId: resourceIdField.optional(),\n runId: runIdField.optional(),\n sessionId: sessionIdField.optional(),\n threadId: threadIdField.optional(),\n requestId: requestIdField.optional(),\n executionSource: executionSourceField.optional(),\n tags: z.array(z.string()).optional().describe('Filter by tags (must have all specified tags)'),\n} as const;\n\n// ============================================================================\n// Tracing identifier fields (shared across scores, feedback, metrics)\n// ============================================================================\n\n/** Zod schema for trace ID field */\nexport const traceIdField = z.string().describe('Unique trace identifier');\n\n/** Zod schema for span ID field */\nexport const spanIdField = z.string().describe('Unique span identifier within a trace');\n","import { z } from 'zod/v4';\nimport {\n commonFilterFields,\n contextFields,\n metadataField,\n paginationArgsSchema,\n paginationInfoSchema,\n sortDirectionSchema,\n spanIdField,\n tagsField,\n traceIdField,\n} from '../shared';\n\n// ============================================================================\n// Field Schemas\n// ============================================================================\n\n/** Log level schema for validation */\nexport const logLevelSchema = z.enum(['debug', 'info', 'warn', 'error', 'fatal']);\n\nconst messageField = z.string().describe('Log message');\nconst logDataField = z.record(z.string(), z.unknown()).describe('Structured data attached to the log');\n\n// ============================================================================\n// LogRecord Schema (Storage Format)\n// ============================================================================\n\n/**\n * Schema for logs as stored in the database.\n * Includes all fields from ExportedLog plus storage-specific fields.\n */\nexport const logRecordSchema = z\n .object({\n timestamp: z.date().describe('When the log was created'),\n level: logLevelSchema.describe('Log severity level'),\n message: messageField,\n data: logDataField.nullish(),\n\n // Correlation\n traceId: traceIdField.nullish(),\n spanId: spanIdField.nullish(),\n\n // Context fields\n ...contextFields,\n /**\n * @deprecated Use `executionSource` instead.\n */\n source: z.string().nullish().describe('Execution source'),\n\n metadata: metadataField.nullish(),\n })\n .describe('Log record as stored in the database');\n\n/** Log record type for storage */\nexport type LogRecord = z.infer<typeof logRecordSchema>;\n\n// ============================================================================\n// LogRecordInput Schema (User-Facing API)\n// ============================================================================\n\n/**\n * Schema for user-provided log input (minimal required fields).\n * The logger enriches this with context before emitting ExportedLog.\n */\nexport const logRecordInputSchema = z\n .object({\n level: logLevelSchema,\n message: messageField,\n data: logDataField.optional(),\n tags: tagsField.optional(),\n })\n .describe('User-provided log input');\n\n/** User-facing log input type */\nexport type LogRecordInput = z.infer<typeof logRecordInputSchema>;\n\n// ============================================================================\n// Create Log Schemas\n// ============================================================================\n\n/** Schema for creating a log record */\nexport const createLogRecordSchema = logRecordSchema;\n\n/** Log record for creation (excludes db timestamps) */\nexport type CreateLogRecord = z.infer<typeof createLogRecordSchema>;\n\n/** Schema for batchCreateLogs operation arguments */\nexport const batchCreateLogsArgsSchema = z\n .object({\n logs: z.array(createLogRecordSchema),\n })\n .describe('Arguments for batch creating logs');\n\n/** Arguments for batch creating logs */\nexport type BatchCreateLogsArgs = z.infer<typeof batchCreateLogsArgsSchema>;\n\n// ============================================================================\n// Log Filter Schema\n// ============================================================================\n\n/** Schema for filtering logs in list queries */\nexport const logsFilterSchema = z\n .object({\n ...commonFilterFields,\n\n // Log-specific filters\n /**\n * @deprecated Use `executionSource` instead.\n */\n source: z.string().optional().describe('Filter by execution source'),\n level: z\n .union([logLevelSchema, z.array(logLevelSchema)])\n .optional()\n .describe('Filter by log level(s)'),\n })\n .describe('Filters for querying logs');\n\n/** Filters for querying logs */\nexport type LogsFilter = z.infer<typeof logsFilterSchema>;\n\n// ============================================================================\n// List Logs Schemas\n// ============================================================================\n\n/** Fields available for ordering log results */\nexport const logsOrderByFieldSchema = z.enum(['timestamp']).describe(\"Field to order by: 'timestamp'\");\n\n/** Order by configuration for log queries */\nexport const logsOrderBySchema = z\n .object({\n field: logsOrderByFieldSchema.default('timestamp').describe('Field to order by'),\n direction: sortDirectionSchema.default('DESC').describe('Sort direction'),\n })\n .describe('Order by configuration');\n\n/** Schema for listLogs operation arguments */\nexport const listLogsArgsSchema = z\n .object({\n filters: logsFilterSchema.optional().describe('Optional filters to apply'),\n pagination: paginationArgsSchema.default({ page: 0, perPage: 10 }).describe('Pagination settings'),\n orderBy: logsOrderBySchema\n .default({ field: 'timestamp', direction: 'DESC' })\n .describe('Ordering configuration (defaults to timestamp desc)'),\n })\n .describe('Arguments for listing logs');\n\n/** Arguments for listing logs */\nexport type ListLogsArgs = z.input<typeof listLogsArgsSchema>;\n\n/** Schema for listLogs operation response */\nexport const listLogsResponseSchema = z.object({\n pagination: paginationInfoSchema,\n logs: z.array(logRecordSchema),\n});\n\n/** Response containing paginated logs */\nexport type ListLogsResponse = z.infer<typeof listLogsResponseSchema>;\n","import { z } from 'zod/v4';\nimport {\n aggregateResponseFields,\n aggregationIntervalSchema,\n aggregationTypeSchema,\n aggregatedValueField,\n bucketTimestampField,\n comparePeriodSchema,\n commonFilterFields,\n experimentIdField,\n contextFields,\n dimensionsField,\n entityTypeField,\n groupBySchema,\n paginationArgsSchema,\n paginationInfoSchema,\n percentileField,\n percentileBucketValueField,\n percentilesSchema,\n sortDirectionSchema,\n spanIdField,\n traceIdField,\n} from '../shared';\n\n// ============================================================================\n// Field Schemas\n// ============================================================================\n\nconst scorerIdField = z.string().describe('Identifier of the scorer (e.g., relevance, accuracy)');\nconst scorerNameField = z.string().describe('Display name of the scorer');\nconst scorerVersionField = z.string().describe('Version of the scorer');\nconst scoreSourceField = z.string().describe('How the score was produced (e.g., manual, automated, experiment)');\nconst scoreValueField = z.number().describe('Score value (range defined by scorer)');\nconst scoreReasonField = z.string().describe('Explanation for the score');\n\n// ============================================================================\n// ScoreRecord Schema (Storage Format)\n// ============================================================================\n\n/**\n * Schema for scores as stored in the database.\n * Includes all fields from ExportedScore plus storage-specific fields.\n */\nexport const scoreRecordSchema = z\n .object({\n timestamp: z.date().describe('When the score was recorded'),\n\n // Target\n traceId: traceIdField.nullish().describe('Trace that anchors the scored target when available'),\n spanId: spanIdField.nullish().describe('Span ID this score applies to'),\n\n // Score data\n scorerId: scorerIdField,\n scorerName: scorerNameField.nullish(),\n scorerVersion: scorerVersionField.nullish(),\n scoreSource: scoreSourceField.nullish(),\n /**\n * @deprecated Use `scoreSource` instead.\n */\n source: scoreSourceField.nullish(),\n score: scoreValueField,\n reason: scoreReasonField.nullish(),\n\n // Context (entity hierarchy, identity, correlation, deployment, experimentation)\n ...contextFields,\n\n /** Trace ID of the scoring run (links to trace that generated this score) */\n scoreTraceId: z.string().nullish().describe('Trace ID of the scoring run for debugging score generation'),\n\n // User-defined metadata (context fields stored here)\n metadata: z.record(z.string(), z.unknown()).nullish().describe('User-defined metadata'),\n })\n .describe('Score record as stored in the database');\n\n/** Score record type for storage */\nexport type ScoreRecord = z.infer<typeof scoreRecordSchema>;\n\n// ============================================================================\n// ScoreInput Schema (User-Facing API)\n// ============================================================================\n\n/**\n * Schema for user-provided score input (minimal required fields).\n * The span/trace context adds traceId/spanId before emitting ExportedScore.\n */\nexport const scoreInputSchema = z\n .object({\n scorerId: scorerIdField,\n scorerName: scorerNameField.optional(),\n scorerVersion: scorerVersionField.optional(),\n scoreSource: scoreSourceField.optional(),\n /**\n * @deprecated Use `scoreSource` instead.\n */\n source: scoreSourceField.optional(),\n score: scoreValueField,\n reason: scoreReasonField.optional(),\n metadata: z.record(z.string(), z.unknown()).optional().describe('Additional scorer-specific metadata'),\n experimentId: experimentIdField.optional(),\n scoreTraceId: z.string().optional().describe('Trace ID of the scoring run for debugging score generation'),\n targetEntityType: entityTypeField.optional().describe('Entity type the scorer evaluated when known'),\n })\n .describe('User-provided score input');\n\n/** User-facing score input type */\nexport type ScoreInput = z.infer<typeof scoreInputSchema>;\n\n// ============================================================================\n// Create Score Schemas\n// ============================================================================\n\n/** Schema for creating a score record */\nexport const createScoreRecordSchema = scoreRecordSchema;\n\n/** Score record for creation */\nexport type CreateScoreRecord = z.infer<typeof createScoreRecordSchema>;\n\n/** Schema for createScore operation arguments */\nexport const createScoreArgsSchema = z\n .object({\n score: createScoreRecordSchema,\n })\n .describe('Arguments for creating a score');\n\n/** Arguments for creating a score */\nexport type CreateScoreArgs = z.infer<typeof createScoreArgsSchema>;\n\n/** Schema for createScore operation body in client/server */\nexport const createScoreBodySchema = z\n .object({\n score: createScoreRecordSchema.omit({ timestamp: true }),\n })\n .describe('Arguments for creating a score');\n\n/** Body for creating a score in client/server */\nexport type CreateScoreBody = z.infer<typeof createScoreBodySchema>;\n\n/** Schema for createScore operation response */\nexport const createScoreResponseSchema = z.object({ success: z.boolean() }).describe('Response from creating a score');\n\n/** Response from creating a score */\nexport type CreateScoreResponse = z.infer<typeof createScoreResponseSchema>;\n\n/** Schema for batchCreateScores operation arguments */\nexport const batchCreateScoresArgsSchema = z\n .object({\n scores: z.array(createScoreRecordSchema),\n })\n .describe('Arguments for batch recording scores');\n\n/** Arguments for batch creating scores */\nexport type BatchCreateScoresArgs = z.infer<typeof batchCreateScoresArgsSchema>;\n\n// ============================================================================\n// Score Filter Schema\n// ============================================================================\n\n/** Schema for filtering scores in list queries */\nexport const scoresFilterSchema = z\n .object({\n ...commonFilterFields,\n\n // Score-specific filters\n scorerId: z\n .union([z.string(), z.array(z.string())])\n .optional()\n .describe('Filter by scorer ID(s)'),\n scoreSource: scoreSourceField.optional().describe('Filter by how the score was produced'),\n /**\n * @deprecated Use `scoreSource` instead.\n */\n source: scoreSourceField.optional().describe('Filter by how the score was produced'),\n })\n .describe('Filters for querying scores');\n\n/** Filters for querying scores */\nexport type ScoresFilter = z.infer<typeof scoresFilterSchema>;\n\n// ============================================================================\n// List Scores Schemas\n// ============================================================================\n\n/** Fields available for ordering score results */\nexport const scoresOrderByFieldSchema = z\n .enum(['timestamp', 'score'])\n .describe(\"Field to order by: 'timestamp' | 'score'\");\n\n/** Order by configuration for score queries */\nexport const scoresOrderBySchema = z\n .object({\n field: scoresOrderByFieldSchema.default('timestamp').describe('Field to order by'),\n direction: sortDirectionSchema.default('DESC').describe('Sort direction'),\n })\n .describe('Order by configuration');\n\n/** Schema for listScores operation arguments */\nexport const listScoresArgsSchema = z\n .object({\n filters: scoresFilterSchema.optional(),\n pagination: paginationArgsSchema.default({ page: 0, perPage: 10 }).describe('Pagination settings'),\n orderBy: scoresOrderBySchema\n .default({ field: 'timestamp', direction: 'DESC' })\n .describe('Ordering configuration (defaults to timestamp desc)'),\n })\n .describe('Arguments for listing scores');\n\n/** Arguments for listing scores */\nexport type ListScoresArgs = z.input<typeof listScoresArgsSchema>;\n\n/** Schema for listScores operation response */\nexport const listScoresResponseSchema = z.object({\n pagination: paginationInfoSchema,\n scores: z.array(scoreRecordSchema),\n});\n\n/** Response containing paginated scores */\nexport type ListScoresResponse = z.infer<typeof listScoresResponseSchema>;\n\n// ============================================================================\n// OLAP Query Schemas\n// ============================================================================\n\nexport const getScoreAggregateArgsSchema = z\n .object({\n scorerId: scorerIdField,\n scoreSource: scoreSourceField.optional(),\n aggregation: aggregationTypeSchema,\n filters: scoresFilterSchema.optional(),\n comparePeriod: comparePeriodSchema.optional(),\n })\n .describe('Arguments for getting a score aggregate');\n\nexport type GetScoreAggregateArgs = z.infer<typeof getScoreAggregateArgsSchema>;\n\nexport const getScoreAggregateResponseSchema = z.object(aggregateResponseFields);\n\nexport type GetScoreAggregateResponse = z.infer<typeof getScoreAggregateResponseSchema>;\n\nexport const getScoreBreakdownArgsSchema = z\n .object({\n scorerId: scorerIdField,\n scoreSource: scoreSourceField.optional(),\n groupBy: groupBySchema,\n aggregation: aggregationTypeSchema,\n filters: scoresFilterSchema.optional(),\n })\n .describe('Arguments for getting a score breakdown');\n\nexport type GetScoreBreakdownArgs = z.infer<typeof getScoreBreakdownArgsSchema>;\n\nexport const getScoreBreakdownResponseSchema = z.object({\n groups: z.array(\n z.object({\n dimensions: dimensionsField,\n value: aggregatedValueField,\n }),\n ),\n});\n\nexport type GetScoreBreakdownResponse = z.infer<typeof getScoreBreakdownResponseSchema>;\n\nexport const getScoreTimeSeriesArgsSchema = z\n .object({\n scorerId: scorerIdField,\n scoreSource: scoreSourceField.optional(),\n interval: aggregationIntervalSchema,\n aggregation: aggregationTypeSchema,\n filters: scoresFilterSchema.optional(),\n groupBy: groupBySchema.optional(),\n })\n .describe('Arguments for getting score time series');\n\nexport type GetScoreTimeSeriesArgs = z.infer<typeof getScoreTimeSeriesArgsSchema>;\n\nexport const getScoreTimeSeriesResponseSchema = z.object({\n series: z.array(\n z.object({\n name: z.string().describe('Series name (scorer ID or group key)'),\n points: z.array(\n z.object({\n timestamp: bucketTimestampField,\n value: aggregatedValueField,\n }),\n ),\n }),\n ),\n});\n\nexport type GetScoreTimeSeriesResponse = z.infer<typeof getScoreTimeSeriesResponseSchema>;\n\nexport const getScorePercentilesArgsSchema = z\n .object({\n scorerId: scorerIdField,\n scoreSource: scoreSourceField.optional(),\n percentiles: percentilesSchema,\n interval: aggregationIntervalSchema,\n filters: scoresFilterSchema.optional(),\n })\n .describe('Arguments for getting score percentiles');\n\nexport type GetScorePercentilesArgs = z.infer<typeof getScorePercentilesArgsSchema>;\n\nexport const getScorePercentilesResponseSchema = z.object({\n series: z.array(\n z.object({\n percentile: percentileField,\n points: z.array(\n z.object({\n timestamp: bucketTimestampField,\n value: percentileBucketValueField,\n }),\n ),\n }),\n ),\n});\n\nexport type GetScorePercentilesResponse = z.infer<typeof getScorePercentilesResponseSchema>;\n","import { z } from 'zod/v4';\nimport {\n aggregateResponseFields,\n aggregationIntervalSchema,\n aggregationTypeSchema,\n aggregatedValueField,\n bucketTimestampField,\n comparePeriodSchema,\n commonFilterFields,\n experimentIdField,\n contextFields,\n dimensionsField,\n groupBySchema,\n paginationArgsSchema,\n paginationInfoSchema,\n percentileField,\n percentileBucketValueField,\n percentilesSchema,\n sortDirectionSchema,\n spanIdField,\n traceIdField,\n} from '../shared';\n\n// ============================================================================\n// Field Schemas\n// ============================================================================\n\nconst feedbackSourceField = z.string().describe(\"Source of feedback (e.g., 'user', 'system', 'manual')\");\nconst feedbackTypeField = z.string().describe(\"Type of feedback (e.g., 'thumbs', 'rating', 'correction')\");\nconst feedbackValueField = z\n .union([z.number(), z.string()])\n .describe('Feedback value (rating number or correction text)');\nconst feedbackCommentField = z.string().describe('Additional comment or context');\nconst feedbackUserIdField = z.string().describe('User who provided the feedback');\n\nfunction normalizeLegacyFeedbackActor<T>(input: T): T {\n if (!input || typeof input !== 'object' || Array.isArray(input)) {\n return input;\n }\n\n const record = { ...(input as Record<string, unknown>) };\n if (typeof record.userId === 'string' && record.feedbackUserId == null) {\n record.feedbackUserId = record.userId;\n delete record.userId;\n }\n\n return record as T;\n}\n\n// ============================================================================\n// FeedbackRecord Schema (Storage Format)\n// ============================================================================\n\n/**\n * Schema for feedback as stored in the database.\n * Includes all fields from ExportedFeedback plus storage-specific fields.\n */\nconst feedbackRecordObjectSchema = z.object({\n timestamp: z.date().describe('When the feedback was recorded'),\n\n // Target\n traceId: traceIdField.nullish().describe('Trace that anchors the feedback target when available'),\n spanId: spanIdField.nullish().describe('Span ID this feedback applies to'),\n\n // Feedback data\n feedbackSource: feedbackSourceField.nullish(),\n /**\n * @deprecated Use `feedbackSource` instead.\n */\n source: feedbackSourceField.nullish(),\n feedbackType: feedbackTypeField,\n value: feedbackValueField,\n comment: feedbackCommentField.nullish(),\n\n // Feedback actor identity\n feedbackUserId: feedbackUserIdField.nullish(),\n\n // Context (entity hierarchy, identity, correlation, deployment, experimentation)\n ...contextFields,\n\n // Source linkage (e.g. dataset item result ID)\n sourceId: z\n .string()\n .nullish()\n .describe('ID of the source record this feedback is linked to (e.g. experiment result ID)'),\n\n // User-defined metadata (context fields stored here)\n metadata: z.record(z.string(), z.unknown()).nullish().describe('User-defined metadata'),\n});\n\nexport const feedbackRecordSchema = z\n .object(feedbackRecordObjectSchema.shape)\n .describe('Feedback record as stored in the database');\n\n/** Feedback record type for storage */\nexport type FeedbackRecord = z.infer<typeof feedbackRecordSchema>;\n\n// ============================================================================\n// FeedbackInput Schema (User-Facing API)\n// ============================================================================\n\n/**\n * Schema for user-provided feedback input (minimal required fields).\n * The span/trace context adds traceId/spanId before emitting ExportedFeedback.\n */\nconst feedbackInputObjectSchema = z.object({\n feedbackSource: feedbackSourceField.optional(),\n /**\n * @deprecated Use `feedbackSource` instead.\n */\n source: feedbackSourceField.optional(),\n feedbackType: feedbackTypeField,\n value: feedbackValueField,\n comment: feedbackCommentField.optional(),\n feedbackUserId: feedbackUserIdField.optional(),\n /**\n * @deprecated Use `feedbackUserId` instead.\n */\n userId: feedbackUserIdField.optional(),\n metadata: z.record(z.string(), z.unknown()).optional().describe('Additional feedback-specific metadata'),\n experimentId: experimentIdField.optional(),\n sourceId: z.string().optional().describe('ID of the source record this feedback is linked to'),\n});\n\nexport const feedbackInputSchema = z.object(feedbackInputObjectSchema.shape).describe('User-provided feedback input');\n\n/** User-facing feedback input type */\nexport type FeedbackInput = z.infer<typeof feedbackInputSchema>;\n\n// ============================================================================\n// Create Feedback Schemas\n// ============================================================================\n\n/** Schema for creating a feedback record */\nexport const createFeedbackRecordSchema = feedbackRecordSchema;\n\n/** Feedback record for creation */\nexport type CreateFeedbackRecord = z.infer<typeof createFeedbackRecordSchema>;\n\n/** Schema for createFeedback operation arguments */\nexport const createFeedbackArgsSchema = z\n .object({\n feedback: z.preprocess(normalizeLegacyFeedbackActor, feedbackRecordObjectSchema),\n })\n .describe('Arguments for creating feedback');\n\n/** Arguments for creating feedback */\nexport type CreateFeedbackArgs = z.infer<typeof createFeedbackArgsSchema>;\n\n/** Schema for createFeedback operation body in client/server */\nexport const createFeedbackBodySchema = z\n .object({\n feedback: feedbackRecordObjectSchema.omit({ timestamp: true }),\n })\n .describe('Arguments for creating feedback');\n\n/** Body for creating feedback in client/server */\nexport type CreateFeedbackBody = z.infer<typeof createFeedbackBodySchema>;\n\n/** Schema for createFeedback operation response */\nexport const createFeedbackResponseSchema = z\n .object({ success: z.boolean() })\n .describe('Response from creating feedback');\n\n/** Response from creating feedback */\nexport type CreateFeedbackResponse = z.infer<typeof createFeedbackResponseSchema>;\n\n/** Schema for batchCreateFeedback operation arguments */\nexport const batchCreateFeedbackArgsSchema = z\n .object({\n feedbacks: z.array(z.preprocess(normalizeLegacyFeedbackActor, feedbackRecordObjectSchema)),\n })\n .describe('Arguments for batch recording feedback');\n\n/** Arguments for batch creating feedback */\nexport type BatchCreateFeedbackArgs = z.infer<typeof batchCreateFeedbackArgsSchema>;\n\n// ============================================================================\n// Feedback Filter Schema\n// ============================================================================\n\n/** Schema for filtering feedback in list queries */\nconst feedbackFilterObjectSchema = z.object({\n ...commonFilterFields,\n\n // Feedback-specific filters\n feedbackType: z\n .union([z.string(), z.array(z.string())])\n .optional()\n .describe('Filter by feedback type(s)'),\n feedbackSource: feedbackSourceField.optional(),\n /**\n * @deprecated Use `feedbackSource` instead.\n */\n source: feedbackSourceField.optional(),\n feedbackUserId: feedbackUserIdField.optional(),\n});\n\nexport const feedbackFilterSchema = z\n .object(feedbackFilterObjectSchema.shape)\n .describe('Filters for querying feedback');\n\n/** Filters for querying feedback */\nexport type FeedbackFilter = z.infer<typeof feedbackFilterSchema>;\n\n// ============================================================================\n// List Feedback Schemas\n// ============================================================================\n\n/** Fields available for ordering feedback results */\nexport const feedbackOrderByFieldSchema = z.enum(['timestamp']).describe(\"Field to order by: 'timestamp'\");\n\n/** Order by configuration for feedback queries */\nexport const feedbackOrderBySchema = z\n .object({\n field: feedbackOrderByFieldSchema.default('timestamp').describe('Field to order by'),\n direction: sortDirectionSchema.default('DESC').describe('Sort direction'),\n })\n .describe('Order by configuration');\n\n/** Schema for listFeedback operation arguments */\nexport const listFeedbackArgsSchema = z\n .object({\n filters: z\n .preprocess(normalizeLegacyFeedbackActor, feedbackFilterObjectSchema)\n .optional()\n .describe('Optional filters to apply'),\n pagination: paginationArgsSchema.default({ page: 0, perPage: 10 }).describe('Pagination settings'),\n orderBy: feedbackOrderBySchema\n .default({ field: 'timestamp', direction: 'DESC' })\n .describe('Ordering configuration (defaults to timestamp desc)'),\n })\n .describe('Arguments for listing feedback');\n\n/** Arguments for listing feedback */\nexport type ListFeedbackArgs = z.input<typeof listFeedbackArgsSchema>;\n\n/** Schema for listFeedback operation response */\nexport const listFeedbackResponseSchema = z.object({\n pagination: paginationInfoSchema,\n feedback: z.array(feedbackRecordSchema),\n});\n\n/** Response containing paginated feedback */\nexport type ListFeedbackResponse = z.infer<typeof listFeedbackResponseSchema>;\n\n// ============================================================================\n// OLAP Query Schemas\n// ============================================================================\n\nexport const getFeedbackAggregateArgsSchema = z\n .object({\n feedbackType: feedbackTypeField,\n feedbackSource: feedbackSourceField.optional(),\n aggregation: aggregationTypeSchema,\n filters: feedbackFilterSchema.optional(),\n comparePeriod: comparePeriodSchema.optional(),\n })\n .describe('Arguments for getting a feedback aggregate over numeric values');\n\nexport type GetFeedbackAggregateArgs = z.infer<typeof getFeedbackAggregateArgsSchema>;\n\nexport const getFeedbackAggregateResponseSchema = z.object(aggregateResponseFields);\n\nexport type GetFeedbackAggregateResponse = z.infer<typeof getFeedbackAggregateResponseSchema>;\n\nexport const getFeedbackBreakdownArgsSchema = z\n .object({\n feedbackType: feedbackTypeField,\n feedbackSource: feedbackSourceField.optional(),\n groupBy: groupBySchema,\n aggregation: aggregationTypeSchema,\n filters: feedbackFilterSchema.optional(),\n })\n .describe('Arguments for getting a feedback breakdown over numeric values');\n\nexport type GetFeedbackBreakdownArgs = z.infer<typeof getFeedbackBreakdownArgsSchema>;\n\nexport const getFeedbackBreakdownResponseSchema = z.object({\n groups: z.array(\n z.object({\n dimensions: dimensionsField,\n value: aggregatedValueField,\n }),\n ),\n});\n\nexport type GetFeedbackBreakdownResponse = z.infer<typeof getFeedbackBreakdownResponseSchema>;\n\nexport const getFeedbackTimeSeriesArgsSchema = z\n .object({\n feedbackType: feedbackTypeField,\n feedbackSource: feedbackSourceField.optional(),\n interval: aggregationIntervalSchema,\n aggregation: aggregationTypeSchema,\n filters: feedbackFilterSchema.optional(),\n groupBy: groupBySchema.optional(),\n })\n .describe('Arguments for getting feedback time series over numeric values');\n\nexport type GetFeedbackTimeSeriesArgs = z.infer<typeof getFeedbackTimeSeriesArgsSchema>;\n\nexport const getFeedbackTimeSeriesResponseSchema = z.object({\n series: z.array(\n z.object({\n name: z.string().describe('Series name (feedback type or group key)'),\n points: z.array(\n z.object({\n timestamp: bucketTimestampField,\n value: aggregatedValueField,\n }),\n ),\n }),\n ),\n});\n\nexport type GetFeedbackTimeSeriesResponse = z.infer<typeof getFeedbackTimeSeriesResponseSchema>;\n\nexport const getFeedbackPercentilesArgsSchema = z\n .object({\n feedbackType: feedbackTypeField,\n feedbackSource: feedbackSourceField.optional(),\n percentiles: percentilesSchema,\n interval: aggregationIntervalSchema,\n filters: feedbackFilterSchema.optional(),\n })\n .describe('Arguments for getting feedback percentiles over numeric values');\n\nexport type GetFeedbackPercentilesArgs = z.infer<typeof getFeedbackPercentilesArgsSchema>;\n\nexport const getFeedbackPercentilesResponseSchema = z.object({\n series: z.array(\n z.object({\n percentile: percentileField,\n points: z.array(\n z.object({\n timestamp: bucketTimestampField,\n value: percentileBucketValueField,\n }),\n ),\n }),\n ),\n});\n\nexport type GetFeedbackPercentilesResponse = z.infer<typeof getFeedbackPercentilesResponseSchema>;\n","import { z } from 'zod/v4';\nimport {\n aggregateResponseFields,\n aggregationIntervalSchema,\n aggregationTypeSchema,\n aggregatedValueField,\n bucketTimestampField,\n comparePeriodSchema,\n commonFilterFields,\n contextFields,\n dimensionsField,\n groupBySchema,\n paginationArgsSchema,\n paginationInfoSchema,\n percentileField,\n percentileBucketValueField,\n percentilesSchema,\n sortDirectionSchema,\n spanIdField,\n traceIdField,\n metadataField,\n} from '../shared';\n\n// ============================================================================\n// Field Schemas\n// ============================================================================\n\n/**\n * @deprecated MetricType is no longer stored. All metrics are raw events\n * with aggregation determined at query time.\n */\nexport const metricTypeSchema = z.enum(['counter', 'gauge', 'histogram']);\n\nconst metricNameField = z.string().describe('Metric name (e.g., mastra_agent_duration_ms)');\nconst metricValueField = z.number().describe('Metric value');\nconst labelsField = z.record(z.string(), z.string()).describe('Metric labels for dimensional filtering');\nconst providerField = z.string().describe('Model provider');\nconst modelField = z.string().describe('Model');\nconst estimatedCostField = z.number().describe('Estimated cost');\nconst costUnitField = z.string().describe('Unit for the estimated cost (e.g., usd)');\nconst costMetadField = z.record(z.string(), z.unknown()).nullish().describe('Structured costing metadata');\n\n// ============================================================================\n// MetricRecord Schema (Storage Format)\n// ============================================================================\n\n/**\n * Schema for metrics as stored in the database.\n * Each record is a single metric observation.\n */\nexport const metricRecordSchema = z\n .object({\n timestamp: z.date().describe('When the metric was recorded'),\n name: metricNameField,\n value: metricValueField,\n\n // Correlation\n traceId: traceIdField.nullish(),\n spanId: spanIdField.nullish(),\n\n // Context (entity hierarchy, identity, correlation, deployment, experimentation)\n ...contextFields,\n /**\n * @deprecated Use `executionSource` instead.\n */\n source: z.string().nullish().describe('Execution source'),\n\n // Canonical costing fields\n provider: providerField.nullish(),\n model: modelField.nullish(),\n\n // Estimated cost related fields\n estimatedCost: estimatedCostField.nullish(),\n costUnit: costUnitField.nullish(),\n costMetadata: costMetadField.nullish(),\n\n // User-defined labels used for filtering\n labels: labelsField.default({}),\n\n // User-defined metadata\n metadata: metadataField.nullish(),\n })\n .describe('Metric record as stored in the database');\n\n/** Metric record type for storage */\nexport type MetricRecord = z.infer<typeof metricRecordSchema>;\n\n// ============================================================================\n// MetricInput Schema (User-Facing API)\n// ============================================================================\n\n/**\n * Schema for user-provided metric input (minimal required fields).\n * The metrics context enriches this with environment before emitting ExportedMetric.\n */\nexport const metricInputSchema = z\n .object({\n name: metricNameField,\n value: metricValueField,\n labels: labelsField.optional(),\n })\n .describe('User-provided metric input');\n\n/** User-facing metric input type */\nexport type MetricInput = z.infer<typeof metricInputSchema>;\n\n// ============================================================================\n// Create Metric Schemas\n// ============================================================================\n\n/** Schema for creating a metric record (without db timestamps) */\nexport const createMetricRecordSchema = metricRecordSchema;\n\n/** Metric record for creation (excludes db timestamps) */\nexport type CreateMetricRecord = z.infer<typeof createMetricRecordSchema>;\n\n/** Schema for batchCreateMetrics operation arguments */\nexport const batchCreateMetricsArgsSchema = z\n .object({\n metrics: z.array(createMetricRecordSchema),\n })\n .describe('Arguments for batch recording metrics');\n\n/** Arguments for batch recording metrics */\nexport type BatchCreateMetricsArgs = z.infer<typeof batchCreateMetricsArgsSchema>;\n\n// ============================================================================\n// Metric Aggregation Schemas\n// ============================================================================\n\n/** Schema for metric aggregation configuration */\nexport const metricsAggregationSchema = z\n .object({\n type: aggregationTypeSchema,\n interval: aggregationIntervalSchema.optional(),\n groupBy: groupBySchema.optional(),\n })\n .describe('Metrics aggregation configuration');\n\n/** Metrics aggregation configuration type */\nexport type MetricsAggregation = z.infer<typeof metricsAggregationSchema>;\n\n// ============================================================================\n// Metric Filter Schema\n// ============================================================================\n\n/** Schema for filtering metrics in queries */\nexport const metricsFilterSchema = z\n .object({\n ...commonFilterFields,\n\n // Metric identification\n name: z.array(z.string()).nonempty().optional().describe('Filter by metric name(s)'),\n\n /**\n * @deprecated Use `executionSource` instead.\n */\n source: z.string().optional().describe('Filter by execution source'),\n\n // Canonical costing filters\n provider: providerField.optional(),\n model: modelField.optional(),\n costUnit: costUnitField.optional(),\n\n // Label filters (exact match on label values)\n labels: z.record(z.string(), z.string()).optional().describe('Exact match on label key-value pairs'),\n })\n .describe('Filters for querying metrics');\n\n/** Filters for querying metrics */\nexport type MetricsFilter = z.infer<typeof metricsFilterSchema>;\n\n/** Fields available for ordering metric list results */\nexport const metricsOrderByFieldSchema = z.enum(['timestamp']).describe(\"Field to order by: 'timestamp'\");\n\n/** Order by configuration for metric list queries */\nexport const metricsOrderBySchema = z\n .object({\n field: metricsOrderByFieldSchema.default('timestamp').describe('Field to order by'),\n direction: sortDirectionSchema.default('DESC').describe('Sort direction'),\n })\n .describe('Order by configuration');\n\n/** Schema for listMetrics operation arguments */\nexport const listMetricsArgsSchema = z\n .object({\n filters: metricsFilterSchema.optional(),\n pagination: paginationArgsSchema.default({ page: 0, perPage: 10 }).describe('Pagination settings'),\n orderBy: metricsOrderBySchema\n .default({ field: 'timestamp', direction: 'DESC' })\n .describe('Ordering configuration (defaults to timestamp desc)'),\n })\n .describe('Arguments for listing metrics');\n\n/** Arguments for listing metrics */\nexport type ListMetricsArgs = z.input<typeof listMetricsArgsSchema>;\n\n/** Schema for listMetrics operation response */\nexport const listMetricsResponseSchema = z.object({\n pagination: paginationInfoSchema,\n metrics: z.array(metricRecordSchema),\n});\n\n/** Response containing paginated metrics */\nexport type ListMetricsResponse = z.infer<typeof listMetricsResponseSchema>;\n\n// ============================================================================\n// OLAP Query Schemas\n// ============================================================================\n\n// --- getMetricAggregate ---\n\nexport const getMetricAggregateArgsSchema = z\n .object({\n name: z.array(z.string()).nonempty().describe('Metric name(s) to aggregate'),\n aggregation: aggregationTypeSchema,\n filters: metricsFilterSchema.optional(),\n comparePeriod: comparePeriodSchema.optional(),\n })\n .describe('Arguments for getting a metric aggregate');\n\nexport type GetMetricAggregateArgs = z.infer<typeof getMetricAggregateArgsSchema>;\n\nexport const getMetricAggregateResponseSchema = z.object({\n ...aggregateResponseFields,\n estimatedCost: z.number().nullable().optional().describe('Aggregated estimated cost from the same filtered row set'),\n costUnit: z\n .string()\n .nullable()\n .optional()\n .describe('Shared cost unit for the aggregated rows, or null when mixed/unknown'),\n previousEstimatedCost: z\n .number()\n .nullable()\n .optional()\n .describe('Aggregated estimated cost from the comparison period'),\n costChangePercent: z\n .number()\n .nullable()\n .optional()\n .describe('Percentage change in estimated cost from comparison period'),\n});\n\nexport type GetMetricAggregateResponse = z.infer<typeof getMetricAggregateResponseSchema>;\n\n// --- getMetricBreakdown ---\n\nexport const getMetricBreakdownArgsSchema = z\n .object({\n name: z.array(z.string()).nonempty().describe('Metric name(s) to break down'),\n groupBy: groupBySchema,\n aggregation: aggregationTypeSchema,\n filters: metricsFilterSchema.optional(),\n })\n .describe('Arguments for getting a metric breakdown');\n\nexport type GetMetricBreakdownArgs = z.infer<typeof getMetricBreakdownArgsSchema>;\n\nexport const getMetricBreakdownResponseSchema = z.object({\n groups: z.array(\n z.object({\n dimensions: dimensionsField,\n value: aggregatedValueField,\n estimatedCost: z.number().nullable().optional().describe('Summed estimated cost for this group'),\n costUnit: z\n .string()\n .nullable()\n .optional()\n .describe('Shared cost unit for this group, or null when mixed/unknown'),\n }),\n ),\n});\n\nexport type GetMetricBreakdownResponse = z.infer<typeof getMetricBreakdownResponseSchema>;\n\n// --- getMetricTimeSeries ---\n\nexport const getMetricTimeSeriesArgsSchema = z\n .object({\n name: z.array(z.string()).nonempty().describe('Metric name(s)'),\n interval: aggregationIntervalSchema,\n aggregation: aggregationTypeSchema,\n filters: metricsFilterSchema.optional(),\n groupBy: groupBySchema.optional(),\n })\n .describe('Arguments for getting metric time series');\n\nexport type GetMetricTimeSeriesArgs = z.infer<typeof getMetricTimeSeriesArgsSchema>;\n\nexport const getMetricTimeSeriesResponseSchema = z.object({\n series: z.array(\n z.object({\n name: z.string().describe('Series name (metric name or group key)'),\n costUnit: z\n .string()\n .nullable()\n .optional()\n .describe('Shared cost unit for this series, or null when mixed/unknown'),\n points: z.array(\n z.object({\n timestamp: bucketTimestampField,\n value: aggregatedValueField,\n estimatedCost: z.number().nullable().optional().describe('Summed estimated cost in this bucket'),\n }),\n ),\n }),\n ),\n});\n\nexport type GetMetricTimeSeriesResponse = z.infer<typeof getMetricTimeSeriesResponseSchema>;\n\n// --- getMetricPercentiles ---\n\nexport const getMetricPercentilesArgsSchema = z\n .object({\n name: z.string().describe('Metric name'),\n percentiles: percentilesSchema,\n interval: aggregationIntervalSchema,\n filters: metricsFilterSchema.optional(),\n })\n .describe('Arguments for getting metric percentiles');\n\nexport type GetMetricPercentilesArgs = z.infer<typeof getMetricPercentilesArgsSchema>;\n\nexport const getMetricPercentilesResponseSchema = z.object({\n series: z.array(\n z.object({\n percentile: percentileField,\n points: z.array(\n z.object({\n timestamp: bucketTimestampField,\n value: percentileBucketValueField,\n }),\n ),\n }),\n ),\n});\n\nexport type GetMetricPercentilesResponse = z.infer<typeof getMetricPercentilesResponseSchema>;\n","import { z } from 'zod/v4';\nimport { entityTypeField } from '../shared';\n\n// ============================================================================\n// Metric Discovery\n// ============================================================================\n\n// --- getMetricNames ---\n\nexport const getMetricNamesArgsSchema = z\n .object({\n prefix: z.string().optional().describe('Filter metric names by prefix'),\n limit: z.number().int().min(1).optional().describe('Maximum number of names to return'),\n })\n .describe('Arguments for getting metric names');\n\nexport type GetMetricNamesArgs = z.infer<typeof getMetricNamesArgsSchema>;\n\nexport const getMetricNamesResponseSchema = z.object({\n names: z.array(z.string()).describe('Distinct metric names'),\n});\n\nexport type GetMetricNamesResponse = z.infer<typeof getMetricNamesResponseSchema>;\n\n// --- getMetricLabelKeys ---\n\nexport const getMetricLabelKeysArgsSchema = z\n .object({\n metricName: z.string().describe('Metric name to get label keys for'),\n })\n .describe('Arguments for getting metric label keys');\n\nexport type GetMetricLabelKeysArgs = z.infer<typeof getMetricLabelKeysArgsSchema>;\n\nexport const getMetricLabelKeysResponseSchema = z.object({\n keys: z.array(z.string()).describe('Distinct label keys for the metric'),\n});\n\nexport type GetMetricLabelKeysResponse = z.infer<typeof getMetricLabelKeysResponseSchema>;\n\n// --- getMetricLabelValues ---\n\nexport const getMetricLabelValuesArgsSchema = z\n .object({\n metricName: z.string().describe('Metric name'),\n labelKey: z.string().describe('Label key to get values for'),\n prefix: z.string().optional().describe('Filter values by prefix'),\n limit: z.number().int().min(1).optional().describe('Maximum number of values to return'),\n })\n .describe('Arguments for getting label values');\n\nexport type GetMetricLabelValuesArgs = z.infer<typeof getMetricLabelValuesArgsSchema>;\n\nexport const getMetricLabelValuesResponseSchema = z.object({\n values: z.array(z.string()).describe('Distinct label values'),\n});\n\nexport type GetMetricLabelValuesResponse = z.infer<typeof getMetricLabelValuesResponseSchema>;\n\n// ============================================================================\n// Entity & Environment Discovery\n// ============================================================================\n\n// --- getEntityTypes ---\n\nexport const getEntityTypesArgsSchema = z.object({}).describe('Arguments for getting entity types');\n\nexport type GetEntityTypesArgs = z.infer<typeof getEntityTypesArgsSchema>;\n\nexport const getEntityTypesResponseSchema = z.object({\n entityTypes: z.array(entityTypeField).describe('Distinct entity types'),\n});\n\nexport type GetEntityTypesResponse = z.infer<typeof getEntityTypesResponseSchema>;\n\n// --- getEntityNames ---\n\nexport const getEntityNamesArgsSchema = z\n .object({\n entityType: entityTypeField.optional().describe('Optional entity type filter'),\n })\n .describe('Arguments for getting entity names');\n\nexport type GetEntityNamesArgs = z.infer<typeof getEntityNamesArgsSchema>;\n\nexport const getEntityNamesResponseSchema = z.object({\n names: z.array(z.string()).describe('Distinct entity names'),\n});\n\nexport type GetEntityNamesResponse = z.infer<typeof getEntityNamesResponseSchema>;\n\n// --- getServiceNames ---\n\nexport const getServiceNamesArgsSchema = z.object({}).describe('Arguments for getting service names');\n\nexport type GetServiceNamesArgs = z.infer<typeof getServiceNamesArgsSchema>;\n\nexport const getServiceNamesResponseSchema = z.object({\n serviceNames: z.array(z.string()).describe('Distinct service names'),\n});\n\nexport type GetServiceNamesResponse = z.infer<typeof getServiceNamesResponseSchema>;\n\n// --- getEnvironments ---\n\nexport const getEnvironmentsArgsSchema = z.object({}).describe('Arguments for getting environments');\n\nexport type GetEnvironmentsArgs = z.infer<typeof getEnvironmentsArgsSchema>;\n\nexport const getEnvironmentsResponseSchema = z.object({\n environments: z.array(z.string()).describe('Distinct environments'),\n});\n\nexport type GetEnvironmentsResponse = z.infer<typeof getEnvironmentsResponseSchema>;\n\n// --- getTags ---\n\nexport const getTagsArgsSchema = z\n .object({\n entityType: entityTypeField.optional().describe('Optional entity type filter'),\n })\n .describe('Arguments for getting tags');\n\nexport type GetTagsArgs = z.infer<typeof getTagsArgsSchema>;\n\nexport const getTagsResponseSchema = z.object({\n tags: z.array(z.string()).describe('Distinct tags'),\n});\n\nexport type GetTagsResponse = z.infer<typeof getTagsResponseSchema>;\n","import {\n // Logs\n logsFilterSchema,\n logsOrderBySchema,\n listLogsResponseSchema,\n // Scores (observability)\n scoresFilterSchema,\n scoresOrderBySchema,\n listScoresResponseSchema as obsListScoresResponseSchema,\n createScoreBodySchema,\n createScoreResponseSchema,\n getScoreAggregateArgsSchema,\n getScoreAggregateResponseSchema,\n getScoreBreakdownArgsSchema,\n getScoreBreakdownResponseSchema,\n getScoreTimeSeriesArgsSchema,\n getScoreTimeSeriesResponseSchema,\n getScorePercentilesArgsSchema,\n getScorePercentilesResponseSchema,\n // Feedback\n feedbackFilterSchema,\n feedbackOrderBySchema,\n listFeedbackResponseSchema,\n createFeedbackBodySchema,\n createFeedbackResponseSchema,\n getFeedbackAggregateArgsSchema,\n getFeedbackAggregateResponseSchema,\n getFeedbackBreakdownArgsSchema,\n getFeedbackBreakdownResponseSchema,\n getFeedbackTimeSeriesArgsSchema,\n getFeedbackTimeSeriesResponseSchema,\n getFeedbackPercentilesArgsSchema,\n getFeedbackPercentilesResponseSchema,\n // Metrics OLAP\n getMetricAggregateArgsSchema,\n getMetricAggregateResponseSchema,\n getMetricBreakdownArgsSchema,\n getMetricBreakdownResponseSchema,\n getMetricTimeSeriesArgsSchema,\n getMetricTimeSeriesResponseSchema,\n getMetricPercentilesArgsSchema,\n getMetricPercentilesResponseSchema,\n // Discovery\n getMetricNamesArgsSchema,\n getMetricNamesResponseSchema,\n getMetricLabelKeysArgsSchema,\n getMetricLabelKeysResponseSchema,\n getMetricLabelValuesArgsSchema,\n getMetricLabelValuesResponseSchema,\n getEntityTypesResponseSchema,\n getEntityNamesArgsSchema,\n getEntityNamesResponseSchema,\n getServiceNamesResponseSchema,\n getEnvironmentsResponseSchema,\n getTagsArgsSchema,\n getTagsResponseSchema,\n paginationArgsSchema,\n} from '@internal/core/storage';\nimport { coreFeatures } from '@mastra/core/features';\nimport type { z } from 'zod/v4';\nimport { HTTPException } from '../http-exception';\nimport type { InferParams, ServerContext, ServerRouteHandler } from '../server-adapter/routes';\nimport { createRoute, pickParams, wrapSchemaForQueryParams } from '../server-adapter/routes/route-builder';\nimport { handleError } from './error';\nimport { getObservabilityStore, NEW_ROUTE_DEFS } from './observability-shared';\nimport type { RouteDetails } from './observability-shared';\n\nfunction createNewRoute<\n TPathSchema extends z.ZodTypeAny | undefined = undefined,\n TQuerySchema extends z.ZodTypeAny | undefined = undefined,\n TBodySchema extends z.ZodTypeAny | undefined = undefined,\n TResponseSchema extends z.ZodTypeAny | undefined = undefined,\n>(\n def: RouteDetails,\n config: {\n pathParamSchema?: TPathSchema;\n queryParamSchema?: TQuerySchema;\n bodySchema?: TBodySchema;\n responseSchema?: TResponseSchema;\n handler: ServerRouteHandler<InferParams<TPathSchema, TQuerySchema, TBodySchema>>;\n },\n) {\n const { handler, ...schemas } = config;\n return createRoute({\n ...def,\n ...schemas,\n responseType: 'json' as const,\n tags: ['Observability'],\n requiresAuth: true,\n handler: (async (params: InferParams<TPathSchema, TQuerySchema, TBodySchema> & ServerContext) => {\n if (!coreFeatures.has('observability:v1.13.2')) {\n throw new HTTPException(501, {\n message: 'New observability endpoints require @mastra/core >= 1.13.2, please upgrade.',\n });\n }\n\n try {\n return await handler(params);\n } catch (error) {\n return handleError(error, `Error calling: '${def.summary.toLocaleLowerCase()}'`);\n }\n }) as ServerRouteHandler<\n InferParams<TPathSchema, TQuerySchema, TBodySchema>,\n TResponseSchema extends z.ZodTypeAny ? z.infer<TResponseSchema> : unknown,\n 'json'\n >,\n });\n}\n\n// ============================================================================\n// Log Routes\n// ============================================================================\n\nexport const LIST_LOGS = createNewRoute(NEW_ROUTE_DEFS.LIST_LOGS, {\n queryParamSchema: wrapSchemaForQueryParams(\n logsFilterSchema.extend(paginationArgsSchema.shape).extend(logsOrderBySchema.shape).partial(),\n ),\n responseSchema: listLogsResponseSchema,\n handler: async ({ mastra, ...params }) => {\n const filters = pickParams(logsFilterSchema, params);\n const pagination = pickParams(paginationArgsSchema, params);\n const orderBy = pickParams(logsOrderBySchema, params);\n\n const observabilityStore = await getObservabilityStore(mastra);\n return await observabilityStore.listLogs({ filters, pagination, orderBy });\n },\n});\n\n// ============================================================================\n// Score Routes\n// ============================================================================\n\nexport const LIST_SCORES = createNewRoute(NEW_ROUTE_DEFS.LIST_SCORES, {\n queryParamSchema: wrapSchemaForQueryParams(\n scoresFilterSchema.extend(paginationArgsSchema.shape).extend(scoresOrderBySchema.shape).partial(),\n ),\n responseSchema: obsListScoresResponseSchema,\n handler: async ({ mastra, ...params }) => {\n const filters = pickParams(scoresFilterSchema, params);\n const pagination = pickParams(paginationArgsSchema, params);\n const orderBy = pickParams(scoresOrderBySchema, params);\n\n const observabilityStore = await getObservabilityStore(mastra);\n return await observabilityStore.listScores({ filters, pagination, orderBy });\n },\n});\n\nexport const CREATE_SCORE = createNewRoute(NEW_ROUTE_DEFS.CREATE_SCORE, {\n bodySchema: createScoreBodySchema,\n responseSchema: createScoreResponseSchema,\n handler: async ({ mastra, score }) => {\n const observabilityStore = await getObservabilityStore(mastra);\n await observabilityStore.createScore({ score: { ...score, timestamp: new Date() } });\n return { success: true };\n },\n});\n\nexport const GET_SCORE_AGGREGATE = createNewRoute(NEW_ROUTE_DEFS.GET_SCORE_AGGREGATE, {\n bodySchema: getScoreAggregateArgsSchema,\n responseSchema: getScoreAggregateResponseSchema,\n handler: async ({ mastra, ...params }) => {\n const args = pickParams(getScoreAggregateArgsSchema, params);\n const observabilityStore = await getObservabilityStore(mastra);\n return await observabilityStore.getScoreAggregate(args);\n },\n});\n\nexport const GET_SCORE_BREAKDOWN = createNewRoute(NEW_ROUTE_DEFS.GET_SCORE_BREAKDOWN, {\n bodySchema: getScoreBreakdownArgsSchema,\n responseSchema: getScoreBreakdownResponseSchema,\n handler: async ({ mastra, ...params }) => {\n const args = pickParams(getScoreBreakdownArgsSchema, params);\n const observabilityStore = await getObservabilityStore(mastra);\n return await observabilityStore.getScoreBreakdown(args);\n },\n});\n\nexport const GET_SCORE_TIME_SERIES = createNewRoute(NEW_ROUTE_DEFS.GET_SCORE_TIME_SERIES, {\n bodySchema: getScoreTimeSeriesArgsSchema,\n responseSchema: getScoreTimeSeriesResponseSchema,\n handler: async ({ mastra, ...params }) => {\n const args = pickParams(getScoreTimeSeriesArgsSchema, params);\n const observabilityStore = await getObservabilityStore(mastra);\n return await observabilityStore.getScoreTimeSeries(args);\n },\n});\n\nexport const GET_SCORE_PERCENTILES = createNewRoute(NEW_ROUTE_DEFS.GET_SCORE_PERCENTILES, {\n bodySchema: getScorePercentilesArgsSchema,\n responseSchema: getScorePercentilesResponseSchema,\n handler: async ({ mastra, ...params }) => {\n const args = pickParams(getScorePercentilesArgsSchema, params);\n const observabilityStore = await getObservabilityStore(mastra);\n return await observabilityStore.getScorePercentiles(args);\n },\n});\n\n// ============================================================================\n// Feedback Routes\n// ============================================================================\n\nexport const LIST_FEEDBACK = createNewRoute(NEW_ROUTE_DEFS.LIST_FEEDBACK, {\n queryParamSchema: wrapSchemaForQueryParams(\n feedbackFilterSchema.extend(paginationArgsSchema.shape).extend(feedbackOrderBySchema.shape).partial(),\n ),\n responseSchema: listFeedbackResponseSchema,\n handler: async ({ mastra, ...params }) => {\n const filters = pickParams(feedbackFilterSchema, params);\n const pagination = pickParams(paginationArgsSchema, params);\n const orderBy = pickParams(feedbackOrderBySchema, params);\n\n const observabilityStore = await getObservabilityStore(mastra);\n return await observabilityStore.listFeedback({ filters, pagination, orderBy });\n },\n});\n\nexport const CREATE_FEEDBACK = createNewRoute(NEW_ROUTE_DEFS.CREATE_FEEDBACK, {\n bodySchema: createFeedbackBodySchema,\n responseSchema: createFeedbackResponseSchema,\n handler: async ({ mastra, feedback }) => {\n const observabilityStore = await getObservabilityStore(mastra);\n await observabilityStore.createFeedback({ feedback: { ...feedback, timestamp: new Date() } });\n return { success: true };\n },\n});\n\nexport const GET_FEEDBACK_AGGREGATE = createNewRoute(NEW_ROUTE_DEFS.GET_FEEDBACK_AGGREGATE, {\n bodySchema: getFeedbackAggregateArgsSchema,\n responseSchema: getFeedbackAggregateResponseSchema,\n handler: async ({ mastra, ...params }) => {\n const args = pickParams(getFeedbackAggregateArgsSchema, params);\n const observabilityStore = await getObservabilityStore(mastra);\n return await observabilityStore.getFeedbackAggregate(args);\n },\n});\n\nexport const GET_FEEDBACK_BREAKDOWN = createNewRoute(NEW_ROUTE_DEFS.GET_FEEDBACK_BREAKDOWN, {\n bodySchema: getFeedbackBreakdownArgsSchema,\n responseSchema: getFeedbackBreakdownResponseSchema,\n handler: async ({ mastra, ...params }) => {\n const args = pickParams(getFeedbackBreakdownArgsSchema, params);\n const observabilityStore = await getObservabilityStore(mastra);\n return await observabilityStore.getFeedbackBreakdown(args);\n },\n});\n\nexport const GET_FEEDBACK_TIME_SERIES = createNewRoute(NEW_ROUTE_DEFS.GET_FEEDBACK_TIME_SERIES, {\n bodySchema: getFeedbackTimeSeriesArgsSchema,\n responseSchema: getFeedbackTimeSeriesResponseSchema,\n handler: async ({ mastra, ...params }) => {\n const args = pickParams(getFeedbackTimeSeriesArgsSchema, params);\n const observabilityStore = await getObservabilityStore(mastra);\n return await observabilityStore.getFeedbackTimeSeries(args);\n },\n});\n\nexport const GET_FEEDBACK_PERCENTILES = createNewRoute(NEW_ROUTE_DEFS.GET_FEEDBACK_PERCENTILES, {\n bodySchema: getFeedbackPercentilesArgsSchema,\n responseSchema: getFeedbackPercentilesResponseSchema,\n handler: async ({ mastra, ...params }) => {\n const args = pickParams(getFeedbackPercentilesArgsSchema, params);\n const observabilityStore = await getObservabilityStore(mastra);\n return await observabilityStore.getFeedbackPercentiles(args);\n },\n});\n\n// ============================================================================\n// Metrics Routes\n// ============================================================================\n\nexport const GET_METRIC_AGGREGATE = createNewRoute(NEW_ROUTE_DEFS.GET_METRIC_AGGREGATE, {\n bodySchema: getMetricAggregateArgsSchema,\n responseSchema: getMetricAggregateResponseSchema,\n handler: async ({ mastra, ...params }) => {\n const args = pickParams(getMetricAggregateArgsSchema, params);\n const observabilityStore = await getObservabilityStore(mastra);\n return await observabilityStore.getMetricAggregate(args);\n },\n});\n\nexport const GET_METRIC_BREAKDOWN = createNewRoute(NEW_ROUTE_DEFS.GET_METRIC_BREAKDOWN, {\n bodySchema: getMetricBreakdownArgsSchema,\n responseSchema: getMetricBreakdownResponseSchema,\n handler: async ({ mastra, ...params }) => {\n const args = pickParams(getMetricBreakdownArgsSchema, params);\n const observabilityStore = await getObservabilityStore(mastra);\n return await observabilityStore.getMetricBreakdown(args);\n },\n});\n\nexport const GET_METRIC_TIME_SERIES = createNewRoute(NEW_ROUTE_DEFS.GET_METRIC_TIME_SERIES, {\n bodySchema: getMetricTimeSeriesArgsSchema,\n responseSchema: getMetricTimeSeriesResponseSchema,\n handler: async ({ mastra, ...params }) => {\n const args = pickParams(getMetricTimeSeriesArgsSchema, params);\n const observabilityStore = await getObservabilityStore(mastra);\n return await observabilityStore.getMetricTimeSeries(args);\n },\n});\n\nexport const GET_METRIC_PERCENTILES = createNewRoute(NEW_ROUTE_DEFS.GET_METRIC_PERCENTILES, {\n bodySchema: getMetricPercentilesArgsSchema,\n responseSchema: getMetricPercentilesResponseSchema,\n handler: async ({ mastra, ...params }) => {\n const args = pickParams(getMetricPercentilesArgsSchema, params);\n const observabilityStore = await getObservabilityStore(mastra);\n return await observabilityStore.getMetricPercentiles(args);\n },\n});\n\n// ============================================================================\n// Discovery Routes\n// ============================================================================\n\nexport const GET_METRIC_NAMES = createNewRoute(NEW_ROUTE_DEFS.GET_METRIC_NAMES, {\n queryParamSchema: wrapSchemaForQueryParams(getMetricNamesArgsSchema.partial()),\n responseSchema: getMetricNamesResponseSchema,\n handler: async ({ mastra, ...params }) => {\n const args = getMetricNamesArgsSchema.parse(pickParams(getMetricNamesArgsSchema, params));\n const observabilityStore = await getObservabilityStore(mastra);\n return await observabilityStore.getMetricNames(args);\n },\n});\n\nexport const GET_METRIC_LABEL_KEYS = createNewRoute(NEW_ROUTE_DEFS.GET_METRIC_LABEL_KEYS, {\n queryParamSchema: wrapSchemaForQueryParams(getMetricLabelKeysArgsSchema),\n responseSchema: getMetricLabelKeysResponseSchema,\n handler: async ({ mastra, ...params }) => {\n const args = getMetricLabelKeysArgsSchema.parse(pickParams(getMetricLabelKeysArgsSchema, params));\n const observabilityStore = await getObservabilityStore(mastra);\n return await observabilityStore.getMetricLabelKeys(args);\n },\n});\n\nexport const GET_METRIC_LABEL_VALUES = createNewRoute(NEW_ROUTE_DEFS.GET_METRIC_LABEL_VALUES, {\n queryParamSchema: wrapSchemaForQueryParams(getMetricLabelValuesArgsSchema),\n responseSchema: getMetricLabelValuesResponseSchema,\n handler: async ({ mastra, ...params }) => {\n const args = getMetricLabelValuesArgsSchema.parse(pickParams(getMetricLabelValuesArgsSchema, params));\n const observabilityStore = await getObservabilityStore(mastra);\n return await observabilityStore.getMetricLabelValues(args);\n },\n});\n\nexport const GET_ENTITY_TYPES = createNewRoute(NEW_ROUTE_DEFS.GET_ENTITY_TYPES, {\n responseSchema: getEntityTypesResponseSchema,\n handler: async ({ mastra }) => {\n const observabilityStore = await getObservabilityStore(mastra);\n return await observabilityStore.getEntityTypes({});\n },\n});\n\nexport const GET_ENTITY_NAMES = createNewRoute(NEW_ROUTE_DEFS.GET_ENTITY_NAMES, {\n queryParamSchema: wrapSchemaForQueryParams(getEntityNamesArgsSchema.partial()),\n responseSchema: getEntityNamesResponseSchema,\n handler: async ({ mastra, ...params }) => {\n const args = getEntityNamesArgsSchema.parse(pickParams(getEntityNamesArgsSchema, params));\n const observabilityStore = await getObservabilityStore(mastra);\n return await observabilityStore.getEntityNames(args);\n },\n});\n\nexport const GET_SERVICE_NAMES = createNewRoute(NEW_ROUTE_DEFS.GET_SERVICE_NAMES, {\n responseSchema: getServiceNamesResponseSchema,\n handler: async ({ mastra }) => {\n const observabilityStore = await getObservabilityStore(mastra);\n return await observabilityStore.getServiceNames({});\n },\n});\n\nexport const GET_ENVIRONMENTS = createNewRoute(NEW_ROUTE_DEFS.GET_ENVIRONMENTS, {\n responseSchema: getEnvironmentsResponseSchema,\n handler: async ({ mastra }) => {\n const observabilityStore = await getObservabilityStore(mastra);\n return await observabilityStore.getEnvironments({});\n },\n});\n\nexport const GET_TAGS = createNewRoute(NEW_ROUTE_DEFS.GET_TAGS, {\n queryParamSchema: wrapSchemaForQueryParams(getTagsArgsSchema.partial()),\n responseSchema: getTagsResponseSchema,\n handler: async ({ mastra, ...params }) => {\n const args = getTagsArgsSchema.parse(pickParams(getTagsArgsSchema, params));\n const observabilityStore = await getObservabilityStore(mastra);\n try {\n return await observabilityStore.getTags(args);\n } catch (error) {\n // Some storage providers (e.g. LibSQL) don't support tag discovery\n if (error instanceof Error && error.message.includes('does not support tag discovery')) {\n return { tags: [] };\n }\n throw error;\n }\n },\n});\n\nexport const NEW_ROUTES = {\n LIST_LOGS,\n LIST_SCORES,\n CREATE_SCORE,\n GET_SCORE_AGGREGATE,\n GET_SCORE_BREAKDOWN,\n GET_SCORE_TIME_SERIES,\n GET_SCORE_PERCENTILES,\n LIST_FEEDBACK,\n CREATE_FEEDBACK,\n GET_FEEDBACK_AGGREGATE,\n GET_FEEDBACK_BREAKDOWN,\n GET_FEEDBACK_TIME_SERIES,\n GET_FEEDBACK_PERCENTILES,\n GET_METRIC_AGGREGATE,\n GET_METRIC_BREAKDOWN,\n GET_METRIC_TIME_SERIES,\n GET_METRIC_PERCENTILES,\n GET_METRIC_NAMES,\n GET_METRIC_LABEL_KEYS,\n GET_METRIC_LABEL_VALUES,\n GET_ENTITY_TYPES,\n GET_ENTITY_NAMES,\n GET_SERVICE_NAMES,\n GET_ENVIRONMENTS,\n GET_TAGS,\n};\n"]}
|
|
@@ -1042,7 +1042,7 @@ function imageSize(input) {
|
|
|
1042
1042
|
throw new TypeError(`unsupported file type: ${type}`);
|
|
1043
1043
|
}
|
|
1044
1044
|
|
|
1045
|
-
// ../memory/dist/chunk-
|
|
1045
|
+
// ../memory/dist/chunk-7NCBGOHT.js
|
|
1046
1046
|
var OM_DEBUG_LOG = process.env.OM_DEBUG ? path.join(process.cwd(), "om-debug.log") : null;
|
|
1047
1047
|
function omDebug(msg) {
|
|
1048
1048
|
if (!OM_DEBUG_LOG) return;
|
|
@@ -1947,6 +1947,8 @@ var ObservationStrategy = class _ObservationStrategy {
|
|
|
1947
1947
|
this.scope = deps.scope;
|
|
1948
1948
|
this.retrieval = deps.retrieval;
|
|
1949
1949
|
}
|
|
1950
|
+
deps;
|
|
1951
|
+
opts;
|
|
1950
1952
|
storage;
|
|
1951
1953
|
messageHistory;
|
|
1952
1954
|
tokenCounter;
|
|
@@ -2951,6 +2953,8 @@ var ObservationStep = class {
|
|
|
2951
2953
|
this.turn = turn;
|
|
2952
2954
|
this.stepNumber = stepNumber;
|
|
2953
2955
|
}
|
|
2956
|
+
turn;
|
|
2957
|
+
stepNumber;
|
|
2954
2958
|
_prepared = false;
|
|
2955
2959
|
_context;
|
|
2956
2960
|
/** Whether this step has been prepared. */
|
|
@@ -9856,5 +9860,5 @@ exports.stripEphemeralAnchorIds = stripEphemeralAnchorIds;
|
|
|
9856
9860
|
exports.stripObservationGroups = stripObservationGroups;
|
|
9857
9861
|
exports.truncateStringByTokens = truncateStringByTokens;
|
|
9858
9862
|
exports.wrapInObservationGroup = wrapInObservationGroup;
|
|
9859
|
-
//# sourceMappingURL=chunk-
|
|
9860
|
-
//# sourceMappingURL=chunk-
|
|
9863
|
+
//# sourceMappingURL=chunk-PNMZ2R5P.cjs.map
|
|
9864
|
+
//# sourceMappingURL=chunk-PNMZ2R5P.cjs.map
|