@mrrlin-dev/mcp 0.4.137 → 0.4.139

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 +87 -8
  2. package/package.json +1 -1
package/dist/bin.cjs CHANGED
@@ -39293,7 +39293,7 @@ var mrrlinTaskUpdateSchema = external_exports.object({
39293
39293
  // fingerprint moved but the topology still maps the label to the same workflow. Never sent
39294
39294
  // by any other caller.
39295
39295
  reverifyRequested: external_exports.boolean().optional()
39296
- }).refine((value) => value.assignee !== void 0 || value.autoDeploy !== void 0 || value.domains !== void 0 || value.autonomyLevel !== void 0 || value.autonomyReason !== void 0 || value.category !== void 0 || value.directorThreadId !== void 0 || value.directorThreadProvider !== void 0 || value.dueDate !== void 0 || value.followUpAt !== void 0 || value.impact !== void 0 || value.notes !== void 0 || value.planId !== void 0 || value.specApproved !== void 0 || value.specWikiPageId !== void 0 || value.status !== void 0 || value.subcategory !== void 0 || value.tags !== void 0 || value.title !== void 0 || value.type !== void 0 || value.verificationDueAt !== void 0 || value.deployTargets !== void 0 || value.reverifyRequested !== void 0, { message: "TaskUpdate requires at least one field" }).superRefine((value, context) => {
39296
+ }).refine((value) => value.assignee !== void 0 || value.autoDeploy !== void 0 || value.declaredOutcome !== void 0 || value.domains !== void 0 || value.autonomyLevel !== void 0 || value.autonomyReason !== void 0 || value.category !== void 0 || value.directorThreadId !== void 0 || value.directorThreadProvider !== void 0 || value.dueDate !== void 0 || value.followUpAt !== void 0 || value.impact !== void 0 || value.notes !== void 0 || value.planId !== void 0 || value.specApproved !== void 0 || value.specWikiPageId !== void 0 || value.status !== void 0 || value.subcategory !== void 0 || value.tags !== void 0 || value.title !== void 0 || value.type !== void 0 || value.verificationDueAt !== void 0 || value.deployTargets !== void 0 || value.reverifyRequested !== void 0, { message: "TaskUpdate requires at least one field" }).superRefine((value, context) => {
39297
39297
  if (value.autonomyLevel !== void 0 && value.autonomyReason === void 0) {
39298
39298
  context.addIssue({
39299
39299
  code: external_exports.ZodIssueCode.custom,
@@ -58392,6 +58392,12 @@ function buildLocalStepEnv(baseEnv = process.env) {
58392
58392
  }
58393
58393
  return env;
58394
58394
  }
58395
+ function diagnoseGpgError(rawError) {
58396
+ if (/gpg failed to sign|secret key not available|no pinentry|verifySignatures|gpgSign|gpg\.format/i.test(rawError)) {
58397
+ return `git_gpg_signing_failed: operator git config has commit.gpgSign, tag.gpgSign, or merge.verifySignatures enabled, but headless bridge has no gpg-agent/pinentry. Operation aborted. Please configure headless gpg signing or disable commit.gpgSign for Mrrlin repository. (Details: ${rawError})`;
58398
+ }
58399
+ return rawError;
58400
+ }
58395
58401
  function git(repo, args) {
58396
58402
  return (0, import_node_child_process15.execFileSync)("git", gitArgs(repo, args), {
58397
58403
  encoding: "utf8",
@@ -58682,7 +58688,8 @@ function integrateDefaultBranch(input) {
58682
58688
  return { state: "conflict", defaultTipSha, files, preMergeHead, outsideConflicts: indexOutside(input.worktreePath, files) };
58683
58689
  }
58684
58690
  gitTry(input.worktreePath, ["merge", "--abort"]);
58685
- throw new Error(`local_integration_failed: ${merge2.stderr || merge2.stdout}`);
58691
+ const errorMsg = diagnoseGpgError(merge2.stderr || merge2.stdout);
58692
+ throw new Error(`local_integration_failed: ${errorMsg}`);
58686
58693
  }
58687
58694
  function restoreRunBranch(input) {
58688
58695
  if (!isDeliveryLockHeld(input.deliveryLock.locksDir, input.deliveryLock.key)) {
@@ -59393,8 +59400,33 @@ async function applyLocalRunForTool(deps, input) {
59393
59400
  timeout: 3e4,
59394
59401
  env: gitEnv()
59395
59402
  }).split("\n").filter((line) => line.length > 3).map((line) => line.slice(3));
59396
- if (changedByBuild.length > 0) {
59397
- const detail = `the build changed tracked files: ${changedByBuild.join(", ")}`;
59403
+ const LOCKFILE_NAMES = /* @__PURE__ */ new Set([
59404
+ "package-lock.json",
59405
+ "pnpm-lock.yaml",
59406
+ "yarn.lock",
59407
+ "bun.lockb",
59408
+ "bun.lock",
59409
+ "Cargo.lock",
59410
+ "Gemfile.lock",
59411
+ "poetry.lock"
59412
+ ]);
59413
+ const isLockfile = (file2) => LOCKFILE_NAMES.has(import_node_path20.default.basename(file2));
59414
+ const nonLockfiles = changedByBuild.filter((f) => !isLockfile(f));
59415
+ const lockfilesChanged = changedByBuild.filter((f) => isLockfile(f));
59416
+ if (lockfilesChanged.length > 0) {
59417
+ for (const lf of lockfilesChanged) {
59418
+ try {
59419
+ (0, import_node_child_process17.execFileSync)("git", ["-C", worktreePath, "add", lf], {
59420
+ encoding: "utf8",
59421
+ stdio: ["ignore", "pipe", "pipe"],
59422
+ env: gitEnv()
59423
+ });
59424
+ } catch {
59425
+ }
59426
+ }
59427
+ }
59428
+ if (nonLockfiles.length > 0) {
59429
+ const detail = `the build changed tracked files: ${nonLockfiles.join(", ")}`;
59398
59430
  record2({ integration, applied: false, reason: "build_failed", headSha, detail, steps: build.steps, logs: build.logs });
59399
59431
  return { outcome: "build_failed", previousSha: null, headSha, detail };
59400
59432
  }
@@ -61195,7 +61227,19 @@ function createMrrlinTools(options) {
61195
61227
  "Unable to close task as won't-do.",
61196
61228
  async (c, { projectSlug, taskId, reason }) => {
61197
61229
  await checkTenantBoundary(projectSlug, "task");
61198
- return await c.closeTaskAsWontDo(projectSlug, taskId, reason);
61230
+ const inboxItemId = `II-${taskId}-wont-do-${Date.now().toString(36)}`;
61231
+ await c.createInboxItem(projectSlug, {
61232
+ id: inboxItemId,
61233
+ kind: "question",
61234
+ taskId,
61235
+ body: `Director proposes closing task ${taskId} as won't-do: ${reason}`,
61236
+ questionOptions: [
61237
+ { label: "Close as won't-do", answer: "close_as_wont_do", description: reason, recommended: true },
61238
+ { label: "Keep task open", answer: "keep_open", description: "Keep the task open" }
61239
+ ]
61240
+ });
61241
+ const task = await c.getTask(projectSlug, taskId);
61242
+ return task;
61199
61243
  }
61200
61244
  ),
61201
61245
  // Task 8.2: routed through deliverBuiltIn, not c.updateWikiPage directly.
@@ -63666,7 +63710,7 @@ Do NOT derail the current task - if the operator has an in-flight question, answ
63666
63710
  }
63667
63711
 
63668
63712
  // src/_generated/version.ts
63669
- var PKG_VERSION = "0.4.137";
63713
+ var PKG_VERSION = "0.4.139";
63670
63714
 
63671
63715
  // src/bridge-allowed-origins.ts
63672
63716
  var DEFAULT_DIRECTOR_BRIDGE_ALLOWED_ORIGINS = [
@@ -74645,6 +74689,41 @@ function defaultReadinessRunner(provider) {
74645
74689
  return { status: r.status, stdout: r.stdout ?? "", stderr: r.stderr ?? "" };
74646
74690
  };
74647
74691
  }
74692
+ function sanitizeExecutorEnv(baseEnv = process.env) {
74693
+ const allowedKeys = /* @__PURE__ */ new Set([
74694
+ "PATH",
74695
+ "HOME",
74696
+ "USER",
74697
+ "LOGNAME",
74698
+ "SHELL",
74699
+ "TERM",
74700
+ "TMPDIR",
74701
+ "LANG",
74702
+ "LC_ALL",
74703
+ "NODE_ENV",
74704
+ "NODE_PATH",
74705
+ "NVM_BIN",
74706
+ "NVM_DIR",
74707
+ "PNPM_HOME",
74708
+ "OPENAI_API_KEY",
74709
+ "ANTHROPIC_API_KEY",
74710
+ "GEMINI_API_KEY",
74711
+ "CODEX_API_KEY",
74712
+ "CODEX_HOME",
74713
+ "EDITOR",
74714
+ "GIT_AUTHOR_NAME",
74715
+ "GIT_AUTHOR_EMAIL",
74716
+ "GIT_COMMITTER_NAME",
74717
+ "GIT_COMMITTER_EMAIL"
74718
+ ]);
74719
+ const sanitized = {};
74720
+ for (const [key, value] of Object.entries(baseEnv)) {
74721
+ if (value !== void 0 && (allowedKeys.has(key) || key.startsWith("NPM_CONFIG_") || key.startsWith("GIT_CONFIG_"))) {
74722
+ sanitized[key] = value;
74723
+ }
74724
+ }
74725
+ return sanitized;
74726
+ }
74648
74727
  function buildVerificationEnv(baseEnv = process.env) {
74649
74728
  const allowedKeys = /* @__PURE__ */ new Set([
74650
74729
  "PATH",
@@ -74692,8 +74771,8 @@ async function startExecutorServer(opts) {
74692
74771
  throw error51;
74693
74772
  }
74694
74773
  const isVerification = opts.brokerSocket != null || opts.brokerSocketFd != null;
74695
- const rawBaseEnv = opts.env ?? (isVerification ? buildVerificationEnv(process.env) : process.env);
74696
- const baseEnv = isVerification ? buildVerificationEnv(rawBaseEnv) : { ...rawBaseEnv };
74774
+ const rawBaseEnv = opts.env ?? (isVerification ? buildVerificationEnv(process.env) : sanitizeExecutorEnv(process.env));
74775
+ const baseEnv = isVerification ? buildVerificationEnv(rawBaseEnv) : sanitizeExecutorEnv(rawBaseEnv);
74697
74776
  const childEnv = withDisabledGitHooksEnv(baseEnv, opts.disabledGitHooksDir);
74698
74777
  const baseSpawn = opts.spawn ?? import_node_child_process25.spawn;
74699
74778
  const hasExtraFd = opts.brokerSocket != null || opts.brokerSocketFd != null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrrlin-dev/mcp",
3
- "version": "0.4.137",
3
+ "version": "0.4.139",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mrrlin-mcp": "dist/bin.cjs"