Skip to content

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 19 Oct 13:23
· 2 commits to main since this release
f2b19b0

zerograph 0.7.0

The release notes for the GitHub release page. The why behind each change is in the docs each line
links to.

Breaking

  • zerograph watch is removed. It ran the same poll as serve without answering anything, and
    every MCP tool now refreshes before it answers, so it was one more process per worktree and one
    more writer. A script or service that starts zerograph watch now fails with an unknown-command
    error: start zerograph serve instead, which polls the tree between questions with the same
    --every and --batch. serve exits after --idle seconds without a question (30 minutes by
    default), so a poller meant to stay up names a longer one, such as --idle 86400
    (serve).
  • install-agent writes no git hooks, and removes the block an earlier release wrote. The
    post-merge/post-checkout block lived in the common .git/hooks, so every git worktree add
    started a full embed. A re-run deletes the block and keeps the rest of each hook file; a file left with only its shebang is deleted. Every read already refreshes, and
    serve catches up when it starts. Git hooks remain an option, written by hand
    (keeping fresh).
  • install-agent --claude and --codex install a plugin, and take out what earlier releases
    wrote.
    The plugin is now the only way zerograph wires into Claude Code and Codex: it starts the
    MCP server, runs the session hook and carries the commands. --claude runs claude plugin marketplace add devmaxxx/zerograph, claude plugin marketplace update zerograph, claude plugin install zerograph@zerograph and claude plugin update zerograph@zerograph; --codex runs
    codex plugin marketplace add devmaxxx/zerograph --ref v0.7.0 and codex plugin add zerograph@zerograph, re-adding the marketplace when it was pinned to an older tag. A re-run after
    a binary upgrade moves either plugin to the binary's release.
    Once the plugin is in, the run removes the local-scope MCP servers in ~/.claude.json for the
    checkout and its worktrees, the hook entries in .claude/settings.json and $CODEX_HOME/hooks.json,
    the copied hook script, the zerograph and repo-query skills, the repo-scout subagent and the
    instructions stanza in CLAUDE.md or AGENTS.md; an edited file is left and named, a hook
    script stays until the entries that run it are gone, and a file git tracks is left for the team
    until --retire-repo asks for it. Where the CLI
    is missing it prints the commands and changes nothing. --command no longer reaches Claude Code
    or Codex: the plugins run zerograph (install).
  • Nothing from before the repograph rename is read any more: no .repograph/ store, repograph.toml, ~/.config/repograph/, ~/.cache/repograph/ or REPOGRAPH_* variable, and install-agent no longer retires the repograph hook, stanza or MCP server.
  • The session hook no longer runs a binary from the checkout it starts in. It used
    <checkout>/node_modules/.bin/zerograph when nothing else was found, so a cloned repository that
    committed one got it spawned as soon as a session started there; the Claude Code mod also tried
    target/{release,debug} under the checkout. The hook and the mod now take the binary from
    ZEROGRAPH_BIN or PATH only, and skip a PATH entry inside the checkout, compared as spelled
    and with every link followed. A project that installs zerograph as a dev dependency and has no
    global install sets ZEROGRAPH_BIN to that binary's absolute path (install).
  • The serve socket moved to ~/.cache/zerograph/sock/<hash>.sock, the hash of the canonical
    checkout path, from .zerograph/serve.sock or the temporary directory for a deep checkout. One
    rule now holds for every checkout depth and every $TMPDIR, which two processes of one user could
    disagree on. The private $TMPDIR/zerograph-<uid>/ is the fallback only when the path would not
    fit in sun_path or there is no absolute home directory. zerograph status prints the socket it checked,
    and status --json carries it as serve.socket, for a tool that looks for a server on its own
    (serve).

