@ouro.bot/cli 0.1.0-alpha.404 → 0.1.0-alpha.405
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.405",
|
|
6
|
+
"changes": [
|
|
7
|
+
"`ouro up` now keeps walking the guided repair path when one successful fix reveals the next runnable issue for the same agent, instead of stopping after the first pass and making you rerun the command.",
|
|
8
|
+
"The happy repair path still prints `provider checks recovered after repair`, and the chained-flow coverage now exercises vault-unlock-then-auth continuation directly.",
|
|
9
|
+
"`@ouro.bot/cli` and the `ouro.bot` wrapper are version-synced for the chained preflight repair release."
|
|
10
|
+
]
|
|
11
|
+
},
|
|
4
12
|
{
|
|
5
13
|
"version": "0.1.0-alpha.404",
|
|
6
14
|
"changes": [
|
|
@@ -1459,13 +1459,65 @@ function readinessReportsFromDegraded(degraded) {
|
|
|
1459
1459
|
issues: [readinessIssueFromDegraded(entry)],
|
|
1460
1460
|
}));
|
|
1461
1461
|
}
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1462
|
+
function degradedEntrySignature(entry) {
|
|
1463
|
+
const issue = readinessIssueFromDegraded(entry);
|
|
1464
|
+
return JSON.stringify({
|
|
1465
|
+
agent: entry.agent,
|
|
1466
|
+
kind: issue.kind,
|
|
1467
|
+
summary: issue.summary,
|
|
1468
|
+
detail: issue.detail ?? "",
|
|
1469
|
+
actions: issue.actions.map((action) => `${action.kind}:${action.command}:${action.executable === false ? "manual" : "run"}`),
|
|
1467
1470
|
});
|
|
1468
1471
|
}
|
|
1472
|
+
function mergeRemainingDegraded(untouched, rechecked) {
|
|
1473
|
+
const byAgent = new Map();
|
|
1474
|
+
for (const entry of untouched)
|
|
1475
|
+
byAgent.set(entry.agent, entry);
|
|
1476
|
+
for (const entry of rechecked)
|
|
1477
|
+
byAgent.set(entry.agent, entry);
|
|
1478
|
+
return [...byAgent.values()];
|
|
1479
|
+
}
|
|
1480
|
+
async function runReadinessRepairForDegraded(degraded, deps) {
|
|
1481
|
+
let current = degraded;
|
|
1482
|
+
let repairsAttempted = false;
|
|
1483
|
+
for (let pass = 0; pass < 3; pass += 1) {
|
|
1484
|
+
const attemptedAgents = new Set();
|
|
1485
|
+
const result = await (0, readiness_repair_1.runGuidedReadinessRepair)(readinessReportsFromDegraded(current), {
|
|
1486
|
+
promptInput: deps.promptInput,
|
|
1487
|
+
writeStdout: deps.writeStdout,
|
|
1488
|
+
onActionAttempted: (agentName) => {
|
|
1489
|
+
attemptedAgents.add(agentName);
|
|
1490
|
+
},
|
|
1491
|
+
runRepairAction: async (agentName, action) => executeReadinessRepairAction(agentName, action, deps),
|
|
1492
|
+
});
|
|
1493
|
+
if (!result.repairsAttempted) {
|
|
1494
|
+
return { repairsAttempted, remainingDegraded: current };
|
|
1495
|
+
}
|
|
1496
|
+
repairsAttempted = true;
|
|
1497
|
+
/* v8 ignore next -- onActionAttempted runs before any runnable repair action, so repairsAttempted implies at least one attempted agent @preserve */
|
|
1498
|
+
if (attemptedAgents.size === 0) {
|
|
1499
|
+
return { repairsAttempted, remainingDegraded: current };
|
|
1500
|
+
}
|
|
1501
|
+
const previousByAgent = new Map();
|
|
1502
|
+
for (const entry of current) {
|
|
1503
|
+
if (attemptedAgents.has(entry.agent)) {
|
|
1504
|
+
previousByAgent.set(entry.agent, degradedEntrySignature(entry));
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
const untouched = current.filter((entry) => !attemptedAgents.has(entry.agent));
|
|
1508
|
+
const rechecked = await checkAgentProviders(deps, [...attemptedAgents]);
|
|
1509
|
+
const remaining = mergeRemainingDegraded(untouched, rechecked);
|
|
1510
|
+
if (remaining.length === 0) {
|
|
1511
|
+
return { repairsAttempted, remainingDegraded: remaining };
|
|
1512
|
+
}
|
|
1513
|
+
const nextPrompt = rechecked.filter((entry) => previousByAgent.get(entry.agent) !== degradedEntrySignature(entry));
|
|
1514
|
+
if (nextPrompt.length === 0) {
|
|
1515
|
+
return { repairsAttempted, remainingDegraded: remaining };
|
|
1516
|
+
}
|
|
1517
|
+
current = nextPrompt;
|
|
1518
|
+
}
|
|
1519
|
+
return { repairsAttempted, remainingDegraded: current };
|
|
1520
|
+
}
|
|
1469
1521
|
async function executeLegacyAuthSwitch(command, deps) {
|
|
1470
1522
|
const { state } = readOrBootstrapProviderState(command.agent, deps);
|
|
1471
1523
|
const lanes = command.facing
|
|
@@ -2246,17 +2298,19 @@ async function runOuroCli(args, deps = (0, cli_defaults_1.createDefaultOuroCliDe
|
|
|
2246
2298
|
}
|
|
2247
2299
|
const repairResult = await runReadinessRepairForDegraded(preflightProviderDegraded, deps);
|
|
2248
2300
|
if (!repairResult.repairsAttempted) {
|
|
2249
|
-
writeProviderRepairSummary(deps, "Provider checks still need repair:",
|
|
2301
|
+
writeProviderRepairSummary(deps, "Provider checks still need repair:", repairResult.remainingDegraded);
|
|
2250
2302
|
const message = "daemon not started: provider checks need repair. Run `ouro repair` or rerun `ouro up` to choose a repair path.";
|
|
2251
2303
|
deps.writeStdout(message);
|
|
2252
2304
|
return message;
|
|
2253
2305
|
}
|
|
2254
|
-
const remainingDegraded =
|
|
2306
|
+
const remainingDegraded = repairResult.remainingDegraded;
|
|
2255
2307
|
if (remainingDegraded.length > 0) {
|
|
2308
|
+
writeProviderRepairSummary(deps, "Still blocked:", remainingDegraded);
|
|
2256
2309
|
const message = "daemon not started: provider checks still need repair.";
|
|
2257
2310
|
deps.writeStdout(message);
|
|
2258
2311
|
return message;
|
|
2259
2312
|
}
|
|
2313
|
+
deps.writeStdout("provider checks recovered after repair");
|
|
2260
2314
|
}
|
|
2261
2315
|
}
|
|
2262
2316
|
progress.startPhase("starting daemon");
|
|
@@ -187,6 +187,7 @@ async function runGuidedReadinessRepair(reports, deps) {
|
|
|
187
187
|
continue;
|
|
188
188
|
}
|
|
189
189
|
try {
|
|
190
|
+
deps.onActionAttempted?.(report.agent, action, issue);
|
|
190
191
|
await deps.runRepairAction(report.agent, action, issue);
|
|
191
192
|
repairsAttempted = true;
|
|
192
193
|
deps.writeStdout(`repair step finished for ${report.agent}.`);
|