@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.
Files changed (53) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/_types/@internal_core/dist/index.d.ts +133 -1
  3. package/dist/{chunk-GXFIXDFL.cjs → chunk-24VJHE45.cjs} +20 -20
  4. package/dist/{chunk-GXFIXDFL.cjs.map → chunk-24VJHE45.cjs.map} +1 -1
  5. package/dist/{chunk-XAQFSUUI.js → chunk-2RC624RU.js} +4 -3
  6. package/dist/chunk-2RC624RU.js.map +1 -0
  7. package/dist/{chunk-GOWBOBJQ.cjs → chunk-7Q5EF4YL.cjs} +29 -29
  8. package/dist/{chunk-GOWBOBJQ.cjs.map → chunk-7Q5EF4YL.cjs.map} +1 -1
  9. package/dist/{chunk-LYWILBPQ.cjs → chunk-AUOLHRVZ.cjs} +12 -2
  10. package/dist/chunk-AUOLHRVZ.cjs.map +1 -0
  11. package/dist/{chunk-ZUE6UM4G.js → chunk-FJ4PYS2Y.js} +3 -3
  12. package/dist/{chunk-ZUE6UM4G.js.map → chunk-FJ4PYS2Y.js.map} +1 -1
  13. package/dist/{chunk-QOTCV5IU.js → chunk-J3GI6BPX.js} +7 -3
  14. package/dist/chunk-J3GI6BPX.js.map +1 -0
  15. package/dist/{chunk-4WDIYJVY.js → chunk-JFVESFFY.js} +5 -5
  16. package/dist/{chunk-4WDIYJVY.js.map → chunk-JFVESFFY.js.map} +1 -1
  17. package/dist/{chunk-BW3VXQTH.js → chunk-NCVXAT2D.js} +12 -2
  18. package/dist/chunk-NCVXAT2D.js.map +1 -0
  19. package/dist/{chunk-XEDMM24R.cjs → chunk-PNMZ2R5P.cjs} +7 -3
  20. package/dist/chunk-PNMZ2R5P.cjs.map +1 -0
  21. package/dist/{chunk-GEPOXL25.cjs → chunk-Z4PPU3CR.cjs} +4 -3
  22. package/dist/chunk-Z4PPU3CR.cjs.map +1 -0
  23. package/dist/docs/SKILL.md +1 -1
  24. package/dist/docs/assets/SOURCE_MAP.json +1 -1
  25. package/dist/{observational-memory-H74M5SB6-NOBB6S7C.js → observational-memory-4TDIBXK6-H3GGM2SP.js} +3 -3
  26. package/dist/{observational-memory-H74M5SB6-NOBB6S7C.js.map → observational-memory-4TDIBXK6-H3GGM2SP.js.map} +1 -1
  27. package/dist/{observational-memory-H74M5SB6-ELUPJE5K.cjs → observational-memory-4TDIBXK6-LKQTCHRF.cjs} +26 -26
  28. package/dist/{observational-memory-H74M5SB6-ELUPJE5K.cjs.map → observational-memory-4TDIBXK6-LKQTCHRF.cjs.map} +1 -1
  29. package/dist/server/handlers/agent-builder.cjs +16 -16
  30. package/dist/server/handlers/agent-builder.js +1 -1
  31. package/dist/server/handlers/observability-new-endpoints.cjs +27 -27
  32. package/dist/server/handlers/observability-new-endpoints.d.ts +204 -0
  33. package/dist/server/handlers/observability-new-endpoints.d.ts.map +1 -1
  34. package/dist/server/handlers/observability-new-endpoints.js +1 -1
  35. package/dist/server/handlers/observability.cjs +33 -33
  36. package/dist/server/handlers/observability.d.ts +12 -0
  37. package/dist/server/handlers/observability.d.ts.map +1 -1
  38. package/dist/server/handlers/observability.js +2 -2
  39. package/dist/server/handlers/vector.cjs +16 -16
  40. package/dist/server/handlers/vector.js +1 -1
  41. package/dist/server/handlers.cjs +6 -6
  42. package/dist/server/handlers.js +3 -3
  43. package/dist/server/server-adapter/index.cjs +57 -57
  44. package/dist/server/server-adapter/index.js +4 -4
  45. package/dist/server/server-adapter/routes/observability.d.ts +114 -0
  46. package/dist/server/server-adapter/routes/observability.d.ts.map +1 -1
  47. package/package.json +8 -8
  48. package/dist/chunk-BW3VXQTH.js.map +0 -1
  49. package/dist/chunk-GEPOXL25.cjs.map +0 -1
  50. package/dist/chunk-LYWILBPQ.cjs.map +0 -1
  51. package/dist/chunk-QOTCV5IU.js.map +0 -1
  52. package/dist/chunk-XAQFSUUI.js.map +0 -1
  53. package/dist/chunk-XEDMM24R.cjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # @mastra/server
2
2
 
