@zokizuan/satori-core
v1.5.2
Published
Core semantic indexing engine for Satori's insight-first retrieval
Readme
@zokizuan/satori-core
Core indexing and retrieval engine used by Satori.
Use this package when you want the lower-level engine directly. Most agent workflows should install @zokizuan/satori-mcp or @zokizuan/satori-cli instead.
What It Owns
- File discovery and ignore filtering.
- AST-aware chunking with LangChain fallback.
- OpenAI, VoyageAI, Gemini, and Ollama embeddings.
- Milvus/Zilliz vector persistence and search.
- Dense/BM25 hybrid retrieval and optional reranking.
- Incremental sync with stat-first, hash-on-change file tracking.
Install
npm install @zokizuan/satori-coreMinimal Use
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({
codebasePath: '/absolute/path/to/repo',
query: 'authentication refresh flow',
topK: 5,
retrievalMode: 'hybrid',
scorePolicy: { kind: 'topk_only' }
});Development
pnpm --filter @zokizuan/satori-core build
pnpm --filter @zokizuan/satori-core typecheck
pnpm --filter @zokizuan/satori-core test:integration