@mrrlin-dev/mcp 0.4.198 → 0.4.200
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 +125 -54
- package/package.json +2 -2
package/dist/bin.cjs
CHANGED
|
@@ -69881,9 +69881,9 @@ function createMrrlinClient(config2) {
|
|
|
69881
69881
|
});
|
|
69882
69882
|
return executionRunResponseSchema.parse(body).data;
|
|
69883
69883
|
},
|
|
69884
|
-
async touchExecutionRunLease(projectSlug, runId, leaseId) {
|
|
69884
|
+
async touchExecutionRunLease(projectSlug, runId, leaseId, signal) {
|
|
69885
69885
|
try {
|
|
69886
|
-
const response = await request(`${projectPath(projectSlug)}/execution-runs/${encodeURIComponent(runId)}/touch-lease`, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ leaseId }) });
|
|
69886
|
+
const response = await request(`${projectPath(projectSlug)}/execution-runs/${encodeURIComponent(runId)}/touch-lease`, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ leaseId }), signal });
|
|
69887
69887
|
const data = compactExecutionTouchResponseSchema.parse(response).data;
|
|
69888
69888
|
if (data.projectSlug !== projectSlug || data.id !== runId || data.leaseId !== leaseId || data.executorBearer === void 0 !== (data.leaseRemainingMs === void 0)) {
|
|
69889
69889
|
throw new Error("Compact heartbeat returned a different execution lease");
|
|
@@ -69895,9 +69895,9 @@ function createMrrlinClient(config2) {
|
|
|
69895
69895
|
throw error51;
|
|
69896
69896
|
}
|
|
69897
69897
|
},
|
|
69898
|
-
async touchAsyncJobLease(projectSlug, jobId, leaseId) {
|
|
69898
|
+
async touchAsyncJobLease(projectSlug, jobId, leaseId, signal) {
|
|
69899
69899
|
try {
|
|
69900
|
-
const response = await request(`${projectPath(projectSlug)}/async-jobs/${encodeURIComponent(jobId)}/touch-lease`, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ leaseId }) });
|
|
69900
|
+
const response = await request(`${projectPath(projectSlug)}/async-jobs/${encodeURIComponent(jobId)}/touch-lease`, { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ leaseId }), signal });
|
|
69901
69901
|
return compactAsyncTouchResponseSchema.parse(response).data.applied;
|
|
69902
69902
|
} catch (error51) {
|
|
69903
69903
|
if (error51 instanceof MrrlinApiError && error51.status === 409)
|
|
@@ -98006,13 +98006,23 @@ function createScopedTokenRefresh(options, lane = "refresh") {
|
|
|
98006
98006
|
const session = createScopedSession(options, lane);
|
|
98007
98007
|
return async (signal, absoluteDeadline) => (await session(signal, absoluteDeadline)).token;
|
|
98008
98008
|
}
|
|
98009
|
-
function createScopedHeartbeatFetch(options) {
|
|
98009
|
+
function createScopedHeartbeatFetch(options, mode = "full") {
|
|
98010
98010
|
const request = createScopedRequest(options, "heartbeat");
|
|
98011
98011
|
const origin = new URL(options.apiBaseUrl).origin;
|
|
98012
98012
|
return async (input, init) => {
|
|
98013
98013
|
if (typeof input !== "string" && !(input instanceof URL)) throw new Error("BRIDGE_HEARTBEAT_UNSUPPORTED_REQUEST");
|
|
98014
98014
|
const url2 = new URL(input);
|
|
98015
|
-
|
|
98015
|
+
const path40 = mode === "compact" ? /^\/projects\/([^/]+)\/(?:execution-runs|async-jobs)\/([^/]+)\/touch-lease$/u.exec(url2.pathname) : /^\/projects\/([^/]+)\/(?:execution-runs|async-jobs)\/([^/]+)\/touch$/u.exec(url2.pathname);
|
|
98016
|
+
const safeSegment = (segment) => {
|
|
98017
|
+
try {
|
|
98018
|
+
const value = decodeURIComponent(segment);
|
|
98019
|
+
return value !== "." && value !== ".." && !/[/\\\x00]/u.test(value);
|
|
98020
|
+
} catch {
|
|
98021
|
+
return false;
|
|
98022
|
+
}
|
|
98023
|
+
};
|
|
98024
|
+
const rawPath = typeof input === "string" ? /^https?:\/\/[^/?#\\]+(\/[^?#]*)$/iu.exec(input)?.[1] : void 0;
|
|
98025
|
+
if (url2.origin !== origin || url2.username || url2.password || url2.search || url2.hash || !path40 || mode === "compact" && (rawPath !== url2.pathname || !safeSegment(path40[1]) || !safeSegment(path40[2])) || init?.method !== "POST" || typeof init.body !== "string" || Buffer.byteLength(init.body) > 8192) {
|
|
98016
98026
|
throw new Error("BRIDGE_HEARTBEAT_UNSUPPORTED_REQUEST");
|
|
98017
98027
|
}
|
|
98018
98028
|
const result = await request(init.signal ?? void 0, { url: url2.href, body: init.body });
|
|
@@ -99249,7 +99259,7 @@ Do NOT derail the current task - if the operator has an in-flight question, answ
|
|
|
99249
99259
|
}
|
|
99250
99260
|
|
|
99251
99261
|
// src/_generated/version.ts
|
|
99252
|
-
var PKG_VERSION = "0.4.
|
|
99262
|
+
var PKG_VERSION = "0.4.200";
|
|
99253
99263
|
|
|
99254
99264
|
// src/bridge-allowed-origins.ts
|
|
99255
99265
|
var DEFAULT_DIRECTOR_BRIDGE_ALLOWED_ORIGINS = [
|
|
@@ -104421,6 +104431,9 @@ async function noteProjectFolderCreated(deps, projectSlug, taskId, folderPath) {
|
|
|
104421
104431
|
} catch {
|
|
104422
104432
|
}
|
|
104423
104433
|
}
|
|
104434
|
+
function touchConsumerExecutionLease(deps, projectSlug, runId, leaseId) {
|
|
104435
|
+
return deps.renewExecutionLease ? deps.renewExecutionLease(projectSlug, runId, leaseId, deps.activeLease?.watch.signal) : deps.client.touchExecutionRun(projectSlug, runId, leaseId);
|
|
104436
|
+
}
|
|
104424
104437
|
async function runHasLease(deps, projectSlug, runId, leaseId) {
|
|
104425
104438
|
try {
|
|
104426
104439
|
const run4 = await deps.client.getExecutionRun(projectSlug, runId);
|
|
@@ -104580,7 +104593,7 @@ async function driveTurn(deps, codex, projectSlug, runId, leaseId, threadId, inp
|
|
|
104580
104593
|
unsubEvent();
|
|
104581
104594
|
};
|
|
104582
104595
|
const touchTimer = deps.activeLease ? void 0 : setInterval(() => {
|
|
104583
|
-
void deps
|
|
104596
|
+
void touchConsumerExecutionLease(deps, projectSlug, runId, leaseId).catch(() => {
|
|
104584
104597
|
});
|
|
104585
104598
|
}, deps.touchIntervalMs);
|
|
104586
104599
|
touchTimer?.unref?.();
|
|
@@ -104716,7 +104729,7 @@ async function driveRun(deps, projectSlug, runId, shutdown) {
|
|
|
104716
104729
|
}
|
|
104717
104730
|
},
|
|
104718
104731
|
touch: async () => {
|
|
104719
|
-
const renewed = await client.touchExecutionRun(projectSlug, runId, leaseId);
|
|
104732
|
+
const renewed = deps.renewExecutionLease ? await deps.renewExecutionLease(projectSlug, runId, leaseId, watch.signal) : await client.touchExecutionRun(projectSlug, runId, leaseId);
|
|
104720
104733
|
if (renewed?.projectSlug !== projectSlug || renewed.id !== runId || renewed.leaseId !== leaseId || renewed.status !== "running") return null;
|
|
104721
104734
|
return renewed;
|
|
104722
104735
|
},
|
|
@@ -104855,7 +104868,15 @@ async function driveWatchedRun(deps, projectSlug, runId, claimed, leaseId, watch
|
|
|
104855
104868
|
}
|
|
104856
104869
|
});
|
|
104857
104870
|
try {
|
|
104858
|
-
|
|
104871
|
+
const renew = deps.renewExecutionLease;
|
|
104872
|
+
const renewExecutionLease = renew && (async (slug, id, lease) => {
|
|
104873
|
+
if (slug !== projectSlug || id !== runId || lease !== leaseId) throw new Error("Compact heartbeat claim mismatch");
|
|
104874
|
+
watch.assertActive();
|
|
104875
|
+
const result = await renew(slug, id, lease, watch.signal);
|
|
104876
|
+
watch.assertActive();
|
|
104877
|
+
return result;
|
|
104878
|
+
});
|
|
104879
|
+
await driveClaimedRun({ ...deps, client: guardedClient, activeLease, renewExecutionLease }, projectSlug, runId, claimed, leaseId);
|
|
104859
104880
|
} catch (error51) {
|
|
104860
104881
|
if (!watch.signal.aborted && !(executionFinished && error51 instanceof ExecutionLeaseError)) throw error51;
|
|
104861
104882
|
} finally {
|
|
@@ -106015,7 +106036,7 @@ ${coldClosureInstruction}` : workInstruction;
|
|
|
106015
106036
|
const deliveryTask = readiness.task;
|
|
106016
106037
|
const deliveryKey = deliveryLockKey(localCheckoutRealPath ?? checkout?.path ?? deliveryWorktree);
|
|
106017
106038
|
const deliveryHeartbeat = deps.activeLease ? void 0 : setInterval(() => {
|
|
106018
|
-
void deps
|
|
106039
|
+
void touchConsumerExecutionLease(deps, projectSlug, runId, leaseId).catch(() => {
|
|
106019
106040
|
});
|
|
106020
106041
|
}, deps.touchIntervalMs);
|
|
106021
106042
|
deliveryHeartbeat?.unref?.();
|
|
@@ -106649,7 +106670,7 @@ async function driveNonCodeRun(deps, projectSlug, runId, leaseId, task, domain2,
|
|
|
106649
106670
|
}
|
|
106650
106671
|
const runExec = deps.runDeliverableExec ?? ((input, provider) => runAgentExec(input, void 0, provider));
|
|
106651
106672
|
const touchTimer = deps.activeLease ? void 0 : setInterval(() => {
|
|
106652
|
-
void deps
|
|
106673
|
+
void touchConsumerExecutionLease(deps, projectSlug, runId, leaseId).catch(() => {
|
|
106653
106674
|
});
|
|
106654
106675
|
}, deps.touchIntervalMs);
|
|
106655
106676
|
touchTimer?.unref?.();
|
|
@@ -107969,7 +107990,7 @@ async function driveClaimableAsyncJob(deps, projectSlug, jobId, preClaimJob, sec
|
|
|
107969
107990
|
const retryReport = async (action, stillCurrent, remaining, signal) => {
|
|
107970
107991
|
if (!reportAction) return null;
|
|
107971
107992
|
let pause = 100;
|
|
107972
|
-
while (stillCurrent()) {
|
|
107993
|
+
while (!signal?.aborted && stillCurrent()) {
|
|
107973
107994
|
let retryAfter = 0;
|
|
107974
107995
|
try {
|
|
107975
107996
|
return await reportAction(action, remaining());
|
|
@@ -107977,10 +107998,22 @@ async function driveClaimableAsyncJob(deps, projectSlug, jobId, preClaimJob, sec
|
|
|
107977
107998
|
if (error51 instanceof MrrlinApiError) {
|
|
107978
107999
|
if (error51.status < 500 && error51.status !== 429) throw error51;
|
|
107979
108000
|
retryAfter = error51.retryAfterMs ?? 0;
|
|
108001
|
+
if (Number.isNaN(retryAfter) || retryAfter < 0) retryAfter = 0;
|
|
107980
108002
|
}
|
|
107981
108003
|
}
|
|
107982
|
-
|
|
107983
|
-
|
|
108004
|
+
const retryIn = Math.max(pause, retryAfter);
|
|
108005
|
+
const retryAt = performance.now() + retryIn;
|
|
108006
|
+
let wait = retryIn;
|
|
108007
|
+
while (wait > 0) {
|
|
108008
|
+
if (signal?.aborted || !stillCurrent() || wait >= remaining()) return null;
|
|
108009
|
+
try {
|
|
108010
|
+
await (0, import_promises20.setTimeout)(Math.min(Math.ceil(wait), 2147483647), void 0, { signal });
|
|
108011
|
+
} catch (error51) {
|
|
108012
|
+
if (signal?.aborted && error51 instanceof Error && error51.name === "AbortError") return null;
|
|
108013
|
+
throw error51;
|
|
108014
|
+
}
|
|
108015
|
+
wait = retryAt - performance.now();
|
|
108016
|
+
}
|
|
107984
108017
|
pause = Math.min(pause * 2, 2e3);
|
|
107985
108018
|
}
|
|
107986
108019
|
return null;
|
|
@@ -108152,8 +108185,11 @@ async function driveClaimableAsyncJob(deps, projectSlug, jobId, preClaimJob, sec
|
|
|
108152
108185
|
let nextHeartbeat = elapsed() + deps.touchIntervalMs;
|
|
108153
108186
|
const touchTimer = setInterval(() => {
|
|
108154
108187
|
if (!reportAction) {
|
|
108155
|
-
if (!shutdown?.aborted)
|
|
108156
|
-
|
|
108188
|
+
if (!shutdown?.aborted) {
|
|
108189
|
+
const renewal = deps.renewAsyncLease ? deps.renewAsyncLease(projectSlug, jobId, leaseId, shutdown) : deps.client.touchAsyncJob(projectSlug, jobId, leaseId);
|
|
108190
|
+
void renewal.catch(() => {
|
|
108191
|
+
});
|
|
108192
|
+
}
|
|
108157
108193
|
return;
|
|
108158
108194
|
}
|
|
108159
108195
|
if (!checkOwnership() || beginning || heartbeatPending || elapsed() < nextHeartbeat) return;
|
|
@@ -118847,6 +118883,14 @@ async function runStartupPruneSafely(prune2, log2) {
|
|
|
118847
118883
|
}
|
|
118848
118884
|
}
|
|
118849
118885
|
async function startDirectorBridge(startupDeps = {}) {
|
|
118886
|
+
const agentSecret = readAgentSecret();
|
|
118887
|
+
const scopedScheduler = process.env.MRRLIN_BRIDGE_SCOPED_SCHEDULER === "1";
|
|
118888
|
+
const compactFlag = process.env.MRRLIN_BRIDGE_COMPACT_HEARTBEAT?.trim().toLowerCase();
|
|
118889
|
+
if (compactFlag && !["0", "1", "false"].includes(compactFlag)) throw new Error("Invalid MRRLIN_BRIDGE_COMPACT_HEARTBEAT");
|
|
118890
|
+
const compactHeartbeat = compactFlag === "1";
|
|
118891
|
+
if (compactHeartbeat && (!agentSecret || !scopedScheduler)) {
|
|
118892
|
+
throw new Error("Compact heartbeat requires a durable agent credential and scoped scheduler");
|
|
118893
|
+
}
|
|
118850
118894
|
const signingProvider = buildBridgeSigningProvider();
|
|
118851
118895
|
const config2 = parseConfig();
|
|
118852
118896
|
const failureLog = createFailureLog();
|
|
@@ -118871,55 +118915,57 @@ async function startDirectorBridge(startupDeps = {}) {
|
|
|
118871
118915
|
};
|
|
118872
118916
|
const shutdownHolder = { fn: null };
|
|
118873
118917
|
const resumableCountHolder = { fn: null };
|
|
118874
|
-
const
|
|
118875
|
-
|
|
118876
|
-
|
|
118877
|
-
|
|
118878
|
-
|
|
118879
|
-
|
|
118880
|
-
|
|
118881
|
-
|
|
118882
|
-
|
|
118883
|
-
|
|
118884
|
-
|
|
118885
|
-
|
|
118886
|
-
|
|
118887
|
-
|
|
118918
|
+
const startBackgroundServices = () => {
|
|
118919
|
+
const { path: binPath, source: binPathSource } = resolveBinPath({
|
|
118920
|
+
argv1: process.argv[1] ?? ""
|
|
118921
|
+
});
|
|
118922
|
+
const selfUpdateHandle2 = startSelfUpdate({
|
|
118923
|
+
binPath,
|
|
118924
|
+
binPathSource,
|
|
118925
|
+
getActiveTurnCount: () => wrappedTurnLock.activeCount(),
|
|
118926
|
+
getResumableTurnCount: () => resumableCountHolder.fn?.() ?? 0,
|
|
118927
|
+
getIdleMs: () => Date.now() - lastTurnEndedAt,
|
|
118928
|
+
pkgVersion: PKG_VERSION,
|
|
118929
|
+
shutdown: () => {
|
|
118930
|
+
try {
|
|
118931
|
+
void shutdownHolder.fn?.();
|
|
118932
|
+
} catch (e) {
|
|
118933
|
+
process.stderr.write(
|
|
118934
|
+
`[mrrlin-mcp director-bridge] error self_update shutdown threw: ${String(
|
|
118935
|
+
e?.message ?? e
|
|
118936
|
+
)}
|
|
118937
|
+
`
|
|
118938
|
+
);
|
|
118939
|
+
}
|
|
118940
|
+
},
|
|
118941
|
+
log: (level, event, fields) => {
|
|
118942
|
+
const payload = fields ? ` ${JSON.stringify(fields)}` : "";
|
|
118888
118943
|
process.stderr.write(
|
|
118889
|
-
`[mrrlin-mcp director-bridge]
|
|
118890
|
-
e?.message ?? e
|
|
118891
|
-
)}
|
|
118944
|
+
`[mrrlin-mcp director-bridge] ${level} ${event}${payload}
|
|
118892
118945
|
`
|
|
118893
118946
|
);
|
|
118894
118947
|
}
|
|
118895
|
-
}
|
|
118896
|
-
|
|
118897
|
-
|
|
118898
|
-
|
|
118899
|
-
|
|
118900
|
-
`
|
|
118901
|
-
);
|
|
118948
|
+
});
|
|
118949
|
+
const codexProbeHandle2 = startCodexProbe();
|
|
118950
|
+
try {
|
|
118951
|
+
migrateRetiredApiBaseUrls();
|
|
118952
|
+
} catch {
|
|
118902
118953
|
}
|
|
118903
|
-
|
|
118904
|
-
|
|
118954
|
+
return { selfUpdateHandle: selfUpdateHandle2, codexProbeHandle: codexProbeHandle2 };
|
|
118955
|
+
};
|
|
118956
|
+
const legacyBackgroundServices = compactHeartbeat ? void 0 : startBackgroundServices();
|
|
118905
118957
|
const consumerState = {
|
|
118906
118958
|
inFlightRunIds: /* @__PURE__ */ new Set(),
|
|
118907
118959
|
lastClaimedRunId: null,
|
|
118908
118960
|
lastClaimAt: null
|
|
118909
118961
|
};
|
|
118910
118962
|
const health = createServiceHealth();
|
|
118911
|
-
try {
|
|
118912
|
-
migrateRetiredApiBaseUrls();
|
|
118913
|
-
} catch {
|
|
118914
|
-
}
|
|
118915
118963
|
const apiBaseUrl = readDirectorBridgeApiBaseUrl();
|
|
118916
118964
|
const envToken = process.env.MRRLIN_TOKEN?.trim() || void 0;
|
|
118917
|
-
const agentSecret = readAgentSecret();
|
|
118918
118965
|
let tokenProvider = null;
|
|
118919
118966
|
let tokenRefresher = null;
|
|
118920
118967
|
let schedulerGenerations;
|
|
118921
118968
|
let schedulerScope;
|
|
118922
|
-
const scopedScheduler = process.env.MRRLIN_BRIDGE_SCOPED_SCHEDULER === "1";
|
|
118923
118969
|
const ownedSdk = Boolean(agentSecret) && scopedScheduler && process.env.MRRLIN_BRIDGE_OWNED_SDK === "1";
|
|
118924
118970
|
const scopedRunRead = Boolean(agentSecret) && scopedScheduler && process.env.MRRLIN_BRIDGE_SCOPED_RUN_READ === "1";
|
|
118925
118971
|
const baseFetch = globalThis.fetch;
|
|
@@ -118948,8 +118994,12 @@ async function startDirectorBridge(startupDeps = {}) {
|
|
|
118948
118994
|
}) };
|
|
118949
118995
|
} catch {
|
|
118950
118996
|
schedulerScope?.dispose();
|
|
118951
|
-
|
|
118997
|
+
const disposal = schedulerGenerations?.dispose();
|
|
118952
118998
|
schedulerScope = void 0;
|
|
118999
|
+
if (compactHeartbeat) {
|
|
119000
|
+
await disposal;
|
|
119001
|
+
throw new Error("BRIDGE_COMPACT_HEARTBEAT_START_FAILED");
|
|
119002
|
+
}
|
|
118953
119003
|
refreshProvider = { getToken: async () => {
|
|
118954
119004
|
throw new Error("BRIDGE_REFRESH_START_FAILED");
|
|
118955
119005
|
} };
|
|
@@ -119033,6 +119083,9 @@ async function startDirectorBridge(startupDeps = {}) {
|
|
|
119033
119083
|
throw new Error("BRIDGE_RUN_READ_START_FAILED");
|
|
119034
119084
|
});
|
|
119035
119085
|
}
|
|
119086
|
+
const compactHeartbeatShutdown = compactHeartbeat ? new AbortController() : void 0;
|
|
119087
|
+
let renewExecutionLease;
|
|
119088
|
+
let renewAsyncLease;
|
|
119036
119089
|
if (tokenProvider && scopedScheduler) {
|
|
119037
119090
|
const heartbeat = schedulerScope && schedulerGenerations ? createMrrlinClient({ baseUrl: apiBaseUrl, fetch: createScopedHeartbeatFetch({
|
|
119038
119091
|
scope: schedulerScope,
|
|
@@ -119040,10 +119093,25 @@ async function startDirectorBridge(startupDeps = {}) {
|
|
|
119040
119093
|
apiBaseUrl,
|
|
119041
119094
|
tokenProvider,
|
|
119042
119095
|
timeoutMs: DEFAULT_OPERATION_TIMEOUT_MS
|
|
119043
|
-
}) }) : null;
|
|
119044
|
-
|
|
119045
|
-
|
|
119096
|
+
}, compactHeartbeat ? "compact" : "full") }) : null;
|
|
119097
|
+
if (compactHeartbeat) {
|
|
119098
|
+
if (!heartbeat?.touchExecutionRunLease || !heartbeat.touchAsyncJobLease) {
|
|
119099
|
+
tokenRefresher?.stop();
|
|
119100
|
+
schedulerScope?.dispose();
|
|
119101
|
+
await schedulerGenerations?.dispose();
|
|
119102
|
+
throw new Error("BRIDGE_COMPACT_HEARTBEAT_START_FAILED");
|
|
119103
|
+
}
|
|
119104
|
+
const lifetime = compactHeartbeatShutdown.signal;
|
|
119105
|
+
const execution = heartbeat.touchExecutionRunLease.bind(heartbeat);
|
|
119106
|
+
const asyncJob = heartbeat.touchAsyncJobLease.bind(heartbeat);
|
|
119107
|
+
renewExecutionLease = (slug, id, lease, signal) => execution(slug, id, lease, signal ? AbortSignal.any([signal, lifetime]) : lifetime);
|
|
119108
|
+
renewAsyncLease = (slug, id, lease, signal) => asyncJob(slug, id, lease, signal ? AbortSignal.any([signal, lifetime]) : lifetime);
|
|
119109
|
+
} else {
|
|
119110
|
+
client.touchExecutionRun = (projectSlug, runId, leaseId) => heartbeat ? heartbeat.touchExecutionRun(projectSlug, runId, leaseId) : Promise.reject(new Error("BRIDGE_HEARTBEAT_START_FAILED"));
|
|
119111
|
+
client.touchAsyncJob = (projectSlug, jobId, leaseId) => heartbeat ? heartbeat.touchAsyncJob(projectSlug, jobId, leaseId) : Promise.reject(new Error("BRIDGE_HEARTBEAT_START_FAILED"));
|
|
119112
|
+
}
|
|
119046
119113
|
}
|
|
119114
|
+
const { selfUpdateHandle, codexProbeHandle } = legacyBackgroundServices ?? startBackgroundServices();
|
|
119047
119115
|
const artifactsGc = startArtifactsGc(config2.stateDir);
|
|
119048
119116
|
const agentKeepalive = createAgentKeepalive({
|
|
119049
119117
|
acquire: (providerId) => resolveProvider(process.env, providerId).acquireWarm(),
|
|
@@ -119069,6 +119137,7 @@ async function startDirectorBridge(startupDeps = {}) {
|
|
|
119069
119137
|
});
|
|
119070
119138
|
const staleSeconds = readEnvInt("MRRLIN_DIRECTOR_BRIDGE_STALE_SECONDS", DEFAULT_STALE_SECONDS);
|
|
119071
119139
|
const consumerDeps = {
|
|
119140
|
+
renewExecutionLease,
|
|
119072
119141
|
client,
|
|
119073
119142
|
connectionStore,
|
|
119074
119143
|
stateDir: config2.stateDir,
|
|
@@ -119221,6 +119290,7 @@ async function startDirectorBridge(startupDeps = {}) {
|
|
|
119221
119290
|
const activeReports = /* @__PURE__ */ new Set();
|
|
119222
119291
|
const reportShutdown = reportDelivery ? new AbortController() : void 0;
|
|
119223
119292
|
const asyncConsumerDeps = {
|
|
119293
|
+
renewAsyncLease,
|
|
119224
119294
|
reportShutdown: reportShutdown?.signal,
|
|
119225
119295
|
onReportDrive: (drive) => {
|
|
119226
119296
|
activeReports.add(drive);
|
|
@@ -119901,8 +119971,9 @@ async function startDirectorBridge(startupDeps = {}) {
|
|
|
119901
119971
|
() => artifactsGc.stop()
|
|
119902
119972
|
],
|
|
119903
119973
|
shutdownCodex: () => codexServerManager.shutdown(),
|
|
119904
|
-
...progressExecution || reportDelivery ? { stopExecution: async () => {
|
|
119974
|
+
...progressExecution || reportDelivery || compactHeartbeat ? { stopExecution: async () => {
|
|
119905
119975
|
executionStopping = true;
|
|
119976
|
+
compactHeartbeatShutdown?.abort();
|
|
119906
119977
|
asyncShutdown?.abort();
|
|
119907
119978
|
reportShutdown?.abort();
|
|
119908
119979
|
for (const controller of activeDrives.keys()) controller.abort();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrrlin-dev/mcp",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.200",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"mrrlin-mcp": "dist/bin.cjs"
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"esbuild": "^0.24.2",
|
|
41
41
|
"tsx": "^4.19.1",
|
|
42
42
|
"typescript": "^5.5.4",
|
|
43
|
+
"@mrrlin/agent-client": "0.0.0",
|
|
43
44
|
"@mrrlin/client": "0.0.0",
|
|
44
45
|
"@mrrlin/director-e2e": "0.0.0",
|
|
45
46
|
"@mrrlin/schemas": "0.0.0",
|
|
46
|
-
"@mrrlin/agent-client": "0.0.0",
|
|
47
47
|
"@mrrlin/tsconfig": "0.0.0",
|
|
48
48
|
"@mrrlin/wiki": "0.0.0"
|
|
49
49
|
},
|