@mrrlin-dev/mcp 0.4.52 → 0.4.54
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 +37 -6
- package/package.json +2 -2
package/dist/bin.cjs
CHANGED
|
@@ -38200,6 +38200,10 @@ var mrrlinTaskCreateShapeSchema = external_exports.object({
|
|
|
38200
38200
|
title: external_exports.string().min(1),
|
|
38201
38201
|
type: mrrlinTaskTypeSchema.default("task"),
|
|
38202
38202
|
verificationDueAt: external_exports.string().datetime().nullable().optional()
|
|
38203
|
+
// `declaredOutcome` is deliberately ABSENT — «required at spec approval, never at creation», as
|
|
38204
|
+
// the comment beside the READ schema's own field says. It is refused with a 400 at the route
|
|
38205
|
+
// rather than declared-and-rejected here (`OQ-084`); see `rejectsDeclaredOutcomeAtCreation` in
|
|
38206
|
+
// `apps/api/src/index.ts` for why the refusal cannot live in this schema.
|
|
38203
38207
|
});
|
|
38204
38208
|
function refineTaskCreateDomain(data, ctx) {
|
|
38205
38209
|
if (data.domain === void 0 && data.parentTaskId == null) {
|
|
@@ -42437,7 +42441,7 @@ Do NOT derail the current task - if the operator has an in-flight question, answ
|
|
|
42437
42441
|
}
|
|
42438
42442
|
|
|
42439
42443
|
// src/_generated/version.ts
|
|
42440
|
-
var PKG_VERSION = "0.4.
|
|
42444
|
+
var PKG_VERSION = "0.4.54";
|
|
42441
42445
|
|
|
42442
42446
|
// src/api-base-url-migrate.ts
|
|
42443
42447
|
var import_node_fs4 = __toESM(require("node:fs"), 1);
|
|
@@ -42467,6 +42471,8 @@ function renderEcosystemConfig(opts) {
|
|
|
42467
42471
|
PATH: opts.pathEnv,
|
|
42468
42472
|
MRRLIN_DIRECTOR_BRIDGE_LOG: "1"
|
|
42469
42473
|
};
|
|
42474
|
+
const telemetryProject = opts.telemetryDefaultProject?.trim();
|
|
42475
|
+
if (telemetryProject) env.MRRLIN_TELEMETRY_DEFAULT_PROJECT = telemetryProject;
|
|
42470
42476
|
if (opts.user) env.USER = opts.user;
|
|
42471
42477
|
if (opts.codexHome) env.CODEX_HOME = opts.codexHome;
|
|
42472
42478
|
const retargeted = opts.apiBaseUrl ? retargetRetiredApiBaseUrl(opts.apiBaseUrl).baseUrl : void 0;
|
|
@@ -55931,12 +55937,13 @@ function isOriginAllowed(origin, allowed) {
|
|
|
55931
55937
|
var CORS_ALLOW_METHODS = "GET, POST, OPTIONS";
|
|
55932
55938
|
var CORS_ALLOW_HEADERS = "content-type, authorization, sec-websocket-protocol";
|
|
55933
55939
|
function corsAllowOrigin(requestOrigin, allowed) {
|
|
55934
|
-
if (requestOrigin) return requestOrigin;
|
|
55940
|
+
if (requestOrigin) return isOriginAllowed(requestOrigin, allowed) ? requestOrigin : null;
|
|
55935
55941
|
if (allowed?.length === 1) return allowed[0] ?? "*";
|
|
55936
55942
|
return "*";
|
|
55937
55943
|
}
|
|
55938
55944
|
function applyPnaHeaders(res, requestOrigin, allowed) {
|
|
55939
|
-
|
|
55945
|
+
const allowOrigin = corsAllowOrigin(requestOrigin, allowed);
|
|
55946
|
+
if (allowOrigin !== null) res.setHeader("Access-Control-Allow-Origin", allowOrigin);
|
|
55940
55947
|
res.setHeader("Access-Control-Allow-Private-Network", "true");
|
|
55941
55948
|
res.setHeader("Vary", "Origin");
|
|
55942
55949
|
}
|
|
@@ -55974,7 +55981,7 @@ function createBridgeRequestListener(opts) {
|
|
|
55974
55981
|
if (url2.pathname === "/pair/token") {
|
|
55975
55982
|
const origin = (url2.searchParams.get("origin") ?? "").trim();
|
|
55976
55983
|
applyPnaHeaders(res, requestOrigin, allowedOrigins);
|
|
55977
|
-
if (!isOriginAllowed(origin, allowedOrigins)) {
|
|
55984
|
+
if (!isOriginAllowed(origin, allowedOrigins) || requestOrigin !== void 0 && !isOriginAllowed(requestOrigin, allowedOrigins)) {
|
|
55978
55985
|
res.writeHead(403, { "content-type": "application/json" });
|
|
55979
55986
|
res.end(JSON.stringify({ ok: false, error: "Origin not allowed." }));
|
|
55980
55987
|
return;
|
|
@@ -68278,6 +68285,18 @@ function runSetCredential(args) {
|
|
|
68278
68285
|
var import_node_os16 = __toESM(require("node:os"), 1);
|
|
68279
68286
|
var import_node_fs22 = require("node:fs");
|
|
68280
68287
|
var import_node_path33 = __toESM(require("node:path"), 1);
|
|
68288
|
+
function readExistingTelemetryDefaultProject(deps, ecoPath) {
|
|
68289
|
+
try {
|
|
68290
|
+
const existing = deps.readFile?.(ecoPath);
|
|
68291
|
+
if (!existing) return void 0;
|
|
68292
|
+
const match = existing.match(/\bMRRLIN_TELEMETRY_DEFAULT_PROJECT:\s*("(?:[^"\\]|\\.)*")/);
|
|
68293
|
+
if (!match?.[1]) return void 0;
|
|
68294
|
+
const value = JSON.parse(match[1]);
|
|
68295
|
+
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
68296
|
+
} catch {
|
|
68297
|
+
return void 0;
|
|
68298
|
+
}
|
|
68299
|
+
}
|
|
68281
68300
|
var SYSTEM_PATH_DIRS = ["/usr/bin", "/bin", "/usr/sbin", "/sbin"];
|
|
68282
68301
|
function defaultHomeOwnerUid(home) {
|
|
68283
68302
|
try {
|
|
@@ -68346,6 +68365,8 @@ function installService(deps) {
|
|
|
68346
68365
|
).join(":");
|
|
68347
68366
|
const apiBaseUrl = deps.env.MRRLIN_API_BASE_URL?.trim() || void 0;
|
|
68348
68367
|
const staging = deps.env.MRRLIN_STAGING === "1" || !apiBaseUrl && bridgeUrlImpliesStaging(deps.env.MRRLIN_BRIDGE_URL);
|
|
68368
|
+
const ecoPath = import_node_path33.default.join(home, ".mrrlin", "ecosystem.config.cjs");
|
|
68369
|
+
const telemetryDefaultProject = "MRRLIN_TELEMETRY_DEFAULT_PROJECT" in deps.env ? deps.env.MRRLIN_TELEMETRY_DEFAULT_PROJECT?.trim() || void 0 : readExistingTelemetryDefaultProject(deps, ecoPath);
|
|
68349
68370
|
const text = renderEcosystemConfig({
|
|
68350
68371
|
cwd: resolved.cwd,
|
|
68351
68372
|
home,
|
|
@@ -68353,9 +68374,9 @@ function installService(deps) {
|
|
|
68353
68374
|
codexHome: deps.env.CODEX_HOME?.trim() || void 0,
|
|
68354
68375
|
pathEnv,
|
|
68355
68376
|
staging,
|
|
68356
|
-
apiBaseUrl
|
|
68377
|
+
apiBaseUrl,
|
|
68378
|
+
telemetryDefaultProject
|
|
68357
68379
|
});
|
|
68358
|
-
const ecoPath = import_node_path33.default.join(home, ".mrrlin", "ecosystem.config.cjs");
|
|
68359
68380
|
deps.writeFile(ecoPath, text);
|
|
68360
68381
|
const start = deps.runPm2(["startOrReload", ecoPath]);
|
|
68361
68382
|
if (start.code !== 0) {
|
|
@@ -68969,6 +68990,16 @@ async function main() {
|
|
|
68969
68990
|
(0, import_node_fs23.mkdirSync)(import_node_path37.default.dirname(p), { recursive: true, mode: 448 });
|
|
68970
68991
|
(0, import_node_fs23.writeFileSync)(p, c, { mode: 384 });
|
|
68971
68992
|
},
|
|
68993
|
+
// Swallows every error on purpose — the only caller uses this to recover settings from the
|
|
68994
|
+
// config it is about to overwrite, and a missing or unreadable file means "no previous
|
|
68995
|
+
// value", never a failed install. See readExistingTelemetryDefaultProject.
|
|
68996
|
+
readFile: (p) => {
|
|
68997
|
+
try {
|
|
68998
|
+
return (0, import_node_fs23.readFileSync)(p, "utf8");
|
|
68999
|
+
} catch {
|
|
69000
|
+
return null;
|
|
69001
|
+
}
|
|
69002
|
+
},
|
|
68972
69003
|
runPm2: pm2Runner,
|
|
68973
69004
|
which: whichBin,
|
|
68974
69005
|
hasSecret: () => Boolean(readAgentSecret()),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrrlin-dev/mcp",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.54",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"mrrlin-mcp": "dist/bin.cjs"
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"@types/ws": "^8.18.1",
|
|
22
22
|
"esbuild": "^0.24.0",
|
|
23
23
|
"tsx": "^4.22.3",
|
|
24
|
-
"@mrrlin/director-e2e": "0.0.0",
|
|
25
24
|
"@mrrlin/agent-client": "0.0.0",
|
|
25
|
+
"@mrrlin/director-e2e": "0.0.0",
|
|
26
26
|
"@mrrlin/client": "0.0.0",
|
|
27
27
|
"@mrrlin/schemas": "0.0.0",
|
|
28
28
|
"@mrrlin/tsconfig": "0.0.0",
|