@ouro.bot/cli 0.1.0-alpha.323 → 0.1.0-alpha.324

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.324",
6
+ "changes": [
7
+ "fix(daemon): surface crashed worker error reasons and fix hints in `ouro status`, `ouro up --no-repair`, health-monitor alerts, and daemon-health snapshots so configuration failures point to the exact repair command instead of a bare warn/crashed state.",
8
+ "ci(release): verify the supported npm publish channels after release (`@ouro.bot/cli@alpha` and `ouro.bot@latest`) and remove the broken trusted-publishing `ouro.bot@alpha` dist-tag warning path."
9
+ ]
10
+ },
4
11
  {
5
12
  "version": "0.1.0-alpha.323",
6
13
  "changes": [
@@ -1080,6 +1080,9 @@ async function runOuroCli(args, deps = (0, cli_defaults_1.createDefaultOuroCliDe
1080
1080
  deps.writeStdout("degraded agents:");
1081
1081
  for (const d of daemonResult.stability.degraded) {
1082
1082
  deps.writeStdout(` ${d.agent}: ${d.errorReason}`);
1083
+ if (d.fixHint) {
1084
+ deps.writeStdout(` fix: ${d.fixHint}`);
1085
+ }
1083
1086
  }
1084
1087
  (0, runtime_1.emitNervesEvent)({
1085
1088
  level: "warn",
@@ -345,6 +345,12 @@ function formatDaemonStatusOutput(response, fallback) {
345
345
  /* v8 ignore stop */
346
346
  const details = [pidStr, restartStr, exitStr].filter(Boolean).join(" ");
347
347
  lines.push(` ${name} ${dot} ${row.status.padEnd(10)} ${dim(details)}`);
348
+ if (row.errorReason) {
349
+ lines.push(` ${dim(`error: ${row.errorReason}`)}`);
350
+ }
351
+ if (row.fixHint) {
352
+ lines.push(` ${dim(`fix: ${row.fixHint}`)}`);
353
+ }
348
354
  }
349
355
  }
350
356
  lines.push("");
@@ -172,15 +172,40 @@ const daemon = new daemon_1.OuroDaemon({
172
172
  const daemonStartedAt = new Date().toISOString();
173
173
  const degradedComponents = [];
174
174
  function buildDaemonHealthState() {
175
+ const snapshots = processManager.listAgentSnapshots();
176
+ const agentDegradedComponents = snapshots
177
+ .filter((snapshot) => snapshot.status !== "running")
178
+ .map((snapshot) => {
179
+ const reasonParts = [
180
+ snapshot.errorReason ?? `${snapshot.channel} is ${snapshot.status}`,
181
+ snapshot.fixHint ? `Fix: ${snapshot.fixHint}` : null,
182
+ ].filter((part) => part !== null);
183
+ return {
184
+ component: `agent:${snapshot.name}`,
185
+ reason: reasonParts.join(" "),
186
+ since: snapshot.lastCrashAt ?? daemonStartedAt,
187
+ };
188
+ });
189
+ const degraded = [
190
+ ...degradedComponents.map((entry) => ({ ...entry })),
191
+ ...agentDegradedComponents,
192
+ ];
175
193
  return {
176
- status: degradedComponents.length > 0 ? "degraded" : "ok",
194
+ status: degraded.length > 0 ? "degraded" : "ok",
177
195
  mode,
178
196
  pid: process.pid,
179
197
  startedAt: daemonStartedAt,
180
198
  uptimeSeconds: Math.floor(process.uptime()),
181
199
  safeMode: null,
182
- degraded: degradedComponents.map((entry) => ({ ...entry })),
183
- agents: {},
200
+ degraded,
201
+ agents: Object.fromEntries(snapshots.map((snapshot) => [
202
+ snapshot.name,
203
+ {
204
+ status: snapshot.status,
205
+ pid: snapshot.pid,
206
+ crashes: snapshot.restartCount,
207
+ },
208
+ ])),
184
209
  habits: {},
185
210
  };
186
211
  }
@@ -75,6 +75,10 @@ exports.HEALTH_TRACKED_EVENTS = new Set([
75
75
  "daemon.habit_fire",
76
76
  "daemon.agent_exit",
77
77
  "daemon.agent_started",
78
+ "daemon.agent_config_invalid",
79
+ "daemon.agent_config_failure",
80
+ "daemon.agent_entry_missing",
81
+ "daemon.agent_spawn_failed",
78
82
  "daemon.agent_restart_exhausted",
79
83
  "daemon.agent_permanent_failure",
80
84
  "daemon.agent_cooldown_recovery",
@@ -43,10 +43,17 @@ class HealthMonitor {
43
43
  const snapshots = this.processManager.listAgentSnapshots();
44
44
  const unhealthy = snapshots.filter((snapshot) => snapshot.status !== "running");
45
45
  if (unhealthy.length > 0) {
46
+ const unhealthySummary = unhealthy.map((item) => {
47
+ const detail = [
48
+ item.errorReason ?? null,
49
+ item.fixHint ? `fix: ${item.fixHint}` : null,
50
+ ].filter((part) => part !== null).join("; ");
51
+ return detail.length > 0 ? `${item.name} (${detail})` : item.name;
52
+ }).join(", ");
46
53
  results.push({
47
54
  name: "agent-processes",
48
55
  status: "critical",
49
- message: `non-running agents: ${unhealthy.map((item) => item.name).join(", ")}`,
56
+ message: `non-running agents: ${unhealthySummary}`,
50
57
  });
51
58
  for (const agent of unhealthy) {
52
59
  try {
@@ -55,7 +62,12 @@ class HealthMonitor {
55
62
  component: "daemon",
56
63
  event: "daemon.health_check_recovery_attempted",
57
64
  message: "triggering recovery restart for non-running agent",
58
- meta: { agentName: agent.name, agentStatus: agent.status },
65
+ meta: {
66
+ agentName: agent.name,
67
+ agentStatus: agent.status,
68
+ errorReason: agent.errorReason ?? null,
69
+ fixHint: agent.fixHint ?? null,
70
+ },
59
71
  });
60
72
  this.onCriticalAgent(agent.name);
61
73
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.323",
3
+ "version": "0.1.0-alpha.324",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",