@mrrlin-dev/mcp 0.4.37 → 0.4.39

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 +52 -10
  2. package/package.json +2 -2
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.37";
42074
+ var PKG_VERSION = "0.4.39";
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) ---`,
@@ -54947,6 +54965,22 @@ function buildThreadStartParams(msg, config2, desiredModel) {
54947
54965
  " occupies the one shared browser session. Only reach for the browser on a Mrrlin route after a",
54948
54966
  " typed tool call for it has actually failed.",
54949
54967
  "",
54968
+ `Product-surface contract \u2014 never answer "I don't know where that is" about Mrrlin's own UI:`,
54969
+ "- You are talking to an operator inside this product. When they ask where something is, name",
54970
+ " the route and the control by the label actually printed on it, then let them click it.",
54971
+ "- Connecting a GitHub repository lives on `/settings`, under the `GitHub integration` heading.",
54972
+ " That SECTION is always on the page \u2014 it sits below Overview, Scheduler and Intent Judge, so",
54973
+ " an operator who cannot find it has most likely not scrolled that far. What the section shows",
54974
+ " depends on how far along they already are, so do NOT promise a specific card before you know:",
54975
+ ' nothing connected yet \u2192 a card titled "Connect a GitHub repository" with a `Connect GitHub`',
54976
+ " button that installs the GitHub App; App installed but no repo chosen \u2192 a repo picker to bind",
54977
+ " one; repo already bound \u2192 the connected repo and its deploy workflows. Describe the section",
54978
+ " and let them read which of the three they are looking at, or ask them. Binding a repo is",
54979
+ " optional: a project without one still works, it just has no branch/PR/deploy controls on tasks.",
54980
+ "- If a surface is genuinely not in this list, say what you do know and check with a typed tool",
54981
+ ' rather than guessing a route \u2014 a wrong path costs the operator more than an honest "let me',
54982
+ ' check". Never send them to the browser to hunt for a page in their own app.',
54983
+ "",
54950
54984
  "Initiative contract \u2014 do the obvious next step instead of offering it:",
54951
54985
  "- When a next step is cheap, clearly wanted, and finishable in this turn, just do it and",
54952
54986
  ' report the result. Do not end a reply with "if you want, I can also ..." for work you',
@@ -61620,7 +61654,12 @@ var DISPATCH_TIMEOUT_MS2 = 6e4;
61620
61654
  function multiLlmActive(_env = process.env) {
61621
61655
  return true;
61622
61656
  }
61623
- async function resolveActiveRunHead(input, deps) {
61657
+ function applyActivePanel(deps, panel) {
61658
+ if (!panel) return;
61659
+ deps.runHead = panel.runHead;
61660
+ deps.panelComposition = panel.composition;
61661
+ }
61662
+ async function resolveActivePanel(input, deps) {
61624
61663
  if (!multiLlmActive(input.env ?? process.env)) return null;
61625
61664
  try {
61626
61665
  const heads = input.heads ?? [...resolveHeads(input.domain, input.impact), ...input.extraHeads ?? []];
@@ -61652,7 +61691,7 @@ async function resolveActiveRunHead(input, deps) {
61652
61691
  deps
61653
61692
  );
61654
61693
  if (!built.ok) return null;
61655
- return built.runner.runHead;
61694
+ return { runHead: built.runner.runHead, composition: built.runner.composition };
61656
61695
  } catch {
61657
61696
  return null;
61658
61697
  }
@@ -64431,14 +64470,14 @@ function createMrrlinTools(options) {
64431
64470
  extraHeads
64432
64471
  });
64433
64472
  const persistedProvider = await getAgentProviderForPanel(c);
64434
- let activeCodeRunHead = null;
64473
+ let activeCodePanel = null;
64435
64474
  if (persistedProvider != null) {
64436
- activeCodeRunHead = await resolveActiveRunHead({
64475
+ activeCodePanel = await resolveActivePanel({
64437
64476
  heads: ["code-reviewer", ...extraHeads ?? []],
64438
64477
  persistedProvider
64439
64478
  });
64440
64479
  }
64441
- if (activeCodeRunHead) deps.runHead = activeCodeRunHead;
64480
+ applyActivePanel(deps, activeCodePanel);
64442
64481
  const codeGateResult = await runCodeGate({ projectSlug, baseRef }, deps);
64443
64482
  if (process.env[SHADOW_ENV_FLAG] && persistedProvider != null) {
64444
64483
  try {
@@ -64958,6 +64997,7 @@ function runSetCredential(args) {
64958
64997
  // src/install-service.ts
64959
64998
  var import_node_os13 = __toESM(require("node:os"), 1);
64960
64999
  var import_node_path28 = __toESM(require("node:path"), 1);
65000
+ var SYSTEM_PATH_DIRS = ["/usr/bin", "/bin", "/usr/sbin", "/sbin"];
64961
65001
  function installService(deps) {
64962
65002
  if (!deps.hasSecret()) {
64963
65003
  deps.log("No agent credential found. Issue one in Settings, then run: mrrlin-mcp set-credential '<secret>'.");
@@ -64980,7 +65020,9 @@ function installService(deps) {
64980
65020
  }
64981
65021
  const claudeBin = deps.which("claude");
64982
65022
  const resolvedBins = [...bins, claudeBin].filter((b) => b !== null);
64983
- const pathEnv = Array.from(new Set(resolvedBins.map((b) => import_node_path28.default.dirname(b)))).join(":");
65023
+ const pathEnv = Array.from(
65024
+ /* @__PURE__ */ new Set([...resolvedBins.map((b) => import_node_path28.default.dirname(b)), ...SYSTEM_PATH_DIRS])
65025
+ ).join(":");
64984
65026
  const apiBaseUrl = deps.env.MRRLIN_API_BASE_URL?.trim() || void 0;
64985
65027
  const staging = deps.env.MRRLIN_STAGING === "1" || !apiBaseUrl && bridgeUrlImpliesStaging(deps.env.MRRLIN_BRIDGE_URL);
64986
65028
  const text = renderEcosystemConfig({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrrlin-dev/mcp",
3
- "version": "0.4.37",
3
+ "version": "0.4.39",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mrrlin-mcp": "dist/bin.cjs"
@@ -22,8 +22,8 @@
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
25
  "@mrrlin/client": "0.0.0",
26
+ "@mrrlin/director-e2e": "0.0.0",
27
27
  "@mrrlin/schemas": "0.0.0",
28
28
  "@mrrlin/tsconfig": "0.0.0",
29
29
  "@mrrlin/wiki": "0.0.0"