@whenlabs/when 0.7.3 → 0.8.0
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/{chunk-FJBDHGXG.js → chunk-2Y7YZAIR.js} +14 -6
- package/dist/index.js +2 -2
- package/dist/{install-O4QZ3TA4.js → install-JRDDTX6Y.js} +3 -3
- package/dist/mcp.js +26 -1
- package/dist/{uninstall-5LRMB2EV.js → uninstall-QQ2Y3AQ3.js} +1 -1
- package/package.json +2 -2
- package/dist/index.d.ts +0 -2
- package/dist/mcp.d.ts +0 -2
|
@@ -33,19 +33,27 @@ function unregisterServer(name) {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
function registerMcpServer() {
|
|
36
|
-
const velocity = registerServer("velocity-mcp", "npx @whenlabs/velocity-mcp");
|
|
37
36
|
const whenlabs = registerServer("whenlabs", "npx @whenlabs/when when-mcp");
|
|
37
|
+
const legacyCleanup = unregisterServer("velocity-mcp");
|
|
38
|
+
const messages = [whenlabs.message];
|
|
39
|
+
if (legacyCleanup.success && !legacyCleanup.message.includes("was not registered")) {
|
|
40
|
+
messages.push("Removed legacy standalone velocity-mcp (now bundled in whenlabs)");
|
|
41
|
+
}
|
|
38
42
|
return {
|
|
39
|
-
success:
|
|
40
|
-
message:
|
|
43
|
+
success: whenlabs.success,
|
|
44
|
+
message: messages.join("\n ")
|
|
41
45
|
};
|
|
42
46
|
}
|
|
43
47
|
function unregisterMcpServer() {
|
|
44
|
-
const velocity = unregisterServer("velocity-mcp");
|
|
45
48
|
const whenlabs = unregisterServer("whenlabs");
|
|
49
|
+
const velocity = unregisterServer("velocity-mcp");
|
|
50
|
+
const messages = [whenlabs.message];
|
|
51
|
+
if (velocity.success && !velocity.message.includes("was not registered")) {
|
|
52
|
+
messages.push(velocity.message);
|
|
53
|
+
}
|
|
46
54
|
return {
|
|
47
|
-
success:
|
|
48
|
-
message:
|
|
55
|
+
success: whenlabs.success,
|
|
56
|
+
message: messages.join("\n ")
|
|
49
57
|
};
|
|
50
58
|
}
|
|
51
59
|
|
package/dist/index.js
CHANGED
|
@@ -495,11 +495,11 @@ function createInitCommand() {
|
|
|
495
495
|
var program = new Command4();
|
|
496
496
|
program.name("when").version("0.1.0").description("The WhenLabs developer toolkit \u2014 6 tools, one install");
|
|
497
497
|
program.command("install").description("Install all WhenLabs tools globally (MCP server + CLAUDE.md instructions)").option("--cursor", "Install MCP servers into Cursor (~/.cursor/mcp.json)").option("--vscode", "Install MCP servers into VS Code (settings.json)").option("--windsurf", "Install MCP servers into Windsurf (~/.codeium/windsurf/mcp_config.json)").option("--all", "Install MCP servers into all supported editors").action(async (options) => {
|
|
498
|
-
const { install } = await import("./install-
|
|
498
|
+
const { install } = await import("./install-JRDDTX6Y.js");
|
|
499
499
|
await install(options);
|
|
500
500
|
});
|
|
501
501
|
program.command("uninstall").description("Remove all WhenLabs tools").option("--cursor", "Remove MCP servers from Cursor").option("--vscode", "Remove MCP servers from VS Code").option("--windsurf", "Remove MCP servers from Windsurf").option("--all", "Remove MCP servers from all supported editors").action(async (options) => {
|
|
502
|
-
const { uninstall } = await import("./uninstall-
|
|
502
|
+
const { uninstall } = await import("./uninstall-QQ2Y3AQ3.js");
|
|
503
503
|
await uninstall(options);
|
|
504
504
|
});
|
|
505
505
|
program.command("status").description("Show installation status and velocity stats").action(async () => {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
ALL_EDITORS,
|
|
4
4
|
installForEditor,
|
|
5
5
|
registerMcpServer
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2Y7YZAIR.js";
|
|
7
7
|
import {
|
|
8
8
|
injectBlock
|
|
9
9
|
} from "./chunk-NYUYV3UL.js";
|
|
@@ -19,7 +19,7 @@ var CLAUDE_MD_CONTENT = `# WhenLabs Toolkit
|
|
|
19
19
|
|
|
20
20
|
## Task Timing (velocity-mcp)
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Velocity tools are part of the unified \`whenlabs\` MCP server. Follow these rules for EVERY session:
|
|
23
23
|
|
|
24
24
|
1. **Before starting any discrete coding task**, call \`velocity_start_task\` with:
|
|
25
25
|
- Appropriate \`category\` (scaffold, implement, refactor, debug, test, config, docs, deploy)
|
|
@@ -46,7 +46,7 @@ You have access to \`velocity-mcp\` tools. Follow these rules for EVERY session:
|
|
|
46
46
|
|
|
47
47
|
## WhenLabs MCP Tools (ALWAYS prefer these over shell commands)
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
All six tools (including velocity) are available through the unified \`whenlabs\` MCP server. **ALWAYS use these MCP tools instead of running shell commands like lsof, grep, or manual checks.** These tools are purpose-built and give better results:
|
|
50
50
|
|
|
51
51
|
| When to use | Call this tool | NOT this |
|
|
52
52
|
|-------------|---------------|----------|
|
package/dist/mcp.js
CHANGED
|
@@ -9,6 +9,15 @@ import { resolve, dirname, join } from "path";
|
|
|
9
9
|
import { existsSync, mkdirSync, writeFileSync, readFileSync } from "fs";
|
|
10
10
|
import { fileURLToPath } from "url";
|
|
11
11
|
import { homedir } from "os";
|
|
12
|
+
import {
|
|
13
|
+
initDb,
|
|
14
|
+
TaskQueries,
|
|
15
|
+
registerStartTask,
|
|
16
|
+
registerEndTask,
|
|
17
|
+
registerEstimate,
|
|
18
|
+
registerStats,
|
|
19
|
+
registerHistory
|
|
20
|
+
} from "@whenlabs/velocity-mcp/lib";
|
|
12
21
|
var __dirname = dirname(fileURLToPath(import.meta.url));
|
|
13
22
|
function findBin(name) {
|
|
14
23
|
const pkgRoot = resolve(__dirname, "..");
|
|
@@ -91,8 +100,16 @@ Note: Conflicts found in project "${projectName}".`);
|
|
|
91
100
|
}
|
|
92
101
|
var server = new McpServer({
|
|
93
102
|
name: "whenlabs",
|
|
94
|
-
version: "0.
|
|
103
|
+
version: "0.2.0"
|
|
95
104
|
});
|
|
105
|
+
var velocityDb = initDb();
|
|
106
|
+
var velocityQueries = new TaskQueries(velocityDb);
|
|
107
|
+
var s = server;
|
|
108
|
+
registerStartTask(s, velocityQueries);
|
|
109
|
+
registerEndTask(s, velocityQueries);
|
|
110
|
+
registerEstimate(s, velocityQueries);
|
|
111
|
+
registerStats(s, velocityQueries);
|
|
112
|
+
registerHistory(s, velocityQueries);
|
|
96
113
|
function formatOutput(result) {
|
|
97
114
|
const parts = [];
|
|
98
115
|
if (result.stdout.trim()) parts.push(result.stdout.trim());
|
|
@@ -580,6 +597,14 @@ server.tool(
|
|
|
580
597
|
return { content: [{ type: "text", text: outputText }] };
|
|
581
598
|
}
|
|
582
599
|
);
|
|
600
|
+
process.on("SIGINT", () => {
|
|
601
|
+
velocityDb.close();
|
|
602
|
+
process.exit(0);
|
|
603
|
+
});
|
|
604
|
+
process.on("SIGTERM", () => {
|
|
605
|
+
velocityDb.close();
|
|
606
|
+
process.exit(0);
|
|
607
|
+
});
|
|
583
608
|
async function main() {
|
|
584
609
|
const transport = new StdioServerTransport();
|
|
585
610
|
await server.connect(transport);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whenlabs/when",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "The WhenLabs developer toolkit — 6 tools, one install",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@whenlabs/berth": "^0.1.0",
|
|
34
34
|
"@whenlabs/envalid": "^0.1.2",
|
|
35
35
|
"@whenlabs/stale": "^0.1.0",
|
|
36
|
-
"@whenlabs/velocity-mcp": "^0.1.
|
|
36
|
+
"@whenlabs/velocity-mcp": "^0.1.2",
|
|
37
37
|
"@whenlabs/vow": "^0.1.3",
|
|
38
38
|
"commander": "^12.0.0",
|
|
39
39
|
"zod": "^4.3.6"
|
package/dist/index.d.ts
DELETED
package/dist/mcp.d.ts
DELETED