@vornrun/mcp 0.7.0-beta.8 → 0.7.0-beta.9

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.
Files changed (2) hide show
  1. package/dist/index.js +66 -25
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -50,8 +50,32 @@ import fs from "fs";
50
50
  import path from "path";
51
51
 
52
52
  // ../shared/src/protocol.ts
53
+ var BOOTSTRAP_ENV_VAR = "SECRET_VORN_BOOTSTRAP_TOKEN";
53
54
  var LOCAL_TOKEN_FILENAME = "local-token";
54
55
 
56
+ // ../shared/src/types.ts
57
+ var DEFAULT_WORKSPACE = {
58
+ id: "personal",
59
+ name: "Personal",
60
+ icon: "User",
61
+ iconColor: "#6b7280",
62
+ order: 0
63
+ };
64
+ function isTerminalTaskStatus(status) {
65
+ return status === "done" || status === "cancelled";
66
+ }
67
+ var SDK_FILTER_KEYS = {
68
+ connectorId: "sdkConnectorId",
69
+ version: "sdkVersion",
70
+ icon: "sdkIcon",
71
+ implicit: "implicit"
72
+ };
73
+ var NEVER_BORROWED_ENV = { keys: ["CLAUDECODE"], prefixes: ["CLAUDE_CODE_"] };
74
+ function connectionConnectorId(connection2) {
75
+ const packaged = connection2.filters?.[SDK_FILTER_KEYS.connectorId];
76
+ return typeof packaged === "string" && packaged !== "" ? packaged : connection2.connectorId;
77
+ }
78
+
55
79
  // ../server/src/process-utils.ts
56
80
  function getDefaultShell(configured) {
57
81
  const chosen = configured?.trim();
@@ -76,30 +100,10 @@ function findWindowsShell() {
76
100
  if (fs.existsSync(windowsPowerShell)) return windowsPowerShell;
77
101
  return process.env.COMSPEC || "cmd.exe";
78
102
  }
79
- var STRIP_ENV_KEYS = ["CLAUDECODE"];
103
+ var STRIP_ENV_KEYS = NEVER_BORROWED_ENV.keys;
104
+ var STRIP_ENV_PREFIXES = [...NEVER_BORROWED_ENV.prefixes, BOOTSTRAP_ENV_VAR];
80
105
  var STRIP_ENV_KEYS_UPPER = STRIP_ENV_KEYS.map((k) => k.toUpperCase());
81
106
 
82
- // ../shared/src/types.ts
83
- var DEFAULT_WORKSPACE = {
84
- id: "personal",
85
- name: "Personal",
86
- icon: "User",
87
- iconColor: "#6b7280",
88
- order: 0
89
- };
90
- function isTerminalTaskStatus(status) {
91
- return status === "done" || status === "cancelled";
92
- }
93
- var SDK_FILTER_KEYS = {
94
- connectorId: "sdkConnectorId",
95
- version: "sdkVersion",
96
- icon: "sdkIcon"
97
- };
98
- function connectionConnectorId(connection2) {
99
- const packaged = connection2.filters?.[SDK_FILTER_KEYS.connectorId];
100
- return typeof packaged === "string" && packaged !== "" ? packaged : connection2.connectorId;
101
- }
102
-
103
107
  // ../server/src/default-workflows.ts
104
108
  var DEFAULT_TASK_WORKFLOW_ID = "system:default-task-workflow";
105
109
  function buildDefaultTaskWorkflow() {
@@ -900,6 +904,39 @@ function migrateSchema(d) {
900
904
  })();
901
905
  logger_default.info("[database] migrated schema to version 16 (shell working directory)");
902
906
  }
