@ouro.bot/cli 0.1.0-alpha.701 → 0.1.0-alpha.703

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,20 @@
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.703",
6
+ "changes": [
7
+ "Let ouro up hand off when the daemon and enabled senses are healthy but only advisory health checks, such as context-loss-sentinel warnings, remain.",
8
+ "Keep final handoff blocking on degraded enabled senses and health checks that affect daemon, cron, or sense readiness."
9
+ ]
10
+ },
11
+ {
12
+ "version": "0.1.0-alpha.702",
13
+ "changes": [
14
+ "Retry transient daemon socket misses during the final ouro up handoff instead of failing while launchd-owned senses are still settling.",
15
+ "Keep hard failure diagnostics when the daemon socket remains unavailable beyond the handoff settle window."
16
+ ]
17
+ },
4
18
  {
5
19
  "version": "0.1.0-alpha.701",
6
20
  "changes": [
@@ -715,6 +715,32 @@ function finalDaemonFailureMessage(deps, reason) {
715
715
  lines.push("Run `ouro up` again or `ouro doctor` for a deeper diagnosis.");
716
716
  return lines.join("\n");
717
717
  }
718
+ function finalHandoffBlockingHealthChecks(payload) {
719
+ return payload.healthChecks
720
+ .filter((check) => {
721
+ if (check.status === "ok")
722
+ return false;
723
+ if (check.status === "critical")
724
+ return true;
725
+ return check.name === "agent-processes"
726
+ || check.name === "cron-health"
727
+ || check.name === "sense-probes"
728
+ || check.name.startsWith("sense-probe:");
729
+ })
730
+ .map((check) => `${check.name}: ${check.status} - ${check.message}`);
731
+ }
732
+ function finalHandoffBlockingWorkers(payload) {
733
+ return payload.workers
734
+ .filter((worker) => !(worker.autoStart === false && worker.status === "stopped") && worker.status !== "running")
735
+ .map((worker) => {
736
+ const detail = [
737
+ worker.errorReason,
738
+ worker.fixHint ? `fix: ${worker.fixHint}` : null,
739
+ ].filter((part) => part !== null).join("; ");
740
+ const suffix = detail.length > 0 ? ` - ${detail}` : "";
741
+ return `${worker.agent}/${worker.worker}: ${worker.status}${suffix}`;
742
+ });
743
+ }
718
744
  async function verifyDaemonReadyForHandoff(deps, options) {
719
745
  const settleTimeoutMs = options.settleTimeoutMs;
720
746
  const settlePollIntervalMs = options.settlePollIntervalMs;
@@ -738,10 +764,13 @@ async function verifyDaemonReadyForHandoff(deps, options) {
738
764
  async function verifyDaemonReadyForHandoffOnce(deps, options = {}) {
739
765
  const socketAlive = await deps.checkSocketAlive(deps.socketPath);
740
766
  if (!socketAlive) {
767
+ const reason = "the daemon socket is no longer answering";
741
768
  return {
742
769
  ok: false,
743
770
  summary: "background service stopped",
744
- message: finalDaemonFailureMessage(deps, "the daemon socket is no longer answering"),
771
+ message: finalDaemonFailureMessage(deps, reason),
772
+ retryable: true,
773
+ reason,
745
774
  };
746
775
  }
747
776
  try {
@@ -769,16 +798,25 @@ async function verifyDaemonReadyForHandoffOnce(deps, options = {}) {
769
798
  };
770
799
  }
771
800
  if (payload.overview.health !== "ok") {
801
+ const blockingWorkers = finalHandoffBlockingWorkers(payload);
772
802
  const degradedSenses = payload.senses
773
803
  .filter((sense) => sense.enabled && !["running", "interactive", "disabled", "not_attached"].includes(sense.status))
774
804
  .map((sense) => `${sense.agent}/${sense.sense}: ${sense.status} - ${sense.detail}`);
775
- const detail = degradedSenses.length > 0 ? `; ${degradedSenses.join("; ")}` : "";
805
+ const blockingHealthChecks = finalHandoffBlockingHealthChecks(payload);
806
+ const details = [...blockingWorkers, ...degradedSenses, ...blockingHealthChecks];
807
+ const detail = details.length > 0 ? `; ${details.join("; ")}` : "";
776
808
  if (options.allowDegradedHealth) {
777
809
  return {
778
810
  ok: true,
779
811
  summary: `runtime health ${payload.overview.health}`,
780
812
  };
781
813
  }
814
+ if (blockingWorkers.length === 0 && degradedSenses.length === 0 && blockingHealthChecks.length === 0) {
815
+ return {
816
+ ok: true,
817
+ summary: "daemon answered with advisory health warnings",
818
+ };
819
+ }
782
820
  const reason = `runtime health is ${payload.overview.health}${detail}`;
783
821
  return {
784
822
  ok: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.701",
3
+ "version": "0.1.0-alpha.703",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",