@vornrun/mcp 0.7.1-beta.2 → 0.7.1-beta.3

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 +53 -12
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -71,8 +71,19 @@ var SDK_FILTER_KEYS = {
71
71
  connectorId: "sdkConnectorId",
72
72
  version: "sdkVersion",
73
73
  icon: "sdkIcon",
74
- implicit: "implicit"
74
+ implicit: "implicit",
75
+ /** The trigger a connection polls when its workflow fires on the generic poll event. */
76
+ trigger: "sdkTrigger"
75
77
  };
78
+ var SDK_CONNECTOR_ID = "sdk";
79
+ function sdkConnectionFilters(manifest, trigger) {
80
+ return {
81
+ [SDK_FILTER_KEYS.connectorId]: manifest.id,
82
+ [SDK_FILTER_KEYS.version]: manifest.version,
83
+ ...manifest.icon ? { [SDK_FILTER_KEYS.icon]: JSON.stringify(manifest.icon) } : {},
84
+ ...trigger ? { [SDK_FILTER_KEYS.trigger]: trigger } : {}
85
+ };
86
+ }
76
87
  var NEVER_BORROWED_ENV = { keys: ["CLAUDECODE"], prefixes: ["CLAUDE_CODE_"] };
77
88
  function connectionConnectorId(connection2) {
78
89
  const packaged = connection2.filters?.[SDK_FILTER_KEYS.connectorId];
@@ -1040,6 +1051,36 @@ function migrateSchema(d) {
1040
1051
  })();
1041
1052
  logger_default.info("[database] migrated schema to version 20 (who a connection is signed in as)");
1042
1053
  }
1054
+ if (version < 21) {
1055
+ const packaged = `connector_id = 'mcp'
1056
+ AND coalesce(json_extract(filters, '$.sdkConnectorId'), '') <> ''
1057
+ AND coalesce(json_extract(filters, '$.sdkVersion'), '') <> ''`;
1058
+ d.transaction(() => {
1059
+ d.prepare(
1060
+ `UPDATE source_connections
1061
+ SET filters = json_set(filters, '$.sdkTrigger', substr(json_extract(filters, '$.pollTool'), 6))
1062
+ WHERE ${packaged}
1063
+ AND json_extract(filters, '$.pollTool') LIKE 'poll\\_%' ESCAPE '\\'`
1064
+ ).run();
1065
+ d.prepare(
1066
+ `UPDATE source_connections
1067
+ SET connector_id = 'sdk',
1068
+ filters = json_remove(filters, '$.discoveredTools', '$.pollTool', '$.pollArgs',
1069
+ '$.itemsPath', '$.idField', '$.timestampField', '$.titleField', '$.urlField',
1070
+ '$.cursorArg', '$.cursorPath')
1071
+ WHERE ${packaged}`
1072
+ ).run();
1073
+ d.prepare(
1074
+ `UPDATE connector_inbox SET connector_id = 'sdk'
1075
+ WHERE connector_id = 'mcp'
1076
+ AND connection_id IN (SELECT id FROM source_connections WHERE connector_id = 'sdk')`
1077
+ ).run();
1078
+ d.prepare(
1079
+ "INSERT OR REPLACE INTO schema_meta (key, value) VALUES ('schema_version', '21')"
1080
+ ).run();
1081
+ })();
1082
+ logger_default.info("[database] migrated schema to version 21 (package connections belong to sdk)");
1083
+ }
1043
1084
  }
1044
1085
  var REVISIONED_TABLES = [
1045
1086
  "projects",
@@ -4169,7 +4210,7 @@ function registerConnectorTools(server) {
4169
4210
  const statusFor = (id) => statuses.find((s) => s.connectorId === id);
4170
4211
  const packFor = (id) => packs.find((pack) => pack.id === id);
4171
4212
  const entries = [
4172
- ...builtIns.map((c) => ({
4213
+ ...builtIns.filter((c) => c.addable !== false).map((c) => ({
4173
4214
  id: c.id,
4174
4215
  name: c.name,
4175
4216
  source: "built-in",
@@ -4261,10 +4302,13 @@ function registerConnectorTools(server) {
4261
4302
  "List the actions a connection can execute, with their input schemas. Call this before run_connector_action or before adding a callConnectorAction node to a workflow.",
4262
4303
  { connection_id: V.id.describe("Connection ID") },
4263
4304
  async (args) => {
4264
- const actions = await rpcCall(
4265
- "connection:listActions",
4266
- args.connection_id
4267
- );
4305
+ let actions;
4306
+ try {
4307
+ actions = await rpcCall("connection:listActions", args.connection_id);
4308
+ } catch (err) {
4309
+ const reason = err instanceof Error ? err.message : String(err);
4310
+ return failure(`Could not list actions for connection "${args.connection_id}": ${reason}`);
4311
+ }
4268
4312
  if (actions.length === 0) {
4269
4313
  return failure(
4270
4314
  `No actions for connection "${args.connection_id}". Either the connection does not exist, or its connector exposes no actions yet \u2014 for an MCP connection, tool discovery may still be running.`
@@ -4385,16 +4429,13 @@ function registerConnectorTools(server) {
4385
4429
  }
4386
4430
  const launch = typeof target === "string" ? parseLaunch(target) : target;
4387
4431
  const connection2 = await rpcCall("connection:create", {
4388
- connectorId: "mcp",
4432
+ connectorId: SDK_CONNECTOR_ID,
4389
4433
  name: args.name ?? (trigger ? `${manifest.name}: ${trigger.label}` : manifest.name),
4390
4434
  filters: {
4391
4435
  command: launch.command,
4392
4436
  args: JSON.stringify(launch.args),
4393
4437
  env: JSON.stringify(supplied),
4394
- [SDK_FILTER_KEYS.connectorId]: manifest.id,
4395
- [SDK_FILTER_KEYS.version]: manifest.version,
4396
- ...manifest.icon && { [SDK_FILTER_KEYS.icon]: JSON.stringify(manifest.icon) },
4397
- ...trigger?.filters ?? {}
4438
+ ...sdkConnectionFilters(manifest, trigger?.type)
4398
4439
  },
4399
4440
  syncIntervalMinutes: args.sync_interval_minutes ?? 5,
4400
4441
  statusMapping: {},
@@ -4942,7 +4983,7 @@ console.warn = (...args) => _origError("[mcp:warn]", ...args);
4942
4983
  console.error = (...args) => _origError("[mcp:error]", ...args);
4943
4984
  async function main() {
4944
4985
  configManager.init();
4945
- const version = true ? "0.7.1-beta.2" : createRequire(import.meta.url)("../package.json").version;
4986
+ const version = true ? "0.7.1-beta.3" : createRequire(import.meta.url)("../package.json").version;
4946
4987
  const server = createMcpServer(version);
4947
4988
  const transport = new StdioServerTransport();
4948
4989
  await server.connect(transport);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vornrun/mcp",
3
- "version": "0.7.1-beta.2",
3
+ "version": "0.7.1-beta.3",
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.5.4"
39
39
  },
40
40
  "devDependencies": {
41
- "@vornrun/server": "0.7.1-beta.2",
42
- "@vornrun/shared": "0.7.1-beta.2",
41
+ "@vornrun/server": "0.7.1-beta.3",
42
+ "@vornrun/shared": "0.7.1-beta.3",
43
43
  "tsup": "^8.5.1",
44
44
  "tsx": "^4.23.1",
45
45
  "typescript": "^6.0.3"