nemoris 0.1.15 → 0.1.17

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": "nemoris",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
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/help.js CHANGED
@@ -52,6 +52,11 @@ export const USER_FACING_COMMANDS = [
52
52
  description: "Import agents from OpenClaw",
53
53
  usage: ["nemoris migrate [--dry-run]"],
54
54
  },
55
+ {
56
+ name: "update",
57
+ description: "Update nemoris to the latest version",
58
+ usage: ["nemoris update"],
59
+ },
55
60
  {
56
61
  name: "mcp",
57
62
  description: "Manage MCP server connections",
package/src/cli-main.js CHANGED
@@ -2767,6 +2767,34 @@ export async function main(argv = process.argv) {
2767
2767
  console.log("\n Tip: run nemoris doctor --fix to clean the stale PID file.");
2768
2768
  }
2769
2769
  return results.exitCode;
2770
+ } else if (command === "update") {
2771
+ // Self-update via npm
2772
+ const { execSync } = await import("node:child_process");
2773
+ const pkgPath = path.join(projectRoot, "package.json");
2774
+ const currentVersion = JSON.parse(fs.readFileSync(pkgPath, "utf8")).version;
2775
+ console.log(` Current version: ${currentVersion}`);
2776
+ console.log(" Checking for updates...\n");
2777
+ try {
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 globalPkg = execSync("node -e \"process.stdout.write(require('nemoris/package.json').version)\"", { encoding: "utf8", timeout: 5_000 }).trim();
2783
+ newVersion = globalPkg || null;
2784
+ } catch {
2785
+ newVersion = null;
2786
+ }
2787
+ if (newVersion && newVersion !== currentVersion) {
2788
+ console.log(` ✓ Updated: ${currentVersion} → ${newVersion}`);
2789
+ console.log(" Restart your daemon: nemoris restart");
2790
+ } else {
2791
+ console.log(` ✓ Already on the latest version (${currentVersion})`);
2792
+ }
2793
+ } catch (err) {
2794
+ console.error(" ✗ Update failed:", err.message?.split("\n")[0] || "unknown error");
2795
+ console.error(" Try manually: npm i -g nemoris@latest");
2796
+ return 1;
2797
+ }
2770
2798
  } else if (command === "battle") {
2771
2799
  const { runBattle, parseBattleFlags } = await import("./battle.js");
2772
2800
  const flags = parseBattleFlags(rest);