From 93baa8695798e1090917fbab656281c989956832 Mon Sep 17 00:00:00 2001 From: drepkovsky Date: Sun, 14 Jun 2026 13:13:51 +0200 Subject: [PATCH] Read CLI version from package.json (was hardcoded 0.4.0) The CLI .version() string was hardcoded and had drifted (0.4.0 while package.json moved to 0.5.0/0.6.0), so agent-board --version lied. Read it from package.json at startup via import.meta.dir so it can never drift again. --- CHANGELOG.md | 1 + src/index.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb9373d..363b7a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ Notable changes to `@questpie/agent-board` (CLI binaries: `agent-board`, `agent` ## 0.6.0 — 2026-06-14 - **Design QA skill**: `agent-board-design-qa` QAs the implemented, running web UI by measuring it instead of eyeballing a screenshot. A portable DOM geometry scan (overflow, silent truncation, collapse, sibling overlap, near-miss misalignment, small tap targets, sub-16px input fonts) runs through whatever browser/preview capability the harness already exposes (Claude Code `preview_*`, Codex, qprobe, Playwright), layered with design-token conformance, axe-core contrast, an optional reference pixel-diff + overlay, and a vision judge reserved for the residual. `agent-board skills install` links it alongside the existing twelve. Pairs with `agent-board-design-review` (which reviews the mockup). +- **Version reporting**: `agent-board --version` now reads from `package.json` instead of a hardcoded string (it had drifted to `0.4.0`). ## 0.5.0 — 2026-06-11 diff --git a/src/index.ts b/src/index.ts index 77bbcae..874d483 100755 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,7 @@ #!/usr/bin/env bun import { readFile } from "node:fs/promises"; +import { readFileSync } from "node:fs"; import { join } from "node:path"; import { Command } from "commander"; import { createKnowledge, createSpec, getKnowledge, getSpec, listKnowledge, listSpecs, parseScope, setKnowledgeCategory, setSpecCategory, writeKnowledgeBody, writeSpecBody } from "./documents.js"; @@ -23,7 +24,7 @@ const program = new Command(); program .name("agent-board") .description("Markdown task board and execution contract for coding agents") - .version("0.4.0") + .version(JSON.parse(readFileSync(join(import.meta.dir, "..", "package.json"), "utf8")).version) .allowUnknownOption(true); program