@mastra/pg 1.32.0-alpha.1 → 1.32.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@ name: mastra-pg
3
3
  description: Documentation for @mastra/pg. Use when working with @mastra/pg APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/pg"
6
- version: "1.32.0-alpha.1"
6
+ version: "1.32.0-alpha.2"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.32.0-alpha.1",
2
+ "version": "1.32.0-alpha.2",
3
3
  "package": "@mastra/pg",
4
4
  "exports": {},
5
5
  "modules": {}
@@ -403,6 +403,8 @@ Memory uses a single embedder for both storing and recalling messages, so pick o
403
403
 
404
404
  Multilingual E5 produces 1024-dimensional vectors. Your vector index must be created with matching dimensions, and E5 vectors can't be mixed with vectors from another embedder in the same index.
405
405
 
406
+ FastEmbed models embed at most 512 tokens per input (roughly 2,000 to 2,500 characters of English text). Longer inputs are truncated, so text past the limit doesn't affect the embedding and can't be found by semantic recall. The AI SDK v3 FastEmbed models return a warning when this happens. The legacy v1 and v2 models don't. If you embed long documents with FastEmbed, chunk them to fit the window, for example with `maxSize: 1500` in `MDocument.chunk()`.
407
+
406
408
  ## PostgreSQL index optimization
407
409
 
408
410
  When using PostgreSQL as your vector store, you can optimize semantic recall performance by configuring the vector index. This is particularly important for large-scale deployments with thousands of messages.
package/dist/index.cjs CHANGED
@@ -16034,6 +16034,11 @@ const SPAN_EVENT_COLUMNS = [
16034
16034
  name: "endedAt",
16035
16035
  type: "timestamptz"
16036
16036
  },
16037
+ {
16038
+ name: "timeToFirstChunkMs",
16039
+ type: "double precision",
16040
+ nullable: true
16041
+ },
16037
16042
  {
16038
16043
  name: "tags",
16039
16044
  type: "text[]",
@@ -16768,6 +16773,11 @@ function additiveColumns(schema) {
16768
16773
  column,
16769
16774
  ddl: `ALTER TABLE ${qualifiedTable(schema, TABLE_SPAN_EVENTS)} ADD COLUMN IF NOT EXISTS "${column}" text`
16770
16775
  })),
16776
+ {
16777
+ table: TABLE_SPAN_EVENTS,
16778
+ column: "timeToFirstChunkMs",
16779
+ ddl: `ALTER TABLE ${qualifiedTable(schema, TABLE_SPAN_EVENTS)} ADD COLUMN IF NOT EXISTS "timeToFirstChunkMs" double precision`
16780
+ },
16771
16781
  {
16772
16782
  table: TABLE_FEEDBACK_EVENTS,
16773
16783
  column: "reviewStatus",
@@ -17489,6 +17499,7 @@ function spanRecordToRow(span) {
17489
17499
  isPending,
17490
17500
  startedAt: toIsoOrDate(span.startedAt),
17491
17501
  endedAt: toIsoOrDate(endedAt),
17502
+ timeToFirstChunkMs: span.timeToFirstChunkMs ?? null,
17492
17503
  tags: normalizeTags(span.tags),
17493
17504
  metadataSearch: buildMetadataSearch(metadata),
17494
17505
  metadataRaw: jsonField(metadata),