@ouro.bot/cli 0.1.0-alpha.425 → 0.1.0-alpha.426

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,15 @@
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.426",
6
+ "changes": [
7
+ "`ouro up` no longer marks `starting daemon` complete when a replacement daemon still is not answering; it now narrates replacement progress in plain language and reports replacement timeout as an incomplete replacement instead of a fake success.",
8
+ "Root `ouro connect --agent <agent>` now prints a short `checking current connections` preflight while it reads portable and machine-local runtime settings before showing the connect bay menu.",
9
+ "Auth/provider/setup docs now codify the human CLI rule that waits longer than about three seconds should show current work, and they describe the new daemon replacement wording and connect-bay preflight.",
10
+ "`@ouro.bot/cli` and the `ouro.bot` wrapper are version-synced for the daemon replacement and connect-bay progress release."
11
+ ]
12
+ },
4
13
  {
5
14
  "version": "0.1.0-alpha.425",
6
15
  "changes": [
@@ -329,12 +329,10 @@ async function runCommandProgressPhase(progress, label, run, detail) {
329
329
  }
330
330
  }
331
331
  function daemonProgressSummary(result) {
332
- if (result.verifyStartupStatus === false)
333
- return "not answering yet";
334
332
  if (result.alreadyRunning)
335
333
  return "already running";
336
- if (result.message.includes("restarted"))
337
- return "restarted and ready";
334
+ if (result.message.includes("replaced"))
335
+ return "replacement ready";
338
336
  return "ready";
339
337
  }
340
338
  async function reportPostRepairProviderHealth(deps, repairedAgents, onProgress) {
@@ -464,6 +462,7 @@ async function ensureDaemonRunning(deps, options = {}) {
464
462
  cleanupStaleSocket: deps.cleanupStaleSocket,
465
463
  startDaemonProcess: deps.startDaemonProcess,
466
464
  checkSocketAlive: deps.checkSocketAlive,
465
+ onProgress: deps.reportDaemonStartupPhase,
467
466
  });
468
467
  if (!runtimeResult.verifyStartupStatus) {
469
468
  return runtimeResult;
@@ -1626,7 +1625,7 @@ function enableAgentSense(agent, sense, deps) {
1626
1625
  };
1627
1626
  fs.writeFileSync(configPath, `${JSON.stringify(raw, null, 2)}\n`, "utf-8");
1628
1627
  }
1629
- async function buildConnectMenu(agent, deps) {
1628
+ async function buildConnectMenu(agent, deps, onProgress) {
1630
1629
  const providerVisibility = (0, provider_visibility_1.buildAgentProviderVisibility)({
1631
1630
  agentName: agent,
1632
1631
  agentRoot: providerCliAgentRoot({ agent }, deps),
@@ -1642,7 +1641,9 @@ async function buildConnectMenu(agent, deps) {
1642
1641
  const providerDetail = providerVisibility.lanes.map((lane) => lane.status === "configured"
1643
1642
  ? `${lane.lane}: ${lane.provider} / ${lane.model}`
1644
1643
  : `${lane.lane}: choose provider/model`).join(" | ");
1644
+ onProgress?.("loading portable settings");
1645
1645
  const runtimeConfig = await (0, runtime_credentials_1.refreshRuntimeCredentialConfig)(agent, { preserveCachedOnFailure: true });
1646
+ onProgress?.("loading this machine's settings");
1646
1647
  const machineRuntime = await (0, runtime_credentials_1.refreshMachineRuntimeCredentialConfig)(agent, currentMachineId(deps), { preserveCachedOnFailure: true });
1647
1648
  const agentConfig = (0, auth_flow_1.readAgentConfigForAgent)(agent, deps.bundlesRoot).config;
1648
1649
  const teamsEnabled = agentConfig.senses?.teams?.enabled === true;
@@ -1951,7 +1952,14 @@ async function executeConnect(command, deps) {
1951
1952
  return executeConnectTeams(command.agent, deps);
1952
1953
  if (command.target === "bluebubbles")
1953
1954
  return executeConnectBlueBubbles(command.agent, deps);
1954
- const menu = await buildConnectMenu(command.agent, deps);
1955
+ const progress = createHumanCommandProgress(deps, "connect");
1956
+ let menu;
1957
+ try {
1958
+ menu = await runCommandProgressPhase(progress, "checking current connections", () => buildConnectMenu(command.agent, deps, (message) => progress.updateDetail(message)), () => "ready");
1959
+ }
1960
+ finally {
1961
+ progress.end();
1962
+ }
1955
1963
  const promptInput = deps.promptInput;
1956
1964
  if (!promptInput) {
1957
1965
  const message = [
@@ -3348,12 +3356,14 @@ async function runOuroCli(args, deps = (0, cli_defaults_1.createDefaultOuroCliDe
3348
3356
  progress.announceStep?.(label);
3349
3357
  },
3350
3358
  }, { initialAlive: daemonAliveBeforeStart });
3351
- progress.completePhase("starting daemon", daemonProgressSummary(daemonResult));
3352
3359
  if (daemonResult.verifyStartupStatus === false) {
3360
+ ;
3361
+ progress.announceStep?.("replacement daemon did not answer in time");
3353
3362
  progress.end();
3354
3363
  deps.writeStdout(daemonResult.message);
3355
3364
  return daemonResult.message;
3356
3365
  }
3366
+ progress.completePhase("starting daemon", daemonProgressSummary(daemonResult));
3357
3367
  if (!providerChecksAlreadyRun || daemonResult.alreadyRunning) {
3358
3368
  progress.startPhase("provider checks");
3359
3369
  const providerDegraded = await checkAlreadyRunningAgentProviders(deps, (msg) => progress.updateDetail(msg));
@@ -9,6 +9,7 @@ async function verifyDaemonStarted(deps) {
9
9
  const maxWaitMs = 10_000;
10
10
  const pollIntervalMs = 500;
11
11
  const deadline = Date.now() + maxWaitMs;
12
+ deps.onProgress?.("waiting for the replacement daemon to answer");
12
13
  while (Date.now() < deadline) {
13
14
  await new Promise((r) => setTimeout(r, pollIntervalMs));
14
15
  if (await deps.checkSocketAlive(deps.socketPath))
@@ -102,7 +103,9 @@ async function ensureCurrentDaemonRuntime(deps) {
102
103
  if (driftReasons.length > 0) {
103
104
  const includesVersionDrift = driftReasons.some((entry) => entry.key === "version");
104
105
  const publicDriftSummary = formatRuntimeDriftPublicSummary(driftReasons);
106
+ deps.onProgress?.("preparing a replacement for the running background service");
105
107
  try {
108
+ deps.onProgress?.("stopping the running background service");
106
109
  await deps.stopDaemon();
107
110
  }
108
111
  catch (error) {
@@ -110,8 +113,8 @@ async function ensureCurrentDaemonRuntime(deps) {
110
113
  result = {
111
114
  alreadyRunning: true,
112
115
  message: includesVersionDrift
113
- ? `daemon already running (${deps.socketPath}; could not replace stale daemon ${runningVersion} -> ${deps.localVersion}: ${reason})`
114
- : `daemon already running (${deps.socketPath}; could not replace runtime drift ${publicDriftSummary}: ${reason})`,
116
+ ? `daemon already running (${deps.socketPath}; could not replace the running background service ${runningVersion} -> ${deps.localVersion}: ${reason})`
117
+ : `daemon already running (${deps.socketPath}; could not replace the running background service after runtime drift ${publicDriftSummary}: ${reason})`,
115
118
  };
116
119
  (0, runtime_1.emitNervesEvent)({
117
120
  level: "warn",
@@ -138,16 +141,17 @@ async function ensureCurrentDaemonRuntime(deps) {
138
141
  return result;
139
142
  }
140
143
  deps.cleanupStaleSocket(deps.socketPath);
144
+ deps.onProgress?.("starting the replacement background service");
141
145
  const started = await deps.startDaemonProcess(deps.socketPath);
142
146
  const pid = started.pid ?? "unknown";
143
147
  const verified = await verifyDaemonStarted(deps);
144
148
  /* v8 ignore next -- daemon liveness failure: requires real daemon crash timing @preserve */
145
- const suffix = verified ? "" : "\ndaemon restart has not answered yet; check logs with `ouro logs` or run `ouro doctor`.";
149
+ const suffix = verified ? "" : "\nreplacement daemon did not answer in time; check logs with `ouro logs` or run `ouro doctor`.";
146
150
  result = {
147
151
  alreadyRunning: false,
148
152
  message: includesVersionDrift
149
- ? `restarted stale daemon ${runningVersion} -> ${deps.localVersion} (pid ${pid})${suffix}`
150
- : `restarted daemon after runtime drift: ${publicDriftSummary} (pid ${pid})${suffix}`,
153
+ ? `replaced the running background service ${runningVersion} -> ${deps.localVersion} (pid ${pid})${suffix}`
154
+ : `replaced the running background service after runtime drift: ${publicDriftSummary} (pid ${pid})${suffix}`,
151
155
  verifyStartupStatus: verified,
152
156
  startedPid: started.pid ?? null,
153
157
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.425",
3
+ "version": "0.1.0-alpha.426",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",