@ouro.bot/cli 0.1.0-alpha.356 → 0.1.0-alpha.358
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/senses/cli.js +0 -19
- package/dist/senses/commands.js +2 -3
- 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.358",
|
|
6
|
+
"changes": [
|
|
7
|
+
"Removed `/new` slash command from CLI (kept on Teams). Made `dispatch()` channel-aware so commands only fire on their registered channels."
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"version": "0.1.0-alpha.357",
|
|
12
|
+
"changes": [
|
|
13
|
+
"`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."
|
|
14
|
+
]
|
|
15
|
+
},
|
|
4
16
|
{
|
|
5
17
|
"version": "0.1.0-alpha.356",
|
|
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
|
}
|
package/dist/senses/cli.js
CHANGED
|
@@ -799,14 +799,6 @@ async function runCliSession(options) {
|
|
|
799
799
|
if (dispatchResult.result.action === "exit") {
|
|
800
800
|
break;
|
|
801
801
|
}
|
|
802
|
-
else if (dispatchResult.result.action === "new") {
|
|
803
|
-
messages.length = 0;
|
|
804
|
-
messages.push({ role: "system", content: await (0, prompt_1.buildSystem)("cli") });
|
|
805
|
-
await options.onNewSession?.();
|
|
806
|
-
// eslint-disable-next-line no-console -- terminal UX: session cleared
|
|
807
|
-
console.log("session cleared");
|
|
808
|
-
continue;
|
|
809
|
-
}
|
|
810
802
|
else if (dispatchResult.result.action === "response") {
|
|
811
803
|
display.text(dispatchResult.result.message || "");
|
|
812
804
|
continue;
|
|
@@ -839,14 +831,6 @@ async function runCliSession(options) {
|
|
|
839
831
|
if (result.commandAction === "exit") {
|
|
840
832
|
break;
|
|
841
833
|
}
|
|
842
|
-
else if (result.commandAction === "new") {
|
|
843
|
-
messages.length = 0;
|
|
844
|
-
messages.push({ role: "system", content: await (0, prompt_1.buildSystem)("cli") });
|
|
845
|
-
await options.onNewSession?.();
|
|
846
|
-
// eslint-disable-next-line no-console -- terminal UX: session cleared
|
|
847
|
-
console.log("session cleared");
|
|
848
|
-
continue;
|
|
849
|
-
}
|
|
850
834
|
// For "response" commands: the pipeline already emitted the response via onTextChunk
|
|
851
835
|
cliCallbacks.flushMarkdown();
|
|
852
836
|
continue;
|
|
@@ -1109,9 +1093,6 @@ async function main(agentName, options) {
|
|
|
1109
1093
|
}
|
|
1110
1094
|
return { usage: result.usage, turnOutcome: result.turnOutcome, commandAction: result.commandAction };
|
|
1111
1095
|
},
|
|
1112
|
-
onNewSession: () => {
|
|
1113
|
-
(0, context_1.deleteSession)(sessPath);
|
|
1114
|
-
},
|
|
1115
1096
|
});
|
|
1116
1097
|
}
|
|
1117
1098
|
finally {
|
package/dist/senses/commands.js
CHANGED
|
@@ -25,7 +25,7 @@ function createCommandRegistry() {
|
|
|
25
25
|
},
|
|
26
26
|
dispatch(name, ctx) {
|
|
27
27
|
const cmd = commands.get(name);
|
|
28
|
-
if (!cmd)
|
|
28
|
+
if (!cmd || !cmd.channels.includes(ctx.channel))
|
|
29
29
|
return { handled: false };
|
|
30
30
|
return { handled: true, result: cmd.handler(ctx) };
|
|
31
31
|
},
|
|
@@ -63,7 +63,7 @@ function registerDefaultCommands(registry) {
|
|
|
63
63
|
registry.register({
|
|
64
64
|
name: "new",
|
|
65
65
|
description: "start a new conversation",
|
|
66
|
-
channels: ["
|
|
66
|
+
channels: ["teams"],
|
|
67
67
|
handler: () => ({ action: "new" }),
|
|
68
68
|
});
|
|
69
69
|
registry.register({
|
|
@@ -97,7 +97,6 @@ function registerDefaultCommands(registry) {
|
|
|
97
97
|
"Commands:",
|
|
98
98
|
" /help this help",
|
|
99
99
|
" /commands list all commands",
|
|
100
|
-
" /new start a new conversation",
|
|
101
100
|
" /exit quit",
|
|
102
101
|
].join("\n"),
|
|
103
102
|
}),
|