@ouro.bot/cli 0.1.0-alpha.437 → 0.1.0-alpha.438
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.438",
|
|
6
|
+
"changes": [
|
|
7
|
+
"Live provider failures now keep their real diagnosis all the way through startup, repair, and the connect bay: expired credentials still prompt re-auth, but busy providers, provider outages, rate limits, quota failures, and network trouble now point humans toward retrying later, checking usage, or switching lanes instead of being mislabeled as an auth problem.",
|
|
8
|
+
"The readiness board and connect bay now share one classification-aware repair model, so a lane only says `needs credentials` when the live ping actually came back as an auth failure; other live-check failures stay in the broader `needs attention` bucket with matching next actions.",
|
|
9
|
+
"New daemon, connect-bay, human-readiness, hermetic-runtime, and full-suite coverage lock in the truthful failure guidance, and packaged-install verification confirms the fix survives beyond the repo checkout into the shipped CLI."
|
|
10
|
+
]
|
|
11
|
+
},
|
|
4
12
|
{
|
|
5
13
|
"version": "0.1.0-alpha.437",
|
|
6
14
|
"changes": [
|
|
@@ -298,12 +298,18 @@ function failedPingResult(agentName, lane, provider, model, result) {
|
|
|
298
298
|
return {
|
|
299
299
|
ok: false,
|
|
300
300
|
error: `${lane} provider ${provider} model ${model} failed live check: ${result.message}`,
|
|
301
|
-
fix:
|
|
301
|
+
fix: (0, readiness_repair_1.providerLiveCheckFix)({
|
|
302
|
+
agentName,
|
|
303
|
+
lane,
|
|
304
|
+
provider,
|
|
305
|
+
classification: result.classification,
|
|
306
|
+
}),
|
|
302
307
|
issue: (0, readiness_repair_1.providerLiveCheckFailedIssue)({
|
|
303
308
|
agentName,
|
|
304
309
|
lane,
|
|
305
310
|
provider,
|
|
306
311
|
model,
|
|
312
|
+
classification: result.classification,
|
|
307
313
|
message: result.message,
|
|
308
314
|
}),
|
|
309
315
|
};
|
|
@@ -6,6 +6,7 @@ exports.connectEntryNeedsAttention = connectEntryNeedsAttention;
|
|
|
6
6
|
exports.renderConnectBay = renderConnectBay;
|
|
7
7
|
const runtime_1 = require("../../nerves/runtime");
|
|
8
8
|
const terminal_ui_1 = require("./terminal-ui");
|
|
9
|
+
const readiness_repair_1 = require("./readiness-repair");
|
|
9
10
|
const CONNECT_STATUS_PRIORITY = {
|
|
10
11
|
"needs attention": 0,
|
|
11
12
|
locked: 1,
|
|
@@ -79,6 +80,16 @@ function extractCommand(fixHint, commandPrefix) {
|
|
|
79
80
|
function resolveProviderHealthStatus(providerHealth) {
|
|
80
81
|
if (!providerHealth || providerHealth.ok)
|
|
81
82
|
return undefined;
|
|
83
|
+
const issue = providerHealth.issue;
|
|
84
|
+
if (issue?.kind === "vault-locked")
|
|
85
|
+
return "locked";
|
|
86
|
+
if (issue?.kind === "vault-unconfigured")
|
|
87
|
+
return "needs setup";
|
|
88
|
+
if (issue?.kind === "provider-credentials-missing")
|
|
89
|
+
return "needs credentials";
|
|
90
|
+
if (issue?.kind === "provider-live-check-failed") {
|
|
91
|
+
return issue.actions[0]?.kind === "provider-auth" ? "needs credentials" : "needs attention";
|
|
92
|
+
}
|
|
82
93
|
const error = String(providerHealth.error).toLowerCase();
|
|
83
94
|
const fix = String(providerHealth.fix).toLowerCase();
|
|
84
95
|
if (error.includes("failed live check"))
|
|
@@ -99,7 +110,11 @@ function resolveProviderHealthStatus(providerHealth) {
|
|
|
99
110
|
return "locked";
|
|
100
111
|
return "needs attention";
|
|
101
112
|
}
|
|
102
|
-
function resolveProviderHealthCommand(
|
|
113
|
+
function resolveProviderHealthCommand(providerHealth, status) {
|
|
114
|
+
const issueCommand = (0, readiness_repair_1.preferredConnectRepairAction)(providerHealth?.issue)?.command;
|
|
115
|
+
if (issueCommand)
|
|
116
|
+
return issueCommand;
|
|
117
|
+
const fixHint = providerHealth?.fix;
|
|
103
118
|
if (!fixHint)
|
|
104
119
|
return undefined;
|
|
105
120
|
const prefixes = status === "locked"
|
|
@@ -329,7 +344,7 @@ function renderNonTtyBay(entries, options) {
|
|
|
329
344
|
}
|
|
330
345
|
function summarizeProviderLane(agent, lane, providerHealth) {
|
|
331
346
|
const providerHealthStatus = resolveProviderHealthStatus(providerHealth);
|
|
332
|
-
const providerHealthCommand = resolveProviderHealthCommand(providerHealth
|
|
347
|
+
const providerHealthCommand = resolveProviderHealthCommand(providerHealth, providerHealthStatus);
|
|
333
348
|
if (lane.status === "unconfigured") {
|
|
334
349
|
return {
|
|
335
350
|
lane: lane.lane,
|
|
@@ -372,7 +387,7 @@ function summarizeProviderLane(agent, lane, providerHealth) {
|
|
|
372
387
|
status: "needs attention",
|
|
373
388
|
title: `${lane.provider} / ${lane.model}`,
|
|
374
389
|
detail: `failed live check: ${lane.readiness.error ?? "unknown error"}`,
|
|
375
|
-
action: providerHealth?.fix ?? `ouro auth --agent ${agent} --provider ${lane.provider}`,
|
|
390
|
+
action: providerHealthCommand ?? providerHealth?.fix ?? `ouro auth --agent ${agent} --provider ${lane.provider}`,
|
|
376
391
|
};
|
|
377
392
|
}
|
|
378
393
|
if (lane.readiness.status === "stale") {
|
|
@@ -404,7 +419,7 @@ function summarizeProvidersForConnect(agent, visibility, providerHealth) {
|
|
|
404
419
|
const laneSummaries = visibility.lanes.map((lane) => summarizeProviderLane(agent, lane, providerHealth));
|
|
405
420
|
const worstLaneStatus = laneSummaries.reduce((worst, lane) => CONNECT_STATUS_PRIORITY[lane.status] < CONNECT_STATUS_PRIORITY[worst] ? lane.status : worst, "ready");
|
|
406
421
|
const providerHealthStatus = resolveProviderHealthStatus(providerHealth);
|
|
407
|
-
const providerHealthCommand = resolveProviderHealthCommand(providerHealth
|
|
422
|
+
const providerHealthCommand = resolveProviderHealthCommand(providerHealth, providerHealthStatus);
|
|
408
423
|
const nextLane = laneSummaries.find((lane) => isProblemStatus(lane.status));
|
|
409
424
|
return {
|
|
410
425
|
status: providerHealthStatus ?? worstLaneStatus,
|
|
@@ -22,7 +22,7 @@ function statusFromIssue(issue) {
|
|
|
22
22
|
case "provider-credentials-missing":
|
|
23
23
|
return "needs credentials";
|
|
24
24
|
case "provider-live-check-failed":
|
|
25
|
-
return "needs attention";
|
|
25
|
+
return issue.actions[0]?.kind === "provider-auth" ? "needs credentials" : "needs attention";
|
|
26
26
|
case "generic":
|
|
27
27
|
return "needs attention";
|
|
28
28
|
}
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.vaultLockedIssue = vaultLockedIssue;
|
|
4
4
|
exports.vaultUnconfiguredIssue = vaultUnconfiguredIssue;
|
|
5
5
|
exports.providerCredentialMissingIssue = providerCredentialMissingIssue;
|
|
6
|
+
exports.providerLiveCheckFix = providerLiveCheckFix;
|
|
7
|
+
exports.preferredConnectRepairAction = preferredConnectRepairAction;
|
|
6
8
|
exports.providerLiveCheckFailedIssue = providerLiveCheckFailedIssue;
|
|
7
9
|
exports.genericReadinessIssue = genericReadinessIssue;
|
|
8
10
|
exports.isKnownReadinessIssue = isKnownReadinessIssue;
|
|
@@ -92,6 +94,110 @@ function providerCredentialMissingIssue(input) {
|
|
|
92
94
|
],
|
|
93
95
|
};
|
|
94
96
|
}
|
|
97
|
+
function normalizeProviderLiveCheckClassification(classification) {
|
|
98
|
+
switch (classification) {
|
|
99
|
+
case "auth-failure":
|
|
100
|
+
case "usage-limit":
|
|
101
|
+
case "rate-limit":
|
|
102
|
+
case "server-error":
|
|
103
|
+
case "network-error":
|
|
104
|
+
case "unknown":
|
|
105
|
+
return classification;
|
|
106
|
+
default:
|
|
107
|
+
return "unknown";
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
function providerUseAction(input) {
|
|
111
|
+
return {
|
|
112
|
+
kind: "provider-use",
|
|
113
|
+
label: "Choose a different working provider/model",
|
|
114
|
+
command: `ouro use --agent ${input.agentName} --lane ${input.lane} --provider <provider> --model <model>`,
|
|
115
|
+
actor: "human-choice",
|
|
116
|
+
executable: false,
|
|
117
|
+
lane: input.lane,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
function providerAuthAction(input) {
|
|
121
|
+
return {
|
|
122
|
+
kind: "provider-auth",
|
|
123
|
+
label: `Refresh ${input.provider} credentials`,
|
|
124
|
+
command: `ouro auth --agent ${input.agentName} --provider ${input.provider}`,
|
|
125
|
+
actor: "human-required",
|
|
126
|
+
provider: input.provider,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
function providerRetryAction(input) {
|
|
130
|
+
return {
|
|
131
|
+
kind: "provider-retry",
|
|
132
|
+
label: input.label,
|
|
133
|
+
command: `ouro repair --agent ${input.agentName}`,
|
|
134
|
+
actor: "human-choice",
|
|
135
|
+
executable: false,
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
function providerLiveCheckFix(input) {
|
|
139
|
+
const classification = normalizeProviderLiveCheckClassification(input.classification);
|
|
140
|
+
const authCommand = `ouro auth --agent ${input.agentName} --provider ${input.provider}`;
|
|
141
|
+
const useCommand = `ouro use --agent ${input.agentName} --lane ${input.lane} --provider <provider> --model <model>`;
|
|
142
|
+
switch (classification) {
|
|
143
|
+
case "auth-failure":
|
|
144
|
+
return `Run '${authCommand}' to refresh credentials, or run '${useCommand}' to choose another provider/model for this lane.`;
|
|
145
|
+
case "usage-limit":
|
|
146
|
+
return `This usually means ${input.provider} hit a usage limit. Restore quota, then run 'ouro up' again. Or run '${useCommand}' to choose another provider/model for this lane.`;
|
|
147
|
+
case "rate-limit":
|
|
148
|
+
return `Run 'ouro up' again after a short wait. Or run '${useCommand}' to choose another provider/model for this lane.`;
|
|
149
|
+
case "server-error":
|
|
150
|
+
return `Run 'ouro up' again in a moment. If ${input.provider} keeps failing, run '${useCommand}' to choose another provider/model for this lane.`;
|
|
151
|
+
case "network-error":
|
|
152
|
+
return `Check the network or provider availability, then run 'ouro up' again. Or run '${useCommand}' to choose another provider/model for this lane.`;
|
|
153
|
+
case "unknown":
|
|
154
|
+
return `Run 'ouro up' again. If it keeps failing, run '${authCommand}' to refresh credentials or '${useCommand}' to choose another provider/model for this lane.`;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
function providerLiveCheckActions(input) {
|
|
158
|
+
const classification = normalizeProviderLiveCheckClassification(input.classification);
|
|
159
|
+
const useAction = providerUseAction(input);
|
|
160
|
+
const authAction = providerAuthAction(input);
|
|
161
|
+
switch (classification) {
|
|
162
|
+
case "auth-failure":
|
|
163
|
+
return [authAction, useAction];
|
|
164
|
+
case "usage-limit":
|
|
165
|
+
return [
|
|
166
|
+
providerRetryAction({ agentName: input.agentName, label: "After restoring quota, check again" }),
|
|
167
|
+
useAction,
|
|
168
|
+
];
|
|
169
|
+
case "rate-limit":
|
|
170
|
+
return [
|
|
171
|
+
providerRetryAction({ agentName: input.agentName, label: "Give it a minute, then check again" }),
|
|
172
|
+
useAction,
|
|
173
|
+
];
|
|
174
|
+
case "server-error":
|
|
175
|
+
return [
|
|
176
|
+
providerRetryAction({ agentName: input.agentName, label: "Check again in a moment" }),
|
|
177
|
+
useAction,
|
|
178
|
+
];
|
|
179
|
+
case "network-error":
|
|
180
|
+
return [
|
|
181
|
+
providerRetryAction({ agentName: input.agentName, label: "Check again after the network settles" }),
|
|
182
|
+
useAction,
|
|
183
|
+
authAction,
|
|
184
|
+
];
|
|
185
|
+
case "unknown":
|
|
186
|
+
return [
|
|
187
|
+
providerRetryAction({ agentName: input.agentName, label: "Check again" }),
|
|
188
|
+
authAction,
|
|
189
|
+
useAction,
|
|
190
|
+
];
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
function preferredConnectRepairAction(issue) {
|
|
194
|
+
if (!issue)
|
|
195
|
+
return undefined;
|
|
196
|
+
if (issue.kind === "provider-live-check-failed" && issue.actions[0]?.kind === "provider-retry") {
|
|
197
|
+
return issue.actions.find((action) => action.kind !== "provider-retry") ?? issue.actions[0];
|
|
198
|
+
}
|
|
199
|
+
return issue.actions[0];
|
|
200
|
+
}
|
|
95
201
|
function providerLiveCheckFailedIssue(input) {
|
|
96
202
|
return {
|
|
97
203
|
kind: "provider-live-check-failed",
|
|
@@ -99,23 +205,7 @@ function providerLiveCheckFailedIssue(input) {
|
|
|
99
205
|
actor: "human-choice",
|
|
100
206
|
summary: `${input.agentName}: ${input.lane} provider ${input.provider} / ${input.model} failed live check`,
|
|
101
207
|
detail: input.message,
|
|
102
|
-
actions:
|
|
103
|
-
{
|
|
104
|
-
kind: "provider-auth",
|
|
105
|
-
label: `Refresh ${input.provider} credentials`,
|
|
106
|
-
command: `ouro auth --agent ${input.agentName} --provider ${input.provider}`,
|
|
107
|
-
actor: "human-required",
|
|
108
|
-
provider: input.provider,
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
kind: "provider-use",
|
|
112
|
-
label: "Choose a different working provider/model for this lane",
|
|
113
|
-
command: `ouro use --agent ${input.agentName} --lane ${input.lane} --provider <provider> --model <model>`,
|
|
114
|
-
actor: "human-choice",
|
|
115
|
-
executable: false,
|
|
116
|
-
lane: input.lane,
|
|
117
|
-
},
|
|
118
|
-
],
|
|
208
|
+
actions: providerLiveCheckActions(input),
|
|
119
209
|
};
|
|
120
210
|
}
|
|
121
211
|
function genericReadinessIssue(input) {
|