@mrrlin-dev/mcp 0.4.49 → 0.4.51

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 +72 -4
  2. package/package.json +2 -2
package/dist/bin.cjs CHANGED
@@ -21963,6 +21963,70 @@ var CodexJsonRpcClient = class {
21963
21963
 
21964
21964
  // ../../packages/agent-client/dist/providers/codex/server-manager.js
21965
21965
  var import_node_child_process3 = require("node:child_process");
21966
+
21967
+ // ../../packages/agent-client/dist/providers/codex/stderr-diagnostics.js
21968
+ var AUTH_DIAGNOSTIC = [
21969
+ /could not be refreshed/i,
21970
+ /refresh token/i,
21971
+ /\brefreshing token\b/i,
21972
+ /reloading auth/i,
21973
+ /guarded reload/i,
21974
+ /refresh lock/i,
21975
+ /auth (?:lock|storage) is (?:poisoned|unavailable)/i,
21976
+ /no more recovery steps/i,
21977
+ /oauth token exchange/i,
21978
+ /invalid_grant/i,
21979
+ /\bnot logged in\b/i,
21980
+ /\b401\b(?!\d)/
21981
+ ];
21982
+ var MAX_LINE_CHARS = 500;
21983
+ var MAX_BUFFERED_CHARS = MAX_LINE_CHARS * 4;
21984
+ var SECRET_SHAPES = [
21985
+ // A JWT: three base64url segments. codex's id_token and access_token are both this shape.
21986
+ [/\b[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g, "<jwt>"],
21987
+ // Any long opaque run — codex's refresh_token is ~211 chars of this. 40 is comfortably above the
21988
+ // longest ordinary word, an ISO timestamp, or a UUID (36, and a UUID is not a secret).
21989
+ [/\b[A-Za-z0-9_-]{40,}\b/g, "<redacted>"]
21990
+ ];
21991
+ function scrubSecrets(line) {
21992
+ let out = line;
21993
+ for (const [pattern, replacement] of SECRET_SHAPES)
21994
+ out = out.replace(pattern, replacement);
21995
+ return out;
21996
+ }
21997
+ var MAX_DIAGNOSTIC_LINES = 200;
21998
+ function isAuthDiagnostic(line) {
21999
+ const flat = line.trim();
22000
+ if (!flat)
22001
+ return false;
22002
+ return AUTH_DIAGNOSTIC.some((pattern) => pattern.test(flat));
22003
+ }
22004
+ function createStderrDiagnosticFilter(emit, maxLines = MAX_DIAGNOSTIC_LINES) {
22005
+ let buffered = "";
22006
+ let emitted = 0;
22007
+ return (chunk) => {
22008
+ buffered += chunk.toString();
22009
+ const lines2 = buffered.split(/\r?\n/);
22010
+ buffered = lines2.pop() ?? "";
22011
+ if (buffered.length > MAX_BUFFERED_CHARS)
22012
+ buffered = buffered.slice(0, MAX_LINE_CHARS);
22013
+ for (const line of lines2) {
22014
+ if (emitted >= maxLines)
22015
+ return;
22016
+ if (!isAuthDiagnostic(line))
22017
+ continue;
22018
+ emitted += 1;
22019
+ const cleaned = scrubSecrets(line.trim()).slice(0, MAX_LINE_CHARS);
22020
+ if (emitted === maxLines) {
22021
+ emit(`${cleaned} [codex auth diagnostics capped at ${maxLines} lines]`);
22022
+ return;
22023
+ }
22024
+ emit(cleaned);
22025
+ }
22026
+ };
22027
+ }
22028
+
22029
+ // ../../packages/agent-client/dist/providers/codex/server-manager.js
21966
22030
  var CodexServerManager = class {
21967
22031
  client = null;
21968
22032
  process = null;
@@ -22021,8 +22085,12 @@ var CodexServerManager = class {
22021
22085
  throw new Error("Failed to spawn codex app-server: stdio not available");
22022
22086
  }
22023
22087
  const rpcClient = new CodexJsonRpcClient(child.stdin, child.stdout);
22024
- child.stderr?.on("data", () => {
22088
+ const emitDiagnostic = config2?.onStderrDiagnostic ?? ((line) => {
22089
+ process.stderr.write(`[codex-stderr] ${line}
22090
+ `);
22025
22091
  });
22092
+ const consumeStderr = createStderrDiagnosticFilter(emitDiagnostic);
22093
+ child.stderr?.on("data", consumeStderr);
22026
22094
  child.on("exit", () => {
22027
22095
  rpcClient.close();
22028
22096
  this.process = null;
@@ -42369,7 +42437,7 @@ Do NOT derail the current task - if the operator has an in-flight question, answ
42369
42437
  }
42370
42438
 
42371
42439
  // src/_generated/version.ts
42372
- var PKG_VERSION = "0.4.49";
42440
+ var PKG_VERSION = "0.4.51";
42373
42441
 
42374
42442
  // src/api-base-url-migrate.ts
42375
42443
  var import_node_fs4 = __toESM(require("node:fs"), 1);
@@ -55113,8 +55181,8 @@ var DEFAULT_DIRECTOR_BRIDGE_ALLOWED_ORIGINS = [
55113
55181
  // bridge from the owned domain, which is stable across future Vercel project/team moves.
55114
55182
  // See docs/reference/deployments.md.
55115
55183
  "https://staging.mrrlin.com",
55116
- // Production web (unchanged).
55117
- "https://mrrlin-web.vercel.app"
55184
+ // Production web.
55185
+ "https://app.mrrlin.com"
55118
55186
  ];
55119
55187
  var COMPACT_REQUEST_HISTORY_MAX_ITEMS = 500;
55120
55188
  function isValidChatHistoryMessage(value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrrlin-dev/mcp",
3
- "version": "0.4.49",
3
+ "version": "0.4.51",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mrrlin-mcp": "dist/bin.cjs"
@@ -21,9 +21,9 @@
21
21
  "@types/ws": "^8.18.1",
22
22
  "esbuild": "^0.24.0",
23
23
  "tsx": "^4.22.3",
24
+ "@mrrlin/client": "0.0.0",
24
25
  "@mrrlin/agent-client": "0.0.0",
25
26
  "@mrrlin/director-e2e": "0.0.0",
26
- "@mrrlin/client": "0.0.0",
27
27
  "@mrrlin/schemas": "0.0.0",
28
28
  "@mrrlin/tsconfig": "0.0.0",
29
29
  "@mrrlin/wiki": "0.0.0"