File: packages/agentctx/src/version.ts:6
Problem (one line): VERSION is hardcoded as a string literal that is maintained independently of packages/agentctx/package.json's version, so the two can silently disagree and agentctx --version can report a version the package isn't.
Details
src/version.ts is:
export const VERSION = "0.1.0";
This value powers agentctx --version / agentctx -v and the --help banner (src/cli/main.ts:18, :52-55). Meanwhile packages/agentctx/package.json independently declares "version": "0.1.0". They happen to match today, but nothing enforces it — a release that bumps package.json (e.g. via npm version) without editing version.ts (or vice versa) makes the CLI lie about its own version, and no test catches it.
The module is intentionally dependency-free (see its own docstring) so --version/--help never load better-sqlite3; that constraint should be preserved — the fix belongs in a test, not a runtime package.json import.
What "done" looks like
Add a small unit test (e.g. test/version.test.ts) that reads package.json at test time and asserts VERSION === pkg.version, so any future drift fails CI. (Alternatively, generate version.ts from package.json at build time — but a guard test is the smaller, lower-risk change.)
Scope
Single new test file (or a few lines), no architectural change. Suitable for a first-time contributor; well under 4 hours.
File:
packages/agentctx/src/version.ts:6Problem (one line):
VERSIONis hardcoded as a string literal that is maintained independently ofpackages/agentctx/package.json'sversion, so the two can silently disagree andagentctx --versioncan report a version the package isn't.Details
src/version.tsis:This value powers
agentctx --version/agentctx -vand the--helpbanner (src/cli/main.ts:18,:52-55). Meanwhilepackages/agentctx/package.jsonindependently declares"version": "0.1.0". They happen to match today, but nothing enforces it — a release that bumpspackage.json(e.g. vianpm version) without editingversion.ts(or vice versa) makes the CLI lie about its own version, and no test catches it.The module is intentionally dependency-free (see its own docstring) so
--version/--helpnever loadbetter-sqlite3; that constraint should be preserved — the fix belongs in a test, not a runtimepackage.jsonimport.What "done" looks like
Add a small unit test (e.g.
test/version.test.ts) that readspackage.jsonat test time and assertsVERSION === pkg.version, so any future drift fails CI. (Alternatively, generateversion.tsfrompackage.jsonat build time — but a guard test is the smaller, lower-risk change.)Scope
Single new test file (or a few lines), no architectural change. Suitable for a first-time contributor; well under 4 hours.