@mrrlin-dev/mcp 0.4.127 → 0.4.129
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.
- package/dist/bin.cjs +119 -17
- package/package.json +1 -1
package/dist/bin.cjs
CHANGED
|
@@ -37478,6 +37478,23 @@ var openApiOperationIds = {
|
|
|
37478
37478
|
reconcilePendingCapabilityInvocations: "reconcilePendingCapabilityInvocations"
|
|
37479
37479
|
};
|
|
37480
37480
|
|
|
37481
|
+
// ../../packages/schemas/dist/token-keys.js
|
|
37482
|
+
var encoder = new TextEncoder();
|
|
37483
|
+
var LEGACY_TOKEN_KEY_ACCEPTED_UNTIL = {
|
|
37484
|
+
operator: Date.UTC(2026, 11, 14),
|
|
37485
|
+
// 2026-12-14T00:00:00Z
|
|
37486
|
+
"identity-assertion": Date.UTC(2026, 10, 30),
|
|
37487
|
+
// 2026-11-30T00:00:00Z
|
|
37488
|
+
"pending-link": Date.UTC(2026, 10, 30),
|
|
37489
|
+
"link-intent": Date.UTC(2026, 10, 30)
|
|
37490
|
+
};
|
|
37491
|
+
var LEGACY_TOKEN_MAX_LIFETIME_MS = {
|
|
37492
|
+
operator: 7 * 24 * 60 * 60 * 1e3,
|
|
37493
|
+
"identity-assertion": 10 * 60 * 1e3,
|
|
37494
|
+
"pending-link": 10 * 60 * 1e3,
|
|
37495
|
+
"link-intent": 10 * 60 * 1e3
|
|
37496
|
+
};
|
|
37497
|
+
|
|
37481
37498
|
// ../../packages/schemas/dist/session.js
|
|
37482
37499
|
var sessionEmailSchema = external_exports.string().email();
|
|
37483
37500
|
var operatorSessionSchema = external_exports.object({
|
|
@@ -58153,12 +58170,81 @@ function emptyHooksDir() {
|
|
|
58153
58170
|
function gitArgs(repo, args) {
|
|
58154
58171
|
return ["-C", repo, "-c", `core.hooksPath=${emptyHooksDir()}`, ...args];
|
|
58155
58172
|
}
|
|
58173
|
+
var STEP_ENV_NAMES = /* @__PURE__ */ new Set([
|
|
58174
|
+
// user, shell, temp dirs, locale
|
|
58175
|
+
"PATH",
|
|
58176
|
+
"HOME",
|
|
58177
|
+
"USER",
|
|
58178
|
+
"LOGNAME",
|
|
58179
|
+
"SHELL",
|
|
58180
|
+
"TERM",
|
|
58181
|
+
"TMPDIR",
|
|
58182
|
+
"TMP",
|
|
58183
|
+
"TEMP",
|
|
58184
|
+
"LANG",
|
|
58185
|
+
"LANGUAGE",
|
|
58186
|
+
"TZ",
|
|
58187
|
+
// what a Windows toolchain needs to start at all
|
|
58188
|
+
"USERPROFILE",
|
|
58189
|
+
"APPDATA",
|
|
58190
|
+
"LOCALAPPDATA",
|
|
58191
|
+
"PROGRAMDATA",
|
|
58192
|
+
"PROGRAMFILES",
|
|
58193
|
+
"SYSTEMROOT",
|
|
58194
|
+
"WINDIR",
|
|
58195
|
+
"COMSPEC",
|
|
58196
|
+
"PATHEXT",
|
|
58197
|
+
"HOMEDRIVE",
|
|
58198
|
+
"HOMEPATH",
|
|
58199
|
+
// proxies and the operator's own CA bundle
|
|
58200
|
+
"HTTP_PROXY",
|
|
58201
|
+
"HTTPS_PROXY",
|
|
58202
|
+
"NO_PROXY",
|
|
58203
|
+
"ALL_PROXY",
|
|
58204
|
+
"NODE_EXTRA_CA_CERTS",
|
|
58205
|
+
"SSL_CERT_FILE",
|
|
58206
|
+
"SSL_CERT_DIR",
|
|
58207
|
+
// Node and its version managers
|
|
58208
|
+
"NODE_ENV",
|
|
58209
|
+
"NODE_PATH",
|
|
58210
|
+
"NVM_BIN",
|
|
58211
|
+
"NVM_DIR",
|
|
58212
|
+
"VOLTA_HOME",
|
|
58213
|
+
"FNM_DIR",
|
|
58214
|
+
"ASDF_DIR",
|
|
58215
|
+
"ASDF_DATA_DIR",
|
|
58216
|
+
// the toolchains a `make test` may drive
|
|
58217
|
+
"JAVA_HOME",
|
|
58218
|
+
"GOPATH",
|
|
58219
|
+
"GOROOT",
|
|
58220
|
+
"GOCACHE",
|
|
58221
|
+
"GOMODCACHE",
|
|
58222
|
+
"CARGO_HOME",
|
|
58223
|
+
"RUSTUP_HOME",
|
|
58224
|
+
"VIRTUAL_ENV",
|
|
58225
|
+
"PYENV_ROOT",
|
|
58226
|
+
// git+ssh dependencies and commit signing
|
|
58227
|
+
"SSH_AUTH_SOCK",
|
|
58228
|
+
"GNUPGHOME"
|
|
58229
|
+
]);
|
|
58230
|
+
var STEP_ENV_PREFIXES = ["LC_", "XDG_", "NPM_CONFIG_", "YARN_", "PNPM_", "COREPACK_"];
|
|
58231
|
+
var CREDENTIAL_NAME = /AUTH|TOKEN|PASSWORD|SECRET/;
|
|
58232
|
+
function buildLocalStepEnv(baseEnv = process.env) {
|
|
58233
|
+
const env = {};
|
|
58234
|
+
for (const [name, value] of Object.entries(baseEnv)) {
|
|
58235
|
+
if (value === void 0) continue;
|
|
58236
|
+
const upper = name.toUpperCase();
|
|
58237
|
+
const inFamily = STEP_ENV_PREFIXES.some((prefix) => upper.startsWith(prefix));
|
|
58238
|
+
if (STEP_ENV_NAMES.has(upper) || inFamily && !CREDENTIAL_NAME.test(upper)) env[name] = value;
|
|
58239
|
+
}
|
|
58240
|
+
return env;
|
|
58241
|
+
}
|
|
58156
58242
|
function git(repo, args) {
|
|
58157
58243
|
return (0, import_node_child_process15.execFileSync)("git", gitArgs(repo, args), {
|
|
58158
58244
|
encoding: "utf8",
|
|
58159
58245
|
timeout: 3e4,
|
|
58160
58246
|
stdio: ["ignore", "pipe", "pipe"],
|
|
58161
|
-
env: { ...
|
|
58247
|
+
env: { ...buildLocalStepEnv(), GIT_TERMINAL_PROMPT: "0" }
|
|
58162
58248
|
}).trim();
|
|
58163
58249
|
}
|
|
58164
58250
|
function gitTry(repo, args) {
|
|
@@ -58166,7 +58252,7 @@ function gitTry(repo, args) {
|
|
|
58166
58252
|
encoding: "utf8",
|
|
58167
58253
|
timeout: 3e4,
|
|
58168
58254
|
stdio: ["ignore", "pipe", "pipe"],
|
|
58169
|
-
env: { ...
|
|
58255
|
+
env: { ...buildLocalStepEnv(), GIT_TERMINAL_PROMPT: "0" }
|
|
58170
58256
|
});
|
|
58171
58257
|
return {
|
|
58172
58258
|
status: typeof result.status === "number" ? result.status : 1,
|
|
@@ -58244,7 +58330,7 @@ function createStepRunner(options = {}) {
|
|
|
58244
58330
|
let killTimer = null;
|
|
58245
58331
|
const child = (0, import_node_child_process15.spawn)(command.file, command.args, {
|
|
58246
58332
|
cwd,
|
|
58247
|
-
env: { ...
|
|
58333
|
+
env: { ...buildLocalStepEnv(), CI: "1", GIT_TERMINAL_PROMPT: "0" },
|
|
58248
58334
|
stdio: ["ignore", "pipe", "pipe"],
|
|
58249
58335
|
detached: process.platform !== "win32"
|
|
58250
58336
|
});
|
|
@@ -58606,11 +58692,11 @@ function withDisabledGitHooksEnv(env, hooksDir) {
|
|
|
58606
58692
|
[`GIT_CONFIG_VALUE_${count2}`]: hooksDir
|
|
58607
58693
|
};
|
|
58608
58694
|
}
|
|
58609
|
-
function git2(checkout, args, hooksDir) {
|
|
58695
|
+
function git2(checkout, args, hooksDir, baseEnv = process.env) {
|
|
58610
58696
|
return (0, import_node_child_process16.execFileSync)("git", ["-C", checkout, "-c", `core.hooksPath=${hooksDir}`, ...args], {
|
|
58611
58697
|
encoding: "utf8",
|
|
58612
58698
|
timeout: 3e4,
|
|
58613
|
-
env: { ...
|
|
58699
|
+
env: { ...baseEnv, GIT_TERMINAL_PROMPT: "0" }
|
|
58614
58700
|
});
|
|
58615
58701
|
}
|
|
58616
58702
|
async function createRunWorktree(opts) {
|
|
@@ -58645,10 +58731,11 @@ async function openRunWorktree(opts) {
|
|
|
58645
58731
|
const worktreePath = (0, import_node_path19.join)(opts.worktreeRoot, opts.slug, opts.runId);
|
|
58646
58732
|
const hooksDir = prepareDisabledGitHooksDir(opts.locksDir, opts.runId);
|
|
58647
58733
|
const branch = worktreeBranch(opts.runId);
|
|
58734
|
+
const env = buildLocalStepEnv();
|
|
58648
58735
|
await withCheckoutLock(opts.locksDir, opts.slug, async () => {
|
|
58649
58736
|
if ((0, import_node_fs12.existsSync)(worktreePath)) {
|
|
58650
58737
|
const real = (0, import_node_fs12.realpathSync)(worktreePath);
|
|
58651
|
-
const listed = git2(opts.checkout, ["worktree", "list", "--porcelain"], hooksDir).split(/\n\s*\n/).map((block) => block.split("\n")).find((lines2) => {
|
|
58738
|
+
const listed = git2(opts.checkout, ["worktree", "list", "--porcelain"], hooksDir, env).split(/\n\s*\n/).map((block) => block.split("\n")).find((lines2) => {
|
|
58652
58739
|
const listedPath = lines2.find((line) => line.startsWith("worktree "))?.slice("worktree ".length);
|
|
58653
58740
|
return listedPath !== void 0 && (0, import_node_fs12.existsSync)(listedPath) && (0, import_node_fs12.realpathSync)(listedPath) === real;
|
|
58654
58741
|
});
|
|
@@ -58661,13 +58748,13 @@ async function openRunWorktree(opts) {
|
|
|
58661
58748
|
return;
|
|
58662
58749
|
}
|
|
58663
58750
|
try {
|
|
58664
|
-
git2(opts.checkout, ["rev-parse", "--verify", "--quiet", `refs/heads/${branch}`], hooksDir);
|
|
58751
|
+
git2(opts.checkout, ["rev-parse", "--verify", "--quiet", `refs/heads/${branch}`], hooksDir, env);
|
|
58665
58752
|
} catch {
|
|
58666
58753
|
throw new Error(`run_branch_missing: ${opts.checkout} has no branch ${branch}`);
|
|
58667
58754
|
}
|
|
58668
58755
|
(0, import_node_fs12.mkdirSync)(opts.worktreeRoot, { recursive: true });
|
|
58669
|
-
git2(opts.checkout, ["worktree", "prune"], hooksDir);
|
|
58670
|
-
git2(opts.checkout, ["worktree", "add", worktreePath, branch], hooksDir);
|
|
58756
|
+
git2(opts.checkout, ["worktree", "prune"], hooksDir, env);
|
|
58757
|
+
git2(opts.checkout, ["worktree", "add", worktreePath, branch], hooksDir, env);
|
|
58671
58758
|
});
|
|
58672
58759
|
return worktreePath;
|
|
58673
58760
|
}
|
|
@@ -58803,13 +58890,16 @@ async function sweepOrphanWorktrees(opts) {
|
|
|
58803
58890
|
}
|
|
58804
58891
|
|
|
58805
58892
|
// src/local-apply.ts
|
|
58893
|
+
function gitEnv() {
|
|
58894
|
+
return { ...buildLocalStepEnv(), GIT_TERMINAL_PROMPT: "0" };
|
|
58895
|
+
}
|
|
58806
58896
|
function gitRead(cwd, args) {
|
|
58807
58897
|
try {
|
|
58808
58898
|
return (0, import_node_child_process17.execFileSync)("git", ["-C", cwd, ...args], {
|
|
58809
58899
|
encoding: "utf8",
|
|
58810
58900
|
stdio: ["ignore", "pipe", "pipe"],
|
|
58811
58901
|
timeout: 3e4,
|
|
58812
|
-
env:
|
|
58902
|
+
env: gitEnv()
|
|
58813
58903
|
}).trim();
|
|
58814
58904
|
} catch {
|
|
58815
58905
|
return null;
|
|
@@ -58972,7 +59062,7 @@ async function applyLocalRunForTool(deps, input) {
|
|
|
58972
59062
|
return { outcome: "conflict", previousSha: null, headSha: delivered.headSha, detail: integration.files.join(", ") };
|
|
58973
59063
|
}
|
|
58974
59064
|
const build = await runDetectedBuild({ worktreePath, runStep: deps.runStep });
|
|
58975
|
-
const headSha = (0, import_node_child_process17.execFileSync)("git", ["-C", worktreePath, "rev-parse", "HEAD"], { encoding: "utf8" }).trim();
|
|
59065
|
+
const headSha = (0, import_node_child_process17.execFileSync)("git", ["-C", worktreePath, "rev-parse", "HEAD"], { encoding: "utf8", env: gitEnv() }).trim();
|
|
58976
59066
|
if (build.failed) {
|
|
58977
59067
|
record2({ integration, applied: false, reason: "build_failed", headSha, steps: build.steps, logs: build.logs });
|
|
58978
59068
|
return { outcome: "build_failed", previousSha: null, headSha, detail: build.failed.command };
|
|
@@ -59018,7 +59108,8 @@ async function applyLocalRunForTool(deps, input) {
|
|
|
59018
59108
|
if (!runBranchStillSigned()) return branchChanged();
|
|
59019
59109
|
(0, import_node_child_process17.execFileSync)("git", ["-C", worktreePath, "-c", `core.hooksPath=${hooksDir}`, "checkout", "-q", "--detach", delivered.headSha], {
|
|
59020
59110
|
stdio: ["ignore", "pipe", "pipe"],
|
|
59021
|
-
timeout: 3e4
|
|
59111
|
+
timeout: 3e4,
|
|
59112
|
+
env: gitEnv()
|
|
59022
59113
|
});
|
|
59023
59114
|
try {
|
|
59024
59115
|
return await reintegrate(worktreePath);
|
|
@@ -59027,9 +59118,14 @@ async function applyLocalRunForTool(deps, input) {
|
|
|
59027
59118
|
if (runBranchStillSigned()) {
|
|
59028
59119
|
(0, import_node_child_process17.execFileSync)("git", ["-C", worktreePath, "-c", `core.hooksPath=${hooksDir}`, "checkout", "-q", "-f", runBranch], {
|
|
59029
59120
|
stdio: ["ignore", "pipe", "pipe"],
|
|
59030
|
-
timeout: 3e4
|
|
59121
|
+
timeout: 3e4,
|
|
59122
|
+
env: gitEnv()
|
|
59123
|
+
});
|
|
59124
|
+
(0, import_node_child_process17.execFileSync)("git", ["-C", worktreePath, "clean", "-q", "-f", "-d"], {
|
|
59125
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
59126
|
+
timeout: 3e4,
|
|
59127
|
+
env: gitEnv()
|
|
59031
59128
|
});
|
|
59032
|
-
(0, import_node_child_process17.execFileSync)("git", ["-C", worktreePath, "clean", "-q", "-f", "-d"], { stdio: ["ignore", "pipe", "pipe"], timeout: 3e4 });
|
|
59033
59129
|
}
|
|
59034
59130
|
}
|
|
59035
59131
|
},
|
|
@@ -63221,7 +63317,7 @@ Do NOT derail the current task - if the operator has an in-flight question, answ
|
|
|
63221
63317
|
}
|
|
63222
63318
|
|
|
63223
63319
|
// src/_generated/version.ts
|
|
63224
|
-
var PKG_VERSION = "0.4.
|
|
63320
|
+
var PKG_VERSION = "0.4.129";
|
|
63225
63321
|
|
|
63226
63322
|
// src/receipt-signing.ts
|
|
63227
63323
|
var import_node_crypto17 = __toESM(require("node:crypto"), 1);
|
|
@@ -78488,14 +78584,20 @@ function createSelectedProviderRefresher(deps) {
|
|
|
78488
78584
|
}
|
|
78489
78585
|
});
|
|
78490
78586
|
}
|
|
78587
|
+
var envSigningProvider;
|
|
78491
78588
|
function buildBridgeSigningProvider() {
|
|
78492
78589
|
const signingKeyId = process.env.MRRLIN_SIGNING_KEY_ID;
|
|
78493
78590
|
const signingPrivateKey = process.env.MRRLIN_SIGNING_PRIVATE_KEY;
|
|
78591
|
+
delete process.env.MRRLIN_SIGNING_PRIVATE_KEY;
|
|
78494
78592
|
if (signingKeyId && signingPrivateKey) {
|
|
78495
|
-
|
|
78593
|
+
envSigningProvider = new LocalEd25519SigningProvider({
|
|
78496
78594
|
keyId: signingKeyId,
|
|
78497
78595
|
privateKey: signingPrivateKey
|
|
78498
78596
|
});
|
|
78597
|
+
return envSigningProvider;
|
|
78598
|
+
}
|
|
78599
|
+
if (signingKeyId && envSigningProvider?.getKeyId() === signingKeyId) {
|
|
78600
|
+
return envSigningProvider;
|
|
78499
78601
|
}
|
|
78500
78602
|
const isTestOrSmoke = process.env.NODE_ENV === "test" || process.env.MRRLIN_TEST === "1" || process.env.MRRLIN_SMOKE_TEST === "1";
|
|
78501
78603
|
if (isTestOrSmoke) {
|
|
@@ -78507,6 +78609,7 @@ function buildBridgeSigningProvider() {
|
|
|
78507
78609
|
return void 0;
|
|
78508
78610
|
}
|
|
78509
78611
|
async function startDirectorBridge() {
|
|
78612
|
+
const signingProvider = buildBridgeSigningProvider();
|
|
78510
78613
|
const config2 = parseConfig();
|
|
78511
78614
|
const failureLog = createFailureLog();
|
|
78512
78615
|
const suppressedPushLine = (label, error51) => {
|
|
@@ -78644,7 +78747,6 @@ async function startDirectorBridge() {
|
|
|
78644
78747
|
});
|
|
78645
78748
|
const checkoutRegistry = new CheckoutRegistry(config2.stateDir);
|
|
78646
78749
|
const staleSeconds = readEnvInt("MRRLIN_DIRECTOR_BRIDGE_STALE_SECONDS", DEFAULT_STALE_SECONDS);
|
|
78647
|
-
const signingProvider = buildBridgeSigningProvider();
|
|
78648
78750
|
const consumerDeps = {
|
|
78649
78751
|
client,
|
|
78650
78752
|
signingProvider,
|