@mastra/couchbase 0.0.0-vector-sources-20250516175436 → 0.0.0-vector-extension-schema-20250922130418

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/couchbase",
3
- "version": "0.0.0-vector-sources-20250516175436",
3
+ "version": "0.0.0-vector-extension-schema-20250922130418",
4
4
  "description": "Couchbase vector store provider for Mastra",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -12,31 +12,48 @@
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
  },
19
19
  "./package.json": "./package.json"
20
20
  },
21
21
  "dependencies": {
22
- "couchbase": "^4.4.5",
23
- "@mastra/core": "0.0.0-vector-sources-20250516175436"
22
+ "couchbase": "^4.5.0"
24
23
  },
25
24
  "devDependencies": {
26
- "@microsoft/api-extractor": "^7.52.1",
27
- "@types/node": "^20.17.27",
28
- "@vitest/coverage-v8": "3.0.9",
29
- "@vitest/ui": "3.0.9",
30
- "axios": "^1.8.4",
31
- "eslint": "^9.23.0",
32
- "tsup": "^8.4.0",
33
- "typescript": "^5.8.2",
34
- "vitest": "^3.0.9",
35
- "@internal/lint": "0.0.0-vector-sources-20250516175436"
25
+ "@microsoft/api-extractor": "^7.52.8",
26
+ "@types/node": "^20.19.0",
27
+ "@vitest/coverage-v8": "3.2.3",
28
+ "@vitest/ui": "3.2.3",
29
+ "axios": "^1.12.2",
30
+ "eslint": "^9.35.0",
31
+ "tsup": "^8.5.0",
32
+ "typescript": "^5.8.3",
33
+ "vitest": "^3.2.4",
34
+ "@internal/lint": "0.0.0-vector-extension-schema-20250922130418",
35
+ "@internal/types-builder": "0.0.0-vector-extension-schema-20250922130418",
36
+ "@mastra/core": "0.0.0-vector-extension-schema-20250922130418"
37
+ },
38
+ "peerDependencies": {
39
+ "@mastra/core": "0.0.0-vector-extension-schema-20250922130418"
40
+ },
41
+ "files": [
42
+ "dist",
43
+ "CHANGELOG.md"
44
+ ],
45
+ "homepage": "https://mastra.ai",
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "git+https://github.com/mastra-ai/mastra.git",
49
+ "directory": "stores/couchbase"
50
+ },
51
+ "bugs": {
52
+ "url": "https://github.com/mastra-ai/mastra/issues"
36
53
  },
