@mrrlin-dev/mcp 0.4.248 → 0.4.249
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 +22 -10
- 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.249";
|
|
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):",
|
|
@@ -125303,7 +125303,7 @@ function buildThreadStartParams(msg, config2, desiredModel) {
|
|
|
125303
125303
|
' Good: "Audit crawled-not-indexed pages and fix 404 errors"',
|
|
125304
125304
|
' Bad: "GSC coverage triage crawled-not-indexed + 404"',
|
|
125305
125305
|
...renderTaskNotesContractLines(taskJournalWriterEnabled(projectSlug)),
|
|
125306
|
-
...taskJournalWriterEnabled(projectSlug) ? [`Apply
|
|
125306
|
+
...taskJournalWriterEnabled(projectSlug) ? [`Apply these journal instructions to the project "${projectSlug}".`, TASK_JOURNAL_WRITER_INSTRUCTIONS] : [],
|
|
125307
125307
|
// early-intent-confirmation (design.md, "The chat contract"): the core block below is copied
|
|
125308
125308
|
// VERBATIM from design.md, per tasks.md 10.1. It replaces an older sentence that also carried
|
|
125309
125309
|
// "omit operatorSeedRequest only when there is genuinely no operator request behind the task
|
|
@@ -127666,9 +127666,20 @@ function closeStartupWebSocketServer(server) {
|
|
|
127666
127666
|
for (const socket of server.clients) socket.terminate();
|
|
127667
127667
|
});
|
|
127668
127668
|
}
|
|
127669
|
+
function staticOwnedSdkEnabled(env = process.env, platform = process.platform) {
|
|
127670
|
+
return platform !== "win32" && killSwitchOn(env.MRRLIN_BRIDGE_STATIC_OWNED_SDK);
|
|
127671
|
+
}
|
|
127672
|
+
function resolveDurableBridgeTransports(agentSecret, env = process.env) {
|
|
127673
|
+
const scopedScheduler = agentSecret && killSwitchOn(env.MRRLIN_BRIDGE_SCOPED_SCHEDULER);
|
|
127674
|
+
return {
|
|
127675
|
+
scopedScheduler,
|
|
127676
|
+
ownedSdk: scopedScheduler && killSwitchOn(env.MRRLIN_BRIDGE_OWNED_SDK),
|
|
127677
|
+
scopedRunRead: scopedScheduler && killSwitchOn(env.MRRLIN_BRIDGE_SCOPED_RUN_READ)
|
|
127678
|
+
};
|
|
127679
|
+
}
|
|
127669
127680
|
async function startDirectorBridge(startupDeps = {}) {
|
|
127670
127681
|
const agentSecret = readAgentSecret();
|
|
127671
|
-
const staticBearer = !agentSecret &&
|
|
127682
|
+
const staticBearer = !agentSecret && staticOwnedSdkEnabled() ? process.env.MRRLIN_TOKEN?.trim() || readOperatorToken() || void 0 : void 0;
|
|
127672
127683
|
const rollback = [];
|
|
127673
127684
|
let disposeTransport;
|
|
127674
127685
|
try {
|
|
@@ -127705,7 +127716,7 @@ function resolveCompactBridgeOption(name, prerequisites, env = process.env, warn
|
|
|
127705
127716
|
if (flag2 === "1" && !ready) {
|
|
127706
127717
|
const missing = [
|
|
127707
127718
|
...prerequisites.agentSecret ? [] : ["a durable agent credential"],
|
|
127708
|
-
...prerequisites.scopedScheduler ? [] : ["MRRLIN_BRIDGE_SCOPED_SCHEDULER
|
|
127719
|
+
...prerequisites.scopedScheduler ? [] : ["the scoped scheduler (MRRLIN_BRIDGE_SCOPED_SCHEDULER is switched off)"]
|
|
127709
127720
|
].join(" and ");
|
|
127710
127721
|
warn(`[mrrlin-mcp director-bridge] ${name}=1 ignored: it requires ${missing}; staying off
|
|
127711
127722
|
`);
|
|
@@ -127713,7 +127724,7 @@ function resolveCompactBridgeOption(name, prerequisites, env = process.env, warn
|
|
|
127713
127724
|
return ready;
|
|
127714
127725
|
}
|
|
127715
127726
|
async function startBridge(startupDeps, agentSecret, startupRollback) {
|
|
127716
|
-
const scopedScheduler
|
|
127727
|
+
const { scopedScheduler, ownedSdk, scopedRunRead } = resolveDurableBridgeTransports(Boolean(agentSecret));
|
|
127717
127728
|
const compactPrerequisites = { agentSecret: !!agentSecret, scopedScheduler };
|
|
127718
127729
|
const compactTick = resolveCompactBridgeOption("MRRLIN_BRIDGE_COMPACT_SCHEDULER", compactPrerequisites);
|
|
127719
127730
|
const compactHeartbeat = resolveCompactBridgeOption("MRRLIN_BRIDGE_COMPACT_HEARTBEAT", compactPrerequisites);
|
|
@@ -127796,8 +127807,6 @@ async function startBridge(startupDeps, agentSecret, startupRollback) {
|
|
|
127796
127807
|
let schedulerScope;
|
|
127797
127808
|
let transportFatal = null;
|
|
127798
127809
|
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
127810
|
const baseFetch = globalThis.fetch;
|
|
127802
127811
|
let staticToken;
|
|
127803
127812
|
let authedFetch;
|
|
@@ -130537,6 +130546,9 @@ function createMrrlinMcpServer(options = {}, owned) {
|
|
|
130537
130546
|
});
|
|
130538
130547
|
return { resolved, server };
|
|
130539
130548
|
}
|
|
130549
|
+
function stdioOwnedHttpEnabled(env = process.env, platform = process.platform) {
|
|
130550
|
+
return platform !== "win32" && killSwitchOn(env.MRRLIN_MCP_STDIO_OWNED_HTTP);
|
|
130551
|
+
}
|
|
130540
130552
|
async function startStdioServer(options = {}) {
|
|
130541
130553
|
let effective = options;
|
|
130542
130554
|
if (!options.apiBaseUrl) {
|
|
@@ -130565,7 +130577,7 @@ async function startStdioServer(options = {}) {
|
|
|
130565
130577
|
}
|
|
130566
130578
|
}
|
|
130567
130579
|
const resolvedOptions = resolveServerOptions(effective);
|
|
130568
|
-
const owned =
|
|
130580
|
+
const owned = stdioOwnedHttpEnabled() && !effective.fetch && !effective.createOperation ? createStdioOwnedTransport(resolvedOptions) : void 0;
|
|
130569
130581
|
try {
|
|
130570
130582
|
const { resolved, server } = createMrrlinMcpServer({ ...effective, createOperation: owned?.createOperation ?? effective.createOperation }, owned);
|
|
130571
130583
|
const transport = new StdioServerTransport();
|