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

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,18 @@
1
1
  {
2
- "_note": "This changelog is maintained as part of the PR/version-bump workflow. Human-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
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.24",
6
+ "changes": [
7
+ "When you run 'ouro up', you now see which agents were updated and from what version, so you know exactly what happened during startup."
8
+ ]
9
+ },
10
+ {
11
+ "version": "0.1.0-alpha.23",
12
+ "changes": [
13
+ "You can now use 'ouro down' as an alias for 'ouro stop' to pair naturally with 'ouro up'."
14
+ ]
15
+ },
4
16
  {
5
17
  "version": "0.1.0-alpha.22",
6
18
  "changes": [
@@ -56,6 +56,9 @@ const specialist_prompt_1 = require("./specialist-prompt");
56
56
  const specialist_tools_1 = require("./specialist-tools");
57
57
  const runtime_metadata_1 = require("./runtime-metadata");
58
58
  const daemon_runtime_sync_1 = require("./daemon-runtime-sync");
59
+ const update_hooks_1 = require("./update-hooks");
60
+ const bundle_meta_1 = require("./hooks/bundle-meta");
61
+ const bundle_manifest_1 = require("../../mind/bundle-manifest");
59
62
  function stringField(value) {
60
63
  return typeof value === "string" ? value : null;
61
64
  }
@@ -223,7 +226,7 @@ function usage() {
223
226
  return [
224
227
  "Usage:",
225
228
  " ouro [up]",
226
- " ouro stop|status|logs|hatch",
229
+ " ouro stop|down|status|logs|hatch",
227
230
  " ouro -v|--version",
228
231
  " ouro chat <agent>",
229
232
  " ouro msg --to <agent> [--session <id>] [--task <ref>] <message>",
@@ -433,7 +436,7 @@ function parseOuroCommand(args) {
433
436
  return { kind: "daemon.up" };
434
437
  if (head === "up")
435
438
  return { kind: "daemon.up" };
436
- if (head === "stop")
439
+ if (head === "stop" || head === "down")
437
440
  return { kind: "daemon.stop" };
438
441
  if (head === "status")
439
442
  return { kind: "daemon.status" };
@@ -1083,6 +1086,17 @@ async function runOuroCli(args, deps = createDefaultOuroCliDeps()) {
1083
1086
  });
1084
1087
  if (command.kind === "daemon.up") {
1085
1088
  await performSystemSetup(deps);
1089
+ // Run update hooks before starting daemon so user sees the output
1090
+ (0, update_hooks_1.registerUpdateHook)(bundle_meta_1.bundleMetaHook);
1091
+ const bundlesRoot = (0, identity_1.getAgentBundlesRoot)();
1092
+ const currentVersion = (0, bundle_manifest_1.getPackageVersion)();
1093
+ const updateSummary = await (0, update_hooks_1.applyPendingUpdates)(bundlesRoot, currentVersion);
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
+ }
1099
+ }
1086
1100
  const daemonResult = await ensureDaemonRunning(deps);
1087
1101
  deps.writeStdout(daemonResult.message);
1088
1102
  return daemonResult.message;
@@ -57,6 +57,7 @@ function clearRegisteredHooks() {
57
57
  _hooks.length = 0;
58
58
  }
59
59
  async function applyPendingUpdates(bundlesRoot, currentVersion) {
60
+ const summary = { updated: [] };
60
61
  (0, runtime_1.emitNervesEvent)({
61
62
  component: "daemon",
62
63
  event: "daemon.apply_pending_updates_start",
@@ -64,14 +65,14 @@ async function applyPendingUpdates(bundlesRoot, currentVersion) {
64
65
  meta: { bundlesRoot, currentVersion },
65
66
  });
66
67
  if (!fs.existsSync(bundlesRoot)) {
67
- return;
68
+ return summary;
68
69
  }
69
70
  let entries;
70
71
  try {
71
72
  entries = fs.readdirSync(bundlesRoot, { withFileTypes: true });
72
73
  }
73
74
  catch {
74
- return;
75
+ return summary;
75
76
  }
76
77
  for (const entry of entries) {
77
78
  if (!entry.isDirectory() || !entry.name.endsWith(".ouro"))
@@ -110,6 +111,11 @@ async function applyPendingUpdates(bundlesRoot, currentVersion) {
110
111
  });
111
112
  }
112
113
  }
114
+ summary.updated.push({
115
+ agent: entry.name.replace(/\.ouro$/, ""),
116
+ from: previousVersion,
117
+ to: currentVersion,
118
+ });
113
119
  }
114
120
  (0, runtime_1.emitNervesEvent)({
115
121
  component: "daemon",
@@ -117,4 +123,5 @@ async function applyPendingUpdates(bundlesRoot, currentVersion) {
117
123
  message: "pending updates applied",
118
124
  meta: { bundlesRoot },
119
125
  });
126
+ return summary;
120
127
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.22",
3
+ "version": "0.1.0-alpha.24",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",