37
54
  "scripts": {
38
- "build": "tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting",
39
- "build:watch": "pnpm build --watch",
55
+ "build": "tsup --silent --config tsup.config.ts",
56
+ "build:watch": "tsup --watch --silent --config tsup.config.ts",
40
57
  "lint": "eslint .",
41
58
  "coverage": "vitest run --coverage",
42
59
  "pretest": "node scripts/start-docker.js",
@@ -1,86 +0,0 @@
1
- import type { Collection } from 'couchbase';
2
- import type { CreateIndexParams } from '@mastra/core/vector';
3
- import type { DeleteIndexParams } from '@mastra/core/vector';
4
- import type { DeleteVectorParams } from '@mastra/core/vector';
5
- import type { DescribeIndexParams } from '@mastra/core/vector';
6
- import type { IndexStats } from '@mastra/core/vector';
7
- import { MastraVector } from '@mastra/core/vector';
8
- import type { ParamsToArgs } from '@mastra/core/vector';
9
- import type { QueryResult } from '@mastra/core/vector';
10
- import type { QueryVectorParams } from '@mastra/core/vector';
11
- import type { UpdateVectorParams } from '@mastra/core/vector';
12
- import type { UpsertVectorParams } from '@mastra/core/vector';
13
-
14
- declare type CouchbaseMetric = 'cosine' | 'l2_norm' | 'dot_product';
15
-
16
- declare class CouchbaseVector extends MastraVector {
17
- private clusterPromise;
18
- private cluster;
19
- private bucketName;
20
- private collectionName;
21
- private scopeName;
22
- private collection;
23
- private bucket;
24
- private scope;
25
- private vector_dimension;
26
- /**
27
- * @deprecated Passing parameters as positional arguments is deprecated.
28
- * Use the object parameter instead. This signature will be removed on May 20th, 2025.
29
- */
30
- constructor(connectionString: string, username: string, password: string, bucketName: string, scopeName: string, collectionName: string);
31
- constructor(params: CouchbaseVectorParams);
32
- getCollection(): Promise<Collection>;
33
- createIndex(params: CreateIndexParams): Promise<void>;
34
- upsert(params: UpsertVectorParams): Promise<string[]>;
35
- query(params: QueryVectorParams): Promise<QueryResult[]>;
36
- listIndexes(): Promise<string[]>;
37
- /**
38
- * Retrieves statistics about a vector index.
39
- *
40
- * @param params - The parameters for describing an index
41
- * @param params.indexName - The name of the index to describe
42
- * @returns A promise that resolves to the index statistics including dimension, count and metric
43
- */
44
- describeIndex(...args: ParamsToArgs<DescribeIndexParams>): Promise<IndexStats>;
45
- deleteIndex(...args: ParamsToArgs<DeleteIndexParams>): Promise<void>;
46
- /**
47
- * Updates a vector by its ID with the provided vector and/or metadata.
48
- * @param indexName - The name of the index containing the vector.
49
- * @param id - The ID of the vector to update.
50
- * @param update - An object containing the vector and/or metadata to update.
51
- * @param update.vector - An optional array of numbers representing the new vector.
52
- * @param update.metadata - An optional record containing the new metadata.
53
- * @returns A promise that resolves when the update is complete.
54
- * @throws Will throw an error if no updates are provided or if the update operation fails.
55
- */
56
- updateVector(...args: ParamsToArgs<UpdateVectorParams>): Promise<void>;
57
- /**
58
- * Deletes a vector by its ID.
59
- * @param indexName - The name of the index containing the vector.
60
- * @param id - The ID of the vector to delete.
61
- * @returns A promise that resolves when the deletion is complete.
62
- * @throws Will throw an error if the deletion operation fails.
63
- */
64
- deleteVector(...args: ParamsToArgs<DeleteVectorParams>): Promise<void>;
65
- }
66
- export { CouchbaseVector }
67
- export { CouchbaseVector as CouchbaseVector_alias_1 }
68
-
69
- declare type CouchbaseVectorParams = {
70
- connectionString: string;
71
- username: string;
72
- password: string;
73
- bucketName: string;
74
- scopeName: string;
75
- collectionName: string;
76
- };
77
- export { CouchbaseVectorParams }
78
- export { CouchbaseVectorParams as CouchbaseVectorParams_alias_1 }
79
-
80
- declare const DISTANCE_MAPPING: Record<MastraMetric, CouchbaseMetric>;
81
- export { DISTANCE_MAPPING }
82
- export { DISTANCE_MAPPING as DISTANCE_MAPPING_alias_1 }
83
-
84
- declare type MastraMetric = 'cosine' | 'euclidean' | 'dotproduct';
85
-
86
- export { }
@@ -1,86 +0,0 @@
1
- import type { Collection } from 'couchbase';
2
- import type { CreateIndexParams } from '@mastra/core/vector';
3
- import type { DeleteIndexParams } from '@mastra/core/vector';
4
- import type { DeleteVectorParams } from '@mastra/core/vector';
5
- import type { DescribeIndexParams } from '@mastra/core/vector';
6
- import type { IndexStats } from '@mastra/core/vector';
7
- import { MastraVector } from '@mastra/core/vector';
8
- import type { ParamsToArgs } from '@mastra/core/vector';
9
- import type { QueryResult } from '@mastra/core/vector';
10
- import type { QueryVectorParams } from '@mastra/core/vector';
11
- import type { UpdateVectorParams } from '@mastra/core/vector';
12
- import type { UpsertVectorParams } from '@mastra/core/vector';
13
-
14
- declare type CouchbaseMetric = 'cosine' | 'l2_norm' | 'dot_product';
15
-
16
- declare class CouchbaseVector extends MastraVector {
17
- private clusterPromise;
18
- private cluster;
19
- private bucketName;
20
- private collectionName;
21
- private scopeName;
22
- private collection;
23
- private bucket;
24
- private scope;
25
- private vector_dimension;
26
- /**
27
- * @deprecated Passing parameters as positional arguments is deprecated.
28
- * Use the object parameter instead. This signature will be removed on May 20th, 2025.
29
- */
30
- constructor(connectionString: string, username: string, password: string, bucketName: string, scopeName: string, collectionName: string);
31
- constructor(params: CouchbaseVectorParams);
32
- getCollection(): Promise<Collection>;
33
- createIndex(params: CreateIndexParams): Promise<void>;
34
- upsert(params: UpsertVectorParams): Promise<string[]>;
35
- query(params: QueryVectorParams): Promise<QueryResult[]>;
36
- listIndexes(): Promise<string[]>;
37
- /**
38
- * Retrieves statistics about a vector index.
39
- *
40
- * @param params - The parameters for describing an index
41
- * @param params.indexName - The name of the index to describe
42
- * @returns A promise that resolves to the index statistics including dimension, count and metric
43
- */
44
- describeIndex(...args: ParamsToArgs<DescribeIndexParams>): Promise<IndexStats>;
45
- deleteIndex(...args: ParamsToArgs<DeleteIndexParams>): Promise<void>;
46
- /**
47
- * Updates a vector by its ID with the provided vector and/or metadata.
48
- * @param indexName - The name of the index containing the vector.
49
- * @param id - The ID of the vector to update.
50
- * @param update - An object containing the vector and/or metadata to update.
51
- * @param update.vector - An optional array of numbers representing the new vector.
52
- * @param update.metadata - An optional record containing the new metadata.
53
- * @returns A promise that resolves when the update is complete.
54
- * @throws Will throw an error if no updates are provided or if the update operation fails.
55
- */
56
- updateVector(...args: ParamsToArgs<UpdateVectorParams>): Promise<void>;
57
- /**
58
- * Deletes a vector by its ID.
59
- * @param indexName - The name of the index containing the vector.
60
- * @param id - The ID of the vector to delete.
61
- * @returns A promise that resolves when the deletion is complete.
62
- * @throws Will throw an error if the deletion operation fails.
63
- */
64
- deleteVector(...args: ParamsToArgs<DeleteVectorParams>): Promise<void>;
65
- }
66
- export { CouchbaseVector }
67
- export { CouchbaseVector as CouchbaseVector_alias_1 }
68
-
69
- declare type CouchbaseVectorParams = {
70
- connectionString: string;
71
- username: string;
72
- password: string;
73
- bucketName: string;
74
- scopeName: string;
75
- collectionName: string;
76
- };
77
- export { CouchbaseVectorParams }
78
- export { CouchbaseVectorParams as CouchbaseVectorParams_alias_1 }
79
-
80
- declare const DISTANCE_MAPPING: Record<MastraMetric, CouchbaseMetric>;
81
- export { DISTANCE_MAPPING }
82
- export { DISTANCE_MAPPING as DISTANCE_MAPPING_alias_1 }
83
-
84
- declare type MastraMetric = 'cosine' | 'euclidean' | 'dotproduct';
85
-
86
- export { }
package/dist/index.d.cts DELETED
@@ -1,3 +0,0 @@
1
- export { DISTANCE_MAPPING } from './_tsup-dts-rollup.cjs';
2
- export { CouchbaseVectorParams } from './_tsup-dts-rollup.cjs';
3
- export { CouchbaseVector } from './_tsup-dts-rollup.cjs';
@@ -1,21 +0,0 @@
1
- services:
2
- mastra_couchbase_testing:
3
- image: couchbase:enterprise-7.6.4
4
- ports:
5
- - '8091-8095:8091-8095'
6
- - '11210:11210'
7
- - '9102:9102'
8
- expose:
9
- - '8091'
10
- - '8092'
11
- - '8093'
12
- - '8094'
13
- - '8095'
14
- - '9102'
15
- - '11210'
16
- healthcheck: # checks couchbase server is up
17
- test: ['CMD', 'curl', '-v', 'http://localhost:8091/pools']
18
- interval: 20s
19
- timeout: 20s
20
- retries: 5
21
- container_name: mastra_couchbase_testing
package/eslint.config.js DELETED
@@ -1,6 +0,0 @@
1
- import { createConfig } from '@internal/lint/eslint';
2
-
3
- const config = await createConfig();
4
-
5
- /** @type {import("eslint").Linter.Config[]} */
6
- export default [...config];
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env node
2
- import { execSync } from 'child_process';
3
- try {
4
- execSync('docker compose -f "./docker-compose.yaml" ps --quiet');
5
- console.log('Container already running, bringing it down first...');
6
- execSync('docker compose -f "./docker-compose.yaml" down --volumes', { stdio: 'inherit' });
7
- } catch (error) {
8
- console.error('No existing container found', error);
9
- }
10
- try {
11
- execSync('docker compose -f "./docker-compose.yaml" up --wait', { stdio: 'inherit' });
12
- } catch (error) {
13
- console.error('Failed to start container', error);
14
- }
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env node
2
- import { execSync } from 'child_process';
3
- try {
4
- execSync('docker compose -f "./docker-compose.yaml" down --volumes', { stdio: 'inherit' });
5
- } catch (error) {
6
- console.error('Failed to stop container', error);
7
- }
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from './vector';