skillmds 1.0.7 → 1.0.8
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/CHANGELOG.md +4 -0
- package/bin/skillmd-mcp.mjs +8 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `skillmds` are documented here. Versions follow [semver](https://semver.org).
|
|
4
4
|
|
|
5
|
+
## 1.0.8
|
|
6
|
+
|
|
7
|
+
- `skillmds` with no command in a terminal now opens the interactive CLI menu; it only starts the MCP server when launched over piped stdio (how MCP clients run it). Previously a bare `npx skillmds` in a terminal appeared to hang on the silent MCP server.
|
|
8
|
+
|
|
5
9
|
## 1.0.7
|
|
6
10
|
|
|
7
11
|
- Nicer CLI output: colored PASS/FAIL, quality-score bars, `ERROR`/`WARN`/`INFO` badges, and a summary with average score.
|
package/bin/skillmd-mcp.mjs
CHANGED
|
@@ -211,16 +211,21 @@ async function startMcpServer() {
|
|
|
211
211
|
console.error("skillmd MCP server running (stdio)");
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
-
// This binary is invoked
|
|
215
|
-
// - `skillmds` → start the MCP server (stdio; how MCP clients launch it)
|
|
214
|
+
// This binary is invoked three ways:
|
|
216
215
|
// - `skillmds lint .` etc. → run the CLI (so `npx skillmds <cmd>` works without -p)
|
|
216
|
+
// - `skillmds` in a terminal → run the CLI (opens the interactive menu)
|
|
217
|
+
// - `skillmds` over piped stdio → start the MCP server (how MCP clients launch it)
|
|
218
|
+
// MCP clients always connect stdin as a pipe (never a TTY), so an interactive
|
|
219
|
+
// stdin is a reliable signal that a human is present.
|
|
217
220
|
const CLI_COMMANDS = new Set([
|
|
218
221
|
"lint", "check", "scan", "rules", "init", "search", "add", "list", "ls",
|
|
219
222
|
"remove", "rm", "update", "publish", "submit", "login", "logout", "help",
|
|
220
223
|
"--help", "-h", "--version", "-V",
|
|
221
224
|
]);
|
|
222
225
|
const first = process.argv[2];
|
|
223
|
-
|
|
226
|
+
const isCliCommand = first && CLI_COMMANDS.has(first);
|
|
227
|
+
const humanInTerminal = !first && process.stdin.isTTY;
|
|
228
|
+
if (isCliCommand || humanInTerminal) {
|
|
224
229
|
await import("../dist/cli.js"); // the CLI parses process.argv itself
|
|
225
230
|
} else {
|
|
226
231
|
await startMcpServer();
|
package/package.json
CHANGED