
Security News
The Code You Didn't Write Is Still Yours to Defend
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.
@ixo/data-store
Advanced tools
The @ixo/data-store package provides abstract interfaces and implementations for both vector and structured data storage in the ixo-oracles ecosystem. It offers a type-safe, consistent API for managing data across different storage backends.
# Install using pnpm (recommended)
pnpm install @ixo/data-store
# Or using npm
npm install @ixo/data-store
# Or using yarn
yarn add @ixo/data-store
OPENAI_API_KEY=your_openai_api_key # Required for embeddings
The ChromaDB implementation requires a running Chroma backend. You can easily run it using Docker:
# Pull the Chroma image
docker pull chromadb/chroma
# Run the Chroma container
docker run -p 8000:8000 chromadb/chroma
This will start the Chroma backend server on http://localhost:8000.
AIRTABLE_API_KEY=your_airtable_key # Required for Airtable operations
AIRTABLE_BASE_ID=your_base_id # Required for Airtable operations
AITABLE_BASE_TABLE_LINK=your_link # Optional, for record links
The vector database interface provides methods for storing, retrieving, and querying vector embeddings of documents.
To create a custom vector storage implementation, extend the VectorDBDataStore abstract class:
import {
VectorDBDataStore,
IVectorStoreDocument,
IVectorStoreOptions,
} from '@ixo/data-store';
class CustomVectorStore extends VectorDBDataStore {
constructor(options: IVectorStoreOptions) {
super(options);
}
async init(): Promise<void> {
// Initialize your vector store
}
async upsert(documents: IVectorStoreDocument[]): Promise<void> {
// Implement document upsertion
}
async delete(ids: string[]): Promise<void> {
// Implement document deletion
}
async query(
query: string,
options?: IVectorStoreQueryOptions,
): Promise<IVectorStoreDocument[]> {
// Implement text-based querying
}
async queryByVector(
vector: number[],
options?: IVectorStoreQueryOptions,
): Promise<IVectorStoreDocument[]> {
// Implement vector-based querying
}
async getById(id: string): Promise<IVectorStoreDocument | null> {
// Implement document retrieval by ID
}
async queryWithSimilarity(
query: string,
options?: IVectorStoreQueryOptions & { similarityThreshold: number },
): Promise<IVectorStoreDocument[]> {
// Implement similarity-based querying
}
}
The package includes a ChromaDB implementation:
import { ChromaDataStore } from '@ixo/data-store';
const store = new ChromaDataStore({
collectionName: 'my-collection',
url: 'http://localhost:8000',
});
await store.init();
// Store documents
await store.upsert([
{
id: '1',
content: 'Document content',
metadata: { type: 'article' },
},
]);
// Query documents
const results = await store.query('search query', {
topK: 5,
filters: { type: 'article' },
});
// Query with similarity threshold
const similarDocs = await store.queryWithSimilarity('query', {
similarityThreshold: 0.8,
});
The structured data interface provides CRUD operations for structured data storage.
To create a custom structured storage implementation, implement the IDataStore interface:
import { IDataStore } from '@ixo/data-store';
class CustomDataStore<T> implements IDataStore<T> {
async getAllRecords(
tableName: string,
selectOptions: IQueryParams<T>,
): Promise<T[]> {
// Implement fetching all records
}
async getRecord(tableName: string, recordId: string): Promise<T> {
// Implement single record retrieval
}
async createRecord(tableName: string, recordData: T): Promise<T> {
// Implement record creation
}
async updateRecord(
tableName: string,
recordId: string,
recordData: T,
): Promise<T> {
// Implement record update
}
async batchUpdateRecords(
tableName: string,
records: { id: string; fields: T }[],
): Promise<T[]> {
// Implement batch update
}
async deleteRecord(tableName: string, recordId: string): Promise<T> {
// Implement record deletion
}
async getRecordByField(
tableName: string,
fieldName: string,
fieldValue: string,
): Promise<T[]> {
// Implement field-based retrieval
}
}
The package includes an Airtable implementation:
import { AirtableDataStore, FieldSet } from '@ixo/data-store';
interface MyRecord extends FieldSet {
name: string;
description: string;
}
const store = new AirtableDataStore<MyRecord>();
// Create a record
const record = await store.createRecord('tableName', {
name: 'Test',
description: 'Description',
});
// Get all records
const records = await store.getAllRecords('tableName', {
maxRecords: 100,
view: 'Grid view',
});
// Update records in batch
const updated = await store.batchUpdateRecords('tableName', [
{ id: '1', fields: { name: 'Updated' } },
{ id: '2', fields: { name: 'Also Updated' } },
]);
# Run tests
pnpm test
VectorDBDataStore or IDataStore)Internal package - All rights reserved.
FAQs
## Overview
The npm package @ixo/data-store receives a total of 3 weekly downloads. As such, @ixo/data-store popularity was classified as not popular.
We found that @ixo/data-store demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.