@getcodesentinel/mcp 0.1.0 → 1.43.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.
package/dist/index.js CHANGED
@@ -2,8 +2,9 @@
2
2
 
3
3
  // src/index.ts
4
4
  import { spawn } from "child_process";
5
+ import { realpathSync } from "fs";
5
6
  import { createRequire } from "module";
6
- import { pathToFileURL } from "url";
7
+ import { fileURLToPath, pathToFileURL } from "url";
7
8
  var require2 = createRequire(import.meta.url);
8
9
  var spawnCodesentinelMcp = (argv) => {
9
10
  const cliEntry = require2.resolve("@getcodesentinel/codesentinel");
@@ -30,7 +31,23 @@ var spawnCodesentinelMcp = (argv) => {
30
31
  });
31
32
  return child;
32
33
  };
33
- if (import.meta.url === pathToFileURL(process.argv[1] ?? "").href) {
34
+ var resolveRealPathUrl = (path) => {
35
+ try {
36
+ return pathToFileURL(realpathSync(path)).href;
37
+ } catch {
38
+ return void 0;
39
+ }
40
+ };
41
+ var isProcessEntryPoint = () => {
42
+ const entryPath = process.argv[1];
43
+ if (entryPath === void 0) {
44
+ return false;
45
+ }
46
+ const moduleUrl = resolveRealPathUrl(fileURLToPath(import.meta.url));
47
+ const entryUrl = resolveRealPathUrl(entryPath);
48
+ return moduleUrl !== void 0 && moduleUrl === entryUrl;
49
+ };
50
+ if (isProcessEntryPoint()) {
34
51
  spawnCodesentinelMcp(process.argv.slice(2));
35
52
  }
36
53
  export {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { spawn, type ChildProcess } from \"node:child_process\";\nimport { createRequire } from \"node:module\";\nimport { pathToFileURL } from \"node:url\";\n\nconst require = createRequire(import.meta.url);\n\nexport const spawnCodesentinelMcp = (argv: readonly string[]): ChildProcess => {\n const cliEntry = require.resolve(\"@getcodesentinel/codesentinel\");\n const child = spawn(process.execPath, [cliEntry, \"mcp\", ...argv], {\n stdio: \"inherit\",\n env: process.env,\n });\n\n const forward = (signal: NodeJS.Signals): void => {\n child.kill(signal);\n };\n const cleanup = (): void => {\n process.off(\"SIGINT\", forward);\n process.off(\"SIGTERM\", forward);\n };\n\n process.on(\"SIGINT\", forward);\n process.on(\"SIGTERM\", forward);\n child.on(\"exit\", (code) => {\n cleanup();\n process.exitCode = code ?? 1;\n });\n child.on(\"error\", () => {\n cleanup();\n process.exitCode = 1;\n });\n\n return child;\n};\n\nif (import.meta.url === pathToFileURL(process.argv[1] ?? \"\").href) {\n spawnCodesentinelMcp(process.argv.slice(2));\n}\n"],"mappings":";;;AAAA,SAAS,aAAgC;AACzC,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB;AAE9B,IAAMA,WAAU,cAAc,YAAY,GAAG;AAEtC,IAAM,uBAAuB,CAAC,SAA0C;AAC7E,QAAM,WAAWA,SAAQ,QAAQ,+BAA+B;AAChE,QAAM,QAAQ,MAAM,QAAQ,UAAU,CAAC,UAAU,OAAO,GAAG,IAAI,GAAG;AAAA,IAChE,OAAO;AAAA,IACP,KAAK,QAAQ;AAAA,EACf,CAAC;AAED,QAAM,UAAU,CAAC,WAAiC;AAChD,UAAM,KAAK,MAAM;AAAA,EACnB;AACA,QAAM,UAAU,MAAY;AAC1B,YAAQ,IAAI,UAAU,OAAO;AAC7B,YAAQ,IAAI,WAAW,OAAO;AAAA,EAChC;AAEA,UAAQ,GAAG,UAAU,OAAO;AAC5B,UAAQ,GAAG,WAAW,OAAO;AAC7B,QAAM,GAAG,QAAQ,CAAC,SAAS;AACzB,YAAQ;AACR,YAAQ,WAAW,QAAQ;AAAA,EAC7B,CAAC;AACD,QAAM,GAAG,SAAS,MAAM;AACtB,YAAQ;AACR,YAAQ,WAAW;AAAA,EACrB,CAAC;AAED,SAAO;AACT;AAEA,IAAI,YAAY,QAAQ,cAAc,QAAQ,KAAK,CAAC,KAAK,EAAE,EAAE,MAAM;AACjE,uBAAqB,QAAQ,KAAK,MAAM,CAAC,CAAC;AAC5C;","names":["require"]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { spawn, type ChildProcess } from \"node:child_process\";\nimport { realpathSync } from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport { fileURLToPath, pathToFileURL } from \"node:url\";\n\nconst require = createRequire(import.meta.url);\n\nexport const spawnCodesentinelMcp = (argv: readonly string[]): ChildProcess => {\n const cliEntry = require.resolve(\"@getcodesentinel/codesentinel\");\n const child = spawn(process.execPath, [cliEntry, \"mcp\", ...argv], {\n stdio: \"inherit\",\n env: process.env,\n });\n\n const forward = (signal: NodeJS.Signals): void => {\n child.kill(signal);\n };\n const cleanup = (): void => {\n process.off(\"SIGINT\", forward);\n process.off(\"SIGTERM\", forward);\n };\n\n process.on(\"SIGINT\", forward);\n process.on(\"SIGTERM\", forward);\n child.on(\"exit\", (code) => {\n cleanup();\n process.exitCode = code ?? 1;\n });\n child.on(\"error\", () => {\n cleanup();\n process.exitCode = 1;\n });\n\n return child;\n};\n\nconst resolveRealPathUrl = (path: string): string | undefined => {\n try {\n return pathToFileURL(realpathSync(path)).href;\n } catch {\n return undefined;\n }\n};\n\nconst isProcessEntryPoint = (): boolean => {\n const entryPath = process.argv[1];\n if (entryPath === undefined) {\n return false;\n }\n\n const moduleUrl = resolveRealPathUrl(fileURLToPath(import.meta.url));\n const entryUrl = resolveRealPathUrl(entryPath);\n return moduleUrl !== undefined && moduleUrl === entryUrl;\n};\n\nif (isProcessEntryPoint()) {\n spawnCodesentinelMcp(process.argv.slice(2));\n}\n"],"mappings":";;;AAAA,SAAS,aAAgC;AACzC,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAC9B,SAAS,eAAe,qBAAqB;AAE7C,IAAMA,WAAU,cAAc,YAAY,GAAG;AAEtC,IAAM,uBAAuB,CAAC,SAA0C;AAC7E,QAAM,WAAWA,SAAQ,QAAQ,+BAA+B;AAChE,QAAM,QAAQ,MAAM,QAAQ,UAAU,CAAC,UAAU,OAAO,GAAG,IAAI,GAAG;AAAA,IAChE,OAAO;AAAA,IACP,KAAK,QAAQ;AAAA,EACf,CAAC;AAED,QAAM,UAAU,CAAC,WAAiC;AAChD,UAAM,KAAK,MAAM;AAAA,EACnB;AACA,QAAM,UAAU,MAAY;AAC1B,YAAQ,IAAI,UAAU,OAAO;AAC7B,YAAQ,IAAI,WAAW,OAAO;AAAA,EAChC;AAEA,UAAQ,GAAG,UAAU,OAAO;AAC5B,UAAQ,GAAG,WAAW,OAAO;AAC7B,QAAM,GAAG,QAAQ,CAAC,SAAS;AACzB,YAAQ;AACR,YAAQ,WAAW,QAAQ;AAAA,EAC7B,CAAC;AACD,QAAM,GAAG,SAAS,MAAM;AACtB,YAAQ;AACR,YAAQ,WAAW;AAAA,EACrB,CAAC;AAED,SAAO;AACT;AAEA,IAAM,qBAAqB,CAAC,SAAqC;AAC/D,MAAI;AACF,WAAO,cAAc,aAAa,IAAI,CAAC,EAAE;AAAA,EAC3C,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,IAAM,sBAAsB,MAAe;AACzC,QAAM,YAAY,QAAQ,KAAK,CAAC;AAChC,MAAI,cAAc,QAAW;AAC3B,WAAO;AAAA,EACT;AAEA,QAAM,YAAY,mBAAmB,cAAc,YAAY,GAAG,CAAC;AACnE,QAAM,WAAW,mBAAmB,SAAS;AAC7C,SAAO,cAAc,UAAa,cAAc;AAClD;AAEA,IAAI,oBAAoB,GAAG;AACzB,uBAAqB,QAAQ,KAAK,MAAM,CAAC,CAAC;AAC5C;","names":["require"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getcodesentinel/mcp",
3
- "version": "0.1.0",
3
+ "version": "1.43.1",
4
4
  "mcpName": "io.github.getcodesentinel/mcp",
5
5
  "type": "module",
6
6
  "description": "stdio MCP server for CodeSentinel: ownership, risk, trend and reading path for AI coding agents.",
@@ -21,7 +21,7 @@
21
21
  "README.md"
22
22
  ],
23
23
  "dependencies": {
24
- "@getcodesentinel/codesentinel": "^1.42.1"
24
+ "@getcodesentinel/codesentinel": "^1.43.1"
25
25
  },
26
26
  "publishConfig": {
27
27
  "access": "public"