New

  • A machine-wide vector cache. A vector depends only on the model, the hub commit its files
    were fetched at, its width and the row's text, so every embed is written to ~/.cache/zerograph/vectors (%LOCALAPPDATA%\zerograph\vectors
    on Windows), and a dense sync reads the rows it is missing from there before it embeds anything.
    A row any checkout on the machine embedded once, whether a worktree, a clone or a fork, is a read
    for the rest. On the zerograph repository with e5-small, a cold build took 41.9 s. A new worktree
    at the same commit then built in 1.52 s, and so did an independent clone, which took
    56 s before. A worktree 30 commits back took 6.33 s, with 3979 rows
    read and 590 embedded. Edit→ask p90 stayed at 120 ms against 121 ms, and the top-5 was identical
    on 10 of 10 questions. Only rows this user embedded on this machine enter the cache: a store's
    vectors.f32 is never imported. The directory is private to the user, readers take no lock, and
    a torn or corrupt record is skipped, never returned. An ask reads at most 32 of the cache's
    shards, the fullest first, since it reads each whole before its budget is weighed; the rows it
    did not look up are embedded when they fit its budget and otherwise left to the refresh it starts (keeping fresh,
    bench).
  • zerograph cache status|prune. status shows the cache's rows and bytes per model and
    revision. prune trims it to 80% of its cap, least recently used first, or empties it when the
    cap is 0. Every prune also drops repeated and torn records, so one under the cap can still report
    rows removed; its line says how many went for each reason (commands).
  • vector_cache_max caps the cache at 4G by default; 0 turns it off. Only the machine
    config can set it, not a repository's zerograph.toml. A write that takes the cache over the cap
    starts a prune in a background process, at most once every 10 minutes per process, so a
    long-lived serve or MCP server keeps the cap too (configuration).
    ZEROGRAPH_VECTOR_CACHE moves the cache for one run; on Unix it is refused under a directory
    another user could change.
  • The session hook builds a checkout that has no index, in the background, when the checkout
    opted in: it holds a zerograph.toml or the hook an earlier release installed, or its main
    worktree does or has an index. With an
    index, the serve the hook starts catches up as it starts; with ZEROGRAPH_HOOK_SERVE=0, a
    detached update does it instead (keeping fresh).
  • A Codex plugin, agent/codex/: the MCP server, the session hook on SessionStart,
    SubagentStart and after an edit, and the commands as skills, $zerograph:ask to
    $zerograph:refresh (install).
  • Credentials written inside an indexed file are redacted. A provider token in a source file, a
    key exported in a shell script, a private key pasted into a README or a database URL with a
    password in it becomes [REDACTED_SECRET] before the file is extracted, so it never reaches the
    store, an index, a rerank prompt or zerograph families; the file keeps its line numbers and
    update names the file. Coverage is by provider pattern only (GitHub, GitLab, AWS, Slack, Stripe,
    OpenAI, Anthropic, Google, npm, PyPI, SendGrid, Twilio, Hugging Face, Discord, JWTs, private keys
    and several hundred more): a generic password = "...", api_key: "..." or Bearer header is not
    caught, because the catch-all rules that would catch it flagged dozens of spans on a real
    repository and none of them was a secret. A span that holds an id is never redacted, and a
    database URL on a loopback host or with a whole placeholder password (${VAR}, $VAR, <password>,
    ***) is left as written, unless the password is itself a provider token.
    redact_secrets = false in zerograph.toml, or ZEROGRAPH_REDACT_SECRETS=false for one run,
    turns it off (configuration).
  • A cache_status MCP tool reports the machine's vector cache as zerograph cache status does:
    where it is, its cap, and its rows and bytes per model (MCP).
  • A store records the release that wrote it. manifest.json carries release, status shows
    it, and a store a newer release wrote has a newer_grammar state of its own, which the Claude Code
    mod displays (commands).

Changed

  • With no --repo, the root is the top of the git checkout (git rev-parse --show-toplevel; a
    worktree is its own root), else the nearest directory above that holds a .zerograph/, else the
    current directory. A read where no store exists no longer creates .zerograph/: it answers from
    nothing and says zerograph build builds it. The walk skips every directory below the root that
    has its own .git, so nested worktrees, clones and submodules stay out of the index
    (configuration). The session hook resolves the same root, so inside a git
    checkout it asks about the top level whatever subdirectory the session is in
    (keeping fresh).
  • The reindex MCP tool builds a checkout that has no store with a detached build, where it
    used to fail; with a store it starts a detached update as before (MCP).
  • The Claude Code mod reads files instead of polling status --json. Every 10 s it reads
    background.log and stats the socket the last report named; the full report runs at session
    start, every 5 minutes, once after a refresh ends and after /zerograph
    (install).

