nemoris 0.1.16 → 0.1.18

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/package.json +1 -1
  2. package/src/cli-main.js +14 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nemoris",
3
- "version": "0.1.16",
3
+ "version": "0.1.18",
4
4
  "type": "module",
5
5
  "description": "Personal AI agent runtime — persistent memory, delivery guarantees, task contracts, self-healing. Local-first, no cloud.",
6
6
  "license": "MIT",
package/src/cli-main.js CHANGED
@@ -2775,15 +2775,21 @@ export async function main(argv = process.argv) {
2775
2775
  console.log(` Current version: ${currentVersion}`);
2776
2776
  console.log(" Checking for updates...\n");
2777
2777
  try {
2778
- const output = execSync("npm i -g nemoris@latest 2>&1", { encoding: "utf8", timeout: 60_000 });
2779
- // Re-read version from npm to show what we got
2780
- const latestLine = output.match(/\+ nemoris@([\d.]+)/);
2781
- const newVersion = latestLine?.[1] ?? "latest";
2782
- if (newVersion === currentVersion) {
2783
- console.log(` ✓ Already on the latest version (${currentVersion})`);
2784
- } else {
2785
- console.log(` ✓ Updated to v${newVersion}`);
2778
+ execSync("npm i -g nemoris@latest 2>&1", { encoding: "utf8", timeout: 60_000 });
2779
+ // Re-read the installed package.json to get the actual new version
2780
+ let newVersion;
2781
+ try {
2782
+ const globalRoot = execSync("npm root -g", { encoding: "utf8", timeout: 5_000 }).trim();
2783
+ const installedPkg = JSON.parse(fs.readFileSync(path.join(globalRoot, "nemoris", "package.json"), "utf8"));
2784
+ newVersion = installedPkg.version || null;
2785
+ } catch {
2786
+ newVersion = null;
2787
+ }
2788
+ if (newVersion && newVersion !== currentVersion) {
2789
+ console.log(` ✓ Updated: ${currentVersion} → ${newVersion}`);
2786
2790
  console.log(" Restart your daemon: nemoris restart");
2791
+ } else {
2792
+ console.log(` ✓ Already on the latest version (${currentVersion})`);
2787
2793
  }
2788
2794
  } catch (err) {
2789
2795
  console.error(" ✗ Update failed:", err.message?.split("\n")[0] || "unknown error");