@grainulation/wheat 1.0.11 → 1.0.12
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/bin/wheat.js +11 -0
- package/package.json +2 -2
package/bin/wheat.js
CHANGED
|
@@ -104,6 +104,16 @@ if (subcommand === "--version" || subcommand === "-v") {
|
|
|
104
104
|
process.exit(0);
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
// ─── Fast MCP dispatch ──────────────────────────────────────────────────────
|
|
108
|
+
// MCP is machine-invoked via stdio — skip install-prompt and arg parsing.
|
|
109
|
+
// This matches mill/silo's pattern of early bail-out before any overhead.
|
|
110
|
+
if (subcommand === "mcp") {
|
|
111
|
+
const { startServer } = await import(
|
|
112
|
+
new URL("../lib/serve-mcp.js", import.meta.url).href
|
|
113
|
+
);
|
|
114
|
+
startServer(targetDir);
|
|
115
|
+
} else {
|
|
116
|
+
|
|
107
117
|
// ─── Install prompt tracking ─────────────────────────────────────────────────
|
|
108
118
|
// Track npx usage and maybe suggest installing. Both calls are sync, <5ms,
|
|
109
119
|
// and fail silently. Only fires for real subcommands (not --help/--version).
|
|
@@ -215,3 +225,4 @@ handler.run(targetDir, subArgs).catch((err) => {
|
|
|
215
225
|
if (process.env.WHEAT_DEBUG) console.error(err.stack);
|
|
216
226
|
process.exit(1);
|
|
217
227
|
});
|
|
228
|
+
} // end else (non-mcp subcommands)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grainulation/wheat",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"description": "Research-driven development framework — structured claims, compiled evidence, deterministic output",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "grainulation contributors",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"bin": {
|
|
39
39
|
"wheat": "bin/wheat.js",
|
|
40
|
-
"wheat-mcp": "bin/wheat-mcp.
|
|
40
|
+
"wheat-mcp": "bin/wheat-mcp.cjs"
|
|
41
41
|
},
|
|
42
42
|
"files": [
|
|
43
43
|
"bin/",
|