3
+ ## 1.25.0
4
+
5
+ ### Minor Changes
6
+
7
+ - feat(server): Add `mapUserToResourceId` callback to auth config for automatic resource ID scoping ([#13954](https://github.com/mastra-ai/mastra/pull/13954))
8
+
9
+ Auth configs now accept a `mapUserToResourceId` callback that maps the authenticated user to a resource ID after successful authentication. This enables per-user memory and thread isolation without requiring custom middleware or adapter subclassing.
10
+
11
+ ```typescript
12
+ const mastra = new Mastra({
13
+ server: {
14
+ auth: {
15
+ authenticateToken: async token => verifyToken(token),
16
+ mapUserToResourceId: user => user.id,
17
+ },
18
+ },
19
+ });
20
+ ```
21
+
22
+ The callback is called in `coreAuthMiddleware` after the user is authenticated and set on the request context. The returned value is set as `MASTRA_RESOURCE_ID_KEY`, which takes precedence over client-provided values for security. Works across all server adapters (Hono, Express, Next.js, etc.).
23
+
24
+ ### Patch Changes
25
+
26
+ - fix(server): Strip reserved context keys from client-provided requestContext ([#13954](https://github.com/mastra-ai/mastra/pull/13954))
27
+
28
+ Clients could inject `mastra__resourceId` or `mastra__threadId` via the request body or query params to impersonate other users' memory/thread access. Reserved keys are now filtered out during request context creation in `mergeRequestContext`, so only server-side code (auth callbacks, middleware) can set them.
29
+
30
+ - Updated dependencies [[`87df955`](https://github.com/mastra-ai/mastra/commit/87df955c028660c075873fd5d74af28233ce32eb), [`8fad147`](https://github.com/mastra-ai/mastra/commit/8fad14759804179c8e080ce4d9dec6ef1a808b31), [`582644c`](https://github.com/mastra-ai/mastra/commit/582644c4a87f83b4f245a84d72b9e8590585012e), [`cbdf3e1`](https://github.com/mastra-ai/mastra/commit/cbdf3e12b3d0c30a6e5347be658e2009648c130a), [`8fe46d3`](https://github.com/mastra-ai/mastra/commit/8fe46d354027f3f0f0846e64219772348de106dd), [`18c67db`](https://github.com/mastra-ai/mastra/commit/18c67dbb9c9ebc26f26f65f7d3ff836e5691ef46), [`4ba3bb1`](https://github.com/mastra-ai/mastra/commit/4ba3bb1e465ad2ddaba3bbf2bc47e0faec32985e), [`5d84914`](https://github.com/mastra-ai/mastra/commit/5d84914e0e520c642a40329b210b413fcd139898), [`8dcc77e`](https://github.com/mastra-ai/mastra/commit/8dcc77e78a5340f5848f74b9e9f1b3da3513c1f5), [`aa67fc5`](https://github.com/mastra-ai/mastra/commit/aa67fc59ee8a5eeff1f23eb05970b8d7a536c8ff), [`fd2f314`](https://github.com/mastra-ai/mastra/commit/fd2f31473d3449b6b97e837ef8641264377f41a7), [`fa8140b`](https://github.com/mastra-ai/mastra/commit/fa8140bcd4251d2e3ac85fdc5547dfc4f372b5be), [`190f452`](https://github.com/mastra-ai/mastra/commit/190f45258b0640e2adfc8219fa3258cdc5b8f071), [`e80fead`](https://github.com/mastra-ai/mastra/commit/e80fead1412cc0d1b2f7d6a1ce5017d9e0098ff7), [`0287b64`](https://github.com/mastra-ai/mastra/commit/0287b644a5c3272755cf3112e71338106664103b), [`7e7bf60`](https://github.com/mastra-ai/mastra/commit/7e7bf606886bf374a6f9d4ca9b09dd83d0533372), [`184907d`](https://github.com/mastra-ai/mastra/commit/184907d775d8609c03c26e78ccaf37315f3aa287), [`075e91a`](https://github.com/mastra-ai/mastra/commit/075e91a4549baf46ad7a42a6a8ac8dfa78cc09e6), [`0c4cd13`](https://github.com/mastra-ai/mastra/commit/0c4cd131931c04ac5405373c932a242dbe88edd6), [`b16a753`](https://github.com/mastra-ai/mastra/commit/b16a753d5748440248d7df82e29bb987a9c8386c)]:
31
+ - @mastra/core@1.25.0
32
+
33
+ ## 1.25.0-alpha.3
34
+
35
+ ### Patch Changes
36
+
37
+ - Updated dependencies [[`cbdf3e1`](https://github.com/mastra-ai/mastra/commit/cbdf3e12b3d0c30a6e5347be658e2009648c130a), [`8fe46d3`](https://github.com/mastra-ai/mastra/commit/8fe46d354027f3f0f0846e64219772348de106dd), [`18c67db`](https://github.com/mastra-ai/mastra/commit/18c67dbb9c9ebc26f26f65f7d3ff836e5691ef46), [`8dcc77e`](https://github.com/mastra-ai/mastra/commit/8dcc77e78a5340f5848f74b9e9f1b3da3513c1f5), [`aa67fc5`](https://github.com/mastra-ai/mastra/commit/aa67fc59ee8a5eeff1f23eb05970b8d7a536c8ff), [`fa8140b`](https://github.com/mastra-ai/mastra/commit/fa8140bcd4251d2e3ac85fdc5547dfc4f372b5be), [`190f452`](https://github.com/mastra-ai/mastra/commit/190f45258b0640e2adfc8219fa3258cdc5b8f071), [`7e7bf60`](https://github.com/mastra-ai/mastra/commit/7e7bf606886bf374a6f9d4ca9b09dd83d0533372), [`184907d`](https://github.com/mastra-ai/mastra/commit/184907d775d8609c03c26e78ccaf37315f3aa287), [`0c4cd13`](https://github.com/mastra-ai/mastra/commit/0c4cd131931c04ac5405373c932a242dbe88edd6), [`b16a753`](https://github.com/mastra-ai/mastra/commit/b16a753d5748440248d7df82e29bb987a9c8386c)]:
38
+ - @mastra/core@1.25.0-alpha.3
39
+
3
40
  ## 1.25.0-alpha.2
4
41
 
5
42
  ### Patch Changes
@@ -138,6 +138,9 @@ declare const parentEntityNameField: z.ZodString;
138
138
  declare const rootEntityTypeField: z.ZodEnum<typeof EntityType>;
139
139
  declare const rootEntityIdField: z.ZodString;
140
140
  declare const rootEntityNameField: z.ZodString;
141
+ declare const entityVersionIdField: z.ZodString;
142
+ declare const parentEntityVersionIdField: z.ZodString;
143
+ declare const rootEntityVersionIdField: z.ZodString;
141
144
  declare const experimentIdField: z.ZodString;
142
145
  declare const scopeField: z.ZodRecord<z.ZodString, z.ZodUnknown>;
143
146
  declare const metadataField: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -168,6 +171,9 @@ declare const contextFields: {
168
171
  readonly environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
169
172
  readonly serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
170
173
  readonly scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
174
+ readonly entityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
175
+ readonly parentEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
176
+ readonly rootEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
171
177
  readonly experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
172
178
  };
173
179
  /**
@@ -195,6 +201,9 @@ declare const spanContextFields: {
195
201
  readonly environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
196
202
  readonly serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
197
203
  readonly scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
204
+ readonly entityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
205
+ readonly parentEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
206
+ readonly rootEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
198
207
  readonly experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
199
208
  };
200
209
  /**
@@ -212,6 +221,9 @@ declare const commonFilterFields: {
212
221
  readonly spanId: z.ZodOptional<z.ZodString>;
213
222
  readonly entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
214
223
  readonly entityName: z.ZodOptional<z.ZodString>;
224
+ readonly entityVersionId: z.ZodOptional<z.ZodString>;
225
+ readonly parentEntityVersionId: z.ZodOptional<z.ZodString>;
226
+ readonly rootEntityVersionId: z.ZodOptional<z.ZodString>;
215
227
  readonly userId: z.ZodOptional<z.ZodString>;
216
228
  readonly organizationId: z.ZodOptional<z.ZodString>;
217
229
  readonly experimentId: z.ZodOptional<z.ZodString>;
@@ -270,6 +282,9 @@ declare const logRecordSchema: z.ZodObject<{
270
282
  environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
271
283
  serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
272
284
  scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
285
+ entityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
286
+ parentEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
287
+ rootEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
273
288
  experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
274
289
  timestamp: z.ZodDate;
275
290
  level: z.ZodEnum<{
@@ -329,6 +344,9 @@ declare const createLogRecordSchema: z.ZodObject<{
329
344
  environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
330
345
  serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
331
346
  scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
347
+ entityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
348
+ parentEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
349
+ rootEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
332
350
  experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
333
351
  timestamp: z.ZodDate;
334
352
  level: z.ZodEnum<{
@@ -371,6 +389,9 @@ declare const batchCreateLogsArgsSchema: z.ZodObject<{
371
389
  environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
372
390
  serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
373
391
  scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
392
+ entityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
393
+ parentEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
394
+ rootEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
374
395
  experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
375
396
  timestamp: z.ZodDate;
376
397
  level: z.ZodEnum<{
@@ -414,6 +435,9 @@ declare const logsFilterSchema: z.ZodObject<{
414
435
  spanId: z.ZodOptional<z.ZodString>;
415
436
  entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
416
437
  entityName: z.ZodOptional<z.ZodString>;
438
+ entityVersionId: z.ZodOptional<z.ZodString>;
439
+ parentEntityVersionId: z.ZodOptional<z.ZodString>;
440
+ rootEntityVersionId: z.ZodOptional<z.ZodString>;
417
441
  userId: z.ZodOptional<z.ZodString>;
418
442
  organizationId: z.ZodOptional<z.ZodString>;
419
443
  experimentId: z.ZodOptional<z.ZodString>;
@@ -474,6 +498,9 @@ declare const listLogsArgsSchema: z.ZodObject<{
474
498
  spanId: z.ZodOptional<z.ZodString>;
475
499
  entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
476
500
  entityName: z.ZodOptional<z.ZodString>;
501
+ entityVersionId: z.ZodOptional<z.ZodString>;
502
+ parentEntityVersionId: z.ZodOptional<z.ZodString>;
503
+ rootEntityVersionId: z.ZodOptional<z.ZodString>;
477
504
  userId: z.ZodOptional<z.ZodString>;
478
505
  organizationId: z.ZodOptional<z.ZodString>;
479
506
  experimentId: z.ZodOptional<z.ZodString>;
@@ -539,6 +566,9 @@ declare const listLogsResponseSchema: z.ZodObject<{
539
566
  environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
540
567
  serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
541
568
  scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
569
+ entityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
570
+ parentEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
571
+ rootEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
542
572
  experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
543
573
  timestamp: z.ZodDate;
544
574
  level: z.ZodEnum<{
@@ -585,6 +615,9 @@ declare const scoreRecordSchema: z.ZodObject<{
585
615
  environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
586
616
  serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
587
617
  scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
618
+ entityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
619
+ parentEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
620
+ rootEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
588
621
  experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
589
622
  timestamp: z.ZodDate;
590
623
  traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -643,6 +676,9 @@ declare const createScoreRecordSchema: z.ZodObject<{
643
676
  environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
644
677
  serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
645
678
  scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
679
+ entityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
680
+ parentEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
681
+ rootEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
646
682
  experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
647
683
  timestamp: z.ZodDate;
648
684
  traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -683,6 +719,9 @@ declare const createScoreArgsSchema: z.ZodObject<{
683
719
  environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
684
720
  serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
685
721
  scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
722
+ entityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
723
+ parentEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
724
+ rootEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
686
725
  experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
687
726
  timestamp: z.ZodDate;
688
727
  traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -726,6 +765,9 @@ declare const createScoreBodySchema: z.ZodObject<{
726
765
  environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
727
766
  serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
728
767
  scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
768
+ entityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
769
+ parentEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
770
+ rootEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
729
771
  experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
730
772
  scorerId: z.ZodString;
731
773
  score: z.ZodNumber;
@@ -770,6 +812,9 @@ declare const batchCreateScoresArgsSchema: z.ZodObject<{
770
812
  environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
771
813
  serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
772
814
  scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
815
+ entityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
816
+ parentEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
817
+ rootEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
773
818
  experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
774
819
  timestamp: z.ZodDate;
775
820
  traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -800,6 +845,9 @@ declare const scoresFilterSchema: z.ZodObject<{
800
845
  spanId: z.ZodOptional<z.ZodString>;
801
846
  entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
802
847
  entityName: z.ZodOptional<z.ZodString>;
848
+ entityVersionId: z.ZodOptional<z.ZodString>;
849
+ parentEntityVersionId: z.ZodOptional<z.ZodString>;
850
+ rootEntityVersionId: z.ZodOptional<z.ZodString>;
803
851
  userId: z.ZodOptional<z.ZodString>;
804
852
  organizationId: z.ZodOptional<z.ZodString>;
805
853
  experimentId: z.ZodOptional<z.ZodString>;
@@ -851,6 +899,9 @@ declare const listScoresArgsSchema: z.ZodObject<{
851
899
  spanId: z.ZodOptional<z.ZodString>;
852
900
  entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
853
901
  entityName: z.ZodOptional<z.ZodString>;
902
+ entityVersionId: z.ZodOptional<z.ZodString>;
903
+ parentEntityVersionId: z.ZodOptional<z.ZodString>;
904
+ rootEntityVersionId: z.ZodOptional<z.ZodString>;
854
905
  userId: z.ZodOptional<z.ZodString>;
855
906
  organizationId: z.ZodOptional<z.ZodString>;
856
907
  experimentId: z.ZodOptional<z.ZodString>;
@@ -917,6 +968,9 @@ declare const listScoresResponseSchema: z.ZodObject<{
917
968
  environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
918
969
  serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
919
970
  scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
971
+ entityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
972
+ parentEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
973
+ rootEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
920
974
  experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
921
975
  timestamp: z.ZodDate;
922
976
  traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -957,6 +1011,9 @@ declare const getScoreAggregateArgsSchema: z.ZodObject<{
957
1011
  spanId: z.ZodOptional<z.ZodString>;
958
1012
  entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
959
1013
  entityName: z.ZodOptional<z.ZodString>;
1014
+ entityVersionId: z.ZodOptional<z.ZodString>;
1015
+ parentEntityVersionId: z.ZodOptional<z.ZodString>;
1016
+ rootEntityVersionId: z.ZodOptional<z.ZodString>;
960
1017
  userId: z.ZodOptional<z.ZodString>;
961
1018
  organizationId: z.ZodOptional<z.ZodString>;
962
1019
  experimentId: z.ZodOptional<z.ZodString>;
@@ -1013,6 +1070,9 @@ declare const getScoreBreakdownArgsSchema: z.ZodObject<{
1013
1070
  spanId: z.ZodOptional<z.ZodString>;
1014
1071
  entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
1015
1072
  entityName: z.ZodOptional<z.ZodString>;
1073
+ entityVersionId: z.ZodOptional<z.ZodString>;
1074
+ parentEntityVersionId: z.ZodOptional<z.ZodString>;
1075
+ rootEntityVersionId: z.ZodOptional<z.ZodString>;
1016
1076
  userId: z.ZodOptional<z.ZodString>;
1017
1077
  organizationId: z.ZodOptional<z.ZodString>;
1018
1078
  experimentId: z.ZodOptional<z.ZodString>;
@@ -1071,6 +1131,9 @@ declare const getScoreTimeSeriesArgsSchema: z.ZodObject<{
1071
1131
  spanId: z.ZodOptional<z.ZodString>;
1072
1132
  entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
1073
1133
  entityName: z.ZodOptional<z.ZodString>;
1134
+ entityVersionId: z.ZodOptional<z.ZodString>;
1135
+ parentEntityVersionId: z.ZodOptional<z.ZodString>;
1136
+ rootEntityVersionId: z.ZodOptional<z.ZodString>;
1074
1137
  userId: z.ZodOptional<z.ZodString>;
1075
1138
  organizationId: z.ZodOptional<z.ZodString>;
1076
1139
  experimentId: z.ZodOptional<z.ZodString>;
@@ -1126,6 +1189,9 @@ declare const getScorePercentilesArgsSchema: z.ZodObject<{
1126
1189
  spanId: z.ZodOptional<z.ZodString>;
1127
1190
  entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
1128
1191
  entityName: z.ZodOptional<z.ZodString>;
1192
+ entityVersionId: z.ZodOptional<z.ZodString>;
1193
+ parentEntityVersionId: z.ZodOptional<z.ZodString>;
1194
+ rootEntityVersionId: z.ZodOptional<z.ZodString>;
1129
1195
  userId: z.ZodOptional<z.ZodString>;
1130
1196
  organizationId: z.ZodOptional<z.ZodString>;
1131
1197
  experimentId: z.ZodOptional<z.ZodString>;
@@ -1180,6 +1246,9 @@ declare const feedbackRecordSchema: z.ZodObject<{
1180
1246
  environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1181
1247
  serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1182
1248
  scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1249
+ entityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1250
+ parentEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1251
+ rootEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1183
1252
  experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1184
1253
  timestamp: z.ZodDate;
1185
1254
  traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1232,6 +1301,9 @@ declare const createFeedbackRecordSchema: z.ZodObject<{
1232
1301
  environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1233
1302
  serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1234
1303
  scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1304
+ entityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1305
+ parentEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1306
+ rootEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1235
1307
  experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1236
1308
  timestamp: z.ZodDate;
1237
1309
  traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1271,6 +1343,9 @@ declare const createFeedbackArgsSchema: z.ZodObject<{
1271
1343
  environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1272
1344
  serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1273
1345
  scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1346
+ entityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1347
+ parentEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1348
+ rootEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1274
1349
  experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1275
1350
  timestamp: z.ZodDate;
1276
1351
  traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1314,6 +1389,9 @@ declare const createFeedbackBodySchema: z.ZodObject<{
1314
1389
  environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1315
1390
  serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1316
1391
  scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1392
+ entityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1393
+ parentEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1394
+ rootEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1317
1395
  experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1318
1396
  feedbackUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1319
1397
  feedbackType: z.ZodString;
@@ -1356,6 +1434,9 @@ declare const batchCreateFeedbackArgsSchema: z.ZodObject<{
1356
1434
  environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1357
1435
  serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1358
1436
  scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1437
+ entityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1438
+ parentEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1439
+ rootEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1359
1440
  experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1360
1441
  timestamp: z.ZodDate;
1361
1442
  traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1385,6 +1466,9 @@ declare const feedbackFilterSchema: z.ZodObject<{
1385
1466
  spanId: z.ZodOptional<z.ZodString>;
1386
1467
  entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
1387
1468
  entityName: z.ZodOptional<z.ZodString>;
1469
+ entityVersionId: z.ZodOptional<z.ZodString>;
1470
+ parentEntityVersionId: z.ZodOptional<z.ZodString>;
1471
+ rootEntityVersionId: z.ZodOptional<z.ZodString>;
1388
1472
  userId: z.ZodOptional<z.ZodString>;
1389
1473
  organizationId: z.ZodOptional<z.ZodString>;
1390
1474
  experimentId: z.ZodOptional<z.ZodString>;
@@ -1435,6 +1519,9 @@ declare const listFeedbackArgsSchema: z.ZodObject<{
1435
1519
  spanId: z.ZodOptional<z.ZodString>;
1436
1520
  entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
1437
1521
  entityName: z.ZodOptional<z.ZodString>;
1522
+ entityVersionId: z.ZodOptional<z.ZodString>;
1523
+ parentEntityVersionId: z.ZodOptional<z.ZodString>;
1524
+ rootEntityVersionId: z.ZodOptional<z.ZodString>;
1438
1525
  userId: z.ZodOptional<z.ZodString>;
1439
1526
  organizationId: z.ZodOptional<z.ZodString>;
1440
1527
  experimentId: z.ZodOptional<z.ZodString>;
@@ -1500,6 +1587,9 @@ declare const listFeedbackResponseSchema: z.ZodObject<{
1500
1587
  environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1501
1588
  serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1502
1589
  scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1590
+ entityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1591
+ parentEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1592
+ rootEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1503
1593
  experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1504
1594
  timestamp: z.ZodDate;
1505
1595
  traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1540,6 +1630,9 @@ declare const getFeedbackAggregateArgsSchema: z.ZodObject<{
1540
1630
  spanId: z.ZodOptional<z.ZodString>;
1541
1631
  entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
1542
1632
  entityName: z.ZodOptional<z.ZodString>;
1633
+ entityVersionId: z.ZodOptional<z.ZodString>;
1634
+ parentEntityVersionId: z.ZodOptional<z.ZodString>;
1635
+ rootEntityVersionId: z.ZodOptional<z.ZodString>;
1543
1636
  userId: z.ZodOptional<z.ZodString>;
1544
1637
  organizationId: z.ZodOptional<z.ZodString>;
1545
1638
  experimentId: z.ZodOptional<z.ZodString>;
@@ -1597,6 +1690,9 @@ declare const getFeedbackBreakdownArgsSchema: z.ZodObject<{
1597
1690
  spanId: z.ZodOptional<z.ZodString>;
1598
1691
  entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
1599
1692
  entityName: z.ZodOptional<z.ZodString>;
1693
+ entityVersionId: z.ZodOptional<z.ZodString>;
1694
+ parentEntityVersionId: z.ZodOptional<z.ZodString>;
1695
+ rootEntityVersionId: z.ZodOptional<z.ZodString>;
1600
1696
  userId: z.ZodOptional<z.ZodString>;
1601
1697
  organizationId: z.ZodOptional<z.ZodString>;
1602
1698
  experimentId: z.ZodOptional<z.ZodString>;
@@ -1656,6 +1752,9 @@ declare const getFeedbackTimeSeriesArgsSchema: z.ZodObject<{
1656
1752
  spanId: z.ZodOptional<z.ZodString>;
1657
1753
  entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
1658
1754
  entityName: z.ZodOptional<z.ZodString>;
1755
+ entityVersionId: z.ZodOptional<z.ZodString>;
1756
+ parentEntityVersionId: z.ZodOptional<z.ZodString>;
1757
+ rootEntityVersionId: z.ZodOptional<z.ZodString>;
1659
1758
  userId: z.ZodOptional<z.ZodString>;
1660
1759
  organizationId: z.ZodOptional<z.ZodString>;
1661
1760
  experimentId: z.ZodOptional<z.ZodString>;
@@ -1712,6 +1811,9 @@ declare const getFeedbackPercentilesArgsSchema: z.ZodObject<{
1712
1811
  spanId: z.ZodOptional<z.ZodString>;
1713
1812
  entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
1714
1813
  entityName: z.ZodOptional<z.ZodString>;
1814
+ entityVersionId: z.ZodOptional<z.ZodString>;
1815
+ parentEntityVersionId: z.ZodOptional<z.ZodString>;
1816
+ rootEntityVersionId: z.ZodOptional<z.ZodString>;
1715
1817
  userId: z.ZodOptional<z.ZodString>;
1716
1818
  organizationId: z.ZodOptional<z.ZodString>;
1717
1819
  experimentId: z.ZodOptional<z.ZodString>;
@@ -1785,6 +1887,9 @@ declare const metricRecordSchema: z.ZodObject<{
1785
1887
  environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1786
1888
  serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1787
1889
  scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1890
+ entityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1891
+ parentEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1892
+ rootEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1788
1893
  experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1789
1894
  timestamp: z.ZodDate;
1790
1895
  name: z.ZodString;
@@ -1836,6 +1941,9 @@ declare const createMetricRecordSchema: z.ZodObject<{
1836
1941
  environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1837
1942
  serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1838
1943
  scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1944
+ entityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1945
+ parentEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1946
+ rootEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1839
1947
  experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1840
1948
  timestamp: z.ZodDate;
1841
1949
  name: z.ZodString;
@@ -1877,6 +1985,9 @@ declare const batchCreateMetricsArgsSchema: z.ZodObject<{
1877
1985
  environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1878
1986
  serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1879
1987
  scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1988
+ entityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1989
+ parentEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1990
+ rootEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1880
1991
  experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1881
1992
  timestamp: z.ZodDate;
1882
1993
  name: z.ZodString;
@@ -1926,6 +2037,9 @@ declare const metricsFilterSchema: z.ZodObject<{
1926
2037
  spanId: z.ZodOptional<z.ZodString>;
1927
2038
  entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
1928
2039
  entityName: z.ZodOptional<z.ZodString>;
2040
+ entityVersionId: z.ZodOptional<z.ZodString>;
2041
+ parentEntityVersionId: z.ZodOptional<z.ZodString>;
2042
+ rootEntityVersionId: z.ZodOptional<z.ZodString>;
1929
2043
  userId: z.ZodOptional<z.ZodString>;
1930
2044
  organizationId: z.ZodOptional<z.ZodString>;
1931
2045
  experimentId: z.ZodOptional<z.ZodString>;
@@ -1978,6 +2092,9 @@ declare const listMetricsArgsSchema: z.ZodObject<{
1978
2092
  spanId: z.ZodOptional<z.ZodString>;
1979
2093
  entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
1980
2094
  entityName: z.ZodOptional<z.ZodString>;
2095
+ entityVersionId: z.ZodOptional<z.ZodString>;
2096
+ parentEntityVersionId: z.ZodOptional<z.ZodString>;
2097
+ rootEntityVersionId: z.ZodOptional<z.ZodString>;
1981
2098
  userId: z.ZodOptional<z.ZodString>;
1982
2099
  organizationId: z.ZodOptional<z.ZodString>;
1983
2100
  experimentId: z.ZodOptional<z.ZodString>;
@@ -2049,6 +2166,9 @@ declare const listMetricsResponseSchema: z.ZodObject<{
2049
2166
  environment: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2050
2167
  serviceName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2051
2168
  scope: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2169
+ entityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2170
+ parentEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2171
+ rootEntityVersionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2052
2172
  experimentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2053
2173
  timestamp: z.ZodDate;
2054
2174
  name: z.ZodString;
@@ -2086,6 +2206,9 @@ declare const getMetricAggregateArgsSchema: z.ZodObject<{
2086
2206
  spanId: z.ZodOptional<z.ZodString>;
2087
2207
  entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
2088
2208
  entityName: z.ZodOptional<z.ZodString>;
2209
+ entityVersionId: z.ZodOptional<z.ZodString>;
2210
+ parentEntityVersionId: z.ZodOptional<z.ZodString>;
2211
+ rootEntityVersionId: z.ZodOptional<z.ZodString>;
2089
2212
  userId: z.ZodOptional<z.ZodString>;
2090
2213
  organizationId: z.ZodOptional<z.ZodString>;
2091
2214
  experimentId: z.ZodOptional<z.ZodString>;
@@ -2148,6 +2271,9 @@ declare const getMetricBreakdownArgsSchema: z.ZodObject<{
2148
2271
  spanId: z.ZodOptional<z.ZodString>;
2149
2272
  entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
2150
2273
  entityName: z.ZodOptional<z.ZodString>;
2274
+ entityVersionId: z.ZodOptional<z.ZodString>;
2275
+ parentEntityVersionId: z.ZodOptional<z.ZodString>;
2276
+ rootEntityVersionId: z.ZodOptional<z.ZodString>;
2151
2277
  userId: z.ZodOptional<z.ZodString>;
2152
2278
  organizationId: z.ZodOptional<z.ZodString>;
2153
2279
  experimentId: z.ZodOptional<z.ZodString>;
@@ -2210,6 +2336,9 @@ declare const getMetricTimeSeriesArgsSchema: z.ZodObject<{
2210
2336
  spanId: z.ZodOptional<z.ZodString>;
2211
2337
  entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
2212
2338
  entityName: z.ZodOptional<z.ZodString>;
2339
+ entityVersionId: z.ZodOptional<z.ZodString>;
2340
+ parentEntityVersionId: z.ZodOptional<z.ZodString>;
2341
+ rootEntityVersionId: z.ZodOptional<z.ZodString>;
2213
2342
  userId: z.ZodOptional<z.ZodString>;
2214
2343
  organizationId: z.ZodOptional<z.ZodString>;
2215
2344
  experimentId: z.ZodOptional<z.ZodString>;
@@ -2269,6 +2398,9 @@ declare const getMetricPercentilesArgsSchema: z.ZodObject<{
2269
2398
  spanId: z.ZodOptional<z.ZodString>;
2270
2399
  entityType: z.ZodOptional<z.ZodEnum<typeof EntityType>>;
2271
2400
  entityName: z.ZodOptional<z.ZodString>;
2401
+ entityVersionId: z.ZodOptional<z.ZodString>;
2402
+ parentEntityVersionId: z.ZodOptional<z.ZodString>;
2403
+ rootEntityVersionId: z.ZodOptional<z.ZodString>;
2272
2404
  userId: z.ZodOptional<z.ZodString>;
2273
2405
  organizationId: z.ZodOptional<z.ZodString>;
2274
2406
  experimentId: z.ZodOptional<z.ZodString>;
@@ -2362,4 +2494,4 @@ declare const getTagsResponseSchema: z.ZodObject<{
2362
2494
  }, z.core.$strip>;
2363
2495
  type GetTagsResponse = z.infer<typeof getTagsResponseSchema>;
2364
2496
 
2365
- export { type AggregationInterval, type AggregationType, type BatchCreateFeedbackArgs, type BatchCreateLogsArgs, type BatchCreateMetricsArgs, type BatchCreateScoresArgs, type ComparePeriod, type CreateFeedbackArgs, type CreateFeedbackBody, type CreateFeedbackRecord, type CreateFeedbackResponse, type CreateLogRecord, type CreateMetricRecord, type CreateScoreArgs, type CreateScoreBody, type CreateScoreRecord, type CreateScoreResponse, type DateRange, EntityType, type FeedbackFilter, type FeedbackInput, type FeedbackRecord, type GetEntityNamesArgs, type GetEntityNamesResponse, type GetEntityTypesArgs, type GetEntityTypesResponse, type GetEnvironmentsArgs, type GetEnvironmentsResponse, type GetFeedbackAggregateArgs, type GetFeedbackAggregateResponse, type GetFeedbackBreakdownArgs, type GetFeedbackBreakdownResponse, type GetFeedbackPercentilesArgs, type GetFeedbackPercentilesResponse, type GetFeedbackTimeSeriesArgs, type GetFeedbackTimeSeriesResponse, type GetMetricAggregateArgs, type GetMetricAggregateResponse, type GetMetricBreakdownArgs, type GetMetricBreakdownResponse, type GetMetricLabelKeysArgs, type GetMetricLabelKeysResponse, type GetMetricLabelValuesArgs, type GetMetricLabelValuesResponse, type GetMetricNamesArgs, type GetMetricNamesResponse, type GetMetricPercentilesArgs, type GetMetricPercentilesResponse, type GetMetricTimeSeriesArgs, type GetMetricTimeSeriesResponse, type GetScoreAggregateArgs, type GetScoreAggregateResponse, type GetScoreBreakdownArgs, type GetScoreBreakdownResponse, type GetScorePercentilesArgs, type GetScorePercentilesResponse, type GetScoreTimeSeriesArgs, type GetScoreTimeSeriesResponse, type GetServiceNamesArgs, type GetServiceNamesResponse, type GetTagsArgs, type GetTagsResponse, type GroupBy, type ListFeedbackArgs, type ListFeedbackResponse, type ListLogsArgs, type ListLogsResponse, type ListMetricsArgs, type ListMetricsResponse, type ListScoresArgs, type ListScoresResponse, type LogRecord, type LogRecordInput, type LogsFilter, type MetricInput, type MetricRecord, type MetricsAggregation, type MetricsFilter, type PaginationArgs, type Percentiles, type ScoreInput, type ScoreRecord, type ScoresFilter, aggregateResponseFields, aggregatedValueField, aggregationIntervalSchema, aggregationTypeSchema, batchCreateFeedbackArgsSchema, batchCreateLogsArgsSchema, batchCreateMetricsArgsSchema, batchCreateScoresArgsSchema, bucketTimestampField, commonFilterFields, comparePeriodSchema, contextFields, createFeedbackArgsSchema, createFeedbackBodySchema, createFeedbackRecordSchema, createFeedbackResponseSchema, createLogRecordSchema, createMetricRecordSchema, createScoreArgsSchema, createScoreBodySchema, createScoreRecordSchema, createScoreResponseSchema, createdAtField, dateRangeSchema, dbTimestamps, dimensionsField, entityIdField, entityNameField, entityTypeField, environmentField, executionSourceField, experimentIdField, feedbackFilterSchema, feedbackInputSchema, feedbackOrderByFieldSchema, feedbackOrderBySchema, feedbackRecordSchema, getEntityNamesArgsSchema, getEntityNamesResponseSchema, getEntityTypesArgsSchema, getEntityTypesResponseSchema, getEnvironmentsArgsSchema, getEnvironmentsResponseSchema, getFeedbackAggregateArgsSchema, getFeedbackAggregateResponseSchema, getFeedbackBreakdownArgsSchema, getFeedbackBreakdownResponseSchema, getFeedbackPercentilesArgsSchema, getFeedbackPercentilesResponseSchema, getFeedbackTimeSeriesArgsSchema, getFeedbackTimeSeriesResponseSchema, getMetricAggregateArgsSchema, getMetricAggregateResponseSchema, getMetricBreakdownArgsSchema, getMetricBreakdownResponseSchema, getMetricLabelKeysArgsSchema, getMetricLabelKeysResponseSchema, getMetricLabelValuesArgsSchema, getMetricLabelValuesResponseSchema, getMetricNamesArgsSchema, getMetricNamesResponseSchema, getMetricPercentilesArgsSchema, getMetricPercentilesResponseSchema, getMetricTimeSeriesArgsSchema, getMetricTimeSeriesResponseSchema, getScoreAggregateArgsSchema, getScoreAggregateResponseSchema, getScoreBreakdownArgsSchema, getScoreBreakdownResponseSchema, getScorePercentilesArgsSchema, getScorePercentilesResponseSchema, getScoreTimeSeriesArgsSchema, getScoreTimeSeriesResponseSchema, getServiceNamesArgsSchema, getServiceNamesResponseSchema, getTagsArgsSchema, getTagsResponseSchema, groupBySchema, listFeedbackArgsSchema, listFeedbackResponseSchema, listLogsArgsSchema, listLogsResponseSchema, listMetricsArgsSchema, listMetricsResponseSchema, listScoresArgsSchema, listScoresResponseSchema, logLevelSchema, logRecordInputSchema, logRecordSchema, logsFilterSchema, logsOrderByFieldSchema, logsOrderBySchema, metadataField, metricInputSchema, metricRecordSchema, metricTypeSchema, metricsAggregationSchema, metricsFilterSchema, metricsOrderByFieldSchema, metricsOrderBySchema, organizationIdField, paginationArgsSchema, paginationInfoSchema, parentEntityIdField, parentEntityNameField, parentEntityTypeField, percentileBucketValueField, percentileField, percentilesSchema, requestIdField, resourceIdField, rootEntityIdField, rootEntityNameField, rootEntityTypeField, runIdField, scopeField, scoreInputSchema, scoreRecordSchema, scoresFilterSchema, scoresOrderByFieldSchema, scoresOrderBySchema, serviceNameField, sessionIdField, sortDirectionSchema, sourceField, spanContextFields, spanIdField, tagsField, threadIdField, traceIdField, updatedAtField, userIdField };
2497
+ export { type AggregationInterval, type AggregationType, type BatchCreateFeedbackArgs, type BatchCreateLogsArgs, type BatchCreateMetricsArgs, type BatchCreateScoresArgs, type ComparePeriod, type CreateFeedbackArgs, type CreateFeedbackBody, type CreateFeedbackRecord, type CreateFeedbackResponse, type CreateLogRecord, type CreateMetricRecord, type CreateScoreArgs, type CreateScoreBody, type CreateScoreRecord, type CreateScoreResponse, type DateRange, EntityType, type FeedbackFilter, type FeedbackInput, type FeedbackRecord, type GetEntityNamesArgs, type GetEntityNamesResponse, type GetEntityTypesArgs, type GetEntityTypesResponse, type GetEnvironmentsArgs, type GetEnvironmentsResponse, type GetFeedbackAggregateArgs, type GetFeedbackAggregateResponse, type GetFeedbackBreakdownArgs, type GetFeedbackBreakdownResponse, type GetFeedbackPercentilesArgs, type GetFeedbackPercentilesResponse, type GetFeedbackTimeSeriesArgs, type GetFeedbackTimeSeriesResponse, type GetMetricAggregateArgs, type GetMetricAggregateResponse, type GetMetricBreakdownArgs, type GetMetricBreakdownResponse, type GetMetricLabelKeysArgs, type GetMetricLabelKeysResponse, type GetMetricLabelValuesArgs, type GetMetricLabelValuesResponse, type GetMetricNamesArgs, type GetMetricNamesResponse, type GetMetricPercentilesArgs, type GetMetricPercentilesResponse, type GetMetricTimeSeriesArgs, type GetMetricTimeSeriesResponse, type GetScoreAggregateArgs, type GetScoreAggregateResponse, type GetScoreBreakdownArgs, type GetScoreBreakdownResponse, type GetScorePercentilesArgs, type GetScorePercentilesResponse, type GetScoreTimeSeriesArgs, type GetScoreTimeSeriesResponse, type GetServiceNamesArgs, type GetServiceNamesResponse, type GetTagsArgs, type GetTagsResponse, type GroupBy, type ListFeedbackArgs, type ListFeedbackResponse, type ListLogsArgs, type ListLogsResponse, type ListMetricsArgs, type ListMetricsResponse, type ListScoresArgs, type ListScoresResponse, type LogRecord, type LogRecordInput, type LogsFilter, type MetricInput, type MetricRecord, type MetricsAggregation, type MetricsFilter, type PaginationArgs, type Percentiles, type ScoreInput, type ScoreRecord, type ScoresFilter, aggregateResponseFields, aggregatedValueField, aggregationIntervalSchema, aggregationTypeSchema, batchCreateFeedbackArgsSchema, batchCreateLogsArgsSchema, batchCreateMetricsArgsSchema, batchCreateScoresArgsSchema, bucketTimestampField, commonFilterFields, comparePeriodSchema, contextFields, createFeedbackArgsSchema, createFeedbackBodySchema, createFeedbackRecordSchema, createFeedbackResponseSchema, createLogRecordSchema, createMetricRecordSchema, createScoreArgsSchema, createScoreBodySchema, createScoreRecordSchema, createScoreResponseSchema, createdAtField, dateRangeSchema, dbTimestamps, dimensionsField, entityIdField, entityNameField, entityTypeField, entityVersionIdField, environmentField, executionSourceField, experimentIdField, feedbackFilterSchema, feedbackInputSchema, feedbackOrderByFieldSchema, feedbackOrderBySchema, feedbackRecordSchema, getEntityNamesArgsSchema, getEntityNamesResponseSchema, getEntityTypesArgsSchema, getEntityTypesResponseSchema, getEnvironmentsArgsSchema, getEnvironmentsResponseSchema, getFeedbackAggregateArgsSchema, getFeedbackAggregateResponseSchema, getFeedbackBreakdownArgsSchema, getFeedbackBreakdownResponseSchema, getFeedbackPercentilesArgsSchema, getFeedbackPercentilesResponseSchema, getFeedbackTimeSeriesArgsSchema, getFeedbackTimeSeriesResponseSchema, getMetricAggregateArgsSchema, getMetricAggregateResponseSchema, getMetricBreakdownArgsSchema, getMetricBreakdownResponseSchema, getMetricLabelKeysArgsSchema, getMetricLabelKeysResponseSchema, getMetricLabelValuesArgsSchema, getMetricLabelValuesResponseSchema, getMetricNamesArgsSchema, getMetricNamesResponseSchema, getMetricPercentilesArgsSchema, getMetricPercentilesResponseSchema, getMetricTimeSeriesArgsSchema, getMetricTimeSeriesResponseSchema, getScoreAggregateArgsSchema, getScoreAggregateResponseSchema, getScoreBreakdownArgsSchema, getScoreBreakdownResponseSchema, getScorePercentilesArgsSchema, getScorePercentilesResponseSchema, getScoreTimeSeriesArgsSchema, getScoreTimeSeriesResponseSchema, getServiceNamesArgsSchema, getServiceNamesResponseSchema, getTagsArgsSchema, getTagsResponseSchema, groupBySchema, listFeedbackArgsSchema, listFeedbackResponseSchema, listLogsArgsSchema, listLogsResponseSchema, listMetricsArgsSchema, listMetricsResponseSchema, listScoresArgsSchema, listScoresResponseSchema, logLevelSchema, logRecordInputSchema, logRecordSchema, logsFilterSchema, logsOrderByFieldSchema, logsOrderBySchema, metadataField, metricInputSchema, metricRecordSchema, metricTypeSchema, metricsAggregationSchema, metricsFilterSchema, metricsOrderByFieldSchema, metricsOrderBySchema, organizationIdField, paginationArgsSchema, paginationInfoSchema, parentEntityIdField, parentEntityNameField, parentEntityTypeField, parentEntityVersionIdField, percentileBucketValueField, percentileField, percentilesSchema, requestIdField, resourceIdField, rootEntityIdField, rootEntityNameField, rootEntityTypeField, rootEntityVersionIdField, runIdField, scopeField, scoreInputSchema, scoreRecordSchema, scoresFilterSchema, scoresOrderByFieldSchema, scoresOrderBySchema, serviceNameField, sessionIdField, sortDirectionSchema, sourceField, spanContextFields, spanIdField, tagsField, threadIdField, traceIdField, updatedAtField, userIdField };
@@ -3,7 +3,7 @@
3
3
  var chunk5N66PU3H_cjs = require('./chunk-5N66PU3H.cjs');
4
4
  var chunkEXKS4QPI_cjs = require('./chunk-EXKS4QPI.cjs');
5
5
  var chunkFPURK3UW_cjs = require('./chunk-FPURK3UW.cjs');
6
- var chunkXEDMM24R_cjs = require('./chunk-XEDMM24R.cjs');
6
+ var chunkPNMZ2R5P_cjs = require('./chunk-PNMZ2R5P.cjs');
7
7
  var chunkR2ODPDKE_cjs = require('./chunk-R2ODPDKE.cjs');
8
8
  var chunkL65D4K32_cjs = require('./chunk-L65D4K32.cjs');
9
9
  var chunkDOHUOYZS_cjs = require('./chunk-DOHUOYZS.cjs');
@@ -16399,8 +16399,8 @@ function formatTimestamp(date) {
16399
16399
  return date.toISOString().replace("T", " ").replace(/\.\d{3}Z$/, "Z");
16400
16400
  }
16401
16401
  function truncateByTokens(text42, maxTokens, hint) {
16402
- if (chunkXEDMM24R_cjs.estimateTokenCount(text42) <= maxTokens) return { text: text42, wasTruncated: false };
16403
- const truncated = chunkXEDMM24R_cjs.truncateStringByTokens(text42, maxTokens);
16402
+ if (chunkPNMZ2R5P_cjs.estimateTokenCount(text42) <= maxTokens) return { text: text42, wasTruncated: false };
16403
+ const truncated = chunkPNMZ2R5P_cjs.truncateStringByTokens(text42, maxTokens);
16404
16404
  const suffix = hint ? ` [${hint} for more]` : "";
16405
16405
  return { text: truncated + suffix, wasTruncated: true };
16406
16406
  }
@@ -16452,11 +16452,11 @@ ${JSON.stringify(inv.args, null, 2)}`;
16452
16452
  });
16453
16453
  }
16454
16454
  if (inv.state === "result") {
16455
- const { value: resultValue } = chunkXEDMM24R_cjs.resolveToolResultValue(
16455
+ const { value: resultValue } = chunkPNMZ2R5P_cjs.resolveToolResultValue(
16456
16456
  part,
16457
16457
  inv.result
16458
16458
  );
16459
- const resultStr = chunkXEDMM24R_cjs.formatToolResultForObserver(resultValue, { maxTokens: HIGH_DETAIL_TOOL_RESULT_TOKENS });
16459
+ const resultStr = chunkPNMZ2R5P_cjs.formatToolResultForObserver(resultValue, { maxTokens: HIGH_DETAIL_TOOL_RESULT_TOKENS });
16460
16460
  const fullText = `[Tool Result: ${inv.toolName}]
16461
16461
  ${resultStr}`;
16462
16462
  parts.push(makePart(msg, i, "tool-result", fullText, detail, inv.toolName));
@@ -16483,7 +16483,7 @@ ${typeof rawArgs === "string" ? rawArgs : JSON.stringify(rawArgs, null, 2)}`;
16483
16483
  const toolName = part.toolName;
16484
16484
  if (toolName) {
16485
16485
  const rawResult = part.output ?? part.result;
16486
- const resultStr = chunkXEDMM24R_cjs.formatToolResultForObserver(rawResult, { maxTokens: HIGH_DETAIL_TOOL_RESULT_TOKENS });
16486
+ const resultStr = chunkPNMZ2R5P_cjs.formatToolResultForObserver(rawResult, { maxTokens: HIGH_DETAIL_TOOL_RESULT_TOKENS });
16487
16487
  const fullText = `[Tool Result: ${toolName}]
16488
16488
  ${resultStr}`;
16489
16489
  parts.push(makePart(msg, i, "tool-result", fullText, detail, toolName));
@@ -16561,9 +16561,9 @@ function expandPriority(part) {
16561
16561
  }
16562
16562
  function renderFormattedParts(parts, timestamps, options) {
16563
16563
  const text42 = buildRenderedText(parts, timestamps);
16564
- let totalTokens = chunkXEDMM24R_cjs.estimateTokenCount(text42);
16564
+ let totalTokens = chunkPNMZ2R5P_cjs.estimateTokenCount(text42);
16565
16565
  if (totalTokens > options.maxTokens) {
16566
- const truncated = chunkXEDMM24R_cjs.truncateStringByTokens(text42, options.maxTokens);
16566
+ const truncated = chunkPNMZ2R5P_cjs.truncateStringByTokens(text42, options.maxTokens);
16567
16567
  return { text: truncated, truncated: true, tokenOffset: totalTokens - options.maxTokens };
16568
16568
  }
16569
16569
  const truncatedIndices = parts.map((p, i) => ({ part: p, index: i })).filter(({ part }) => part.text !== part.fullText).sort((a, b) => expandPriority(a.part) - expandPriority(b.part));
@@ -16574,8 +16574,8 @@ function renderFormattedParts(parts, timestamps, options) {
16574
16574
  for (const { part, index } of truncatedIndices) {
16575
16575
  if (remaining <= 0) break;
16576
16576
  const maxTokens = expandLimit(part);
16577
- const fullTokens = chunkXEDMM24R_cjs.estimateTokenCount(part.fullText);
16578
- const currentTokens = chunkXEDMM24R_cjs.estimateTokenCount(part.text);
16577
+ const fullTokens = chunkPNMZ2R5P_cjs.estimateTokenCount(part.fullText);
16578
+ const currentTokens = chunkPNMZ2R5P_cjs.estimateTokenCount(part.text);
16579
16579
  const targetTokens = Math.min(fullTokens, maxTokens);
16580
16580
  const delta = targetTokens - currentTokens;
16581
16581
  if (delta <= 0) continue;
@@ -16586,17 +16586,17 @@ function renderFormattedParts(parts, timestamps, options) {
16586
16586
  const expandedLimit = Math.min(currentTokens + remaining, maxTokens);
16587
16587
  const hint = `recall cursor="${part.messageId}" partIndex=${part.partIndex} detail="high"`;
16588
16588
  const { text: expanded2 } = truncateByTokens(part.fullText, expandedLimit, hint);
16589
- const expandedDelta = chunkXEDMM24R_cjs.estimateTokenCount(expanded2) - currentTokens;
16589
+ const expandedDelta = chunkPNMZ2R5P_cjs.estimateTokenCount(expanded2) - currentTokens;
16590
16590
  parts[index] = { ...part, text: expanded2 };
16591
16591
  remaining -= expandedDelta;
16592
16592
  }
16593
16593
  }
16594
16594
  const expanded = buildRenderedText(parts, timestamps);
16595
- const expandedTokens = chunkXEDMM24R_cjs.estimateTokenCount(expanded);
16595
+ const expandedTokens = chunkPNMZ2R5P_cjs.estimateTokenCount(expanded);
16596
16596
  if (expandedTokens <= options.maxTokens) {
16597
16597
  return { text: expanded, truncated: false, tokenOffset: 0 };
16598
16598
  }
16599
- const hardTruncated = chunkXEDMM24R_cjs.truncateStringByTokens(expanded, options.maxTokens);
16599
+ const hardTruncated = chunkPNMZ2R5P_cjs.truncateStringByTokens(expanded, options.maxTokens);
16600
16600
  return { text: hardTruncated, truncated: true, tokenOffset: expandedTokens - options.maxTokens };
16601
16601
  }
16602
16602
  async function recallPart({
@@ -16647,7 +16647,7 @@ async function recallPart({
16647
16647
 
16648
16648
  `;
16649
16649
  const fallbackText = `${fallbackNote}${firstNextPart.text}`;
16650
- const truncatedText2 = chunkXEDMM24R_cjs.truncateStringByTokens(fallbackText, maxTokens);
16650
+ const truncatedText2 = chunkPNMZ2R5P_cjs.truncateStringByTokens(fallbackText, maxTokens);
16651
16651
  const wasTruncated2 = truncatedText2 !== fallbackText;
16652
16652
  return {
16653
16653
  text: truncatedText2,
@@ -16662,7 +16662,7 @@ async function recallPart({
16662
16662
  }
16663
16663
  throw new Error(`Part index ${partIndex} not found in message ${cursor}. Available indices: ${availableIndices}`);
16664
16664
  }
16665
- const truncatedText = chunkXEDMM24R_cjs.truncateStringByTokens(target.text, maxTokens);
16665
+ const truncatedText = chunkPNMZ2R5P_cjs.truncateStringByTokens(target.text, maxTokens);
16666
16666
  const wasTruncated = truncatedText !== target.text;
16667
16667
  return {
16668
16668
  text: truncatedText,
@@ -17891,7 +17891,7 @@ ${workingMemory}`;
17891
17891
  }
17892
17892
  return chunks;
17893
17893
  }
17894
- hasher = chunkXEDMM24R_cjs.e();
17894
+ hasher = chunkPNMZ2R5P_cjs.e();
17895
17895
  // embedding is computationally expensive so cache content -> embeddings/chunks
17896
17896
  embeddingCache = /* @__PURE__ */ new Map();
17897
17897
  firstEmbed;
@@ -18293,7 +18293,7 @@ ${workingMemory}`;
18293
18293
  "Observational memory requires @mastra/core support for request-response-id-rotation. Please bump @mastra/core to a newer version."
18294
18294
  );
18295
18295
  }
18296
- const { ObservationalMemory: OMClass } = await import('./observational-memory-H74M5SB6-ELUPJE5K.cjs');
18296
+ const { ObservationalMemory: OMClass } = await import('./observational-memory-4TDIBXK6-LKQTCHRF.cjs');
18297
18297
  const onIndexObservations = this.hasRetrievalSearch(omConfig.retrieval) ? async (observation) => {
18298
18298
  await this.indexObservation(observation);
18299
18299
  } : void 0;
@@ -19216,7 +19216,7 @@ Notes:
19216
19216
  if (!effectiveConfig) return null;
19217
19217
  const engine = await this.omEngine;
19218
19218
  if (!engine) return null;
19219
- const { ObservationalMemoryProcessor } = await import('./observational-memory-H74M5SB6-ELUPJE5K.cjs');
19219
+ const { ObservationalMemoryProcessor } = await import('./observational-memory-4TDIBXK6-LKQTCHRF.cjs');
19220
19220
  return new ObservationalMemoryProcessor(engine, this);
19221
19221
  }
19222
19222
  };
@@ -30436,5 +30436,5 @@ exports.START_ASYNC_AGENT_BUILDER_ACTION_ROUTE = START_ASYNC_AGENT_BUILDER_ACTIO
30436
30436
  exports.STREAM_AGENT_BUILDER_ACTION_ROUTE = STREAM_AGENT_BUILDER_ACTION_ROUTE;
30437
30437
  exports.STREAM_LEGACY_AGENT_BUILDER_ACTION_ROUTE = STREAM_LEGACY_AGENT_BUILDER_ACTION_ROUTE;
30438
30438
  exports.agent_builder_exports = agent_builder_exports;
30439
- //# sourceMappingURL=chunk-GXFIXDFL.cjs.map
30440
- //# sourceMappingURL=chunk-GXFIXDFL.cjs.map
30439
+ //# sourceMappingURL=chunk-24VJHE45.cjs.map
30440
+ //# sourceMappingURL=chunk-24VJHE45.cjs.map