907
+ if (version < 17) {
908
+ d.transaction(() => {
909
+ const derived = `(
910
+ SELECT json_extract(sc.filters, '$.sdkConnectorId')
911
+ FROM task_source_links tsl
912
+ JOIN source_connections sc ON sc.id = tsl.connection_id
913
+ WHERE tsl.task_id = tasks.id
914
+ )`;
915
+ d.exec(`
916
+ UPDATE tasks
917
+ SET source_connector_id = ${derived}
918
+ WHERE source_connector_id = 'mcp' AND ${derived} IS NOT NULL
919
+ `);
920
+ d.exec(`
921
+ UPDATE task_source_links
922
+ SET connector_id = (
923
+ SELECT json_extract(sc.filters, '$.sdkConnectorId')
924
+ FROM source_connections sc
925
+ WHERE sc.id = task_source_links.connection_id
926
+ )
927
+ WHERE connector_id = 'mcp'
928
+ AND (
929
+ SELECT json_extract(sc.filters, '$.sdkConnectorId')
930
+ FROM source_connections sc
931
+ WHERE sc.id = task_source_links.connection_id
932
+ ) IS NOT NULL
933
+ `);
934
+ d.prepare(
935
+ "INSERT OR REPLACE INTO schema_meta (key, value) VALUES ('schema_version', '17')"
936
+ ).run();
937
+ })();
938
+ logger_default.info("[database] migrated schema to version 17 (packaged connector task ids)");
939
+ }
903
940
  }
904
941
  var REVISIONED_TABLES = [
905
942
  "projects",
@@ -2773,17 +2810,20 @@ function toPortable(workflow, projectPath, connections = []) {
2773
2810
  config[`projectName`] = PROJECT_NAME_TOKEN;
2774
2811
  }
2775
2812
  delete config.remoteHostId;
2813
+ delete config.secretsFrom;
2776
2814
  }
2777
2815
  const key = boundConnectionKey(node, config);
2778
2816
  const bound = key === null ? "" : config[key];
2779
- if (key !== null && typeof bound === "string" && bound !== "") {
2817
+ const unbound = key !== null && key !== "profileConnectionId" && bound === "";
2818
+ if (key !== null && (typeof bound === "string" && bound !== "" || unbound)) {
2780
2819
  const source2 = connections.find((connection2) => connection2.id === bound);
2781
2820
  const event = config.event;
2821
+ const declared = config.connectorId;
2782
2822
  requires.push(
2783
2823
  key === "profileConnectionId" ? { kind: "httpProfile", nodeId: node.id, name: source2?.name ?? "" } : {
2784
2824
  kind: "connection",
2785
2825
  nodeId: node.id,
2786
- connectorId: source2 ? connectorOf(source2) : "",
2826
+ connectorId: source2 ? connectorOf(source2) : typeof declared === "string" ? declared : "",
2787
2827
  name: source2?.name ?? "",
2788
2828
  ...typeof event === "string" && event !== "" && { event }
2789
2829
  }
@@ -2829,6 +2869,7 @@ function fromPortable(portable, bundle, project, connections = [], mintToken = (
2829
2869
  }
2830
2870
  const nodes = portable.nodes.map((node) => {
2831
2871
  const config = { ...node.config };
2872
+ delete config.secretsFrom;
2832
2873
  for (const [key, value] of Object.entries(config)) {
2833
2874
  if (typeof value !== "string") continue;
2834
2875
  config[key] = value.split(PROJECT_PATH_TOKEN).join(project.path.replace(/[/\\]+$/, "")).split(PROJECT_NAME_TOKEN).join(project.name);
@@ -4482,7 +4523,7 @@ console.warn = (...args) => _origError("[mcp:warn]", ...args);
4482
4523
  console.error = (...args) => _origError("[mcp:error]", ...args);
4483
4524
  async function main() {
4484
4525
  configManager.init();
4485
- const version = true ? "0.7.0-beta.8" : createRequire(import.meta.url)("../package.json").version;
4526
+ const version = true ? "0.7.0-beta.9" : createRequire(import.meta.url)("../package.json").version;
4486
4527
  const server = createMcpServer(version);
4487
4528
  const transport = new StdioServerTransport();
4488
4529
  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.8",
3
+ "version": "0.7.0-beta.9",
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.8",
42
- "@vornrun/shared": "0.7.0-beta.8",
41
+ "@vornrun/server": "0.7.0-beta.9",
42
+ "@vornrun/shared": "0.7.0-beta.9",
43
43
  "tsup": "^8.5.1",
44
44
  "tsx": "^4.23.1",
45
45
  "typescript": "^6.0.3"