@mrrlin-dev/mcp 0.4.45 → 0.4.46

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 +30 -4
  2. package/package.json +4 -4
package/dist/bin.cjs CHANGED
@@ -40132,8 +40132,21 @@ var ClaudeAgentHandle = class {
40132
40132
  };
40133
40133
 
40134
40134
  // ../../packages/agent-client/dist/registry.js
40135
+ var KNOWN_PROVIDERS = { codex: true, claude: true };
40136
+ var KNOWN_PROVIDER_IDS = Object.keys(KNOWN_PROVIDERS);
40137
+ function readProviderFromEnv(env) {
40138
+ const raw = env.MRRLIN_AGENT_PROVIDER;
40139
+ if (raw === void 0)
40140
+ return null;
40141
+ const normalized = raw.trim().toLowerCase();
40142
+ if (!normalized)
40143
+ return null;
40144
+ if (Object.hasOwn(KNOWN_PROVIDERS, normalized))
40145
+ return normalized;
40146
+ throw new Error(`MRRLIN_AGENT_PROVIDER is set to ${JSON.stringify(raw.slice(0, 64))}, which is not an agent provider this build can run. Valid values: ${KNOWN_PROVIDER_IDS.join(", ")}. Unset the variable to use the operator's persisted choice.`);
40147
+ }
40135
40148
  function resolveProvider(env, persisted) {
40136
- const id = env.MRRLIN_AGENT_PROVIDER ?? persisted ?? "codex";
40149
+ const id = readProviderFromEnv(env) ?? persisted ?? "codex";
40137
40150
  if (id === "codex") {
40138
40151
  return new CodexProviderAdapter();
40139
40152
  }
@@ -42295,7 +42308,7 @@ Do NOT derail the current task - if the operator has an in-flight question, answ
42295
42308
  }
42296
42309
 
42297
42310
  // src/_generated/version.ts
42298
- var PKG_VERSION = "0.4.45";
42311
+ var PKG_VERSION = "0.4.46";
42299
42312
 
42300
42313
  // src/api-base-url-migrate.ts
42301
42314
  var import_node_fs3 = __toESM(require("node:fs"), 1);
@@ -62045,11 +62058,24 @@ async function runShadowPanel(input, deps) {
62045
62058
  const res = await built.runner.runHead(persona, input.artifact, "");
62046
62059
  if (res.ok) {
62047
62060
  const parsed = parseVerdict(res.text);
62048
- return { persona, agent, verdict: parsed.verdict, ok: true };
62061
+ return {
62062
+ persona,
62063
+ agent,
62064
+ verdict: parsed.verdict,
62065
+ ok: true,
62066
+ // The optional chain is required by the TYPE, not left over from not knowing the
62067
+ // invariant: `MultiHeadRunResult.usage` is declared `usage?: ExecTokenUsage | null`
62068
+ // (optional so the shape stays assignable to the gate's older `RunResult`), even though
62069
+ // `parseDispatch` always sets it. `?? null` therefore covers both "no usage key" and
62070
+ // "usage was null" — and covers neither zero: a reported 0 is a measurement and
62071
+ // survives, which is the distinction this whole field exists to preserve.
62072
+ inputTokens: res.usage?.inputTokens ?? null,
62073
+ outputTokens: res.usage?.outputTokens ?? null
62074
+ };
62049
62075
  }
62050
62076
  } catch {
62051
62077
  }
62052
- return { persona, agent, verdict: "ERROR", ok: false };
62078
+ return { persona, agent, verdict: "ERROR", ok: false, inputTokens: null, outputTokens: null };
62053
62079
  })
62054
62080
  );
62055
62081
  for (const h of perHead) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrrlin-dev/mcp",
3
- "version": "0.4.45",
3
+ "version": "0.4.46",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mrrlin-mcp": "dist/bin.cjs"
@@ -22,11 +22,11 @@
22
22
  "esbuild": "^0.24.0",
23
23
  "tsx": "^4.22.3",
24
24
  "@mrrlin/agent-client": "0.0.0",
25
+ "@mrrlin/director-e2e": "0.0.0",
26
+ "@mrrlin/schemas": "0.0.0",
25
27
  "@mrrlin/tsconfig": "0.0.0",
26
28
  "@mrrlin/wiki": "0.0.0",
27
- "@mrrlin/client": "0.0.0",
28
- "@mrrlin/director-e2e": "0.0.0",
29
- "@mrrlin/schemas": "0.0.0"
29
+ "@mrrlin/client": "0.0.0"
30
30
  },
31
31
  "dependencies": {
32
32
  "@iarna/toml": "^2.2.5",