@pathmode/mcp-server 1.12.0 → 1.12.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.
@@ -0,0 +1,17 @@
1
+ /**
2
+ * `--version` / `--help` handling.
3
+ *
4
+ * Without this, any argument that is not a known subcommand falls through to
5
+ * StdioServerTransport, which waits on stdin forever. `npx @pathmode/mcp-server --version`
6
+ * — the first thing someone types after installing — looked like a hang.
7
+ *
8
+ * Deliberately narrow: only these exact flags are claimed. An unrecognized flag still
9
+ * starts the server, because an MCP client passing something we do not know about must
10
+ * get a working server, not a usage screen on stdout (which would corrupt the JSON-RPC
11
+ * stream). Like the other subcommands, these print to stdout and must run before the
12
+ * transport claims it.
13
+ */
14
+ export declare function isVersionCommand(argv?: string[]): boolean;
15
+ export declare function isHelpCommand(argv?: string[]): boolean;
16
+ export declare function formatVersion(version: string): string;
17
+ export declare function formatHelp(version: string): string;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"","sourceRoot":"","sources":["file:///Users/jannelammi/code/Pathmode/packages/mcp-server/src/cli-info.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,wBAAgB,gBAAgB,CAAC,IAAI,WAAe,GAAG,OAAO,CAE7D;AAED,wBAAgB,aAAa,CAAC,IAAI,WAAe,GAAG,OAAO,CAE1D;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA6BlD"}
package/dist/index.js CHANGED
@@ -33753,6 +33753,74 @@ class PathmodeClient {
33753
33753
  exports.PathmodeClient = PathmodeClient;
33754
33754
 
33755
33755
 
33756
+ /***/ }),
33757
+
33758
+ /***/ 7198:
33759
+ /***/ ((__unused_webpack_module, exports) => {
33760
+
33761
+ "use strict";
33762
+
33763
+ /**
33764
+ * `--version` / `--help` handling.
33765
+ *
33766
+ * Without this, any argument that is not a known subcommand falls through to
33767
+ * StdioServerTransport, which waits on stdin forever. `npx @pathmode/mcp-server --version`
33768
+ * — the first thing someone types after installing — looked like a hang.
33769
+ *
33770
+ * Deliberately narrow: only these exact flags are claimed. An unrecognized flag still
33771
+ * starts the server, because an MCP client passing something we do not know about must
33772
+ * get a working server, not a usage screen on stdout (which would corrupt the JSON-RPC
33773
+ * stream). Like the other subcommands, these print to stdout and must run before the
33774
+ * transport claims it.
33775
+ */
33776
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
33777
+ exports.isVersionCommand = isVersionCommand;
33778
+ exports.isHelpCommand = isHelpCommand;
33779
+ exports.formatVersion = formatVersion;
33780
+ exports.formatHelp = formatHelp;
33781
+ const VERSION_FLAGS = new Set(['--version', '-v']);
33782
+ const HELP_FLAGS = new Set(['--help', '-h']);
33783
+ function isVersionCommand(argv = process.argv) {
33784
+ return argv.slice(2).some((a) => VERSION_FLAGS.has(a));
33785
+ }
33786
+ function isHelpCommand(argv = process.argv) {
33787
+ return argv.slice(2).some((a) => HELP_FLAGS.has(a));
33788
+ }
33789
+ function formatVersion(version) {
33790
+ return `@pathmode/mcp-server ${version}`;
33791
+ }
33792
+ function formatHelp(version) {
33793
+ return [
33794
+ formatVersion(version),
33795
+ '',
33796
+ 'MCP server for Pathmode — intent specs your coding agent can read.',
33797
+ '',
33798
+ 'USAGE',
33799
+ ' npx @pathmode/mcp-server Start the server (stdio). This is what an',
33800
+ ' MCP client runs; it waits on stdin by design.',
33801
+ ' npx @pathmode/mcp-server setup [key] Configure Claude Code/Desktop, Cursor, Windsurf.',
33802
+ ' npx @pathmode/mcp-server install-skills Install the skill pack into this project.',
33803
+ ' npx @pathmode/mcp-server --version Print the version.',
33804
+ ' npx @pathmode/mcp-server --help Print this help.',
33805
+ '',
33806
+ 'MODES',
33807
+ ' Local (default, no key) Specs live in intent.md in your repo. Nothing leaves the machine.',
33808
+ ' Cloud (with a key) Syncs intent and evidence with a Pathmode workspace.',
33809
+ ' Set PATHMODE_API_KEY, or run setup with a pm_live_ key.',
33810
+ '',
33811
+ 'FLAGS',
33812
+ ' --local Force local mode even when an API key is configured.',
33813
+ '',
33814
+ 'ENVIRONMENT',
33815
+ ' PATHMODE_API_KEY Workspace key (pm_live_…). Absent means local mode.',
33816
+ ' PATHMODE_API_URL Override the API base URL. Defaults to https://pathmode.io',
33817
+ ' PATHMODE_MCP_DEBUG=1 Log the inferred mode to stderr on startup.',
33818
+ '',
33819
+ 'Docs: https://pathmode.io/developers · Preflight: https://preflight.pathmode.io',
33820
+ ].join('\n');
33821
+ }
33822
+
33823
+
33756
33824
  /***/ }),
