@mrrlin-dev/mcp 0.4.110 → 0.4.112

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.
Files changed (2) hide show
  1. package/dist/bin.cjs +25 -6
  2. package/package.json +1 -1
package/dist/bin.cjs CHANGED
@@ -45285,10 +45285,11 @@ function extractCodexExecUsage(stdout) {
45285
45285
  return last;
45286
45286
  }
45287
45287
  function extractClaudeExecUsage(parsed) {
45288
- if (!Array.isArray(parsed))
45288
+ const events = Array.isArray(parsed) ? parsed : typeof parsed === "object" && parsed !== null ? [parsed] : null;
45289
+ if (events === null)
45289
45290
  return null;
45290
- for (let i = parsed.length - 1; i >= 0; i -= 1) {
45291
- const element = parsed[i];
45291
+ for (let i = events.length - 1; i >= 0; i -= 1) {
45292
+ const element = events[i];
45292
45293
  if (typeof element !== "object" || element === null)
45293
45294
  continue;
45294
45295
  const record2 = element;
@@ -45525,8 +45526,11 @@ function extractOneShotResult(stdout) {
45525
45526
  } catch {
45526
45527
  return { ok: false, error: "claude exec produced no parseable JSON output" };
45527
45528
  }
45529
+ if (typeof parsed === "object" && parsed !== null && !Array.isArray(parsed)) {
45530
+ parsed = [parsed];
45531
+ }
45528
45532
  if (!Array.isArray(parsed)) {
45529
- return { ok: false, error: "claude exec output was not a JSON array" };
45533
+ return { ok: false, error: "claude exec output was neither a JSON array nor a result object" };
45530
45534
  }
45531
45535
  let resultEvent = null;
45532
45536
  for (let i = parsed.length - 1; i >= 0; i -= 1) {
@@ -61234,6 +61238,9 @@ function errorStatus(err) {
61234
61238
  if (typeof signal === "string") return `signal ${signal}`;
61235
61239
  return null;
61236
61240
  }
61241
+ function isModelRejectionSmokeFailure(raw) {
61242
+ return /\bmodel_not_found\b|\bmodel is not supported\b/i.test(raw);
61243
+ }
61237
61244
  function isAuthLikeSmokeFailure(raw) {
61238
61245
  return /\baccess token\b|\bauth(?:entication)?\b|\binvalid[_ -]refresh[_ -]token\b|\brefresh token\b|\bsign in again\b|\blog out and sign in\b|\bnot logged in\b|\bunauthori[sz]ed\b/i.test(raw);
61239
61246
  }
@@ -61279,6 +61286,16 @@ ${errorField(err, "stderr")}`;
61279
61286
  const timedOut = /timed out|ETIMEDOUT/i.test(raw) || errorStatus(err) === "signal SIGTERM";
61280
61287
  const authLikely = isAuthLikeSmokeFailure(raw);
61281
61288
  const statusText = errorStatus(err);
61289
+ if (!authLikely && !timedOut && isModelRejectionSmokeFailure(raw)) {
61290
+ return {
61291
+ ok: true,
61292
+ status: "ok",
61293
+ command,
61294
+ timeoutMs,
61295
+ authLikely: false,
61296
+ detail: "Codex CLI authenticated; the backend only rejected the smoke model, which does not affect the bridge update."
61297
+ };
61298
+ }
61282
61299
  return {
61283
61300
  ok: false,
61284
61301
  status: timedOut ? "timed_out" : "failed",
@@ -61335,11 +61352,13 @@ function inspectCodexAuthForBridgeUpdate(opts = {}) {
61335
61352
  ["access_token", parsed.tokens?.access_token],
61336
61353
  ["id_token", parsed.tokens?.id_token]
61337
61354
  ];
61338
- const expiries = tokenEntries.flatMap(([kind, token]) => {
61355
+ const allExpiries = tokenEntries.flatMap(([kind, token]) => {
61339
61356
  if (typeof token !== "string" || token.trim() === "") return [];
61340
61357
  const expMs = decodeJwtExpMs(token);
61341
61358
  return expMs === null ? [] : [{ kind, expMs }];
61342
61359
  });
61360
+ const accessExpiries = allExpiries.filter((entry) => entry.kind === "access_token");
61361
+ const expiries = accessExpiries.length > 0 ? accessExpiries : allExpiries;
61343
61362
  const earliest = expiries.reduce(
61344
61363
  (current2, entry) => current2 === null || entry.expMs < current2.expMs ? entry : current2,
61345
61364
  null
@@ -61742,7 +61761,7 @@ Do NOT derail the current task - if the operator has an in-flight question, answ
61742
61761
  }
61743
61762
 
61744
61763
  // src/_generated/version.ts
61745
- var PKG_VERSION = "0.4.110";
61764
+ var PKG_VERSION = "0.4.112";
61746
61765
 
61747
61766
  // src/receipt-signing.ts
61748
61767
  var import_node_crypto13 = __toESM(require("node:crypto"), 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrrlin-dev/mcp",
3
- "version": "0.4.110",
3
+ "version": "0.4.112",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mrrlin-mcp": "dist/bin.cjs"