@zokizuan/satori-core
v1.0.0
Published
Core semantic indexing engine for Satori's insight-first retrieval
Readme
@zokizuan/satori-core
Core indexing and retrieval engine used by Satori. This package handles the heavy lifting behind indexing, semantic retrieval, and incremental sync.
Maintained by: ham-zax (@zokizuan).
Responsibilities
- codebase file discovery and filtering
- code splitting (AST + LangChain fallback)
- embedding generation
- vector persistence and search via Milvus
- incremental sync via stat-first change detection with hash-on-change verification
Install
npm install @zokizuan/satori-coreMinimal Usage
import { Context, OpenAIEmbedding, MilvusVectorDatabase } from '@zokizuan/satori-core';
const context = new Context({
embedding: new OpenAIEmbedding({
apiKey: process.env.OPENAI_API_KEY!,
model: 'text-embedding-3-small'
}),
vectorDatabase: new MilvusVectorDatabase({
address: process.env.MILVUS_ADDRESS,
token: process.env.MILVUS_TOKEN
})
});
await context.indexCodebase('/absolute/path/to/repo');
const results = await context.semanticSearch('/absolute/path/to/repo', 'authentication logic', 5);Development
pnpm build
pnpm typecheck
pnpm test:integration