@ouro.bot/cli 0.1.0-alpha.702 → 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,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.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
+ },
4
11
  {
5
12
  "version": "0.1.0-alpha.702",
6
13
  "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;
@@ -772,16 +798,25 @@ async function verifyDaemonReadyForHandoffOnce(deps, options = {}) {
772
798
  };
773
799
  }
774
800
  if (payload.overview.health !== "ok") {
801
+ const blockingWorkers = finalHandoffBlockingWorkers(payload);
775
802
  const degradedSenses = payload.senses
776
803
  .filter((sense) => sense.enabled && !["running", "interactive", "disabled", "not_attached"].includes(sense.status))
777
804
  .map((sense) => `${sense.agent}/${sense.sense}: ${sense.status} - ${sense.detail}`);
778
- 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("; ")}` : "";
779
808
  if (options.allowDegradedHealth) {
780
809
  return {
781
810
  ok: true,
782
811
  summary: `runtime health ${payload.overview.health}`,
783
812
  };
784
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
+ }
785
820
  const reason = `runtime health is ${payload.overview.health}${detail}`;
786
821
  return {
787
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.702",
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",