@mrrlin-dev/mcp 0.4.234 → 0.4.236
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 +29 -21
- package/package.json +1 -1
package/dist/bin.cjs
CHANGED
|
@@ -106502,7 +106502,7 @@ Do NOT derail the current task - if the operator has an in-flight question, answ
|
|
|
106502
106502
|
}
|
|
106503
106503
|
|
|
106504
106504
|
// src/_generated/version.ts
|
|
106505
|
-
var PKG_VERSION = "0.4.
|
|
106505
|
+
var PKG_VERSION = "0.4.236";
|
|
106506
106506
|
|
|
106507
106507
|
// src/bridge-allowed-origins.ts
|
|
106508
106508
|
var DEFAULT_DIRECTOR_BRIDGE_ALLOWED_ORIGINS = [
|
|
@@ -115893,7 +115893,7 @@ async function driveAsyncJob(deps, projectSlug, jobId, shutdown) {
|
|
|
115893
115893
|
if (shutdown?.aborted) return;
|
|
115894
115894
|
const preClaimJob = await deps.client.getAsyncJob(projectSlug, jobId);
|
|
115895
115895
|
if (shutdown?.aborted || !preClaimJob) return;
|
|
115896
|
-
const secureReport = preClaimJob.toolName === "report-evidence" && deps.reportWorkerClient !== void 0;
|
|
115896
|
+
const secureReport = preClaimJob.toolName === "report-evidence" && deps.reportWorkerClient?.(projectSlug)?.reportWorkerAction !== void 0;
|
|
115897
115897
|
const drive = driveClaimableAsyncJob(deps, projectSlug, jobId, preClaimJob, secureReport, shutdown);
|
|
115898
115898
|
if (secureReport) deps.onReportDrive?.(drive);
|
|
115899
115899
|
await drive;
|
|
@@ -116389,13 +116389,15 @@ async function runAsyncBackstopSweep(deps, drive = (slug, jobId) => driveAsyncJo
|
|
|
116389
116389
|
} catch {
|
|
116390
116390
|
running = [];
|
|
116391
116391
|
}
|
|
116392
|
+
const reportWorker = deps.reportWorkerClient?.(slug);
|
|
116392
116393
|
for (const job of running) {
|
|
116393
116394
|
if (shutdown?.aborted) return;
|
|
116394
|
-
if (
|
|
116395
|
-
|
|
116395
|
+
if (reportWorker?.reportWorkerAction && job.toolName === "report-evidence") {
|
|
116396
|
+
const reaped = job.leaseId ? await reportWorker.reportWorkerAction(slug, job.id, {
|
|
116396
116397
|
action: "reap",
|
|
116397
116398
|
leaseId: job.leaseId
|
|
116398
|
-
}, shutdown ? AbortSignal.any([shutdown, AbortSignal.timeout(3e3)]) : AbortSignal.timeout(3e3)).catch(() => null);
|
|
116399
|
+
}, shutdown ? AbortSignal.any([shutdown, AbortSignal.timeout(3e3)]) : AbortSignal.timeout(3e3)).catch(() => null) : null;
|
|
116400
|
+
if (!reaped && !shutdown?.aborted) await deps.client.requeueAsyncJob(slug, job.id, deps.staleSeconds).catch(() => null);
|
|
116399
116401
|
continue;
|
|
116400
116402
|
}
|
|
116401
116403
|
await deps.client.requeueAsyncJob(slug, job.id, deps.staleSeconds).catch(() => null);
|
|
@@ -126651,22 +126653,28 @@ async function startDirectorBridge(startupDeps = {}) {
|
|
|
126651
126653
|
throw error51;
|
|
126652
126654
|
}
|
|
126653
126655
|
}
|
|
126656
|
+
function resolveCompactBridgeOption(name, prerequisites, env = process.env, warn = (line) => {
|
|
126657
|
+
process.stderr.write(line);
|
|
126658
|
+
}) {
|
|
126659
|
+
const flag2 = env[name]?.trim().toLowerCase();
|
|
126660
|
+
if (flag2 && !["0", "1", "false"].includes(flag2)) throw new Error(`Invalid ${name}`);
|
|
126661
|
+
if (flag2 === "0" || flag2 === "false") return false;
|
|
126662
|
+
const ready = prerequisites.agentSecret && prerequisites.scopedScheduler;
|
|
126663
|
+
if (flag2 === "1" && !ready) {
|
|
126664
|
+
const missing = [
|
|
126665
|
+
...prerequisites.agentSecret ? [] : ["a durable agent credential"],
|
|
126666
|
+
...prerequisites.scopedScheduler ? [] : ["MRRLIN_BRIDGE_SCOPED_SCHEDULER=1"]
|
|
126667
|
+
].join(" and ");
|
|
126668
|
+
warn(`[mrrlin-mcp director-bridge] ${name}=1 ignored: it requires ${missing}; staying off
|
|
126669
|
+
`);
|
|
126670
|
+
}
|
|
126671
|
+
return ready;
|
|
126672
|
+
}
|
|
126654
126673
|
async function startBridge(startupDeps, agentSecret, startupRollback) {
|
|
126655
126674
|
const scopedScheduler = process.env.MRRLIN_BRIDGE_SCOPED_SCHEDULER === "1";
|
|
126656
|
-
const
|
|
126657
|
-
|
|
126658
|
-
|
|
126659
|
-
}
|
|
126660
|
-
const compactTick = compactTickFlag === "1";
|
|
126661
|
-
if (compactTick && (!agentSecret || !scopedScheduler)) {
|
|
126662
|
-
throw new Error("Compact scheduler requires a durable agent credential and scoped scheduler");
|
|
126663
|
-
}
|
|
126664
|
-
const compactFlag = process.env.MRRLIN_BRIDGE_COMPACT_HEARTBEAT?.trim().toLowerCase();
|
|
126665
|
-
if (compactFlag && !["0", "1", "false"].includes(compactFlag)) throw new Error("Invalid MRRLIN_BRIDGE_COMPACT_HEARTBEAT");
|
|
126666
|
-
const compactHeartbeat = compactFlag === "1";
|
|
126667
|
-
if (compactHeartbeat && (!agentSecret || !scopedScheduler)) {
|
|
126668
|
-
throw new Error("Compact heartbeat requires a durable agent credential and scoped scheduler");
|
|
126669
|
-
}
|
|
126675
|
+
const compactPrerequisites = { agentSecret: !!agentSecret, scopedScheduler };
|
|
126676
|
+
const compactTick = resolveCompactBridgeOption("MRRLIN_BRIDGE_COMPACT_SCHEDULER", compactPrerequisites);
|
|
126677
|
+
const compactHeartbeat = resolveCompactBridgeOption("MRRLIN_BRIDGE_COMPACT_HEARTBEAT", compactPrerequisites);
|
|
126670
126678
|
const signingProvider = buildBridgeSigningProvider();
|
|
126671
126679
|
const config2 = parseConfig();
|
|
126672
126680
|
const failureLog = createFailureLog();
|
|
@@ -127080,12 +127088,12 @@ async function startBridge(startupDeps, agentSecret, startupRollback) {
|
|
|
127080
127088
|
});
|
|
127081
127089
|
const reportWorkerProject = process.env.MRRLIN_F54_REPORT_WORKER_PROJECT?.trim();
|
|
127082
127090
|
const reportWorkerSecret = process.env.MRRLIN_F54_REPORT_WORKER_SECRET?.trim();
|
|
127083
|
-
const
|
|
127084
|
-
const reportWorkerProvider = reportDelivery && reportWorkerProject && reportWorkerSecret ? createAgentTokenProvider({ secret: reportWorkerSecret, baseUrl: apiBaseUrl }) : void 0;
|
|
127091
|
+
const reportWorkerProvider = killSwitchOn(process.env.MRRLIN_F54_REPORT_DELIVERY) && reportWorkerProject && reportWorkerSecret ? createAgentTokenProvider({ secret: reportWorkerSecret, baseUrl: apiBaseUrl }) : void 0;
|
|
127085
127092
|
const reportWorkerClient = reportWorkerProvider && createMrrlinClient({
|
|
127086
127093
|
baseUrl: apiBaseUrl,
|
|
127087
127094
|
headers: async () => ({ authorization: `Bearer ${await reportWorkerProvider.getToken(reportWorkerProject)}` })
|
|
127088
127095
|
});
|
|
127096
|
+
const reportDelivery = reportWorkerClient !== void 0;
|
|
127089
127097
|
const activeReports = /* @__PURE__ */ new Set();
|
|
127090
127098
|
const reportShutdown = reportDelivery ? new AbortController() : void 0;
|
|
127091
127099
|
const asyncConsumerDeps = {
|