33757
33825
 
33758
33826
  /***/ 3783:
@@ -65181,7 +65249,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"$schema":"http://json-schema.org/dra
65181
65249
  /***/ ((module) => {
65182
65250
 
65183
65251
  "use strict";
65184
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@pathmode/mcp-server","version":"1.12.0","publishConfig":{"access":"public"},"mcpName":"io.github.pathmodeio/mcp-server","description":"Pathmode MCP Server — Build structured intent specs through Socratic AI conversation (zero-config), or connect to your Intent Layer for strategic context, dependency graphs, and implementation prompts.","main":"dist/index.js","bin":{"pathmode-mcp":"dist/index.js"},"files":["dist/","manifest.json","icon.svg","README.md","skills/"],"scripts":{"build":"rm -rf dist && ncc build src/index.ts -o dist","dev":"ts-node src/index.ts","prepublishOnly":"npm run build"},"keywords":["pathmode","mcp","model-context-protocol","claude-code","claude-code-skills","agent-skills","cursor","windsurf","intent-engineering","intent-compiler","ai-agents","product-development","dependency-graph","strategic-planning"],"author":"Pathmode","license":"MIT","type":"commonjs","engines":{"node":">=18.0.0"},"repository":{"type":"git","url":"git+https://github.com/pathmodeio/mcp-server.git","directory":"packages/mcp-server"},"homepage":"https://pathmode.io","dependencies":{"@modelcontextprotocol/sdk":"^1.12.1","gray-matter":"^4.0.3","zod":"^3.24.0"},"devDependencies":{"@types/node":"^25.1.0","@vercel/ncc":"^0.38.4","ts-node":"^10.9.2","typescript":"^5.9.3"}}');
65252
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@pathmode/mcp-server","version":"1.12.1","publishConfig":{"access":"public"},"mcpName":"io.github.pathmodeio/mcp-server","description":"Pathmode MCP Server — Build structured intent specs through Socratic AI conversation (zero-config), or connect to your Intent Layer for strategic context, dependency graphs, and implementation prompts.","main":"dist/index.js","bin":{"pathmode-mcp":"dist/index.js"},"files":["dist/","manifest.json","icon.svg","README.md","skills/"],"scripts":{"build":"rm -rf dist && ncc build src/index.ts -o dist","dev":"ts-node src/index.ts","prepublishOnly":"npm run build"},"keywords":["pathmode","mcp","model-context-protocol","claude-code","claude-code-skills","agent-skills","cursor","windsurf","intent-engineering","intent-compiler","ai-agents","product-development","dependency-graph","strategic-planning"],"author":"Pathmode","license":"MIT","type":"commonjs","engines":{"node":">=18.0.0"},"repository":{"type":"git","url":"git+https://github.com/pathmodeio/mcp-server.git","directory":"packages/mcp-server"},"homepage":"https://pathmode.io","dependencies":{"@modelcontextprotocol/sdk":"^1.12.1","gray-matter":"^4.0.3","zod":"^3.24.0"},"devDependencies":{"@types/node":"^25.1.0","@vercel/ncc":"^0.38.4","ts-node":"^10.9.2","typescript":"^5.9.3"}}');
65185
65253
 
65186
65254
  /***/ })
65187
65255
 
@@ -65283,15 +65351,24 @@ const intent_compiler_1 = __nccwpck_require__(6488);
65283
65351
  const pathmode_section_1 = __nccwpck_require__(4681);
65284
65352
  const setup_1 = __nccwpck_require__(8294);
65285
65353
  const install_skills_1 = __nccwpck_require__(3783);
65354
+ const cli_info_1 = __nccwpck_require__(7198);
65286
65355
  // Server version is sourced from package.json so the version reported to MCP
65287
65356
  // clients always matches the published package. ncc statically resolves this
65288
65357
  // require() and inlines the JSON at build time (no runtime fs read).
65289
65358
  const { version: SERVER_VERSION } = __nccwpck_require__(8330);
65290
65359
  // ─── Subcommand routing ───────────────────────────────────────
65291
- // Human-readable subcommands (`setup`, `install-skills`) use stdout
65360
+ // Human-readable subcommands (`setup`, `install-skills`, `--version`, `--help`) use stdout
65292
65361
  // and must run before StdioServerTransport claims stdout for JSON-RPC.
65293
65362
  // We call startMcpServer() only when NOT in a subcommand.
65294
- if ((0, setup_1.isSetupCommand)()) {
65363
+ if ((0, cli_info_1.isVersionCommand)()) {
65364
+ console.log((0, cli_info_1.formatVersion)(SERVER_VERSION));
65365
+ process.exit(0);
65366
+ }
65367
+ else if ((0, cli_info_1.isHelpCommand)()) {
65368
+ console.log((0, cli_info_1.formatHelp)(SERVER_VERSION));
65369
+ process.exit(0);
65370
+ }
65371
+ else if ((0, setup_1.isSetupCommand)()) {
65295
65372
  (0, setup_1.runSetup)().then(() => process.exit(0)).catch((err) => {
65296
65373
  console.error(err);
65297
65374
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pathmode/mcp-server",
3
- "version": "1.12.0",
3
+ "version": "1.12.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },