
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@mastra/chroma
Advanced tools
Vector store implementation for ChromaDB using the official chromadb client with added dimension validation and collection management.
npm install @mastra/chroma
import { ChromaVector } from '@mastra/chroma';
const vectorStore = new ChromaVector({
path: 'http://localhost:8000', // ChromaDB server URL
auth: { // Optional authentication
provider: 'token',
credentials: 'your-token'
}
});
// Create a new collection
await vectorStore.createIndex('my-collection', 1536, 'cosine');
// Add vectors
const vectors = [[0.1, 0.2, ...], [0.3, 0.4, ...]];
const metadata = [{ text: 'doc1' }, { text: 'doc2' }];
const ids = await vectorStore.upsert('my-collection', vectors, metadata);
// Query vectors
const results = await vectorStore.query(
'my-collection',
[0.1, 0.2, ...],
10, // topK
{ text: { $eq: 'doc1' } }, // optional filter
false // includeVector
);
Required:
path
: URL of your ChromaDB serverOptional:
auth
: Authentication configuration
provider
: Authentication providercredentials
: Authentication credentialscreateIndex(indexName, dimension, metric?)
: Create a new collectionupsert(indexName, vectors, metadata?, ids?)
: Add or update vectorsquery(indexName, queryVector, topK?, filter?, includeVector?)
: Search for similar vectorslistIndexes()
: List all collectionsdescribeIndex(indexName)
: Get collection statisticsdeleteIndex(indexName)
: Delete a collectionQuery results include:
id
: Vector IDscore
: Distance/similarity scoremetadata
: Associated metadatavector
: Original vector (if includeVector is true)FAQs
Chroma vector store provider for Mastra
The npm package @mastra/chroma receives a total of 554 weekly downloads. As such, @mastra/chroma popularity was classified as not popular.
We found that @mastra/chroma demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.