Repository navigation
Say when zerograph is missing or older than the machine's, and stand down beside a repo hook - #267
Merged
Merged
Conversation
…talled A teammate who gets the plugin from a repository's project settings but has no zerograph binary got a silent SessionStart and never learned why. In a checkout that asked for an index, built or not, with no binary to run, the hook now shows the person the update notice's style of message, naming the npm and pnpm install commands, and tells the agent in one context line that the graph tools are unavailable until it is installed. A repository that never asked stays silent. Codex gets the context line only.
…ph hook The plugin's hook looked for a 0.6.x repository hook only under CLAUDE_PROJECT_DIR, or the cwd without it, so a linked worktree whose session runs the main worktree's settings answered every event a second time. It now looks in the project directory, the checkout and the main worktree, and counts one only where the script and the settings entries that run it sit together. Standing down is still per event and matcher. At SessionStart a stand-down keeps the not-installed and newer-release notices, which the old hook never shows, and drops the brief, serve and update.
…machine has A session keeps the MCP server it started with, so after a global upgrade the old binary goes on serving and writing a store the new one owns, and a plugin cannot restart it. mcp.mjs now asks the binary its version at start and reads the server's stdout line by line; on each tool result it stats the file the binary resolves to, asks the version again only when that file moved, and while the installed release differs from the serving one puts one line first in every tool result: zerograph was updated to X (this session runs Y), restart the session or run /reload-plugins. Nothing is stopped or restarted, and every other line passes through unchanged. The launcher now exits once the server's stdout has closed, so the last result is never cut. The hook cannot see the serving release, and the plugin version in the marketplace cache is no reliable marker of what a session loaded, so neither is compared.
…unt a checkout's own index The 0.6.x entries run the script under $CLAUDE_PROJECT_DIR, so a main worktree's copy, or a nested clone's the session cd'd into, answers nothing in this session. Standing down on either left a worktree whose branch retired the hook with no zerograph at all. The plugin now stands down only when the session's project holds both the script and the entry, as before this branch. A main checkout opted in by nothing but its own built index heard nothing about a missing binary, since optedIn counted an index only in a linked worktree's main. It counts the checkout's own now; its other callers run only where the checkout has no index, so they are unchanged.
Cargo.toml, Cargo.lock, both plugin manifests, the marketplace ref, the npm package, the status line in docs/commands.md and the Codex install command move to 0.7.2. docs/releases/0.7.2.md names the not-installed notice, the stale-session line in MCP results, the stand-down that now counts only the session project's own 0.6.x hook, and the checkout's own index opting it in.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
zerograph.toml, a built index, or an older repo hook) and on a machine with nozerographthe hook can run, SessionStart now shows▲ zerograph is not installed — this repository uses it/npm i -g zerograph · pnpm add -g zerograph, and tells the agent the graph tools are unavailable. Before, a teammate who got the plugin from a repository's project settings saw nothing. A repository that asked for nothing stays silent. Codex gets the context line only.zerograph was updated to X (this session runs Y) — restart the session or run /reload-plugins. It re-runs--versiononly when the binary file changed, and never stops or restarts anything.Test plan
claude plugin test agent/claude-code: 28 pass/reload-pluginsrestarts a plugin's MCP server (not verified; the line also says "restart the session")