@ouro.bot/cli 0.1.0-alpha.375 → 0.1.0-alpha.376

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,14 @@
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.376",
6
+ "changes": [
7
+ "`ouro up` interactive repair now prints a grouped repair queue before prompting when multiple degraded agents have runnable auth or vault unlock repairs.",
8
+ "The repair queue and the actual prompts share the same computed repair action, so grouped copy cannot drift from the command that will run.",
9
+ "`@ouro.bot/cli` and the `ouro.bot` wrapper are version-synced for the repair queue summary release."
10
+ ]
11
+ },
4
12
  {
5
13
  "version": "0.1.0-alpha.375",
6
14
  "changes": [
@@ -64,6 +64,32 @@ function isAffirmativeAnswer(answer) {
64
64
  function writeDeclinedRepair(degraded, command, deps) {
65
65
  deps.writeStdout(`repair skipped for ${degraded.agent}; run \`${command}\` later.`);
66
66
  }
67
+ function runnableRepairActionFor(degraded) {
68
+ if (isVaultUnlockIssue(degraded)) {
69
+ return { kind: "vault-unlock", label: "vault unlock", command: vaultUnlockCommandFor(degraded) };
70
+ }
71
+ if (isCredentialIssue(degraded)) {
72
+ return {
73
+ kind: "provider-auth",
74
+ label: "provider auth",
75
+ command: authCommandFor(degraded),
76
+ provider: extractProviderFromFixHint(degraded.fixHint),
77
+ };
78
+ }
79
+ return undefined;
80
+ }
81
+ function writeRepairQueueSummary(degraded, deps) {
82
+ const repairable = degraded
83
+ .map((entry) => ({ entry, action: runnableRepairActionFor(entry) }))
84
+ .filter((item) => item.action !== undefined);
85
+ if (repairable.length < 2)
86
+ return;
87
+ const lines = [
88
+ "repair queue:",
89
+ ...repairable.map(({ entry, action }) => ` - ${entry.agent}: ${action.label}: \`${action.command}\``),
90
+ ];
91
+ deps.writeStdout(lines.join("\n"));
92
+ }
67
93
  async function runInteractiveRepair(degraded, deps) {
68
94
  (0, runtime_1.emitNervesEvent)({
69
95
  level: "info",
@@ -76,10 +102,11 @@ async function runInteractiveRepair(degraded, deps) {
76
102
  return { repairsAttempted: false };
77
103
  }
78
104
  let repairsAttempted = false;
105
+ writeRepairQueueSummary(degraded, deps);
79
106
  for (const entry of degraded) {
80
- if (isVaultUnlockIssue(entry)) {
81
- const unlockCommand = vaultUnlockCommandFor(entry);
82
- const answer = await deps.promptInput(`run \`${unlockCommand}\` now? [y/n] `);
107
+ const action = runnableRepairActionFor(entry);
108
+ if (action?.kind === "vault-unlock") {
109
+ const answer = await deps.promptInput(`run \`${action.command}\` now? [y/n] `);
83
110
  if (isAffirmativeAnswer(answer)) {
84
111
  try {
85
112
  if (!deps.runVaultUnlock) {
@@ -104,17 +131,15 @@ async function runInteractiveRepair(degraded, deps) {
104
131
  }
105
132
  }
106
133
  else {
107
- writeDeclinedRepair(entry, unlockCommand, deps);
134
+ writeDeclinedRepair(entry, action.command, deps);
108
135
  }
109
136
  }
110
- else if (isCredentialIssue(entry)) {
111
- const provider = extractProviderFromFixHint(entry.fixHint);
112
- const authCommand = authCommandFor(entry);
113
- const answer = await deps.promptInput(`run \`${authCommand}\` now? [y/n] `);
137
+ else if (action?.kind === "provider-auth") {
138
+ const answer = await deps.promptInput(`run \`${action.command}\` now? [y/n] `);
114
139
  if (isAffirmativeAnswer(answer)) {
115
140
  try {
116
- if (provider) {
117
- await deps.runAuthFlow(entry.agent, provider);
141
+ if (action.provider) {
142
+ await deps.runAuthFlow(entry.agent, action.provider);
118
143
  }
119
144
  else {
120
145
  await deps.runAuthFlow(entry.agent);
@@ -135,7 +160,7 @@ async function runInteractiveRepair(degraded, deps) {
135
160
  }
136
161
  }
137
162
  else {
138
- writeDeclinedRepair(entry, authCommand, deps);
163
+ writeDeclinedRepair(entry, action.command, deps);
139
164
  }
140
165
  }
141
166
  else if (isConfigError(entry)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.375",
3
+ "version": "0.1.0-alpha.376",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",