Repository navigation
fix(home): record the real product version as firstSeenVersion - #628
Merged
Merged
Conversation
home-state.json read `../../package.json` relative to the module. That only fit the loose tsc layout, where it found @agentgem/app's 0.7.0 rather than the product's. Inlined into the npm bin (dist/client.js) or the desktop core (resources/core/index.mjs) it pointed above the package, so every npm and desktop install recorded "0.0.0" (seen on a fresh 0.12.1 desktop install). productVersion() now walks up to the first @ninemind/agentgem or agentgem-core manifest, and bundle-core writes the version into agentgem-core's package.json, which had none. Tested the npm, desktop and workspace layouts in temp dirs (red before the change). Workspace reports 0.12.1; a fresh bundle:core writes agentgem-core 0.12.1. Nothing reads firstSeenVersion yet, so no behavior changes beyond the recorded value. Existing home.json files keep their 0.0.0: the field is set once on first read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
~/.agentgem/home-state.jsonrecordsfirstSeenVersion: "0.0.0"on npm and desktop installs. A fresh 0.12.1 desktop install showed this.Cause:
home/state.tsread../../package.jsonrelative to its own file. In workspace dev that path finds@agentgem/app's0.7.0. In the npm bin and the desktop core bundle, the module is inlined, so the path points above the package and the code falls back to0.0.0.Fix:
productVersion()searches upward for the first@ninemind/agentgemoragentgem-coremanifest and reads its version.desktop/scripts/bundle-core.mjsnow writesversioninto theagentgem-coremanifest, which had none before.Tests:
src/__tests__/homeStateVersion.test.tscovers the npm, desktop and workspace layouts. It failed before this change. The existing home-state tests still pass (24/24). A freshbundle:corewritesagentgem-core 0.12.1.Nothing reads
firstSeenVersionyet. The value is set once, so existing files keep0.0.0.🤖 Generated with Claude Code