@swarmvaultai/cli 0.1.15 → 0.1.16

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.
Files changed (2) hide show
  1. package/dist/index.js +11 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/index.ts
4
+ import { readFileSync } from "fs";
4
5
  import process from "process";
5
6
  import {
6
7
  acceptApproval,
@@ -29,7 +30,16 @@ import {
29
30
  } from "@swarmvaultai/engine";
30
31
  import { Command, Option } from "commander";
31
32
  var program = new Command();
32
- program.name("swarmvault").description("SwarmVault is a local-first LLM wiki compiler with graph outputs and pluggable providers.").version("0.1.14").option("--json", "Emit structured JSON output", false);
33
+ var CLI_VERSION = readCliVersion();
34
+ program.name("swarmvault").description("SwarmVault is a local-first LLM wiki compiler with graph outputs and pluggable providers.").version(CLI_VERSION).option("--json", "Emit structured JSON output", false);
35
+ function readCliVersion() {
36
+ try {
37
+ const packageJson = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
38
+ return typeof packageJson.version === "string" && packageJson.version.trim() ? packageJson.version : "0.1.16";
39
+ } catch {
40
+ return "0.1.16";
41
+ }
42
+ }
33
43
  function isJson() {
34
44
  return program.opts().json === true;
35
45
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swarmvaultai/cli",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "description": "Global CLI for SwarmVault.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "commander": "^14.0.1",
42
- "@swarmvaultai/engine": "0.1.15"
42
+ "@swarmvaultai/engine": "0.1.16"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/node": "^24.6.0",