@mastra/s3vectors 1.1.2-alpha.0 → 1.1.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.
- package/README.md +6 -77
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -75,85 +75,14 @@ for (const r of results) {
|
|
|
75
75
|
await vectorStore.disconnect();
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
## Documentation
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
// Update a single vector (merge metadata or replace vector)
|
|
82
|
-
await vectorStore.updateVector({
|
|
83
|
-
indexName: 'my-index',
|
|
84
|
-
id: ids[0],
|
|
85
|
-
update: {
|
|
86
|
-
// vector: [/* new embedding of length 1536 */],
|
|
87
|
-
metadata: { tags: ['updated'] },
|
|
88
|
-
},
|
|
89
|
-
});
|
|
80
|
+
- [@mastra/s3vectors documentation](https://mastra.ai/reference/vectors/s3vectors)
|
|
90
81
|
|
|
91
|
-
|
|
92
|
-
await vectorStore.deleteVector({
|
|
93
|
-
indexName: 'my-index',
|
|
94
|
-
id: ids[1],
|
|
95
|
-
});
|
|
82
|
+
## Changelog
|
|
96
83
|
|
|
97
|
-
|
|
98
|
-
const stats = await vectorStore.describeIndex({ indexName: 'my-index' });
|
|
84
|
+
See the [package changelog](https://github.com/mastra-ai/mastra/blob/main/stores/s3vectors/CHANGELOG.md) for version history and release notes.
|
|
99
85
|
|
|
100
|
-
|
|
101
|
-
const indexNames = await vectorStore.listIndexes();
|
|
102
|
-
|
|
103
|
-
// Delete index
|
|
104
|
-
await vectorStore.deleteIndex({ indexName: 'my-index' });
|
|
105
|
-
```
|
|
86
|
+
## Support
|
|
106
87
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
The S3 Vectors store reads configuration from the constructor and standard AWS SDK sources:
|
|
110
|
-
|
|
111
|
-
- `vectorBucketName` (required): The **vector bucket** name dedicated to S3 Vectors.
|
|
112
|
-
- `clientConfig` (optional): AWS SDK v3 `S3VectorsClientConfig` (e.g., `region`, `credentials`).
|
|
113
|
-
- `nonFilterableMetadataKeys` (optional): Keys that are **stored** but **not filterable** at query time.
|
|
114
|
-
_These are applied when an index is created._
|
|
115
|
-
|
|
116
|
-
> **Tip**
|
|
117
|
-
> Index names are normalized by the library: underscores are replaced with hyphens and names are lower-cased.
|
|
118
|
-
|
|
119
|
-
## Features
|
|
120
|
-
|
|
121
|
-
- Purpose-built vector storage with S3-grade durability and elasticity
|
|
122
|
-
- Sub-second similarity search (`cosine` / `euclidean`)
|
|
123
|
-
- Rich **metadata filtering** with JSON operators (`$and`, `$or`, `$in`, …)
|
|
124
|
-
- IAM/SCP-based access control in the `s3vectors` namespace
|
|
125
|
-
- Automatic optimization for writes/updates/deletes as data scales
|
|
126
|
-
|
|
127
|
-
## Methods
|
|
128
|
-
|
|
129
|
-
- `connect(): Promise<void>` / `disconnect(): Promise<void>` — No-ops for interface parity (disconnect closes the underlying HTTP handler)
|
|
130
|
-
- `createIndex({ indexName, dimension, metric? })` → `Promise<void>`
|
|
131
|
-
_After creation, index name/dimension/metric/non-filterable keys cannot be changed._
|
|
132
|
-
- `upsert({ indexName, vectors, metadata?, ids? })` → `Promise<string[]>`
|
|
133
|
-
_Dimensions are validated against the index; Dates in metadata are serialized to epoch millis._
|
|
134
|
-
- `query({ indexName, queryVector, topK?, filter?, includeVector? })` → `Promise<QueryResult[]>`
|
|
135
|
-
_`score` is derived from distance so that “higher is better”._
|
|
136
|
-
- `updateVector({ indexName, id, update: { vector?, metadata? } })` → `Promise<void>`
|
|
137
|
-
_Performs Get→merge→Put (Put is full replace)._
|
|
138
|
-
- `deleteVector({ indexName, id })` → `Promise<void>`
|
|
139
|
-
- `listIndexes()` → `Promise<string[]>`
|
|
140
|
-
- `describeIndex({ indexName })` → `Promise<IndexStats>`
|
|
141
|
-
_Returns `{ dimension, metric, count }`._
|
|
142
|
-
- `deleteIndex({ indexName })` → `Promise<void>`
|
|
143
|
-
|
|
144
|
-
## Related Links
|
|
145
|
-
|
|
146
|
-
- Amazon S3 Vectors – Working with vector buckets & indexes:
|
|
147
|
-
https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-vectors.html
|
|
148
|
-
- Limitations and restrictions:
|
|
149
|
-
https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-vectors-limitations.html
|
|
150
|
-
- Vector indexes:
|
|
151
|
-
https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-vectors-indexes.html
|
|
152
|
-
- Metadata filtering:
|
|
153
|
-
https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-vectors-metadata-filtering.html
|
|
154
|
-
- Vector bucket naming rules:
|
|
155
|
-
https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-vectors-buckets-naming.html
|
|
156
|
-
- Managing vector bucket policies:
|
|
157
|
-
https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-vectors-bucket-policy.html
|
|
158
|
-
- Actions, resources, and condition keys for Amazon S3 Vectors:
|
|
159
|
-
https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazons3vectors.html
|
|
88
|
+
We have an [open community Discord](https://discord.gg/mastra-ai). Come and say hello and let us know if you have any questions or need any help getting things running.
|
package/dist/docs/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: mastra-s3vectors
|
|
|
3
3
|
description: Documentation for @mastra/s3vectors. Use when working with @mastra/s3vectors APIs, configuration, or implementation.
|
|
4
4
|
metadata:
|
|
5
5
|
package: "@mastra/s3vectors"
|
|
6
|
-
version: "1.1.2
|
|
6
|
+
version: "1.1.2"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/s3vectors",
|
|
3
|
-
"version": "1.1.2
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Amazon S3 Vectors store provider for Mastra",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"tsx": "^4.23.1",
|
|
37
37
|
"typescript": "^7.0.2",
|
|
38
38
|
"vitest": "4.1.10",
|
|
39
|
-
"@internal/
|
|
40
|
-
"@internal/
|
|
41
|
-
"@internal/types-builder": "0.0.
|
|
42
|
-
"@mastra/core": "1.64.0
|
|
39
|
+
"@internal/lint": "0.0.130",
|
|
40
|
+
"@internal/storage-test-utils": "0.0.126",
|
|
41
|
+
"@internal/types-builder": "0.0.105",
|
|
42
|
+
"@mastra/core": "1.64.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@mastra/core": ">=1.0.0-0 <2.0.0-0"
|