@mrrlin-dev/mcp 0.4.248 → 0.4.250
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 +32 -12
- package/package.json +1 -1
package/dist/bin.cjs
CHANGED
|
@@ -106855,7 +106855,7 @@ Do NOT derail the current task - if the operator has an in-flight question, answ
|
|
|
106855
106855
|
}
|
|
106856
106856
|
|
|
106857
106857
|
// src/_generated/version.ts
|
|
106858
|
-
var PKG_VERSION = "0.4.
|
|
106858
|
+
var PKG_VERSION = "0.4.250";
|
|
106859
106859
|
|
|
106860
106860
|
// src/bridge-allowed-origins.ts
|
|
106861
106861
|
var DEFAULT_DIRECTOR_BRIDGE_ALLOWED_ORIGINS = [
|
|
@@ -111687,8 +111687,8 @@ function renderTaskNotesContractLines(journalWriter = false) {
|
|
|
111687
111687
|
" Adapt depth to the task: a one-line fix needs one sentence, not four headings."
|
|
111688
111688
|
];
|
|
111689
111689
|
}
|
|
111690
|
-
function taskJournalWriterEnabled(projectSlug,
|
|
111691
|
-
return Boolean(projectSlug && projectSlug !== "*" &&
|
|
111690
|
+
function taskJournalWriterEnabled(projectSlug, killSwitch = process.env.MRRLIN_TASK_JOURNAL_WRITER_PROJECTS) {
|
|
111691
|
+
return Boolean(projectSlug && projectSlug !== "*") && killSwitchOn(killSwitch);
|
|
111692
111692
|
}
|
|
111693
111693
|
var TASK_JOURNAL_WRITER_INSTRUCTIONS = [
|
|
111694
111694
|
"Progress journal for the active project (overrides progress-write destinations elsewhere in these instructions):",
|
|
@@ -113310,6 +113310,14 @@ async function unlockColdWorkWorktreeWithGit(worktreePath, signal) {
|
|
|
113310
113310
|
await gitOutput(worktreePath, ["worktree", "unlock", worktreePath], signal);
|
|
113311
113311
|
}
|
|
113312
113312
|
var COLD_WORK_RECONCILED_STATUSES = /* @__PURE__ */ new Set(["done", "failed", "cancelled", "pull_request", "dev_deploy", "prod_deploy", "handoff_queued"]);
|
|
113313
|
+
function resolveF74ColdWork(supervised, env = process.env) {
|
|
113314
|
+
const raw = (env.MRRLIN_F74_COLD_WORK_ENABLED ?? "").trim().toLowerCase();
|
|
113315
|
+
if (raw === "0" || raw === "false") return false;
|
|
113316
|
+
return raw === "1" || raw === "true" || supervised;
|
|
113317
|
+
}
|
|
113318
|
+
function f74ColdWorkPossibleOnHost(env = process.env, drainServiceInstalled = () => readDrainServiceEndpoint() !== null) {
|
|
113319
|
+
return resolveF74ColdWork(drainServiceInstalled(), env);
|
|
113320
|
+
}
|
|
113313
113321
|
function defaultDrainSupervisor() {
|
|
113314
113322
|
const endpoint = readDrainServiceEndpoint();
|
|
113315
113323
|
if (!endpoint) return null;
|
|
@@ -113715,7 +113723,7 @@ async function driveClaimedRun(deps, projectSlug, runId, claimed, leaseId) {
|
|
|
113715
113723
|
const legacy = explicitLegacyTurnTimeoutMs();
|
|
113716
113724
|
return legacy != null ? Math.min(legacy, remaining) : remaining;
|
|
113717
113725
|
};
|
|
113718
|
-
const f74ColdWorkEnabled =
|
|
113726
|
+
const f74ColdWorkEnabled = resolveF74ColdWork(deps.attemptSupervision !== void 0);
|
|
113719
113727
|
const f67BackgroundGateEnabled = process.env.MRRLIN_F67_BACKGROUND_GATE_ENABLED === "1";
|
|
113720
113728
|
const task = await deps.client.getTask(projectSlug, claimed.taskId);
|
|
113721
113729
|
deps.activeLease?.progress();
|
|
@@ -125303,7 +125311,7 @@ function buildThreadStartParams(msg, config2, desiredModel) {
|
|
|
125303
125311
|
' Good: "Audit crawled-not-indexed pages and fix 404 errors"',
|
|
125304
125312
|
' Bad: "GSC coverage triage crawled-not-indexed + 404"',
|
|
125305
125313
|
...renderTaskNotesContractLines(taskJournalWriterEnabled(projectSlug)),
|
|
125306
|
-
...taskJournalWriterEnabled(projectSlug) ? [`Apply
|
|
125314
|
+
...taskJournalWriterEnabled(projectSlug) ? [`Apply these journal instructions to the project "${projectSlug}".`, TASK_JOURNAL_WRITER_INSTRUCTIONS] : [],
|
|
125307
125315
|
// early-intent-confirmation (design.md, "The chat contract"): the core block below is copied
|
|
125308
125316
|
// VERBATIM from design.md, per tasks.md 10.1. It replaces an older sentence that also carried
|
|
125309
125317
|
// "omit operatorSeedRequest only when there is genuinely no operator request behind the task
|
|
@@ -125793,7 +125801,7 @@ function reportAutopilotLimitPause2(client, reason, resetAt) {
|
|
|
125793
125801
|
});
|
|
125794
125802
|
}
|
|
125795
125803
|
async function runOrphanWorktreeSweep(client, opts) {
|
|
125796
|
-
if (
|
|
125804
|
+
if (f74ColdWorkPossibleOnHost()) return;
|
|
125797
125805
|
const cutoff = Date.now() - worktreeRetentionMs();
|
|
125798
125806
|
const isReapable = (worktreePath) => {
|
|
125799
125807
|
try {
|
|
@@ -127666,9 +127674,20 @@ function closeStartupWebSocketServer(server) {
|
|
|
127666
127674
|
for (const socket of server.clients) socket.terminate();
|
|
127667
127675
|
});
|
|
127668
127676
|
}
|
|
127677
|
+
function staticOwnedSdkEnabled(env = process.env, platform = process.platform) {
|
|
127678
|
+
return platform !== "win32" && killSwitchOn(env.MRRLIN_BRIDGE_STATIC_OWNED_SDK);
|
|
127679
|
+
}
|
|
127680
|
+
function resolveDurableBridgeTransports(agentSecret, env = process.env) {
|
|
127681
|
+
const scopedScheduler = agentSecret && killSwitchOn(env.MRRLIN_BRIDGE_SCOPED_SCHEDULER);
|
|
127682
|
+
return {
|
|
127683
|
+
scopedScheduler,
|
|
127684
|
+
ownedSdk: scopedScheduler && killSwitchOn(env.MRRLIN_BRIDGE_OWNED_SDK),
|
|
127685
|
+
scopedRunRead: scopedScheduler && killSwitchOn(env.MRRLIN_BRIDGE_SCOPED_RUN_READ)
|
|
127686
|
+
};
|
|
127687
|
+
}
|
|
127669
127688
|
async function startDirectorBridge(startupDeps = {}) {
|
|
127670
127689
|
const agentSecret = readAgentSecret();
|
|
127671
|
-
const staticBearer = !agentSecret &&
|
|
127690
|
+
const staticBearer = !agentSecret && staticOwnedSdkEnabled() ? process.env.MRRLIN_TOKEN?.trim() || readOperatorToken() || void 0 : void 0;
|
|
127672
127691
|
const rollback = [];
|
|
127673
127692
|
let disposeTransport;
|
|
127674
127693
|
try {
|
|
@@ -127705,7 +127724,7 @@ function resolveCompactBridgeOption(name, prerequisites, env = process.env, warn
|
|
|
127705
127724
|
if (flag2 === "1" && !ready) {
|
|
127706
127725
|
const missing = [
|
|
127707
127726
|
...prerequisites.agentSecret ? [] : ["a durable agent credential"],
|
|
127708
|
-
...prerequisites.scopedScheduler ? [] : ["MRRLIN_BRIDGE_SCOPED_SCHEDULER
|
|
127727
|
+
...prerequisites.scopedScheduler ? [] : ["the scoped scheduler (MRRLIN_BRIDGE_SCOPED_SCHEDULER is switched off)"]
|
|
127709
127728
|
].join(" and ");
|
|
127710
127729
|
warn(`[mrrlin-mcp director-bridge] ${name}=1 ignored: it requires ${missing}; staying off
|
|
127711
127730
|
`);
|
|
@@ -127713,7 +127732,7 @@ function resolveCompactBridgeOption(name, prerequisites, env = process.env, warn
|
|
|
127713
127732
|
return ready;
|
|
127714
127733
|
}
|
|
127715
127734
|
async function startBridge(startupDeps, agentSecret, startupRollback) {
|
|
127716
|
-
const scopedScheduler
|
|
127735
|
+
const { scopedScheduler, ownedSdk, scopedRunRead } = resolveDurableBridgeTransports(Boolean(agentSecret));
|
|
127717
127736
|
const compactPrerequisites = { agentSecret: !!agentSecret, scopedScheduler };
|
|
127718
127737
|
const compactTick = resolveCompactBridgeOption("MRRLIN_BRIDGE_COMPACT_SCHEDULER", compactPrerequisites);
|
|
127719
127738
|
const compactHeartbeat = resolveCompactBridgeOption("MRRLIN_BRIDGE_COMPACT_HEARTBEAT", compactPrerequisites);
|
|
@@ -127796,8 +127815,6 @@ async function startBridge(startupDeps, agentSecret, startupRollback) {
|
|
|
127796
127815
|
let schedulerScope;
|
|
127797
127816
|
let transportFatal = null;
|
|
127798
127817
|
let reportTransportFatal = null;
|
|
127799
|
-
const ownedSdk = Boolean(agentSecret) && scopedScheduler && process.env.MRRLIN_BRIDGE_OWNED_SDK === "1";
|
|
127800
|
-
const scopedRunRead = Boolean(agentSecret) && scopedScheduler && process.env.MRRLIN_BRIDGE_SCOPED_RUN_READ === "1";
|
|
127801
127818
|
const baseFetch = globalThis.fetch;
|
|
127802
127819
|
let staticToken;
|
|
127803
127820
|
let authedFetch;
|
|
@@ -130537,6 +130554,9 @@ function createMrrlinMcpServer(options = {}, owned) {
|
|
|
130537
130554
|
});
|
|
130538
130555
|
return { resolved, server };
|
|
130539
130556
|
}
|
|
130557
|
+
function stdioOwnedHttpEnabled(env = process.env, platform = process.platform) {
|
|
130558
|
+
return platform !== "win32" && killSwitchOn(env.MRRLIN_MCP_STDIO_OWNED_HTTP);
|
|
130559
|
+
}
|
|
130540
130560
|
async function startStdioServer(options = {}) {
|
|
130541
130561
|
let effective = options;
|
|
130542
130562
|
if (!options.apiBaseUrl) {
|
|
@@ -130565,7 +130585,7 @@ async function startStdioServer(options = {}) {
|
|
|
130565
130585
|
}
|
|
130566
130586
|
}
|
|
130567
130587
|
const resolvedOptions = resolveServerOptions(effective);
|
|
130568
|
-
const owned =
|
|
130588
|
+
const owned = stdioOwnedHttpEnabled() && !effective.fetch && !effective.createOperation ? createStdioOwnedTransport(resolvedOptions) : void 0;
|
|
130569
130589
|
try {
|
|
130570
130590
|
const { resolved, server } = createMrrlinMcpServer({ ...effective, createOperation: owned?.createOperation ?? effective.createOperation }, owned);
|
|
130571
130591
|
const transport = new StdioServerTransport();
|