@mrrlin-dev/mcp 0.4.196 → 0.4.198
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 +48 -5
- package/package.json +2 -2
package/dist/bin.cjs
CHANGED
|
@@ -67646,6 +67646,16 @@ var mrrlinExecutionRunSchema = external_exports.object({
|
|
|
67646
67646
|
outcomeAcceptedAt: external_exports.string().datetime().nullable().default(null),
|
|
67647
67647
|
resumedOnQuestionId: external_exports.string().nullable().default(null)
|
|
67648
67648
|
});
|
|
67649
|
+
var compactExecutionTouchResponseSchema = external_exports.object({
|
|
67650
|
+
data: mrrlinExecutionRunSchema.pick({ projectSlug: true, id: true, leaseId: true, leaseRemainingMs: true }).extend({
|
|
67651
|
+
leaseId: external_exports.string().min(1),
|
|
67652
|
+
status: external_exports.literal("running"),
|
|
67653
|
+
executorBearer: external_exports.string().min(1).optional()
|
|
67654
|
+
}).strict()
|
|
67655
|
+
}).strict();
|
|
67656
|
+
var compactAsyncTouchResponseSchema = external_exports.object({
|
|
67657
|
+
data: external_exports.object({ applied: external_exports.literal(true) }).strict()
|
|
67658
|
+
}).strict();
|
|
67649
67659
|
var mrrlinTaskStateSchema = external_exports.object({
|
|
67650
67660
|
projectSlug: mrrlinProjectSlugSchema,
|
|
67651
67661
|
taskId: mrrlinTaskIdSchema,
|
|
@@ -69871,6 +69881,30 @@ function createMrrlinClient(config2) {
|
|
|
69871
69881
|
});
|
|
69872
69882
|
return executionRunResponseSchema.parse(body).data;
|
|
69873
69883
|
},
|
|
69884
|
+
async touchExecutionRunLease(projectSlug, runId, leaseId) {
|
|
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 }) });
|
|
69887
|
+
const data = compactExecutionTouchResponseSchema.parse(response).data;
|
|
69888
|
+
if (data.projectSlug !== projectSlug || data.id !== runId || data.leaseId !== leaseId || data.executorBearer === void 0 !== (data.leaseRemainingMs === void 0)) {
|
|
69889
|
+
throw new Error("Compact heartbeat returned a different execution lease");
|
|
69890
|
+
}
|
|
69891
|
+
return data;
|
|
69892
|
+
} catch (error51) {
|
|
69893
|
+
if (error51 instanceof MrrlinApiError && error51.status === 409 && error51.code !== "EXECUTION_LEASE_EFFECT_BUSY" && error51.code !== "COMPACT_HEARTBEAT_UNREPRESENTABLE")
|
|
69894
|
+
return null;
|
|
69895
|
+
throw error51;
|
|
69896
|
+
}
|
|
69897
|
+
},
|
|
69898
|
+
async touchAsyncJobLease(projectSlug, jobId, leaseId) {
|
|
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 }) });
|
|
69901
|
+
return compactAsyncTouchResponseSchema.parse(response).data.applied;
|
|
69902
|
+
} catch (error51) {
|
|
69903
|
+
if (error51 instanceof MrrlinApiError && error51.status === 409)
|
|
69904
|
+
return false;
|
|
69905
|
+
throw error51;
|
|
69906
|
+
}
|
|
69907
|
+
},
|
|
69874
69908
|
async touchExecutionRun(projectSlug, runId, leaseId) {
|
|
69875
69909
|
try {
|
|
69876
69910
|
const body = await request(`${projectPath(projectSlug)}/execution-runs/${encodeURIComponent(runId)}/touch`, {
|
|
@@ -97200,7 +97234,7 @@ function createOwnedStreamingFetch(scope, origin) {
|
|
|
97200
97234
|
throw new TypeError("Invalid streaming transport origin");
|
|
97201
97235
|
}
|
|
97202
97236
|
return async (input) => {
|
|
97203
|
-
const { deadlineAt, signal, method } = input;
|
|
97237
|
+
const { deadlineAt, deadlineSignal, signal, method } = input;
|
|
97204
97238
|
const url2 = new URL(input.url);
|
|
97205
97239
|
if (url2.origin !== expected.origin || url2.username || url2.password || url2.hash || !["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE"].includes(method) || input.body !== void 0 && (typeof input.body !== "string" && !(input.body instanceof Uint8Array) || method === "GET" || method === "HEAD")) {
|
|
97206
97240
|
throw new TypeError("Unsupported streaming request");
|
|
@@ -97212,7 +97246,14 @@ function createOwnedStreamingFetch(scope, origin) {
|
|
|
97212
97246
|
if (!Number.isFinite(remaining) || remaining <= 0 || remaining > 2147483647 || signal?.aborted) throw aborted2();
|
|
97213
97247
|
let onDeadline = expire;
|
|
97214
97248
|
const timer = setTimeout(() => onDeadline(), Math.ceil(remaining));
|
|
97215
|
-
|
|
97249
|
+
let canceledBeforeDeadline = false;
|
|
97250
|
+
const caller = signal ? (0, import_node_events3.addAbortListener)(signal, () => {
|
|
97251
|
+
if (deadlineSignal?.aborted && signal.reason === deadlineSignal.reason) onDeadline();
|
|
97252
|
+
else {
|
|
97253
|
+
canceledBeforeDeadline = performance.now() < deadlineAt;
|
|
97254
|
+
expire();
|
|
97255
|
+
}
|
|
97256
|
+
}) : void 0;
|
|
97216
97257
|
let retained = false;
|
|
97217
97258
|
const cleanup = () => {
|
|
97218
97259
|
clearTimeout(timer);
|
|
@@ -97227,7 +97268,7 @@ function createOwnedStreamingFetch(scope, origin) {
|
|
|
97227
97268
|
});
|
|
97228
97269
|
let waitingForHeaders = false;
|
|
97229
97270
|
const rotate = () => {
|
|
97230
|
-
if (waitingForHeaders) input.rotateOnHeaderTimeout?.rotate(operation.generation);
|
|
97271
|
+
if (waitingForHeaders && !canceledBeforeDeadline) input.rotateOnHeaderTimeout?.rotate(operation.generation);
|
|
97231
97272
|
};
|
|
97232
97273
|
onDeadline = () => {
|
|
97233
97274
|
rotate();
|
|
@@ -97989,8 +98030,9 @@ function createOwnedSdkOperation(options) {
|
|
|
97989
98030
|
const authenticate = createScopedTokenRefresh(options, "ordinary");
|
|
97990
98031
|
return (session) => {
|
|
97991
98032
|
const deadlineAt = session?.deadlineAt ?? performance.now() + options.timeoutMs;
|
|
98033
|
+
const deadlineSignal = AbortSignal.timeout(Math.max(0, Math.ceil(deadlineAt - performance.now())));
|
|
97992
98034
|
return {
|
|
97993
|
-
signal:
|
|
98035
|
+
signal: deadlineSignal,
|
|
97994
98036
|
headers: async (authSignal) => ({
|
|
97995
98037
|
authorization: "Bearer " + (session?.token ?? await authenticate(authSignal, deadlineAt))
|
|
97996
98038
|
}),
|
|
@@ -98004,6 +98046,7 @@ function createOwnedSdkOperation(options) {
|
|
|
98004
98046
|
url: url2,
|
|
98005
98047
|
method,
|
|
98006
98048
|
deadlineAt,
|
|
98049
|
+
deadlineSignal,
|
|
98007
98050
|
rotateOnHeaderTimeout: options.generations,
|
|
98008
98051
|
signal: init?.signal ?? void 0,
|
|
98009
98052
|
headers: Object.fromEntries(new Headers(init?.headers)),
|
|
@@ -99206,7 +99249,7 @@ Do NOT derail the current task - if the operator has an in-flight question, answ
|
|
|
99206
99249
|
}
|
|
99207
99250
|
|
|
99208
99251
|
// src/_generated/version.ts
|
|
99209
|
-
var PKG_VERSION = "0.4.
|
|
99252
|
+
var PKG_VERSION = "0.4.198";
|
|
99210
99253
|
|
|
99211
99254
|
// src/bridge-allowed-origins.ts
|
|
99212
99255
|
var DEFAULT_DIRECTOR_BRIDGE_ALLOWED_ORIGINS = [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrrlin-dev/mcp",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.198",
|
|
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",
|
|
44
43
|
"@mrrlin/client": "0.0.0",
|
|
45
44
|
"@mrrlin/director-e2e": "0.0.0",
|
|
46
45
|
"@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
|
},
|