@vornrun/mcp 0.1.2-beta.3 → 0.1.2-beta.4
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 +41 -22
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -332,17 +332,6 @@ function createSchema() {
|
|
|
332
332
|
CREATE INDEX IF NOT EXISTS idx_schedule_log_workflow_id ON schedule_log(workflow_id);
|
|
333
333
|
CREATE INDEX IF NOT EXISTS idx_tasks_project ON tasks(project_name, status);
|
|
334
334
|
|
|
335
|
-
CREATE TABLE IF NOT EXISTS archived_sessions (
|
|
336
|
-
id TEXT PRIMARY KEY,
|
|
337
|
-
agent_type TEXT NOT NULL,
|
|
338
|
-
project_name TEXT NOT NULL,
|
|
339
|
-
project_path TEXT NOT NULL,
|
|
340
|
-
display_name TEXT,
|
|
341
|
-
branch TEXT,
|
|
342
|
-
agent_session_id TEXT,
|
|
343
|
-
archived_at INTEGER NOT NULL
|
|
344
|
-
);
|
|
345
|
-
|
|
346
335
|
CREATE TABLE IF NOT EXISTS workspaces (
|
|
347
336
|
id TEXT PRIMARY KEY,
|
|
348
337
|
name TEXT NOT NULL,
|
|
@@ -372,6 +361,10 @@ function createSchema() {
|
|
|
372
361
|
logs TEXT,
|
|
373
362
|
task_id TEXT,
|
|
374
363
|
agent_session_id TEXT,
|
|
364
|
+
agent_type TEXT,
|
|
365
|
+
project_name TEXT,
|
|
366
|
+
project_path TEXT,
|
|
367
|
+
approved_at TEXT,
|
|
375
368
|
FOREIGN KEY (run_id) REFERENCES workflow_runs(id) ON DELETE CASCADE
|
|
376
369
|
);
|
|
377
370
|
|
|
@@ -542,6 +535,18 @@ function migrateSchema(d) {
|
|
|
542
535
|
"[database] migrated schema to version 7 (rename claude_session_id \u2192 agent_session_id)"
|
|
543
536
|
);
|
|
544
537
|
}
|
|
538
|
+
if (version < 8) {
|
|
539
|
+
d.transaction(() => {
|
|
540
|
+
const cols = d.prepare("PRAGMA table_info(workflow_run_nodes)").all();
|
|
541
|
+
if (!cols.some((c) => c.name === "approved_at")) {
|
|
542
|
+
d.exec("ALTER TABLE workflow_run_nodes ADD COLUMN approved_at TEXT");
|
|
543
|
+
}
|
|
544
|
+
d.prepare(
|
|
545
|
+
"INSERT OR REPLACE INTO schema_meta (key, value) VALUES ('schema_version', '8')"
|
|
546
|
+
).run();
|
|
547
|
+
})();
|
|
548
|
+
logger_default.info("[database] migrated schema to version 8 (approval gate timestamp)");
|
|
549
|
+
}
|
|
545
550
|
}
|
|
546
551
|
function verifySchema(d) {
|
|
547
552
|
const expectedByTable = {
|
|
@@ -578,6 +583,18 @@ function verifySchema(d) {
|
|
|
578
583
|
column: "headless_args",
|
|
579
584
|
ddl: "ALTER TABLE agent_commands ADD COLUMN headless_args TEXT"
|
|
580
585
|
}
|
|
586
|
+
],
|
|
587
|
+
workflow_run_nodes: [
|
|
588
|
+
{ column: "agent_type", ddl: "ALTER TABLE workflow_run_nodes ADD COLUMN agent_type TEXT" },
|
|
589
|
+
{
|
|
590
|
+
column: "project_name",
|
|
591
|
+
ddl: "ALTER TABLE workflow_run_nodes ADD COLUMN project_name TEXT"
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
column: "project_path",
|
|
595
|
+
ddl: "ALTER TABLE workflow_run_nodes ADD COLUMN project_path TEXT"
|
|
596
|
+
},
|
|
597
|
+
{ column: "approved_at", ddl: "ALTER TABLE workflow_run_nodes ADD COLUMN approved_at TEXT" }
|
|
581
598
|
]
|
|
582
599
|
};
|
|
583
600
|
for (const [table, columns] of Object.entries(expectedByTable)) {
|
|
@@ -1170,7 +1187,11 @@ function listWorkflowRuns(workflowId, limit = 20) {
|
|
|
1170
1187
|
...n.error != null && { error: n.error },
|
|
1171
1188
|
...n.logs != null && { logs: n.logs },
|
|
1172
1189
|
...n.task_id != null && { taskId: n.task_id },
|
|
1173
|
-
...n.agent_session_id != null && { agentSessionId: n.agent_session_id }
|
|
1190
|
+
...n.agent_session_id != null && { agentSessionId: n.agent_session_id },
|
|
1191
|
+
...n.agent_type != null && { agentType: n.agent_type },
|
|
1192
|
+
...n.project_name != null && { projectName: n.project_name },
|
|
1193
|
+
...n.project_path != null && { projectPath: n.project_path },
|
|
1194
|
+
...n.approved_at != null && { approvedAt: n.approved_at }
|
|
1174
1195
|
}))
|
|
1175
1196
|
};
|
|
1176
1197
|
});
|
|
@@ -1206,7 +1227,8 @@ function listWorkflowRunsByTask(taskId, limit = 20) {
|
|
|
1206
1227
|
...n.error != null && { error: n.error },
|
|
1207
1228
|
...n.logs != null && { logs: n.logs },
|
|
1208
1229
|
...n.task_id != null && { taskId: n.task_id },
|
|
1209
|
-
...n.agent_session_id != null && { agentSessionId: n.agent_session_id }
|
|
1230
|
+
...n.agent_session_id != null && { agentSessionId: n.agent_session_id },
|
|
1231
|
+
...n.approved_at != null && { approvedAt: n.approved_at }
|
|
1210
1232
|
}))
|
|
1211
1233
|
};
|
|
1212
1234
|
});
|
|
@@ -1879,9 +1901,9 @@ var AGENT_TYPES3 = [
|
|
|
1879
1901
|
function registerSessionTools(server) {
|
|
1880
1902
|
server.tool(
|
|
1881
1903
|
"list_sessions",
|
|
1882
|
-
'List terminal sessions. Filter by status: "active" (running terminals)
|
|
1904
|
+
'List terminal sessions. Filter by status: "active" (running terminals) or "recent" (past sessions).',
|
|
1883
1905
|
{
|
|
1884
|
-
filter: z4.enum(["active", "recent"
|
|
1906
|
+
filter: z4.enum(["active", "recent"]).optional().describe("Session filter (default: active)"),
|
|
1885
1907
|
project_name: V.name.optional().describe("Filter by project name"),
|
|
1886
1908
|
project_path: V.absolutePath.optional().describe("Filter by project path (for recent sessions)")
|
|
1887
1909
|
},
|
|
@@ -1903,11 +1925,8 @@ function registerSessionTools(server) {
|
|
|
1903
1925
|
pid: s.pid
|
|
1904
1926
|
}));
|
|
1905
1927
|
return { content: [{ type: "text", text: JSON.stringify(summary, null, 2) }] };
|
|
1906
|
-
} else if (filter === "recent") {
|
|
1907
|
-
const sessions = await rpcCall("sessions:getRecent", args.project_path);
|
|
1908
|
-
return { content: [{ type: "text", text: JSON.stringify(sessions, null, 2) }] };
|
|
1909
1928
|
} else {
|
|
1910
|
-
const sessions = await rpcCall("
|
|
1929
|
+
const sessions = await rpcCall("sessions:getRecent", args.project_path);
|
|
1911
1930
|
return { content: [{ type: "text", text: JSON.stringify(sessions, null, 2) }] };
|
|
1912
1931
|
}
|
|
1913
1932
|
} catch (err) {
|
|
@@ -2182,10 +2201,10 @@ function registerSessionTools(server) {
|
|
|
2182
2201
|
);
|
|
2183
2202
|
server.tool(
|
|
2184
2203
|
"list_session_events",
|
|
2185
|
-
"List session lifecycle events (created, exited, task_linked, renamed
|
|
2204
|
+
"List session lifecycle events (created, exited, task_linked, renamed). Use for post-mortem analysis and multi-agent coordination.",
|
|
2186
2205
|
{
|
|
2187
2206
|
session_id: V.id.optional().describe("Filter by session ID"),
|
|
2188
|
-
event_type: z4.enum(["created", "exited", "task_linked", "renamed"
|
|
2207
|
+
event_type: z4.enum(["created", "exited", "task_linked", "renamed"]).optional().describe("Filter by event type"),
|
|
2189
2208
|
limit: z4.number().int().min(1).max(200).optional().describe("Max events to return (default: 50)")
|
|
2190
2209
|
},
|
|
2191
2210
|
async (args) => {
|
|
@@ -2595,7 +2614,7 @@ console.warn = (...args) => _origError("[mcp:warn]", ...args);
|
|
|
2595
2614
|
console.error = (...args) => _origError("[mcp:error]", ...args);
|
|
2596
2615
|
async function main() {
|
|
2597
2616
|
configManager.init();
|
|
2598
|
-
const version = true ? "0.1.2-beta.
|
|
2617
|
+
const version = true ? "0.1.2-beta.4" : createRequire(import.meta.url)("../package.json").version;
|
|
2599
2618
|
const server = createMcpServer(version);
|
|
2600
2619
|
const transport = new StdioServerTransport();
|
|
2601
2620
|
await server.connect(transport);
|