Registry / database / hyperspace-sdk-ts

hyperspace-sdk-ts

JSON →
library3.1.1jsnpmunverified

Official TypeScript SDK for HyperspaceDB gRPC API v3.1.0. Provides vector database operations including collection lifecycle management, vector insert/search, bulk operations (batchInsert, searchBatch), typed metadata support, graph traversal APIs, multi-tenant authentication, and advanced spatial filters. Version 3.1.1 supports Node.js 18+ and TypeScript types. Key differentiators include hybrid lexical/vector search (BM25), geometric filters (ball, box, cone), and server-side text vectorization. Release cadence is medium; API breaking changes occur with major version bumps (v3 introduced spatial filters).

npm install hyperspace-sdk-ts
INSTALL
IMPORT
SIG · HYPERSPACE-SDK-TS
H
hyperspace-sdk-ts
databasejavascriptv3.1.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

HyperspaceClient
import { HyperspaceClient } from 'hyperspace-sdk-ts'
const HyperspaceClient = require('hyperspace-sdk-ts').HyperspaceClient
SDK ships TypeScript types; ESM and CJS both supported
SearchResult
import { SearchResult } from 'hyperspace-sdk-ts'
const SearchResult = require('hyperspace-sdk-ts').SearchResult
TypeScript type export; only available with named import
VectorFilter
import { VectorFilter } from 'hyperspace-sdk-ts'
import VectorFilter from 'hyperspace-sdk-ts'
VectorFilter is a type union for geometric filters; default import is undefined

Shows full client lifecycle: create collection, insert vectors, search, and cleanup. Uses environment variable for API key.

import { HyperspaceClient } from 'hyperspace-sdk-ts'; async function main() { const client = new HyperspaceClient('localhost:50051', process.env.API_KEY ?? ''); const collection = 'quickstart'; try { await client.deleteCollection(collection); } catch {} await client.createCollection(collection, 3, 'cosine'); await client.insert(1, [0.1, 0.2, 0.3], { source: 'demo' }, collection); await client.insert(2, [0.2, 0.1, 0.4], { source: 'demo' }, collection); const results = await client.search([0.1, 0.2, 0.3], 5, collection); console.log(results); client.close(); } main().catch(console.error);
Debug
Known issues
breakingv3.0 changed default metric from 'l2' to 'cosine' for createCollection
fix
Explicitly pass 'l2' metric when upgrading from v2
affects: >=3.0.0 <3.0.0
breakingv3.0 renamed 'nearVector' method to 'search'
fix
Replace client.nearVector with client.search
affects: >=3.0.0 <3.0.0
deprecatedv3.1 deprecates 'deleteVector' in favor of 'delete'
fix
Use client.delete(id) instead of client.deleteVector(id)
affects: >=3.1.0
gotchaFloat32Array or Float64Array typed vectors must be contiguous; non-contiguous arrays may cause transfer errors
fix
Ensure typed arrays are not sub-array views; use .slice() or new Float32Array(...) to create contiguous copies
affects: >=3.0.0
gotchaMulti-tenant authentication requires both apiKey and userId constructor arguments; missing userId may cause permission errors in HyperspaceDB v3.1+
fix
Pass userId as third argument to HyperspaceClient constructor
affects: >=3.1.0
Errors
Common errors & fixes
Error: 12 UNIMPLEMENTED: RPC method not implemented
HyperspaceDB server version mismatch or missing capability
fix
Upgrade server to v3.1+ and verify SDK version matches server version
TypeError: client.search is not a function
Using v2 API with v3 SDK; method renamed from nearVector to search
fix
Replace client.nearVector with client.search
Error: INVALID_ARGUMENT: collection must be a non-empty string
Missing or empty collection name parameter
fix
Pass a valid collection name string to insert, search, delete, etc.
Error: UNAUTHENTICATED: Request had invalid authentication credentials
Missing or incorrect API key / userId
fix
Provide valid apiKey and userId in constructor, or configure server authentication
Upgrade
Version history
3.1.1latest on npm
Audit
Dependencies
@grpc/grpc-jsrequiredgRPC client dependency for communicating with HyperspaceDB server
Agent activity
14 hits · last 30 days
node
12
Amazon
1
Resources
hyperspace-sdk-ts — npm install hyperspace-sdk-ts · libregistry