@ouro.bot/cli 0.1.0-alpha.24 → 0.1.0-alpha.25

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/changelog.json CHANGED
@@ -1,6 +1,13 @@
1
1
  {
2
2
  "_note": "This changelog is maintained as part of the PR/version-bump workflow. Agent-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
3
3
  "versions": [
4
+ {
5
+ "version": "0.1.0-alpha.25",
6
+ "changes": [
7
+ "Runtime updates no longer downgrade your bundle-meta.json if you happen to be running a newer version than the installed CLI. Only forward updates are applied.",
8
+ "The 'ouro up' update summary is now a single consolidated line (e.g. 'updated 4 agents to runtime X (was Y)') instead of one line per agent."
9
+ ]
10
+ },
4
11
  {
5
12
  "version": "0.1.0-alpha.24",
6
13
  "changes": [
@@ -1092,10 +1092,12 @@ async function runOuroCli(args, deps = createDefaultOuroCliDeps()) {
1092
1092
  const currentVersion = (0, bundle_manifest_1.getPackageVersion)();
1093
1093
  const updateSummary = await (0, update_hooks_1.applyPendingUpdates)(bundlesRoot, currentVersion);
1094
1094
  if (updateSummary.updated.length > 0) {
1095
- for (const entry of updateSummary.updated) {
1096
- const from = entry.from ? ` (was ${entry.from})` : "";
1097
- deps.writeStdout(`updated ${entry.agent} to runtime ${entry.to}${from}`);
1098
- }
1095
+ const agents = updateSummary.updated.map((e) => e.agent);
1096
+ const from = updateSummary.updated[0].from;
1097
+ const to = updateSummary.updated[0].to;
1098
+ const fromStr = from ? ` (was ${from})` : "";
1099
+ const count = agents.length;
1100
+ deps.writeStdout(`updated ${count} agent${count === 1 ? "" : "s"} to runtime ${to}${fromStr}`);
1099
1101
  }
1100
1102
  const daemonResult = await ensureDaemonRunning(deps);
1101
1103
  deps.writeStdout(daemonResult.message);
@@ -39,6 +39,7 @@ exports.clearRegisteredHooks = clearRegisteredHooks;
39
39
  exports.applyPendingUpdates = applyPendingUpdates;
40
40
  const fs = __importStar(require("fs"));
41
41
  const path = __importStar(require("path"));
42
+ const semver = __importStar(require("semver"));
42
43
  const runtime_1 = require("../../nerves/runtime");
43
44
  const _hooks = [];
44
45
  function registerUpdateHook(hook) {
@@ -88,6 +89,16 @@ async function applyPendingUpdates(bundlesRoot, currentVersion) {
88
89
  if (previousVersion === currentVersion) {
89
90
  continue;
90
91
  }
92
+ // Skip downgrades — only update forward
93
+ if (semver.valid(previousVersion) && semver.valid(currentVersion) && semver.gte(previousVersion, currentVersion)) {
94
+ (0, runtime_1.emitNervesEvent)({
95
+ component: "daemon",
96
+ event: "daemon.update_hook_skip_downgrade",
97
+ message: "skipping downgrade",
98
+ meta: { agentRoot, previousVersion, currentVersion },
99
+ });
100
+ continue;
101
+ }
91
102
  }
92
103
  }
93
104
  catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.24",
3
+ "version": "0.1.0-alpha.25",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",