@ouro.bot/cli 0.1.0-alpha.116 → 0.1.0-alpha.117

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,13 @@
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.117",
6
+ "changes": [
7
+ "Failover messages now show human-readable reasons for failing providers instead of raw JSON API errors.",
8
+ "ouro auth now pings the provider after saving credentials and reports whether they work."
9
+ ]
10
+ },
4
11
  {
5
12
  "version": "0.1.0-alpha.116",
6
13
  "changes": [
@@ -18,7 +25,7 @@
18
25
  "changes": [
19
26
  "When a model provider fails mid-conversation (auth error, usage limit, outage), the harness now classifies the error, pings alternative configured providers, and surfaces validated failover options to the user in-channel. Reply 'switch to <provider>' to continue on a working provider.",
20
27
  "Each provider now has a `classifyError` method that distinguishes auth failures, usage/subscription limits, rate limits, server errors, and network errors. The old auth guidance wrappers are replaced by this unified classification system.",
21
- "New `pingProvider` function makes a real heartbeat completion call to verify provider credentials and quota are live no more format-only checks.",
28
+ "New `pingProvider` function makes a real heartbeat completion call to verify provider credentials and quota are live \u2014 no more format-only checks.",
22
29
  "Provider factories now accept optional config parameters, enabling credential injection for health inventory pings without touching disk config."
23
30
  ]
24
31
  },
@@ -153,7 +160,7 @@
153
160
  {
154
161
  "version": "0.1.0-alpha.94",
155
162
  "changes": [
156
- "Fix stale CurrentVersion symlink not healing during `ouro up` the daemon now detects and repairs dangling version symlinks before reading the active version.",
163
+ "Fix stale CurrentVersion symlink not healing during `ouro up` \u2014 the daemon now detects and repairs dangling version symlinks before reading the active version.",
157
164
  "Fix homedir regression in daemon-cli-defaults test and cover changelog-null branch."
158
165
  ]
159
166
  },
@@ -247,14 +254,14 @@
247
254
  {
248
255
  "version": "0.1.0-alpha.80",
249
256
  "changes": [
250
- "Bootstrap package (npx ouro.bot) now installs into ~/.ouro-cli/ versioned layout directly. No more silent npx updates every install and update is logged. Cleans up old ~/.local/bin/ouro wrapper."
257
+ "Bootstrap package (npx ouro.bot) now installs into ~/.ouro-cli/ versioned layout directly. No more silent npx updates \u2014 every install and update is logged. Cleans up old ~/.local/bin/ouro wrapper."
251
258
  ]
252
259
  },
253
260
  {
254
261
  "version": "0.1.0-alpha.79",
255
262
  "changes": [
256
263
  "New: Versioned CLI directory layout (~/.ouro-cli/) replaces npx-based ouro wrapper. Explicit version management, rollback support, and deterministic updates.",
257
- "New: `ouro up` now checks the registry for newer CLI versions, installs them into ~/.ouro-cli/versions/, activates via symlink flip, and re-execs no more silent npx downloads.",
264
+ "New: `ouro up` now checks the registry for newer CLI versions, installs them into ~/.ouro-cli/versions/, activates via symlink flip, and re-execs \u2014 no more silent npx downloads.",
258
265
  "New: `ouro rollback [<version>]` swaps CurrentVersion/previous symlinks, stops the daemon. With a version arg, installs if needed then activates.",
259
266
  "New: `ouro versions` lists cached CLI versions with * current and (previous) markers.",
260
267
  "Migration: On first run, old ~/.local/bin/ouro wrapper is removed, old PATH entry cleaned from shell profile, new ~/.ouro-cli/bin added to PATH.",
@@ -276,10 +283,10 @@
276
283
  {
277
284
  "version": "0.1.0-alpha.76",
278
285
  "changes": [
279
- "Fix: CLI chat terminal logging now filters to warn/error only info-level nerves logs go to ndjson file only, keeping the interactive TUI clean.",
286
+ "Fix: CLI chat terminal logging now filters to warn/error only \u2014 info-level nerves logs go to ndjson file only, keeping the interactive TUI clean.",
280
287
  "Fix: Streamed model output now wraps at word boundaries instead of mid-word. A new StreamingWordWrapper buffers partial lines and breaks at spaces when approaching terminal width.",
281
288
  "New: `ouro up` now prints 'ouro updated to <version> (was <previous>)' when npx downloads a newer CLI binary, separate from the agent bundle update message.",
282
- "Fix: Spinner/log interleave verified terminal sink reads pause/resume hooks at call time, not creation time, so the filterSink wrapper in CLI logging does not break spinner coordination."
289
+ "Fix: Spinner/log interleave verified \u2014 terminal sink reads pause/resume hooks at call time, not creation time, so the filterSink wrapper in CLI logging does not break spinner coordination."
283
290
  ]
284
291
  },
285
292
  {
@@ -1352,6 +1352,12 @@ function createDefaultOuroCliDeps(socketPath = socket_client_1.DEFAULT_DAEMON_SO
1352
1352
  promptInput: defaultPromptInput,
1353
1353
  runAdoptionSpecialist: defaultRunAdoptionSpecialist,
1354
1354
  runAuthFlow: auth_flow_1.runRuntimeAuthFlow,
1355
+ /* v8 ignore start -- integration: real API ping @preserve */
1356
+ pingProvider: async (provider, config) => {
1357
+ const { pingProvider: ping } = await Promise.resolve().then(() => __importStar(require("../../heart/provider-ping")));
1358
+ return ping(provider, config);
1359
+ },
1360
+ /* v8 ignore stop */
1355
1361
  registerOuroBundleType: ouro_uti_1.registerOuroBundleUti,
1356
1362
  installOuroCommand: ouro_path_installer_1.installOuroCommand,
1357
1363
  /* v8 ignore start -- self-healing: ensures active symlink matches running runtime version @preserve */
@@ -2064,6 +2070,23 @@ async function runOuroCli(args, deps = createDefaultOuroCliDeps()) {
2064
2070
  // Behavior: ouro auth stores credentials only — does NOT switch provider.
2065
2071
  // Use `ouro auth switch` to change the active provider.
2066
2072
  deps.writeStdout(result.message);
2073
+ // Verify the credentials actually work by pinging the provider
2074
+ /* v8 ignore start -- integration: real API ping after auth @preserve */
2075
+ try {
2076
+ const { secrets } = (0, auth_flow_1.loadAgentSecrets)(command.agent);
2077
+ const config = secrets.providers[provider];
2078
+ const pingResult = await deps.pingProvider(provider, config);
2079
+ if (pingResult.ok) {
2080
+ deps.writeStdout(`verified: ${provider} credentials are working.`);
2081
+ }
2082
+ else {
2083
+ deps.writeStdout(`warning: ${provider} credentials were saved but verification failed. you may need to re-run auth.`);
2084
+ }
2085
+ }
2086
+ catch {
2087
+ // Ping failure is non-blocking — credentials were saved regardless
2088
+ }
2089
+ /* v8 ignore stop */
2067
2090
  return result.message;
2068
2091
  }
2069
2092
  // ── auth verify (local, no daemon socket needed) ──
@@ -3,6 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.buildFailoverContext = buildFailoverContext;
4
4
  exports.handleFailoverReply = handleFailoverReply;
5
5
  const runtime_1 = require("../nerves/runtime");
6
+ const FAILING_PROVIDER_LABELS = {
7
+ "auth-failure": "its credentials need to be refreshed",
8
+ "usage-limit": "has also hit its usage limit",
9
+ "rate-limit": "is also being rate limited",
10
+ "server-error": "is also experiencing an outage",
11
+ "network-error": "could not be reached",
12
+ "unknown": "could not be reached",
13
+ };
6
14
  const CLASSIFICATION_LABELS = {
7
15
  "auth-failure": "authentication failed",
8
16
  "usage-limit": "hit its usage limit",
@@ -29,7 +37,7 @@ function buildFailoverContext(errorMessage, classification, currentProvider, cur
29
37
  }
30
38
  else {
31
39
  // Configured but ping failed (expired token, provider also down, etc.)
32
- failingProviders.push({ provider, reason: result.message });
40
+ failingProviders.push({ provider, classification: result.classification });
33
41
  }
34
42
  }
35
43
  const lines = [`${errorSummary}.`];
@@ -43,8 +51,10 @@ function buildFailoverContext(errorMessage, classification, currentProvider, cur
43
51
  lines.push(`reply ${switchOptions} to continue.`);
44
52
  }
45
53
  if (failingProviders.length > 0) {
46
- for (const { provider, reason } of failingProviders) {
47
- lines.push(`${provider} is configured but its credentials failed (${reason}). run \`ouro auth --agent ${agentName} --provider ${provider}\` to refresh.`);
54
+ for (const { provider, classification } of failingProviders) {
55
+ /* v8 ignore next -- defensive: all classifications have labels @preserve */
56
+ const detail = FAILING_PROVIDER_LABELS[classification] ?? "could not be reached";
57
+ lines.push(`${provider} is configured but ${detail}. run \`ouro auth --agent ${agentName} --provider ${provider}\` to refresh.`);
48
58
  }
49
59
  }
50
60
  if (unconfiguredProviders.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.116",
3
+ "version": "0.1.0-alpha.117",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",