@ouro.bot/cli 0.1.0-alpha.355 → 0.1.0-alpha.357
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 +12 -0
- package/dist/heart/daemon/cli-exec.js +22 -0
- package/dist/heart/provider-ping.js +6 -1
- package/package.json +1 -1
package/changelog.json
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
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.357",
|
|
6
|
+
"changes": [
|
|
7
|
+
"`ouro chat` now checks provider health before launching a session, failing fast with actionable error and fix guidance instead of erroring mid-conversation when a provider is broken (expired token, unsupported parameter, etc.). Applied to all three pre-chat paths: explicit `ouro chat <agent>`, bare `ouro` single-agent auto-chat, and bare `ouro` multi-agent selection."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"version": "0.1.0-alpha.356",
|
|
12
|
+
"changes": [
|
|
13
|
+
"Provider ping for github-copilot GPT models (e.g. gpt-5.4) now uses the Responses API instead of chat completions, fixing `400 Unsupported parameter: 'max_tokens'` errors during live checks."
|
|
14
|
+
]
|
|
15
|
+
},
|
|
4
16
|
{
|
|
5
17
|
"version": "0.1.0-alpha.355",
|
|
6
18
|
"changes": [
|
|
@@ -128,6 +128,17 @@ async function checkAlreadyRunningAgentProviders(deps) {
|
|
|
128
128
|
}
|
|
129
129
|
return degraded;
|
|
130
130
|
}
|
|
131
|
+
async function checkProviderHealthBeforeChat(agentName, deps) {
|
|
132
|
+
const bundlesRoot = deps.bundlesRoot ?? (0, identity_1.getAgentBundlesRoot)();
|
|
133
|
+
const secretsRoot = deps.secretsRoot ?? path.join(os.homedir(), ".agentsecrets");
|
|
134
|
+
const result = await (0, agent_config_check_1.checkAgentConfigWithProviderHealth)(agentName, bundlesRoot, secretsRoot);
|
|
135
|
+
if (!result.ok) {
|
|
136
|
+
const output = `${result.error}\n${result.fix ? ` fix: ${result.fix}` : ""}`;
|
|
137
|
+
deps.writeStdout(output);
|
|
138
|
+
return { ok: false, output };
|
|
139
|
+
}
|
|
140
|
+
return { ok: true };
|
|
141
|
+
}
|
|
131
142
|
function mergeStartupStability(stability, extraDegraded) {
|
|
132
143
|
if (extraDegraded.length === 0)
|
|
133
144
|
return stability;
|
|
@@ -1277,6 +1288,9 @@ async function runOuroCli(args, deps = (0, cli_defaults_1.createDefaultOuroCliDe
|
|
|
1277
1288
|
else if (discovered.length === 1) {
|
|
1278
1289
|
if (deps.startChat) {
|
|
1279
1290
|
await ensureDaemonRunning(deps);
|
|
1291
|
+
const health = await checkProviderHealthBeforeChat(discovered[0], deps);
|
|
1292
|
+
if (!health.ok)
|
|
1293
|
+
return health.output;
|
|
1280
1294
|
await deps.startChat(discovered[0]);
|
|
1281
1295
|
return "";
|
|
1282
1296
|
}
|
|
@@ -1290,6 +1304,9 @@ async function runOuroCli(args, deps = (0, cli_defaults_1.createDefaultOuroCliDe
|
|
|
1290
1304
|
if (!selected)
|
|
1291
1305
|
throw new Error("Invalid selection");
|
|
1292
1306
|
await ensureDaemonRunning(deps);
|
|
1307
|
+
const health = await checkProviderHealthBeforeChat(selected, deps);
|
|
1308
|
+
if (!health.ok)
|
|
1309
|
+
return health.output;
|
|
1293
1310
|
await deps.startChat(selected);
|
|
1294
1311
|
return "";
|
|
1295
1312
|
}
|
|
@@ -2528,6 +2545,11 @@ async function runOuroCli(args, deps = (0, cli_defaults_1.createDefaultOuroCliDe
|
|
|
2528
2545
|
}
|
|
2529
2546
|
/* v8 ignore stop */
|
|
2530
2547
|
await ensureDaemonRunning(deps);
|
|
2548
|
+
// Check provider health before launching chat — fail fast with
|
|
2549
|
+
// actionable guidance instead of erroring mid-conversation.
|
|
2550
|
+
const health = await checkProviderHealthBeforeChat(agent, deps);
|
|
2551
|
+
if (!health.ok)
|
|
2552
|
+
return health.output;
|
|
2531
2553
|
await deps.startChat(agent);
|
|
2532
2554
|
return "";
|
|
2533
2555
|
}
|
|
@@ -213,8 +213,13 @@ async function pingProvider(provider, config, options = {}) {
|
|
|
213
213
|
toolChoiceRequired: false,
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
|
+
else if (provider === "github-copilot" && !runtime.model.startsWith("claude")) {
|
|
217
|
+
// GPT models on Copilot use the Responses API
|
|
218
|
+
const client = runtime.client;
|
|
219
|
+
await client.responses.create(createResponsePingRequest(runtime.model), { signal: controller.signal });
|
|
220
|
+
}
|
|
216
221
|
else {
|
|
217
|
-
// OpenAI-compatible providers (azure, minimax, github-copilot)
|
|
222
|
+
// OpenAI-compatible providers (azure, minimax, github-copilot claude)
|
|
218
223
|
const client = runtime.client;
|
|
219
224
|
await client.chat.completions.create(createChatPingRequest(runtime.model), { signal: controller.signal });
|
|
220
225
|
}
|