Fixed

  • Windows: a command run without --repo no longer hands git a verbatim \\?\ path. The root
    lookup ran git rev-parse --show-toplevel with the canonical \\?\C:\… form of the current
    directory as its working directory; it now gets the plain path, as every other git call does.
  • Windows: the session hook takes a zerograph.exe before npm's .cmd shim, and a call through
    the shim that runs out of time ends the whole process tree.
    The shim needs cmd, which expands
    %NAME% in the repository path, and a timeout killed cmd and left zerograph running. The
    Claude Code mod prefers the .exe the same way and runs a .cmd through cmd from the shim's
    own directory. It never hands cmd a checkout path that holds one of &|<>^"%!, which cmd
    would run, redirect or expand; such a checkout's line comes from the logs instead (install).
  • import-legacy takes the writer lock and refuses a store a newer release wrote, like every
    other writer.
  • A serve started by 0.6.4 can be stopped after the upgrade. It listens at the old socket,
    where no client of 0.7.0 looks, and writes without the writer lock. zerograph stop now sends the
    stop line there as well, and a new serve does so as soon as it binds, on a thread of its own: a
    busy old server can take up to 310 s to read it, and meanwhile the new one answers as --stale
    does and writes nothing. A deep checkout's old socket is looked for under this process's
    $TMPDIR and under /tmp/zerograph-<uid>/ (serve).
  • An older release no longer writes over a newer store. It answers read-only and prints one line
    naming both generations; update, build, embed and the model switch refuse to write. ask
    reads the manifest again before it writes, whether or not it could take the writer lock, so a
    newer update that saves in between is not stamped over (commands).
  • A checkout that still commits the 0.6.x hook hears one brief, not two. install-agent leaves
    a .claude/settings.json git tracks for the team, and its entries ran the old hook beside the
    plugin's, so every session start and every search got two answers. The plugin's hook is now
    silent on each event those entries still answer, and the same for entries left in
    $CODEX_HOME/hooks.json (install).
  • Every writer takes the writer lock. embed and model <id> wrote vectors, and the serve
    poll wrote the graph, without writer.lock, so a detached update could write the same files
    meanwhile and status reported no refresh. embed and model <id> now wait for a running
    refresh the way update does, and a serve poll that finds one skips its cycle
    (keeping fresh).
  • The session hook's in-process refresh stays inside its 5 s timeout. Every call the hook waits
    on gets ZEROGRAPH_READER_BUDGET=2, or a smaller value the environment or zerograph.toml sets,
    and a refresh that would not fit goes to a detached update instead of being killed
    (keeping fresh).
  • Worktree notices. The build notice no longer promises "a couple of minutes", and it says that
    rows another checkout on this machine already embedded come from the vector cache. The docs say each worktree keeps its own store
    and that an APFS clone stops sharing the graph at its first refresh
    (keeping fresh).
  • A git call from a hook's environment finds the right checkout. The root lookup, the worktree
    list and the git-hook cleanup inherited GIT_DIR and GIT_WORK_TREE, so an update run by a hook
    manager could take the current directory for the root and build a partial store there. They now
    clear those variables, as changes already did.

Before upgrading

  • The first update after the upgrade re-reads the whole tree, once. The store's grammar moves
    from 6 to 7 because a file is now redacted before it is read, and a store stamped 6 still holds
    whatever credentials its unchanged files carried. Expect the first refresh to take as long as a
    build minus the embedding, which the vector cache keeps for rows whose text did not move.

  • Set ZEROGRAPH_BIN where zerograph is a project dependency and not on PATH, or the session
    hook and the mod find no binary. A PATH entry inside the checkout — node_modules/.bin added by
    direnv or an .envrc — is now skipped without a word, so a checkout that relied on one needs
    ZEROGRAPH_BIN set to the binary's absolute path. The mod's binary option takes an absolute
    path or a bare name, which means the PATH lookup; a relative path is ignored.

  • A store built in a subdirectory of a git checkout by an earlier release is no longer read by
    the session hook, which asks about the checkout's top level as the CLI does. Build at the top
    level (zerograph build from anywhere in the checkout) and delete the old .zerograph/.

  • Re-run install-agent with the flags you used: it removes the git-hook block, and with
    --claude or --codex installs the plugin and removes the older install
    (install).

  • Replace zerograph watch in scripts and services with zerograph serve --idle <seconds>.

  • A running 0.6.4 serve is sent the stop line by the first zerograph stop or
    zerograph serve of 0.7.0; otherwise it runs until its own --idle timeout. One that does not
    leave is named on stderr and has to be ended by hand (serve).