@mrrlin-dev/mcp 0.4.284 → 0.4.286
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 +35 -7
- package/package.json +1 -1
package/dist/bin.cjs
CHANGED
|
@@ -21935,7 +21935,9 @@ var init_dist = __esm({
|
|
|
21935
21935
|
hostname: external_exports.string(),
|
|
21936
21936
|
os: external_exports.string(),
|
|
21937
21937
|
cliVersion: external_exports.string(),
|
|
21938
|
-
credentialSecret: external_exports.string().optional()
|
|
21938
|
+
credentialSecret: external_exports.string().optional(),
|
|
21939
|
+
// Optional hint from `mrrlin-mcp connect` naming which AI host (codex/claude/agy) actually ran it.
|
|
21940
|
+
detectedProvider: external_exports.string().optional()
|
|
21939
21941
|
});
|
|
21940
21942
|
redeemSetupCodeResponseSchema = external_exports.discriminatedUnion("kind", [
|
|
21941
21943
|
external_exports.object({
|
|
@@ -96406,6 +96408,7 @@ var EXECUTOR_THREAD_ENV = "MRRLIN_EXECUTOR_THREAD";
|
|
|
96406
96408
|
function isExecutorThread(env = process.env) {
|
|
96407
96409
|
return env[EXECUTOR_THREAD_ENV]?.trim() === "1";
|
|
96408
96410
|
}
|
|
96411
|
+
var INTERACTIVE_DIRECTOR_THREAD_ENV = "MRRLIN_INTERACTIVE_DIRECTOR";
|
|
96409
96412
|
|
|
96410
96413
|
// src/decision-consensus.ts
|
|
96411
96414
|
init_dist2();
|
|
@@ -108000,7 +108003,7 @@ Do NOT derail the current task - if the operator has an in-flight question, answ
|
|
|
108000
108003
|
}
|
|
108001
108004
|
|
|
108002
108005
|
// src/_generated/version.ts
|
|
108003
|
-
var PKG_VERSION = "0.4.
|
|
108006
|
+
var PKG_VERSION = "0.4.286";
|
|
108004
108007
|
|
|
108005
108008
|
// src/bridge-allowed-origins.ts
|
|
108006
108009
|
var DEFAULT_DIRECTOR_BRIDGE_ALLOWED_ORIGINS = [
|
|
@@ -127816,7 +127819,7 @@ function buildThreadStartParams(msg, config2, desiredModel) {
|
|
|
127816
127819
|
ephemeral: null,
|
|
127817
127820
|
// Claude and Agy spawn a process per thread and every Director turn starts or resumes one,
|
|
127818
127821
|
// so the turn's own project always reaches the child, including after a project switch.
|
|
127819
|
-
env: directorThreadEnv(msg.context?.projectSlug)
|
|
127822
|
+
env: { ...directorThreadEnv(msg.context?.projectSlug), [INTERACTIVE_DIRECTOR_THREAD_ENV]: "1" }
|
|
127820
127823
|
};
|
|
127821
127824
|
}
|
|
127822
127825
|
function readEnvInt(name, fallback) {
|
|
@@ -132854,13 +132857,28 @@ function zodInputToJsonSchema(schema2) {
|
|
|
132854
132857
|
}
|
|
132855
132858
|
return { properties, required: required2, type: "object" };
|
|
132856
132859
|
}
|
|
132860
|
+
var EXECUTION_MODE_GUIDANCE = "Set codeExecution to true for a run that changes code, or false for read-only or non-code work.";
|
|
132861
|
+
var directorCreateExecutionRunSchema = mcpToolInputSchemas[mcpToolNames.createExecutionRun].extend({
|
|
132862
|
+
codeExecution: external_exports.boolean({ error: EXECUTION_MODE_GUIDANCE })
|
|
132863
|
+
});
|
|
132857
132864
|
function createMrrlinMcpServer(options = {}, owned) {
|
|
132858
132865
|
const resolved = resolveServerOptions(options);
|
|
132859
132866
|
const tools = createMrrlinTools(resolved);
|
|
132867
|
+
const runToolName = mcpToolNames.createExecutionRun;
|
|
132868
|
+
const interactiveDirector = process.env[INTERACTIVE_DIRECTOR_THREAD_ENV] === "1";
|
|
132869
|
+
const inputSchemas = interactiveDirector ? { ...mcpToolInputSchemas, [runToolName]: directorCreateExecutionRunSchema } : mcpToolInputSchemas;
|
|
132870
|
+
if (interactiveDirector) {
|
|
132871
|
+
const runTool = tools[runToolName];
|
|
132872
|
+
tools[runToolName] = {
|
|
132873
|
+
...runTool,
|
|
132874
|
+
inputSchema: inputSchemas[runToolName],
|
|
132875
|
+
description: EXECUTION_MODE_GUIDANCE + ` For code changes that require scoped approval, have the operator use the task page's approval and run controls. ${runTool.description}`
|
|
132876
|
+
};
|
|
132877
|
+
}
|
|
132860
132878
|
assertToolContractCoverage(
|
|
132861
132879
|
Object.values(mcpToolNames),
|
|
132862
132880
|
toolRegistry,
|
|
132863
|
-
|
|
132881
|
+
inputSchemas,
|
|
132864
132882
|
tools
|
|
132865
132883
|
);
|
|
132866
132884
|
const server = new Server(
|
|
@@ -132888,8 +132906,7 @@ function createMrrlinMcpServer(options = {}, owned) {
|
|
|
132888
132906
|
if (name === mcpToolNames.createExecutionRun && Object.hasOwn(args, "code_execution")) {
|
|
132889
132907
|
return buildToolError({ code: "INVALID_CODE_EXECUTION_FIELD", message: "Use codeExecution, not code_execution." });
|
|
132890
132908
|
}
|
|
132891
|
-
const
|
|
132892
|
-
const parsed = schema2.safeParse(args);
|
|
132909
|
+
const parsed = inputSchemas[name].safeParse(args);
|
|
132893
132910
|
if (!parsed.success) {
|
|
132894
132911
|
return buildToolError({
|
|
132895
132912
|
code: "VALIDATION_FAILED",
|
|
@@ -133705,6 +133722,15 @@ function parseCode(argv) {
|
|
|
133705
133722
|
function isUnauthorized(error51) {
|
|
133706
133723
|
return typeof error51 === "object" && error51 !== null && error51.status === 401;
|
|
133707
133724
|
}
|
|
133725
|
+
function detectCallerProvider(env) {
|
|
133726
|
+
const matches = [];
|
|
133727
|
+
if (env.CLAUDECODE === "1" || Boolean(env.CLAUDE_CODE_ENTRYPOINT?.trim())) matches.push("claude");
|
|
133728
|
+
if (Boolean(env.CODEX_THREAD_ID?.trim()) || env.CODEX_CI === "1" || Boolean(env.CODEX_SANDBOX?.trim())) {
|
|
133729
|
+
matches.push("codex");
|
|
133730
|
+
}
|
|
133731
|
+
if (env.ANTIGRAVITY_AGENT === "1" || Boolean(env.ANTIGRAVITY_CONVERSATION_ID?.trim())) matches.push("agy");
|
|
133732
|
+
return matches.length === 1 ? matches[0] : void 0;
|
|
133733
|
+
}
|
|
133708
133734
|
async function runConnect(argv, deps) {
|
|
133709
133735
|
const say = (message) => deps.log(`[mrrlin-mcp connect] ${message}`);
|
|
133710
133736
|
const code = parseCode(argv);
|
|
@@ -133712,11 +133738,13 @@ async function runConnect(argv, deps) {
|
|
|
133712
133738
|
say("Usage: mrrlin-mcp connect --code <setup code> [--switch-account]");
|
|
133713
133739
|
return 2;
|
|
133714
133740
|
}
|
|
133741
|
+
const detectedProvider = detectCallerProvider(deps.env);
|
|
133715
133742
|
const baseBody = {
|
|
133716
133743
|
code,
|
|
133717
133744
|
hostname: deps.hostname,
|
|
133718
133745
|
os: `${deps.platform} ${deps.osRelease}`.trim(),
|
|
133719
|
-
cliVersion: deps.cliVersion
|
|
133746
|
+
cliVersion: deps.cliVersion,
|
|
133747
|
+
...detectedProvider ? { detectedProvider } : {}
|
|
133720
133748
|
};
|
|
133721
133749
|
const stored = deps.readSecret();
|
|
133722
133750
|
const switchAccount = argv.includes("--switch-account");
|