Zorya Search README

The full upstream README, mirrored for reference. Install config, tool schemas, adoption signals and our own overview live on the Zorya Search listing page.

Zorya Search

Local-first code and project-text retrieval for existing SDK and MCP clients, with optional embeddings, static symbol evidence, and caller-controlled web discovery.

Читать по-русски

CI MIT License Node.js >=20.19

Zorya Search lets an existing application or agent search an approved repository, inspect current source behind a result, and gather bounded related evidence. Use its Node.js SDK or expose the same operations through MCP. Search returns candidates with source identity and known limits; the caller decides when to search, what to trust, and what to do next. It does not create agents, edit files, or automatically repair a project.

What it provides

NeedCapability
Find and verify codeLexical search by default; optional embedding retrieval; bounded source reads and context tied to repository, worktree, and snapshot.
Inspect structureExact symbol lookup, static references and call tracing, duplicate candidates, and opt-in logical context. Static evidence does not establish runtime behavior.
Search project guidanceA separate, opt-in project-text index for documentation, rules, and skills. It does not share the code or knowledge namespace.
Find public sourcesCaller-selected Brave discovery queries and bounded page reading, when configured. Search does not generate extra queries.
Integrate with a clientNode.js SDK, local stdio/loopback MCP, or local current-workspace MCP.

The code path is lexical unless the owner enables an embedding profile. Optional presets include code voyageai/voyage-code-4 (1024 dimensions) with voyageai/rerank-2.5-lite, project text voyageai/voyage-4-large with separate document/query roles, and independent visual voyageai/voyage-multimodal-3.5. These are opt-in configurations, not defaults. Reranking only reorders candidates. Classification and reuse context use the pinned Jev model typesafe/jev-1.14; unsupported classifier models are rejected rather than silently substituted.

Release availability

Version 0.1.10 was published on npm on 2026-11-02 and is available as the GitHub prerelease v0.1.10. At that publication date, npm next pointed to 0.1.10 and latest intentionally remained 0.1.9. It added trusted MCP capability availability and task-specific tool guidance, plus a consent-based configure command for seven independent roles. Agents can offer owner setup only when a needed capability is not configured; they do not enable it automatically or replace the caller. Public URL reading and local project-text lexical search need no provider key. Brave discovery uses a Brave Search key; Voyage and Jev model presets use an OpenRouter key. After a profile change, reconnect the MCP client and refresh its tool list and capabilities. Configure does not probe providers; restarting an already watch-enabled owner can resume its existing indexing policy. See the MCP, CLI, and client guidance guides for safe setup and limits.

Version 0.1.11 adds local current-workspace MCP. It resolves the project from the client process's current working directory, stores its database outside the workspace, and keeps source search local by default. It does not use a central workspace server or edit project files. Follow the installation guide and verify the release artifact and checksum before installing. See the local workspace guide for behavior and limits. Historical IP/CIDR and transfer-bridge material is not a statement of current deployment.

The existing-package quickstart below uses 0.1.10 and requires Node.js >=20.19.0. It does not install the local workspace MCP added in 0.1.11; follow the local agent installation guide for that mode.

Install the exact version and create a first profile:

Terminal
npm install --save-exact zorya-search@0.1.10
npx --yes zorya-search@0.1.10 setup --root .
npx --yes zorya-search@0.1.10 client-config

client-config prints MCP registration instructions; it does not install or register the server in a client. The owner registers the chosen entry and grants access. Indexing is explicit unless the owner enables watch.

SDK example

This example uses the package's lexical SDK APIs, with source verification and duplicate candidates. Check the API against the version you install. Import from zorya-search and its subpaths. Keep the database outside the indexed repository.

server.ts
import { openEmbeddedDatabase } from 'zorya-search'
import { createCodeIndex } from 'zorya-search/code'

const root = '/absolute/path/to/repository'
const database = await openEmbeddedDatabase('/absolute/path/to/private/search-data')
const index = createCodeIndex({ database })
try {
  await index.indexRepository({ root })
  const result = await index.searchCode({ root, query: 'initiative trigger', mode: 'lexical', limit: 5 })
  const hit = result.hits[0]
  const source = hit && await index.readSource({
    root, path: hit.path, lineStart: hit.lineStart, lineEnd: hit.lineEnd, snapshotId: hit.snapshotId,
  })
  const duplicates = await index.findCodeDuplicates({ root, limit: 5 })
  console.log({ hits: result.hits, source: source?.text, duplicates: duplicates.groups })
} finally {
  try { await index.close() } finally { await database.close() }
}

The lexical example makes no embedding-provider call. Search returns candidates; verify the source and decide whether any duplicate is relevant. See the SDK reference for the package capabilities and ownership details.

Guides

MIT License. See LICENSE.