@mastra/couchbase 0.0.0-vnext-inngest-20250508131921 → 0.0.0-vnext-20251119160359
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 +705 -2
- package/LICENSE.md +11 -42
- package/README.md +11 -1
- package/dist/index.cjs +317 -112
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +316 -111
- package/dist/index.js.map +1 -0
- package/dist/vector/index.d.ts +63 -0
- package/dist/vector/index.d.ts.map +1 -0
- package/package.json +36 -16
- package/dist/_tsup-dts-rollup.d.cts +0 -39
- package/dist/_tsup-dts-rollup.d.ts +0 -39
- package/dist/index.d.cts +0 -2
- package/docker-compose.yaml +0 -21
- package/eslint.config.js +0 -6
- package/scripts/start-docker.js +0 -14
- package/scripts/stop-docker.js +0 -7
- package/src/index.ts +0 -1
- package/src/vector/index.integration.test.ts +0 -619
- package/src/vector/index.ts +0 -287
- package/src/vector/index.unit.test.ts +0 -737
- package/tsconfig.json +0 -5
- package/vitest.config.ts +0 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/couchbase",
|
|
3
|
-
"version": "0.0.0-vnext-
|
|
3
|
+
"version": "0.0.0-vnext-20251119160359",
|
|
4
4
|
"description": "Couchbase vector store provider for Mastra",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -12,31 +12,51 @@
|
|
|
12
12
|
"default": "./dist/index.js"
|
|
13
13
|
},
|
|
14
14
|
"require": {
|
|
15
|
-
"types": "./dist/index.d.
|
|
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.
|
|
23
|
-
"@mastra/core": "0.0.0-vnext-inngest-20250508131921"
|
|
22
|
+
"couchbase": "^4.6.0"
|
|
24
23
|
},
|
|
25
24
|
"devDependencies": {
|
|
26
|
-
"@microsoft/api-extractor": "^7.52.
|
|
27
|
-
"@types/node": "
|
|
28
|
-
"@vitest/coverage-v8": "
|
|
29
|
-
"@vitest/ui": "
|
|
30
|
-
"axios": "^1.
|
|
31
|
-
"eslint": "^9.
|
|
32
|
-
"tsup": "^8.
|
|
33
|
-
"typescript": "^5.8.
|
|
34
|
-
"vitest": "^
|
|
35
|
-
"@internal/lint": "0.0.0-vnext-
|
|
25
|
+
"@microsoft/api-extractor": "^7.52.8",
|
|
26
|
+
"@types/node": "22.13.17",
|
|
27
|
+
"@vitest/coverage-v8": "4.0.8",
|
|
28
|
+
"@vitest/ui": "4.0.8",
|
|
29
|
+
"axios": "^1.12.2",
|
|
30
|
+
"eslint": "^9.37.0",
|
|
31
|
+
"tsup": "^8.5.0",
|
|
32
|
+
"typescript": "^5.8.3",
|
|
33
|
+
"vitest": "^4.0.8",
|
|
34
|
+
"@internal/lint": "0.0.0-vnext-20251119160359",
|
|
35
|
+
"@internal/types-builder": "0.0.0-vnext-20251119160359",
|
|
36
|
+
"@mastra/core": "0.0.0-vnext-20251119160359"
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"@mastra/core": "0.0.0-vnext-20251119160359"
|
|
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"
|
|
53
|
+
},
|
|
54
|
+
"engines": {
|
|
55
|
+
"node": ">=22.13.0"
|
|
36
56
|
},
|
|
37
57
|
"scripts": {
|
|
38
|
-
"build": "tsup
|
|
39
|
-
"build:watch": "
|
|
58
|
+
"build": "tsup --silent --config tsup.config.ts",
|
|
59
|
+
"build:watch": "tsup --watch --silent --config tsup.config.ts",
|
|
40
60
|
"lint": "eslint .",
|
|
41
61
|
"coverage": "vitest run --coverage",
|
|
42
62
|
"pretest": "node scripts/start-docker.js",
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { Collection } from 'couchbase';
|
|
2
|
-
import type { CreateIndexParams } from '@mastra/core/vector';
|
|
3
|
-
import type { IndexStats } from '@mastra/core/vector';
|
|
4
|
-
import { MastraVector } from '@mastra/core/vector';
|
|
5
|
-
import type { QueryResult } from '@mastra/core/vector';
|
|
6
|
-
import type { QueryVectorParams } from '@mastra/core/vector';
|
|
7
|
-
import type { UpsertVectorParams } from '@mastra/core/vector';
|
|
8
|
-
|
|
9
|
-
declare type CouchbaseMetric = 'cosine' | 'l2_norm' | 'dot_product';
|
|
10
|
-
|
|
11
|
-
declare class CouchbaseVector extends MastraVector {
|
|
12
|
-
private clusterPromise;
|
|
13
|
-
private cluster;
|
|
14
|
-
private bucketName;
|
|
15
|
-
private collectionName;
|
|
16
|
-
private scopeName;
|
|
17
|
-
private collection;
|
|
18
|
-
private bucket;
|
|
19
|
-
private scope;
|
|
20
|
-
private vector_dimension;
|
|
21
|
-
constructor(cnn_string: string, username: string, password: string, bucketName: string, scopeName: string, collectionName: string);
|
|
22
|
-
getCollection(): Promise<Collection>;
|
|
23
|
-
createIndex(params: CreateIndexParams): Promise<void>;
|
|
24
|
-
upsert(params: UpsertVectorParams): Promise<string[]>;
|
|
25
|
-
query(params: QueryVectorParams): Promise<QueryResult[]>;
|
|
26
|
-
listIndexes(): Promise<string[]>;
|
|
27
|
-
describeIndex(indexName: string): Promise<IndexStats>;
|
|
28
|
-
deleteIndex(indexName: string): Promise<void>;
|
|
29
|
-
}
|
|
30
|
-
export { CouchbaseVector }
|
|
31
|
-
export { CouchbaseVector as CouchbaseVector_alias_1 }
|
|
32
|
-
|
|
33
|
-
declare const DISTANCE_MAPPING: Record<MastraMetric, CouchbaseMetric>;
|
|
34
|
-
export { DISTANCE_MAPPING }
|
|
35
|
-
export { DISTANCE_MAPPING as DISTANCE_MAPPING_alias_1 }
|
|
36
|
-
|
|
37
|
-
declare type MastraMetric = 'cosine' | 'euclidean' | 'dotproduct';
|
|
38
|
-
|
|
39
|
-
export { }
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { Collection } from 'couchbase';
|
|
2
|
-
import type { CreateIndexParams } from '@mastra/core/vector';
|
|
3
|
-
import type { IndexStats } from '@mastra/core/vector';
|
|
4
|
-
import { MastraVector } from '@mastra/core/vector';
|
|
5
|
-
import type { QueryResult } from '@mastra/core/vector';
|
|
6
|
-
import type { QueryVectorParams } from '@mastra/core/vector';
|
|
7
|
-
import type { UpsertVectorParams } from '@mastra/core/vector';
|
|
8
|
-
|
|
9
|
-
declare type CouchbaseMetric = 'cosine' | 'l2_norm' | 'dot_product';
|
|
10
|
-
|
|
11
|
-
declare class CouchbaseVector extends MastraVector {
|
|
12
|
-
private clusterPromise;
|
|
13
|
-
private cluster;
|
|
14
|
-
private bucketName;
|
|
15
|
-
private collectionName;
|
|
16
|
-
private scopeName;
|
|
17
|
-
private collection;
|
|
18
|
-
private bucket;
|
|
19
|
-
private scope;
|
|
20
|
-
private vector_dimension;
|
|
21
|
-
constructor(cnn_string: string, username: string, password: string, bucketName: string, scopeName: string, collectionName: string);
|
|
22
|
-
getCollection(): Promise<Collection>;
|
|
23
|
-
createIndex(params: CreateIndexParams): Promise<void>;
|
|
24
|
-
upsert(params: UpsertVectorParams): Promise<string[]>;
|
|
25
|
-
query(params: QueryVectorParams): Promise<QueryResult[]>;
|
|
26
|
-
listIndexes(): Promise<string[]>;
|
|
27
|
-
describeIndex(indexName: string): Promise<IndexStats>;
|
|
28
|
-
deleteIndex(indexName: string): Promise<void>;
|
|
29
|
-
}
|
|
30
|
-
export { CouchbaseVector }
|
|
31
|
-
export { CouchbaseVector as CouchbaseVector_alias_1 }
|
|
32
|
-
|
|
33
|
-
declare const DISTANCE_MAPPING: Record<MastraMetric, CouchbaseMetric>;
|
|
34
|
-
export { DISTANCE_MAPPING }
|
|
35
|
-
export { DISTANCE_MAPPING as DISTANCE_MAPPING_alias_1 }
|
|
36
|
-
|
|
37
|
-
declare type MastraMetric = 'cosine' | 'euclidean' | 'dotproduct';
|
|
38
|
-
|
|
39
|
-
export { }
|
package/dist/index.d.cts
DELETED
package/docker-compose.yaml
DELETED
|
@@ -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
package/scripts/start-docker.js
DELETED
|
@@ -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
|
-
}
|
package/scripts/stop-docker.js
DELETED
package/src/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './vector';
|