Repository navigation
Say when npm has a newer release, and cut 0.7.1 - #266
Merged
Merged
Conversation
An interactive run asks npm for zerograph's latest release at most once a day, through update-informer 1.3.0 (npm registry, ureq and native-tls, which unify with hf-hub's), on a thread no command waits for. Answers live in ~/.cache/zerograph/update.json, one entry per release, written through a rename. A run that sets out to ask claims the hour, and only an answer from npm stamps the day, so a command that exits first is retried soon. The run prints from what was cached: an update-notifier style box on stderr after the command's output, naming npm i -g and pnpm add -g, coloured only on a terminal that takes colour. mcp, serve, status, --json, CI, a stderr that is not a terminal, ZEROGRAPH_NO_UPDATE_CHECK and NO_UPDATE_NOTIFIER skip it. status and the MCP status tool report the cached release as an update line and field, without a request. The Claude Code hook asks the binary its version when the file names a newer release, and shows the entry for that version to the person as a systemMessage, with one line in the brief; Codex gets the line only. The status mod ends its hint line in a release marker.
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.1. docs/releases/0.7.1.md names the update notice, its opt-outs, the status field and the new crates.
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
zerographat most once a day, from a detached thread with a 2 s timeout, throughupdate-informer1.3.0 (npm registry, theureq3 andnative-tlshf-hub already brings; addsetcetera,homeand the Windows-onlywindows-sys). The answer is cached in~/.cache/zerograph/update.json, one entry per release, written through a temp file and a rename; a run that set out to ask recordsclaimed(retried after an hour), andcheckedis written only once npm answers.Update available 0.7.0 → 0.7.1,Run npm i -g zerograph@0.7.1,or pnpm add -g zerograph@0.7.1, coloured only where the terminal allows it. In Claude Code, a SessionStartsystemMessagein two lines and a· ↑0.7.1marker at the end of the index hint line; Codex gets the context line only. The hook shows the entry for the version of the binary it actually runs, and only when the cached latest is newer.mcp,serve,status,--json, in CI, when stderr is not a terminal, and underZEROGRAPH_NO_UPDATE_CHECKorNO_UPDATE_NOTIFIER.status --jsongains a nullableupdatefield;statusprints it as text.--refin install.md; notes in docs/releases/0.7.1.md.Test plan
cargo test1704 pass (new: update.rs units, tests/update.rs withCIremoved and a pty end-to-end run)cargo clippy --all-targets -- -D warningsclaude plugin test agent/claude-code: 28 pass (hint-line marker)release.ymldispatched from this branch: threebuildjobs green