wicked-brain 0.7.1 → 0.8.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wicked-brain",
3
- "version": "0.7.1",
3
+ "version": "0.8.0",
4
4
  "type": "module",
5
5
  "description": "Digital brain as skills for AI coding CLIs — no vector DB, no embeddings, no infrastructure",
6
6
  "keywords": [
@@ -16,6 +16,15 @@ function getArg(name) {
16
16
  return idx !== -1 && args[idx + 1] ? args[idx + 1] : null;
17
17
  }
18
18
 
19
+ // --version / -v: print root package.json version and exit.
20
+ // Resolves relative to this file so the published install reads its own manifest.
21
+ if (args.includes("--version") || args.includes("-v")) {
22
+ const pkgUrl = new URL("../../package.json", import.meta.url);
23
+ const pkg = JSON.parse(readFileSync(pkgUrl, "utf-8"));
24
+ console.log(pkg.version);
25
+ exit(0);
26
+ }
27
+
19
28
  const brainPath = resolve(getArg("brain") || ".");
20
29
  const preferredPort = parseInt(getArg("port") || "4242", 10);
21
30
  const configPath = join(brainPath, "brain.json");
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wicked-brain-server",
3
- "version": "0.7.1",
3
+ "version": "0.8.0",
4
4
  "type": "module",
5
5
  "description": "SQLite FTS5 search server for wicked-brain digital knowledge bases",
6
6
  "keywords": [
@@ -30,7 +30,8 @@
30
30
  "start": "node bin/wicked-brain-server.mjs"
31
31
  },
32
32
  "dependencies": {
33
- "better-sqlite3": "^12.0.0"
33
+ "better-sqlite3": "^12.0.0",
34
+ "wicked-bus": "^1.1.0"
34
35
  },
35
36
  "engines": {
36
37
  "node": ">=18.0.0"
@@ -60,9 +60,12 @@ If the result is `not installed`, the package was never globally installed (the
60
60
  user may have been running via `npx` only). Treat this as "needs install" and
61
61
  proceed to Step 4.
62
62
 
63
- **Do NOT use `npx wicked-brain-server --version`** it may return the version
64
- of a stale cached npx copy, not the globally installed one that actually runs
65
- when brain servers start.
63
+ `wicked-brain-server --version` (v0.8.0+) prints the installed version directly.
64
+ It's safe to call the binary by its installed path e.g.
65
+ `$(npm config get prefix)/bin/wicked-brain-server --version`. **Avoid
66
+ `npx wicked-brain-server --version`** — npx may resolve to a cached copy that
67
+ isn't the globally installed one that actually runs when brain servers start,
68
+ so the number it reports can lie about what will serve requests.
66
69
 
67
70
  ### Step 2: Check latest version on npm
68
71