@inetafrica/open-claudia 3.5.20 → 3.5.23

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.
@@ -5,7 +5,7 @@
5
5
  const assert = require("assert");
6
6
  const fs = require("fs");
7
7
  const path = require("path");
8
- const { NORMALIZED_EVENT_TYPES, selectTerminalText } = require("./core/providers/events");
8
+ const { NORMALIZED_EVENT_TYPES, providerErrorFlags, providerFailureCode, selectTerminalText } = require("./core/providers/events");
9
9
  const { createClaudeParserState, normalizeClaudeEvent } = require("./core/providers/claude-events");
10
10
  const { createCodexParserState, normalizeCodexEvent } = require("./core/providers/codex-events");
11
11
 
@@ -118,6 +118,7 @@ assert.deepStrictEqual(claudeAuth, [{
118
118
  message: "Authentication failed",
119
119
  authError: true,
120
120
  usageLimit: false,
121
+ transient: false,
121
122
  refusal: false,
122
123
  }]);
123
124
 
@@ -241,6 +242,7 @@ assert.deepStrictEqual(limitFailure, [{
241
242
  message: limitText,
242
243
  authError: false,
243
244
  usageLimit: true,
245
+ transient: false,
244
246
  refusal: false,
245
247
  limitResetsAt: 1791205800000,
246
248
  limitType: "five_hour",
@@ -306,6 +308,7 @@ assert.deepStrictEqual(codexAuth, [{
306
308
  message: "401 Unauthorized",
307
309
  authError: true,
308
310
  usageLimit: false,
311
+ transient: false,
309
312
  refusal: false,
310
313
  }]);
311
314
 
@@ -346,4 +349,43 @@ assert.deepStrictEqual(normalizeClaudeEvent(samples.claude.session, isolatedB),
346
349
  );
347
350
  }
348
351
 
352
+ // What a failure means, read one way for chat turns and background calls
353
+ // (9 Oct 2026: the 07:00 dream failed on 18 of 24 fleet bots; Claude Code
354
+ // 2.1.280's own wording below).
355
+ {
356
+ const deadRefresh = "Failed to authenticate: OAuth session expired and could not be refreshed";
357
+ assert.deepStrictEqual(
358
+ [providerErrorFlags(deadRefresh).authError, providerErrorFlags(deadRefresh).transient],
359
+ [true, false],
360
+ "a sign-in that died is a sign-in error (it used to read as a plain provider error)",
361
+ );
362
+ for (const text of [
363
+ "OAuth refresh token is no longer valid; run /login to re-authenticate",
364
+ "API Error: 401 OAuth access token is invalid",
365
+ "OAuth access token is invalid",
366
+ "Not logged in · Please run /login",
367
+ "Your authentication token has expired. Please try signing in again.",
368
+ ]) {
369
+ assert.strictEqual(providerErrorFlags(text).authError, true, text);
370
+ assert.strictEqual(providerFailureCode(providerErrorFlags(text), "UTILITY_PROVIDER_ERROR"), "PROVIDER_UNAUTHENTICATED", text);
371
+ }
372
+ for (const text of [
373
+ "Failed to refresh OAuth token: another Claude Code process is refreshing it or exited mid-refresh. This is usually transient; retry in a minute, and if it persists close other Claude Code processes or sign in again",
374
+ "another Claude Code process is refreshing it (or exited mid-refresh)",
375
+ ]) {
376
+ const flags = providerErrorFlags(text);
377
+ assert.strictEqual(flags.transient, true, text);
378
+ assert.strictEqual(flags.authError, false, "the refresh race is not a dead sign-in");
379
+ assert.strictEqual(providerFailureCode(flags), "PROVIDER_TRANSIENT", text);
380
+ }
381
+ const weekly = providerErrorFlags("You've hit your weekly limit · resets Oct 9, 5am (UTC)");
382
+ assert.strictEqual(providerFailureCode(weekly, "UTILITY_PROVIDER_ERROR"), "PROVIDER_USAGE_LIMIT");
383
+ assert.strictEqual(providerFailureCode({ refusal: true, authError: true }), "PROVIDER_REFUSAL", "a refusal leads");
384
+ assert.strictEqual(providerFailureCode({}, "UTILITY_PROVIDER_ERROR"), "UTILITY_PROVIDER_ERROR");
385
+ assert.strictEqual(providerFailureCode({}), "PROVIDER_EVENT_ERROR");
386
+ // Codex's turn.failed carries the same flags.
387
+ const codexExpired = normalizeCodexEvent({ type: "turn.failed", error: { message: "Your authentication token has expired. Please try signing in again." } }, createCodexParserState());
388
+ assert.strictEqual(codexExpired[0].authError, true);
389
+ }
390
+
349
391
  console.log("provider events OK");
@@ -595,7 +595,17 @@ assert.match(pkg.description, /provider-agnostic coding-agent harness/i);
595
595
  // also ensure you clear the images after they all done"): the Browser app in
596
596
  // Kazee Chat (bot apps v1): Take over, Teach me with its pictures deleted when
597
597
  // the work is done, and the bot paused while a person drives. A canary bot first.
598
- assert.strictEqual(pkg.version, "3.5.20", "release version must remain unchanged without explicit approval");
598
+ // 3.5.23 approved by Sumeet 2026-10-09 15:56 EAT ("yeh release and upgrade all
599
+ // the bots, include rahil for the updates going forward"), after 14:18 ("there's
600
+ // something about the cancel that you seem to have broke … one for a qued message
601
+ // a small card with delete queued … get all the messages that are queued at once"),
602
+ // 14:51 ("have it shifted to the new haiku 5.5") and 15:36 ("sonnet should also be
603
+ // just 5.5"): usage limits as one wait-for-reset rule, /stop as a cancel, the
604
+ // queue's ✕ and run-together, Haiku 5.5 and Sonnet 5.5 tiers. Carries 3.5.20.
605
+ // Tagged first as 3.5.21 (cbfd547), whose CI build failed on test-stop-queue's
606
+ // registration before anything published; 3.5.22 (bd95677) failed on two
607
+ // load-sensitive timing checks, now given more time; the release ships as 3.5.23.
608
+ assert.strictEqual(pkg.version, "3.5.23", "release version must remain unchanged without explicit approval");
599
609
  for (const keyword of ["claude", "codex", "coding-agent", "provider-agnostic"]) {
600
610
  assert.ok(pkg.keywords.includes(keyword), `package keyword missing: ${keyword}`);
601
611
  }