@mrrlin-dev/mcp 0.4.230 → 0.4.231

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 +25 -1
  2. package/package.json +1 -1
package/dist/bin.cjs CHANGED
@@ -106448,7 +106448,7 @@ Do NOT derail the current task - if the operator has an in-flight question, answ
106448
106448
  }
106449
106449
 
106450
106450
  // src/_generated/version.ts
106451
- var PKG_VERSION = "0.4.230";
106451
+ var PKG_VERSION = "0.4.231";
106452
106452
 
106453
106453
  // src/bridge-allowed-origins.ts
106454
106454
  var DEFAULT_DIRECTOR_BRIDGE_ALLOWED_ORIGINS = [
@@ -112254,6 +112254,10 @@ async function driveTurn(deps, codex, projectSlug, runId, leaseId, threadId, inp
112254
112254
  async function lockColdWorkWorktreeWithGit(worktreePath, signal) {
112255
112255
  await gitOutput(worktreePath, ["worktree", "lock", "--reason", "F74 cold work recovery", worktreePath], signal);
112256
112256
  }
112257
+ async function unlockColdWorkWorktreeWithGit(worktreePath, signal) {
112258
+ await gitOutput(worktreePath, ["worktree", "unlock", worktreePath], signal);
112259
+ }
112260
+ var COLD_WORK_RECONCILED_STATUSES = /* @__PURE__ */ new Set(["done", "failed", "cancelled", "pull_request", "dev_deploy", "prod_deploy", "handoff_queued"]);
112257
112261
  function defaultDrainSupervisor() {
112258
112262
  const endpoint = readDrainServiceEndpoint();
112259
112263
  if (!endpoint) return null;
@@ -113067,6 +113071,23 @@ ${renderTaskStateSection(taskState)}`;
113067
113071
  console.warn(JSON.stringify({ event: "executor_cold_work_recovery_pending", projectSlug, runId }));
113068
113072
  }
113069
113073
  };
113074
+ const releaseReconciledColdWorktree = async () => {
113075
+ if (!coldWorkReserved || !worktreePath) return;
113076
+ const run5 = await deps.client.getExecutionRun(projectSlug, runId).catch(() => null);
113077
+ if (!run5 || run5.coldWorkReconciliationId || !COLD_WORK_RECONCILED_STATUSES.has(run5.status)) return;
113078
+ const worktreeRoot = deps.worktreeRoot ?? "/tmp/mrrlin-worktrees";
113079
+ const supervisionId = deps.attemptSupervision?.supervisionId;
113080
+ if (supervisionId && listWorktreePins(worktreeRoot).some((pin) => pin.supervisionId === supervisionId)) {
113081
+ const check2 = verifyWorktreePin(worktreeRoot, supervisionId);
113082
+ if (!check2.ok) {
113083
+ console.warn(JSON.stringify({ event: "cold_work_worktree_kept", projectSlug, runId, reason: check2.reason }));
113084
+ return;
113085
+ }
113086
+ removeWorktreePin(worktreeRoot, check2.pin);
113087
+ }
113088
+ await (deps.unlockColdWorkWorktree ?? unlockColdWorkWorktreeWithGit)(worktreePath, AbortSignal.timeout(3e4)).catch(() => {
113089
+ });
113090
+ };
113070
113091
  let backgroundThreadId;
113071
113092
  const backgroundTransitionAllowed = async (phase) => {
113072
113093
  if (!f67BackgroundGateEnabled || !useExecutor || !coldWorkReserved) return true;
@@ -114111,6 +114132,7 @@ ${coldClosureInstruction}` : workInstruction;
114111
114132
  contentHash: `ch-${runId}`
114112
114133
  });
114113
114134
  }
114135
+ await releaseReconciledColdWorktree();
114114
114136
  if (useExecutor && worktreePath && checkout) {
114115
114137
  await removeWtFn({
114116
114138
  checkout: checkout.path,
@@ -114169,6 +114191,8 @@ ${coldClosureInstruction}` : workInstruction;
114169
114191
  leaseSignal?.removeEventListener("abort", disposeRunAgent);
114170
114192
  if (!deps.activeLease && !skipRunWrites) await persistRunReport();
114171
114193
  disposeRunAgent();
114194
+ await releaseReconciledColdWorktree().catch(() => {
114195
+ });
114172
114196
  }
114173
114197
  }
114174
114198
  async function writeServerOwnedTaskState(deps, projectSlug, taskId, runId, leaseId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrrlin-dev/mcp",
3
- "version": "0.4.230",
3
+ "version": "0.4.231",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mrrlin-mcp": "dist/bin.cjs"