fix(cli): print the installed version in the banner, not a hardcoded v0.1.0 - #171
Merged
Conversation
…v0.1.0
`banner()` printed a literal "All-in-one security agent daemon — v0.1.0" on
every command, so a box running 0.11.6 reported a version ten minors stale.
That reads as a failed upgrade and sent us hunting for a stale install that
was not there.
Resolve the version once in `core/version.ts` by reading the package manifest
next to the bundle, and use it in both the banner and `index.ts`, which had its
own copy of the same lookup plus its own stale fallback literal ("0.1.8").
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018NXz7vRz6C7vaGSwMgWZfD
ThreatCrush Security Scan12 finding(s) HIGH/CRITICAL: 1 | MEDIUM: 6 | LOW: 5
Snippets are redacted; ThreatCrush never prints matched credential material. |
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.
What
banner()printed a literalAll-in-one security agent daemon — v0.1.0on every command. A box running 0.11.6 reported v0.1.0, which reads as a failed upgrade — it sent us hunting for a stale install that wasn't there.index.tscarried its own copy of the manifest lookup, with its own stale fallback literal ("0.1.8").Change
apps/cli/src/core/version.tsresolves the version once, reading the package manifest next to the bundle.banner()interpolates it;index.tsimports it instead of re-deriving it.v0.1.0.Verification
pnpm buildclean.pnpm test— 58 passed (6 files), up from 57.node dist/index.js statusnow printsAll-in-one security agent daemon — v0.11.6;--versionstill0.11.6.🤖 Generated with Claude Code
https://claude.ai/code/session_018NXz7vRz6C7vaGSwMgWZfD