@mrrlin-dev/mcp 0.4.135 → 0.4.136

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 +28 -5
  2. package/package.json +1 -1
package/dist/bin.cjs CHANGED
@@ -58554,7 +58554,7 @@ function sha256(text) {
58554
58554
  return (0, import_node_crypto11.createHash)("sha256").update(text).digest("hex");
58555
58555
  }
58556
58556
  function commitUncommittedWork(input) {
58557
- if (git(input.worktreePath, ["status", "--porcelain"]).length === 0) return false;
58557
+ if (git(input.worktreePath, ["status", "--porcelain", "--untracked-files=normal"]).length === 0) return false;
58558
58558
  git(input.worktreePath, ["add", "-A"]);
58559
58559
  git(input.worktreePath, [
58560
58560
  "-c",
@@ -58663,9 +58663,12 @@ function integrateDefaultBranch(input) {
58663
58663
  const merge2 = gitTry(input.worktreePath, [
58664
58664
  "-c",
58665
58665
  `core.hooksPath=${input.hooksDir}`,
58666
+ "-c",
58667
+ "rerere.enabled=false",
58666
58668
  ...MRRLIN_IDENTITY,
58667
58669
  "merge",
58668
58670
  "--no-edit",
58671
+ "--ff",
58669
58672
  "--no-verify",
58670
58673
  "-m",
58671
58674
  integrationCommitMessage(input.defaultBranch, input.runId),
@@ -59189,6 +59192,18 @@ function gitRead(cwd, args) {
59189
59192
  return null;
59190
59193
  }
59191
59194
  }
59195
+ function isBridgeRunWorktree(worktreePath, checkout, worktreeRoot) {
59196
+ const real = (target) => {
59197
+ const resolved = (import_node_fs13.realpathSync.native ?? import_node_fs13.realpathSync)(target);
59198
+ return process.platform === "win32" ? resolved.toLowerCase() : resolved;
59199
+ };
59200
+ try {
59201
+ const own = real(worktreePath);
59202
+ return own !== real(checkout) && own.startsWith(`${real(worktreeRoot)}${import_node_path20.default.sep}`);
59203
+ } catch {
59204
+ return false;
59205
+ }
59206
+ }
59192
59207
  var short = (sha) => (sha ?? "").slice(0, 7);
59193
59208
  function localLandingNote(outcome, ctx) {
59194
59209
  const { taskId, title, defaultBranch: d, detail } = ctx;
@@ -59417,17 +59432,25 @@ async function applyLocalRunForTool(deps, input) {
59417
59432
  slug: projectSlug,
59418
59433
  runId
59419
59434
  });
59435
+ if (!isBridgeRunWorktree(worktreePath, checkout, deps.worktreeRoot)) {
59436
+ throw new Error(`run_worktree_invalid: ${worktreePath} is not a run worktree under ${deps.worktreeRoot}`);
59437
+ }
59420
59438
  const worktreeHead = gitRead(worktreePath, ["rev-parse", "HEAD"]);
59421
- if (worktreeHead !== delivered.headSha || gitRead(worktreePath, ["status", "--porcelain"]) !== "") {
59439
+ if (worktreeHead !== delivered.headSha) {
59422
59440
  return {
59423
59441
  outcome: "run_branch_changed",
59424
59442
  previousSha: null,
59425
59443
  headSha: delivered.headSha,
59426
- detail: `the run worktree is at ${String(worktreeHead).slice(0, 12)} or has uncommitted changes`
59444
+ detail: `the run worktree is at ${String(worktreeHead).slice(0, 12)}, not the signed ${delivered.headSha.slice(0, 12)}`
59427
59445
  };
59428
59446
  }
59429
59447
  if (!runBranchStillSigned()) return branchChanged();
59430
- (0, import_node_child_process17.execFileSync)("git", ["-C", worktreePath, "-c", `core.hooksPath=${hooksDir}`, "checkout", "-q", "--detach", delivered.headSha], {
59448
+ (0, import_node_child_process17.execFileSync)("git", ["-C", worktreePath, "clean", "-q", "-f", "-d"], {
59449
+ stdio: ["ignore", "pipe", "pipe"],
59450
+ timeout: 3e4,
59451
+ env: gitEnv()
59452
+ });
59453
+ (0, import_node_child_process17.execFileSync)("git", ["-C", worktreePath, "-c", `core.hooksPath=${hooksDir}`, "checkout", "-q", "-f", "--detach", delivered.headSha], {
59431
59454
  stdio: ["ignore", "pipe", "pipe"],
59432
59455
  timeout: 3e4,
59433
59456
  env: gitEnv()
@@ -63643,7 +63666,7 @@ Do NOT derail the current task - if the operator has an in-flight question, answ
63643
63666
  }
63644
63667
 
63645
63668
  // src/_generated/version.ts
63646
- var PKG_VERSION = "0.4.135";
63669
+ var PKG_VERSION = "0.4.136";
63647
63670
 
63648
63671
  // src/bridge-allowed-origins.ts
63649
63672
  var DEFAULT_DIRECTOR_BRIDGE_ALLOWED_ORIGINS = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrrlin-dev/mcp",
3
- "version": "0.4.135",
3
+ "version": "0.4.136",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mrrlin-mcp": "dist/bin.cjs"