@mrrlin-dev/mcp 0.4.38 → 0.4.40

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 +33 -14
  2. package/package.json +3 -3
package/dist/bin.cjs CHANGED
@@ -42071,7 +42071,7 @@ Do NOT derail the current task - if the operator has an in-flight question, answ
42071
42071
  }
42072
42072
 
42073
42073
  // src/_generated/version.ts
42074
- var PKG_VERSION = "0.4.38";
42074
+ var PKG_VERSION = "0.4.40";
42075
42075
 
42076
42076
  // src/api-base-url-migrate.ts
42077
42077
  var import_node_fs3 = __toESM(require("node:fs"), 1);
@@ -43331,6 +43331,20 @@ ${dismissedFwd.slice(-20).join("\n")}` : "";
43331
43331
  };
43332
43332
  }
43333
43333
  }
43334
+ if (calls + 1 > input.maxHeadCalls) {
43335
+ return {
43336
+ outcome: "CONSENSUS_BLOCKED",
43337
+ rounds: round,
43338
+ finalArtifact: artifact,
43339
+ history,
43340
+ unresolved: history[history.length - 1]?.accepted ?? [],
43341
+ arbiterInfo: latestArbiterInfo,
43342
+ panelComposition: composition,
43343
+ sufficiencyVerdict: worstSufficiency,
43344
+ ...decision ? { escalation: decision } : {}
43345
+ };
43346
+ }
43347
+ calls++;
43334
43348
  artifact = await input.revise(artifact, adj.accepted);
43335
43349
  }
43336
43350
  return {
@@ -43425,6 +43439,10 @@ var CODE_HEADS_BY_IMPACT = {
43425
43439
  medium: ["plan-reviewer", "security-analyst", "scope-analyst"],
43426
43440
  low: ["plan-reviewer", "scope-analyst"]
43427
43441
  };
43442
+ var MAX_DOMAIN_HEADS = Math.max(
43443
+ ...Object.values(HEADS_BY_DOMAIN).map((h) => h.length),
43444
+ ...Object.values(CODE_HEADS_BY_IMPACT).map((h) => h.length)
43445
+ );
43428
43446
  function normalizeDomain(value) {
43429
43447
  if (typeof value !== "string") return DEFAULT_DOMAIN;
43430
43448
  const v = value.trim().toLowerCase();
@@ -44093,7 +44111,7 @@ function reviserIdentityInstructions(taskId, title) {
44093
44111
  function buildSpecGateDeps(args) {
44094
44112
  const { client, projectSlug, specPageId, cwd, codexExecutable, extraHeadCount = 0, seat } = args;
44095
44113
  const rounds = Number(process.env["MRRLIN_CONSENSUS_ROUNDS"] ?? 5);
44096
- const maxHeadCalls = 2 * rounds * (4 + extraHeadCount + 1);
44114
+ const maxHeadCalls = 2 * rounds * (MAX_DOMAIN_HEADS + extraHeadCount + 2);
44097
44115
  const timeoutMs = Number(process.env["MRRLIN_CONSENSUS_HEAD_TIMEOUT_MS"] ?? 15e4);
44098
44116
  let intentPromise = null;
44099
44117
  function loadIntent() {
@@ -44288,7 +44306,7 @@ function buildCodeGateDeps(args) {
44288
44306
  const { client, projectSlug, baseRef, cwd, codexExecutable, extraHeads, seat } = args;
44289
44307
  const rounds = Number(process.env["MRRLIN_CONSENSUS_ROUNDS"] ?? 5);
44290
44308
  const heads = ["code-reviewer", ...extraHeads ?? []];
44291
- const maxHeadCalls = 2 * rounds * (heads.length + 1);
44309
+ const maxHeadCalls = 2 * rounds * (heads.length + 2);
44292
44310
  const headTimeoutMs = Number(process.env["MRRLIN_CONSENSUS_HEAD_TIMEOUT_MS"] ?? 15e4);
44293
44311
  const reviserTimeoutMs = Number(process.env["MRRLIN_CODEGATE_REVISER_TIMEOUT_MS"] ?? 6e5);
44294
44312
  const gitArgs = { cwd, baseRef, run: defaultRunCmd };
@@ -44391,7 +44409,7 @@ async function buildDeliverableGateDeps(args) {
44391
44409
  }
44392
44410
  }
44393
44411
  const heads = resolveHeads(domain2, impact);
44394
- const maxHeadCalls = 2 * rounds * (heads.length + 1);
44412
+ const maxHeadCalls = 2 * rounds * (heads.length + 2);
44395
44413
  const criteriaBlock = renderCriteriaBlock(criteria);
44396
44414
  const attemptOutcomeBlock = attemptOutcome ? [
44397
44415
  `--- DECLARED ATTEMPT OUTCOME (review consistency; do NOT rewrite or choose it) ---`,
@@ -48943,10 +48961,6 @@ var BROWSER_OUTWARD_TOOL_NAMES = /* @__PURE__ */ new Set([
48943
48961
  "browser_select_option"
48944
48962
  ]);
48945
48963
  var IN_PRODUCT_WRITE_TOOL_NAMES = /* @__PURE__ */ new Set(["create_task", "update_task", "create_wiki_page", "update_wiki_page", "create_inbox_item"]);
48946
- function resolveTurnRecordingObligationEnabled(env = process.env) {
48947
- const raw = (env.MRRLIN_TURN_RECORDING_OBLIGATION ?? "").trim().toLowerCase();
48948
- return !(raw === "0" || raw === "false");
48949
- }
48950
48964
  function buildBrowserAttemptReceipt(toolName) {
48951
48965
  return {
48952
48966
  kind: "attempt",
@@ -48997,7 +49011,7 @@ function createBridgeLogger(stateDir, env = process.env) {
48997
49011
  if (!oldest.done) contextSlugBySession.delete(oldest.value);
48998
49012
  }
48999
49013
  };
49000
- const turnRecordingObligationEnabled = resolveTurnRecordingObligationEnabled(env);
49014
+ const turnRecordingObligationEnabled = true;
49001
49015
  const obligationBySession = /* @__PURE__ */ new Map();
49002
49016
  const getObligationState = (sessionId) => {
49003
49017
  let state = obligationBySession.get(sessionId);
@@ -61636,7 +61650,12 @@ var DISPATCH_TIMEOUT_MS2 = 6e4;
61636
61650
  function multiLlmActive(_env = process.env) {
61637
61651
  return true;
61638
61652
  }
61639
- async function resolveActiveRunHead(input, deps) {
61653
+ function applyActivePanel(deps, panel) {
61654
+ if (!panel) return;
61655
+ deps.runHead = panel.runHead;
61656
+ deps.panelComposition = panel.composition;
61657
+ }
61658
+ async function resolveActivePanel(input, deps) {
61640
61659
  if (!multiLlmActive(input.env ?? process.env)) return null;
61641
61660
  try {
61642
61661
  const heads = input.heads ?? [...resolveHeads(input.domain, input.impact), ...input.extraHeads ?? []];
@@ -61668,7 +61687,7 @@ async function resolveActiveRunHead(input, deps) {
61668
61687
  deps
61669
61688
  );
61670
61689
  if (!built.ok) return null;
61671
- return built.runner.runHead;
61690
+ return { runHead: built.runner.runHead, composition: built.runner.composition };
61672
61691
  } catch {
61673
61692
  return null;
61674
61693
  }
@@ -64447,14 +64466,14 @@ function createMrrlinTools(options) {
64447
64466
  extraHeads
64448
64467
  });
64449
64468
  const persistedProvider = await getAgentProviderForPanel(c);
64450
- let activeCodeRunHead = null;
64469
+ let activeCodePanel = null;
64451
64470
  if (persistedProvider != null) {
64452
- activeCodeRunHead = await resolveActiveRunHead({
64471
+ activeCodePanel = await resolveActivePanel({
64453
64472
  heads: ["code-reviewer", ...extraHeads ?? []],
64454
64473
  persistedProvider
64455
64474
  });
64456
64475
  }
64457
- if (activeCodeRunHead) deps.runHead = activeCodeRunHead;
64476
+ applyActivePanel(deps, activeCodePanel);
64458
64477
  const codeGateResult = await runCodeGate({ projectSlug, baseRef }, deps);
64459
64478
  if (process.env[SHADOW_ENV_FLAG] && persistedProvider != null) {
64460
64479
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrrlin-dev/mcp",
3
- "version": "0.4.38",
3
+ "version": "0.4.40",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mrrlin-mcp": "dist/bin.cjs"
@@ -25,8 +25,8 @@
25
25
  "@mrrlin/agent-client": "0.0.0",
26
26
  "@mrrlin/director-e2e": "0.0.0",
27
27
  "@mrrlin/schemas": "0.0.0",
28
- "@mrrlin/wiki": "0.0.0",
29
- "@mrrlin/tsconfig": "0.0.0"
28
+ "@mrrlin/tsconfig": "0.0.0",
29
+ "@mrrlin/wiki": "0.0.0"
30
30
  },
31
31
  "dependencies": {
32
32
  "@iarna/toml": "^2.2.5",