@vornrun/mcp 0.7.0-beta.10 → 0.7.0-beta.12
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/index.js +18 -12
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -2780,8 +2780,10 @@ function boundConnectionKey(node, config) {
|
|
|
2780
2780
|
if (node.type === "trigger" && config.triggerType === "connectorPoll") return "connectionId";
|
|
2781
2781
|
if (node.type === "callConnectorAction") return "connectionId";
|
|
2782
2782
|
if (node.type === "httpRequest") return "profileConnectionId";
|
|
2783
|
+
if (node.type === "script") return "secretsFrom";
|
|
2783
2784
|
return null;
|
|
2784
2785
|
}
|
|
2786
|
+
var OPTIONAL_CONNECTION_KEYS = /* @__PURE__ */ new Set(["profileConnectionId", "secretsFrom"]);
|
|
2785
2787
|
function resolveRequirement(requirement, connections) {
|
|
2786
2788
|
const candidates = connections.filter(
|
|
2787
2789
|
(connection2) => requirement.kind === "httpProfile" ? connectorOf(connection2) === HTTP_PROFILE_CONNECTOR : requirement.connectorId !== "" && connectorOf(connection2) === requirement.connectorId
|
|
@@ -2810,11 +2812,10 @@ function toPortable(workflow, projectPath, connections = []) {
|
|
|
2810
2812
|
config[`projectName`] = PROJECT_NAME_TOKEN;
|
|
2811
2813
|
}
|
|
2812
2814
|
delete config.remoteHostId;
|
|
2813
|
-
delete config.secretsFrom;
|
|
2814
2815
|
}
|
|
2815
2816
|
const key = boundConnectionKey(node, config);
|
|
2816
2817
|
const bound = key === null ? "" : config[key];
|
|
2817
|
-
const unbound = key !== null && key
|
|
2818
|
+
const unbound = key !== null && !OPTIONAL_CONNECTION_KEYS.has(key) && bound === "";
|
|
2818
2819
|
if (key !== null && (typeof bound === "string" && bound !== "" || unbound)) {
|
|
2819
2820
|
const source2 = connections.find((connection2) => connection2.id === bound);
|
|
2820
2821
|
const event = config.event;
|
|
@@ -2825,10 +2826,11 @@ function toPortable(workflow, projectPath, connections = []) {
|
|
|
2825
2826
|
nodeId: node.id,
|
|
2826
2827
|
connectorId: source2 ? connectorOf(source2) : typeof declared === "string" ? declared : "",
|
|
2827
2828
|
name: source2?.name ?? "",
|
|
2828
|
-
...typeof event === "string" && event !== "" && { event }
|
|
2829
|
+
...typeof event === "string" && event !== "" && { event },
|
|
2830
|
+
...key === "secretsFrom" && { key }
|
|
2829
2831
|
}
|
|
2830
2832
|
);
|
|
2831
|
-
if (key
|
|
2833
|
+
if (OPTIONAL_CONNECTION_KEYS.has(key)) delete config[key];
|
|
2832
2834
|
else config[key] = "";
|
|
2833
2835
|
}
|
|
2834
2836
|
return { ...node, config };
|
|
@@ -2859,9 +2861,12 @@ function replacePath(value, projectPath) {
|
|
|
2859
2861
|
function unresolvedRequirements(portable, connections) {
|
|
2860
2862
|
const present = new Set(portable.nodes.map((node) => node.id));
|
|
2861
2863
|
return (portable.requires ?? []).filter(
|
|
2862
|
-
(requirement) => present.has(requirement.nodeId) && resolveRequirement(requirement, connections) === void 0
|
|
2864
|
+
(requirement) => present.has(requirement.nodeId) && (bindsOnlyByHand(requirement) || resolveRequirement(requirement, connections) === void 0)
|
|
2863
2865
|
);
|
|
2864
2866
|
}
|
|
2867
|
+
function bindsOnlyByHand(requirement) {
|
|
2868
|
+
return requirement.kind === "connection" && requirement.key === "secretsFrom";
|
|
2869
|
+
}
|
|
2865
2870
|
function fromPortable(portable, bundle, project, connections = [], mintToken = () => crypto.randomUUID()) {
|
|
2866
2871
|
const bindings = /* @__PURE__ */ new Map();
|
|
2867
2872
|
for (const requirement of portable.requires ?? []) {
|
|
@@ -2869,16 +2874,16 @@ function fromPortable(portable, bundle, project, connections = [], mintToken = (
|
|
|
2869
2874
|
}
|
|
2870
2875
|
const nodes = portable.nodes.map((node) => {
|
|
2871
2876
|
const config = { ...node.config };
|
|
2872
|
-
|
|
2873
|
-
|
|
2877
|
+
const key = boundConnectionKey(node, config);
|
|
2878
|
+
if (key !== null && OPTIONAL_CONNECTION_KEYS.has(key)) delete config[key];
|
|
2879
|
+
for (const [key2, value] of Object.entries(config)) {
|
|
2874
2880
|
if (typeof value !== "string") continue;
|
|
2875
|
-
config[
|
|
2881
|
+
config[key2] = value.split(PROJECT_PATH_TOKEN).join(project.path.replace(/[/\\]+$/, "")).split(PROJECT_NAME_TOKEN).join(project.name);
|
|
2876
2882
|
}
|
|
2877
2883
|
for (const requirement of bindings.get(node.id) ?? []) {
|
|
2884
|
+
if (bindsOnlyByHand(requirement) || key === null) continue;
|
|
2878
2885
|
const resolved = resolveRequirement(requirement, connections);
|
|
2879
|
-
if (resolved
|
|
2880
|
-
if (requirement.kind === "httpProfile") config.profileConnectionId = resolved;
|
|
2881
|
-
else config.connectionId = resolved;
|
|
2886
|
+
if (resolved !== void 0) config[key] = resolved;
|
|
2882
2887
|
}
|
|
2883
2888
|
if (node.type === "trigger" && config.triggerType === "webhook" && !config.token) {
|
|
2884
2889
|
config.token = mintToken();
|
|
@@ -4330,6 +4335,7 @@ function registerDeviceTools(server) {
|
|
|
4330
4335
|
sessionId: id,
|
|
4331
4336
|
udid: args.udid
|
|
4332
4337
|
});
|
|
4338
|
+
if (!r.ok) throw new Error(r.message);
|
|
4333
4339
|
return {
|
|
4334
4340
|
content: [{ type: "text", text: `Claimed ${r.name} (${r.udid}).` }]
|
|
4335
4341
|
};
|
|
@@ -4523,7 +4529,7 @@ console.warn = (...args) => _origError("[mcp:warn]", ...args);
|
|
|
4523
4529
|
console.error = (...args) => _origError("[mcp:error]", ...args);
|
|
4524
4530
|
async function main() {
|
|
4525
4531
|
configManager.init();
|
|
4526
|
-
const version = true ? "0.7.0-beta.
|
|
4532
|
+
const version = true ? "0.7.0-beta.12" : createRequire(import.meta.url)("../package.json").version;
|
|
4527
4533
|
const server = createMcpServer(version);
|
|
4528
4534
|
const transport = new StdioServerTransport();
|
|
4529
4535
|
await server.connect(transport);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vornrun/mcp",
|
|
3
|
-
"version": "0.7.0-beta.
|
|
3
|
+
"version": "0.7.0-beta.12",
|
|
4
4
|
"description": "Vorn MCP server — task management, git, and workflow tools for AI coding agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"zod": "^4.4.3"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@vornrun/server": "0.7.0-beta.
|
|
42
|
-
"@vornrun/shared": "0.7.0-beta.
|
|
41
|
+
"@vornrun/server": "0.7.0-beta.12",
|
|
42
|
+
"@vornrun/shared": "0.7.0-beta.12",
|
|
43
43
|
"tsup": "^8.5.1",
|
|
44
44
|
"tsx": "^4.23.1",
|
|
45
45
|
"typescript": "^6.0.3"
|