@vornrun/mcp 0.2.0 → 0.2.1-beta.1

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 +27 -22
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1285,22 +1285,28 @@ function fetchNodesByRunIds(d, runIds) {
1285
1285
  }
1286
1286
  return out;
1287
1287
  }
1288
- function listWorkflowRuns(workflowId, limit = 20) {
1289
- const d = getDb();
1290
- const rows = d.prepare("SELECT * FROM workflow_runs WHERE workflow_id = ? ORDER BY started_at DESC LIMIT ?").all(workflowId, limit);
1291
- const nodesByRun = fetchNodesByRunIds(
1292
- d,
1293
- rows.map((r) => r.id)
1294
- );
1288
+ function mapRunRows(rows, nodesByRun) {
1295
1289
  return rows.map((r) => ({
1296
1290
  workflowId: r.workflow_id,
1297
1291
  startedAt: r.started_at,
1298
1292
  ...r.completed_at != null && { completedAt: r.completed_at },
1299
1293
  status: r.status,
1300
1294
  ...r.trigger_task_id != null && { triggerTaskId: r.trigger_task_id },
1295
+ ...r.workflow_name != null && { workflowName: r.workflow_name },
1301
1296
  nodeStates: nodesByRun.get(r.id) ?? []
1302
1297
  }));
1303
1298
  }
1299
+ function listWorkflowRuns(workflowId, limit = 20) {
1300
+ const d = getDb();
1301
+ const rows = d.prepare("SELECT * FROM workflow_runs WHERE workflow_id = ? ORDER BY started_at DESC LIMIT ?").all(workflowId, limit);
1302
+ return mapRunRows(
1303
+ rows,
1304
+ fetchNodesByRunIds(
1305
+ d,
1306
+ rows.map((r) => r.id)
1307
+ )
1308
+ );
1309
+ }
1304
1310
  function listWorkflowRunsByTask(taskId, limit = 20) {
1305
1311
  const d = getDb();
1306
1312
  const rows = d.prepare(
@@ -1312,19 +1318,13 @@ function listWorkflowRunsByTask(taskId, limit = 20) {
1312
1318
  ORDER BY wr.started_at DESC
1313
1319
  LIMIT ?`
1314
1320
  ).all(taskId, taskId, limit);
1315
- const nodesByRun = fetchNodesByRunIds(
1316
- d,
1317
- rows.map((r) => r.id)
1321
+ return mapRunRows(
1322
+ rows,
1323
+ fetchNodesByRunIds(
1324
+ d,
1325
+ rows.map((r) => r.id)
1326
+ )
1318
1327
  );
1319
- return rows.map((r) => ({
1320
- workflowId: r.workflow_id,
1321
- startedAt: r.started_at,
1322
- ...r.completed_at != null && { completedAt: r.completed_at },
1323
- status: r.status,
1324
- ...r.trigger_task_id != null && { triggerTaskId: r.trigger_task_id },
1325
- ...r.workflow_name != null && { workflowName: r.workflow_name },
1326
- nodeStates: nodesByRun.get(r.id) ?? []
1327
- }));
1328
1328
  }
1329
1329
 
1330
1330
  // ../server/src/config-manager.ts
@@ -2340,7 +2340,9 @@ var launchAgentConfigSchema = z5.object({
2340
2340
  args: z5.array(V.shortText).optional(),
2341
2341
  displayName: V.shortText.optional(),
2342
2342
  branch: V.shortText.optional(),
2343
- useWorktree: z5.boolean().optional(),
2343
+ // boolean | 'fromContext' — `'fromContext'` only valid when the workflow's
2344
+ // manual trigger is contextual (validated at runtime, not here).
2345
+ useWorktree: z5.union([z5.boolean(), z5.literal("fromContext")]).optional(),
2344
2346
  remoteHostId: V.id.optional(),
2345
2347
  prompt: V.prompt.optional(),
2346
2348
  promptDelayMs: z5.number().optional(),
@@ -2348,7 +2350,10 @@ var launchAgentConfigSchema = z5.object({
2348
2350
  taskFromQueue: z5.boolean().optional()
2349
2351
  });
2350
2352
  var triggerConfigSchema = z5.union([
2351
- z5.object({ triggerType: z5.literal("manual") }),
2353
+ z5.object({
2354
+ triggerType: z5.literal("manual"),
2355
+ contextual: z5.boolean().optional()
2356
+ }),
2352
2357
  z5.object({ triggerType: z5.literal("once"), runAt: V.shortText }),
2353
2358
  z5.object({
2354
2359
  triggerType: z5.literal("recurring"),
@@ -2707,7 +2712,7 @@ console.warn = (...args) => _origError("[mcp:warn]", ...args);
2707
2712
  console.error = (...args) => _origError("[mcp:error]", ...args);
2708
2713
  async function main() {
2709
2714
  configManager.init();
2710
- const version = true ? "0.2.0" : createRequire(import.meta.url)("../package.json").version;
2715
+ const version = true ? "0.2.1-beta.1" : createRequire(import.meta.url)("../package.json").version;
2711
2716
  const server = createMcpServer(version);
2712
2717
  const transport = new StdioServerTransport();
2713
2718
  await server.connect(transport);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vornrun/mcp",
3
- "version": "0.2.0",
3
+ "version": "0.2.1-beta.1",
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.3.6"
39
39
  },
40
40
  "devDependencies": {
41
- "@vornrun/server": "0.1.2",
42
- "@vornrun/shared": "0.1.2",
41
+ "@vornrun/server": "0.2.0",
42
+ "@vornrun/shared": "0.2.0",
43
43
  "tsup": "^8.5.1",
44
44
  "tsx": "^4.21.0",
45
45
  "typescript": "^6.0.3"