@mastra/upstash 0.14.0-alpha.0 → 0.14.0-alpha.1

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.
@@ -1,7 +1,7 @@
1
1
  import type { EvalRow, PaginationArgs, PaginationInfo } from '@mastra/core/storage';
2
2
  import { LegacyEvalsStorage } from '@mastra/core/storage';
3
3
  import type { Redis } from '@upstash/redis';
4
- import type { StoreOperationsUpstash } from '../operations';
4
+ import type { StoreOperationsUpstash } from '../operations/index.js';
5
5
  export declare class StoreLegacyEvalsUpstash extends LegacyEvalsStorage {
6
6
  private client;
7
7
  private operations;
@@ -3,7 +3,7 @@ import type { MastraMessageV1, MastraMessageV2, StorageThreadType } from '@mastr
3
3
  import { MemoryStorage } from '@mastra/core/storage';
4
4
  import type { StorageGetMessagesArg, PaginationInfo, StorageResourceType } from '@mastra/core/storage';
5
5
  import type { Redis } from '@upstash/redis';
6
- import type { StoreOperationsUpstash } from '../operations';
6
+ import type { StoreOperationsUpstash } from '../operations/index.js';
7
7
  export declare class StoreMemoryUpstash extends MemoryStorage {
8
8
  private client;
9
9
  private operations;
@@ -1,7 +1,7 @@
1
1
  import type { ScoreRowData } from '@mastra/core/scores';
2
2
  import { ScoresStorage } from '@mastra/core/storage';
3
3
  import type { Redis } from '@upstash/redis';
4
- import type { StoreOperationsUpstash } from '../operations';
4
+ import type { StoreOperationsUpstash } from '../operations/index.js';
5
5
  export declare class ScoresUpstash extends ScoresStorage {
6
6
  private client;
7
7
  private operations;
@@ -1,7 +1,7 @@
1
1
  import type { StorageGetTracesArg, PaginationInfo, PaginationArgs } from '@mastra/core/storage';
2
2
  import { TracesStorage } from '@mastra/core/storage';
3
3
  import type { Redis } from '@upstash/redis';
4
- import type { StoreOperationsUpstash } from '../operations';
4
+ import type { StoreOperationsUpstash } from '../operations/index.js';
5
5
  export declare class TracesUpstash extends TracesStorage {
6
6
  private client;
7
7
  private operations;
@@ -1,7 +1,7 @@
1
1
  import type { WorkflowRun, WorkflowRuns, WorkflowRunState } from '@mastra/core';
2
2
  import { WorkflowsStorage } from '@mastra/core/storage';
3
3
  import type { Redis } from '@upstash/redis';
4
- import type { StoreOperationsUpstash } from '../operations';
4
+ import type { StoreOperationsUpstash } from '../operations/index.js';
5
5
  export declare class WorkflowsUpstash extends WorkflowsStorage {
6
6
  private client;
7
7
  private operations;
@@ -1,7 +1,7 @@
1
1
  import { MastraVector } from '@mastra/core/vector';
2
2
  import type { CreateIndexParams, DeleteIndexParams, DeleteVectorParams, DescribeIndexParams, IndexStats, QueryResult } from '@mastra/core/vector';
3
- import type { UpstashVectorFilter } from './filter';
4
- import type { UpstashUpsertVectorParams, UpstashQueryVectorParams, UpstashUpdateVectorParams } from './types';
3
+ import type { UpstashVectorFilter } from './filter.js';
4
+ import type { UpstashUpsertVectorParams, UpstashQueryVectorParams, UpstashUpdateVectorParams } from './types.js';
5
5
  export declare class UpstashVector extends MastraVector<UpstashVectorFilter> {
6
6
  private client;
7
7
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vector/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,UAAU,EACV,WAAW,EACZ,MAAM,qBAAqB,CAAC;AAI7B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,KAAK,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAE9G,qBAAa,aAAc,SAAQ,YAAY,CAAC,mBAAmB,CAAC;IAClE,OAAO,CAAC,MAAM,CAAQ;IAEtB;;;;;OAKG;gBACS,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAA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YAAY,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC;IA4ClG;;;;;;OAMG;IACG,YAAY,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;CAkBpF"}
@@ -1,6 +1,6 @@
1
1
  import type { UpsertVectorParams, QueryVectorParams, UpdateVectorParams } from '@mastra/core/vector';
2
2
  import type { FusionAlgorithm, QueryMode } from '@upstash/vector';
3
- import type { UpstashVectorFilter } from './filter';
3
+ import type { UpstashVectorFilter } from './filter.js';
4
4
  export interface UpstashSparseVector {
5
5
  indices: number[];
6
6
  values: number[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/upstash",
3
- "version": "0.14.0-alpha.0",
3
+ "version": "0.14.0-alpha.1",
4
4
  "description": "Upstash provider for Mastra - includes both vector and db storage capabilities",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -12,7 +12,7 @@
12
12
  "default": "./dist/index.js"
13
13
  },
14
14
  "require": {
15
- "types": "./dist/index.d.cts",
15
+ "types": "./dist/index.d.ts",
16
16
  "default": "./dist/index.cjs"
17
17
  }
18
18
  },
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "license": "MIT",
22
22
  "dependencies": {
23
- "@upstash/redis": "^1.35.1",
23
+ "@upstash/redis": "^1.35.3",
24
24
  "@upstash/vector": "^1.2.2"
25
25
  },
26
26
  "devDependencies": {
@@ -31,12 +31,13 @@
31
31
  "tsup": "^8.5.0",
32
32
  "typescript": "^5.8.3",
33
33
  "vitest": "^3.2.4",
34
- "@internal/storage-test-utils": "0.0.22",
35
34
  "@internal/lint": "0.0.26",
36
- "@mastra/core": "0.13.0-alpha.1"
35
+ "@internal/storage-test-utils": "0.0.22",
36
+ "@mastra/core": "0.13.0-alpha.2",
37
+ "@internal/types-builder": "0.0.1"
37
38
  },
38
39
  "peerDependencies": {
39
- "@mastra/core": ">=0.12.0-0 <0.13.0-0"
40
+ "@mastra/core": ">=0.13.0-0 <0.14.0-0"
40
41
  },
41
42
  "scripts": {
42
43
  "pretest": "docker compose up -d",
@@ -1,3 +1,4 @@
1
+ import { randomUUID } from 'node:crypto';
1
2
  import { MastraError, ErrorDomain, ErrorCategory } from '@mastra/core/error';
2
3
  import { MastraVector } from '@mastra/core/vector';
3
4
  import type {
@@ -43,7 +44,7 @@ export class UpstashVector extends MastraVector<UpstashVectorFilter> {
43
44
  ids,
44
45
  sparseVectors,
45
46
  }: UpstashUpsertVectorParams): Promise<string[]> {
46
- const generatedIds = ids || vectors.map(() => crypto.randomUUID());
47
+ const generatedIds = ids || vectors.map(() => randomUUID());
47
48
 
48
49
  const points = vectors.map((vector, index) => ({
49
50
  id: generatedIds[index]!,
package/tsup.config.ts CHANGED
@@ -1,9 +1,6 @@
1
- import { spawn } from 'child_process';
2
- import { promisify } from 'util';
1
+ import { generateTypes } from '@internal/types-builder';
3
2
  import { defineConfig } from 'tsup';
4
3
 
5
- const exec = promisify(spawn);
6
-
7
4
  export default defineConfig({
8
5
  entry: ['src/index.ts'],
9
6
  format: ['esm', 'cjs'],
@@ -15,8 +12,6 @@ export default defineConfig({
15
12
  },
16
13
  sourcemap: true,
17
14
  onSuccess: async () => {
18
- await exec('pnpm', ['tsc', '-p', 'tsconfig.build.json'], {
19
- stdio: 'inherit',
20
- });
15
+ await generateTypes(process.cwd());
21
16
  },
22
17
  });