@davesheffer/hunch 0.15.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +17 -2
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
17
17
|
import { execFileSync, spawnSync } from "node:child_process";
|
|
18
|
-
import { relative } from "node:path";
|
|
18
|
+
import { join, relative, dirname } from "node:path";
|
|
19
|
+
import { fileURLToPath } from "node:url";
|
|
19
20
|
import { Command } from "commander";
|
|
20
21
|
import { hunchPaths, findRoot, toPosixTarget } from "../core/paths.js";
|
|
21
22
|
import { looksLikeCorrection, CORRECTION_NUDGE } from "../core/correction.js";
|
|
@@ -44,8 +45,22 @@ import { readManifest, writeManifest, SCHEMA_VERSION } from "../core/migrate.js"
|
|
|
44
45
|
import { mergeHunchJson } from "../store/merge.js";
|
|
45
46
|
import { planCompaction } from "../store/compact.js";
|
|
46
47
|
import { resolveInvocation } from "./invocation.js";
|
|
48
|
+
/** The real package version — read from package.json (at the package root, two up
|
|
49
|
+
* from dist/cli/ in the published tarball, and from src/cli/ in dev) so the CLI
|
|
50
|
+
* never drifts from what npm shipped. A hardcoded literal here silently lied
|
|
51
|
+
* (every release reported 0.1.0 regardless of the actual installed version). */
|
|
52
|
+
const HUNCH_VERSION = (() => {
|
|
53
|
+
try {
|
|
54
|
+
const pkgPath = join(dirname(fileURLToPath(import.meta.url)), "../../package.json");
|
|
55
|
+
const v = JSON.parse(readFileSync(pkgPath, "utf8")).version;
|
|
56
|
+
return typeof v === "string" ? v : "0.0.0";
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
return "0.0.0";
|
|
60
|
+
}
|
|
61
|
+
})();
|
|
47
62
|
const program = new Command();
|
|
48
|
-
program.name("hunch").description("Hunch — an Engineering Memory OS: a git-native reasoning graph for your codebase.").version(
|
|
63
|
+
program.name("hunch").description("Hunch — an Engineering Memory OS: a git-native reasoning graph for your codebase.").version(HUNCH_VERSION);
|
|
49
64
|
let openStore = null;
|
|
50
65
|
function storeFor() {
|
|
51
66
|
const root = findRoot();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@davesheffer/hunch",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Dave Sheffer <dave.sheffer1@gmail.com>",
|
|
6
6
|
"description": "Hunch — an Engineering Memory OS: a persistent, git-native reasoning graph over a codebase, exposed to Claude Code via MCP.",
|